{-
   Kubernetes

   No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

   OpenAPI Version: 3.0.1
   Kubernetes API version: release-1.32
   Generated by OpenAPI Generator (https://openapi-generator.tech)
-}

{-|
Module : Kubernetes.OpenAPI.Model
-}

{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-matches -fno-warn-unused-binds -fno-warn-unused-imports #-}

module Kubernetes.OpenAPI.Model (module Kubernetes.OpenAPI.Model, module Kubernetes.OpenAPI.ImportMappings) where

import Kubernetes.OpenAPI.Core
import Kubernetes.OpenAPI.MimeTypes
import Kubernetes.OpenAPI.ImportMappings

import Data.Aeson ((.:),(.:!),(.:?),(.=))

import qualified Control.Arrow as P (left)
import qualified Data.Aeson as A
import qualified Data.ByteString as B
import qualified Data.ByteString.Base64 as B64
import qualified Data.ByteString.Char8 as BC
import qualified Data.ByteString.Lazy as BL
import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep)
import qualified Data.Foldable as P
import qualified Data.HashMap.Lazy as HM
import qualified Data.Map as Map
import qualified Data.Maybe as P
import qualified Data.Set as Set
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import qualified Data.Time as TI
import qualified Lens.Micro as L
import qualified Web.FormUrlEncoded as WH
import qualified Web.HttpApiData as WH

import Control.Applicative ((<|>))
import Control.Applicative (Alternative)
import Data.Function ((&))
import Data.Monoid ((<>))
import Data.Text (Text)
import Prelude (($),(/=),(.),(<$>),(<*>),(>>=),(=<<),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor)

import qualified Prelude as P



-- * Parameter newtypes


-- ** AllowWatchBookmarks
newtype AllowWatchBookmarks = AllowWatchBookmarks { AllowWatchBookmarks -> Bool
unAllowWatchBookmarks :: Bool } deriving (AllowWatchBookmarks -> AllowWatchBookmarks -> Bool
(AllowWatchBookmarks -> AllowWatchBookmarks -> Bool)
-> (AllowWatchBookmarks -> AllowWatchBookmarks -> Bool)
-> Eq AllowWatchBookmarks
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AllowWatchBookmarks -> AllowWatchBookmarks -> Bool
== :: AllowWatchBookmarks -> AllowWatchBookmarks -> Bool
$c/= :: AllowWatchBookmarks -> AllowWatchBookmarks -> Bool
/= :: AllowWatchBookmarks -> AllowWatchBookmarks -> Bool
P.Eq, Int -> AllowWatchBookmarks -> ShowS
[AllowWatchBookmarks] -> ShowS
AllowWatchBookmarks -> String
(Int -> AllowWatchBookmarks -> ShowS)
-> (AllowWatchBookmarks -> String)
-> ([AllowWatchBookmarks] -> ShowS)
-> Show AllowWatchBookmarks
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AllowWatchBookmarks -> ShowS
showsPrec :: Int -> AllowWatchBookmarks -> ShowS
$cshow :: AllowWatchBookmarks -> String
show :: AllowWatchBookmarks -> String
$cshowList :: [AllowWatchBookmarks] -> ShowS
showList :: [AllowWatchBookmarks] -> ShowS
P.Show)

-- ** Body
newtype Body = Body { Body -> Value
unBody :: A.Value } deriving (Body -> Body -> Bool
(Body -> Body -> Bool) -> (Body -> Body -> Bool) -> Eq Body
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Body -> Body -> Bool
== :: Body -> Body -> Bool
$c/= :: Body -> Body -> Bool
/= :: Body -> Body -> Bool
P.Eq, Int -> Body -> ShowS
[Body] -> ShowS
Body -> String
(Int -> Body -> ShowS)
-> (Body -> String) -> ([Body] -> ShowS) -> Show Body
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Body -> ShowS
showsPrec :: Int -> Body -> ShowS
$cshow :: Body -> String
show :: Body -> String
$cshowList :: [Body] -> ShowS
showList :: [Body] -> ShowS
P.Show, [Body] -> Value
[Body] -> Encoding
Body -> Bool
Body -> Value
Body -> Encoding
(Body -> Value)
-> (Body -> Encoding)
-> ([Body] -> Value)
-> ([Body] -> Encoding)
-> (Body -> Bool)
-> ToJSON Body
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> (a -> Bool)
-> ToJSON a
$ctoJSON :: Body -> Value
toJSON :: Body -> Value
$ctoEncoding :: Body -> Encoding
toEncoding :: Body -> Encoding
$ctoJSONList :: [Body] -> Value
toJSONList :: [Body] -> Value
$ctoEncodingList :: [Body] -> Encoding
toEncodingList :: [Body] -> Encoding
$comitField :: Body -> Bool
omitField :: Body -> Bool
A.ToJSON)

-- ** Command
newtype Command = Command { Command -> Text
unCommand :: Text } deriving (Command -> Command -> Bool
(Command -> Command -> Bool)
-> (Command -> Command -> Bool) -> Eq Command
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Command -> Command -> Bool
== :: Command -> Command -> Bool
$c/= :: Command -> Command -> Bool
/= :: Command -> Command -> Bool
P.Eq, Int -> Command -> ShowS
[Command] -> ShowS
Command -> String
(Int -> Command -> ShowS)
-> (Command -> String) -> ([Command] -> ShowS) -> Show Command
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Command -> ShowS
showsPrec :: Int -> Command -> ShowS
$cshow :: Command -> String
show :: Command -> String
$cshowList :: [Command] -> ShowS
showList :: [Command] -> ShowS
P.Show)

-- ** Container
newtype Container = Container { Container -> Text
unContainer :: Text } deriving (Container -> Container -> Bool
(Container -> Container -> Bool)
-> (Container -> Container -> Bool) -> Eq Container
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Container -> Container -> Bool
== :: Container -> Container -> Bool
$c/= :: Container -> Container -> Bool
/= :: Container -> Container -> Bool
P.Eq, Int -> Container -> ShowS
[Container] -> ShowS
Container -> String
(Int -> Container -> ShowS)
-> (Container -> String)
-> ([Container] -> ShowS)
-> Show Container
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Container -> ShowS
showsPrec :: Int -> Container -> ShowS
$cshow :: Container -> String
show :: Container -> String
$cshowList :: [Container] -> ShowS
showList :: [Container] -> ShowS
P.Show)

-- ** Continue
newtype Continue = Continue { Continue -> Text
unContinue :: Text } deriving (Continue -> Continue -> Bool
(Continue -> Continue -> Bool)
-> (Continue -> Continue -> Bool) -> Eq Continue
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Continue -> Continue -> Bool
== :: Continue -> Continue -> Bool
$c/= :: Continue -> Continue -> Bool
/= :: Continue -> Continue -> Bool
P.Eq, Int -> Continue -> ShowS
[Continue] -> ShowS
Continue -> String
(Int -> Continue -> ShowS)
-> (Continue -> String) -> ([Continue] -> ShowS) -> Show Continue
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Continue -> ShowS
showsPrec :: Int -> Continue -> ShowS
$cshow :: Continue -> String
show :: Continue -> String
$cshowList :: [Continue] -> ShowS
showList :: [Continue] -> ShowS
P.Show)

-- ** DryRun
newtype DryRun = DryRun { DryRun -> Text
unDryRun :: Text } deriving (DryRun -> DryRun -> Bool
(DryRun -> DryRun -> Bool)
-> (DryRun -> DryRun -> Bool) -> Eq DryRun
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DryRun -> DryRun -> Bool
== :: DryRun -> DryRun -> Bool
$c/= :: DryRun -> DryRun -> Bool
/= :: DryRun -> DryRun -> Bool
P.Eq, Int -> DryRun -> ShowS
[DryRun] -> ShowS
DryRun -> String
(Int -> DryRun -> ShowS)
-> (DryRun -> String) -> ([DryRun] -> ShowS) -> Show DryRun
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DryRun -> ShowS
showsPrec :: Int -> DryRun -> ShowS
$cshow :: DryRun -> String
show :: DryRun -> String
$cshowList :: [DryRun] -> ShowS
showList :: [DryRun] -> ShowS
P.Show)

-- ** FieldManager
newtype FieldManager = FieldManager { FieldManager -> Text
unFieldManager :: Text } deriving (FieldManager -> FieldManager -> Bool
(FieldManager -> FieldManager -> Bool)
-> (FieldManager -> FieldManager -> Bool) -> Eq FieldManager
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FieldManager -> FieldManager -> Bool
== :: FieldManager -> FieldManager -> Bool
$c/= :: FieldManager -> FieldManager -> Bool
/= :: FieldManager -> FieldManager -> Bool
P.Eq, Int -> FieldManager -> ShowS
[FieldManager] -> ShowS
FieldManager -> String
(Int -> FieldManager -> ShowS)
-> (FieldManager -> String)
-> ([FieldManager] -> ShowS)
-> Show FieldManager
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FieldManager -> ShowS
showsPrec :: Int -> FieldManager -> ShowS
$cshow :: FieldManager -> String
show :: FieldManager -> String
$cshowList :: [FieldManager] -> ShowS
showList :: [FieldManager] -> ShowS
P.Show)

-- ** FieldSelector
newtype FieldSelector = FieldSelector { FieldSelector -> Text
unFieldSelector :: Text } deriving (FieldSelector -> FieldSelector -> Bool
(FieldSelector -> FieldSelector -> Bool)
-> (FieldSelector -> FieldSelector -> Bool) -> Eq FieldSelector
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FieldSelector -> FieldSelector -> Bool
== :: FieldSelector -> FieldSelector -> Bool
$c/= :: FieldSelector -> FieldSelector -> Bool
/= :: FieldSelector -> FieldSelector -> Bool
P.Eq, Int -> FieldSelector -> ShowS
[FieldSelector] -> ShowS
FieldSelector -> String
(Int -> FieldSelector -> ShowS)
-> (FieldSelector -> String)
-> ([FieldSelector] -> ShowS)
-> Show FieldSelector
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FieldSelector -> ShowS
showsPrec :: Int -> FieldSelector -> ShowS
$cshow :: FieldSelector -> String
show :: FieldSelector -> String
$cshowList :: [FieldSelector] -> ShowS
showList :: [FieldSelector] -> ShowS
P.Show)

-- ** FieldValidation
newtype FieldValidation = FieldValidation { FieldValidation -> Text
unFieldValidation :: Text } deriving (FieldValidation -> FieldValidation -> Bool
(FieldValidation -> FieldValidation -> Bool)
-> (FieldValidation -> FieldValidation -> Bool)
-> Eq FieldValidation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FieldValidation -> FieldValidation -> Bool
== :: FieldValidation -> FieldValidation -> Bool
$c/= :: FieldValidation -> FieldValidation -> Bool
/= :: FieldValidation -> FieldValidation -> Bool
P.Eq, Int -> FieldValidation -> ShowS
[FieldValidation] -> ShowS
FieldValidation -> String
(Int -> FieldValidation -> ShowS)
-> (FieldValidation -> String)
-> ([FieldValidation] -> ShowS)
-> Show FieldValidation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FieldValidation -> ShowS
showsPrec :: Int -> FieldValidation -> ShowS
$cshow :: FieldValidation -> String
show :: FieldValidation -> String
$cshowList :: [FieldValidation] -> ShowS
showList :: [FieldValidation] -> ShowS
P.Show)

-- ** Follow
newtype Follow = Follow { Follow -> Bool
unFollow :: Bool } deriving (Follow -> Follow -> Bool
(Follow -> Follow -> Bool)
-> (Follow -> Follow -> Bool) -> Eq Follow
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Follow -> Follow -> Bool
== :: Follow -> Follow -> Bool
$c/= :: Follow -> Follow -> Bool
/= :: Follow -> Follow -> Bool
P.Eq, Int -> Follow -> ShowS
[Follow] -> ShowS
Follow -> String
(Int -> Follow -> ShowS)
-> (Follow -> String) -> ([Follow] -> ShowS) -> Show Follow
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Follow -> ShowS
showsPrec :: Int -> Follow -> ShowS
$cshow :: Follow -> String
show :: Follow -> String
$cshowList :: [Follow] -> ShowS
showList :: [Follow] -> ShowS
P.Show)

-- ** Force
newtype Force = Force { Force -> Bool
unForce :: Bool } deriving (Force -> Force -> Bool
(Force -> Force -> Bool) -> (Force -> Force -> Bool) -> Eq Force
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Force -> Force -> Bool
== :: Force -> Force -> Bool
$c/= :: Force -> Force -> Bool
/= :: Force -> Force -> Bool
P.Eq, Int -> Force -> ShowS
[Force] -> ShowS
Force -> String
(Int -> Force -> ShowS)
-> (Force -> String) -> ([Force] -> ShowS) -> Show Force
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Force -> ShowS
showsPrec :: Int -> Force -> ShowS
$cshow :: Force -> String
show :: Force -> String
$cshowList :: [Force] -> ShowS
showList :: [Force] -> ShowS
P.Show)

-- ** GracePeriodSeconds
newtype GracePeriodSeconds = GracePeriodSeconds { GracePeriodSeconds -> Int
unGracePeriodSeconds :: Int } deriving (GracePeriodSeconds -> GracePeriodSeconds -> Bool
(GracePeriodSeconds -> GracePeriodSeconds -> Bool)
-> (GracePeriodSeconds -> GracePeriodSeconds -> Bool)
-> Eq GracePeriodSeconds
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GracePeriodSeconds -> GracePeriodSeconds -> Bool
== :: GracePeriodSeconds -> GracePeriodSeconds -> Bool
$c/= :: GracePeriodSeconds -> GracePeriodSeconds -> Bool
/= :: GracePeriodSeconds -> GracePeriodSeconds -> Bool
P.Eq, Int -> GracePeriodSeconds -> ShowS
[GracePeriodSeconds] -> ShowS
GracePeriodSeconds -> String
(Int -> GracePeriodSeconds -> ShowS)
-> (GracePeriodSeconds -> String)
-> ([GracePeriodSeconds] -> ShowS)
-> Show GracePeriodSeconds
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GracePeriodSeconds -> ShowS
showsPrec :: Int -> GracePeriodSeconds -> ShowS
$cshow :: GracePeriodSeconds -> String
show :: GracePeriodSeconds -> String
$cshowList :: [GracePeriodSeconds] -> ShowS
showList :: [GracePeriodSeconds] -> ShowS
P.Show)

-- ** Group
newtype Group = Group { Group -> Text
unGroup :: Text } deriving (Group -> Group -> Bool
(Group -> Group -> Bool) -> (Group -> Group -> Bool) -> Eq Group
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Group -> Group -> Bool
== :: Group -> Group -> Bool
$c/= :: Group -> Group -> Bool
/= :: Group -> Group -> Bool
P.Eq, Int -> Group -> ShowS
[Group] -> ShowS
Group -> String
(Int -> Group -> ShowS)
-> (Group -> String) -> ([Group] -> ShowS) -> Show Group
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Group -> ShowS
showsPrec :: Int -> Group -> ShowS
$cshow :: Group -> String
show :: Group -> String
$cshowList :: [Group] -> ShowS
showList :: [Group] -> ShowS
P.Show)

-- ** IgnoreStoreReadErrorWithClusterBreakingPotential
newtype IgnoreStoreReadErrorWithClusterBreakingPotential = IgnoreStoreReadErrorWithClusterBreakingPotential { IgnoreStoreReadErrorWithClusterBreakingPotential -> Bool
unIgnoreStoreReadErrorWithClusterBreakingPotential :: Bool } deriving (IgnoreStoreReadErrorWithClusterBreakingPotential
-> IgnoreStoreReadErrorWithClusterBreakingPotential -> Bool
(IgnoreStoreReadErrorWithClusterBreakingPotential
 -> IgnoreStoreReadErrorWithClusterBreakingPotential -> Bool)
-> (IgnoreStoreReadErrorWithClusterBreakingPotential
    -> IgnoreStoreReadErrorWithClusterBreakingPotential -> Bool)
-> Eq IgnoreStoreReadErrorWithClusterBreakingPotential
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: IgnoreStoreReadErrorWithClusterBreakingPotential
-> IgnoreStoreReadErrorWithClusterBreakingPotential -> Bool
== :: IgnoreStoreReadErrorWithClusterBreakingPotential
-> IgnoreStoreReadErrorWithClusterBreakingPotential -> Bool
$c/= :: IgnoreStoreReadErrorWithClusterBreakingPotential
-> IgnoreStoreReadErrorWithClusterBreakingPotential -> Bool
/= :: IgnoreStoreReadErrorWithClusterBreakingPotential
-> IgnoreStoreReadErrorWithClusterBreakingPotential -> Bool
P.Eq, Int -> IgnoreStoreReadErrorWithClusterBreakingPotential -> ShowS
[IgnoreStoreReadErrorWithClusterBreakingPotential] -> ShowS
IgnoreStoreReadErrorWithClusterBreakingPotential -> String
(Int -> IgnoreStoreReadErrorWithClusterBreakingPotential -> ShowS)
-> (IgnoreStoreReadErrorWithClusterBreakingPotential -> String)
-> ([IgnoreStoreReadErrorWithClusterBreakingPotential] -> ShowS)
-> Show IgnoreStoreReadErrorWithClusterBreakingPotential
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> IgnoreStoreReadErrorWithClusterBreakingPotential -> ShowS
showsPrec :: Int -> IgnoreStoreReadErrorWithClusterBreakingPotential -> ShowS
$cshow :: IgnoreStoreReadErrorWithClusterBreakingPotential -> String
show :: IgnoreStoreReadErrorWithClusterBreakingPotential -> String
$cshowList :: [IgnoreStoreReadErrorWithClusterBreakingPotential] -> ShowS
showList :: [IgnoreStoreReadErrorWithClusterBreakingPotential] -> ShowS
P.Show)

-- ** InsecureSkipTlsVerifyBackend
newtype InsecureSkipTlsVerifyBackend = InsecureSkipTlsVerifyBackend { InsecureSkipTlsVerifyBackend -> Bool
unInsecureSkipTlsVerifyBackend :: Bool } deriving (InsecureSkipTlsVerifyBackend
-> InsecureSkipTlsVerifyBackend -> Bool
(InsecureSkipTlsVerifyBackend
 -> InsecureSkipTlsVerifyBackend -> Bool)
-> (InsecureSkipTlsVerifyBackend
    -> InsecureSkipTlsVerifyBackend -> Bool)
-> Eq InsecureSkipTlsVerifyBackend
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InsecureSkipTlsVerifyBackend
-> InsecureSkipTlsVerifyBackend -> Bool
== :: InsecureSkipTlsVerifyBackend
-> InsecureSkipTlsVerifyBackend -> Bool
$c/= :: InsecureSkipTlsVerifyBackend
-> InsecureSkipTlsVerifyBackend -> Bool
/= :: InsecureSkipTlsVerifyBackend
-> InsecureSkipTlsVerifyBackend -> Bool
P.Eq, Int -> InsecureSkipTlsVerifyBackend -> ShowS
[InsecureSkipTlsVerifyBackend] -> ShowS
InsecureSkipTlsVerifyBackend -> String
(Int -> InsecureSkipTlsVerifyBackend -> ShowS)
-> (InsecureSkipTlsVerifyBackend -> String)
-> ([InsecureSkipTlsVerifyBackend] -> ShowS)
-> Show InsecureSkipTlsVerifyBackend
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InsecureSkipTlsVerifyBackend -> ShowS
showsPrec :: Int -> InsecureSkipTlsVerifyBackend -> ShowS
$cshow :: InsecureSkipTlsVerifyBackend -> String
show :: InsecureSkipTlsVerifyBackend -> String
$cshowList :: [InsecureSkipTlsVerifyBackend] -> ShowS
showList :: [InsecureSkipTlsVerifyBackend] -> ShowS
P.Show)

-- ** LabelSelector
newtype LabelSelector = LabelSelector { LabelSelector -> Text
unLabelSelector :: Text } deriving (LabelSelector -> LabelSelector -> Bool
(LabelSelector -> LabelSelector -> Bool)
-> (LabelSelector -> LabelSelector -> Bool) -> Eq LabelSelector
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LabelSelector -> LabelSelector -> Bool
== :: LabelSelector -> LabelSelector -> Bool
$c/= :: LabelSelector -> LabelSelector -> Bool
/= :: LabelSelector -> LabelSelector -> Bool
P.Eq, Int -> LabelSelector -> ShowS
[LabelSelector] -> ShowS
LabelSelector -> String
(Int -> LabelSelector -> ShowS)
-> (LabelSelector -> String)
-> ([LabelSelector] -> ShowS)
-> Show LabelSelector
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LabelSelector -> ShowS
showsPrec :: Int -> LabelSelector -> ShowS
$cshow :: LabelSelector -> String
show :: LabelSelector -> String
$cshowList :: [LabelSelector] -> ShowS
showList :: [LabelSelector] -> ShowS
P.Show)

-- ** Limit
newtype Limit = Limit { Limit -> Int
unLimit :: Int } deriving (Limit -> Limit -> Bool
(Limit -> Limit -> Bool) -> (Limit -> Limit -> Bool) -> Eq Limit
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Limit -> Limit -> Bool
== :: Limit -> Limit -> Bool
$c/= :: Limit -> Limit -> Bool
/= :: Limit -> Limit -> Bool
P.Eq, Int -> Limit -> ShowS
[Limit] -> ShowS
Limit -> String
(Int -> Limit -> ShowS)
-> (Limit -> String) -> ([Limit] -> ShowS) -> Show Limit
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Limit -> ShowS
showsPrec :: Int -> Limit -> ShowS
$cshow :: Limit -> String
show :: Limit -> String
$cshowList :: [Limit] -> ShowS
showList :: [Limit] -> ShowS
P.Show)

-- ** LimitBytes
newtype LimitBytes = LimitBytes { LimitBytes -> Int
unLimitBytes :: Int } deriving (LimitBytes -> LimitBytes -> Bool
(LimitBytes -> LimitBytes -> Bool)
-> (LimitBytes -> LimitBytes -> Bool) -> Eq LimitBytes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LimitBytes -> LimitBytes -> Bool
== :: LimitBytes -> LimitBytes -> Bool
$c/= :: LimitBytes -> LimitBytes -> Bool
/= :: LimitBytes -> LimitBytes -> Bool
P.Eq, Int -> LimitBytes -> ShowS
[LimitBytes] -> ShowS
LimitBytes -> String
(Int -> LimitBytes -> ShowS)
-> (LimitBytes -> String)
-> ([LimitBytes] -> ShowS)
-> Show LimitBytes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LimitBytes -> ShowS
showsPrec :: Int -> LimitBytes -> ShowS
$cshow :: LimitBytes -> String
show :: LimitBytes -> String
$cshowList :: [LimitBytes] -> ShowS
showList :: [LimitBytes] -> ShowS
P.Show)

-- ** Logpath
newtype Logpath = Logpath { Logpath -> Text
unLogpath :: Text } deriving (Logpath -> Logpath -> Bool
(Logpath -> Logpath -> Bool)
-> (Logpath -> Logpath -> Bool) -> Eq Logpath
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Logpath -> Logpath -> Bool
== :: Logpath -> Logpath -> Bool
$c/= :: Logpath -> Logpath -> Bool
/= :: Logpath -> Logpath -> Bool
P.Eq, Int -> Logpath -> ShowS
[Logpath] -> ShowS
Logpath -> String
(Int -> Logpath -> ShowS)
-> (Logpath -> String) -> ([Logpath] -> ShowS) -> Show Logpath
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Logpath -> ShowS
showsPrec :: Int -> Logpath -> ShowS
$cshow :: Logpath -> String
show :: Logpath -> String
$cshowList :: [Logpath] -> ShowS
showList :: [Logpath] -> ShowS
P.Show)

-- ** Name
newtype Name = Name { Name -> Text
unName :: Text } deriving (Name -> Name -> Bool
(Name -> Name -> Bool) -> (Name -> Name -> Bool) -> Eq Name
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Name -> Name -> Bool
== :: Name -> Name -> Bool
$c/= :: Name -> Name -> Bool
/= :: Name -> Name -> Bool
P.Eq, Int -> Name -> ShowS
[Name] -> ShowS
Name -> String
(Int -> Name -> ShowS)
-> (Name -> String) -> ([Name] -> ShowS) -> Show Name
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Name -> ShowS
showsPrec :: Int -> Name -> ShowS
$cshow :: Name -> String
show :: Name -> String
$cshowList :: [Name] -> ShowS
showList :: [Name] -> ShowS
P.Show)

-- ** Namespace
newtype Namespace = Namespace { Namespace -> Text
unNamespace :: Text } deriving (Namespace -> Namespace -> Bool
(Namespace -> Namespace -> Bool)
-> (Namespace -> Namespace -> Bool) -> Eq Namespace
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Namespace -> Namespace -> Bool
== :: Namespace -> Namespace -> Bool
$c/= :: Namespace -> Namespace -> Bool
/= :: Namespace -> Namespace -> Bool
P.Eq, Int -> Namespace -> ShowS
[Namespace] -> ShowS
Namespace -> String
(Int -> Namespace -> ShowS)
-> (Namespace -> String)
-> ([Namespace] -> ShowS)
-> Show Namespace
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Namespace -> ShowS
showsPrec :: Int -> Namespace -> ShowS
$cshow :: Namespace -> String
show :: Namespace -> String
$cshowList :: [Namespace] -> ShowS
showList :: [Namespace] -> ShowS
P.Show)

-- ** OrphanDependents
newtype OrphanDependents = OrphanDependents { OrphanDependents -> Bool
unOrphanDependents :: Bool } deriving (OrphanDependents -> OrphanDependents -> Bool
(OrphanDependents -> OrphanDependents -> Bool)
-> (OrphanDependents -> OrphanDependents -> Bool)
-> Eq OrphanDependents
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: OrphanDependents -> OrphanDependents -> Bool
== :: OrphanDependents -> OrphanDependents -> Bool
$c/= :: OrphanDependents -> OrphanDependents -> Bool
/= :: OrphanDependents -> OrphanDependents -> Bool
P.Eq, Int -> OrphanDependents -> ShowS
[OrphanDependents] -> ShowS
OrphanDependents -> String
(Int -> OrphanDependents -> ShowS)
-> (OrphanDependents -> String)
-> ([OrphanDependents] -> ShowS)
-> Show OrphanDependents
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> OrphanDependents -> ShowS
showsPrec :: Int -> OrphanDependents -> ShowS
$cshow :: OrphanDependents -> String
show :: OrphanDependents -> String
$cshowList :: [OrphanDependents] -> ShowS
showList :: [OrphanDependents] -> ShowS
P.Show)

-- ** Path
newtype Path = Path { Path -> Text
unPath :: Text } deriving (Path -> Path -> Bool
(Path -> Path -> Bool) -> (Path -> Path -> Bool) -> Eq Path
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Path -> Path -> Bool
== :: Path -> Path -> Bool
$c/= :: Path -> Path -> Bool
/= :: Path -> Path -> Bool
P.Eq, Int -> Path -> ShowS
[Path] -> ShowS
Path -> String
(Int -> Path -> ShowS)
-> (Path -> String) -> ([Path] -> ShowS) -> Show Path
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Path -> ShowS
showsPrec :: Int -> Path -> ShowS
$cshow :: Path -> String
show :: Path -> String
$cshowList :: [Path] -> ShowS
showList :: [Path] -> ShowS
P.Show)

-- ** Path2
newtype Path2 = Path2 { Path2 -> Text
unPath2 :: Text } deriving (Path2 -> Path2 -> Bool
(Path2 -> Path2 -> Bool) -> (Path2 -> Path2 -> Bool) -> Eq Path2
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Path2 -> Path2 -> Bool
== :: Path2 -> Path2 -> Bool
$c/= :: Path2 -> Path2 -> Bool
/= :: Path2 -> Path2 -> Bool
P.Eq, Int -> Path2 -> ShowS
[Path2] -> ShowS
Path2 -> String
(Int -> Path2 -> ShowS)
-> (Path2 -> String) -> ([Path2] -> ShowS) -> Show Path2
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Path2 -> ShowS
showsPrec :: Int -> Path2 -> ShowS
$cshow :: Path2 -> String
show :: Path2 -> String
$cshowList :: [Path2] -> ShowS
showList :: [Path2] -> ShowS
P.Show)

-- ** Plural
newtype Plural = Plural { Plural -> Text
unPlural :: Text } deriving (Plural -> Plural -> Bool
(Plural -> Plural -> Bool)
-> (Plural -> Plural -> Bool) -> Eq Plural
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Plural -> Plural -> Bool
== :: Plural -> Plural -> Bool
$c/= :: Plural -> Plural -> Bool
/= :: Plural -> Plural -> Bool
P.Eq, Int -> Plural -> ShowS
[Plural] -> ShowS
Plural -> String
(Int -> Plural -> ShowS)
-> (Plural -> String) -> ([Plural] -> ShowS) -> Show Plural
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Plural -> ShowS
showsPrec :: Int -> Plural -> ShowS
$cshow :: Plural -> String
show :: Plural -> String
$cshowList :: [Plural] -> ShowS
showList :: [Plural] -> ShowS
P.Show)

-- ** Ports
newtype Ports = Ports { Ports -> Int
unPorts :: Int } deriving (Ports -> Ports -> Bool
(Ports -> Ports -> Bool) -> (Ports -> Ports -> Bool) -> Eq Ports
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Ports -> Ports -> Bool
== :: Ports -> Ports -> Bool
$c/= :: Ports -> Ports -> Bool
/= :: Ports -> Ports -> Bool
P.Eq, Int -> Ports -> ShowS
[Ports] -> ShowS
Ports -> String
(Int -> Ports -> ShowS)
-> (Ports -> String) -> ([Ports] -> ShowS) -> Show Ports
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Ports -> ShowS
showsPrec :: Int -> Ports -> ShowS
$cshow :: Ports -> String
show :: Ports -> String
$cshowList :: [Ports] -> ShowS
showList :: [Ports] -> ShowS
P.Show)

-- ** Pretty
newtype Pretty = Pretty { Pretty -> Text
unPretty :: Text } deriving (Pretty -> Pretty -> Bool
(Pretty -> Pretty -> Bool)
-> (Pretty -> Pretty -> Bool) -> Eq Pretty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Pretty -> Pretty -> Bool
== :: Pretty -> Pretty -> Bool
$c/= :: Pretty -> Pretty -> Bool
/= :: Pretty -> Pretty -> Bool
P.Eq, Int -> Pretty -> ShowS
[Pretty] -> ShowS
Pretty -> String
(Int -> Pretty -> ShowS)
-> (Pretty -> String) -> ([Pretty] -> ShowS) -> Show Pretty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Pretty -> ShowS
showsPrec :: Int -> Pretty -> ShowS
$cshow :: Pretty -> String
show :: Pretty -> String
$cshowList :: [Pretty] -> ShowS
showList :: [Pretty] -> ShowS
P.Show)

-- ** Previous
newtype Previous = Previous { Previous -> Bool
unPrevious :: Bool } deriving (Previous -> Previous -> Bool
(Previous -> Previous -> Bool)
-> (Previous -> Previous -> Bool) -> Eq Previous
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Previous -> Previous -> Bool
== :: Previous -> Previous -> Bool
$c/= :: Previous -> Previous -> Bool
/= :: Previous -> Previous -> Bool
P.Eq, Int -> Previous -> ShowS
[Previous] -> ShowS
Previous -> String
(Int -> Previous -> ShowS)
-> (Previous -> String) -> ([Previous] -> ShowS) -> Show Previous
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Previous -> ShowS
showsPrec :: Int -> Previous -> ShowS
$cshow :: Previous -> String
show :: Previous -> String
$cshowList :: [Previous] -> ShowS
showList :: [Previous] -> ShowS
P.Show)

-- ** PropagationPolicy
newtype PropagationPolicy = PropagationPolicy { PropagationPolicy -> Text
unPropagationPolicy :: Text } deriving (PropagationPolicy -> PropagationPolicy -> Bool
(PropagationPolicy -> PropagationPolicy -> Bool)
-> (PropagationPolicy -> PropagationPolicy -> Bool)
-> Eq PropagationPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PropagationPolicy -> PropagationPolicy -> Bool
== :: PropagationPolicy -> PropagationPolicy -> Bool
$c/= :: PropagationPolicy -> PropagationPolicy -> Bool
/= :: PropagationPolicy -> PropagationPolicy -> Bool
P.Eq, Int -> PropagationPolicy -> ShowS
[PropagationPolicy] -> ShowS
PropagationPolicy -> String
(Int -> PropagationPolicy -> ShowS)
-> (PropagationPolicy -> String)
-> ([PropagationPolicy] -> ShowS)
-> Show PropagationPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PropagationPolicy -> ShowS
showsPrec :: Int -> PropagationPolicy -> ShowS
$cshow :: PropagationPolicy -> String
show :: PropagationPolicy -> String
$cshowList :: [PropagationPolicy] -> ShowS
showList :: [PropagationPolicy] -> ShowS
P.Show)

-- ** ResourcePlural
newtype ResourcePlural = ResourcePlural { ResourcePlural -> Text
unResourcePlural :: Text } deriving (ResourcePlural -> ResourcePlural -> Bool
(ResourcePlural -> ResourcePlural -> Bool)
-> (ResourcePlural -> ResourcePlural -> Bool) -> Eq ResourcePlural
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ResourcePlural -> ResourcePlural -> Bool
== :: ResourcePlural -> ResourcePlural -> Bool
$c/= :: ResourcePlural -> ResourcePlural -> Bool
/= :: ResourcePlural -> ResourcePlural -> Bool
P.Eq, Int -> ResourcePlural -> ShowS
[ResourcePlural] -> ShowS
ResourcePlural -> String
(Int -> ResourcePlural -> ShowS)
-> (ResourcePlural -> String)
-> ([ResourcePlural] -> ShowS)
-> Show ResourcePlural
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ResourcePlural -> ShowS
showsPrec :: Int -> ResourcePlural -> ShowS
$cshow :: ResourcePlural -> String
show :: ResourcePlural -> String
$cshowList :: [ResourcePlural] -> ShowS
showList :: [ResourcePlural] -> ShowS
P.Show)

-- ** ResourceVersion
newtype ResourceVersion = ResourceVersion { ResourceVersion -> Text
unResourceVersion :: Text } deriving (ResourceVersion -> ResourceVersion -> Bool
(ResourceVersion -> ResourceVersion -> Bool)
-> (ResourceVersion -> ResourceVersion -> Bool)
-> Eq ResourceVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ResourceVersion -> ResourceVersion -> Bool
== :: ResourceVersion -> ResourceVersion -> Bool
$c/= :: ResourceVersion -> ResourceVersion -> Bool
/= :: ResourceVersion -> ResourceVersion -> Bool
P.Eq, Int -> ResourceVersion -> ShowS
[ResourceVersion] -> ShowS
ResourceVersion -> String
(Int -> ResourceVersion -> ShowS)
-> (ResourceVersion -> String)
-> ([ResourceVersion] -> ShowS)
-> Show ResourceVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ResourceVersion -> ShowS
showsPrec :: Int -> ResourceVersion -> ShowS
$cshow :: ResourceVersion -> String
show :: ResourceVersion -> String
$cshowList :: [ResourceVersion] -> ShowS
showList :: [ResourceVersion] -> ShowS
P.Show)

-- ** ResourceVersionMatch
newtype ResourceVersionMatch = ResourceVersionMatch { ResourceVersionMatch -> Text
unResourceVersionMatch :: Text } deriving (ResourceVersionMatch -> ResourceVersionMatch -> Bool
(ResourceVersionMatch -> ResourceVersionMatch -> Bool)
-> (ResourceVersionMatch -> ResourceVersionMatch -> Bool)
-> Eq ResourceVersionMatch
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ResourceVersionMatch -> ResourceVersionMatch -> Bool
== :: ResourceVersionMatch -> ResourceVersionMatch -> Bool
$c/= :: ResourceVersionMatch -> ResourceVersionMatch -> Bool
/= :: ResourceVersionMatch -> ResourceVersionMatch -> Bool
P.Eq, Int -> ResourceVersionMatch -> ShowS
[ResourceVersionMatch] -> ShowS
ResourceVersionMatch -> String
(Int -> ResourceVersionMatch -> ShowS)
-> (ResourceVersionMatch -> String)
-> ([ResourceVersionMatch] -> ShowS)
-> Show ResourceVersionMatch
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ResourceVersionMatch -> ShowS
showsPrec :: Int -> ResourceVersionMatch -> ShowS
$cshow :: ResourceVersionMatch -> String
show :: ResourceVersionMatch -> String
$cshowList :: [ResourceVersionMatch] -> ShowS
showList :: [ResourceVersionMatch] -> ShowS
P.Show)

-- ** SendInitialEvents
newtype SendInitialEvents = SendInitialEvents { SendInitialEvents -> Bool
unSendInitialEvents :: Bool } deriving (SendInitialEvents -> SendInitialEvents -> Bool
(SendInitialEvents -> SendInitialEvents -> Bool)
-> (SendInitialEvents -> SendInitialEvents -> Bool)
-> Eq SendInitialEvents
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SendInitialEvents -> SendInitialEvents -> Bool
== :: SendInitialEvents -> SendInitialEvents -> Bool
$c/= :: SendInitialEvents -> SendInitialEvents -> Bool
/= :: SendInitialEvents -> SendInitialEvents -> Bool
P.Eq, Int -> SendInitialEvents -> ShowS
[SendInitialEvents] -> ShowS
SendInitialEvents -> String
(Int -> SendInitialEvents -> ShowS)
-> (SendInitialEvents -> String)
-> ([SendInitialEvents] -> ShowS)
-> Show SendInitialEvents
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SendInitialEvents -> ShowS
showsPrec :: Int -> SendInitialEvents -> ShowS
$cshow :: SendInitialEvents -> String
show :: SendInitialEvents -> String
$cshowList :: [SendInitialEvents] -> ShowS
showList :: [SendInitialEvents] -> ShowS
P.Show)

-- ** SinceSeconds
newtype SinceSeconds = SinceSeconds { SinceSeconds -> Int
unSinceSeconds :: Int } deriving (SinceSeconds -> SinceSeconds -> Bool
(SinceSeconds -> SinceSeconds -> Bool)
-> (SinceSeconds -> SinceSeconds -> Bool) -> Eq SinceSeconds
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SinceSeconds -> SinceSeconds -> Bool
== :: SinceSeconds -> SinceSeconds -> Bool
$c/= :: SinceSeconds -> SinceSeconds -> Bool
/= :: SinceSeconds -> SinceSeconds -> Bool
P.Eq, Int -> SinceSeconds -> ShowS
[SinceSeconds] -> ShowS
SinceSeconds -> String
(Int -> SinceSeconds -> ShowS)
-> (SinceSeconds -> String)
-> ([SinceSeconds] -> ShowS)
-> Show SinceSeconds
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SinceSeconds -> ShowS
showsPrec :: Int -> SinceSeconds -> ShowS
$cshow :: SinceSeconds -> String
show :: SinceSeconds -> String
$cshowList :: [SinceSeconds] -> ShowS
showList :: [SinceSeconds] -> ShowS
P.Show)

-- ** Stderr
newtype Stderr = Stderr { Stderr -> Bool
unStderr :: Bool } deriving (Stderr -> Stderr -> Bool
(Stderr -> Stderr -> Bool)
-> (Stderr -> Stderr -> Bool) -> Eq Stderr
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Stderr -> Stderr -> Bool
== :: Stderr -> Stderr -> Bool
$c/= :: Stderr -> Stderr -> Bool
/= :: Stderr -> Stderr -> Bool
P.Eq, Int -> Stderr -> ShowS
[Stderr] -> ShowS
Stderr -> String
(Int -> Stderr -> ShowS)
-> (Stderr -> String) -> ([Stderr] -> ShowS) -> Show Stderr
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Stderr -> ShowS
showsPrec :: Int -> Stderr -> ShowS
$cshow :: Stderr -> String
show :: Stderr -> String
$cshowList :: [Stderr] -> ShowS
showList :: [Stderr] -> ShowS
P.Show)

-- ** Stdin
newtype Stdin = Stdin { Stdin -> Bool
unStdin :: Bool } deriving (Stdin -> Stdin -> Bool
(Stdin -> Stdin -> Bool) -> (Stdin -> Stdin -> Bool) -> Eq Stdin
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Stdin -> Stdin -> Bool
== :: Stdin -> Stdin -> Bool
$c/= :: Stdin -> Stdin -> Bool
/= :: Stdin -> Stdin -> Bool
P.Eq, Int -> Stdin -> ShowS
[Stdin] -> ShowS
Stdin -> String
(Int -> Stdin -> ShowS)
-> (Stdin -> String) -> ([Stdin] -> ShowS) -> Show Stdin
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Stdin -> ShowS
showsPrec :: Int -> Stdin -> ShowS
$cshow :: Stdin -> String
show :: Stdin -> String
$cshowList :: [Stdin] -> ShowS
showList :: [Stdin] -> ShowS
P.Show)

-- ** Stdout
newtype Stdout = Stdout { Stdout -> Bool
unStdout :: Bool } deriving (Stdout -> Stdout -> Bool
(Stdout -> Stdout -> Bool)
-> (Stdout -> Stdout -> Bool) -> Eq Stdout
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Stdout -> Stdout -> Bool
== :: Stdout -> Stdout -> Bool
$c/= :: Stdout -> Stdout -> Bool
/= :: Stdout -> Stdout -> Bool
P.Eq, Int -> Stdout -> ShowS
[Stdout] -> ShowS
Stdout -> String
(Int -> Stdout -> ShowS)
-> (Stdout -> String) -> ([Stdout] -> ShowS) -> Show Stdout
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Stdout -> ShowS
showsPrec :: Int -> Stdout -> ShowS
$cshow :: Stdout -> String
show :: Stdout -> String
$cshowList :: [Stdout] -> ShowS
showList :: [Stdout] -> ShowS
P.Show)

-- ** Stream
newtype Stream = Stream { Stream -> Text
unStream :: Text } deriving (Stream -> Stream -> Bool
(Stream -> Stream -> Bool)
-> (Stream -> Stream -> Bool) -> Eq Stream
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Stream -> Stream -> Bool
== :: Stream -> Stream -> Bool
$c/= :: Stream -> Stream -> Bool
/= :: Stream -> Stream -> Bool
P.Eq, Int -> Stream -> ShowS
[Stream] -> ShowS
Stream -> String
(Int -> Stream -> ShowS)
-> (Stream -> String) -> ([Stream] -> ShowS) -> Show Stream
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Stream -> ShowS
showsPrec :: Int -> Stream -> ShowS
$cshow :: Stream -> String
show :: Stream -> String
$cshowList :: [Stream] -> ShowS
showList :: [Stream] -> ShowS
P.Show)

-- ** TailLines
newtype TailLines = TailLines { TailLines -> Int
unTailLines :: Int } deriving (TailLines -> TailLines -> Bool
(TailLines -> TailLines -> Bool)
-> (TailLines -> TailLines -> Bool) -> Eq TailLines
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TailLines -> TailLines -> Bool
== :: TailLines -> TailLines -> Bool
$c/= :: TailLines -> TailLines -> Bool
/= :: TailLines -> TailLines -> Bool
P.Eq, Int -> TailLines -> ShowS
[TailLines] -> ShowS
TailLines -> String
(Int -> TailLines -> ShowS)
-> (TailLines -> String)
-> ([TailLines] -> ShowS)
-> Show TailLines
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TailLines -> ShowS
showsPrec :: Int -> TailLines -> ShowS
$cshow :: TailLines -> String
show :: TailLines -> String
$cshowList :: [TailLines] -> ShowS
showList :: [TailLines] -> ShowS
P.Show)

-- ** TimeoutSeconds
newtype TimeoutSeconds = TimeoutSeconds { TimeoutSeconds -> Int
unTimeoutSeconds :: Int } deriving (TimeoutSeconds -> TimeoutSeconds -> Bool
(TimeoutSeconds -> TimeoutSeconds -> Bool)
-> (TimeoutSeconds -> TimeoutSeconds -> Bool) -> Eq TimeoutSeconds
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TimeoutSeconds -> TimeoutSeconds -> Bool
== :: TimeoutSeconds -> TimeoutSeconds -> Bool
$c/= :: TimeoutSeconds -> TimeoutSeconds -> Bool
/= :: TimeoutSeconds -> TimeoutSeconds -> Bool
P.Eq, Int -> TimeoutSeconds -> ShowS
[TimeoutSeconds] -> ShowS
TimeoutSeconds -> String
(Int -> TimeoutSeconds -> ShowS)
-> (TimeoutSeconds -> String)
-> ([TimeoutSeconds] -> ShowS)
-> Show TimeoutSeconds
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TimeoutSeconds -> ShowS
showsPrec :: Int -> TimeoutSeconds -> ShowS
$cshow :: TimeoutSeconds -> String
show :: TimeoutSeconds -> String
$cshowList :: [TimeoutSeconds] -> ShowS
showList :: [TimeoutSeconds] -> ShowS
P.Show)

-- ** Timestamps
newtype Timestamps = Timestamps { Timestamps -> Bool
unTimestamps :: Bool } deriving (Timestamps -> Timestamps -> Bool
(Timestamps -> Timestamps -> Bool)
-> (Timestamps -> Timestamps -> Bool) -> Eq Timestamps
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Timestamps -> Timestamps -> Bool
== :: Timestamps -> Timestamps -> Bool
$c/= :: Timestamps -> Timestamps -> Bool
/= :: Timestamps -> Timestamps -> Bool
P.Eq, Int -> Timestamps -> ShowS
[Timestamps] -> ShowS
Timestamps -> String
(Int -> Timestamps -> ShowS)
-> (Timestamps -> String)
-> ([Timestamps] -> ShowS)
-> Show Timestamps
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Timestamps -> ShowS
showsPrec :: Int -> Timestamps -> ShowS
$cshow :: Timestamps -> String
show :: Timestamps -> String
$cshowList :: [Timestamps] -> ShowS
showList :: [Timestamps] -> ShowS
P.Show)

-- ** Tty
newtype Tty = Tty { Tty -> Bool
unTty :: Bool } deriving (Tty -> Tty -> Bool
(Tty -> Tty -> Bool) -> (Tty -> Tty -> Bool) -> Eq Tty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Tty -> Tty -> Bool
== :: Tty -> Tty -> Bool
$c/= :: Tty -> Tty -> Bool
/= :: Tty -> Tty -> Bool
P.Eq, Int -> Tty -> ShowS
[Tty] -> ShowS
Tty -> String
(Int -> Tty -> ShowS)
-> (Tty -> String) -> ([Tty] -> ShowS) -> Show Tty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Tty -> ShowS
showsPrec :: Int -> Tty -> ShowS
$cshow :: Tty -> String
show :: Tty -> String
$cshowList :: [Tty] -> ShowS
showList :: [Tty] -> ShowS
P.Show)

-- ** Version
newtype Version = Version { Version -> Text
unVersion :: Text } deriving (Version -> Version -> Bool
(Version -> Version -> Bool)
-> (Version -> Version -> Bool) -> Eq Version
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Version -> Version -> Bool
== :: Version -> Version -> Bool
$c/= :: Version -> Version -> Bool
/= :: Version -> Version -> Bool
P.Eq, Int -> Version -> ShowS
[Version] -> ShowS
Version -> String
(Int -> Version -> ShowS)
-> (Version -> String) -> ([Version] -> ShowS) -> Show Version
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Version -> ShowS
showsPrec :: Int -> Version -> ShowS
$cshow :: Version -> String
show :: Version -> String
$cshowList :: [Version] -> ShowS
showList :: [Version] -> ShowS
P.Show)

-- ** Watch
newtype Watch = Watch { Watch -> Bool
unWatch :: Bool } deriving (Watch -> Watch -> Bool
(Watch -> Watch -> Bool) -> (Watch -> Watch -> Bool) -> Eq Watch
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Watch -> Watch -> Bool
== :: Watch -> Watch -> Bool
$c/= :: Watch -> Watch -> Bool
/= :: Watch -> Watch -> Bool
P.Eq, Int -> Watch -> ShowS
[Watch] -> ShowS
Watch -> String
(Int -> Watch -> ShowS)
-> (Watch -> String) -> ([Watch] -> ShowS) -> Show Watch
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Watch -> ShowS
showsPrec :: Int -> Watch -> ShowS
$cshow :: Watch -> String
show :: Watch -> String
$cshowList :: [Watch] -> ShowS
showList :: [Watch] -> ShowS
P.Show)

-- * Models


-- ** AdmissionregistrationV1ServiceReference
-- | AdmissionregistrationV1ServiceReference
-- ServiceReference holds a reference to Service.legacy.k8s.io
data AdmissionregistrationV1ServiceReference = AdmissionregistrationV1ServiceReference
  { AdmissionregistrationV1ServiceReference -> Text
admissionregistrationV1ServiceReferenceName :: !(Text) -- ^ /Required/ "name" - &#x60;name&#x60; is the name of the service. Required
  , AdmissionregistrationV1ServiceReference -> Text
admissionregistrationV1ServiceReferenceNamespace :: !(Text) -- ^ /Required/ "namespace" - &#x60;namespace&#x60; is the namespace of the service. Required
  , AdmissionregistrationV1ServiceReference -> Maybe Text
admissionregistrationV1ServiceReferencePath :: !(Maybe Text) -- ^ "path" - &#x60;path&#x60; is an optional URL path which will be sent in any request to this service.
  , AdmissionregistrationV1ServiceReference -> Maybe Int
admissionregistrationV1ServiceReferencePort :: !(Maybe Int) -- ^ "port" - If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. &#x60;port&#x60; should be a valid port number (1-65535, inclusive).
  } deriving (Int -> AdmissionregistrationV1ServiceReference -> ShowS
[AdmissionregistrationV1ServiceReference] -> ShowS
AdmissionregistrationV1ServiceReference -> String
(Int -> AdmissionregistrationV1ServiceReference -> ShowS)
-> (AdmissionregistrationV1ServiceReference -> String)
-> ([AdmissionregistrationV1ServiceReference] -> ShowS)
-> Show AdmissionregistrationV1ServiceReference
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AdmissionregistrationV1ServiceReference -> ShowS
showsPrec :: Int -> AdmissionregistrationV1ServiceReference -> ShowS
$cshow :: AdmissionregistrationV1ServiceReference -> String
show :: AdmissionregistrationV1ServiceReference -> String
$cshowList :: [AdmissionregistrationV1ServiceReference] -> ShowS
showList :: [AdmissionregistrationV1ServiceReference] -> ShowS
P.Show, AdmissionregistrationV1ServiceReference
-> AdmissionregistrationV1ServiceReference -> Bool
(AdmissionregistrationV1ServiceReference
 -> AdmissionregistrationV1ServiceReference -> Bool)
-> (AdmissionregistrationV1ServiceReference
    -> AdmissionregistrationV1ServiceReference -> Bool)
-> Eq AdmissionregistrationV1ServiceReference
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AdmissionregistrationV1ServiceReference
-> AdmissionregistrationV1ServiceReference -> Bool
== :: AdmissionregistrationV1ServiceReference
-> AdmissionregistrationV1ServiceReference -> Bool
$c/= :: AdmissionregistrationV1ServiceReference
-> AdmissionregistrationV1ServiceReference -> Bool
/= :: AdmissionregistrationV1ServiceReference
-> AdmissionregistrationV1ServiceReference -> Bool
P.Eq, P.Typeable)

-- | FromJSON AdmissionregistrationV1ServiceReference
instance A.FromJSON AdmissionregistrationV1ServiceReference where
  parseJSON :: Value -> Parser AdmissionregistrationV1ServiceReference
parseJSON = String
-> (Object -> Parser AdmissionregistrationV1ServiceReference)
-> Value
-> Parser AdmissionregistrationV1ServiceReference
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"AdmissionregistrationV1ServiceReference" ((Object -> Parser AdmissionregistrationV1ServiceReference)
 -> Value -> Parser AdmissionregistrationV1ServiceReference)
-> (Object -> Parser AdmissionregistrationV1ServiceReference)
-> Value
-> Parser AdmissionregistrationV1ServiceReference
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text
-> Text
-> Maybe Text
-> Maybe Int
-> AdmissionregistrationV1ServiceReference
AdmissionregistrationV1ServiceReference
      (Text
 -> Text
 -> Maybe Text
 -> Maybe Int
 -> AdmissionregistrationV1ServiceReference)
-> Parser Text
-> Parser
     (Text
      -> Maybe Text
      -> Maybe Int
      -> AdmissionregistrationV1ServiceReference)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser
  (Text
   -> Maybe Text
   -> Maybe Int
   -> AdmissionregistrationV1ServiceReference)
-> Parser Text
-> Parser
     (Maybe Text
      -> Maybe Int -> AdmissionregistrationV1ServiceReference)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"namespace")
      Parser
  (Maybe Text
   -> Maybe Int -> AdmissionregistrationV1ServiceReference)
-> Parser (Maybe Text)
-> Parser (Maybe Int -> AdmissionregistrationV1ServiceReference)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"path")
      Parser (Maybe Int -> AdmissionregistrationV1ServiceReference)
-> Parser (Maybe Int)
-> Parser AdmissionregistrationV1ServiceReference
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"port")

-- | ToJSON AdmissionregistrationV1ServiceReference
instance A.ToJSON AdmissionregistrationV1ServiceReference where
  toJSON :: AdmissionregistrationV1ServiceReference -> Value
toJSON AdmissionregistrationV1ServiceReference {Maybe Int
Maybe Text
Text
$sel:admissionregistrationV1ServiceReferenceName:AdmissionregistrationV1ServiceReference :: AdmissionregistrationV1ServiceReference -> Text
$sel:admissionregistrationV1ServiceReferenceNamespace:AdmissionregistrationV1ServiceReference :: AdmissionregistrationV1ServiceReference -> Text
$sel:admissionregistrationV1ServiceReferencePath:AdmissionregistrationV1ServiceReference :: AdmissionregistrationV1ServiceReference -> Maybe Text
$sel:admissionregistrationV1ServiceReferencePort:AdmissionregistrationV1ServiceReference :: AdmissionregistrationV1ServiceReference -> Maybe Int
admissionregistrationV1ServiceReferenceName :: Text
admissionregistrationV1ServiceReferenceNamespace :: Text
admissionregistrationV1ServiceReferencePath :: Maybe Text
admissionregistrationV1ServiceReferencePort :: Maybe Int
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
admissionregistrationV1ServiceReferenceName
      , Key
"namespace" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
admissionregistrationV1ServiceReferenceNamespace
      , Key
"path" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
admissionregistrationV1ServiceReferencePath
      , Key
"port" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
admissionregistrationV1ServiceReferencePort
      ]


-- | Construct a value of type 'AdmissionregistrationV1ServiceReference' (by applying it's required fields, if any)
mkAdmissionregistrationV1ServiceReference
  :: Text -- ^ 'admissionregistrationV1ServiceReferenceName': `name` is the name of the service. Required
  -> Text -- ^ 'admissionregistrationV1ServiceReferenceNamespace': `namespace` is the namespace of the service. Required
  -> AdmissionregistrationV1ServiceReference
mkAdmissionregistrationV1ServiceReference :: Text -> Text -> AdmissionregistrationV1ServiceReference
mkAdmissionregistrationV1ServiceReference Text
admissionregistrationV1ServiceReferenceName Text
admissionregistrationV1ServiceReferenceNamespace =
  AdmissionregistrationV1ServiceReference
  { Text
$sel:admissionregistrationV1ServiceReferenceName:AdmissionregistrationV1ServiceReference :: Text
admissionregistrationV1ServiceReferenceName :: Text
admissionregistrationV1ServiceReferenceName
  , Text
$sel:admissionregistrationV1ServiceReferenceNamespace:AdmissionregistrationV1ServiceReference :: Text
admissionregistrationV1ServiceReferenceNamespace :: Text
admissionregistrationV1ServiceReferenceNamespace
  , $sel:admissionregistrationV1ServiceReferencePath:AdmissionregistrationV1ServiceReference :: Maybe Text
admissionregistrationV1ServiceReferencePath = Maybe Text
forall a. Maybe a
Nothing
  , $sel:admissionregistrationV1ServiceReferencePort:AdmissionregistrationV1ServiceReference :: Maybe Int
admissionregistrationV1ServiceReferencePort = Maybe Int
forall a. Maybe a
Nothing
  }

-- ** AdmissionregistrationV1WebhookClientConfig
-- | AdmissionregistrationV1WebhookClientConfig
-- WebhookClientConfig contains the information to make a TLS connection with the webhook
data AdmissionregistrationV1WebhookClientConfig = AdmissionregistrationV1WebhookClientConfig
  { AdmissionregistrationV1WebhookClientConfig -> Maybe ByteArray
admissionregistrationV1WebhookClientConfigCaBundle :: !(Maybe ByteArray) -- ^ "caBundle" - &#x60;caBundle&#x60; is a PEM encoded CA bundle which will be used to validate the webhook&#39;s server certificate. If unspecified, system trust roots on the apiserver are used.
  , AdmissionregistrationV1WebhookClientConfig
-> Maybe AdmissionregistrationV1ServiceReference
admissionregistrationV1WebhookClientConfigService :: !(Maybe AdmissionregistrationV1ServiceReference) -- ^ "service"
  , AdmissionregistrationV1WebhookClientConfig -> Maybe Text
admissionregistrationV1WebhookClientConfigUrl :: !(Maybe Text) -- ^ "url" - &#x60;url&#x60; gives the location of the webhook, in standard URL form (&#x60;scheme://host:port/path&#x60;). Exactly one of &#x60;url&#x60; or &#x60;service&#x60; must be specified.  The &#x60;host&#x60; should not refer to a service running in the cluster; use the &#x60;service&#x60; field instead. The host might be resolved via external DNS in some apiservers (e.g., &#x60;kube-apiserver&#x60; cannot resolve in-cluster DNS as that would be a layering violation). &#x60;host&#x60; may also be an IP address.  Please note that using &#x60;localhost&#x60; or &#x60;127.0.0.1&#x60; as a &#x60;host&#x60; is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.  The scheme must be \&quot;https\&quot;; the URL must begin with \&quot;https://\&quot;.  A path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.  Attempting to use a user or basic auth e.g. \&quot;user:password@\&quot; is not allowed. Fragments (\&quot;#...\&quot;) and query parameters (\&quot;?...\&quot;) are not allowed, either.
  } deriving (Int -> AdmissionregistrationV1WebhookClientConfig -> ShowS
[AdmissionregistrationV1WebhookClientConfig] -> ShowS
AdmissionregistrationV1WebhookClientConfig -> String
(Int -> AdmissionregistrationV1WebhookClientConfig -> ShowS)
-> (AdmissionregistrationV1WebhookClientConfig -> String)
-> ([AdmissionregistrationV1WebhookClientConfig] -> ShowS)
-> Show AdmissionregistrationV1WebhookClientConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AdmissionregistrationV1WebhookClientConfig -> ShowS
showsPrec :: Int -> AdmissionregistrationV1WebhookClientConfig -> ShowS
$cshow :: AdmissionregistrationV1WebhookClientConfig -> String
show :: AdmissionregistrationV1WebhookClientConfig -> String
$cshowList :: [AdmissionregistrationV1WebhookClientConfig] -> ShowS
showList :: [AdmissionregistrationV1WebhookClientConfig] -> ShowS
P.Show, AdmissionregistrationV1WebhookClientConfig
-> AdmissionregistrationV1WebhookClientConfig -> Bool
(AdmissionregistrationV1WebhookClientConfig
 -> AdmissionregistrationV1WebhookClientConfig -> Bool)
-> (AdmissionregistrationV1WebhookClientConfig
    -> AdmissionregistrationV1WebhookClientConfig -> Bool)
-> Eq AdmissionregistrationV1WebhookClientConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AdmissionregistrationV1WebhookClientConfig
-> AdmissionregistrationV1WebhookClientConfig -> Bool
== :: AdmissionregistrationV1WebhookClientConfig
-> AdmissionregistrationV1WebhookClientConfig -> Bool
$c/= :: AdmissionregistrationV1WebhookClientConfig
-> AdmissionregistrationV1WebhookClientConfig -> Bool
/= :: AdmissionregistrationV1WebhookClientConfig
-> AdmissionregistrationV1WebhookClientConfig -> Bool
P.Eq, P.Typeable)

-- | FromJSON AdmissionregistrationV1WebhookClientConfig
instance A.FromJSON AdmissionregistrationV1WebhookClientConfig where
  parseJSON :: Value -> Parser AdmissionregistrationV1WebhookClientConfig
parseJSON = String
-> (Object -> Parser AdmissionregistrationV1WebhookClientConfig)
-> Value
-> Parser AdmissionregistrationV1WebhookClientConfig
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"AdmissionregistrationV1WebhookClientConfig" ((Object -> Parser AdmissionregistrationV1WebhookClientConfig)
 -> Value -> Parser AdmissionregistrationV1WebhookClientConfig)
-> (Object -> Parser AdmissionregistrationV1WebhookClientConfig)
-> Value
-> Parser AdmissionregistrationV1WebhookClientConfig
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe ByteArray
-> Maybe AdmissionregistrationV1ServiceReference
-> Maybe Text
-> AdmissionregistrationV1WebhookClientConfig
AdmissionregistrationV1WebhookClientConfig
      (Maybe ByteArray
 -> Maybe AdmissionregistrationV1ServiceReference
 -> Maybe Text
 -> AdmissionregistrationV1WebhookClientConfig)
-> Parser (Maybe ByteArray)
-> Parser
     (Maybe AdmissionregistrationV1ServiceReference
      -> Maybe Text -> AdmissionregistrationV1WebhookClientConfig)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe ByteArray)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"caBundle")
      Parser
  (Maybe AdmissionregistrationV1ServiceReference
   -> Maybe Text -> AdmissionregistrationV1WebhookClientConfig)
-> Parser (Maybe AdmissionregistrationV1ServiceReference)
-> Parser
     (Maybe Text -> AdmissionregistrationV1WebhookClientConfig)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object
-> Key -> Parser (Maybe AdmissionregistrationV1ServiceReference)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"service")
      Parser (Maybe Text -> AdmissionregistrationV1WebhookClientConfig)
-> Parser (Maybe Text)
-> Parser AdmissionregistrationV1WebhookClientConfig
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"url")

-- | ToJSON AdmissionregistrationV1WebhookClientConfig
instance A.ToJSON AdmissionregistrationV1WebhookClientConfig where
  toJSON :: AdmissionregistrationV1WebhookClientConfig -> Value
toJSON AdmissionregistrationV1WebhookClientConfig {Maybe Text
Maybe ByteArray
Maybe AdmissionregistrationV1ServiceReference
$sel:admissionregistrationV1WebhookClientConfigCaBundle:AdmissionregistrationV1WebhookClientConfig :: AdmissionregistrationV1WebhookClientConfig -> Maybe ByteArray
$sel:admissionregistrationV1WebhookClientConfigService:AdmissionregistrationV1WebhookClientConfig :: AdmissionregistrationV1WebhookClientConfig
-> Maybe AdmissionregistrationV1ServiceReference
$sel:admissionregistrationV1WebhookClientConfigUrl:AdmissionregistrationV1WebhookClientConfig :: AdmissionregistrationV1WebhookClientConfig -> Maybe Text
admissionregistrationV1WebhookClientConfigCaBundle :: Maybe ByteArray
admissionregistrationV1WebhookClientConfigService :: Maybe AdmissionregistrationV1ServiceReference
admissionregistrationV1WebhookClientConfigUrl :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"caBundle" Key -> Maybe ByteArray -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe ByteArray
admissionregistrationV1WebhookClientConfigCaBundle
      , Key
"service" Key
-> Maybe AdmissionregistrationV1ServiceReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe AdmissionregistrationV1ServiceReference
admissionregistrationV1WebhookClientConfigService
      , Key
"url" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
admissionregistrationV1WebhookClientConfigUrl
      ]


-- | Construct a value of type 'AdmissionregistrationV1WebhookClientConfig' (by applying it's required fields, if any)
mkAdmissionregistrationV1WebhookClientConfig
  :: AdmissionregistrationV1WebhookClientConfig
mkAdmissionregistrationV1WebhookClientConfig :: AdmissionregistrationV1WebhookClientConfig
mkAdmissionregistrationV1WebhookClientConfig =
  AdmissionregistrationV1WebhookClientConfig
  { $sel:admissionregistrationV1WebhookClientConfigCaBundle:AdmissionregistrationV1WebhookClientConfig :: Maybe ByteArray
admissionregistrationV1WebhookClientConfigCaBundle = Maybe ByteArray
forall a. Maybe a
Nothing
  , $sel:admissionregistrationV1WebhookClientConfigService:AdmissionregistrationV1WebhookClientConfig :: Maybe AdmissionregistrationV1ServiceReference
admissionregistrationV1WebhookClientConfigService = Maybe AdmissionregistrationV1ServiceReference
forall a. Maybe a
Nothing
  , $sel:admissionregistrationV1WebhookClientConfigUrl:AdmissionregistrationV1WebhookClientConfig :: Maybe Text
admissionregistrationV1WebhookClientConfigUrl = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** ApiextensionsV1ServiceReference
-- | ApiextensionsV1ServiceReference
-- ServiceReference holds a reference to Service.legacy.k8s.io
data ApiextensionsV1ServiceReference = ApiextensionsV1ServiceReference
  { ApiextensionsV1ServiceReference -> Text
apiextensionsV1ServiceReferenceName :: !(Text) -- ^ /Required/ "name" - name is the name of the service. Required
  , ApiextensionsV1ServiceReference -> Text
apiextensionsV1ServiceReferenceNamespace :: !(Text) -- ^ /Required/ "namespace" - namespace is the namespace of the service. Required
  , ApiextensionsV1ServiceReference -> Maybe Text
apiextensionsV1ServiceReferencePath :: !(Maybe Text) -- ^ "path" - path is an optional URL path at which the webhook will be contacted.
  , ApiextensionsV1ServiceReference -> Maybe Int
apiextensionsV1ServiceReferencePort :: !(Maybe Int) -- ^ "port" - port is an optional service port at which the webhook will be contacted. &#x60;port&#x60; should be a valid port number (1-65535, inclusive). Defaults to 443 for backward compatibility.
  } deriving (Int -> ApiextensionsV1ServiceReference -> ShowS
[ApiextensionsV1ServiceReference] -> ShowS
ApiextensionsV1ServiceReference -> String
(Int -> ApiextensionsV1ServiceReference -> ShowS)
-> (ApiextensionsV1ServiceReference -> String)
-> ([ApiextensionsV1ServiceReference] -> ShowS)
-> Show ApiextensionsV1ServiceReference
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ApiextensionsV1ServiceReference -> ShowS
showsPrec :: Int -> ApiextensionsV1ServiceReference -> ShowS
$cshow :: ApiextensionsV1ServiceReference -> String
show :: ApiextensionsV1ServiceReference -> String
$cshowList :: [ApiextensionsV1ServiceReference] -> ShowS
showList :: [ApiextensionsV1ServiceReference] -> ShowS
P.Show, ApiextensionsV1ServiceReference
-> ApiextensionsV1ServiceReference -> Bool
(ApiextensionsV1ServiceReference
 -> ApiextensionsV1ServiceReference -> Bool)
-> (ApiextensionsV1ServiceReference
    -> ApiextensionsV1ServiceReference -> Bool)
-> Eq ApiextensionsV1ServiceReference
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ApiextensionsV1ServiceReference
-> ApiextensionsV1ServiceReference -> Bool
== :: ApiextensionsV1ServiceReference
-> ApiextensionsV1ServiceReference -> Bool
$c/= :: ApiextensionsV1ServiceReference
-> ApiextensionsV1ServiceReference -> Bool
/= :: ApiextensionsV1ServiceReference
-> ApiextensionsV1ServiceReference -> Bool
P.Eq, P.Typeable)

-- | FromJSON ApiextensionsV1ServiceReference
instance A.FromJSON ApiextensionsV1ServiceReference where
  parseJSON :: Value -> Parser ApiextensionsV1ServiceReference
parseJSON = String
-> (Object -> Parser ApiextensionsV1ServiceReference)
-> Value
-> Parser ApiextensionsV1ServiceReference
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"ApiextensionsV1ServiceReference" ((Object -> Parser ApiextensionsV1ServiceReference)
 -> Value -> Parser ApiextensionsV1ServiceReference)
-> (Object -> Parser ApiextensionsV1ServiceReference)
-> Value
-> Parser ApiextensionsV1ServiceReference
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text
-> Text
-> Maybe Text
-> Maybe Int
-> ApiextensionsV1ServiceReference
ApiextensionsV1ServiceReference
      (Text
 -> Text
 -> Maybe Text
 -> Maybe Int
 -> ApiextensionsV1ServiceReference)
-> Parser Text
-> Parser
     (Text
      -> Maybe Text -> Maybe Int -> ApiextensionsV1ServiceReference)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser
  (Text
   -> Maybe Text -> Maybe Int -> ApiextensionsV1ServiceReference)
-> Parser Text
-> Parser
     (Maybe Text -> Maybe Int -> ApiextensionsV1ServiceReference)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"namespace")
      Parser (Maybe Text -> Maybe Int -> ApiextensionsV1ServiceReference)
-> Parser (Maybe Text)
-> Parser (Maybe Int -> ApiextensionsV1ServiceReference)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"path")
      Parser (Maybe Int -> ApiextensionsV1ServiceReference)
-> Parser (Maybe Int) -> Parser ApiextensionsV1ServiceReference
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"port")

-- | ToJSON ApiextensionsV1ServiceReference
instance A.ToJSON ApiextensionsV1ServiceReference where
  toJSON :: ApiextensionsV1ServiceReference -> Value
toJSON ApiextensionsV1ServiceReference {Maybe Int
Maybe Text
Text
$sel:apiextensionsV1ServiceReferenceName:ApiextensionsV1ServiceReference :: ApiextensionsV1ServiceReference -> Text
$sel:apiextensionsV1ServiceReferenceNamespace:ApiextensionsV1ServiceReference :: ApiextensionsV1ServiceReference -> Text
$sel:apiextensionsV1ServiceReferencePath:ApiextensionsV1ServiceReference :: ApiextensionsV1ServiceReference -> Maybe Text
$sel:apiextensionsV1ServiceReferencePort:ApiextensionsV1ServiceReference :: ApiextensionsV1ServiceReference -> Maybe Int
apiextensionsV1ServiceReferenceName :: Text
apiextensionsV1ServiceReferenceNamespace :: Text
apiextensionsV1ServiceReferencePath :: Maybe Text
apiextensionsV1ServiceReferencePort :: Maybe Int
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
apiextensionsV1ServiceReferenceName
      , Key
"namespace" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
apiextensionsV1ServiceReferenceNamespace
      , Key
"path" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
apiextensionsV1ServiceReferencePath
      , Key
"port" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
apiextensionsV1ServiceReferencePort
      ]


-- | Construct a value of type 'ApiextensionsV1ServiceReference' (by applying it's required fields, if any)
mkApiextensionsV1ServiceReference
  :: Text -- ^ 'apiextensionsV1ServiceReferenceName': name is the name of the service. Required
  -> Text -- ^ 'apiextensionsV1ServiceReferenceNamespace': namespace is the namespace of the service. Required
  -> ApiextensionsV1ServiceReference
mkApiextensionsV1ServiceReference :: Text -> Text -> ApiextensionsV1ServiceReference
mkApiextensionsV1ServiceReference Text
apiextensionsV1ServiceReferenceName Text
apiextensionsV1ServiceReferenceNamespace =
  ApiextensionsV1ServiceReference
  { Text
$sel:apiextensionsV1ServiceReferenceName:ApiextensionsV1ServiceReference :: Text
apiextensionsV1ServiceReferenceName :: Text
apiextensionsV1ServiceReferenceName
  , Text
$sel:apiextensionsV1ServiceReferenceNamespace:ApiextensionsV1ServiceReference :: Text
apiextensionsV1ServiceReferenceNamespace :: Text
apiextensionsV1ServiceReferenceNamespace
  , $sel:apiextensionsV1ServiceReferencePath:ApiextensionsV1ServiceReference :: Maybe Text
apiextensionsV1ServiceReferencePath = Maybe Text
forall a. Maybe a
Nothing
  , $sel:apiextensionsV1ServiceReferencePort:ApiextensionsV1ServiceReference :: Maybe Int
apiextensionsV1ServiceReferencePort = Maybe Int
forall a. Maybe a
Nothing
  }

-- ** ApiextensionsV1WebhookClientConfig
-- | ApiextensionsV1WebhookClientConfig
-- WebhookClientConfig contains the information to make a TLS connection with the webhook.
data ApiextensionsV1WebhookClientConfig = ApiextensionsV1WebhookClientConfig
  { ApiextensionsV1WebhookClientConfig -> Maybe ByteArray
apiextensionsV1WebhookClientConfigCaBundle :: !(Maybe ByteArray) -- ^ "caBundle" - caBundle is a PEM encoded CA bundle which will be used to validate the webhook&#39;s server certificate. If unspecified, system trust roots on the apiserver are used.
  , ApiextensionsV1WebhookClientConfig
-> Maybe ApiextensionsV1ServiceReference
apiextensionsV1WebhookClientConfigService :: !(Maybe ApiextensionsV1ServiceReference) -- ^ "service"
  , ApiextensionsV1WebhookClientConfig -> Maybe Text
apiextensionsV1WebhookClientConfigUrl :: !(Maybe Text) -- ^ "url" - url gives the location of the webhook, in standard URL form (&#x60;scheme://host:port/path&#x60;). Exactly one of &#x60;url&#x60; or &#x60;service&#x60; must be specified.  The &#x60;host&#x60; should not refer to a service running in the cluster; use the &#x60;service&#x60; field instead. The host might be resolved via external DNS in some apiservers (e.g., &#x60;kube-apiserver&#x60; cannot resolve in-cluster DNS as that would be a layering violation). &#x60;host&#x60; may also be an IP address.  Please note that using &#x60;localhost&#x60; or &#x60;127.0.0.1&#x60; as a &#x60;host&#x60; is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.  The scheme must be \&quot;https\&quot;; the URL must begin with \&quot;https://\&quot;.  A path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.  Attempting to use a user or basic auth e.g. \&quot;user:password@\&quot; is not allowed. Fragments (\&quot;#...\&quot;) and query parameters (\&quot;?...\&quot;) are not allowed, either.
  } deriving (Int -> ApiextensionsV1WebhookClientConfig -> ShowS
[ApiextensionsV1WebhookClientConfig] -> ShowS
ApiextensionsV1WebhookClientConfig -> String
(Int -> ApiextensionsV1WebhookClientConfig -> ShowS)
-> (ApiextensionsV1WebhookClientConfig -> String)
-> ([ApiextensionsV1WebhookClientConfig] -> ShowS)
-> Show ApiextensionsV1WebhookClientConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ApiextensionsV1WebhookClientConfig -> ShowS
showsPrec :: Int -> ApiextensionsV1WebhookClientConfig -> ShowS
$cshow :: ApiextensionsV1WebhookClientConfig -> String
show :: ApiextensionsV1WebhookClientConfig -> String
$cshowList :: [ApiextensionsV1WebhookClientConfig] -> ShowS
showList :: [ApiextensionsV1WebhookClientConfig] -> ShowS
P.Show, ApiextensionsV1WebhookClientConfig
-> ApiextensionsV1WebhookClientConfig -> Bool
(ApiextensionsV1WebhookClientConfig
 -> ApiextensionsV1WebhookClientConfig -> Bool)
-> (ApiextensionsV1WebhookClientConfig
    -> ApiextensionsV1WebhookClientConfig -> Bool)
-> Eq ApiextensionsV1WebhookClientConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ApiextensionsV1WebhookClientConfig
-> ApiextensionsV1WebhookClientConfig -> Bool
== :: ApiextensionsV1WebhookClientConfig
-> ApiextensionsV1WebhookClientConfig -> Bool
$c/= :: ApiextensionsV1WebhookClientConfig
-> ApiextensionsV1WebhookClientConfig -> Bool
/= :: ApiextensionsV1WebhookClientConfig
-> ApiextensionsV1WebhookClientConfig -> Bool
P.Eq, P.Typeable)

-- | FromJSON ApiextensionsV1WebhookClientConfig
instance A.FromJSON ApiextensionsV1WebhookClientConfig where
  parseJSON :: Value -> Parser ApiextensionsV1WebhookClientConfig
parseJSON = String
-> (Object -> Parser ApiextensionsV1WebhookClientConfig)
-> Value
-> Parser ApiextensionsV1WebhookClientConfig
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"ApiextensionsV1WebhookClientConfig" ((Object -> Parser ApiextensionsV1WebhookClientConfig)
 -> Value -> Parser ApiextensionsV1WebhookClientConfig)
-> (Object -> Parser ApiextensionsV1WebhookClientConfig)
-> Value
-> Parser ApiextensionsV1WebhookClientConfig
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe ByteArray
-> Maybe ApiextensionsV1ServiceReference
-> Maybe Text
-> ApiextensionsV1WebhookClientConfig
ApiextensionsV1WebhookClientConfig
      (Maybe ByteArray
 -> Maybe ApiextensionsV1ServiceReference
 -> Maybe Text
 -> ApiextensionsV1WebhookClientConfig)
-> Parser (Maybe ByteArray)
-> Parser
     (Maybe ApiextensionsV1ServiceReference
      -> Maybe Text -> ApiextensionsV1WebhookClientConfig)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe ByteArray)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"caBundle")
      Parser
  (Maybe ApiextensionsV1ServiceReference
   -> Maybe Text -> ApiextensionsV1WebhookClientConfig)
-> Parser (Maybe ApiextensionsV1ServiceReference)
-> Parser (Maybe Text -> ApiextensionsV1WebhookClientConfig)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe ApiextensionsV1ServiceReference)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"service")
      Parser (Maybe Text -> ApiextensionsV1WebhookClientConfig)
-> Parser (Maybe Text) -> Parser ApiextensionsV1WebhookClientConfig
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"url")

-- | ToJSON ApiextensionsV1WebhookClientConfig
instance A.ToJSON ApiextensionsV1WebhookClientConfig where
  toJSON :: ApiextensionsV1WebhookClientConfig -> Value
toJSON ApiextensionsV1WebhookClientConfig {Maybe Text
Maybe ByteArray
Maybe ApiextensionsV1ServiceReference
$sel:apiextensionsV1WebhookClientConfigCaBundle:ApiextensionsV1WebhookClientConfig :: ApiextensionsV1WebhookClientConfig -> Maybe ByteArray
$sel:apiextensionsV1WebhookClientConfigService:ApiextensionsV1WebhookClientConfig :: ApiextensionsV1WebhookClientConfig
-> Maybe ApiextensionsV1ServiceReference
$sel:apiextensionsV1WebhookClientConfigUrl:ApiextensionsV1WebhookClientConfig :: ApiextensionsV1WebhookClientConfig -> Maybe Text
apiextensionsV1WebhookClientConfigCaBundle :: Maybe ByteArray
apiextensionsV1WebhookClientConfigService :: Maybe ApiextensionsV1ServiceReference
apiextensionsV1WebhookClientConfigUrl :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"caBundle" Key -> Maybe ByteArray -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe ByteArray
apiextensionsV1WebhookClientConfigCaBundle
      , Key
"service" Key -> Maybe ApiextensionsV1ServiceReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe ApiextensionsV1ServiceReference
apiextensionsV1WebhookClientConfigService
      , Key
"url" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
apiextensionsV1WebhookClientConfigUrl
      ]


-- | Construct a value of type 'ApiextensionsV1WebhookClientConfig' (by applying it's required fields, if any)
mkApiextensionsV1WebhookClientConfig
  :: ApiextensionsV1WebhookClientConfig
mkApiextensionsV1WebhookClientConfig :: ApiextensionsV1WebhookClientConfig
mkApiextensionsV1WebhookClientConfig =
  ApiextensionsV1WebhookClientConfig
  { $sel:apiextensionsV1WebhookClientConfigCaBundle:ApiextensionsV1WebhookClientConfig :: Maybe ByteArray
apiextensionsV1WebhookClientConfigCaBundle = Maybe ByteArray
forall a. Maybe a
Nothing
  , $sel:apiextensionsV1WebhookClientConfigService:ApiextensionsV1WebhookClientConfig :: Maybe ApiextensionsV1ServiceReference
apiextensionsV1WebhookClientConfigService = Maybe ApiextensionsV1ServiceReference
forall a. Maybe a
Nothing
  , $sel:apiextensionsV1WebhookClientConfigUrl:ApiextensionsV1WebhookClientConfig :: Maybe Text
apiextensionsV1WebhookClientConfigUrl = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** ApiregistrationV1ServiceReference
-- | ApiregistrationV1ServiceReference
-- ServiceReference holds a reference to Service.legacy.k8s.io
data ApiregistrationV1ServiceReference = ApiregistrationV1ServiceReference
  { ApiregistrationV1ServiceReference -> Maybe Text
apiregistrationV1ServiceReferenceName :: !(Maybe Text) -- ^ "name" - Name is the name of the service
  , ApiregistrationV1ServiceReference -> Maybe Text
apiregistrationV1ServiceReferenceNamespace :: !(Maybe Text) -- ^ "namespace" - Namespace is the namespace of the service
  , ApiregistrationV1ServiceReference -> Maybe Int
apiregistrationV1ServiceReferencePort :: !(Maybe Int) -- ^ "port" - If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. &#x60;port&#x60; should be a valid port number (1-65535, inclusive).
  } deriving (Int -> ApiregistrationV1ServiceReference -> ShowS
[ApiregistrationV1ServiceReference] -> ShowS
ApiregistrationV1ServiceReference -> String
(Int -> ApiregistrationV1ServiceReference -> ShowS)
-> (ApiregistrationV1ServiceReference -> String)
-> ([ApiregistrationV1ServiceReference] -> ShowS)
-> Show ApiregistrationV1ServiceReference
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ApiregistrationV1ServiceReference -> ShowS
showsPrec :: Int -> ApiregistrationV1ServiceReference -> ShowS
$cshow :: ApiregistrationV1ServiceReference -> String
show :: ApiregistrationV1ServiceReference -> String
$cshowList :: [ApiregistrationV1ServiceReference] -> ShowS
showList :: [ApiregistrationV1ServiceReference] -> ShowS
P.Show, ApiregistrationV1ServiceReference
-> ApiregistrationV1ServiceReference -> Bool
(ApiregistrationV1ServiceReference
 -> ApiregistrationV1ServiceReference -> Bool)
-> (ApiregistrationV1ServiceReference
    -> ApiregistrationV1ServiceReference -> Bool)
-> Eq ApiregistrationV1ServiceReference
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ApiregistrationV1ServiceReference
-> ApiregistrationV1ServiceReference -> Bool
== :: ApiregistrationV1ServiceReference
-> ApiregistrationV1ServiceReference -> Bool
$c/= :: ApiregistrationV1ServiceReference
-> ApiregistrationV1ServiceReference -> Bool
/= :: ApiregistrationV1ServiceReference
-> ApiregistrationV1ServiceReference -> Bool
P.Eq, P.Typeable)

-- | FromJSON ApiregistrationV1ServiceReference
instance A.FromJSON ApiregistrationV1ServiceReference where
  parseJSON :: Value -> Parser ApiregistrationV1ServiceReference
parseJSON = String
-> (Object -> Parser ApiregistrationV1ServiceReference)
-> Value
-> Parser ApiregistrationV1ServiceReference
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"ApiregistrationV1ServiceReference" ((Object -> Parser ApiregistrationV1ServiceReference)
 -> Value -> Parser ApiregistrationV1ServiceReference)
-> (Object -> Parser ApiregistrationV1ServiceReference)
-> Value
-> Parser ApiregistrationV1ServiceReference
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text -> Maybe Int -> ApiregistrationV1ServiceReference
ApiregistrationV1ServiceReference
      (Maybe Text
 -> Maybe Text -> Maybe Int -> ApiregistrationV1ServiceReference)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Int -> ApiregistrationV1ServiceReference)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"name")
      Parser
  (Maybe Text -> Maybe Int -> ApiregistrationV1ServiceReference)
-> Parser (Maybe Text)
-> Parser (Maybe Int -> ApiregistrationV1ServiceReference)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"namespace")
      Parser (Maybe Int -> ApiregistrationV1ServiceReference)
-> Parser (Maybe Int) -> Parser ApiregistrationV1ServiceReference
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"port")

-- | ToJSON ApiregistrationV1ServiceReference
instance A.ToJSON ApiregistrationV1ServiceReference where
  toJSON :: ApiregistrationV1ServiceReference -> Value
toJSON ApiregistrationV1ServiceReference {Maybe Int
Maybe Text
$sel:apiregistrationV1ServiceReferenceName:ApiregistrationV1ServiceReference :: ApiregistrationV1ServiceReference -> Maybe Text
$sel:apiregistrationV1ServiceReferenceNamespace:ApiregistrationV1ServiceReference :: ApiregistrationV1ServiceReference -> Maybe Text
$sel:apiregistrationV1ServiceReferencePort:ApiregistrationV1ServiceReference :: ApiregistrationV1ServiceReference -> Maybe Int
apiregistrationV1ServiceReferenceName :: Maybe Text
apiregistrationV1ServiceReferenceNamespace :: Maybe Text
apiregistrationV1ServiceReferencePort :: Maybe Int
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"name" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
apiregistrationV1ServiceReferenceName
      , Key
"namespace" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
apiregistrationV1ServiceReferenceNamespace
      , Key
"port" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
apiregistrationV1ServiceReferencePort
      ]


-- | Construct a value of type 'ApiregistrationV1ServiceReference' (by applying it's required fields, if any)
mkApiregistrationV1ServiceReference
  :: ApiregistrationV1ServiceReference
mkApiregistrationV1ServiceReference :: ApiregistrationV1ServiceReference
mkApiregistrationV1ServiceReference =
  ApiregistrationV1ServiceReference
  { $sel:apiregistrationV1ServiceReferenceName:ApiregistrationV1ServiceReference :: Maybe Text
apiregistrationV1ServiceReferenceName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:apiregistrationV1ServiceReferenceNamespace:ApiregistrationV1ServiceReference :: Maybe Text
apiregistrationV1ServiceReferenceNamespace = Maybe Text
forall a. Maybe a
Nothing
  , $sel:apiregistrationV1ServiceReferencePort:ApiregistrationV1ServiceReference :: Maybe Int
apiregistrationV1ServiceReferencePort = Maybe Int
forall a. Maybe a
Nothing
  }

-- ** AuthenticationV1TokenRequest
-- | AuthenticationV1TokenRequest
-- TokenRequest requests a token for a given service account.
data AuthenticationV1TokenRequest = AuthenticationV1TokenRequest
  { AuthenticationV1TokenRequest -> Maybe Text
authenticationV1TokenRequestApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , AuthenticationV1TokenRequest -> Maybe Text
authenticationV1TokenRequestKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , AuthenticationV1TokenRequest -> Maybe V1ObjectMeta
authenticationV1TokenRequestMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , AuthenticationV1TokenRequest -> V1TokenRequestSpec
authenticationV1TokenRequestSpec :: !(V1TokenRequestSpec) -- ^ /Required/ "spec"
  , AuthenticationV1TokenRequest -> Maybe V1TokenRequestStatus
authenticationV1TokenRequestStatus :: !(Maybe V1TokenRequestStatus) -- ^ "status"
  } deriving (Int -> AuthenticationV1TokenRequest -> ShowS
[AuthenticationV1TokenRequest] -> ShowS
AuthenticationV1TokenRequest -> String
(Int -> AuthenticationV1TokenRequest -> ShowS)
-> (AuthenticationV1TokenRequest -> String)
-> ([AuthenticationV1TokenRequest] -> ShowS)
-> Show AuthenticationV1TokenRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AuthenticationV1TokenRequest -> ShowS
showsPrec :: Int -> AuthenticationV1TokenRequest -> ShowS
$cshow :: AuthenticationV1TokenRequest -> String
show :: AuthenticationV1TokenRequest -> String
$cshowList :: [AuthenticationV1TokenRequest] -> ShowS
showList :: [AuthenticationV1TokenRequest] -> ShowS
P.Show, AuthenticationV1TokenRequest
-> AuthenticationV1TokenRequest -> Bool
(AuthenticationV1TokenRequest
 -> AuthenticationV1TokenRequest -> Bool)
-> (AuthenticationV1TokenRequest
    -> AuthenticationV1TokenRequest -> Bool)
-> Eq AuthenticationV1TokenRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AuthenticationV1TokenRequest
-> AuthenticationV1TokenRequest -> Bool
== :: AuthenticationV1TokenRequest
-> AuthenticationV1TokenRequest -> Bool
$c/= :: AuthenticationV1TokenRequest
-> AuthenticationV1TokenRequest -> Bool
/= :: AuthenticationV1TokenRequest
-> AuthenticationV1TokenRequest -> Bool
P.Eq, P.Typeable)

-- | FromJSON AuthenticationV1TokenRequest
instance A.FromJSON AuthenticationV1TokenRequest where
  parseJSON :: Value -> Parser AuthenticationV1TokenRequest
parseJSON = String
-> (Object -> Parser AuthenticationV1TokenRequest)
-> Value
-> Parser AuthenticationV1TokenRequest
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"AuthenticationV1TokenRequest" ((Object -> Parser AuthenticationV1TokenRequest)
 -> Value -> Parser AuthenticationV1TokenRequest)
-> (Object -> Parser AuthenticationV1TokenRequest)
-> Value
-> Parser AuthenticationV1TokenRequest
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> V1TokenRequestSpec
-> Maybe V1TokenRequestStatus
-> AuthenticationV1TokenRequest
AuthenticationV1TokenRequest
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> V1TokenRequestSpec
 -> Maybe V1TokenRequestStatus
 -> AuthenticationV1TokenRequest)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> V1TokenRequestSpec
      -> Maybe V1TokenRequestStatus
      -> AuthenticationV1TokenRequest)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> V1TokenRequestSpec
   -> Maybe V1TokenRequestStatus
   -> AuthenticationV1TokenRequest)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> V1TokenRequestSpec
      -> Maybe V1TokenRequestStatus
      -> AuthenticationV1TokenRequest)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> V1TokenRequestSpec
   -> Maybe V1TokenRequestStatus
   -> AuthenticationV1TokenRequest)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (V1TokenRequestSpec
      -> Maybe V1TokenRequestStatus -> AuthenticationV1TokenRequest)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (V1TokenRequestSpec
   -> Maybe V1TokenRequestStatus -> AuthenticationV1TokenRequest)
-> Parser V1TokenRequestSpec
-> Parser
     (Maybe V1TokenRequestStatus -> AuthenticationV1TokenRequest)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1TokenRequestSpec
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"spec")
      Parser (Maybe V1TokenRequestStatus -> AuthenticationV1TokenRequest)
-> Parser (Maybe V1TokenRequestStatus)
-> Parser AuthenticationV1TokenRequest
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1TokenRequestStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON AuthenticationV1TokenRequest
instance A.ToJSON AuthenticationV1TokenRequest where
  toJSON :: AuthenticationV1TokenRequest -> Value
toJSON AuthenticationV1TokenRequest {Maybe Text
Maybe V1TokenRequestStatus
Maybe V1ObjectMeta
V1TokenRequestSpec
$sel:authenticationV1TokenRequestApiVersion:AuthenticationV1TokenRequest :: AuthenticationV1TokenRequest -> Maybe Text
$sel:authenticationV1TokenRequestKind:AuthenticationV1TokenRequest :: AuthenticationV1TokenRequest -> Maybe Text
$sel:authenticationV1TokenRequestMetadata:AuthenticationV1TokenRequest :: AuthenticationV1TokenRequest -> Maybe V1ObjectMeta
$sel:authenticationV1TokenRequestSpec:AuthenticationV1TokenRequest :: AuthenticationV1TokenRequest -> V1TokenRequestSpec
$sel:authenticationV1TokenRequestStatus:AuthenticationV1TokenRequest :: AuthenticationV1TokenRequest -> Maybe V1TokenRequestStatus
authenticationV1TokenRequestApiVersion :: Maybe Text
authenticationV1TokenRequestKind :: Maybe Text
authenticationV1TokenRequestMetadata :: Maybe V1ObjectMeta
authenticationV1TokenRequestSpec :: V1TokenRequestSpec
authenticationV1TokenRequestStatus :: Maybe V1TokenRequestStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
authenticationV1TokenRequestApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
authenticationV1TokenRequestKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
authenticationV1TokenRequestMetadata
      , Key
"spec" Key -> V1TokenRequestSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1TokenRequestSpec
authenticationV1TokenRequestSpec
      , Key
"status" Key -> Maybe V1TokenRequestStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1TokenRequestStatus
authenticationV1TokenRequestStatus
      ]


-- | Construct a value of type 'AuthenticationV1TokenRequest' (by applying it's required fields, if any)
mkAuthenticationV1TokenRequest
  :: V1TokenRequestSpec -- ^ 'authenticationV1TokenRequestSpec' 
  -> AuthenticationV1TokenRequest
mkAuthenticationV1TokenRequest :: V1TokenRequestSpec -> AuthenticationV1TokenRequest
mkAuthenticationV1TokenRequest V1TokenRequestSpec
authenticationV1TokenRequestSpec =
  AuthenticationV1TokenRequest
  { $sel:authenticationV1TokenRequestApiVersion:AuthenticationV1TokenRequest :: Maybe Text
authenticationV1TokenRequestApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:authenticationV1TokenRequestKind:AuthenticationV1TokenRequest :: Maybe Text
authenticationV1TokenRequestKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:authenticationV1TokenRequestMetadata:AuthenticationV1TokenRequest :: Maybe V1ObjectMeta
authenticationV1TokenRequestMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , V1TokenRequestSpec
$sel:authenticationV1TokenRequestSpec:AuthenticationV1TokenRequest :: V1TokenRequestSpec
authenticationV1TokenRequestSpec :: V1TokenRequestSpec
authenticationV1TokenRequestSpec
  , $sel:authenticationV1TokenRequestStatus:AuthenticationV1TokenRequest :: Maybe V1TokenRequestStatus
authenticationV1TokenRequestStatus = Maybe V1TokenRequestStatus
forall a. Maybe a
Nothing
  }

-- ** CoreV1EndpointPort
-- | CoreV1EndpointPort
-- EndpointPort is a tuple that describes a single port.
data CoreV1EndpointPort = CoreV1EndpointPort
  { CoreV1EndpointPort -> Maybe Text
coreV1EndpointPortAppProtocol :: !(Maybe Text) -- ^ "appProtocol" - The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either:  * Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names).  * Kubernetes-defined prefixed names:   * &#39;kubernetes.io/h2c&#39; - HTTP/2 prior knowledge over cleartext as described in https://www.rfc-editor.org/rfc/rfc9113.html#name-starting-http-2-with-prior-   * &#39;kubernetes.io/ws&#39;  - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455   * &#39;kubernetes.io/wss&#39; - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455  * Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol.
  , CoreV1EndpointPort -> Maybe Text
coreV1EndpointPortName :: !(Maybe Text) -- ^ "name" - The name of this port.  This must match the &#39;name&#39; field in the corresponding ServicePort. Must be a DNS_LABEL. Optional only if one port is defined.
  , CoreV1EndpointPort -> Int
coreV1EndpointPortPort :: !(Int) -- ^ /Required/ "port" - The port number of the endpoint.
  , CoreV1EndpointPort -> Maybe Text
coreV1EndpointPortProtocol :: !(Maybe Text) -- ^ "protocol" - The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.
  } deriving (Int -> CoreV1EndpointPort -> ShowS
[CoreV1EndpointPort] -> ShowS
CoreV1EndpointPort -> String
(Int -> CoreV1EndpointPort -> ShowS)
-> (CoreV1EndpointPort -> String)
-> ([CoreV1EndpointPort] -> ShowS)
-> Show CoreV1EndpointPort
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CoreV1EndpointPort -> ShowS
showsPrec :: Int -> CoreV1EndpointPort -> ShowS
$cshow :: CoreV1EndpointPort -> String
show :: CoreV1EndpointPort -> String
$cshowList :: [CoreV1EndpointPort] -> ShowS
showList :: [CoreV1EndpointPort] -> ShowS
P.Show, CoreV1EndpointPort -> CoreV1EndpointPort -> Bool
(CoreV1EndpointPort -> CoreV1EndpointPort -> Bool)
-> (CoreV1EndpointPort -> CoreV1EndpointPort -> Bool)
-> Eq CoreV1EndpointPort
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CoreV1EndpointPort -> CoreV1EndpointPort -> Bool
== :: CoreV1EndpointPort -> CoreV1EndpointPort -> Bool
$c/= :: CoreV1EndpointPort -> CoreV1EndpointPort -> Bool
/= :: CoreV1EndpointPort -> CoreV1EndpointPort -> Bool
P.Eq, P.Typeable)

-- | FromJSON CoreV1EndpointPort
instance A.FromJSON CoreV1EndpointPort where
  parseJSON :: Value -> Parser CoreV1EndpointPort
parseJSON = String
-> (Object -> Parser CoreV1EndpointPort)
-> Value
-> Parser CoreV1EndpointPort
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"CoreV1EndpointPort" ((Object -> Parser CoreV1EndpointPort)
 -> Value -> Parser CoreV1EndpointPort)
-> (Object -> Parser CoreV1EndpointPort)
-> Value
-> Parser CoreV1EndpointPort
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Maybe Text -> Int -> Maybe Text -> CoreV1EndpointPort
CoreV1EndpointPort
      (Maybe Text
 -> Maybe Text -> Int -> Maybe Text -> CoreV1EndpointPort)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Int -> Maybe Text -> CoreV1EndpointPort)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"appProtocol")
      Parser (Maybe Text -> Int -> Maybe Text -> CoreV1EndpointPort)
-> Parser (Maybe Text)
-> Parser (Int -> Maybe Text -> CoreV1EndpointPort)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"name")
      Parser (Int -> Maybe Text -> CoreV1EndpointPort)
-> Parser Int -> Parser (Maybe Text -> CoreV1EndpointPort)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"port")
      Parser (Maybe Text -> CoreV1EndpointPort)
-> Parser (Maybe Text) -> Parser CoreV1EndpointPort
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"protocol")

-- | ToJSON CoreV1EndpointPort
instance A.ToJSON CoreV1EndpointPort where
  toJSON :: CoreV1EndpointPort -> Value
toJSON CoreV1EndpointPort {Int
Maybe Text
$sel:coreV1EndpointPortAppProtocol:CoreV1EndpointPort :: CoreV1EndpointPort -> Maybe Text
$sel:coreV1EndpointPortName:CoreV1EndpointPort :: CoreV1EndpointPort -> Maybe Text
$sel:coreV1EndpointPortPort:CoreV1EndpointPort :: CoreV1EndpointPort -> Int
$sel:coreV1EndpointPortProtocol:CoreV1EndpointPort :: CoreV1EndpointPort -> Maybe Text
coreV1EndpointPortAppProtocol :: Maybe Text
coreV1EndpointPortName :: Maybe Text
coreV1EndpointPortPort :: Int
coreV1EndpointPortProtocol :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"appProtocol" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
coreV1EndpointPortAppProtocol
      , Key
"name" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
coreV1EndpointPortName
      , Key
"port" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
coreV1EndpointPortPort
      , Key
"protocol" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
coreV1EndpointPortProtocol
      ]


-- | Construct a value of type 'CoreV1EndpointPort' (by applying it's required fields, if any)
mkCoreV1EndpointPort
  :: Int -- ^ 'coreV1EndpointPortPort': The port number of the endpoint.
  -> CoreV1EndpointPort
mkCoreV1EndpointPort :: Int -> CoreV1EndpointPort
mkCoreV1EndpointPort Int
coreV1EndpointPortPort =
  CoreV1EndpointPort
  { $sel:coreV1EndpointPortAppProtocol:CoreV1EndpointPort :: Maybe Text
coreV1EndpointPortAppProtocol = Maybe Text
forall a. Maybe a
Nothing
  , $sel:coreV1EndpointPortName:CoreV1EndpointPort :: Maybe Text
coreV1EndpointPortName = Maybe Text
forall a. Maybe a
Nothing
  , Int
$sel:coreV1EndpointPortPort:CoreV1EndpointPort :: Int
coreV1EndpointPortPort :: Int
coreV1EndpointPortPort
  , $sel:coreV1EndpointPortProtocol:CoreV1EndpointPort :: Maybe Text
coreV1EndpointPortProtocol = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** CoreV1Event
-- | CoreV1Event
-- Event is a report of an event somewhere in the cluster.  Events have a limited retention time and triggers and messages may evolve with time.  Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason.  Events should be treated as informative, best-effort, supplemental data.
data CoreV1Event = CoreV1Event
  { CoreV1Event -> Maybe Text
coreV1EventAction :: !(Maybe Text) -- ^ "action" - What action was taken/failed regarding to the Regarding object.
  , CoreV1Event -> Maybe Text
coreV1EventApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , CoreV1Event -> Maybe Int
coreV1EventCount :: !(Maybe Int) -- ^ "count" - The number of times this event has occurred.
  , CoreV1Event -> Maybe DateTime
coreV1EventEventTime :: !(Maybe DateTime) -- ^ "eventTime" - Time when this Event was first observed.
  , CoreV1Event -> Maybe DateTime
coreV1EventFirstTimestamp :: !(Maybe DateTime) -- ^ "firstTimestamp" - The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)
  , CoreV1Event -> V1ObjectReference
coreV1EventInvolvedObject :: !(V1ObjectReference) -- ^ /Required/ "involvedObject"
  , CoreV1Event -> Maybe Text
coreV1EventKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , CoreV1Event -> Maybe DateTime
coreV1EventLastTimestamp :: !(Maybe DateTime) -- ^ "lastTimestamp" - The time at which the most recent occurrence of this event was recorded.
  , CoreV1Event -> Maybe Text
coreV1EventMessage :: !(Maybe Text) -- ^ "message" - A human-readable description of the status of this operation.
  , CoreV1Event -> V1ObjectMeta
coreV1EventMetadata :: !(V1ObjectMeta) -- ^ /Required/ "metadata"
  , CoreV1Event -> Maybe Text
coreV1EventReason :: !(Maybe Text) -- ^ "reason" - This should be a short, machine understandable string that gives the reason for the transition into the object&#39;s current status.
  , CoreV1Event -> Maybe V1ObjectReference
coreV1EventRelated :: !(Maybe V1ObjectReference) -- ^ "related"
  , CoreV1Event -> Maybe Text
coreV1EventReportingComponent :: !(Maybe Text) -- ^ "reportingComponent" - Name of the controller that emitted this Event, e.g. &#x60;kubernetes.io/kubelet&#x60;.
  , CoreV1Event -> Maybe Text
coreV1EventReportingInstance :: !(Maybe Text) -- ^ "reportingInstance" - ID of the controller instance, e.g. &#x60;kubelet-xyzf&#x60;.
  , CoreV1Event -> Maybe CoreV1EventSeries
coreV1EventSeries :: !(Maybe CoreV1EventSeries) -- ^ "series"
  , CoreV1Event -> Maybe V1EventSource
coreV1EventSource :: !(Maybe V1EventSource) -- ^ "source"
  , CoreV1Event -> Maybe Text
coreV1EventType :: !(Maybe Text) -- ^ "type" - Type of this event (Normal, Warning), new types could be added in the future
  } deriving (Int -> CoreV1Event -> ShowS
[CoreV1Event] -> ShowS
CoreV1Event -> String
(Int -> CoreV1Event -> ShowS)
-> (CoreV1Event -> String)
-> ([CoreV1Event] -> ShowS)
-> Show CoreV1Event
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CoreV1Event -> ShowS
showsPrec :: Int -> CoreV1Event -> ShowS
$cshow :: CoreV1Event -> String
show :: CoreV1Event -> String
$cshowList :: [CoreV1Event] -> ShowS
showList :: [CoreV1Event] -> ShowS
P.Show, CoreV1Event -> CoreV1Event -> Bool
(CoreV1Event -> CoreV1Event -> Bool)
-> (CoreV1Event -> CoreV1Event -> Bool) -> Eq CoreV1Event
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CoreV1Event -> CoreV1Event -> Bool
== :: CoreV1Event -> CoreV1Event -> Bool
$c/= :: CoreV1Event -> CoreV1Event -> Bool
/= :: CoreV1Event -> CoreV1Event -> Bool
P.Eq, P.Typeable)

-- | FromJSON CoreV1Event
instance A.FromJSON CoreV1Event where
  parseJSON :: Value -> Parser CoreV1Event
parseJSON = String
-> (Object -> Parser CoreV1Event) -> Value -> Parser CoreV1Event
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"CoreV1Event" ((Object -> Parser CoreV1Event) -> Value -> Parser CoreV1Event)
-> (Object -> Parser CoreV1Event) -> Value -> Parser CoreV1Event
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe DateTime
-> Maybe DateTime
-> V1ObjectReference
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> V1ObjectMeta
-> Maybe Text
-> Maybe V1ObjectReference
-> Maybe Text
-> Maybe Text
-> Maybe CoreV1EventSeries
-> Maybe V1EventSource
-> Maybe Text
-> CoreV1Event
CoreV1Event
      (Maybe Text
 -> Maybe Text
 -> Maybe Int
 -> Maybe DateTime
 -> Maybe DateTime
 -> V1ObjectReference
 -> Maybe Text
 -> Maybe DateTime
 -> Maybe Text
 -> V1ObjectMeta
 -> Maybe Text
 -> Maybe V1ObjectReference
 -> Maybe Text
 -> Maybe Text
 -> Maybe CoreV1EventSeries
 -> Maybe V1EventSource
 -> Maybe Text
 -> CoreV1Event)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe DateTime
      -> Maybe DateTime
      -> V1ObjectReference
      -> Maybe Text
      -> Maybe DateTime
      -> Maybe Text
      -> V1ObjectMeta
      -> Maybe Text
      -> Maybe V1ObjectReference
      -> Maybe Text
      -> Maybe Text
      -> Maybe CoreV1EventSeries
      -> Maybe V1EventSource
      -> Maybe Text
      -> CoreV1Event)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"action")
      Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe DateTime
   -> Maybe DateTime
   -> V1ObjectReference
   -> Maybe Text
   -> Maybe DateTime
   -> Maybe Text
   -> V1ObjectMeta
   -> Maybe Text
   -> Maybe V1ObjectReference
   -> Maybe Text
   -> Maybe Text
   -> Maybe CoreV1EventSeries
   -> Maybe V1EventSource
   -> Maybe Text
   -> CoreV1Event)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe DateTime
      -> Maybe DateTime
      -> V1ObjectReference
      -> Maybe Text
      -> Maybe DateTime
      -> Maybe Text
      -> V1ObjectMeta
      -> Maybe Text
      -> Maybe V1ObjectReference
      -> Maybe Text
      -> Maybe Text
      -> Maybe CoreV1EventSeries
      -> Maybe V1EventSource
      -> Maybe Text
      -> CoreV1Event)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Int
   -> Maybe DateTime
   -> Maybe DateTime
   -> V1ObjectReference
   -> Maybe Text
   -> Maybe DateTime
   -> Maybe Text
   -> V1ObjectMeta
   -> Maybe Text
   -> Maybe V1ObjectReference
   -> Maybe Text
   -> Maybe Text
   -> Maybe CoreV1EventSeries
   -> Maybe V1EventSource
   -> Maybe Text
   -> CoreV1Event)
-> Parser (Maybe Int)
-> Parser
     (Maybe DateTime
      -> Maybe DateTime
      -> V1ObjectReference
      -> Maybe Text
      -> Maybe DateTime
      -> Maybe Text
      -> V1ObjectMeta
      -> Maybe Text
      -> Maybe V1ObjectReference
      -> Maybe Text
      -> Maybe Text
      -> Maybe CoreV1EventSeries
      -> Maybe V1EventSource
      -> Maybe Text
      -> CoreV1Event)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"count")
      Parser
  (Maybe DateTime
   -> Maybe DateTime
   -> V1ObjectReference
   -> Maybe Text
   -> Maybe DateTime
   -> Maybe Text
   -> V1ObjectMeta
   -> Maybe Text
   -> Maybe V1ObjectReference
   -> Maybe Text
   -> Maybe Text
   -> Maybe CoreV1EventSeries
   -> Maybe V1EventSource
   -> Maybe Text
   -> CoreV1Event)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe DateTime
      -> V1ObjectReference
      -> Maybe Text
      -> Maybe DateTime
      -> Maybe Text
      -> V1ObjectMeta
      -> Maybe Text
      -> Maybe V1ObjectReference
      -> Maybe Text
      -> Maybe Text
      -> Maybe CoreV1EventSeries
      -> Maybe V1EventSource
      -> Maybe Text
      -> CoreV1Event)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"eventTime")
      Parser
  (Maybe DateTime
   -> V1ObjectReference
   -> Maybe Text
   -> Maybe DateTime
   -> Maybe Text
   -> V1ObjectMeta
   -> Maybe Text
   -> Maybe V1ObjectReference
   -> Maybe Text
   -> Maybe Text
   -> Maybe CoreV1EventSeries
   -> Maybe V1EventSource
   -> Maybe Text
   -> CoreV1Event)
-> Parser (Maybe DateTime)
-> Parser
     (V1ObjectReference
      -> Maybe Text
      -> Maybe DateTime
      -> Maybe Text
      -> V1ObjectMeta
      -> Maybe Text
      -> Maybe V1ObjectReference
      -> Maybe Text
      -> Maybe Text
      -> Maybe CoreV1EventSeries
      -> Maybe V1EventSource
      -> Maybe Text
      -> CoreV1Event)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"firstTimestamp")
      Parser
  (V1ObjectReference
   -> Maybe Text
   -> Maybe DateTime
   -> Maybe Text
   -> V1ObjectMeta
   -> Maybe Text
   -> Maybe V1ObjectReference
   -> Maybe Text
   -> Maybe Text
   -> Maybe CoreV1EventSeries
   -> Maybe V1EventSource
   -> Maybe Text
   -> CoreV1Event)
-> Parser V1ObjectReference
-> Parser
     (Maybe Text
      -> Maybe DateTime
      -> Maybe Text
      -> V1ObjectMeta
      -> Maybe Text
      -> Maybe V1ObjectReference
      -> Maybe Text
      -> Maybe Text
      -> Maybe CoreV1EventSeries
      -> Maybe V1EventSource
      -> Maybe Text
      -> CoreV1Event)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1ObjectReference
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"involvedObject")
      Parser
  (Maybe Text
   -> Maybe DateTime
   -> Maybe Text
   -> V1ObjectMeta
   -> Maybe Text
   -> Maybe V1ObjectReference
   -> Maybe Text
   -> Maybe Text
   -> Maybe CoreV1EventSeries
   -> Maybe V1EventSource
   -> Maybe Text
   -> CoreV1Event)
-> Parser (Maybe Text)
-> Parser
     (Maybe DateTime
      -> Maybe Text
      -> V1ObjectMeta
      -> Maybe Text
      -> Maybe V1ObjectReference
      -> Maybe Text
      -> Maybe Text
      -> Maybe CoreV1EventSeries
      -> Maybe V1EventSource
      -> Maybe Text
      -> CoreV1Event)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe DateTime
   -> Maybe Text
   -> V1ObjectMeta
   -> Maybe Text
   -> Maybe V1ObjectReference
   -> Maybe Text
   -> Maybe Text
   -> Maybe CoreV1EventSeries
   -> Maybe V1EventSource
   -> Maybe Text
   -> CoreV1Event)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe Text
      -> V1ObjectMeta
      -> Maybe Text
      -> Maybe V1ObjectReference
      -> Maybe Text
      -> Maybe Text
      -> Maybe CoreV1EventSeries
      -> Maybe V1EventSource
      -> Maybe Text
      -> CoreV1Event)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lastTimestamp")
      Parser
  (Maybe Text
   -> V1ObjectMeta
   -> Maybe Text
   -> Maybe V1ObjectReference
   -> Maybe Text
   -> Maybe Text
   -> Maybe CoreV1EventSeries
   -> Maybe V1EventSource
   -> Maybe Text
   -> CoreV1Event)
-> Parser (Maybe Text)
-> Parser
     (V1ObjectMeta
      -> Maybe Text
      -> Maybe V1ObjectReference
      -> Maybe Text
      -> Maybe Text
      -> Maybe CoreV1EventSeries
      -> Maybe V1EventSource
      -> Maybe Text
      -> CoreV1Event)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"message")
      Parser
  (V1ObjectMeta
   -> Maybe Text
   -> Maybe V1ObjectReference
   -> Maybe Text
   -> Maybe Text
   -> Maybe CoreV1EventSeries
   -> Maybe V1EventSource
   -> Maybe Text
   -> CoreV1Event)
-> Parser V1ObjectMeta
-> Parser
     (Maybe Text
      -> Maybe V1ObjectReference
      -> Maybe Text
      -> Maybe Text
      -> Maybe CoreV1EventSeries
      -> Maybe V1EventSource
      -> Maybe Text
      -> CoreV1Event)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1ObjectMeta
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"metadata")
      Parser
  (Maybe Text
   -> Maybe V1ObjectReference
   -> Maybe Text
   -> Maybe Text
   -> Maybe CoreV1EventSeries
   -> Maybe V1EventSource
   -> Maybe Text
   -> CoreV1Event)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectReference
      -> Maybe Text
      -> Maybe Text
      -> Maybe CoreV1EventSeries
      -> Maybe V1EventSource
      -> Maybe Text
      -> CoreV1Event)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reason")
      Parser
  (Maybe V1ObjectReference
   -> Maybe Text
   -> Maybe Text
   -> Maybe CoreV1EventSeries
   -> Maybe V1EventSource
   -> Maybe Text
   -> CoreV1Event)
-> Parser (Maybe V1ObjectReference)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe CoreV1EventSeries
      -> Maybe V1EventSource
      -> Maybe Text
      -> CoreV1Event)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectReference)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"related")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe CoreV1EventSeries
   -> Maybe V1EventSource
   -> Maybe Text
   -> CoreV1Event)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe CoreV1EventSeries
      -> Maybe V1EventSource
      -> Maybe Text
      -> CoreV1Event)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reportingComponent")
      Parser
  (Maybe Text
   -> Maybe CoreV1EventSeries
   -> Maybe V1EventSource
   -> Maybe Text
   -> CoreV1Event)
-> Parser (Maybe Text)
-> Parser
     (Maybe CoreV1EventSeries
      -> Maybe V1EventSource -> Maybe Text -> CoreV1Event)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reportingInstance")
      Parser
  (Maybe CoreV1EventSeries
   -> Maybe V1EventSource -> Maybe Text -> CoreV1Event)
-> Parser (Maybe CoreV1EventSeries)
-> Parser (Maybe V1EventSource -> Maybe Text -> CoreV1Event)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe CoreV1EventSeries)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"series")
      Parser (Maybe V1EventSource -> Maybe Text -> CoreV1Event)
-> Parser (Maybe V1EventSource)
-> Parser (Maybe Text -> CoreV1Event)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1EventSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"source")
      Parser (Maybe Text -> CoreV1Event)
-> Parser (Maybe Text) -> Parser CoreV1Event
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"type")

-- | ToJSON CoreV1Event
instance A.ToJSON CoreV1Event where
  toJSON :: CoreV1Event -> Value
toJSON CoreV1Event {Maybe Int
Maybe Text
Maybe DateTime
Maybe V1ObjectReference
Maybe V1EventSource
Maybe CoreV1EventSeries
V1ObjectReference
V1ObjectMeta
$sel:coreV1EventAction:CoreV1Event :: CoreV1Event -> Maybe Text
$sel:coreV1EventApiVersion:CoreV1Event :: CoreV1Event -> Maybe Text
$sel:coreV1EventCount:CoreV1Event :: CoreV1Event -> Maybe Int
$sel:coreV1EventEventTime:CoreV1Event :: CoreV1Event -> Maybe DateTime
$sel:coreV1EventFirstTimestamp:CoreV1Event :: CoreV1Event -> Maybe DateTime
$sel:coreV1EventInvolvedObject:CoreV1Event :: CoreV1Event -> V1ObjectReference
$sel:coreV1EventKind:CoreV1Event :: CoreV1Event -> Maybe Text
$sel:coreV1EventLastTimestamp:CoreV1Event :: CoreV1Event -> Maybe DateTime
$sel:coreV1EventMessage:CoreV1Event :: CoreV1Event -> Maybe Text
$sel:coreV1EventMetadata:CoreV1Event :: CoreV1Event -> V1ObjectMeta
$sel:coreV1EventReason:CoreV1Event :: CoreV1Event -> Maybe Text
$sel:coreV1EventRelated:CoreV1Event :: CoreV1Event -> Maybe V1ObjectReference
$sel:coreV1EventReportingComponent:CoreV1Event :: CoreV1Event -> Maybe Text
$sel:coreV1EventReportingInstance:CoreV1Event :: CoreV1Event -> Maybe Text
$sel:coreV1EventSeries:CoreV1Event :: CoreV1Event -> Maybe CoreV1EventSeries
$sel:coreV1EventSource:CoreV1Event :: CoreV1Event -> Maybe V1EventSource
$sel:coreV1EventType:CoreV1Event :: CoreV1Event -> Maybe Text
coreV1EventAction :: Maybe Text
coreV1EventApiVersion :: Maybe Text
coreV1EventCount :: Maybe Int
coreV1EventEventTime :: Maybe DateTime
coreV1EventFirstTimestamp :: Maybe DateTime
coreV1EventInvolvedObject :: V1ObjectReference
coreV1EventKind :: Maybe Text
coreV1EventLastTimestamp :: Maybe DateTime
coreV1EventMessage :: Maybe Text
coreV1EventMetadata :: V1ObjectMeta
coreV1EventReason :: Maybe Text
coreV1EventRelated :: Maybe V1ObjectReference
coreV1EventReportingComponent :: Maybe Text
coreV1EventReportingInstance :: Maybe Text
coreV1EventSeries :: Maybe CoreV1EventSeries
coreV1EventSource :: Maybe V1EventSource
coreV1EventType :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"action" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
coreV1EventAction
      , Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
coreV1EventApiVersion
      , Key
"count" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
coreV1EventCount
      , Key
"eventTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
coreV1EventEventTime
      , Key
"firstTimestamp" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
coreV1EventFirstTimestamp
      , Key
"involvedObject" Key -> V1ObjectReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1ObjectReference
coreV1EventInvolvedObject
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
coreV1EventKind
      , Key
"lastTimestamp" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
coreV1EventLastTimestamp
      , Key
"message" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
coreV1EventMessage
      , Key
"metadata" Key -> V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1ObjectMeta
coreV1EventMetadata
      , Key
"reason" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
coreV1EventReason
      , Key
"related" Key -> Maybe V1ObjectReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectReference
coreV1EventRelated
      , Key
"reportingComponent" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
coreV1EventReportingComponent
      , Key
"reportingInstance" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
coreV1EventReportingInstance
      , Key
"series" Key -> Maybe CoreV1EventSeries -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe CoreV1EventSeries
coreV1EventSeries
      , Key
"source" Key -> Maybe V1EventSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1EventSource
coreV1EventSource
      , Key
"type" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
coreV1EventType
      ]


-- | Construct a value of type 'CoreV1Event' (by applying it's required fields, if any)
mkCoreV1Event
  :: V1ObjectReference -- ^ 'coreV1EventInvolvedObject' 
  -> V1ObjectMeta -- ^ 'coreV1EventMetadata' 
  -> CoreV1Event
mkCoreV1Event :: V1ObjectReference -> V1ObjectMeta -> CoreV1Event
mkCoreV1Event V1ObjectReference
coreV1EventInvolvedObject V1ObjectMeta
coreV1EventMetadata =
  CoreV1Event
  { $sel:coreV1EventAction:CoreV1Event :: Maybe Text
coreV1EventAction = Maybe Text
forall a. Maybe a
Nothing
  , $sel:coreV1EventApiVersion:CoreV1Event :: Maybe Text
coreV1EventApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:coreV1EventCount:CoreV1Event :: Maybe Int
coreV1EventCount = Maybe Int
forall a. Maybe a
Nothing
  , $sel:coreV1EventEventTime:CoreV1Event :: Maybe DateTime
coreV1EventEventTime = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:coreV1EventFirstTimestamp:CoreV1Event :: Maybe DateTime
coreV1EventFirstTimestamp = Maybe DateTime
forall a. Maybe a
Nothing
  , V1ObjectReference
$sel:coreV1EventInvolvedObject:CoreV1Event :: V1ObjectReference
coreV1EventInvolvedObject :: V1ObjectReference
coreV1EventInvolvedObject
  , $sel:coreV1EventKind:CoreV1Event :: Maybe Text
coreV1EventKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:coreV1EventLastTimestamp:CoreV1Event :: Maybe DateTime
coreV1EventLastTimestamp = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:coreV1EventMessage:CoreV1Event :: Maybe Text
coreV1EventMessage = Maybe Text
forall a. Maybe a
Nothing
  , V1ObjectMeta
$sel:coreV1EventMetadata:CoreV1Event :: V1ObjectMeta
coreV1EventMetadata :: V1ObjectMeta
coreV1EventMetadata
  , $sel:coreV1EventReason:CoreV1Event :: Maybe Text
coreV1EventReason = Maybe Text
forall a. Maybe a
Nothing
  , $sel:coreV1EventRelated:CoreV1Event :: Maybe V1ObjectReference
coreV1EventRelated = Maybe V1ObjectReference
forall a. Maybe a
Nothing
  , $sel:coreV1EventReportingComponent:CoreV1Event :: Maybe Text
coreV1EventReportingComponent = Maybe Text
forall a. Maybe a
Nothing
  , $sel:coreV1EventReportingInstance:CoreV1Event :: Maybe Text
coreV1EventReportingInstance = Maybe Text
forall a. Maybe a
Nothing
  , $sel:coreV1EventSeries:CoreV1Event :: Maybe CoreV1EventSeries
coreV1EventSeries = Maybe CoreV1EventSeries
forall a. Maybe a
Nothing
  , $sel:coreV1EventSource:CoreV1Event :: Maybe V1EventSource
coreV1EventSource = Maybe V1EventSource
forall a. Maybe a
Nothing
  , $sel:coreV1EventType:CoreV1Event :: Maybe Text
coreV1EventType = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** CoreV1EventList
-- | CoreV1EventList
-- EventList is a list of events.
data CoreV1EventList = CoreV1EventList
  { CoreV1EventList -> Maybe Text
coreV1EventListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , CoreV1EventList -> [CoreV1Event]
coreV1EventListItems :: !([CoreV1Event]) -- ^ /Required/ "items" - List of events
  , CoreV1EventList -> Maybe Text
coreV1EventListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , CoreV1EventList -> Maybe V1ListMeta
coreV1EventListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> CoreV1EventList -> ShowS
[CoreV1EventList] -> ShowS
CoreV1EventList -> String
(Int -> CoreV1EventList -> ShowS)
-> (CoreV1EventList -> String)
-> ([CoreV1EventList] -> ShowS)
-> Show CoreV1EventList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CoreV1EventList -> ShowS
showsPrec :: Int -> CoreV1EventList -> ShowS
$cshow :: CoreV1EventList -> String
show :: CoreV1EventList -> String
$cshowList :: [CoreV1EventList] -> ShowS
showList :: [CoreV1EventList] -> ShowS
P.Show, CoreV1EventList -> CoreV1EventList -> Bool
(CoreV1EventList -> CoreV1EventList -> Bool)
-> (CoreV1EventList -> CoreV1EventList -> Bool)
-> Eq CoreV1EventList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CoreV1EventList -> CoreV1EventList -> Bool
== :: CoreV1EventList -> CoreV1EventList -> Bool
$c/= :: CoreV1EventList -> CoreV1EventList -> Bool
/= :: CoreV1EventList -> CoreV1EventList -> Bool
P.Eq, P.Typeable)

-- | FromJSON CoreV1EventList
instance A.FromJSON CoreV1EventList where
  parseJSON :: Value -> Parser CoreV1EventList
parseJSON = String
-> (Object -> Parser CoreV1EventList)
-> Value
-> Parser CoreV1EventList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"CoreV1EventList" ((Object -> Parser CoreV1EventList)
 -> Value -> Parser CoreV1EventList)
-> (Object -> Parser CoreV1EventList)
-> Value
-> Parser CoreV1EventList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [CoreV1Event]
-> Maybe Text
-> Maybe V1ListMeta
-> CoreV1EventList
CoreV1EventList
      (Maybe Text
 -> [CoreV1Event]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> CoreV1EventList)
-> Parser (Maybe Text)
-> Parser
     ([CoreV1Event]
      -> Maybe Text -> Maybe V1ListMeta -> CoreV1EventList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([CoreV1Event]
   -> Maybe Text -> Maybe V1ListMeta -> CoreV1EventList)
-> Parser [CoreV1Event]
-> Parser (Maybe Text -> Maybe V1ListMeta -> CoreV1EventList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [CoreV1Event]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> CoreV1EventList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> CoreV1EventList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> CoreV1EventList)
-> Parser (Maybe V1ListMeta) -> Parser CoreV1EventList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON CoreV1EventList
instance A.ToJSON CoreV1EventList where
  toJSON :: CoreV1EventList -> Value
toJSON CoreV1EventList {[CoreV1Event]
Maybe Text
Maybe V1ListMeta
$sel:coreV1EventListApiVersion:CoreV1EventList :: CoreV1EventList -> Maybe Text
$sel:coreV1EventListItems:CoreV1EventList :: CoreV1EventList -> [CoreV1Event]
$sel:coreV1EventListKind:CoreV1EventList :: CoreV1EventList -> Maybe Text
$sel:coreV1EventListMetadata:CoreV1EventList :: CoreV1EventList -> Maybe V1ListMeta
coreV1EventListApiVersion :: Maybe Text
coreV1EventListItems :: [CoreV1Event]
coreV1EventListKind :: Maybe Text
coreV1EventListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
coreV1EventListApiVersion
      , Key
"items" Key -> [CoreV1Event] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [CoreV1Event]
coreV1EventListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
coreV1EventListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
coreV1EventListMetadata
      ]


-- | Construct a value of type 'CoreV1EventList' (by applying it's required fields, if any)
mkCoreV1EventList
  :: [CoreV1Event] -- ^ 'coreV1EventListItems': List of events
  -> CoreV1EventList
mkCoreV1EventList :: [CoreV1Event] -> CoreV1EventList
mkCoreV1EventList [CoreV1Event]
coreV1EventListItems =
  CoreV1EventList
  { $sel:coreV1EventListApiVersion:CoreV1EventList :: Maybe Text
coreV1EventListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [CoreV1Event]
$sel:coreV1EventListItems:CoreV1EventList :: [CoreV1Event]
coreV1EventListItems :: [CoreV1Event]
coreV1EventListItems
  , $sel:coreV1EventListKind:CoreV1EventList :: Maybe Text
coreV1EventListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:coreV1EventListMetadata:CoreV1EventList :: Maybe V1ListMeta
coreV1EventListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** CoreV1EventSeries
-- | CoreV1EventSeries
-- EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time.
data CoreV1EventSeries = CoreV1EventSeries
  { CoreV1EventSeries -> Maybe Int
coreV1EventSeriesCount :: !(Maybe Int) -- ^ "count" - Number of occurrences in this series up to the last heartbeat time
  , CoreV1EventSeries -> Maybe DateTime
coreV1EventSeriesLastObservedTime :: !(Maybe DateTime) -- ^ "lastObservedTime" - Time of the last occurrence observed
  } deriving (Int -> CoreV1EventSeries -> ShowS
[CoreV1EventSeries] -> ShowS
CoreV1EventSeries -> String
(Int -> CoreV1EventSeries -> ShowS)
-> (CoreV1EventSeries -> String)
-> ([CoreV1EventSeries] -> ShowS)
-> Show CoreV1EventSeries
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CoreV1EventSeries -> ShowS
showsPrec :: Int -> CoreV1EventSeries -> ShowS
$cshow :: CoreV1EventSeries -> String
show :: CoreV1EventSeries -> String
$cshowList :: [CoreV1EventSeries] -> ShowS
showList :: [CoreV1EventSeries] -> ShowS
P.Show, CoreV1EventSeries -> CoreV1EventSeries -> Bool
(CoreV1EventSeries -> CoreV1EventSeries -> Bool)
-> (CoreV1EventSeries -> CoreV1EventSeries -> Bool)
-> Eq CoreV1EventSeries
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CoreV1EventSeries -> CoreV1EventSeries -> Bool
== :: CoreV1EventSeries -> CoreV1EventSeries -> Bool
$c/= :: CoreV1EventSeries -> CoreV1EventSeries -> Bool
/= :: CoreV1EventSeries -> CoreV1EventSeries -> Bool
P.Eq, P.Typeable)

-- | FromJSON CoreV1EventSeries
instance A.FromJSON CoreV1EventSeries where
  parseJSON :: Value -> Parser CoreV1EventSeries
parseJSON = String
-> (Object -> Parser CoreV1EventSeries)
-> Value
-> Parser CoreV1EventSeries
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"CoreV1EventSeries" ((Object -> Parser CoreV1EventSeries)
 -> Value -> Parser CoreV1EventSeries)
-> (Object -> Parser CoreV1EventSeries)
-> Value
-> Parser CoreV1EventSeries
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Int -> Maybe DateTime -> CoreV1EventSeries
CoreV1EventSeries
      (Maybe Int -> Maybe DateTime -> CoreV1EventSeries)
-> Parser (Maybe Int)
-> Parser (Maybe DateTime -> CoreV1EventSeries)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"count")
      Parser (Maybe DateTime -> CoreV1EventSeries)
-> Parser (Maybe DateTime) -> Parser CoreV1EventSeries
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lastObservedTime")

-- | ToJSON CoreV1EventSeries
instance A.ToJSON CoreV1EventSeries where
  toJSON :: CoreV1EventSeries -> Value
toJSON CoreV1EventSeries {Maybe Int
Maybe DateTime
$sel:coreV1EventSeriesCount:CoreV1EventSeries :: CoreV1EventSeries -> Maybe Int
$sel:coreV1EventSeriesLastObservedTime:CoreV1EventSeries :: CoreV1EventSeries -> Maybe DateTime
coreV1EventSeriesCount :: Maybe Int
coreV1EventSeriesLastObservedTime :: Maybe DateTime
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"count" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
coreV1EventSeriesCount
      , Key
"lastObservedTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
coreV1EventSeriesLastObservedTime
      ]


-- | Construct a value of type 'CoreV1EventSeries' (by applying it's required fields, if any)
mkCoreV1EventSeries
  :: CoreV1EventSeries
mkCoreV1EventSeries :: CoreV1EventSeries
mkCoreV1EventSeries =
  CoreV1EventSeries
  { $sel:coreV1EventSeriesCount:CoreV1EventSeries :: Maybe Int
coreV1EventSeriesCount = Maybe Int
forall a. Maybe a
Nothing
  , $sel:coreV1EventSeriesLastObservedTime:CoreV1EventSeries :: Maybe DateTime
coreV1EventSeriesLastObservedTime = Maybe DateTime
forall a. Maybe a
Nothing
  }

-- ** DiscoveryV1EndpointPort
-- | DiscoveryV1EndpointPort
-- EndpointPort represents a Port used by an EndpointSlice
data DiscoveryV1EndpointPort = DiscoveryV1EndpointPort
  { DiscoveryV1EndpointPort -> Maybe Text
discoveryV1EndpointPortAppProtocol :: !(Maybe Text) -- ^ "appProtocol" - The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either:  * Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names).  * Kubernetes-defined prefixed names:   * &#39;kubernetes.io/h2c&#39; - HTTP/2 prior knowledge over cleartext as described in https://www.rfc-editor.org/rfc/rfc9113.html#name-starting-http-2-with-prior-   * &#39;kubernetes.io/ws&#39;  - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455   * &#39;kubernetes.io/wss&#39; - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455  * Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol.
  , DiscoveryV1EndpointPort -> Maybe Text
discoveryV1EndpointPortName :: !(Maybe Text) -- ^ "name" - name represents the name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is derived from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or &#39;-&#39;. * must start and end with an alphanumeric character. Default is empty string.
  , DiscoveryV1EndpointPort -> Maybe Int
discoveryV1EndpointPortPort :: !(Maybe Int) -- ^ "port" - port represents the port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer.
  , DiscoveryV1EndpointPort -> Maybe Text
discoveryV1EndpointPortProtocol :: !(Maybe Text) -- ^ "protocol" - protocol represents the IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.
  } deriving (Int -> DiscoveryV1EndpointPort -> ShowS
[DiscoveryV1EndpointPort] -> ShowS
DiscoveryV1EndpointPort -> String
(Int -> DiscoveryV1EndpointPort -> ShowS)
-> (DiscoveryV1EndpointPort -> String)
-> ([DiscoveryV1EndpointPort] -> ShowS)
-> Show DiscoveryV1EndpointPort
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DiscoveryV1EndpointPort -> ShowS
showsPrec :: Int -> DiscoveryV1EndpointPort -> ShowS
$cshow :: DiscoveryV1EndpointPort -> String
show :: DiscoveryV1EndpointPort -> String
$cshowList :: [DiscoveryV1EndpointPort] -> ShowS
showList :: [DiscoveryV1EndpointPort] -> ShowS
P.Show, DiscoveryV1EndpointPort -> DiscoveryV1EndpointPort -> Bool
(DiscoveryV1EndpointPort -> DiscoveryV1EndpointPort -> Bool)
-> (DiscoveryV1EndpointPort -> DiscoveryV1EndpointPort -> Bool)
-> Eq DiscoveryV1EndpointPort
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DiscoveryV1EndpointPort -> DiscoveryV1EndpointPort -> Bool
== :: DiscoveryV1EndpointPort -> DiscoveryV1EndpointPort -> Bool
$c/= :: DiscoveryV1EndpointPort -> DiscoveryV1EndpointPort -> Bool
/= :: DiscoveryV1EndpointPort -> DiscoveryV1EndpointPort -> Bool
P.Eq, P.Typeable)

-- | FromJSON DiscoveryV1EndpointPort
instance A.FromJSON DiscoveryV1EndpointPort where
  parseJSON :: Value -> Parser DiscoveryV1EndpointPort
parseJSON = String
-> (Object -> Parser DiscoveryV1EndpointPort)
-> Value
-> Parser DiscoveryV1EndpointPort
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"DiscoveryV1EndpointPort" ((Object -> Parser DiscoveryV1EndpointPort)
 -> Value -> Parser DiscoveryV1EndpointPort)
-> (Object -> Parser DiscoveryV1EndpointPort)
-> Value
-> Parser DiscoveryV1EndpointPort
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text -> Maybe Int -> Maybe Text -> DiscoveryV1EndpointPort
DiscoveryV1EndpointPort
      (Maybe Text
 -> Maybe Text
 -> Maybe Int
 -> Maybe Text
 -> DiscoveryV1EndpointPort)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Int -> Maybe Text -> DiscoveryV1EndpointPort)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"appProtocol")
      Parser
  (Maybe Text -> Maybe Int -> Maybe Text -> DiscoveryV1EndpointPort)
-> Parser (Maybe Text)
-> Parser (Maybe Int -> Maybe Text -> DiscoveryV1EndpointPort)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"name")
      Parser (Maybe Int -> Maybe Text -> DiscoveryV1EndpointPort)
-> Parser (Maybe Int)
-> Parser (Maybe Text -> DiscoveryV1EndpointPort)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"port")
      Parser (Maybe Text -> DiscoveryV1EndpointPort)
-> Parser (Maybe Text) -> Parser DiscoveryV1EndpointPort
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"protocol")

-- | ToJSON DiscoveryV1EndpointPort
instance A.ToJSON DiscoveryV1EndpointPort where
  toJSON :: DiscoveryV1EndpointPort -> Value
toJSON DiscoveryV1EndpointPort {Maybe Int
Maybe Text
$sel:discoveryV1EndpointPortAppProtocol:DiscoveryV1EndpointPort :: DiscoveryV1EndpointPort -> Maybe Text
$sel:discoveryV1EndpointPortName:DiscoveryV1EndpointPort :: DiscoveryV1EndpointPort -> Maybe Text
$sel:discoveryV1EndpointPortPort:DiscoveryV1EndpointPort :: DiscoveryV1EndpointPort -> Maybe Int
$sel:discoveryV1EndpointPortProtocol:DiscoveryV1EndpointPort :: DiscoveryV1EndpointPort -> Maybe Text
discoveryV1EndpointPortAppProtocol :: Maybe Text
discoveryV1EndpointPortName :: Maybe Text
discoveryV1EndpointPortPort :: Maybe Int
discoveryV1EndpointPortProtocol :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"appProtocol" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
discoveryV1EndpointPortAppProtocol
      , Key
"name" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
discoveryV1EndpointPortName
      , Key
"port" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
discoveryV1EndpointPortPort
      , Key
"protocol" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
discoveryV1EndpointPortProtocol
      ]


-- | Construct a value of type 'DiscoveryV1EndpointPort' (by applying it's required fields, if any)
mkDiscoveryV1EndpointPort
  :: DiscoveryV1EndpointPort
mkDiscoveryV1EndpointPort :: DiscoveryV1EndpointPort
mkDiscoveryV1EndpointPort =
  DiscoveryV1EndpointPort
  { $sel:discoveryV1EndpointPortAppProtocol:DiscoveryV1EndpointPort :: Maybe Text
discoveryV1EndpointPortAppProtocol = Maybe Text
forall a. Maybe a
Nothing
  , $sel:discoveryV1EndpointPortName:DiscoveryV1EndpointPort :: Maybe Text
discoveryV1EndpointPortName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:discoveryV1EndpointPortPort:DiscoveryV1EndpointPort :: Maybe Int
discoveryV1EndpointPortPort = Maybe Int
forall a. Maybe a
Nothing
  , $sel:discoveryV1EndpointPortProtocol:DiscoveryV1EndpointPort :: Maybe Text
discoveryV1EndpointPortProtocol = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** EventsV1Event
-- | EventsV1Event
-- Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. Events have a limited retention time and triggers and messages may evolve with time.  Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason.  Events should be treated as informative, best-effort, supplemental data.
data EventsV1Event = EventsV1Event
  { EventsV1Event -> Maybe Text
eventsV1EventAction :: !(Maybe Text) -- ^ "action" - action is what action was taken/failed regarding to the regarding object. It is machine-readable. This field cannot be empty for new Events and it can have at most 128 characters.
  , EventsV1Event -> Maybe Text
eventsV1EventApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , EventsV1Event -> Maybe Int
eventsV1EventDeprecatedCount :: !(Maybe Int) -- ^ "deprecatedCount" - deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type.
  , EventsV1Event -> Maybe DateTime
eventsV1EventDeprecatedFirstTimestamp :: !(Maybe DateTime) -- ^ "deprecatedFirstTimestamp" - deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.
  , EventsV1Event -> Maybe DateTime
eventsV1EventDeprecatedLastTimestamp :: !(Maybe DateTime) -- ^ "deprecatedLastTimestamp" - deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.
  , EventsV1Event -> Maybe V1EventSource
eventsV1EventDeprecatedSource :: !(Maybe V1EventSource) -- ^ "deprecatedSource"
  , EventsV1Event -> DateTime
eventsV1EventEventTime :: !(DateTime) -- ^ /Required/ "eventTime" - eventTime is the time when this Event was first observed. It is required.
  , EventsV1Event -> Maybe Text
eventsV1EventKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , EventsV1Event -> Maybe V1ObjectMeta
eventsV1EventMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , EventsV1Event -> Maybe Text
eventsV1EventNote :: !(Maybe Text) -- ^ "note" - note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB.
  , EventsV1Event -> Maybe Text
eventsV1EventReason :: !(Maybe Text) -- ^ "reason" - reason is why the action was taken. It is human-readable. This field cannot be empty for new Events and it can have at most 128 characters.
  , EventsV1Event -> Maybe V1ObjectReference
eventsV1EventRegarding :: !(Maybe V1ObjectReference) -- ^ "regarding"
  , EventsV1Event -> Maybe V1ObjectReference
eventsV1EventRelated :: !(Maybe V1ObjectReference) -- ^ "related"
  , EventsV1Event -> Maybe Text
eventsV1EventReportingController :: !(Maybe Text) -- ^ "reportingController" - reportingController is the name of the controller that emitted this Event, e.g. &#x60;kubernetes.io/kubelet&#x60;. This field cannot be empty for new Events.
  , EventsV1Event -> Maybe Text
eventsV1EventReportingInstance :: !(Maybe Text) -- ^ "reportingInstance" - reportingInstance is the ID of the controller instance, e.g. &#x60;kubelet-xyzf&#x60;. This field cannot be empty for new Events and it can have at most 128 characters.
  , EventsV1Event -> Maybe EventsV1EventSeries
eventsV1EventSeries :: !(Maybe EventsV1EventSeries) -- ^ "series"
  , EventsV1Event -> Maybe Text
eventsV1EventType :: !(Maybe Text) -- ^ "type" - type is the type of this event (Normal, Warning), new types could be added in the future. It is machine-readable. This field cannot be empty for new Events.
  } deriving (Int -> EventsV1Event -> ShowS
[EventsV1Event] -> ShowS
EventsV1Event -> String
(Int -> EventsV1Event -> ShowS)
-> (EventsV1Event -> String)
-> ([EventsV1Event] -> ShowS)
-> Show EventsV1Event
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EventsV1Event -> ShowS
showsPrec :: Int -> EventsV1Event -> ShowS
$cshow :: EventsV1Event -> String
show :: EventsV1Event -> String
$cshowList :: [EventsV1Event] -> ShowS
showList :: [EventsV1Event] -> ShowS
P.Show, EventsV1Event -> EventsV1Event -> Bool
(EventsV1Event -> EventsV1Event -> Bool)
-> (EventsV1Event -> EventsV1Event -> Bool) -> Eq EventsV1Event
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EventsV1Event -> EventsV1Event -> Bool
== :: EventsV1Event -> EventsV1Event -> Bool
$c/= :: EventsV1Event -> EventsV1Event -> Bool
/= :: EventsV1Event -> EventsV1Event -> Bool
P.Eq, P.Typeable)

-- | FromJSON EventsV1Event
instance A.FromJSON EventsV1Event where
  parseJSON :: Value -> Parser EventsV1Event
parseJSON = String
-> (Object -> Parser EventsV1Event)
-> Value
-> Parser EventsV1Event
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"EventsV1Event" ((Object -> Parser EventsV1Event) -> Value -> Parser EventsV1Event)
-> (Object -> Parser EventsV1Event)
-> Value
-> Parser EventsV1Event
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe DateTime
-> Maybe DateTime
-> Maybe V1EventSource
-> DateTime
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe Text
-> Maybe Text
-> Maybe V1ObjectReference
-> Maybe V1ObjectReference
-> Maybe Text
-> Maybe Text
-> Maybe EventsV1EventSeries
-> Maybe Text
-> EventsV1Event
EventsV1Event
      (Maybe Text
 -> Maybe Text
 -> Maybe Int
 -> Maybe DateTime
 -> Maybe DateTime
 -> Maybe V1EventSource
 -> DateTime
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectReference
 -> Maybe V1ObjectReference
 -> Maybe Text
 -> Maybe Text
 -> Maybe EventsV1EventSeries
 -> Maybe Text
 -> EventsV1Event)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe DateTime
      -> Maybe DateTime
      -> Maybe V1EventSource
      -> DateTime
      -> Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1ObjectReference
      -> Maybe V1ObjectReference
      -> Maybe Text
      -> Maybe Text
      -> Maybe EventsV1EventSeries
      -> Maybe Text
      -> EventsV1Event)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"action")
      Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe DateTime
   -> Maybe DateTime
   -> Maybe V1EventSource
   -> DateTime
   -> Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1ObjectReference
   -> Maybe V1ObjectReference
   -> Maybe Text
   -> Maybe Text
   -> Maybe EventsV1EventSeries
   -> Maybe Text
   -> EventsV1Event)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe DateTime
      -> Maybe DateTime
      -> Maybe V1EventSource
      -> DateTime
      -> Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1ObjectReference
      -> Maybe V1ObjectReference
      -> Maybe Text
      -> Maybe Text
      -> Maybe EventsV1EventSeries
      -> Maybe Text
      -> EventsV1Event)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Int
   -> Maybe DateTime
   -> Maybe DateTime
   -> Maybe V1EventSource
   -> DateTime
   -> Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1ObjectReference
   -> Maybe V1ObjectReference
   -> Maybe Text
   -> Maybe Text
   -> Maybe EventsV1EventSeries
   -> Maybe Text
   -> EventsV1Event)
-> Parser (Maybe Int)
-> Parser
     (Maybe DateTime
      -> Maybe DateTime
      -> Maybe V1EventSource
      -> DateTime
      -> Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1ObjectReference
      -> Maybe V1ObjectReference
      -> Maybe Text
      -> Maybe Text
      -> Maybe EventsV1EventSeries
      -> Maybe Text
      -> EventsV1Event)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"deprecatedCount")
      Parser
  (Maybe DateTime
   -> Maybe DateTime
   -> Maybe V1EventSource
   -> DateTime
   -> Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1ObjectReference
   -> Maybe V1ObjectReference
   -> Maybe Text
   -> Maybe Text
   -> Maybe EventsV1EventSeries
   -> Maybe Text
   -> EventsV1Event)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe DateTime
      -> Maybe V1EventSource
      -> DateTime
      -> Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1ObjectReference
      -> Maybe V1ObjectReference
      -> Maybe Text
      -> Maybe Text
      -> Maybe EventsV1EventSeries
      -> Maybe Text
      -> EventsV1Event)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"deprecatedFirstTimestamp")
      Parser
  (Maybe DateTime
   -> Maybe V1EventSource
   -> DateTime
   -> Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1ObjectReference
   -> Maybe V1ObjectReference
   -> Maybe Text
   -> Maybe Text
   -> Maybe EventsV1EventSeries
   -> Maybe Text
   -> EventsV1Event)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe V1EventSource
      -> DateTime
      -> Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1ObjectReference
      -> Maybe V1ObjectReference
      -> Maybe Text
      -> Maybe Text
      -> Maybe EventsV1EventSeries
      -> Maybe Text
      -> EventsV1Event)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"deprecatedLastTimestamp")
      Parser
  (Maybe V1EventSource
   -> DateTime
   -> Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1ObjectReference
   -> Maybe V1ObjectReference
   -> Maybe Text
   -> Maybe Text
   -> Maybe EventsV1EventSeries
   -> Maybe Text
   -> EventsV1Event)
-> Parser (Maybe V1EventSource)
-> Parser
     (DateTime
      -> Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1ObjectReference
      -> Maybe V1ObjectReference
      -> Maybe Text
      -> Maybe Text
      -> Maybe EventsV1EventSeries
      -> Maybe Text
      -> EventsV1Event)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1EventSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"deprecatedSource")
      Parser
  (DateTime
   -> Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1ObjectReference
   -> Maybe V1ObjectReference
   -> Maybe Text
   -> Maybe Text
   -> Maybe EventsV1EventSeries
   -> Maybe Text
   -> EventsV1Event)
-> Parser DateTime
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1ObjectReference
      -> Maybe V1ObjectReference
      -> Maybe Text
      -> Maybe Text
      -> Maybe EventsV1EventSeries
      -> Maybe Text
      -> EventsV1Event)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser DateTime
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"eventTime")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1ObjectReference
   -> Maybe V1ObjectReference
   -> Maybe Text
   -> Maybe Text
   -> Maybe EventsV1EventSeries
   -> Maybe Text
   -> EventsV1Event)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1ObjectReference
      -> Maybe V1ObjectReference
      -> Maybe Text
      -> Maybe Text
      -> Maybe EventsV1EventSeries
      -> Maybe Text
      -> EventsV1Event)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1ObjectReference
   -> Maybe V1ObjectReference
   -> Maybe Text
   -> Maybe Text
   -> Maybe EventsV1EventSeries
   -> Maybe Text
   -> EventsV1Event)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe V1ObjectReference
      -> Maybe V1ObjectReference
      -> Maybe Text
      -> Maybe Text
      -> Maybe EventsV1EventSeries
      -> Maybe Text
      -> EventsV1Event)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe V1ObjectReference
   -> Maybe V1ObjectReference
   -> Maybe Text
   -> Maybe Text
   -> Maybe EventsV1EventSeries
   -> Maybe Text
   -> EventsV1Event)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectReference
      -> Maybe V1ObjectReference
      -> Maybe Text
      -> Maybe Text
      -> Maybe EventsV1EventSeries
      -> Maybe Text
      -> EventsV1Event)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"note")
      Parser
  (Maybe Text
   -> Maybe V1ObjectReference
   -> Maybe V1ObjectReference
   -> Maybe Text
   -> Maybe Text
   -> Maybe EventsV1EventSeries
   -> Maybe Text
   -> EventsV1Event)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectReference
      -> Maybe V1ObjectReference
      -> Maybe Text
      -> Maybe Text
      -> Maybe EventsV1EventSeries
      -> Maybe Text
      -> EventsV1Event)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reason")
      Parser
  (Maybe V1ObjectReference
   -> Maybe V1ObjectReference
   -> Maybe Text
   -> Maybe Text
   -> Maybe EventsV1EventSeries
   -> Maybe Text
   -> EventsV1Event)
-> Parser (Maybe V1ObjectReference)
-> Parser
     (Maybe V1ObjectReference
      -> Maybe Text
      -> Maybe Text
      -> Maybe EventsV1EventSeries
      -> Maybe Text
      -> EventsV1Event)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectReference)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"regarding")
      Parser
  (Maybe V1ObjectReference
   -> Maybe Text
   -> Maybe Text
   -> Maybe EventsV1EventSeries
   -> Maybe Text
   -> EventsV1Event)
-> Parser (Maybe V1ObjectReference)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe EventsV1EventSeries
      -> Maybe Text
      -> EventsV1Event)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectReference)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"related")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe EventsV1EventSeries
   -> Maybe Text
   -> EventsV1Event)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe EventsV1EventSeries -> Maybe Text -> EventsV1Event)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reportingController")
      Parser
  (Maybe Text
   -> Maybe EventsV1EventSeries -> Maybe Text -> EventsV1Event)
-> Parser (Maybe Text)
-> Parser
     (Maybe EventsV1EventSeries -> Maybe Text -> EventsV1Event)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reportingInstance")
      Parser (Maybe EventsV1EventSeries -> Maybe Text -> EventsV1Event)
-> Parser (Maybe EventsV1EventSeries)
-> Parser (Maybe Text -> EventsV1Event)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe EventsV1EventSeries)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"series")
      Parser (Maybe Text -> EventsV1Event)
-> Parser (Maybe Text) -> Parser EventsV1Event
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"type")

-- | ToJSON EventsV1Event
instance A.ToJSON EventsV1Event where
  toJSON :: EventsV1Event -> Value
toJSON EventsV1Event {Maybe Int
Maybe Text
Maybe DateTime
Maybe V1ObjectReference
Maybe V1ObjectMeta
Maybe V1EventSource
Maybe EventsV1EventSeries
DateTime
$sel:eventsV1EventAction:EventsV1Event :: EventsV1Event -> Maybe Text
$sel:eventsV1EventApiVersion:EventsV1Event :: EventsV1Event -> Maybe Text
$sel:eventsV1EventDeprecatedCount:EventsV1Event :: EventsV1Event -> Maybe Int
$sel:eventsV1EventDeprecatedFirstTimestamp:EventsV1Event :: EventsV1Event -> Maybe DateTime
$sel:eventsV1EventDeprecatedLastTimestamp:EventsV1Event :: EventsV1Event -> Maybe DateTime
$sel:eventsV1EventDeprecatedSource:EventsV1Event :: EventsV1Event -> Maybe V1EventSource
$sel:eventsV1EventEventTime:EventsV1Event :: EventsV1Event -> DateTime
$sel:eventsV1EventKind:EventsV1Event :: EventsV1Event -> Maybe Text
$sel:eventsV1EventMetadata:EventsV1Event :: EventsV1Event -> Maybe V1ObjectMeta
$sel:eventsV1EventNote:EventsV1Event :: EventsV1Event -> Maybe Text
$sel:eventsV1EventReason:EventsV1Event :: EventsV1Event -> Maybe Text
$sel:eventsV1EventRegarding:EventsV1Event :: EventsV1Event -> Maybe V1ObjectReference
$sel:eventsV1EventRelated:EventsV1Event :: EventsV1Event -> Maybe V1ObjectReference
$sel:eventsV1EventReportingController:EventsV1Event :: EventsV1Event -> Maybe Text
$sel:eventsV1EventReportingInstance:EventsV1Event :: EventsV1Event -> Maybe Text
$sel:eventsV1EventSeries:EventsV1Event :: EventsV1Event -> Maybe EventsV1EventSeries
$sel:eventsV1EventType:EventsV1Event :: EventsV1Event -> Maybe Text
eventsV1EventAction :: Maybe Text
eventsV1EventApiVersion :: Maybe Text
eventsV1EventDeprecatedCount :: Maybe Int
eventsV1EventDeprecatedFirstTimestamp :: Maybe DateTime
eventsV1EventDeprecatedLastTimestamp :: Maybe DateTime
eventsV1EventDeprecatedSource :: Maybe V1EventSource
eventsV1EventEventTime :: DateTime
eventsV1EventKind :: Maybe Text
eventsV1EventMetadata :: Maybe V1ObjectMeta
eventsV1EventNote :: Maybe Text
eventsV1EventReason :: Maybe Text
eventsV1EventRegarding :: Maybe V1ObjectReference
eventsV1EventRelated :: Maybe V1ObjectReference
eventsV1EventReportingController :: Maybe Text
eventsV1EventReportingInstance :: Maybe Text
eventsV1EventSeries :: Maybe EventsV1EventSeries
eventsV1EventType :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"action" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
eventsV1EventAction
      , Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
eventsV1EventApiVersion
      , Key
"deprecatedCount" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
eventsV1EventDeprecatedCount
      , Key
"deprecatedFirstTimestamp" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
eventsV1EventDeprecatedFirstTimestamp
      , Key
"deprecatedLastTimestamp" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
eventsV1EventDeprecatedLastTimestamp
      , Key
"deprecatedSource" Key -> Maybe V1EventSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1EventSource
eventsV1EventDeprecatedSource
      , Key
"eventTime" Key -> DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= DateTime
eventsV1EventEventTime
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
eventsV1EventKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
eventsV1EventMetadata
      , Key
"note" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
eventsV1EventNote
      , Key
"reason" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
eventsV1EventReason
      , Key
"regarding" Key -> Maybe V1ObjectReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectReference
eventsV1EventRegarding
      , Key
"related" Key -> Maybe V1ObjectReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectReference
eventsV1EventRelated
      , Key
"reportingController" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
eventsV1EventReportingController
      , Key
"reportingInstance" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
eventsV1EventReportingInstance
      , Key
"series" Key -> Maybe EventsV1EventSeries -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe EventsV1EventSeries
eventsV1EventSeries
      , Key
"type" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
eventsV1EventType
      ]


-- | Construct a value of type 'EventsV1Event' (by applying it's required fields, if any)
mkEventsV1Event
  :: DateTime -- ^ 'eventsV1EventEventTime': eventTime is the time when this Event was first observed. It is required.
  -> EventsV1Event
mkEventsV1Event :: DateTime -> EventsV1Event
mkEventsV1Event DateTime
eventsV1EventEventTime =
  EventsV1Event
  { $sel:eventsV1EventAction:EventsV1Event :: Maybe Text
eventsV1EventAction = Maybe Text
forall a. Maybe a
Nothing
  , $sel:eventsV1EventApiVersion:EventsV1Event :: Maybe Text
eventsV1EventApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:eventsV1EventDeprecatedCount:EventsV1Event :: Maybe Int
eventsV1EventDeprecatedCount = Maybe Int
forall a. Maybe a
Nothing
  , $sel:eventsV1EventDeprecatedFirstTimestamp:EventsV1Event :: Maybe DateTime
eventsV1EventDeprecatedFirstTimestamp = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:eventsV1EventDeprecatedLastTimestamp:EventsV1Event :: Maybe DateTime
eventsV1EventDeprecatedLastTimestamp = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:eventsV1EventDeprecatedSource:EventsV1Event :: Maybe V1EventSource
eventsV1EventDeprecatedSource = Maybe V1EventSource
forall a. Maybe a
Nothing
  , DateTime
$sel:eventsV1EventEventTime:EventsV1Event :: DateTime
eventsV1EventEventTime :: DateTime
eventsV1EventEventTime
  , $sel:eventsV1EventKind:EventsV1Event :: Maybe Text
eventsV1EventKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:eventsV1EventMetadata:EventsV1Event :: Maybe V1ObjectMeta
eventsV1EventMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:eventsV1EventNote:EventsV1Event :: Maybe Text
eventsV1EventNote = Maybe Text
forall a. Maybe a
Nothing
  , $sel:eventsV1EventReason:EventsV1Event :: Maybe Text
eventsV1EventReason = Maybe Text
forall a. Maybe a
Nothing
  , $sel:eventsV1EventRegarding:EventsV1Event :: Maybe V1ObjectReference
eventsV1EventRegarding = Maybe V1ObjectReference
forall a. Maybe a
Nothing
  , $sel:eventsV1EventRelated:EventsV1Event :: Maybe V1ObjectReference
eventsV1EventRelated = Maybe V1ObjectReference
forall a. Maybe a
Nothing
  , $sel:eventsV1EventReportingController:EventsV1Event :: Maybe Text
eventsV1EventReportingController = Maybe Text
forall a. Maybe a
Nothing
  , $sel:eventsV1EventReportingInstance:EventsV1Event :: Maybe Text
eventsV1EventReportingInstance = Maybe Text
forall a. Maybe a
Nothing
  , $sel:eventsV1EventSeries:EventsV1Event :: Maybe EventsV1EventSeries
eventsV1EventSeries = Maybe EventsV1EventSeries
forall a. Maybe a
Nothing
  , $sel:eventsV1EventType:EventsV1Event :: Maybe Text
eventsV1EventType = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** EventsV1EventList
-- | EventsV1EventList
-- EventList is a list of Event objects.
data EventsV1EventList = EventsV1EventList
  { EventsV1EventList -> Maybe Text
eventsV1EventListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , EventsV1EventList -> [EventsV1Event]
eventsV1EventListItems :: !([EventsV1Event]) -- ^ /Required/ "items" - items is a list of schema objects.
  , EventsV1EventList -> Maybe Text
eventsV1EventListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , EventsV1EventList -> Maybe V1ListMeta
eventsV1EventListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> EventsV1EventList -> ShowS
[EventsV1EventList] -> ShowS
EventsV1EventList -> String
(Int -> EventsV1EventList -> ShowS)
-> (EventsV1EventList -> String)
-> ([EventsV1EventList] -> ShowS)
-> Show EventsV1EventList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EventsV1EventList -> ShowS
showsPrec :: Int -> EventsV1EventList -> ShowS
$cshow :: EventsV1EventList -> String
show :: EventsV1EventList -> String
$cshowList :: [EventsV1EventList] -> ShowS
showList :: [EventsV1EventList] -> ShowS
P.Show, EventsV1EventList -> EventsV1EventList -> Bool
(EventsV1EventList -> EventsV1EventList -> Bool)
-> (EventsV1EventList -> EventsV1EventList -> Bool)
-> Eq EventsV1EventList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EventsV1EventList -> EventsV1EventList -> Bool
== :: EventsV1EventList -> EventsV1EventList -> Bool
$c/= :: EventsV1EventList -> EventsV1EventList -> Bool
/= :: EventsV1EventList -> EventsV1EventList -> Bool
P.Eq, P.Typeable)

-- | FromJSON EventsV1EventList
instance A.FromJSON EventsV1EventList where
  parseJSON :: Value -> Parser EventsV1EventList
parseJSON = String
-> (Object -> Parser EventsV1EventList)
-> Value
-> Parser EventsV1EventList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"EventsV1EventList" ((Object -> Parser EventsV1EventList)
 -> Value -> Parser EventsV1EventList)
-> (Object -> Parser EventsV1EventList)
-> Value
-> Parser EventsV1EventList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [EventsV1Event]
-> Maybe Text
-> Maybe V1ListMeta
-> EventsV1EventList
EventsV1EventList
      (Maybe Text
 -> [EventsV1Event]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> EventsV1EventList)
-> Parser (Maybe Text)
-> Parser
     ([EventsV1Event]
      -> Maybe Text -> Maybe V1ListMeta -> EventsV1EventList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([EventsV1Event]
   -> Maybe Text -> Maybe V1ListMeta -> EventsV1EventList)
-> Parser [EventsV1Event]
-> Parser (Maybe Text -> Maybe V1ListMeta -> EventsV1EventList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [EventsV1Event]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> EventsV1EventList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> EventsV1EventList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> EventsV1EventList)
-> Parser (Maybe V1ListMeta) -> Parser EventsV1EventList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON EventsV1EventList
instance A.ToJSON EventsV1EventList where
  toJSON :: EventsV1EventList -> Value
toJSON EventsV1EventList {[EventsV1Event]
Maybe Text
Maybe V1ListMeta
$sel:eventsV1EventListApiVersion:EventsV1EventList :: EventsV1EventList -> Maybe Text
$sel:eventsV1EventListItems:EventsV1EventList :: EventsV1EventList -> [EventsV1Event]
$sel:eventsV1EventListKind:EventsV1EventList :: EventsV1EventList -> Maybe Text
$sel:eventsV1EventListMetadata:EventsV1EventList :: EventsV1EventList -> Maybe V1ListMeta
eventsV1EventListApiVersion :: Maybe Text
eventsV1EventListItems :: [EventsV1Event]
eventsV1EventListKind :: Maybe Text
eventsV1EventListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
eventsV1EventListApiVersion
      , Key
"items" Key -> [EventsV1Event] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [EventsV1Event]
eventsV1EventListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
eventsV1EventListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
eventsV1EventListMetadata
      ]


-- | Construct a value of type 'EventsV1EventList' (by applying it's required fields, if any)
mkEventsV1EventList
  :: [EventsV1Event] -- ^ 'eventsV1EventListItems': items is a list of schema objects.
  -> EventsV1EventList
mkEventsV1EventList :: [EventsV1Event] -> EventsV1EventList
mkEventsV1EventList [EventsV1Event]
eventsV1EventListItems =
  EventsV1EventList
  { $sel:eventsV1EventListApiVersion:EventsV1EventList :: Maybe Text
eventsV1EventListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [EventsV1Event]
$sel:eventsV1EventListItems:EventsV1EventList :: [EventsV1Event]
eventsV1EventListItems :: [EventsV1Event]
eventsV1EventListItems
  , $sel:eventsV1EventListKind:EventsV1EventList :: Maybe Text
eventsV1EventListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:eventsV1EventListMetadata:EventsV1EventList :: Maybe V1ListMeta
eventsV1EventListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** EventsV1EventSeries
-- | EventsV1EventSeries
-- EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time. How often to update the EventSeries is up to the event reporters. The default event reporter in \"k8s.io/client-go/tools/events/event_broadcaster.go\" shows how this struct is updated on heartbeats and can guide customized reporter implementations.
data EventsV1EventSeries = EventsV1EventSeries
  { EventsV1EventSeries -> Int
eventsV1EventSeriesCount :: !(Int) -- ^ /Required/ "count" - count is the number of occurrences in this series up to the last heartbeat time.
  , EventsV1EventSeries -> DateTime
eventsV1EventSeriesLastObservedTime :: !(DateTime) -- ^ /Required/ "lastObservedTime" - lastObservedTime is the time when last Event from the series was seen before last heartbeat.
  } deriving (Int -> EventsV1EventSeries -> ShowS
[EventsV1EventSeries] -> ShowS
EventsV1EventSeries -> String
(Int -> EventsV1EventSeries -> ShowS)
-> (EventsV1EventSeries -> String)
-> ([EventsV1EventSeries] -> ShowS)
-> Show EventsV1EventSeries
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EventsV1EventSeries -> ShowS
showsPrec :: Int -> EventsV1EventSeries -> ShowS
$cshow :: EventsV1EventSeries -> String
show :: EventsV1EventSeries -> String
$cshowList :: [EventsV1EventSeries] -> ShowS
showList :: [EventsV1EventSeries] -> ShowS
P.Show, EventsV1EventSeries -> EventsV1EventSeries -> Bool
(EventsV1EventSeries -> EventsV1EventSeries -> Bool)
-> (EventsV1EventSeries -> EventsV1EventSeries -> Bool)
-> Eq EventsV1EventSeries
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EventsV1EventSeries -> EventsV1EventSeries -> Bool
== :: EventsV1EventSeries -> EventsV1EventSeries -> Bool
$c/= :: EventsV1EventSeries -> EventsV1EventSeries -> Bool
/= :: EventsV1EventSeries -> EventsV1EventSeries -> Bool
P.Eq, P.Typeable)

-- | FromJSON EventsV1EventSeries
instance A.FromJSON EventsV1EventSeries where
  parseJSON :: Value -> Parser EventsV1EventSeries
parseJSON = String
-> (Object -> Parser EventsV1EventSeries)
-> Value
-> Parser EventsV1EventSeries
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"EventsV1EventSeries" ((Object -> Parser EventsV1EventSeries)
 -> Value -> Parser EventsV1EventSeries)
-> (Object -> Parser EventsV1EventSeries)
-> Value
-> Parser EventsV1EventSeries
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Int -> DateTime -> EventsV1EventSeries
EventsV1EventSeries
      (Int -> DateTime -> EventsV1EventSeries)
-> Parser Int -> Parser (DateTime -> EventsV1EventSeries)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"count")
      Parser (DateTime -> EventsV1EventSeries)
-> Parser DateTime -> Parser EventsV1EventSeries
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser DateTime
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"lastObservedTime")

-- | ToJSON EventsV1EventSeries
instance A.ToJSON EventsV1EventSeries where
  toJSON :: EventsV1EventSeries -> Value
toJSON EventsV1EventSeries {Int
DateTime
$sel:eventsV1EventSeriesCount:EventsV1EventSeries :: EventsV1EventSeries -> Int
$sel:eventsV1EventSeriesLastObservedTime:EventsV1EventSeries :: EventsV1EventSeries -> DateTime
eventsV1EventSeriesCount :: Int
eventsV1EventSeriesLastObservedTime :: DateTime
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"count" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
eventsV1EventSeriesCount
      , Key
"lastObservedTime" Key -> DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= DateTime
eventsV1EventSeriesLastObservedTime
      ]


-- | Construct a value of type 'EventsV1EventSeries' (by applying it's required fields, if any)
mkEventsV1EventSeries
  :: Int -- ^ 'eventsV1EventSeriesCount': count is the number of occurrences in this series up to the last heartbeat time.
  -> DateTime -- ^ 'eventsV1EventSeriesLastObservedTime': lastObservedTime is the time when last Event from the series was seen before last heartbeat.
  -> EventsV1EventSeries
mkEventsV1EventSeries :: Int -> DateTime -> EventsV1EventSeries
mkEventsV1EventSeries Int
eventsV1EventSeriesCount DateTime
eventsV1EventSeriesLastObservedTime =
  EventsV1EventSeries
  { Int
$sel:eventsV1EventSeriesCount:EventsV1EventSeries :: Int
eventsV1EventSeriesCount :: Int
eventsV1EventSeriesCount
  , DateTime
$sel:eventsV1EventSeriesLastObservedTime:EventsV1EventSeries :: DateTime
eventsV1EventSeriesLastObservedTime :: DateTime
eventsV1EventSeriesLastObservedTime
  }

-- ** FlowcontrolV1Subject
-- | FlowcontrolV1Subject
-- Subject matches the originator of a request, as identified by the request authentication system. There are three ways of matching an originator; by user, group, or service account.
data FlowcontrolV1Subject = FlowcontrolV1Subject
  { FlowcontrolV1Subject -> Maybe V1GroupSubject
flowcontrolV1SubjectGroup :: !(Maybe V1GroupSubject) -- ^ "group"
  , FlowcontrolV1Subject -> Text
flowcontrolV1SubjectKind :: !(Text) -- ^ /Required/ "kind" - &#x60;kind&#x60; indicates which one of the other fields is non-empty. Required
  , FlowcontrolV1Subject -> Maybe V1ServiceAccountSubject
flowcontrolV1SubjectServiceAccount :: !(Maybe V1ServiceAccountSubject) -- ^ "serviceAccount"
  , FlowcontrolV1Subject -> Maybe V1UserSubject
flowcontrolV1SubjectUser :: !(Maybe V1UserSubject) -- ^ "user"
  } deriving (Int -> FlowcontrolV1Subject -> ShowS
[FlowcontrolV1Subject] -> ShowS
FlowcontrolV1Subject -> String
(Int -> FlowcontrolV1Subject -> ShowS)
-> (FlowcontrolV1Subject -> String)
-> ([FlowcontrolV1Subject] -> ShowS)
-> Show FlowcontrolV1Subject
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FlowcontrolV1Subject -> ShowS
showsPrec :: Int -> FlowcontrolV1Subject -> ShowS
$cshow :: FlowcontrolV1Subject -> String
show :: FlowcontrolV1Subject -> String
$cshowList :: [FlowcontrolV1Subject] -> ShowS
showList :: [FlowcontrolV1Subject] -> ShowS
P.Show, FlowcontrolV1Subject -> FlowcontrolV1Subject -> Bool
(FlowcontrolV1Subject -> FlowcontrolV1Subject -> Bool)
-> (FlowcontrolV1Subject -> FlowcontrolV1Subject -> Bool)
-> Eq FlowcontrolV1Subject
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FlowcontrolV1Subject -> FlowcontrolV1Subject -> Bool
== :: FlowcontrolV1Subject -> FlowcontrolV1Subject -> Bool
$c/= :: FlowcontrolV1Subject -> FlowcontrolV1Subject -> Bool
/= :: FlowcontrolV1Subject -> FlowcontrolV1Subject -> Bool
P.Eq, P.Typeable)

-- | FromJSON FlowcontrolV1Subject
instance A.FromJSON FlowcontrolV1Subject where
  parseJSON :: Value -> Parser FlowcontrolV1Subject
parseJSON = String
-> (Object -> Parser FlowcontrolV1Subject)
-> Value
-> Parser FlowcontrolV1Subject
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"FlowcontrolV1Subject" ((Object -> Parser FlowcontrolV1Subject)
 -> Value -> Parser FlowcontrolV1Subject)
-> (Object -> Parser FlowcontrolV1Subject)
-> Value
-> Parser FlowcontrolV1Subject
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1GroupSubject
-> Text
-> Maybe V1ServiceAccountSubject
-> Maybe V1UserSubject
-> FlowcontrolV1Subject
FlowcontrolV1Subject
      (Maybe V1GroupSubject
 -> Text
 -> Maybe V1ServiceAccountSubject
 -> Maybe V1UserSubject
 -> FlowcontrolV1Subject)
-> Parser (Maybe V1GroupSubject)
-> Parser
     (Text
      -> Maybe V1ServiceAccountSubject
      -> Maybe V1UserSubject
      -> FlowcontrolV1Subject)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1GroupSubject)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"group")
      Parser
  (Text
   -> Maybe V1ServiceAccountSubject
   -> Maybe V1UserSubject
   -> FlowcontrolV1Subject)
-> Parser Text
-> Parser
     (Maybe V1ServiceAccountSubject
      -> Maybe V1UserSubject -> FlowcontrolV1Subject)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"kind")
      Parser
  (Maybe V1ServiceAccountSubject
   -> Maybe V1UserSubject -> FlowcontrolV1Subject)
-> Parser (Maybe V1ServiceAccountSubject)
-> Parser (Maybe V1UserSubject -> FlowcontrolV1Subject)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ServiceAccountSubject)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"serviceAccount")
      Parser (Maybe V1UserSubject -> FlowcontrolV1Subject)
-> Parser (Maybe V1UserSubject) -> Parser FlowcontrolV1Subject
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1UserSubject)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"user")

-- | ToJSON FlowcontrolV1Subject
instance A.ToJSON FlowcontrolV1Subject where
  toJSON :: FlowcontrolV1Subject -> Value
toJSON FlowcontrolV1Subject {Maybe V1UserSubject
Maybe V1ServiceAccountSubject
Maybe V1GroupSubject
Text
$sel:flowcontrolV1SubjectGroup:FlowcontrolV1Subject :: FlowcontrolV1Subject -> Maybe V1GroupSubject
$sel:flowcontrolV1SubjectKind:FlowcontrolV1Subject :: FlowcontrolV1Subject -> Text
$sel:flowcontrolV1SubjectServiceAccount:FlowcontrolV1Subject :: FlowcontrolV1Subject -> Maybe V1ServiceAccountSubject
$sel:flowcontrolV1SubjectUser:FlowcontrolV1Subject :: FlowcontrolV1Subject -> Maybe V1UserSubject
flowcontrolV1SubjectGroup :: Maybe V1GroupSubject
flowcontrolV1SubjectKind :: Text
flowcontrolV1SubjectServiceAccount :: Maybe V1ServiceAccountSubject
flowcontrolV1SubjectUser :: Maybe V1UserSubject
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"group" Key -> Maybe V1GroupSubject -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1GroupSubject
flowcontrolV1SubjectGroup
      , Key
"kind" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
flowcontrolV1SubjectKind
      , Key
"serviceAccount" Key -> Maybe V1ServiceAccountSubject -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ServiceAccountSubject
flowcontrolV1SubjectServiceAccount
      , Key
"user" Key -> Maybe V1UserSubject -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1UserSubject
flowcontrolV1SubjectUser
      ]


-- | Construct a value of type 'FlowcontrolV1Subject' (by applying it's required fields, if any)
mkFlowcontrolV1Subject
  :: Text -- ^ 'flowcontrolV1SubjectKind': `kind` indicates which one of the other fields is non-empty. Required
  -> FlowcontrolV1Subject
mkFlowcontrolV1Subject :: Text -> FlowcontrolV1Subject
mkFlowcontrolV1Subject Text
flowcontrolV1SubjectKind =
  FlowcontrolV1Subject
  { $sel:flowcontrolV1SubjectGroup:FlowcontrolV1Subject :: Maybe V1GroupSubject
flowcontrolV1SubjectGroup = Maybe V1GroupSubject
forall a. Maybe a
Nothing
  , Text
$sel:flowcontrolV1SubjectKind:FlowcontrolV1Subject :: Text
flowcontrolV1SubjectKind :: Text
flowcontrolV1SubjectKind
  , $sel:flowcontrolV1SubjectServiceAccount:FlowcontrolV1Subject :: Maybe V1ServiceAccountSubject
flowcontrolV1SubjectServiceAccount = Maybe V1ServiceAccountSubject
forall a. Maybe a
Nothing
  , $sel:flowcontrolV1SubjectUser:FlowcontrolV1Subject :: Maybe V1UserSubject
flowcontrolV1SubjectUser = Maybe V1UserSubject
forall a. Maybe a
Nothing
  }

-- ** RbacV1Subject
-- | RbacV1Subject
-- Subject contains a reference to the object or user identities a role binding applies to.  This can either hold a direct API object reference, or a value for non-objects such as user and group names.
data RbacV1Subject = RbacV1Subject
  { RbacV1Subject -> Maybe Text
rbacV1SubjectApiGroup :: !(Maybe Text) -- ^ "apiGroup" - APIGroup holds the API group of the referenced subject. Defaults to \&quot;\&quot; for ServiceAccount subjects. Defaults to \&quot;rbac.authorization.k8s.io\&quot; for User and Group subjects.
  , RbacV1Subject -> Text
rbacV1SubjectKind :: !(Text) -- ^ /Required/ "kind" - Kind of object being referenced. Values defined by this API group are \&quot;User\&quot;, \&quot;Group\&quot;, and \&quot;ServiceAccount\&quot;. If the Authorizer does not recognized the kind value, the Authorizer should report an error.
  , RbacV1Subject -> Text
rbacV1SubjectName :: !(Text) -- ^ /Required/ "name" - Name of the object being referenced.
  , RbacV1Subject -> Maybe Text
rbacV1SubjectNamespace :: !(Maybe Text) -- ^ "namespace" - Namespace of the referenced object.  If the object kind is non-namespace, such as \&quot;User\&quot; or \&quot;Group\&quot;, and this value is not empty the Authorizer should report an error.
  } deriving (Int -> RbacV1Subject -> ShowS
[RbacV1Subject] -> ShowS
RbacV1Subject -> String
(Int -> RbacV1Subject -> ShowS)
-> (RbacV1Subject -> String)
-> ([RbacV1Subject] -> ShowS)
-> Show RbacV1Subject
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RbacV1Subject -> ShowS
showsPrec :: Int -> RbacV1Subject -> ShowS
$cshow :: RbacV1Subject -> String
show :: RbacV1Subject -> String
$cshowList :: [RbacV1Subject] -> ShowS
showList :: [RbacV1Subject] -> ShowS
P.Show, RbacV1Subject -> RbacV1Subject -> Bool
(RbacV1Subject -> RbacV1Subject -> Bool)
-> (RbacV1Subject -> RbacV1Subject -> Bool) -> Eq RbacV1Subject
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RbacV1Subject -> RbacV1Subject -> Bool
== :: RbacV1Subject -> RbacV1Subject -> Bool
$c/= :: RbacV1Subject -> RbacV1Subject -> Bool
/= :: RbacV1Subject -> RbacV1Subject -> Bool
P.Eq, P.Typeable)

-- | FromJSON RbacV1Subject
instance A.FromJSON RbacV1Subject where
  parseJSON :: Value -> Parser RbacV1Subject
parseJSON = String
-> (Object -> Parser RbacV1Subject)
-> Value
-> Parser RbacV1Subject
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"RbacV1Subject" ((Object -> Parser RbacV1Subject) -> Value -> Parser RbacV1Subject)
-> (Object -> Parser RbacV1Subject)
-> Value
-> Parser RbacV1Subject
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Text -> Text -> Maybe Text -> RbacV1Subject
RbacV1Subject
      (Maybe Text -> Text -> Text -> Maybe Text -> RbacV1Subject)
-> Parser (Maybe Text)
-> Parser (Text -> Text -> Maybe Text -> RbacV1Subject)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiGroup")
      Parser (Text -> Text -> Maybe Text -> RbacV1Subject)
-> Parser Text -> Parser (Text -> Maybe Text -> RbacV1Subject)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"kind")
      Parser (Text -> Maybe Text -> RbacV1Subject)
-> Parser Text -> Parser (Maybe Text -> RbacV1Subject)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser (Maybe Text -> RbacV1Subject)
-> Parser (Maybe Text) -> Parser RbacV1Subject
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"namespace")

-- | ToJSON RbacV1Subject
instance A.ToJSON RbacV1Subject where
  toJSON :: RbacV1Subject -> Value
toJSON RbacV1Subject {Maybe Text
Text
$sel:rbacV1SubjectApiGroup:RbacV1Subject :: RbacV1Subject -> Maybe Text
$sel:rbacV1SubjectKind:RbacV1Subject :: RbacV1Subject -> Text
$sel:rbacV1SubjectName:RbacV1Subject :: RbacV1Subject -> Text
$sel:rbacV1SubjectNamespace:RbacV1Subject :: RbacV1Subject -> Maybe Text
rbacV1SubjectApiGroup :: Maybe Text
rbacV1SubjectKind :: Text
rbacV1SubjectName :: Text
rbacV1SubjectNamespace :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiGroup" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
rbacV1SubjectApiGroup
      , Key
"kind" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
rbacV1SubjectKind
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
rbacV1SubjectName
      , Key
"namespace" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
rbacV1SubjectNamespace
      ]


-- | Construct a value of type 'RbacV1Subject' (by applying it's required fields, if any)
mkRbacV1Subject
  :: Text -- ^ 'rbacV1SubjectKind': Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.
  -> Text -- ^ 'rbacV1SubjectName': Name of the object being referenced.
  -> RbacV1Subject
mkRbacV1Subject :: Text -> Text -> RbacV1Subject
mkRbacV1Subject Text
rbacV1SubjectKind Text
rbacV1SubjectName =
  RbacV1Subject
  { $sel:rbacV1SubjectApiGroup:RbacV1Subject :: Maybe Text
rbacV1SubjectApiGroup = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:rbacV1SubjectKind:RbacV1Subject :: Text
rbacV1SubjectKind :: Text
rbacV1SubjectKind
  , Text
$sel:rbacV1SubjectName:RbacV1Subject :: Text
rbacV1SubjectName :: Text
rbacV1SubjectName
  , $sel:rbacV1SubjectNamespace:RbacV1Subject :: Maybe Text
rbacV1SubjectNamespace = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** StorageV1TokenRequest
-- | StorageV1TokenRequest
-- TokenRequest contains parameters of a service account token.
data StorageV1TokenRequest = StorageV1TokenRequest
  { StorageV1TokenRequest -> Text
storageV1TokenRequestAudience :: !(Text) -- ^ /Required/ "audience" - audience is the intended audience of the token in \&quot;TokenRequestSpec\&quot;. It will default to the audiences of kube apiserver.
  , StorageV1TokenRequest -> Maybe Integer
storageV1TokenRequestExpirationSeconds :: !(Maybe Integer) -- ^ "expirationSeconds" - expirationSeconds is the duration of validity of the token in \&quot;TokenRequestSpec\&quot;. It has the same default value of \&quot;ExpirationSeconds\&quot; in \&quot;TokenRequestSpec\&quot;.
  } deriving (Int -> StorageV1TokenRequest -> ShowS
[StorageV1TokenRequest] -> ShowS
StorageV1TokenRequest -> String
(Int -> StorageV1TokenRequest -> ShowS)
-> (StorageV1TokenRequest -> String)
-> ([StorageV1TokenRequest] -> ShowS)
-> Show StorageV1TokenRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> StorageV1TokenRequest -> ShowS
showsPrec :: Int -> StorageV1TokenRequest -> ShowS
$cshow :: StorageV1TokenRequest -> String
show :: StorageV1TokenRequest -> String
$cshowList :: [StorageV1TokenRequest] -> ShowS
showList :: [StorageV1TokenRequest] -> ShowS
P.Show, StorageV1TokenRequest -> StorageV1TokenRequest -> Bool
(StorageV1TokenRequest -> StorageV1TokenRequest -> Bool)
-> (StorageV1TokenRequest -> StorageV1TokenRequest -> Bool)
-> Eq StorageV1TokenRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: StorageV1TokenRequest -> StorageV1TokenRequest -> Bool
== :: StorageV1TokenRequest -> StorageV1TokenRequest -> Bool
$c/= :: StorageV1TokenRequest -> StorageV1TokenRequest -> Bool
/= :: StorageV1TokenRequest -> StorageV1TokenRequest -> Bool
P.Eq, P.Typeable)

-- | FromJSON StorageV1TokenRequest
instance A.FromJSON StorageV1TokenRequest where
  parseJSON :: Value -> Parser StorageV1TokenRequest
parseJSON = String
-> (Object -> Parser StorageV1TokenRequest)
-> Value
-> Parser StorageV1TokenRequest
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"StorageV1TokenRequest" ((Object -> Parser StorageV1TokenRequest)
 -> Value -> Parser StorageV1TokenRequest)
-> (Object -> Parser StorageV1TokenRequest)
-> Value
-> Parser StorageV1TokenRequest
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Maybe Integer -> StorageV1TokenRequest
StorageV1TokenRequest
      (Text -> Maybe Integer -> StorageV1TokenRequest)
-> Parser Text -> Parser (Maybe Integer -> StorageV1TokenRequest)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"audience")
      Parser (Maybe Integer -> StorageV1TokenRequest)
-> Parser (Maybe Integer) -> Parser StorageV1TokenRequest
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"expirationSeconds")

-- | ToJSON StorageV1TokenRequest
instance A.ToJSON StorageV1TokenRequest where
  toJSON :: StorageV1TokenRequest -> Value
toJSON StorageV1TokenRequest {Maybe Integer
Text
$sel:storageV1TokenRequestAudience:StorageV1TokenRequest :: StorageV1TokenRequest -> Text
$sel:storageV1TokenRequestExpirationSeconds:StorageV1TokenRequest :: StorageV1TokenRequest -> Maybe Integer
storageV1TokenRequestAudience :: Text
storageV1TokenRequestExpirationSeconds :: Maybe Integer
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"audience" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
storageV1TokenRequestAudience
      , Key
"expirationSeconds" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
storageV1TokenRequestExpirationSeconds
      ]


-- | Construct a value of type 'StorageV1TokenRequest' (by applying it's required fields, if any)
mkStorageV1TokenRequest
  :: Text -- ^ 'storageV1TokenRequestAudience': audience is the intended audience of the token in \"TokenRequestSpec\". It will default to the audiences of kube apiserver.
  -> StorageV1TokenRequest
mkStorageV1TokenRequest :: Text -> StorageV1TokenRequest
mkStorageV1TokenRequest Text
storageV1TokenRequestAudience =
  StorageV1TokenRequest
  { Text
$sel:storageV1TokenRequestAudience:StorageV1TokenRequest :: Text
storageV1TokenRequestAudience :: Text
storageV1TokenRequestAudience
  , $sel:storageV1TokenRequestExpirationSeconds:StorageV1TokenRequest :: Maybe Integer
storageV1TokenRequestExpirationSeconds = Maybe Integer
forall a. Maybe a
Nothing
  }

-- ** V1APIGroup
-- | V1APIGroup
-- APIGroup contains the name, the supported versions, and the preferred version of a group.
data V1APIGroup = V1APIGroup
  { V1APIGroup -> Maybe Text
v1APIGroupApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1APIGroup -> Maybe Text
v1APIGroupKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1APIGroup -> Text
v1APIGroupName :: !(Text) -- ^ /Required/ "name" - name is the name of the group.
  , V1APIGroup -> Maybe V1GroupVersionForDiscovery
v1APIGroupPreferredVersion :: !(Maybe V1GroupVersionForDiscovery) -- ^ "preferredVersion"
  , V1APIGroup -> Maybe [V1ServerAddressByClientCIDR]
v1APIGroupServerAddressByClientCidrs :: !(Maybe [V1ServerAddressByClientCIDR]) -- ^ "serverAddressByClientCIDRs" - a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.
  , V1APIGroup -> [V1GroupVersionForDiscovery]
v1APIGroupVersions :: !([V1GroupVersionForDiscovery]) -- ^ /Required/ "versions" - versions are the versions supported in this group.
  } deriving (Int -> V1APIGroup -> ShowS
[V1APIGroup] -> ShowS
V1APIGroup -> String
(Int -> V1APIGroup -> ShowS)
-> (V1APIGroup -> String)
-> ([V1APIGroup] -> ShowS)
-> Show V1APIGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1APIGroup -> ShowS
showsPrec :: Int -> V1APIGroup -> ShowS
$cshow :: V1APIGroup -> String
show :: V1APIGroup -> String
$cshowList :: [V1APIGroup] -> ShowS
showList :: [V1APIGroup] -> ShowS
P.Show, V1APIGroup -> V1APIGroup -> Bool
(V1APIGroup -> V1APIGroup -> Bool)
-> (V1APIGroup -> V1APIGroup -> Bool) -> Eq V1APIGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1APIGroup -> V1APIGroup -> Bool
== :: V1APIGroup -> V1APIGroup -> Bool
$c/= :: V1APIGroup -> V1APIGroup -> Bool
/= :: V1APIGroup -> V1APIGroup -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1APIGroup
instance A.FromJSON V1APIGroup where
  parseJSON :: Value -> Parser V1APIGroup
parseJSON = String
-> (Object -> Parser V1APIGroup) -> Value -> Parser V1APIGroup
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1APIGroup" ((Object -> Parser V1APIGroup) -> Value -> Parser V1APIGroup)
-> (Object -> Parser V1APIGroup) -> Value -> Parser V1APIGroup
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Text
-> Maybe V1GroupVersionForDiscovery
-> Maybe [V1ServerAddressByClientCIDR]
-> [V1GroupVersionForDiscovery]
-> V1APIGroup
V1APIGroup
      (Maybe Text
 -> Maybe Text
 -> Text
 -> Maybe V1GroupVersionForDiscovery
 -> Maybe [V1ServerAddressByClientCIDR]
 -> [V1GroupVersionForDiscovery]
 -> V1APIGroup)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Text
      -> Maybe V1GroupVersionForDiscovery
      -> Maybe [V1ServerAddressByClientCIDR]
      -> [V1GroupVersionForDiscovery]
      -> V1APIGroup)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Text
   -> Maybe V1GroupVersionForDiscovery
   -> Maybe [V1ServerAddressByClientCIDR]
   -> [V1GroupVersionForDiscovery]
   -> V1APIGroup)
-> Parser (Maybe Text)
-> Parser
     (Text
      -> Maybe V1GroupVersionForDiscovery
      -> Maybe [V1ServerAddressByClientCIDR]
      -> [V1GroupVersionForDiscovery]
      -> V1APIGroup)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Text
   -> Maybe V1GroupVersionForDiscovery
   -> Maybe [V1ServerAddressByClientCIDR]
   -> [V1GroupVersionForDiscovery]
   -> V1APIGroup)
-> Parser Text
-> Parser
     (Maybe V1GroupVersionForDiscovery
      -> Maybe [V1ServerAddressByClientCIDR]
      -> [V1GroupVersionForDiscovery]
      -> V1APIGroup)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser
  (Maybe V1GroupVersionForDiscovery
   -> Maybe [V1ServerAddressByClientCIDR]
   -> [V1GroupVersionForDiscovery]
   -> V1APIGroup)
-> Parser (Maybe V1GroupVersionForDiscovery)
-> Parser
     (Maybe [V1ServerAddressByClientCIDR]
      -> [V1GroupVersionForDiscovery] -> V1APIGroup)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1GroupVersionForDiscovery)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"preferredVersion")
      Parser
  (Maybe [V1ServerAddressByClientCIDR]
   -> [V1GroupVersionForDiscovery] -> V1APIGroup)
-> Parser (Maybe [V1ServerAddressByClientCIDR])
-> Parser ([V1GroupVersionForDiscovery] -> V1APIGroup)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1ServerAddressByClientCIDR])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"serverAddressByClientCIDRs")
      Parser ([V1GroupVersionForDiscovery] -> V1APIGroup)
-> Parser [V1GroupVersionForDiscovery] -> Parser V1APIGroup
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1GroupVersionForDiscovery]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"versions")

-- | ToJSON V1APIGroup
instance A.ToJSON V1APIGroup where
  toJSON :: V1APIGroup -> Value
toJSON V1APIGroup {[V1GroupVersionForDiscovery]
Maybe [V1ServerAddressByClientCIDR]
Maybe Text
Maybe V1GroupVersionForDiscovery
Text
$sel:v1APIGroupApiVersion:V1APIGroup :: V1APIGroup -> Maybe Text
$sel:v1APIGroupKind:V1APIGroup :: V1APIGroup -> Maybe Text
$sel:v1APIGroupName:V1APIGroup :: V1APIGroup -> Text
$sel:v1APIGroupPreferredVersion:V1APIGroup :: V1APIGroup -> Maybe V1GroupVersionForDiscovery
$sel:v1APIGroupServerAddressByClientCidrs:V1APIGroup :: V1APIGroup -> Maybe [V1ServerAddressByClientCIDR]
$sel:v1APIGroupVersions:V1APIGroup :: V1APIGroup -> [V1GroupVersionForDiscovery]
v1APIGroupApiVersion :: Maybe Text
v1APIGroupKind :: Maybe Text
v1APIGroupName :: Text
v1APIGroupPreferredVersion :: Maybe V1GroupVersionForDiscovery
v1APIGroupServerAddressByClientCidrs :: Maybe [V1ServerAddressByClientCIDR]
v1APIGroupVersions :: [V1GroupVersionForDiscovery]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1APIGroupApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1APIGroupKind
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1APIGroupName
      , Key
"preferredVersion" Key -> Maybe V1GroupVersionForDiscovery -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1GroupVersionForDiscovery
v1APIGroupPreferredVersion
      , Key
"serverAddressByClientCIDRs" Key -> Maybe [V1ServerAddressByClientCIDR] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1ServerAddressByClientCIDR]
v1APIGroupServerAddressByClientCidrs
      , Key
"versions" Key -> [V1GroupVersionForDiscovery] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1GroupVersionForDiscovery]
v1APIGroupVersions
      ]


-- | Construct a value of type 'V1APIGroup' (by applying it's required fields, if any)
mkV1APIGroup
  :: Text -- ^ 'v1APIGroupName': name is the name of the group.
  -> [V1GroupVersionForDiscovery] -- ^ 'v1APIGroupVersions': versions are the versions supported in this group.
  -> V1APIGroup
mkV1APIGroup :: Text -> [V1GroupVersionForDiscovery] -> V1APIGroup
mkV1APIGroup Text
v1APIGroupName [V1GroupVersionForDiscovery]
v1APIGroupVersions =
  V1APIGroup
  { $sel:v1APIGroupApiVersion:V1APIGroup :: Maybe Text
v1APIGroupApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1APIGroupKind:V1APIGroup :: Maybe Text
v1APIGroupKind = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1APIGroupName:V1APIGroup :: Text
v1APIGroupName :: Text
v1APIGroupName
  , $sel:v1APIGroupPreferredVersion:V1APIGroup :: Maybe V1GroupVersionForDiscovery
v1APIGroupPreferredVersion = Maybe V1GroupVersionForDiscovery
forall a. Maybe a
Nothing
  , $sel:v1APIGroupServerAddressByClientCidrs:V1APIGroup :: Maybe [V1ServerAddressByClientCIDR]
v1APIGroupServerAddressByClientCidrs = Maybe [V1ServerAddressByClientCIDR]
forall a. Maybe a
Nothing
  , [V1GroupVersionForDiscovery]
$sel:v1APIGroupVersions:V1APIGroup :: [V1GroupVersionForDiscovery]
v1APIGroupVersions :: [V1GroupVersionForDiscovery]
v1APIGroupVersions
  }

-- ** V1APIGroupList
-- | V1APIGroupList
-- APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis.
data V1APIGroupList = V1APIGroupList
  { V1APIGroupList -> Maybe Text
v1APIGroupListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1APIGroupList -> [V1APIGroup]
v1APIGroupListGroups :: !([V1APIGroup]) -- ^ /Required/ "groups" - groups is a list of APIGroup.
  , V1APIGroupList -> Maybe Text
v1APIGroupListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  } deriving (Int -> V1APIGroupList -> ShowS
[V1APIGroupList] -> ShowS
V1APIGroupList -> String
(Int -> V1APIGroupList -> ShowS)
-> (V1APIGroupList -> String)
-> ([V1APIGroupList] -> ShowS)
-> Show V1APIGroupList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1APIGroupList -> ShowS
showsPrec :: Int -> V1APIGroupList -> ShowS
$cshow :: V1APIGroupList -> String
show :: V1APIGroupList -> String
$cshowList :: [V1APIGroupList] -> ShowS
showList :: [V1APIGroupList] -> ShowS
P.Show, V1APIGroupList -> V1APIGroupList -> Bool
(V1APIGroupList -> V1APIGroupList -> Bool)
-> (V1APIGroupList -> V1APIGroupList -> Bool) -> Eq V1APIGroupList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1APIGroupList -> V1APIGroupList -> Bool
== :: V1APIGroupList -> V1APIGroupList -> Bool
$c/= :: V1APIGroupList -> V1APIGroupList -> Bool
/= :: V1APIGroupList -> V1APIGroupList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1APIGroupList
instance A.FromJSON V1APIGroupList where
  parseJSON :: Value -> Parser V1APIGroupList
parseJSON = String
-> (Object -> Parser V1APIGroupList)
-> Value
-> Parser V1APIGroupList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1APIGroupList" ((Object -> Parser V1APIGroupList)
 -> Value -> Parser V1APIGroupList)
-> (Object -> Parser V1APIGroupList)
-> Value
-> Parser V1APIGroupList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> [V1APIGroup] -> Maybe Text -> V1APIGroupList
V1APIGroupList
      (Maybe Text -> [V1APIGroup] -> Maybe Text -> V1APIGroupList)
-> Parser (Maybe Text)
-> Parser ([V1APIGroup] -> Maybe Text -> V1APIGroupList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser ([V1APIGroup] -> Maybe Text -> V1APIGroupList)
-> Parser [V1APIGroup] -> Parser (Maybe Text -> V1APIGroupList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1APIGroup]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"groups")
      Parser (Maybe Text -> V1APIGroupList)
-> Parser (Maybe Text) -> Parser V1APIGroupList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")

-- | ToJSON V1APIGroupList
instance A.ToJSON V1APIGroupList where
  toJSON :: V1APIGroupList -> Value
toJSON V1APIGroupList {[V1APIGroup]
Maybe Text
$sel:v1APIGroupListApiVersion:V1APIGroupList :: V1APIGroupList -> Maybe Text
$sel:v1APIGroupListGroups:V1APIGroupList :: V1APIGroupList -> [V1APIGroup]
$sel:v1APIGroupListKind:V1APIGroupList :: V1APIGroupList -> Maybe Text
v1APIGroupListApiVersion :: Maybe Text
v1APIGroupListGroups :: [V1APIGroup]
v1APIGroupListKind :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1APIGroupListApiVersion
      , Key
"groups" Key -> [V1APIGroup] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1APIGroup]
v1APIGroupListGroups
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1APIGroupListKind
      ]


-- | Construct a value of type 'V1APIGroupList' (by applying it's required fields, if any)
mkV1APIGroupList
  :: [V1APIGroup] -- ^ 'v1APIGroupListGroups': groups is a list of APIGroup.
  -> V1APIGroupList
mkV1APIGroupList :: [V1APIGroup] -> V1APIGroupList
mkV1APIGroupList [V1APIGroup]
v1APIGroupListGroups =
  V1APIGroupList
  { $sel:v1APIGroupListApiVersion:V1APIGroupList :: Maybe Text
v1APIGroupListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1APIGroup]
$sel:v1APIGroupListGroups:V1APIGroupList :: [V1APIGroup]
v1APIGroupListGroups :: [V1APIGroup]
v1APIGroupListGroups
  , $sel:v1APIGroupListKind:V1APIGroupList :: Maybe Text
v1APIGroupListKind = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1APIResource
-- | V1APIResource
-- APIResource specifies the name of a resource and whether it is namespaced.
data V1APIResource = V1APIResource
  { V1APIResource -> Maybe [Text]
v1APIResourceCategories :: !(Maybe [Text]) -- ^ "categories" - categories is a list of the grouped resources this resource belongs to (e.g. &#39;all&#39;)
  , V1APIResource -> Maybe Text
v1APIResourceGroup :: !(Maybe Text) -- ^ "group" - group is the preferred group of the resource.  Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale\&quot;.
  , V1APIResource -> Text
v1APIResourceKind :: !(Text) -- ^ /Required/ "kind" - kind is the kind for the resource (e.g. &#39;Foo&#39; is the kind for a resource &#39;foo&#39;)
  , V1APIResource -> Text
v1APIResourceName :: !(Text) -- ^ /Required/ "name" - name is the plural name of the resource.
  , V1APIResource -> Bool
v1APIResourceNamespaced :: !(Bool) -- ^ /Required/ "namespaced" - namespaced indicates if a resource is namespaced or not.
  , V1APIResource -> Maybe [Text]
v1APIResourceShortNames :: !(Maybe [Text]) -- ^ "shortNames" - shortNames is a list of suggested short names of the resource.
  , V1APIResource -> Text
v1APIResourceSingularName :: !(Text) -- ^ /Required/ "singularName" - singularName is the singular name of the resource.  This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface.
  , V1APIResource -> Maybe Text
v1APIResourceStorageVersionHash :: !(Maybe Text) -- ^ "storageVersionHash" - The hash value of the storage version, the version this resource is converted to when written to the data store. Value must be treated as opaque by clients. Only equality comparison on the value is valid. This is an alpha feature and may change or be removed in the future. The field is populated by the apiserver only if the StorageVersionHash feature gate is enabled. This field will remain optional even if it graduates.
  , V1APIResource -> [Text]
v1APIResourceVerbs :: !([Text]) -- ^ /Required/ "verbs" - verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)
  , V1APIResource -> Maybe Text
v1APIResourceVersion :: !(Maybe Text) -- ^ "version" - version is the preferred version of the resource.  Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource&#39;s group)\&quot;.
  } deriving (Int -> V1APIResource -> ShowS
[V1APIResource] -> ShowS
V1APIResource -> String
(Int -> V1APIResource -> ShowS)
-> (V1APIResource -> String)
-> ([V1APIResource] -> ShowS)
-> Show V1APIResource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1APIResource -> ShowS
showsPrec :: Int -> V1APIResource -> ShowS
$cshow :: V1APIResource -> String
show :: V1APIResource -> String
$cshowList :: [V1APIResource] -> ShowS
showList :: [V1APIResource] -> ShowS
P.Show, V1APIResource -> V1APIResource -> Bool
(V1APIResource -> V1APIResource -> Bool)
-> (V1APIResource -> V1APIResource -> Bool) -> Eq V1APIResource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1APIResource -> V1APIResource -> Bool
== :: V1APIResource -> V1APIResource -> Bool
$c/= :: V1APIResource -> V1APIResource -> Bool
/= :: V1APIResource -> V1APIResource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1APIResource
instance A.FromJSON V1APIResource where
  parseJSON :: Value -> Parser V1APIResource
parseJSON = String
-> (Object -> Parser V1APIResource)
-> Value
-> Parser V1APIResource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1APIResource" ((Object -> Parser V1APIResource) -> Value -> Parser V1APIResource)
-> (Object -> Parser V1APIResource)
-> Value
-> Parser V1APIResource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [Text]
-> Maybe Text
-> Text
-> Text
-> Bool
-> Maybe [Text]
-> Text
-> Maybe Text
-> [Text]
-> Maybe Text
-> V1APIResource
V1APIResource
      (Maybe [Text]
 -> Maybe Text
 -> Text
 -> Text
 -> Bool
 -> Maybe [Text]
 -> Text
 -> Maybe Text
 -> [Text]
 -> Maybe Text
 -> V1APIResource)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Text
      -> Text
      -> Text
      -> Bool
      -> Maybe [Text]
      -> Text
      -> Maybe Text
      -> [Text]
      -> Maybe Text
      -> V1APIResource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"categories")
      Parser
  (Maybe Text
   -> Text
   -> Text
   -> Bool
   -> Maybe [Text]
   -> Text
   -> Maybe Text
   -> [Text]
   -> Maybe Text
   -> V1APIResource)
-> Parser (Maybe Text)
-> Parser
     (Text
      -> Text
      -> Bool
      -> Maybe [Text]
      -> Text
      -> Maybe Text
      -> [Text]
      -> Maybe Text
      -> V1APIResource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"group")
      Parser
  (Text
   -> Text
   -> Bool
   -> Maybe [Text]
   -> Text
   -> Maybe Text
   -> [Text]
   -> Maybe Text
   -> V1APIResource)
-> Parser Text
-> Parser
     (Text
      -> Bool
      -> Maybe [Text]
      -> Text
      -> Maybe Text
      -> [Text]
      -> Maybe Text
      -> V1APIResource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"kind")
      Parser
  (Text
   -> Bool
   -> Maybe [Text]
   -> Text
   -> Maybe Text
   -> [Text]
   -> Maybe Text
   -> V1APIResource)
-> Parser Text
-> Parser
     (Bool
      -> Maybe [Text]
      -> Text
      -> Maybe Text
      -> [Text]
      -> Maybe Text
      -> V1APIResource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser
  (Bool
   -> Maybe [Text]
   -> Text
   -> Maybe Text
   -> [Text]
   -> Maybe Text
   -> V1APIResource)
-> Parser Bool
-> Parser
     (Maybe [Text]
      -> Text -> Maybe Text -> [Text] -> Maybe Text -> V1APIResource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Bool
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"namespaced")
      Parser
  (Maybe [Text]
   -> Text -> Maybe Text -> [Text] -> Maybe Text -> V1APIResource)
-> Parser (Maybe [Text])
-> Parser
     (Text -> Maybe Text -> [Text] -> Maybe Text -> V1APIResource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"shortNames")
      Parser
  (Text -> Maybe Text -> [Text] -> Maybe Text -> V1APIResource)
-> Parser Text
-> Parser (Maybe Text -> [Text] -> Maybe Text -> V1APIResource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"singularName")
      Parser (Maybe Text -> [Text] -> Maybe Text -> V1APIResource)
-> Parser (Maybe Text)
-> Parser ([Text] -> Maybe Text -> V1APIResource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"storageVersionHash")
      Parser ([Text] -> Maybe Text -> V1APIResource)
-> Parser [Text] -> Parser (Maybe Text -> V1APIResource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"verbs")
      Parser (Maybe Text -> V1APIResource)
-> Parser (Maybe Text) -> Parser V1APIResource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"version")

-- | ToJSON V1APIResource
instance A.ToJSON V1APIResource where
  toJSON :: V1APIResource -> Value
toJSON V1APIResource {Bool
[Text]
Maybe [Text]
Maybe Text
Text
$sel:v1APIResourceCategories:V1APIResource :: V1APIResource -> Maybe [Text]
$sel:v1APIResourceGroup:V1APIResource :: V1APIResource -> Maybe Text
$sel:v1APIResourceKind:V1APIResource :: V1APIResource -> Text
$sel:v1APIResourceName:V1APIResource :: V1APIResource -> Text
$sel:v1APIResourceNamespaced:V1APIResource :: V1APIResource -> Bool
$sel:v1APIResourceShortNames:V1APIResource :: V1APIResource -> Maybe [Text]
$sel:v1APIResourceSingularName:V1APIResource :: V1APIResource -> Text
$sel:v1APIResourceStorageVersionHash:V1APIResource :: V1APIResource -> Maybe Text
$sel:v1APIResourceVerbs:V1APIResource :: V1APIResource -> [Text]
$sel:v1APIResourceVersion:V1APIResource :: V1APIResource -> Maybe Text
v1APIResourceCategories :: Maybe [Text]
v1APIResourceGroup :: Maybe Text
v1APIResourceKind :: Text
v1APIResourceName :: Text
v1APIResourceNamespaced :: Bool
v1APIResourceShortNames :: Maybe [Text]
v1APIResourceSingularName :: Text
v1APIResourceStorageVersionHash :: Maybe Text
v1APIResourceVerbs :: [Text]
v1APIResourceVersion :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"categories" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1APIResourceCategories
      , Key
"group" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1APIResourceGroup
      , Key
"kind" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1APIResourceKind
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1APIResourceName
      , Key
"namespaced" Key -> Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Bool
v1APIResourceNamespaced
      , Key
"shortNames" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1APIResourceShortNames
      , Key
"singularName" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1APIResourceSingularName
      , Key
"storageVersionHash" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1APIResourceStorageVersionHash
      , Key
"verbs" Key -> [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [Text]
v1APIResourceVerbs
      , Key
"version" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1APIResourceVersion
      ]


-- | Construct a value of type 'V1APIResource' (by applying it's required fields, if any)
mkV1APIResource
  :: Text -- ^ 'v1APIResourceKind': kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')
  -> Text -- ^ 'v1APIResourceName': name is the plural name of the resource.
  -> Bool -- ^ 'v1APIResourceNamespaced': namespaced indicates if a resource is namespaced or not.
  -> Text -- ^ 'v1APIResourceSingularName': singularName is the singular name of the resource.  This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface.
  -> [Text] -- ^ 'v1APIResourceVerbs': verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)
  -> V1APIResource
mkV1APIResource :: Text -> Text -> Bool -> Text -> [Text] -> V1APIResource
mkV1APIResource Text
v1APIResourceKind Text
v1APIResourceName Bool
v1APIResourceNamespaced Text
v1APIResourceSingularName [Text]
v1APIResourceVerbs =
  V1APIResource
  { $sel:v1APIResourceCategories:V1APIResource :: Maybe [Text]
v1APIResourceCategories = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1APIResourceGroup:V1APIResource :: Maybe Text
v1APIResourceGroup = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1APIResourceKind:V1APIResource :: Text
v1APIResourceKind :: Text
v1APIResourceKind
  , Text
$sel:v1APIResourceName:V1APIResource :: Text
v1APIResourceName :: Text
v1APIResourceName
  , Bool
$sel:v1APIResourceNamespaced:V1APIResource :: Bool
v1APIResourceNamespaced :: Bool
v1APIResourceNamespaced
  , $sel:v1APIResourceShortNames:V1APIResource :: Maybe [Text]
v1APIResourceShortNames = Maybe [Text]
forall a. Maybe a
Nothing
  , Text
$sel:v1APIResourceSingularName:V1APIResource :: Text
v1APIResourceSingularName :: Text
v1APIResourceSingularName
  , $sel:v1APIResourceStorageVersionHash:V1APIResource :: Maybe Text
v1APIResourceStorageVersionHash = Maybe Text
forall a. Maybe a
Nothing
  , [Text]
$sel:v1APIResourceVerbs:V1APIResource :: [Text]
v1APIResourceVerbs :: [Text]
v1APIResourceVerbs
  , $sel:v1APIResourceVersion:V1APIResource :: Maybe Text
v1APIResourceVersion = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1APIResourceList
-- | V1APIResourceList
-- APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.
data V1APIResourceList = V1APIResourceList
  { V1APIResourceList -> Maybe Text
v1APIResourceListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1APIResourceList -> Text
v1APIResourceListGroupVersion :: !(Text) -- ^ /Required/ "groupVersion" - groupVersion is the group and version this APIResourceList is for.
  , V1APIResourceList -> Maybe Text
v1APIResourceListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1APIResourceList -> [V1APIResource]
v1APIResourceListResources :: !([V1APIResource]) -- ^ /Required/ "resources" - resources contains the name of the resources and if they are namespaced.
  } deriving (Int -> V1APIResourceList -> ShowS
[V1APIResourceList] -> ShowS
V1APIResourceList -> String
(Int -> V1APIResourceList -> ShowS)
-> (V1APIResourceList -> String)
-> ([V1APIResourceList] -> ShowS)
-> Show V1APIResourceList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1APIResourceList -> ShowS
showsPrec :: Int -> V1APIResourceList -> ShowS
$cshow :: V1APIResourceList -> String
show :: V1APIResourceList -> String
$cshowList :: [V1APIResourceList] -> ShowS
showList :: [V1APIResourceList] -> ShowS
P.Show, V1APIResourceList -> V1APIResourceList -> Bool
(V1APIResourceList -> V1APIResourceList -> Bool)
-> (V1APIResourceList -> V1APIResourceList -> Bool)
-> Eq V1APIResourceList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1APIResourceList -> V1APIResourceList -> Bool
== :: V1APIResourceList -> V1APIResourceList -> Bool
$c/= :: V1APIResourceList -> V1APIResourceList -> Bool
/= :: V1APIResourceList -> V1APIResourceList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1APIResourceList
instance A.FromJSON V1APIResourceList where
  parseJSON :: Value -> Parser V1APIResourceList
parseJSON = String
-> (Object -> Parser V1APIResourceList)
-> Value
-> Parser V1APIResourceList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1APIResourceList" ((Object -> Parser V1APIResourceList)
 -> Value -> Parser V1APIResourceList)
-> (Object -> Parser V1APIResourceList)
-> Value
-> Parser V1APIResourceList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Text -> Maybe Text -> [V1APIResource] -> V1APIResourceList
V1APIResourceList
      (Maybe Text
 -> Text -> Maybe Text -> [V1APIResource] -> V1APIResourceList)
-> Parser (Maybe Text)
-> Parser
     (Text -> Maybe Text -> [V1APIResource] -> V1APIResourceList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser (Text -> Maybe Text -> [V1APIResource] -> V1APIResourceList)
-> Parser Text
-> Parser (Maybe Text -> [V1APIResource] -> V1APIResourceList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"groupVersion")
      Parser (Maybe Text -> [V1APIResource] -> V1APIResourceList)
-> Parser (Maybe Text)
-> Parser ([V1APIResource] -> V1APIResourceList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser ([V1APIResource] -> V1APIResourceList)
-> Parser [V1APIResource] -> Parser V1APIResourceList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1APIResource]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"resources")

-- | ToJSON V1APIResourceList
instance A.ToJSON V1APIResourceList where
  toJSON :: V1APIResourceList -> Value
toJSON V1APIResourceList {[V1APIResource]
Maybe Text
Text
$sel:v1APIResourceListApiVersion:V1APIResourceList :: V1APIResourceList -> Maybe Text
$sel:v1APIResourceListGroupVersion:V1APIResourceList :: V1APIResourceList -> Text
$sel:v1APIResourceListKind:V1APIResourceList :: V1APIResourceList -> Maybe Text
$sel:v1APIResourceListResources:V1APIResourceList :: V1APIResourceList -> [V1APIResource]
v1APIResourceListApiVersion :: Maybe Text
v1APIResourceListGroupVersion :: Text
v1APIResourceListKind :: Maybe Text
v1APIResourceListResources :: [V1APIResource]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1APIResourceListApiVersion
      , Key
"groupVersion" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1APIResourceListGroupVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1APIResourceListKind
      , Key
"resources" Key -> [V1APIResource] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1APIResource]
v1APIResourceListResources
      ]


-- | Construct a value of type 'V1APIResourceList' (by applying it's required fields, if any)
mkV1APIResourceList
  :: Text -- ^ 'v1APIResourceListGroupVersion': groupVersion is the group and version this APIResourceList is for.
  -> [V1APIResource] -- ^ 'v1APIResourceListResources': resources contains the name of the resources and if they are namespaced.
  -> V1APIResourceList
mkV1APIResourceList :: Text -> [V1APIResource] -> V1APIResourceList
mkV1APIResourceList Text
v1APIResourceListGroupVersion [V1APIResource]
v1APIResourceListResources =
  V1APIResourceList
  { $sel:v1APIResourceListApiVersion:V1APIResourceList :: Maybe Text
v1APIResourceListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1APIResourceListGroupVersion:V1APIResourceList :: Text
v1APIResourceListGroupVersion :: Text
v1APIResourceListGroupVersion
  , $sel:v1APIResourceListKind:V1APIResourceList :: Maybe Text
v1APIResourceListKind = Maybe Text
forall a. Maybe a
Nothing
  , [V1APIResource]
$sel:v1APIResourceListResources:V1APIResourceList :: [V1APIResource]
v1APIResourceListResources :: [V1APIResource]
v1APIResourceListResources
  }

-- ** V1APIService
-- | V1APIService
-- APIService represents a server for a particular GroupVersion. Name must be \"version.group\".
data V1APIService = V1APIService
  { V1APIService -> Maybe Text
v1APIServiceApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1APIService -> Maybe Text
v1APIServiceKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1APIService -> Maybe V1ObjectMeta
v1APIServiceMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1APIService -> Maybe V1APIServiceSpec
v1APIServiceSpec :: !(Maybe V1APIServiceSpec) -- ^ "spec"
  , V1APIService -> Maybe V1APIServiceStatus
v1APIServiceStatus :: !(Maybe V1APIServiceStatus) -- ^ "status"
  } deriving (Int -> V1APIService -> ShowS
[V1APIService] -> ShowS
V1APIService -> String
(Int -> V1APIService -> ShowS)
-> (V1APIService -> String)
-> ([V1APIService] -> ShowS)
-> Show V1APIService
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1APIService -> ShowS
showsPrec :: Int -> V1APIService -> ShowS
$cshow :: V1APIService -> String
show :: V1APIService -> String
$cshowList :: [V1APIService] -> ShowS
showList :: [V1APIService] -> ShowS
P.Show, V1APIService -> V1APIService -> Bool
(V1APIService -> V1APIService -> Bool)
-> (V1APIService -> V1APIService -> Bool) -> Eq V1APIService
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1APIService -> V1APIService -> Bool
== :: V1APIService -> V1APIService -> Bool
$c/= :: V1APIService -> V1APIService -> Bool
/= :: V1APIService -> V1APIService -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1APIService
instance A.FromJSON V1APIService where
  parseJSON :: Value -> Parser V1APIService
parseJSON = String
-> (Object -> Parser V1APIService) -> Value -> Parser V1APIService
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1APIService" ((Object -> Parser V1APIService) -> Value -> Parser V1APIService)
-> (Object -> Parser V1APIService) -> Value -> Parser V1APIService
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1APIServiceSpec
-> Maybe V1APIServiceStatus
-> V1APIService
V1APIService
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1APIServiceSpec
 -> Maybe V1APIServiceStatus
 -> V1APIService)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1APIServiceSpec
      -> Maybe V1APIServiceStatus
      -> V1APIService)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1APIServiceSpec
   -> Maybe V1APIServiceStatus
   -> V1APIService)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1APIServiceSpec
      -> Maybe V1APIServiceStatus
      -> V1APIService)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1APIServiceSpec
   -> Maybe V1APIServiceStatus
   -> V1APIService)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe V1APIServiceSpec
      -> Maybe V1APIServiceStatus -> V1APIService)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (Maybe V1APIServiceSpec
   -> Maybe V1APIServiceStatus -> V1APIService)
-> Parser (Maybe V1APIServiceSpec)
-> Parser (Maybe V1APIServiceStatus -> V1APIService)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1APIServiceSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")
      Parser (Maybe V1APIServiceStatus -> V1APIService)
-> Parser (Maybe V1APIServiceStatus) -> Parser V1APIService
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1APIServiceStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1APIService
instance A.ToJSON V1APIService where
  toJSON :: V1APIService -> Value
toJSON V1APIService {Maybe Text
Maybe V1ObjectMeta
Maybe V1APIServiceStatus
Maybe V1APIServiceSpec
$sel:v1APIServiceApiVersion:V1APIService :: V1APIService -> Maybe Text
$sel:v1APIServiceKind:V1APIService :: V1APIService -> Maybe Text
$sel:v1APIServiceMetadata:V1APIService :: V1APIService -> Maybe V1ObjectMeta
$sel:v1APIServiceSpec:V1APIService :: V1APIService -> Maybe V1APIServiceSpec
$sel:v1APIServiceStatus:V1APIService :: V1APIService -> Maybe V1APIServiceStatus
v1APIServiceApiVersion :: Maybe Text
v1APIServiceKind :: Maybe Text
v1APIServiceMetadata :: Maybe V1ObjectMeta
v1APIServiceSpec :: Maybe V1APIServiceSpec
v1APIServiceStatus :: Maybe V1APIServiceStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1APIServiceApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1APIServiceKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1APIServiceMetadata
      , Key
"spec" Key -> Maybe V1APIServiceSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1APIServiceSpec
v1APIServiceSpec
      , Key
"status" Key -> Maybe V1APIServiceStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1APIServiceStatus
v1APIServiceStatus
      ]


-- | Construct a value of type 'V1APIService' (by applying it's required fields, if any)
mkV1APIService
  :: V1APIService
mkV1APIService :: V1APIService
mkV1APIService =
  V1APIService
  { $sel:v1APIServiceApiVersion:V1APIService :: Maybe Text
v1APIServiceApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1APIServiceKind:V1APIService :: Maybe Text
v1APIServiceKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1APIServiceMetadata:V1APIService :: Maybe V1ObjectMeta
v1APIServiceMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1APIServiceSpec:V1APIService :: Maybe V1APIServiceSpec
v1APIServiceSpec = Maybe V1APIServiceSpec
forall a. Maybe a
Nothing
  , $sel:v1APIServiceStatus:V1APIService :: Maybe V1APIServiceStatus
v1APIServiceStatus = Maybe V1APIServiceStatus
forall a. Maybe a
Nothing
  }

-- ** V1APIServiceCondition
-- | V1APIServiceCondition
-- APIServiceCondition describes the state of an APIService at a particular point
data V1APIServiceCondition = V1APIServiceCondition
  { V1APIServiceCondition -> Maybe DateTime
v1APIServiceConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - Last time the condition transitioned from one status to another.
  , V1APIServiceCondition -> Maybe Text
v1APIServiceConditionMessage :: !(Maybe Text) -- ^ "message" - Human-readable message indicating details about last transition.
  , V1APIServiceCondition -> Maybe Text
v1APIServiceConditionReason :: !(Maybe Text) -- ^ "reason" - Unique, one-word, CamelCase reason for the condition&#39;s last transition.
  , V1APIServiceCondition -> Text
v1APIServiceConditionStatus :: !(Text) -- ^ /Required/ "status" - Status is the status of the condition. Can be True, False, Unknown.
  , V1APIServiceCondition -> Text
v1APIServiceConditionType :: !(Text) -- ^ /Required/ "type" - Type is the type of the condition.
  } deriving (Int -> V1APIServiceCondition -> ShowS
[V1APIServiceCondition] -> ShowS
V1APIServiceCondition -> String
(Int -> V1APIServiceCondition -> ShowS)
-> (V1APIServiceCondition -> String)
-> ([V1APIServiceCondition] -> ShowS)
-> Show V1APIServiceCondition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1APIServiceCondition -> ShowS
showsPrec :: Int -> V1APIServiceCondition -> ShowS
$cshow :: V1APIServiceCondition -> String
show :: V1APIServiceCondition -> String
$cshowList :: [V1APIServiceCondition] -> ShowS
showList :: [V1APIServiceCondition] -> ShowS
P.Show, V1APIServiceCondition -> V1APIServiceCondition -> Bool
(V1APIServiceCondition -> V1APIServiceCondition -> Bool)
-> (V1APIServiceCondition -> V1APIServiceCondition -> Bool)
-> Eq V1APIServiceCondition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1APIServiceCondition -> V1APIServiceCondition -> Bool
== :: V1APIServiceCondition -> V1APIServiceCondition -> Bool
$c/= :: V1APIServiceCondition -> V1APIServiceCondition -> Bool
/= :: V1APIServiceCondition -> V1APIServiceCondition -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1APIServiceCondition
instance A.FromJSON V1APIServiceCondition where
  parseJSON :: Value -> Parser V1APIServiceCondition
parseJSON = String
-> (Object -> Parser V1APIServiceCondition)
-> Value
-> Parser V1APIServiceCondition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1APIServiceCondition" ((Object -> Parser V1APIServiceCondition)
 -> Value -> Parser V1APIServiceCondition)
-> (Object -> Parser V1APIServiceCondition)
-> Value
-> Parser V1APIServiceCondition
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe DateTime
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> V1APIServiceCondition
V1APIServiceCondition
      (Maybe DateTime
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> Text
 -> V1APIServiceCondition)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe Text -> Maybe Text -> Text -> Text -> V1APIServiceCondition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lastTransitionTime")
      Parser
  (Maybe Text -> Maybe Text -> Text -> Text -> V1APIServiceCondition)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Text -> Text -> V1APIServiceCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"message")
      Parser (Maybe Text -> Text -> Text -> V1APIServiceCondition)
-> Parser (Maybe Text)
-> Parser (Text -> Text -> V1APIServiceCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reason")
      Parser (Text -> Text -> V1APIServiceCondition)
-> Parser Text -> Parser (Text -> V1APIServiceCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"status")
      Parser (Text -> V1APIServiceCondition)
-> Parser Text -> Parser V1APIServiceCondition
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"type")

-- | ToJSON V1APIServiceCondition
instance A.ToJSON V1APIServiceCondition where
  toJSON :: V1APIServiceCondition -> Value
toJSON V1APIServiceCondition {Maybe Text
Maybe DateTime
Text
$sel:v1APIServiceConditionLastTransitionTime:V1APIServiceCondition :: V1APIServiceCondition -> Maybe DateTime
$sel:v1APIServiceConditionMessage:V1APIServiceCondition :: V1APIServiceCondition -> Maybe Text
$sel:v1APIServiceConditionReason:V1APIServiceCondition :: V1APIServiceCondition -> Maybe Text
$sel:v1APIServiceConditionStatus:V1APIServiceCondition :: V1APIServiceCondition -> Text
$sel:v1APIServiceConditionType:V1APIServiceCondition :: V1APIServiceCondition -> Text
v1APIServiceConditionLastTransitionTime :: Maybe DateTime
v1APIServiceConditionMessage :: Maybe Text
v1APIServiceConditionReason :: Maybe Text
v1APIServiceConditionStatus :: Text
v1APIServiceConditionType :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"lastTransitionTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1APIServiceConditionLastTransitionTime
      , Key
"message" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1APIServiceConditionMessage
      , Key
"reason" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1APIServiceConditionReason
      , Key
"status" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1APIServiceConditionStatus
      , Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1APIServiceConditionType
      ]


-- | Construct a value of type 'V1APIServiceCondition' (by applying it's required fields, if any)
mkV1APIServiceCondition
  :: Text -- ^ 'v1APIServiceConditionStatus': Status is the status of the condition. Can be True, False, Unknown.
  -> Text -- ^ 'v1APIServiceConditionType': Type is the type of the condition.
  -> V1APIServiceCondition
mkV1APIServiceCondition :: Text -> Text -> V1APIServiceCondition
mkV1APIServiceCondition Text
v1APIServiceConditionStatus Text
v1APIServiceConditionType =
  V1APIServiceCondition
  { $sel:v1APIServiceConditionLastTransitionTime:V1APIServiceCondition :: Maybe DateTime
v1APIServiceConditionLastTransitionTime = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1APIServiceConditionMessage:V1APIServiceCondition :: Maybe Text
v1APIServiceConditionMessage = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1APIServiceConditionReason:V1APIServiceCondition :: Maybe Text
v1APIServiceConditionReason = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1APIServiceConditionStatus:V1APIServiceCondition :: Text
v1APIServiceConditionStatus :: Text
v1APIServiceConditionStatus
  , Text
$sel:v1APIServiceConditionType:V1APIServiceCondition :: Text
v1APIServiceConditionType :: Text
v1APIServiceConditionType
  }

-- ** V1APIServiceList
-- | V1APIServiceList
-- APIServiceList is a list of APIService objects.
data V1APIServiceList = V1APIServiceList
  { V1APIServiceList -> Maybe Text
v1APIServiceListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1APIServiceList -> [V1APIService]
v1APIServiceListItems :: !([V1APIService]) -- ^ /Required/ "items" - Items is the list of APIService
  , V1APIServiceList -> Maybe Text
v1APIServiceListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1APIServiceList -> Maybe V1ListMeta
v1APIServiceListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1APIServiceList -> ShowS
[V1APIServiceList] -> ShowS
V1APIServiceList -> String
(Int -> V1APIServiceList -> ShowS)
-> (V1APIServiceList -> String)
-> ([V1APIServiceList] -> ShowS)
-> Show V1APIServiceList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1APIServiceList -> ShowS
showsPrec :: Int -> V1APIServiceList -> ShowS
$cshow :: V1APIServiceList -> String
show :: V1APIServiceList -> String
$cshowList :: [V1APIServiceList] -> ShowS
showList :: [V1APIServiceList] -> ShowS
P.Show, V1APIServiceList -> V1APIServiceList -> Bool
(V1APIServiceList -> V1APIServiceList -> Bool)
-> (V1APIServiceList -> V1APIServiceList -> Bool)
-> Eq V1APIServiceList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1APIServiceList -> V1APIServiceList -> Bool
== :: V1APIServiceList -> V1APIServiceList -> Bool
$c/= :: V1APIServiceList -> V1APIServiceList -> Bool
/= :: V1APIServiceList -> V1APIServiceList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1APIServiceList
instance A.FromJSON V1APIServiceList where
  parseJSON :: Value -> Parser V1APIServiceList
parseJSON = String
-> (Object -> Parser V1APIServiceList)
-> Value
-> Parser V1APIServiceList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1APIServiceList" ((Object -> Parser V1APIServiceList)
 -> Value -> Parser V1APIServiceList)
-> (Object -> Parser V1APIServiceList)
-> Value
-> Parser V1APIServiceList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1APIService]
-> Maybe Text
-> Maybe V1ListMeta
-> V1APIServiceList
V1APIServiceList
      (Maybe Text
 -> [V1APIService]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1APIServiceList)
-> Parser (Maybe Text)
-> Parser
     ([V1APIService]
      -> Maybe Text -> Maybe V1ListMeta -> V1APIServiceList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1APIService]
   -> Maybe Text -> Maybe V1ListMeta -> V1APIServiceList)
-> Parser [V1APIService]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1APIServiceList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1APIService]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1APIServiceList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1APIServiceList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1APIServiceList)
-> Parser (Maybe V1ListMeta) -> Parser V1APIServiceList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1APIServiceList
instance A.ToJSON V1APIServiceList where
  toJSON :: V1APIServiceList -> Value
toJSON V1APIServiceList {[V1APIService]
Maybe Text
Maybe V1ListMeta
$sel:v1APIServiceListApiVersion:V1APIServiceList :: V1APIServiceList -> Maybe Text
$sel:v1APIServiceListItems:V1APIServiceList :: V1APIServiceList -> [V1APIService]
$sel:v1APIServiceListKind:V1APIServiceList :: V1APIServiceList -> Maybe Text
$sel:v1APIServiceListMetadata:V1APIServiceList :: V1APIServiceList -> Maybe V1ListMeta
v1APIServiceListApiVersion :: Maybe Text
v1APIServiceListItems :: [V1APIService]
v1APIServiceListKind :: Maybe Text
v1APIServiceListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1APIServiceListApiVersion
      , Key
"items" Key -> [V1APIService] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1APIService]
v1APIServiceListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1APIServiceListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1APIServiceListMetadata
      ]


-- | Construct a value of type 'V1APIServiceList' (by applying it's required fields, if any)
mkV1APIServiceList
  :: [V1APIService] -- ^ 'v1APIServiceListItems': Items is the list of APIService
  -> V1APIServiceList
mkV1APIServiceList :: [V1APIService] -> V1APIServiceList
mkV1APIServiceList [V1APIService]
v1APIServiceListItems =
  V1APIServiceList
  { $sel:v1APIServiceListApiVersion:V1APIServiceList :: Maybe Text
v1APIServiceListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1APIService]
$sel:v1APIServiceListItems:V1APIServiceList :: [V1APIService]
v1APIServiceListItems :: [V1APIService]
v1APIServiceListItems
  , $sel:v1APIServiceListKind:V1APIServiceList :: Maybe Text
v1APIServiceListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1APIServiceListMetadata:V1APIServiceList :: Maybe V1ListMeta
v1APIServiceListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1APIServiceSpec
-- | V1APIServiceSpec
-- APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification.
data V1APIServiceSpec = V1APIServiceSpec
  { V1APIServiceSpec -> Maybe ByteArray
v1APIServiceSpecCaBundle :: !(Maybe ByteArray) -- ^ "caBundle" - CABundle is a PEM encoded CA bundle which will be used to validate an API server&#39;s serving certificate. If unspecified, system trust roots on the apiserver are used.
  , V1APIServiceSpec -> Maybe Text
v1APIServiceSpecGroup :: !(Maybe Text) -- ^ "group" - Group is the API group name this server hosts
  , V1APIServiceSpec -> Int
v1APIServiceSpecGroupPriorityMinimum :: !(Int) -- ^ /Required/ "groupPriorityMinimum" - GroupPriorityMinimum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. Note that other versions of this group might specify even higher GroupPriorityMinimum values such that the whole group gets a higher priority. The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object.  (v1.bar before v1.foo) We&#39;d recommend something like: *.k8s.io (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s
  , V1APIServiceSpec -> Maybe Bool
v1APIServiceSpecInsecureSkipTlsVerify :: !(Maybe Bool) -- ^ "insecureSkipTLSVerify" - InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged.  You should use the CABundle instead.
  , V1APIServiceSpec -> Maybe ApiregistrationV1ServiceReference
v1APIServiceSpecService :: !(Maybe ApiregistrationV1ServiceReference) -- ^ "service"
  , V1APIServiceSpec -> Maybe Text
v1APIServiceSpecVersion :: !(Maybe Text) -- ^ "version" - Version is the API version this server hosts.  For example, \&quot;v1\&quot;
  , V1APIServiceSpec -> Int
v1APIServiceSpecVersionPriority :: !(Int) -- ^ /Required/ "versionPriority" - VersionPriority controls the ordering of this API version inside of its group.  Must be greater than zero. The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). Since it&#39;s inside of a group, the number can be small, probably in the 10s. In case of equal version priorities, the version string will be used to compute the order inside a group. If the version string is \&quot;kube-like\&quot;, it will sort above non \&quot;kube-like\&quot; version strings, which are ordered lexicographically. \&quot;Kube-like\&quot; versions start with a \&quot;v\&quot;, then are followed by a number (the major version), then optionally the string \&quot;alpha\&quot; or \&quot;beta\&quot; and another number (the minor version). These are sorted first by GA &gt; beta &gt; alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.
  } deriving (Int -> V1APIServiceSpec -> ShowS
[V1APIServiceSpec] -> ShowS
V1APIServiceSpec -> String
(Int -> V1APIServiceSpec -> ShowS)
-> (V1APIServiceSpec -> String)
-> ([V1APIServiceSpec] -> ShowS)
-> Show V1APIServiceSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1APIServiceSpec -> ShowS
showsPrec :: Int -> V1APIServiceSpec -> ShowS
$cshow :: V1APIServiceSpec -> String
show :: V1APIServiceSpec -> String
$cshowList :: [V1APIServiceSpec] -> ShowS
showList :: [V1APIServiceSpec] -> ShowS
P.Show, V1APIServiceSpec -> V1APIServiceSpec -> Bool
(V1APIServiceSpec -> V1APIServiceSpec -> Bool)
-> (V1APIServiceSpec -> V1APIServiceSpec -> Bool)
-> Eq V1APIServiceSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1APIServiceSpec -> V1APIServiceSpec -> Bool
== :: V1APIServiceSpec -> V1APIServiceSpec -> Bool
$c/= :: V1APIServiceSpec -> V1APIServiceSpec -> Bool
/= :: V1APIServiceSpec -> V1APIServiceSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1APIServiceSpec
instance A.FromJSON V1APIServiceSpec where
  parseJSON :: Value -> Parser V1APIServiceSpec
parseJSON = String
-> (Object -> Parser V1APIServiceSpec)
-> Value
-> Parser V1APIServiceSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1APIServiceSpec" ((Object -> Parser V1APIServiceSpec)
 -> Value -> Parser V1APIServiceSpec)
-> (Object -> Parser V1APIServiceSpec)
-> Value
-> Parser V1APIServiceSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe ByteArray
-> Maybe Text
-> Int
-> Maybe Bool
-> Maybe ApiregistrationV1ServiceReference
-> Maybe Text
-> Int
-> V1APIServiceSpec
V1APIServiceSpec
      (Maybe ByteArray
 -> Maybe Text
 -> Int
 -> Maybe Bool
 -> Maybe ApiregistrationV1ServiceReference
 -> Maybe Text
 -> Int
 -> V1APIServiceSpec)
-> Parser (Maybe ByteArray)
-> Parser
     (Maybe Text
      -> Int
      -> Maybe Bool
      -> Maybe ApiregistrationV1ServiceReference
      -> Maybe Text
      -> Int
      -> V1APIServiceSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe ByteArray)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"caBundle")
      Parser
  (Maybe Text
   -> Int
   -> Maybe Bool
   -> Maybe ApiregistrationV1ServiceReference
   -> Maybe Text
   -> Int
   -> V1APIServiceSpec)
-> Parser (Maybe Text)
-> Parser
     (Int
      -> Maybe Bool
      -> Maybe ApiregistrationV1ServiceReference
      -> Maybe Text
      -> Int
      -> V1APIServiceSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"group")
      Parser
  (Int
   -> Maybe Bool
   -> Maybe ApiregistrationV1ServiceReference
   -> Maybe Text
   -> Int
   -> V1APIServiceSpec)
-> Parser Int
-> Parser
     (Maybe Bool
      -> Maybe ApiregistrationV1ServiceReference
      -> Maybe Text
      -> Int
      -> V1APIServiceSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"groupPriorityMinimum")
      Parser
  (Maybe Bool
   -> Maybe ApiregistrationV1ServiceReference
   -> Maybe Text
   -> Int
   -> V1APIServiceSpec)
-> Parser (Maybe Bool)
-> Parser
     (Maybe ApiregistrationV1ServiceReference
      -> Maybe Text -> Int -> V1APIServiceSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"insecureSkipTLSVerify")
      Parser
  (Maybe ApiregistrationV1ServiceReference
   -> Maybe Text -> Int -> V1APIServiceSpec)
-> Parser (Maybe ApiregistrationV1ServiceReference)
-> Parser (Maybe Text -> Int -> V1APIServiceSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe ApiregistrationV1ServiceReference)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"service")
      Parser (Maybe Text -> Int -> V1APIServiceSpec)
-> Parser (Maybe Text) -> Parser (Int -> V1APIServiceSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"version")
      Parser (Int -> V1APIServiceSpec)
-> Parser Int -> Parser V1APIServiceSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"versionPriority")

-- | ToJSON V1APIServiceSpec
instance A.ToJSON V1APIServiceSpec where
  toJSON :: V1APIServiceSpec -> Value
toJSON V1APIServiceSpec {Int
Maybe Bool
Maybe Text
Maybe ByteArray
Maybe ApiregistrationV1ServiceReference
$sel:v1APIServiceSpecCaBundle:V1APIServiceSpec :: V1APIServiceSpec -> Maybe ByteArray
$sel:v1APIServiceSpecGroup:V1APIServiceSpec :: V1APIServiceSpec -> Maybe Text
$sel:v1APIServiceSpecGroupPriorityMinimum:V1APIServiceSpec :: V1APIServiceSpec -> Int
$sel:v1APIServiceSpecInsecureSkipTlsVerify:V1APIServiceSpec :: V1APIServiceSpec -> Maybe Bool
$sel:v1APIServiceSpecService:V1APIServiceSpec :: V1APIServiceSpec -> Maybe ApiregistrationV1ServiceReference
$sel:v1APIServiceSpecVersion:V1APIServiceSpec :: V1APIServiceSpec -> Maybe Text
$sel:v1APIServiceSpecVersionPriority:V1APIServiceSpec :: V1APIServiceSpec -> Int
v1APIServiceSpecCaBundle :: Maybe ByteArray
v1APIServiceSpecGroup :: Maybe Text
v1APIServiceSpecGroupPriorityMinimum :: Int
v1APIServiceSpecInsecureSkipTlsVerify :: Maybe Bool
v1APIServiceSpecService :: Maybe ApiregistrationV1ServiceReference
v1APIServiceSpecVersion :: Maybe Text
v1APIServiceSpecVersionPriority :: Int
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"caBundle" Key -> Maybe ByteArray -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe ByteArray
v1APIServiceSpecCaBundle
      , Key
"group" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1APIServiceSpecGroup
      , Key
"groupPriorityMinimum" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v1APIServiceSpecGroupPriorityMinimum
      , Key
"insecureSkipTLSVerify" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1APIServiceSpecInsecureSkipTlsVerify
      , Key
"service" Key -> Maybe ApiregistrationV1ServiceReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe ApiregistrationV1ServiceReference
v1APIServiceSpecService
      , Key
"version" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1APIServiceSpecVersion
      , Key
"versionPriority" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v1APIServiceSpecVersionPriority
      ]


-- | Construct a value of type 'V1APIServiceSpec' (by applying it's required fields, if any)
mkV1APIServiceSpec
  :: Int -- ^ 'v1APIServiceSpecGroupPriorityMinimum': GroupPriorityMinimum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. Note that other versions of this group might specify even higher GroupPriorityMinimum values such that the whole group gets a higher priority. The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object.  (v1.bar before v1.foo) We'd recommend something like: *.k8s.io (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s
  -> Int -- ^ 'v1APIServiceSpecVersionPriority': VersionPriority controls the ordering of this API version inside of its group.  Must be greater than zero. The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). Since it's inside of a group, the number can be small, probably in the 10s. In case of equal version priorities, the version string will be used to compute the order inside a group. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.
  -> V1APIServiceSpec
mkV1APIServiceSpec :: Int -> Int -> V1APIServiceSpec
mkV1APIServiceSpec Int
v1APIServiceSpecGroupPriorityMinimum Int
v1APIServiceSpecVersionPriority =
  V1APIServiceSpec
  { $sel:v1APIServiceSpecCaBundle:V1APIServiceSpec :: Maybe ByteArray
v1APIServiceSpecCaBundle = Maybe ByteArray
forall a. Maybe a
Nothing
  , $sel:v1APIServiceSpecGroup:V1APIServiceSpec :: Maybe Text
v1APIServiceSpecGroup = Maybe Text
forall a. Maybe a
Nothing
  , Int
$sel:v1APIServiceSpecGroupPriorityMinimum:V1APIServiceSpec :: Int
v1APIServiceSpecGroupPriorityMinimum :: Int
v1APIServiceSpecGroupPriorityMinimum
  , $sel:v1APIServiceSpecInsecureSkipTlsVerify:V1APIServiceSpec :: Maybe Bool
v1APIServiceSpecInsecureSkipTlsVerify = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1APIServiceSpecService:V1APIServiceSpec :: Maybe ApiregistrationV1ServiceReference
v1APIServiceSpecService = Maybe ApiregistrationV1ServiceReference
forall a. Maybe a
Nothing
  , $sel:v1APIServiceSpecVersion:V1APIServiceSpec :: Maybe Text
v1APIServiceSpecVersion = Maybe Text
forall a. Maybe a
Nothing
  , Int
$sel:v1APIServiceSpecVersionPriority:V1APIServiceSpec :: Int
v1APIServiceSpecVersionPriority :: Int
v1APIServiceSpecVersionPriority
  }

-- ** V1APIServiceStatus
-- | V1APIServiceStatus
-- APIServiceStatus contains derived information about an API server
data V1APIServiceStatus = V1APIServiceStatus
  { V1APIServiceStatus -> Maybe [V1APIServiceCondition]
v1APIServiceStatusConditions :: !(Maybe [V1APIServiceCondition]) -- ^ "conditions" - Current service state of apiService.
  } deriving (Int -> V1APIServiceStatus -> ShowS
[V1APIServiceStatus] -> ShowS
V1APIServiceStatus -> String
(Int -> V1APIServiceStatus -> ShowS)
-> (V1APIServiceStatus -> String)
-> ([V1APIServiceStatus] -> ShowS)
-> Show V1APIServiceStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1APIServiceStatus -> ShowS
showsPrec :: Int -> V1APIServiceStatus -> ShowS
$cshow :: V1APIServiceStatus -> String
show :: V1APIServiceStatus -> String
$cshowList :: [V1APIServiceStatus] -> ShowS
showList :: [V1APIServiceStatus] -> ShowS
P.Show, V1APIServiceStatus -> V1APIServiceStatus -> Bool
(V1APIServiceStatus -> V1APIServiceStatus -> Bool)
-> (V1APIServiceStatus -> V1APIServiceStatus -> Bool)
-> Eq V1APIServiceStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1APIServiceStatus -> V1APIServiceStatus -> Bool
== :: V1APIServiceStatus -> V1APIServiceStatus -> Bool
$c/= :: V1APIServiceStatus -> V1APIServiceStatus -> Bool
/= :: V1APIServiceStatus -> V1APIServiceStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1APIServiceStatus
instance A.FromJSON V1APIServiceStatus where
  parseJSON :: Value -> Parser V1APIServiceStatus
parseJSON = String
-> (Object -> Parser V1APIServiceStatus)
-> Value
-> Parser V1APIServiceStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1APIServiceStatus" ((Object -> Parser V1APIServiceStatus)
 -> Value -> Parser V1APIServiceStatus)
-> (Object -> Parser V1APIServiceStatus)
-> Value
-> Parser V1APIServiceStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1APIServiceCondition] -> V1APIServiceStatus
V1APIServiceStatus
      (Maybe [V1APIServiceCondition] -> V1APIServiceStatus)
-> Parser (Maybe [V1APIServiceCondition])
-> Parser V1APIServiceStatus
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1APIServiceCondition])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"conditions")

-- | ToJSON V1APIServiceStatus
instance A.ToJSON V1APIServiceStatus where
  toJSON :: V1APIServiceStatus -> Value
toJSON V1APIServiceStatus {Maybe [V1APIServiceCondition]
$sel:v1APIServiceStatusConditions:V1APIServiceStatus :: V1APIServiceStatus -> Maybe [V1APIServiceCondition]
v1APIServiceStatusConditions :: Maybe [V1APIServiceCondition]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"conditions" Key -> Maybe [V1APIServiceCondition] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1APIServiceCondition]
v1APIServiceStatusConditions
      ]


-- | Construct a value of type 'V1APIServiceStatus' (by applying it's required fields, if any)
mkV1APIServiceStatus
  :: V1APIServiceStatus
mkV1APIServiceStatus :: V1APIServiceStatus
mkV1APIServiceStatus =
  V1APIServiceStatus
  { $sel:v1APIServiceStatusConditions:V1APIServiceStatus :: Maybe [V1APIServiceCondition]
v1APIServiceStatusConditions = Maybe [V1APIServiceCondition]
forall a. Maybe a
Nothing
  }

-- ** V1APIVersions
-- | V1APIVersions
-- APIVersions lists the versions that are available, to allow clients to discover the API at /api, which is the root path of the legacy v1 API.
data V1APIVersions = V1APIVersions
  { V1APIVersions -> Maybe Text
v1APIVersionsApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1APIVersions -> Maybe Text
v1APIVersionsKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1APIVersions -> [V1ServerAddressByClientCIDR]
v1APIVersionsServerAddressByClientCidrs :: !([V1ServerAddressByClientCIDR]) -- ^ /Required/ "serverAddressByClientCIDRs" - a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.
  , V1APIVersions -> [Text]
v1APIVersionsVersions :: !([Text]) -- ^ /Required/ "versions" - versions are the api versions that are available.
  } deriving (Int -> V1APIVersions -> ShowS
[V1APIVersions] -> ShowS
V1APIVersions -> String
(Int -> V1APIVersions -> ShowS)
-> (V1APIVersions -> String)
-> ([V1APIVersions] -> ShowS)
-> Show V1APIVersions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1APIVersions -> ShowS
showsPrec :: Int -> V1APIVersions -> ShowS
$cshow :: V1APIVersions -> String
show :: V1APIVersions -> String
$cshowList :: [V1APIVersions] -> ShowS
showList :: [V1APIVersions] -> ShowS
P.Show, V1APIVersions -> V1APIVersions -> Bool
(V1APIVersions -> V1APIVersions -> Bool)
-> (V1APIVersions -> V1APIVersions -> Bool) -> Eq V1APIVersions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1APIVersions -> V1APIVersions -> Bool
== :: V1APIVersions -> V1APIVersions -> Bool
$c/= :: V1APIVersions -> V1APIVersions -> Bool
/= :: V1APIVersions -> V1APIVersions -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1APIVersions
instance A.FromJSON V1APIVersions where
  parseJSON :: Value -> Parser V1APIVersions
parseJSON = String
-> (Object -> Parser V1APIVersions)
-> Value
-> Parser V1APIVersions
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1APIVersions" ((Object -> Parser V1APIVersions) -> Value -> Parser V1APIVersions)
-> (Object -> Parser V1APIVersions)
-> Value
-> Parser V1APIVersions
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> [V1ServerAddressByClientCIDR]
-> [Text]
-> V1APIVersions
V1APIVersions
      (Maybe Text
 -> Maybe Text
 -> [V1ServerAddressByClientCIDR]
 -> [Text]
 -> V1APIVersions)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> [V1ServerAddressByClientCIDR] -> [Text] -> V1APIVersions)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> [V1ServerAddressByClientCIDR] -> [Text] -> V1APIVersions)
-> Parser (Maybe Text)
-> Parser
     ([V1ServerAddressByClientCIDR] -> [Text] -> V1APIVersions)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser ([V1ServerAddressByClientCIDR] -> [Text] -> V1APIVersions)
-> Parser [V1ServerAddressByClientCIDR]
-> Parser ([Text] -> V1APIVersions)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1ServerAddressByClientCIDR]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"serverAddressByClientCIDRs")
      Parser ([Text] -> V1APIVersions)
-> Parser [Text] -> Parser V1APIVersions
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"versions")

-- | ToJSON V1APIVersions
instance A.ToJSON V1APIVersions where
  toJSON :: V1APIVersions -> Value
toJSON V1APIVersions {[Text]
[V1ServerAddressByClientCIDR]
Maybe Text
$sel:v1APIVersionsApiVersion:V1APIVersions :: V1APIVersions -> Maybe Text
$sel:v1APIVersionsKind:V1APIVersions :: V1APIVersions -> Maybe Text
$sel:v1APIVersionsServerAddressByClientCidrs:V1APIVersions :: V1APIVersions -> [V1ServerAddressByClientCIDR]
$sel:v1APIVersionsVersions:V1APIVersions :: V1APIVersions -> [Text]
v1APIVersionsApiVersion :: Maybe Text
v1APIVersionsKind :: Maybe Text
v1APIVersionsServerAddressByClientCidrs :: [V1ServerAddressByClientCIDR]
v1APIVersionsVersions :: [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1APIVersionsApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1APIVersionsKind
      , Key
"serverAddressByClientCIDRs" Key -> [V1ServerAddressByClientCIDR] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1ServerAddressByClientCIDR]
v1APIVersionsServerAddressByClientCidrs
      , Key
"versions" Key -> [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [Text]
v1APIVersionsVersions
      ]


-- | Construct a value of type 'V1APIVersions' (by applying it's required fields, if any)
mkV1APIVersions
  :: [V1ServerAddressByClientCIDR] -- ^ 'v1APIVersionsServerAddressByClientCidrs': a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.
  -> [Text] -- ^ 'v1APIVersionsVersions': versions are the api versions that are available.
  -> V1APIVersions
mkV1APIVersions :: [V1ServerAddressByClientCIDR] -> [Text] -> V1APIVersions
mkV1APIVersions [V1ServerAddressByClientCIDR]
v1APIVersionsServerAddressByClientCidrs [Text]
v1APIVersionsVersions =
  V1APIVersions
  { $sel:v1APIVersionsApiVersion:V1APIVersions :: Maybe Text
v1APIVersionsApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1APIVersionsKind:V1APIVersions :: Maybe Text
v1APIVersionsKind = Maybe Text
forall a. Maybe a
Nothing
  , [V1ServerAddressByClientCIDR]
$sel:v1APIVersionsServerAddressByClientCidrs:V1APIVersions :: [V1ServerAddressByClientCIDR]
v1APIVersionsServerAddressByClientCidrs :: [V1ServerAddressByClientCIDR]
v1APIVersionsServerAddressByClientCidrs
  , [Text]
$sel:v1APIVersionsVersions:V1APIVersions :: [Text]
v1APIVersionsVersions :: [Text]
v1APIVersionsVersions
  }

-- ** V1AWSElasticBlockStoreVolumeSource
-- | V1AWSElasticBlockStoreVolumeSource
-- Represents a Persistent Disk resource in AWS.  An AWS EBS disk must exist before mounting to a container. The disk must also be in the same AWS zone as the kubelet. An AWS EBS disk can only be mounted as read/write once. AWS EBS volumes support ownership management and SELinux relabeling.
data V1AWSElasticBlockStoreVolumeSource = V1AWSElasticBlockStoreVolumeSource
  { V1AWSElasticBlockStoreVolumeSource -> Maybe Text
v1AWSElasticBlockStoreVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \&quot;ext4\&quot;, \&quot;xfs\&quot;, \&quot;ntfs\&quot;. Implicitly inferred to be \&quot;ext4\&quot; if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
  , V1AWSElasticBlockStoreVolumeSource -> Maybe Int
v1AWSElasticBlockStoreVolumeSourcePartition :: !(Maybe Int) -- ^ "partition" - partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \&quot;1\&quot;. Similarly, the volume partition for /dev/sda is \&quot;0\&quot; (or you can leave the property empty).
  , V1AWSElasticBlockStoreVolumeSource -> Maybe Bool
v1AWSElasticBlockStoreVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - readOnly value true will force the readOnly setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
  , V1AWSElasticBlockStoreVolumeSource -> Text
v1AWSElasticBlockStoreVolumeSourceVolumeId :: !(Text) -- ^ /Required/ "volumeID" - volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
  } deriving (Int -> V1AWSElasticBlockStoreVolumeSource -> ShowS
[V1AWSElasticBlockStoreVolumeSource] -> ShowS
V1AWSElasticBlockStoreVolumeSource -> String
(Int -> V1AWSElasticBlockStoreVolumeSource -> ShowS)
-> (V1AWSElasticBlockStoreVolumeSource -> String)
-> ([V1AWSElasticBlockStoreVolumeSource] -> ShowS)
-> Show V1AWSElasticBlockStoreVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1AWSElasticBlockStoreVolumeSource -> ShowS
showsPrec :: Int -> V1AWSElasticBlockStoreVolumeSource -> ShowS
$cshow :: V1AWSElasticBlockStoreVolumeSource -> String
show :: V1AWSElasticBlockStoreVolumeSource -> String
$cshowList :: [V1AWSElasticBlockStoreVolumeSource] -> ShowS
showList :: [V1AWSElasticBlockStoreVolumeSource] -> ShowS
P.Show, V1AWSElasticBlockStoreVolumeSource
-> V1AWSElasticBlockStoreVolumeSource -> Bool
(V1AWSElasticBlockStoreVolumeSource
 -> V1AWSElasticBlockStoreVolumeSource -> Bool)
-> (V1AWSElasticBlockStoreVolumeSource
    -> V1AWSElasticBlockStoreVolumeSource -> Bool)
-> Eq V1AWSElasticBlockStoreVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1AWSElasticBlockStoreVolumeSource
-> V1AWSElasticBlockStoreVolumeSource -> Bool
== :: V1AWSElasticBlockStoreVolumeSource
-> V1AWSElasticBlockStoreVolumeSource -> Bool
$c/= :: V1AWSElasticBlockStoreVolumeSource
-> V1AWSElasticBlockStoreVolumeSource -> Bool
/= :: V1AWSElasticBlockStoreVolumeSource
-> V1AWSElasticBlockStoreVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1AWSElasticBlockStoreVolumeSource
instance A.FromJSON V1AWSElasticBlockStoreVolumeSource where
  parseJSON :: Value -> Parser V1AWSElasticBlockStoreVolumeSource
parseJSON = String
-> (Object -> Parser V1AWSElasticBlockStoreVolumeSource)
-> Value
-> Parser V1AWSElasticBlockStoreVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1AWSElasticBlockStoreVolumeSource" ((Object -> Parser V1AWSElasticBlockStoreVolumeSource)
 -> Value -> Parser V1AWSElasticBlockStoreVolumeSource)
-> (Object -> Parser V1AWSElasticBlockStoreVolumeSource)
-> Value
-> Parser V1AWSElasticBlockStoreVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Int
-> Maybe Bool
-> Text
-> V1AWSElasticBlockStoreVolumeSource
V1AWSElasticBlockStoreVolumeSource
      (Maybe Text
 -> Maybe Int
 -> Maybe Bool
 -> Text
 -> V1AWSElasticBlockStoreVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Bool -> Text -> V1AWSElasticBlockStoreVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fsType")
      Parser
  (Maybe Int
   -> Maybe Bool -> Text -> V1AWSElasticBlockStoreVolumeSource)
-> Parser (Maybe Int)
-> Parser
     (Maybe Bool -> Text -> V1AWSElasticBlockStoreVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"partition")
      Parser (Maybe Bool -> Text -> V1AWSElasticBlockStoreVolumeSource)
-> Parser (Maybe Bool)
-> Parser (Text -> V1AWSElasticBlockStoreVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readOnly")
      Parser (Text -> V1AWSElasticBlockStoreVolumeSource)
-> Parser Text -> Parser V1AWSElasticBlockStoreVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"volumeID")

-- | ToJSON V1AWSElasticBlockStoreVolumeSource
instance A.ToJSON V1AWSElasticBlockStoreVolumeSource where
  toJSON :: V1AWSElasticBlockStoreVolumeSource -> Value
toJSON V1AWSElasticBlockStoreVolumeSource {Maybe Bool
Maybe Int
Maybe Text
Text
$sel:v1AWSElasticBlockStoreVolumeSourceFsType:V1AWSElasticBlockStoreVolumeSource :: V1AWSElasticBlockStoreVolumeSource -> Maybe Text
$sel:v1AWSElasticBlockStoreVolumeSourcePartition:V1AWSElasticBlockStoreVolumeSource :: V1AWSElasticBlockStoreVolumeSource -> Maybe Int
$sel:v1AWSElasticBlockStoreVolumeSourceReadOnly:V1AWSElasticBlockStoreVolumeSource :: V1AWSElasticBlockStoreVolumeSource -> Maybe Bool
$sel:v1AWSElasticBlockStoreVolumeSourceVolumeId:V1AWSElasticBlockStoreVolumeSource :: V1AWSElasticBlockStoreVolumeSource -> Text
v1AWSElasticBlockStoreVolumeSourceFsType :: Maybe Text
v1AWSElasticBlockStoreVolumeSourcePartition :: Maybe Int
v1AWSElasticBlockStoreVolumeSourceReadOnly :: Maybe Bool
v1AWSElasticBlockStoreVolumeSourceVolumeId :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"fsType" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1AWSElasticBlockStoreVolumeSourceFsType
      , Key
"partition" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1AWSElasticBlockStoreVolumeSourcePartition
      , Key
"readOnly" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1AWSElasticBlockStoreVolumeSourceReadOnly
      , Key
"volumeID" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1AWSElasticBlockStoreVolumeSourceVolumeId
      ]


-- | Construct a value of type 'V1AWSElasticBlockStoreVolumeSource' (by applying it's required fields, if any)
mkV1AWSElasticBlockStoreVolumeSource
  :: Text -- ^ 'v1AWSElasticBlockStoreVolumeSourceVolumeId': volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
  -> V1AWSElasticBlockStoreVolumeSource
mkV1AWSElasticBlockStoreVolumeSource :: Text -> V1AWSElasticBlockStoreVolumeSource
mkV1AWSElasticBlockStoreVolumeSource Text
v1AWSElasticBlockStoreVolumeSourceVolumeId =
  V1AWSElasticBlockStoreVolumeSource
  { $sel:v1AWSElasticBlockStoreVolumeSourceFsType:V1AWSElasticBlockStoreVolumeSource :: Maybe Text
v1AWSElasticBlockStoreVolumeSourceFsType = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1AWSElasticBlockStoreVolumeSourcePartition:V1AWSElasticBlockStoreVolumeSource :: Maybe Int
v1AWSElasticBlockStoreVolumeSourcePartition = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1AWSElasticBlockStoreVolumeSourceReadOnly:V1AWSElasticBlockStoreVolumeSource :: Maybe Bool
v1AWSElasticBlockStoreVolumeSourceReadOnly = Maybe Bool
forall a. Maybe a
Nothing
  , Text
$sel:v1AWSElasticBlockStoreVolumeSourceVolumeId:V1AWSElasticBlockStoreVolumeSource :: Text
v1AWSElasticBlockStoreVolumeSourceVolumeId :: Text
v1AWSElasticBlockStoreVolumeSourceVolumeId
  }

-- ** V1Affinity
-- | V1Affinity
-- Affinity is a group of affinity scheduling rules.
data V1Affinity = V1Affinity
  { V1Affinity -> Maybe V1NodeAffinity
v1AffinityNodeAffinity :: !(Maybe V1NodeAffinity) -- ^ "nodeAffinity"
  , V1Affinity -> Maybe V1PodAffinity
v1AffinityPodAffinity :: !(Maybe V1PodAffinity) -- ^ "podAffinity"
  , V1Affinity -> Maybe V1PodAntiAffinity
v1AffinityPodAntiAffinity :: !(Maybe V1PodAntiAffinity) -- ^ "podAntiAffinity"
  } deriving (Int -> V1Affinity -> ShowS
[V1Affinity] -> ShowS
V1Affinity -> String
(Int -> V1Affinity -> ShowS)
-> (V1Affinity -> String)
-> ([V1Affinity] -> ShowS)
-> Show V1Affinity
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1Affinity -> ShowS
showsPrec :: Int -> V1Affinity -> ShowS
$cshow :: V1Affinity -> String
show :: V1Affinity -> String
$cshowList :: [V1Affinity] -> ShowS
showList :: [V1Affinity] -> ShowS
P.Show, V1Affinity -> V1Affinity -> Bool
(V1Affinity -> V1Affinity -> Bool)
-> (V1Affinity -> V1Affinity -> Bool) -> Eq V1Affinity
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1Affinity -> V1Affinity -> Bool
== :: V1Affinity -> V1Affinity -> Bool
$c/= :: V1Affinity -> V1Affinity -> Bool
/= :: V1Affinity -> V1Affinity -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1Affinity
instance A.FromJSON V1Affinity where
  parseJSON :: Value -> Parser V1Affinity
parseJSON = String
-> (Object -> Parser V1Affinity) -> Value -> Parser V1Affinity
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1Affinity" ((Object -> Parser V1Affinity) -> Value -> Parser V1Affinity)
-> (Object -> Parser V1Affinity) -> Value -> Parser V1Affinity
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1NodeAffinity
-> Maybe V1PodAffinity -> Maybe V1PodAntiAffinity -> V1Affinity
V1Affinity
      (Maybe V1NodeAffinity
 -> Maybe V1PodAffinity -> Maybe V1PodAntiAffinity -> V1Affinity)
-> Parser (Maybe V1NodeAffinity)
-> Parser
     (Maybe V1PodAffinity -> Maybe V1PodAntiAffinity -> V1Affinity)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1NodeAffinity)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nodeAffinity")
      Parser
  (Maybe V1PodAffinity -> Maybe V1PodAntiAffinity -> V1Affinity)
-> Parser (Maybe V1PodAffinity)
-> Parser (Maybe V1PodAntiAffinity -> V1Affinity)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1PodAffinity)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"podAffinity")
      Parser (Maybe V1PodAntiAffinity -> V1Affinity)
-> Parser (Maybe V1PodAntiAffinity) -> Parser V1Affinity
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1PodAntiAffinity)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"podAntiAffinity")

-- | ToJSON V1Affinity
instance A.ToJSON V1Affinity where
  toJSON :: V1Affinity -> Value
toJSON V1Affinity {Maybe V1PodAntiAffinity
Maybe V1PodAffinity
Maybe V1NodeAffinity
$sel:v1AffinityNodeAffinity:V1Affinity :: V1Affinity -> Maybe V1NodeAffinity
$sel:v1AffinityPodAffinity:V1Affinity :: V1Affinity -> Maybe V1PodAffinity
$sel:v1AffinityPodAntiAffinity:V1Affinity :: V1Affinity -> Maybe V1PodAntiAffinity
v1AffinityNodeAffinity :: Maybe V1NodeAffinity
v1AffinityPodAffinity :: Maybe V1PodAffinity
v1AffinityPodAntiAffinity :: Maybe V1PodAntiAffinity
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"nodeAffinity" Key -> Maybe V1NodeAffinity -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1NodeAffinity
v1AffinityNodeAffinity
      , Key
"podAffinity" Key -> Maybe V1PodAffinity -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1PodAffinity
v1AffinityPodAffinity
      , Key
"podAntiAffinity" Key -> Maybe V1PodAntiAffinity -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1PodAntiAffinity
v1AffinityPodAntiAffinity
      ]


-- | Construct a value of type 'V1Affinity' (by applying it's required fields, if any)
mkV1Affinity
  :: V1Affinity
mkV1Affinity :: V1Affinity
mkV1Affinity =
  V1Affinity
  { $sel:v1AffinityNodeAffinity:V1Affinity :: Maybe V1NodeAffinity
v1AffinityNodeAffinity = Maybe V1NodeAffinity
forall a. Maybe a
Nothing
  , $sel:v1AffinityPodAffinity:V1Affinity :: Maybe V1PodAffinity
v1AffinityPodAffinity = Maybe V1PodAffinity
forall a. Maybe a
Nothing
  , $sel:v1AffinityPodAntiAffinity:V1Affinity :: Maybe V1PodAntiAffinity
v1AffinityPodAntiAffinity = Maybe V1PodAntiAffinity
forall a. Maybe a
Nothing
  }

-- ** V1AggregationRule
-- | V1AggregationRule
-- AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole
data V1AggregationRule = V1AggregationRule
  { V1AggregationRule -> Maybe [V1LabelSelector]
v1AggregationRuleClusterRoleSelectors :: !(Maybe [V1LabelSelector]) -- ^ "clusterRoleSelectors" - ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole&#39;s permissions will be added
  } deriving (Int -> V1AggregationRule -> ShowS
[V1AggregationRule] -> ShowS
V1AggregationRule -> String
(Int -> V1AggregationRule -> ShowS)
-> (V1AggregationRule -> String)
-> ([V1AggregationRule] -> ShowS)
-> Show V1AggregationRule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1AggregationRule -> ShowS
showsPrec :: Int -> V1AggregationRule -> ShowS
$cshow :: V1AggregationRule -> String
show :: V1AggregationRule -> String
$cshowList :: [V1AggregationRule] -> ShowS
showList :: [V1AggregationRule] -> ShowS
P.Show, V1AggregationRule -> V1AggregationRule -> Bool
(V1AggregationRule -> V1AggregationRule -> Bool)
-> (V1AggregationRule -> V1AggregationRule -> Bool)
-> Eq V1AggregationRule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1AggregationRule -> V1AggregationRule -> Bool
== :: V1AggregationRule -> V1AggregationRule -> Bool
$c/= :: V1AggregationRule -> V1AggregationRule -> Bool
/= :: V1AggregationRule -> V1AggregationRule -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1AggregationRule
instance A.FromJSON V1AggregationRule where
  parseJSON :: Value -> Parser V1AggregationRule
parseJSON = String
-> (Object -> Parser V1AggregationRule)
-> Value
-> Parser V1AggregationRule
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1AggregationRule" ((Object -> Parser V1AggregationRule)
 -> Value -> Parser V1AggregationRule)
-> (Object -> Parser V1AggregationRule)
-> Value
-> Parser V1AggregationRule
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1LabelSelector] -> V1AggregationRule
V1AggregationRule
      (Maybe [V1LabelSelector] -> V1AggregationRule)
-> Parser (Maybe [V1LabelSelector]) -> Parser V1AggregationRule
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1LabelSelector])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"clusterRoleSelectors")

-- | ToJSON V1AggregationRule
instance A.ToJSON V1AggregationRule where
  toJSON :: V1AggregationRule -> Value
toJSON V1AggregationRule {Maybe [V1LabelSelector]
$sel:v1AggregationRuleClusterRoleSelectors:V1AggregationRule :: V1AggregationRule -> Maybe [V1LabelSelector]
v1AggregationRuleClusterRoleSelectors :: Maybe [V1LabelSelector]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"clusterRoleSelectors" Key -> Maybe [V1LabelSelector] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1LabelSelector]
v1AggregationRuleClusterRoleSelectors
      ]


-- | Construct a value of type 'V1AggregationRule' (by applying it's required fields, if any)
mkV1AggregationRule
  :: V1AggregationRule
mkV1AggregationRule :: V1AggregationRule
mkV1AggregationRule =
  V1AggregationRule
  { $sel:v1AggregationRuleClusterRoleSelectors:V1AggregationRule :: Maybe [V1LabelSelector]
v1AggregationRuleClusterRoleSelectors = Maybe [V1LabelSelector]
forall a. Maybe a
Nothing
  }

-- ** V1AppArmorProfile
-- | V1AppArmorProfile
-- AppArmorProfile defines a pod or container's AppArmor settings.
data V1AppArmorProfile = V1AppArmorProfile
  { V1AppArmorProfile -> Maybe Text
v1AppArmorProfileLocalhostProfile :: !(Maybe Text) -- ^ "localhostProfile" - localhostProfile indicates a profile loaded on the node that should be used. The profile must be preconfigured on the node to work. Must match the loaded name of the profile. Must be set if and only if type is \&quot;Localhost\&quot;.
  , V1AppArmorProfile -> Text
v1AppArmorProfileType :: !(Text) -- ^ /Required/ "type" - type indicates which kind of AppArmor profile will be applied. Valid options are:   Localhost - a profile pre-loaded on the node.   RuntimeDefault - the container runtime&#39;s default profile.   Unconfined - no AppArmor enforcement.
  } deriving (Int -> V1AppArmorProfile -> ShowS
[V1AppArmorProfile] -> ShowS
V1AppArmorProfile -> String
(Int -> V1AppArmorProfile -> ShowS)
-> (V1AppArmorProfile -> String)
-> ([V1AppArmorProfile] -> ShowS)
-> Show V1AppArmorProfile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1AppArmorProfile -> ShowS
showsPrec :: Int -> V1AppArmorProfile -> ShowS
$cshow :: V1AppArmorProfile -> String
show :: V1AppArmorProfile -> String
$cshowList :: [V1AppArmorProfile] -> ShowS
showList :: [V1AppArmorProfile] -> ShowS
P.Show, V1AppArmorProfile -> V1AppArmorProfile -> Bool
(V1AppArmorProfile -> V1AppArmorProfile -> Bool)
-> (V1AppArmorProfile -> V1AppArmorProfile -> Bool)
-> Eq V1AppArmorProfile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1AppArmorProfile -> V1AppArmorProfile -> Bool
== :: V1AppArmorProfile -> V1AppArmorProfile -> Bool
$c/= :: V1AppArmorProfile -> V1AppArmorProfile -> Bool
/= :: V1AppArmorProfile -> V1AppArmorProfile -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1AppArmorProfile
instance A.FromJSON V1AppArmorProfile where
  parseJSON :: Value -> Parser V1AppArmorProfile
parseJSON = String
-> (Object -> Parser V1AppArmorProfile)
-> Value
-> Parser V1AppArmorProfile
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1AppArmorProfile" ((Object -> Parser V1AppArmorProfile)
 -> Value -> Parser V1AppArmorProfile)
-> (Object -> Parser V1AppArmorProfile)
-> Value
-> Parser V1AppArmorProfile
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Text -> V1AppArmorProfile
V1AppArmorProfile
      (Maybe Text -> Text -> V1AppArmorProfile)
-> Parser (Maybe Text) -> Parser (Text -> V1AppArmorProfile)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"localhostProfile")
      Parser (Text -> V1AppArmorProfile)
-> Parser Text -> Parser V1AppArmorProfile
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"type")

-- | ToJSON V1AppArmorProfile
instance A.ToJSON V1AppArmorProfile where
  toJSON :: V1AppArmorProfile -> Value
toJSON V1AppArmorProfile {Maybe Text
Text
$sel:v1AppArmorProfileLocalhostProfile:V1AppArmorProfile :: V1AppArmorProfile -> Maybe Text
$sel:v1AppArmorProfileType:V1AppArmorProfile :: V1AppArmorProfile -> Text
v1AppArmorProfileLocalhostProfile :: Maybe Text
v1AppArmorProfileType :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"localhostProfile" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1AppArmorProfileLocalhostProfile
      , Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1AppArmorProfileType
      ]


-- | Construct a value of type 'V1AppArmorProfile' (by applying it's required fields, if any)
mkV1AppArmorProfile
  :: Text -- ^ 'v1AppArmorProfileType': type indicates which kind of AppArmor profile will be applied. Valid options are:   Localhost - a profile pre-loaded on the node.   RuntimeDefault - the container runtime's default profile.   Unconfined - no AppArmor enforcement.
  -> V1AppArmorProfile
mkV1AppArmorProfile :: Text -> V1AppArmorProfile
mkV1AppArmorProfile Text
v1AppArmorProfileType =
  V1AppArmorProfile
  { $sel:v1AppArmorProfileLocalhostProfile:V1AppArmorProfile :: Maybe Text
v1AppArmorProfileLocalhostProfile = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1AppArmorProfileType:V1AppArmorProfile :: Text
v1AppArmorProfileType :: Text
v1AppArmorProfileType
  }

-- ** V1AttachedVolume
-- | V1AttachedVolume
-- AttachedVolume describes a volume attached to a node
data V1AttachedVolume = V1AttachedVolume
  { V1AttachedVolume -> Text
v1AttachedVolumeDevicePath :: !(Text) -- ^ /Required/ "devicePath" - DevicePath represents the device path where the volume should be available
  , V1AttachedVolume -> Text
v1AttachedVolumeName :: !(Text) -- ^ /Required/ "name" - Name of the attached volume
  } deriving (Int -> V1AttachedVolume -> ShowS
[V1AttachedVolume] -> ShowS
V1AttachedVolume -> String
(Int -> V1AttachedVolume -> ShowS)
-> (V1AttachedVolume -> String)
-> ([V1AttachedVolume] -> ShowS)
-> Show V1AttachedVolume
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1AttachedVolume -> ShowS
showsPrec :: Int -> V1AttachedVolume -> ShowS
$cshow :: V1AttachedVolume -> String
show :: V1AttachedVolume -> String
$cshowList :: [V1AttachedVolume] -> ShowS
showList :: [V1AttachedVolume] -> ShowS
P.Show, V1AttachedVolume -> V1AttachedVolume -> Bool
(V1AttachedVolume -> V1AttachedVolume -> Bool)
-> (V1AttachedVolume -> V1AttachedVolume -> Bool)
-> Eq V1AttachedVolume
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1AttachedVolume -> V1AttachedVolume -> Bool
== :: V1AttachedVolume -> V1AttachedVolume -> Bool
$c/= :: V1AttachedVolume -> V1AttachedVolume -> Bool
/= :: V1AttachedVolume -> V1AttachedVolume -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1AttachedVolume
instance A.FromJSON V1AttachedVolume where
  parseJSON :: Value -> Parser V1AttachedVolume
parseJSON = String
-> (Object -> Parser V1AttachedVolume)
-> Value
-> Parser V1AttachedVolume
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1AttachedVolume" ((Object -> Parser V1AttachedVolume)
 -> Value -> Parser V1AttachedVolume)
-> (Object -> Parser V1AttachedVolume)
-> Value
-> Parser V1AttachedVolume
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Text -> V1AttachedVolume
V1AttachedVolume
      (Text -> Text -> V1AttachedVolume)
-> Parser Text -> Parser (Text -> V1AttachedVolume)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"devicePath")
      Parser (Text -> V1AttachedVolume)
-> Parser Text -> Parser V1AttachedVolume
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")

-- | ToJSON V1AttachedVolume
instance A.ToJSON V1AttachedVolume where
  toJSON :: V1AttachedVolume -> Value
toJSON V1AttachedVolume {Text
$sel:v1AttachedVolumeDevicePath:V1AttachedVolume :: V1AttachedVolume -> Text
$sel:v1AttachedVolumeName:V1AttachedVolume :: V1AttachedVolume -> Text
v1AttachedVolumeDevicePath :: Text
v1AttachedVolumeName :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"devicePath" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1AttachedVolumeDevicePath
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1AttachedVolumeName
      ]


-- | Construct a value of type 'V1AttachedVolume' (by applying it's required fields, if any)
mkV1AttachedVolume
  :: Text -- ^ 'v1AttachedVolumeDevicePath': DevicePath represents the device path where the volume should be available
  -> Text -- ^ 'v1AttachedVolumeName': Name of the attached volume
  -> V1AttachedVolume
mkV1AttachedVolume :: Text -> Text -> V1AttachedVolume
mkV1AttachedVolume Text
v1AttachedVolumeDevicePath Text
v1AttachedVolumeName =
  V1AttachedVolume
  { Text
$sel:v1AttachedVolumeDevicePath:V1AttachedVolume :: Text
v1AttachedVolumeDevicePath :: Text
v1AttachedVolumeDevicePath
  , Text
$sel:v1AttachedVolumeName:V1AttachedVolume :: Text
v1AttachedVolumeName :: Text
v1AttachedVolumeName
  }

-- ** V1AuditAnnotation
-- | V1AuditAnnotation
-- AuditAnnotation describes how to produce an audit annotation for an API request.
data V1AuditAnnotation = V1AuditAnnotation
  { V1AuditAnnotation -> Text
v1AuditAnnotationKey :: !(Text) -- ^ /Required/ "key" - key specifies the audit annotation key. The audit annotation keys of a ValidatingAdmissionPolicy must be unique. The key must be a qualified name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length.  The key is combined with the resource name of the ValidatingAdmissionPolicy to construct an audit annotation key: \&quot;{ValidatingAdmissionPolicy name}/{key}\&quot;.  If an admission webhook uses the same resource name as this ValidatingAdmissionPolicy and the same audit annotation key, the annotation key will be identical. In this case, the first annotation written with the key will be included in the audit event and all subsequent annotations with the same key will be discarded.  Required.
  , V1AuditAnnotation -> Text
v1AuditAnnotationValueExpression :: !(Text) -- ^ /Required/ "valueExpression" - valueExpression represents the expression which is evaluated by CEL to produce an audit annotation value. The expression must evaluate to either a string or null value. If the expression evaluates to a string, the audit annotation is included with the string value. If the expression evaluates to null or empty string the audit annotation will be omitted. The valueExpression may be no longer than 5kb in length. If the result of the valueExpression is more than 10kb in length, it will be truncated to 10kb.  If multiple ValidatingAdmissionPolicyBinding resources match an API request, then the valueExpression will be evaluated for each binding. All unique values produced by the valueExpressions will be joined together in a comma-separated list.  Required.
  } deriving (Int -> V1AuditAnnotation -> ShowS
[V1AuditAnnotation] -> ShowS
V1AuditAnnotation -> String
(Int -> V1AuditAnnotation -> ShowS)
-> (V1AuditAnnotation -> String)
-> ([V1AuditAnnotation] -> ShowS)
-> Show V1AuditAnnotation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1AuditAnnotation -> ShowS
showsPrec :: Int -> V1AuditAnnotation -> ShowS
$cshow :: V1AuditAnnotation -> String
show :: V1AuditAnnotation -> String
$cshowList :: [V1AuditAnnotation] -> ShowS
showList :: [V1AuditAnnotation] -> ShowS
P.Show, V1AuditAnnotation -> V1AuditAnnotation -> Bool
(V1AuditAnnotation -> V1AuditAnnotation -> Bool)
-> (V1AuditAnnotation -> V1AuditAnnotation -> Bool)
-> Eq V1AuditAnnotation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1AuditAnnotation -> V1AuditAnnotation -> Bool
== :: V1AuditAnnotation -> V1AuditAnnotation -> Bool
$c/= :: V1AuditAnnotation -> V1AuditAnnotation -> Bool
/= :: V1AuditAnnotation -> V1AuditAnnotation -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1AuditAnnotation
instance A.FromJSON V1AuditAnnotation where
  parseJSON :: Value -> Parser V1AuditAnnotation
parseJSON = String
-> (Object -> Parser V1AuditAnnotation)
-> Value
-> Parser V1AuditAnnotation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1AuditAnnotation" ((Object -> Parser V1AuditAnnotation)
 -> Value -> Parser V1AuditAnnotation)
-> (Object -> Parser V1AuditAnnotation)
-> Value
-> Parser V1AuditAnnotation
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Text -> V1AuditAnnotation
V1AuditAnnotation
      (Text -> Text -> V1AuditAnnotation)
-> Parser Text -> Parser (Text -> V1AuditAnnotation)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"key")
      Parser (Text -> V1AuditAnnotation)
-> Parser Text -> Parser V1AuditAnnotation
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"valueExpression")

-- | ToJSON V1AuditAnnotation
instance A.ToJSON V1AuditAnnotation where
  toJSON :: V1AuditAnnotation -> Value
toJSON V1AuditAnnotation {Text
$sel:v1AuditAnnotationKey:V1AuditAnnotation :: V1AuditAnnotation -> Text
$sel:v1AuditAnnotationValueExpression:V1AuditAnnotation :: V1AuditAnnotation -> Text
v1AuditAnnotationKey :: Text
v1AuditAnnotationValueExpression :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"key" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1AuditAnnotationKey
      , Key
"valueExpression" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1AuditAnnotationValueExpression
      ]


-- | Construct a value of type 'V1AuditAnnotation' (by applying it's required fields, if any)
mkV1AuditAnnotation
  :: Text -- ^ 'v1AuditAnnotationKey': key specifies the audit annotation key. The audit annotation keys of a ValidatingAdmissionPolicy must be unique. The key must be a qualified name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length.  The key is combined with the resource name of the ValidatingAdmissionPolicy to construct an audit annotation key: \"{ValidatingAdmissionPolicy name}/{key}\".  If an admission webhook uses the same resource name as this ValidatingAdmissionPolicy and the same audit annotation key, the annotation key will be identical. In this case, the first annotation written with the key will be included in the audit event and all subsequent annotations with the same key will be discarded.  Required.
  -> Text -- ^ 'v1AuditAnnotationValueExpression': valueExpression represents the expression which is evaluated by CEL to produce an audit annotation value. The expression must evaluate to either a string or null value. If the expression evaluates to a string, the audit annotation is included with the string value. If the expression evaluates to null or empty string the audit annotation will be omitted. The valueExpression may be no longer than 5kb in length. If the result of the valueExpression is more than 10kb in length, it will be truncated to 10kb.  If multiple ValidatingAdmissionPolicyBinding resources match an API request, then the valueExpression will be evaluated for each binding. All unique values produced by the valueExpressions will be joined together in a comma-separated list.  Required.
  -> V1AuditAnnotation
mkV1AuditAnnotation :: Text -> Text -> V1AuditAnnotation
mkV1AuditAnnotation Text
v1AuditAnnotationKey Text
v1AuditAnnotationValueExpression =
  V1AuditAnnotation
  { Text
$sel:v1AuditAnnotationKey:V1AuditAnnotation :: Text
v1AuditAnnotationKey :: Text
v1AuditAnnotationKey
  , Text
$sel:v1AuditAnnotationValueExpression:V1AuditAnnotation :: Text
v1AuditAnnotationValueExpression :: Text
v1AuditAnnotationValueExpression
  }

-- ** V1AzureDiskVolumeSource
-- | V1AzureDiskVolumeSource
-- AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
data V1AzureDiskVolumeSource = V1AzureDiskVolumeSource
  { V1AzureDiskVolumeSource -> Maybe Text
v1AzureDiskVolumeSourceCachingMode :: !(Maybe Text) -- ^ "cachingMode" - cachingMode is the Host Caching mode: None, Read Only, Read Write.
  , V1AzureDiskVolumeSource -> Text
v1AzureDiskVolumeSourceDiskName :: !(Text) -- ^ /Required/ "diskName" - diskName is the Name of the data disk in the blob storage
  , V1AzureDiskVolumeSource -> Text
v1AzureDiskVolumeSourceDiskUri :: !(Text) -- ^ /Required/ "diskURI" - diskURI is the URI of data disk in the blob storage
  , V1AzureDiskVolumeSource -> Maybe Text
v1AzureDiskVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - fsType is Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \&quot;ext4\&quot;, \&quot;xfs\&quot;, \&quot;ntfs\&quot;. Implicitly inferred to be \&quot;ext4\&quot; if unspecified.
  , V1AzureDiskVolumeSource -> Maybe Text
v1AzureDiskVolumeSourceKind :: !(Maybe Text) -- ^ "kind" - kind expected values are Shared: multiple blob disks per storage account  Dedicated: single blob disk per storage account  Managed: azure managed data disk (only in managed availability set). defaults to shared
  , V1AzureDiskVolumeSource -> Maybe Bool
v1AzureDiskVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
  } deriving (Int -> V1AzureDiskVolumeSource -> ShowS
[V1AzureDiskVolumeSource] -> ShowS
V1AzureDiskVolumeSource -> String
(Int -> V1AzureDiskVolumeSource -> ShowS)
-> (V1AzureDiskVolumeSource -> String)
-> ([V1AzureDiskVolumeSource] -> ShowS)
-> Show V1AzureDiskVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1AzureDiskVolumeSource -> ShowS
showsPrec :: Int -> V1AzureDiskVolumeSource -> ShowS
$cshow :: V1AzureDiskVolumeSource -> String
show :: V1AzureDiskVolumeSource -> String
$cshowList :: [V1AzureDiskVolumeSource] -> ShowS
showList :: [V1AzureDiskVolumeSource] -> ShowS
P.Show, V1AzureDiskVolumeSource -> V1AzureDiskVolumeSource -> Bool
(V1AzureDiskVolumeSource -> V1AzureDiskVolumeSource -> Bool)
-> (V1AzureDiskVolumeSource -> V1AzureDiskVolumeSource -> Bool)
-> Eq V1AzureDiskVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1AzureDiskVolumeSource -> V1AzureDiskVolumeSource -> Bool
== :: V1AzureDiskVolumeSource -> V1AzureDiskVolumeSource -> Bool
$c/= :: V1AzureDiskVolumeSource -> V1AzureDiskVolumeSource -> Bool
/= :: V1AzureDiskVolumeSource -> V1AzureDiskVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1AzureDiskVolumeSource
instance A.FromJSON V1AzureDiskVolumeSource where
  parseJSON :: Value -> Parser V1AzureDiskVolumeSource
parseJSON = String
-> (Object -> Parser V1AzureDiskVolumeSource)
-> Value
-> Parser V1AzureDiskVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1AzureDiskVolumeSource" ((Object -> Parser V1AzureDiskVolumeSource)
 -> Value -> Parser V1AzureDiskVolumeSource)
-> (Object -> Parser V1AzureDiskVolumeSource)
-> Value
-> Parser V1AzureDiskVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Text
-> Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> V1AzureDiskVolumeSource
V1AzureDiskVolumeSource
      (Maybe Text
 -> Text
 -> Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> V1AzureDiskVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Text
      -> Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> V1AzureDiskVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"cachingMode")
      Parser
  (Text
   -> Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> V1AzureDiskVolumeSource)
-> Parser Text
-> Parser
     (Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> V1AzureDiskVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"diskName")
      Parser
  (Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> V1AzureDiskVolumeSource)
-> Parser Text
-> Parser
     (Maybe Text -> Maybe Text -> Maybe Bool -> V1AzureDiskVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"diskURI")
      Parser
  (Maybe Text -> Maybe Text -> Maybe Bool -> V1AzureDiskVolumeSource)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Bool -> V1AzureDiskVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fsType")
      Parser (Maybe Text -> Maybe Bool -> V1AzureDiskVolumeSource)
-> Parser (Maybe Text)
-> Parser (Maybe Bool -> V1AzureDiskVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe Bool -> V1AzureDiskVolumeSource)
-> Parser (Maybe Bool) -> Parser V1AzureDiskVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readOnly")

-- | ToJSON V1AzureDiskVolumeSource
instance A.ToJSON V1AzureDiskVolumeSource where
  toJSON :: V1AzureDiskVolumeSource -> Value
toJSON V1AzureDiskVolumeSource {Maybe Bool
Maybe Text
Text
$sel:v1AzureDiskVolumeSourceCachingMode:V1AzureDiskVolumeSource :: V1AzureDiskVolumeSource -> Maybe Text
$sel:v1AzureDiskVolumeSourceDiskName:V1AzureDiskVolumeSource :: V1AzureDiskVolumeSource -> Text
$sel:v1AzureDiskVolumeSourceDiskUri:V1AzureDiskVolumeSource :: V1AzureDiskVolumeSource -> Text
$sel:v1AzureDiskVolumeSourceFsType:V1AzureDiskVolumeSource :: V1AzureDiskVolumeSource -> Maybe Text
$sel:v1AzureDiskVolumeSourceKind:V1AzureDiskVolumeSource :: V1AzureDiskVolumeSource -> Maybe Text
$sel:v1AzureDiskVolumeSourceReadOnly:V1AzureDiskVolumeSource :: V1AzureDiskVolumeSource -> Maybe Bool
v1AzureDiskVolumeSourceCachingMode :: Maybe Text
v1AzureDiskVolumeSourceDiskName :: Text
v1AzureDiskVolumeSourceDiskUri :: Text
v1AzureDiskVolumeSourceFsType :: Maybe Text
v1AzureDiskVolumeSourceKind :: Maybe Text
v1AzureDiskVolumeSourceReadOnly :: Maybe Bool
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"cachingMode" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1AzureDiskVolumeSourceCachingMode
      , Key
"diskName" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1AzureDiskVolumeSourceDiskName
      , Key
"diskURI" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1AzureDiskVolumeSourceDiskUri
      , Key
"fsType" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1AzureDiskVolumeSourceFsType
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1AzureDiskVolumeSourceKind
      , Key
"readOnly" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1AzureDiskVolumeSourceReadOnly
      ]


-- | Construct a value of type 'V1AzureDiskVolumeSource' (by applying it's required fields, if any)
mkV1AzureDiskVolumeSource
  :: Text -- ^ 'v1AzureDiskVolumeSourceDiskName': diskName is the Name of the data disk in the blob storage
  -> Text -- ^ 'v1AzureDiskVolumeSourceDiskUri': diskURI is the URI of data disk in the blob storage
  -> V1AzureDiskVolumeSource
mkV1AzureDiskVolumeSource :: Text -> Text -> V1AzureDiskVolumeSource
mkV1AzureDiskVolumeSource Text
v1AzureDiskVolumeSourceDiskName Text
v1AzureDiskVolumeSourceDiskUri =
  V1AzureDiskVolumeSource
  { $sel:v1AzureDiskVolumeSourceCachingMode:V1AzureDiskVolumeSource :: Maybe Text
v1AzureDiskVolumeSourceCachingMode = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1AzureDiskVolumeSourceDiskName:V1AzureDiskVolumeSource :: Text
v1AzureDiskVolumeSourceDiskName :: Text
v1AzureDiskVolumeSourceDiskName
  , Text
$sel:v1AzureDiskVolumeSourceDiskUri:V1AzureDiskVolumeSource :: Text
v1AzureDiskVolumeSourceDiskUri :: Text
v1AzureDiskVolumeSourceDiskUri
  , $sel:v1AzureDiskVolumeSourceFsType:V1AzureDiskVolumeSource :: Maybe Text
v1AzureDiskVolumeSourceFsType = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1AzureDiskVolumeSourceKind:V1AzureDiskVolumeSource :: Maybe Text
v1AzureDiskVolumeSourceKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1AzureDiskVolumeSourceReadOnly:V1AzureDiskVolumeSource :: Maybe Bool
v1AzureDiskVolumeSourceReadOnly = Maybe Bool
forall a. Maybe a
Nothing
  }

-- ** V1AzureFilePersistentVolumeSource
-- | V1AzureFilePersistentVolumeSource
-- AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
data V1AzureFilePersistentVolumeSource = V1AzureFilePersistentVolumeSource
  { V1AzureFilePersistentVolumeSource -> Maybe Bool
v1AzureFilePersistentVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
  , V1AzureFilePersistentVolumeSource -> Text
v1AzureFilePersistentVolumeSourceSecretName :: !(Text) -- ^ /Required/ "secretName" - secretName is the name of secret that contains Azure Storage Account Name and Key
  , V1AzureFilePersistentVolumeSource -> Maybe Text
v1AzureFilePersistentVolumeSourceSecretNamespace :: !(Maybe Text) -- ^ "secretNamespace" - secretNamespace is the namespace of the secret that contains Azure Storage Account Name and Key default is the same as the Pod
  , V1AzureFilePersistentVolumeSource -> Text
v1AzureFilePersistentVolumeSourceShareName :: !(Text) -- ^ /Required/ "shareName" - shareName is the azure Share Name
  } deriving (Int -> V1AzureFilePersistentVolumeSource -> ShowS
[V1AzureFilePersistentVolumeSource] -> ShowS
V1AzureFilePersistentVolumeSource -> String
(Int -> V1AzureFilePersistentVolumeSource -> ShowS)
-> (V1AzureFilePersistentVolumeSource -> String)
-> ([V1AzureFilePersistentVolumeSource] -> ShowS)
-> Show V1AzureFilePersistentVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1AzureFilePersistentVolumeSource -> ShowS
showsPrec :: Int -> V1AzureFilePersistentVolumeSource -> ShowS
$cshow :: V1AzureFilePersistentVolumeSource -> String
show :: V1AzureFilePersistentVolumeSource -> String
$cshowList :: [V1AzureFilePersistentVolumeSource] -> ShowS
showList :: [V1AzureFilePersistentVolumeSource] -> ShowS
P.Show, V1AzureFilePersistentVolumeSource
-> V1AzureFilePersistentVolumeSource -> Bool
(V1AzureFilePersistentVolumeSource
 -> V1AzureFilePersistentVolumeSource -> Bool)
-> (V1AzureFilePersistentVolumeSource
    -> V1AzureFilePersistentVolumeSource -> Bool)
-> Eq V1AzureFilePersistentVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1AzureFilePersistentVolumeSource
-> V1AzureFilePersistentVolumeSource -> Bool
== :: V1AzureFilePersistentVolumeSource
-> V1AzureFilePersistentVolumeSource -> Bool
$c/= :: V1AzureFilePersistentVolumeSource
-> V1AzureFilePersistentVolumeSource -> Bool
/= :: V1AzureFilePersistentVolumeSource
-> V1AzureFilePersistentVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1AzureFilePersistentVolumeSource
instance A.FromJSON V1AzureFilePersistentVolumeSource where
  parseJSON :: Value -> Parser V1AzureFilePersistentVolumeSource
parseJSON = String
-> (Object -> Parser V1AzureFilePersistentVolumeSource)
-> Value
-> Parser V1AzureFilePersistentVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1AzureFilePersistentVolumeSource" ((Object -> Parser V1AzureFilePersistentVolumeSource)
 -> Value -> Parser V1AzureFilePersistentVolumeSource)
-> (Object -> Parser V1AzureFilePersistentVolumeSource)
-> Value
-> Parser V1AzureFilePersistentVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Bool
-> Text -> Maybe Text -> Text -> V1AzureFilePersistentVolumeSource
V1AzureFilePersistentVolumeSource
      (Maybe Bool
 -> Text -> Maybe Text -> Text -> V1AzureFilePersistentVolumeSource)
-> Parser (Maybe Bool)
-> Parser
     (Text -> Maybe Text -> Text -> V1AzureFilePersistentVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readOnly")
      Parser
  (Text -> Maybe Text -> Text -> V1AzureFilePersistentVolumeSource)
-> Parser Text
-> Parser (Maybe Text -> Text -> V1AzureFilePersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"secretName")
      Parser (Maybe Text -> Text -> V1AzureFilePersistentVolumeSource)
-> Parser (Maybe Text)
-> Parser (Text -> V1AzureFilePersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"secretNamespace")
      Parser (Text -> V1AzureFilePersistentVolumeSource)
-> Parser Text -> Parser V1AzureFilePersistentVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"shareName")

-- | ToJSON V1AzureFilePersistentVolumeSource
instance A.ToJSON V1AzureFilePersistentVolumeSource where
  toJSON :: V1AzureFilePersistentVolumeSource -> Value
toJSON V1AzureFilePersistentVolumeSource {Maybe Bool
Maybe Text
Text
$sel:v1AzureFilePersistentVolumeSourceReadOnly:V1AzureFilePersistentVolumeSource :: V1AzureFilePersistentVolumeSource -> Maybe Bool
$sel:v1AzureFilePersistentVolumeSourceSecretName:V1AzureFilePersistentVolumeSource :: V1AzureFilePersistentVolumeSource -> Text
$sel:v1AzureFilePersistentVolumeSourceSecretNamespace:V1AzureFilePersistentVolumeSource :: V1AzureFilePersistentVolumeSource -> Maybe Text
$sel:v1AzureFilePersistentVolumeSourceShareName:V1AzureFilePersistentVolumeSource :: V1AzureFilePersistentVolumeSource -> Text
v1AzureFilePersistentVolumeSourceReadOnly :: Maybe Bool
v1AzureFilePersistentVolumeSourceSecretName :: Text
v1AzureFilePersistentVolumeSourceSecretNamespace :: Maybe Text
v1AzureFilePersistentVolumeSourceShareName :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"readOnly" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1AzureFilePersistentVolumeSourceReadOnly
      , Key
"secretName" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1AzureFilePersistentVolumeSourceSecretName
      , Key
"secretNamespace" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1AzureFilePersistentVolumeSourceSecretNamespace
      , Key
"shareName" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1AzureFilePersistentVolumeSourceShareName
      ]


-- | Construct a value of type 'V1AzureFilePersistentVolumeSource' (by applying it's required fields, if any)
mkV1AzureFilePersistentVolumeSource
  :: Text -- ^ 'v1AzureFilePersistentVolumeSourceSecretName': secretName is the name of secret that contains Azure Storage Account Name and Key
  -> Text -- ^ 'v1AzureFilePersistentVolumeSourceShareName': shareName is the azure Share Name
  -> V1AzureFilePersistentVolumeSource
mkV1AzureFilePersistentVolumeSource :: Text -> Text -> V1AzureFilePersistentVolumeSource
mkV1AzureFilePersistentVolumeSource Text
v1AzureFilePersistentVolumeSourceSecretName Text
v1AzureFilePersistentVolumeSourceShareName =
  V1AzureFilePersistentVolumeSource
  { $sel:v1AzureFilePersistentVolumeSourceReadOnly:V1AzureFilePersistentVolumeSource :: Maybe Bool
v1AzureFilePersistentVolumeSourceReadOnly = Maybe Bool
forall a. Maybe a
Nothing
  , Text
$sel:v1AzureFilePersistentVolumeSourceSecretName:V1AzureFilePersistentVolumeSource :: Text
v1AzureFilePersistentVolumeSourceSecretName :: Text
v1AzureFilePersistentVolumeSourceSecretName
  , $sel:v1AzureFilePersistentVolumeSourceSecretNamespace:V1AzureFilePersistentVolumeSource :: Maybe Text
v1AzureFilePersistentVolumeSourceSecretNamespace = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1AzureFilePersistentVolumeSourceShareName:V1AzureFilePersistentVolumeSource :: Text
v1AzureFilePersistentVolumeSourceShareName :: Text
v1AzureFilePersistentVolumeSourceShareName
  }

-- ** V1AzureFileVolumeSource
-- | V1AzureFileVolumeSource
-- AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
data V1AzureFileVolumeSource = V1AzureFileVolumeSource
  { V1AzureFileVolumeSource -> Maybe Bool
v1AzureFileVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
  , V1AzureFileVolumeSource -> Text
v1AzureFileVolumeSourceSecretName :: !(Text) -- ^ /Required/ "secretName" - secretName is the  name of secret that contains Azure Storage Account Name and Key
  , V1AzureFileVolumeSource -> Text
v1AzureFileVolumeSourceShareName :: !(Text) -- ^ /Required/ "shareName" - shareName is the azure share Name
  } deriving (Int -> V1AzureFileVolumeSource -> ShowS
[V1AzureFileVolumeSource] -> ShowS
V1AzureFileVolumeSource -> String
(Int -> V1AzureFileVolumeSource -> ShowS)
-> (V1AzureFileVolumeSource -> String)
-> ([V1AzureFileVolumeSource] -> ShowS)
-> Show V1AzureFileVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1AzureFileVolumeSource -> ShowS
showsPrec :: Int -> V1AzureFileVolumeSource -> ShowS
$cshow :: V1AzureFileVolumeSource -> String
show :: V1AzureFileVolumeSource -> String
$cshowList :: [V1AzureFileVolumeSource] -> ShowS
showList :: [V1AzureFileVolumeSource] -> ShowS
P.Show, V1AzureFileVolumeSource -> V1AzureFileVolumeSource -> Bool
(V1AzureFileVolumeSource -> V1AzureFileVolumeSource -> Bool)
-> (V1AzureFileVolumeSource -> V1AzureFileVolumeSource -> Bool)
-> Eq V1AzureFileVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1AzureFileVolumeSource -> V1AzureFileVolumeSource -> Bool
== :: V1AzureFileVolumeSource -> V1AzureFileVolumeSource -> Bool
$c/= :: V1AzureFileVolumeSource -> V1AzureFileVolumeSource -> Bool
/= :: V1AzureFileVolumeSource -> V1AzureFileVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1AzureFileVolumeSource
instance A.FromJSON V1AzureFileVolumeSource where
  parseJSON :: Value -> Parser V1AzureFileVolumeSource
parseJSON = String
-> (Object -> Parser V1AzureFileVolumeSource)
-> Value
-> Parser V1AzureFileVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1AzureFileVolumeSource" ((Object -> Parser V1AzureFileVolumeSource)
 -> Value -> Parser V1AzureFileVolumeSource)
-> (Object -> Parser V1AzureFileVolumeSource)
-> Value
-> Parser V1AzureFileVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Bool -> Text -> Text -> V1AzureFileVolumeSource
V1AzureFileVolumeSource
      (Maybe Bool -> Text -> Text -> V1AzureFileVolumeSource)
-> Parser (Maybe Bool)
-> Parser (Text -> Text -> V1AzureFileVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readOnly")
      Parser (Text -> Text -> V1AzureFileVolumeSource)
-> Parser Text -> Parser (Text -> V1AzureFileVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"secretName")
      Parser (Text -> V1AzureFileVolumeSource)
-> Parser Text -> Parser V1AzureFileVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"shareName")

-- | ToJSON V1AzureFileVolumeSource
instance A.ToJSON V1AzureFileVolumeSource where
  toJSON :: V1AzureFileVolumeSource -> Value
toJSON V1AzureFileVolumeSource {Maybe Bool
Text
$sel:v1AzureFileVolumeSourceReadOnly:V1AzureFileVolumeSource :: V1AzureFileVolumeSource -> Maybe Bool
$sel:v1AzureFileVolumeSourceSecretName:V1AzureFileVolumeSource :: V1AzureFileVolumeSource -> Text
$sel:v1AzureFileVolumeSourceShareName:V1AzureFileVolumeSource :: V1AzureFileVolumeSource -> Text
v1AzureFileVolumeSourceReadOnly :: Maybe Bool
v1AzureFileVolumeSourceSecretName :: Text
v1AzureFileVolumeSourceShareName :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"readOnly" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1AzureFileVolumeSourceReadOnly
      , Key
"secretName" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1AzureFileVolumeSourceSecretName
      , Key
"shareName" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1AzureFileVolumeSourceShareName
      ]


-- | Construct a value of type 'V1AzureFileVolumeSource' (by applying it's required fields, if any)
mkV1AzureFileVolumeSource
  :: Text -- ^ 'v1AzureFileVolumeSourceSecretName': secretName is the  name of secret that contains Azure Storage Account Name and Key
  -> Text -- ^ 'v1AzureFileVolumeSourceShareName': shareName is the azure share Name
  -> V1AzureFileVolumeSource
mkV1AzureFileVolumeSource :: Text -> Text -> V1AzureFileVolumeSource
mkV1AzureFileVolumeSource Text
v1AzureFileVolumeSourceSecretName Text
v1AzureFileVolumeSourceShareName =
  V1AzureFileVolumeSource
  { $sel:v1AzureFileVolumeSourceReadOnly:V1AzureFileVolumeSource :: Maybe Bool
v1AzureFileVolumeSourceReadOnly = Maybe Bool
forall a. Maybe a
Nothing
  , Text
$sel:v1AzureFileVolumeSourceSecretName:V1AzureFileVolumeSource :: Text
v1AzureFileVolumeSourceSecretName :: Text
v1AzureFileVolumeSourceSecretName
  , Text
$sel:v1AzureFileVolumeSourceShareName:V1AzureFileVolumeSource :: Text
v1AzureFileVolumeSourceShareName :: Text
v1AzureFileVolumeSourceShareName
  }

-- ** V1Binding
-- | V1Binding
-- Binding ties one object to another; for example, a pod is bound to a node by a scheduler.
data V1Binding = V1Binding
  { V1Binding -> Maybe Text
v1BindingApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1Binding -> Maybe Text
v1BindingKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1Binding -> Maybe V1ObjectMeta
v1BindingMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1Binding -> V1ObjectReference
v1BindingTarget :: !(V1ObjectReference) -- ^ /Required/ "target"
  } deriving (Int -> V1Binding -> ShowS
[V1Binding] -> ShowS
V1Binding -> String
(Int -> V1Binding -> ShowS)
-> (V1Binding -> String)
-> ([V1Binding] -> ShowS)
-> Show V1Binding
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1Binding -> ShowS
showsPrec :: Int -> V1Binding -> ShowS
$cshow :: V1Binding -> String
show :: V1Binding -> String
$cshowList :: [V1Binding] -> ShowS
showList :: [V1Binding] -> ShowS
P.Show, V1Binding -> V1Binding -> Bool
(V1Binding -> V1Binding -> Bool)
-> (V1Binding -> V1Binding -> Bool) -> Eq V1Binding
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1Binding -> V1Binding -> Bool
== :: V1Binding -> V1Binding -> Bool
$c/= :: V1Binding -> V1Binding -> Bool
/= :: V1Binding -> V1Binding -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1Binding
instance A.FromJSON V1Binding where
  parseJSON :: Value -> Parser V1Binding
parseJSON = String -> (Object -> Parser V1Binding) -> Value -> Parser V1Binding
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1Binding" ((Object -> Parser V1Binding) -> Value -> Parser V1Binding)
-> (Object -> Parser V1Binding) -> Value -> Parser V1Binding
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> V1ObjectReference
-> V1Binding
V1Binding
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> V1ObjectReference
 -> V1Binding)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta -> V1ObjectReference -> V1Binding)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta -> V1ObjectReference -> V1Binding)
-> Parser (Maybe Text)
-> Parser (Maybe V1ObjectMeta -> V1ObjectReference -> V1Binding)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ObjectMeta -> V1ObjectReference -> V1Binding)
-> Parser (Maybe V1ObjectMeta)
-> Parser (V1ObjectReference -> V1Binding)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (V1ObjectReference -> V1Binding)
-> Parser V1ObjectReference -> Parser V1Binding
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1ObjectReference
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"target")

-- | ToJSON V1Binding
instance A.ToJSON V1Binding where
  toJSON :: V1Binding -> Value
toJSON V1Binding {Maybe Text
Maybe V1ObjectMeta
V1ObjectReference
$sel:v1BindingApiVersion:V1Binding :: V1Binding -> Maybe Text
$sel:v1BindingKind:V1Binding :: V1Binding -> Maybe Text
$sel:v1BindingMetadata:V1Binding :: V1Binding -> Maybe V1ObjectMeta
$sel:v1BindingTarget:V1Binding :: V1Binding -> V1ObjectReference
v1BindingApiVersion :: Maybe Text
v1BindingKind :: Maybe Text
v1BindingMetadata :: Maybe V1ObjectMeta
v1BindingTarget :: V1ObjectReference
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1BindingApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1BindingKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1BindingMetadata
      , Key
"target" Key -> V1ObjectReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1ObjectReference
v1BindingTarget
      ]


-- | Construct a value of type 'V1Binding' (by applying it's required fields, if any)
mkV1Binding
  :: V1ObjectReference -- ^ 'v1BindingTarget' 
  -> V1Binding
mkV1Binding :: V1ObjectReference -> V1Binding
mkV1Binding V1ObjectReference
v1BindingTarget =
  V1Binding
  { $sel:v1BindingApiVersion:V1Binding :: Maybe Text
v1BindingApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1BindingKind:V1Binding :: Maybe Text
v1BindingKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1BindingMetadata:V1Binding :: Maybe V1ObjectMeta
v1BindingMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , V1ObjectReference
$sel:v1BindingTarget:V1Binding :: V1ObjectReference
v1BindingTarget :: V1ObjectReference
v1BindingTarget
  }

-- ** V1BoundObjectReference
-- | V1BoundObjectReference
-- BoundObjectReference is a reference to an object that a token is bound to.
data V1BoundObjectReference = V1BoundObjectReference
  { V1BoundObjectReference -> Maybe Text
v1BoundObjectReferenceApiVersion :: !(Maybe Text) -- ^ "apiVersion" - API version of the referent.
  , V1BoundObjectReference -> Maybe Text
v1BoundObjectReferenceKind :: !(Maybe Text) -- ^ "kind" - Kind of the referent. Valid kinds are &#39;Pod&#39; and &#39;Secret&#39;.
  , V1BoundObjectReference -> Maybe Text
v1BoundObjectReferenceName :: !(Maybe Text) -- ^ "name" - Name of the referent.
  , V1BoundObjectReference -> Maybe Text
v1BoundObjectReferenceUid :: !(Maybe Text) -- ^ "uid" - UID of the referent.
  } deriving (Int -> V1BoundObjectReference -> ShowS
[V1BoundObjectReference] -> ShowS
V1BoundObjectReference -> String
(Int -> V1BoundObjectReference -> ShowS)
-> (V1BoundObjectReference -> String)
-> ([V1BoundObjectReference] -> ShowS)
-> Show V1BoundObjectReference
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1BoundObjectReference -> ShowS
showsPrec :: Int -> V1BoundObjectReference -> ShowS
$cshow :: V1BoundObjectReference -> String
show :: V1BoundObjectReference -> String
$cshowList :: [V1BoundObjectReference] -> ShowS
showList :: [V1BoundObjectReference] -> ShowS
P.Show, V1BoundObjectReference -> V1BoundObjectReference -> Bool
(V1BoundObjectReference -> V1BoundObjectReference -> Bool)
-> (V1BoundObjectReference -> V1BoundObjectReference -> Bool)
-> Eq V1BoundObjectReference
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1BoundObjectReference -> V1BoundObjectReference -> Bool
== :: V1BoundObjectReference -> V1BoundObjectReference -> Bool
$c/= :: V1BoundObjectReference -> V1BoundObjectReference -> Bool
/= :: V1BoundObjectReference -> V1BoundObjectReference -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1BoundObjectReference
instance A.FromJSON V1BoundObjectReference where
  parseJSON :: Value -> Parser V1BoundObjectReference
parseJSON = String
-> (Object -> Parser V1BoundObjectReference)
-> Value
-> Parser V1BoundObjectReference
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1BoundObjectReference" ((Object -> Parser V1BoundObjectReference)
 -> Value -> Parser V1BoundObjectReference)
-> (Object -> Parser V1BoundObjectReference)
-> Value
-> Parser V1BoundObjectReference
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> V1BoundObjectReference
V1BoundObjectReference
      (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> V1BoundObjectReference)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> Maybe Text -> V1BoundObjectReference)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text -> Maybe Text -> Maybe Text -> V1BoundObjectReference)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> V1BoundObjectReference)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe Text -> Maybe Text -> V1BoundObjectReference)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> V1BoundObjectReference)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"name")
      Parser (Maybe Text -> V1BoundObjectReference)
-> Parser (Maybe Text) -> Parser V1BoundObjectReference
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"uid")

-- | ToJSON V1BoundObjectReference
instance A.ToJSON V1BoundObjectReference where
  toJSON :: V1BoundObjectReference -> Value
toJSON V1BoundObjectReference {Maybe Text
$sel:v1BoundObjectReferenceApiVersion:V1BoundObjectReference :: V1BoundObjectReference -> Maybe Text
$sel:v1BoundObjectReferenceKind:V1BoundObjectReference :: V1BoundObjectReference -> Maybe Text
$sel:v1BoundObjectReferenceName:V1BoundObjectReference :: V1BoundObjectReference -> Maybe Text
$sel:v1BoundObjectReferenceUid:V1BoundObjectReference :: V1BoundObjectReference -> Maybe Text
v1BoundObjectReferenceApiVersion :: Maybe Text
v1BoundObjectReferenceKind :: Maybe Text
v1BoundObjectReferenceName :: Maybe Text
v1BoundObjectReferenceUid :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1BoundObjectReferenceApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1BoundObjectReferenceKind
      , Key
"name" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1BoundObjectReferenceName
      , Key
"uid" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1BoundObjectReferenceUid
      ]


-- | Construct a value of type 'V1BoundObjectReference' (by applying it's required fields, if any)
mkV1BoundObjectReference
  :: V1BoundObjectReference
mkV1BoundObjectReference :: V1BoundObjectReference
mkV1BoundObjectReference =
  V1BoundObjectReference
  { $sel:v1BoundObjectReferenceApiVersion:V1BoundObjectReference :: Maybe Text
v1BoundObjectReferenceApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1BoundObjectReferenceKind:V1BoundObjectReference :: Maybe Text
v1BoundObjectReferenceKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1BoundObjectReferenceName:V1BoundObjectReference :: Maybe Text
v1BoundObjectReferenceName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1BoundObjectReferenceUid:V1BoundObjectReference :: Maybe Text
v1BoundObjectReferenceUid = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1CSIDriver
-- | V1CSIDriver
-- CSIDriver captures information about a Container Storage Interface (CSI) volume driver deployed on the cluster. Kubernetes attach detach controller uses this object to determine whether attach is required. Kubelet uses this object to determine whether pod information needs to be passed on mount. CSIDriver objects are non-namespaced.
data V1CSIDriver = V1CSIDriver
  { V1CSIDriver -> Maybe Text
v1CSIDriverApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1CSIDriver -> Maybe Text
v1CSIDriverKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1CSIDriver -> Maybe V1ObjectMeta
v1CSIDriverMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1CSIDriver -> V1CSIDriverSpec
v1CSIDriverSpec :: !(V1CSIDriverSpec) -- ^ /Required/ "spec"
  } deriving (Int -> V1CSIDriver -> ShowS
[V1CSIDriver] -> ShowS
V1CSIDriver -> String
(Int -> V1CSIDriver -> ShowS)
-> (V1CSIDriver -> String)
-> ([V1CSIDriver] -> ShowS)
-> Show V1CSIDriver
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CSIDriver -> ShowS
showsPrec :: Int -> V1CSIDriver -> ShowS
$cshow :: V1CSIDriver -> String
show :: V1CSIDriver -> String
$cshowList :: [V1CSIDriver] -> ShowS
showList :: [V1CSIDriver] -> ShowS
P.Show, V1CSIDriver -> V1CSIDriver -> Bool
(V1CSIDriver -> V1CSIDriver -> Bool)
-> (V1CSIDriver -> V1CSIDriver -> Bool) -> Eq V1CSIDriver
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CSIDriver -> V1CSIDriver -> Bool
== :: V1CSIDriver -> V1CSIDriver -> Bool
$c/= :: V1CSIDriver -> V1CSIDriver -> Bool
/= :: V1CSIDriver -> V1CSIDriver -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CSIDriver
instance A.FromJSON V1CSIDriver where
  parseJSON :: Value -> Parser V1CSIDriver
parseJSON = String
-> (Object -> Parser V1CSIDriver) -> Value -> Parser V1CSIDriver
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CSIDriver" ((Object -> Parser V1CSIDriver) -> Value -> Parser V1CSIDriver)
-> (Object -> Parser V1CSIDriver) -> Value -> Parser V1CSIDriver
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> V1CSIDriverSpec
-> V1CSIDriver
V1CSIDriver
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> V1CSIDriverSpec
 -> V1CSIDriver)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta -> V1CSIDriverSpec -> V1CSIDriver)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta -> V1CSIDriverSpec -> V1CSIDriver)
-> Parser (Maybe Text)
-> Parser (Maybe V1ObjectMeta -> V1CSIDriverSpec -> V1CSIDriver)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ObjectMeta -> V1CSIDriverSpec -> V1CSIDriver)
-> Parser (Maybe V1ObjectMeta)
-> Parser (V1CSIDriverSpec -> V1CSIDriver)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (V1CSIDriverSpec -> V1CSIDriver)
-> Parser V1CSIDriverSpec -> Parser V1CSIDriver
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1CSIDriverSpec
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"spec")

-- | ToJSON V1CSIDriver
instance A.ToJSON V1CSIDriver where
  toJSON :: V1CSIDriver -> Value
toJSON V1CSIDriver {Maybe Text
Maybe V1ObjectMeta
V1CSIDriverSpec
$sel:v1CSIDriverApiVersion:V1CSIDriver :: V1CSIDriver -> Maybe Text
$sel:v1CSIDriverKind:V1CSIDriver :: V1CSIDriver -> Maybe Text
$sel:v1CSIDriverMetadata:V1CSIDriver :: V1CSIDriver -> Maybe V1ObjectMeta
$sel:v1CSIDriverSpec:V1CSIDriver :: V1CSIDriver -> V1CSIDriverSpec
v1CSIDriverApiVersion :: Maybe Text
v1CSIDriverKind :: Maybe Text
v1CSIDriverMetadata :: Maybe V1ObjectMeta
v1CSIDriverSpec :: V1CSIDriverSpec
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CSIDriverApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CSIDriverKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1CSIDriverMetadata
      , Key
"spec" Key -> V1CSIDriverSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1CSIDriverSpec
v1CSIDriverSpec
      ]


-- | Construct a value of type 'V1CSIDriver' (by applying it's required fields, if any)
mkV1CSIDriver
  :: V1CSIDriverSpec -- ^ 'v1CSIDriverSpec' 
  -> V1CSIDriver
mkV1CSIDriver :: V1CSIDriverSpec -> V1CSIDriver
mkV1CSIDriver V1CSIDriverSpec
v1CSIDriverSpec =
  V1CSIDriver
  { $sel:v1CSIDriverApiVersion:V1CSIDriver :: Maybe Text
v1CSIDriverApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1CSIDriverKind:V1CSIDriver :: Maybe Text
v1CSIDriverKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1CSIDriverMetadata:V1CSIDriver :: Maybe V1ObjectMeta
v1CSIDriverMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , V1CSIDriverSpec
$sel:v1CSIDriverSpec:V1CSIDriver :: V1CSIDriverSpec
v1CSIDriverSpec :: V1CSIDriverSpec
v1CSIDriverSpec
  }

-- ** V1CSIDriverList
-- | V1CSIDriverList
-- CSIDriverList is a collection of CSIDriver objects.
data V1CSIDriverList = V1CSIDriverList
  { V1CSIDriverList -> Maybe Text
v1CSIDriverListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1CSIDriverList -> [V1CSIDriver]
v1CSIDriverListItems :: !([V1CSIDriver]) -- ^ /Required/ "items" - items is the list of CSIDriver
  , V1CSIDriverList -> Maybe Text
v1CSIDriverListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1CSIDriverList -> Maybe V1ListMeta
v1CSIDriverListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1CSIDriverList -> ShowS
[V1CSIDriverList] -> ShowS
V1CSIDriverList -> String
(Int -> V1CSIDriverList -> ShowS)
-> (V1CSIDriverList -> String)
-> ([V1CSIDriverList] -> ShowS)
-> Show V1CSIDriverList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CSIDriverList -> ShowS
showsPrec :: Int -> V1CSIDriverList -> ShowS
$cshow :: V1CSIDriverList -> String
show :: V1CSIDriverList -> String
$cshowList :: [V1CSIDriverList] -> ShowS
showList :: [V1CSIDriverList] -> ShowS
P.Show, V1CSIDriverList -> V1CSIDriverList -> Bool
(V1CSIDriverList -> V1CSIDriverList -> Bool)
-> (V1CSIDriverList -> V1CSIDriverList -> Bool)
-> Eq V1CSIDriverList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CSIDriverList -> V1CSIDriverList -> Bool
== :: V1CSIDriverList -> V1CSIDriverList -> Bool
$c/= :: V1CSIDriverList -> V1CSIDriverList -> Bool
/= :: V1CSIDriverList -> V1CSIDriverList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CSIDriverList
instance A.FromJSON V1CSIDriverList where
  parseJSON :: Value -> Parser V1CSIDriverList
parseJSON = String
-> (Object -> Parser V1CSIDriverList)
-> Value
-> Parser V1CSIDriverList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CSIDriverList" ((Object -> Parser V1CSIDriverList)
 -> Value -> Parser V1CSIDriverList)
-> (Object -> Parser V1CSIDriverList)
-> Value
-> Parser V1CSIDriverList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1CSIDriver]
-> Maybe Text
-> Maybe V1ListMeta
-> V1CSIDriverList
V1CSIDriverList
      (Maybe Text
 -> [V1CSIDriver]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1CSIDriverList)
-> Parser (Maybe Text)
-> Parser
     ([V1CSIDriver]
      -> Maybe Text -> Maybe V1ListMeta -> V1CSIDriverList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1CSIDriver]
   -> Maybe Text -> Maybe V1ListMeta -> V1CSIDriverList)
-> Parser [V1CSIDriver]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1CSIDriverList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1CSIDriver]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1CSIDriverList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1CSIDriverList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1CSIDriverList)
-> Parser (Maybe V1ListMeta) -> Parser V1CSIDriverList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1CSIDriverList
instance A.ToJSON V1CSIDriverList where
  toJSON :: V1CSIDriverList -> Value
toJSON V1CSIDriverList {[V1CSIDriver]
Maybe Text
Maybe V1ListMeta
$sel:v1CSIDriverListApiVersion:V1CSIDriverList :: V1CSIDriverList -> Maybe Text
$sel:v1CSIDriverListItems:V1CSIDriverList :: V1CSIDriverList -> [V1CSIDriver]
$sel:v1CSIDriverListKind:V1CSIDriverList :: V1CSIDriverList -> Maybe Text
$sel:v1CSIDriverListMetadata:V1CSIDriverList :: V1CSIDriverList -> Maybe V1ListMeta
v1CSIDriverListApiVersion :: Maybe Text
v1CSIDriverListItems :: [V1CSIDriver]
v1CSIDriverListKind :: Maybe Text
v1CSIDriverListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CSIDriverListApiVersion
      , Key
"items" Key -> [V1CSIDriver] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1CSIDriver]
v1CSIDriverListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CSIDriverListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1CSIDriverListMetadata
      ]


-- | Construct a value of type 'V1CSIDriverList' (by applying it's required fields, if any)
mkV1CSIDriverList
  :: [V1CSIDriver] -- ^ 'v1CSIDriverListItems': items is the list of CSIDriver
  -> V1CSIDriverList
mkV1CSIDriverList :: [V1CSIDriver] -> V1CSIDriverList
mkV1CSIDriverList [V1CSIDriver]
v1CSIDriverListItems =
  V1CSIDriverList
  { $sel:v1CSIDriverListApiVersion:V1CSIDriverList :: Maybe Text
v1CSIDriverListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1CSIDriver]
$sel:v1CSIDriverListItems:V1CSIDriverList :: [V1CSIDriver]
v1CSIDriverListItems :: [V1CSIDriver]
v1CSIDriverListItems
  , $sel:v1CSIDriverListKind:V1CSIDriverList :: Maybe Text
v1CSIDriverListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1CSIDriverListMetadata:V1CSIDriverList :: Maybe V1ListMeta
v1CSIDriverListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1CSIDriverSpec
-- | V1CSIDriverSpec
-- CSIDriverSpec is the specification of a CSIDriver.
data V1CSIDriverSpec = V1CSIDriverSpec
  { V1CSIDriverSpec -> Maybe Bool
v1CSIDriverSpecAttachRequired :: !(Maybe Bool) -- ^ "attachRequired" - attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called.  This field is immutable.
  , V1CSIDriverSpec -> Maybe Text
v1CSIDriverSpecFsGroupPolicy :: !(Maybe Text) -- ^ "fsGroupPolicy" - fsGroupPolicy defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details.  This field was immutable in Kubernetes &lt; 1.29 and now is mutable.  Defaults to ReadWriteOnceWithFSType, which will examine each volume to determine if Kubernetes should modify ownership and permissions of the volume. With the default policy the defined fsGroup will only be applied if a fstype is defined and the volume&#39;s access mode contains ReadWriteOnce.
  , V1CSIDriverSpec -> Maybe Bool
v1CSIDriverSpecPodInfoOnMount :: !(Maybe Bool) -- ^ "podInfoOnMount" - podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations, if set to true. If set to false, pod information will not be passed on mount. Default is false.  The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext.  The following VolumeContext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \&quot;csi.storage.k8s.io/pod.name\&quot;: pod.Name \&quot;csi.storage.k8s.io/pod.namespace\&quot;: pod.Namespace \&quot;csi.storage.k8s.io/pod.uid\&quot;: string(pod.UID) \&quot;csi.storage.k8s.io/ephemeral\&quot;: \&quot;true\&quot; if the volume is an ephemeral inline volume                                 defined by a CSIVolumeSource, otherwise \&quot;false\&quot;  \&quot;csi.storage.k8s.io/ephemeral\&quot; is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \&quot;Persistent\&quot; and \&quot;Ephemeral\&quot; VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn&#39;t support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver.  This field was immutable in Kubernetes &lt; 1.29 and now is mutable.
  , V1CSIDriverSpec -> Maybe Bool
v1CSIDriverSpecRequiresRepublish :: !(Maybe Bool) -- ^ "requiresRepublish" - requiresRepublish indicates the CSI driver wants &#x60;NodePublishVolume&#x60; being periodically called to reflect any possible change in the mounted volume. This field defaults to false.  Note: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container.
  , V1CSIDriverSpec -> Maybe Bool
v1CSIDriverSpecSeLinuxMount :: !(Maybe Bool) -- ^ "seLinuxMount" - seLinuxMount specifies if the CSI driver supports \&quot;-o context\&quot; mount option.  When \&quot;true\&quot;, the CSI driver must ensure that all volumes provided by this CSI driver can be mounted separately with different &#x60;-o context&#x60; options. This is typical for storage backends that provide volumes as filesystems on block devices or as independent shared volumes. Kubernetes will call NodeStage / NodePublish with \&quot;-o context&#x3D;xyz\&quot; mount option when mounting a ReadWriteOncePod volume used in Pod that has explicitly set SELinux context. In the future, it may be expanded to other volume AccessModes. In any case, Kubernetes will ensure that the volume is mounted only with a single SELinux context.  When \&quot;false\&quot;, Kubernetes won&#39;t pass any special SELinux mount options to the driver. This is typical for volumes that represent subdirectories of a bigger shared filesystem.  Default is \&quot;false\&quot;.
  , V1CSIDriverSpec -> Maybe Bool
v1CSIDriverSpecStorageCapacity :: !(Maybe Bool) -- ^ "storageCapacity" - storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information, if set to true.  The check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object.  Alternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published.  This field was immutable in Kubernetes &lt;&#x3D; 1.22 and now is mutable.
  , V1CSIDriverSpec -> Maybe [StorageV1TokenRequest]
v1CSIDriverSpecTokenRequests :: !(Maybe [StorageV1TokenRequest]) -- ^ "tokenRequests" - tokenRequests indicates the CSI driver needs pods&#39; service account tokens it is mounting volume for to do necessary authentication. Kubelet will pass the tokens in VolumeContext in the CSI NodePublishVolume calls. The CSI driver should parse and validate the following VolumeContext: \&quot;csi.storage.k8s.io/serviceAccount.tokens\&quot;: {   \&quot;&lt;audience&gt;\&quot;: {     \&quot;token\&quot;: &lt;token&gt;,     \&quot;expirationTimestamp\&quot;: &lt;expiration timestamp in RFC3339&gt;,   },   ... }  Note: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically.
  , V1CSIDriverSpec -> Maybe [Text]
v1CSIDriverSpecVolumeLifecycleModes :: !(Maybe [Text]) -- ^ "volumeLifecycleModes" - volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is \&quot;Persistent\&quot;, which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism.  The other mode is \&quot;Ephemeral\&quot;. In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume.  For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future.  This field is beta. This field is immutable.
  } deriving (Int -> V1CSIDriverSpec -> ShowS
[V1CSIDriverSpec] -> ShowS
V1CSIDriverSpec -> String
(Int -> V1CSIDriverSpec -> ShowS)
-> (V1CSIDriverSpec -> String)
-> ([V1CSIDriverSpec] -> ShowS)
-> Show V1CSIDriverSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CSIDriverSpec -> ShowS
showsPrec :: Int -> V1CSIDriverSpec -> ShowS
$cshow :: V1CSIDriverSpec -> String
show :: V1CSIDriverSpec -> String
$cshowList :: [V1CSIDriverSpec] -> ShowS
showList :: [V1CSIDriverSpec] -> ShowS
P.Show, V1CSIDriverSpec -> V1CSIDriverSpec -> Bool
(V1CSIDriverSpec -> V1CSIDriverSpec -> Bool)
-> (V1CSIDriverSpec -> V1CSIDriverSpec -> Bool)
-> Eq V1CSIDriverSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CSIDriverSpec -> V1CSIDriverSpec -> Bool
== :: V1CSIDriverSpec -> V1CSIDriverSpec -> Bool
$c/= :: V1CSIDriverSpec -> V1CSIDriverSpec -> Bool
/= :: V1CSIDriverSpec -> V1CSIDriverSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CSIDriverSpec
instance A.FromJSON V1CSIDriverSpec where
  parseJSON :: Value -> Parser V1CSIDriverSpec
parseJSON = String
-> (Object -> Parser V1CSIDriverSpec)
-> Value
-> Parser V1CSIDriverSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CSIDriverSpec" ((Object -> Parser V1CSIDriverSpec)
 -> Value -> Parser V1CSIDriverSpec)
-> (Object -> Parser V1CSIDriverSpec)
-> Value
-> Parser V1CSIDriverSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [StorageV1TokenRequest]
-> Maybe [Text]
-> V1CSIDriverSpec
V1CSIDriverSpec
      (Maybe Bool
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Bool
 -> Maybe Bool
 -> Maybe Bool
 -> Maybe [StorageV1TokenRequest]
 -> Maybe [Text]
 -> V1CSIDriverSpec)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [StorageV1TokenRequest]
      -> Maybe [Text]
      -> V1CSIDriverSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"attachRequired")
      Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [StorageV1TokenRequest]
   -> Maybe [Text]
   -> V1CSIDriverSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [StorageV1TokenRequest]
      -> Maybe [Text]
      -> V1CSIDriverSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fsGroupPolicy")
      Parser
  (Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [StorageV1TokenRequest]
   -> Maybe [Text]
   -> V1CSIDriverSpec)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [StorageV1TokenRequest]
      -> Maybe [Text]
      -> V1CSIDriverSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"podInfoOnMount")
      Parser
  (Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [StorageV1TokenRequest]
   -> Maybe [Text]
   -> V1CSIDriverSpec)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Bool
      -> Maybe Bool
      -> Maybe [StorageV1TokenRequest]
      -> Maybe [Text]
      -> V1CSIDriverSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"requiresRepublish")
      Parser
  (Maybe Bool
   -> Maybe Bool
   -> Maybe [StorageV1TokenRequest]
   -> Maybe [Text]
   -> V1CSIDriverSpec)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Bool
      -> Maybe [StorageV1TokenRequest]
      -> Maybe [Text]
      -> V1CSIDriverSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"seLinuxMount")
      Parser
  (Maybe Bool
   -> Maybe [StorageV1TokenRequest]
   -> Maybe [Text]
   -> V1CSIDriverSpec)
-> Parser (Maybe Bool)
-> Parser
     (Maybe [StorageV1TokenRequest] -> Maybe [Text] -> V1CSIDriverSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"storageCapacity")
      Parser
  (Maybe [StorageV1TokenRequest] -> Maybe [Text] -> V1CSIDriverSpec)
-> Parser (Maybe [StorageV1TokenRequest])
-> Parser (Maybe [Text] -> V1CSIDriverSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [StorageV1TokenRequest])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"tokenRequests")
      Parser (Maybe [Text] -> V1CSIDriverSpec)
-> Parser (Maybe [Text]) -> Parser V1CSIDriverSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"volumeLifecycleModes")

-- | ToJSON V1CSIDriverSpec
instance A.ToJSON V1CSIDriverSpec where
  toJSON :: V1CSIDriverSpec -> Value
toJSON V1CSIDriverSpec {Maybe Bool
Maybe [Text]
Maybe [StorageV1TokenRequest]
Maybe Text
$sel:v1CSIDriverSpecAttachRequired:V1CSIDriverSpec :: V1CSIDriverSpec -> Maybe Bool
$sel:v1CSIDriverSpecFsGroupPolicy:V1CSIDriverSpec :: V1CSIDriverSpec -> Maybe Text
$sel:v1CSIDriverSpecPodInfoOnMount:V1CSIDriverSpec :: V1CSIDriverSpec -> Maybe Bool
$sel:v1CSIDriverSpecRequiresRepublish:V1CSIDriverSpec :: V1CSIDriverSpec -> Maybe Bool
$sel:v1CSIDriverSpecSeLinuxMount:V1CSIDriverSpec :: V1CSIDriverSpec -> Maybe Bool
$sel:v1CSIDriverSpecStorageCapacity:V1CSIDriverSpec :: V1CSIDriverSpec -> Maybe Bool
$sel:v1CSIDriverSpecTokenRequests:V1CSIDriverSpec :: V1CSIDriverSpec -> Maybe [StorageV1TokenRequest]
$sel:v1CSIDriverSpecVolumeLifecycleModes:V1CSIDriverSpec :: V1CSIDriverSpec -> Maybe [Text]
v1CSIDriverSpecAttachRequired :: Maybe Bool
v1CSIDriverSpecFsGroupPolicy :: Maybe Text
v1CSIDriverSpecPodInfoOnMount :: Maybe Bool
v1CSIDriverSpecRequiresRepublish :: Maybe Bool
v1CSIDriverSpecSeLinuxMount :: Maybe Bool
v1CSIDriverSpecStorageCapacity :: Maybe Bool
v1CSIDriverSpecTokenRequests :: Maybe [StorageV1TokenRequest]
v1CSIDriverSpecVolumeLifecycleModes :: Maybe [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"attachRequired" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1CSIDriverSpecAttachRequired
      , Key
"fsGroupPolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CSIDriverSpecFsGroupPolicy
      , Key
"podInfoOnMount" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1CSIDriverSpecPodInfoOnMount
      , Key
"requiresRepublish" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1CSIDriverSpecRequiresRepublish
      , Key
"seLinuxMount" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1CSIDriverSpecSeLinuxMount
      , Key
"storageCapacity" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1CSIDriverSpecStorageCapacity
      , Key
"tokenRequests" Key -> Maybe [StorageV1TokenRequest] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [StorageV1TokenRequest]
v1CSIDriverSpecTokenRequests
      , Key
"volumeLifecycleModes" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1CSIDriverSpecVolumeLifecycleModes
      ]


-- | Construct a value of type 'V1CSIDriverSpec' (by applying it's required fields, if any)
mkV1CSIDriverSpec
  :: V1CSIDriverSpec
mkV1CSIDriverSpec :: V1CSIDriverSpec
mkV1CSIDriverSpec =
  V1CSIDriverSpec
  { $sel:v1CSIDriverSpecAttachRequired:V1CSIDriverSpec :: Maybe Bool
v1CSIDriverSpecAttachRequired = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1CSIDriverSpecFsGroupPolicy:V1CSIDriverSpec :: Maybe Text
v1CSIDriverSpecFsGroupPolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1CSIDriverSpecPodInfoOnMount:V1CSIDriverSpec :: Maybe Bool
v1CSIDriverSpecPodInfoOnMount = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1CSIDriverSpecRequiresRepublish:V1CSIDriverSpec :: Maybe Bool
v1CSIDriverSpecRequiresRepublish = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1CSIDriverSpecSeLinuxMount:V1CSIDriverSpec :: Maybe Bool
v1CSIDriverSpecSeLinuxMount = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1CSIDriverSpecStorageCapacity:V1CSIDriverSpec :: Maybe Bool
v1CSIDriverSpecStorageCapacity = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1CSIDriverSpecTokenRequests:V1CSIDriverSpec :: Maybe [StorageV1TokenRequest]
v1CSIDriverSpecTokenRequests = Maybe [StorageV1TokenRequest]
forall a. Maybe a
Nothing
  , $sel:v1CSIDriverSpecVolumeLifecycleModes:V1CSIDriverSpec :: Maybe [Text]
v1CSIDriverSpecVolumeLifecycleModes = Maybe [Text]
forall a. Maybe a
Nothing
  }

-- ** V1CSINode
-- | V1CSINode
-- CSINode holds information about all CSI drivers installed on a node. CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn't create this object. CSINode has an OwnerReference that points to the corresponding node object.
data V1CSINode = V1CSINode
  { V1CSINode -> Maybe Text
v1CSINodeApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1CSINode -> Maybe Text
v1CSINodeKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1CSINode -> Maybe V1ObjectMeta
v1CSINodeMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1CSINode -> V1CSINodeSpec
v1CSINodeSpec :: !(V1CSINodeSpec) -- ^ /Required/ "spec"
  } deriving (Int -> V1CSINode -> ShowS
[V1CSINode] -> ShowS
V1CSINode -> String
(Int -> V1CSINode -> ShowS)
-> (V1CSINode -> String)
-> ([V1CSINode] -> ShowS)
-> Show V1CSINode
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CSINode -> ShowS
showsPrec :: Int -> V1CSINode -> ShowS
$cshow :: V1CSINode -> String
show :: V1CSINode -> String
$cshowList :: [V1CSINode] -> ShowS
showList :: [V1CSINode] -> ShowS
P.Show, V1CSINode -> V1CSINode -> Bool
(V1CSINode -> V1CSINode -> Bool)
-> (V1CSINode -> V1CSINode -> Bool) -> Eq V1CSINode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CSINode -> V1CSINode -> Bool
== :: V1CSINode -> V1CSINode -> Bool
$c/= :: V1CSINode -> V1CSINode -> Bool
/= :: V1CSINode -> V1CSINode -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CSINode
instance A.FromJSON V1CSINode where
  parseJSON :: Value -> Parser V1CSINode
parseJSON = String -> (Object -> Parser V1CSINode) -> Value -> Parser V1CSINode
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CSINode" ((Object -> Parser V1CSINode) -> Value -> Parser V1CSINode)
-> (Object -> Parser V1CSINode) -> Value -> Parser V1CSINode
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text -> Maybe V1ObjectMeta -> V1CSINodeSpec -> V1CSINode
V1CSINode
      (Maybe Text
 -> Maybe Text -> Maybe V1ObjectMeta -> V1CSINodeSpec -> V1CSINode)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe V1ObjectMeta -> V1CSINodeSpec -> V1CSINode)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text -> Maybe V1ObjectMeta -> V1CSINodeSpec -> V1CSINode)
-> Parser (Maybe Text)
-> Parser (Maybe V1ObjectMeta -> V1CSINodeSpec -> V1CSINode)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ObjectMeta -> V1CSINodeSpec -> V1CSINode)
-> Parser (Maybe V1ObjectMeta)
-> Parser (V1CSINodeSpec -> V1CSINode)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (V1CSINodeSpec -> V1CSINode)
-> Parser V1CSINodeSpec -> Parser V1CSINode
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1CSINodeSpec
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"spec")

-- | ToJSON V1CSINode
instance A.ToJSON V1CSINode where
  toJSON :: V1CSINode -> Value
toJSON V1CSINode {Maybe Text
Maybe V1ObjectMeta
V1CSINodeSpec
$sel:v1CSINodeApiVersion:V1CSINode :: V1CSINode -> Maybe Text
$sel:v1CSINodeKind:V1CSINode :: V1CSINode -> Maybe Text
$sel:v1CSINodeMetadata:V1CSINode :: V1CSINode -> Maybe V1ObjectMeta
$sel:v1CSINodeSpec:V1CSINode :: V1CSINode -> V1CSINodeSpec
v1CSINodeApiVersion :: Maybe Text
v1CSINodeKind :: Maybe Text
v1CSINodeMetadata :: Maybe V1ObjectMeta
v1CSINodeSpec :: V1CSINodeSpec
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CSINodeApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CSINodeKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1CSINodeMetadata
      , Key
"spec" Key -> V1CSINodeSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1CSINodeSpec
v1CSINodeSpec
      ]


-- | Construct a value of type 'V1CSINode' (by applying it's required fields, if any)
mkV1CSINode
  :: V1CSINodeSpec -- ^ 'v1CSINodeSpec' 
  -> V1CSINode
mkV1CSINode :: V1CSINodeSpec -> V1CSINode
mkV1CSINode V1CSINodeSpec
v1CSINodeSpec =
  V1CSINode
  { $sel:v1CSINodeApiVersion:V1CSINode :: Maybe Text
v1CSINodeApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1CSINodeKind:V1CSINode :: Maybe Text
v1CSINodeKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1CSINodeMetadata:V1CSINode :: Maybe V1ObjectMeta
v1CSINodeMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , V1CSINodeSpec
$sel:v1CSINodeSpec:V1CSINode :: V1CSINodeSpec
v1CSINodeSpec :: V1CSINodeSpec
v1CSINodeSpec
  }

-- ** V1CSINodeDriver
-- | V1CSINodeDriver
-- CSINodeDriver holds information about the specification of one CSI driver installed on a node
data V1CSINodeDriver = V1CSINodeDriver
  { V1CSINodeDriver -> Maybe V1VolumeNodeResources
v1CSINodeDriverAllocatable :: !(Maybe V1VolumeNodeResources) -- ^ "allocatable"
  , V1CSINodeDriver -> Text
v1CSINodeDriverName :: !(Text) -- ^ /Required/ "name" - name represents the name of the CSI driver that this object refers to. This MUST be the same name returned by the CSI GetPluginName() call for that driver.
  , V1CSINodeDriver -> Text
v1CSINodeDriverNodeId :: !(Text) -- ^ /Required/ "nodeID" - nodeID of the node from the driver point of view. This field enables Kubernetes to communicate with storage systems that do not share the same nomenclature for nodes. For example, Kubernetes may refer to a given node as \&quot;node1\&quot;, but the storage system may refer to the same node as \&quot;nodeA\&quot;. When Kubernetes issues a command to the storage system to attach a volume to a specific node, it can use this field to refer to the node name using the ID that the storage system will understand, e.g. \&quot;nodeA\&quot; instead of \&quot;node1\&quot;. This field is required.
  , V1CSINodeDriver -> Maybe [Text]
v1CSINodeDriverTopologyKeys :: !(Maybe [Text]) -- ^ "topologyKeys" - topologyKeys is the list of keys supported by the driver. When a driver is initialized on a cluster, it provides a set of topology keys that it understands (e.g. \&quot;company.com/zone\&quot;, \&quot;company.com/region\&quot;). When a driver is initialized on a node, it provides the same topology keys along with values. Kubelet will expose these topology keys as labels on its own node object. When Kubernetes does topology aware provisioning, it can use this list to determine which labels it should retrieve from the node object and pass back to the driver. It is possible for different nodes to use different topology keys. This can be empty if driver does not support topology.
  } deriving (Int -> V1CSINodeDriver -> ShowS
[V1CSINodeDriver] -> ShowS
V1CSINodeDriver -> String
(Int -> V1CSINodeDriver -> ShowS)
-> (V1CSINodeDriver -> String)
-> ([V1CSINodeDriver] -> ShowS)
-> Show V1CSINodeDriver
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CSINodeDriver -> ShowS
showsPrec :: Int -> V1CSINodeDriver -> ShowS
$cshow :: V1CSINodeDriver -> String
show :: V1CSINodeDriver -> String
$cshowList :: [V1CSINodeDriver] -> ShowS
showList :: [V1CSINodeDriver] -> ShowS
P.Show, V1CSINodeDriver -> V1CSINodeDriver -> Bool
(V1CSINodeDriver -> V1CSINodeDriver -> Bool)
-> (V1CSINodeDriver -> V1CSINodeDriver -> Bool)
-> Eq V1CSINodeDriver
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CSINodeDriver -> V1CSINodeDriver -> Bool
== :: V1CSINodeDriver -> V1CSINodeDriver -> Bool
$c/= :: V1CSINodeDriver -> V1CSINodeDriver -> Bool
/= :: V1CSINodeDriver -> V1CSINodeDriver -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CSINodeDriver
instance A.FromJSON V1CSINodeDriver where
  parseJSON :: Value -> Parser V1CSINodeDriver
parseJSON = String
-> (Object -> Parser V1CSINodeDriver)
-> Value
-> Parser V1CSINodeDriver
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CSINodeDriver" ((Object -> Parser V1CSINodeDriver)
 -> Value -> Parser V1CSINodeDriver)
-> (Object -> Parser V1CSINodeDriver)
-> Value
-> Parser V1CSINodeDriver
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1VolumeNodeResources
-> Text -> Text -> Maybe [Text] -> V1CSINodeDriver
V1CSINodeDriver
      (Maybe V1VolumeNodeResources
 -> Text -> Text -> Maybe [Text] -> V1CSINodeDriver)
-> Parser (Maybe V1VolumeNodeResources)
-> Parser (Text -> Text -> Maybe [Text] -> V1CSINodeDriver)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1VolumeNodeResources)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"allocatable")
      Parser (Text -> Text -> Maybe [Text] -> V1CSINodeDriver)
-> Parser Text -> Parser (Text -> Maybe [Text] -> V1CSINodeDriver)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser (Text -> Maybe [Text] -> V1CSINodeDriver)
-> Parser Text -> Parser (Maybe [Text] -> V1CSINodeDriver)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"nodeID")
      Parser (Maybe [Text] -> V1CSINodeDriver)
-> Parser (Maybe [Text]) -> Parser V1CSINodeDriver
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"topologyKeys")

-- | ToJSON V1CSINodeDriver
instance A.ToJSON V1CSINodeDriver where
  toJSON :: V1CSINodeDriver -> Value
toJSON V1CSINodeDriver {Maybe [Text]
Maybe V1VolumeNodeResources
Text
$sel:v1CSINodeDriverAllocatable:V1CSINodeDriver :: V1CSINodeDriver -> Maybe V1VolumeNodeResources
$sel:v1CSINodeDriverName:V1CSINodeDriver :: V1CSINodeDriver -> Text
$sel:v1CSINodeDriverNodeId:V1CSINodeDriver :: V1CSINodeDriver -> Text
$sel:v1CSINodeDriverTopologyKeys:V1CSINodeDriver :: V1CSINodeDriver -> Maybe [Text]
v1CSINodeDriverAllocatable :: Maybe V1VolumeNodeResources
v1CSINodeDriverName :: Text
v1CSINodeDriverNodeId :: Text
v1CSINodeDriverTopologyKeys :: Maybe [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"allocatable" Key -> Maybe V1VolumeNodeResources -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1VolumeNodeResources
v1CSINodeDriverAllocatable
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1CSINodeDriverName
      , Key
"nodeID" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1CSINodeDriverNodeId
      , Key
"topologyKeys" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1CSINodeDriverTopologyKeys
      ]


-- | Construct a value of type 'V1CSINodeDriver' (by applying it's required fields, if any)
mkV1CSINodeDriver
  :: Text -- ^ 'v1CSINodeDriverName': name represents the name of the CSI driver that this object refers to. This MUST be the same name returned by the CSI GetPluginName() call for that driver.
  -> Text -- ^ 'v1CSINodeDriverNodeId': nodeID of the node from the driver point of view. This field enables Kubernetes to communicate with storage systems that do not share the same nomenclature for nodes. For example, Kubernetes may refer to a given node as \"node1\", but the storage system may refer to the same node as \"nodeA\". When Kubernetes issues a command to the storage system to attach a volume to a specific node, it can use this field to refer to the node name using the ID that the storage system will understand, e.g. \"nodeA\" instead of \"node1\". This field is required.
  -> V1CSINodeDriver
mkV1CSINodeDriver :: Text -> Text -> V1CSINodeDriver
mkV1CSINodeDriver Text
v1CSINodeDriverName Text
v1CSINodeDriverNodeId =
  V1CSINodeDriver
  { $sel:v1CSINodeDriverAllocatable:V1CSINodeDriver :: Maybe V1VolumeNodeResources
v1CSINodeDriverAllocatable = Maybe V1VolumeNodeResources
forall a. Maybe a
Nothing
  , Text
$sel:v1CSINodeDriverName:V1CSINodeDriver :: Text
v1CSINodeDriverName :: Text
v1CSINodeDriverName
  , Text
$sel:v1CSINodeDriverNodeId:V1CSINodeDriver :: Text
v1CSINodeDriverNodeId :: Text
v1CSINodeDriverNodeId
  , $sel:v1CSINodeDriverTopologyKeys:V1CSINodeDriver :: Maybe [Text]
v1CSINodeDriverTopologyKeys = Maybe [Text]
forall a. Maybe a
Nothing
  }

-- ** V1CSINodeList
-- | V1CSINodeList
-- CSINodeList is a collection of CSINode objects.
data V1CSINodeList = V1CSINodeList
  { V1CSINodeList -> Maybe Text
v1CSINodeListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1CSINodeList -> [V1CSINode]
v1CSINodeListItems :: !([V1CSINode]) -- ^ /Required/ "items" - items is the list of CSINode
  , V1CSINodeList -> Maybe Text
v1CSINodeListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1CSINodeList -> Maybe V1ListMeta
v1CSINodeListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1CSINodeList -> ShowS
[V1CSINodeList] -> ShowS
V1CSINodeList -> String
(Int -> V1CSINodeList -> ShowS)
-> (V1CSINodeList -> String)
-> ([V1CSINodeList] -> ShowS)
-> Show V1CSINodeList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CSINodeList -> ShowS
showsPrec :: Int -> V1CSINodeList -> ShowS
$cshow :: V1CSINodeList -> String
show :: V1CSINodeList -> String
$cshowList :: [V1CSINodeList] -> ShowS
showList :: [V1CSINodeList] -> ShowS
P.Show, V1CSINodeList -> V1CSINodeList -> Bool
(V1CSINodeList -> V1CSINodeList -> Bool)
-> (V1CSINodeList -> V1CSINodeList -> Bool) -> Eq V1CSINodeList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CSINodeList -> V1CSINodeList -> Bool
== :: V1CSINodeList -> V1CSINodeList -> Bool
$c/= :: V1CSINodeList -> V1CSINodeList -> Bool
/= :: V1CSINodeList -> V1CSINodeList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CSINodeList
instance A.FromJSON V1CSINodeList where
  parseJSON :: Value -> Parser V1CSINodeList
parseJSON = String
-> (Object -> Parser V1CSINodeList)
-> Value
-> Parser V1CSINodeList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CSINodeList" ((Object -> Parser V1CSINodeList) -> Value -> Parser V1CSINodeList)
-> (Object -> Parser V1CSINodeList)
-> Value
-> Parser V1CSINodeList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1CSINode] -> Maybe Text -> Maybe V1ListMeta -> V1CSINodeList
V1CSINodeList
      (Maybe Text
 -> [V1CSINode] -> Maybe Text -> Maybe V1ListMeta -> V1CSINodeList)
-> Parser (Maybe Text)
-> Parser
     ([V1CSINode] -> Maybe Text -> Maybe V1ListMeta -> V1CSINodeList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1CSINode] -> Maybe Text -> Maybe V1ListMeta -> V1CSINodeList)
-> Parser [V1CSINode]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1CSINodeList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1CSINode]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1CSINodeList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1CSINodeList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1CSINodeList)
-> Parser (Maybe V1ListMeta) -> Parser V1CSINodeList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1CSINodeList
instance A.ToJSON V1CSINodeList where
  toJSON :: V1CSINodeList -> Value
toJSON V1CSINodeList {[V1CSINode]
Maybe Text
Maybe V1ListMeta
$sel:v1CSINodeListApiVersion:V1CSINodeList :: V1CSINodeList -> Maybe Text
$sel:v1CSINodeListItems:V1CSINodeList :: V1CSINodeList -> [V1CSINode]
$sel:v1CSINodeListKind:V1CSINodeList :: V1CSINodeList -> Maybe Text
$sel:v1CSINodeListMetadata:V1CSINodeList :: V1CSINodeList -> Maybe V1ListMeta
v1CSINodeListApiVersion :: Maybe Text
v1CSINodeListItems :: [V1CSINode]
v1CSINodeListKind :: Maybe Text
v1CSINodeListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CSINodeListApiVersion
      , Key
"items" Key -> [V1CSINode] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1CSINode]
v1CSINodeListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CSINodeListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1CSINodeListMetadata
      ]


-- | Construct a value of type 'V1CSINodeList' (by applying it's required fields, if any)
mkV1CSINodeList
  :: [V1CSINode] -- ^ 'v1CSINodeListItems': items is the list of CSINode
  -> V1CSINodeList
mkV1CSINodeList :: [V1CSINode] -> V1CSINodeList
mkV1CSINodeList [V1CSINode]
v1CSINodeListItems =
  V1CSINodeList
  { $sel:v1CSINodeListApiVersion:V1CSINodeList :: Maybe Text
v1CSINodeListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1CSINode]
$sel:v1CSINodeListItems:V1CSINodeList :: [V1CSINode]
v1CSINodeListItems :: [V1CSINode]
v1CSINodeListItems
  , $sel:v1CSINodeListKind:V1CSINodeList :: Maybe Text
v1CSINodeListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1CSINodeListMetadata:V1CSINodeList :: Maybe V1ListMeta
v1CSINodeListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1CSINodeSpec
-- | V1CSINodeSpec
-- CSINodeSpec holds information about the specification of all CSI drivers installed on a node
data V1CSINodeSpec = V1CSINodeSpec
  { V1CSINodeSpec -> [V1CSINodeDriver]
v1CSINodeSpecDrivers :: !([V1CSINodeDriver]) -- ^ /Required/ "drivers" - drivers is a list of information of all CSI Drivers existing on a node. If all drivers in the list are uninstalled, this can become empty.
  } deriving (Int -> V1CSINodeSpec -> ShowS
[V1CSINodeSpec] -> ShowS
V1CSINodeSpec -> String
(Int -> V1CSINodeSpec -> ShowS)
-> (V1CSINodeSpec -> String)
-> ([V1CSINodeSpec] -> ShowS)
-> Show V1CSINodeSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CSINodeSpec -> ShowS
showsPrec :: Int -> V1CSINodeSpec -> ShowS
$cshow :: V1CSINodeSpec -> String
show :: V1CSINodeSpec -> String
$cshowList :: [V1CSINodeSpec] -> ShowS
showList :: [V1CSINodeSpec] -> ShowS
P.Show, V1CSINodeSpec -> V1CSINodeSpec -> Bool
(V1CSINodeSpec -> V1CSINodeSpec -> Bool)
-> (V1CSINodeSpec -> V1CSINodeSpec -> Bool) -> Eq V1CSINodeSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CSINodeSpec -> V1CSINodeSpec -> Bool
== :: V1CSINodeSpec -> V1CSINodeSpec -> Bool
$c/= :: V1CSINodeSpec -> V1CSINodeSpec -> Bool
/= :: V1CSINodeSpec -> V1CSINodeSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CSINodeSpec
instance A.FromJSON V1CSINodeSpec where
  parseJSON :: Value -> Parser V1CSINodeSpec
parseJSON = String
-> (Object -> Parser V1CSINodeSpec)
-> Value
-> Parser V1CSINodeSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CSINodeSpec" ((Object -> Parser V1CSINodeSpec) -> Value -> Parser V1CSINodeSpec)
-> (Object -> Parser V1CSINodeSpec)
-> Value
-> Parser V1CSINodeSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    [V1CSINodeDriver] -> V1CSINodeSpec
V1CSINodeSpec
      ([V1CSINodeDriver] -> V1CSINodeSpec)
-> Parser [V1CSINodeDriver] -> Parser V1CSINodeSpec
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser [V1CSINodeDriver]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"drivers")

-- | ToJSON V1CSINodeSpec
instance A.ToJSON V1CSINodeSpec where
  toJSON :: V1CSINodeSpec -> Value
toJSON V1CSINodeSpec {[V1CSINodeDriver]
$sel:v1CSINodeSpecDrivers:V1CSINodeSpec :: V1CSINodeSpec -> [V1CSINodeDriver]
v1CSINodeSpecDrivers :: [V1CSINodeDriver]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"drivers" Key -> [V1CSINodeDriver] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1CSINodeDriver]
v1CSINodeSpecDrivers
      ]


-- | Construct a value of type 'V1CSINodeSpec' (by applying it's required fields, if any)
mkV1CSINodeSpec
  :: [V1CSINodeDriver] -- ^ 'v1CSINodeSpecDrivers': drivers is a list of information of all CSI Drivers existing on a node. If all drivers in the list are uninstalled, this can become empty.
  -> V1CSINodeSpec
mkV1CSINodeSpec :: [V1CSINodeDriver] -> V1CSINodeSpec
mkV1CSINodeSpec [V1CSINodeDriver]
v1CSINodeSpecDrivers =
  V1CSINodeSpec
  { [V1CSINodeDriver]
$sel:v1CSINodeSpecDrivers:V1CSINodeSpec :: [V1CSINodeDriver]
v1CSINodeSpecDrivers :: [V1CSINodeDriver]
v1CSINodeSpecDrivers
  }

-- ** V1CSIPersistentVolumeSource
-- | V1CSIPersistentVolumeSource
-- Represents storage that is managed by an external CSI volume driver
data V1CSIPersistentVolumeSource = V1CSIPersistentVolumeSource
  { V1CSIPersistentVolumeSource -> Maybe V1SecretReference
v1CSIPersistentVolumeSourceControllerExpandSecretRef :: !(Maybe V1SecretReference) -- ^ "controllerExpandSecretRef"
  , V1CSIPersistentVolumeSource -> Maybe V1SecretReference
v1CSIPersistentVolumeSourceControllerPublishSecretRef :: !(Maybe V1SecretReference) -- ^ "controllerPublishSecretRef"
  , V1CSIPersistentVolumeSource -> Text
v1CSIPersistentVolumeSourceDriver :: !(Text) -- ^ /Required/ "driver" - driver is the name of the driver to use for this volume. Required.
  , V1CSIPersistentVolumeSource -> Maybe Text
v1CSIPersistentVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - fsType to mount. Must be a filesystem type supported by the host operating system. Ex. \&quot;ext4\&quot;, \&quot;xfs\&quot;, \&quot;ntfs\&quot;.
  , V1CSIPersistentVolumeSource -> Maybe V1SecretReference
v1CSIPersistentVolumeSourceNodeExpandSecretRef :: !(Maybe V1SecretReference) -- ^ "nodeExpandSecretRef"
  , V1CSIPersistentVolumeSource -> Maybe V1SecretReference
v1CSIPersistentVolumeSourceNodePublishSecretRef :: !(Maybe V1SecretReference) -- ^ "nodePublishSecretRef"
  , V1CSIPersistentVolumeSource -> Maybe V1SecretReference
v1CSIPersistentVolumeSourceNodeStageSecretRef :: !(Maybe V1SecretReference) -- ^ "nodeStageSecretRef"
  , V1CSIPersistentVolumeSource -> Maybe Bool
v1CSIPersistentVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - readOnly value to pass to ControllerPublishVolumeRequest. Defaults to false (read/write).
  , V1CSIPersistentVolumeSource -> Maybe (Map String Text)
v1CSIPersistentVolumeSourceVolumeAttributes :: !(Maybe (Map.Map String Text)) -- ^ "volumeAttributes" - volumeAttributes of the volume to publish.
  , V1CSIPersistentVolumeSource -> Text
v1CSIPersistentVolumeSourceVolumeHandle :: !(Text) -- ^ /Required/ "volumeHandle" - volumeHandle is the unique volume name returned by the CSI volume plugin’s CreateVolume to refer to the volume on all subsequent calls. Required.
  } deriving (Int -> V1CSIPersistentVolumeSource -> ShowS
[V1CSIPersistentVolumeSource] -> ShowS
V1CSIPersistentVolumeSource -> String
(Int -> V1CSIPersistentVolumeSource -> ShowS)
-> (V1CSIPersistentVolumeSource -> String)
-> ([V1CSIPersistentVolumeSource] -> ShowS)
-> Show V1CSIPersistentVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CSIPersistentVolumeSource -> ShowS
showsPrec :: Int -> V1CSIPersistentVolumeSource -> ShowS
$cshow :: V1CSIPersistentVolumeSource -> String
show :: V1CSIPersistentVolumeSource -> String
$cshowList :: [V1CSIPersistentVolumeSource] -> ShowS
showList :: [V1CSIPersistentVolumeSource] -> ShowS
P.Show, V1CSIPersistentVolumeSource -> V1CSIPersistentVolumeSource -> Bool
(V1CSIPersistentVolumeSource
 -> V1CSIPersistentVolumeSource -> Bool)
-> (V1CSIPersistentVolumeSource
    -> V1CSIPersistentVolumeSource -> Bool)
-> Eq V1CSIPersistentVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CSIPersistentVolumeSource -> V1CSIPersistentVolumeSource -> Bool
== :: V1CSIPersistentVolumeSource -> V1CSIPersistentVolumeSource -> Bool
$c/= :: V1CSIPersistentVolumeSource -> V1CSIPersistentVolumeSource -> Bool
/= :: V1CSIPersistentVolumeSource -> V1CSIPersistentVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CSIPersistentVolumeSource
instance A.FromJSON V1CSIPersistentVolumeSource where
  parseJSON :: Value -> Parser V1CSIPersistentVolumeSource
parseJSON = String
-> (Object -> Parser V1CSIPersistentVolumeSource)
-> Value
-> Parser V1CSIPersistentVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CSIPersistentVolumeSource" ((Object -> Parser V1CSIPersistentVolumeSource)
 -> Value -> Parser V1CSIPersistentVolumeSource)
-> (Object -> Parser V1CSIPersistentVolumeSource)
-> Value
-> Parser V1CSIPersistentVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1SecretReference
-> Maybe V1SecretReference
-> Text
-> Maybe Text
-> Maybe V1SecretReference
-> Maybe V1SecretReference
-> Maybe V1SecretReference
-> Maybe Bool
-> Maybe (Map String Text)
-> Text
-> V1CSIPersistentVolumeSource
V1CSIPersistentVolumeSource
      (Maybe V1SecretReference
 -> Maybe V1SecretReference
 -> Text
 -> Maybe Text
 -> Maybe V1SecretReference
 -> Maybe V1SecretReference
 -> Maybe V1SecretReference
 -> Maybe Bool
 -> Maybe (Map String Text)
 -> Text
 -> V1CSIPersistentVolumeSource)
-> Parser (Maybe V1SecretReference)
-> Parser
     (Maybe V1SecretReference
      -> Text
      -> Maybe Text
      -> Maybe V1SecretReference
      -> Maybe V1SecretReference
      -> Maybe V1SecretReference
      -> Maybe Bool
      -> Maybe (Map String Text)
      -> Text
      -> V1CSIPersistentVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1SecretReference)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"controllerExpandSecretRef")
      Parser
  (Maybe V1SecretReference
   -> Text
   -> Maybe Text
   -> Maybe V1SecretReference
   -> Maybe V1SecretReference
   -> Maybe V1SecretReference
   -> Maybe Bool
   -> Maybe (Map String Text)
   -> Text
   -> V1CSIPersistentVolumeSource)
-> Parser (Maybe V1SecretReference)
-> Parser
     (Text
      -> Maybe Text
      -> Maybe V1SecretReference
      -> Maybe V1SecretReference
      -> Maybe V1SecretReference
      -> Maybe Bool
      -> Maybe (Map String Text)
      -> Text
      -> V1CSIPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1SecretReference)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"controllerPublishSecretRef")
      Parser
  (Text
   -> Maybe Text
   -> Maybe V1SecretReference
   -> Maybe V1SecretReference
   -> Maybe V1SecretReference
   -> Maybe Bool
   -> Maybe (Map String Text)
   -> Text
   -> V1CSIPersistentVolumeSource)
-> Parser Text
-> Parser
     (Maybe Text
      -> Maybe V1SecretReference
      -> Maybe V1SecretReference
      -> Maybe V1SecretReference
      -> Maybe Bool
      -> Maybe (Map String Text)
      -> Text
      -> V1CSIPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"driver")
      Parser
  (Maybe Text
   -> Maybe V1SecretReference
   -> Maybe V1SecretReference
   -> Maybe V1SecretReference
   -> Maybe Bool
   -> Maybe (Map String Text)
   -> Text
   -> V1CSIPersistentVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1SecretReference
      -> Maybe V1SecretReference
      -> Maybe V1SecretReference
      -> Maybe Bool
      -> Maybe (Map String Text)
      -> Text
      -> V1CSIPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fsType")
      Parser
  (Maybe V1SecretReference
   -> Maybe V1SecretReference
   -> Maybe V1SecretReference
   -> Maybe Bool
   -> Maybe (Map String Text)
   -> Text
   -> V1CSIPersistentVolumeSource)
-> Parser (Maybe V1SecretReference)
-> Parser
     (Maybe V1SecretReference
      -> Maybe V1SecretReference
      -> Maybe Bool
      -> Maybe (Map String Text)
      -> Text
      -> V1CSIPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1SecretReference)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nodeExpandSecretRef")
      Parser
  (Maybe V1SecretReference
   -> Maybe V1SecretReference
   -> Maybe Bool
   -> Maybe (Map String Text)
   -> Text
   -> V1CSIPersistentVolumeSource)
-> Parser (Maybe V1SecretReference)
-> Parser
     (Maybe V1SecretReference
      -> Maybe Bool
      -> Maybe (Map String Text)
      -> Text
      -> V1CSIPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1SecretReference)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nodePublishSecretRef")
      Parser
  (Maybe V1SecretReference
   -> Maybe Bool
   -> Maybe (Map String Text)
   -> Text
   -> V1CSIPersistentVolumeSource)
-> Parser (Maybe V1SecretReference)
-> Parser
     (Maybe Bool
      -> Maybe (Map String Text) -> Text -> V1CSIPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1SecretReference)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nodeStageSecretRef")
      Parser
  (Maybe Bool
   -> Maybe (Map String Text) -> Text -> V1CSIPersistentVolumeSource)
-> Parser (Maybe Bool)
-> Parser
     (Maybe (Map String Text) -> Text -> V1CSIPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readOnly")
      Parser
  (Maybe (Map String Text) -> Text -> V1CSIPersistentVolumeSource)
-> Parser (Maybe (Map String Text))
-> Parser (Text -> V1CSIPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String Text))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"volumeAttributes")
      Parser (Text -> V1CSIPersistentVolumeSource)
-> Parser Text -> Parser V1CSIPersistentVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"volumeHandle")

-- | ToJSON V1CSIPersistentVolumeSource
instance A.ToJSON V1CSIPersistentVolumeSource where
  toJSON :: V1CSIPersistentVolumeSource -> Value
toJSON V1CSIPersistentVolumeSource {Maybe Bool
Maybe (Map String Text)
Maybe Text
Maybe V1SecretReference
Text
$sel:v1CSIPersistentVolumeSourceControllerExpandSecretRef:V1CSIPersistentVolumeSource :: V1CSIPersistentVolumeSource -> Maybe V1SecretReference
$sel:v1CSIPersistentVolumeSourceControllerPublishSecretRef:V1CSIPersistentVolumeSource :: V1CSIPersistentVolumeSource -> Maybe V1SecretReference
$sel:v1CSIPersistentVolumeSourceDriver:V1CSIPersistentVolumeSource :: V1CSIPersistentVolumeSource -> Text
$sel:v1CSIPersistentVolumeSourceFsType:V1CSIPersistentVolumeSource :: V1CSIPersistentVolumeSource -> Maybe Text
$sel:v1CSIPersistentVolumeSourceNodeExpandSecretRef:V1CSIPersistentVolumeSource :: V1CSIPersistentVolumeSource -> Maybe V1SecretReference
$sel:v1CSIPersistentVolumeSourceNodePublishSecretRef:V1CSIPersistentVolumeSource :: V1CSIPersistentVolumeSource -> Maybe V1SecretReference
$sel:v1CSIPersistentVolumeSourceNodeStageSecretRef:V1CSIPersistentVolumeSource :: V1CSIPersistentVolumeSource -> Maybe V1SecretReference
$sel:v1CSIPersistentVolumeSourceReadOnly:V1CSIPersistentVolumeSource :: V1CSIPersistentVolumeSource -> Maybe Bool
$sel:v1CSIPersistentVolumeSourceVolumeAttributes:V1CSIPersistentVolumeSource :: V1CSIPersistentVolumeSource -> Maybe (Map String Text)
$sel:v1CSIPersistentVolumeSourceVolumeHandle:V1CSIPersistentVolumeSource :: V1CSIPersistentVolumeSource -> Text
v1CSIPersistentVolumeSourceControllerExpandSecretRef :: Maybe V1SecretReference
v1CSIPersistentVolumeSourceControllerPublishSecretRef :: Maybe V1SecretReference
v1CSIPersistentVolumeSourceDriver :: Text
v1CSIPersistentVolumeSourceFsType :: Maybe Text
v1CSIPersistentVolumeSourceNodeExpandSecretRef :: Maybe V1SecretReference
v1CSIPersistentVolumeSourceNodePublishSecretRef :: Maybe V1SecretReference
v1CSIPersistentVolumeSourceNodeStageSecretRef :: Maybe V1SecretReference
v1CSIPersistentVolumeSourceReadOnly :: Maybe Bool
v1CSIPersistentVolumeSourceVolumeAttributes :: Maybe (Map String Text)
v1CSIPersistentVolumeSourceVolumeHandle :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"controllerExpandSecretRef" Key -> Maybe V1SecretReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1SecretReference
v1CSIPersistentVolumeSourceControllerExpandSecretRef
      , Key
"controllerPublishSecretRef" Key -> Maybe V1SecretReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1SecretReference
v1CSIPersistentVolumeSourceControllerPublishSecretRef
      , Key
"driver" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1CSIPersistentVolumeSourceDriver
      , Key
"fsType" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CSIPersistentVolumeSourceFsType
      , Key
"nodeExpandSecretRef" Key -> Maybe V1SecretReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1SecretReference
v1CSIPersistentVolumeSourceNodeExpandSecretRef
      , Key
"nodePublishSecretRef" Key -> Maybe V1SecretReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1SecretReference
v1CSIPersistentVolumeSourceNodePublishSecretRef
      , Key
"nodeStageSecretRef" Key -> Maybe V1SecretReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1SecretReference
v1CSIPersistentVolumeSourceNodeStageSecretRef
      , Key
"readOnly" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1CSIPersistentVolumeSourceReadOnly
      , Key
"volumeAttributes" Key -> Maybe (Map String Text) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Text)
v1CSIPersistentVolumeSourceVolumeAttributes
      , Key
"volumeHandle" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1CSIPersistentVolumeSourceVolumeHandle
      ]


-- | Construct a value of type 'V1CSIPersistentVolumeSource' (by applying it's required fields, if any)
mkV1CSIPersistentVolumeSource
  :: Text -- ^ 'v1CSIPersistentVolumeSourceDriver': driver is the name of the driver to use for this volume. Required.
  -> Text -- ^ 'v1CSIPersistentVolumeSourceVolumeHandle': volumeHandle is the unique volume name returned by the CSI volume plugin’s CreateVolume to refer to the volume on all subsequent calls. Required.
  -> V1CSIPersistentVolumeSource
mkV1CSIPersistentVolumeSource :: Text -> Text -> V1CSIPersistentVolumeSource
mkV1CSIPersistentVolumeSource Text
v1CSIPersistentVolumeSourceDriver Text
v1CSIPersistentVolumeSourceVolumeHandle =
  V1CSIPersistentVolumeSource
  { $sel:v1CSIPersistentVolumeSourceControllerExpandSecretRef:V1CSIPersistentVolumeSource :: Maybe V1SecretReference
v1CSIPersistentVolumeSourceControllerExpandSecretRef = Maybe V1SecretReference
forall a. Maybe a
Nothing
  , $sel:v1CSIPersistentVolumeSourceControllerPublishSecretRef:V1CSIPersistentVolumeSource :: Maybe V1SecretReference
v1CSIPersistentVolumeSourceControllerPublishSecretRef = Maybe V1SecretReference
forall a. Maybe a
Nothing
  , Text
$sel:v1CSIPersistentVolumeSourceDriver:V1CSIPersistentVolumeSource :: Text
v1CSIPersistentVolumeSourceDriver :: Text
v1CSIPersistentVolumeSourceDriver
  , $sel:v1CSIPersistentVolumeSourceFsType:V1CSIPersistentVolumeSource :: Maybe Text
v1CSIPersistentVolumeSourceFsType = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1CSIPersistentVolumeSourceNodeExpandSecretRef:V1CSIPersistentVolumeSource :: Maybe V1SecretReference
v1CSIPersistentVolumeSourceNodeExpandSecretRef = Maybe V1SecretReference
forall a. Maybe a
Nothing
  , $sel:v1CSIPersistentVolumeSourceNodePublishSecretRef:V1CSIPersistentVolumeSource :: Maybe V1SecretReference
v1CSIPersistentVolumeSourceNodePublishSecretRef = Maybe V1SecretReference
forall a. Maybe a
Nothing
  , $sel:v1CSIPersistentVolumeSourceNodeStageSecretRef:V1CSIPersistentVolumeSource :: Maybe V1SecretReference
v1CSIPersistentVolumeSourceNodeStageSecretRef = Maybe V1SecretReference
forall a. Maybe a
Nothing
  , $sel:v1CSIPersistentVolumeSourceReadOnly:V1CSIPersistentVolumeSource :: Maybe Bool
v1CSIPersistentVolumeSourceReadOnly = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1CSIPersistentVolumeSourceVolumeAttributes:V1CSIPersistentVolumeSource :: Maybe (Map String Text)
v1CSIPersistentVolumeSourceVolumeAttributes = Maybe (Map String Text)
forall a. Maybe a
Nothing
  , Text
$sel:v1CSIPersistentVolumeSourceVolumeHandle:V1CSIPersistentVolumeSource :: Text
v1CSIPersistentVolumeSourceVolumeHandle :: Text
v1CSIPersistentVolumeSourceVolumeHandle
  }

-- ** V1CSIStorageCapacity
-- | V1CSIStorageCapacity
-- CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment.  This can be used when considering where to instantiate new PersistentVolumes.  For example this can express things like: - StorageClass \"standard\" has \"1234 GiB\" available in \"topology.kubernetes.io/zone=us-east1\" - StorageClass \"localssd\" has \"10 GiB\" available in \"kubernetes.io/hostname=knode-abc123\"  The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero  The producer of these objects can decide which approach is more suitable.  They are consumed by the kube-scheduler when a CSI driver opts into capacity-aware scheduling with CSIDriverSpec.StorageCapacity. The scheduler compares the MaximumVolumeSize against the requested size of pending volumes to filter out unsuitable nodes. If MaximumVolumeSize is unset, it falls back to a comparison against the less precise Capacity. If that is also unset, the scheduler assumes that capacity is insufficient and tries some other node.
data V1CSIStorageCapacity = V1CSIStorageCapacity
  { V1CSIStorageCapacity -> Maybe Text
v1CSIStorageCapacityApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1CSIStorageCapacity -> Maybe Quantity
v1CSIStorageCapacityCapacity :: !(Maybe Quantity) -- ^ "capacity"
  , V1CSIStorageCapacity -> Maybe Text
v1CSIStorageCapacityKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1CSIStorageCapacity -> Maybe Quantity
v1CSIStorageCapacityMaximumVolumeSize :: !(Maybe Quantity) -- ^ "maximumVolumeSize"
  , V1CSIStorageCapacity -> Maybe V1ObjectMeta
v1CSIStorageCapacityMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1CSIStorageCapacity -> Maybe V1LabelSelector
v1CSIStorageCapacityNodeTopology :: !(Maybe V1LabelSelector) -- ^ "nodeTopology"
  , V1CSIStorageCapacity -> Text
v1CSIStorageCapacityStorageClassName :: !(Text) -- ^ /Required/ "storageClassName" - storageClassName represents the name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable.
  } deriving (Int -> V1CSIStorageCapacity -> ShowS
[V1CSIStorageCapacity] -> ShowS
V1CSIStorageCapacity -> String
(Int -> V1CSIStorageCapacity -> ShowS)
-> (V1CSIStorageCapacity -> String)
-> ([V1CSIStorageCapacity] -> ShowS)
-> Show V1CSIStorageCapacity
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CSIStorageCapacity -> ShowS
showsPrec :: Int -> V1CSIStorageCapacity -> ShowS
$cshow :: V1CSIStorageCapacity -> String
show :: V1CSIStorageCapacity -> String
$cshowList :: [V1CSIStorageCapacity] -> ShowS
showList :: [V1CSIStorageCapacity] -> ShowS
P.Show, V1CSIStorageCapacity -> V1CSIStorageCapacity -> Bool
(V1CSIStorageCapacity -> V1CSIStorageCapacity -> Bool)
-> (V1CSIStorageCapacity -> V1CSIStorageCapacity -> Bool)
-> Eq V1CSIStorageCapacity
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CSIStorageCapacity -> V1CSIStorageCapacity -> Bool
== :: V1CSIStorageCapacity -> V1CSIStorageCapacity -> Bool
$c/= :: V1CSIStorageCapacity -> V1CSIStorageCapacity -> Bool
/= :: V1CSIStorageCapacity -> V1CSIStorageCapacity -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CSIStorageCapacity
instance A.FromJSON V1CSIStorageCapacity where
  parseJSON :: Value -> Parser V1CSIStorageCapacity
parseJSON = String
-> (Object -> Parser V1CSIStorageCapacity)
-> Value
-> Parser V1CSIStorageCapacity
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CSIStorageCapacity" ((Object -> Parser V1CSIStorageCapacity)
 -> Value -> Parser V1CSIStorageCapacity)
-> (Object -> Parser V1CSIStorageCapacity)
-> Value
-> Parser V1CSIStorageCapacity
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Quantity
-> Maybe Text
-> Maybe Quantity
-> Maybe V1ObjectMeta
-> Maybe V1LabelSelector
-> Text
-> V1CSIStorageCapacity
V1CSIStorageCapacity
      (Maybe Text
 -> Maybe Quantity
 -> Maybe Text
 -> Maybe Quantity
 -> Maybe V1ObjectMeta
 -> Maybe V1LabelSelector
 -> Text
 -> V1CSIStorageCapacity)
-> Parser (Maybe Text)
-> Parser
     (Maybe Quantity
      -> Maybe Text
      -> Maybe Quantity
      -> Maybe V1ObjectMeta
      -> Maybe V1LabelSelector
      -> Text
      -> V1CSIStorageCapacity)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Quantity
   -> Maybe Text
   -> Maybe Quantity
   -> Maybe V1ObjectMeta
   -> Maybe V1LabelSelector
   -> Text
   -> V1CSIStorageCapacity)
-> Parser (Maybe Quantity)
-> Parser
     (Maybe Text
      -> Maybe Quantity
      -> Maybe V1ObjectMeta
      -> Maybe V1LabelSelector
      -> Text
      -> V1CSIStorageCapacity)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Quantity)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"capacity")
      Parser
  (Maybe Text
   -> Maybe Quantity
   -> Maybe V1ObjectMeta
   -> Maybe V1LabelSelector
   -> Text
   -> V1CSIStorageCapacity)
-> Parser (Maybe Text)
-> Parser
     (Maybe Quantity
      -> Maybe V1ObjectMeta
      -> Maybe V1LabelSelector
      -> Text
      -> V1CSIStorageCapacity)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe Quantity
   -> Maybe V1ObjectMeta
   -> Maybe V1LabelSelector
   -> Text
   -> V1CSIStorageCapacity)
-> Parser (Maybe Quantity)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1LabelSelector -> Text -> V1CSIStorageCapacity)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Quantity)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"maximumVolumeSize")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1LabelSelector -> Text -> V1CSIStorageCapacity)
-> Parser (Maybe V1ObjectMeta)
-> Parser (Maybe V1LabelSelector -> Text -> V1CSIStorageCapacity)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (Maybe V1LabelSelector -> Text -> V1CSIStorageCapacity)
-> Parser (Maybe V1LabelSelector)
-> Parser (Text -> V1CSIStorageCapacity)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LabelSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nodeTopology")
      Parser (Text -> V1CSIStorageCapacity)
-> Parser Text -> Parser V1CSIStorageCapacity
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"storageClassName")

-- | ToJSON V1CSIStorageCapacity
instance A.ToJSON V1CSIStorageCapacity where
  toJSON :: V1CSIStorageCapacity -> Value
toJSON V1CSIStorageCapacity {Maybe Text
Maybe Quantity
Maybe V1ObjectMeta
Maybe V1LabelSelector
Text
$sel:v1CSIStorageCapacityApiVersion:V1CSIStorageCapacity :: V1CSIStorageCapacity -> Maybe Text
$sel:v1CSIStorageCapacityCapacity:V1CSIStorageCapacity :: V1CSIStorageCapacity -> Maybe Quantity
$sel:v1CSIStorageCapacityKind:V1CSIStorageCapacity :: V1CSIStorageCapacity -> Maybe Text
$sel:v1CSIStorageCapacityMaximumVolumeSize:V1CSIStorageCapacity :: V1CSIStorageCapacity -> Maybe Quantity
$sel:v1CSIStorageCapacityMetadata:V1CSIStorageCapacity :: V1CSIStorageCapacity -> Maybe V1ObjectMeta
$sel:v1CSIStorageCapacityNodeTopology:V1CSIStorageCapacity :: V1CSIStorageCapacity -> Maybe V1LabelSelector
$sel:v1CSIStorageCapacityStorageClassName:V1CSIStorageCapacity :: V1CSIStorageCapacity -> Text
v1CSIStorageCapacityApiVersion :: Maybe Text
v1CSIStorageCapacityCapacity :: Maybe Quantity
v1CSIStorageCapacityKind :: Maybe Text
v1CSIStorageCapacityMaximumVolumeSize :: Maybe Quantity
v1CSIStorageCapacityMetadata :: Maybe V1ObjectMeta
v1CSIStorageCapacityNodeTopology :: Maybe V1LabelSelector
v1CSIStorageCapacityStorageClassName :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CSIStorageCapacityApiVersion
      , Key
"capacity" Key -> Maybe Quantity -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Quantity
v1CSIStorageCapacityCapacity
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CSIStorageCapacityKind
      , Key
"maximumVolumeSize" Key -> Maybe Quantity -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Quantity
v1CSIStorageCapacityMaximumVolumeSize
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1CSIStorageCapacityMetadata
      , Key
"nodeTopology" Key -> Maybe V1LabelSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LabelSelector
v1CSIStorageCapacityNodeTopology
      , Key
"storageClassName" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1CSIStorageCapacityStorageClassName
      ]


-- | Construct a value of type 'V1CSIStorageCapacity' (by applying it's required fields, if any)
mkV1CSIStorageCapacity
  :: Text -- ^ 'v1CSIStorageCapacityStorageClassName': storageClassName represents the name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable.
  -> V1CSIStorageCapacity
mkV1CSIStorageCapacity :: Text -> V1CSIStorageCapacity
mkV1CSIStorageCapacity Text
v1CSIStorageCapacityStorageClassName =
  V1CSIStorageCapacity
  { $sel:v1CSIStorageCapacityApiVersion:V1CSIStorageCapacity :: Maybe Text
v1CSIStorageCapacityApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1CSIStorageCapacityCapacity:V1CSIStorageCapacity :: Maybe Quantity
v1CSIStorageCapacityCapacity = Maybe Quantity
forall a. Maybe a
Nothing
  , $sel:v1CSIStorageCapacityKind:V1CSIStorageCapacity :: Maybe Text
v1CSIStorageCapacityKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1CSIStorageCapacityMaximumVolumeSize:V1CSIStorageCapacity :: Maybe Quantity
v1CSIStorageCapacityMaximumVolumeSize = Maybe Quantity
forall a. Maybe a
Nothing
  , $sel:v1CSIStorageCapacityMetadata:V1CSIStorageCapacity :: Maybe V1ObjectMeta
v1CSIStorageCapacityMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1CSIStorageCapacityNodeTopology:V1CSIStorageCapacity :: Maybe V1LabelSelector
v1CSIStorageCapacityNodeTopology = Maybe V1LabelSelector
forall a. Maybe a
Nothing
  , Text
$sel:v1CSIStorageCapacityStorageClassName:V1CSIStorageCapacity :: Text
v1CSIStorageCapacityStorageClassName :: Text
v1CSIStorageCapacityStorageClassName
  }

-- ** V1CSIStorageCapacityList
-- | V1CSIStorageCapacityList
-- CSIStorageCapacityList is a collection of CSIStorageCapacity objects.
data V1CSIStorageCapacityList = V1CSIStorageCapacityList
  { V1CSIStorageCapacityList -> Maybe Text
v1CSIStorageCapacityListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1CSIStorageCapacityList -> [V1CSIStorageCapacity]
v1CSIStorageCapacityListItems :: !([V1CSIStorageCapacity]) -- ^ /Required/ "items" - items is the list of CSIStorageCapacity objects.
  , V1CSIStorageCapacityList -> Maybe Text
v1CSIStorageCapacityListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1CSIStorageCapacityList -> Maybe V1ListMeta
v1CSIStorageCapacityListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1CSIStorageCapacityList -> ShowS
[V1CSIStorageCapacityList] -> ShowS
V1CSIStorageCapacityList -> String
(Int -> V1CSIStorageCapacityList -> ShowS)
-> (V1CSIStorageCapacityList -> String)
-> ([V1CSIStorageCapacityList] -> ShowS)
-> Show V1CSIStorageCapacityList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CSIStorageCapacityList -> ShowS
showsPrec :: Int -> V1CSIStorageCapacityList -> ShowS
$cshow :: V1CSIStorageCapacityList -> String
show :: V1CSIStorageCapacityList -> String
$cshowList :: [V1CSIStorageCapacityList] -> ShowS
showList :: [V1CSIStorageCapacityList] -> ShowS
P.Show, V1CSIStorageCapacityList -> V1CSIStorageCapacityList -> Bool
(V1CSIStorageCapacityList -> V1CSIStorageCapacityList -> Bool)
-> (V1CSIStorageCapacityList -> V1CSIStorageCapacityList -> Bool)
-> Eq V1CSIStorageCapacityList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CSIStorageCapacityList -> V1CSIStorageCapacityList -> Bool
== :: V1CSIStorageCapacityList -> V1CSIStorageCapacityList -> Bool
$c/= :: V1CSIStorageCapacityList -> V1CSIStorageCapacityList -> Bool
/= :: V1CSIStorageCapacityList -> V1CSIStorageCapacityList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CSIStorageCapacityList
instance A.FromJSON V1CSIStorageCapacityList where
  parseJSON :: Value -> Parser V1CSIStorageCapacityList
parseJSON = String
-> (Object -> Parser V1CSIStorageCapacityList)
-> Value
-> Parser V1CSIStorageCapacityList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CSIStorageCapacityList" ((Object -> Parser V1CSIStorageCapacityList)
 -> Value -> Parser V1CSIStorageCapacityList)
-> (Object -> Parser V1CSIStorageCapacityList)
-> Value
-> Parser V1CSIStorageCapacityList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1CSIStorageCapacity]
-> Maybe Text
-> Maybe V1ListMeta
-> V1CSIStorageCapacityList
V1CSIStorageCapacityList
      (Maybe Text
 -> [V1CSIStorageCapacity]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1CSIStorageCapacityList)
-> Parser (Maybe Text)
-> Parser
     ([V1CSIStorageCapacity]
      -> Maybe Text -> Maybe V1ListMeta -> V1CSIStorageCapacityList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1CSIStorageCapacity]
   -> Maybe Text -> Maybe V1ListMeta -> V1CSIStorageCapacityList)
-> Parser [V1CSIStorageCapacity]
-> Parser
     (Maybe Text -> Maybe V1ListMeta -> V1CSIStorageCapacityList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1CSIStorageCapacity]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1CSIStorageCapacityList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1CSIStorageCapacityList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1CSIStorageCapacityList)
-> Parser (Maybe V1ListMeta) -> Parser V1CSIStorageCapacityList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1CSIStorageCapacityList
instance A.ToJSON V1CSIStorageCapacityList where
  toJSON :: V1CSIStorageCapacityList -> Value
toJSON V1CSIStorageCapacityList {[V1CSIStorageCapacity]
Maybe Text
Maybe V1ListMeta
$sel:v1CSIStorageCapacityListApiVersion:V1CSIStorageCapacityList :: V1CSIStorageCapacityList -> Maybe Text
$sel:v1CSIStorageCapacityListItems:V1CSIStorageCapacityList :: V1CSIStorageCapacityList -> [V1CSIStorageCapacity]
$sel:v1CSIStorageCapacityListKind:V1CSIStorageCapacityList :: V1CSIStorageCapacityList -> Maybe Text
$sel:v1CSIStorageCapacityListMetadata:V1CSIStorageCapacityList :: V1CSIStorageCapacityList -> Maybe V1ListMeta
v1CSIStorageCapacityListApiVersion :: Maybe Text
v1CSIStorageCapacityListItems :: [V1CSIStorageCapacity]
v1CSIStorageCapacityListKind :: Maybe Text
v1CSIStorageCapacityListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CSIStorageCapacityListApiVersion
      , Key
"items" Key -> [V1CSIStorageCapacity] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1CSIStorageCapacity]
v1CSIStorageCapacityListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CSIStorageCapacityListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1CSIStorageCapacityListMetadata
      ]


-- | Construct a value of type 'V1CSIStorageCapacityList' (by applying it's required fields, if any)
mkV1CSIStorageCapacityList
  :: [V1CSIStorageCapacity] -- ^ 'v1CSIStorageCapacityListItems': items is the list of CSIStorageCapacity objects.
  -> V1CSIStorageCapacityList
mkV1CSIStorageCapacityList :: [V1CSIStorageCapacity] -> V1CSIStorageCapacityList
mkV1CSIStorageCapacityList [V1CSIStorageCapacity]
v1CSIStorageCapacityListItems =
  V1CSIStorageCapacityList
  { $sel:v1CSIStorageCapacityListApiVersion:V1CSIStorageCapacityList :: Maybe Text
v1CSIStorageCapacityListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1CSIStorageCapacity]
$sel:v1CSIStorageCapacityListItems:V1CSIStorageCapacityList :: [V1CSIStorageCapacity]
v1CSIStorageCapacityListItems :: [V1CSIStorageCapacity]
v1CSIStorageCapacityListItems
  , $sel:v1CSIStorageCapacityListKind:V1CSIStorageCapacityList :: Maybe Text
v1CSIStorageCapacityListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1CSIStorageCapacityListMetadata:V1CSIStorageCapacityList :: Maybe V1ListMeta
v1CSIStorageCapacityListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1CSIVolumeSource
-- | V1CSIVolumeSource
-- Represents a source location of a volume to mount, managed by an external CSI driver
data V1CSIVolumeSource = V1CSIVolumeSource
  { V1CSIVolumeSource -> Text
v1CSIVolumeSourceDriver :: !(Text) -- ^ /Required/ "driver" - driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster.
  , V1CSIVolumeSource -> Maybe Text
v1CSIVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - fsType to mount. Ex. \&quot;ext4\&quot;, \&quot;xfs\&quot;, \&quot;ntfs\&quot;. If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply.
  , V1CSIVolumeSource -> Maybe V1LocalObjectReference
v1CSIVolumeSourceNodePublishSecretRef :: !(Maybe V1LocalObjectReference) -- ^ "nodePublishSecretRef"
  , V1CSIVolumeSource -> Maybe Bool
v1CSIVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - readOnly specifies a read-only configuration for the volume. Defaults to false (read/write).
  , V1CSIVolumeSource -> Maybe (Map String Text)
v1CSIVolumeSourceVolumeAttributes :: !(Maybe (Map.Map String Text)) -- ^ "volumeAttributes" - volumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver&#39;s documentation for supported values.
  } deriving (Int -> V1CSIVolumeSource -> ShowS
[V1CSIVolumeSource] -> ShowS
V1CSIVolumeSource -> String
(Int -> V1CSIVolumeSource -> ShowS)
-> (V1CSIVolumeSource -> String)
-> ([V1CSIVolumeSource] -> ShowS)
-> Show V1CSIVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CSIVolumeSource -> ShowS
showsPrec :: Int -> V1CSIVolumeSource -> ShowS
$cshow :: V1CSIVolumeSource -> String
show :: V1CSIVolumeSource -> String
$cshowList :: [V1CSIVolumeSource] -> ShowS
showList :: [V1CSIVolumeSource] -> ShowS
P.Show, V1CSIVolumeSource -> V1CSIVolumeSource -> Bool
(V1CSIVolumeSource -> V1CSIVolumeSource -> Bool)
-> (V1CSIVolumeSource -> V1CSIVolumeSource -> Bool)
-> Eq V1CSIVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CSIVolumeSource -> V1CSIVolumeSource -> Bool
== :: V1CSIVolumeSource -> V1CSIVolumeSource -> Bool
$c/= :: V1CSIVolumeSource -> V1CSIVolumeSource -> Bool
/= :: V1CSIVolumeSource -> V1CSIVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CSIVolumeSource
instance A.FromJSON V1CSIVolumeSource where
  parseJSON :: Value -> Parser V1CSIVolumeSource
parseJSON = String
-> (Object -> Parser V1CSIVolumeSource)
-> Value
-> Parser V1CSIVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CSIVolumeSource" ((Object -> Parser V1CSIVolumeSource)
 -> Value -> Parser V1CSIVolumeSource)
-> (Object -> Parser V1CSIVolumeSource)
-> Value
-> Parser V1CSIVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text
-> Maybe Text
-> Maybe V1LocalObjectReference
-> Maybe Bool
-> Maybe (Map String Text)
-> V1CSIVolumeSource
V1CSIVolumeSource
      (Text
 -> Maybe Text
 -> Maybe V1LocalObjectReference
 -> Maybe Bool
 -> Maybe (Map String Text)
 -> V1CSIVolumeSource)
-> Parser Text
-> Parser
     (Maybe Text
      -> Maybe V1LocalObjectReference
      -> Maybe Bool
      -> Maybe (Map String Text)
      -> V1CSIVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"driver")
      Parser
  (Maybe Text
   -> Maybe V1LocalObjectReference
   -> Maybe Bool
   -> Maybe (Map String Text)
   -> V1CSIVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1LocalObjectReference
      -> Maybe Bool -> Maybe (Map String Text) -> V1CSIVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fsType")
      Parser
  (Maybe V1LocalObjectReference
   -> Maybe Bool -> Maybe (Map String Text) -> V1CSIVolumeSource)
-> Parser (Maybe V1LocalObjectReference)
-> Parser
     (Maybe Bool -> Maybe (Map String Text) -> V1CSIVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LocalObjectReference)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nodePublishSecretRef")
      Parser (Maybe Bool -> Maybe (Map String Text) -> V1CSIVolumeSource)
-> Parser (Maybe Bool)
-> Parser (Maybe (Map String Text) -> V1CSIVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readOnly")
      Parser (Maybe (Map String Text) -> V1CSIVolumeSource)
-> Parser (Maybe (Map String Text)) -> Parser V1CSIVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String Text))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"volumeAttributes")

-- | ToJSON V1CSIVolumeSource
instance A.ToJSON V1CSIVolumeSource where
  toJSON :: V1CSIVolumeSource -> Value
toJSON V1CSIVolumeSource {Maybe Bool
Maybe (Map String Text)
Maybe Text
Maybe V1LocalObjectReference
Text
$sel:v1CSIVolumeSourceDriver:V1CSIVolumeSource :: V1CSIVolumeSource -> Text
$sel:v1CSIVolumeSourceFsType:V1CSIVolumeSource :: V1CSIVolumeSource -> Maybe Text
$sel:v1CSIVolumeSourceNodePublishSecretRef:V1CSIVolumeSource :: V1CSIVolumeSource -> Maybe V1LocalObjectReference
$sel:v1CSIVolumeSourceReadOnly:V1CSIVolumeSource :: V1CSIVolumeSource -> Maybe Bool
$sel:v1CSIVolumeSourceVolumeAttributes:V1CSIVolumeSource :: V1CSIVolumeSource -> Maybe (Map String Text)
v1CSIVolumeSourceDriver :: Text
v1CSIVolumeSourceFsType :: Maybe Text
v1CSIVolumeSourceNodePublishSecretRef :: Maybe V1LocalObjectReference
v1CSIVolumeSourceReadOnly :: Maybe Bool
v1CSIVolumeSourceVolumeAttributes :: Maybe (Map String Text)
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"driver" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1CSIVolumeSourceDriver
      , Key
"fsType" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CSIVolumeSourceFsType
      , Key
"nodePublishSecretRef" Key -> Maybe V1LocalObjectReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LocalObjectReference
v1CSIVolumeSourceNodePublishSecretRef
      , Key
"readOnly" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1CSIVolumeSourceReadOnly
      , Key
"volumeAttributes" Key -> Maybe (Map String Text) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Text)
v1CSIVolumeSourceVolumeAttributes
      ]


-- | Construct a value of type 'V1CSIVolumeSource' (by applying it's required fields, if any)
mkV1CSIVolumeSource
  :: Text -- ^ 'v1CSIVolumeSourceDriver': driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster.
  -> V1CSIVolumeSource
mkV1CSIVolumeSource :: Text -> V1CSIVolumeSource
mkV1CSIVolumeSource Text
v1CSIVolumeSourceDriver =
  V1CSIVolumeSource
  { Text
$sel:v1CSIVolumeSourceDriver:V1CSIVolumeSource :: Text
v1CSIVolumeSourceDriver :: Text
v1CSIVolumeSourceDriver
  , $sel:v1CSIVolumeSourceFsType:V1CSIVolumeSource :: Maybe Text
v1CSIVolumeSourceFsType = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1CSIVolumeSourceNodePublishSecretRef:V1CSIVolumeSource :: Maybe V1LocalObjectReference
v1CSIVolumeSourceNodePublishSecretRef = Maybe V1LocalObjectReference
forall a. Maybe a
Nothing
  , $sel:v1CSIVolumeSourceReadOnly:V1CSIVolumeSource :: Maybe Bool
v1CSIVolumeSourceReadOnly = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1CSIVolumeSourceVolumeAttributes:V1CSIVolumeSource :: Maybe (Map String Text)
v1CSIVolumeSourceVolumeAttributes = Maybe (Map String Text)
forall a. Maybe a
Nothing
  }

-- ** V1Capabilities
-- | V1Capabilities
-- Adds and removes POSIX capabilities from running containers.
data V1Capabilities = V1Capabilities
  { V1Capabilities -> Maybe [Text]
v1CapabilitiesAdd :: !(Maybe [Text]) -- ^ "add" - Added capabilities
  , V1Capabilities -> Maybe [Text]
v1CapabilitiesDrop :: !(Maybe [Text]) -- ^ "drop" - Removed capabilities
  } deriving (Int -> V1Capabilities -> ShowS
[V1Capabilities] -> ShowS
V1Capabilities -> String
(Int -> V1Capabilities -> ShowS)
-> (V1Capabilities -> String)
-> ([V1Capabilities] -> ShowS)
-> Show V1Capabilities
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1Capabilities -> ShowS
showsPrec :: Int -> V1Capabilities -> ShowS
$cshow :: V1Capabilities -> String
show :: V1Capabilities -> String
$cshowList :: [V1Capabilities] -> ShowS
showList :: [V1Capabilities] -> ShowS
P.Show, V1Capabilities -> V1Capabilities -> Bool
(V1Capabilities -> V1Capabilities -> Bool)
-> (V1Capabilities -> V1Capabilities -> Bool) -> Eq V1Capabilities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1Capabilities -> V1Capabilities -> Bool
== :: V1Capabilities -> V1Capabilities -> Bool
$c/= :: V1Capabilities -> V1Capabilities -> Bool
/= :: V1Capabilities -> V1Capabilities -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1Capabilities
instance A.FromJSON V1Capabilities where
  parseJSON :: Value -> Parser V1Capabilities
parseJSON = String
-> (Object -> Parser V1Capabilities)
-> Value
-> Parser V1Capabilities
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1Capabilities" ((Object -> Parser V1Capabilities)
 -> Value -> Parser V1Capabilities)
-> (Object -> Parser V1Capabilities)
-> Value
-> Parser V1Capabilities
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [Text] -> Maybe [Text] -> V1Capabilities
V1Capabilities
      (Maybe [Text] -> Maybe [Text] -> V1Capabilities)
-> Parser (Maybe [Text]) -> Parser (Maybe [Text] -> V1Capabilities)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"add")
      Parser (Maybe [Text] -> V1Capabilities)
-> Parser (Maybe [Text]) -> Parser V1Capabilities
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"drop")

-- | ToJSON V1Capabilities
instance A.ToJSON V1Capabilities where
  toJSON :: V1Capabilities -> Value
toJSON V1Capabilities {Maybe [Text]
$sel:v1CapabilitiesAdd:V1Capabilities :: V1Capabilities -> Maybe [Text]
$sel:v1CapabilitiesDrop:V1Capabilities :: V1Capabilities -> Maybe [Text]
v1CapabilitiesAdd :: Maybe [Text]
v1CapabilitiesDrop :: Maybe [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"add" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1CapabilitiesAdd
      , Key
"drop" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1CapabilitiesDrop
      ]


-- | Construct a value of type 'V1Capabilities' (by applying it's required fields, if any)
mkV1Capabilities
  :: V1Capabilities
mkV1Capabilities :: V1Capabilities
mkV1Capabilities =
  V1Capabilities
  { $sel:v1CapabilitiesAdd:V1Capabilities :: Maybe [Text]
v1CapabilitiesAdd = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1CapabilitiesDrop:V1Capabilities :: Maybe [Text]
v1CapabilitiesDrop = Maybe [Text]
forall a. Maybe a
Nothing
  }

-- ** V1CephFSPersistentVolumeSource
-- | V1CephFSPersistentVolumeSource
-- Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.
data V1CephFSPersistentVolumeSource = V1CephFSPersistentVolumeSource
  { V1CephFSPersistentVolumeSource -> [Text]
v1CephFSPersistentVolumeSourceMonitors :: !([Text]) -- ^ /Required/ "monitors" - monitors is Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
  , V1CephFSPersistentVolumeSource -> Maybe Text
v1CephFSPersistentVolumeSourcePath :: !(Maybe Text) -- ^ "path" - path is Optional: Used as the mounted root, rather than the full Ceph tree, default is /
  , V1CephFSPersistentVolumeSource -> Maybe Bool
v1CephFSPersistentVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
  , V1CephFSPersistentVolumeSource -> Maybe Text
v1CephFSPersistentVolumeSourceSecretFile :: !(Maybe Text) -- ^ "secretFile" - secretFile is Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
  , V1CephFSPersistentVolumeSource -> Maybe V1SecretReference
v1CephFSPersistentVolumeSourceSecretRef :: !(Maybe V1SecretReference) -- ^ "secretRef"
  , V1CephFSPersistentVolumeSource -> Maybe Text
v1CephFSPersistentVolumeSourceUser :: !(Maybe Text) -- ^ "user" - user is Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
  } deriving (Int -> V1CephFSPersistentVolumeSource -> ShowS
[V1CephFSPersistentVolumeSource] -> ShowS
V1CephFSPersistentVolumeSource -> String
(Int -> V1CephFSPersistentVolumeSource -> ShowS)
-> (V1CephFSPersistentVolumeSource -> String)
-> ([V1CephFSPersistentVolumeSource] -> ShowS)
-> Show V1CephFSPersistentVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CephFSPersistentVolumeSource -> ShowS
showsPrec :: Int -> V1CephFSPersistentVolumeSource -> ShowS
$cshow :: V1CephFSPersistentVolumeSource -> String
show :: V1CephFSPersistentVolumeSource -> String
$cshowList :: [V1CephFSPersistentVolumeSource] -> ShowS
showList :: [V1CephFSPersistentVolumeSource] -> ShowS
P.Show, V1CephFSPersistentVolumeSource
-> V1CephFSPersistentVolumeSource -> Bool
(V1CephFSPersistentVolumeSource
 -> V1CephFSPersistentVolumeSource -> Bool)
-> (V1CephFSPersistentVolumeSource
    -> V1CephFSPersistentVolumeSource -> Bool)
-> Eq V1CephFSPersistentVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CephFSPersistentVolumeSource
-> V1CephFSPersistentVolumeSource -> Bool
== :: V1CephFSPersistentVolumeSource
-> V1CephFSPersistentVolumeSource -> Bool
$c/= :: V1CephFSPersistentVolumeSource
-> V1CephFSPersistentVolumeSource -> Bool
/= :: V1CephFSPersistentVolumeSource
-> V1CephFSPersistentVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CephFSPersistentVolumeSource
instance A.FromJSON V1CephFSPersistentVolumeSource where
  parseJSON :: Value -> Parser V1CephFSPersistentVolumeSource
parseJSON = String
-> (Object -> Parser V1CephFSPersistentVolumeSource)
-> Value
-> Parser V1CephFSPersistentVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CephFSPersistentVolumeSource" ((Object -> Parser V1CephFSPersistentVolumeSource)
 -> Value -> Parser V1CephFSPersistentVolumeSource)
-> (Object -> Parser V1CephFSPersistentVolumeSource)
-> Value
-> Parser V1CephFSPersistentVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    [Text]
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe V1SecretReference
-> Maybe Text
-> V1CephFSPersistentVolumeSource
V1CephFSPersistentVolumeSource
      ([Text]
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe V1SecretReference
 -> Maybe Text
 -> V1CephFSPersistentVolumeSource)
-> Parser [Text]
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe V1SecretReference
      -> Maybe Text
      -> V1CephFSPersistentVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"monitors")
      Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe V1SecretReference
   -> Maybe Text
   -> V1CephFSPersistentVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe V1SecretReference
      -> Maybe Text
      -> V1CephFSPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"path")
      Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe V1SecretReference
   -> Maybe Text
   -> V1CephFSPersistentVolumeSource)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe V1SecretReference
      -> Maybe Text
      -> V1CephFSPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readOnly")
      Parser
  (Maybe Text
   -> Maybe V1SecretReference
   -> Maybe Text
   -> V1CephFSPersistentVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1SecretReference
      -> Maybe Text -> V1CephFSPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"secretFile")
      Parser
  (Maybe V1SecretReference
   -> Maybe Text -> V1CephFSPersistentVolumeSource)
-> Parser (Maybe V1SecretReference)
-> Parser (Maybe Text -> V1CephFSPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1SecretReference)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"secretRef")
      Parser (Maybe Text -> V1CephFSPersistentVolumeSource)
-> Parser (Maybe Text) -> Parser V1CephFSPersistentVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"user")

-- | ToJSON V1CephFSPersistentVolumeSource
instance A.ToJSON V1CephFSPersistentVolumeSource where
  toJSON :: V1CephFSPersistentVolumeSource -> Value
toJSON V1CephFSPersistentVolumeSource {[Text]
Maybe Bool
Maybe Text
Maybe V1SecretReference
$sel:v1CephFSPersistentVolumeSourceMonitors:V1CephFSPersistentVolumeSource :: V1CephFSPersistentVolumeSource -> [Text]
$sel:v1CephFSPersistentVolumeSourcePath:V1CephFSPersistentVolumeSource :: V1CephFSPersistentVolumeSource -> Maybe Text
$sel:v1CephFSPersistentVolumeSourceReadOnly:V1CephFSPersistentVolumeSource :: V1CephFSPersistentVolumeSource -> Maybe Bool
$sel:v1CephFSPersistentVolumeSourceSecretFile:V1CephFSPersistentVolumeSource :: V1CephFSPersistentVolumeSource -> Maybe Text
$sel:v1CephFSPersistentVolumeSourceSecretRef:V1CephFSPersistentVolumeSource :: V1CephFSPersistentVolumeSource -> Maybe V1SecretReference
$sel:v1CephFSPersistentVolumeSourceUser:V1CephFSPersistentVolumeSource :: V1CephFSPersistentVolumeSource -> Maybe Text
v1CephFSPersistentVolumeSourceMonitors :: [Text]
v1CephFSPersistentVolumeSourcePath :: Maybe Text
v1CephFSPersistentVolumeSourceReadOnly :: Maybe Bool
v1CephFSPersistentVolumeSourceSecretFile :: Maybe Text
v1CephFSPersistentVolumeSourceSecretRef :: Maybe V1SecretReference
v1CephFSPersistentVolumeSourceUser :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"monitors" Key -> [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [Text]
v1CephFSPersistentVolumeSourceMonitors
      , Key
"path" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CephFSPersistentVolumeSourcePath
      , Key
"readOnly" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1CephFSPersistentVolumeSourceReadOnly
      , Key
"secretFile" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CephFSPersistentVolumeSourceSecretFile
      , Key
"secretRef" Key -> Maybe V1SecretReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1SecretReference
v1CephFSPersistentVolumeSourceSecretRef
      , Key
"user" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CephFSPersistentVolumeSourceUser
      ]


-- | Construct a value of type 'V1CephFSPersistentVolumeSource' (by applying it's required fields, if any)
mkV1CephFSPersistentVolumeSource
  :: [Text] -- ^ 'v1CephFSPersistentVolumeSourceMonitors': monitors is Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
  -> V1CephFSPersistentVolumeSource
mkV1CephFSPersistentVolumeSource :: [Text] -> V1CephFSPersistentVolumeSource
mkV1CephFSPersistentVolumeSource [Text]
v1CephFSPersistentVolumeSourceMonitors =
  V1CephFSPersistentVolumeSource
  { [Text]
$sel:v1CephFSPersistentVolumeSourceMonitors:V1CephFSPersistentVolumeSource :: [Text]
v1CephFSPersistentVolumeSourceMonitors :: [Text]
v1CephFSPersistentVolumeSourceMonitors
  , $sel:v1CephFSPersistentVolumeSourcePath:V1CephFSPersistentVolumeSource :: Maybe Text
v1CephFSPersistentVolumeSourcePath = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1CephFSPersistentVolumeSourceReadOnly:V1CephFSPersistentVolumeSource :: Maybe Bool
v1CephFSPersistentVolumeSourceReadOnly = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1CephFSPersistentVolumeSourceSecretFile:V1CephFSPersistentVolumeSource :: Maybe Text
v1CephFSPersistentVolumeSourceSecretFile = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1CephFSPersistentVolumeSourceSecretRef:V1CephFSPersistentVolumeSource :: Maybe V1SecretReference
v1CephFSPersistentVolumeSourceSecretRef = Maybe V1SecretReference
forall a. Maybe a
Nothing
  , $sel:v1CephFSPersistentVolumeSourceUser:V1CephFSPersistentVolumeSource :: Maybe Text
v1CephFSPersistentVolumeSourceUser = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1CephFSVolumeSource
-- | V1CephFSVolumeSource
-- Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.
data V1CephFSVolumeSource = V1CephFSVolumeSource
  { V1CephFSVolumeSource -> [Text]
v1CephFSVolumeSourceMonitors :: !([Text]) -- ^ /Required/ "monitors" - monitors is Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
  , V1CephFSVolumeSource -> Maybe Text
v1CephFSVolumeSourcePath :: !(Maybe Text) -- ^ "path" - path is Optional: Used as the mounted root, rather than the full Ceph tree, default is /
  , V1CephFSVolumeSource -> Maybe Bool
v1CephFSVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
  , V1CephFSVolumeSource -> Maybe Text
v1CephFSVolumeSourceSecretFile :: !(Maybe Text) -- ^ "secretFile" - secretFile is Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
  , V1CephFSVolumeSource -> Maybe V1LocalObjectReference
v1CephFSVolumeSourceSecretRef :: !(Maybe V1LocalObjectReference) -- ^ "secretRef"
  , V1CephFSVolumeSource -> Maybe Text
v1CephFSVolumeSourceUser :: !(Maybe Text) -- ^ "user" - user is optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
  } deriving (Int -> V1CephFSVolumeSource -> ShowS
[V1CephFSVolumeSource] -> ShowS
V1CephFSVolumeSource -> String
(Int -> V1CephFSVolumeSource -> ShowS)
-> (V1CephFSVolumeSource -> String)
-> ([V1CephFSVolumeSource] -> ShowS)
-> Show V1CephFSVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CephFSVolumeSource -> ShowS
showsPrec :: Int -> V1CephFSVolumeSource -> ShowS
$cshow :: V1CephFSVolumeSource -> String
show :: V1CephFSVolumeSource -> String
$cshowList :: [V1CephFSVolumeSource] -> ShowS
showList :: [V1CephFSVolumeSource] -> ShowS
P.Show, V1CephFSVolumeSource -> V1CephFSVolumeSource -> Bool
(V1CephFSVolumeSource -> V1CephFSVolumeSource -> Bool)
-> (V1CephFSVolumeSource -> V1CephFSVolumeSource -> Bool)
-> Eq V1CephFSVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CephFSVolumeSource -> V1CephFSVolumeSource -> Bool
== :: V1CephFSVolumeSource -> V1CephFSVolumeSource -> Bool
$c/= :: V1CephFSVolumeSource -> V1CephFSVolumeSource -> Bool
/= :: V1CephFSVolumeSource -> V1CephFSVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CephFSVolumeSource
instance A.FromJSON V1CephFSVolumeSource where
  parseJSON :: Value -> Parser V1CephFSVolumeSource
parseJSON = String
-> (Object -> Parser V1CephFSVolumeSource)
-> Value
-> Parser V1CephFSVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CephFSVolumeSource" ((Object -> Parser V1CephFSVolumeSource)
 -> Value -> Parser V1CephFSVolumeSource)
-> (Object -> Parser V1CephFSVolumeSource)
-> Value
-> Parser V1CephFSVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    [Text]
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe V1LocalObjectReference
-> Maybe Text
-> V1CephFSVolumeSource
V1CephFSVolumeSource
      ([Text]
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe V1LocalObjectReference
 -> Maybe Text
 -> V1CephFSVolumeSource)
-> Parser [Text]
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe V1LocalObjectReference
      -> Maybe Text
      -> V1CephFSVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"monitors")
      Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe V1LocalObjectReference
   -> Maybe Text
   -> V1CephFSVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe V1LocalObjectReference
      -> Maybe Text
      -> V1CephFSVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"path")
      Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe V1LocalObjectReference
   -> Maybe Text
   -> V1CephFSVolumeSource)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe V1LocalObjectReference
      -> Maybe Text
      -> V1CephFSVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readOnly")
      Parser
  (Maybe Text
   -> Maybe V1LocalObjectReference
   -> Maybe Text
   -> V1CephFSVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1LocalObjectReference
      -> Maybe Text -> V1CephFSVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"secretFile")
      Parser
  (Maybe V1LocalObjectReference
   -> Maybe Text -> V1CephFSVolumeSource)
-> Parser (Maybe V1LocalObjectReference)
-> Parser (Maybe Text -> V1CephFSVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LocalObjectReference)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"secretRef")
      Parser (Maybe Text -> V1CephFSVolumeSource)
-> Parser (Maybe Text) -> Parser V1CephFSVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"user")

-- | ToJSON V1CephFSVolumeSource
instance A.ToJSON V1CephFSVolumeSource where
  toJSON :: V1CephFSVolumeSource -> Value
toJSON V1CephFSVolumeSource {[Text]
Maybe Bool
Maybe Text
Maybe V1LocalObjectReference
$sel:v1CephFSVolumeSourceMonitors:V1CephFSVolumeSource :: V1CephFSVolumeSource -> [Text]
$sel:v1CephFSVolumeSourcePath:V1CephFSVolumeSource :: V1CephFSVolumeSource -> Maybe Text
$sel:v1CephFSVolumeSourceReadOnly:V1CephFSVolumeSource :: V1CephFSVolumeSource -> Maybe Bool
$sel:v1CephFSVolumeSourceSecretFile:V1CephFSVolumeSource :: V1CephFSVolumeSource -> Maybe Text
$sel:v1CephFSVolumeSourceSecretRef:V1CephFSVolumeSource :: V1CephFSVolumeSource -> Maybe V1LocalObjectReference
$sel:v1CephFSVolumeSourceUser:V1CephFSVolumeSource :: V1CephFSVolumeSource -> Maybe Text
v1CephFSVolumeSourceMonitors :: [Text]
v1CephFSVolumeSourcePath :: Maybe Text
v1CephFSVolumeSourceReadOnly :: Maybe Bool
v1CephFSVolumeSourceSecretFile :: Maybe Text
v1CephFSVolumeSourceSecretRef :: Maybe V1LocalObjectReference
v1CephFSVolumeSourceUser :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"monitors" Key -> [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [Text]
v1CephFSVolumeSourceMonitors
      , Key
"path" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CephFSVolumeSourcePath
      , Key
"readOnly" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1CephFSVolumeSourceReadOnly
      , Key
"secretFile" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CephFSVolumeSourceSecretFile
      , Key
"secretRef" Key -> Maybe V1LocalObjectReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LocalObjectReference
v1CephFSVolumeSourceSecretRef
      , Key
"user" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CephFSVolumeSourceUser
      ]


-- | Construct a value of type 'V1CephFSVolumeSource' (by applying it's required fields, if any)
mkV1CephFSVolumeSource
  :: [Text] -- ^ 'v1CephFSVolumeSourceMonitors': monitors is Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
  -> V1CephFSVolumeSource
mkV1CephFSVolumeSource :: [Text] -> V1CephFSVolumeSource
mkV1CephFSVolumeSource [Text]
v1CephFSVolumeSourceMonitors =
  V1CephFSVolumeSource
  { [Text]
$sel:v1CephFSVolumeSourceMonitors:V1CephFSVolumeSource :: [Text]
v1CephFSVolumeSourceMonitors :: [Text]
v1CephFSVolumeSourceMonitors
  , $sel:v1CephFSVolumeSourcePath:V1CephFSVolumeSource :: Maybe Text
v1CephFSVolumeSourcePath = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1CephFSVolumeSourceReadOnly:V1CephFSVolumeSource :: Maybe Bool
v1CephFSVolumeSourceReadOnly = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1CephFSVolumeSourceSecretFile:V1CephFSVolumeSource :: Maybe Text
v1CephFSVolumeSourceSecretFile = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1CephFSVolumeSourceSecretRef:V1CephFSVolumeSource :: Maybe V1LocalObjectReference
v1CephFSVolumeSourceSecretRef = Maybe V1LocalObjectReference
forall a. Maybe a
Nothing
  , $sel:v1CephFSVolumeSourceUser:V1CephFSVolumeSource :: Maybe Text
v1CephFSVolumeSourceUser = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1CertificateSigningRequest
-- | V1CertificateSigningRequest
-- CertificateSigningRequest objects provide a mechanism to obtain x509 certificates by submitting a certificate signing request, and having it asynchronously approved and issued.  Kubelets use this API to obtain:  1. client certificates to authenticate to kube-apiserver (with the \"kubernetes.io/kube-apiserver-client-kubelet\" signerName).  2. serving certificates for TLS endpoints kube-apiserver can connect to securely (with the \"kubernetes.io/kubelet-serving\" signerName).  This API can be used to request client certificates to authenticate to kube-apiserver (with the \"kubernetes.io/kube-apiserver-client\" signerName), or to obtain certificates from custom non-Kubernetes signers.
data V1CertificateSigningRequest = V1CertificateSigningRequest
  { V1CertificateSigningRequest -> Maybe Text
v1CertificateSigningRequestApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1CertificateSigningRequest -> Maybe Text
v1CertificateSigningRequestKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1CertificateSigningRequest -> Maybe V1ObjectMeta
v1CertificateSigningRequestMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1CertificateSigningRequest -> V1CertificateSigningRequestSpec
v1CertificateSigningRequestSpec :: !(V1CertificateSigningRequestSpec) -- ^ /Required/ "spec"
  , V1CertificateSigningRequest
-> Maybe V1CertificateSigningRequestStatus
v1CertificateSigningRequestStatus :: !(Maybe V1CertificateSigningRequestStatus) -- ^ "status"
  } deriving (Int -> V1CertificateSigningRequest -> ShowS
[V1CertificateSigningRequest] -> ShowS
V1CertificateSigningRequest -> String
(Int -> V1CertificateSigningRequest -> ShowS)
-> (V1CertificateSigningRequest -> String)
-> ([V1CertificateSigningRequest] -> ShowS)
-> Show V1CertificateSigningRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CertificateSigningRequest -> ShowS
showsPrec :: Int -> V1CertificateSigningRequest -> ShowS
$cshow :: V1CertificateSigningRequest -> String
show :: V1CertificateSigningRequest -> String
$cshowList :: [V1CertificateSigningRequest] -> ShowS
showList :: [V1CertificateSigningRequest] -> ShowS
P.Show, V1CertificateSigningRequest -> V1CertificateSigningRequest -> Bool
(V1CertificateSigningRequest
 -> V1CertificateSigningRequest -> Bool)
-> (V1CertificateSigningRequest
    -> V1CertificateSigningRequest -> Bool)
-> Eq V1CertificateSigningRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CertificateSigningRequest -> V1CertificateSigningRequest -> Bool
== :: V1CertificateSigningRequest -> V1CertificateSigningRequest -> Bool
$c/= :: V1CertificateSigningRequest -> V1CertificateSigningRequest -> Bool
/= :: V1CertificateSigningRequest -> V1CertificateSigningRequest -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CertificateSigningRequest
instance A.FromJSON V1CertificateSigningRequest where
  parseJSON :: Value -> Parser V1CertificateSigningRequest
parseJSON = String
-> (Object -> Parser V1CertificateSigningRequest)
-> Value
-> Parser V1CertificateSigningRequest
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CertificateSigningRequest" ((Object -> Parser V1CertificateSigningRequest)
 -> Value -> Parser V1CertificateSigningRequest)
-> (Object -> Parser V1CertificateSigningRequest)
-> Value
-> Parser V1CertificateSigningRequest
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> V1CertificateSigningRequestSpec
-> Maybe V1CertificateSigningRequestStatus
-> V1CertificateSigningRequest
V1CertificateSigningRequest
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> V1CertificateSigningRequestSpec
 -> Maybe V1CertificateSigningRequestStatus
 -> V1CertificateSigningRequest)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> V1CertificateSigningRequestSpec
      -> Maybe V1CertificateSigningRequestStatus
      -> V1CertificateSigningRequest)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> V1CertificateSigningRequestSpec
   -> Maybe V1CertificateSigningRequestStatus
   -> V1CertificateSigningRequest)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> V1CertificateSigningRequestSpec
      -> Maybe V1CertificateSigningRequestStatus
      -> V1CertificateSigningRequest)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> V1CertificateSigningRequestSpec
   -> Maybe V1CertificateSigningRequestStatus
   -> V1CertificateSigningRequest)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (V1CertificateSigningRequestSpec
      -> Maybe V1CertificateSigningRequestStatus
      -> V1CertificateSigningRequest)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (V1CertificateSigningRequestSpec
   -> Maybe V1CertificateSigningRequestStatus
   -> V1CertificateSigningRequest)
-> Parser V1CertificateSigningRequestSpec
-> Parser
     (Maybe V1CertificateSigningRequestStatus
      -> V1CertificateSigningRequest)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1CertificateSigningRequestSpec
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"spec")
      Parser
  (Maybe V1CertificateSigningRequestStatus
   -> V1CertificateSigningRequest)
-> Parser (Maybe V1CertificateSigningRequestStatus)
-> Parser V1CertificateSigningRequest
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1CertificateSigningRequestStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1CertificateSigningRequest
instance A.ToJSON V1CertificateSigningRequest where
  toJSON :: V1CertificateSigningRequest -> Value
toJSON V1CertificateSigningRequest {Maybe Text
Maybe V1ObjectMeta
Maybe V1CertificateSigningRequestStatus
V1CertificateSigningRequestSpec
$sel:v1CertificateSigningRequestApiVersion:V1CertificateSigningRequest :: V1CertificateSigningRequest -> Maybe Text
$sel:v1CertificateSigningRequestKind:V1CertificateSigningRequest :: V1CertificateSigningRequest -> Maybe Text
$sel:v1CertificateSigningRequestMetadata:V1CertificateSigningRequest :: V1CertificateSigningRequest -> Maybe V1ObjectMeta
$sel:v1CertificateSigningRequestSpec:V1CertificateSigningRequest :: V1CertificateSigningRequest -> V1CertificateSigningRequestSpec
$sel:v1CertificateSigningRequestStatus:V1CertificateSigningRequest :: V1CertificateSigningRequest
-> Maybe V1CertificateSigningRequestStatus
v1CertificateSigningRequestApiVersion :: Maybe Text
v1CertificateSigningRequestKind :: Maybe Text
v1CertificateSigningRequestMetadata :: Maybe V1ObjectMeta
v1CertificateSigningRequestSpec :: V1CertificateSigningRequestSpec
v1CertificateSigningRequestStatus :: Maybe V1CertificateSigningRequestStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CertificateSigningRequestApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CertificateSigningRequestKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1CertificateSigningRequestMetadata
      , Key
"spec" Key -> V1CertificateSigningRequestSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1CertificateSigningRequestSpec
v1CertificateSigningRequestSpec
      , Key
"status" Key -> Maybe V1CertificateSigningRequestStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1CertificateSigningRequestStatus
v1CertificateSigningRequestStatus
      ]


-- | Construct a value of type 'V1CertificateSigningRequest' (by applying it's required fields, if any)
mkV1CertificateSigningRequest
  :: V1CertificateSigningRequestSpec -- ^ 'v1CertificateSigningRequestSpec' 
  -> V1CertificateSigningRequest
mkV1CertificateSigningRequest :: V1CertificateSigningRequestSpec -> V1CertificateSigningRequest
mkV1CertificateSigningRequest V1CertificateSigningRequestSpec
v1CertificateSigningRequestSpec =
  V1CertificateSigningRequest
  { $sel:v1CertificateSigningRequestApiVersion:V1CertificateSigningRequest :: Maybe Text
v1CertificateSigningRequestApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1CertificateSigningRequestKind:V1CertificateSigningRequest :: Maybe Text
v1CertificateSigningRequestKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1CertificateSigningRequestMetadata:V1CertificateSigningRequest :: Maybe V1ObjectMeta
v1CertificateSigningRequestMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , V1CertificateSigningRequestSpec
$sel:v1CertificateSigningRequestSpec:V1CertificateSigningRequest :: V1CertificateSigningRequestSpec
v1CertificateSigningRequestSpec :: V1CertificateSigningRequestSpec
v1CertificateSigningRequestSpec
  , $sel:v1CertificateSigningRequestStatus:V1CertificateSigningRequest :: Maybe V1CertificateSigningRequestStatus
v1CertificateSigningRequestStatus = Maybe V1CertificateSigningRequestStatus
forall a. Maybe a
Nothing
  }

-- ** V1CertificateSigningRequestCondition
-- | V1CertificateSigningRequestCondition
-- CertificateSigningRequestCondition describes a condition of a CertificateSigningRequest object
data V1CertificateSigningRequestCondition = V1CertificateSigningRequestCondition
  { V1CertificateSigningRequestCondition -> Maybe DateTime
v1CertificateSigningRequestConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - lastTransitionTime is the time the condition last transitioned from one status to another. If unset, when a new condition type is added or an existing condition&#39;s status is changed, the server defaults this to the current time.
  , V1CertificateSigningRequestCondition -> Maybe DateTime
v1CertificateSigningRequestConditionLastUpdateTime :: !(Maybe DateTime) -- ^ "lastUpdateTime" - lastUpdateTime is the time of the last update to this condition
  , V1CertificateSigningRequestCondition -> Maybe Text
v1CertificateSigningRequestConditionMessage :: !(Maybe Text) -- ^ "message" - message contains a human readable message with details about the request state
  , V1CertificateSigningRequestCondition -> Maybe Text
v1CertificateSigningRequestConditionReason :: !(Maybe Text) -- ^ "reason" - reason indicates a brief reason for the request state
  , V1CertificateSigningRequestCondition -> Text
v1CertificateSigningRequestConditionStatus :: !(Text) -- ^ /Required/ "status" - status of the condition, one of True, False, Unknown. Approved, Denied, and Failed conditions may not be \&quot;False\&quot; or \&quot;Unknown\&quot;.
  , V1CertificateSigningRequestCondition -> Text
v1CertificateSigningRequestConditionType :: !(Text) -- ^ /Required/ "type" - type of the condition. Known conditions are \&quot;Approved\&quot;, \&quot;Denied\&quot;, and \&quot;Failed\&quot;.  An \&quot;Approved\&quot; condition is added via the /approval subresource, indicating the request was approved and should be issued by the signer.  A \&quot;Denied\&quot; condition is added via the /approval subresource, indicating the request was denied and should not be issued by the signer.  A \&quot;Failed\&quot; condition is added via the /status subresource, indicating the signer failed to issue the certificate.  Approved and Denied conditions are mutually exclusive. Approved, Denied, and Failed conditions cannot be removed once added.  Only one condition of a given type is allowed.
  } deriving (Int -> V1CertificateSigningRequestCondition -> ShowS
[V1CertificateSigningRequestCondition] -> ShowS
V1CertificateSigningRequestCondition -> String
(Int -> V1CertificateSigningRequestCondition -> ShowS)
-> (V1CertificateSigningRequestCondition -> String)
-> ([V1CertificateSigningRequestCondition] -> ShowS)
-> Show V1CertificateSigningRequestCondition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CertificateSigningRequestCondition -> ShowS
showsPrec :: Int -> V1CertificateSigningRequestCondition -> ShowS
$cshow :: V1CertificateSigningRequestCondition -> String
show :: V1CertificateSigningRequestCondition -> String
$cshowList :: [V1CertificateSigningRequestCondition] -> ShowS
showList :: [V1CertificateSigningRequestCondition] -> ShowS
P.Show, V1CertificateSigningRequestCondition
-> V1CertificateSigningRequestCondition -> Bool
(V1CertificateSigningRequestCondition
 -> V1CertificateSigningRequestCondition -> Bool)
-> (V1CertificateSigningRequestCondition
    -> V1CertificateSigningRequestCondition -> Bool)
-> Eq V1CertificateSigningRequestCondition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CertificateSigningRequestCondition
-> V1CertificateSigningRequestCondition -> Bool
== :: V1CertificateSigningRequestCondition
-> V1CertificateSigningRequestCondition -> Bool
$c/= :: V1CertificateSigningRequestCondition
-> V1CertificateSigningRequestCondition -> Bool
/= :: V1CertificateSigningRequestCondition
-> V1CertificateSigningRequestCondition -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CertificateSigningRequestCondition
instance A.FromJSON V1CertificateSigningRequestCondition where
  parseJSON :: Value -> Parser V1CertificateSigningRequestCondition
parseJSON = String
-> (Object -> Parser V1CertificateSigningRequestCondition)
-> Value
-> Parser V1CertificateSigningRequestCondition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CertificateSigningRequestCondition" ((Object -> Parser V1CertificateSigningRequestCondition)
 -> Value -> Parser V1CertificateSigningRequestCondition)
-> (Object -> Parser V1CertificateSigningRequestCondition)
-> Value
-> Parser V1CertificateSigningRequestCondition
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe DateTime
-> Maybe DateTime
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> V1CertificateSigningRequestCondition
V1CertificateSigningRequestCondition
      (Maybe DateTime
 -> Maybe DateTime
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> Text
 -> V1CertificateSigningRequestCondition)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe DateTime
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> V1CertificateSigningRequestCondition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lastTransitionTime")
      Parser
  (Maybe DateTime
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> V1CertificateSigningRequestCondition)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> V1CertificateSigningRequestCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lastUpdateTime")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> V1CertificateSigningRequestCondition)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Text -> Text -> V1CertificateSigningRequestCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"message")
      Parser
  (Maybe Text
   -> Text -> Text -> V1CertificateSigningRequestCondition)
-> Parser (Maybe Text)
-> Parser (Text -> Text -> V1CertificateSigningRequestCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reason")
      Parser (Text -> Text -> V1CertificateSigningRequestCondition)
-> Parser Text
-> Parser (Text -> V1CertificateSigningRequestCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"status")
      Parser (Text -> V1CertificateSigningRequestCondition)
-> Parser Text -> Parser V1CertificateSigningRequestCondition
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"type")

-- | ToJSON V1CertificateSigningRequestCondition
instance A.ToJSON V1CertificateSigningRequestCondition where
  toJSON :: V1CertificateSigningRequestCondition -> Value
toJSON V1CertificateSigningRequestCondition {Maybe Text
Maybe DateTime
Text
$sel:v1CertificateSigningRequestConditionLastTransitionTime:V1CertificateSigningRequestCondition :: V1CertificateSigningRequestCondition -> Maybe DateTime
$sel:v1CertificateSigningRequestConditionLastUpdateTime:V1CertificateSigningRequestCondition :: V1CertificateSigningRequestCondition -> Maybe DateTime
$sel:v1CertificateSigningRequestConditionMessage:V1CertificateSigningRequestCondition :: V1CertificateSigningRequestCondition -> Maybe Text
$sel:v1CertificateSigningRequestConditionReason:V1CertificateSigningRequestCondition :: V1CertificateSigningRequestCondition -> Maybe Text
$sel:v1CertificateSigningRequestConditionStatus:V1CertificateSigningRequestCondition :: V1CertificateSigningRequestCondition -> Text
$sel:v1CertificateSigningRequestConditionType:V1CertificateSigningRequestCondition :: V1CertificateSigningRequestCondition -> Text
v1CertificateSigningRequestConditionLastTransitionTime :: Maybe DateTime
v1CertificateSigningRequestConditionLastUpdateTime :: Maybe DateTime
v1CertificateSigningRequestConditionMessage :: Maybe Text
v1CertificateSigningRequestConditionReason :: Maybe Text
v1CertificateSigningRequestConditionStatus :: Text
v1CertificateSigningRequestConditionType :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"lastTransitionTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1CertificateSigningRequestConditionLastTransitionTime
      , Key
"lastUpdateTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1CertificateSigningRequestConditionLastUpdateTime
      , Key
"message" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CertificateSigningRequestConditionMessage
      , Key
"reason" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CertificateSigningRequestConditionReason
      , Key
"status" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1CertificateSigningRequestConditionStatus
      , Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1CertificateSigningRequestConditionType
      ]


-- | Construct a value of type 'V1CertificateSigningRequestCondition' (by applying it's required fields, if any)
mkV1CertificateSigningRequestCondition
  :: Text -- ^ 'v1CertificateSigningRequestConditionStatus': status of the condition, one of True, False, Unknown. Approved, Denied, and Failed conditions may not be \"False\" or \"Unknown\".
  -> Text -- ^ 'v1CertificateSigningRequestConditionType': type of the condition. Known conditions are \"Approved\", \"Denied\", and \"Failed\".  An \"Approved\" condition is added via the /approval subresource, indicating the request was approved and should be issued by the signer.  A \"Denied\" condition is added via the /approval subresource, indicating the request was denied and should not be issued by the signer.  A \"Failed\" condition is added via the /status subresource, indicating the signer failed to issue the certificate.  Approved and Denied conditions are mutually exclusive. Approved, Denied, and Failed conditions cannot be removed once added.  Only one condition of a given type is allowed.
  -> V1CertificateSigningRequestCondition
mkV1CertificateSigningRequestCondition :: Text -> Text -> V1CertificateSigningRequestCondition
mkV1CertificateSigningRequestCondition Text
v1CertificateSigningRequestConditionStatus Text
v1CertificateSigningRequestConditionType =
  V1CertificateSigningRequestCondition
  { $sel:v1CertificateSigningRequestConditionLastTransitionTime:V1CertificateSigningRequestCondition :: Maybe DateTime
v1CertificateSigningRequestConditionLastTransitionTime = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1CertificateSigningRequestConditionLastUpdateTime:V1CertificateSigningRequestCondition :: Maybe DateTime
v1CertificateSigningRequestConditionLastUpdateTime = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1CertificateSigningRequestConditionMessage:V1CertificateSigningRequestCondition :: Maybe Text
v1CertificateSigningRequestConditionMessage = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1CertificateSigningRequestConditionReason:V1CertificateSigningRequestCondition :: Maybe Text
v1CertificateSigningRequestConditionReason = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1CertificateSigningRequestConditionStatus:V1CertificateSigningRequestCondition :: Text
v1CertificateSigningRequestConditionStatus :: Text
v1CertificateSigningRequestConditionStatus
  , Text
$sel:v1CertificateSigningRequestConditionType:V1CertificateSigningRequestCondition :: Text
v1CertificateSigningRequestConditionType :: Text
v1CertificateSigningRequestConditionType
  }

-- ** V1CertificateSigningRequestList
-- | V1CertificateSigningRequestList
-- CertificateSigningRequestList is a collection of CertificateSigningRequest objects
data V1CertificateSigningRequestList = V1CertificateSigningRequestList
  { V1CertificateSigningRequestList -> Maybe Text
v1CertificateSigningRequestListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1CertificateSigningRequestList -> [V1CertificateSigningRequest]
v1CertificateSigningRequestListItems :: !([V1CertificateSigningRequest]) -- ^ /Required/ "items" - items is a collection of CertificateSigningRequest objects
  , V1CertificateSigningRequestList -> Maybe Text
v1CertificateSigningRequestListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1CertificateSigningRequestList -> Maybe V1ListMeta
v1CertificateSigningRequestListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1CertificateSigningRequestList -> ShowS
[V1CertificateSigningRequestList] -> ShowS
V1CertificateSigningRequestList -> String
(Int -> V1CertificateSigningRequestList -> ShowS)
-> (V1CertificateSigningRequestList -> String)
-> ([V1CertificateSigningRequestList] -> ShowS)
-> Show V1CertificateSigningRequestList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CertificateSigningRequestList -> ShowS
showsPrec :: Int -> V1CertificateSigningRequestList -> ShowS
$cshow :: V1CertificateSigningRequestList -> String
show :: V1CertificateSigningRequestList -> String
$cshowList :: [V1CertificateSigningRequestList] -> ShowS
showList :: [V1CertificateSigningRequestList] -> ShowS
P.Show, V1CertificateSigningRequestList
-> V1CertificateSigningRequestList -> Bool
(V1CertificateSigningRequestList
 -> V1CertificateSigningRequestList -> Bool)
-> (V1CertificateSigningRequestList
    -> V1CertificateSigningRequestList -> Bool)
-> Eq V1CertificateSigningRequestList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CertificateSigningRequestList
-> V1CertificateSigningRequestList -> Bool
== :: V1CertificateSigningRequestList
-> V1CertificateSigningRequestList -> Bool
$c/= :: V1CertificateSigningRequestList
-> V1CertificateSigningRequestList -> Bool
/= :: V1CertificateSigningRequestList
-> V1CertificateSigningRequestList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CertificateSigningRequestList
instance A.FromJSON V1CertificateSigningRequestList where
  parseJSON :: Value -> Parser V1CertificateSigningRequestList
parseJSON = String
-> (Object -> Parser V1CertificateSigningRequestList)
-> Value
-> Parser V1CertificateSigningRequestList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CertificateSigningRequestList" ((Object -> Parser V1CertificateSigningRequestList)
 -> Value -> Parser V1CertificateSigningRequestList)
-> (Object -> Parser V1CertificateSigningRequestList)
-> Value
-> Parser V1CertificateSigningRequestList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1CertificateSigningRequest]
-> Maybe Text
-> Maybe V1ListMeta
-> V1CertificateSigningRequestList
V1CertificateSigningRequestList
      (Maybe Text
 -> [V1CertificateSigningRequest]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1CertificateSigningRequestList)
-> Parser (Maybe Text)
-> Parser
     ([V1CertificateSigningRequest]
      -> Maybe Text
      -> Maybe V1ListMeta
      -> V1CertificateSigningRequestList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1CertificateSigningRequest]
   -> Maybe Text
   -> Maybe V1ListMeta
   -> V1CertificateSigningRequestList)
-> Parser [V1CertificateSigningRequest]
-> Parser
     (Maybe Text -> Maybe V1ListMeta -> V1CertificateSigningRequestList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1CertificateSigningRequest]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser
  (Maybe Text -> Maybe V1ListMeta -> V1CertificateSigningRequestList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1CertificateSigningRequestList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1CertificateSigningRequestList)
-> Parser (Maybe V1ListMeta)
-> Parser V1CertificateSigningRequestList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1CertificateSigningRequestList
instance A.ToJSON V1CertificateSigningRequestList where
  toJSON :: V1CertificateSigningRequestList -> Value
toJSON V1CertificateSigningRequestList {[V1CertificateSigningRequest]
Maybe Text
Maybe V1ListMeta
$sel:v1CertificateSigningRequestListApiVersion:V1CertificateSigningRequestList :: V1CertificateSigningRequestList -> Maybe Text
$sel:v1CertificateSigningRequestListItems:V1CertificateSigningRequestList :: V1CertificateSigningRequestList -> [V1CertificateSigningRequest]
$sel:v1CertificateSigningRequestListKind:V1CertificateSigningRequestList :: V1CertificateSigningRequestList -> Maybe Text
$sel:v1CertificateSigningRequestListMetadata:V1CertificateSigningRequestList :: V1CertificateSigningRequestList -> Maybe V1ListMeta
v1CertificateSigningRequestListApiVersion :: Maybe Text
v1CertificateSigningRequestListItems :: [V1CertificateSigningRequest]
v1CertificateSigningRequestListKind :: Maybe Text
v1CertificateSigningRequestListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CertificateSigningRequestListApiVersion
      , Key
"items" Key -> [V1CertificateSigningRequest] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1CertificateSigningRequest]
v1CertificateSigningRequestListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CertificateSigningRequestListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1CertificateSigningRequestListMetadata
      ]


-- | Construct a value of type 'V1CertificateSigningRequestList' (by applying it's required fields, if any)
mkV1CertificateSigningRequestList
  :: [V1CertificateSigningRequest] -- ^ 'v1CertificateSigningRequestListItems': items is a collection of CertificateSigningRequest objects
  -> V1CertificateSigningRequestList
mkV1CertificateSigningRequestList :: [V1CertificateSigningRequest] -> V1CertificateSigningRequestList
mkV1CertificateSigningRequestList [V1CertificateSigningRequest]
v1CertificateSigningRequestListItems =
  V1CertificateSigningRequestList
  { $sel:v1CertificateSigningRequestListApiVersion:V1CertificateSigningRequestList :: Maybe Text
v1CertificateSigningRequestListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1CertificateSigningRequest]
$sel:v1CertificateSigningRequestListItems:V1CertificateSigningRequestList :: [V1CertificateSigningRequest]
v1CertificateSigningRequestListItems :: [V1CertificateSigningRequest]
v1CertificateSigningRequestListItems
  , $sel:v1CertificateSigningRequestListKind:V1CertificateSigningRequestList :: Maybe Text
v1CertificateSigningRequestListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1CertificateSigningRequestListMetadata:V1CertificateSigningRequestList :: Maybe V1ListMeta
v1CertificateSigningRequestListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1CertificateSigningRequestSpec
-- | V1CertificateSigningRequestSpec
-- CertificateSigningRequestSpec contains the certificate request.
data V1CertificateSigningRequestSpec = V1CertificateSigningRequestSpec
  { V1CertificateSigningRequestSpec -> Maybe Int
v1CertificateSigningRequestSpecExpirationSeconds :: !(Maybe Int) -- ^ "expirationSeconds" - expirationSeconds is the requested duration of validity of the issued certificate. The certificate signer may issue a certificate with a different validity duration so a client must check the delta between the notBefore and and notAfter fields in the issued certificate to determine the actual duration.  The v1.22+ in-tree implementations of the well-known Kubernetes signers will honor this field as long as the requested duration is not greater than the maximum duration they will honor per the --cluster-signing-duration CLI flag to the Kubernetes controller manager.  Certificate signers may not honor this field for various reasons:    1. Old signer that is unaware of the field (such as the in-tree      implementations prior to v1.22)   2. Signer whose configured maximum is shorter than the requested duration   3. Signer whose configured minimum is longer than the requested duration  The minimum valid value for expirationSeconds is 600, i.e. 10 minutes.
  , V1CertificateSigningRequestSpec -> Maybe (Map String [Text])
v1CertificateSigningRequestSpecExtra :: !(Maybe (Map.Map String [Text])) -- ^ "extra" - extra contains extra attributes of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.
  , V1CertificateSigningRequestSpec -> Maybe [Text]
v1CertificateSigningRequestSpecGroups :: !(Maybe [Text]) -- ^ "groups" - groups contains group membership of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.
  , V1CertificateSigningRequestSpec -> ByteArray
v1CertificateSigningRequestSpecRequest :: !(ByteArray) -- ^ /Required/ "request" - request contains an x509 certificate signing request encoded in a \&quot;CERTIFICATE REQUEST\&quot; PEM block. When serialized as JSON or YAML, the data is additionally base64-encoded.
  , V1CertificateSigningRequestSpec -> Text
v1CertificateSigningRequestSpecSignerName :: !(Text) -- ^ /Required/ "signerName" - signerName indicates the requested signer, and is a qualified name.  List/watch requests for CertificateSigningRequests can filter on this field using a \&quot;spec.signerName&#x3D;NAME\&quot; fieldSelector.  Well-known Kubernetes signers are:  1. \&quot;kubernetes.io/kube-apiserver-client\&quot;: issues client certificates that can be used to authenticate to kube-apiserver.   Requests for this signer are never auto-approved by kube-controller-manager, can be issued by the \&quot;csrsigning\&quot; controller in kube-controller-manager.  2. \&quot;kubernetes.io/kube-apiserver-client-kubelet\&quot;: issues client certificates that kubelets use to authenticate to kube-apiserver.   Requests for this signer can be auto-approved by the \&quot;csrapproving\&quot; controller in kube-controller-manager, and can be issued by the \&quot;csrsigning\&quot; controller in kube-controller-manager.  3. \&quot;kubernetes.io/kubelet-serving\&quot; issues serving certificates that kubelets use to serve TLS endpoints, which kube-apiserver can connect to securely.   Requests for this signer are never auto-approved by kube-controller-manager, and can be issued by the \&quot;csrsigning\&quot; controller in kube-controller-manager.  More details are available at https://k8s.io/docs/reference/access-authn-authz/certificate-signing-requests/#kubernetes-signers  Custom signerNames can also be specified. The signer defines:  1. Trust distribution: how trust (CA bundles) are distributed.  2. Permitted subjects: and behavior when a disallowed subject is requested.  3. Required, permitted, or forbidden x509 extensions in the request (including whether subjectAltNames are allowed, which types, restrictions on allowed values) and behavior when a disallowed extension is requested.  4. Required, permitted, or forbidden key usages / extended key usages.  5. Expiration/certificate lifetime: whether it is fixed by the signer, configurable by the admin.  6. Whether or not requests for CA certificates are allowed.
  , V1CertificateSigningRequestSpec -> Maybe Text
v1CertificateSigningRequestSpecUid :: !(Maybe Text) -- ^ "uid" - uid contains the uid of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.
  , V1CertificateSigningRequestSpec -> Maybe [Text]
v1CertificateSigningRequestSpecUsages :: !(Maybe [Text]) -- ^ "usages" - usages specifies a set of key usages requested in the issued certificate.  Requests for TLS client certificates typically request: \&quot;digital signature\&quot;, \&quot;key encipherment\&quot;, \&quot;client auth\&quot;.  Requests for TLS serving certificates typically request: \&quot;key encipherment\&quot;, \&quot;digital signature\&quot;, \&quot;server auth\&quot;.  Valid values are:  \&quot;signing\&quot;, \&quot;digital signature\&quot;, \&quot;content commitment\&quot;,  \&quot;key encipherment\&quot;, \&quot;key agreement\&quot;, \&quot;data encipherment\&quot;,  \&quot;cert sign\&quot;, \&quot;crl sign\&quot;, \&quot;encipher only\&quot;, \&quot;decipher only\&quot;, \&quot;any\&quot;,  \&quot;server auth\&quot;, \&quot;client auth\&quot;,  \&quot;code signing\&quot;, \&quot;email protection\&quot;, \&quot;s/mime\&quot;,  \&quot;ipsec end system\&quot;, \&quot;ipsec tunnel\&quot;, \&quot;ipsec user\&quot;,  \&quot;timestamping\&quot;, \&quot;ocsp signing\&quot;, \&quot;microsoft sgc\&quot;, \&quot;netscape sgc\&quot;
  , V1CertificateSigningRequestSpec -> Maybe Text
v1CertificateSigningRequestSpecUsername :: !(Maybe Text) -- ^ "username" - username contains the name of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.
  } deriving (Int -> V1CertificateSigningRequestSpec -> ShowS
[V1CertificateSigningRequestSpec] -> ShowS
V1CertificateSigningRequestSpec -> String
(Int -> V1CertificateSigningRequestSpec -> ShowS)
-> (V1CertificateSigningRequestSpec -> String)
-> ([V1CertificateSigningRequestSpec] -> ShowS)
-> Show V1CertificateSigningRequestSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CertificateSigningRequestSpec -> ShowS
showsPrec :: Int -> V1CertificateSigningRequestSpec -> ShowS
$cshow :: V1CertificateSigningRequestSpec -> String
show :: V1CertificateSigningRequestSpec -> String
$cshowList :: [V1CertificateSigningRequestSpec] -> ShowS
showList :: [V1CertificateSigningRequestSpec] -> ShowS
P.Show, V1CertificateSigningRequestSpec
-> V1CertificateSigningRequestSpec -> Bool
(V1CertificateSigningRequestSpec
 -> V1CertificateSigningRequestSpec -> Bool)
-> (V1CertificateSigningRequestSpec
    -> V1CertificateSigningRequestSpec -> Bool)
-> Eq V1CertificateSigningRequestSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CertificateSigningRequestSpec
-> V1CertificateSigningRequestSpec -> Bool
== :: V1CertificateSigningRequestSpec
-> V1CertificateSigningRequestSpec -> Bool
$c/= :: V1CertificateSigningRequestSpec
-> V1CertificateSigningRequestSpec -> Bool
/= :: V1CertificateSigningRequestSpec
-> V1CertificateSigningRequestSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CertificateSigningRequestSpec
instance A.FromJSON V1CertificateSigningRequestSpec where
  parseJSON :: Value -> Parser V1CertificateSigningRequestSpec
parseJSON = String
-> (Object -> Parser V1CertificateSigningRequestSpec)
-> Value
-> Parser V1CertificateSigningRequestSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CertificateSigningRequestSpec" ((Object -> Parser V1CertificateSigningRequestSpec)
 -> Value -> Parser V1CertificateSigningRequestSpec)
-> (Object -> Parser V1CertificateSigningRequestSpec)
-> Value
-> Parser V1CertificateSigningRequestSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Int
-> Maybe (Map String [Text])
-> Maybe [Text]
-> ByteArray
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> V1CertificateSigningRequestSpec
V1CertificateSigningRequestSpec
      (Maybe Int
 -> Maybe (Map String [Text])
 -> Maybe [Text]
 -> ByteArray
 -> Text
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe Text
 -> V1CertificateSigningRequestSpec)
-> Parser (Maybe Int)
-> Parser
     (Maybe (Map String [Text])
      -> Maybe [Text]
      -> ByteArray
      -> Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> V1CertificateSigningRequestSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"expirationSeconds")
      Parser
  (Maybe (Map String [Text])
   -> Maybe [Text]
   -> ByteArray
   -> Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> V1CertificateSigningRequestSpec)
-> Parser (Maybe (Map String [Text]))
-> Parser
     (Maybe [Text]
      -> ByteArray
      -> Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> V1CertificateSigningRequestSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String [Text]))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"extra")
      Parser
  (Maybe [Text]
   -> ByteArray
   -> Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> V1CertificateSigningRequestSpec)
-> Parser (Maybe [Text])
-> Parser
     (ByteArray
      -> Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> V1CertificateSigningRequestSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"groups")
      Parser
  (ByteArray
   -> Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> V1CertificateSigningRequestSpec)
-> Parser ByteArray
-> Parser
     (Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> V1CertificateSigningRequestSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser ByteArray
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"request")
      Parser
  (Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> V1CertificateSigningRequestSpec)
-> Parser Text
-> Parser
     (Maybe Text
      -> Maybe [Text] -> Maybe Text -> V1CertificateSigningRequestSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"signerName")
      Parser
  (Maybe Text
   -> Maybe [Text] -> Maybe Text -> V1CertificateSigningRequestSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text] -> Maybe Text -> V1CertificateSigningRequestSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"uid")
      Parser
  (Maybe [Text] -> Maybe Text -> V1CertificateSigningRequestSpec)
-> Parser (Maybe [Text])
-> Parser (Maybe Text -> V1CertificateSigningRequestSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"usages")
      Parser (Maybe Text -> V1CertificateSigningRequestSpec)
-> Parser (Maybe Text) -> Parser V1CertificateSigningRequestSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"username")

-- | ToJSON V1CertificateSigningRequestSpec
instance A.ToJSON V1CertificateSigningRequestSpec where
  toJSON :: V1CertificateSigningRequestSpec -> Value
toJSON V1CertificateSigningRequestSpec {Maybe Int
Maybe [Text]
Maybe (Map String [Text])
Maybe Text
Text
ByteArray
$sel:v1CertificateSigningRequestSpecExpirationSeconds:V1CertificateSigningRequestSpec :: V1CertificateSigningRequestSpec -> Maybe Int
$sel:v1CertificateSigningRequestSpecExtra:V1CertificateSigningRequestSpec :: V1CertificateSigningRequestSpec -> Maybe (Map String [Text])
$sel:v1CertificateSigningRequestSpecGroups:V1CertificateSigningRequestSpec :: V1CertificateSigningRequestSpec -> Maybe [Text]
$sel:v1CertificateSigningRequestSpecRequest:V1CertificateSigningRequestSpec :: V1CertificateSigningRequestSpec -> ByteArray
$sel:v1CertificateSigningRequestSpecSignerName:V1CertificateSigningRequestSpec :: V1CertificateSigningRequestSpec -> Text
$sel:v1CertificateSigningRequestSpecUid:V1CertificateSigningRequestSpec :: V1CertificateSigningRequestSpec -> Maybe Text
$sel:v1CertificateSigningRequestSpecUsages:V1CertificateSigningRequestSpec :: V1CertificateSigningRequestSpec -> Maybe [Text]
$sel:v1CertificateSigningRequestSpecUsername:V1CertificateSigningRequestSpec :: V1CertificateSigningRequestSpec -> Maybe Text
v1CertificateSigningRequestSpecExpirationSeconds :: Maybe Int
v1CertificateSigningRequestSpecExtra :: Maybe (Map String [Text])
v1CertificateSigningRequestSpecGroups :: Maybe [Text]
v1CertificateSigningRequestSpecRequest :: ByteArray
v1CertificateSigningRequestSpecSignerName :: Text
v1CertificateSigningRequestSpecUid :: Maybe Text
v1CertificateSigningRequestSpecUsages :: Maybe [Text]
v1CertificateSigningRequestSpecUsername :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"expirationSeconds" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1CertificateSigningRequestSpecExpirationSeconds
      , Key
"extra" Key -> Maybe (Map String [Text]) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String [Text])
v1CertificateSigningRequestSpecExtra
      , Key
"groups" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1CertificateSigningRequestSpecGroups
      , Key
"request" Key -> ByteArray -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= ByteArray
v1CertificateSigningRequestSpecRequest
      , Key
"signerName" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1CertificateSigningRequestSpecSignerName
      , Key
"uid" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CertificateSigningRequestSpecUid
      , Key
"usages" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1CertificateSigningRequestSpecUsages
      , Key
"username" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CertificateSigningRequestSpecUsername
      ]


-- | Construct a value of type 'V1CertificateSigningRequestSpec' (by applying it's required fields, if any)
mkV1CertificateSigningRequestSpec
  :: ByteArray -- ^ 'v1CertificateSigningRequestSpecRequest': request contains an x509 certificate signing request encoded in a \"CERTIFICATE REQUEST\" PEM block. When serialized as JSON or YAML, the data is additionally base64-encoded.
  -> Text -- ^ 'v1CertificateSigningRequestSpecSignerName': signerName indicates the requested signer, and is a qualified name.  List/watch requests for CertificateSigningRequests can filter on this field using a \"spec.signerName=NAME\" fieldSelector.  Well-known Kubernetes signers are:  1. \"kubernetes.io/kube-apiserver-client\": issues client certificates that can be used to authenticate to kube-apiserver.   Requests for this signer are never auto-approved by kube-controller-manager, can be issued by the \"csrsigning\" controller in kube-controller-manager.  2. \"kubernetes.io/kube-apiserver-client-kubelet\": issues client certificates that kubelets use to authenticate to kube-apiserver.   Requests for this signer can be auto-approved by the \"csrapproving\" controller in kube-controller-manager, and can be issued by the \"csrsigning\" controller in kube-controller-manager.  3. \"kubernetes.io/kubelet-serving\" issues serving certificates that kubelets use to serve TLS endpoints, which kube-apiserver can connect to securely.   Requests for this signer are never auto-approved by kube-controller-manager, and can be issued by the \"csrsigning\" controller in kube-controller-manager.  More details are available at https://k8s.io/docs/reference/access-authn-authz/certificate-signing-requests/#kubernetes-signers  Custom signerNames can also be specified. The signer defines:  1. Trust distribution: how trust (CA bundles) are distributed.  2. Permitted subjects: and behavior when a disallowed subject is requested.  3. Required, permitted, or forbidden x509 extensions in the request (including whether subjectAltNames are allowed, which types, restrictions on allowed values) and behavior when a disallowed extension is requested.  4. Required, permitted, or forbidden key usages / extended key usages.  5. Expiration/certificate lifetime: whether it is fixed by the signer, configurable by the admin.  6. Whether or not requests for CA certificates are allowed.
  -> V1CertificateSigningRequestSpec
mkV1CertificateSigningRequestSpec :: ByteArray -> Text -> V1CertificateSigningRequestSpec
mkV1CertificateSigningRequestSpec ByteArray
v1CertificateSigningRequestSpecRequest Text
v1CertificateSigningRequestSpecSignerName =
  V1CertificateSigningRequestSpec
  { $sel:v1CertificateSigningRequestSpecExpirationSeconds:V1CertificateSigningRequestSpec :: Maybe Int
v1CertificateSigningRequestSpecExpirationSeconds = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1CertificateSigningRequestSpecExtra:V1CertificateSigningRequestSpec :: Maybe (Map String [Text])
v1CertificateSigningRequestSpecExtra = Maybe (Map String [Text])
forall a. Maybe a
Nothing
  , $sel:v1CertificateSigningRequestSpecGroups:V1CertificateSigningRequestSpec :: Maybe [Text]
v1CertificateSigningRequestSpecGroups = Maybe [Text]
forall a. Maybe a
Nothing
  , ByteArray
$sel:v1CertificateSigningRequestSpecRequest:V1CertificateSigningRequestSpec :: ByteArray
v1CertificateSigningRequestSpecRequest :: ByteArray
v1CertificateSigningRequestSpecRequest
  , Text
$sel:v1CertificateSigningRequestSpecSignerName:V1CertificateSigningRequestSpec :: Text
v1CertificateSigningRequestSpecSignerName :: Text
v1CertificateSigningRequestSpecSignerName
  , $sel:v1CertificateSigningRequestSpecUid:V1CertificateSigningRequestSpec :: Maybe Text
v1CertificateSigningRequestSpecUid = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1CertificateSigningRequestSpecUsages:V1CertificateSigningRequestSpec :: Maybe [Text]
v1CertificateSigningRequestSpecUsages = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1CertificateSigningRequestSpecUsername:V1CertificateSigningRequestSpec :: Maybe Text
v1CertificateSigningRequestSpecUsername = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1CertificateSigningRequestStatus
-- | V1CertificateSigningRequestStatus
-- CertificateSigningRequestStatus contains conditions used to indicate approved/denied/failed status of the request, and the issued certificate.
data V1CertificateSigningRequestStatus = V1CertificateSigningRequestStatus
  { V1CertificateSigningRequestStatus -> Maybe ByteArray
v1CertificateSigningRequestStatusCertificate :: !(Maybe ByteArray) -- ^ "certificate" - certificate is populated with an issued certificate by the signer after an Approved condition is present. This field is set via the /status subresource. Once populated, this field is immutable.  If the certificate signing request is denied, a condition of type \&quot;Denied\&quot; is added and this field remains empty. If the signer cannot issue the certificate, a condition of type \&quot;Failed\&quot; is added and this field remains empty.  Validation requirements:  1. certificate must contain one or more PEM blocks.  2. All PEM blocks must have the \&quot;CERTIFICATE\&quot; label, contain no headers, and the encoded data   must be a BER-encoded ASN.1 Certificate structure as described in section 4 of RFC5280.  3. Non-PEM content may appear before or after the \&quot;CERTIFICATE\&quot; PEM blocks and is unvalidated,   to allow for explanatory text as described in section 5.2 of RFC7468.  If more than one PEM block is present, and the definition of the requested spec.signerName does not indicate otherwise, the first block is the issued certificate, and subsequent blocks should be treated as intermediate certificates and presented in TLS handshakes.  The certificate is encoded in PEM format.  When serialized as JSON or YAML, the data is additionally base64-encoded, so it consists of:      base64(     -----BEGIN CERTIFICATE-----     ...     -----END CERTIFICATE-----     )
  , V1CertificateSigningRequestStatus
-> Maybe [V1CertificateSigningRequestCondition]
v1CertificateSigningRequestStatusConditions :: !(Maybe [V1CertificateSigningRequestCondition]) -- ^ "conditions" - conditions applied to the request. Known conditions are \&quot;Approved\&quot;, \&quot;Denied\&quot;, and \&quot;Failed\&quot;.
  } deriving (Int -> V1CertificateSigningRequestStatus -> ShowS
[V1CertificateSigningRequestStatus] -> ShowS
V1CertificateSigningRequestStatus -> String
(Int -> V1CertificateSigningRequestStatus -> ShowS)
-> (V1CertificateSigningRequestStatus -> String)
-> ([V1CertificateSigningRequestStatus] -> ShowS)
-> Show V1CertificateSigningRequestStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CertificateSigningRequestStatus -> ShowS
showsPrec :: Int -> V1CertificateSigningRequestStatus -> ShowS
$cshow :: V1CertificateSigningRequestStatus -> String
show :: V1CertificateSigningRequestStatus -> String
$cshowList :: [V1CertificateSigningRequestStatus] -> ShowS
showList :: [V1CertificateSigningRequestStatus] -> ShowS
P.Show, V1CertificateSigningRequestStatus
-> V1CertificateSigningRequestStatus -> Bool
(V1CertificateSigningRequestStatus
 -> V1CertificateSigningRequestStatus -> Bool)
-> (V1CertificateSigningRequestStatus
    -> V1CertificateSigningRequestStatus -> Bool)
-> Eq V1CertificateSigningRequestStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CertificateSigningRequestStatus
-> V1CertificateSigningRequestStatus -> Bool
== :: V1CertificateSigningRequestStatus
-> V1CertificateSigningRequestStatus -> Bool
$c/= :: V1CertificateSigningRequestStatus
-> V1CertificateSigningRequestStatus -> Bool
/= :: V1CertificateSigningRequestStatus
-> V1CertificateSigningRequestStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CertificateSigningRequestStatus
instance A.FromJSON V1CertificateSigningRequestStatus where
  parseJSON :: Value -> Parser V1CertificateSigningRequestStatus
parseJSON = String
-> (Object -> Parser V1CertificateSigningRequestStatus)
-> Value
-> Parser V1CertificateSigningRequestStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CertificateSigningRequestStatus" ((Object -> Parser V1CertificateSigningRequestStatus)
 -> Value -> Parser V1CertificateSigningRequestStatus)
-> (Object -> Parser V1CertificateSigningRequestStatus)
-> Value
-> Parser V1CertificateSigningRequestStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe ByteArray
-> Maybe [V1CertificateSigningRequestCondition]
-> V1CertificateSigningRequestStatus
V1CertificateSigningRequestStatus
      (Maybe ByteArray
 -> Maybe [V1CertificateSigningRequestCondition]
 -> V1CertificateSigningRequestStatus)
-> Parser (Maybe ByteArray)
-> Parser
     (Maybe [V1CertificateSigningRequestCondition]
      -> V1CertificateSigningRequestStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe ByteArray)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"certificate")
      Parser
  (Maybe [V1CertificateSigningRequestCondition]
   -> V1CertificateSigningRequestStatus)
-> Parser (Maybe [V1CertificateSigningRequestCondition])
-> Parser V1CertificateSigningRequestStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object
-> Key -> Parser (Maybe [V1CertificateSigningRequestCondition])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"conditions")

-- | ToJSON V1CertificateSigningRequestStatus
instance A.ToJSON V1CertificateSigningRequestStatus where
  toJSON :: V1CertificateSigningRequestStatus -> Value
toJSON V1CertificateSigningRequestStatus {Maybe [V1CertificateSigningRequestCondition]
Maybe ByteArray
$sel:v1CertificateSigningRequestStatusCertificate:V1CertificateSigningRequestStatus :: V1CertificateSigningRequestStatus -> Maybe ByteArray
$sel:v1CertificateSigningRequestStatusConditions:V1CertificateSigningRequestStatus :: V1CertificateSigningRequestStatus
-> Maybe [V1CertificateSigningRequestCondition]
v1CertificateSigningRequestStatusCertificate :: Maybe ByteArray
v1CertificateSigningRequestStatusConditions :: Maybe [V1CertificateSigningRequestCondition]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"certificate" Key -> Maybe ByteArray -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe ByteArray
v1CertificateSigningRequestStatusCertificate
      , Key
"conditions" Key -> Maybe [V1CertificateSigningRequestCondition] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1CertificateSigningRequestCondition]
v1CertificateSigningRequestStatusConditions
      ]


-- | Construct a value of type 'V1CertificateSigningRequestStatus' (by applying it's required fields, if any)
mkV1CertificateSigningRequestStatus
  :: V1CertificateSigningRequestStatus
mkV1CertificateSigningRequestStatus :: V1CertificateSigningRequestStatus
mkV1CertificateSigningRequestStatus =
  V1CertificateSigningRequestStatus
  { $sel:v1CertificateSigningRequestStatusCertificate:V1CertificateSigningRequestStatus :: Maybe ByteArray
v1CertificateSigningRequestStatusCertificate = Maybe ByteArray
forall a. Maybe a
Nothing
  , $sel:v1CertificateSigningRequestStatusConditions:V1CertificateSigningRequestStatus :: Maybe [V1CertificateSigningRequestCondition]
v1CertificateSigningRequestStatusConditions = Maybe [V1CertificateSigningRequestCondition]
forall a. Maybe a
Nothing
  }

-- ** V1CinderPersistentVolumeSource
-- | V1CinderPersistentVolumeSource
-- Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.
data V1CinderPersistentVolumeSource = V1CinderPersistentVolumeSource
  { V1CinderPersistentVolumeSource -> Maybe Text
v1CinderPersistentVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - fsType Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \&quot;ext4\&quot;, \&quot;xfs\&quot;, \&quot;ntfs\&quot;. Implicitly inferred to be \&quot;ext4\&quot; if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md
  , V1CinderPersistentVolumeSource -> Maybe Bool
v1CinderPersistentVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md
  , V1CinderPersistentVolumeSource -> Maybe V1SecretReference
v1CinderPersistentVolumeSourceSecretRef :: !(Maybe V1SecretReference) -- ^ "secretRef"
  , V1CinderPersistentVolumeSource -> Text
v1CinderPersistentVolumeSourceVolumeId :: !(Text) -- ^ /Required/ "volumeID" - volumeID used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md
  } deriving (Int -> V1CinderPersistentVolumeSource -> ShowS
[V1CinderPersistentVolumeSource] -> ShowS
V1CinderPersistentVolumeSource -> String
(Int -> V1CinderPersistentVolumeSource -> ShowS)
-> (V1CinderPersistentVolumeSource -> String)
-> ([V1CinderPersistentVolumeSource] -> ShowS)
-> Show V1CinderPersistentVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CinderPersistentVolumeSource -> ShowS
showsPrec :: Int -> V1CinderPersistentVolumeSource -> ShowS
$cshow :: V1CinderPersistentVolumeSource -> String
show :: V1CinderPersistentVolumeSource -> String
$cshowList :: [V1CinderPersistentVolumeSource] -> ShowS
showList :: [V1CinderPersistentVolumeSource] -> ShowS
P.Show, V1CinderPersistentVolumeSource
-> V1CinderPersistentVolumeSource -> Bool
(V1CinderPersistentVolumeSource
 -> V1CinderPersistentVolumeSource -> Bool)
-> (V1CinderPersistentVolumeSource
    -> V1CinderPersistentVolumeSource -> Bool)
-> Eq V1CinderPersistentVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CinderPersistentVolumeSource
-> V1CinderPersistentVolumeSource -> Bool
== :: V1CinderPersistentVolumeSource
-> V1CinderPersistentVolumeSource -> Bool
$c/= :: V1CinderPersistentVolumeSource
-> V1CinderPersistentVolumeSource -> Bool
/= :: V1CinderPersistentVolumeSource
-> V1CinderPersistentVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CinderPersistentVolumeSource
instance A.FromJSON V1CinderPersistentVolumeSource where
  parseJSON :: Value -> Parser V1CinderPersistentVolumeSource
parseJSON = String
-> (Object -> Parser V1CinderPersistentVolumeSource)
-> Value
-> Parser V1CinderPersistentVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CinderPersistentVolumeSource" ((Object -> Parser V1CinderPersistentVolumeSource)
 -> Value -> Parser V1CinderPersistentVolumeSource)
-> (Object -> Parser V1CinderPersistentVolumeSource)
-> Value
-> Parser V1CinderPersistentVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Bool
-> Maybe V1SecretReference
-> Text
-> V1CinderPersistentVolumeSource
V1CinderPersistentVolumeSource
      (Maybe Text
 -> Maybe Bool
 -> Maybe V1SecretReference
 -> Text
 -> V1CinderPersistentVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe V1SecretReference
      -> Text
      -> V1CinderPersistentVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fsType")
      Parser
  (Maybe Bool
   -> Maybe V1SecretReference
   -> Text
   -> V1CinderPersistentVolumeSource)
-> Parser (Maybe Bool)
-> Parser
     (Maybe V1SecretReference -> Text -> V1CinderPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readOnly")
      Parser
  (Maybe V1SecretReference -> Text -> V1CinderPersistentVolumeSource)
-> Parser (Maybe V1SecretReference)
-> Parser (Text -> V1CinderPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1SecretReference)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"secretRef")
      Parser (Text -> V1CinderPersistentVolumeSource)
-> Parser Text -> Parser V1CinderPersistentVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"volumeID")

-- | ToJSON V1CinderPersistentVolumeSource
instance A.ToJSON V1CinderPersistentVolumeSource where
  toJSON :: V1CinderPersistentVolumeSource -> Value
toJSON V1CinderPersistentVolumeSource {Maybe Bool
Maybe Text
Maybe V1SecretReference
Text
$sel:v1CinderPersistentVolumeSourceFsType:V1CinderPersistentVolumeSource :: V1CinderPersistentVolumeSource -> Maybe Text
$sel:v1CinderPersistentVolumeSourceReadOnly:V1CinderPersistentVolumeSource :: V1CinderPersistentVolumeSource -> Maybe Bool
$sel:v1CinderPersistentVolumeSourceSecretRef:V1CinderPersistentVolumeSource :: V1CinderPersistentVolumeSource -> Maybe V1SecretReference
$sel:v1CinderPersistentVolumeSourceVolumeId:V1CinderPersistentVolumeSource :: V1CinderPersistentVolumeSource -> Text
v1CinderPersistentVolumeSourceFsType :: Maybe Text
v1CinderPersistentVolumeSourceReadOnly :: Maybe Bool
v1CinderPersistentVolumeSourceSecretRef :: Maybe V1SecretReference
v1CinderPersistentVolumeSourceVolumeId :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"fsType" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CinderPersistentVolumeSourceFsType
      , Key
"readOnly" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1CinderPersistentVolumeSourceReadOnly
      , Key
"secretRef" Key -> Maybe V1SecretReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1SecretReference
v1CinderPersistentVolumeSourceSecretRef
      , Key
"volumeID" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1CinderPersistentVolumeSourceVolumeId
      ]


-- | Construct a value of type 'V1CinderPersistentVolumeSource' (by applying it's required fields, if any)
mkV1CinderPersistentVolumeSource
  :: Text -- ^ 'v1CinderPersistentVolumeSourceVolumeId': volumeID used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md
  -> V1CinderPersistentVolumeSource
mkV1CinderPersistentVolumeSource :: Text -> V1CinderPersistentVolumeSource
mkV1CinderPersistentVolumeSource Text
v1CinderPersistentVolumeSourceVolumeId =
  V1CinderPersistentVolumeSource
  { $sel:v1CinderPersistentVolumeSourceFsType:V1CinderPersistentVolumeSource :: Maybe Text
v1CinderPersistentVolumeSourceFsType = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1CinderPersistentVolumeSourceReadOnly:V1CinderPersistentVolumeSource :: Maybe Bool
v1CinderPersistentVolumeSourceReadOnly = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1CinderPersistentVolumeSourceSecretRef:V1CinderPersistentVolumeSource :: Maybe V1SecretReference
v1CinderPersistentVolumeSourceSecretRef = Maybe V1SecretReference
forall a. Maybe a
Nothing
  , Text
$sel:v1CinderPersistentVolumeSourceVolumeId:V1CinderPersistentVolumeSource :: Text
v1CinderPersistentVolumeSourceVolumeId :: Text
v1CinderPersistentVolumeSourceVolumeId
  }

-- ** V1CinderVolumeSource
-- | V1CinderVolumeSource
-- Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.
data V1CinderVolumeSource = V1CinderVolumeSource
  { V1CinderVolumeSource -> Maybe Text
v1CinderVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \&quot;ext4\&quot;, \&quot;xfs\&quot;, \&quot;ntfs\&quot;. Implicitly inferred to be \&quot;ext4\&quot; if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md
  , V1CinderVolumeSource -> Maybe Bool
v1CinderVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md
  , V1CinderVolumeSource -> Maybe V1LocalObjectReference
v1CinderVolumeSourceSecretRef :: !(Maybe V1LocalObjectReference) -- ^ "secretRef"
  , V1CinderVolumeSource -> Text
v1CinderVolumeSourceVolumeId :: !(Text) -- ^ /Required/ "volumeID" - volumeID used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md
  } deriving (Int -> V1CinderVolumeSource -> ShowS
[V1CinderVolumeSource] -> ShowS
V1CinderVolumeSource -> String
(Int -> V1CinderVolumeSource -> ShowS)
-> (V1CinderVolumeSource -> String)
-> ([V1CinderVolumeSource] -> ShowS)
-> Show V1CinderVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CinderVolumeSource -> ShowS
showsPrec :: Int -> V1CinderVolumeSource -> ShowS
$cshow :: V1CinderVolumeSource -> String
show :: V1CinderVolumeSource -> String
$cshowList :: [V1CinderVolumeSource] -> ShowS
showList :: [V1CinderVolumeSource] -> ShowS
P.Show, V1CinderVolumeSource -> V1CinderVolumeSource -> Bool
(V1CinderVolumeSource -> V1CinderVolumeSource -> Bool)
-> (V1CinderVolumeSource -> V1CinderVolumeSource -> Bool)
-> Eq V1CinderVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CinderVolumeSource -> V1CinderVolumeSource -> Bool
== :: V1CinderVolumeSource -> V1CinderVolumeSource -> Bool
$c/= :: V1CinderVolumeSource -> V1CinderVolumeSource -> Bool
/= :: V1CinderVolumeSource -> V1CinderVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CinderVolumeSource
instance A.FromJSON V1CinderVolumeSource where
  parseJSON :: Value -> Parser V1CinderVolumeSource
parseJSON = String
-> (Object -> Parser V1CinderVolumeSource)
-> Value
-> Parser V1CinderVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CinderVolumeSource" ((Object -> Parser V1CinderVolumeSource)
 -> Value -> Parser V1CinderVolumeSource)
-> (Object -> Parser V1CinderVolumeSource)
-> Value
-> Parser V1CinderVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Bool
-> Maybe V1LocalObjectReference
-> Text
-> V1CinderVolumeSource
V1CinderVolumeSource
      (Maybe Text
 -> Maybe Bool
 -> Maybe V1LocalObjectReference
 -> Text
 -> V1CinderVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe V1LocalObjectReference -> Text -> V1CinderVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fsType")
      Parser
  (Maybe Bool
   -> Maybe V1LocalObjectReference -> Text -> V1CinderVolumeSource)
-> Parser (Maybe Bool)
-> Parser
     (Maybe V1LocalObjectReference -> Text -> V1CinderVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readOnly")
      Parser
  (Maybe V1LocalObjectReference -> Text -> V1CinderVolumeSource)
-> Parser (Maybe V1LocalObjectReference)
-> Parser (Text -> V1CinderVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LocalObjectReference)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"secretRef")
      Parser (Text -> V1CinderVolumeSource)
-> Parser Text -> Parser V1CinderVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"volumeID")

-- | ToJSON V1CinderVolumeSource
instance A.ToJSON V1CinderVolumeSource where
  toJSON :: V1CinderVolumeSource -> Value
toJSON V1CinderVolumeSource {Maybe Bool
Maybe Text
Maybe V1LocalObjectReference
Text
$sel:v1CinderVolumeSourceFsType:V1CinderVolumeSource :: V1CinderVolumeSource -> Maybe Text
$sel:v1CinderVolumeSourceReadOnly:V1CinderVolumeSource :: V1CinderVolumeSource -> Maybe Bool
$sel:v1CinderVolumeSourceSecretRef:V1CinderVolumeSource :: V1CinderVolumeSource -> Maybe V1LocalObjectReference
$sel:v1CinderVolumeSourceVolumeId:V1CinderVolumeSource :: V1CinderVolumeSource -> Text
v1CinderVolumeSourceFsType :: Maybe Text
v1CinderVolumeSourceReadOnly :: Maybe Bool
v1CinderVolumeSourceSecretRef :: Maybe V1LocalObjectReference
v1CinderVolumeSourceVolumeId :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"fsType" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CinderVolumeSourceFsType
      , Key
"readOnly" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1CinderVolumeSourceReadOnly
      , Key
"secretRef" Key -> Maybe V1LocalObjectReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LocalObjectReference
v1CinderVolumeSourceSecretRef
      , Key
"volumeID" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1CinderVolumeSourceVolumeId
      ]


-- | Construct a value of type 'V1CinderVolumeSource' (by applying it's required fields, if any)
mkV1CinderVolumeSource
  :: Text -- ^ 'v1CinderVolumeSourceVolumeId': volumeID used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md
  -> V1CinderVolumeSource
mkV1CinderVolumeSource :: Text -> V1CinderVolumeSource
mkV1CinderVolumeSource Text
v1CinderVolumeSourceVolumeId =
  V1CinderVolumeSource
  { $sel:v1CinderVolumeSourceFsType:V1CinderVolumeSource :: Maybe Text
v1CinderVolumeSourceFsType = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1CinderVolumeSourceReadOnly:V1CinderVolumeSource :: Maybe Bool
v1CinderVolumeSourceReadOnly = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1CinderVolumeSourceSecretRef:V1CinderVolumeSource :: Maybe V1LocalObjectReference
v1CinderVolumeSourceSecretRef = Maybe V1LocalObjectReference
forall a. Maybe a
Nothing
  , Text
$sel:v1CinderVolumeSourceVolumeId:V1CinderVolumeSource :: Text
v1CinderVolumeSourceVolumeId :: Text
v1CinderVolumeSourceVolumeId
  }

-- ** V1ClientIPConfig
-- | V1ClientIPConfig
-- ClientIPConfig represents the configurations of Client IP based session affinity.
data V1ClientIPConfig = V1ClientIPConfig
  { V1ClientIPConfig -> Maybe Int
v1ClientIPConfigTimeoutSeconds :: !(Maybe Int) -- ^ "timeoutSeconds" - timeoutSeconds specifies the seconds of ClientIP type session sticky time. The value must be &gt;0 &amp;&amp; &lt;&#x3D;86400(for 1 day) if ServiceAffinity &#x3D;&#x3D; \&quot;ClientIP\&quot;. Default value is 10800(for 3 hours).
  } deriving (Int -> V1ClientIPConfig -> ShowS
[V1ClientIPConfig] -> ShowS
V1ClientIPConfig -> String
(Int -> V1ClientIPConfig -> ShowS)
-> (V1ClientIPConfig -> String)
-> ([V1ClientIPConfig] -> ShowS)
-> Show V1ClientIPConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ClientIPConfig -> ShowS
showsPrec :: Int -> V1ClientIPConfig -> ShowS
$cshow :: V1ClientIPConfig -> String
show :: V1ClientIPConfig -> String
$cshowList :: [V1ClientIPConfig] -> ShowS
showList :: [V1ClientIPConfig] -> ShowS
P.Show, V1ClientIPConfig -> V1ClientIPConfig -> Bool
(V1ClientIPConfig -> V1ClientIPConfig -> Bool)
-> (V1ClientIPConfig -> V1ClientIPConfig -> Bool)
-> Eq V1ClientIPConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ClientIPConfig -> V1ClientIPConfig -> Bool
== :: V1ClientIPConfig -> V1ClientIPConfig -> Bool
$c/= :: V1ClientIPConfig -> V1ClientIPConfig -> Bool
/= :: V1ClientIPConfig -> V1ClientIPConfig -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ClientIPConfig
instance A.FromJSON V1ClientIPConfig where
  parseJSON :: Value -> Parser V1ClientIPConfig
parseJSON = String
-> (Object -> Parser V1ClientIPConfig)
-> Value
-> Parser V1ClientIPConfig
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ClientIPConfig" ((Object -> Parser V1ClientIPConfig)
 -> Value -> Parser V1ClientIPConfig)
-> (Object -> Parser V1ClientIPConfig)
-> Value
-> Parser V1ClientIPConfig
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Int -> V1ClientIPConfig
V1ClientIPConfig
      (Maybe Int -> V1ClientIPConfig)
-> Parser (Maybe Int) -> Parser V1ClientIPConfig
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"timeoutSeconds")

-- | ToJSON V1ClientIPConfig
instance A.ToJSON V1ClientIPConfig where
  toJSON :: V1ClientIPConfig -> Value
toJSON V1ClientIPConfig {Maybe Int
$sel:v1ClientIPConfigTimeoutSeconds:V1ClientIPConfig :: V1ClientIPConfig -> Maybe Int
v1ClientIPConfigTimeoutSeconds :: Maybe Int
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"timeoutSeconds" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1ClientIPConfigTimeoutSeconds
      ]


-- | Construct a value of type 'V1ClientIPConfig' (by applying it's required fields, if any)
mkV1ClientIPConfig
  :: V1ClientIPConfig
mkV1ClientIPConfig :: V1ClientIPConfig
mkV1ClientIPConfig =
  V1ClientIPConfig
  { $sel:v1ClientIPConfigTimeoutSeconds:V1ClientIPConfig :: Maybe Int
v1ClientIPConfigTimeoutSeconds = Maybe Int
forall a. Maybe a
Nothing
  }

-- ** V1ClusterRole
-- | V1ClusterRole
-- ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
data V1ClusterRole = V1ClusterRole
  { V1ClusterRole -> Maybe V1AggregationRule
v1ClusterRoleAggregationRule :: !(Maybe V1AggregationRule) -- ^ "aggregationRule"
  , V1ClusterRole -> Maybe Text
v1ClusterRoleApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1ClusterRole -> Maybe Text
v1ClusterRoleKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1ClusterRole -> Maybe V1ObjectMeta
v1ClusterRoleMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1ClusterRole -> Maybe [V1PolicyRule]
v1ClusterRoleRules :: !(Maybe [V1PolicyRule]) -- ^ "rules" - Rules holds all the PolicyRules for this ClusterRole
  } deriving (Int -> V1ClusterRole -> ShowS
[V1ClusterRole] -> ShowS
V1ClusterRole -> String
(Int -> V1ClusterRole -> ShowS)
-> (V1ClusterRole -> String)
-> ([V1ClusterRole] -> ShowS)
-> Show V1ClusterRole
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ClusterRole -> ShowS
showsPrec :: Int -> V1ClusterRole -> ShowS
$cshow :: V1ClusterRole -> String
show :: V1ClusterRole -> String
$cshowList :: [V1ClusterRole] -> ShowS
showList :: [V1ClusterRole] -> ShowS
P.Show, V1ClusterRole -> V1ClusterRole -> Bool
(V1ClusterRole -> V1ClusterRole -> Bool)
-> (V1ClusterRole -> V1ClusterRole -> Bool) -> Eq V1ClusterRole
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ClusterRole -> V1ClusterRole -> Bool
== :: V1ClusterRole -> V1ClusterRole -> Bool
$c/= :: V1ClusterRole -> V1ClusterRole -> Bool
/= :: V1ClusterRole -> V1ClusterRole -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ClusterRole
instance A.FromJSON V1ClusterRole where
  parseJSON :: Value -> Parser V1ClusterRole
parseJSON = String
-> (Object -> Parser V1ClusterRole)
-> Value
-> Parser V1ClusterRole
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ClusterRole" ((Object -> Parser V1ClusterRole) -> Value -> Parser V1ClusterRole)
-> (Object -> Parser V1ClusterRole)
-> Value
-> Parser V1ClusterRole
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1AggregationRule
-> Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe [V1PolicyRule]
-> V1ClusterRole
V1ClusterRole
      (Maybe V1AggregationRule
 -> Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe [V1PolicyRule]
 -> V1ClusterRole)
-> Parser (Maybe V1AggregationRule)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe [V1PolicyRule]
      -> V1ClusterRole)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1AggregationRule)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"aggregationRule")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe [V1PolicyRule]
   -> V1ClusterRole)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta -> Maybe [V1PolicyRule] -> V1ClusterRole)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta -> Maybe [V1PolicyRule] -> V1ClusterRole)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta -> Maybe [V1PolicyRule] -> V1ClusterRole)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta -> Maybe [V1PolicyRule] -> V1ClusterRole)
-> Parser (Maybe V1ObjectMeta)
-> Parser (Maybe [V1PolicyRule] -> V1ClusterRole)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (Maybe [V1PolicyRule] -> V1ClusterRole)
-> Parser (Maybe [V1PolicyRule]) -> Parser V1ClusterRole
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1PolicyRule])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"rules")

-- | ToJSON V1ClusterRole
instance A.ToJSON V1ClusterRole where
  toJSON :: V1ClusterRole -> Value
toJSON V1ClusterRole {Maybe [V1PolicyRule]
Maybe Text
Maybe V1ObjectMeta
Maybe V1AggregationRule
$sel:v1ClusterRoleAggregationRule:V1ClusterRole :: V1ClusterRole -> Maybe V1AggregationRule
$sel:v1ClusterRoleApiVersion:V1ClusterRole :: V1ClusterRole -> Maybe Text
$sel:v1ClusterRoleKind:V1ClusterRole :: V1ClusterRole -> Maybe Text
$sel:v1ClusterRoleMetadata:V1ClusterRole :: V1ClusterRole -> Maybe V1ObjectMeta
$sel:v1ClusterRoleRules:V1ClusterRole :: V1ClusterRole -> Maybe [V1PolicyRule]
v1ClusterRoleAggregationRule :: Maybe V1AggregationRule
v1ClusterRoleApiVersion :: Maybe Text
v1ClusterRoleKind :: Maybe Text
v1ClusterRoleMetadata :: Maybe V1ObjectMeta
v1ClusterRoleRules :: Maybe [V1PolicyRule]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"aggregationRule" Key -> Maybe V1AggregationRule -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1AggregationRule
v1ClusterRoleAggregationRule
      , Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ClusterRoleApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ClusterRoleKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1ClusterRoleMetadata
      , Key
"rules" Key -> Maybe [V1PolicyRule] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1PolicyRule]
v1ClusterRoleRules
      ]


-- | Construct a value of type 'V1ClusterRole' (by applying it's required fields, if any)
mkV1ClusterRole
  :: V1ClusterRole
mkV1ClusterRole :: V1ClusterRole
mkV1ClusterRole =
  V1ClusterRole
  { $sel:v1ClusterRoleAggregationRule:V1ClusterRole :: Maybe V1AggregationRule
v1ClusterRoleAggregationRule = Maybe V1AggregationRule
forall a. Maybe a
Nothing
  , $sel:v1ClusterRoleApiVersion:V1ClusterRole :: Maybe Text
v1ClusterRoleApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ClusterRoleKind:V1ClusterRole :: Maybe Text
v1ClusterRoleKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ClusterRoleMetadata:V1ClusterRole :: Maybe V1ObjectMeta
v1ClusterRoleMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1ClusterRoleRules:V1ClusterRole :: Maybe [V1PolicyRule]
v1ClusterRoleRules = Maybe [V1PolicyRule]
forall a. Maybe a
Nothing
  }

-- ** V1ClusterRoleBinding
-- | V1ClusterRoleBinding
-- ClusterRoleBinding references a ClusterRole, but not contain it.  It can reference a ClusterRole in the global namespace, and adds who information via Subject.
data V1ClusterRoleBinding = V1ClusterRoleBinding
  { V1ClusterRoleBinding -> Maybe Text
v1ClusterRoleBindingApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1ClusterRoleBinding -> Maybe Text
v1ClusterRoleBindingKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1ClusterRoleBinding -> Maybe V1ObjectMeta
v1ClusterRoleBindingMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1ClusterRoleBinding -> V1RoleRef
v1ClusterRoleBindingRoleRef :: !(V1RoleRef) -- ^ /Required/ "roleRef"
  , V1ClusterRoleBinding -> Maybe [RbacV1Subject]
v1ClusterRoleBindingSubjects :: !(Maybe [RbacV1Subject]) -- ^ "subjects" - Subjects holds references to the objects the role applies to.
  } deriving (Int -> V1ClusterRoleBinding -> ShowS
[V1ClusterRoleBinding] -> ShowS
V1ClusterRoleBinding -> String
(Int -> V1ClusterRoleBinding -> ShowS)
-> (V1ClusterRoleBinding -> String)
-> ([V1ClusterRoleBinding] -> ShowS)
-> Show V1ClusterRoleBinding
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ClusterRoleBinding -> ShowS
showsPrec :: Int -> V1ClusterRoleBinding -> ShowS
$cshow :: V1ClusterRoleBinding -> String
show :: V1ClusterRoleBinding -> String
$cshowList :: [V1ClusterRoleBinding] -> ShowS
showList :: [V1ClusterRoleBinding] -> ShowS
P.Show, V1ClusterRoleBinding -> V1ClusterRoleBinding -> Bool
(V1ClusterRoleBinding -> V1ClusterRoleBinding -> Bool)
-> (V1ClusterRoleBinding -> V1ClusterRoleBinding -> Bool)
-> Eq V1ClusterRoleBinding
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ClusterRoleBinding -> V1ClusterRoleBinding -> Bool
== :: V1ClusterRoleBinding -> V1ClusterRoleBinding -> Bool
$c/= :: V1ClusterRoleBinding -> V1ClusterRoleBinding -> Bool
/= :: V1ClusterRoleBinding -> V1ClusterRoleBinding -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ClusterRoleBinding
instance A.FromJSON V1ClusterRoleBinding where
  parseJSON :: Value -> Parser V1ClusterRoleBinding
parseJSON = String
-> (Object -> Parser V1ClusterRoleBinding)
-> Value
-> Parser V1ClusterRoleBinding
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ClusterRoleBinding" ((Object -> Parser V1ClusterRoleBinding)
 -> Value -> Parser V1ClusterRoleBinding)
-> (Object -> Parser V1ClusterRoleBinding)
-> Value
-> Parser V1ClusterRoleBinding
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> V1RoleRef
-> Maybe [RbacV1Subject]
-> V1ClusterRoleBinding
V1ClusterRoleBinding
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> V1RoleRef
 -> Maybe [RbacV1Subject]
 -> V1ClusterRoleBinding)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> V1RoleRef
      -> Maybe [RbacV1Subject]
      -> V1ClusterRoleBinding)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> V1RoleRef
   -> Maybe [RbacV1Subject]
   -> V1ClusterRoleBinding)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> V1RoleRef -> Maybe [RbacV1Subject] -> V1ClusterRoleBinding)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> V1RoleRef -> Maybe [RbacV1Subject] -> V1ClusterRoleBinding)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (V1RoleRef -> Maybe [RbacV1Subject] -> V1ClusterRoleBinding)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (V1RoleRef -> Maybe [RbacV1Subject] -> V1ClusterRoleBinding)
-> Parser V1RoleRef
-> Parser (Maybe [RbacV1Subject] -> V1ClusterRoleBinding)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1RoleRef
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"roleRef")
      Parser (Maybe [RbacV1Subject] -> V1ClusterRoleBinding)
-> Parser (Maybe [RbacV1Subject]) -> Parser V1ClusterRoleBinding
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [RbacV1Subject])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"subjects")

-- | ToJSON V1ClusterRoleBinding
instance A.ToJSON V1ClusterRoleBinding where
  toJSON :: V1ClusterRoleBinding -> Value
toJSON V1ClusterRoleBinding {Maybe [RbacV1Subject]
Maybe Text
Maybe V1ObjectMeta
V1RoleRef
$sel:v1ClusterRoleBindingApiVersion:V1ClusterRoleBinding :: V1ClusterRoleBinding -> Maybe Text
$sel:v1ClusterRoleBindingKind:V1ClusterRoleBinding :: V1ClusterRoleBinding -> Maybe Text
$sel:v1ClusterRoleBindingMetadata:V1ClusterRoleBinding :: V1ClusterRoleBinding -> Maybe V1ObjectMeta
$sel:v1ClusterRoleBindingRoleRef:V1ClusterRoleBinding :: V1ClusterRoleBinding -> V1RoleRef
$sel:v1ClusterRoleBindingSubjects:V1ClusterRoleBinding :: V1ClusterRoleBinding -> Maybe [RbacV1Subject]
v1ClusterRoleBindingApiVersion :: Maybe Text
v1ClusterRoleBindingKind :: Maybe Text
v1ClusterRoleBindingMetadata :: Maybe V1ObjectMeta
v1ClusterRoleBindingRoleRef :: V1RoleRef
v1ClusterRoleBindingSubjects :: Maybe [RbacV1Subject]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ClusterRoleBindingApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ClusterRoleBindingKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1ClusterRoleBindingMetadata
      , Key
"roleRef" Key -> V1RoleRef -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1RoleRef
v1ClusterRoleBindingRoleRef
      , Key
"subjects" Key -> Maybe [RbacV1Subject] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [RbacV1Subject]
v1ClusterRoleBindingSubjects
      ]


-- | Construct a value of type 'V1ClusterRoleBinding' (by applying it's required fields, if any)
mkV1ClusterRoleBinding
  :: V1RoleRef -- ^ 'v1ClusterRoleBindingRoleRef' 
  -> V1ClusterRoleBinding
mkV1ClusterRoleBinding :: V1RoleRef -> V1ClusterRoleBinding
mkV1ClusterRoleBinding V1RoleRef
v1ClusterRoleBindingRoleRef =
  V1ClusterRoleBinding
  { $sel:v1ClusterRoleBindingApiVersion:V1ClusterRoleBinding :: Maybe Text
v1ClusterRoleBindingApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ClusterRoleBindingKind:V1ClusterRoleBinding :: Maybe Text
v1ClusterRoleBindingKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ClusterRoleBindingMetadata:V1ClusterRoleBinding :: Maybe V1ObjectMeta
v1ClusterRoleBindingMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , V1RoleRef
$sel:v1ClusterRoleBindingRoleRef:V1ClusterRoleBinding :: V1RoleRef
v1ClusterRoleBindingRoleRef :: V1RoleRef
v1ClusterRoleBindingRoleRef
  , $sel:v1ClusterRoleBindingSubjects:V1ClusterRoleBinding :: Maybe [RbacV1Subject]
v1ClusterRoleBindingSubjects = Maybe [RbacV1Subject]
forall a. Maybe a
Nothing
  }

-- ** V1ClusterRoleBindingList
-- | V1ClusterRoleBindingList
-- ClusterRoleBindingList is a collection of ClusterRoleBindings
data V1ClusterRoleBindingList = V1ClusterRoleBindingList
  { V1ClusterRoleBindingList -> Maybe Text
v1ClusterRoleBindingListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1ClusterRoleBindingList -> [V1ClusterRoleBinding]
v1ClusterRoleBindingListItems :: !([V1ClusterRoleBinding]) -- ^ /Required/ "items" - Items is a list of ClusterRoleBindings
  , V1ClusterRoleBindingList -> Maybe Text
v1ClusterRoleBindingListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1ClusterRoleBindingList -> Maybe V1ListMeta
v1ClusterRoleBindingListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1ClusterRoleBindingList -> ShowS
[V1ClusterRoleBindingList] -> ShowS
V1ClusterRoleBindingList -> String
(Int -> V1ClusterRoleBindingList -> ShowS)
-> (V1ClusterRoleBindingList -> String)
-> ([V1ClusterRoleBindingList] -> ShowS)
-> Show V1ClusterRoleBindingList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ClusterRoleBindingList -> ShowS
showsPrec :: Int -> V1ClusterRoleBindingList -> ShowS
$cshow :: V1ClusterRoleBindingList -> String
show :: V1ClusterRoleBindingList -> String
$cshowList :: [V1ClusterRoleBindingList] -> ShowS
showList :: [V1ClusterRoleBindingList] -> ShowS
P.Show, V1ClusterRoleBindingList -> V1ClusterRoleBindingList -> Bool
(V1ClusterRoleBindingList -> V1ClusterRoleBindingList -> Bool)
-> (V1ClusterRoleBindingList -> V1ClusterRoleBindingList -> Bool)
-> Eq V1ClusterRoleBindingList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ClusterRoleBindingList -> V1ClusterRoleBindingList -> Bool
== :: V1ClusterRoleBindingList -> V1ClusterRoleBindingList -> Bool
$c/= :: V1ClusterRoleBindingList -> V1ClusterRoleBindingList -> Bool
/= :: V1ClusterRoleBindingList -> V1ClusterRoleBindingList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ClusterRoleBindingList
instance A.FromJSON V1ClusterRoleBindingList where
  parseJSON :: Value -> Parser V1ClusterRoleBindingList
parseJSON = String
-> (Object -> Parser V1ClusterRoleBindingList)
-> Value
-> Parser V1ClusterRoleBindingList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ClusterRoleBindingList" ((Object -> Parser V1ClusterRoleBindingList)
 -> Value -> Parser V1ClusterRoleBindingList)
-> (Object -> Parser V1ClusterRoleBindingList)
-> Value
-> Parser V1ClusterRoleBindingList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1ClusterRoleBinding]
-> Maybe Text
-> Maybe V1ListMeta
-> V1ClusterRoleBindingList
V1ClusterRoleBindingList
      (Maybe Text
 -> [V1ClusterRoleBinding]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1ClusterRoleBindingList)
-> Parser (Maybe Text)
-> Parser
     ([V1ClusterRoleBinding]
      -> Maybe Text -> Maybe V1ListMeta -> V1ClusterRoleBindingList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1ClusterRoleBinding]
   -> Maybe Text -> Maybe V1ListMeta -> V1ClusterRoleBindingList)
-> Parser [V1ClusterRoleBinding]
-> Parser
     (Maybe Text -> Maybe V1ListMeta -> V1ClusterRoleBindingList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1ClusterRoleBinding]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1ClusterRoleBindingList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1ClusterRoleBindingList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1ClusterRoleBindingList)
-> Parser (Maybe V1ListMeta) -> Parser V1ClusterRoleBindingList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1ClusterRoleBindingList
instance A.ToJSON V1ClusterRoleBindingList where
  toJSON :: V1ClusterRoleBindingList -> Value
toJSON V1ClusterRoleBindingList {[V1ClusterRoleBinding]
Maybe Text
Maybe V1ListMeta
$sel:v1ClusterRoleBindingListApiVersion:V1ClusterRoleBindingList :: V1ClusterRoleBindingList -> Maybe Text
$sel:v1ClusterRoleBindingListItems:V1ClusterRoleBindingList :: V1ClusterRoleBindingList -> [V1ClusterRoleBinding]
$sel:v1ClusterRoleBindingListKind:V1ClusterRoleBindingList :: V1ClusterRoleBindingList -> Maybe Text
$sel:v1ClusterRoleBindingListMetadata:V1ClusterRoleBindingList :: V1ClusterRoleBindingList -> Maybe V1ListMeta
v1ClusterRoleBindingListApiVersion :: Maybe Text
v1ClusterRoleBindingListItems :: [V1ClusterRoleBinding]
v1ClusterRoleBindingListKind :: Maybe Text
v1ClusterRoleBindingListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ClusterRoleBindingListApiVersion
      , Key
"items" Key -> [V1ClusterRoleBinding] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1ClusterRoleBinding]
v1ClusterRoleBindingListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ClusterRoleBindingListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1ClusterRoleBindingListMetadata
      ]


-- | Construct a value of type 'V1ClusterRoleBindingList' (by applying it's required fields, if any)
mkV1ClusterRoleBindingList
  :: [V1ClusterRoleBinding] -- ^ 'v1ClusterRoleBindingListItems': Items is a list of ClusterRoleBindings
  -> V1ClusterRoleBindingList
mkV1ClusterRoleBindingList :: [V1ClusterRoleBinding] -> V1ClusterRoleBindingList
mkV1ClusterRoleBindingList [V1ClusterRoleBinding]
v1ClusterRoleBindingListItems =
  V1ClusterRoleBindingList
  { $sel:v1ClusterRoleBindingListApiVersion:V1ClusterRoleBindingList :: Maybe Text
v1ClusterRoleBindingListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1ClusterRoleBinding]
$sel:v1ClusterRoleBindingListItems:V1ClusterRoleBindingList :: [V1ClusterRoleBinding]
v1ClusterRoleBindingListItems :: [V1ClusterRoleBinding]
v1ClusterRoleBindingListItems
  , $sel:v1ClusterRoleBindingListKind:V1ClusterRoleBindingList :: Maybe Text
v1ClusterRoleBindingListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ClusterRoleBindingListMetadata:V1ClusterRoleBindingList :: Maybe V1ListMeta
v1ClusterRoleBindingListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1ClusterRoleList
-- | V1ClusterRoleList
-- ClusterRoleList is a collection of ClusterRoles
data V1ClusterRoleList = V1ClusterRoleList
  { V1ClusterRoleList -> Maybe Text
v1ClusterRoleListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1ClusterRoleList -> [V1ClusterRole]
v1ClusterRoleListItems :: !([V1ClusterRole]) -- ^ /Required/ "items" - Items is a list of ClusterRoles
  , V1ClusterRoleList -> Maybe Text
v1ClusterRoleListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1ClusterRoleList -> Maybe V1ListMeta
v1ClusterRoleListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1ClusterRoleList -> ShowS
[V1ClusterRoleList] -> ShowS
V1ClusterRoleList -> String
(Int -> V1ClusterRoleList -> ShowS)
-> (V1ClusterRoleList -> String)
-> ([V1ClusterRoleList] -> ShowS)
-> Show V1ClusterRoleList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ClusterRoleList -> ShowS
showsPrec :: Int -> V1ClusterRoleList -> ShowS
$cshow :: V1ClusterRoleList -> String
show :: V1ClusterRoleList -> String
$cshowList :: [V1ClusterRoleList] -> ShowS
showList :: [V1ClusterRoleList] -> ShowS
P.Show, V1ClusterRoleList -> V1ClusterRoleList -> Bool
(V1ClusterRoleList -> V1ClusterRoleList -> Bool)
-> (V1ClusterRoleList -> V1ClusterRoleList -> Bool)
-> Eq V1ClusterRoleList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ClusterRoleList -> V1ClusterRoleList -> Bool
== :: V1ClusterRoleList -> V1ClusterRoleList -> Bool
$c/= :: V1ClusterRoleList -> V1ClusterRoleList -> Bool
/= :: V1ClusterRoleList -> V1ClusterRoleList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ClusterRoleList
instance A.FromJSON V1ClusterRoleList where
  parseJSON :: Value -> Parser V1ClusterRoleList
parseJSON = String
-> (Object -> Parser V1ClusterRoleList)
-> Value
-> Parser V1ClusterRoleList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ClusterRoleList" ((Object -> Parser V1ClusterRoleList)
 -> Value -> Parser V1ClusterRoleList)
-> (Object -> Parser V1ClusterRoleList)
-> Value
-> Parser V1ClusterRoleList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1ClusterRole]
-> Maybe Text
-> Maybe V1ListMeta
-> V1ClusterRoleList
V1ClusterRoleList
      (Maybe Text
 -> [V1ClusterRole]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1ClusterRoleList)
-> Parser (Maybe Text)
-> Parser
     ([V1ClusterRole]
      -> Maybe Text -> Maybe V1ListMeta -> V1ClusterRoleList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1ClusterRole]
   -> Maybe Text -> Maybe V1ListMeta -> V1ClusterRoleList)
-> Parser [V1ClusterRole]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1ClusterRoleList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1ClusterRole]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1ClusterRoleList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1ClusterRoleList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1ClusterRoleList)
-> Parser (Maybe V1ListMeta) -> Parser V1ClusterRoleList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1ClusterRoleList
instance A.ToJSON V1ClusterRoleList where
  toJSON :: V1ClusterRoleList -> Value
toJSON V1ClusterRoleList {[V1ClusterRole]
Maybe Text
Maybe V1ListMeta
$sel:v1ClusterRoleListApiVersion:V1ClusterRoleList :: V1ClusterRoleList -> Maybe Text
$sel:v1ClusterRoleListItems:V1ClusterRoleList :: V1ClusterRoleList -> [V1ClusterRole]
$sel:v1ClusterRoleListKind:V1ClusterRoleList :: V1ClusterRoleList -> Maybe Text
$sel:v1ClusterRoleListMetadata:V1ClusterRoleList :: V1ClusterRoleList -> Maybe V1ListMeta
v1ClusterRoleListApiVersion :: Maybe Text
v1ClusterRoleListItems :: [V1ClusterRole]
v1ClusterRoleListKind :: Maybe Text
v1ClusterRoleListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ClusterRoleListApiVersion
      , Key
"items" Key -> [V1ClusterRole] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1ClusterRole]
v1ClusterRoleListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ClusterRoleListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1ClusterRoleListMetadata
      ]


-- | Construct a value of type 'V1ClusterRoleList' (by applying it's required fields, if any)
mkV1ClusterRoleList
  :: [V1ClusterRole] -- ^ 'v1ClusterRoleListItems': Items is a list of ClusterRoles
  -> V1ClusterRoleList
mkV1ClusterRoleList :: [V1ClusterRole] -> V1ClusterRoleList
mkV1ClusterRoleList [V1ClusterRole]
v1ClusterRoleListItems =
  V1ClusterRoleList
  { $sel:v1ClusterRoleListApiVersion:V1ClusterRoleList :: Maybe Text
v1ClusterRoleListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1ClusterRole]
$sel:v1ClusterRoleListItems:V1ClusterRoleList :: [V1ClusterRole]
v1ClusterRoleListItems :: [V1ClusterRole]
v1ClusterRoleListItems
  , $sel:v1ClusterRoleListKind:V1ClusterRoleList :: Maybe Text
v1ClusterRoleListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ClusterRoleListMetadata:V1ClusterRoleList :: Maybe V1ListMeta
v1ClusterRoleListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1ClusterTrustBundleProjection
-- | V1ClusterTrustBundleProjection
-- ClusterTrustBundleProjection describes how to select a set of ClusterTrustBundle objects and project their contents into the pod filesystem.
data V1ClusterTrustBundleProjection = V1ClusterTrustBundleProjection
  { V1ClusterTrustBundleProjection -> Maybe V1LabelSelector
v1ClusterTrustBundleProjectionLabelSelector :: !(Maybe V1LabelSelector) -- ^ "labelSelector"
  , V1ClusterTrustBundleProjection -> Maybe Text
v1ClusterTrustBundleProjectionName :: !(Maybe Text) -- ^ "name" - Select a single ClusterTrustBundle by object name.  Mutually-exclusive with signerName and labelSelector.
  , V1ClusterTrustBundleProjection -> Maybe Bool
v1ClusterTrustBundleProjectionOptional :: !(Maybe Bool) -- ^ "optional" - If true, don&#39;t block pod startup if the referenced ClusterTrustBundle(s) aren&#39;t available.  If using name, then the named ClusterTrustBundle is allowed not to exist.  If using signerName, then the combination of signerName and labelSelector is allowed to match zero ClusterTrustBundles.
  , V1ClusterTrustBundleProjection -> Text
v1ClusterTrustBundleProjectionPath :: !(Text) -- ^ /Required/ "path" - Relative path from the volume root to write the bundle.
  , V1ClusterTrustBundleProjection -> Maybe Text
v1ClusterTrustBundleProjectionSignerName :: !(Maybe Text) -- ^ "signerName" - Select all ClusterTrustBundles that match this signer name. Mutually-exclusive with name.  The contents of all selected ClusterTrustBundles will be unified and deduplicated.
  } deriving (Int -> V1ClusterTrustBundleProjection -> ShowS
[V1ClusterTrustBundleProjection] -> ShowS
V1ClusterTrustBundleProjection -> String
(Int -> V1ClusterTrustBundleProjection -> ShowS)
-> (V1ClusterTrustBundleProjection -> String)
-> ([V1ClusterTrustBundleProjection] -> ShowS)
-> Show V1ClusterTrustBundleProjection
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ClusterTrustBundleProjection -> ShowS
showsPrec :: Int -> V1ClusterTrustBundleProjection -> ShowS
$cshow :: V1ClusterTrustBundleProjection -> String
show :: V1ClusterTrustBundleProjection -> String
$cshowList :: [V1ClusterTrustBundleProjection] -> ShowS
showList :: [V1ClusterTrustBundleProjection] -> ShowS
P.Show, V1ClusterTrustBundleProjection
-> V1ClusterTrustBundleProjection -> Bool
(V1ClusterTrustBundleProjection
 -> V1ClusterTrustBundleProjection -> Bool)
-> (V1ClusterTrustBundleProjection
    -> V1ClusterTrustBundleProjection -> Bool)
-> Eq V1ClusterTrustBundleProjection
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ClusterTrustBundleProjection
-> V1ClusterTrustBundleProjection -> Bool
== :: V1ClusterTrustBundleProjection
-> V1ClusterTrustBundleProjection -> Bool
$c/= :: V1ClusterTrustBundleProjection
-> V1ClusterTrustBundleProjection -> Bool
/= :: V1ClusterTrustBundleProjection
-> V1ClusterTrustBundleProjection -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ClusterTrustBundleProjection
instance A.FromJSON V1ClusterTrustBundleProjection where
  parseJSON :: Value -> Parser V1ClusterTrustBundleProjection
parseJSON = String
-> (Object -> Parser V1ClusterTrustBundleProjection)
-> Value
-> Parser V1ClusterTrustBundleProjection
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ClusterTrustBundleProjection" ((Object -> Parser V1ClusterTrustBundleProjection)
 -> Value -> Parser V1ClusterTrustBundleProjection)
-> (Object -> Parser V1ClusterTrustBundleProjection)
-> Value
-> Parser V1ClusterTrustBundleProjection
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1LabelSelector
-> Maybe Text
-> Maybe Bool
-> Text
-> Maybe Text
-> V1ClusterTrustBundleProjection
V1ClusterTrustBundleProjection
      (Maybe V1LabelSelector
 -> Maybe Text
 -> Maybe Bool
 -> Text
 -> Maybe Text
 -> V1ClusterTrustBundleProjection)
-> Parser (Maybe V1LabelSelector)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Text
      -> Maybe Text
      -> V1ClusterTrustBundleProjection)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1LabelSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"labelSelector")
      Parser
  (Maybe Text
   -> Maybe Bool
   -> Text
   -> Maybe Text
   -> V1ClusterTrustBundleProjection)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Text -> Maybe Text -> V1ClusterTrustBundleProjection)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"name")
      Parser
  (Maybe Bool
   -> Text -> Maybe Text -> V1ClusterTrustBundleProjection)
-> Parser (Maybe Bool)
-> Parser (Text -> Maybe Text -> V1ClusterTrustBundleProjection)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"optional")
      Parser (Text -> Maybe Text -> V1ClusterTrustBundleProjection)
-> Parser Text
-> Parser (Maybe Text -> V1ClusterTrustBundleProjection)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"path")
      Parser (Maybe Text -> V1ClusterTrustBundleProjection)
-> Parser (Maybe Text) -> Parser V1ClusterTrustBundleProjection
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"signerName")

-- | ToJSON V1ClusterTrustBundleProjection
instance A.ToJSON V1ClusterTrustBundleProjection where
  toJSON :: V1ClusterTrustBundleProjection -> Value
toJSON V1ClusterTrustBundleProjection {Maybe Bool
Maybe Text
Maybe V1LabelSelector
Text
$sel:v1ClusterTrustBundleProjectionLabelSelector:V1ClusterTrustBundleProjection :: V1ClusterTrustBundleProjection -> Maybe V1LabelSelector
$sel:v1ClusterTrustBundleProjectionName:V1ClusterTrustBundleProjection :: V1ClusterTrustBundleProjection -> Maybe Text
$sel:v1ClusterTrustBundleProjectionOptional:V1ClusterTrustBundleProjection :: V1ClusterTrustBundleProjection -> Maybe Bool
$sel:v1ClusterTrustBundleProjectionPath:V1ClusterTrustBundleProjection :: V1ClusterTrustBundleProjection -> Text
$sel:v1ClusterTrustBundleProjectionSignerName:V1ClusterTrustBundleProjection :: V1ClusterTrustBundleProjection -> Maybe Text
v1ClusterTrustBundleProjectionLabelSelector :: Maybe V1LabelSelector
v1ClusterTrustBundleProjectionName :: Maybe Text
v1ClusterTrustBundleProjectionOptional :: Maybe Bool
v1ClusterTrustBundleProjectionPath :: Text
v1ClusterTrustBundleProjectionSignerName :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"labelSelector" Key -> Maybe V1LabelSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LabelSelector
v1ClusterTrustBundleProjectionLabelSelector
      , Key
"name" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ClusterTrustBundleProjectionName
      , Key
"optional" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1ClusterTrustBundleProjectionOptional
      , Key
"path" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ClusterTrustBundleProjectionPath
      , Key
"signerName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ClusterTrustBundleProjectionSignerName
      ]


-- | Construct a value of type 'V1ClusterTrustBundleProjection' (by applying it's required fields, if any)
mkV1ClusterTrustBundleProjection
  :: Text -- ^ 'v1ClusterTrustBundleProjectionPath': Relative path from the volume root to write the bundle.
  -> V1ClusterTrustBundleProjection
mkV1ClusterTrustBundleProjection :: Text -> V1ClusterTrustBundleProjection
mkV1ClusterTrustBundleProjection Text
v1ClusterTrustBundleProjectionPath =
  V1ClusterTrustBundleProjection
  { $sel:v1ClusterTrustBundleProjectionLabelSelector:V1ClusterTrustBundleProjection :: Maybe V1LabelSelector
v1ClusterTrustBundleProjectionLabelSelector = Maybe V1LabelSelector
forall a. Maybe a
Nothing
  , $sel:v1ClusterTrustBundleProjectionName:V1ClusterTrustBundleProjection :: Maybe Text
v1ClusterTrustBundleProjectionName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ClusterTrustBundleProjectionOptional:V1ClusterTrustBundleProjection :: Maybe Bool
v1ClusterTrustBundleProjectionOptional = Maybe Bool
forall a. Maybe a
Nothing
  , Text
$sel:v1ClusterTrustBundleProjectionPath:V1ClusterTrustBundleProjection :: Text
v1ClusterTrustBundleProjectionPath :: Text
v1ClusterTrustBundleProjectionPath
  , $sel:v1ClusterTrustBundleProjectionSignerName:V1ClusterTrustBundleProjection :: Maybe Text
v1ClusterTrustBundleProjectionSignerName = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1ComponentCondition
-- | V1ComponentCondition
-- Information about the condition of a component.
data V1ComponentCondition = V1ComponentCondition
  { V1ComponentCondition -> Maybe Text
v1ComponentConditionError :: !(Maybe Text) -- ^ "error" - Condition error code for a component. For example, a health check error code.
  , V1ComponentCondition -> Maybe Text
v1ComponentConditionMessage :: !(Maybe Text) -- ^ "message" - Message about the condition for a component. For example, information about a health check.
  , V1ComponentCondition -> Text
v1ComponentConditionStatus :: !(Text) -- ^ /Required/ "status" - Status of the condition for a component. Valid values for \&quot;Healthy\&quot;: \&quot;True\&quot;, \&quot;False\&quot;, or \&quot;Unknown\&quot;.
  , V1ComponentCondition -> Text
v1ComponentConditionType :: !(Text) -- ^ /Required/ "type" - Type of condition for a component. Valid value: \&quot;Healthy\&quot;
  } deriving (Int -> V1ComponentCondition -> ShowS
[V1ComponentCondition] -> ShowS
V1ComponentCondition -> String
(Int -> V1ComponentCondition -> ShowS)
-> (V1ComponentCondition -> String)
-> ([V1ComponentCondition] -> ShowS)
-> Show V1ComponentCondition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ComponentCondition -> ShowS
showsPrec :: Int -> V1ComponentCondition -> ShowS
$cshow :: V1ComponentCondition -> String
show :: V1ComponentCondition -> String
$cshowList :: [V1ComponentCondition] -> ShowS
showList :: [V1ComponentCondition] -> ShowS
P.Show, V1ComponentCondition -> V1ComponentCondition -> Bool
(V1ComponentCondition -> V1ComponentCondition -> Bool)
-> (V1ComponentCondition -> V1ComponentCondition -> Bool)
-> Eq V1ComponentCondition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ComponentCondition -> V1ComponentCondition -> Bool
== :: V1ComponentCondition -> V1ComponentCondition -> Bool
$c/= :: V1ComponentCondition -> V1ComponentCondition -> Bool
/= :: V1ComponentCondition -> V1ComponentCondition -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ComponentCondition
instance A.FromJSON V1ComponentCondition where
  parseJSON :: Value -> Parser V1ComponentCondition
parseJSON = String
-> (Object -> Parser V1ComponentCondition)
-> Value
-> Parser V1ComponentCondition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ComponentCondition" ((Object -> Parser V1ComponentCondition)
 -> Value -> Parser V1ComponentCondition)
-> (Object -> Parser V1ComponentCondition)
-> Value
-> Parser V1ComponentCondition
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Maybe Text -> Text -> Text -> V1ComponentCondition
V1ComponentCondition
      (Maybe Text -> Maybe Text -> Text -> Text -> V1ComponentCondition)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Text -> Text -> V1ComponentCondition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"error")
      Parser (Maybe Text -> Text -> Text -> V1ComponentCondition)
-> Parser (Maybe Text)
-> Parser (Text -> Text -> V1ComponentCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"message")
      Parser (Text -> Text -> V1ComponentCondition)
-> Parser Text -> Parser (Text -> V1ComponentCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"status")
      Parser (Text -> V1ComponentCondition)
-> Parser Text -> Parser V1ComponentCondition
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"type")

-- | ToJSON V1ComponentCondition
instance A.ToJSON V1ComponentCondition where
  toJSON :: V1ComponentCondition -> Value
toJSON V1ComponentCondition {Maybe Text
Text
$sel:v1ComponentConditionError:V1ComponentCondition :: V1ComponentCondition -> Maybe Text
$sel:v1ComponentConditionMessage:V1ComponentCondition :: V1ComponentCondition -> Maybe Text
$sel:v1ComponentConditionStatus:V1ComponentCondition :: V1ComponentCondition -> Text
$sel:v1ComponentConditionType:V1ComponentCondition :: V1ComponentCondition -> Text
v1ComponentConditionError :: Maybe Text
v1ComponentConditionMessage :: Maybe Text
v1ComponentConditionStatus :: Text
v1ComponentConditionType :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"error" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ComponentConditionError
      , Key
"message" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ComponentConditionMessage
      , Key
"status" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ComponentConditionStatus
      , Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ComponentConditionType
      ]


-- | Construct a value of type 'V1ComponentCondition' (by applying it's required fields, if any)
mkV1ComponentCondition
  :: Text -- ^ 'v1ComponentConditionStatus': Status of the condition for a component. Valid values for \"Healthy\": \"True\", \"False\", or \"Unknown\".
  -> Text -- ^ 'v1ComponentConditionType': Type of condition for a component. Valid value: \"Healthy\"
  -> V1ComponentCondition
mkV1ComponentCondition :: Text -> Text -> V1ComponentCondition
mkV1ComponentCondition Text
v1ComponentConditionStatus Text
v1ComponentConditionType =
  V1ComponentCondition
  { $sel:v1ComponentConditionError:V1ComponentCondition :: Maybe Text
v1ComponentConditionError = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ComponentConditionMessage:V1ComponentCondition :: Maybe Text
v1ComponentConditionMessage = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1ComponentConditionStatus:V1ComponentCondition :: Text
v1ComponentConditionStatus :: Text
v1ComponentConditionStatus
  , Text
$sel:v1ComponentConditionType:V1ComponentCondition :: Text
v1ComponentConditionType :: Text
v1ComponentConditionType
  }

-- ** V1ComponentStatus
-- | V1ComponentStatus
-- ComponentStatus (and ComponentStatusList) holds the cluster validation info. Deprecated: This API is deprecated in v1.19+
data V1ComponentStatus = V1ComponentStatus
  { V1ComponentStatus -> Maybe Text
v1ComponentStatusApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1ComponentStatus -> Maybe [V1ComponentCondition]
v1ComponentStatusConditions :: !(Maybe [V1ComponentCondition]) -- ^ "conditions" - List of component conditions observed
  , V1ComponentStatus -> Maybe Text
v1ComponentStatusKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1ComponentStatus -> Maybe V1ObjectMeta
v1ComponentStatusMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  } deriving (Int -> V1ComponentStatus -> ShowS
[V1ComponentStatus] -> ShowS
V1ComponentStatus -> String
(Int -> V1ComponentStatus -> ShowS)
-> (V1ComponentStatus -> String)
-> ([V1ComponentStatus] -> ShowS)
-> Show V1ComponentStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ComponentStatus -> ShowS
showsPrec :: Int -> V1ComponentStatus -> ShowS
$cshow :: V1ComponentStatus -> String
show :: V1ComponentStatus -> String
$cshowList :: [V1ComponentStatus] -> ShowS
showList :: [V1ComponentStatus] -> ShowS
P.Show, V1ComponentStatus -> V1ComponentStatus -> Bool
(V1ComponentStatus -> V1ComponentStatus -> Bool)
-> (V1ComponentStatus -> V1ComponentStatus -> Bool)
-> Eq V1ComponentStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ComponentStatus -> V1ComponentStatus -> Bool
== :: V1ComponentStatus -> V1ComponentStatus -> Bool
$c/= :: V1ComponentStatus -> V1ComponentStatus -> Bool
/= :: V1ComponentStatus -> V1ComponentStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ComponentStatus
instance A.FromJSON V1ComponentStatus where
  parseJSON :: Value -> Parser V1ComponentStatus
parseJSON = String
-> (Object -> Parser V1ComponentStatus)
-> Value
-> Parser V1ComponentStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ComponentStatus" ((Object -> Parser V1ComponentStatus)
 -> Value -> Parser V1ComponentStatus)
-> (Object -> Parser V1ComponentStatus)
-> Value
-> Parser V1ComponentStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe [V1ComponentCondition]
-> Maybe Text
-> Maybe V1ObjectMeta
-> V1ComponentStatus
V1ComponentStatus
      (Maybe Text
 -> Maybe [V1ComponentCondition]
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> V1ComponentStatus)
-> Parser (Maybe Text)
-> Parser
     (Maybe [V1ComponentCondition]
      -> Maybe Text -> Maybe V1ObjectMeta -> V1ComponentStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe [V1ComponentCondition]
   -> Maybe Text -> Maybe V1ObjectMeta -> V1ComponentStatus)
-> Parser (Maybe [V1ComponentCondition])
-> Parser (Maybe Text -> Maybe V1ObjectMeta -> V1ComponentStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1ComponentCondition])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"conditions")
      Parser (Maybe Text -> Maybe V1ObjectMeta -> V1ComponentStatus)
-> Parser (Maybe Text)
-> Parser (Maybe V1ObjectMeta -> V1ComponentStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ObjectMeta -> V1ComponentStatus)
-> Parser (Maybe V1ObjectMeta) -> Parser V1ComponentStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1ComponentStatus
instance A.ToJSON V1ComponentStatus where
  toJSON :: V1ComponentStatus -> Value
toJSON V1ComponentStatus {Maybe [V1ComponentCondition]
Maybe Text
Maybe V1ObjectMeta
$sel:v1ComponentStatusApiVersion:V1ComponentStatus :: V1ComponentStatus -> Maybe Text
$sel:v1ComponentStatusConditions:V1ComponentStatus :: V1ComponentStatus -> Maybe [V1ComponentCondition]
$sel:v1ComponentStatusKind:V1ComponentStatus :: V1ComponentStatus -> Maybe Text
$sel:v1ComponentStatusMetadata:V1ComponentStatus :: V1ComponentStatus -> Maybe V1ObjectMeta
v1ComponentStatusApiVersion :: Maybe Text
v1ComponentStatusConditions :: Maybe [V1ComponentCondition]
v1ComponentStatusKind :: Maybe Text
v1ComponentStatusMetadata :: Maybe V1ObjectMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ComponentStatusApiVersion
      , Key
"conditions" Key -> Maybe [V1ComponentCondition] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1ComponentCondition]
v1ComponentStatusConditions
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ComponentStatusKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1ComponentStatusMetadata
      ]


-- | Construct a value of type 'V1ComponentStatus' (by applying it's required fields, if any)
mkV1ComponentStatus
  :: V1ComponentStatus
mkV1ComponentStatus :: V1ComponentStatus
mkV1ComponentStatus =
  V1ComponentStatus
  { $sel:v1ComponentStatusApiVersion:V1ComponentStatus :: Maybe Text
v1ComponentStatusApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ComponentStatusConditions:V1ComponentStatus :: Maybe [V1ComponentCondition]
v1ComponentStatusConditions = Maybe [V1ComponentCondition]
forall a. Maybe a
Nothing
  , $sel:v1ComponentStatusKind:V1ComponentStatus :: Maybe Text
v1ComponentStatusKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ComponentStatusMetadata:V1ComponentStatus :: Maybe V1ObjectMeta
v1ComponentStatusMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  }

-- ** V1ComponentStatusList
-- | V1ComponentStatusList
-- Status of all the conditions for the component as a list of ComponentStatus objects. Deprecated: This API is deprecated in v1.19+
data V1ComponentStatusList = V1ComponentStatusList
  { V1ComponentStatusList -> Maybe Text
v1ComponentStatusListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1ComponentStatusList -> [V1ComponentStatus]
v1ComponentStatusListItems :: !([V1ComponentStatus]) -- ^ /Required/ "items" - List of ComponentStatus objects.
  , V1ComponentStatusList -> Maybe Text
v1ComponentStatusListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1ComponentStatusList -> Maybe V1ListMeta
v1ComponentStatusListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1ComponentStatusList -> ShowS
[V1ComponentStatusList] -> ShowS
V1ComponentStatusList -> String
(Int -> V1ComponentStatusList -> ShowS)
-> (V1ComponentStatusList -> String)
-> ([V1ComponentStatusList] -> ShowS)
-> Show V1ComponentStatusList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ComponentStatusList -> ShowS
showsPrec :: Int -> V1ComponentStatusList -> ShowS
$cshow :: V1ComponentStatusList -> String
show :: V1ComponentStatusList -> String
$cshowList :: [V1ComponentStatusList] -> ShowS
showList :: [V1ComponentStatusList] -> ShowS
P.Show, V1ComponentStatusList -> V1ComponentStatusList -> Bool
(V1ComponentStatusList -> V1ComponentStatusList -> Bool)
-> (V1ComponentStatusList -> V1ComponentStatusList -> Bool)
-> Eq V1ComponentStatusList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ComponentStatusList -> V1ComponentStatusList -> Bool
== :: V1ComponentStatusList -> V1ComponentStatusList -> Bool
$c/= :: V1ComponentStatusList -> V1ComponentStatusList -> Bool
/= :: V1ComponentStatusList -> V1ComponentStatusList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ComponentStatusList
instance A.FromJSON V1ComponentStatusList where
  parseJSON :: Value -> Parser V1ComponentStatusList
parseJSON = String
-> (Object -> Parser V1ComponentStatusList)
-> Value
-> Parser V1ComponentStatusList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ComponentStatusList" ((Object -> Parser V1ComponentStatusList)
 -> Value -> Parser V1ComponentStatusList)
-> (Object -> Parser V1ComponentStatusList)
-> Value
-> Parser V1ComponentStatusList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1ComponentStatus]
-> Maybe Text
-> Maybe V1ListMeta
-> V1ComponentStatusList
V1ComponentStatusList
      (Maybe Text
 -> [V1ComponentStatus]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1ComponentStatusList)
-> Parser (Maybe Text)
-> Parser
     ([V1ComponentStatus]
      -> Maybe Text -> Maybe V1ListMeta -> V1ComponentStatusList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1ComponentStatus]
   -> Maybe Text -> Maybe V1ListMeta -> V1ComponentStatusList)
-> Parser [V1ComponentStatus]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1ComponentStatusList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1ComponentStatus]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1ComponentStatusList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1ComponentStatusList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1ComponentStatusList)
-> Parser (Maybe V1ListMeta) -> Parser V1ComponentStatusList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1ComponentStatusList
instance A.ToJSON V1ComponentStatusList where
  toJSON :: V1ComponentStatusList -> Value
toJSON V1ComponentStatusList {[V1ComponentStatus]
Maybe Text
Maybe V1ListMeta
$sel:v1ComponentStatusListApiVersion:V1ComponentStatusList :: V1ComponentStatusList -> Maybe Text
$sel:v1ComponentStatusListItems:V1ComponentStatusList :: V1ComponentStatusList -> [V1ComponentStatus]
$sel:v1ComponentStatusListKind:V1ComponentStatusList :: V1ComponentStatusList -> Maybe Text
$sel:v1ComponentStatusListMetadata:V1ComponentStatusList :: V1ComponentStatusList -> Maybe V1ListMeta
v1ComponentStatusListApiVersion :: Maybe Text
v1ComponentStatusListItems :: [V1ComponentStatus]
v1ComponentStatusListKind :: Maybe Text
v1ComponentStatusListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ComponentStatusListApiVersion
      , Key
"items" Key -> [V1ComponentStatus] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1ComponentStatus]
v1ComponentStatusListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ComponentStatusListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1ComponentStatusListMetadata
      ]


-- | Construct a value of type 'V1ComponentStatusList' (by applying it's required fields, if any)
mkV1ComponentStatusList
  :: [V1ComponentStatus] -- ^ 'v1ComponentStatusListItems': List of ComponentStatus objects.
  -> V1ComponentStatusList
mkV1ComponentStatusList :: [V1ComponentStatus] -> V1ComponentStatusList
mkV1ComponentStatusList [V1ComponentStatus]
v1ComponentStatusListItems =
  V1ComponentStatusList
  { $sel:v1ComponentStatusListApiVersion:V1ComponentStatusList :: Maybe Text
v1ComponentStatusListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1ComponentStatus]
$sel:v1ComponentStatusListItems:V1ComponentStatusList :: [V1ComponentStatus]
v1ComponentStatusListItems :: [V1ComponentStatus]
v1ComponentStatusListItems
  , $sel:v1ComponentStatusListKind:V1ComponentStatusList :: Maybe Text
v1ComponentStatusListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ComponentStatusListMetadata:V1ComponentStatusList :: Maybe V1ListMeta
v1ComponentStatusListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1Condition
-- | V1Condition
-- Condition contains details for one aspect of the current state of this API Resource.
data V1Condition = V1Condition
  { V1Condition -> DateTime
v1ConditionLastTransitionTime :: !(DateTime) -- ^ /Required/ "lastTransitionTime" - lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.
  , V1Condition -> Text
v1ConditionMessage :: !(Text) -- ^ /Required/ "message" - message is a human readable message indicating details about the transition. This may be an empty string.
  , V1Condition -> Maybe Integer
v1ConditionObservedGeneration :: !(Maybe Integer) -- ^ "observedGeneration" - observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
  , V1Condition -> Text
v1ConditionReason :: !(Text) -- ^ /Required/ "reason" - reason contains a programmatic identifier indicating the reason for the condition&#39;s last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
  , V1Condition -> Text
v1ConditionStatus :: !(Text) -- ^ /Required/ "status" - status of the condition, one of True, False, Unknown.
  , V1Condition -> Text
v1ConditionType :: !(Text) -- ^ /Required/ "type" - type of condition in CamelCase or in foo.example.com/CamelCase.
  } deriving (Int -> V1Condition -> ShowS
[V1Condition] -> ShowS
V1Condition -> String
(Int -> V1Condition -> ShowS)
-> (V1Condition -> String)
-> ([V1Condition] -> ShowS)
-> Show V1Condition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1Condition -> ShowS
showsPrec :: Int -> V1Condition -> ShowS
$cshow :: V1Condition -> String
show :: V1Condition -> String
$cshowList :: [V1Condition] -> ShowS
showList :: [V1Condition] -> ShowS
P.Show, V1Condition -> V1Condition -> Bool
(V1Condition -> V1Condition -> Bool)
-> (V1Condition -> V1Condition -> Bool) -> Eq V1Condition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1Condition -> V1Condition -> Bool
== :: V1Condition -> V1Condition -> Bool
$c/= :: V1Condition -> V1Condition -> Bool
/= :: V1Condition -> V1Condition -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1Condition
instance A.FromJSON V1Condition where
  parseJSON :: Value -> Parser V1Condition
parseJSON = String
-> (Object -> Parser V1Condition) -> Value -> Parser V1Condition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1Condition" ((Object -> Parser V1Condition) -> Value -> Parser V1Condition)
-> (Object -> Parser V1Condition) -> Value -> Parser V1Condition
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    DateTime
-> Text -> Maybe Integer -> Text -> Text -> Text -> V1Condition
V1Condition
      (DateTime
 -> Text -> Maybe Integer -> Text -> Text -> Text -> V1Condition)
-> Parser DateTime
-> Parser
     (Text -> Maybe Integer -> Text -> Text -> Text -> V1Condition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser DateTime
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"lastTransitionTime")
      Parser
  (Text -> Maybe Integer -> Text -> Text -> Text -> V1Condition)
-> Parser Text
-> Parser (Maybe Integer -> Text -> Text -> Text -> V1Condition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"message")
      Parser (Maybe Integer -> Text -> Text -> Text -> V1Condition)
-> Parser (Maybe Integer)
-> Parser (Text -> Text -> Text -> V1Condition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"observedGeneration")
      Parser (Text -> Text -> Text -> V1Condition)
-> Parser Text -> Parser (Text -> Text -> V1Condition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"reason")
      Parser (Text -> Text -> V1Condition)
-> Parser Text -> Parser (Text -> V1Condition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"status")
      Parser (Text -> V1Condition) -> Parser Text -> Parser V1Condition
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"type")

-- | ToJSON V1Condition
instance A.ToJSON V1Condition where
  toJSON :: V1Condition -> Value
toJSON V1Condition {Maybe Integer
Text
DateTime
$sel:v1ConditionLastTransitionTime:V1Condition :: V1Condition -> DateTime
$sel:v1ConditionMessage:V1Condition :: V1Condition -> Text
$sel:v1ConditionObservedGeneration:V1Condition :: V1Condition -> Maybe Integer
$sel:v1ConditionReason:V1Condition :: V1Condition -> Text
$sel:v1ConditionStatus:V1Condition :: V1Condition -> Text
$sel:v1ConditionType:V1Condition :: V1Condition -> Text
v1ConditionLastTransitionTime :: DateTime
v1ConditionMessage :: Text
v1ConditionObservedGeneration :: Maybe Integer
v1ConditionReason :: Text
v1ConditionStatus :: Text
v1ConditionType :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"lastTransitionTime" Key -> DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= DateTime
v1ConditionLastTransitionTime
      , Key
"message" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ConditionMessage
      , Key
"observedGeneration" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1ConditionObservedGeneration
      , Key
"reason" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ConditionReason
      , Key
"status" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ConditionStatus
      , Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ConditionType
      ]


-- | Construct a value of type 'V1Condition' (by applying it's required fields, if any)
mkV1Condition
  :: DateTime -- ^ 'v1ConditionLastTransitionTime': lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.
  -> Text -- ^ 'v1ConditionMessage': message is a human readable message indicating details about the transition. This may be an empty string.
  -> Text -- ^ 'v1ConditionReason': reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
  -> Text -- ^ 'v1ConditionStatus': status of the condition, one of True, False, Unknown.
  -> Text -- ^ 'v1ConditionType': type of condition in CamelCase or in foo.example.com/CamelCase.
  -> V1Condition
mkV1Condition :: DateTime -> Text -> Text -> Text -> Text -> V1Condition
mkV1Condition DateTime
v1ConditionLastTransitionTime Text
v1ConditionMessage Text
v1ConditionReason Text
v1ConditionStatus Text
v1ConditionType =
  V1Condition
  { DateTime
$sel:v1ConditionLastTransitionTime:V1Condition :: DateTime
v1ConditionLastTransitionTime :: DateTime
v1ConditionLastTransitionTime
  , Text
$sel:v1ConditionMessage:V1Condition :: Text
v1ConditionMessage :: Text
v1ConditionMessage
  , $sel:v1ConditionObservedGeneration:V1Condition :: Maybe Integer
v1ConditionObservedGeneration = Maybe Integer
forall a. Maybe a
Nothing
  , Text
$sel:v1ConditionReason:V1Condition :: Text
v1ConditionReason :: Text
v1ConditionReason
  , Text
$sel:v1ConditionStatus:V1Condition :: Text
v1ConditionStatus :: Text
v1ConditionStatus
  , Text
$sel:v1ConditionType:V1Condition :: Text
v1ConditionType :: Text
v1ConditionType
  }

-- ** V1ConfigMap
-- | V1ConfigMap
-- ConfigMap holds configuration data for pods to consume.
data V1ConfigMap = V1ConfigMap
  { V1ConfigMap -> Maybe Text
v1ConfigMapApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1ConfigMap -> Maybe (Map String ByteArray)
v1ConfigMapBinaryData :: !(Maybe (Map.Map String ByteArray)) -- ^ "binaryData" - BinaryData contains the binary data. Each key must consist of alphanumeric characters, &#39;-&#39;, &#39;_&#39; or &#39;.&#39;. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet.
  , V1ConfigMap -> Maybe (Map String Text)
v1ConfigMapData :: !(Maybe (Map.Map String Text)) -- ^ "data" - Data contains the configuration data. Each key must consist of alphanumeric characters, &#39;-&#39;, &#39;_&#39; or &#39;.&#39;. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process.
  , V1ConfigMap -> Maybe Bool
v1ConfigMapImmutable :: !(Maybe Bool) -- ^ "immutable" - Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil.
  , V1ConfigMap -> Maybe Text
v1ConfigMapKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1ConfigMap -> Maybe V1ObjectMeta
v1ConfigMapMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  } deriving (Int -> V1ConfigMap -> ShowS
[V1ConfigMap] -> ShowS
V1ConfigMap -> String
(Int -> V1ConfigMap -> ShowS)
-> (V1ConfigMap -> String)
-> ([V1ConfigMap] -> ShowS)
-> Show V1ConfigMap
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ConfigMap -> ShowS
showsPrec :: Int -> V1ConfigMap -> ShowS
$cshow :: V1ConfigMap -> String
show :: V1ConfigMap -> String
$cshowList :: [V1ConfigMap] -> ShowS
showList :: [V1ConfigMap] -> ShowS
P.Show, V1ConfigMap -> V1ConfigMap -> Bool
(V1ConfigMap -> V1ConfigMap -> Bool)
-> (V1ConfigMap -> V1ConfigMap -> Bool) -> Eq V1ConfigMap
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ConfigMap -> V1ConfigMap -> Bool
== :: V1ConfigMap -> V1ConfigMap -> Bool
$c/= :: V1ConfigMap -> V1ConfigMap -> Bool
/= :: V1ConfigMap -> V1ConfigMap -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ConfigMap
instance A.FromJSON V1ConfigMap where
  parseJSON :: Value -> Parser V1ConfigMap
parseJSON = String
-> (Object -> Parser V1ConfigMap) -> Value -> Parser V1ConfigMap
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ConfigMap" ((Object -> Parser V1ConfigMap) -> Value -> Parser V1ConfigMap)
-> (Object -> Parser V1ConfigMap) -> Value -> Parser V1ConfigMap
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe (Map String ByteArray)
-> Maybe (Map String Text)
-> Maybe Bool
-> Maybe Text
-> Maybe V1ObjectMeta
-> V1ConfigMap
V1ConfigMap
      (Maybe Text
 -> Maybe (Map String ByteArray)
 -> Maybe (Map String Text)
 -> Maybe Bool
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> V1ConfigMap)
-> Parser (Maybe Text)
-> Parser
     (Maybe (Map String ByteArray)
      -> Maybe (Map String Text)
      -> Maybe Bool
      -> Maybe Text
      -> Maybe V1ObjectMeta
      -> V1ConfigMap)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe (Map String ByteArray)
   -> Maybe (Map String Text)
   -> Maybe Bool
   -> Maybe Text
   -> Maybe V1ObjectMeta
   -> V1ConfigMap)
-> Parser (Maybe (Map String ByteArray))
-> Parser
     (Maybe (Map String Text)
      -> Maybe Bool -> Maybe Text -> Maybe V1ObjectMeta -> V1ConfigMap)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String ByteArray))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"binaryData")
      Parser
  (Maybe (Map String Text)
   -> Maybe Bool -> Maybe Text -> Maybe V1ObjectMeta -> V1ConfigMap)
-> Parser (Maybe (Map String Text))
-> Parser
     (Maybe Bool -> Maybe Text -> Maybe V1ObjectMeta -> V1ConfigMap)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String Text))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"data")
      Parser
  (Maybe Bool -> Maybe Text -> Maybe V1ObjectMeta -> V1ConfigMap)
-> Parser (Maybe Bool)
-> Parser (Maybe Text -> Maybe V1ObjectMeta -> V1ConfigMap)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"immutable")
      Parser (Maybe Text -> Maybe V1ObjectMeta -> V1ConfigMap)
-> Parser (Maybe Text)
-> Parser (Maybe V1ObjectMeta -> V1ConfigMap)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ObjectMeta -> V1ConfigMap)
-> Parser (Maybe V1ObjectMeta) -> Parser V1ConfigMap
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1ConfigMap
instance A.ToJSON V1ConfigMap where
  toJSON :: V1ConfigMap -> Value
toJSON V1ConfigMap {Maybe Bool
Maybe (Map String Text)
Maybe (Map String ByteArray)
Maybe Text
Maybe V1ObjectMeta
$sel:v1ConfigMapApiVersion:V1ConfigMap :: V1ConfigMap -> Maybe Text
$sel:v1ConfigMapBinaryData:V1ConfigMap :: V1ConfigMap -> Maybe (Map String ByteArray)
$sel:v1ConfigMapData:V1ConfigMap :: V1ConfigMap -> Maybe (Map String Text)
$sel:v1ConfigMapImmutable:V1ConfigMap :: V1ConfigMap -> Maybe Bool
$sel:v1ConfigMapKind:V1ConfigMap :: V1ConfigMap -> Maybe Text
$sel:v1ConfigMapMetadata:V1ConfigMap :: V1ConfigMap -> Maybe V1ObjectMeta
v1ConfigMapApiVersion :: Maybe Text
v1ConfigMapBinaryData :: Maybe (Map String ByteArray)
v1ConfigMapData :: Maybe (Map String Text)
v1ConfigMapImmutable :: Maybe Bool
v1ConfigMapKind :: Maybe Text
v1ConfigMapMetadata :: Maybe V1ObjectMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ConfigMapApiVersion
      , Key
"binaryData" Key -> Maybe (Map String ByteArray) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String ByteArray)
v1ConfigMapBinaryData
      , Key
"data" Key -> Maybe (Map String Text) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Text)
v1ConfigMapData
      , Key
"immutable" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1ConfigMapImmutable
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ConfigMapKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1ConfigMapMetadata
      ]


-- | Construct a value of type 'V1ConfigMap' (by applying it's required fields, if any)
mkV1ConfigMap
  :: V1ConfigMap
mkV1ConfigMap :: V1ConfigMap
mkV1ConfigMap =
  V1ConfigMap
  { $sel:v1ConfigMapApiVersion:V1ConfigMap :: Maybe Text
v1ConfigMapApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ConfigMapBinaryData:V1ConfigMap :: Maybe (Map String ByteArray)
v1ConfigMapBinaryData = Maybe (Map String ByteArray)
forall a. Maybe a
Nothing
  , $sel:v1ConfigMapData:V1ConfigMap :: Maybe (Map String Text)
v1ConfigMapData = Maybe (Map String Text)
forall a. Maybe a
Nothing
  , $sel:v1ConfigMapImmutable:V1ConfigMap :: Maybe Bool
v1ConfigMapImmutable = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1ConfigMapKind:V1ConfigMap :: Maybe Text
v1ConfigMapKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ConfigMapMetadata:V1ConfigMap :: Maybe V1ObjectMeta
v1ConfigMapMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  }

-- ** V1ConfigMapEnvSource
-- | V1ConfigMapEnvSource
-- ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.  The contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.
data V1ConfigMapEnvSource = V1ConfigMapEnvSource
  { V1ConfigMapEnvSource -> Maybe Text
v1ConfigMapEnvSourceName :: !(Maybe Text) -- ^ "name" - Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  , V1ConfigMapEnvSource -> Maybe Bool
v1ConfigMapEnvSourceOptional :: !(Maybe Bool) -- ^ "optional" - Specify whether the ConfigMap must be defined
  } deriving (Int -> V1ConfigMapEnvSource -> ShowS
[V1ConfigMapEnvSource] -> ShowS
V1ConfigMapEnvSource -> String
(Int -> V1ConfigMapEnvSource -> ShowS)
-> (V1ConfigMapEnvSource -> String)
-> ([V1ConfigMapEnvSource] -> ShowS)
-> Show V1ConfigMapEnvSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ConfigMapEnvSource -> ShowS
showsPrec :: Int -> V1ConfigMapEnvSource -> ShowS
$cshow :: V1ConfigMapEnvSource -> String
show :: V1ConfigMapEnvSource -> String
$cshowList :: [V1ConfigMapEnvSource] -> ShowS
showList :: [V1ConfigMapEnvSource] -> ShowS
P.Show, V1ConfigMapEnvSource -> V1ConfigMapEnvSource -> Bool
(V1ConfigMapEnvSource -> V1ConfigMapEnvSource -> Bool)
-> (V1ConfigMapEnvSource -> V1ConfigMapEnvSource -> Bool)
-> Eq V1ConfigMapEnvSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ConfigMapEnvSource -> V1ConfigMapEnvSource -> Bool
== :: V1ConfigMapEnvSource -> V1ConfigMapEnvSource -> Bool
$c/= :: V1ConfigMapEnvSource -> V1ConfigMapEnvSource -> Bool
/= :: V1ConfigMapEnvSource -> V1ConfigMapEnvSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ConfigMapEnvSource
instance A.FromJSON V1ConfigMapEnvSource where
  parseJSON :: Value -> Parser V1ConfigMapEnvSource
parseJSON = String
-> (Object -> Parser V1ConfigMapEnvSource)
-> Value
-> Parser V1ConfigMapEnvSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ConfigMapEnvSource" ((Object -> Parser V1ConfigMapEnvSource)
 -> Value -> Parser V1ConfigMapEnvSource)
-> (Object -> Parser V1ConfigMapEnvSource)
-> Value
-> Parser V1ConfigMapEnvSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Maybe Bool -> V1ConfigMapEnvSource
V1ConfigMapEnvSource
      (Maybe Text -> Maybe Bool -> V1ConfigMapEnvSource)
-> Parser (Maybe Text)
-> Parser (Maybe Bool -> V1ConfigMapEnvSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"name")
      Parser (Maybe Bool -> V1ConfigMapEnvSource)
-> Parser (Maybe Bool) -> Parser V1ConfigMapEnvSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"optional")

-- | ToJSON V1ConfigMapEnvSource
instance A.ToJSON V1ConfigMapEnvSource where
  toJSON :: V1ConfigMapEnvSource -> Value
toJSON V1ConfigMapEnvSource {Maybe Bool
Maybe Text
$sel:v1ConfigMapEnvSourceName:V1ConfigMapEnvSource :: V1ConfigMapEnvSource -> Maybe Text
$sel:v1ConfigMapEnvSourceOptional:V1ConfigMapEnvSource :: V1ConfigMapEnvSource -> Maybe Bool
v1ConfigMapEnvSourceName :: Maybe Text
v1ConfigMapEnvSourceOptional :: Maybe Bool
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"name" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ConfigMapEnvSourceName
      , Key
"optional" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1ConfigMapEnvSourceOptional
      ]


-- | Construct a value of type 'V1ConfigMapEnvSource' (by applying it's required fields, if any)
mkV1ConfigMapEnvSource
  :: V1ConfigMapEnvSource
mkV1ConfigMapEnvSource :: V1ConfigMapEnvSource
mkV1ConfigMapEnvSource =
  V1ConfigMapEnvSource
  { $sel:v1ConfigMapEnvSourceName:V1ConfigMapEnvSource :: Maybe Text
v1ConfigMapEnvSourceName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ConfigMapEnvSourceOptional:V1ConfigMapEnvSource :: Maybe Bool
v1ConfigMapEnvSourceOptional = Maybe Bool
forall a. Maybe a
Nothing
  }

-- ** V1ConfigMapKeySelector
-- | V1ConfigMapKeySelector
-- Selects a key from a ConfigMap.
data V1ConfigMapKeySelector = V1ConfigMapKeySelector
  { V1ConfigMapKeySelector -> Text
v1ConfigMapKeySelectorKey :: !(Text) -- ^ /Required/ "key" - The key to select.
  , V1ConfigMapKeySelector -> Maybe Text
v1ConfigMapKeySelectorName :: !(Maybe Text) -- ^ "name" - Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  , V1ConfigMapKeySelector -> Maybe Bool
v1ConfigMapKeySelectorOptional :: !(Maybe Bool) -- ^ "optional" - Specify whether the ConfigMap or its key must be defined
  } deriving (Int -> V1ConfigMapKeySelector -> ShowS
[V1ConfigMapKeySelector] -> ShowS
V1ConfigMapKeySelector -> String
(Int -> V1ConfigMapKeySelector -> ShowS)
-> (V1ConfigMapKeySelector -> String)
-> ([V1ConfigMapKeySelector] -> ShowS)
-> Show V1ConfigMapKeySelector
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ConfigMapKeySelector -> ShowS
showsPrec :: Int -> V1ConfigMapKeySelector -> ShowS
$cshow :: V1ConfigMapKeySelector -> String
show :: V1ConfigMapKeySelector -> String
$cshowList :: [V1ConfigMapKeySelector] -> ShowS
showList :: [V1ConfigMapKeySelector] -> ShowS
P.Show, V1ConfigMapKeySelector -> V1ConfigMapKeySelector -> Bool
(V1ConfigMapKeySelector -> V1ConfigMapKeySelector -> Bool)
-> (V1ConfigMapKeySelector -> V1ConfigMapKeySelector -> Bool)
-> Eq V1ConfigMapKeySelector
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ConfigMapKeySelector -> V1ConfigMapKeySelector -> Bool
== :: V1ConfigMapKeySelector -> V1ConfigMapKeySelector -> Bool
$c/= :: V1ConfigMapKeySelector -> V1ConfigMapKeySelector -> Bool
/= :: V1ConfigMapKeySelector -> V1ConfigMapKeySelector -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ConfigMapKeySelector
instance A.FromJSON V1ConfigMapKeySelector where
  parseJSON :: Value -> Parser V1ConfigMapKeySelector
parseJSON = String
-> (Object -> Parser V1ConfigMapKeySelector)
-> Value
-> Parser V1ConfigMapKeySelector
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ConfigMapKeySelector" ((Object -> Parser V1ConfigMapKeySelector)
 -> Value -> Parser V1ConfigMapKeySelector)
-> (Object -> Parser V1ConfigMapKeySelector)
-> Value
-> Parser V1ConfigMapKeySelector
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Maybe Text -> Maybe Bool -> V1ConfigMapKeySelector
V1ConfigMapKeySelector
      (Text -> Maybe Text -> Maybe Bool -> V1ConfigMapKeySelector)
-> Parser Text
-> Parser (Maybe Text -> Maybe Bool -> V1ConfigMapKeySelector)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"key")
      Parser (Maybe Text -> Maybe Bool -> V1ConfigMapKeySelector)
-> Parser (Maybe Text)
-> Parser (Maybe Bool -> V1ConfigMapKeySelector)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"name")
      Parser (Maybe Bool -> V1ConfigMapKeySelector)
-> Parser (Maybe Bool) -> Parser V1ConfigMapKeySelector
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"optional")

-- | ToJSON V1ConfigMapKeySelector
instance A.ToJSON V1ConfigMapKeySelector where
  toJSON :: V1ConfigMapKeySelector -> Value
toJSON V1ConfigMapKeySelector {Maybe Bool
Maybe Text
Text
$sel:v1ConfigMapKeySelectorKey:V1ConfigMapKeySelector :: V1ConfigMapKeySelector -> Text
$sel:v1ConfigMapKeySelectorName:V1ConfigMapKeySelector :: V1ConfigMapKeySelector -> Maybe Text
$sel:v1ConfigMapKeySelectorOptional:V1ConfigMapKeySelector :: V1ConfigMapKeySelector -> Maybe Bool
v1ConfigMapKeySelectorKey :: Text
v1ConfigMapKeySelectorName :: Maybe Text
v1ConfigMapKeySelectorOptional :: Maybe Bool
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"key" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ConfigMapKeySelectorKey
      , Key
"name" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ConfigMapKeySelectorName
      , Key
"optional" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1ConfigMapKeySelectorOptional
      ]


-- | Construct a value of type 'V1ConfigMapKeySelector' (by applying it's required fields, if any)
mkV1ConfigMapKeySelector
  :: Text -- ^ 'v1ConfigMapKeySelectorKey': The key to select.
  -> V1ConfigMapKeySelector
mkV1ConfigMapKeySelector :: Text -> V1ConfigMapKeySelector
mkV1ConfigMapKeySelector Text
v1ConfigMapKeySelectorKey =
  V1ConfigMapKeySelector
  { Text
$sel:v1ConfigMapKeySelectorKey:V1ConfigMapKeySelector :: Text
v1ConfigMapKeySelectorKey :: Text
v1ConfigMapKeySelectorKey
  , $sel:v1ConfigMapKeySelectorName:V1ConfigMapKeySelector :: Maybe Text
v1ConfigMapKeySelectorName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ConfigMapKeySelectorOptional:V1ConfigMapKeySelector :: Maybe Bool
v1ConfigMapKeySelectorOptional = Maybe Bool
forall a. Maybe a
Nothing
  }

-- ** V1ConfigMapList
-- | V1ConfigMapList
-- ConfigMapList is a resource containing a list of ConfigMap objects.
data V1ConfigMapList = V1ConfigMapList
  { V1ConfigMapList -> Maybe Text
v1ConfigMapListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1ConfigMapList -> [V1ConfigMap]
v1ConfigMapListItems :: !([V1ConfigMap]) -- ^ /Required/ "items" - Items is the list of ConfigMaps.
  , V1ConfigMapList -> Maybe Text
v1ConfigMapListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1ConfigMapList -> Maybe V1ListMeta
v1ConfigMapListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1ConfigMapList -> ShowS
[V1ConfigMapList] -> ShowS
V1ConfigMapList -> String
(Int -> V1ConfigMapList -> ShowS)
-> (V1ConfigMapList -> String)
-> ([V1ConfigMapList] -> ShowS)
-> Show V1ConfigMapList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ConfigMapList -> ShowS
showsPrec :: Int -> V1ConfigMapList -> ShowS
$cshow :: V1ConfigMapList -> String
show :: V1ConfigMapList -> String
$cshowList :: [V1ConfigMapList] -> ShowS
showList :: [V1ConfigMapList] -> ShowS
P.Show, V1ConfigMapList -> V1ConfigMapList -> Bool
(V1ConfigMapList -> V1ConfigMapList -> Bool)
-> (V1ConfigMapList -> V1ConfigMapList -> Bool)
-> Eq V1ConfigMapList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ConfigMapList -> V1ConfigMapList -> Bool
== :: V1ConfigMapList -> V1ConfigMapList -> Bool
$c/= :: V1ConfigMapList -> V1ConfigMapList -> Bool
/= :: V1ConfigMapList -> V1ConfigMapList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ConfigMapList
instance A.FromJSON V1ConfigMapList where
  parseJSON :: Value -> Parser V1ConfigMapList
parseJSON = String
-> (Object -> Parser V1ConfigMapList)
-> Value
-> Parser V1ConfigMapList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ConfigMapList" ((Object -> Parser V1ConfigMapList)
 -> Value -> Parser V1ConfigMapList)
-> (Object -> Parser V1ConfigMapList)
-> Value
-> Parser V1ConfigMapList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1ConfigMap]
-> Maybe Text
-> Maybe V1ListMeta
-> V1ConfigMapList
V1ConfigMapList
      (Maybe Text
 -> [V1ConfigMap]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1ConfigMapList)
-> Parser (Maybe Text)
-> Parser
     ([V1ConfigMap]
      -> Maybe Text -> Maybe V1ListMeta -> V1ConfigMapList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1ConfigMap]
   -> Maybe Text -> Maybe V1ListMeta -> V1ConfigMapList)
-> Parser [V1ConfigMap]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1ConfigMapList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1ConfigMap]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1ConfigMapList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1ConfigMapList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1ConfigMapList)
-> Parser (Maybe V1ListMeta) -> Parser V1ConfigMapList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1ConfigMapList
instance A.ToJSON V1ConfigMapList where
  toJSON :: V1ConfigMapList -> Value
toJSON V1ConfigMapList {[V1ConfigMap]
Maybe Text
Maybe V1ListMeta
$sel:v1ConfigMapListApiVersion:V1ConfigMapList :: V1ConfigMapList -> Maybe Text
$sel:v1ConfigMapListItems:V1ConfigMapList :: V1ConfigMapList -> [V1ConfigMap]
$sel:v1ConfigMapListKind:V1ConfigMapList :: V1ConfigMapList -> Maybe Text
$sel:v1ConfigMapListMetadata:V1ConfigMapList :: V1ConfigMapList -> Maybe V1ListMeta
v1ConfigMapListApiVersion :: Maybe Text
v1ConfigMapListItems :: [V1ConfigMap]
v1ConfigMapListKind :: Maybe Text
v1ConfigMapListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ConfigMapListApiVersion
      , Key
"items" Key -> [V1ConfigMap] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1ConfigMap]
v1ConfigMapListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ConfigMapListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1ConfigMapListMetadata
      ]


-- | Construct a value of type 'V1ConfigMapList' (by applying it's required fields, if any)
mkV1ConfigMapList
  :: [V1ConfigMap] -- ^ 'v1ConfigMapListItems': Items is the list of ConfigMaps.
  -> V1ConfigMapList
mkV1ConfigMapList :: [V1ConfigMap] -> V1ConfigMapList
mkV1ConfigMapList [V1ConfigMap]
v1ConfigMapListItems =
  V1ConfigMapList
  { $sel:v1ConfigMapListApiVersion:V1ConfigMapList :: Maybe Text
v1ConfigMapListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1ConfigMap]
$sel:v1ConfigMapListItems:V1ConfigMapList :: [V1ConfigMap]
v1ConfigMapListItems :: [V1ConfigMap]
v1ConfigMapListItems
  , $sel:v1ConfigMapListKind:V1ConfigMapList :: Maybe Text
v1ConfigMapListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ConfigMapListMetadata:V1ConfigMapList :: Maybe V1ListMeta
v1ConfigMapListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1ConfigMapNodeConfigSource
-- | V1ConfigMapNodeConfigSource
-- ConfigMapNodeConfigSource contains the information to reference a ConfigMap as a config source for the Node. This API is deprecated since 1.22: https://git.k8s.io/enhancements/keps/sig-node/281-dynamic-kubelet-configuration
data V1ConfigMapNodeConfigSource = V1ConfigMapNodeConfigSource
  { V1ConfigMapNodeConfigSource -> Text
v1ConfigMapNodeConfigSourceKubeletConfigKey :: !(Text) -- ^ /Required/ "kubeletConfigKey" - KubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure This field is required in all cases.
  , V1ConfigMapNodeConfigSource -> Text
v1ConfigMapNodeConfigSourceName :: !(Text) -- ^ /Required/ "name" - Name is the metadata.name of the referenced ConfigMap. This field is required in all cases.
  , V1ConfigMapNodeConfigSource -> Text
v1ConfigMapNodeConfigSourceNamespace :: !(Text) -- ^ /Required/ "namespace" - Namespace is the metadata.namespace of the referenced ConfigMap. This field is required in all cases.
  , V1ConfigMapNodeConfigSource -> Maybe Text
v1ConfigMapNodeConfigSourceResourceVersion :: !(Maybe Text) -- ^ "resourceVersion" - ResourceVersion is the metadata.ResourceVersion of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status.
  , V1ConfigMapNodeConfigSource -> Maybe Text
v1ConfigMapNodeConfigSourceUid :: !(Maybe Text) -- ^ "uid" - UID is the metadata.UID of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status.
  } deriving (Int -> V1ConfigMapNodeConfigSource -> ShowS
[V1ConfigMapNodeConfigSource] -> ShowS
V1ConfigMapNodeConfigSource -> String
(Int -> V1ConfigMapNodeConfigSource -> ShowS)
-> (V1ConfigMapNodeConfigSource -> String)
-> ([V1ConfigMapNodeConfigSource] -> ShowS)
-> Show V1ConfigMapNodeConfigSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ConfigMapNodeConfigSource -> ShowS
showsPrec :: Int -> V1ConfigMapNodeConfigSource -> ShowS
$cshow :: V1ConfigMapNodeConfigSource -> String
show :: V1ConfigMapNodeConfigSource -> String
$cshowList :: [V1ConfigMapNodeConfigSource] -> ShowS
showList :: [V1ConfigMapNodeConfigSource] -> ShowS
P.Show, V1ConfigMapNodeConfigSource -> V1ConfigMapNodeConfigSource -> Bool
(V1ConfigMapNodeConfigSource
 -> V1ConfigMapNodeConfigSource -> Bool)
-> (V1ConfigMapNodeConfigSource
    -> V1ConfigMapNodeConfigSource -> Bool)
-> Eq V1ConfigMapNodeConfigSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ConfigMapNodeConfigSource -> V1ConfigMapNodeConfigSource -> Bool
== :: V1ConfigMapNodeConfigSource -> V1ConfigMapNodeConfigSource -> Bool
$c/= :: V1ConfigMapNodeConfigSource -> V1ConfigMapNodeConfigSource -> Bool
/= :: V1ConfigMapNodeConfigSource -> V1ConfigMapNodeConfigSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ConfigMapNodeConfigSource
instance A.FromJSON V1ConfigMapNodeConfigSource where
  parseJSON :: Value -> Parser V1ConfigMapNodeConfigSource
parseJSON = String
-> (Object -> Parser V1ConfigMapNodeConfigSource)
-> Value
-> Parser V1ConfigMapNodeConfigSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ConfigMapNodeConfigSource" ((Object -> Parser V1ConfigMapNodeConfigSource)
 -> Value -> Parser V1ConfigMapNodeConfigSource)
-> (Object -> Parser V1ConfigMapNodeConfigSource)
-> Value
-> Parser V1ConfigMapNodeConfigSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text
-> Text
-> Text
-> Maybe Text
-> Maybe Text
-> V1ConfigMapNodeConfigSource
V1ConfigMapNodeConfigSource
      (Text
 -> Text
 -> Text
 -> Maybe Text
 -> Maybe Text
 -> V1ConfigMapNodeConfigSource)
-> Parser Text
-> Parser
     (Text
      -> Text -> Maybe Text -> Maybe Text -> V1ConfigMapNodeConfigSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"kubeletConfigKey")
      Parser
  (Text
   -> Text -> Maybe Text -> Maybe Text -> V1ConfigMapNodeConfigSource)
-> Parser Text
-> Parser
     (Text -> Maybe Text -> Maybe Text -> V1ConfigMapNodeConfigSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser
  (Text -> Maybe Text -> Maybe Text -> V1ConfigMapNodeConfigSource)
-> Parser Text
-> Parser (Maybe Text -> Maybe Text -> V1ConfigMapNodeConfigSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"namespace")
      Parser (Maybe Text -> Maybe Text -> V1ConfigMapNodeConfigSource)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> V1ConfigMapNodeConfigSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resourceVersion")
      Parser (Maybe Text -> V1ConfigMapNodeConfigSource)
-> Parser (Maybe Text) -> Parser V1ConfigMapNodeConfigSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"uid")

-- | ToJSON V1ConfigMapNodeConfigSource
instance A.ToJSON V1ConfigMapNodeConfigSource where
  toJSON :: V1ConfigMapNodeConfigSource -> Value
toJSON V1ConfigMapNodeConfigSource {Maybe Text
Text
$sel:v1ConfigMapNodeConfigSourceKubeletConfigKey:V1ConfigMapNodeConfigSource :: V1ConfigMapNodeConfigSource -> Text
$sel:v1ConfigMapNodeConfigSourceName:V1ConfigMapNodeConfigSource :: V1ConfigMapNodeConfigSource -> Text
$sel:v1ConfigMapNodeConfigSourceNamespace:V1ConfigMapNodeConfigSource :: V1ConfigMapNodeConfigSource -> Text
$sel:v1ConfigMapNodeConfigSourceResourceVersion:V1ConfigMapNodeConfigSource :: V1ConfigMapNodeConfigSource -> Maybe Text
$sel:v1ConfigMapNodeConfigSourceUid:V1ConfigMapNodeConfigSource :: V1ConfigMapNodeConfigSource -> Maybe Text
v1ConfigMapNodeConfigSourceKubeletConfigKey :: Text
v1ConfigMapNodeConfigSourceName :: Text
v1ConfigMapNodeConfigSourceNamespace :: Text
v1ConfigMapNodeConfigSourceResourceVersion :: Maybe Text
v1ConfigMapNodeConfigSourceUid :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"kubeletConfigKey" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ConfigMapNodeConfigSourceKubeletConfigKey
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ConfigMapNodeConfigSourceName
      , Key
"namespace" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ConfigMapNodeConfigSourceNamespace
      , Key
"resourceVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ConfigMapNodeConfigSourceResourceVersion
      , Key
"uid" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ConfigMapNodeConfigSourceUid
      ]


-- | Construct a value of type 'V1ConfigMapNodeConfigSource' (by applying it's required fields, if any)
mkV1ConfigMapNodeConfigSource
  :: Text -- ^ 'v1ConfigMapNodeConfigSourceKubeletConfigKey': KubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure This field is required in all cases.
  -> Text -- ^ 'v1ConfigMapNodeConfigSourceName': Name is the metadata.name of the referenced ConfigMap. This field is required in all cases.
  -> Text -- ^ 'v1ConfigMapNodeConfigSourceNamespace': Namespace is the metadata.namespace of the referenced ConfigMap. This field is required in all cases.
  -> V1ConfigMapNodeConfigSource
mkV1ConfigMapNodeConfigSource :: Text -> Text -> Text -> V1ConfigMapNodeConfigSource
mkV1ConfigMapNodeConfigSource Text
v1ConfigMapNodeConfigSourceKubeletConfigKey Text
v1ConfigMapNodeConfigSourceName Text
v1ConfigMapNodeConfigSourceNamespace =
  V1ConfigMapNodeConfigSource
  { Text
$sel:v1ConfigMapNodeConfigSourceKubeletConfigKey:V1ConfigMapNodeConfigSource :: Text
v1ConfigMapNodeConfigSourceKubeletConfigKey :: Text
v1ConfigMapNodeConfigSourceKubeletConfigKey
  , Text
$sel:v1ConfigMapNodeConfigSourceName:V1ConfigMapNodeConfigSource :: Text
v1ConfigMapNodeConfigSourceName :: Text
v1ConfigMapNodeConfigSourceName
  , Text
$sel:v1ConfigMapNodeConfigSourceNamespace:V1ConfigMapNodeConfigSource :: Text
v1ConfigMapNodeConfigSourceNamespace :: Text
v1ConfigMapNodeConfigSourceNamespace
  , $sel:v1ConfigMapNodeConfigSourceResourceVersion:V1ConfigMapNodeConfigSource :: Maybe Text
v1ConfigMapNodeConfigSourceResourceVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ConfigMapNodeConfigSourceUid:V1ConfigMapNodeConfigSource :: Maybe Text
v1ConfigMapNodeConfigSourceUid = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1ConfigMapProjection
-- | V1ConfigMapProjection
-- Adapts a ConfigMap into a projected volume.  The contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode.
data V1ConfigMapProjection = V1ConfigMapProjection
  { V1ConfigMapProjection -> Maybe [V1KeyToPath]
v1ConfigMapProjectionItems :: !(Maybe [V1KeyToPath]) -- ^ "items" - items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the &#39;..&#39; path or start with &#39;..&#39;.
  , V1ConfigMapProjection -> Maybe Text
v1ConfigMapProjectionName :: !(Maybe Text) -- ^ "name" - Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  , V1ConfigMapProjection -> Maybe Bool
v1ConfigMapProjectionOptional :: !(Maybe Bool) -- ^ "optional" - optional specify whether the ConfigMap or its keys must be defined
  } deriving (Int -> V1ConfigMapProjection -> ShowS
[V1ConfigMapProjection] -> ShowS
V1ConfigMapProjection -> String
(Int -> V1ConfigMapProjection -> ShowS)
-> (V1ConfigMapProjection -> String)
-> ([V1ConfigMapProjection] -> ShowS)
-> Show V1ConfigMapProjection
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ConfigMapProjection -> ShowS
showsPrec :: Int -> V1ConfigMapProjection -> ShowS
$cshow :: V1ConfigMapProjection -> String
show :: V1ConfigMapProjection -> String
$cshowList :: [V1ConfigMapProjection] -> ShowS
showList :: [V1ConfigMapProjection] -> ShowS
P.Show, V1ConfigMapProjection -> V1ConfigMapProjection -> Bool
(V1ConfigMapProjection -> V1ConfigMapProjection -> Bool)
-> (V1ConfigMapProjection -> V1ConfigMapProjection -> Bool)
-> Eq V1ConfigMapProjection
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ConfigMapProjection -> V1ConfigMapProjection -> Bool
== :: V1ConfigMapProjection -> V1ConfigMapProjection -> Bool
$c/= :: V1ConfigMapProjection -> V1ConfigMapProjection -> Bool
/= :: V1ConfigMapProjection -> V1ConfigMapProjection -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ConfigMapProjection
instance A.FromJSON V1ConfigMapProjection where
  parseJSON :: Value -> Parser V1ConfigMapProjection
parseJSON = String
-> (Object -> Parser V1ConfigMapProjection)
-> Value
-> Parser V1ConfigMapProjection
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ConfigMapProjection" ((Object -> Parser V1ConfigMapProjection)
 -> Value -> Parser V1ConfigMapProjection)
-> (Object -> Parser V1ConfigMapProjection)
-> Value
-> Parser V1ConfigMapProjection
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1KeyToPath]
-> Maybe Text -> Maybe Bool -> V1ConfigMapProjection
V1ConfigMapProjection
      (Maybe [V1KeyToPath]
 -> Maybe Text -> Maybe Bool -> V1ConfigMapProjection)
-> Parser (Maybe [V1KeyToPath])
-> Parser (Maybe Text -> Maybe Bool -> V1ConfigMapProjection)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1KeyToPath])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"items")
      Parser (Maybe Text -> Maybe Bool -> V1ConfigMapProjection)
-> Parser (Maybe Text)
-> Parser (Maybe Bool -> V1ConfigMapProjection)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"name")
      Parser (Maybe Bool -> V1ConfigMapProjection)
-> Parser (Maybe Bool) -> Parser V1ConfigMapProjection
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"optional")

-- | ToJSON V1ConfigMapProjection
instance A.ToJSON V1ConfigMapProjection where
  toJSON :: V1ConfigMapProjection -> Value
toJSON V1ConfigMapProjection {Maybe Bool
Maybe [V1KeyToPath]
Maybe Text
$sel:v1ConfigMapProjectionItems:V1ConfigMapProjection :: V1ConfigMapProjection -> Maybe [V1KeyToPath]
$sel:v1ConfigMapProjectionName:V1ConfigMapProjection :: V1ConfigMapProjection -> Maybe Text
$sel:v1ConfigMapProjectionOptional:V1ConfigMapProjection :: V1ConfigMapProjection -> Maybe Bool
v1ConfigMapProjectionItems :: Maybe [V1KeyToPath]
v1ConfigMapProjectionName :: Maybe Text
v1ConfigMapProjectionOptional :: Maybe Bool
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"items" Key -> Maybe [V1KeyToPath] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1KeyToPath]
v1ConfigMapProjectionItems
      , Key
"name" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ConfigMapProjectionName
      , Key
"optional" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1ConfigMapProjectionOptional
      ]


-- | Construct a value of type 'V1ConfigMapProjection' (by applying it's required fields, if any)
mkV1ConfigMapProjection
  :: V1ConfigMapProjection
mkV1ConfigMapProjection :: V1ConfigMapProjection
mkV1ConfigMapProjection =
  V1ConfigMapProjection
  { $sel:v1ConfigMapProjectionItems:V1ConfigMapProjection :: Maybe [V1KeyToPath]
v1ConfigMapProjectionItems = Maybe [V1KeyToPath]
forall a. Maybe a
Nothing
  , $sel:v1ConfigMapProjectionName:V1ConfigMapProjection :: Maybe Text
v1ConfigMapProjectionName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ConfigMapProjectionOptional:V1ConfigMapProjection :: Maybe Bool
v1ConfigMapProjectionOptional = Maybe Bool
forall a. Maybe a
Nothing
  }

-- ** V1ConfigMapVolumeSource
-- | V1ConfigMapVolumeSource
-- Adapts a ConfigMap into a volume.  The contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.
data V1ConfigMapVolumeSource = V1ConfigMapVolumeSource
  { V1ConfigMapVolumeSource -> Maybe Int
v1ConfigMapVolumeSourceDefaultMode :: !(Maybe Int) -- ^ "defaultMode" - defaultMode is optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
  , V1ConfigMapVolumeSource -> Maybe [V1KeyToPath]
v1ConfigMapVolumeSourceItems :: !(Maybe [V1KeyToPath]) -- ^ "items" - items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the &#39;..&#39; path or start with &#39;..&#39;.
  , V1ConfigMapVolumeSource -> Maybe Text
v1ConfigMapVolumeSourceName :: !(Maybe Text) -- ^ "name" - Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  , V1ConfigMapVolumeSource -> Maybe Bool
v1ConfigMapVolumeSourceOptional :: !(Maybe Bool) -- ^ "optional" - optional specify whether the ConfigMap or its keys must be defined
  } deriving (Int -> V1ConfigMapVolumeSource -> ShowS
[V1ConfigMapVolumeSource] -> ShowS
V1ConfigMapVolumeSource -> String
(Int -> V1ConfigMapVolumeSource -> ShowS)
-> (V1ConfigMapVolumeSource -> String)
-> ([V1ConfigMapVolumeSource] -> ShowS)
-> Show V1ConfigMapVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ConfigMapVolumeSource -> ShowS
showsPrec :: Int -> V1ConfigMapVolumeSource -> ShowS
$cshow :: V1ConfigMapVolumeSource -> String
show :: V1ConfigMapVolumeSource -> String
$cshowList :: [V1ConfigMapVolumeSource] -> ShowS
showList :: [V1ConfigMapVolumeSource] -> ShowS
P.Show, V1ConfigMapVolumeSource -> V1ConfigMapVolumeSource -> Bool
(V1ConfigMapVolumeSource -> V1ConfigMapVolumeSource -> Bool)
-> (V1ConfigMapVolumeSource -> V1ConfigMapVolumeSource -> Bool)
-> Eq V1ConfigMapVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ConfigMapVolumeSource -> V1ConfigMapVolumeSource -> Bool
== :: V1ConfigMapVolumeSource -> V1ConfigMapVolumeSource -> Bool
$c/= :: V1ConfigMapVolumeSource -> V1ConfigMapVolumeSource -> Bool
/= :: V1ConfigMapVolumeSource -> V1ConfigMapVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ConfigMapVolumeSource
instance A.FromJSON V1ConfigMapVolumeSource where
  parseJSON :: Value -> Parser V1ConfigMapVolumeSource
parseJSON = String
-> (Object -> Parser V1ConfigMapVolumeSource)
-> Value
-> Parser V1ConfigMapVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ConfigMapVolumeSource" ((Object -> Parser V1ConfigMapVolumeSource)
 -> Value -> Parser V1ConfigMapVolumeSource)
-> (Object -> Parser V1ConfigMapVolumeSource)
-> Value
-> Parser V1ConfigMapVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Int
-> Maybe [V1KeyToPath]
-> Maybe Text
-> Maybe Bool
-> V1ConfigMapVolumeSource
V1ConfigMapVolumeSource
      (Maybe Int
 -> Maybe [V1KeyToPath]
 -> Maybe Text
 -> Maybe Bool
 -> V1ConfigMapVolumeSource)
-> Parser (Maybe Int)
-> Parser
     (Maybe [V1KeyToPath]
      -> Maybe Text -> Maybe Bool -> V1ConfigMapVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"defaultMode")
      Parser
  (Maybe [V1KeyToPath]
   -> Maybe Text -> Maybe Bool -> V1ConfigMapVolumeSource)
-> Parser (Maybe [V1KeyToPath])
-> Parser (Maybe Text -> Maybe Bool -> V1ConfigMapVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1KeyToPath])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"items")
      Parser (Maybe Text -> Maybe Bool -> V1ConfigMapVolumeSource)
-> Parser (Maybe Text)
-> Parser (Maybe Bool -> V1ConfigMapVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"name")
      Parser (Maybe Bool -> V1ConfigMapVolumeSource)
-> Parser (Maybe Bool) -> Parser V1ConfigMapVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"optional")

-- | ToJSON V1ConfigMapVolumeSource
instance A.ToJSON V1ConfigMapVolumeSource where
  toJSON :: V1ConfigMapVolumeSource -> Value
toJSON V1ConfigMapVolumeSource {Maybe Bool
Maybe Int
Maybe [V1KeyToPath]
Maybe Text
$sel:v1ConfigMapVolumeSourceDefaultMode:V1ConfigMapVolumeSource :: V1ConfigMapVolumeSource -> Maybe Int
$sel:v1ConfigMapVolumeSourceItems:V1ConfigMapVolumeSource :: V1ConfigMapVolumeSource -> Maybe [V1KeyToPath]
$sel:v1ConfigMapVolumeSourceName:V1ConfigMapVolumeSource :: V1ConfigMapVolumeSource -> Maybe Text
$sel:v1ConfigMapVolumeSourceOptional:V1ConfigMapVolumeSource :: V1ConfigMapVolumeSource -> Maybe Bool
v1ConfigMapVolumeSourceDefaultMode :: Maybe Int
v1ConfigMapVolumeSourceItems :: Maybe [V1KeyToPath]
v1ConfigMapVolumeSourceName :: Maybe Text
v1ConfigMapVolumeSourceOptional :: Maybe Bool
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"defaultMode" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1ConfigMapVolumeSourceDefaultMode
      , Key
"items" Key -> Maybe [V1KeyToPath] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1KeyToPath]
v1ConfigMapVolumeSourceItems
      , Key
"name" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ConfigMapVolumeSourceName
      , Key
"optional" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1ConfigMapVolumeSourceOptional
      ]


-- | Construct a value of type 'V1ConfigMapVolumeSource' (by applying it's required fields, if any)
mkV1ConfigMapVolumeSource
  :: V1ConfigMapVolumeSource
mkV1ConfigMapVolumeSource :: V1ConfigMapVolumeSource
mkV1ConfigMapVolumeSource =
  V1ConfigMapVolumeSource
  { $sel:v1ConfigMapVolumeSourceDefaultMode:V1ConfigMapVolumeSource :: Maybe Int
v1ConfigMapVolumeSourceDefaultMode = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1ConfigMapVolumeSourceItems:V1ConfigMapVolumeSource :: Maybe [V1KeyToPath]
v1ConfigMapVolumeSourceItems = Maybe [V1KeyToPath]
forall a. Maybe a
Nothing
  , $sel:v1ConfigMapVolumeSourceName:V1ConfigMapVolumeSource :: Maybe Text
v1ConfigMapVolumeSourceName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ConfigMapVolumeSourceOptional:V1ConfigMapVolumeSource :: Maybe Bool
v1ConfigMapVolumeSourceOptional = Maybe Bool
forall a. Maybe a
Nothing
  }

-- ** V1Container
-- | V1Container
-- A single application container that you want to run within a pod.
data V1Container = V1Container
  { V1Container -> Maybe [Text]
v1ContainerArgs :: !(Maybe [Text]) -- ^ "args" - Arguments to the entrypoint. The container image&#39;s CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container&#39;s environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \&quot;$$(VAR_NAME)\&quot; will produce the string literal \&quot;$(VAR_NAME)\&quot;. Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
  , V1Container -> Maybe [Text]
v1ContainerCommand :: !(Maybe [Text]) -- ^ "command" - Entrypoint array. Not executed within a shell. The container image&#39;s ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container&#39;s environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \&quot;$$(VAR_NAME)\&quot; will produce the string literal \&quot;$(VAR_NAME)\&quot;. Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
  , V1Container -> Maybe [V1EnvVar]
v1ContainerEnv :: !(Maybe [V1EnvVar]) -- ^ "env" - List of environment variables to set in the container. Cannot be updated.
  , V1Container -> Maybe [V1EnvFromSource]
v1ContainerEnvFrom :: !(Maybe [V1EnvFromSource]) -- ^ "envFrom" - List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.
  , V1Container -> Maybe Text
v1ContainerImage :: !(Maybe Text) -- ^ "image" - Container image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets.
  , V1Container -> Maybe Text
v1ContainerImagePullPolicy :: !(Maybe Text) -- ^ "imagePullPolicy" - Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images
  , V1Container -> Maybe V1Lifecycle
v1ContainerLifecycle :: !(Maybe V1Lifecycle) -- ^ "lifecycle"
  , V1Container -> Maybe V1Probe
v1ContainerLivenessProbe :: !(Maybe V1Probe) -- ^ "livenessProbe"
  , V1Container -> Text
v1ContainerName :: !(Text) -- ^ /Required/ "name" - Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.
  , V1Container -> Maybe [V1ContainerPort]
v1ContainerPorts :: !(Maybe [V1ContainerPort]) -- ^ "ports" - List of ports to expose from the container. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \&quot;0.0.0.0\&quot; address inside a container will be accessible from the network. Modifying this array with strategic merge patch may corrupt the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. Cannot be updated.
  , V1Container -> Maybe V1Probe
v1ContainerReadinessProbe :: !(Maybe V1Probe) -- ^ "readinessProbe"
  , V1Container -> Maybe [V1ContainerResizePolicy]
v1ContainerResizePolicy :: !(Maybe [V1ContainerResizePolicy]) -- ^ "resizePolicy" - Resources resize policy for the container.
  , V1Container -> Maybe V1ResourceRequirements
v1ContainerResources :: !(Maybe V1ResourceRequirements) -- ^ "resources"
  , V1Container -> Maybe Text
v1ContainerRestartPolicy :: !(Maybe Text) -- ^ "restartPolicy" - RestartPolicy defines the restart behavior of individual containers in a pod. This field may only be set for init containers, and the only allowed value is \&quot;Always\&quot;. For non-init containers or when this field is not specified, the restart behavior is defined by the Pod&#39;s restart policy and the container type. Setting the RestartPolicy as \&quot;Always\&quot; for the init container will have the following effect: this init container will be continually restarted on exit until all regular containers have terminated. Once all regular containers have completed, all init containers with restartPolicy \&quot;Always\&quot; will be shut down. This lifecycle differs from normal init containers and is often referred to as a \&quot;sidecar\&quot; container. Although this init container still starts in the init container sequence, it does not wait for the container to complete before proceeding to the next init container. Instead, the next init container starts immediately after this init container is started, or after any startupProbe has successfully completed.
  , V1Container -> Maybe V1SecurityContext
v1ContainerSecurityContext :: !(Maybe V1SecurityContext) -- ^ "securityContext"
  , V1Container -> Maybe V1Probe
v1ContainerStartupProbe :: !(Maybe V1Probe) -- ^ "startupProbe"
  , V1Container -> Maybe Bool
v1ContainerStdin :: !(Maybe Bool) -- ^ "stdin" - Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.
  , V1Container -> Maybe Bool
v1ContainerStdinOnce :: !(Maybe Bool) -- ^ "stdinOnce" - Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false
  , V1Container -> Maybe Text
v1ContainerTerminationMessagePath :: !(Maybe Text) -- ^ "terminationMessagePath" - Optional: Path at which the file to which the container&#39;s termination message will be written is mounted into the container&#39;s filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.
  , V1Container -> Maybe Text
v1ContainerTerminationMessagePolicy :: !(Maybe Text) -- ^ "terminationMessagePolicy" - Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.
  , V1Container -> Maybe Bool
v1ContainerTty :: !(Maybe Bool) -- ^ "tty" - Whether this container should allocate a TTY for itself, also requires &#39;stdin&#39; to be true. Default is false.
  , V1Container -> Maybe [V1VolumeDevice]
v1ContainerVolumeDevices :: !(Maybe [V1VolumeDevice]) -- ^ "volumeDevices" - volumeDevices is the list of block devices to be used by the container.
  , V1Container -> Maybe [V1VolumeMount]
v1ContainerVolumeMounts :: !(Maybe [V1VolumeMount]) -- ^ "volumeMounts" - Pod volumes to mount into the container&#39;s filesystem. Cannot be updated.
  , V1Container -> Maybe Text
v1ContainerWorkingDir :: !(Maybe Text) -- ^ "workingDir" - Container&#39;s working directory. If not specified, the container runtime&#39;s default will be used, which might be configured in the container image. Cannot be updated.
  } deriving (Int -> V1Container -> ShowS
[V1Container] -> ShowS
V1Container -> String
(Int -> V1Container -> ShowS)
-> (V1Container -> String)
-> ([V1Container] -> ShowS)
-> Show V1Container
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1Container -> ShowS
showsPrec :: Int -> V1Container -> ShowS
$cshow :: V1Container -> String
show :: V1Container -> String
$cshowList :: [V1Container] -> ShowS
showList :: [V1Container] -> ShowS
P.Show, V1Container -> V1Container -> Bool
(V1Container -> V1Container -> Bool)
-> (V1Container -> V1Container -> Bool) -> Eq V1Container
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1Container -> V1Container -> Bool
== :: V1Container -> V1Container -> Bool
$c/= :: V1Container -> V1Container -> Bool
/= :: V1Container -> V1Container -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1Container
instance A.FromJSON V1Container where
  parseJSON :: Value -> Parser V1Container
parseJSON = String
-> (Object -> Parser V1Container) -> Value -> Parser V1Container
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1Container" ((Object -> Parser V1Container) -> Value -> Parser V1Container)
-> (Object -> Parser V1Container) -> Value -> Parser V1Container
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [Text]
-> Maybe [Text]
-> Maybe [V1EnvVar]
-> Maybe [V1EnvFromSource]
-> Maybe Text
-> Maybe Text
-> Maybe V1Lifecycle
-> Maybe V1Probe
-> Text
-> Maybe [V1ContainerPort]
-> Maybe V1Probe
-> Maybe [V1ContainerResizePolicy]
-> Maybe V1ResourceRequirements
-> Maybe Text
-> Maybe V1SecurityContext
-> Maybe V1Probe
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe [V1VolumeDevice]
-> Maybe [V1VolumeMount]
-> Maybe Text
-> V1Container
V1Container
      (Maybe [Text]
 -> Maybe [Text]
 -> Maybe [V1EnvVar]
 -> Maybe [V1EnvFromSource]
 -> Maybe Text
 -> Maybe Text
 -> Maybe V1Lifecycle
 -> Maybe V1Probe
 -> Text
 -> Maybe [V1ContainerPort]
 -> Maybe V1Probe
 -> Maybe [V1ContainerResizePolicy]
 -> Maybe V1ResourceRequirements
 -> Maybe Text
 -> Maybe V1SecurityContext
 -> Maybe V1Probe
 -> Maybe Bool
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe [V1VolumeDevice]
 -> Maybe [V1VolumeMount]
 -> Maybe Text
 -> V1Container)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [Text]
      -> Maybe [V1EnvVar]
      -> Maybe [V1EnvFromSource]
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1Lifecycle
      -> Maybe V1Probe
      -> Text
      -> Maybe [V1ContainerPort]
      -> Maybe V1Probe
      -> Maybe [V1ContainerResizePolicy]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe V1SecurityContext
      -> Maybe V1Probe
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1Container)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"args")
      Parser
  (Maybe [Text]
   -> Maybe [V1EnvVar]
   -> Maybe [V1EnvFromSource]
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1Lifecycle
   -> Maybe V1Probe
   -> Text
   -> Maybe [V1ContainerPort]
   -> Maybe V1Probe
   -> Maybe [V1ContainerResizePolicy]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe V1SecurityContext
   -> Maybe V1Probe
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1Container)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [V1EnvVar]
      -> Maybe [V1EnvFromSource]
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1Lifecycle
      -> Maybe V1Probe
      -> Text
      -> Maybe [V1ContainerPort]
      -> Maybe V1Probe
      -> Maybe [V1ContainerResizePolicy]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe V1SecurityContext
      -> Maybe V1Probe
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1Container)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"command")
      Parser
  (Maybe [V1EnvVar]
   -> Maybe [V1EnvFromSource]
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1Lifecycle
   -> Maybe V1Probe
   -> Text
   -> Maybe [V1ContainerPort]
   -> Maybe V1Probe
   -> Maybe [V1ContainerResizePolicy]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe V1SecurityContext
   -> Maybe V1Probe
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1Container)
-> Parser (Maybe [V1EnvVar])
-> Parser
     (Maybe [V1EnvFromSource]
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1Lifecycle
      -> Maybe V1Probe
      -> Text
      -> Maybe [V1ContainerPort]
      -> Maybe V1Probe
      -> Maybe [V1ContainerResizePolicy]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe V1SecurityContext
      -> Maybe V1Probe
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1Container)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1EnvVar])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"env")
      Parser
  (Maybe [V1EnvFromSource]
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1Lifecycle
   -> Maybe V1Probe
   -> Text
   -> Maybe [V1ContainerPort]
   -> Maybe V1Probe
   -> Maybe [V1ContainerResizePolicy]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe V1SecurityContext
   -> Maybe V1Probe
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1Container)
-> Parser (Maybe [V1EnvFromSource])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe V1Lifecycle
      -> Maybe V1Probe
      -> Text
      -> Maybe [V1ContainerPort]
      -> Maybe V1Probe
      -> Maybe [V1ContainerResizePolicy]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe V1SecurityContext
      -> Maybe V1Probe
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1Container)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1EnvFromSource])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"envFrom")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe V1Lifecycle
   -> Maybe V1Probe
   -> Text
   -> Maybe [V1ContainerPort]
   -> Maybe V1Probe
   -> Maybe [V1ContainerResizePolicy]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe V1SecurityContext
   -> Maybe V1Probe
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1Container)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1Lifecycle
      -> Maybe V1Probe
      -> Text
      -> Maybe [V1ContainerPort]
      -> Maybe V1Probe
      -> Maybe [V1ContainerResizePolicy]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe V1SecurityContext
      -> Maybe V1Probe
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1Container)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"image")
      Parser
  (Maybe Text
   -> Maybe V1Lifecycle
   -> Maybe V1Probe
   -> Text
   -> Maybe [V1ContainerPort]
   -> Maybe V1Probe
   -> Maybe [V1ContainerResizePolicy]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe V1SecurityContext
   -> Maybe V1Probe
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1Container)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1Lifecycle
      -> Maybe V1Probe
      -> Text
      -> Maybe [V1ContainerPort]
      -> Maybe V1Probe
      -> Maybe [V1ContainerResizePolicy]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe V1SecurityContext
      -> Maybe V1Probe
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1Container)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"imagePullPolicy")
      Parser
  (Maybe V1Lifecycle
   -> Maybe V1Probe
   -> Text
   -> Maybe [V1ContainerPort]
   -> Maybe V1Probe
   -> Maybe [V1ContainerResizePolicy]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe V1SecurityContext
   -> Maybe V1Probe
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1Container)
-> Parser (Maybe V1Lifecycle)
-> Parser
     (Maybe V1Probe
      -> Text
      -> Maybe [V1ContainerPort]
      -> Maybe V1Probe
      -> Maybe [V1ContainerResizePolicy]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe V1SecurityContext
      -> Maybe V1Probe
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1Container)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1Lifecycle)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lifecycle")
      Parser
  (Maybe V1Probe
   -> Text
   -> Maybe [V1ContainerPort]
   -> Maybe V1Probe
   -> Maybe [V1ContainerResizePolicy]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe V1SecurityContext
   -> Maybe V1Probe
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1Container)
-> Parser (Maybe V1Probe)
-> Parser
     (Text
      -> Maybe [V1ContainerPort]
      -> Maybe V1Probe
      -> Maybe [V1ContainerResizePolicy]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe V1SecurityContext
      -> Maybe V1Probe
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1Container)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1Probe)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"livenessProbe")
      Parser
  (Text
   -> Maybe [V1ContainerPort]
   -> Maybe V1Probe
   -> Maybe [V1ContainerResizePolicy]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe V1SecurityContext
   -> Maybe V1Probe
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1Container)
-> Parser Text
-> Parser
     (Maybe [V1ContainerPort]
      -> Maybe V1Probe
      -> Maybe [V1ContainerResizePolicy]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe V1SecurityContext
      -> Maybe V1Probe
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1Container)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser
  (Maybe [V1ContainerPort]
   -> Maybe V1Probe
   -> Maybe [V1ContainerResizePolicy]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe V1SecurityContext
   -> Maybe V1Probe
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1Container)
-> Parser (Maybe [V1ContainerPort])
-> Parser
     (Maybe V1Probe
      -> Maybe [V1ContainerResizePolicy]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe V1SecurityContext
      -> Maybe V1Probe
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1Container)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1ContainerPort])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ports")
      Parser
  (Maybe V1Probe
   -> Maybe [V1ContainerResizePolicy]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe V1SecurityContext
   -> Maybe V1Probe
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1Container)
-> Parser (Maybe V1Probe)
-> Parser
     (Maybe [V1ContainerResizePolicy]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe V1SecurityContext
      -> Maybe V1Probe
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1Container)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1Probe)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readinessProbe")
      Parser
  (Maybe [V1ContainerResizePolicy]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe V1SecurityContext
   -> Maybe V1Probe
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1Container)
-> Parser (Maybe [V1ContainerResizePolicy])
-> Parser
     (Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe V1SecurityContext
      -> Maybe V1Probe
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1Container)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1ContainerResizePolicy])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resizePolicy")
      Parser
  (Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe V1SecurityContext
   -> Maybe V1Probe
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1Container)
-> Parser (Maybe V1ResourceRequirements)
-> Parser
     (Maybe Text
      -> Maybe V1SecurityContext
      -> Maybe V1Probe
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1Container)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ResourceRequirements)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resources")
      Parser
  (Maybe Text
   -> Maybe V1SecurityContext
   -> Maybe V1Probe
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1Container)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1SecurityContext
      -> Maybe V1Probe
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1Container)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"restartPolicy")
      Parser
  (Maybe V1SecurityContext
   -> Maybe V1Probe
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1Container)
-> Parser (Maybe V1SecurityContext)
-> Parser
     (Maybe V1Probe
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1Container)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1SecurityContext)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"securityContext")
      Parser
  (Maybe V1Probe
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1Container)
-> Parser (Maybe V1Probe)
-> Parser
     (Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1Container)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1Probe)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"startupProbe")
      Parser
  (Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1Container)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1Container)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"stdin")
      Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1Container)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1Container)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"stdinOnce")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1Container)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1Container)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"terminationMessagePath")
      Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1Container)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1Container)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"terminationMessagePolicy")
      Parser
  (Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1Container)
-> Parser (Maybe Bool)
-> Parser
     (Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount] -> Maybe Text -> V1Container)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"tty")
      Parser
  (Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount] -> Maybe Text -> V1Container)
-> Parser (Maybe [V1VolumeDevice])
-> Parser (Maybe [V1VolumeMount] -> Maybe Text -> V1Container)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1VolumeDevice])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"volumeDevices")
      Parser (Maybe [V1VolumeMount] -> Maybe Text -> V1Container)
-> Parser (Maybe [V1VolumeMount])
-> Parser (Maybe Text -> V1Container)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1VolumeMount])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"volumeMounts")
      Parser (Maybe Text -> V1Container)
-> Parser (Maybe Text) -> Parser V1Container
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"workingDir")

-- | ToJSON V1Container
instance A.ToJSON V1Container where
  toJSON :: V1Container -> Value
toJSON V1Container {Maybe Bool
Maybe [Text]
Maybe [V1VolumeMount]
Maybe [V1VolumeDevice]
Maybe [V1EnvVar]
Maybe [V1EnvFromSource]
Maybe [V1ContainerResizePolicy]
Maybe [V1ContainerPort]
Maybe Text
Maybe V1SecurityContext
Maybe V1ResourceRequirements
Maybe V1Probe
Maybe V1Lifecycle
Text
$sel:v1ContainerArgs:V1Container :: V1Container -> Maybe [Text]
$sel:v1ContainerCommand:V1Container :: V1Container -> Maybe [Text]
$sel:v1ContainerEnv:V1Container :: V1Container -> Maybe [V1EnvVar]
$sel:v1ContainerEnvFrom:V1Container :: V1Container -> Maybe [V1EnvFromSource]
$sel:v1ContainerImage:V1Container :: V1Container -> Maybe Text
$sel:v1ContainerImagePullPolicy:V1Container :: V1Container -> Maybe Text
$sel:v1ContainerLifecycle:V1Container :: V1Container -> Maybe V1Lifecycle
$sel:v1ContainerLivenessProbe:V1Container :: V1Container -> Maybe V1Probe
$sel:v1ContainerName:V1Container :: V1Container -> Text
$sel:v1ContainerPorts:V1Container :: V1Container -> Maybe [V1ContainerPort]
$sel:v1ContainerReadinessProbe:V1Container :: V1Container -> Maybe V1Probe
$sel:v1ContainerResizePolicy:V1Container :: V1Container -> Maybe [V1ContainerResizePolicy]
$sel:v1ContainerResources:V1Container :: V1Container -> Maybe V1ResourceRequirements
$sel:v1ContainerRestartPolicy:V1Container :: V1Container -> Maybe Text
$sel:v1ContainerSecurityContext:V1Container :: V1Container -> Maybe V1SecurityContext
$sel:v1ContainerStartupProbe:V1Container :: V1Container -> Maybe V1Probe
$sel:v1ContainerStdin:V1Container :: V1Container -> Maybe Bool
$sel:v1ContainerStdinOnce:V1Container :: V1Container -> Maybe Bool
$sel:v1ContainerTerminationMessagePath:V1Container :: V1Container -> Maybe Text
$sel:v1ContainerTerminationMessagePolicy:V1Container :: V1Container -> Maybe Text
$sel:v1ContainerTty:V1Container :: V1Container -> Maybe Bool
$sel:v1ContainerVolumeDevices:V1Container :: V1Container -> Maybe [V1VolumeDevice]
$sel:v1ContainerVolumeMounts:V1Container :: V1Container -> Maybe [V1VolumeMount]
$sel:v1ContainerWorkingDir:V1Container :: V1Container -> Maybe Text
v1ContainerArgs :: Maybe [Text]
v1ContainerCommand :: Maybe [Text]
v1ContainerEnv :: Maybe [V1EnvVar]
v1ContainerEnvFrom :: Maybe [V1EnvFromSource]
v1ContainerImage :: Maybe Text
v1ContainerImagePullPolicy :: Maybe Text
v1ContainerLifecycle :: Maybe V1Lifecycle
v1ContainerLivenessProbe :: Maybe V1Probe
v1ContainerName :: Text
v1ContainerPorts :: Maybe [V1ContainerPort]
v1ContainerReadinessProbe :: Maybe V1Probe
v1ContainerResizePolicy :: Maybe [V1ContainerResizePolicy]
v1ContainerResources :: Maybe V1ResourceRequirements
v1ContainerRestartPolicy :: Maybe Text
v1ContainerSecurityContext :: Maybe V1SecurityContext
v1ContainerStartupProbe :: Maybe V1Probe
v1ContainerStdin :: Maybe Bool
v1ContainerStdinOnce :: Maybe Bool
v1ContainerTerminationMessagePath :: Maybe Text
v1ContainerTerminationMessagePolicy :: Maybe Text
v1ContainerTty :: Maybe Bool
v1ContainerVolumeDevices :: Maybe [V1VolumeDevice]
v1ContainerVolumeMounts :: Maybe [V1VolumeMount]
v1ContainerWorkingDir :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"args" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1ContainerArgs
      , Key
"command" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1ContainerCommand
      , Key
"env" Key -> Maybe [V1EnvVar] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1EnvVar]
v1ContainerEnv
      , Key
"envFrom" Key -> Maybe [V1EnvFromSource] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1EnvFromSource]
v1ContainerEnvFrom
      , Key
"image" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ContainerImage
      , Key
"imagePullPolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ContainerImagePullPolicy
      , Key
"lifecycle" Key -> Maybe V1Lifecycle -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1Lifecycle
v1ContainerLifecycle
      , Key
"livenessProbe" Key -> Maybe V1Probe -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1Probe
v1ContainerLivenessProbe
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ContainerName
      , Key
"ports" Key -> Maybe [V1ContainerPort] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1ContainerPort]
v1ContainerPorts
      , Key
"readinessProbe" Key -> Maybe V1Probe -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1Probe
v1ContainerReadinessProbe
      , Key
"resizePolicy" Key -> Maybe [V1ContainerResizePolicy] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1ContainerResizePolicy]
v1ContainerResizePolicy
      , Key
"resources" Key -> Maybe V1ResourceRequirements -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ResourceRequirements
v1ContainerResources
      , Key
"restartPolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ContainerRestartPolicy
      , Key
"securityContext" Key -> Maybe V1SecurityContext -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1SecurityContext
v1ContainerSecurityContext
      , Key
"startupProbe" Key -> Maybe V1Probe -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1Probe
v1ContainerStartupProbe
      , Key
"stdin" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1ContainerStdin
      , Key
"stdinOnce" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1ContainerStdinOnce
      , Key
"terminationMessagePath" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ContainerTerminationMessagePath
      , Key
"terminationMessagePolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ContainerTerminationMessagePolicy
      , Key
"tty" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1ContainerTty
      , Key
"volumeDevices" Key -> Maybe [V1VolumeDevice] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1VolumeDevice]
v1ContainerVolumeDevices
      , Key
"volumeMounts" Key -> Maybe [V1VolumeMount] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1VolumeMount]
v1ContainerVolumeMounts
      , Key
"workingDir" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ContainerWorkingDir
      ]


-- | Construct a value of type 'V1Container' (by applying it's required fields, if any)
mkV1Container
  :: Text -- ^ 'v1ContainerName': Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.
  -> V1Container
mkV1Container :: Text -> V1Container
mkV1Container Text
v1ContainerName =
  V1Container
  { $sel:v1ContainerArgs:V1Container :: Maybe [Text]
v1ContainerArgs = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1ContainerCommand:V1Container :: Maybe [Text]
v1ContainerCommand = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1ContainerEnv:V1Container :: Maybe [V1EnvVar]
v1ContainerEnv = Maybe [V1EnvVar]
forall a. Maybe a
Nothing
  , $sel:v1ContainerEnvFrom:V1Container :: Maybe [V1EnvFromSource]
v1ContainerEnvFrom = Maybe [V1EnvFromSource]
forall a. Maybe a
Nothing
  , $sel:v1ContainerImage:V1Container :: Maybe Text
v1ContainerImage = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ContainerImagePullPolicy:V1Container :: Maybe Text
v1ContainerImagePullPolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ContainerLifecycle:V1Container :: Maybe V1Lifecycle
v1ContainerLifecycle = Maybe V1Lifecycle
forall a. Maybe a
Nothing
  , $sel:v1ContainerLivenessProbe:V1Container :: Maybe V1Probe
v1ContainerLivenessProbe = Maybe V1Probe
forall a. Maybe a
Nothing
  , Text
$sel:v1ContainerName:V1Container :: Text
v1ContainerName :: Text
v1ContainerName
  , $sel:v1ContainerPorts:V1Container :: Maybe [V1ContainerPort]
v1ContainerPorts = Maybe [V1ContainerPort]
forall a. Maybe a
Nothing
  , $sel:v1ContainerReadinessProbe:V1Container :: Maybe V1Probe
v1ContainerReadinessProbe = Maybe V1Probe
forall a. Maybe a
Nothing
  , $sel:v1ContainerResizePolicy:V1Container :: Maybe [V1ContainerResizePolicy]
v1ContainerResizePolicy = Maybe [V1ContainerResizePolicy]
forall a. Maybe a
Nothing
  , $sel:v1ContainerResources:V1Container :: Maybe V1ResourceRequirements
v1ContainerResources = Maybe V1ResourceRequirements
forall a. Maybe a
Nothing
  , $sel:v1ContainerRestartPolicy:V1Container :: Maybe Text
v1ContainerRestartPolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ContainerSecurityContext:V1Container :: Maybe V1SecurityContext
v1ContainerSecurityContext = Maybe V1SecurityContext
forall a. Maybe a
Nothing
  , $sel:v1ContainerStartupProbe:V1Container :: Maybe V1Probe
v1ContainerStartupProbe = Maybe V1Probe
forall a. Maybe a
Nothing
  , $sel:v1ContainerStdin:V1Container :: Maybe Bool
v1ContainerStdin = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1ContainerStdinOnce:V1Container :: Maybe Bool
v1ContainerStdinOnce = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1ContainerTerminationMessagePath:V1Container :: Maybe Text
v1ContainerTerminationMessagePath = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ContainerTerminationMessagePolicy:V1Container :: Maybe Text
v1ContainerTerminationMessagePolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ContainerTty:V1Container :: Maybe Bool
v1ContainerTty = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1ContainerVolumeDevices:V1Container :: Maybe [V1VolumeDevice]
v1ContainerVolumeDevices = Maybe [V1VolumeDevice]
forall a. Maybe a
Nothing
  , $sel:v1ContainerVolumeMounts:V1Container :: Maybe [V1VolumeMount]
v1ContainerVolumeMounts = Maybe [V1VolumeMount]
forall a. Maybe a
Nothing
  , $sel:v1ContainerWorkingDir:V1Container :: Maybe Text
v1ContainerWorkingDir = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1ContainerImage
-- | V1ContainerImage
-- Describe a container image
data V1ContainerImage = V1ContainerImage
  { V1ContainerImage -> Maybe [Text]
v1ContainerImageNames :: !(Maybe [Text]) -- ^ "names" - Names by which this image is known. e.g. [\&quot;kubernetes.example/hyperkube:v1.0.7\&quot;, \&quot;cloud-vendor.registry.example/cloud-vendor/hyperkube:v1.0.7\&quot;]
  , V1ContainerImage -> Maybe Integer
v1ContainerImageSizeBytes :: !(Maybe Integer) -- ^ "sizeBytes" - The size of the image in bytes.
  } deriving (Int -> V1ContainerImage -> ShowS
[V1ContainerImage] -> ShowS
V1ContainerImage -> String
(Int -> V1ContainerImage -> ShowS)
-> (V1ContainerImage -> String)
-> ([V1ContainerImage] -> ShowS)
-> Show V1ContainerImage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ContainerImage -> ShowS
showsPrec :: Int -> V1ContainerImage -> ShowS
$cshow :: V1ContainerImage -> String
show :: V1ContainerImage -> String
$cshowList :: [V1ContainerImage] -> ShowS
showList :: [V1ContainerImage] -> ShowS
P.Show, V1ContainerImage -> V1ContainerImage -> Bool
(V1ContainerImage -> V1ContainerImage -> Bool)
-> (V1ContainerImage -> V1ContainerImage -> Bool)
-> Eq V1ContainerImage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ContainerImage -> V1ContainerImage -> Bool
== :: V1ContainerImage -> V1ContainerImage -> Bool
$c/= :: V1ContainerImage -> V1ContainerImage -> Bool
/= :: V1ContainerImage -> V1ContainerImage -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ContainerImage
instance A.FromJSON V1ContainerImage where
  parseJSON :: Value -> Parser V1ContainerImage
parseJSON = String
-> (Object -> Parser V1ContainerImage)
-> Value
-> Parser V1ContainerImage
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ContainerImage" ((Object -> Parser V1ContainerImage)
 -> Value -> Parser V1ContainerImage)
-> (Object -> Parser V1ContainerImage)
-> Value
-> Parser V1ContainerImage
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [Text] -> Maybe Integer -> V1ContainerImage
V1ContainerImage
      (Maybe [Text] -> Maybe Integer -> V1ContainerImage)
-> Parser (Maybe [Text])
-> Parser (Maybe Integer -> V1ContainerImage)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"names")
      Parser (Maybe Integer -> V1ContainerImage)
-> Parser (Maybe Integer) -> Parser V1ContainerImage
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"sizeBytes")

-- | ToJSON V1ContainerImage
instance A.ToJSON V1ContainerImage where
  toJSON :: V1ContainerImage -> Value
toJSON V1ContainerImage {Maybe Integer
Maybe [Text]
$sel:v1ContainerImageNames:V1ContainerImage :: V1ContainerImage -> Maybe [Text]
$sel:v1ContainerImageSizeBytes:V1ContainerImage :: V1ContainerImage -> Maybe Integer
v1ContainerImageNames :: Maybe [Text]
v1ContainerImageSizeBytes :: Maybe Integer
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"names" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1ContainerImageNames
      , Key
"sizeBytes" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1ContainerImageSizeBytes
      ]


-- | Construct a value of type 'V1ContainerImage' (by applying it's required fields, if any)
mkV1ContainerImage
  :: V1ContainerImage
mkV1ContainerImage :: V1ContainerImage
mkV1ContainerImage =
  V1ContainerImage
  { $sel:v1ContainerImageNames:V1ContainerImage :: Maybe [Text]
v1ContainerImageNames = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1ContainerImageSizeBytes:V1ContainerImage :: Maybe Integer
v1ContainerImageSizeBytes = Maybe Integer
forall a. Maybe a
Nothing
  }

-- ** V1ContainerPort
-- | V1ContainerPort
-- ContainerPort represents a network port in a single container.
data V1ContainerPort = V1ContainerPort
  { V1ContainerPort -> Int
v1ContainerPortContainerPort :: !(Int) -- ^ /Required/ "containerPort" - Number of port to expose on the pod&#39;s IP address. This must be a valid port number, 0 &lt; x &lt; 65536.
  , V1ContainerPort -> Maybe Text
v1ContainerPortHostIp :: !(Maybe Text) -- ^ "hostIP" - What host IP to bind the external port to.
  , V1ContainerPort -> Maybe Int
v1ContainerPortHostPort :: !(Maybe Int) -- ^ "hostPort" - Number of port to expose on the host. If specified, this must be a valid port number, 0 &lt; x &lt; 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.
  , V1ContainerPort -> Maybe Text
v1ContainerPortName :: !(Maybe Text) -- ^ "name" - If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.
  , V1ContainerPort -> Maybe Text
v1ContainerPortProtocol :: !(Maybe Text) -- ^ "protocol" - Protocol for port. Must be UDP, TCP, or SCTP. Defaults to \&quot;TCP\&quot;.
  } deriving (Int -> V1ContainerPort -> ShowS
[V1ContainerPort] -> ShowS
V1ContainerPort -> String
(Int -> V1ContainerPort -> ShowS)
-> (V1ContainerPort -> String)
-> ([V1ContainerPort] -> ShowS)
-> Show V1ContainerPort
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ContainerPort -> ShowS
showsPrec :: Int -> V1ContainerPort -> ShowS
$cshow :: V1ContainerPort -> String
show :: V1ContainerPort -> String
$cshowList :: [V1ContainerPort] -> ShowS
showList :: [V1ContainerPort] -> ShowS
P.Show, V1ContainerPort -> V1ContainerPort -> Bool
(V1ContainerPort -> V1ContainerPort -> Bool)
-> (V1ContainerPort -> V1ContainerPort -> Bool)
-> Eq V1ContainerPort
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ContainerPort -> V1ContainerPort -> Bool
== :: V1ContainerPort -> V1ContainerPort -> Bool
$c/= :: V1ContainerPort -> V1ContainerPort -> Bool
/= :: V1ContainerPort -> V1ContainerPort -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ContainerPort
instance A.FromJSON V1ContainerPort where
  parseJSON :: Value -> Parser V1ContainerPort
parseJSON = String
-> (Object -> Parser V1ContainerPort)
-> Value
-> Parser V1ContainerPort
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ContainerPort" ((Object -> Parser V1ContainerPort)
 -> Value -> Parser V1ContainerPort)
-> (Object -> Parser V1ContainerPort)
-> Value
-> Parser V1ContainerPort
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> V1ContainerPort
V1ContainerPort
      (Int
 -> Maybe Text
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> V1ContainerPort)
-> Parser Int
-> Parser
     (Maybe Text
      -> Maybe Int -> Maybe Text -> Maybe Text -> V1ContainerPort)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"containerPort")
      Parser
  (Maybe Text
   -> Maybe Int -> Maybe Text -> Maybe Text -> V1ContainerPort)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int -> Maybe Text -> Maybe Text -> V1ContainerPort)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"hostIP")
      Parser (Maybe Int -> Maybe Text -> Maybe Text -> V1ContainerPort)
-> Parser (Maybe Int)
-> Parser (Maybe Text -> Maybe Text -> V1ContainerPort)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"hostPort")
      Parser (Maybe Text -> Maybe Text -> V1ContainerPort)
-> Parser (Maybe Text) -> Parser (Maybe Text -> V1ContainerPort)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"name")
      Parser (Maybe Text -> V1ContainerPort)
-> Parser (Maybe Text) -> Parser V1ContainerPort
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"protocol")

-- | ToJSON V1ContainerPort
instance A.ToJSON V1ContainerPort where
  toJSON :: V1ContainerPort -> Value
toJSON V1ContainerPort {Int
Maybe Int
Maybe Text
$sel:v1ContainerPortContainerPort:V1ContainerPort :: V1ContainerPort -> Int
$sel:v1ContainerPortHostIp:V1ContainerPort :: V1ContainerPort -> Maybe Text
$sel:v1ContainerPortHostPort:V1ContainerPort :: V1ContainerPort -> Maybe Int
$sel:v1ContainerPortName:V1ContainerPort :: V1ContainerPort -> Maybe Text
$sel:v1ContainerPortProtocol:V1ContainerPort :: V1ContainerPort -> Maybe Text
v1ContainerPortContainerPort :: Int
v1ContainerPortHostIp :: Maybe Text
v1ContainerPortHostPort :: Maybe Int
v1ContainerPortName :: Maybe Text
v1ContainerPortProtocol :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"containerPort" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v1ContainerPortContainerPort
      , Key
"hostIP" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ContainerPortHostIp
      , Key
"hostPort" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1ContainerPortHostPort
      , Key
"name" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ContainerPortName
      , Key
"protocol" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ContainerPortProtocol
      ]


-- | Construct a value of type 'V1ContainerPort' (by applying it's required fields, if any)
mkV1ContainerPort
  :: Int -- ^ 'v1ContainerPortContainerPort': Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536.
  -> V1ContainerPort
mkV1ContainerPort :: Int -> V1ContainerPort
mkV1ContainerPort Int
v1ContainerPortContainerPort =
  V1ContainerPort
  { Int
$sel:v1ContainerPortContainerPort:V1ContainerPort :: Int
v1ContainerPortContainerPort :: Int
v1ContainerPortContainerPort
  , $sel:v1ContainerPortHostIp:V1ContainerPort :: Maybe Text
v1ContainerPortHostIp = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ContainerPortHostPort:V1ContainerPort :: Maybe Int
v1ContainerPortHostPort = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1ContainerPortName:V1ContainerPort :: Maybe Text
v1ContainerPortName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ContainerPortProtocol:V1ContainerPort :: Maybe Text
v1ContainerPortProtocol = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1ContainerResizePolicy
-- | V1ContainerResizePolicy
-- ContainerResizePolicy represents resource resize policy for the container.
data V1ContainerResizePolicy = V1ContainerResizePolicy
  { V1ContainerResizePolicy -> Text
v1ContainerResizePolicyResourceName :: !(Text) -- ^ /Required/ "resourceName" - Name of the resource to which this resource resize policy applies. Supported values: cpu, memory.
  , V1ContainerResizePolicy -> Text
v1ContainerResizePolicyRestartPolicy :: !(Text) -- ^ /Required/ "restartPolicy" - Restart policy to apply when specified resource is resized. If not specified, it defaults to NotRequired.
  } deriving (Int -> V1ContainerResizePolicy -> ShowS
[V1ContainerResizePolicy] -> ShowS
V1ContainerResizePolicy -> String
(Int -> V1ContainerResizePolicy -> ShowS)
-> (V1ContainerResizePolicy -> String)
-> ([V1ContainerResizePolicy] -> ShowS)
-> Show V1ContainerResizePolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ContainerResizePolicy -> ShowS
showsPrec :: Int -> V1ContainerResizePolicy -> ShowS
$cshow :: V1ContainerResizePolicy -> String
show :: V1ContainerResizePolicy -> String
$cshowList :: [V1ContainerResizePolicy] -> ShowS
showList :: [V1ContainerResizePolicy] -> ShowS
P.Show, V1ContainerResizePolicy -> V1ContainerResizePolicy -> Bool
(V1ContainerResizePolicy -> V1ContainerResizePolicy -> Bool)
-> (V1ContainerResizePolicy -> V1ContainerResizePolicy -> Bool)
-> Eq V1ContainerResizePolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ContainerResizePolicy -> V1ContainerResizePolicy -> Bool
== :: V1ContainerResizePolicy -> V1ContainerResizePolicy -> Bool
$c/= :: V1ContainerResizePolicy -> V1ContainerResizePolicy -> Bool
/= :: V1ContainerResizePolicy -> V1ContainerResizePolicy -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ContainerResizePolicy
instance A.FromJSON V1ContainerResizePolicy where
  parseJSON :: Value -> Parser V1ContainerResizePolicy
parseJSON = String
-> (Object -> Parser V1ContainerResizePolicy)
-> Value
-> Parser V1ContainerResizePolicy
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ContainerResizePolicy" ((Object -> Parser V1ContainerResizePolicy)
 -> Value -> Parser V1ContainerResizePolicy)
-> (Object -> Parser V1ContainerResizePolicy)
-> Value
-> Parser V1ContainerResizePolicy
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Text -> V1ContainerResizePolicy
V1ContainerResizePolicy
      (Text -> Text -> V1ContainerResizePolicy)
-> Parser Text -> Parser (Text -> V1ContainerResizePolicy)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"resourceName")
      Parser (Text -> V1ContainerResizePolicy)
-> Parser Text -> Parser V1ContainerResizePolicy
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"restartPolicy")

-- | ToJSON V1ContainerResizePolicy
instance A.ToJSON V1ContainerResizePolicy where
  toJSON :: V1ContainerResizePolicy -> Value
toJSON V1ContainerResizePolicy {Text
$sel:v1ContainerResizePolicyResourceName:V1ContainerResizePolicy :: V1ContainerResizePolicy -> Text
$sel:v1ContainerResizePolicyRestartPolicy:V1ContainerResizePolicy :: V1ContainerResizePolicy -> Text
v1ContainerResizePolicyResourceName :: Text
v1ContainerResizePolicyRestartPolicy :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"resourceName" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ContainerResizePolicyResourceName
      , Key
"restartPolicy" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ContainerResizePolicyRestartPolicy
      ]


-- | Construct a value of type 'V1ContainerResizePolicy' (by applying it's required fields, if any)
mkV1ContainerResizePolicy
  :: Text -- ^ 'v1ContainerResizePolicyResourceName': Name of the resource to which this resource resize policy applies. Supported values: cpu, memory.
  -> Text -- ^ 'v1ContainerResizePolicyRestartPolicy': Restart policy to apply when specified resource is resized. If not specified, it defaults to NotRequired.
  -> V1ContainerResizePolicy
mkV1ContainerResizePolicy :: Text -> Text -> V1ContainerResizePolicy
mkV1ContainerResizePolicy Text
v1ContainerResizePolicyResourceName Text
v1ContainerResizePolicyRestartPolicy =
  V1ContainerResizePolicy
  { Text
$sel:v1ContainerResizePolicyResourceName:V1ContainerResizePolicy :: Text
v1ContainerResizePolicyResourceName :: Text
v1ContainerResizePolicyResourceName
  , Text
$sel:v1ContainerResizePolicyRestartPolicy:V1ContainerResizePolicy :: Text
v1ContainerResizePolicyRestartPolicy :: Text
v1ContainerResizePolicyRestartPolicy
  }

-- ** V1ContainerState
-- | V1ContainerState
-- ContainerState holds a possible state of container. Only one of its members may be specified. If none of them is specified, the default one is ContainerStateWaiting.
data V1ContainerState = V1ContainerState
  { V1ContainerState -> Maybe V1ContainerStateRunning
v1ContainerStateRunning :: !(Maybe V1ContainerStateRunning) -- ^ "running"
  , V1ContainerState -> Maybe V1ContainerStateTerminated
v1ContainerStateTerminated :: !(Maybe V1ContainerStateTerminated) -- ^ "terminated"
  , V1ContainerState -> Maybe V1ContainerStateWaiting
v1ContainerStateWaiting :: !(Maybe V1ContainerStateWaiting) -- ^ "waiting"
  } deriving (Int -> V1ContainerState -> ShowS
[V1ContainerState] -> ShowS
V1ContainerState -> String
(Int -> V1ContainerState -> ShowS)
-> (V1ContainerState -> String)
-> ([V1ContainerState] -> ShowS)
-> Show V1ContainerState
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ContainerState -> ShowS
showsPrec :: Int -> V1ContainerState -> ShowS
$cshow :: V1ContainerState -> String
show :: V1ContainerState -> String
$cshowList :: [V1ContainerState] -> ShowS
showList :: [V1ContainerState] -> ShowS
P.Show, V1ContainerState -> V1ContainerState -> Bool
(V1ContainerState -> V1ContainerState -> Bool)
-> (V1ContainerState -> V1ContainerState -> Bool)
-> Eq V1ContainerState
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ContainerState -> V1ContainerState -> Bool
== :: V1ContainerState -> V1ContainerState -> Bool
$c/= :: V1ContainerState -> V1ContainerState -> Bool
/= :: V1ContainerState -> V1ContainerState -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ContainerState
instance A.FromJSON V1ContainerState where
  parseJSON :: Value -> Parser V1ContainerState
parseJSON = String
-> (Object -> Parser V1ContainerState)
-> Value
-> Parser V1ContainerState
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ContainerState" ((Object -> Parser V1ContainerState)
 -> Value -> Parser V1ContainerState)
-> (Object -> Parser V1ContainerState)
-> Value
-> Parser V1ContainerState
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1ContainerStateRunning
-> Maybe V1ContainerStateTerminated
-> Maybe V1ContainerStateWaiting
-> V1ContainerState
V1ContainerState
      (Maybe V1ContainerStateRunning
 -> Maybe V1ContainerStateTerminated
 -> Maybe V1ContainerStateWaiting
 -> V1ContainerState)
-> Parser (Maybe V1ContainerStateRunning)
-> Parser
     (Maybe V1ContainerStateTerminated
      -> Maybe V1ContainerStateWaiting -> V1ContainerState)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1ContainerStateRunning)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"running")
      Parser
  (Maybe V1ContainerStateTerminated
   -> Maybe V1ContainerStateWaiting -> V1ContainerState)
-> Parser (Maybe V1ContainerStateTerminated)
-> Parser (Maybe V1ContainerStateWaiting -> V1ContainerState)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ContainerStateTerminated)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"terminated")
      Parser (Maybe V1ContainerStateWaiting -> V1ContainerState)
-> Parser (Maybe V1ContainerStateWaiting)
-> Parser V1ContainerState
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ContainerStateWaiting)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"waiting")

-- | ToJSON V1ContainerState
instance A.ToJSON V1ContainerState where
  toJSON :: V1ContainerState -> Value
toJSON V1ContainerState {Maybe V1ContainerStateWaiting
Maybe V1ContainerStateTerminated
Maybe V1ContainerStateRunning
$sel:v1ContainerStateRunning:V1ContainerState :: V1ContainerState -> Maybe V1ContainerStateRunning
$sel:v1ContainerStateTerminated:V1ContainerState :: V1ContainerState -> Maybe V1ContainerStateTerminated
$sel:v1ContainerStateWaiting:V1ContainerState :: V1ContainerState -> Maybe V1ContainerStateWaiting
v1ContainerStateRunning :: Maybe V1ContainerStateRunning
v1ContainerStateTerminated :: Maybe V1ContainerStateTerminated
v1ContainerStateWaiting :: Maybe V1ContainerStateWaiting
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"running" Key -> Maybe V1ContainerStateRunning -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ContainerStateRunning
v1ContainerStateRunning
      , Key
"terminated" Key -> Maybe V1ContainerStateTerminated -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ContainerStateTerminated
v1ContainerStateTerminated
      , Key
"waiting" Key -> Maybe V1ContainerStateWaiting -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ContainerStateWaiting
v1ContainerStateWaiting
      ]


-- | Construct a value of type 'V1ContainerState' (by applying it's required fields, if any)
mkV1ContainerState
  :: V1ContainerState
mkV1ContainerState :: V1ContainerState
mkV1ContainerState =
  V1ContainerState
  { $sel:v1ContainerStateRunning:V1ContainerState :: Maybe V1ContainerStateRunning
v1ContainerStateRunning = Maybe V1ContainerStateRunning
forall a. Maybe a
Nothing
  , $sel:v1ContainerStateTerminated:V1ContainerState :: Maybe V1ContainerStateTerminated
v1ContainerStateTerminated = Maybe V1ContainerStateTerminated
forall a. Maybe a
Nothing
  , $sel:v1ContainerStateWaiting:V1ContainerState :: Maybe V1ContainerStateWaiting
v1ContainerStateWaiting = Maybe V1ContainerStateWaiting
forall a. Maybe a
Nothing
  }

-- ** V1ContainerStateRunning
-- | V1ContainerStateRunning
-- ContainerStateRunning is a running state of a container.
data V1ContainerStateRunning = V1ContainerStateRunning
  { V1ContainerStateRunning -> Maybe DateTime
v1ContainerStateRunningStartedAt :: !(Maybe DateTime) -- ^ "startedAt" - Time at which the container was last (re-)started
  } deriving (Int -> V1ContainerStateRunning -> ShowS
[V1ContainerStateRunning] -> ShowS
V1ContainerStateRunning -> String
(Int -> V1ContainerStateRunning -> ShowS)
-> (V1ContainerStateRunning -> String)
-> ([V1ContainerStateRunning] -> ShowS)
-> Show V1ContainerStateRunning
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ContainerStateRunning -> ShowS
showsPrec :: Int -> V1ContainerStateRunning -> ShowS
$cshow :: V1ContainerStateRunning -> String
show :: V1ContainerStateRunning -> String
$cshowList :: [V1ContainerStateRunning] -> ShowS
showList :: [V1ContainerStateRunning] -> ShowS
P.Show, V1ContainerStateRunning -> V1ContainerStateRunning -> Bool
(V1ContainerStateRunning -> V1ContainerStateRunning -> Bool)
-> (V1ContainerStateRunning -> V1ContainerStateRunning -> Bool)
-> Eq V1ContainerStateRunning
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ContainerStateRunning -> V1ContainerStateRunning -> Bool
== :: V1ContainerStateRunning -> V1ContainerStateRunning -> Bool
$c/= :: V1ContainerStateRunning -> V1ContainerStateRunning -> Bool
/= :: V1ContainerStateRunning -> V1ContainerStateRunning -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ContainerStateRunning
instance A.FromJSON V1ContainerStateRunning where
  parseJSON :: Value -> Parser V1ContainerStateRunning
parseJSON = String
-> (Object -> Parser V1ContainerStateRunning)
-> Value
-> Parser V1ContainerStateRunning
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ContainerStateRunning" ((Object -> Parser V1ContainerStateRunning)
 -> Value -> Parser V1ContainerStateRunning)
-> (Object -> Parser V1ContainerStateRunning)
-> Value
-> Parser V1ContainerStateRunning
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe DateTime -> V1ContainerStateRunning
V1ContainerStateRunning
      (Maybe DateTime -> V1ContainerStateRunning)
-> Parser (Maybe DateTime) -> Parser V1ContainerStateRunning
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"startedAt")

-- | ToJSON V1ContainerStateRunning
instance A.ToJSON V1ContainerStateRunning where
  toJSON :: V1ContainerStateRunning -> Value
toJSON V1ContainerStateRunning {Maybe DateTime
$sel:v1ContainerStateRunningStartedAt:V1ContainerStateRunning :: V1ContainerStateRunning -> Maybe DateTime
v1ContainerStateRunningStartedAt :: Maybe DateTime
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"startedAt" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1ContainerStateRunningStartedAt
      ]


-- | Construct a value of type 'V1ContainerStateRunning' (by applying it's required fields, if any)
mkV1ContainerStateRunning
  :: V1ContainerStateRunning
mkV1ContainerStateRunning :: V1ContainerStateRunning
mkV1ContainerStateRunning =
  V1ContainerStateRunning
  { $sel:v1ContainerStateRunningStartedAt:V1ContainerStateRunning :: Maybe DateTime
v1ContainerStateRunningStartedAt = Maybe DateTime
forall a. Maybe a
Nothing
  }

-- ** V1ContainerStateTerminated
-- | V1ContainerStateTerminated
-- ContainerStateTerminated is a terminated state of a container.
data V1ContainerStateTerminated = V1ContainerStateTerminated
  { V1ContainerStateTerminated -> Maybe Text
v1ContainerStateTerminatedContainerId :: !(Maybe Text) -- ^ "containerID" - Container&#39;s ID in the format &#39;&lt;type&gt;://&lt;container_id&gt;&#39;
  , V1ContainerStateTerminated -> Int
v1ContainerStateTerminatedExitCode :: !(Int) -- ^ /Required/ "exitCode" - Exit status from the last termination of the container
  , V1ContainerStateTerminated -> Maybe DateTime
v1ContainerStateTerminatedFinishedAt :: !(Maybe DateTime) -- ^ "finishedAt" - Time at which the container last terminated
  , V1ContainerStateTerminated -> Maybe Text
v1ContainerStateTerminatedMessage :: !(Maybe Text) -- ^ "message" - Message regarding the last termination of the container
  , V1ContainerStateTerminated -> Maybe Text
v1ContainerStateTerminatedReason :: !(Maybe Text) -- ^ "reason" - (brief) reason from the last termination of the container
  , V1ContainerStateTerminated -> Maybe Int
v1ContainerStateTerminatedSignal :: !(Maybe Int) -- ^ "signal" - Signal from the last termination of the container
  , V1ContainerStateTerminated -> Maybe DateTime
v1ContainerStateTerminatedStartedAt :: !(Maybe DateTime) -- ^ "startedAt" - Time at which previous execution of the container started
  } deriving (Int -> V1ContainerStateTerminated -> ShowS
[V1ContainerStateTerminated] -> ShowS
V1ContainerStateTerminated -> String
(Int -> V1ContainerStateTerminated -> ShowS)
-> (V1ContainerStateTerminated -> String)
-> ([V1ContainerStateTerminated] -> ShowS)
-> Show V1ContainerStateTerminated
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ContainerStateTerminated -> ShowS
showsPrec :: Int -> V1ContainerStateTerminated -> ShowS
$cshow :: V1ContainerStateTerminated -> String
show :: V1ContainerStateTerminated -> String
$cshowList :: [V1ContainerStateTerminated] -> ShowS
showList :: [V1ContainerStateTerminated] -> ShowS
P.Show, V1ContainerStateTerminated -> V1ContainerStateTerminated -> Bool
(V1ContainerStateTerminated -> V1ContainerStateTerminated -> Bool)
-> (V1ContainerStateTerminated
    -> V1ContainerStateTerminated -> Bool)
-> Eq V1ContainerStateTerminated
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ContainerStateTerminated -> V1ContainerStateTerminated -> Bool
== :: V1ContainerStateTerminated -> V1ContainerStateTerminated -> Bool
$c/= :: V1ContainerStateTerminated -> V1ContainerStateTerminated -> Bool
/= :: V1ContainerStateTerminated -> V1ContainerStateTerminated -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ContainerStateTerminated
instance A.FromJSON V1ContainerStateTerminated where
  parseJSON :: Value -> Parser V1ContainerStateTerminated
parseJSON = String
-> (Object -> Parser V1ContainerStateTerminated)
-> Value
-> Parser V1ContainerStateTerminated
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ContainerStateTerminated" ((Object -> Parser V1ContainerStateTerminated)
 -> Value -> Parser V1ContainerStateTerminated)
-> (Object -> Parser V1ContainerStateTerminated)
-> Value
-> Parser V1ContainerStateTerminated
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Int
-> Maybe DateTime
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe DateTime
-> V1ContainerStateTerminated
V1ContainerStateTerminated
      (Maybe Text
 -> Int
 -> Maybe DateTime
 -> Maybe Text
 -> Maybe Text
 -> Maybe Int
 -> Maybe DateTime
 -> V1ContainerStateTerminated)
-> Parser (Maybe Text)
-> Parser
     (Int
      -> Maybe DateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe DateTime
      -> V1ContainerStateTerminated)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"containerID")
      Parser
  (Int
   -> Maybe DateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe DateTime
   -> V1ContainerStateTerminated)
-> Parser Int
-> Parser
     (Maybe DateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe DateTime
      -> V1ContainerStateTerminated)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"exitCode")
      Parser
  (Maybe DateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe DateTime
   -> V1ContainerStateTerminated)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe DateTime
      -> V1ContainerStateTerminated)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"finishedAt")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe DateTime
   -> V1ContainerStateTerminated)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Int -> Maybe DateTime -> V1ContainerStateTerminated)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"message")
      Parser
  (Maybe Text
   -> Maybe Int -> Maybe DateTime -> V1ContainerStateTerminated)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int -> Maybe DateTime -> V1ContainerStateTerminated)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reason")
      Parser (Maybe Int -> Maybe DateTime -> V1ContainerStateTerminated)
-> Parser (Maybe Int)
-> Parser (Maybe DateTime -> V1ContainerStateTerminated)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"signal")
      Parser (Maybe DateTime -> V1ContainerStateTerminated)
-> Parser (Maybe DateTime) -> Parser V1ContainerStateTerminated
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"startedAt")

-- | ToJSON V1ContainerStateTerminated
instance A.ToJSON V1ContainerStateTerminated where
  toJSON :: V1ContainerStateTerminated -> Value
toJSON V1ContainerStateTerminated {Int
Maybe Int
Maybe Text
Maybe DateTime
$sel:v1ContainerStateTerminatedContainerId:V1ContainerStateTerminated :: V1ContainerStateTerminated -> Maybe Text
$sel:v1ContainerStateTerminatedExitCode:V1ContainerStateTerminated :: V1ContainerStateTerminated -> Int
$sel:v1ContainerStateTerminatedFinishedAt:V1ContainerStateTerminated :: V1ContainerStateTerminated -> Maybe DateTime
$sel:v1ContainerStateTerminatedMessage:V1ContainerStateTerminated :: V1ContainerStateTerminated -> Maybe Text
$sel:v1ContainerStateTerminatedReason:V1ContainerStateTerminated :: V1ContainerStateTerminated -> Maybe Text
$sel:v1ContainerStateTerminatedSignal:V1ContainerStateTerminated :: V1ContainerStateTerminated -> Maybe Int
$sel:v1ContainerStateTerminatedStartedAt:V1ContainerStateTerminated :: V1ContainerStateTerminated -> Maybe DateTime
v1ContainerStateTerminatedContainerId :: Maybe Text
v1ContainerStateTerminatedExitCode :: Int
v1ContainerStateTerminatedFinishedAt :: Maybe DateTime
v1ContainerStateTerminatedMessage :: Maybe Text
v1ContainerStateTerminatedReason :: Maybe Text
v1ContainerStateTerminatedSignal :: Maybe Int
v1ContainerStateTerminatedStartedAt :: Maybe DateTime
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"containerID" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ContainerStateTerminatedContainerId
      , Key
"exitCode" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v1ContainerStateTerminatedExitCode
      , Key
"finishedAt" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1ContainerStateTerminatedFinishedAt
      , Key
"message" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ContainerStateTerminatedMessage
      , Key
"reason" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ContainerStateTerminatedReason
      , Key
"signal" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1ContainerStateTerminatedSignal
      , Key
"startedAt" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1ContainerStateTerminatedStartedAt
      ]


-- | Construct a value of type 'V1ContainerStateTerminated' (by applying it's required fields, if any)
mkV1ContainerStateTerminated
  :: Int -- ^ 'v1ContainerStateTerminatedExitCode': Exit status from the last termination of the container
  -> V1ContainerStateTerminated
mkV1ContainerStateTerminated :: Int -> V1ContainerStateTerminated
mkV1ContainerStateTerminated Int
v1ContainerStateTerminatedExitCode =
  V1ContainerStateTerminated
  { $sel:v1ContainerStateTerminatedContainerId:V1ContainerStateTerminated :: Maybe Text
v1ContainerStateTerminatedContainerId = Maybe Text
forall a. Maybe a
Nothing
  , Int
$sel:v1ContainerStateTerminatedExitCode:V1ContainerStateTerminated :: Int
v1ContainerStateTerminatedExitCode :: Int
v1ContainerStateTerminatedExitCode
  , $sel:v1ContainerStateTerminatedFinishedAt:V1ContainerStateTerminated :: Maybe DateTime
v1ContainerStateTerminatedFinishedAt = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1ContainerStateTerminatedMessage:V1ContainerStateTerminated :: Maybe Text
v1ContainerStateTerminatedMessage = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ContainerStateTerminatedReason:V1ContainerStateTerminated :: Maybe Text
v1ContainerStateTerminatedReason = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ContainerStateTerminatedSignal:V1ContainerStateTerminated :: Maybe Int
v1ContainerStateTerminatedSignal = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1ContainerStateTerminatedStartedAt:V1ContainerStateTerminated :: Maybe DateTime
v1ContainerStateTerminatedStartedAt = Maybe DateTime
forall a. Maybe a
Nothing
  }

-- ** V1ContainerStateWaiting
-- | V1ContainerStateWaiting
-- ContainerStateWaiting is a waiting state of a container.
data V1ContainerStateWaiting = V1ContainerStateWaiting
  { V1ContainerStateWaiting -> Maybe Text
v1ContainerStateWaitingMessage :: !(Maybe Text) -- ^ "message" - Message regarding why the container is not yet running.
  , V1ContainerStateWaiting -> Maybe Text
v1ContainerStateWaitingReason :: !(Maybe Text) -- ^ "reason" - (brief) reason the container is not yet running.
  } deriving (Int -> V1ContainerStateWaiting -> ShowS
[V1ContainerStateWaiting] -> ShowS
V1ContainerStateWaiting -> String
(Int -> V1ContainerStateWaiting -> ShowS)
-> (V1ContainerStateWaiting -> String)
-> ([V1ContainerStateWaiting] -> ShowS)
-> Show V1ContainerStateWaiting
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ContainerStateWaiting -> ShowS
showsPrec :: Int -> V1ContainerStateWaiting -> ShowS
$cshow :: V1ContainerStateWaiting -> String
show :: V1ContainerStateWaiting -> String
$cshowList :: [V1ContainerStateWaiting] -> ShowS
showList :: [V1ContainerStateWaiting] -> ShowS
P.Show, V1ContainerStateWaiting -> V1ContainerStateWaiting -> Bool
(V1ContainerStateWaiting -> V1ContainerStateWaiting -> Bool)
-> (V1ContainerStateWaiting -> V1ContainerStateWaiting -> Bool)
-> Eq V1ContainerStateWaiting
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ContainerStateWaiting -> V1ContainerStateWaiting -> Bool
== :: V1ContainerStateWaiting -> V1ContainerStateWaiting -> Bool
$c/= :: V1ContainerStateWaiting -> V1ContainerStateWaiting -> Bool
/= :: V1ContainerStateWaiting -> V1ContainerStateWaiting -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ContainerStateWaiting
instance A.FromJSON V1ContainerStateWaiting where
  parseJSON :: Value -> Parser V1ContainerStateWaiting
parseJSON = String
-> (Object -> Parser V1ContainerStateWaiting)
-> Value
-> Parser V1ContainerStateWaiting
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ContainerStateWaiting" ((Object -> Parser V1ContainerStateWaiting)
 -> Value -> Parser V1ContainerStateWaiting)
-> (Object -> Parser V1ContainerStateWaiting)
-> Value
-> Parser V1ContainerStateWaiting
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Maybe Text -> V1ContainerStateWaiting
V1ContainerStateWaiting
      (Maybe Text -> Maybe Text -> V1ContainerStateWaiting)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> V1ContainerStateWaiting)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"message")
      Parser (Maybe Text -> V1ContainerStateWaiting)
-> Parser (Maybe Text) -> Parser V1ContainerStateWaiting
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reason")

-- | ToJSON V1ContainerStateWaiting
instance A.ToJSON V1ContainerStateWaiting where
  toJSON :: V1ContainerStateWaiting -> Value
toJSON V1ContainerStateWaiting {Maybe Text
$sel:v1ContainerStateWaitingMessage:V1ContainerStateWaiting :: V1ContainerStateWaiting -> Maybe Text
$sel:v1ContainerStateWaitingReason:V1ContainerStateWaiting :: V1ContainerStateWaiting -> Maybe Text
v1ContainerStateWaitingMessage :: Maybe Text
v1ContainerStateWaitingReason :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"message" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ContainerStateWaitingMessage
      , Key
"reason" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ContainerStateWaitingReason
      ]


-- | Construct a value of type 'V1ContainerStateWaiting' (by applying it's required fields, if any)
mkV1ContainerStateWaiting
  :: V1ContainerStateWaiting
mkV1ContainerStateWaiting :: V1ContainerStateWaiting
mkV1ContainerStateWaiting =
  V1ContainerStateWaiting
  { $sel:v1ContainerStateWaitingMessage:V1ContainerStateWaiting :: Maybe Text
v1ContainerStateWaitingMessage = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ContainerStateWaitingReason:V1ContainerStateWaiting :: Maybe Text
v1ContainerStateWaitingReason = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1ContainerStatus
-- | V1ContainerStatus
-- ContainerStatus contains details for the current status of this container.
data V1ContainerStatus = V1ContainerStatus
  { V1ContainerStatus -> Maybe (Map String Quantity)
v1ContainerStatusAllocatedResources :: !(Maybe (Map.Map String Quantity)) -- ^ "allocatedResources" - AllocatedResources represents the compute resources allocated for this container by the node. Kubelet sets this value to Container.Resources.Requests upon successful pod admission and after successfully admitting desired pod resize.
  , V1ContainerStatus -> Maybe [V1ResourceStatus]
v1ContainerStatusAllocatedResourcesStatus :: !(Maybe [V1ResourceStatus]) -- ^ "allocatedResourcesStatus" - AllocatedResourcesStatus represents the status of various resources allocated for this Pod.
  , V1ContainerStatus -> Maybe Text
v1ContainerStatusContainerId :: !(Maybe Text) -- ^ "containerID" - ContainerID is the ID of the container in the format &#39;&lt;type&gt;://&lt;container_id&gt;&#39;. Where type is a container runtime identifier, returned from Version call of CRI API (for example \&quot;containerd\&quot;).
  , V1ContainerStatus -> Text
v1ContainerStatusImage :: !(Text) -- ^ /Required/ "image" - Image is the name of container image that the container is running. The container image may not match the image used in the PodSpec, as it may have been resolved by the runtime. More info: https://kubernetes.io/docs/concepts/containers/images.
  , V1ContainerStatus -> Text
v1ContainerStatusImageId :: !(Text) -- ^ /Required/ "imageID" - ImageID is the image ID of the container&#39;s image. The image ID may not match the image ID of the image used in the PodSpec, as it may have been resolved by the runtime.
  , V1ContainerStatus -> Maybe V1ContainerState
v1ContainerStatusLastState :: !(Maybe V1ContainerState) -- ^ "lastState"
  , V1ContainerStatus -> Text
v1ContainerStatusName :: !(Text) -- ^ /Required/ "name" - Name is a DNS_LABEL representing the unique name of the container. Each container in a pod must have a unique name across all container types. Cannot be updated.
  , V1ContainerStatus -> Bool
v1ContainerStatusReady :: !(Bool) -- ^ /Required/ "ready" - Ready specifies whether the container is currently passing its readiness check. The value will change as readiness probes keep executing. If no readiness probes are specified, this field defaults to true once the container is fully started (see Started field).  The value is typically used to determine whether a container is ready to accept traffic.
  , V1ContainerStatus -> Maybe V1ResourceRequirements
v1ContainerStatusResources :: !(Maybe V1ResourceRequirements) -- ^ "resources"
  , V1ContainerStatus -> Int
v1ContainerStatusRestartCount :: !(Int) -- ^ /Required/ "restartCount" - RestartCount holds the number of times the container has been restarted. Kubelet makes an effort to always increment the value, but there are cases when the state may be lost due to node restarts and then the value may be reset to 0. The value is never negative.
  , V1ContainerStatus -> Maybe Bool
v1ContainerStatusStarted :: !(Maybe Bool) -- ^ "started" - Started indicates whether the container has finished its postStart lifecycle hook and passed its startup probe. Initialized as false, becomes true after startupProbe is considered successful. Resets to false when the container is restarted, or if kubelet loses state temporarily. In both cases, startup probes will run again. Is always true when no startupProbe is defined and container is running and has passed the postStart lifecycle hook. The null value must be treated the same as false.
  , V1ContainerStatus -> Maybe V1ContainerState
v1ContainerStatusState :: !(Maybe V1ContainerState) -- ^ "state"
  , V1ContainerStatus -> Maybe V1ContainerUser
v1ContainerStatusUser :: !(Maybe V1ContainerUser) -- ^ "user"
  , V1ContainerStatus -> Maybe [V1VolumeMountStatus]
v1ContainerStatusVolumeMounts :: !(Maybe [V1VolumeMountStatus]) -- ^ "volumeMounts" - Status of volume mounts.
  } deriving (Int -> V1ContainerStatus -> ShowS
[V1ContainerStatus] -> ShowS
V1ContainerStatus -> String
(Int -> V1ContainerStatus -> ShowS)
-> (V1ContainerStatus -> String)
-> ([V1ContainerStatus] -> ShowS)
-> Show V1ContainerStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ContainerStatus -> ShowS
showsPrec :: Int -> V1ContainerStatus -> ShowS
$cshow :: V1ContainerStatus -> String
show :: V1ContainerStatus -> String
$cshowList :: [V1ContainerStatus] -> ShowS
showList :: [V1ContainerStatus] -> ShowS
P.Show, V1ContainerStatus -> V1ContainerStatus -> Bool
(V1ContainerStatus -> V1ContainerStatus -> Bool)
-> (V1ContainerStatus -> V1ContainerStatus -> Bool)
-> Eq V1ContainerStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ContainerStatus -> V1ContainerStatus -> Bool
== :: V1ContainerStatus -> V1ContainerStatus -> Bool
$c/= :: V1ContainerStatus -> V1ContainerStatus -> Bool
/= :: V1ContainerStatus -> V1ContainerStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ContainerStatus
instance A.FromJSON V1ContainerStatus where
  parseJSON :: Value -> Parser V1ContainerStatus
parseJSON = String
-> (Object -> Parser V1ContainerStatus)
-> Value
-> Parser V1ContainerStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ContainerStatus" ((Object -> Parser V1ContainerStatus)
 -> Value -> Parser V1ContainerStatus)
-> (Object -> Parser V1ContainerStatus)
-> Value
-> Parser V1ContainerStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe (Map String Quantity)
-> Maybe [V1ResourceStatus]
-> Maybe Text
-> Text
-> Text
-> Maybe V1ContainerState
-> Text
-> Bool
-> Maybe V1ResourceRequirements
-> Int
-> Maybe Bool
-> Maybe V1ContainerState
-> Maybe V1ContainerUser
-> Maybe [V1VolumeMountStatus]
-> V1ContainerStatus
V1ContainerStatus
      (Maybe (Map String Quantity)
 -> Maybe [V1ResourceStatus]
 -> Maybe Text
 -> Text
 -> Text
 -> Maybe V1ContainerState
 -> Text
 -> Bool
 -> Maybe V1ResourceRequirements
 -> Int
 -> Maybe Bool
 -> Maybe V1ContainerState
 -> Maybe V1ContainerUser
 -> Maybe [V1VolumeMountStatus]
 -> V1ContainerStatus)
-> Parser (Maybe (Map String Quantity))
-> Parser
     (Maybe [V1ResourceStatus]
      -> Maybe Text
      -> Text
      -> Text
      -> Maybe V1ContainerState
      -> Text
      -> Bool
      -> Maybe V1ResourceRequirements
      -> Int
      -> Maybe Bool
      -> Maybe V1ContainerState
      -> Maybe V1ContainerUser
      -> Maybe [V1VolumeMountStatus]
      -> V1ContainerStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe (Map String Quantity))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"allocatedResources")
      Parser
  (Maybe [V1ResourceStatus]
   -> Maybe Text
   -> Text
   -> Text
   -> Maybe V1ContainerState
   -> Text
   -> Bool
   -> Maybe V1ResourceRequirements
   -> Int
   -> Maybe Bool
   -> Maybe V1ContainerState
   -> Maybe V1ContainerUser
   -> Maybe [V1VolumeMountStatus]
   -> V1ContainerStatus)
-> Parser (Maybe [V1ResourceStatus])
-> Parser
     (Maybe Text
      -> Text
      -> Text
      -> Maybe V1ContainerState
      -> Text
      -> Bool
      -> Maybe V1ResourceRequirements
      -> Int
      -> Maybe Bool
      -> Maybe V1ContainerState
      -> Maybe V1ContainerUser
      -> Maybe [V1VolumeMountStatus]
      -> V1ContainerStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1ResourceStatus])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"allocatedResourcesStatus")
      Parser
  (Maybe Text
   -> Text
   -> Text
   -> Maybe V1ContainerState
   -> Text
   -> Bool
   -> Maybe V1ResourceRequirements
   -> Int
   -> Maybe Bool
   -> Maybe V1ContainerState
   -> Maybe V1ContainerUser
   -> Maybe [V1VolumeMountStatus]
   -> V1ContainerStatus)
-> Parser (Maybe Text)
-> Parser
     (Text
      -> Text
      -> Maybe V1ContainerState
      -> Text
      -> Bool
      -> Maybe V1ResourceRequirements
      -> Int
      -> Maybe Bool
      -> Maybe V1ContainerState
      -> Maybe V1ContainerUser
      -> Maybe [V1VolumeMountStatus]
      -> V1ContainerStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"containerID")
      Parser
  (Text
   -> Text
   -> Maybe V1ContainerState
   -> Text
   -> Bool
   -> Maybe V1ResourceRequirements
   -> Int
   -> Maybe Bool
   -> Maybe V1ContainerState
   -> Maybe V1ContainerUser
   -> Maybe [V1VolumeMountStatus]
   -> V1ContainerStatus)
-> Parser Text
-> Parser
     (Text
      -> Maybe V1ContainerState
      -> Text
      -> Bool
      -> Maybe V1ResourceRequirements
      -> Int
      -> Maybe Bool
      -> Maybe V1ContainerState
      -> Maybe V1ContainerUser
      -> Maybe [V1VolumeMountStatus]
      -> V1ContainerStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"image")
      Parser
  (Text
   -> Maybe V1ContainerState
   -> Text
   -> Bool
   -> Maybe V1ResourceRequirements
   -> Int
   -> Maybe Bool
   -> Maybe V1ContainerState
   -> Maybe V1ContainerUser
   -> Maybe [V1VolumeMountStatus]
   -> V1ContainerStatus)
-> Parser Text
-> Parser
     (Maybe V1ContainerState
      -> Text
      -> Bool
      -> Maybe V1ResourceRequirements
      -> Int
      -> Maybe Bool
      -> Maybe V1ContainerState
      -> Maybe V1ContainerUser
      -> Maybe [V1VolumeMountStatus]
      -> V1ContainerStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"imageID")
      Parser
  (Maybe V1ContainerState
   -> Text
   -> Bool
   -> Maybe V1ResourceRequirements
   -> Int
   -> Maybe Bool
   -> Maybe V1ContainerState
   -> Maybe V1ContainerUser
   -> Maybe [V1VolumeMountStatus]
   -> V1ContainerStatus)
-> Parser (Maybe V1ContainerState)
-> Parser
     (Text
      -> Bool
      -> Maybe V1ResourceRequirements
      -> Int
      -> Maybe Bool
      -> Maybe V1ContainerState
      -> Maybe V1ContainerUser
      -> Maybe [V1VolumeMountStatus]
      -> V1ContainerStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ContainerState)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lastState")
      Parser
  (Text
   -> Bool
   -> Maybe V1ResourceRequirements
   -> Int
   -> Maybe Bool
   -> Maybe V1ContainerState
   -> Maybe V1ContainerUser
   -> Maybe [V1VolumeMountStatus]
   -> V1ContainerStatus)
-> Parser Text
-> Parser
     (Bool
      -> Maybe V1ResourceRequirements
      -> Int
      -> Maybe Bool
      -> Maybe V1ContainerState
      -> Maybe V1ContainerUser
      -> Maybe [V1VolumeMountStatus]
      -> V1ContainerStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser
  (Bool
   -> Maybe V1ResourceRequirements
   -> Int
   -> Maybe Bool
   -> Maybe V1ContainerState
   -> Maybe V1ContainerUser
   -> Maybe [V1VolumeMountStatus]
   -> V1ContainerStatus)
-> Parser Bool
-> Parser
     (Maybe V1ResourceRequirements
      -> Int
      -> Maybe Bool
      -> Maybe V1ContainerState
      -> Maybe V1ContainerUser
      -> Maybe [V1VolumeMountStatus]
      -> V1ContainerStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Bool
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"ready")
      Parser
  (Maybe V1ResourceRequirements
   -> Int
   -> Maybe Bool
   -> Maybe V1ContainerState
   -> Maybe V1ContainerUser
   -> Maybe [V1VolumeMountStatus]
   -> V1ContainerStatus)
-> Parser (Maybe V1ResourceRequirements)
-> Parser
     (Int
      -> Maybe Bool
      -> Maybe V1ContainerState
      -> Maybe V1ContainerUser
      -> Maybe [V1VolumeMountStatus]
      -> V1ContainerStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ResourceRequirements)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resources")
      Parser
  (Int
   -> Maybe Bool
   -> Maybe V1ContainerState
   -> Maybe V1ContainerUser
   -> Maybe [V1VolumeMountStatus]
   -> V1ContainerStatus)
-> Parser Int
-> Parser
     (Maybe Bool
      -> Maybe V1ContainerState
      -> Maybe V1ContainerUser
      -> Maybe [V1VolumeMountStatus]
      -> V1ContainerStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"restartCount")
      Parser
  (Maybe Bool
   -> Maybe V1ContainerState
   -> Maybe V1ContainerUser
   -> Maybe [V1VolumeMountStatus]
   -> V1ContainerStatus)
-> Parser (Maybe Bool)
-> Parser
     (Maybe V1ContainerState
      -> Maybe V1ContainerUser
      -> Maybe [V1VolumeMountStatus]
      -> V1ContainerStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"started")
      Parser
  (Maybe V1ContainerState
   -> Maybe V1ContainerUser
   -> Maybe [V1VolumeMountStatus]
   -> V1ContainerStatus)
-> Parser (Maybe V1ContainerState)
-> Parser
     (Maybe V1ContainerUser
      -> Maybe [V1VolumeMountStatus] -> V1ContainerStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ContainerState)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"state")
      Parser
  (Maybe V1ContainerUser
   -> Maybe [V1VolumeMountStatus] -> V1ContainerStatus)
-> Parser (Maybe V1ContainerUser)
-> Parser (Maybe [V1VolumeMountStatus] -> V1ContainerStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ContainerUser)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"user")
      Parser (Maybe [V1VolumeMountStatus] -> V1ContainerStatus)
-> Parser (Maybe [V1VolumeMountStatus]) -> Parser V1ContainerStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1VolumeMountStatus])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"volumeMounts")

-- | ToJSON V1ContainerStatus
instance A.ToJSON V1ContainerStatus where
  toJSON :: V1ContainerStatus -> Value
toJSON V1ContainerStatus {Bool
Int
Maybe Bool
Maybe [V1VolumeMountStatus]
Maybe [V1ResourceStatus]
Maybe (Map String Quantity)
Maybe Text
Maybe V1ResourceRequirements
Maybe V1ContainerUser
Maybe V1ContainerState
Text
$sel:v1ContainerStatusAllocatedResources:V1ContainerStatus :: V1ContainerStatus -> Maybe (Map String Quantity)
$sel:v1ContainerStatusAllocatedResourcesStatus:V1ContainerStatus :: V1ContainerStatus -> Maybe [V1ResourceStatus]
$sel:v1ContainerStatusContainerId:V1ContainerStatus :: V1ContainerStatus -> Maybe Text
$sel:v1ContainerStatusImage:V1ContainerStatus :: V1ContainerStatus -> Text
$sel:v1ContainerStatusImageId:V1ContainerStatus :: V1ContainerStatus -> Text
$sel:v1ContainerStatusLastState:V1ContainerStatus :: V1ContainerStatus -> Maybe V1ContainerState
$sel:v1ContainerStatusName:V1ContainerStatus :: V1ContainerStatus -> Text
$sel:v1ContainerStatusReady:V1ContainerStatus :: V1ContainerStatus -> Bool
$sel:v1ContainerStatusResources:V1ContainerStatus :: V1ContainerStatus -> Maybe V1ResourceRequirements
$sel:v1ContainerStatusRestartCount:V1ContainerStatus :: V1ContainerStatus -> Int
$sel:v1ContainerStatusStarted:V1ContainerStatus :: V1ContainerStatus -> Maybe Bool
$sel:v1ContainerStatusState:V1ContainerStatus :: V1ContainerStatus -> Maybe V1ContainerState
$sel:v1ContainerStatusUser:V1ContainerStatus :: V1ContainerStatus -> Maybe V1ContainerUser
$sel:v1ContainerStatusVolumeMounts:V1ContainerStatus :: V1ContainerStatus -> Maybe [V1VolumeMountStatus]
v1ContainerStatusAllocatedResources :: Maybe (Map String Quantity)
v1ContainerStatusAllocatedResourcesStatus :: Maybe [V1ResourceStatus]
v1ContainerStatusContainerId :: Maybe Text
v1ContainerStatusImage :: Text
v1ContainerStatusImageId :: Text
v1ContainerStatusLastState :: Maybe V1ContainerState
v1ContainerStatusName :: Text
v1ContainerStatusReady :: Bool
v1ContainerStatusResources :: Maybe V1ResourceRequirements
v1ContainerStatusRestartCount :: Int
v1ContainerStatusStarted :: Maybe Bool
v1ContainerStatusState :: Maybe V1ContainerState
v1ContainerStatusUser :: Maybe V1ContainerUser
v1ContainerStatusVolumeMounts :: Maybe [V1VolumeMountStatus]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"allocatedResources" Key -> Maybe (Map String Quantity) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Quantity)
v1ContainerStatusAllocatedResources
      , Key
"allocatedResourcesStatus" Key -> Maybe [V1ResourceStatus] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1ResourceStatus]
v1ContainerStatusAllocatedResourcesStatus
      , Key
"containerID" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ContainerStatusContainerId
      , Key
"image" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ContainerStatusImage
      , Key
"imageID" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ContainerStatusImageId
      , Key
"lastState" Key -> Maybe V1ContainerState -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ContainerState
v1ContainerStatusLastState
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ContainerStatusName
      , Key
"ready" Key -> Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Bool
v1ContainerStatusReady
      , Key
"resources" Key -> Maybe V1ResourceRequirements -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ResourceRequirements
v1ContainerStatusResources
      , Key
"restartCount" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v1ContainerStatusRestartCount
      , Key
"started" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1ContainerStatusStarted
      , Key
"state" Key -> Maybe V1ContainerState -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ContainerState
v1ContainerStatusState
      , Key
"user" Key -> Maybe V1ContainerUser -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ContainerUser
v1ContainerStatusUser
      , Key
"volumeMounts" Key -> Maybe [V1VolumeMountStatus] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1VolumeMountStatus]
v1ContainerStatusVolumeMounts
      ]


-- | Construct a value of type 'V1ContainerStatus' (by applying it's required fields, if any)
mkV1ContainerStatus
  :: Text -- ^ 'v1ContainerStatusImage': Image is the name of container image that the container is running. The container image may not match the image used in the PodSpec, as it may have been resolved by the runtime. More info: https://kubernetes.io/docs/concepts/containers/images.
  -> Text -- ^ 'v1ContainerStatusImageId': ImageID is the image ID of the container's image. The image ID may not match the image ID of the image used in the PodSpec, as it may have been resolved by the runtime.
  -> Text -- ^ 'v1ContainerStatusName': Name is a DNS_LABEL representing the unique name of the container. Each container in a pod must have a unique name across all container types. Cannot be updated.
  -> Bool -- ^ 'v1ContainerStatusReady': Ready specifies whether the container is currently passing its readiness check. The value will change as readiness probes keep executing. If no readiness probes are specified, this field defaults to true once the container is fully started (see Started field).  The value is typically used to determine whether a container is ready to accept traffic.
  -> Int -- ^ 'v1ContainerStatusRestartCount': RestartCount holds the number of times the container has been restarted. Kubelet makes an effort to always increment the value, but there are cases when the state may be lost due to node restarts and then the value may be reset to 0. The value is never negative.
  -> V1ContainerStatus
mkV1ContainerStatus :: Text -> Text -> Text -> Bool -> Int -> V1ContainerStatus
mkV1ContainerStatus Text
v1ContainerStatusImage Text
v1ContainerStatusImageId Text
v1ContainerStatusName Bool
v1ContainerStatusReady Int
v1ContainerStatusRestartCount =
  V1ContainerStatus
  { $sel:v1ContainerStatusAllocatedResources:V1ContainerStatus :: Maybe (Map String Quantity)
v1ContainerStatusAllocatedResources = Maybe (Map String Quantity)
forall a. Maybe a
Nothing
  , $sel:v1ContainerStatusAllocatedResourcesStatus:V1ContainerStatus :: Maybe [V1ResourceStatus]
v1ContainerStatusAllocatedResourcesStatus = Maybe [V1ResourceStatus]
forall a. Maybe a
Nothing
  , $sel:v1ContainerStatusContainerId:V1ContainerStatus :: Maybe Text
v1ContainerStatusContainerId = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1ContainerStatusImage:V1ContainerStatus :: Text
v1ContainerStatusImage :: Text
v1ContainerStatusImage
  , Text
$sel:v1ContainerStatusImageId:V1ContainerStatus :: Text
v1ContainerStatusImageId :: Text
v1ContainerStatusImageId
  , $sel:v1ContainerStatusLastState:V1ContainerStatus :: Maybe V1ContainerState
v1ContainerStatusLastState = Maybe V1ContainerState
forall a. Maybe a
Nothing
  , Text
$sel:v1ContainerStatusName:V1ContainerStatus :: Text
v1ContainerStatusName :: Text
v1ContainerStatusName
  , Bool
$sel:v1ContainerStatusReady:V1ContainerStatus :: Bool
v1ContainerStatusReady :: Bool
v1ContainerStatusReady
  , $sel:v1ContainerStatusResources:V1ContainerStatus :: Maybe V1ResourceRequirements
v1ContainerStatusResources = Maybe V1ResourceRequirements
forall a. Maybe a
Nothing
  , Int
$sel:v1ContainerStatusRestartCount:V1ContainerStatus :: Int
v1ContainerStatusRestartCount :: Int
v1ContainerStatusRestartCount
  , $sel:v1ContainerStatusStarted:V1ContainerStatus :: Maybe Bool
v1ContainerStatusStarted = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1ContainerStatusState:V1ContainerStatus :: Maybe V1ContainerState
v1ContainerStatusState = Maybe V1ContainerState
forall a. Maybe a
Nothing
  , $sel:v1ContainerStatusUser:V1ContainerStatus :: Maybe V1ContainerUser
v1ContainerStatusUser = Maybe V1ContainerUser
forall a. Maybe a
Nothing
  , $sel:v1ContainerStatusVolumeMounts:V1ContainerStatus :: Maybe [V1VolumeMountStatus]
v1ContainerStatusVolumeMounts = Maybe [V1VolumeMountStatus]
forall a. Maybe a
Nothing
  }

-- ** V1ContainerUser
-- | V1ContainerUser
-- ContainerUser represents user identity information
data V1ContainerUser = V1ContainerUser
  { V1ContainerUser -> Maybe V1LinuxContainerUser
v1ContainerUserLinux :: !(Maybe V1LinuxContainerUser) -- ^ "linux"
  } deriving (Int -> V1ContainerUser -> ShowS
[V1ContainerUser] -> ShowS
V1ContainerUser -> String
(Int -> V1ContainerUser -> ShowS)
-> (V1ContainerUser -> String)
-> ([V1ContainerUser] -> ShowS)
-> Show V1ContainerUser
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ContainerUser -> ShowS
showsPrec :: Int -> V1ContainerUser -> ShowS
$cshow :: V1ContainerUser -> String
show :: V1ContainerUser -> String
$cshowList :: [V1ContainerUser] -> ShowS
showList :: [V1ContainerUser] -> ShowS
P.Show, V1ContainerUser -> V1ContainerUser -> Bool
(V1ContainerUser -> V1ContainerUser -> Bool)
-> (V1ContainerUser -> V1ContainerUser -> Bool)
-> Eq V1ContainerUser
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ContainerUser -> V1ContainerUser -> Bool
== :: V1ContainerUser -> V1ContainerUser -> Bool
$c/= :: V1ContainerUser -> V1ContainerUser -> Bool
/= :: V1ContainerUser -> V1ContainerUser -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ContainerUser
instance A.FromJSON V1ContainerUser where
  parseJSON :: Value -> Parser V1ContainerUser
parseJSON = String
-> (Object -> Parser V1ContainerUser)
-> Value
-> Parser V1ContainerUser
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ContainerUser" ((Object -> Parser V1ContainerUser)
 -> Value -> Parser V1ContainerUser)
-> (Object -> Parser V1ContainerUser)
-> Value
-> Parser V1ContainerUser
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1LinuxContainerUser -> V1ContainerUser
V1ContainerUser
      (Maybe V1LinuxContainerUser -> V1ContainerUser)
-> Parser (Maybe V1LinuxContainerUser) -> Parser V1ContainerUser
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1LinuxContainerUser)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"linux")

-- | ToJSON V1ContainerUser
instance A.ToJSON V1ContainerUser where
  toJSON :: V1ContainerUser -> Value
toJSON V1ContainerUser {Maybe V1LinuxContainerUser
$sel:v1ContainerUserLinux:V1ContainerUser :: V1ContainerUser -> Maybe V1LinuxContainerUser
v1ContainerUserLinux :: Maybe V1LinuxContainerUser
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"linux" Key -> Maybe V1LinuxContainerUser -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LinuxContainerUser
v1ContainerUserLinux
      ]


-- | Construct a value of type 'V1ContainerUser' (by applying it's required fields, if any)
mkV1ContainerUser
  :: V1ContainerUser
mkV1ContainerUser :: V1ContainerUser
mkV1ContainerUser =
  V1ContainerUser
  { $sel:v1ContainerUserLinux:V1ContainerUser :: Maybe V1LinuxContainerUser
v1ContainerUserLinux = Maybe V1LinuxContainerUser
forall a. Maybe a
Nothing
  }

-- ** V1ControllerRevision
-- | V1ControllerRevision
-- ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.
data V1ControllerRevision = V1ControllerRevision
  { V1ControllerRevision -> Maybe Text
v1ControllerRevisionApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1ControllerRevision -> Maybe Value
v1ControllerRevisionData :: !(Maybe A.Value) -- ^ "data" - Data is the serialized representation of the state.
  , V1ControllerRevision -> Maybe Text
v1ControllerRevisionKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1ControllerRevision -> Maybe V1ObjectMeta
v1ControllerRevisionMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1ControllerRevision -> Integer
v1ControllerRevisionRevision :: !(Integer) -- ^ /Required/ "revision" - Revision indicates the revision of the state represented by Data.
  } deriving (Int -> V1ControllerRevision -> ShowS
[V1ControllerRevision] -> ShowS
V1ControllerRevision -> String
(Int -> V1ControllerRevision -> ShowS)
-> (V1ControllerRevision -> String)
-> ([V1ControllerRevision] -> ShowS)
-> Show V1ControllerRevision
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ControllerRevision -> ShowS
showsPrec :: Int -> V1ControllerRevision -> ShowS
$cshow :: V1ControllerRevision -> String
show :: V1ControllerRevision -> String
$cshowList :: [V1ControllerRevision] -> ShowS
showList :: [V1ControllerRevision] -> ShowS
P.Show, V1ControllerRevision -> V1ControllerRevision -> Bool
(V1ControllerRevision -> V1ControllerRevision -> Bool)
-> (V1ControllerRevision -> V1ControllerRevision -> Bool)
-> Eq V1ControllerRevision
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ControllerRevision -> V1ControllerRevision -> Bool
== :: V1ControllerRevision -> V1ControllerRevision -> Bool
$c/= :: V1ControllerRevision -> V1ControllerRevision -> Bool
/= :: V1ControllerRevision -> V1ControllerRevision -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ControllerRevision
instance A.FromJSON V1ControllerRevision where
  parseJSON :: Value -> Parser V1ControllerRevision
parseJSON = String
-> (Object -> Parser V1ControllerRevision)
-> Value
-> Parser V1ControllerRevision
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ControllerRevision" ((Object -> Parser V1ControllerRevision)
 -> Value -> Parser V1ControllerRevision)
-> (Object -> Parser V1ControllerRevision)
-> Value
-> Parser V1ControllerRevision
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe V1ObjectMeta
-> Integer
-> V1ControllerRevision
V1ControllerRevision
      (Maybe Text
 -> Maybe Value
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Integer
 -> V1ControllerRevision)
-> Parser (Maybe Text)
-> Parser
     (Maybe Value
      -> Maybe Text
      -> Maybe V1ObjectMeta
      -> Integer
      -> V1ControllerRevision)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Value
   -> Maybe Text
   -> Maybe V1ObjectMeta
   -> Integer
   -> V1ControllerRevision)
-> Parser (Maybe Value)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta -> Integer -> V1ControllerRevision)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Value)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"data")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta -> Integer -> V1ControllerRevision)
-> Parser (Maybe Text)
-> Parser (Maybe V1ObjectMeta -> Integer -> V1ControllerRevision)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ObjectMeta -> Integer -> V1ControllerRevision)
-> Parser (Maybe V1ObjectMeta)
-> Parser (Integer -> V1ControllerRevision)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (Integer -> V1ControllerRevision)
-> Parser Integer -> Parser V1ControllerRevision
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Integer
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"revision")

-- | ToJSON V1ControllerRevision
instance A.ToJSON V1ControllerRevision where
  toJSON :: V1ControllerRevision -> Value
toJSON V1ControllerRevision {Integer
Maybe Value
Maybe Text
Maybe V1ObjectMeta
$sel:v1ControllerRevisionApiVersion:V1ControllerRevision :: V1ControllerRevision -> Maybe Text
$sel:v1ControllerRevisionData:V1ControllerRevision :: V1ControllerRevision -> Maybe Value
$sel:v1ControllerRevisionKind:V1ControllerRevision :: V1ControllerRevision -> Maybe Text
$sel:v1ControllerRevisionMetadata:V1ControllerRevision :: V1ControllerRevision -> Maybe V1ObjectMeta
$sel:v1ControllerRevisionRevision:V1ControllerRevision :: V1ControllerRevision -> Integer
v1ControllerRevisionApiVersion :: Maybe Text
v1ControllerRevisionData :: Maybe Value
v1ControllerRevisionKind :: Maybe Text
v1ControllerRevisionMetadata :: Maybe V1ObjectMeta
v1ControllerRevisionRevision :: Integer
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ControllerRevisionApiVersion
      , Key
"data" Key -> Maybe Value -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Value
v1ControllerRevisionData
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ControllerRevisionKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1ControllerRevisionMetadata
      , Key
"revision" Key -> Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Integer
v1ControllerRevisionRevision
      ]


-- | Construct a value of type 'V1ControllerRevision' (by applying it's required fields, if any)
mkV1ControllerRevision
  :: Integer -- ^ 'v1ControllerRevisionRevision': Revision indicates the revision of the state represented by Data.
  -> V1ControllerRevision
mkV1ControllerRevision :: Integer -> V1ControllerRevision
mkV1ControllerRevision Integer
v1ControllerRevisionRevision =
  V1ControllerRevision
  { $sel:v1ControllerRevisionApiVersion:V1ControllerRevision :: Maybe Text
v1ControllerRevisionApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ControllerRevisionData:V1ControllerRevision :: Maybe Value
v1ControllerRevisionData = Maybe Value
forall a. Maybe a
Nothing
  , $sel:v1ControllerRevisionKind:V1ControllerRevision :: Maybe Text
v1ControllerRevisionKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ControllerRevisionMetadata:V1ControllerRevision :: Maybe V1ObjectMeta
v1ControllerRevisionMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , Integer
$sel:v1ControllerRevisionRevision:V1ControllerRevision :: Integer
v1ControllerRevisionRevision :: Integer
v1ControllerRevisionRevision
  }

-- ** V1ControllerRevisionList
-- | V1ControllerRevisionList
-- ControllerRevisionList is a resource containing a list of ControllerRevision objects.
data V1ControllerRevisionList = V1ControllerRevisionList
  { V1ControllerRevisionList -> Maybe Text
v1ControllerRevisionListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1ControllerRevisionList -> [V1ControllerRevision]
v1ControllerRevisionListItems :: !([V1ControllerRevision]) -- ^ /Required/ "items" - Items is the list of ControllerRevisions
  , V1ControllerRevisionList -> Maybe Text
v1ControllerRevisionListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1ControllerRevisionList -> Maybe V1ListMeta
v1ControllerRevisionListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1ControllerRevisionList -> ShowS
[V1ControllerRevisionList] -> ShowS
V1ControllerRevisionList -> String
(Int -> V1ControllerRevisionList -> ShowS)
-> (V1ControllerRevisionList -> String)
-> ([V1ControllerRevisionList] -> ShowS)
-> Show V1ControllerRevisionList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ControllerRevisionList -> ShowS
showsPrec :: Int -> V1ControllerRevisionList -> ShowS
$cshow :: V1ControllerRevisionList -> String
show :: V1ControllerRevisionList -> String
$cshowList :: [V1ControllerRevisionList] -> ShowS
showList :: [V1ControllerRevisionList] -> ShowS
P.Show, V1ControllerRevisionList -> V1ControllerRevisionList -> Bool
(V1ControllerRevisionList -> V1ControllerRevisionList -> Bool)
-> (V1ControllerRevisionList -> V1ControllerRevisionList -> Bool)
-> Eq V1ControllerRevisionList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ControllerRevisionList -> V1ControllerRevisionList -> Bool
== :: V1ControllerRevisionList -> V1ControllerRevisionList -> Bool
$c/= :: V1ControllerRevisionList -> V1ControllerRevisionList -> Bool
/= :: V1ControllerRevisionList -> V1ControllerRevisionList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ControllerRevisionList
instance A.FromJSON V1ControllerRevisionList where
  parseJSON :: Value -> Parser V1ControllerRevisionList
parseJSON = String
-> (Object -> Parser V1ControllerRevisionList)
-> Value
-> Parser V1ControllerRevisionList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ControllerRevisionList" ((Object -> Parser V1ControllerRevisionList)
 -> Value -> Parser V1ControllerRevisionList)
-> (Object -> Parser V1ControllerRevisionList)
-> Value
-> Parser V1ControllerRevisionList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1ControllerRevision]
-> Maybe Text
-> Maybe V1ListMeta
-> V1ControllerRevisionList
V1ControllerRevisionList
      (Maybe Text
 -> [V1ControllerRevision]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1ControllerRevisionList)
-> Parser (Maybe Text)
-> Parser
     ([V1ControllerRevision]
      -> Maybe Text -> Maybe V1ListMeta -> V1ControllerRevisionList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1ControllerRevision]
   -> Maybe Text -> Maybe V1ListMeta -> V1ControllerRevisionList)
-> Parser [V1ControllerRevision]
-> Parser
     (Maybe Text -> Maybe V1ListMeta -> V1ControllerRevisionList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1ControllerRevision]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1ControllerRevisionList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1ControllerRevisionList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1ControllerRevisionList)
-> Parser (Maybe V1ListMeta) -> Parser V1ControllerRevisionList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1ControllerRevisionList
instance A.ToJSON V1ControllerRevisionList where
  toJSON :: V1ControllerRevisionList -> Value
toJSON V1ControllerRevisionList {[V1ControllerRevision]
Maybe Text
Maybe V1ListMeta
$sel:v1ControllerRevisionListApiVersion:V1ControllerRevisionList :: V1ControllerRevisionList -> Maybe Text
$sel:v1ControllerRevisionListItems:V1ControllerRevisionList :: V1ControllerRevisionList -> [V1ControllerRevision]
$sel:v1ControllerRevisionListKind:V1ControllerRevisionList :: V1ControllerRevisionList -> Maybe Text
$sel:v1ControllerRevisionListMetadata:V1ControllerRevisionList :: V1ControllerRevisionList -> Maybe V1ListMeta
v1ControllerRevisionListApiVersion :: Maybe Text
v1ControllerRevisionListItems :: [V1ControllerRevision]
v1ControllerRevisionListKind :: Maybe Text
v1ControllerRevisionListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ControllerRevisionListApiVersion
      , Key
"items" Key -> [V1ControllerRevision] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1ControllerRevision]
v1ControllerRevisionListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ControllerRevisionListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1ControllerRevisionListMetadata
      ]


-- | Construct a value of type 'V1ControllerRevisionList' (by applying it's required fields, if any)
mkV1ControllerRevisionList
  :: [V1ControllerRevision] -- ^ 'v1ControllerRevisionListItems': Items is the list of ControllerRevisions
  -> V1ControllerRevisionList
mkV1ControllerRevisionList :: [V1ControllerRevision] -> V1ControllerRevisionList
mkV1ControllerRevisionList [V1ControllerRevision]
v1ControllerRevisionListItems =
  V1ControllerRevisionList
  { $sel:v1ControllerRevisionListApiVersion:V1ControllerRevisionList :: Maybe Text
v1ControllerRevisionListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1ControllerRevision]
$sel:v1ControllerRevisionListItems:V1ControllerRevisionList :: [V1ControllerRevision]
v1ControllerRevisionListItems :: [V1ControllerRevision]
v1ControllerRevisionListItems
  , $sel:v1ControllerRevisionListKind:V1ControllerRevisionList :: Maybe Text
v1ControllerRevisionListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ControllerRevisionListMetadata:V1ControllerRevisionList :: Maybe V1ListMeta
v1ControllerRevisionListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1CronJob
-- | V1CronJob
-- CronJob represents the configuration of a single cron job.
data V1CronJob = V1CronJob
  { V1CronJob -> Maybe Text
v1CronJobApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1CronJob -> Maybe Text
v1CronJobKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1CronJob -> Maybe V1ObjectMeta
v1CronJobMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1CronJob -> Maybe V1CronJobSpec
v1CronJobSpec :: !(Maybe V1CronJobSpec) -- ^ "spec"
  , V1CronJob -> Maybe V1CronJobStatus
v1CronJobStatus :: !(Maybe V1CronJobStatus) -- ^ "status"
  } deriving (Int -> V1CronJob -> ShowS
[V1CronJob] -> ShowS
V1CronJob -> String
(Int -> V1CronJob -> ShowS)
-> (V1CronJob -> String)
-> ([V1CronJob] -> ShowS)
-> Show V1CronJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CronJob -> ShowS
showsPrec :: Int -> V1CronJob -> ShowS
$cshow :: V1CronJob -> String
show :: V1CronJob -> String
$cshowList :: [V1CronJob] -> ShowS
showList :: [V1CronJob] -> ShowS
P.Show, V1CronJob -> V1CronJob -> Bool
(V1CronJob -> V1CronJob -> Bool)
-> (V1CronJob -> V1CronJob -> Bool) -> Eq V1CronJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CronJob -> V1CronJob -> Bool
== :: V1CronJob -> V1CronJob -> Bool
$c/= :: V1CronJob -> V1CronJob -> Bool
/= :: V1CronJob -> V1CronJob -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CronJob
instance A.FromJSON V1CronJob where
  parseJSON :: Value -> Parser V1CronJob
parseJSON = String -> (Object -> Parser V1CronJob) -> Value -> Parser V1CronJob
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CronJob" ((Object -> Parser V1CronJob) -> Value -> Parser V1CronJob)
-> (Object -> Parser V1CronJob) -> Value -> Parser V1CronJob
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1CronJobSpec
-> Maybe V1CronJobStatus
-> V1CronJob
V1CronJob
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1CronJobSpec
 -> Maybe V1CronJobStatus
 -> V1CronJob)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1CronJobSpec
      -> Maybe V1CronJobStatus
      -> V1CronJob)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1CronJobSpec
   -> Maybe V1CronJobStatus
   -> V1CronJob)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1CronJobSpec -> Maybe V1CronJobStatus -> V1CronJob)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1CronJobSpec -> Maybe V1CronJobStatus -> V1CronJob)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe V1CronJobSpec -> Maybe V1CronJobStatus -> V1CronJob)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (Maybe V1CronJobSpec -> Maybe V1CronJobStatus -> V1CronJob)
-> Parser (Maybe V1CronJobSpec)
-> Parser (Maybe V1CronJobStatus -> V1CronJob)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1CronJobSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")
      Parser (Maybe V1CronJobStatus -> V1CronJob)
-> Parser (Maybe V1CronJobStatus) -> Parser V1CronJob
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1CronJobStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1CronJob
instance A.ToJSON V1CronJob where
  toJSON :: V1CronJob -> Value
toJSON V1CronJob {Maybe Text
Maybe V1ObjectMeta
Maybe V1CronJobStatus
Maybe V1CronJobSpec
$sel:v1CronJobApiVersion:V1CronJob :: V1CronJob -> Maybe Text
$sel:v1CronJobKind:V1CronJob :: V1CronJob -> Maybe Text
$sel:v1CronJobMetadata:V1CronJob :: V1CronJob -> Maybe V1ObjectMeta
$sel:v1CronJobSpec:V1CronJob :: V1CronJob -> Maybe V1CronJobSpec
$sel:v1CronJobStatus:V1CronJob :: V1CronJob -> Maybe V1CronJobStatus
v1CronJobApiVersion :: Maybe Text
v1CronJobKind :: Maybe Text
v1CronJobMetadata :: Maybe V1ObjectMeta
v1CronJobSpec :: Maybe V1CronJobSpec
v1CronJobStatus :: Maybe V1CronJobStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CronJobApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CronJobKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1CronJobMetadata
      , Key
"spec" Key -> Maybe V1CronJobSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1CronJobSpec
v1CronJobSpec
      , Key
"status" Key -> Maybe V1CronJobStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1CronJobStatus
v1CronJobStatus
      ]


-- | Construct a value of type 'V1CronJob' (by applying it's required fields, if any)
mkV1CronJob
  :: V1CronJob
mkV1CronJob :: V1CronJob
mkV1CronJob =
  V1CronJob
  { $sel:v1CronJobApiVersion:V1CronJob :: Maybe Text
v1CronJobApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1CronJobKind:V1CronJob :: Maybe Text
v1CronJobKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1CronJobMetadata:V1CronJob :: Maybe V1ObjectMeta
v1CronJobMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1CronJobSpec:V1CronJob :: Maybe V1CronJobSpec
v1CronJobSpec = Maybe V1CronJobSpec
forall a. Maybe a
Nothing
  , $sel:v1CronJobStatus:V1CronJob :: Maybe V1CronJobStatus
v1CronJobStatus = Maybe V1CronJobStatus
forall a. Maybe a
Nothing
  }

-- ** V1CronJobList
-- | V1CronJobList
-- CronJobList is a collection of cron jobs.
data V1CronJobList = V1CronJobList
  { V1CronJobList -> Maybe Text
v1CronJobListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1CronJobList -> [V1CronJob]
v1CronJobListItems :: !([V1CronJob]) -- ^ /Required/ "items" - items is the list of CronJobs.
  , V1CronJobList -> Maybe Text
v1CronJobListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1CronJobList -> Maybe V1ListMeta
v1CronJobListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1CronJobList -> ShowS
[V1CronJobList] -> ShowS
V1CronJobList -> String
(Int -> V1CronJobList -> ShowS)
-> (V1CronJobList -> String)
-> ([V1CronJobList] -> ShowS)
-> Show V1CronJobList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CronJobList -> ShowS
showsPrec :: Int -> V1CronJobList -> ShowS
$cshow :: V1CronJobList -> String
show :: V1CronJobList -> String
$cshowList :: [V1CronJobList] -> ShowS
showList :: [V1CronJobList] -> ShowS
P.Show, V1CronJobList -> V1CronJobList -> Bool
(V1CronJobList -> V1CronJobList -> Bool)
-> (V1CronJobList -> V1CronJobList -> Bool) -> Eq V1CronJobList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CronJobList -> V1CronJobList -> Bool
== :: V1CronJobList -> V1CronJobList -> Bool
$c/= :: V1CronJobList -> V1CronJobList -> Bool
/= :: V1CronJobList -> V1CronJobList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CronJobList
instance A.FromJSON V1CronJobList where
  parseJSON :: Value -> Parser V1CronJobList
parseJSON = String
-> (Object -> Parser V1CronJobList)
-> Value
-> Parser V1CronJobList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CronJobList" ((Object -> Parser V1CronJobList) -> Value -> Parser V1CronJobList)
-> (Object -> Parser V1CronJobList)
-> Value
-> Parser V1CronJobList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1CronJob] -> Maybe Text -> Maybe V1ListMeta -> V1CronJobList
V1CronJobList
      (Maybe Text
 -> [V1CronJob] -> Maybe Text -> Maybe V1ListMeta -> V1CronJobList)
-> Parser (Maybe Text)
-> Parser
     ([V1CronJob] -> Maybe Text -> Maybe V1ListMeta -> V1CronJobList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1CronJob] -> Maybe Text -> Maybe V1ListMeta -> V1CronJobList)
-> Parser [V1CronJob]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1CronJobList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1CronJob]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1CronJobList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1CronJobList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1CronJobList)
-> Parser (Maybe V1ListMeta) -> Parser V1CronJobList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1CronJobList
instance A.ToJSON V1CronJobList where
  toJSON :: V1CronJobList -> Value
toJSON V1CronJobList {[V1CronJob]
Maybe Text
Maybe V1ListMeta
$sel:v1CronJobListApiVersion:V1CronJobList :: V1CronJobList -> Maybe Text
$sel:v1CronJobListItems:V1CronJobList :: V1CronJobList -> [V1CronJob]
$sel:v1CronJobListKind:V1CronJobList :: V1CronJobList -> Maybe Text
$sel:v1CronJobListMetadata:V1CronJobList :: V1CronJobList -> Maybe V1ListMeta
v1CronJobListApiVersion :: Maybe Text
v1CronJobListItems :: [V1CronJob]
v1CronJobListKind :: Maybe Text
v1CronJobListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CronJobListApiVersion
      , Key
"items" Key -> [V1CronJob] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1CronJob]
v1CronJobListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CronJobListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1CronJobListMetadata
      ]


-- | Construct a value of type 'V1CronJobList' (by applying it's required fields, if any)
mkV1CronJobList
  :: [V1CronJob] -- ^ 'v1CronJobListItems': items is the list of CronJobs.
  -> V1CronJobList
mkV1CronJobList :: [V1CronJob] -> V1CronJobList
mkV1CronJobList [V1CronJob]
v1CronJobListItems =
  V1CronJobList
  { $sel:v1CronJobListApiVersion:V1CronJobList :: Maybe Text
v1CronJobListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1CronJob]
$sel:v1CronJobListItems:V1CronJobList :: [V1CronJob]
v1CronJobListItems :: [V1CronJob]
v1CronJobListItems
  , $sel:v1CronJobListKind:V1CronJobList :: Maybe Text
v1CronJobListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1CronJobListMetadata:V1CronJobList :: Maybe V1ListMeta
v1CronJobListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1CronJobSpec
-- | V1CronJobSpec
-- CronJobSpec describes how the job execution will look like and when it will actually run.
data V1CronJobSpec = V1CronJobSpec
  { V1CronJobSpec -> Maybe Text
v1CronJobSpecConcurrencyPolicy :: !(Maybe Text) -- ^ "concurrencyPolicy" - Specifies how to treat concurrent executions of a Job. Valid values are:  - \&quot;Allow\&quot; (default): allows CronJobs to run concurrently; - \&quot;Forbid\&quot;: forbids concurrent runs, skipping next run if previous run hasn&#39;t finished yet; - \&quot;Replace\&quot;: cancels currently running job and replaces it with a new one
  , V1CronJobSpec -> Maybe Int
v1CronJobSpecFailedJobsHistoryLimit :: !(Maybe Int) -- ^ "failedJobsHistoryLimit" - The number of failed finished jobs to retain. Value must be non-negative integer. Defaults to 1.
  , V1CronJobSpec -> V1JobTemplateSpec
v1CronJobSpecJobTemplate :: !(V1JobTemplateSpec) -- ^ /Required/ "jobTemplate"
  , V1CronJobSpec -> Text
v1CronJobSpecSchedule :: !(Text) -- ^ /Required/ "schedule" - The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
  , V1CronJobSpec -> Maybe Integer
v1CronJobSpecStartingDeadlineSeconds :: !(Maybe Integer) -- ^ "startingDeadlineSeconds" - Optional deadline in seconds for starting the job if it misses scheduled time for any reason.  Missed jobs executions will be counted as failed ones.
  , V1CronJobSpec -> Maybe Int
v1CronJobSpecSuccessfulJobsHistoryLimit :: !(Maybe Int) -- ^ "successfulJobsHistoryLimit" - The number of successful finished jobs to retain. Value must be non-negative integer. Defaults to 3.
  , V1CronJobSpec -> Maybe Bool
v1CronJobSpecSuspend :: !(Maybe Bool) -- ^ "suspend" - This flag tells the controller to suspend subsequent executions, it does not apply to already started executions.  Defaults to false.
  , V1CronJobSpec -> Maybe Text
v1CronJobSpecTimeZone :: !(Maybe Text) -- ^ "timeZone" - The time zone name for the given schedule, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. If not specified, this will default to the time zone of the kube-controller-manager process. The set of valid time zone names and the time zone offset is loaded from the system-wide time zone database by the API server during CronJob validation and the controller manager during execution. If no system-wide time zone database can be found a bundled version of the database is used instead. If the time zone name becomes invalid during the lifetime of a CronJob or due to a change in host configuration, the controller will stop creating new new Jobs and will create a system event with the reason UnknownTimeZone. More information can be found in https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#time-zones
  } deriving (Int -> V1CronJobSpec -> ShowS
[V1CronJobSpec] -> ShowS
V1CronJobSpec -> String
(Int -> V1CronJobSpec -> ShowS)
-> (V1CronJobSpec -> String)
-> ([V1CronJobSpec] -> ShowS)
-> Show V1CronJobSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CronJobSpec -> ShowS
showsPrec :: Int -> V1CronJobSpec -> ShowS
$cshow :: V1CronJobSpec -> String
show :: V1CronJobSpec -> String
$cshowList :: [V1CronJobSpec] -> ShowS
showList :: [V1CronJobSpec] -> ShowS
P.Show, V1CronJobSpec -> V1CronJobSpec -> Bool
(V1CronJobSpec -> V1CronJobSpec -> Bool)
-> (V1CronJobSpec -> V1CronJobSpec -> Bool) -> Eq V1CronJobSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CronJobSpec -> V1CronJobSpec -> Bool
== :: V1CronJobSpec -> V1CronJobSpec -> Bool
$c/= :: V1CronJobSpec -> V1CronJobSpec -> Bool
/= :: V1CronJobSpec -> V1CronJobSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CronJobSpec
instance A.FromJSON V1CronJobSpec where
  parseJSON :: Value -> Parser V1CronJobSpec
parseJSON = String
-> (Object -> Parser V1CronJobSpec)
-> Value
-> Parser V1CronJobSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CronJobSpec" ((Object -> Parser V1CronJobSpec) -> Value -> Parser V1CronJobSpec)
-> (Object -> Parser V1CronJobSpec)
-> Value
-> Parser V1CronJobSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Int
-> V1JobTemplateSpec
-> Text
-> Maybe Integer
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> V1CronJobSpec
V1CronJobSpec
      (Maybe Text
 -> Maybe Int
 -> V1JobTemplateSpec
 -> Text
 -> Maybe Integer
 -> Maybe Int
 -> Maybe Bool
 -> Maybe Text
 -> V1CronJobSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> V1JobTemplateSpec
      -> Text
      -> Maybe Integer
      -> Maybe Int
      -> Maybe Bool
      -> Maybe Text
      -> V1CronJobSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"concurrencyPolicy")
      Parser
  (Maybe Int
   -> V1JobTemplateSpec
   -> Text
   -> Maybe Integer
   -> Maybe Int
   -> Maybe Bool
   -> Maybe Text
   -> V1CronJobSpec)
-> Parser (Maybe Int)
-> Parser
     (V1JobTemplateSpec
      -> Text
      -> Maybe Integer
      -> Maybe Int
      -> Maybe Bool
      -> Maybe Text
      -> V1CronJobSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"failedJobsHistoryLimit")
      Parser
  (V1JobTemplateSpec
   -> Text
   -> Maybe Integer
   -> Maybe Int
   -> Maybe Bool
   -> Maybe Text
   -> V1CronJobSpec)
-> Parser V1JobTemplateSpec
-> Parser
     (Text
      -> Maybe Integer
      -> Maybe Int
      -> Maybe Bool
      -> Maybe Text
      -> V1CronJobSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1JobTemplateSpec
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"jobTemplate")
      Parser
  (Text
   -> Maybe Integer
   -> Maybe Int
   -> Maybe Bool
   -> Maybe Text
   -> V1CronJobSpec)
-> Parser Text
-> Parser
     (Maybe Integer
      -> Maybe Int -> Maybe Bool -> Maybe Text -> V1CronJobSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"schedule")
      Parser
  (Maybe Integer
   -> Maybe Int -> Maybe Bool -> Maybe Text -> V1CronJobSpec)
-> Parser (Maybe Integer)
-> Parser (Maybe Int -> Maybe Bool -> Maybe Text -> V1CronJobSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"startingDeadlineSeconds")
      Parser (Maybe Int -> Maybe Bool -> Maybe Text -> V1CronJobSpec)
-> Parser (Maybe Int)
-> Parser (Maybe Bool -> Maybe Text -> V1CronJobSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"successfulJobsHistoryLimit")
      Parser (Maybe Bool -> Maybe Text -> V1CronJobSpec)
-> Parser (Maybe Bool) -> Parser (Maybe Text -> V1CronJobSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"suspend")
      Parser (Maybe Text -> V1CronJobSpec)
-> Parser (Maybe Text) -> Parser V1CronJobSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"timeZone")

-- | ToJSON V1CronJobSpec
instance A.ToJSON V1CronJobSpec where
  toJSON :: V1CronJobSpec -> Value
toJSON V1CronJobSpec {Maybe Bool
Maybe Int
Maybe Integer
Maybe Text
Text
V1JobTemplateSpec
$sel:v1CronJobSpecConcurrencyPolicy:V1CronJobSpec :: V1CronJobSpec -> Maybe Text
$sel:v1CronJobSpecFailedJobsHistoryLimit:V1CronJobSpec :: V1CronJobSpec -> Maybe Int
$sel:v1CronJobSpecJobTemplate:V1CronJobSpec :: V1CronJobSpec -> V1JobTemplateSpec
$sel:v1CronJobSpecSchedule:V1CronJobSpec :: V1CronJobSpec -> Text
$sel:v1CronJobSpecStartingDeadlineSeconds:V1CronJobSpec :: V1CronJobSpec -> Maybe Integer
$sel:v1CronJobSpecSuccessfulJobsHistoryLimit:V1CronJobSpec :: V1CronJobSpec -> Maybe Int
$sel:v1CronJobSpecSuspend:V1CronJobSpec :: V1CronJobSpec -> Maybe Bool
$sel:v1CronJobSpecTimeZone:V1CronJobSpec :: V1CronJobSpec -> Maybe Text
v1CronJobSpecConcurrencyPolicy :: Maybe Text
v1CronJobSpecFailedJobsHistoryLimit :: Maybe Int
v1CronJobSpecJobTemplate :: V1JobTemplateSpec
v1CronJobSpecSchedule :: Text
v1CronJobSpecStartingDeadlineSeconds :: Maybe Integer
v1CronJobSpecSuccessfulJobsHistoryLimit :: Maybe Int
v1CronJobSpecSuspend :: Maybe Bool
v1CronJobSpecTimeZone :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"concurrencyPolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CronJobSpecConcurrencyPolicy
      , Key
"failedJobsHistoryLimit" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1CronJobSpecFailedJobsHistoryLimit
      , Key
"jobTemplate" Key -> V1JobTemplateSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1JobTemplateSpec
v1CronJobSpecJobTemplate
      , Key
"schedule" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1CronJobSpecSchedule
      , Key
"startingDeadlineSeconds" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1CronJobSpecStartingDeadlineSeconds
      , Key
"successfulJobsHistoryLimit" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1CronJobSpecSuccessfulJobsHistoryLimit
      , Key
"suspend" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1CronJobSpecSuspend
      , Key
"timeZone" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CronJobSpecTimeZone
      ]


-- | Construct a value of type 'V1CronJobSpec' (by applying it's required fields, if any)
mkV1CronJobSpec
  :: V1JobTemplateSpec -- ^ 'v1CronJobSpecJobTemplate' 
  -> Text -- ^ 'v1CronJobSpecSchedule': The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
  -> V1CronJobSpec
mkV1CronJobSpec :: V1JobTemplateSpec -> Text -> V1CronJobSpec
mkV1CronJobSpec V1JobTemplateSpec
v1CronJobSpecJobTemplate Text
v1CronJobSpecSchedule =
  V1CronJobSpec
  { $sel:v1CronJobSpecConcurrencyPolicy:V1CronJobSpec :: Maybe Text
v1CronJobSpecConcurrencyPolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1CronJobSpecFailedJobsHistoryLimit:V1CronJobSpec :: Maybe Int
v1CronJobSpecFailedJobsHistoryLimit = Maybe Int
forall a. Maybe a
Nothing
  , V1JobTemplateSpec
$sel:v1CronJobSpecJobTemplate:V1CronJobSpec :: V1JobTemplateSpec
v1CronJobSpecJobTemplate :: V1JobTemplateSpec
v1CronJobSpecJobTemplate
  , Text
$sel:v1CronJobSpecSchedule:V1CronJobSpec :: Text
v1CronJobSpecSchedule :: Text
v1CronJobSpecSchedule
  , $sel:v1CronJobSpecStartingDeadlineSeconds:V1CronJobSpec :: Maybe Integer
v1CronJobSpecStartingDeadlineSeconds = Maybe Integer
forall a. Maybe a
Nothing
  , $sel:v1CronJobSpecSuccessfulJobsHistoryLimit:V1CronJobSpec :: Maybe Int
v1CronJobSpecSuccessfulJobsHistoryLimit = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1CronJobSpecSuspend:V1CronJobSpec :: Maybe Bool
v1CronJobSpecSuspend = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1CronJobSpecTimeZone:V1CronJobSpec :: Maybe Text
v1CronJobSpecTimeZone = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1CronJobStatus
-- | V1CronJobStatus
-- CronJobStatus represents the current state of a cron job.
data V1CronJobStatus = V1CronJobStatus
  { V1CronJobStatus -> Maybe [V1ObjectReference]
v1CronJobStatusActive :: !(Maybe [V1ObjectReference]) -- ^ "active" - A list of pointers to currently running jobs.
  , V1CronJobStatus -> Maybe DateTime
v1CronJobStatusLastScheduleTime :: !(Maybe DateTime) -- ^ "lastScheduleTime" - Information when was the last time the job was successfully scheduled.
  , V1CronJobStatus -> Maybe DateTime
v1CronJobStatusLastSuccessfulTime :: !(Maybe DateTime) -- ^ "lastSuccessfulTime" - Information when was the last time the job successfully completed.
  } deriving (Int -> V1CronJobStatus -> ShowS
[V1CronJobStatus] -> ShowS
V1CronJobStatus -> String
(Int -> V1CronJobStatus -> ShowS)
-> (V1CronJobStatus -> String)
-> ([V1CronJobStatus] -> ShowS)
-> Show V1CronJobStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CronJobStatus -> ShowS
showsPrec :: Int -> V1CronJobStatus -> ShowS
$cshow :: V1CronJobStatus -> String
show :: V1CronJobStatus -> String
$cshowList :: [V1CronJobStatus] -> ShowS
showList :: [V1CronJobStatus] -> ShowS
P.Show, V1CronJobStatus -> V1CronJobStatus -> Bool
(V1CronJobStatus -> V1CronJobStatus -> Bool)
-> (V1CronJobStatus -> V1CronJobStatus -> Bool)
-> Eq V1CronJobStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CronJobStatus -> V1CronJobStatus -> Bool
== :: V1CronJobStatus -> V1CronJobStatus -> Bool
$c/= :: V1CronJobStatus -> V1CronJobStatus -> Bool
/= :: V1CronJobStatus -> V1CronJobStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CronJobStatus
instance A.FromJSON V1CronJobStatus where
  parseJSON :: Value -> Parser V1CronJobStatus
parseJSON = String
-> (Object -> Parser V1CronJobStatus)
-> Value
-> Parser V1CronJobStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CronJobStatus" ((Object -> Parser V1CronJobStatus)
 -> Value -> Parser V1CronJobStatus)
-> (Object -> Parser V1CronJobStatus)
-> Value
-> Parser V1CronJobStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1ObjectReference]
-> Maybe DateTime -> Maybe DateTime -> V1CronJobStatus
V1CronJobStatus
      (Maybe [V1ObjectReference]
 -> Maybe DateTime -> Maybe DateTime -> V1CronJobStatus)
-> Parser (Maybe [V1ObjectReference])
-> Parser (Maybe DateTime -> Maybe DateTime -> V1CronJobStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1ObjectReference])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"active")
      Parser (Maybe DateTime -> Maybe DateTime -> V1CronJobStatus)
-> Parser (Maybe DateTime)
-> Parser (Maybe DateTime -> V1CronJobStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lastScheduleTime")
      Parser (Maybe DateTime -> V1CronJobStatus)
-> Parser (Maybe DateTime) -> Parser V1CronJobStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lastSuccessfulTime")

-- | ToJSON V1CronJobStatus
instance A.ToJSON V1CronJobStatus where
  toJSON :: V1CronJobStatus -> Value
toJSON V1CronJobStatus {Maybe [V1ObjectReference]
Maybe DateTime
$sel:v1CronJobStatusActive:V1CronJobStatus :: V1CronJobStatus -> Maybe [V1ObjectReference]
$sel:v1CronJobStatusLastScheduleTime:V1CronJobStatus :: V1CronJobStatus -> Maybe DateTime
$sel:v1CronJobStatusLastSuccessfulTime:V1CronJobStatus :: V1CronJobStatus -> Maybe DateTime
v1CronJobStatusActive :: Maybe [V1ObjectReference]
v1CronJobStatusLastScheduleTime :: Maybe DateTime
v1CronJobStatusLastSuccessfulTime :: Maybe DateTime
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"active" Key -> Maybe [V1ObjectReference] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1ObjectReference]
v1CronJobStatusActive
      , Key
"lastScheduleTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1CronJobStatusLastScheduleTime
      , Key
"lastSuccessfulTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1CronJobStatusLastSuccessfulTime
      ]


-- | Construct a value of type 'V1CronJobStatus' (by applying it's required fields, if any)
mkV1CronJobStatus
  :: V1CronJobStatus
mkV1CronJobStatus :: V1CronJobStatus
mkV1CronJobStatus =
  V1CronJobStatus
  { $sel:v1CronJobStatusActive:V1CronJobStatus :: Maybe [V1ObjectReference]
v1CronJobStatusActive = Maybe [V1ObjectReference]
forall a. Maybe a
Nothing
  , $sel:v1CronJobStatusLastScheduleTime:V1CronJobStatus :: Maybe DateTime
v1CronJobStatusLastScheduleTime = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1CronJobStatusLastSuccessfulTime:V1CronJobStatus :: Maybe DateTime
v1CronJobStatusLastSuccessfulTime = Maybe DateTime
forall a. Maybe a
Nothing
  }

-- ** V1CrossVersionObjectReference
-- | V1CrossVersionObjectReference
-- CrossVersionObjectReference contains enough information to let you identify the referred resource.
data V1CrossVersionObjectReference = V1CrossVersionObjectReference
  { V1CrossVersionObjectReference -> Maybe Text
v1CrossVersionObjectReferenceApiVersion :: !(Maybe Text) -- ^ "apiVersion" - apiVersion is the API version of the referent
  , V1CrossVersionObjectReference -> Text
v1CrossVersionObjectReferenceKind :: !(Text) -- ^ /Required/ "kind" - kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1CrossVersionObjectReference -> Text
v1CrossVersionObjectReferenceName :: !(Text) -- ^ /Required/ "name" - name is the name of the referent; More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  } deriving (Int -> V1CrossVersionObjectReference -> ShowS
[V1CrossVersionObjectReference] -> ShowS
V1CrossVersionObjectReference -> String
(Int -> V1CrossVersionObjectReference -> ShowS)
-> (V1CrossVersionObjectReference -> String)
-> ([V1CrossVersionObjectReference] -> ShowS)
-> Show V1CrossVersionObjectReference
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CrossVersionObjectReference -> ShowS
showsPrec :: Int -> V1CrossVersionObjectReference -> ShowS
$cshow :: V1CrossVersionObjectReference -> String
show :: V1CrossVersionObjectReference -> String
$cshowList :: [V1CrossVersionObjectReference] -> ShowS
showList :: [V1CrossVersionObjectReference] -> ShowS
P.Show, V1CrossVersionObjectReference
-> V1CrossVersionObjectReference -> Bool
(V1CrossVersionObjectReference
 -> V1CrossVersionObjectReference -> Bool)
-> (V1CrossVersionObjectReference
    -> V1CrossVersionObjectReference -> Bool)
-> Eq V1CrossVersionObjectReference
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CrossVersionObjectReference
-> V1CrossVersionObjectReference -> Bool
== :: V1CrossVersionObjectReference
-> V1CrossVersionObjectReference -> Bool
$c/= :: V1CrossVersionObjectReference
-> V1CrossVersionObjectReference -> Bool
/= :: V1CrossVersionObjectReference
-> V1CrossVersionObjectReference -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CrossVersionObjectReference
instance A.FromJSON V1CrossVersionObjectReference where
  parseJSON :: Value -> Parser V1CrossVersionObjectReference
parseJSON = String
-> (Object -> Parser V1CrossVersionObjectReference)
-> Value
-> Parser V1CrossVersionObjectReference
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CrossVersionObjectReference" ((Object -> Parser V1CrossVersionObjectReference)
 -> Value -> Parser V1CrossVersionObjectReference)
-> (Object -> Parser V1CrossVersionObjectReference)
-> Value
-> Parser V1CrossVersionObjectReference
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Text -> Text -> V1CrossVersionObjectReference
V1CrossVersionObjectReference
      (Maybe Text -> Text -> Text -> V1CrossVersionObjectReference)
-> Parser (Maybe Text)
-> Parser (Text -> Text -> V1CrossVersionObjectReference)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser (Text -> Text -> V1CrossVersionObjectReference)
-> Parser Text -> Parser (Text -> V1CrossVersionObjectReference)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"kind")
      Parser (Text -> V1CrossVersionObjectReference)
-> Parser Text -> Parser V1CrossVersionObjectReference
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")

-- | ToJSON V1CrossVersionObjectReference
instance A.ToJSON V1CrossVersionObjectReference where
  toJSON :: V1CrossVersionObjectReference -> Value
toJSON V1CrossVersionObjectReference {Maybe Text
Text
$sel:v1CrossVersionObjectReferenceApiVersion:V1CrossVersionObjectReference :: V1CrossVersionObjectReference -> Maybe Text
$sel:v1CrossVersionObjectReferenceKind:V1CrossVersionObjectReference :: V1CrossVersionObjectReference -> Text
$sel:v1CrossVersionObjectReferenceName:V1CrossVersionObjectReference :: V1CrossVersionObjectReference -> Text
v1CrossVersionObjectReferenceApiVersion :: Maybe Text
v1CrossVersionObjectReferenceKind :: Text
v1CrossVersionObjectReferenceName :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CrossVersionObjectReferenceApiVersion
      , Key
"kind" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1CrossVersionObjectReferenceKind
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1CrossVersionObjectReferenceName
      ]


-- | Construct a value of type 'V1CrossVersionObjectReference' (by applying it's required fields, if any)
mkV1CrossVersionObjectReference
  :: Text -- ^ 'v1CrossVersionObjectReferenceKind': kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  -> Text -- ^ 'v1CrossVersionObjectReferenceName': name is the name of the referent; More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  -> V1CrossVersionObjectReference
mkV1CrossVersionObjectReference :: Text -> Text -> V1CrossVersionObjectReference
mkV1CrossVersionObjectReference Text
v1CrossVersionObjectReferenceKind Text
v1CrossVersionObjectReferenceName =
  V1CrossVersionObjectReference
  { $sel:v1CrossVersionObjectReferenceApiVersion:V1CrossVersionObjectReference :: Maybe Text
v1CrossVersionObjectReferenceApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1CrossVersionObjectReferenceKind:V1CrossVersionObjectReference :: Text
v1CrossVersionObjectReferenceKind :: Text
v1CrossVersionObjectReferenceKind
  , Text
$sel:v1CrossVersionObjectReferenceName:V1CrossVersionObjectReference :: Text
v1CrossVersionObjectReferenceName :: Text
v1CrossVersionObjectReferenceName
  }

-- ** V1CustomResourceColumnDefinition
-- | V1CustomResourceColumnDefinition
-- CustomResourceColumnDefinition specifies a column for server side printing.
data V1CustomResourceColumnDefinition = V1CustomResourceColumnDefinition
  { V1CustomResourceColumnDefinition -> Maybe Text
v1CustomResourceColumnDefinitionDescription :: !(Maybe Text) -- ^ "description" - description is a human readable description of this column.
  , V1CustomResourceColumnDefinition -> Maybe Text
v1CustomResourceColumnDefinitionFormat :: !(Maybe Text) -- ^ "format" - format is an optional OpenAPI type definition for this column. The &#39;name&#39; format is applied to the primary identifier column to assist in clients identifying column is the resource name. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.
  , V1CustomResourceColumnDefinition -> Text
v1CustomResourceColumnDefinitionJsonPath :: !(Text) -- ^ /Required/ "jsonPath" - jsonPath is a simple JSON path (i.e. with array notation) which is evaluated against each custom resource to produce the value for this column.
  , V1CustomResourceColumnDefinition -> Text
v1CustomResourceColumnDefinitionName :: !(Text) -- ^ /Required/ "name" - name is a human readable name for the column.
  , V1CustomResourceColumnDefinition -> Maybe Int
v1CustomResourceColumnDefinitionPriority :: !(Maybe Int) -- ^ "priority" - priority is an integer defining the relative importance of this column compared to others. Lower numbers are considered higher priority. Columns that may be omitted in limited space scenarios should be given a priority greater than 0.
  , V1CustomResourceColumnDefinition -> Text
v1CustomResourceColumnDefinitionType :: !(Text) -- ^ /Required/ "type" - type is an OpenAPI type definition for this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.
  } deriving (Int -> V1CustomResourceColumnDefinition -> ShowS
[V1CustomResourceColumnDefinition] -> ShowS
V1CustomResourceColumnDefinition -> String
(Int -> V1CustomResourceColumnDefinition -> ShowS)
-> (V1CustomResourceColumnDefinition -> String)
-> ([V1CustomResourceColumnDefinition] -> ShowS)
-> Show V1CustomResourceColumnDefinition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CustomResourceColumnDefinition -> ShowS
showsPrec :: Int -> V1CustomResourceColumnDefinition -> ShowS
$cshow :: V1CustomResourceColumnDefinition -> String
show :: V1CustomResourceColumnDefinition -> String
$cshowList :: [V1CustomResourceColumnDefinition] -> ShowS
showList :: [V1CustomResourceColumnDefinition] -> ShowS
P.Show, V1CustomResourceColumnDefinition
-> V1CustomResourceColumnDefinition -> Bool
(V1CustomResourceColumnDefinition
 -> V1CustomResourceColumnDefinition -> Bool)
-> (V1CustomResourceColumnDefinition
    -> V1CustomResourceColumnDefinition -> Bool)
-> Eq V1CustomResourceColumnDefinition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CustomResourceColumnDefinition
-> V1CustomResourceColumnDefinition -> Bool
== :: V1CustomResourceColumnDefinition
-> V1CustomResourceColumnDefinition -> Bool
$c/= :: V1CustomResourceColumnDefinition
-> V1CustomResourceColumnDefinition -> Bool
/= :: V1CustomResourceColumnDefinition
-> V1CustomResourceColumnDefinition -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CustomResourceColumnDefinition
instance A.FromJSON V1CustomResourceColumnDefinition where
  parseJSON :: Value -> Parser V1CustomResourceColumnDefinition
parseJSON = String
-> (Object -> Parser V1CustomResourceColumnDefinition)
-> Value
-> Parser V1CustomResourceColumnDefinition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CustomResourceColumnDefinition" ((Object -> Parser V1CustomResourceColumnDefinition)
 -> Value -> Parser V1CustomResourceColumnDefinition)
-> (Object -> Parser V1CustomResourceColumnDefinition)
-> Value
-> Parser V1CustomResourceColumnDefinition
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Text
-> Text
-> Maybe Int
-> Text
-> V1CustomResourceColumnDefinition
V1CustomResourceColumnDefinition
      (Maybe Text
 -> Maybe Text
 -> Text
 -> Text
 -> Maybe Int
 -> Text
 -> V1CustomResourceColumnDefinition)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Text
      -> Text
      -> Maybe Int
      -> Text
      -> V1CustomResourceColumnDefinition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"description")
      Parser
  (Maybe Text
   -> Text
   -> Text
   -> Maybe Int
   -> Text
   -> V1CustomResourceColumnDefinition)
-> Parser (Maybe Text)
-> Parser
     (Text
      -> Text -> Maybe Int -> Text -> V1CustomResourceColumnDefinition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"format")
      Parser
  (Text
   -> Text -> Maybe Int -> Text -> V1CustomResourceColumnDefinition)
-> Parser Text
-> Parser
     (Text -> Maybe Int -> Text -> V1CustomResourceColumnDefinition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"jsonPath")
      Parser
  (Text -> Maybe Int -> Text -> V1CustomResourceColumnDefinition)
-> Parser Text
-> Parser (Maybe Int -> Text -> V1CustomResourceColumnDefinition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser (Maybe Int -> Text -> V1CustomResourceColumnDefinition)
-> Parser (Maybe Int)
-> Parser (Text -> V1CustomResourceColumnDefinition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"priority")
      Parser (Text -> V1CustomResourceColumnDefinition)
-> Parser Text -> Parser V1CustomResourceColumnDefinition
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"type")

-- | ToJSON V1CustomResourceColumnDefinition
instance A.ToJSON V1CustomResourceColumnDefinition where
  toJSON :: V1CustomResourceColumnDefinition -> Value
toJSON V1CustomResourceColumnDefinition {Maybe Int
Maybe Text
Text
$sel:v1CustomResourceColumnDefinitionDescription:V1CustomResourceColumnDefinition :: V1CustomResourceColumnDefinition -> Maybe Text
$sel:v1CustomResourceColumnDefinitionFormat:V1CustomResourceColumnDefinition :: V1CustomResourceColumnDefinition -> Maybe Text
$sel:v1CustomResourceColumnDefinitionJsonPath:V1CustomResourceColumnDefinition :: V1CustomResourceColumnDefinition -> Text
$sel:v1CustomResourceColumnDefinitionName:V1CustomResourceColumnDefinition :: V1CustomResourceColumnDefinition -> Text
$sel:v1CustomResourceColumnDefinitionPriority:V1CustomResourceColumnDefinition :: V1CustomResourceColumnDefinition -> Maybe Int
$sel:v1CustomResourceColumnDefinitionType:V1CustomResourceColumnDefinition :: V1CustomResourceColumnDefinition -> Text
v1CustomResourceColumnDefinitionDescription :: Maybe Text
v1CustomResourceColumnDefinitionFormat :: Maybe Text
v1CustomResourceColumnDefinitionJsonPath :: Text
v1CustomResourceColumnDefinitionName :: Text
v1CustomResourceColumnDefinitionPriority :: Maybe Int
v1CustomResourceColumnDefinitionType :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"description" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CustomResourceColumnDefinitionDescription
      , Key
"format" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CustomResourceColumnDefinitionFormat
      , Key
"jsonPath" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1CustomResourceColumnDefinitionJsonPath
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1CustomResourceColumnDefinitionName
      , Key
"priority" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1CustomResourceColumnDefinitionPriority
      , Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1CustomResourceColumnDefinitionType
      ]


-- | Construct a value of type 'V1CustomResourceColumnDefinition' (by applying it's required fields, if any)
mkV1CustomResourceColumnDefinition
  :: Text -- ^ 'v1CustomResourceColumnDefinitionJsonPath': jsonPath is a simple JSON path (i.e. with array notation) which is evaluated against each custom resource to produce the value for this column.
  -> Text -- ^ 'v1CustomResourceColumnDefinitionName': name is a human readable name for the column.
  -> Text -- ^ 'v1CustomResourceColumnDefinitionType': type is an OpenAPI type definition for this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.
  -> V1CustomResourceColumnDefinition
mkV1CustomResourceColumnDefinition :: Text -> Text -> Text -> V1CustomResourceColumnDefinition
mkV1CustomResourceColumnDefinition Text
v1CustomResourceColumnDefinitionJsonPath Text
v1CustomResourceColumnDefinitionName Text
v1CustomResourceColumnDefinitionType =
  V1CustomResourceColumnDefinition
  { $sel:v1CustomResourceColumnDefinitionDescription:V1CustomResourceColumnDefinition :: Maybe Text
v1CustomResourceColumnDefinitionDescription = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1CustomResourceColumnDefinitionFormat:V1CustomResourceColumnDefinition :: Maybe Text
v1CustomResourceColumnDefinitionFormat = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1CustomResourceColumnDefinitionJsonPath:V1CustomResourceColumnDefinition :: Text
v1CustomResourceColumnDefinitionJsonPath :: Text
v1CustomResourceColumnDefinitionJsonPath
  , Text
$sel:v1CustomResourceColumnDefinitionName:V1CustomResourceColumnDefinition :: Text
v1CustomResourceColumnDefinitionName :: Text
v1CustomResourceColumnDefinitionName
  , $sel:v1CustomResourceColumnDefinitionPriority:V1CustomResourceColumnDefinition :: Maybe Int
v1CustomResourceColumnDefinitionPriority = Maybe Int
forall a. Maybe a
Nothing
  , Text
$sel:v1CustomResourceColumnDefinitionType:V1CustomResourceColumnDefinition :: Text
v1CustomResourceColumnDefinitionType :: Text
v1CustomResourceColumnDefinitionType
  }

-- ** V1CustomResourceConversion
-- | V1CustomResourceConversion
-- CustomResourceConversion describes how to convert different versions of a CR.
data V1CustomResourceConversion = V1CustomResourceConversion
  { V1CustomResourceConversion -> Text
v1CustomResourceConversionStrategy :: !(Text) -- ^ /Required/ "strategy" - strategy specifies how custom resources are converted between versions. Allowed values are: - &#x60;\&quot;None\&quot;&#x60;: The converter only change the apiVersion and would not touch any other field in the custom resource. - &#x60;\&quot;Webhook\&quot;&#x60;: API Server will call to an external webhook to do the conversion. Additional information   is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhook to be set.
  , V1CustomResourceConversion -> Maybe V1WebhookConversion
v1CustomResourceConversionWebhook :: !(Maybe V1WebhookConversion) -- ^ "webhook"
  } deriving (Int -> V1CustomResourceConversion -> ShowS
[V1CustomResourceConversion] -> ShowS
V1CustomResourceConversion -> String
(Int -> V1CustomResourceConversion -> ShowS)
-> (V1CustomResourceConversion -> String)
-> ([V1CustomResourceConversion] -> ShowS)
-> Show V1CustomResourceConversion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CustomResourceConversion -> ShowS
showsPrec :: Int -> V1CustomResourceConversion -> ShowS
$cshow :: V1CustomResourceConversion -> String
show :: V1CustomResourceConversion -> String
$cshowList :: [V1CustomResourceConversion] -> ShowS
showList :: [V1CustomResourceConversion] -> ShowS
P.Show, V1CustomResourceConversion -> V1CustomResourceConversion -> Bool
(V1CustomResourceConversion -> V1CustomResourceConversion -> Bool)
-> (V1CustomResourceConversion
    -> V1CustomResourceConversion -> Bool)
-> Eq V1CustomResourceConversion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CustomResourceConversion -> V1CustomResourceConversion -> Bool
== :: V1CustomResourceConversion -> V1CustomResourceConversion -> Bool
$c/= :: V1CustomResourceConversion -> V1CustomResourceConversion -> Bool
/= :: V1CustomResourceConversion -> V1CustomResourceConversion -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CustomResourceConversion
instance A.FromJSON V1CustomResourceConversion where
  parseJSON :: Value -> Parser V1CustomResourceConversion
parseJSON = String
-> (Object -> Parser V1CustomResourceConversion)
-> Value
-> Parser V1CustomResourceConversion
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CustomResourceConversion" ((Object -> Parser V1CustomResourceConversion)
 -> Value -> Parser V1CustomResourceConversion)
-> (Object -> Parser V1CustomResourceConversion)
-> Value
-> Parser V1CustomResourceConversion
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Maybe V1WebhookConversion -> V1CustomResourceConversion
V1CustomResourceConversion
      (Text -> Maybe V1WebhookConversion -> V1CustomResourceConversion)
-> Parser Text
-> Parser (Maybe V1WebhookConversion -> V1CustomResourceConversion)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"strategy")
      Parser (Maybe V1WebhookConversion -> V1CustomResourceConversion)
-> Parser (Maybe V1WebhookConversion)
-> Parser V1CustomResourceConversion
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1WebhookConversion)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"webhook")

-- | ToJSON V1CustomResourceConversion
instance A.ToJSON V1CustomResourceConversion where
  toJSON :: V1CustomResourceConversion -> Value
toJSON V1CustomResourceConversion {Maybe V1WebhookConversion
Text
$sel:v1CustomResourceConversionStrategy:V1CustomResourceConversion :: V1CustomResourceConversion -> Text
$sel:v1CustomResourceConversionWebhook:V1CustomResourceConversion :: V1CustomResourceConversion -> Maybe V1WebhookConversion
v1CustomResourceConversionStrategy :: Text
v1CustomResourceConversionWebhook :: Maybe V1WebhookConversion
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"strategy" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1CustomResourceConversionStrategy
      , Key
"webhook" Key -> Maybe V1WebhookConversion -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1WebhookConversion
v1CustomResourceConversionWebhook
      ]


-- | Construct a value of type 'V1CustomResourceConversion' (by applying it's required fields, if any)
mkV1CustomResourceConversion
  :: Text -- ^ 'v1CustomResourceConversionStrategy': strategy specifies how custom resources are converted between versions. Allowed values are: - `\"None\"`: The converter only change the apiVersion and would not touch any other field in the custom resource. - `\"Webhook\"`: API Server will call to an external webhook to do the conversion. Additional information   is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhook to be set.
  -> V1CustomResourceConversion
mkV1CustomResourceConversion :: Text -> V1CustomResourceConversion
mkV1CustomResourceConversion Text
v1CustomResourceConversionStrategy =
  V1CustomResourceConversion
  { Text
$sel:v1CustomResourceConversionStrategy:V1CustomResourceConversion :: Text
v1CustomResourceConversionStrategy :: Text
v1CustomResourceConversionStrategy
  , $sel:v1CustomResourceConversionWebhook:V1CustomResourceConversion :: Maybe V1WebhookConversion
v1CustomResourceConversionWebhook = Maybe V1WebhookConversion
forall a. Maybe a
Nothing
  }

-- ** V1CustomResourceDefinition
-- | V1CustomResourceDefinition
-- CustomResourceDefinition represents a resource that should be exposed on the API server.  Its name MUST be in the format <.spec.name>.<.spec.group>.
data V1CustomResourceDefinition = V1CustomResourceDefinition
  { V1CustomResourceDefinition -> Maybe Text
v1CustomResourceDefinitionApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1CustomResourceDefinition -> Maybe Text
v1CustomResourceDefinitionKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1CustomResourceDefinition -> Maybe V1ObjectMeta
v1CustomResourceDefinitionMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1CustomResourceDefinition -> V1CustomResourceDefinitionSpec
v1CustomResourceDefinitionSpec :: !(V1CustomResourceDefinitionSpec) -- ^ /Required/ "spec"
  , V1CustomResourceDefinition
-> Maybe V1CustomResourceDefinitionStatus
v1CustomResourceDefinitionStatus :: !(Maybe V1CustomResourceDefinitionStatus) -- ^ "status"
  } deriving (Int -> V1CustomResourceDefinition -> ShowS
[V1CustomResourceDefinition] -> ShowS
V1CustomResourceDefinition -> String
(Int -> V1CustomResourceDefinition -> ShowS)
-> (V1CustomResourceDefinition -> String)
-> ([V1CustomResourceDefinition] -> ShowS)
-> Show V1CustomResourceDefinition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CustomResourceDefinition -> ShowS
showsPrec :: Int -> V1CustomResourceDefinition -> ShowS
$cshow :: V1CustomResourceDefinition -> String
show :: V1CustomResourceDefinition -> String
$cshowList :: [V1CustomResourceDefinition] -> ShowS
showList :: [V1CustomResourceDefinition] -> ShowS
P.Show, V1CustomResourceDefinition -> V1CustomResourceDefinition -> Bool
(V1CustomResourceDefinition -> V1CustomResourceDefinition -> Bool)
-> (V1CustomResourceDefinition
    -> V1CustomResourceDefinition -> Bool)
-> Eq V1CustomResourceDefinition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CustomResourceDefinition -> V1CustomResourceDefinition -> Bool
== :: V1CustomResourceDefinition -> V1CustomResourceDefinition -> Bool
$c/= :: V1CustomResourceDefinition -> V1CustomResourceDefinition -> Bool
/= :: V1CustomResourceDefinition -> V1CustomResourceDefinition -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CustomResourceDefinition
instance A.FromJSON V1CustomResourceDefinition where
  parseJSON :: Value -> Parser V1CustomResourceDefinition
parseJSON = String
-> (Object -> Parser V1CustomResourceDefinition)
-> Value
-> Parser V1CustomResourceDefinition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CustomResourceDefinition" ((Object -> Parser V1CustomResourceDefinition)
 -> Value -> Parser V1CustomResourceDefinition)
-> (Object -> Parser V1CustomResourceDefinition)
-> Value
-> Parser V1CustomResourceDefinition
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> V1CustomResourceDefinitionSpec
-> Maybe V1CustomResourceDefinitionStatus
-> V1CustomResourceDefinition
V1CustomResourceDefinition
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> V1CustomResourceDefinitionSpec
 -> Maybe V1CustomResourceDefinitionStatus
 -> V1CustomResourceDefinition)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> V1CustomResourceDefinitionSpec
      -> Maybe V1CustomResourceDefinitionStatus
      -> V1CustomResourceDefinition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> V1CustomResourceDefinitionSpec
   -> Maybe V1CustomResourceDefinitionStatus
   -> V1CustomResourceDefinition)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> V1CustomResourceDefinitionSpec
      -> Maybe V1CustomResourceDefinitionStatus
      -> V1CustomResourceDefinition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> V1CustomResourceDefinitionSpec
   -> Maybe V1CustomResourceDefinitionStatus
   -> V1CustomResourceDefinition)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (V1CustomResourceDefinitionSpec
      -> Maybe V1CustomResourceDefinitionStatus
      -> V1CustomResourceDefinition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (V1CustomResourceDefinitionSpec
   -> Maybe V1CustomResourceDefinitionStatus
   -> V1CustomResourceDefinition)
-> Parser V1CustomResourceDefinitionSpec
-> Parser
     (Maybe V1CustomResourceDefinitionStatus
      -> V1CustomResourceDefinition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1CustomResourceDefinitionSpec
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"spec")
      Parser
  (Maybe V1CustomResourceDefinitionStatus
   -> V1CustomResourceDefinition)
-> Parser (Maybe V1CustomResourceDefinitionStatus)
-> Parser V1CustomResourceDefinition
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1CustomResourceDefinitionStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1CustomResourceDefinition
instance A.ToJSON V1CustomResourceDefinition where
  toJSON :: V1CustomResourceDefinition -> Value
toJSON V1CustomResourceDefinition {Maybe Text
Maybe V1ObjectMeta
Maybe V1CustomResourceDefinitionStatus
V1CustomResourceDefinitionSpec
$sel:v1CustomResourceDefinitionApiVersion:V1CustomResourceDefinition :: V1CustomResourceDefinition -> Maybe Text
$sel:v1CustomResourceDefinitionKind:V1CustomResourceDefinition :: V1CustomResourceDefinition -> Maybe Text
$sel:v1CustomResourceDefinitionMetadata:V1CustomResourceDefinition :: V1CustomResourceDefinition -> Maybe V1ObjectMeta
$sel:v1CustomResourceDefinitionSpec:V1CustomResourceDefinition :: V1CustomResourceDefinition -> V1CustomResourceDefinitionSpec
$sel:v1CustomResourceDefinitionStatus:V1CustomResourceDefinition :: V1CustomResourceDefinition
-> Maybe V1CustomResourceDefinitionStatus
v1CustomResourceDefinitionApiVersion :: Maybe Text
v1CustomResourceDefinitionKind :: Maybe Text
v1CustomResourceDefinitionMetadata :: Maybe V1ObjectMeta
v1CustomResourceDefinitionSpec :: V1CustomResourceDefinitionSpec
v1CustomResourceDefinitionStatus :: Maybe V1CustomResourceDefinitionStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CustomResourceDefinitionApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CustomResourceDefinitionKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1CustomResourceDefinitionMetadata
      , Key
"spec" Key -> V1CustomResourceDefinitionSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1CustomResourceDefinitionSpec
v1CustomResourceDefinitionSpec
      , Key
"status" Key -> Maybe V1CustomResourceDefinitionStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1CustomResourceDefinitionStatus
v1CustomResourceDefinitionStatus
      ]


-- | Construct a value of type 'V1CustomResourceDefinition' (by applying it's required fields, if any)
mkV1CustomResourceDefinition
  :: V1CustomResourceDefinitionSpec -- ^ 'v1CustomResourceDefinitionSpec' 
  -> V1CustomResourceDefinition
mkV1CustomResourceDefinition :: V1CustomResourceDefinitionSpec -> V1CustomResourceDefinition
mkV1CustomResourceDefinition V1CustomResourceDefinitionSpec
v1CustomResourceDefinitionSpec =
  V1CustomResourceDefinition
  { $sel:v1CustomResourceDefinitionApiVersion:V1CustomResourceDefinition :: Maybe Text
v1CustomResourceDefinitionApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1CustomResourceDefinitionKind:V1CustomResourceDefinition :: Maybe Text
v1CustomResourceDefinitionKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1CustomResourceDefinitionMetadata:V1CustomResourceDefinition :: Maybe V1ObjectMeta
v1CustomResourceDefinitionMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , V1CustomResourceDefinitionSpec
$sel:v1CustomResourceDefinitionSpec:V1CustomResourceDefinition :: V1CustomResourceDefinitionSpec
v1CustomResourceDefinitionSpec :: V1CustomResourceDefinitionSpec
v1CustomResourceDefinitionSpec
  , $sel:v1CustomResourceDefinitionStatus:V1CustomResourceDefinition :: Maybe V1CustomResourceDefinitionStatus
v1CustomResourceDefinitionStatus = Maybe V1CustomResourceDefinitionStatus
forall a. Maybe a
Nothing
  }

-- ** V1CustomResourceDefinitionCondition
-- | V1CustomResourceDefinitionCondition
-- CustomResourceDefinitionCondition contains details for the current condition of this pod.
data V1CustomResourceDefinitionCondition = V1CustomResourceDefinitionCondition
  { V1CustomResourceDefinitionCondition -> Maybe DateTime
v1CustomResourceDefinitionConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - lastTransitionTime last time the condition transitioned from one status to another.
  , V1CustomResourceDefinitionCondition -> Maybe Text
v1CustomResourceDefinitionConditionMessage :: !(Maybe Text) -- ^ "message" - message is a human-readable message indicating details about last transition.
  , V1CustomResourceDefinitionCondition -> Maybe Text
v1CustomResourceDefinitionConditionReason :: !(Maybe Text) -- ^ "reason" - reason is a unique, one-word, CamelCase reason for the condition&#39;s last transition.
  , V1CustomResourceDefinitionCondition -> Text
v1CustomResourceDefinitionConditionStatus :: !(Text) -- ^ /Required/ "status" - status is the status of the condition. Can be True, False, Unknown.
  , V1CustomResourceDefinitionCondition -> Text
v1CustomResourceDefinitionConditionType :: !(Text) -- ^ /Required/ "type" - type is the type of the condition. Types include Established, NamesAccepted and Terminating.
  } deriving (Int -> V1CustomResourceDefinitionCondition -> ShowS
[V1CustomResourceDefinitionCondition] -> ShowS
V1CustomResourceDefinitionCondition -> String
(Int -> V1CustomResourceDefinitionCondition -> ShowS)
-> (V1CustomResourceDefinitionCondition -> String)
-> ([V1CustomResourceDefinitionCondition] -> ShowS)
-> Show V1CustomResourceDefinitionCondition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CustomResourceDefinitionCondition -> ShowS
showsPrec :: Int -> V1CustomResourceDefinitionCondition -> ShowS
$cshow :: V1CustomResourceDefinitionCondition -> String
show :: V1CustomResourceDefinitionCondition -> String
$cshowList :: [V1CustomResourceDefinitionCondition] -> ShowS
showList :: [V1CustomResourceDefinitionCondition] -> ShowS
P.Show, V1CustomResourceDefinitionCondition
-> V1CustomResourceDefinitionCondition -> Bool
(V1CustomResourceDefinitionCondition
 -> V1CustomResourceDefinitionCondition -> Bool)
-> (V1CustomResourceDefinitionCondition
    -> V1CustomResourceDefinitionCondition -> Bool)
-> Eq V1CustomResourceDefinitionCondition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CustomResourceDefinitionCondition
-> V1CustomResourceDefinitionCondition -> Bool
== :: V1CustomResourceDefinitionCondition
-> V1CustomResourceDefinitionCondition -> Bool
$c/= :: V1CustomResourceDefinitionCondition
-> V1CustomResourceDefinitionCondition -> Bool
/= :: V1CustomResourceDefinitionCondition
-> V1CustomResourceDefinitionCondition -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CustomResourceDefinitionCondition
instance A.FromJSON V1CustomResourceDefinitionCondition where
  parseJSON :: Value -> Parser V1CustomResourceDefinitionCondition
parseJSON = String
-> (Object -> Parser V1CustomResourceDefinitionCondition)
-> Value
-> Parser V1CustomResourceDefinitionCondition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CustomResourceDefinitionCondition" ((Object -> Parser V1CustomResourceDefinitionCondition)
 -> Value -> Parser V1CustomResourceDefinitionCondition)
-> (Object -> Parser V1CustomResourceDefinitionCondition)
-> Value
-> Parser V1CustomResourceDefinitionCondition
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe DateTime
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> V1CustomResourceDefinitionCondition
V1CustomResourceDefinitionCondition
      (Maybe DateTime
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> Text
 -> V1CustomResourceDefinitionCondition)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> V1CustomResourceDefinitionCondition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lastTransitionTime")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> V1CustomResourceDefinitionCondition)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Text -> Text -> V1CustomResourceDefinitionCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"message")
      Parser
  (Maybe Text -> Text -> Text -> V1CustomResourceDefinitionCondition)
-> Parser (Maybe Text)
-> Parser (Text -> Text -> V1CustomResourceDefinitionCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reason")
      Parser (Text -> Text -> V1CustomResourceDefinitionCondition)
-> Parser Text
-> Parser (Text -> V1CustomResourceDefinitionCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"status")
      Parser (Text -> V1CustomResourceDefinitionCondition)
-> Parser Text -> Parser V1CustomResourceDefinitionCondition
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"type")

-- | ToJSON V1CustomResourceDefinitionCondition
instance A.ToJSON V1CustomResourceDefinitionCondition where
  toJSON :: V1CustomResourceDefinitionCondition -> Value
toJSON V1CustomResourceDefinitionCondition {Maybe Text
Maybe DateTime
Text
$sel:v1CustomResourceDefinitionConditionLastTransitionTime:V1CustomResourceDefinitionCondition :: V1CustomResourceDefinitionCondition -> Maybe DateTime
$sel:v1CustomResourceDefinitionConditionMessage:V1CustomResourceDefinitionCondition :: V1CustomResourceDefinitionCondition -> Maybe Text
$sel:v1CustomResourceDefinitionConditionReason:V1CustomResourceDefinitionCondition :: V1CustomResourceDefinitionCondition -> Maybe Text
$sel:v1CustomResourceDefinitionConditionStatus:V1CustomResourceDefinitionCondition :: V1CustomResourceDefinitionCondition -> Text
$sel:v1CustomResourceDefinitionConditionType:V1CustomResourceDefinitionCondition :: V1CustomResourceDefinitionCondition -> Text
v1CustomResourceDefinitionConditionLastTransitionTime :: Maybe DateTime
v1CustomResourceDefinitionConditionMessage :: Maybe Text
v1CustomResourceDefinitionConditionReason :: Maybe Text
v1CustomResourceDefinitionConditionStatus :: Text
v1CustomResourceDefinitionConditionType :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"lastTransitionTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1CustomResourceDefinitionConditionLastTransitionTime
      , Key
"message" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CustomResourceDefinitionConditionMessage
      , Key
"reason" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CustomResourceDefinitionConditionReason
      , Key
"status" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1CustomResourceDefinitionConditionStatus
      , Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1CustomResourceDefinitionConditionType
      ]


-- | Construct a value of type 'V1CustomResourceDefinitionCondition' (by applying it's required fields, if any)
mkV1CustomResourceDefinitionCondition
  :: Text -- ^ 'v1CustomResourceDefinitionConditionStatus': status is the status of the condition. Can be True, False, Unknown.
  -> Text -- ^ 'v1CustomResourceDefinitionConditionType': type is the type of the condition. Types include Established, NamesAccepted and Terminating.
  -> V1CustomResourceDefinitionCondition
mkV1CustomResourceDefinitionCondition :: Text -> Text -> V1CustomResourceDefinitionCondition
mkV1CustomResourceDefinitionCondition Text
v1CustomResourceDefinitionConditionStatus Text
v1CustomResourceDefinitionConditionType =
  V1CustomResourceDefinitionCondition
  { $sel:v1CustomResourceDefinitionConditionLastTransitionTime:V1CustomResourceDefinitionCondition :: Maybe DateTime
v1CustomResourceDefinitionConditionLastTransitionTime = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1CustomResourceDefinitionConditionMessage:V1CustomResourceDefinitionCondition :: Maybe Text
v1CustomResourceDefinitionConditionMessage = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1CustomResourceDefinitionConditionReason:V1CustomResourceDefinitionCondition :: Maybe Text
v1CustomResourceDefinitionConditionReason = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1CustomResourceDefinitionConditionStatus:V1CustomResourceDefinitionCondition :: Text
v1CustomResourceDefinitionConditionStatus :: Text
v1CustomResourceDefinitionConditionStatus
  , Text
$sel:v1CustomResourceDefinitionConditionType:V1CustomResourceDefinitionCondition :: Text
v1CustomResourceDefinitionConditionType :: Text
v1CustomResourceDefinitionConditionType
  }

-- ** V1CustomResourceDefinitionList
-- | V1CustomResourceDefinitionList
-- CustomResourceDefinitionList is a list of CustomResourceDefinition objects.
data V1CustomResourceDefinitionList = V1CustomResourceDefinitionList
  { V1CustomResourceDefinitionList -> Maybe Text
v1CustomResourceDefinitionListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1CustomResourceDefinitionList -> [V1CustomResourceDefinition]
v1CustomResourceDefinitionListItems :: !([V1CustomResourceDefinition]) -- ^ /Required/ "items" - items list individual CustomResourceDefinition objects
  , V1CustomResourceDefinitionList -> Maybe Text
v1CustomResourceDefinitionListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1CustomResourceDefinitionList -> Maybe V1ListMeta
v1CustomResourceDefinitionListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1CustomResourceDefinitionList -> ShowS
[V1CustomResourceDefinitionList] -> ShowS
V1CustomResourceDefinitionList -> String
(Int -> V1CustomResourceDefinitionList -> ShowS)
-> (V1CustomResourceDefinitionList -> String)
-> ([V1CustomResourceDefinitionList] -> ShowS)
-> Show V1CustomResourceDefinitionList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CustomResourceDefinitionList -> ShowS
showsPrec :: Int -> V1CustomResourceDefinitionList -> ShowS
$cshow :: V1CustomResourceDefinitionList -> String
show :: V1CustomResourceDefinitionList -> String
$cshowList :: [V1CustomResourceDefinitionList] -> ShowS
showList :: [V1CustomResourceDefinitionList] -> ShowS
P.Show, V1CustomResourceDefinitionList
-> V1CustomResourceDefinitionList -> Bool
(V1CustomResourceDefinitionList
 -> V1CustomResourceDefinitionList -> Bool)
-> (V1CustomResourceDefinitionList
    -> V1CustomResourceDefinitionList -> Bool)
-> Eq V1CustomResourceDefinitionList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CustomResourceDefinitionList
-> V1CustomResourceDefinitionList -> Bool
== :: V1CustomResourceDefinitionList
-> V1CustomResourceDefinitionList -> Bool
$c/= :: V1CustomResourceDefinitionList
-> V1CustomResourceDefinitionList -> Bool
/= :: V1CustomResourceDefinitionList
-> V1CustomResourceDefinitionList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CustomResourceDefinitionList
instance A.FromJSON V1CustomResourceDefinitionList where
  parseJSON :: Value -> Parser V1CustomResourceDefinitionList
parseJSON = String
-> (Object -> Parser V1CustomResourceDefinitionList)
-> Value
-> Parser V1CustomResourceDefinitionList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CustomResourceDefinitionList" ((Object -> Parser V1CustomResourceDefinitionList)
 -> Value -> Parser V1CustomResourceDefinitionList)
-> (Object -> Parser V1CustomResourceDefinitionList)
-> Value
-> Parser V1CustomResourceDefinitionList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1CustomResourceDefinition]
-> Maybe Text
-> Maybe V1ListMeta
-> V1CustomResourceDefinitionList
V1CustomResourceDefinitionList
      (Maybe Text
 -> [V1CustomResourceDefinition]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1CustomResourceDefinitionList)
-> Parser (Maybe Text)
-> Parser
     ([V1CustomResourceDefinition]
      -> Maybe Text
      -> Maybe V1ListMeta
      -> V1CustomResourceDefinitionList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1CustomResourceDefinition]
   -> Maybe Text
   -> Maybe V1ListMeta
   -> V1CustomResourceDefinitionList)
-> Parser [V1CustomResourceDefinition]
-> Parser
     (Maybe Text -> Maybe V1ListMeta -> V1CustomResourceDefinitionList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1CustomResourceDefinition]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser
  (Maybe Text -> Maybe V1ListMeta -> V1CustomResourceDefinitionList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1CustomResourceDefinitionList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1CustomResourceDefinitionList)
-> Parser (Maybe V1ListMeta)
-> Parser V1CustomResourceDefinitionList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1CustomResourceDefinitionList
instance A.ToJSON V1CustomResourceDefinitionList where
  toJSON :: V1CustomResourceDefinitionList -> Value
toJSON V1CustomResourceDefinitionList {[V1CustomResourceDefinition]
Maybe Text
Maybe V1ListMeta
$sel:v1CustomResourceDefinitionListApiVersion:V1CustomResourceDefinitionList :: V1CustomResourceDefinitionList -> Maybe Text
$sel:v1CustomResourceDefinitionListItems:V1CustomResourceDefinitionList :: V1CustomResourceDefinitionList -> [V1CustomResourceDefinition]
$sel:v1CustomResourceDefinitionListKind:V1CustomResourceDefinitionList :: V1CustomResourceDefinitionList -> Maybe Text
$sel:v1CustomResourceDefinitionListMetadata:V1CustomResourceDefinitionList :: V1CustomResourceDefinitionList -> Maybe V1ListMeta
v1CustomResourceDefinitionListApiVersion :: Maybe Text
v1CustomResourceDefinitionListItems :: [V1CustomResourceDefinition]
v1CustomResourceDefinitionListKind :: Maybe Text
v1CustomResourceDefinitionListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CustomResourceDefinitionListApiVersion
      , Key
"items" Key -> [V1CustomResourceDefinition] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1CustomResourceDefinition]
v1CustomResourceDefinitionListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CustomResourceDefinitionListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1CustomResourceDefinitionListMetadata
      ]


-- | Construct a value of type 'V1CustomResourceDefinitionList' (by applying it's required fields, if any)
mkV1CustomResourceDefinitionList
  :: [V1CustomResourceDefinition] -- ^ 'v1CustomResourceDefinitionListItems': items list individual CustomResourceDefinition objects
  -> V1CustomResourceDefinitionList
mkV1CustomResourceDefinitionList :: [V1CustomResourceDefinition] -> V1CustomResourceDefinitionList
mkV1CustomResourceDefinitionList [V1CustomResourceDefinition]
v1CustomResourceDefinitionListItems =
  V1CustomResourceDefinitionList
  { $sel:v1CustomResourceDefinitionListApiVersion:V1CustomResourceDefinitionList :: Maybe Text
v1CustomResourceDefinitionListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1CustomResourceDefinition]
$sel:v1CustomResourceDefinitionListItems:V1CustomResourceDefinitionList :: [V1CustomResourceDefinition]
v1CustomResourceDefinitionListItems :: [V1CustomResourceDefinition]
v1CustomResourceDefinitionListItems
  , $sel:v1CustomResourceDefinitionListKind:V1CustomResourceDefinitionList :: Maybe Text
v1CustomResourceDefinitionListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1CustomResourceDefinitionListMetadata:V1CustomResourceDefinitionList :: Maybe V1ListMeta
v1CustomResourceDefinitionListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1CustomResourceDefinitionNames
-- | V1CustomResourceDefinitionNames
-- CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition
data V1CustomResourceDefinitionNames = V1CustomResourceDefinitionNames
  { V1CustomResourceDefinitionNames -> Maybe [Text]
v1CustomResourceDefinitionNamesCategories :: !(Maybe [Text]) -- ^ "categories" - categories is a list of grouped resources this custom resource belongs to (e.g. &#39;all&#39;). This is published in API discovery documents, and used by clients to support invocations like &#x60;kubectl get all&#x60;.
  , V1CustomResourceDefinitionNames -> Text
v1CustomResourceDefinitionNamesKind :: !(Text) -- ^ /Required/ "kind" - kind is the serialized kind of the resource. It is normally CamelCase and singular. Custom resource instances will use this value as the &#x60;kind&#x60; attribute in API calls.
  , V1CustomResourceDefinitionNames -> Maybe Text
v1CustomResourceDefinitionNamesListKind :: !(Maybe Text) -- ^ "listKind" - listKind is the serialized kind of the list for this resource. Defaults to \&quot;&#x60;kind&#x60;List\&quot;.
  , V1CustomResourceDefinitionNames -> Text
v1CustomResourceDefinitionNamesPlural :: !(Text) -- ^ /Required/ "plural" - plural is the plural name of the resource to serve. The custom resources are served under &#x60;/apis/&lt;group&gt;/&lt;version&gt;/.../&lt;plural&gt;&#x60;. Must match the name of the CustomResourceDefinition (in the form &#x60;&lt;names.plural&gt;.&lt;group&gt;&#x60;). Must be all lowercase.
  , V1CustomResourceDefinitionNames -> Maybe [Text]
v1CustomResourceDefinitionNamesShortNames :: !(Maybe [Text]) -- ^ "shortNames" - shortNames are short names for the resource, exposed in API discovery documents, and used by clients to support invocations like &#x60;kubectl get &lt;shortname&gt;&#x60;. It must be all lowercase.
  , V1CustomResourceDefinitionNames -> Maybe Text
v1CustomResourceDefinitionNamesSingular :: !(Maybe Text) -- ^ "singular" - singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased &#x60;kind&#x60;.
  } deriving (Int -> V1CustomResourceDefinitionNames -> ShowS
[V1CustomResourceDefinitionNames] -> ShowS
V1CustomResourceDefinitionNames -> String
(Int -> V1CustomResourceDefinitionNames -> ShowS)
-> (V1CustomResourceDefinitionNames -> String)
-> ([V1CustomResourceDefinitionNames] -> ShowS)
-> Show V1CustomResourceDefinitionNames
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CustomResourceDefinitionNames -> ShowS
showsPrec :: Int -> V1CustomResourceDefinitionNames -> ShowS
$cshow :: V1CustomResourceDefinitionNames -> String
show :: V1CustomResourceDefinitionNames -> String
$cshowList :: [V1CustomResourceDefinitionNames] -> ShowS
showList :: [V1CustomResourceDefinitionNames] -> ShowS
P.Show, V1CustomResourceDefinitionNames
-> V1CustomResourceDefinitionNames -> Bool
(V1CustomResourceDefinitionNames
 -> V1CustomResourceDefinitionNames -> Bool)
-> (V1CustomResourceDefinitionNames
    -> V1CustomResourceDefinitionNames -> Bool)
-> Eq V1CustomResourceDefinitionNames
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CustomResourceDefinitionNames
-> V1CustomResourceDefinitionNames -> Bool
== :: V1CustomResourceDefinitionNames
-> V1CustomResourceDefinitionNames -> Bool
$c/= :: V1CustomResourceDefinitionNames
-> V1CustomResourceDefinitionNames -> Bool
/= :: V1CustomResourceDefinitionNames
-> V1CustomResourceDefinitionNames -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CustomResourceDefinitionNames
instance A.FromJSON V1CustomResourceDefinitionNames where
  parseJSON :: Value -> Parser V1CustomResourceDefinitionNames
parseJSON = String
-> (Object -> Parser V1CustomResourceDefinitionNames)
-> Value
-> Parser V1CustomResourceDefinitionNames
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CustomResourceDefinitionNames" ((Object -> Parser V1CustomResourceDefinitionNames)
 -> Value -> Parser V1CustomResourceDefinitionNames)
-> (Object -> Parser V1CustomResourceDefinitionNames)
-> Value
-> Parser V1CustomResourceDefinitionNames
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [Text]
-> Text
-> Maybe Text
-> Text
-> Maybe [Text]
-> Maybe Text
-> V1CustomResourceDefinitionNames
V1CustomResourceDefinitionNames
      (Maybe [Text]
 -> Text
 -> Maybe Text
 -> Text
 -> Maybe [Text]
 -> Maybe Text
 -> V1CustomResourceDefinitionNames)
-> Parser (Maybe [Text])
-> Parser
     (Text
      -> Maybe Text
      -> Text
      -> Maybe [Text]
      -> Maybe Text
      -> V1CustomResourceDefinitionNames)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"categories")
      Parser
  (Text
   -> Maybe Text
   -> Text
   -> Maybe [Text]
   -> Maybe Text
   -> V1CustomResourceDefinitionNames)
-> Parser Text
-> Parser
     (Maybe Text
      -> Text
      -> Maybe [Text]
      -> Maybe Text
      -> V1CustomResourceDefinitionNames)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"kind")
      Parser
  (Maybe Text
   -> Text
   -> Maybe [Text]
   -> Maybe Text
   -> V1CustomResourceDefinitionNames)
-> Parser (Maybe Text)
-> Parser
     (Text
      -> Maybe [Text] -> Maybe Text -> V1CustomResourceDefinitionNames)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"listKind")
      Parser
  (Text
   -> Maybe [Text] -> Maybe Text -> V1CustomResourceDefinitionNames)
-> Parser Text
-> Parser
     (Maybe [Text] -> Maybe Text -> V1CustomResourceDefinitionNames)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"plural")
      Parser
  (Maybe [Text] -> Maybe Text -> V1CustomResourceDefinitionNames)
-> Parser (Maybe [Text])
-> Parser (Maybe Text -> V1CustomResourceDefinitionNames)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"shortNames")
      Parser (Maybe Text -> V1CustomResourceDefinitionNames)
-> Parser (Maybe Text) -> Parser V1CustomResourceDefinitionNames
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"singular")

-- | ToJSON V1CustomResourceDefinitionNames
instance A.ToJSON V1CustomResourceDefinitionNames where
  toJSON :: V1CustomResourceDefinitionNames -> Value
toJSON V1CustomResourceDefinitionNames {Maybe [Text]
Maybe Text
Text
$sel:v1CustomResourceDefinitionNamesCategories:V1CustomResourceDefinitionNames :: V1CustomResourceDefinitionNames -> Maybe [Text]
$sel:v1CustomResourceDefinitionNamesKind:V1CustomResourceDefinitionNames :: V1CustomResourceDefinitionNames -> Text
$sel:v1CustomResourceDefinitionNamesListKind:V1CustomResourceDefinitionNames :: V1CustomResourceDefinitionNames -> Maybe Text
$sel:v1CustomResourceDefinitionNamesPlural:V1CustomResourceDefinitionNames :: V1CustomResourceDefinitionNames -> Text
$sel:v1CustomResourceDefinitionNamesShortNames:V1CustomResourceDefinitionNames :: V1CustomResourceDefinitionNames -> Maybe [Text]
$sel:v1CustomResourceDefinitionNamesSingular:V1CustomResourceDefinitionNames :: V1CustomResourceDefinitionNames -> Maybe Text
v1CustomResourceDefinitionNamesCategories :: Maybe [Text]
v1CustomResourceDefinitionNamesKind :: Text
v1CustomResourceDefinitionNamesListKind :: Maybe Text
v1CustomResourceDefinitionNamesPlural :: Text
v1CustomResourceDefinitionNamesShortNames :: Maybe [Text]
v1CustomResourceDefinitionNamesSingular :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"categories" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1CustomResourceDefinitionNamesCategories
      , Key
"kind" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1CustomResourceDefinitionNamesKind
      , Key
"listKind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CustomResourceDefinitionNamesListKind
      , Key
"plural" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1CustomResourceDefinitionNamesPlural
      , Key
"shortNames" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1CustomResourceDefinitionNamesShortNames
      , Key
"singular" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CustomResourceDefinitionNamesSingular
      ]


-- | Construct a value of type 'V1CustomResourceDefinitionNames' (by applying it's required fields, if any)
mkV1CustomResourceDefinitionNames
  :: Text -- ^ 'v1CustomResourceDefinitionNamesKind': kind is the serialized kind of the resource. It is normally CamelCase and singular. Custom resource instances will use this value as the `kind` attribute in API calls.
  -> Text -- ^ 'v1CustomResourceDefinitionNamesPlural': plural is the plural name of the resource to serve. The custom resources are served under `/apis/<group>/<version>/.../<plural>`. Must match the name of the CustomResourceDefinition (in the form `<names.plural>.<group>`). Must be all lowercase.
  -> V1CustomResourceDefinitionNames
mkV1CustomResourceDefinitionNames :: Text -> Text -> V1CustomResourceDefinitionNames
mkV1CustomResourceDefinitionNames Text
v1CustomResourceDefinitionNamesKind Text
v1CustomResourceDefinitionNamesPlural =
  V1CustomResourceDefinitionNames
  { $sel:v1CustomResourceDefinitionNamesCategories:V1CustomResourceDefinitionNames :: Maybe [Text]
v1CustomResourceDefinitionNamesCategories = Maybe [Text]
forall a. Maybe a
Nothing
  , Text
$sel:v1CustomResourceDefinitionNamesKind:V1CustomResourceDefinitionNames :: Text
v1CustomResourceDefinitionNamesKind :: Text
v1CustomResourceDefinitionNamesKind
  , $sel:v1CustomResourceDefinitionNamesListKind:V1CustomResourceDefinitionNames :: Maybe Text
v1CustomResourceDefinitionNamesListKind = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1CustomResourceDefinitionNamesPlural:V1CustomResourceDefinitionNames :: Text
v1CustomResourceDefinitionNamesPlural :: Text
v1CustomResourceDefinitionNamesPlural
  , $sel:v1CustomResourceDefinitionNamesShortNames:V1CustomResourceDefinitionNames :: Maybe [Text]
v1CustomResourceDefinitionNamesShortNames = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1CustomResourceDefinitionNamesSingular:V1CustomResourceDefinitionNames :: Maybe Text
v1CustomResourceDefinitionNamesSingular = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1CustomResourceDefinitionSpec
-- | V1CustomResourceDefinitionSpec
-- CustomResourceDefinitionSpec describes how a user wants their resource to appear
data V1CustomResourceDefinitionSpec = V1CustomResourceDefinitionSpec
  { V1CustomResourceDefinitionSpec -> Maybe V1CustomResourceConversion
v1CustomResourceDefinitionSpecConversion :: !(Maybe V1CustomResourceConversion) -- ^ "conversion"
  , V1CustomResourceDefinitionSpec -> Text
v1CustomResourceDefinitionSpecGroup :: !(Text) -- ^ /Required/ "group" - group is the API group of the defined custom resource. The custom resources are served under &#x60;/apis/&lt;group&gt;/...&#x60;. Must match the name of the CustomResourceDefinition (in the form &#x60;&lt;names.plural&gt;.&lt;group&gt;&#x60;).
  , V1CustomResourceDefinitionSpec -> V1CustomResourceDefinitionNames
v1CustomResourceDefinitionSpecNames :: !(V1CustomResourceDefinitionNames) -- ^ /Required/ "names"
  , V1CustomResourceDefinitionSpec -> Maybe Bool
v1CustomResourceDefinitionSpecPreserveUnknownFields :: !(Maybe Bool) -- ^ "preserveUnknownFields" - preserveUnknownFields indicates that object fields which are not specified in the OpenAPI schema should be preserved when persisting to storage. apiVersion, kind, metadata and known fields inside metadata are always preserved. This field is deprecated in favor of setting &#x60;x-preserve-unknown-fields&#x60; to true in &#x60;spec.versions[*].schema.openAPIV3Schema&#x60;. See https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#field-pruning for details.
  , V1CustomResourceDefinitionSpec -> Text
v1CustomResourceDefinitionSpecScope :: !(Text) -- ^ /Required/ "scope" - scope indicates whether the defined custom resource is cluster- or namespace-scoped. Allowed values are &#x60;Cluster&#x60; and &#x60;Namespaced&#x60;.
  , V1CustomResourceDefinitionSpec
-> [V1CustomResourceDefinitionVersion]
v1CustomResourceDefinitionSpecVersions :: !([V1CustomResourceDefinitionVersion]) -- ^ /Required/ "versions" - versions is the list of all API versions of the defined custom resource. Version names are used to compute the order in which served versions are listed in API discovery. If the version string is \&quot;kube-like\&quot;, it will sort above non \&quot;kube-like\&quot; version strings, which are ordered lexicographically. \&quot;Kube-like\&quot; versions start with a \&quot;v\&quot;, then are followed by a number (the major version), then optionally the string \&quot;alpha\&quot; or \&quot;beta\&quot; and another number (the minor version). These are sorted first by GA &gt; beta &gt; alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.
  } deriving (Int -> V1CustomResourceDefinitionSpec -> ShowS
[V1CustomResourceDefinitionSpec] -> ShowS
V1CustomResourceDefinitionSpec -> String
(Int -> V1CustomResourceDefinitionSpec -> ShowS)
-> (V1CustomResourceDefinitionSpec -> String)
-> ([V1CustomResourceDefinitionSpec] -> ShowS)
-> Show V1CustomResourceDefinitionSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CustomResourceDefinitionSpec -> ShowS
showsPrec :: Int -> V1CustomResourceDefinitionSpec -> ShowS
$cshow :: V1CustomResourceDefinitionSpec -> String
show :: V1CustomResourceDefinitionSpec -> String
$cshowList :: [V1CustomResourceDefinitionSpec] -> ShowS
showList :: [V1CustomResourceDefinitionSpec] -> ShowS
P.Show, V1CustomResourceDefinitionSpec
-> V1CustomResourceDefinitionSpec -> Bool
(V1CustomResourceDefinitionSpec
 -> V1CustomResourceDefinitionSpec -> Bool)
-> (V1CustomResourceDefinitionSpec
    -> V1CustomResourceDefinitionSpec -> Bool)
-> Eq V1CustomResourceDefinitionSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CustomResourceDefinitionSpec
-> V1CustomResourceDefinitionSpec -> Bool
== :: V1CustomResourceDefinitionSpec
-> V1CustomResourceDefinitionSpec -> Bool
$c/= :: V1CustomResourceDefinitionSpec
-> V1CustomResourceDefinitionSpec -> Bool
/= :: V1CustomResourceDefinitionSpec
-> V1CustomResourceDefinitionSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CustomResourceDefinitionSpec
instance A.FromJSON V1CustomResourceDefinitionSpec where
  parseJSON :: Value -> Parser V1CustomResourceDefinitionSpec
parseJSON = String
-> (Object -> Parser V1CustomResourceDefinitionSpec)
-> Value
-> Parser V1CustomResourceDefinitionSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CustomResourceDefinitionSpec" ((Object -> Parser V1CustomResourceDefinitionSpec)
 -> Value -> Parser V1CustomResourceDefinitionSpec)
-> (Object -> Parser V1CustomResourceDefinitionSpec)
-> Value
-> Parser V1CustomResourceDefinitionSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1CustomResourceConversion
-> Text
-> V1CustomResourceDefinitionNames
-> Maybe Bool
-> Text
-> [V1CustomResourceDefinitionVersion]
-> V1CustomResourceDefinitionSpec
V1CustomResourceDefinitionSpec
      (Maybe V1CustomResourceConversion
 -> Text
 -> V1CustomResourceDefinitionNames
 -> Maybe Bool
 -> Text
 -> [V1CustomResourceDefinitionVersion]
 -> V1CustomResourceDefinitionSpec)
-> Parser (Maybe V1CustomResourceConversion)
-> Parser
     (Text
      -> V1CustomResourceDefinitionNames
      -> Maybe Bool
      -> Text
      -> [V1CustomResourceDefinitionVersion]
      -> V1CustomResourceDefinitionSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1CustomResourceConversion)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"conversion")
      Parser
  (Text
   -> V1CustomResourceDefinitionNames
   -> Maybe Bool
   -> Text
   -> [V1CustomResourceDefinitionVersion]
   -> V1CustomResourceDefinitionSpec)
-> Parser Text
-> Parser
     (V1CustomResourceDefinitionNames
      -> Maybe Bool
      -> Text
      -> [V1CustomResourceDefinitionVersion]
      -> V1CustomResourceDefinitionSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"group")
      Parser
  (V1CustomResourceDefinitionNames
   -> Maybe Bool
   -> Text
   -> [V1CustomResourceDefinitionVersion]
   -> V1CustomResourceDefinitionSpec)
-> Parser V1CustomResourceDefinitionNames
-> Parser
     (Maybe Bool
      -> Text
      -> [V1CustomResourceDefinitionVersion]
      -> V1CustomResourceDefinitionSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1CustomResourceDefinitionNames
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"names")
      Parser
  (Maybe Bool
   -> Text
   -> [V1CustomResourceDefinitionVersion]
   -> V1CustomResourceDefinitionSpec)
-> Parser (Maybe Bool)
-> Parser
     (Text
      -> [V1CustomResourceDefinitionVersion]
      -> V1CustomResourceDefinitionSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"preserveUnknownFields")
      Parser
  (Text
   -> [V1CustomResourceDefinitionVersion]
   -> V1CustomResourceDefinitionSpec)
-> Parser Text
-> Parser
     ([V1CustomResourceDefinitionVersion]
      -> V1CustomResourceDefinitionSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"scope")
      Parser
  ([V1CustomResourceDefinitionVersion]
   -> V1CustomResourceDefinitionSpec)
-> Parser [V1CustomResourceDefinitionVersion]
-> Parser V1CustomResourceDefinitionSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1CustomResourceDefinitionVersion]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"versions")

-- | ToJSON V1CustomResourceDefinitionSpec
instance A.ToJSON V1CustomResourceDefinitionSpec where
  toJSON :: V1CustomResourceDefinitionSpec -> Value
toJSON V1CustomResourceDefinitionSpec {[V1CustomResourceDefinitionVersion]
Maybe Bool
Maybe V1CustomResourceConversion
Text
V1CustomResourceDefinitionNames
$sel:v1CustomResourceDefinitionSpecConversion:V1CustomResourceDefinitionSpec :: V1CustomResourceDefinitionSpec -> Maybe V1CustomResourceConversion
$sel:v1CustomResourceDefinitionSpecGroup:V1CustomResourceDefinitionSpec :: V1CustomResourceDefinitionSpec -> Text
$sel:v1CustomResourceDefinitionSpecNames:V1CustomResourceDefinitionSpec :: V1CustomResourceDefinitionSpec -> V1CustomResourceDefinitionNames
$sel:v1CustomResourceDefinitionSpecPreserveUnknownFields:V1CustomResourceDefinitionSpec :: V1CustomResourceDefinitionSpec -> Maybe Bool
$sel:v1CustomResourceDefinitionSpecScope:V1CustomResourceDefinitionSpec :: V1CustomResourceDefinitionSpec -> Text
$sel:v1CustomResourceDefinitionSpecVersions:V1CustomResourceDefinitionSpec :: V1CustomResourceDefinitionSpec
-> [V1CustomResourceDefinitionVersion]
v1CustomResourceDefinitionSpecConversion :: Maybe V1CustomResourceConversion
v1CustomResourceDefinitionSpecGroup :: Text
v1CustomResourceDefinitionSpecNames :: V1CustomResourceDefinitionNames
v1CustomResourceDefinitionSpecPreserveUnknownFields :: Maybe Bool
v1CustomResourceDefinitionSpecScope :: Text
v1CustomResourceDefinitionSpecVersions :: [V1CustomResourceDefinitionVersion]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"conversion" Key -> Maybe V1CustomResourceConversion -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1CustomResourceConversion
v1CustomResourceDefinitionSpecConversion
      , Key
"group" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1CustomResourceDefinitionSpecGroup
      , Key
"names" Key -> V1CustomResourceDefinitionNames -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1CustomResourceDefinitionNames
v1CustomResourceDefinitionSpecNames
      , Key
"preserveUnknownFields" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1CustomResourceDefinitionSpecPreserveUnknownFields
      , Key
"scope" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1CustomResourceDefinitionSpecScope
      , Key
"versions" Key -> [V1CustomResourceDefinitionVersion] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1CustomResourceDefinitionVersion]
v1CustomResourceDefinitionSpecVersions
      ]


-- | Construct a value of type 'V1CustomResourceDefinitionSpec' (by applying it's required fields, if any)
mkV1CustomResourceDefinitionSpec
  :: Text -- ^ 'v1CustomResourceDefinitionSpecGroup': group is the API group of the defined custom resource. The custom resources are served under `/apis/<group>/...`. Must match the name of the CustomResourceDefinition (in the form `<names.plural>.<group>`).
  -> V1CustomResourceDefinitionNames -- ^ 'v1CustomResourceDefinitionSpecNames' 
  -> Text -- ^ 'v1CustomResourceDefinitionSpecScope': scope indicates whether the defined custom resource is cluster- or namespace-scoped. Allowed values are `Cluster` and `Namespaced`.
  -> [V1CustomResourceDefinitionVersion] -- ^ 'v1CustomResourceDefinitionSpecVersions': versions is the list of all API versions of the defined custom resource. Version names are used to compute the order in which served versions are listed in API discovery. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.
  -> V1CustomResourceDefinitionSpec
mkV1CustomResourceDefinitionSpec :: Text
-> V1CustomResourceDefinitionNames
-> Text
-> [V1CustomResourceDefinitionVersion]
-> V1CustomResourceDefinitionSpec
mkV1CustomResourceDefinitionSpec Text
v1CustomResourceDefinitionSpecGroup V1CustomResourceDefinitionNames
v1CustomResourceDefinitionSpecNames Text
v1CustomResourceDefinitionSpecScope [V1CustomResourceDefinitionVersion]
v1CustomResourceDefinitionSpecVersions =
  V1CustomResourceDefinitionSpec
  { $sel:v1CustomResourceDefinitionSpecConversion:V1CustomResourceDefinitionSpec :: Maybe V1CustomResourceConversion
v1CustomResourceDefinitionSpecConversion = Maybe V1CustomResourceConversion
forall a. Maybe a
Nothing
  , Text
$sel:v1CustomResourceDefinitionSpecGroup:V1CustomResourceDefinitionSpec :: Text
v1CustomResourceDefinitionSpecGroup :: Text
v1CustomResourceDefinitionSpecGroup
  , V1CustomResourceDefinitionNames
$sel:v1CustomResourceDefinitionSpecNames:V1CustomResourceDefinitionSpec :: V1CustomResourceDefinitionNames
v1CustomResourceDefinitionSpecNames :: V1CustomResourceDefinitionNames
v1CustomResourceDefinitionSpecNames
  , $sel:v1CustomResourceDefinitionSpecPreserveUnknownFields:V1CustomResourceDefinitionSpec :: Maybe Bool
v1CustomResourceDefinitionSpecPreserveUnknownFields = Maybe Bool
forall a. Maybe a
Nothing
  , Text
$sel:v1CustomResourceDefinitionSpecScope:V1CustomResourceDefinitionSpec :: Text
v1CustomResourceDefinitionSpecScope :: Text
v1CustomResourceDefinitionSpecScope
  , [V1CustomResourceDefinitionVersion]
$sel:v1CustomResourceDefinitionSpecVersions:V1CustomResourceDefinitionSpec :: [V1CustomResourceDefinitionVersion]
v1CustomResourceDefinitionSpecVersions :: [V1CustomResourceDefinitionVersion]
v1CustomResourceDefinitionSpecVersions
  }

-- ** V1CustomResourceDefinitionStatus
-- | V1CustomResourceDefinitionStatus
-- CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition
data V1CustomResourceDefinitionStatus = V1CustomResourceDefinitionStatus
  { V1CustomResourceDefinitionStatus
-> Maybe V1CustomResourceDefinitionNames
v1CustomResourceDefinitionStatusAcceptedNames :: !(Maybe V1CustomResourceDefinitionNames) -- ^ "acceptedNames"
  , V1CustomResourceDefinitionStatus
-> Maybe [V1CustomResourceDefinitionCondition]
v1CustomResourceDefinitionStatusConditions :: !(Maybe [V1CustomResourceDefinitionCondition]) -- ^ "conditions" - conditions indicate state for particular aspects of a CustomResourceDefinition
  , V1CustomResourceDefinitionStatus -> Maybe [Text]
v1CustomResourceDefinitionStatusStoredVersions :: !(Maybe [Text]) -- ^ "storedVersions" - storedVersions lists all versions of CustomResources that were ever persisted. Tracking these versions allows a migration path for stored versions in etcd. The field is mutable so a migration controller can finish a migration to another version (ensuring no old objects are left in storage), and then remove the rest of the versions from this list. Versions may not be removed from &#x60;spec.versions&#x60; while they exist in this list.
  } deriving (Int -> V1CustomResourceDefinitionStatus -> ShowS
[V1CustomResourceDefinitionStatus] -> ShowS
V1CustomResourceDefinitionStatus -> String
(Int -> V1CustomResourceDefinitionStatus -> ShowS)
-> (V1CustomResourceDefinitionStatus -> String)
-> ([V1CustomResourceDefinitionStatus] -> ShowS)
-> Show V1CustomResourceDefinitionStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CustomResourceDefinitionStatus -> ShowS
showsPrec :: Int -> V1CustomResourceDefinitionStatus -> ShowS
$cshow :: V1CustomResourceDefinitionStatus -> String
show :: V1CustomResourceDefinitionStatus -> String
$cshowList :: [V1CustomResourceDefinitionStatus] -> ShowS
showList :: [V1CustomResourceDefinitionStatus] -> ShowS
P.Show, V1CustomResourceDefinitionStatus
-> V1CustomResourceDefinitionStatus -> Bool
(V1CustomResourceDefinitionStatus
 -> V1CustomResourceDefinitionStatus -> Bool)
-> (V1CustomResourceDefinitionStatus
    -> V1CustomResourceDefinitionStatus -> Bool)
-> Eq V1CustomResourceDefinitionStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CustomResourceDefinitionStatus
-> V1CustomResourceDefinitionStatus -> Bool
== :: V1CustomResourceDefinitionStatus
-> V1CustomResourceDefinitionStatus -> Bool
$c/= :: V1CustomResourceDefinitionStatus
-> V1CustomResourceDefinitionStatus -> Bool
/= :: V1CustomResourceDefinitionStatus
-> V1CustomResourceDefinitionStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CustomResourceDefinitionStatus
instance A.FromJSON V1CustomResourceDefinitionStatus where
  parseJSON :: Value -> Parser V1CustomResourceDefinitionStatus
parseJSON = String
-> (Object -> Parser V1CustomResourceDefinitionStatus)
-> Value
-> Parser V1CustomResourceDefinitionStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CustomResourceDefinitionStatus" ((Object -> Parser V1CustomResourceDefinitionStatus)
 -> Value -> Parser V1CustomResourceDefinitionStatus)
-> (Object -> Parser V1CustomResourceDefinitionStatus)
-> Value
-> Parser V1CustomResourceDefinitionStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1CustomResourceDefinitionNames
-> Maybe [V1CustomResourceDefinitionCondition]
-> Maybe [Text]
-> V1CustomResourceDefinitionStatus
V1CustomResourceDefinitionStatus
      (Maybe V1CustomResourceDefinitionNames
 -> Maybe [V1CustomResourceDefinitionCondition]
 -> Maybe [Text]
 -> V1CustomResourceDefinitionStatus)
-> Parser (Maybe V1CustomResourceDefinitionNames)
-> Parser
     (Maybe [V1CustomResourceDefinitionCondition]
      -> Maybe [Text] -> V1CustomResourceDefinitionStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1CustomResourceDefinitionNames)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"acceptedNames")
      Parser
  (Maybe [V1CustomResourceDefinitionCondition]
   -> Maybe [Text] -> V1CustomResourceDefinitionStatus)
-> Parser (Maybe [V1CustomResourceDefinitionCondition])
-> Parser (Maybe [Text] -> V1CustomResourceDefinitionStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object
-> Key -> Parser (Maybe [V1CustomResourceDefinitionCondition])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"conditions")
      Parser (Maybe [Text] -> V1CustomResourceDefinitionStatus)
-> Parser (Maybe [Text]) -> Parser V1CustomResourceDefinitionStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"storedVersions")

-- | ToJSON V1CustomResourceDefinitionStatus
instance A.ToJSON V1CustomResourceDefinitionStatus where
  toJSON :: V1CustomResourceDefinitionStatus -> Value
toJSON V1CustomResourceDefinitionStatus {Maybe [Text]
Maybe [V1CustomResourceDefinitionCondition]
Maybe V1CustomResourceDefinitionNames
$sel:v1CustomResourceDefinitionStatusAcceptedNames:V1CustomResourceDefinitionStatus :: V1CustomResourceDefinitionStatus
-> Maybe V1CustomResourceDefinitionNames
$sel:v1CustomResourceDefinitionStatusConditions:V1CustomResourceDefinitionStatus :: V1CustomResourceDefinitionStatus
-> Maybe [V1CustomResourceDefinitionCondition]
$sel:v1CustomResourceDefinitionStatusStoredVersions:V1CustomResourceDefinitionStatus :: V1CustomResourceDefinitionStatus -> Maybe [Text]
v1CustomResourceDefinitionStatusAcceptedNames :: Maybe V1CustomResourceDefinitionNames
v1CustomResourceDefinitionStatusConditions :: Maybe [V1CustomResourceDefinitionCondition]
v1CustomResourceDefinitionStatusStoredVersions :: Maybe [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"acceptedNames" Key -> Maybe V1CustomResourceDefinitionNames -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1CustomResourceDefinitionNames
v1CustomResourceDefinitionStatusAcceptedNames
      , Key
"conditions" Key -> Maybe [V1CustomResourceDefinitionCondition] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1CustomResourceDefinitionCondition]
v1CustomResourceDefinitionStatusConditions
      , Key
"storedVersions" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1CustomResourceDefinitionStatusStoredVersions
      ]


-- | Construct a value of type 'V1CustomResourceDefinitionStatus' (by applying it's required fields, if any)
mkV1CustomResourceDefinitionStatus
  :: V1CustomResourceDefinitionStatus
mkV1CustomResourceDefinitionStatus :: V1CustomResourceDefinitionStatus
mkV1CustomResourceDefinitionStatus =
  V1CustomResourceDefinitionStatus
  { $sel:v1CustomResourceDefinitionStatusAcceptedNames:V1CustomResourceDefinitionStatus :: Maybe V1CustomResourceDefinitionNames
v1CustomResourceDefinitionStatusAcceptedNames = Maybe V1CustomResourceDefinitionNames
forall a. Maybe a
Nothing
  , $sel:v1CustomResourceDefinitionStatusConditions:V1CustomResourceDefinitionStatus :: Maybe [V1CustomResourceDefinitionCondition]
v1CustomResourceDefinitionStatusConditions = Maybe [V1CustomResourceDefinitionCondition]
forall a. Maybe a
Nothing
  , $sel:v1CustomResourceDefinitionStatusStoredVersions:V1CustomResourceDefinitionStatus :: Maybe [Text]
v1CustomResourceDefinitionStatusStoredVersions = Maybe [Text]
forall a. Maybe a
Nothing
  }

-- ** V1CustomResourceDefinitionVersion
-- | V1CustomResourceDefinitionVersion
-- CustomResourceDefinitionVersion describes a version for CRD.
data V1CustomResourceDefinitionVersion = V1CustomResourceDefinitionVersion
  { V1CustomResourceDefinitionVersion
-> Maybe [V1CustomResourceColumnDefinition]
v1CustomResourceDefinitionVersionAdditionalPrinterColumns :: !(Maybe [V1CustomResourceColumnDefinition]) -- ^ "additionalPrinterColumns" - additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. If no columns are specified, a single column displaying the age of the custom resource is used.
  , V1CustomResourceDefinitionVersion -> Maybe Bool
v1CustomResourceDefinitionVersionDeprecated :: !(Maybe Bool) -- ^ "deprecated" - deprecated indicates this version of the custom resource API is deprecated. When set to true, API requests to this version receive a warning header in the server response. Defaults to false.
  , V1CustomResourceDefinitionVersion -> Maybe Text
v1CustomResourceDefinitionVersionDeprecationWarning :: !(Maybe Text) -- ^ "deprecationWarning" - deprecationWarning overrides the default warning returned to API clients. May only be set when &#x60;deprecated&#x60; is true. The default warning indicates this version is deprecated and recommends use of the newest served version of equal or greater stability, if one exists.
  , V1CustomResourceDefinitionVersion -> Text
v1CustomResourceDefinitionVersionName :: !(Text) -- ^ /Required/ "name" - name is the version name, e.g. “v1”, “v2beta1”, etc. The custom resources are served under this version at &#x60;/apis/&lt;group&gt;/&lt;version&gt;/...&#x60; if &#x60;served&#x60; is true.
  , V1CustomResourceDefinitionVersion
-> Maybe V1CustomResourceValidation
v1CustomResourceDefinitionVersionSchema :: !(Maybe V1CustomResourceValidation) -- ^ "schema"
  , V1CustomResourceDefinitionVersion -> Maybe [V1SelectableField]
v1CustomResourceDefinitionVersionSelectableFields :: !(Maybe [V1SelectableField]) -- ^ "selectableFields" - selectableFields specifies paths to fields that may be used as field selectors. A maximum of 8 selectable fields are allowed. See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors
  , V1CustomResourceDefinitionVersion -> Bool
v1CustomResourceDefinitionVersionServed :: !(Bool) -- ^ /Required/ "served" - served is a flag enabling/disabling this version from being served via REST APIs
  , V1CustomResourceDefinitionVersion -> Bool
v1CustomResourceDefinitionVersionStorage :: !(Bool) -- ^ /Required/ "storage" - storage indicates this version should be used when persisting custom resources to storage. There must be exactly one version with storage&#x3D;true.
  , V1CustomResourceDefinitionVersion
-> Maybe V1CustomResourceSubresources
v1CustomResourceDefinitionVersionSubresources :: !(Maybe V1CustomResourceSubresources) -- ^ "subresources"
  } deriving (Int -> V1CustomResourceDefinitionVersion -> ShowS
[V1CustomResourceDefinitionVersion] -> ShowS
V1CustomResourceDefinitionVersion -> String
(Int -> V1CustomResourceDefinitionVersion -> ShowS)
-> (V1CustomResourceDefinitionVersion -> String)
-> ([V1CustomResourceDefinitionVersion] -> ShowS)
-> Show V1CustomResourceDefinitionVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CustomResourceDefinitionVersion -> ShowS
showsPrec :: Int -> V1CustomResourceDefinitionVersion -> ShowS
$cshow :: V1CustomResourceDefinitionVersion -> String
show :: V1CustomResourceDefinitionVersion -> String
$cshowList :: [V1CustomResourceDefinitionVersion] -> ShowS
showList :: [V1CustomResourceDefinitionVersion] -> ShowS
P.Show, V1CustomResourceDefinitionVersion
-> V1CustomResourceDefinitionVersion -> Bool
(V1CustomResourceDefinitionVersion
 -> V1CustomResourceDefinitionVersion -> Bool)
-> (V1CustomResourceDefinitionVersion
    -> V1CustomResourceDefinitionVersion -> Bool)
-> Eq V1CustomResourceDefinitionVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CustomResourceDefinitionVersion
-> V1CustomResourceDefinitionVersion -> Bool
== :: V1CustomResourceDefinitionVersion
-> V1CustomResourceDefinitionVersion -> Bool
$c/= :: V1CustomResourceDefinitionVersion
-> V1CustomResourceDefinitionVersion -> Bool
/= :: V1CustomResourceDefinitionVersion
-> V1CustomResourceDefinitionVersion -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CustomResourceDefinitionVersion
instance A.FromJSON V1CustomResourceDefinitionVersion where
  parseJSON :: Value -> Parser V1CustomResourceDefinitionVersion
parseJSON = String
-> (Object -> Parser V1CustomResourceDefinitionVersion)
-> Value
-> Parser V1CustomResourceDefinitionVersion
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CustomResourceDefinitionVersion" ((Object -> Parser V1CustomResourceDefinitionVersion)
 -> Value -> Parser V1CustomResourceDefinitionVersion)
-> (Object -> Parser V1CustomResourceDefinitionVersion)
-> Value
-> Parser V1CustomResourceDefinitionVersion
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1CustomResourceColumnDefinition]
-> Maybe Bool
-> Maybe Text
-> Text
-> Maybe V1CustomResourceValidation
-> Maybe [V1SelectableField]
-> Bool
-> Bool
-> Maybe V1CustomResourceSubresources
-> V1CustomResourceDefinitionVersion
V1CustomResourceDefinitionVersion
      (Maybe [V1CustomResourceColumnDefinition]
 -> Maybe Bool
 -> Maybe Text
 -> Text
 -> Maybe V1CustomResourceValidation
 -> Maybe [V1SelectableField]
 -> Bool
 -> Bool
 -> Maybe V1CustomResourceSubresources
 -> V1CustomResourceDefinitionVersion)
-> Parser (Maybe [V1CustomResourceColumnDefinition])
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Text
      -> Maybe V1CustomResourceValidation
      -> Maybe [V1SelectableField]
      -> Bool
      -> Bool
      -> Maybe V1CustomResourceSubresources
      -> V1CustomResourceDefinitionVersion)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1CustomResourceColumnDefinition])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"additionalPrinterColumns")
      Parser
  (Maybe Bool
   -> Maybe Text
   -> Text
   -> Maybe V1CustomResourceValidation
   -> Maybe [V1SelectableField]
   -> Bool
   -> Bool
   -> Maybe V1CustomResourceSubresources
   -> V1CustomResourceDefinitionVersion)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Text
      -> Maybe V1CustomResourceValidation
      -> Maybe [V1SelectableField]
      -> Bool
      -> Bool
      -> Maybe V1CustomResourceSubresources
      -> V1CustomResourceDefinitionVersion)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"deprecated")
      Parser
  (Maybe Text
   -> Text
   -> Maybe V1CustomResourceValidation
   -> Maybe [V1SelectableField]
   -> Bool
   -> Bool
   -> Maybe V1CustomResourceSubresources
   -> V1CustomResourceDefinitionVersion)
-> Parser (Maybe Text)
-> Parser
     (Text
      -> Maybe V1CustomResourceValidation
      -> Maybe [V1SelectableField]
      -> Bool
      -> Bool
      -> Maybe V1CustomResourceSubresources
      -> V1CustomResourceDefinitionVersion)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"deprecationWarning")
      Parser
  (Text
   -> Maybe V1CustomResourceValidation
   -> Maybe [V1SelectableField]
   -> Bool
   -> Bool
   -> Maybe V1CustomResourceSubresources
   -> V1CustomResourceDefinitionVersion)
-> Parser Text
-> Parser
     (Maybe V1CustomResourceValidation
      -> Maybe [V1SelectableField]
      -> Bool
      -> Bool
      -> Maybe V1CustomResourceSubresources
      -> V1CustomResourceDefinitionVersion)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser
  (Maybe V1CustomResourceValidation
   -> Maybe [V1SelectableField]
   -> Bool
   -> Bool
   -> Maybe V1CustomResourceSubresources
   -> V1CustomResourceDefinitionVersion)
-> Parser (Maybe V1CustomResourceValidation)
-> Parser
     (Maybe [V1SelectableField]
      -> Bool
      -> Bool
      -> Maybe V1CustomResourceSubresources
      -> V1CustomResourceDefinitionVersion)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1CustomResourceValidation)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"schema")
      Parser
  (Maybe [V1SelectableField]
   -> Bool
   -> Bool
   -> Maybe V1CustomResourceSubresources
   -> V1CustomResourceDefinitionVersion)
-> Parser (Maybe [V1SelectableField])
-> Parser
     (Bool
      -> Bool
      -> Maybe V1CustomResourceSubresources
      -> V1CustomResourceDefinitionVersion)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1SelectableField])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"selectableFields")
      Parser
  (Bool
   -> Bool
   -> Maybe V1CustomResourceSubresources
   -> V1CustomResourceDefinitionVersion)
-> Parser Bool
-> Parser
     (Bool
      -> Maybe V1CustomResourceSubresources
      -> V1CustomResourceDefinitionVersion)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Bool
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"served")
      Parser
  (Bool
   -> Maybe V1CustomResourceSubresources
   -> V1CustomResourceDefinitionVersion)
-> Parser Bool
-> Parser
     (Maybe V1CustomResourceSubresources
      -> V1CustomResourceDefinitionVersion)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Bool
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"storage")
      Parser
  (Maybe V1CustomResourceSubresources
   -> V1CustomResourceDefinitionVersion)
-> Parser (Maybe V1CustomResourceSubresources)
-> Parser V1CustomResourceDefinitionVersion
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1CustomResourceSubresources)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"subresources")

-- | ToJSON V1CustomResourceDefinitionVersion
instance A.ToJSON V1CustomResourceDefinitionVersion where
  toJSON :: V1CustomResourceDefinitionVersion -> Value
toJSON V1CustomResourceDefinitionVersion {Bool
Maybe Bool
Maybe [V1SelectableField]
Maybe [V1CustomResourceColumnDefinition]
Maybe Text
Maybe V1CustomResourceValidation
Maybe V1CustomResourceSubresources
Text
$sel:v1CustomResourceDefinitionVersionAdditionalPrinterColumns:V1CustomResourceDefinitionVersion :: V1CustomResourceDefinitionVersion
-> Maybe [V1CustomResourceColumnDefinition]
$sel:v1CustomResourceDefinitionVersionDeprecated:V1CustomResourceDefinitionVersion :: V1CustomResourceDefinitionVersion -> Maybe Bool
$sel:v1CustomResourceDefinitionVersionDeprecationWarning:V1CustomResourceDefinitionVersion :: V1CustomResourceDefinitionVersion -> Maybe Text
$sel:v1CustomResourceDefinitionVersionName:V1CustomResourceDefinitionVersion :: V1CustomResourceDefinitionVersion -> Text
$sel:v1CustomResourceDefinitionVersionSchema:V1CustomResourceDefinitionVersion :: V1CustomResourceDefinitionVersion
-> Maybe V1CustomResourceValidation
$sel:v1CustomResourceDefinitionVersionSelectableFields:V1CustomResourceDefinitionVersion :: V1CustomResourceDefinitionVersion -> Maybe [V1SelectableField]
$sel:v1CustomResourceDefinitionVersionServed:V1CustomResourceDefinitionVersion :: V1CustomResourceDefinitionVersion -> Bool
$sel:v1CustomResourceDefinitionVersionStorage:V1CustomResourceDefinitionVersion :: V1CustomResourceDefinitionVersion -> Bool
$sel:v1CustomResourceDefinitionVersionSubresources:V1CustomResourceDefinitionVersion :: V1CustomResourceDefinitionVersion
-> Maybe V1CustomResourceSubresources
v1CustomResourceDefinitionVersionAdditionalPrinterColumns :: Maybe [V1CustomResourceColumnDefinition]
v1CustomResourceDefinitionVersionDeprecated :: Maybe Bool
v1CustomResourceDefinitionVersionDeprecationWarning :: Maybe Text
v1CustomResourceDefinitionVersionName :: Text
v1CustomResourceDefinitionVersionSchema :: Maybe V1CustomResourceValidation
v1CustomResourceDefinitionVersionSelectableFields :: Maybe [V1SelectableField]
v1CustomResourceDefinitionVersionServed :: Bool
v1CustomResourceDefinitionVersionStorage :: Bool
v1CustomResourceDefinitionVersionSubresources :: Maybe V1CustomResourceSubresources
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"additionalPrinterColumns" Key -> Maybe [V1CustomResourceColumnDefinition] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1CustomResourceColumnDefinition]
v1CustomResourceDefinitionVersionAdditionalPrinterColumns
      , Key
"deprecated" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1CustomResourceDefinitionVersionDeprecated
      , Key
"deprecationWarning" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CustomResourceDefinitionVersionDeprecationWarning
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1CustomResourceDefinitionVersionName
      , Key
"schema" Key -> Maybe V1CustomResourceValidation -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1CustomResourceValidation
v1CustomResourceDefinitionVersionSchema
      , Key
"selectableFields" Key -> Maybe [V1SelectableField] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1SelectableField]
v1CustomResourceDefinitionVersionSelectableFields
      , Key
"served" Key -> Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Bool
v1CustomResourceDefinitionVersionServed
      , Key
"storage" Key -> Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Bool
v1CustomResourceDefinitionVersionStorage
      , Key
"subresources" Key -> Maybe V1CustomResourceSubresources -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1CustomResourceSubresources
v1CustomResourceDefinitionVersionSubresources
      ]


-- | Construct a value of type 'V1CustomResourceDefinitionVersion' (by applying it's required fields, if any)
mkV1CustomResourceDefinitionVersion
  :: Text -- ^ 'v1CustomResourceDefinitionVersionName': name is the version name, e.g. “v1”, “v2beta1”, etc. The custom resources are served under this version at `/apis/<group>/<version>/...` if `served` is true.
  -> Bool -- ^ 'v1CustomResourceDefinitionVersionServed': served is a flag enabling/disabling this version from being served via REST APIs
  -> Bool -- ^ 'v1CustomResourceDefinitionVersionStorage': storage indicates this version should be used when persisting custom resources to storage. There must be exactly one version with storage=true.
  -> V1CustomResourceDefinitionVersion
mkV1CustomResourceDefinitionVersion :: Text -> Bool -> Bool -> V1CustomResourceDefinitionVersion
mkV1CustomResourceDefinitionVersion Text
v1CustomResourceDefinitionVersionName Bool
v1CustomResourceDefinitionVersionServed Bool
v1CustomResourceDefinitionVersionStorage =
  V1CustomResourceDefinitionVersion
  { $sel:v1CustomResourceDefinitionVersionAdditionalPrinterColumns:V1CustomResourceDefinitionVersion :: Maybe [V1CustomResourceColumnDefinition]
v1CustomResourceDefinitionVersionAdditionalPrinterColumns = Maybe [V1CustomResourceColumnDefinition]
forall a. Maybe a
Nothing
  , $sel:v1CustomResourceDefinitionVersionDeprecated:V1CustomResourceDefinitionVersion :: Maybe Bool
v1CustomResourceDefinitionVersionDeprecated = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1CustomResourceDefinitionVersionDeprecationWarning:V1CustomResourceDefinitionVersion :: Maybe Text
v1CustomResourceDefinitionVersionDeprecationWarning = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1CustomResourceDefinitionVersionName:V1CustomResourceDefinitionVersion :: Text
v1CustomResourceDefinitionVersionName :: Text
v1CustomResourceDefinitionVersionName
  , $sel:v1CustomResourceDefinitionVersionSchema:V1CustomResourceDefinitionVersion :: Maybe V1CustomResourceValidation
v1CustomResourceDefinitionVersionSchema = Maybe V1CustomResourceValidation
forall a. Maybe a
Nothing
  , $sel:v1CustomResourceDefinitionVersionSelectableFields:V1CustomResourceDefinitionVersion :: Maybe [V1SelectableField]
v1CustomResourceDefinitionVersionSelectableFields = Maybe [V1SelectableField]
forall a. Maybe a
Nothing
  , Bool
$sel:v1CustomResourceDefinitionVersionServed:V1CustomResourceDefinitionVersion :: Bool
v1CustomResourceDefinitionVersionServed :: Bool
v1CustomResourceDefinitionVersionServed
  , Bool
$sel:v1CustomResourceDefinitionVersionStorage:V1CustomResourceDefinitionVersion :: Bool
v1CustomResourceDefinitionVersionStorage :: Bool
v1CustomResourceDefinitionVersionStorage
  , $sel:v1CustomResourceDefinitionVersionSubresources:V1CustomResourceDefinitionVersion :: Maybe V1CustomResourceSubresources
v1CustomResourceDefinitionVersionSubresources = Maybe V1CustomResourceSubresources
forall a. Maybe a
Nothing
  }

-- ** V1CustomResourceSubresourceScale
-- | V1CustomResourceSubresourceScale
-- CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources.
data V1CustomResourceSubresourceScale = V1CustomResourceSubresourceScale
  { V1CustomResourceSubresourceScale -> Maybe Text
v1CustomResourceSubresourceScaleLabelSelectorPath :: !(Maybe Text) -- ^ "labelSelectorPath" - labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale &#x60;status.selector&#x60;. Only JSON paths without the array notation are allowed. Must be a JSON Path under &#x60;.status&#x60; or &#x60;.spec&#x60;. Must be set to work with HorizontalPodAutoscaler. The field pointed by this JSON path must be a string field (not a complex selector struct) which contains a serialized label selector in string form. More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource If there is no value under the given path in the custom resource, the &#x60;status.selector&#x60; value in the &#x60;/scale&#x60; subresource will default to the empty string.
  , V1CustomResourceSubresourceScale -> Text
v1CustomResourceSubresourceScaleSpecReplicasPath :: !(Text) -- ^ /Required/ "specReplicasPath" - specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale &#x60;spec.replicas&#x60;. Only JSON paths without the array notation are allowed. Must be a JSON Path under &#x60;.spec&#x60;. If there is no value under the given path in the custom resource, the &#x60;/scale&#x60; subresource will return an error on GET.
  , V1CustomResourceSubresourceScale -> Text
v1CustomResourceSubresourceScaleStatusReplicasPath :: !(Text) -- ^ /Required/ "statusReplicasPath" - statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale &#x60;status.replicas&#x60;. Only JSON paths without the array notation are allowed. Must be a JSON Path under &#x60;.status&#x60;. If there is no value under the given path in the custom resource, the &#x60;status.replicas&#x60; value in the &#x60;/scale&#x60; subresource will default to 0.
  } deriving (Int -> V1CustomResourceSubresourceScale -> ShowS
[V1CustomResourceSubresourceScale] -> ShowS
V1CustomResourceSubresourceScale -> String
(Int -> V1CustomResourceSubresourceScale -> ShowS)
-> (V1CustomResourceSubresourceScale -> String)
-> ([V1CustomResourceSubresourceScale] -> ShowS)
-> Show V1CustomResourceSubresourceScale
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CustomResourceSubresourceScale -> ShowS
showsPrec :: Int -> V1CustomResourceSubresourceScale -> ShowS
$cshow :: V1CustomResourceSubresourceScale -> String
show :: V1CustomResourceSubresourceScale -> String
$cshowList :: [V1CustomResourceSubresourceScale] -> ShowS
showList :: [V1CustomResourceSubresourceScale] -> ShowS
P.Show, V1CustomResourceSubresourceScale
-> V1CustomResourceSubresourceScale -> Bool
(V1CustomResourceSubresourceScale
 -> V1CustomResourceSubresourceScale -> Bool)
-> (V1CustomResourceSubresourceScale
    -> V1CustomResourceSubresourceScale -> Bool)
-> Eq V1CustomResourceSubresourceScale
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CustomResourceSubresourceScale
-> V1CustomResourceSubresourceScale -> Bool
== :: V1CustomResourceSubresourceScale
-> V1CustomResourceSubresourceScale -> Bool
$c/= :: V1CustomResourceSubresourceScale
-> V1CustomResourceSubresourceScale -> Bool
/= :: V1CustomResourceSubresourceScale
-> V1CustomResourceSubresourceScale -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CustomResourceSubresourceScale
instance A.FromJSON V1CustomResourceSubresourceScale where
  parseJSON :: Value -> Parser V1CustomResourceSubresourceScale
parseJSON = String
-> (Object -> Parser V1CustomResourceSubresourceScale)
-> Value
-> Parser V1CustomResourceSubresourceScale
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CustomResourceSubresourceScale" ((Object -> Parser V1CustomResourceSubresourceScale)
 -> Value -> Parser V1CustomResourceSubresourceScale)
-> (Object -> Parser V1CustomResourceSubresourceScale)
-> Value
-> Parser V1CustomResourceSubresourceScale
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Text -> Text -> V1CustomResourceSubresourceScale
V1CustomResourceSubresourceScale
      (Maybe Text -> Text -> Text -> V1CustomResourceSubresourceScale)
-> Parser (Maybe Text)
-> Parser (Text -> Text -> V1CustomResourceSubresourceScale)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"labelSelectorPath")
      Parser (Text -> Text -> V1CustomResourceSubresourceScale)
-> Parser Text -> Parser (Text -> V1CustomResourceSubresourceScale)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"specReplicasPath")
      Parser (Text -> V1CustomResourceSubresourceScale)
-> Parser Text -> Parser V1CustomResourceSubresourceScale
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"statusReplicasPath")

-- | ToJSON V1CustomResourceSubresourceScale
instance A.ToJSON V1CustomResourceSubresourceScale where
  toJSON :: V1CustomResourceSubresourceScale -> Value
toJSON V1CustomResourceSubresourceScale {Maybe Text
Text
$sel:v1CustomResourceSubresourceScaleLabelSelectorPath:V1CustomResourceSubresourceScale :: V1CustomResourceSubresourceScale -> Maybe Text
$sel:v1CustomResourceSubresourceScaleSpecReplicasPath:V1CustomResourceSubresourceScale :: V1CustomResourceSubresourceScale -> Text
$sel:v1CustomResourceSubresourceScaleStatusReplicasPath:V1CustomResourceSubresourceScale :: V1CustomResourceSubresourceScale -> Text
v1CustomResourceSubresourceScaleLabelSelectorPath :: Maybe Text
v1CustomResourceSubresourceScaleSpecReplicasPath :: Text
v1CustomResourceSubresourceScaleStatusReplicasPath :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"labelSelectorPath" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1CustomResourceSubresourceScaleLabelSelectorPath
      , Key
"specReplicasPath" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1CustomResourceSubresourceScaleSpecReplicasPath
      , Key
"statusReplicasPath" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1CustomResourceSubresourceScaleStatusReplicasPath
      ]


-- | Construct a value of type 'V1CustomResourceSubresourceScale' (by applying it's required fields, if any)
mkV1CustomResourceSubresourceScale
  :: Text -- ^ 'v1CustomResourceSubresourceScaleSpecReplicasPath': specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.spec`. If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET.
  -> Text -- ^ 'v1CustomResourceSubresourceScaleStatusReplicasPath': statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status`. If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource will default to 0.
  -> V1CustomResourceSubresourceScale
mkV1CustomResourceSubresourceScale :: Text -> Text -> V1CustomResourceSubresourceScale
mkV1CustomResourceSubresourceScale Text
v1CustomResourceSubresourceScaleSpecReplicasPath Text
v1CustomResourceSubresourceScaleStatusReplicasPath =
  V1CustomResourceSubresourceScale
  { $sel:v1CustomResourceSubresourceScaleLabelSelectorPath:V1CustomResourceSubresourceScale :: Maybe Text
v1CustomResourceSubresourceScaleLabelSelectorPath = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1CustomResourceSubresourceScaleSpecReplicasPath:V1CustomResourceSubresourceScale :: Text
v1CustomResourceSubresourceScaleSpecReplicasPath :: Text
v1CustomResourceSubresourceScaleSpecReplicasPath
  , Text
$sel:v1CustomResourceSubresourceScaleStatusReplicasPath:V1CustomResourceSubresourceScale :: Text
v1CustomResourceSubresourceScaleStatusReplicasPath :: Text
v1CustomResourceSubresourceScaleStatusReplicasPath
  }

-- ** V1CustomResourceSubresources
-- | V1CustomResourceSubresources
-- CustomResourceSubresources defines the status and scale subresources for CustomResources.
data V1CustomResourceSubresources = V1CustomResourceSubresources
  { V1CustomResourceSubresources
-> Maybe V1CustomResourceSubresourceScale
v1CustomResourceSubresourcesScale :: !(Maybe V1CustomResourceSubresourceScale) -- ^ "scale"
  , V1CustomResourceSubresources -> Maybe Value
v1CustomResourceSubresourcesStatus :: !(Maybe A.Value) -- ^ "status" - status indicates the custom resource should serve a &#x60;/status&#x60; subresource. When enabled: 1. requests to the custom resource primary endpoint ignore changes to the &#x60;status&#x60; stanza of the object. 2. requests to the custom resource &#x60;/status&#x60; subresource ignore changes to anything other than the &#x60;status&#x60; stanza of the object.
  } deriving (Int -> V1CustomResourceSubresources -> ShowS
[V1CustomResourceSubresources] -> ShowS
V1CustomResourceSubresources -> String
(Int -> V1CustomResourceSubresources -> ShowS)
-> (V1CustomResourceSubresources -> String)
-> ([V1CustomResourceSubresources] -> ShowS)
-> Show V1CustomResourceSubresources
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CustomResourceSubresources -> ShowS
showsPrec :: Int -> V1CustomResourceSubresources -> ShowS
$cshow :: V1CustomResourceSubresources -> String
show :: V1CustomResourceSubresources -> String
$cshowList :: [V1CustomResourceSubresources] -> ShowS
showList :: [V1CustomResourceSubresources] -> ShowS
P.Show, V1CustomResourceSubresources
-> V1CustomResourceSubresources -> Bool
(V1CustomResourceSubresources
 -> V1CustomResourceSubresources -> Bool)
-> (V1CustomResourceSubresources
    -> V1CustomResourceSubresources -> Bool)
-> Eq V1CustomResourceSubresources
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CustomResourceSubresources
-> V1CustomResourceSubresources -> Bool
== :: V1CustomResourceSubresources
-> V1CustomResourceSubresources -> Bool
$c/= :: V1CustomResourceSubresources
-> V1CustomResourceSubresources -> Bool
/= :: V1CustomResourceSubresources
-> V1CustomResourceSubresources -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CustomResourceSubresources
instance A.FromJSON V1CustomResourceSubresources where
  parseJSON :: Value -> Parser V1CustomResourceSubresources
parseJSON = String
-> (Object -> Parser V1CustomResourceSubresources)
-> Value
-> Parser V1CustomResourceSubresources
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CustomResourceSubresources" ((Object -> Parser V1CustomResourceSubresources)
 -> Value -> Parser V1CustomResourceSubresources)
-> (Object -> Parser V1CustomResourceSubresources)
-> Value
-> Parser V1CustomResourceSubresources
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1CustomResourceSubresourceScale
-> Maybe Value -> V1CustomResourceSubresources
V1CustomResourceSubresources
      (Maybe V1CustomResourceSubresourceScale
 -> Maybe Value -> V1CustomResourceSubresources)
-> Parser (Maybe V1CustomResourceSubresourceScale)
-> Parser (Maybe Value -> V1CustomResourceSubresources)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1CustomResourceSubresourceScale)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"scale")
      Parser (Maybe Value -> V1CustomResourceSubresources)
-> Parser (Maybe Value) -> Parser V1CustomResourceSubresources
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Value)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1CustomResourceSubresources
instance A.ToJSON V1CustomResourceSubresources where
  toJSON :: V1CustomResourceSubresources -> Value
toJSON V1CustomResourceSubresources {Maybe Value
Maybe V1CustomResourceSubresourceScale
$sel:v1CustomResourceSubresourcesScale:V1CustomResourceSubresources :: V1CustomResourceSubresources
-> Maybe V1CustomResourceSubresourceScale
$sel:v1CustomResourceSubresourcesStatus:V1CustomResourceSubresources :: V1CustomResourceSubresources -> Maybe Value
v1CustomResourceSubresourcesScale :: Maybe V1CustomResourceSubresourceScale
v1CustomResourceSubresourcesStatus :: Maybe Value
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"scale" Key -> Maybe V1CustomResourceSubresourceScale -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1CustomResourceSubresourceScale
v1CustomResourceSubresourcesScale
      , Key
"status" Key -> Maybe Value -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Value
v1CustomResourceSubresourcesStatus
      ]


-- | Construct a value of type 'V1CustomResourceSubresources' (by applying it's required fields, if any)
mkV1CustomResourceSubresources
  :: V1CustomResourceSubresources
mkV1CustomResourceSubresources :: V1CustomResourceSubresources
mkV1CustomResourceSubresources =
  V1CustomResourceSubresources
  { $sel:v1CustomResourceSubresourcesScale:V1CustomResourceSubresources :: Maybe V1CustomResourceSubresourceScale
v1CustomResourceSubresourcesScale = Maybe V1CustomResourceSubresourceScale
forall a. Maybe a
Nothing
  , $sel:v1CustomResourceSubresourcesStatus:V1CustomResourceSubresources :: Maybe Value
v1CustomResourceSubresourcesStatus = Maybe Value
forall a. Maybe a
Nothing
  }

-- ** V1CustomResourceValidation
-- | V1CustomResourceValidation
-- CustomResourceValidation is a list of validation methods for CustomResources.
data V1CustomResourceValidation = V1CustomResourceValidation
  { V1CustomResourceValidation -> Maybe V1JSONSchemaProps
v1CustomResourceValidationOpenApiv3Schema :: !(Maybe V1JSONSchemaProps) -- ^ "openAPIV3Schema"
  } deriving (Int -> V1CustomResourceValidation -> ShowS
[V1CustomResourceValidation] -> ShowS
V1CustomResourceValidation -> String
(Int -> V1CustomResourceValidation -> ShowS)
-> (V1CustomResourceValidation -> String)
-> ([V1CustomResourceValidation] -> ShowS)
-> Show V1CustomResourceValidation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1CustomResourceValidation -> ShowS
showsPrec :: Int -> V1CustomResourceValidation -> ShowS
$cshow :: V1CustomResourceValidation -> String
show :: V1CustomResourceValidation -> String
$cshowList :: [V1CustomResourceValidation] -> ShowS
showList :: [V1CustomResourceValidation] -> ShowS
P.Show, V1CustomResourceValidation -> V1CustomResourceValidation -> Bool
(V1CustomResourceValidation -> V1CustomResourceValidation -> Bool)
-> (V1CustomResourceValidation
    -> V1CustomResourceValidation -> Bool)
-> Eq V1CustomResourceValidation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1CustomResourceValidation -> V1CustomResourceValidation -> Bool
== :: V1CustomResourceValidation -> V1CustomResourceValidation -> Bool
$c/= :: V1CustomResourceValidation -> V1CustomResourceValidation -> Bool
/= :: V1CustomResourceValidation -> V1CustomResourceValidation -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1CustomResourceValidation
instance A.FromJSON V1CustomResourceValidation where
  parseJSON :: Value -> Parser V1CustomResourceValidation
parseJSON = String
-> (Object -> Parser V1CustomResourceValidation)
-> Value
-> Parser V1CustomResourceValidation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1CustomResourceValidation" ((Object -> Parser V1CustomResourceValidation)
 -> Value -> Parser V1CustomResourceValidation)
-> (Object -> Parser V1CustomResourceValidation)
-> Value
-> Parser V1CustomResourceValidation
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1JSONSchemaProps -> V1CustomResourceValidation
V1CustomResourceValidation
      (Maybe V1JSONSchemaProps -> V1CustomResourceValidation)
-> Parser (Maybe V1JSONSchemaProps)
-> Parser V1CustomResourceValidation
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1JSONSchemaProps)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"openAPIV3Schema")

-- | ToJSON V1CustomResourceValidation
instance A.ToJSON V1CustomResourceValidation where
  toJSON :: V1CustomResourceValidation -> Value
toJSON V1CustomResourceValidation {Maybe V1JSONSchemaProps
$sel:v1CustomResourceValidationOpenApiv3Schema:V1CustomResourceValidation :: V1CustomResourceValidation -> Maybe V1JSONSchemaProps
v1CustomResourceValidationOpenApiv3Schema :: Maybe V1JSONSchemaProps
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"openAPIV3Schema" Key -> Maybe V1JSONSchemaProps -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1JSONSchemaProps
v1CustomResourceValidationOpenApiv3Schema
      ]


-- | Construct a value of type 'V1CustomResourceValidation' (by applying it's required fields, if any)
mkV1CustomResourceValidation
  :: V1CustomResourceValidation
mkV1CustomResourceValidation :: V1CustomResourceValidation
mkV1CustomResourceValidation =
  V1CustomResourceValidation
  { $sel:v1CustomResourceValidationOpenApiv3Schema:V1CustomResourceValidation :: Maybe V1JSONSchemaProps
v1CustomResourceValidationOpenApiv3Schema = Maybe V1JSONSchemaProps
forall a. Maybe a
Nothing
  }

-- ** V1DaemonEndpoint
-- | V1DaemonEndpoint
-- DaemonEndpoint contains information about a single Daemon endpoint.
data V1DaemonEndpoint = V1DaemonEndpoint
  { V1DaemonEndpoint -> Int
v1DaemonEndpointPort :: !(Int) -- ^ /Required/ "Port" - Port number of the given endpoint.
  } deriving (Int -> V1DaemonEndpoint -> ShowS
[V1DaemonEndpoint] -> ShowS
V1DaemonEndpoint -> String
(Int -> V1DaemonEndpoint -> ShowS)
-> (V1DaemonEndpoint -> String)
-> ([V1DaemonEndpoint] -> ShowS)
-> Show V1DaemonEndpoint
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1DaemonEndpoint -> ShowS
showsPrec :: Int -> V1DaemonEndpoint -> ShowS
$cshow :: V1DaemonEndpoint -> String
show :: V1DaemonEndpoint -> String
$cshowList :: [V1DaemonEndpoint] -> ShowS
showList :: [V1DaemonEndpoint] -> ShowS
P.Show, V1DaemonEndpoint -> V1DaemonEndpoint -> Bool
(V1DaemonEndpoint -> V1DaemonEndpoint -> Bool)
-> (V1DaemonEndpoint -> V1DaemonEndpoint -> Bool)
-> Eq V1DaemonEndpoint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1DaemonEndpoint -> V1DaemonEndpoint -> Bool
== :: V1DaemonEndpoint -> V1DaemonEndpoint -> Bool
$c/= :: V1DaemonEndpoint -> V1DaemonEndpoint -> Bool
/= :: V1DaemonEndpoint -> V1DaemonEndpoint -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1DaemonEndpoint
instance A.FromJSON V1DaemonEndpoint where
  parseJSON :: Value -> Parser V1DaemonEndpoint
parseJSON = String
-> (Object -> Parser V1DaemonEndpoint)
-> Value
-> Parser V1DaemonEndpoint
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1DaemonEndpoint" ((Object -> Parser V1DaemonEndpoint)
 -> Value -> Parser V1DaemonEndpoint)
-> (Object -> Parser V1DaemonEndpoint)
-> Value
-> Parser V1DaemonEndpoint
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Int -> V1DaemonEndpoint
V1DaemonEndpoint
      (Int -> V1DaemonEndpoint) -> Parser Int -> Parser V1DaemonEndpoint
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"Port")

-- | ToJSON V1DaemonEndpoint
instance A.ToJSON V1DaemonEndpoint where
  toJSON :: V1DaemonEndpoint -> Value
toJSON V1DaemonEndpoint {Int
$sel:v1DaemonEndpointPort:V1DaemonEndpoint :: V1DaemonEndpoint -> Int
v1DaemonEndpointPort :: Int
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"Port" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v1DaemonEndpointPort
      ]


-- | Construct a value of type 'V1DaemonEndpoint' (by applying it's required fields, if any)
mkV1DaemonEndpoint
  :: Int -- ^ 'v1DaemonEndpointPort': Port number of the given endpoint.
  -> V1DaemonEndpoint
mkV1DaemonEndpoint :: Int -> V1DaemonEndpoint
mkV1DaemonEndpoint Int
v1DaemonEndpointPort =
  V1DaemonEndpoint
  { Int
$sel:v1DaemonEndpointPort:V1DaemonEndpoint :: Int
v1DaemonEndpointPort :: Int
v1DaemonEndpointPort
  }

-- ** V1DaemonSet
-- | V1DaemonSet
-- DaemonSet represents the configuration of a daemon set.
data V1DaemonSet = V1DaemonSet
  { V1DaemonSet -> Maybe Text
v1DaemonSetApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1DaemonSet -> Maybe Text
v1DaemonSetKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1DaemonSet -> Maybe V1ObjectMeta
v1DaemonSetMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1DaemonSet -> Maybe V1DaemonSetSpec
v1DaemonSetSpec :: !(Maybe V1DaemonSetSpec) -- ^ "spec"
  , V1DaemonSet -> Maybe V1DaemonSetStatus
v1DaemonSetStatus :: !(Maybe V1DaemonSetStatus) -- ^ "status"
  } deriving (Int -> V1DaemonSet -> ShowS
[V1DaemonSet] -> ShowS
V1DaemonSet -> String
(Int -> V1DaemonSet -> ShowS)
-> (V1DaemonSet -> String)
-> ([V1DaemonSet] -> ShowS)
-> Show V1DaemonSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1DaemonSet -> ShowS
showsPrec :: Int -> V1DaemonSet -> ShowS
$cshow :: V1DaemonSet -> String
show :: V1DaemonSet -> String
$cshowList :: [V1DaemonSet] -> ShowS
showList :: [V1DaemonSet] -> ShowS
P.Show, V1DaemonSet -> V1DaemonSet -> Bool
(V1DaemonSet -> V1DaemonSet -> Bool)
-> (V1DaemonSet -> V1DaemonSet -> Bool) -> Eq V1DaemonSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1DaemonSet -> V1DaemonSet -> Bool
== :: V1DaemonSet -> V1DaemonSet -> Bool
$c/= :: V1DaemonSet -> V1DaemonSet -> Bool
/= :: V1DaemonSet -> V1DaemonSet -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1DaemonSet
instance A.FromJSON V1DaemonSet where
  parseJSON :: Value -> Parser V1DaemonSet
parseJSON = String
-> (Object -> Parser V1DaemonSet) -> Value -> Parser V1DaemonSet
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1DaemonSet" ((Object -> Parser V1DaemonSet) -> Value -> Parser V1DaemonSet)
-> (Object -> Parser V1DaemonSet) -> Value -> Parser V1DaemonSet
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1DaemonSetSpec
-> Maybe V1DaemonSetStatus
-> V1DaemonSet
V1DaemonSet
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1DaemonSetSpec
 -> Maybe V1DaemonSetStatus
 -> V1DaemonSet)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1DaemonSetSpec
      -> Maybe V1DaemonSetStatus
      -> V1DaemonSet)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1DaemonSetSpec
   -> Maybe V1DaemonSetStatus
   -> V1DaemonSet)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1DaemonSetSpec -> Maybe V1DaemonSetStatus -> V1DaemonSet)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1DaemonSetSpec -> Maybe V1DaemonSetStatus -> V1DaemonSet)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe V1DaemonSetSpec -> Maybe V1DaemonSetStatus -> V1DaemonSet)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (Maybe V1DaemonSetSpec -> Maybe V1DaemonSetStatus -> V1DaemonSet)
-> Parser (Maybe V1DaemonSetSpec)
-> Parser (Maybe V1DaemonSetStatus -> V1DaemonSet)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1DaemonSetSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")
      Parser (Maybe V1DaemonSetStatus -> V1DaemonSet)
-> Parser (Maybe V1DaemonSetStatus) -> Parser V1DaemonSet
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1DaemonSetStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1DaemonSet
instance A.ToJSON V1DaemonSet where
  toJSON :: V1DaemonSet -> Value
toJSON V1DaemonSet {Maybe Text
Maybe V1ObjectMeta
Maybe V1DaemonSetStatus
Maybe V1DaemonSetSpec
$sel:v1DaemonSetApiVersion:V1DaemonSet :: V1DaemonSet -> Maybe Text
$sel:v1DaemonSetKind:V1DaemonSet :: V1DaemonSet -> Maybe Text
$sel:v1DaemonSetMetadata:V1DaemonSet :: V1DaemonSet -> Maybe V1ObjectMeta
$sel:v1DaemonSetSpec:V1DaemonSet :: V1DaemonSet -> Maybe V1DaemonSetSpec
$sel:v1DaemonSetStatus:V1DaemonSet :: V1DaemonSet -> Maybe V1DaemonSetStatus
v1DaemonSetApiVersion :: Maybe Text
v1DaemonSetKind :: Maybe Text
v1DaemonSetMetadata :: Maybe V1ObjectMeta
v1DaemonSetSpec :: Maybe V1DaemonSetSpec
v1DaemonSetStatus :: Maybe V1DaemonSetStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1DaemonSetApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1DaemonSetKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1DaemonSetMetadata
      , Key
"spec" Key -> Maybe V1DaemonSetSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1DaemonSetSpec
v1DaemonSetSpec
      , Key
"status" Key -> Maybe V1DaemonSetStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1DaemonSetStatus
v1DaemonSetStatus
      ]


-- | Construct a value of type 'V1DaemonSet' (by applying it's required fields, if any)
mkV1DaemonSet
  :: V1DaemonSet
mkV1DaemonSet :: V1DaemonSet
mkV1DaemonSet =
  V1DaemonSet
  { $sel:v1DaemonSetApiVersion:V1DaemonSet :: Maybe Text
v1DaemonSetApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1DaemonSetKind:V1DaemonSet :: Maybe Text
v1DaemonSetKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1DaemonSetMetadata:V1DaemonSet :: Maybe V1ObjectMeta
v1DaemonSetMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1DaemonSetSpec:V1DaemonSet :: Maybe V1DaemonSetSpec
v1DaemonSetSpec = Maybe V1DaemonSetSpec
forall a. Maybe a
Nothing
  , $sel:v1DaemonSetStatus:V1DaemonSet :: Maybe V1DaemonSetStatus
v1DaemonSetStatus = Maybe V1DaemonSetStatus
forall a. Maybe a
Nothing
  }

-- ** V1DaemonSetCondition
-- | V1DaemonSetCondition
-- DaemonSetCondition describes the state of a DaemonSet at a certain point.
data V1DaemonSetCondition = V1DaemonSetCondition
  { V1DaemonSetCondition -> Maybe DateTime
v1DaemonSetConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - Last time the condition transitioned from one status to another.
  , V1DaemonSetCondition -> Maybe Text
v1DaemonSetConditionMessage :: !(Maybe Text) -- ^ "message" - A human readable message indicating details about the transition.
  , V1DaemonSetCondition -> Maybe Text
v1DaemonSetConditionReason :: !(Maybe Text) -- ^ "reason" - The reason for the condition&#39;s last transition.
  , V1DaemonSetCondition -> Text
v1DaemonSetConditionStatus :: !(Text) -- ^ /Required/ "status" - Status of the condition, one of True, False, Unknown.
  , V1DaemonSetCondition -> Text
v1DaemonSetConditionType :: !(Text) -- ^ /Required/ "type" - Type of DaemonSet condition.
  } deriving (Int -> V1DaemonSetCondition -> ShowS
[V1DaemonSetCondition] -> ShowS
V1DaemonSetCondition -> String
(Int -> V1DaemonSetCondition -> ShowS)
-> (V1DaemonSetCondition -> String)
-> ([V1DaemonSetCondition] -> ShowS)
-> Show V1DaemonSetCondition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1DaemonSetCondition -> ShowS
showsPrec :: Int -> V1DaemonSetCondition -> ShowS
$cshow :: V1DaemonSetCondition -> String
show :: V1DaemonSetCondition -> String
$cshowList :: [V1DaemonSetCondition] -> ShowS
showList :: [V1DaemonSetCondition] -> ShowS
P.Show, V1DaemonSetCondition -> V1DaemonSetCondition -> Bool
(V1DaemonSetCondition -> V1DaemonSetCondition -> Bool)
-> (V1DaemonSetCondition -> V1DaemonSetCondition -> Bool)
-> Eq V1DaemonSetCondition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1DaemonSetCondition -> V1DaemonSetCondition -> Bool
== :: V1DaemonSetCondition -> V1DaemonSetCondition -> Bool
$c/= :: V1DaemonSetCondition -> V1DaemonSetCondition -> Bool
/= :: V1DaemonSetCondition -> V1DaemonSetCondition -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1DaemonSetCondition
instance A.FromJSON V1DaemonSetCondition where
  parseJSON :: Value -> Parser V1DaemonSetCondition
parseJSON = String
-> (Object -> Parser V1DaemonSetCondition)
-> Value
-> Parser V1DaemonSetCondition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1DaemonSetCondition" ((Object -> Parser V1DaemonSetCondition)
 -> Value -> Parser V1DaemonSetCondition)
-> (Object -> Parser V1DaemonSetCondition)
-> Value
-> Parser V1DaemonSetCondition
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe DateTime
-> Maybe Text -> Maybe Text -> Text -> Text -> V1DaemonSetCondition
V1DaemonSetCondition
      (Maybe DateTime
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> Text
 -> V1DaemonSetCondition)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe Text -> Maybe Text -> Text -> Text -> V1DaemonSetCondition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lastTransitionTime")
      Parser
  (Maybe Text -> Maybe Text -> Text -> Text -> V1DaemonSetCondition)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Text -> Text -> V1DaemonSetCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"message")
      Parser (Maybe Text -> Text -> Text -> V1DaemonSetCondition)
-> Parser (Maybe Text)
-> Parser (Text -> Text -> V1DaemonSetCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reason")
      Parser (Text -> Text -> V1DaemonSetCondition)
-> Parser Text -> Parser (Text -> V1DaemonSetCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"status")
      Parser (Text -> V1DaemonSetCondition)
-> Parser Text -> Parser V1DaemonSetCondition
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"type")

-- | ToJSON V1DaemonSetCondition
instance A.ToJSON V1DaemonSetCondition where
  toJSON :: V1DaemonSetCondition -> Value
toJSON V1DaemonSetCondition {Maybe Text
Maybe DateTime
Text
$sel:v1DaemonSetConditionLastTransitionTime:V1DaemonSetCondition :: V1DaemonSetCondition -> Maybe DateTime
$sel:v1DaemonSetConditionMessage:V1DaemonSetCondition :: V1DaemonSetCondition -> Maybe Text
$sel:v1DaemonSetConditionReason:V1DaemonSetCondition :: V1DaemonSetCondition -> Maybe Text
$sel:v1DaemonSetConditionStatus:V1DaemonSetCondition :: V1DaemonSetCondition -> Text
$sel:v1DaemonSetConditionType:V1DaemonSetCondition :: V1DaemonSetCondition -> Text
v1DaemonSetConditionLastTransitionTime :: Maybe DateTime
v1DaemonSetConditionMessage :: Maybe Text
v1DaemonSetConditionReason :: Maybe Text
v1DaemonSetConditionStatus :: Text
v1DaemonSetConditionType :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"lastTransitionTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1DaemonSetConditionLastTransitionTime
      , Key
"message" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1DaemonSetConditionMessage
      , Key
"reason" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1DaemonSetConditionReason
      , Key
"status" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1DaemonSetConditionStatus
      , Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1DaemonSetConditionType
      ]


-- | Construct a value of type 'V1DaemonSetCondition' (by applying it's required fields, if any)
mkV1DaemonSetCondition
  :: Text -- ^ 'v1DaemonSetConditionStatus': Status of the condition, one of True, False, Unknown.
  -> Text -- ^ 'v1DaemonSetConditionType': Type of DaemonSet condition.
  -> V1DaemonSetCondition
mkV1DaemonSetCondition :: Text -> Text -> V1DaemonSetCondition
mkV1DaemonSetCondition Text
v1DaemonSetConditionStatus Text
v1DaemonSetConditionType =
  V1DaemonSetCondition
  { $sel:v1DaemonSetConditionLastTransitionTime:V1DaemonSetCondition :: Maybe DateTime
v1DaemonSetConditionLastTransitionTime = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1DaemonSetConditionMessage:V1DaemonSetCondition :: Maybe Text
v1DaemonSetConditionMessage = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1DaemonSetConditionReason:V1DaemonSetCondition :: Maybe Text
v1DaemonSetConditionReason = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1DaemonSetConditionStatus:V1DaemonSetCondition :: Text
v1DaemonSetConditionStatus :: Text
v1DaemonSetConditionStatus
  , Text
$sel:v1DaemonSetConditionType:V1DaemonSetCondition :: Text
v1DaemonSetConditionType :: Text
v1DaemonSetConditionType
  }

-- ** V1DaemonSetList
-- | V1DaemonSetList
-- DaemonSetList is a collection of daemon sets.
data V1DaemonSetList = V1DaemonSetList
  { V1DaemonSetList -> Maybe Text
v1DaemonSetListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1DaemonSetList -> [V1DaemonSet]
v1DaemonSetListItems :: !([V1DaemonSet]) -- ^ /Required/ "items" - A list of daemon sets.
  , V1DaemonSetList -> Maybe Text
v1DaemonSetListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1DaemonSetList -> Maybe V1ListMeta
v1DaemonSetListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1DaemonSetList -> ShowS
[V1DaemonSetList] -> ShowS
V1DaemonSetList -> String
(Int -> V1DaemonSetList -> ShowS)
-> (V1DaemonSetList -> String)
-> ([V1DaemonSetList] -> ShowS)
-> Show V1DaemonSetList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1DaemonSetList -> ShowS
showsPrec :: Int -> V1DaemonSetList -> ShowS
$cshow :: V1DaemonSetList -> String
show :: V1DaemonSetList -> String
$cshowList :: [V1DaemonSetList] -> ShowS
showList :: [V1DaemonSetList] -> ShowS
P.Show, V1DaemonSetList -> V1DaemonSetList -> Bool
(V1DaemonSetList -> V1DaemonSetList -> Bool)
-> (V1DaemonSetList -> V1DaemonSetList -> Bool)
-> Eq V1DaemonSetList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1DaemonSetList -> V1DaemonSetList -> Bool
== :: V1DaemonSetList -> V1DaemonSetList -> Bool
$c/= :: V1DaemonSetList -> V1DaemonSetList -> Bool
/= :: V1DaemonSetList -> V1DaemonSetList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1DaemonSetList
instance A.FromJSON V1DaemonSetList where
  parseJSON :: Value -> Parser V1DaemonSetList
parseJSON = String
-> (Object -> Parser V1DaemonSetList)
-> Value
-> Parser V1DaemonSetList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1DaemonSetList" ((Object -> Parser V1DaemonSetList)
 -> Value -> Parser V1DaemonSetList)
-> (Object -> Parser V1DaemonSetList)
-> Value
-> Parser V1DaemonSetList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1DaemonSet]
-> Maybe Text
-> Maybe V1ListMeta
-> V1DaemonSetList
V1DaemonSetList
      (Maybe Text
 -> [V1DaemonSet]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1DaemonSetList)
-> Parser (Maybe Text)
-> Parser
     ([V1DaemonSet]
      -> Maybe Text -> Maybe V1ListMeta -> V1DaemonSetList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1DaemonSet]
   -> Maybe Text -> Maybe V1ListMeta -> V1DaemonSetList)
-> Parser [V1DaemonSet]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1DaemonSetList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1DaemonSet]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1DaemonSetList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1DaemonSetList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1DaemonSetList)
-> Parser (Maybe V1ListMeta) -> Parser V1DaemonSetList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1DaemonSetList
instance A.ToJSON V1DaemonSetList where
  toJSON :: V1DaemonSetList -> Value
toJSON V1DaemonSetList {[V1DaemonSet]
Maybe Text
Maybe V1ListMeta
$sel:v1DaemonSetListApiVersion:V1DaemonSetList :: V1DaemonSetList -> Maybe Text
$sel:v1DaemonSetListItems:V1DaemonSetList :: V1DaemonSetList -> [V1DaemonSet]
$sel:v1DaemonSetListKind:V1DaemonSetList :: V1DaemonSetList -> Maybe Text
$sel:v1DaemonSetListMetadata:V1DaemonSetList :: V1DaemonSetList -> Maybe V1ListMeta
v1DaemonSetListApiVersion :: Maybe Text
v1DaemonSetListItems :: [V1DaemonSet]
v1DaemonSetListKind :: Maybe Text
v1DaemonSetListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1DaemonSetListApiVersion
      , Key
"items" Key -> [V1DaemonSet] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1DaemonSet]
v1DaemonSetListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1DaemonSetListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1DaemonSetListMetadata
      ]


-- | Construct a value of type 'V1DaemonSetList' (by applying it's required fields, if any)
mkV1DaemonSetList
  :: [V1DaemonSet] -- ^ 'v1DaemonSetListItems': A list of daemon sets.
  -> V1DaemonSetList
mkV1DaemonSetList :: [V1DaemonSet] -> V1DaemonSetList
mkV1DaemonSetList [V1DaemonSet]
v1DaemonSetListItems =
  V1DaemonSetList
  { $sel:v1DaemonSetListApiVersion:V1DaemonSetList :: Maybe Text
v1DaemonSetListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1DaemonSet]
$sel:v1DaemonSetListItems:V1DaemonSetList :: [V1DaemonSet]
v1DaemonSetListItems :: [V1DaemonSet]
v1DaemonSetListItems
  , $sel:v1DaemonSetListKind:V1DaemonSetList :: Maybe Text
v1DaemonSetListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1DaemonSetListMetadata:V1DaemonSetList :: Maybe V1ListMeta
v1DaemonSetListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1DaemonSetSpec
-- | V1DaemonSetSpec
-- DaemonSetSpec is the specification of a daemon set.
data V1DaemonSetSpec = V1DaemonSetSpec
  { V1DaemonSetSpec -> Maybe Int
v1DaemonSetSpecMinReadySeconds :: !(Maybe Int) -- ^ "minReadySeconds" - The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready).
  , V1DaemonSetSpec -> Maybe Int
v1DaemonSetSpecRevisionHistoryLimit :: !(Maybe Int) -- ^ "revisionHistoryLimit" - The number of old history to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.
  , V1DaemonSetSpec -> V1LabelSelector
v1DaemonSetSpecSelector :: !(V1LabelSelector) -- ^ /Required/ "selector"
  , V1DaemonSetSpec -> V1PodTemplateSpec
v1DaemonSetSpecTemplate :: !(V1PodTemplateSpec) -- ^ /Required/ "template"
  , V1DaemonSetSpec -> Maybe V1DaemonSetUpdateStrategy
v1DaemonSetSpecUpdateStrategy :: !(Maybe V1DaemonSetUpdateStrategy) -- ^ "updateStrategy"
  } deriving (Int -> V1DaemonSetSpec -> ShowS
[V1DaemonSetSpec] -> ShowS
V1DaemonSetSpec -> String
(Int -> V1DaemonSetSpec -> ShowS)
-> (V1DaemonSetSpec -> String)
-> ([V1DaemonSetSpec] -> ShowS)
-> Show V1DaemonSetSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1DaemonSetSpec -> ShowS
showsPrec :: Int -> V1DaemonSetSpec -> ShowS
$cshow :: V1DaemonSetSpec -> String
show :: V1DaemonSetSpec -> String
$cshowList :: [V1DaemonSetSpec] -> ShowS
showList :: [V1DaemonSetSpec] -> ShowS
P.Show, V1DaemonSetSpec -> V1DaemonSetSpec -> Bool
(V1DaemonSetSpec -> V1DaemonSetSpec -> Bool)
-> (V1DaemonSetSpec -> V1DaemonSetSpec -> Bool)
-> Eq V1DaemonSetSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1DaemonSetSpec -> V1DaemonSetSpec -> Bool
== :: V1DaemonSetSpec -> V1DaemonSetSpec -> Bool
$c/= :: V1DaemonSetSpec -> V1DaemonSetSpec -> Bool
/= :: V1DaemonSetSpec -> V1DaemonSetSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1DaemonSetSpec
instance A.FromJSON V1DaemonSetSpec where
  parseJSON :: Value -> Parser V1DaemonSetSpec
parseJSON = String
-> (Object -> Parser V1DaemonSetSpec)
-> Value
-> Parser V1DaemonSetSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1DaemonSetSpec" ((Object -> Parser V1DaemonSetSpec)
 -> Value -> Parser V1DaemonSetSpec)
-> (Object -> Parser V1DaemonSetSpec)
-> Value
-> Parser V1DaemonSetSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Int
-> Maybe Int
-> V1LabelSelector
-> V1PodTemplateSpec
-> Maybe V1DaemonSetUpdateStrategy
-> V1DaemonSetSpec
V1DaemonSetSpec
      (Maybe Int
 -> Maybe Int
 -> V1LabelSelector
 -> V1PodTemplateSpec
 -> Maybe V1DaemonSetUpdateStrategy
 -> V1DaemonSetSpec)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> V1LabelSelector
      -> V1PodTemplateSpec
      -> Maybe V1DaemonSetUpdateStrategy
      -> V1DaemonSetSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"minReadySeconds")
      Parser
  (Maybe Int
   -> V1LabelSelector
   -> V1PodTemplateSpec
   -> Maybe V1DaemonSetUpdateStrategy
   -> V1DaemonSetSpec)
-> Parser (Maybe Int)
-> Parser
     (V1LabelSelector
      -> V1PodTemplateSpec
      -> Maybe V1DaemonSetUpdateStrategy
      -> V1DaemonSetSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"revisionHistoryLimit")
      Parser
  (V1LabelSelector
   -> V1PodTemplateSpec
   -> Maybe V1DaemonSetUpdateStrategy
   -> V1DaemonSetSpec)
-> Parser V1LabelSelector
-> Parser
     (V1PodTemplateSpec
      -> Maybe V1DaemonSetUpdateStrategy -> V1DaemonSetSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1LabelSelector
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"selector")
      Parser
  (V1PodTemplateSpec
   -> Maybe V1DaemonSetUpdateStrategy -> V1DaemonSetSpec)
-> Parser V1PodTemplateSpec
-> Parser (Maybe V1DaemonSetUpdateStrategy -> V1DaemonSetSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1PodTemplateSpec
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"template")
      Parser (Maybe V1DaemonSetUpdateStrategy -> V1DaemonSetSpec)
-> Parser (Maybe V1DaemonSetUpdateStrategy)
-> Parser V1DaemonSetSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1DaemonSetUpdateStrategy)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"updateStrategy")

-- | ToJSON V1DaemonSetSpec
instance A.ToJSON V1DaemonSetSpec where
  toJSON :: V1DaemonSetSpec -> Value
toJSON V1DaemonSetSpec {Maybe Int
Maybe V1DaemonSetUpdateStrategy
V1PodTemplateSpec
V1LabelSelector
$sel:v1DaemonSetSpecMinReadySeconds:V1DaemonSetSpec :: V1DaemonSetSpec -> Maybe Int
$sel:v1DaemonSetSpecRevisionHistoryLimit:V1DaemonSetSpec :: V1DaemonSetSpec -> Maybe Int
$sel:v1DaemonSetSpecSelector:V1DaemonSetSpec :: V1DaemonSetSpec -> V1LabelSelector
$sel:v1DaemonSetSpecTemplate:V1DaemonSetSpec :: V1DaemonSetSpec -> V1PodTemplateSpec
$sel:v1DaemonSetSpecUpdateStrategy:V1DaemonSetSpec :: V1DaemonSetSpec -> Maybe V1DaemonSetUpdateStrategy
v1DaemonSetSpecMinReadySeconds :: Maybe Int
v1DaemonSetSpecRevisionHistoryLimit :: Maybe Int
v1DaemonSetSpecSelector :: V1LabelSelector
v1DaemonSetSpecTemplate :: V1PodTemplateSpec
v1DaemonSetSpecUpdateStrategy :: Maybe V1DaemonSetUpdateStrategy
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"minReadySeconds" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1DaemonSetSpecMinReadySeconds
      , Key
"revisionHistoryLimit" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1DaemonSetSpecRevisionHistoryLimit
      , Key
"selector" Key -> V1LabelSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1LabelSelector
v1DaemonSetSpecSelector
      , Key
"template" Key -> V1PodTemplateSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1PodTemplateSpec
v1DaemonSetSpecTemplate
      , Key
"updateStrategy" Key -> Maybe V1DaemonSetUpdateStrategy -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1DaemonSetUpdateStrategy
v1DaemonSetSpecUpdateStrategy
      ]


-- | Construct a value of type 'V1DaemonSetSpec' (by applying it's required fields, if any)
mkV1DaemonSetSpec
  :: V1LabelSelector -- ^ 'v1DaemonSetSpecSelector' 
  -> V1PodTemplateSpec -- ^ 'v1DaemonSetSpecTemplate' 
  -> V1DaemonSetSpec
mkV1DaemonSetSpec :: V1LabelSelector -> V1PodTemplateSpec -> V1DaemonSetSpec
mkV1DaemonSetSpec V1LabelSelector
v1DaemonSetSpecSelector V1PodTemplateSpec
v1DaemonSetSpecTemplate =
  V1DaemonSetSpec
  { $sel:v1DaemonSetSpecMinReadySeconds:V1DaemonSetSpec :: Maybe Int
v1DaemonSetSpecMinReadySeconds = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1DaemonSetSpecRevisionHistoryLimit:V1DaemonSetSpec :: Maybe Int
v1DaemonSetSpecRevisionHistoryLimit = Maybe Int
forall a. Maybe a
Nothing
  , V1LabelSelector
$sel:v1DaemonSetSpecSelector:V1DaemonSetSpec :: V1LabelSelector
v1DaemonSetSpecSelector :: V1LabelSelector
v1DaemonSetSpecSelector
  , V1PodTemplateSpec
$sel:v1DaemonSetSpecTemplate:V1DaemonSetSpec :: V1PodTemplateSpec
v1DaemonSetSpecTemplate :: V1PodTemplateSpec
v1DaemonSetSpecTemplate
  , $sel:v1DaemonSetSpecUpdateStrategy:V1DaemonSetSpec :: Maybe V1DaemonSetUpdateStrategy
v1DaemonSetSpecUpdateStrategy = Maybe V1DaemonSetUpdateStrategy
forall a. Maybe a
Nothing
  }

-- ** V1DaemonSetStatus
-- | V1DaemonSetStatus
-- DaemonSetStatus represents the current status of a daemon set.
data V1DaemonSetStatus = V1DaemonSetStatus
  { V1DaemonSetStatus -> Maybe Int
v1DaemonSetStatusCollisionCount :: !(Maybe Int) -- ^ "collisionCount" - Count of hash collisions for the DaemonSet. The DaemonSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.
  , V1DaemonSetStatus -> Maybe [V1DaemonSetCondition]
v1DaemonSetStatusConditions :: !(Maybe [V1DaemonSetCondition]) -- ^ "conditions" - Represents the latest available observations of a DaemonSet&#39;s current state.
  , V1DaemonSetStatus -> Int
v1DaemonSetStatusCurrentNumberScheduled :: !(Int) -- ^ /Required/ "currentNumberScheduled" - The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
  , V1DaemonSetStatus -> Int
v1DaemonSetStatusDesiredNumberScheduled :: !(Int) -- ^ /Required/ "desiredNumberScheduled" - The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
  , V1DaemonSetStatus -> Maybe Int
v1DaemonSetStatusNumberAvailable :: !(Maybe Int) -- ^ "numberAvailable" - The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds)
  , V1DaemonSetStatus -> Int
v1DaemonSetStatusNumberMisscheduled :: !(Int) -- ^ /Required/ "numberMisscheduled" - The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
  , V1DaemonSetStatus -> Int
v1DaemonSetStatusNumberReady :: !(Int) -- ^ /Required/ "numberReady" - numberReady is the number of nodes that should be running the daemon pod and have one or more of the daemon pod running with a Ready Condition.
  , V1DaemonSetStatus -> Maybe Int
v1DaemonSetStatusNumberUnavailable :: !(Maybe Int) -- ^ "numberUnavailable" - The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds)
  , V1DaemonSetStatus -> Maybe Integer
v1DaemonSetStatusObservedGeneration :: !(Maybe Integer) -- ^ "observedGeneration" - The most recent generation observed by the daemon set controller.
  , V1DaemonSetStatus -> Maybe Int
v1DaemonSetStatusUpdatedNumberScheduled :: !(Maybe Int) -- ^ "updatedNumberScheduled" - The total number of nodes that are running updated daemon pod
  } deriving (Int -> V1DaemonSetStatus -> ShowS
[V1DaemonSetStatus] -> ShowS
V1DaemonSetStatus -> String
(Int -> V1DaemonSetStatus -> ShowS)
-> (V1DaemonSetStatus -> String)
-> ([V1DaemonSetStatus] -> ShowS)
-> Show V1DaemonSetStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1DaemonSetStatus -> ShowS
showsPrec :: Int -> V1DaemonSetStatus -> ShowS
$cshow :: V1DaemonSetStatus -> String
show :: V1DaemonSetStatus -> String
$cshowList :: [V1DaemonSetStatus] -> ShowS
showList :: [V1DaemonSetStatus] -> ShowS
P.Show, V1DaemonSetStatus -> V1DaemonSetStatus -> Bool
(V1DaemonSetStatus -> V1DaemonSetStatus -> Bool)
-> (V1DaemonSetStatus -> V1DaemonSetStatus -> Bool)
-> Eq V1DaemonSetStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1DaemonSetStatus -> V1DaemonSetStatus -> Bool
== :: V1DaemonSetStatus -> V1DaemonSetStatus -> Bool
$c/= :: V1DaemonSetStatus -> V1DaemonSetStatus -> Bool
/= :: V1DaemonSetStatus -> V1DaemonSetStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1DaemonSetStatus
instance A.FromJSON V1DaemonSetStatus where
  parseJSON :: Value -> Parser V1DaemonSetStatus
parseJSON = String
-> (Object -> Parser V1DaemonSetStatus)
-> Value
-> Parser V1DaemonSetStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1DaemonSetStatus" ((Object -> Parser V1DaemonSetStatus)
 -> Value -> Parser V1DaemonSetStatus)
-> (Object -> Parser V1DaemonSetStatus)
-> Value
-> Parser V1DaemonSetStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Int
-> Maybe [V1DaemonSetCondition]
-> Int
-> Int
-> Maybe Int
-> Int
-> Int
-> Maybe Int
-> Maybe Integer
-> Maybe Int
-> V1DaemonSetStatus
V1DaemonSetStatus
      (Maybe Int
 -> Maybe [V1DaemonSetCondition]
 -> Int
 -> Int
 -> Maybe Int
 -> Int
 -> Int
 -> Maybe Int
 -> Maybe Integer
 -> Maybe Int
 -> V1DaemonSetStatus)
-> Parser (Maybe Int)
-> Parser
     (Maybe [V1DaemonSetCondition]
      -> Int
      -> Int
      -> Maybe Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Integer
      -> Maybe Int
      -> V1DaemonSetStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"collisionCount")
      Parser
  (Maybe [V1DaemonSetCondition]
   -> Int
   -> Int
   -> Maybe Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Integer
   -> Maybe Int
   -> V1DaemonSetStatus)
-> Parser (Maybe [V1DaemonSetCondition])
-> Parser
     (Int
      -> Int
      -> Maybe Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Integer
      -> Maybe Int
      -> V1DaemonSetStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1DaemonSetCondition])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"conditions")
      Parser
  (Int
   -> Int
   -> Maybe Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Integer
   -> Maybe Int
   -> V1DaemonSetStatus)
-> Parser Int
-> Parser
     (Int
      -> Maybe Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Integer
      -> Maybe Int
      -> V1DaemonSetStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"currentNumberScheduled")
      Parser
  (Int
   -> Maybe Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Integer
   -> Maybe Int
   -> V1DaemonSetStatus)
-> Parser Int
-> Parser
     (Maybe Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Integer
      -> Maybe Int
      -> V1DaemonSetStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"desiredNumberScheduled")
      Parser
  (Maybe Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Integer
   -> Maybe Int
   -> V1DaemonSetStatus)
-> Parser (Maybe Int)
-> Parser
     (Int
      -> Int
      -> Maybe Int
      -> Maybe Integer
      -> Maybe Int
      -> V1DaemonSetStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"numberAvailable")
      Parser
  (Int
   -> Int
   -> Maybe Int
   -> Maybe Integer
   -> Maybe Int
   -> V1DaemonSetStatus)
-> Parser Int
-> Parser
     (Int
      -> Maybe Int -> Maybe Integer -> Maybe Int -> V1DaemonSetStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"numberMisscheduled")
      Parser
  (Int
   -> Maybe Int -> Maybe Integer -> Maybe Int -> V1DaemonSetStatus)
-> Parser Int
-> Parser
     (Maybe Int -> Maybe Integer -> Maybe Int -> V1DaemonSetStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"numberReady")
      Parser
  (Maybe Int -> Maybe Integer -> Maybe Int -> V1DaemonSetStatus)
-> Parser (Maybe Int)
-> Parser (Maybe Integer -> Maybe Int -> V1DaemonSetStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"numberUnavailable")
      Parser (Maybe Integer -> Maybe Int -> V1DaemonSetStatus)
-> Parser (Maybe Integer)
-> Parser (Maybe Int -> V1DaemonSetStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"observedGeneration")
      Parser (Maybe Int -> V1DaemonSetStatus)
-> Parser (Maybe Int) -> Parser V1DaemonSetStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"updatedNumberScheduled")

-- | ToJSON V1DaemonSetStatus
instance A.ToJSON V1DaemonSetStatus where
  toJSON :: V1DaemonSetStatus -> Value
toJSON V1DaemonSetStatus {Int
Maybe Int
Maybe Integer
Maybe [V1DaemonSetCondition]
$sel:v1DaemonSetStatusCollisionCount:V1DaemonSetStatus :: V1DaemonSetStatus -> Maybe Int
$sel:v1DaemonSetStatusConditions:V1DaemonSetStatus :: V1DaemonSetStatus -> Maybe [V1DaemonSetCondition]
$sel:v1DaemonSetStatusCurrentNumberScheduled:V1DaemonSetStatus :: V1DaemonSetStatus -> Int
$sel:v1DaemonSetStatusDesiredNumberScheduled:V1DaemonSetStatus :: V1DaemonSetStatus -> Int
$sel:v1DaemonSetStatusNumberAvailable:V1DaemonSetStatus :: V1DaemonSetStatus -> Maybe Int
$sel:v1DaemonSetStatusNumberMisscheduled:V1DaemonSetStatus :: V1DaemonSetStatus -> Int
$sel:v1DaemonSetStatusNumberReady:V1DaemonSetStatus :: V1DaemonSetStatus -> Int
$sel:v1DaemonSetStatusNumberUnavailable:V1DaemonSetStatus :: V1DaemonSetStatus -> Maybe Int
$sel:v1DaemonSetStatusObservedGeneration:V1DaemonSetStatus :: V1DaemonSetStatus -> Maybe Integer
$sel:v1DaemonSetStatusUpdatedNumberScheduled:V1DaemonSetStatus :: V1DaemonSetStatus -> Maybe Int
v1DaemonSetStatusCollisionCount :: Maybe Int
v1DaemonSetStatusConditions :: Maybe [V1DaemonSetCondition]
v1DaemonSetStatusCurrentNumberScheduled :: Int
v1DaemonSetStatusDesiredNumberScheduled :: Int
v1DaemonSetStatusNumberAvailable :: Maybe Int
v1DaemonSetStatusNumberMisscheduled :: Int
v1DaemonSetStatusNumberReady :: Int
v1DaemonSetStatusNumberUnavailable :: Maybe Int
v1DaemonSetStatusObservedGeneration :: Maybe Integer
v1DaemonSetStatusUpdatedNumberScheduled :: Maybe Int
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"collisionCount" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1DaemonSetStatusCollisionCount
      , Key
"conditions" Key -> Maybe [V1DaemonSetCondition] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1DaemonSetCondition]
v1DaemonSetStatusConditions
      , Key
"currentNumberScheduled" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v1DaemonSetStatusCurrentNumberScheduled
      , Key
"desiredNumberScheduled" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v1DaemonSetStatusDesiredNumberScheduled
      , Key
"numberAvailable" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1DaemonSetStatusNumberAvailable
      , Key
"numberMisscheduled" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v1DaemonSetStatusNumberMisscheduled
      , Key
"numberReady" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v1DaemonSetStatusNumberReady
      , Key
"numberUnavailable" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1DaemonSetStatusNumberUnavailable
      , Key
"observedGeneration" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1DaemonSetStatusObservedGeneration
      , Key
"updatedNumberScheduled" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1DaemonSetStatusUpdatedNumberScheduled
      ]


-- | Construct a value of type 'V1DaemonSetStatus' (by applying it's required fields, if any)
mkV1DaemonSetStatus
  :: Int -- ^ 'v1DaemonSetStatusCurrentNumberScheduled': The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
  -> Int -- ^ 'v1DaemonSetStatusDesiredNumberScheduled': The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
  -> Int -- ^ 'v1DaemonSetStatusNumberMisscheduled': The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
  -> Int -- ^ 'v1DaemonSetStatusNumberReady': numberReady is the number of nodes that should be running the daemon pod and have one or more of the daemon pod running with a Ready Condition.
  -> V1DaemonSetStatus
mkV1DaemonSetStatus :: Int -> Int -> Int -> Int -> V1DaemonSetStatus
mkV1DaemonSetStatus Int
v1DaemonSetStatusCurrentNumberScheduled Int
v1DaemonSetStatusDesiredNumberScheduled Int
v1DaemonSetStatusNumberMisscheduled Int
v1DaemonSetStatusNumberReady =
  V1DaemonSetStatus
  { $sel:v1DaemonSetStatusCollisionCount:V1DaemonSetStatus :: Maybe Int
v1DaemonSetStatusCollisionCount = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1DaemonSetStatusConditions:V1DaemonSetStatus :: Maybe [V1DaemonSetCondition]
v1DaemonSetStatusConditions = Maybe [V1DaemonSetCondition]
forall a. Maybe a
Nothing
  , Int
$sel:v1DaemonSetStatusCurrentNumberScheduled:V1DaemonSetStatus :: Int
v1DaemonSetStatusCurrentNumberScheduled :: Int
v1DaemonSetStatusCurrentNumberScheduled
  , Int
$sel:v1DaemonSetStatusDesiredNumberScheduled:V1DaemonSetStatus :: Int
v1DaemonSetStatusDesiredNumberScheduled :: Int
v1DaemonSetStatusDesiredNumberScheduled
  , $sel:v1DaemonSetStatusNumberAvailable:V1DaemonSetStatus :: Maybe Int
v1DaemonSetStatusNumberAvailable = Maybe Int
forall a. Maybe a
Nothing
  , Int
$sel:v1DaemonSetStatusNumberMisscheduled:V1DaemonSetStatus :: Int
v1DaemonSetStatusNumberMisscheduled :: Int
v1DaemonSetStatusNumberMisscheduled
  , Int
$sel:v1DaemonSetStatusNumberReady:V1DaemonSetStatus :: Int
v1DaemonSetStatusNumberReady :: Int
v1DaemonSetStatusNumberReady
  , $sel:v1DaemonSetStatusNumberUnavailable:V1DaemonSetStatus :: Maybe Int
v1DaemonSetStatusNumberUnavailable = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1DaemonSetStatusObservedGeneration:V1DaemonSetStatus :: Maybe Integer
v1DaemonSetStatusObservedGeneration = Maybe Integer
forall a. Maybe a
Nothing
  , $sel:v1DaemonSetStatusUpdatedNumberScheduled:V1DaemonSetStatus :: Maybe Int
v1DaemonSetStatusUpdatedNumberScheduled = Maybe Int
forall a. Maybe a
Nothing
  }

-- ** V1DaemonSetUpdateStrategy
-- | V1DaemonSetUpdateStrategy
-- DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.
data V1DaemonSetUpdateStrategy = V1DaemonSetUpdateStrategy
  { V1DaemonSetUpdateStrategy -> Maybe V1RollingUpdateDaemonSet
v1DaemonSetUpdateStrategyRollingUpdate :: !(Maybe V1RollingUpdateDaemonSet) -- ^ "rollingUpdate"
  , V1DaemonSetUpdateStrategy -> Maybe Text
v1DaemonSetUpdateStrategyType :: !(Maybe Text) -- ^ "type" - Type of daemon set update. Can be \&quot;RollingUpdate\&quot; or \&quot;OnDelete\&quot;. Default is RollingUpdate.
  } deriving (Int -> V1DaemonSetUpdateStrategy -> ShowS
[V1DaemonSetUpdateStrategy] -> ShowS
V1DaemonSetUpdateStrategy -> String
(Int -> V1DaemonSetUpdateStrategy -> ShowS)
-> (V1DaemonSetUpdateStrategy -> String)
-> ([V1DaemonSetUpdateStrategy] -> ShowS)
-> Show V1DaemonSetUpdateStrategy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1DaemonSetUpdateStrategy -> ShowS
showsPrec :: Int -> V1DaemonSetUpdateStrategy -> ShowS
$cshow :: V1DaemonSetUpdateStrategy -> String
show :: V1DaemonSetUpdateStrategy -> String
$cshowList :: [V1DaemonSetUpdateStrategy] -> ShowS
showList :: [V1DaemonSetUpdateStrategy] -> ShowS
P.Show, V1DaemonSetUpdateStrategy -> V1DaemonSetUpdateStrategy -> Bool
(V1DaemonSetUpdateStrategy -> V1DaemonSetUpdateStrategy -> Bool)
-> (V1DaemonSetUpdateStrategy -> V1DaemonSetUpdateStrategy -> Bool)
-> Eq V1DaemonSetUpdateStrategy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1DaemonSetUpdateStrategy -> V1DaemonSetUpdateStrategy -> Bool
== :: V1DaemonSetUpdateStrategy -> V1DaemonSetUpdateStrategy -> Bool
$c/= :: V1DaemonSetUpdateStrategy -> V1DaemonSetUpdateStrategy -> Bool
/= :: V1DaemonSetUpdateStrategy -> V1DaemonSetUpdateStrategy -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1DaemonSetUpdateStrategy
instance A.FromJSON V1DaemonSetUpdateStrategy where
  parseJSON :: Value -> Parser V1DaemonSetUpdateStrategy
parseJSON = String
-> (Object -> Parser V1DaemonSetUpdateStrategy)
-> Value
-> Parser V1DaemonSetUpdateStrategy
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1DaemonSetUpdateStrategy" ((Object -> Parser V1DaemonSetUpdateStrategy)
 -> Value -> Parser V1DaemonSetUpdateStrategy)
-> (Object -> Parser V1DaemonSetUpdateStrategy)
-> Value
-> Parser V1DaemonSetUpdateStrategy
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1RollingUpdateDaemonSet
-> Maybe Text -> V1DaemonSetUpdateStrategy
V1DaemonSetUpdateStrategy
      (Maybe V1RollingUpdateDaemonSet
 -> Maybe Text -> V1DaemonSetUpdateStrategy)
-> Parser (Maybe V1RollingUpdateDaemonSet)
-> Parser (Maybe Text -> V1DaemonSetUpdateStrategy)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1RollingUpdateDaemonSet)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"rollingUpdate")
      Parser (Maybe Text -> V1DaemonSetUpdateStrategy)
-> Parser (Maybe Text) -> Parser V1DaemonSetUpdateStrategy
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"type")

-- | ToJSON V1DaemonSetUpdateStrategy
instance A.ToJSON V1DaemonSetUpdateStrategy where
  toJSON :: V1DaemonSetUpdateStrategy -> Value
toJSON V1DaemonSetUpdateStrategy {Maybe Text
Maybe V1RollingUpdateDaemonSet
$sel:v1DaemonSetUpdateStrategyRollingUpdate:V1DaemonSetUpdateStrategy :: V1DaemonSetUpdateStrategy -> Maybe V1RollingUpdateDaemonSet
$sel:v1DaemonSetUpdateStrategyType:V1DaemonSetUpdateStrategy :: V1DaemonSetUpdateStrategy -> Maybe Text
v1DaemonSetUpdateStrategyRollingUpdate :: Maybe V1RollingUpdateDaemonSet
v1DaemonSetUpdateStrategyType :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"rollingUpdate" Key -> Maybe V1RollingUpdateDaemonSet -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1RollingUpdateDaemonSet
v1DaemonSetUpdateStrategyRollingUpdate
      , Key
"type" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1DaemonSetUpdateStrategyType
      ]


-- | Construct a value of type 'V1DaemonSetUpdateStrategy' (by applying it's required fields, if any)
mkV1DaemonSetUpdateStrategy
  :: V1DaemonSetUpdateStrategy
mkV1DaemonSetUpdateStrategy :: V1DaemonSetUpdateStrategy
mkV1DaemonSetUpdateStrategy =
  V1DaemonSetUpdateStrategy
  { $sel:v1DaemonSetUpdateStrategyRollingUpdate:V1DaemonSetUpdateStrategy :: Maybe V1RollingUpdateDaemonSet
v1DaemonSetUpdateStrategyRollingUpdate = Maybe V1RollingUpdateDaemonSet
forall a. Maybe a
Nothing
  , $sel:v1DaemonSetUpdateStrategyType:V1DaemonSetUpdateStrategy :: Maybe Text
v1DaemonSetUpdateStrategyType = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1DeleteOptions
-- | V1DeleteOptions
-- DeleteOptions may be provided when deleting an API object.
data V1DeleteOptions = V1DeleteOptions
  { V1DeleteOptions -> Maybe Text
v1DeleteOptionsApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1DeleteOptions -> Maybe [Text]
v1DeleteOptionsDryRun :: !(Maybe [Text]) -- ^ "dryRun" - When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
  , V1DeleteOptions -> Maybe Integer
v1DeleteOptionsGracePeriodSeconds :: !(Maybe Integer) -- ^ "gracePeriodSeconds" - The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
  , V1DeleteOptions -> Maybe Bool
v1DeleteOptionsIgnoreStoreReadErrorWithClusterBreakingPotential :: !(Maybe Bool) -- ^ "ignoreStoreReadErrorWithClusterBreakingPotential" - if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
  , V1DeleteOptions -> Maybe Text
v1DeleteOptionsKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1DeleteOptions -> Maybe Bool
v1DeleteOptionsOrphanDependents :: !(Maybe Bool) -- ^ "orphanDependents" - Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \&quot;orphan\&quot; finalizer will be added to/removed from the object&#39;s finalizers list. Either this field or PropagationPolicy may be set, but not both.
  , V1DeleteOptions -> Maybe V1Preconditions
v1DeleteOptionsPreconditions :: !(Maybe V1Preconditions) -- ^ "preconditions"
  , V1DeleteOptions -> Maybe Text
v1DeleteOptionsPropagationPolicy :: !(Maybe Text) -- ^ "propagationPolicy" - Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: &#39;Orphan&#39; - orphan the dependents; &#39;Background&#39; - allow the garbage collector to delete the dependents in the background; &#39;Foreground&#39; - a cascading policy that deletes all dependents in the foreground.
  } deriving (Int -> V1DeleteOptions -> ShowS
[V1DeleteOptions] -> ShowS
V1DeleteOptions -> String
(Int -> V1DeleteOptions -> ShowS)
-> (V1DeleteOptions -> String)
-> ([V1DeleteOptions] -> ShowS)
-> Show V1DeleteOptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1DeleteOptions -> ShowS
showsPrec :: Int -> V1DeleteOptions -> ShowS
$cshow :: V1DeleteOptions -> String
show :: V1DeleteOptions -> String
$cshowList :: [V1DeleteOptions] -> ShowS
showList :: [V1DeleteOptions] -> ShowS
P.Show, V1DeleteOptions -> V1DeleteOptions -> Bool
(V1DeleteOptions -> V1DeleteOptions -> Bool)
-> (V1DeleteOptions -> V1DeleteOptions -> Bool)
-> Eq V1DeleteOptions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1DeleteOptions -> V1DeleteOptions -> Bool
== :: V1DeleteOptions -> V1DeleteOptions -> Bool
$c/= :: V1DeleteOptions -> V1DeleteOptions -> Bool
/= :: V1DeleteOptions -> V1DeleteOptions -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1DeleteOptions
instance A.FromJSON V1DeleteOptions where
  parseJSON :: Value -> Parser V1DeleteOptions
parseJSON = String
-> (Object -> Parser V1DeleteOptions)
-> Value
-> Parser V1DeleteOptions
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1DeleteOptions" ((Object -> Parser V1DeleteOptions)
 -> Value -> Parser V1DeleteOptions)
-> (Object -> Parser V1DeleteOptions)
-> Value
-> Parser V1DeleteOptions
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe [Text]
-> Maybe Integer
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe V1Preconditions
-> Maybe Text
-> V1DeleteOptions
V1DeleteOptions
      (Maybe Text
 -> Maybe [Text]
 -> Maybe Integer
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Bool
 -> Maybe V1Preconditions
 -> Maybe Text
 -> V1DeleteOptions)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe Integer
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Bool
      -> Maybe V1Preconditions
      -> Maybe Text
      -> V1DeleteOptions)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe [Text]
   -> Maybe Integer
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Bool
   -> Maybe V1Preconditions
   -> Maybe Text
   -> V1DeleteOptions)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Integer
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Bool
      -> Maybe V1Preconditions
      -> Maybe Text
      -> V1DeleteOptions)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"dryRun")
      Parser
  (Maybe Integer
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Bool
   -> Maybe V1Preconditions
   -> Maybe Text
   -> V1DeleteOptions)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Bool
      -> Maybe V1Preconditions
      -> Maybe Text
      -> V1DeleteOptions)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"gracePeriodSeconds")
      Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Bool
   -> Maybe V1Preconditions
   -> Maybe Text
   -> V1DeleteOptions)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe V1Preconditions
      -> Maybe Text
      -> V1DeleteOptions)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ignoreStoreReadErrorWithClusterBreakingPotential")
      Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe V1Preconditions
   -> Maybe Text
   -> V1DeleteOptions)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe V1Preconditions -> Maybe Text -> V1DeleteOptions)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe Bool
   -> Maybe V1Preconditions -> Maybe Text -> V1DeleteOptions)
-> Parser (Maybe Bool)
-> Parser (Maybe V1Preconditions -> Maybe Text -> V1DeleteOptions)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"orphanDependents")
      Parser (Maybe V1Preconditions -> Maybe Text -> V1DeleteOptions)
-> Parser (Maybe V1Preconditions)
-> Parser (Maybe Text -> V1DeleteOptions)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1Preconditions)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"preconditions")
      Parser (Maybe Text -> V1DeleteOptions)
-> Parser (Maybe Text) -> Parser V1DeleteOptions
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"propagationPolicy")

-- | ToJSON V1DeleteOptions
instance A.ToJSON V1DeleteOptions where
  toJSON :: V1DeleteOptions -> Value
toJSON V1DeleteOptions {Maybe Bool
Maybe Integer
Maybe [Text]
Maybe Text
Maybe V1Preconditions
$sel:v1DeleteOptionsApiVersion:V1DeleteOptions :: V1DeleteOptions -> Maybe Text
$sel:v1DeleteOptionsDryRun:V1DeleteOptions :: V1DeleteOptions -> Maybe [Text]
$sel:v1DeleteOptionsGracePeriodSeconds:V1DeleteOptions :: V1DeleteOptions -> Maybe Integer
$sel:v1DeleteOptionsIgnoreStoreReadErrorWithClusterBreakingPotential:V1DeleteOptions :: V1DeleteOptions -> Maybe Bool
$sel:v1DeleteOptionsKind:V1DeleteOptions :: V1DeleteOptions -> Maybe Text
$sel:v1DeleteOptionsOrphanDependents:V1DeleteOptions :: V1DeleteOptions -> Maybe Bool
$sel:v1DeleteOptionsPreconditions:V1DeleteOptions :: V1DeleteOptions -> Maybe V1Preconditions
$sel:v1DeleteOptionsPropagationPolicy:V1DeleteOptions :: V1DeleteOptions -> Maybe Text
v1DeleteOptionsApiVersion :: Maybe Text
v1DeleteOptionsDryRun :: Maybe [Text]
v1DeleteOptionsGracePeriodSeconds :: Maybe Integer
v1DeleteOptionsIgnoreStoreReadErrorWithClusterBreakingPotential :: Maybe Bool
v1DeleteOptionsKind :: Maybe Text
v1DeleteOptionsOrphanDependents :: Maybe Bool
v1DeleteOptionsPreconditions :: Maybe V1Preconditions
v1DeleteOptionsPropagationPolicy :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1DeleteOptionsApiVersion
      , Key
"dryRun" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1DeleteOptionsDryRun
      , Key
"gracePeriodSeconds" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1DeleteOptionsGracePeriodSeconds
      , Key
"ignoreStoreReadErrorWithClusterBreakingPotential" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1DeleteOptionsIgnoreStoreReadErrorWithClusterBreakingPotential
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1DeleteOptionsKind
      , Key
"orphanDependents" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1DeleteOptionsOrphanDependents
      , Key
"preconditions" Key -> Maybe V1Preconditions -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1Preconditions
v1DeleteOptionsPreconditions
      , Key
"propagationPolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1DeleteOptionsPropagationPolicy
      ]


-- | Construct a value of type 'V1DeleteOptions' (by applying it's required fields, if any)
mkV1DeleteOptions
  :: V1DeleteOptions
mkV1DeleteOptions :: V1DeleteOptions
mkV1DeleteOptions =
  V1DeleteOptions
  { $sel:v1DeleteOptionsApiVersion:V1DeleteOptions :: Maybe Text
v1DeleteOptionsApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1DeleteOptionsDryRun:V1DeleteOptions :: Maybe [Text]
v1DeleteOptionsDryRun = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1DeleteOptionsGracePeriodSeconds:V1DeleteOptions :: Maybe Integer
v1DeleteOptionsGracePeriodSeconds = Maybe Integer
forall a. Maybe a
Nothing
  , $sel:v1DeleteOptionsIgnoreStoreReadErrorWithClusterBreakingPotential:V1DeleteOptions :: Maybe Bool
v1DeleteOptionsIgnoreStoreReadErrorWithClusterBreakingPotential = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1DeleteOptionsKind:V1DeleteOptions :: Maybe Text
v1DeleteOptionsKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1DeleteOptionsOrphanDependents:V1DeleteOptions :: Maybe Bool
v1DeleteOptionsOrphanDependents = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1DeleteOptionsPreconditions:V1DeleteOptions :: Maybe V1Preconditions
v1DeleteOptionsPreconditions = Maybe V1Preconditions
forall a. Maybe a
Nothing
  , $sel:v1DeleteOptionsPropagationPolicy:V1DeleteOptions :: Maybe Text
v1DeleteOptionsPropagationPolicy = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1Deployment
-- | V1Deployment
-- Deployment enables declarative updates for Pods and ReplicaSets.
data V1Deployment = V1Deployment
  { V1Deployment -> Maybe Text
v1DeploymentApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1Deployment -> Maybe Text
v1DeploymentKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1Deployment -> Maybe V1ObjectMeta
v1DeploymentMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1Deployment -> Maybe V1DeploymentSpec
v1DeploymentSpec :: !(Maybe V1DeploymentSpec) -- ^ "spec"
  , V1Deployment -> Maybe V1DeploymentStatus
v1DeploymentStatus :: !(Maybe V1DeploymentStatus) -- ^ "status"
  } deriving (Int -> V1Deployment -> ShowS
[V1Deployment] -> ShowS
V1Deployment -> String
(Int -> V1Deployment -> ShowS)
-> (V1Deployment -> String)
-> ([V1Deployment] -> ShowS)
-> Show V1Deployment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1Deployment -> ShowS
showsPrec :: Int -> V1Deployment -> ShowS
$cshow :: V1Deployment -> String
show :: V1Deployment -> String
$cshowList :: [V1Deployment] -> ShowS
showList :: [V1Deployment] -> ShowS
P.Show, V1Deployment -> V1Deployment -> Bool
(V1Deployment -> V1Deployment -> Bool)
-> (V1Deployment -> V1Deployment -> Bool) -> Eq V1Deployment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1Deployment -> V1Deployment -> Bool
== :: V1Deployment -> V1Deployment -> Bool
$c/= :: V1Deployment -> V1Deployment -> Bool
/= :: V1Deployment -> V1Deployment -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1Deployment
instance A.FromJSON V1Deployment where
  parseJSON :: Value -> Parser V1Deployment
parseJSON = String
-> (Object -> Parser V1Deployment) -> Value -> Parser V1Deployment
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1Deployment" ((Object -> Parser V1Deployment) -> Value -> Parser V1Deployment)
-> (Object -> Parser V1Deployment) -> Value -> Parser V1Deployment
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1DeploymentSpec
-> Maybe V1DeploymentStatus
-> V1Deployment
V1Deployment
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1DeploymentSpec
 -> Maybe V1DeploymentStatus
 -> V1Deployment)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1DeploymentSpec
      -> Maybe V1DeploymentStatus
      -> V1Deployment)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1DeploymentSpec
   -> Maybe V1DeploymentStatus
   -> V1Deployment)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1DeploymentSpec
      -> Maybe V1DeploymentStatus
      -> V1Deployment)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1DeploymentSpec
   -> Maybe V1DeploymentStatus
   -> V1Deployment)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe V1DeploymentSpec
      -> Maybe V1DeploymentStatus -> V1Deployment)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (Maybe V1DeploymentSpec
   -> Maybe V1DeploymentStatus -> V1Deployment)
-> Parser (Maybe V1DeploymentSpec)
-> Parser (Maybe V1DeploymentStatus -> V1Deployment)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1DeploymentSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")
      Parser (Maybe V1DeploymentStatus -> V1Deployment)
-> Parser (Maybe V1DeploymentStatus) -> Parser V1Deployment
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1DeploymentStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1Deployment
instance A.ToJSON V1Deployment where
  toJSON :: V1Deployment -> Value
toJSON V1Deployment {Maybe Text
Maybe V1ObjectMeta
Maybe V1DeploymentStatus
Maybe V1DeploymentSpec
$sel:v1DeploymentApiVersion:V1Deployment :: V1Deployment -> Maybe Text
$sel:v1DeploymentKind:V1Deployment :: V1Deployment -> Maybe Text
$sel:v1DeploymentMetadata:V1Deployment :: V1Deployment -> Maybe V1ObjectMeta
$sel:v1DeploymentSpec:V1Deployment :: V1Deployment -> Maybe V1DeploymentSpec
$sel:v1DeploymentStatus:V1Deployment :: V1Deployment -> Maybe V1DeploymentStatus
v1DeploymentApiVersion :: Maybe Text
v1DeploymentKind :: Maybe Text
v1DeploymentMetadata :: Maybe V1ObjectMeta
v1DeploymentSpec :: Maybe V1DeploymentSpec
v1DeploymentStatus :: Maybe V1DeploymentStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1DeploymentApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1DeploymentKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1DeploymentMetadata
      , Key
"spec" Key -> Maybe V1DeploymentSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1DeploymentSpec
v1DeploymentSpec
      , Key
"status" Key -> Maybe V1DeploymentStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1DeploymentStatus
v1DeploymentStatus
      ]


-- | Construct a value of type 'V1Deployment' (by applying it's required fields, if any)
mkV1Deployment
  :: V1Deployment
mkV1Deployment :: V1Deployment
mkV1Deployment =
  V1Deployment
  { $sel:v1DeploymentApiVersion:V1Deployment :: Maybe Text
v1DeploymentApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1DeploymentKind:V1Deployment :: Maybe Text
v1DeploymentKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1DeploymentMetadata:V1Deployment :: Maybe V1ObjectMeta
v1DeploymentMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1DeploymentSpec:V1Deployment :: Maybe V1DeploymentSpec
v1DeploymentSpec = Maybe V1DeploymentSpec
forall a. Maybe a
Nothing
  , $sel:v1DeploymentStatus:V1Deployment :: Maybe V1DeploymentStatus
v1DeploymentStatus = Maybe V1DeploymentStatus
forall a. Maybe a
Nothing
  }

-- ** V1DeploymentCondition
-- | V1DeploymentCondition
-- DeploymentCondition describes the state of a deployment at a certain point.
data V1DeploymentCondition = V1DeploymentCondition
  { V1DeploymentCondition -> Maybe DateTime
v1DeploymentConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - Last time the condition transitioned from one status to another.
  , V1DeploymentCondition -> Maybe DateTime
v1DeploymentConditionLastUpdateTime :: !(Maybe DateTime) -- ^ "lastUpdateTime" - The last time this condition was updated.
  , V1DeploymentCondition -> Maybe Text
v1DeploymentConditionMessage :: !(Maybe Text) -- ^ "message" - A human readable message indicating details about the transition.
  , V1DeploymentCondition -> Maybe Text
v1DeploymentConditionReason :: !(Maybe Text) -- ^ "reason" - The reason for the condition&#39;s last transition.
  , V1DeploymentCondition -> Text
v1DeploymentConditionStatus :: !(Text) -- ^ /Required/ "status" - Status of the condition, one of True, False, Unknown.
  , V1DeploymentCondition -> Text
v1DeploymentConditionType :: !(Text) -- ^ /Required/ "type" - Type of deployment condition.
  } deriving (Int -> V1DeploymentCondition -> ShowS
[V1DeploymentCondition] -> ShowS
V1DeploymentCondition -> String
(Int -> V1DeploymentCondition -> ShowS)
-> (V1DeploymentCondition -> String)
-> ([V1DeploymentCondition] -> ShowS)
-> Show V1DeploymentCondition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1DeploymentCondition -> ShowS
showsPrec :: Int -> V1DeploymentCondition -> ShowS
$cshow :: V1DeploymentCondition -> String
show :: V1DeploymentCondition -> String
$cshowList :: [V1DeploymentCondition] -> ShowS
showList :: [V1DeploymentCondition] -> ShowS
P.Show, V1DeploymentCondition -> V1DeploymentCondition -> Bool
(V1DeploymentCondition -> V1DeploymentCondition -> Bool)
-> (V1DeploymentCondition -> V1DeploymentCondition -> Bool)
-> Eq V1DeploymentCondition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1DeploymentCondition -> V1DeploymentCondition -> Bool
== :: V1DeploymentCondition -> V1DeploymentCondition -> Bool
$c/= :: V1DeploymentCondition -> V1DeploymentCondition -> Bool
/= :: V1DeploymentCondition -> V1DeploymentCondition -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1DeploymentCondition
instance A.FromJSON V1DeploymentCondition where
  parseJSON :: Value -> Parser V1DeploymentCondition
parseJSON = String
-> (Object -> Parser V1DeploymentCondition)
-> Value
-> Parser V1DeploymentCondition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1DeploymentCondition" ((Object -> Parser V1DeploymentCondition)
 -> Value -> Parser V1DeploymentCondition)
-> (Object -> Parser V1DeploymentCondition)
-> Value
-> Parser V1DeploymentCondition
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe DateTime
-> Maybe DateTime
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> V1DeploymentCondition
V1DeploymentCondition
      (Maybe DateTime
 -> Maybe DateTime
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> Text
 -> V1DeploymentCondition)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe DateTime
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> V1DeploymentCondition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lastTransitionTime")
      Parser
  (Maybe DateTime
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> V1DeploymentCondition)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe Text -> Maybe Text -> Text -> Text -> V1DeploymentCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lastUpdateTime")
      Parser
  (Maybe Text -> Maybe Text -> Text -> Text -> V1DeploymentCondition)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Text -> Text -> V1DeploymentCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"message")
      Parser (Maybe Text -> Text -> Text -> V1DeploymentCondition)
-> Parser (Maybe Text)
-> Parser (Text -> Text -> V1DeploymentCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reason")
      Parser (Text -> Text -> V1DeploymentCondition)
-> Parser Text -> Parser (Text -> V1DeploymentCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"status")
      Parser (Text -> V1DeploymentCondition)
-> Parser Text -> Parser V1DeploymentCondition
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"type")

-- | ToJSON V1DeploymentCondition
instance A.ToJSON V1DeploymentCondition where
  toJSON :: V1DeploymentCondition -> Value
toJSON V1DeploymentCondition {Maybe Text
Maybe DateTime
Text
$sel:v1DeploymentConditionLastTransitionTime:V1DeploymentCondition :: V1DeploymentCondition -> Maybe DateTime
$sel:v1DeploymentConditionLastUpdateTime:V1DeploymentCondition :: V1DeploymentCondition -> Maybe DateTime
$sel:v1DeploymentConditionMessage:V1DeploymentCondition :: V1DeploymentCondition -> Maybe Text
$sel:v1DeploymentConditionReason:V1DeploymentCondition :: V1DeploymentCondition -> Maybe Text
$sel:v1DeploymentConditionStatus:V1DeploymentCondition :: V1DeploymentCondition -> Text
$sel:v1DeploymentConditionType:V1DeploymentCondition :: V1DeploymentCondition -> Text
v1DeploymentConditionLastTransitionTime :: Maybe DateTime
v1DeploymentConditionLastUpdateTime :: Maybe DateTime
v1DeploymentConditionMessage :: Maybe Text
v1DeploymentConditionReason :: Maybe Text
v1DeploymentConditionStatus :: Text
v1DeploymentConditionType :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"lastTransitionTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1DeploymentConditionLastTransitionTime
      , Key
"lastUpdateTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1DeploymentConditionLastUpdateTime
      , Key
"message" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1DeploymentConditionMessage
      , Key
"reason" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1DeploymentConditionReason
      , Key
"status" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1DeploymentConditionStatus
      , Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1DeploymentConditionType
      ]


-- | Construct a value of type 'V1DeploymentCondition' (by applying it's required fields, if any)
mkV1DeploymentCondition
  :: Text -- ^ 'v1DeploymentConditionStatus': Status of the condition, one of True, False, Unknown.
  -> Text -- ^ 'v1DeploymentConditionType': Type of deployment condition.
  -> V1DeploymentCondition
mkV1DeploymentCondition :: Text -> Text -> V1DeploymentCondition
mkV1DeploymentCondition Text
v1DeploymentConditionStatus Text
v1DeploymentConditionType =
  V1DeploymentCondition
  { $sel:v1DeploymentConditionLastTransitionTime:V1DeploymentCondition :: Maybe DateTime
v1DeploymentConditionLastTransitionTime = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1DeploymentConditionLastUpdateTime:V1DeploymentCondition :: Maybe DateTime
v1DeploymentConditionLastUpdateTime = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1DeploymentConditionMessage:V1DeploymentCondition :: Maybe Text
v1DeploymentConditionMessage = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1DeploymentConditionReason:V1DeploymentCondition :: Maybe Text
v1DeploymentConditionReason = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1DeploymentConditionStatus:V1DeploymentCondition :: Text
v1DeploymentConditionStatus :: Text
v1DeploymentConditionStatus
  , Text
$sel:v1DeploymentConditionType:V1DeploymentCondition :: Text
v1DeploymentConditionType :: Text
v1DeploymentConditionType
  }

-- ** V1DeploymentList
-- | V1DeploymentList
-- DeploymentList is a list of Deployments.
data V1DeploymentList = V1DeploymentList
  { V1DeploymentList -> Maybe Text
v1DeploymentListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1DeploymentList -> [V1Deployment]
v1DeploymentListItems :: !([V1Deployment]) -- ^ /Required/ "items" - Items is the list of Deployments.
  , V1DeploymentList -> Maybe Text
v1DeploymentListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1DeploymentList -> Maybe V1ListMeta
v1DeploymentListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1DeploymentList -> ShowS
[V1DeploymentList] -> ShowS
V1DeploymentList -> String
(Int -> V1DeploymentList -> ShowS)
-> (V1DeploymentList -> String)
-> ([V1DeploymentList] -> ShowS)
-> Show V1DeploymentList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1DeploymentList -> ShowS
showsPrec :: Int -> V1DeploymentList -> ShowS
$cshow :: V1DeploymentList -> String
show :: V1DeploymentList -> String
$cshowList :: [V1DeploymentList] -> ShowS
showList :: [V1DeploymentList] -> ShowS
P.Show, V1DeploymentList -> V1DeploymentList -> Bool
(V1DeploymentList -> V1DeploymentList -> Bool)
-> (V1DeploymentList -> V1DeploymentList -> Bool)
-> Eq V1DeploymentList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1DeploymentList -> V1DeploymentList -> Bool
== :: V1DeploymentList -> V1DeploymentList -> Bool
$c/= :: V1DeploymentList -> V1DeploymentList -> Bool
/= :: V1DeploymentList -> V1DeploymentList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1DeploymentList
instance A.FromJSON V1DeploymentList where
  parseJSON :: Value -> Parser V1DeploymentList
parseJSON = String
-> (Object -> Parser V1DeploymentList)
-> Value
-> Parser V1DeploymentList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1DeploymentList" ((Object -> Parser V1DeploymentList)
 -> Value -> Parser V1DeploymentList)
-> (Object -> Parser V1DeploymentList)
-> Value
-> Parser V1DeploymentList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1Deployment]
-> Maybe Text
-> Maybe V1ListMeta
-> V1DeploymentList
V1DeploymentList
      (Maybe Text
 -> [V1Deployment]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1DeploymentList)
-> Parser (Maybe Text)
-> Parser
     ([V1Deployment]
      -> Maybe Text -> Maybe V1ListMeta -> V1DeploymentList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1Deployment]
   -> Maybe Text -> Maybe V1ListMeta -> V1DeploymentList)
-> Parser [V1Deployment]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1DeploymentList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1Deployment]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1DeploymentList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1DeploymentList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1DeploymentList)
-> Parser (Maybe V1ListMeta) -> Parser V1DeploymentList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1DeploymentList
instance A.ToJSON V1DeploymentList where
  toJSON :: V1DeploymentList -> Value
toJSON V1DeploymentList {[V1Deployment]
Maybe Text
Maybe V1ListMeta
$sel:v1DeploymentListApiVersion:V1DeploymentList :: V1DeploymentList -> Maybe Text
$sel:v1DeploymentListItems:V1DeploymentList :: V1DeploymentList -> [V1Deployment]
$sel:v1DeploymentListKind:V1DeploymentList :: V1DeploymentList -> Maybe Text
$sel:v1DeploymentListMetadata:V1DeploymentList :: V1DeploymentList -> Maybe V1ListMeta
v1DeploymentListApiVersion :: Maybe Text
v1DeploymentListItems :: [V1Deployment]
v1DeploymentListKind :: Maybe Text
v1DeploymentListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1DeploymentListApiVersion
      , Key
"items" Key -> [V1Deployment] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1Deployment]
v1DeploymentListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1DeploymentListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1DeploymentListMetadata
      ]


-- | Construct a value of type 'V1DeploymentList' (by applying it's required fields, if any)
mkV1DeploymentList
  :: [V1Deployment] -- ^ 'v1DeploymentListItems': Items is the list of Deployments.
  -> V1DeploymentList
mkV1DeploymentList :: [V1Deployment] -> V1DeploymentList
mkV1DeploymentList [V1Deployment]
v1DeploymentListItems =
  V1DeploymentList
  { $sel:v1DeploymentListApiVersion:V1DeploymentList :: Maybe Text
v1DeploymentListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1Deployment]
$sel:v1DeploymentListItems:V1DeploymentList :: [V1Deployment]
v1DeploymentListItems :: [V1Deployment]
v1DeploymentListItems
  , $sel:v1DeploymentListKind:V1DeploymentList :: Maybe Text
v1DeploymentListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1DeploymentListMetadata:V1DeploymentList :: Maybe V1ListMeta
v1DeploymentListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1DeploymentSpec
-- | V1DeploymentSpec
-- DeploymentSpec is the specification of the desired behavior of the Deployment.
data V1DeploymentSpec = V1DeploymentSpec
  { V1DeploymentSpec -> Maybe Int
v1DeploymentSpecMinReadySeconds :: !(Maybe Int) -- ^ "minReadySeconds" - Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)
  , V1DeploymentSpec -> Maybe Bool
v1DeploymentSpecPaused :: !(Maybe Bool) -- ^ "paused" - Indicates that the deployment is paused.
  , V1DeploymentSpec -> Maybe Int
v1DeploymentSpecProgressDeadlineSeconds :: !(Maybe Int) -- ^ "progressDeadlineSeconds" - The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.
  , V1DeploymentSpec -> Maybe Int
v1DeploymentSpecReplicas :: !(Maybe Int) -- ^ "replicas" - Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.
  , V1DeploymentSpec -> Maybe Int
v1DeploymentSpecRevisionHistoryLimit :: !(Maybe Int) -- ^ "revisionHistoryLimit" - The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.
  , V1DeploymentSpec -> V1LabelSelector
v1DeploymentSpecSelector :: !(V1LabelSelector) -- ^ /Required/ "selector"
  , V1DeploymentSpec -> Maybe V1DeploymentStrategy
v1DeploymentSpecStrategy :: !(Maybe V1DeploymentStrategy) -- ^ "strategy"
  , V1DeploymentSpec -> V1PodTemplateSpec
v1DeploymentSpecTemplate :: !(V1PodTemplateSpec) -- ^ /Required/ "template"
  } deriving (Int -> V1DeploymentSpec -> ShowS
[V1DeploymentSpec] -> ShowS
V1DeploymentSpec -> String
(Int -> V1DeploymentSpec -> ShowS)
-> (V1DeploymentSpec -> String)
-> ([V1DeploymentSpec] -> ShowS)
-> Show V1DeploymentSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1DeploymentSpec -> ShowS
showsPrec :: Int -> V1DeploymentSpec -> ShowS
$cshow :: V1DeploymentSpec -> String
show :: V1DeploymentSpec -> String
$cshowList :: [V1DeploymentSpec] -> ShowS
showList :: [V1DeploymentSpec] -> ShowS
P.Show, V1DeploymentSpec -> V1DeploymentSpec -> Bool
(V1DeploymentSpec -> V1DeploymentSpec -> Bool)
-> (V1DeploymentSpec -> V1DeploymentSpec -> Bool)
-> Eq V1DeploymentSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1DeploymentSpec -> V1DeploymentSpec -> Bool
== :: V1DeploymentSpec -> V1DeploymentSpec -> Bool
$c/= :: V1DeploymentSpec -> V1DeploymentSpec -> Bool
/= :: V1DeploymentSpec -> V1DeploymentSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1DeploymentSpec
instance A.FromJSON V1DeploymentSpec where
  parseJSON :: Value -> Parser V1DeploymentSpec
parseJSON = String
-> (Object -> Parser V1DeploymentSpec)
-> Value
-> Parser V1DeploymentSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1DeploymentSpec" ((Object -> Parser V1DeploymentSpec)
 -> Value -> Parser V1DeploymentSpec)
-> (Object -> Parser V1DeploymentSpec)
-> Value
-> Parser V1DeploymentSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Int
-> Maybe Bool
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> V1LabelSelector
-> Maybe V1DeploymentStrategy
-> V1PodTemplateSpec
-> V1DeploymentSpec
V1DeploymentSpec
      (Maybe Int
 -> Maybe Bool
 -> Maybe Int
 -> Maybe Int
 -> Maybe Int
 -> V1LabelSelector
 -> Maybe V1DeploymentStrategy
 -> V1PodTemplateSpec
 -> V1DeploymentSpec)
-> Parser (Maybe Int)
-> Parser
     (Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> V1LabelSelector
      -> Maybe V1DeploymentStrategy
      -> V1PodTemplateSpec
      -> V1DeploymentSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"minReadySeconds")
      Parser
  (Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> V1LabelSelector
   -> Maybe V1DeploymentStrategy
   -> V1PodTemplateSpec
   -> V1DeploymentSpec)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> V1LabelSelector
      -> Maybe V1DeploymentStrategy
      -> V1PodTemplateSpec
      -> V1DeploymentSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"paused")
      Parser
  (Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> V1LabelSelector
   -> Maybe V1DeploymentStrategy
   -> V1PodTemplateSpec
   -> V1DeploymentSpec)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe Int
      -> V1LabelSelector
      -> Maybe V1DeploymentStrategy
      -> V1PodTemplateSpec
      -> V1DeploymentSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"progressDeadlineSeconds")
      Parser
  (Maybe Int
   -> Maybe Int
   -> V1LabelSelector
   -> Maybe V1DeploymentStrategy
   -> V1PodTemplateSpec
   -> V1DeploymentSpec)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> V1LabelSelector
      -> Maybe V1DeploymentStrategy
      -> V1PodTemplateSpec
      -> V1DeploymentSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"replicas")
      Parser
  (Maybe Int
   -> V1LabelSelector
   -> Maybe V1DeploymentStrategy
   -> V1PodTemplateSpec
   -> V1DeploymentSpec)
-> Parser (Maybe Int)
-> Parser
     (V1LabelSelector
      -> Maybe V1DeploymentStrategy
      -> V1PodTemplateSpec
      -> V1DeploymentSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"revisionHistoryLimit")
      Parser
  (V1LabelSelector
   -> Maybe V1DeploymentStrategy
   -> V1PodTemplateSpec
   -> V1DeploymentSpec)
-> Parser V1LabelSelector
-> Parser
     (Maybe V1DeploymentStrategy
      -> V1PodTemplateSpec -> V1DeploymentSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1LabelSelector
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"selector")
      Parser
  (Maybe V1DeploymentStrategy
   -> V1PodTemplateSpec -> V1DeploymentSpec)
-> Parser (Maybe V1DeploymentStrategy)
-> Parser (V1PodTemplateSpec -> V1DeploymentSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1DeploymentStrategy)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"strategy")
      Parser (V1PodTemplateSpec -> V1DeploymentSpec)
-> Parser V1PodTemplateSpec -> Parser V1DeploymentSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1PodTemplateSpec
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"template")

-- | ToJSON V1DeploymentSpec
instance A.ToJSON V1DeploymentSpec where
  toJSON :: V1DeploymentSpec -> Value
toJSON V1DeploymentSpec {Maybe Bool
Maybe Int
Maybe V1DeploymentStrategy
V1PodTemplateSpec
V1LabelSelector
$sel:v1DeploymentSpecMinReadySeconds:V1DeploymentSpec :: V1DeploymentSpec -> Maybe Int
$sel:v1DeploymentSpecPaused:V1DeploymentSpec :: V1DeploymentSpec -> Maybe Bool
$sel:v1DeploymentSpecProgressDeadlineSeconds:V1DeploymentSpec :: V1DeploymentSpec -> Maybe Int
$sel:v1DeploymentSpecReplicas:V1DeploymentSpec :: V1DeploymentSpec -> Maybe Int
$sel:v1DeploymentSpecRevisionHistoryLimit:V1DeploymentSpec :: V1DeploymentSpec -> Maybe Int
$sel:v1DeploymentSpecSelector:V1DeploymentSpec :: V1DeploymentSpec -> V1LabelSelector
$sel:v1DeploymentSpecStrategy:V1DeploymentSpec :: V1DeploymentSpec -> Maybe V1DeploymentStrategy
$sel:v1DeploymentSpecTemplate:V1DeploymentSpec :: V1DeploymentSpec -> V1PodTemplateSpec
v1DeploymentSpecMinReadySeconds :: Maybe Int
v1DeploymentSpecPaused :: Maybe Bool
v1DeploymentSpecProgressDeadlineSeconds :: Maybe Int
v1DeploymentSpecReplicas :: Maybe Int
v1DeploymentSpecRevisionHistoryLimit :: Maybe Int
v1DeploymentSpecSelector :: V1LabelSelector
v1DeploymentSpecStrategy :: Maybe V1DeploymentStrategy
v1DeploymentSpecTemplate :: V1PodTemplateSpec
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"minReadySeconds" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1DeploymentSpecMinReadySeconds
      , Key
"paused" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1DeploymentSpecPaused
      , Key
"progressDeadlineSeconds" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1DeploymentSpecProgressDeadlineSeconds
      , Key
"replicas" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1DeploymentSpecReplicas
      , Key
"revisionHistoryLimit" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1DeploymentSpecRevisionHistoryLimit
      , Key
"selector" Key -> V1LabelSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1LabelSelector
v1DeploymentSpecSelector
      , Key
"strategy" Key -> Maybe V1DeploymentStrategy -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1DeploymentStrategy
v1DeploymentSpecStrategy
      , Key
"template" Key -> V1PodTemplateSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1PodTemplateSpec
v1DeploymentSpecTemplate
      ]


-- | Construct a value of type 'V1DeploymentSpec' (by applying it's required fields, if any)
mkV1DeploymentSpec
  :: V1LabelSelector -- ^ 'v1DeploymentSpecSelector' 
  -> V1PodTemplateSpec -- ^ 'v1DeploymentSpecTemplate' 
  -> V1DeploymentSpec
mkV1DeploymentSpec :: V1LabelSelector -> V1PodTemplateSpec -> V1DeploymentSpec
mkV1DeploymentSpec V1LabelSelector
v1DeploymentSpecSelector V1PodTemplateSpec
v1DeploymentSpecTemplate =
  V1DeploymentSpec
  { $sel:v1DeploymentSpecMinReadySeconds:V1DeploymentSpec :: Maybe Int
v1DeploymentSpecMinReadySeconds = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1DeploymentSpecPaused:V1DeploymentSpec :: Maybe Bool
v1DeploymentSpecPaused = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1DeploymentSpecProgressDeadlineSeconds:V1DeploymentSpec :: Maybe Int
v1DeploymentSpecProgressDeadlineSeconds = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1DeploymentSpecReplicas:V1DeploymentSpec :: Maybe Int
v1DeploymentSpecReplicas = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1DeploymentSpecRevisionHistoryLimit:V1DeploymentSpec :: Maybe Int
v1DeploymentSpecRevisionHistoryLimit = Maybe Int
forall a. Maybe a
Nothing
  , V1LabelSelector
$sel:v1DeploymentSpecSelector:V1DeploymentSpec :: V1LabelSelector
v1DeploymentSpecSelector :: V1LabelSelector
v1DeploymentSpecSelector
  , $sel:v1DeploymentSpecStrategy:V1DeploymentSpec :: Maybe V1DeploymentStrategy
v1DeploymentSpecStrategy = Maybe V1DeploymentStrategy
forall a. Maybe a
Nothing
  , V1PodTemplateSpec
$sel:v1DeploymentSpecTemplate:V1DeploymentSpec :: V1PodTemplateSpec
v1DeploymentSpecTemplate :: V1PodTemplateSpec
v1DeploymentSpecTemplate
  }

-- ** V1DeploymentStatus
-- | V1DeploymentStatus
-- DeploymentStatus is the most recently observed status of the Deployment.
data V1DeploymentStatus = V1DeploymentStatus
  { V1DeploymentStatus -> Maybe Int
v1DeploymentStatusAvailableReplicas :: !(Maybe Int) -- ^ "availableReplicas" - Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
  , V1DeploymentStatus -> Maybe Int
v1DeploymentStatusCollisionCount :: !(Maybe Int) -- ^ "collisionCount" - Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.
  , V1DeploymentStatus -> Maybe [V1DeploymentCondition]
v1DeploymentStatusConditions :: !(Maybe [V1DeploymentCondition]) -- ^ "conditions" - Represents the latest available observations of a deployment&#39;s current state.
  , V1DeploymentStatus -> Maybe Integer
v1DeploymentStatusObservedGeneration :: !(Maybe Integer) -- ^ "observedGeneration" - The generation observed by the deployment controller.
  , V1DeploymentStatus -> Maybe Int
v1DeploymentStatusReadyReplicas :: !(Maybe Int) -- ^ "readyReplicas" - readyReplicas is the number of pods targeted by this Deployment with a Ready Condition.
  , V1DeploymentStatus -> Maybe Int
v1DeploymentStatusReplicas :: !(Maybe Int) -- ^ "replicas" - Total number of non-terminated pods targeted by this deployment (their labels match the selector).
  , V1DeploymentStatus -> Maybe Int
v1DeploymentStatusUnavailableReplicas :: !(Maybe Int) -- ^ "unavailableReplicas" - Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created.
  , V1DeploymentStatus -> Maybe Int
v1DeploymentStatusUpdatedReplicas :: !(Maybe Int) -- ^ "updatedReplicas" - Total number of non-terminated pods targeted by this deployment that have the desired template spec.
  } deriving (Int -> V1DeploymentStatus -> ShowS
[V1DeploymentStatus] -> ShowS
V1DeploymentStatus -> String
(Int -> V1DeploymentStatus -> ShowS)
-> (V1DeploymentStatus -> String)
-> ([V1DeploymentStatus] -> ShowS)
-> Show V1DeploymentStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1DeploymentStatus -> ShowS
showsPrec :: Int -> V1DeploymentStatus -> ShowS
$cshow :: V1DeploymentStatus -> String
show :: V1DeploymentStatus -> String
$cshowList :: [V1DeploymentStatus] -> ShowS
showList :: [V1DeploymentStatus] -> ShowS
P.Show, V1DeploymentStatus -> V1DeploymentStatus -> Bool
(V1DeploymentStatus -> V1DeploymentStatus -> Bool)
-> (V1DeploymentStatus -> V1DeploymentStatus -> Bool)
-> Eq V1DeploymentStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1DeploymentStatus -> V1DeploymentStatus -> Bool
== :: V1DeploymentStatus -> V1DeploymentStatus -> Bool
$c/= :: V1DeploymentStatus -> V1DeploymentStatus -> Bool
/= :: V1DeploymentStatus -> V1DeploymentStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1DeploymentStatus
instance A.FromJSON V1DeploymentStatus where
  parseJSON :: Value -> Parser V1DeploymentStatus
parseJSON = String
-> (Object -> Parser V1DeploymentStatus)
-> Value
-> Parser V1DeploymentStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1DeploymentStatus" ((Object -> Parser V1DeploymentStatus)
 -> Value -> Parser V1DeploymentStatus)
-> (Object -> Parser V1DeploymentStatus)
-> Value
-> Parser V1DeploymentStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Int
-> Maybe Int
-> Maybe [V1DeploymentCondition]
-> Maybe Integer
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> V1DeploymentStatus
V1DeploymentStatus
      (Maybe Int
 -> Maybe Int
 -> Maybe [V1DeploymentCondition]
 -> Maybe Integer
 -> Maybe Int
 -> Maybe Int
 -> Maybe Int
 -> Maybe Int
 -> V1DeploymentStatus)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe [V1DeploymentCondition]
      -> Maybe Integer
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> V1DeploymentStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"availableReplicas")
      Parser
  (Maybe Int
   -> Maybe [V1DeploymentCondition]
   -> Maybe Integer
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> V1DeploymentStatus)
-> Parser (Maybe Int)
-> Parser
     (Maybe [V1DeploymentCondition]
      -> Maybe Integer
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> V1DeploymentStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"collisionCount")
      Parser
  (Maybe [V1DeploymentCondition]
   -> Maybe Integer
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> V1DeploymentStatus)
-> Parser (Maybe [V1DeploymentCondition])
-> Parser
     (Maybe Integer
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> V1DeploymentStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1DeploymentCondition])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"conditions")
      Parser
  (Maybe Integer
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> V1DeploymentStatus)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Int
      -> Maybe Int -> Maybe Int -> Maybe Int -> V1DeploymentStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"observedGeneration")
      Parser
  (Maybe Int
   -> Maybe Int -> Maybe Int -> Maybe Int -> V1DeploymentStatus)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int -> Maybe Int -> Maybe Int -> V1DeploymentStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readyReplicas")
      Parser (Maybe Int -> Maybe Int -> Maybe Int -> V1DeploymentStatus)
-> Parser (Maybe Int)
-> Parser (Maybe Int -> Maybe Int -> V1DeploymentStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"replicas")
      Parser (Maybe Int -> Maybe Int -> V1DeploymentStatus)
-> Parser (Maybe Int) -> Parser (Maybe Int -> V1DeploymentStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"unavailableReplicas")
      Parser (Maybe Int -> V1DeploymentStatus)
-> Parser (Maybe Int) -> Parser V1DeploymentStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"updatedReplicas")

-- | ToJSON V1DeploymentStatus
instance A.ToJSON V1DeploymentStatus where
  toJSON :: V1DeploymentStatus -> Value
toJSON V1DeploymentStatus {Maybe Int
Maybe Integer
Maybe [V1DeploymentCondition]
$sel:v1DeploymentStatusAvailableReplicas:V1DeploymentStatus :: V1DeploymentStatus -> Maybe Int
$sel:v1DeploymentStatusCollisionCount:V1DeploymentStatus :: V1DeploymentStatus -> Maybe Int
$sel:v1DeploymentStatusConditions:V1DeploymentStatus :: V1DeploymentStatus -> Maybe [V1DeploymentCondition]
$sel:v1DeploymentStatusObservedGeneration:V1DeploymentStatus :: V1DeploymentStatus -> Maybe Integer
$sel:v1DeploymentStatusReadyReplicas:V1DeploymentStatus :: V1DeploymentStatus -> Maybe Int
$sel:v1DeploymentStatusReplicas:V1DeploymentStatus :: V1DeploymentStatus -> Maybe Int
$sel:v1DeploymentStatusUnavailableReplicas:V1DeploymentStatus :: V1DeploymentStatus -> Maybe Int
$sel:v1DeploymentStatusUpdatedReplicas:V1DeploymentStatus :: V1DeploymentStatus -> Maybe Int
v1DeploymentStatusAvailableReplicas :: Maybe Int
v1DeploymentStatusCollisionCount :: Maybe Int
v1DeploymentStatusConditions :: Maybe [V1DeploymentCondition]
v1DeploymentStatusObservedGeneration :: Maybe Integer
v1DeploymentStatusReadyReplicas :: Maybe Int
v1DeploymentStatusReplicas :: Maybe Int
v1DeploymentStatusUnavailableReplicas :: Maybe Int
v1DeploymentStatusUpdatedReplicas :: Maybe Int
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"availableReplicas" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1DeploymentStatusAvailableReplicas
      , Key
"collisionCount" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1DeploymentStatusCollisionCount
      , Key
"conditions" Key -> Maybe [V1DeploymentCondition] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1DeploymentCondition]
v1DeploymentStatusConditions
      , Key
"observedGeneration" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1DeploymentStatusObservedGeneration
      , Key
"readyReplicas" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1DeploymentStatusReadyReplicas
      , Key
"replicas" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1DeploymentStatusReplicas
      , Key
"unavailableReplicas" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1DeploymentStatusUnavailableReplicas
      , Key
"updatedReplicas" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1DeploymentStatusUpdatedReplicas
      ]


-- | Construct a value of type 'V1DeploymentStatus' (by applying it's required fields, if any)
mkV1DeploymentStatus
  :: V1DeploymentStatus
mkV1DeploymentStatus :: V1DeploymentStatus
mkV1DeploymentStatus =
  V1DeploymentStatus
  { $sel:v1DeploymentStatusAvailableReplicas:V1DeploymentStatus :: Maybe Int
v1DeploymentStatusAvailableReplicas = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1DeploymentStatusCollisionCount:V1DeploymentStatus :: Maybe Int
v1DeploymentStatusCollisionCount = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1DeploymentStatusConditions:V1DeploymentStatus :: Maybe [V1DeploymentCondition]
v1DeploymentStatusConditions = Maybe [V1DeploymentCondition]
forall a. Maybe a
Nothing
  , $sel:v1DeploymentStatusObservedGeneration:V1DeploymentStatus :: Maybe Integer
v1DeploymentStatusObservedGeneration = Maybe Integer
forall a. Maybe a
Nothing
  , $sel:v1DeploymentStatusReadyReplicas:V1DeploymentStatus :: Maybe Int
v1DeploymentStatusReadyReplicas = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1DeploymentStatusReplicas:V1DeploymentStatus :: Maybe Int
v1DeploymentStatusReplicas = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1DeploymentStatusUnavailableReplicas:V1DeploymentStatus :: Maybe Int
v1DeploymentStatusUnavailableReplicas = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1DeploymentStatusUpdatedReplicas:V1DeploymentStatus :: Maybe Int
v1DeploymentStatusUpdatedReplicas = Maybe Int
forall a. Maybe a
Nothing
  }

-- ** V1DeploymentStrategy
-- | V1DeploymentStrategy
-- DeploymentStrategy describes how to replace existing pods with new ones.
data V1DeploymentStrategy = V1DeploymentStrategy
  { V1DeploymentStrategy -> Maybe V1RollingUpdateDeployment
v1DeploymentStrategyRollingUpdate :: !(Maybe V1RollingUpdateDeployment) -- ^ "rollingUpdate"
  , V1DeploymentStrategy -> Maybe Text
v1DeploymentStrategyType :: !(Maybe Text) -- ^ "type" - Type of deployment. Can be \&quot;Recreate\&quot; or \&quot;RollingUpdate\&quot;. Default is RollingUpdate.
  } deriving (Int -> V1DeploymentStrategy -> ShowS
[V1DeploymentStrategy] -> ShowS
V1DeploymentStrategy -> String
(Int -> V1DeploymentStrategy -> ShowS)
-> (V1DeploymentStrategy -> String)
-> ([V1DeploymentStrategy] -> ShowS)
-> Show V1DeploymentStrategy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1DeploymentStrategy -> ShowS
showsPrec :: Int -> V1DeploymentStrategy -> ShowS
$cshow :: V1DeploymentStrategy -> String
show :: V1DeploymentStrategy -> String
$cshowList :: [V1DeploymentStrategy] -> ShowS
showList :: [V1DeploymentStrategy] -> ShowS
P.Show, V1DeploymentStrategy -> V1DeploymentStrategy -> Bool
(V1DeploymentStrategy -> V1DeploymentStrategy -> Bool)
-> (V1DeploymentStrategy -> V1DeploymentStrategy -> Bool)
-> Eq V1DeploymentStrategy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1DeploymentStrategy -> V1DeploymentStrategy -> Bool
== :: V1DeploymentStrategy -> V1DeploymentStrategy -> Bool
$c/= :: V1DeploymentStrategy -> V1DeploymentStrategy -> Bool
/= :: V1DeploymentStrategy -> V1DeploymentStrategy -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1DeploymentStrategy
instance A.FromJSON V1DeploymentStrategy where
  parseJSON :: Value -> Parser V1DeploymentStrategy
parseJSON = String
-> (Object -> Parser V1DeploymentStrategy)
-> Value
-> Parser V1DeploymentStrategy
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1DeploymentStrategy" ((Object -> Parser V1DeploymentStrategy)
 -> Value -> Parser V1DeploymentStrategy)
-> (Object -> Parser V1DeploymentStrategy)
-> Value
-> Parser V1DeploymentStrategy
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1RollingUpdateDeployment
-> Maybe Text -> V1DeploymentStrategy
V1DeploymentStrategy
      (Maybe V1RollingUpdateDeployment
 -> Maybe Text -> V1DeploymentStrategy)
-> Parser (Maybe V1RollingUpdateDeployment)
-> Parser (Maybe Text -> V1DeploymentStrategy)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1RollingUpdateDeployment)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"rollingUpdate")
      Parser (Maybe Text -> V1DeploymentStrategy)
-> Parser (Maybe Text) -> Parser V1DeploymentStrategy
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"type")

-- | ToJSON V1DeploymentStrategy
instance A.ToJSON V1DeploymentStrategy where
  toJSON :: V1DeploymentStrategy -> Value
toJSON V1DeploymentStrategy {Maybe Text
Maybe V1RollingUpdateDeployment
$sel:v1DeploymentStrategyRollingUpdate:V1DeploymentStrategy :: V1DeploymentStrategy -> Maybe V1RollingUpdateDeployment
$sel:v1DeploymentStrategyType:V1DeploymentStrategy :: V1DeploymentStrategy -> Maybe Text
v1DeploymentStrategyRollingUpdate :: Maybe V1RollingUpdateDeployment
v1DeploymentStrategyType :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"rollingUpdate" Key -> Maybe V1RollingUpdateDeployment -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1RollingUpdateDeployment
v1DeploymentStrategyRollingUpdate
      , Key
"type" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1DeploymentStrategyType
      ]


-- | Construct a value of type 'V1DeploymentStrategy' (by applying it's required fields, if any)
mkV1DeploymentStrategy
  :: V1DeploymentStrategy
mkV1DeploymentStrategy :: V1DeploymentStrategy
mkV1DeploymentStrategy =
  V1DeploymentStrategy
  { $sel:v1DeploymentStrategyRollingUpdate:V1DeploymentStrategy :: Maybe V1RollingUpdateDeployment
v1DeploymentStrategyRollingUpdate = Maybe V1RollingUpdateDeployment
forall a. Maybe a
Nothing
  , $sel:v1DeploymentStrategyType:V1DeploymentStrategy :: Maybe Text
v1DeploymentStrategyType = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1DownwardAPIProjection
-- | V1DownwardAPIProjection
-- Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.
data V1DownwardAPIProjection = V1DownwardAPIProjection
  { V1DownwardAPIProjection -> Maybe [V1DownwardAPIVolumeFile]
v1DownwardAPIProjectionItems :: !(Maybe [V1DownwardAPIVolumeFile]) -- ^ "items" - Items is a list of DownwardAPIVolume file
  } deriving (Int -> V1DownwardAPIProjection -> ShowS
[V1DownwardAPIProjection] -> ShowS
V1DownwardAPIProjection -> String
(Int -> V1DownwardAPIProjection -> ShowS)
-> (V1DownwardAPIProjection -> String)
-> ([V1DownwardAPIProjection] -> ShowS)
-> Show V1DownwardAPIProjection
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1DownwardAPIProjection -> ShowS
showsPrec :: Int -> V1DownwardAPIProjection -> ShowS
$cshow :: V1DownwardAPIProjection -> String
show :: V1DownwardAPIProjection -> String
$cshowList :: [V1DownwardAPIProjection] -> ShowS
showList :: [V1DownwardAPIProjection] -> ShowS
P.Show, V1DownwardAPIProjection -> V1DownwardAPIProjection -> Bool
(V1DownwardAPIProjection -> V1DownwardAPIProjection -> Bool)
-> (V1DownwardAPIProjection -> V1DownwardAPIProjection -> Bool)
-> Eq V1DownwardAPIProjection
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1DownwardAPIProjection -> V1DownwardAPIProjection -> Bool
== :: V1DownwardAPIProjection -> V1DownwardAPIProjection -> Bool
$c/= :: V1DownwardAPIProjection -> V1DownwardAPIProjection -> Bool
/= :: V1DownwardAPIProjection -> V1DownwardAPIProjection -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1DownwardAPIProjection
instance A.FromJSON V1DownwardAPIProjection where
  parseJSON :: Value -> Parser V1DownwardAPIProjection
parseJSON = String
-> (Object -> Parser V1DownwardAPIProjection)
-> Value
-> Parser V1DownwardAPIProjection
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1DownwardAPIProjection" ((Object -> Parser V1DownwardAPIProjection)
 -> Value -> Parser V1DownwardAPIProjection)
-> (Object -> Parser V1DownwardAPIProjection)
-> Value
-> Parser V1DownwardAPIProjection
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1DownwardAPIVolumeFile] -> V1DownwardAPIProjection
V1DownwardAPIProjection
      (Maybe [V1DownwardAPIVolumeFile] -> V1DownwardAPIProjection)
-> Parser (Maybe [V1DownwardAPIVolumeFile])
-> Parser V1DownwardAPIProjection
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1DownwardAPIVolumeFile])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"items")

-- | ToJSON V1DownwardAPIProjection
instance A.ToJSON V1DownwardAPIProjection where
  toJSON :: V1DownwardAPIProjection -> Value
toJSON V1DownwardAPIProjection {Maybe [V1DownwardAPIVolumeFile]
$sel:v1DownwardAPIProjectionItems:V1DownwardAPIProjection :: V1DownwardAPIProjection -> Maybe [V1DownwardAPIVolumeFile]
v1DownwardAPIProjectionItems :: Maybe [V1DownwardAPIVolumeFile]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"items" Key -> Maybe [V1DownwardAPIVolumeFile] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1DownwardAPIVolumeFile]
v1DownwardAPIProjectionItems
      ]


-- | Construct a value of type 'V1DownwardAPIProjection' (by applying it's required fields, if any)
mkV1DownwardAPIProjection
  :: V1DownwardAPIProjection
mkV1DownwardAPIProjection :: V1DownwardAPIProjection
mkV1DownwardAPIProjection =
  V1DownwardAPIProjection
  { $sel:v1DownwardAPIProjectionItems:V1DownwardAPIProjection :: Maybe [V1DownwardAPIVolumeFile]
v1DownwardAPIProjectionItems = Maybe [V1DownwardAPIVolumeFile]
forall a. Maybe a
Nothing
  }

-- ** V1DownwardAPIVolumeFile
-- | V1DownwardAPIVolumeFile
-- DownwardAPIVolumeFile represents information to create the file containing the pod field
data V1DownwardAPIVolumeFile = V1DownwardAPIVolumeFile
  { V1DownwardAPIVolumeFile -> Maybe V1ObjectFieldSelector
v1DownwardAPIVolumeFileFieldRef :: !(Maybe V1ObjectFieldSelector) -- ^ "fieldRef"
  , V1DownwardAPIVolumeFile -> Maybe Int
v1DownwardAPIVolumeFileMode :: !(Maybe Int) -- ^ "mode" - Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
  , V1DownwardAPIVolumeFile -> Text
v1DownwardAPIVolumeFilePath :: !(Text) -- ^ /Required/ "path" - Required: Path is  the relative path name of the file to be created. Must not be absolute or contain the &#39;..&#39; path. Must be utf-8 encoded. The first item of the relative path must not start with &#39;..&#39;
  , V1DownwardAPIVolumeFile -> Maybe V1ResourceFieldSelector
v1DownwardAPIVolumeFileResourceFieldRef :: !(Maybe V1ResourceFieldSelector) -- ^ "resourceFieldRef"
  } deriving (Int -> V1DownwardAPIVolumeFile -> ShowS
[V1DownwardAPIVolumeFile] -> ShowS
V1DownwardAPIVolumeFile -> String
(Int -> V1DownwardAPIVolumeFile -> ShowS)
-> (V1DownwardAPIVolumeFile -> String)
-> ([V1DownwardAPIVolumeFile] -> ShowS)
-> Show V1DownwardAPIVolumeFile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1DownwardAPIVolumeFile -> ShowS
showsPrec :: Int -> V1DownwardAPIVolumeFile -> ShowS
$cshow :: V1DownwardAPIVolumeFile -> String
show :: V1DownwardAPIVolumeFile -> String
$cshowList :: [V1DownwardAPIVolumeFile] -> ShowS
showList :: [V1DownwardAPIVolumeFile] -> ShowS
P.Show, V1DownwardAPIVolumeFile -> V1DownwardAPIVolumeFile -> Bool
(V1DownwardAPIVolumeFile -> V1DownwardAPIVolumeFile -> Bool)
-> (V1DownwardAPIVolumeFile -> V1DownwardAPIVolumeFile -> Bool)
-> Eq V1DownwardAPIVolumeFile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1DownwardAPIVolumeFile -> V1DownwardAPIVolumeFile -> Bool
== :: V1DownwardAPIVolumeFile -> V1DownwardAPIVolumeFile -> Bool
$c/= :: V1DownwardAPIVolumeFile -> V1DownwardAPIVolumeFile -> Bool
/= :: V1DownwardAPIVolumeFile -> V1DownwardAPIVolumeFile -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1DownwardAPIVolumeFile
instance A.FromJSON V1DownwardAPIVolumeFile where
  parseJSON :: Value -> Parser V1DownwardAPIVolumeFile
parseJSON = String
-> (Object -> Parser V1DownwardAPIVolumeFile)
-> Value
-> Parser V1DownwardAPIVolumeFile
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1DownwardAPIVolumeFile" ((Object -> Parser V1DownwardAPIVolumeFile)
 -> Value -> Parser V1DownwardAPIVolumeFile)
-> (Object -> Parser V1DownwardAPIVolumeFile)
-> Value
-> Parser V1DownwardAPIVolumeFile
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1ObjectFieldSelector
-> Maybe Int
-> Text
-> Maybe V1ResourceFieldSelector
-> V1DownwardAPIVolumeFile
V1DownwardAPIVolumeFile
      (Maybe V1ObjectFieldSelector
 -> Maybe Int
 -> Text
 -> Maybe V1ResourceFieldSelector
 -> V1DownwardAPIVolumeFile)
-> Parser (Maybe V1ObjectFieldSelector)
-> Parser
     (Maybe Int
      -> Text
      -> Maybe V1ResourceFieldSelector
      -> V1DownwardAPIVolumeFile)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1ObjectFieldSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fieldRef")
      Parser
  (Maybe Int
   -> Text
   -> Maybe V1ResourceFieldSelector
   -> V1DownwardAPIVolumeFile)
-> Parser (Maybe Int)
-> Parser
     (Text -> Maybe V1ResourceFieldSelector -> V1DownwardAPIVolumeFile)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"mode")
      Parser
  (Text -> Maybe V1ResourceFieldSelector -> V1DownwardAPIVolumeFile)
-> Parser Text
-> Parser
     (Maybe V1ResourceFieldSelector -> V1DownwardAPIVolumeFile)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"path")
      Parser (Maybe V1ResourceFieldSelector -> V1DownwardAPIVolumeFile)
-> Parser (Maybe V1ResourceFieldSelector)
-> Parser V1DownwardAPIVolumeFile
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ResourceFieldSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resourceFieldRef")

-- | ToJSON V1DownwardAPIVolumeFile
instance A.ToJSON V1DownwardAPIVolumeFile where
  toJSON :: V1DownwardAPIVolumeFile -> Value
toJSON V1DownwardAPIVolumeFile {Maybe Int
Maybe V1ResourceFieldSelector
Maybe V1ObjectFieldSelector
Text
$sel:v1DownwardAPIVolumeFileFieldRef:V1DownwardAPIVolumeFile :: V1DownwardAPIVolumeFile -> Maybe V1ObjectFieldSelector
$sel:v1DownwardAPIVolumeFileMode:V1DownwardAPIVolumeFile :: V1DownwardAPIVolumeFile -> Maybe Int
$sel:v1DownwardAPIVolumeFilePath:V1DownwardAPIVolumeFile :: V1DownwardAPIVolumeFile -> Text
$sel:v1DownwardAPIVolumeFileResourceFieldRef:V1DownwardAPIVolumeFile :: V1DownwardAPIVolumeFile -> Maybe V1ResourceFieldSelector
v1DownwardAPIVolumeFileFieldRef :: Maybe V1ObjectFieldSelector
v1DownwardAPIVolumeFileMode :: Maybe Int
v1DownwardAPIVolumeFilePath :: Text
v1DownwardAPIVolumeFileResourceFieldRef :: Maybe V1ResourceFieldSelector
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"fieldRef" Key -> Maybe V1ObjectFieldSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectFieldSelector
v1DownwardAPIVolumeFileFieldRef
      , Key
"mode" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1DownwardAPIVolumeFileMode
      , Key
"path" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1DownwardAPIVolumeFilePath
      , Key
"resourceFieldRef" Key -> Maybe V1ResourceFieldSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ResourceFieldSelector
v1DownwardAPIVolumeFileResourceFieldRef
      ]


-- | Construct a value of type 'V1DownwardAPIVolumeFile' (by applying it's required fields, if any)
mkV1DownwardAPIVolumeFile
  :: Text -- ^ 'v1DownwardAPIVolumeFilePath': Required: Path is  the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'
  -> V1DownwardAPIVolumeFile
mkV1DownwardAPIVolumeFile :: Text -> V1DownwardAPIVolumeFile
mkV1DownwardAPIVolumeFile Text
v1DownwardAPIVolumeFilePath =
  V1DownwardAPIVolumeFile
  { $sel:v1DownwardAPIVolumeFileFieldRef:V1DownwardAPIVolumeFile :: Maybe V1ObjectFieldSelector
v1DownwardAPIVolumeFileFieldRef = Maybe V1ObjectFieldSelector
forall a. Maybe a
Nothing
  , $sel:v1DownwardAPIVolumeFileMode:V1DownwardAPIVolumeFile :: Maybe Int
v1DownwardAPIVolumeFileMode = Maybe Int
forall a. Maybe a
Nothing
  , Text
$sel:v1DownwardAPIVolumeFilePath:V1DownwardAPIVolumeFile :: Text
v1DownwardAPIVolumeFilePath :: Text
v1DownwardAPIVolumeFilePath
  , $sel:v1DownwardAPIVolumeFileResourceFieldRef:V1DownwardAPIVolumeFile :: Maybe V1ResourceFieldSelector
v1DownwardAPIVolumeFileResourceFieldRef = Maybe V1ResourceFieldSelector
forall a. Maybe a
Nothing
  }

-- ** V1DownwardAPIVolumeSource
-- | V1DownwardAPIVolumeSource
-- DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.
data V1DownwardAPIVolumeSource = V1DownwardAPIVolumeSource
  { V1DownwardAPIVolumeSource -> Maybe Int
v1DownwardAPIVolumeSourceDefaultMode :: !(Maybe Int) -- ^ "defaultMode" - Optional: mode bits to use on created files by default. Must be a Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
  , V1DownwardAPIVolumeSource -> Maybe [V1DownwardAPIVolumeFile]
v1DownwardAPIVolumeSourceItems :: !(Maybe [V1DownwardAPIVolumeFile]) -- ^ "items" - Items is a list of downward API volume file
  } deriving (Int -> V1DownwardAPIVolumeSource -> ShowS
[V1DownwardAPIVolumeSource] -> ShowS
V1DownwardAPIVolumeSource -> String
(Int -> V1DownwardAPIVolumeSource -> ShowS)
-> (V1DownwardAPIVolumeSource -> String)
-> ([V1DownwardAPIVolumeSource] -> ShowS)
-> Show V1DownwardAPIVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1DownwardAPIVolumeSource -> ShowS
showsPrec :: Int -> V1DownwardAPIVolumeSource -> ShowS
$cshow :: V1DownwardAPIVolumeSource -> String
show :: V1DownwardAPIVolumeSource -> String
$cshowList :: [V1DownwardAPIVolumeSource] -> ShowS
showList :: [V1DownwardAPIVolumeSource] -> ShowS
P.Show, V1DownwardAPIVolumeSource -> V1DownwardAPIVolumeSource -> Bool
(V1DownwardAPIVolumeSource -> V1DownwardAPIVolumeSource -> Bool)
-> (V1DownwardAPIVolumeSource -> V1DownwardAPIVolumeSource -> Bool)
-> Eq V1DownwardAPIVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1DownwardAPIVolumeSource -> V1DownwardAPIVolumeSource -> Bool
== :: V1DownwardAPIVolumeSource -> V1DownwardAPIVolumeSource -> Bool
$c/= :: V1DownwardAPIVolumeSource -> V1DownwardAPIVolumeSource -> Bool
/= :: V1DownwardAPIVolumeSource -> V1DownwardAPIVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1DownwardAPIVolumeSource
instance A.FromJSON V1DownwardAPIVolumeSource where
  parseJSON :: Value -> Parser V1DownwardAPIVolumeSource
parseJSON = String
-> (Object -> Parser V1DownwardAPIVolumeSource)
-> Value
-> Parser V1DownwardAPIVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1DownwardAPIVolumeSource" ((Object -> Parser V1DownwardAPIVolumeSource)
 -> Value -> Parser V1DownwardAPIVolumeSource)
-> (Object -> Parser V1DownwardAPIVolumeSource)
-> Value
-> Parser V1DownwardAPIVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Int
-> Maybe [V1DownwardAPIVolumeFile] -> V1DownwardAPIVolumeSource
V1DownwardAPIVolumeSource
      (Maybe Int
 -> Maybe [V1DownwardAPIVolumeFile] -> V1DownwardAPIVolumeSource)
-> Parser (Maybe Int)
-> Parser
     (Maybe [V1DownwardAPIVolumeFile] -> V1DownwardAPIVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"defaultMode")
      Parser
  (Maybe [V1DownwardAPIVolumeFile] -> V1DownwardAPIVolumeSource)
-> Parser (Maybe [V1DownwardAPIVolumeFile])
-> Parser V1DownwardAPIVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1DownwardAPIVolumeFile])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"items")

-- | ToJSON V1DownwardAPIVolumeSource
instance A.ToJSON V1DownwardAPIVolumeSource where
  toJSON :: V1DownwardAPIVolumeSource -> Value
toJSON V1DownwardAPIVolumeSource {Maybe Int
Maybe [V1DownwardAPIVolumeFile]
$sel:v1DownwardAPIVolumeSourceDefaultMode:V1DownwardAPIVolumeSource :: V1DownwardAPIVolumeSource -> Maybe Int
$sel:v1DownwardAPIVolumeSourceItems:V1DownwardAPIVolumeSource :: V1DownwardAPIVolumeSource -> Maybe [V1DownwardAPIVolumeFile]
v1DownwardAPIVolumeSourceDefaultMode :: Maybe Int
v1DownwardAPIVolumeSourceItems :: Maybe [V1DownwardAPIVolumeFile]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"defaultMode" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1DownwardAPIVolumeSourceDefaultMode
      , Key
"items" Key -> Maybe [V1DownwardAPIVolumeFile] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1DownwardAPIVolumeFile]
v1DownwardAPIVolumeSourceItems
      ]


-- | Construct a value of type 'V1DownwardAPIVolumeSource' (by applying it's required fields, if any)
mkV1DownwardAPIVolumeSource
  :: V1DownwardAPIVolumeSource
mkV1DownwardAPIVolumeSource :: V1DownwardAPIVolumeSource
mkV1DownwardAPIVolumeSource =
  V1DownwardAPIVolumeSource
  { $sel:v1DownwardAPIVolumeSourceDefaultMode:V1DownwardAPIVolumeSource :: Maybe Int
v1DownwardAPIVolumeSourceDefaultMode = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1DownwardAPIVolumeSourceItems:V1DownwardAPIVolumeSource :: Maybe [V1DownwardAPIVolumeFile]
v1DownwardAPIVolumeSourceItems = Maybe [V1DownwardAPIVolumeFile]
forall a. Maybe a
Nothing
  }

-- ** V1EmptyDirVolumeSource
-- | V1EmptyDirVolumeSource
-- Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling.
data V1EmptyDirVolumeSource = V1EmptyDirVolumeSource
  { V1EmptyDirVolumeSource -> Maybe Text
v1EmptyDirVolumeSourceMedium :: !(Maybe Text) -- ^ "medium" - medium represents what type of storage medium should back this directory. The default is \&quot;\&quot; which means to use the node&#39;s default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
  , V1EmptyDirVolumeSource -> Maybe Quantity
v1EmptyDirVolumeSourceSizeLimit :: !(Maybe Quantity) -- ^ "sizeLimit"
  } deriving (Int -> V1EmptyDirVolumeSource -> ShowS
[V1EmptyDirVolumeSource] -> ShowS
V1EmptyDirVolumeSource -> String
(Int -> V1EmptyDirVolumeSource -> ShowS)
-> (V1EmptyDirVolumeSource -> String)
-> ([V1EmptyDirVolumeSource] -> ShowS)
-> Show V1EmptyDirVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1EmptyDirVolumeSource -> ShowS
showsPrec :: Int -> V1EmptyDirVolumeSource -> ShowS
$cshow :: V1EmptyDirVolumeSource -> String
show :: V1EmptyDirVolumeSource -> String
$cshowList :: [V1EmptyDirVolumeSource] -> ShowS
showList :: [V1EmptyDirVolumeSource] -> ShowS
P.Show, V1EmptyDirVolumeSource -> V1EmptyDirVolumeSource -> Bool
(V1EmptyDirVolumeSource -> V1EmptyDirVolumeSource -> Bool)
-> (V1EmptyDirVolumeSource -> V1EmptyDirVolumeSource -> Bool)
-> Eq V1EmptyDirVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1EmptyDirVolumeSource -> V1EmptyDirVolumeSource -> Bool
== :: V1EmptyDirVolumeSource -> V1EmptyDirVolumeSource -> Bool
$c/= :: V1EmptyDirVolumeSource -> V1EmptyDirVolumeSource -> Bool
/= :: V1EmptyDirVolumeSource -> V1EmptyDirVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1EmptyDirVolumeSource
instance A.FromJSON V1EmptyDirVolumeSource where
  parseJSON :: Value -> Parser V1EmptyDirVolumeSource
parseJSON = String
-> (Object -> Parser V1EmptyDirVolumeSource)
-> Value
-> Parser V1EmptyDirVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1EmptyDirVolumeSource" ((Object -> Parser V1EmptyDirVolumeSource)
 -> Value -> Parser V1EmptyDirVolumeSource)
-> (Object -> Parser V1EmptyDirVolumeSource)
-> Value
-> Parser V1EmptyDirVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Maybe Quantity -> V1EmptyDirVolumeSource
V1EmptyDirVolumeSource
      (Maybe Text -> Maybe Quantity -> V1EmptyDirVolumeSource)
-> Parser (Maybe Text)
-> Parser (Maybe Quantity -> V1EmptyDirVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"medium")
      Parser (Maybe Quantity -> V1EmptyDirVolumeSource)
-> Parser (Maybe Quantity) -> Parser V1EmptyDirVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Quantity)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"sizeLimit")

-- | ToJSON V1EmptyDirVolumeSource
instance A.ToJSON V1EmptyDirVolumeSource where
  toJSON :: V1EmptyDirVolumeSource -> Value
toJSON V1EmptyDirVolumeSource {Maybe Text
Maybe Quantity
$sel:v1EmptyDirVolumeSourceMedium:V1EmptyDirVolumeSource :: V1EmptyDirVolumeSource -> Maybe Text
$sel:v1EmptyDirVolumeSourceSizeLimit:V1EmptyDirVolumeSource :: V1EmptyDirVolumeSource -> Maybe Quantity
v1EmptyDirVolumeSourceMedium :: Maybe Text
v1EmptyDirVolumeSourceSizeLimit :: Maybe Quantity
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"medium" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1EmptyDirVolumeSourceMedium
      , Key
"sizeLimit" Key -> Maybe Quantity -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Quantity
v1EmptyDirVolumeSourceSizeLimit
      ]


-- | Construct a value of type 'V1EmptyDirVolumeSource' (by applying it's required fields, if any)
mkV1EmptyDirVolumeSource
  :: V1EmptyDirVolumeSource
mkV1EmptyDirVolumeSource :: V1EmptyDirVolumeSource
mkV1EmptyDirVolumeSource =
  V1EmptyDirVolumeSource
  { $sel:v1EmptyDirVolumeSourceMedium:V1EmptyDirVolumeSource :: Maybe Text
v1EmptyDirVolumeSourceMedium = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1EmptyDirVolumeSourceSizeLimit:V1EmptyDirVolumeSource :: Maybe Quantity
v1EmptyDirVolumeSourceSizeLimit = Maybe Quantity
forall a. Maybe a
Nothing
  }

-- ** V1Endpoint
-- | V1Endpoint
-- Endpoint represents a single logical \"backend\" implementing a service.
data V1Endpoint = V1Endpoint
  { V1Endpoint -> [Text]
v1EndpointAddresses :: !([Text]) -- ^ /Required/ "addresses" - addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100. These are all assumed to be fungible and clients may choose to only use the first element. Refer to: https://issue.k8s.io/106267
  , V1Endpoint -> Maybe V1EndpointConditions
v1EndpointConditions :: !(Maybe V1EndpointConditions) -- ^ "conditions"
  , V1Endpoint -> Maybe (Map String Text)
v1EndpointDeprecatedTopology :: !(Maybe (Map.Map String Text)) -- ^ "deprecatedTopology" - deprecatedTopology contains topology information part of the v1beta1 API. This field is deprecated, and will be removed when the v1beta1 API is removed (no sooner than kubernetes v1.24).  While this field can hold values, it is not writable through the v1 API, and any attempts to write to it will be silently ignored. Topology information can be found in the zone and nodeName fields instead.
  , V1Endpoint -> Maybe V1EndpointHints
v1EndpointHints :: !(Maybe V1EndpointHints) -- ^ "hints"
  , V1Endpoint -> Maybe Text
v1EndpointHostname :: !(Maybe Text) -- ^ "hostname" - hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation.
  , V1Endpoint -> Maybe Text
v1EndpointNodeName :: !(Maybe Text) -- ^ "nodeName" - nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node.
  , V1Endpoint -> Maybe V1ObjectReference
v1EndpointTargetRef :: !(Maybe V1ObjectReference) -- ^ "targetRef"
  , V1Endpoint -> Maybe Text
v1EndpointZone :: !(Maybe Text) -- ^ "zone" - zone is the name of the Zone this endpoint exists in.
  } deriving (Int -> V1Endpoint -> ShowS
[V1Endpoint] -> ShowS
V1Endpoint -> String
(Int -> V1Endpoint -> ShowS)
-> (V1Endpoint -> String)
-> ([V1Endpoint] -> ShowS)
-> Show V1Endpoint
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1Endpoint -> ShowS
showsPrec :: Int -> V1Endpoint -> ShowS
$cshow :: V1Endpoint -> String
show :: V1Endpoint -> String
$cshowList :: [V1Endpoint] -> ShowS
showList :: [V1Endpoint] -> ShowS
P.Show, V1Endpoint -> V1Endpoint -> Bool
(V1Endpoint -> V1Endpoint -> Bool)
-> (V1Endpoint -> V1Endpoint -> Bool) -> Eq V1Endpoint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1Endpoint -> V1Endpoint -> Bool
== :: V1Endpoint -> V1Endpoint -> Bool
$c/= :: V1Endpoint -> V1Endpoint -> Bool
/= :: V1Endpoint -> V1Endpoint -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1Endpoint
instance A.FromJSON V1Endpoint where
  parseJSON :: Value -> Parser V1Endpoint
parseJSON = String
-> (Object -> Parser V1Endpoint) -> Value -> Parser V1Endpoint
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1Endpoint" ((Object -> Parser V1Endpoint) -> Value -> Parser V1Endpoint)
-> (Object -> Parser V1Endpoint) -> Value -> Parser V1Endpoint
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    [Text]
-> Maybe V1EndpointConditions
-> Maybe (Map String Text)
-> Maybe V1EndpointHints
-> Maybe Text
-> Maybe Text
-> Maybe V1ObjectReference
-> Maybe Text
-> V1Endpoint
V1Endpoint
      ([Text]
 -> Maybe V1EndpointConditions
 -> Maybe (Map String Text)
 -> Maybe V1EndpointHints
 -> Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectReference
 -> Maybe Text
 -> V1Endpoint)
-> Parser [Text]
-> Parser
     (Maybe V1EndpointConditions
      -> Maybe (Map String Text)
      -> Maybe V1EndpointHints
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1ObjectReference
      -> Maybe Text
      -> V1Endpoint)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"addresses")
      Parser
  (Maybe V1EndpointConditions
   -> Maybe (Map String Text)
   -> Maybe V1EndpointHints
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1ObjectReference
   -> Maybe Text
   -> V1Endpoint)
-> Parser (Maybe V1EndpointConditions)
-> Parser
     (Maybe (Map String Text)
      -> Maybe V1EndpointHints
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1ObjectReference
      -> Maybe Text
      -> V1Endpoint)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1EndpointConditions)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"conditions")
      Parser
  (Maybe (Map String Text)
   -> Maybe V1EndpointHints
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1ObjectReference
   -> Maybe Text
   -> V1Endpoint)
-> Parser (Maybe (Map String Text))
-> Parser
     (Maybe V1EndpointHints
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1ObjectReference
      -> Maybe Text
      -> V1Endpoint)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String Text))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"deprecatedTopology")
      Parser
  (Maybe V1EndpointHints
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1ObjectReference
   -> Maybe Text
   -> V1Endpoint)
-> Parser (Maybe V1EndpointHints)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe V1ObjectReference
      -> Maybe Text
      -> V1Endpoint)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1EndpointHints)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"hints")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe V1ObjectReference
   -> Maybe Text
   -> V1Endpoint)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe V1ObjectReference -> Maybe Text -> V1Endpoint)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"hostname")
      Parser
  (Maybe Text -> Maybe V1ObjectReference -> Maybe Text -> V1Endpoint)
-> Parser (Maybe Text)
-> Parser (Maybe V1ObjectReference -> Maybe Text -> V1Endpoint)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nodeName")
      Parser (Maybe V1ObjectReference -> Maybe Text -> V1Endpoint)
-> Parser (Maybe V1ObjectReference)
-> Parser (Maybe Text -> V1Endpoint)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectReference)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"targetRef")
      Parser (Maybe Text -> V1Endpoint)
-> Parser (Maybe Text) -> Parser V1Endpoint
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"zone")

-- | ToJSON V1Endpoint
instance A.ToJSON V1Endpoint where
  toJSON :: V1Endpoint -> Value
toJSON V1Endpoint {[Text]
Maybe (Map String Text)
Maybe Text
Maybe V1ObjectReference
Maybe V1EndpointHints
Maybe V1EndpointConditions
$sel:v1EndpointAddresses:V1Endpoint :: V1Endpoint -> [Text]
$sel:v1EndpointConditions:V1Endpoint :: V1Endpoint -> Maybe V1EndpointConditions
$sel:v1EndpointDeprecatedTopology:V1Endpoint :: V1Endpoint -> Maybe (Map String Text)
$sel:v1EndpointHints:V1Endpoint :: V1Endpoint -> Maybe V1EndpointHints
$sel:v1EndpointHostname:V1Endpoint :: V1Endpoint -> Maybe Text
$sel:v1EndpointNodeName:V1Endpoint :: V1Endpoint -> Maybe Text
$sel:v1EndpointTargetRef:V1Endpoint :: V1Endpoint -> Maybe V1ObjectReference
$sel:v1EndpointZone:V1Endpoint :: V1Endpoint -> Maybe Text
v1EndpointAddresses :: [Text]
v1EndpointConditions :: Maybe V1EndpointConditions
v1EndpointDeprecatedTopology :: Maybe (Map String Text)
v1EndpointHints :: Maybe V1EndpointHints
v1EndpointHostname :: Maybe Text
v1EndpointNodeName :: Maybe Text
v1EndpointTargetRef :: Maybe V1ObjectReference
v1EndpointZone :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"addresses" Key -> [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [Text]
v1EndpointAddresses
      , Key
"conditions" Key -> Maybe V1EndpointConditions -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1EndpointConditions
v1EndpointConditions
      , Key
"deprecatedTopology" Key -> Maybe (Map String Text) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Text)
v1EndpointDeprecatedTopology
      , Key
"hints" Key -> Maybe V1EndpointHints -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1EndpointHints
v1EndpointHints
      , Key
"hostname" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1EndpointHostname
      , Key
"nodeName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1EndpointNodeName
      , Key
"targetRef" Key -> Maybe V1ObjectReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectReference
v1EndpointTargetRef
      , Key
"zone" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1EndpointZone
      ]


-- | Construct a value of type 'V1Endpoint' (by applying it's required fields, if any)
mkV1Endpoint
  :: [Text] -- ^ 'v1EndpointAddresses': addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100. These are all assumed to be fungible and clients may choose to only use the first element. Refer to: https://issue.k8s.io/106267
  -> V1Endpoint
mkV1Endpoint :: [Text] -> V1Endpoint
mkV1Endpoint [Text]
v1EndpointAddresses =
  V1Endpoint
  { [Text]
$sel:v1EndpointAddresses:V1Endpoint :: [Text]
v1EndpointAddresses :: [Text]
v1EndpointAddresses
  , $sel:v1EndpointConditions:V1Endpoint :: Maybe V1EndpointConditions
v1EndpointConditions = Maybe V1EndpointConditions
forall a. Maybe a
Nothing
  , $sel:v1EndpointDeprecatedTopology:V1Endpoint :: Maybe (Map String Text)
v1EndpointDeprecatedTopology = Maybe (Map String Text)
forall a. Maybe a
Nothing
  , $sel:v1EndpointHints:V1Endpoint :: Maybe V1EndpointHints
v1EndpointHints = Maybe V1EndpointHints
forall a. Maybe a
Nothing
  , $sel:v1EndpointHostname:V1Endpoint :: Maybe Text
v1EndpointHostname = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1EndpointNodeName:V1Endpoint :: Maybe Text
v1EndpointNodeName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1EndpointTargetRef:V1Endpoint :: Maybe V1ObjectReference
v1EndpointTargetRef = Maybe V1ObjectReference
forall a. Maybe a
Nothing
  , $sel:v1EndpointZone:V1Endpoint :: Maybe Text
v1EndpointZone = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1EndpointAddress
-- | V1EndpointAddress
-- EndpointAddress is a tuple that describes single IP address.
data V1EndpointAddress = V1EndpointAddress
  { V1EndpointAddress -> Maybe Text
v1EndpointAddressHostname :: !(Maybe Text) -- ^ "hostname" - The Hostname of this endpoint
  , V1EndpointAddress -> Text
v1EndpointAddressIp :: !(Text) -- ^ /Required/ "ip" - The IP of this endpoint. May not be loopback (127.0.0.0/8 or ::1), link-local (169.254.0.0/16 or fe80::/10), or link-local multicast (224.0.0.0/24 or ff02::/16).
  , V1EndpointAddress -> Maybe Text
v1EndpointAddressNodeName :: !(Maybe Text) -- ^ "nodeName" - Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.
  , V1EndpointAddress -> Maybe V1ObjectReference
v1EndpointAddressTargetRef :: !(Maybe V1ObjectReference) -- ^ "targetRef"
  } deriving (Int -> V1EndpointAddress -> ShowS
[V1EndpointAddress] -> ShowS
V1EndpointAddress -> String
(Int -> V1EndpointAddress -> ShowS)
-> (V1EndpointAddress -> String)
-> ([V1EndpointAddress] -> ShowS)
-> Show V1EndpointAddress
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1EndpointAddress -> ShowS
showsPrec :: Int -> V1EndpointAddress -> ShowS
$cshow :: V1EndpointAddress -> String
show :: V1EndpointAddress -> String
$cshowList :: [V1EndpointAddress] -> ShowS
showList :: [V1EndpointAddress] -> ShowS
P.Show, V1EndpointAddress -> V1EndpointAddress -> Bool
(V1EndpointAddress -> V1EndpointAddress -> Bool)
-> (V1EndpointAddress -> V1EndpointAddress -> Bool)
-> Eq V1EndpointAddress
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1EndpointAddress -> V1EndpointAddress -> Bool
== :: V1EndpointAddress -> V1EndpointAddress -> Bool
$c/= :: V1EndpointAddress -> V1EndpointAddress -> Bool
/= :: V1EndpointAddress -> V1EndpointAddress -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1EndpointAddress
instance A.FromJSON V1EndpointAddress where
  parseJSON :: Value -> Parser V1EndpointAddress
parseJSON = String
-> (Object -> Parser V1EndpointAddress)
-> Value
-> Parser V1EndpointAddress
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1EndpointAddress" ((Object -> Parser V1EndpointAddress)
 -> Value -> Parser V1EndpointAddress)
-> (Object -> Parser V1EndpointAddress)
-> Value
-> Parser V1EndpointAddress
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Text
-> Maybe Text
-> Maybe V1ObjectReference
-> V1EndpointAddress
V1EndpointAddress
      (Maybe Text
 -> Text
 -> Maybe Text
 -> Maybe V1ObjectReference
 -> V1EndpointAddress)
-> Parser (Maybe Text)
-> Parser
     (Text
      -> Maybe Text -> Maybe V1ObjectReference -> V1EndpointAddress)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"hostname")
      Parser
  (Text
   -> Maybe Text -> Maybe V1ObjectReference -> V1EndpointAddress)
-> Parser Text
-> Parser
     (Maybe Text -> Maybe V1ObjectReference -> V1EndpointAddress)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"ip")
      Parser (Maybe Text -> Maybe V1ObjectReference -> V1EndpointAddress)
-> Parser (Maybe Text)
-> Parser (Maybe V1ObjectReference -> V1EndpointAddress)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nodeName")
      Parser (Maybe V1ObjectReference -> V1EndpointAddress)
-> Parser (Maybe V1ObjectReference) -> Parser V1EndpointAddress
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectReference)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"targetRef")

-- | ToJSON V1EndpointAddress
instance A.ToJSON V1EndpointAddress where
  toJSON :: V1EndpointAddress -> Value
toJSON V1EndpointAddress {Maybe Text
Maybe V1ObjectReference
Text
$sel:v1EndpointAddressHostname:V1EndpointAddress :: V1EndpointAddress -> Maybe Text
$sel:v1EndpointAddressIp:V1EndpointAddress :: V1EndpointAddress -> Text
$sel:v1EndpointAddressNodeName:V1EndpointAddress :: V1EndpointAddress -> Maybe Text
$sel:v1EndpointAddressTargetRef:V1EndpointAddress :: V1EndpointAddress -> Maybe V1ObjectReference
v1EndpointAddressHostname :: Maybe Text
v1EndpointAddressIp :: Text
v1EndpointAddressNodeName :: Maybe Text
v1EndpointAddressTargetRef :: Maybe V1ObjectReference
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"hostname" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1EndpointAddressHostname
      , Key
"ip" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1EndpointAddressIp
      , Key
"nodeName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1EndpointAddressNodeName
      , Key
"targetRef" Key -> Maybe V1ObjectReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectReference
v1EndpointAddressTargetRef
      ]


-- | Construct a value of type 'V1EndpointAddress' (by applying it's required fields, if any)
mkV1EndpointAddress
  :: Text -- ^ 'v1EndpointAddressIp': The IP of this endpoint. May not be loopback (127.0.0.0/8 or ::1), link-local (169.254.0.0/16 or fe80::/10), or link-local multicast (224.0.0.0/24 or ff02::/16).
  -> V1EndpointAddress
mkV1EndpointAddress :: Text -> V1EndpointAddress
mkV1EndpointAddress Text
v1EndpointAddressIp =
  V1EndpointAddress
  { $sel:v1EndpointAddressHostname:V1EndpointAddress :: Maybe Text
v1EndpointAddressHostname = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1EndpointAddressIp:V1EndpointAddress :: Text
v1EndpointAddressIp :: Text
v1EndpointAddressIp
  , $sel:v1EndpointAddressNodeName:V1EndpointAddress :: Maybe Text
v1EndpointAddressNodeName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1EndpointAddressTargetRef:V1EndpointAddress :: Maybe V1ObjectReference
v1EndpointAddressTargetRef = Maybe V1ObjectReference
forall a. Maybe a
Nothing
  }

-- ** V1EndpointConditions
-- | V1EndpointConditions
-- EndpointConditions represents the current condition of an endpoint.
data V1EndpointConditions = V1EndpointConditions
  { V1EndpointConditions -> Maybe Bool
v1EndpointConditionsReady :: !(Maybe Bool) -- ^ "ready" - ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. A nil value indicates an unknown state. In most cases consumers should interpret this unknown state as ready. For compatibility reasons, ready should never be \&quot;true\&quot; for terminating endpoints, except when the normal readiness behavior is being explicitly overridden, for example when the associated Service has set the publishNotReadyAddresses flag.
  , V1EndpointConditions -> Maybe Bool
v1EndpointConditionsServing :: !(Maybe Bool) -- ^ "serving" - serving is identical to ready except that it is set regardless of the terminating state of endpoints. This condition should be set to true for a ready endpoint that is terminating. If nil, consumers should defer to the ready condition.
  , V1EndpointConditions -> Maybe Bool
v1EndpointConditionsTerminating :: !(Maybe Bool) -- ^ "terminating" - terminating indicates that this endpoint is terminating. A nil value indicates an unknown state. Consumers should interpret this unknown state to mean that the endpoint is not terminating.
  } deriving (Int -> V1EndpointConditions -> ShowS
[V1EndpointConditions] -> ShowS
V1EndpointConditions -> String
(Int -> V1EndpointConditions -> ShowS)
-> (V1EndpointConditions -> String)
-> ([V1EndpointConditions] -> ShowS)
-> Show V1EndpointConditions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1EndpointConditions -> ShowS
showsPrec :: Int -> V1EndpointConditions -> ShowS
$cshow :: V1EndpointConditions -> String
show :: V1EndpointConditions -> String
$cshowList :: [V1EndpointConditions] -> ShowS
showList :: [V1EndpointConditions] -> ShowS
P.Show, V1EndpointConditions -> V1EndpointConditions -> Bool
(V1EndpointConditions -> V1EndpointConditions -> Bool)
-> (V1EndpointConditions -> V1EndpointConditions -> Bool)
-> Eq V1EndpointConditions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1EndpointConditions -> V1EndpointConditions -> Bool
== :: V1EndpointConditions -> V1EndpointConditions -> Bool
$c/= :: V1EndpointConditions -> V1EndpointConditions -> Bool
/= :: V1EndpointConditions -> V1EndpointConditions -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1EndpointConditions
instance A.FromJSON V1EndpointConditions where
  parseJSON :: Value -> Parser V1EndpointConditions
parseJSON = String
-> (Object -> Parser V1EndpointConditions)
-> Value
-> Parser V1EndpointConditions
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1EndpointConditions" ((Object -> Parser V1EndpointConditions)
 -> Value -> Parser V1EndpointConditions)
-> (Object -> Parser V1EndpointConditions)
-> Value
-> Parser V1EndpointConditions
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Bool -> Maybe Bool -> Maybe Bool -> V1EndpointConditions
V1EndpointConditions
      (Maybe Bool -> Maybe Bool -> Maybe Bool -> V1EndpointConditions)
-> Parser (Maybe Bool)
-> Parser (Maybe Bool -> Maybe Bool -> V1EndpointConditions)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ready")
      Parser (Maybe Bool -> Maybe Bool -> V1EndpointConditions)
-> Parser (Maybe Bool)
-> Parser (Maybe Bool -> V1EndpointConditions)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"serving")
      Parser (Maybe Bool -> V1EndpointConditions)
-> Parser (Maybe Bool) -> Parser V1EndpointConditions
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"terminating")

-- | ToJSON V1EndpointConditions
instance A.ToJSON V1EndpointConditions where
  toJSON :: V1EndpointConditions -> Value
toJSON V1EndpointConditions {Maybe Bool
$sel:v1EndpointConditionsReady:V1EndpointConditions :: V1EndpointConditions -> Maybe Bool
$sel:v1EndpointConditionsServing:V1EndpointConditions :: V1EndpointConditions -> Maybe Bool
$sel:v1EndpointConditionsTerminating:V1EndpointConditions :: V1EndpointConditions -> Maybe Bool
v1EndpointConditionsReady :: Maybe Bool
v1EndpointConditionsServing :: Maybe Bool
v1EndpointConditionsTerminating :: Maybe Bool
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"ready" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1EndpointConditionsReady
      , Key
"serving" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1EndpointConditionsServing
      , Key
"terminating" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1EndpointConditionsTerminating
      ]


-- | Construct a value of type 'V1EndpointConditions' (by applying it's required fields, if any)
mkV1EndpointConditions
  :: V1EndpointConditions
mkV1EndpointConditions :: V1EndpointConditions
mkV1EndpointConditions =
  V1EndpointConditions
  { $sel:v1EndpointConditionsReady:V1EndpointConditions :: Maybe Bool
v1EndpointConditionsReady = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1EndpointConditionsServing:V1EndpointConditions :: Maybe Bool
v1EndpointConditionsServing = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1EndpointConditionsTerminating:V1EndpointConditions :: Maybe Bool
v1EndpointConditionsTerminating = Maybe Bool
forall a. Maybe a
Nothing
  }

-- ** V1EndpointHints
-- | V1EndpointHints
-- EndpointHints provides hints describing how an endpoint should be consumed.
data V1EndpointHints = V1EndpointHints
  { V1EndpointHints -> Maybe [V1ForZone]
v1EndpointHintsForZones :: !(Maybe [V1ForZone]) -- ^ "forZones" - forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing.
  } deriving (Int -> V1EndpointHints -> ShowS
[V1EndpointHints] -> ShowS
V1EndpointHints -> String
(Int -> V1EndpointHints -> ShowS)
-> (V1EndpointHints -> String)
-> ([V1EndpointHints] -> ShowS)
-> Show V1EndpointHints
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1EndpointHints -> ShowS
showsPrec :: Int -> V1EndpointHints -> ShowS
$cshow :: V1EndpointHints -> String
show :: V1EndpointHints -> String
$cshowList :: [V1EndpointHints] -> ShowS
showList :: [V1EndpointHints] -> ShowS
P.Show, V1EndpointHints -> V1EndpointHints -> Bool
(V1EndpointHints -> V1EndpointHints -> Bool)
-> (V1EndpointHints -> V1EndpointHints -> Bool)
-> Eq V1EndpointHints
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1EndpointHints -> V1EndpointHints -> Bool
== :: V1EndpointHints -> V1EndpointHints -> Bool
$c/= :: V1EndpointHints -> V1EndpointHints -> Bool
/= :: V1EndpointHints -> V1EndpointHints -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1EndpointHints
instance A.FromJSON V1EndpointHints where
  parseJSON :: Value -> Parser V1EndpointHints
parseJSON = String
-> (Object -> Parser V1EndpointHints)
-> Value
-> Parser V1EndpointHints
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1EndpointHints" ((Object -> Parser V1EndpointHints)
 -> Value -> Parser V1EndpointHints)
-> (Object -> Parser V1EndpointHints)
-> Value
-> Parser V1EndpointHints
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1ForZone] -> V1EndpointHints
V1EndpointHints
      (Maybe [V1ForZone] -> V1EndpointHints)
-> Parser (Maybe [V1ForZone]) -> Parser V1EndpointHints
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1ForZone])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"forZones")

-- | ToJSON V1EndpointHints
instance A.ToJSON V1EndpointHints where
  toJSON :: V1EndpointHints -> Value
toJSON V1EndpointHints {Maybe [V1ForZone]
$sel:v1EndpointHintsForZones:V1EndpointHints :: V1EndpointHints -> Maybe [V1ForZone]
v1EndpointHintsForZones :: Maybe [V1ForZone]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"forZones" Key -> Maybe [V1ForZone] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1ForZone]
v1EndpointHintsForZones
      ]


-- | Construct a value of type 'V1EndpointHints' (by applying it's required fields, if any)
mkV1EndpointHints
  :: V1EndpointHints
mkV1EndpointHints :: V1EndpointHints
mkV1EndpointHints =
  V1EndpointHints
  { $sel:v1EndpointHintsForZones:V1EndpointHints :: Maybe [V1ForZone]
v1EndpointHintsForZones = Maybe [V1ForZone]
forall a. Maybe a
Nothing
  }

-- ** V1EndpointSlice
-- | V1EndpointSlice
-- EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints.
data V1EndpointSlice = V1EndpointSlice
  { V1EndpointSlice -> Text
v1EndpointSliceAddressType :: !(Text) -- ^ /Required/ "addressType" - addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name.
  , V1EndpointSlice -> Maybe Text
v1EndpointSliceApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1EndpointSlice -> [V1Endpoint]
v1EndpointSliceEndpoints :: !([V1Endpoint]) -- ^ /Required/ "endpoints" - endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints.
  , V1EndpointSlice -> Maybe Text
v1EndpointSliceKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1EndpointSlice -> Maybe V1ObjectMeta
v1EndpointSliceMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1EndpointSlice -> Maybe [DiscoveryV1EndpointPort]
v1EndpointSlicePorts :: !(Maybe [DiscoveryV1EndpointPort]) -- ^ "ports" - ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates \&quot;all ports\&quot;. Each slice may include a maximum of 100 ports.
  } deriving (Int -> V1EndpointSlice -> ShowS
[V1EndpointSlice] -> ShowS
V1EndpointSlice -> String
(Int -> V1EndpointSlice -> ShowS)
-> (V1EndpointSlice -> String)
-> ([V1EndpointSlice] -> ShowS)
-> Show V1EndpointSlice
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1EndpointSlice -> ShowS
showsPrec :: Int -> V1EndpointSlice -> ShowS
$cshow :: V1EndpointSlice -> String
show :: V1EndpointSlice -> String
$cshowList :: [V1EndpointSlice] -> ShowS
showList :: [V1EndpointSlice] -> ShowS
P.Show, V1EndpointSlice -> V1EndpointSlice -> Bool
(V1EndpointSlice -> V1EndpointSlice -> Bool)
-> (V1EndpointSlice -> V1EndpointSlice -> Bool)
-> Eq V1EndpointSlice
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1EndpointSlice -> V1EndpointSlice -> Bool
== :: V1EndpointSlice -> V1EndpointSlice -> Bool
$c/= :: V1EndpointSlice -> V1EndpointSlice -> Bool
/= :: V1EndpointSlice -> V1EndpointSlice -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1EndpointSlice
instance A.FromJSON V1EndpointSlice where
  parseJSON :: Value -> Parser V1EndpointSlice
parseJSON = String
-> (Object -> Parser V1EndpointSlice)
-> Value
-> Parser V1EndpointSlice
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1EndpointSlice" ((Object -> Parser V1EndpointSlice)
 -> Value -> Parser V1EndpointSlice)
-> (Object -> Parser V1EndpointSlice)
-> Value
-> Parser V1EndpointSlice
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text
-> Maybe Text
-> [V1Endpoint]
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe [DiscoveryV1EndpointPort]
-> V1EndpointSlice
V1EndpointSlice
      (Text
 -> Maybe Text
 -> [V1Endpoint]
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe [DiscoveryV1EndpointPort]
 -> V1EndpointSlice)
-> Parser Text
-> Parser
     (Maybe Text
      -> [V1Endpoint]
      -> Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe [DiscoveryV1EndpointPort]
      -> V1EndpointSlice)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"addressType")
      Parser
  (Maybe Text
   -> [V1Endpoint]
   -> Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe [DiscoveryV1EndpointPort]
   -> V1EndpointSlice)
-> Parser (Maybe Text)
-> Parser
     ([V1Endpoint]
      -> Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe [DiscoveryV1EndpointPort]
      -> V1EndpointSlice)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1Endpoint]
   -> Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe [DiscoveryV1EndpointPort]
   -> V1EndpointSlice)
-> Parser [V1Endpoint]
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe [DiscoveryV1EndpointPort]
      -> V1EndpointSlice)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1Endpoint]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"endpoints")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe [DiscoveryV1EndpointPort]
   -> V1EndpointSlice)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe [DiscoveryV1EndpointPort] -> V1EndpointSlice)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe [DiscoveryV1EndpointPort] -> V1EndpointSlice)
-> Parser (Maybe V1ObjectMeta)
-> Parser (Maybe [DiscoveryV1EndpointPort] -> V1EndpointSlice)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (Maybe [DiscoveryV1EndpointPort] -> V1EndpointSlice)
-> Parser (Maybe [DiscoveryV1EndpointPort])
-> Parser V1EndpointSlice
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [DiscoveryV1EndpointPort])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ports")

-- | ToJSON V1EndpointSlice
instance A.ToJSON V1EndpointSlice where
  toJSON :: V1EndpointSlice -> Value
toJSON V1EndpointSlice {[V1Endpoint]
Maybe [DiscoveryV1EndpointPort]
Maybe Text
Maybe V1ObjectMeta
Text
$sel:v1EndpointSliceAddressType:V1EndpointSlice :: V1EndpointSlice -> Text
$sel:v1EndpointSliceApiVersion:V1EndpointSlice :: V1EndpointSlice -> Maybe Text
$sel:v1EndpointSliceEndpoints:V1EndpointSlice :: V1EndpointSlice -> [V1Endpoint]
$sel:v1EndpointSliceKind:V1EndpointSlice :: V1EndpointSlice -> Maybe Text
$sel:v1EndpointSliceMetadata:V1EndpointSlice :: V1EndpointSlice -> Maybe V1ObjectMeta
$sel:v1EndpointSlicePorts:V1EndpointSlice :: V1EndpointSlice -> Maybe [DiscoveryV1EndpointPort]
v1EndpointSliceAddressType :: Text
v1EndpointSliceApiVersion :: Maybe Text
v1EndpointSliceEndpoints :: [V1Endpoint]
v1EndpointSliceKind :: Maybe Text
v1EndpointSliceMetadata :: Maybe V1ObjectMeta
v1EndpointSlicePorts :: Maybe [DiscoveryV1EndpointPort]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"addressType" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1EndpointSliceAddressType
      , Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1EndpointSliceApiVersion
      , Key
"endpoints" Key -> [V1Endpoint] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1Endpoint]
v1EndpointSliceEndpoints
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1EndpointSliceKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1EndpointSliceMetadata
      , Key
"ports" Key -> Maybe [DiscoveryV1EndpointPort] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [DiscoveryV1EndpointPort]
v1EndpointSlicePorts
      ]


-- | Construct a value of type 'V1EndpointSlice' (by applying it's required fields, if any)
mkV1EndpointSlice
  :: Text -- ^ 'v1EndpointSliceAddressType': addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name.
  -> [V1Endpoint] -- ^ 'v1EndpointSliceEndpoints': endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints.
  -> V1EndpointSlice
mkV1EndpointSlice :: Text -> [V1Endpoint] -> V1EndpointSlice
mkV1EndpointSlice Text
v1EndpointSliceAddressType [V1Endpoint]
v1EndpointSliceEndpoints =
  V1EndpointSlice
  { Text
$sel:v1EndpointSliceAddressType:V1EndpointSlice :: Text
v1EndpointSliceAddressType :: Text
v1EndpointSliceAddressType
  , $sel:v1EndpointSliceApiVersion:V1EndpointSlice :: Maybe Text
v1EndpointSliceApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1Endpoint]
$sel:v1EndpointSliceEndpoints:V1EndpointSlice :: [V1Endpoint]
v1EndpointSliceEndpoints :: [V1Endpoint]
v1EndpointSliceEndpoints
  , $sel:v1EndpointSliceKind:V1EndpointSlice :: Maybe Text
v1EndpointSliceKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1EndpointSliceMetadata:V1EndpointSlice :: Maybe V1ObjectMeta
v1EndpointSliceMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1EndpointSlicePorts:V1EndpointSlice :: Maybe [DiscoveryV1EndpointPort]
v1EndpointSlicePorts = Maybe [DiscoveryV1EndpointPort]
forall a. Maybe a
Nothing
  }

-- ** V1EndpointSliceList
-- | V1EndpointSliceList
-- EndpointSliceList represents a list of endpoint slices
data V1EndpointSliceList = V1EndpointSliceList
  { V1EndpointSliceList -> Maybe Text
v1EndpointSliceListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1EndpointSliceList -> [V1EndpointSlice]
v1EndpointSliceListItems :: !([V1EndpointSlice]) -- ^ /Required/ "items" - items is the list of endpoint slices
  , V1EndpointSliceList -> Maybe Text
v1EndpointSliceListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1EndpointSliceList -> Maybe V1ListMeta
v1EndpointSliceListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1EndpointSliceList -> ShowS
[V1EndpointSliceList] -> ShowS
V1EndpointSliceList -> String
(Int -> V1EndpointSliceList -> ShowS)
-> (V1EndpointSliceList -> String)
-> ([V1EndpointSliceList] -> ShowS)
-> Show V1EndpointSliceList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1EndpointSliceList -> ShowS
showsPrec :: Int -> V1EndpointSliceList -> ShowS
$cshow :: V1EndpointSliceList -> String
show :: V1EndpointSliceList -> String
$cshowList :: [V1EndpointSliceList] -> ShowS
showList :: [V1EndpointSliceList] -> ShowS
P.Show, V1EndpointSliceList -> V1EndpointSliceList -> Bool
(V1EndpointSliceList -> V1EndpointSliceList -> Bool)
-> (V1EndpointSliceList -> V1EndpointSliceList -> Bool)
-> Eq V1EndpointSliceList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1EndpointSliceList -> V1EndpointSliceList -> Bool
== :: V1EndpointSliceList -> V1EndpointSliceList -> Bool
$c/= :: V1EndpointSliceList -> V1EndpointSliceList -> Bool
/= :: V1EndpointSliceList -> V1EndpointSliceList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1EndpointSliceList
instance A.FromJSON V1EndpointSliceList where
  parseJSON :: Value -> Parser V1EndpointSliceList
parseJSON = String
-> (Object -> Parser V1EndpointSliceList)
-> Value
-> Parser V1EndpointSliceList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1EndpointSliceList" ((Object -> Parser V1EndpointSliceList)
 -> Value -> Parser V1EndpointSliceList)
-> (Object -> Parser V1EndpointSliceList)
-> Value
-> Parser V1EndpointSliceList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1EndpointSlice]
-> Maybe Text
-> Maybe V1ListMeta
-> V1EndpointSliceList
V1EndpointSliceList
      (Maybe Text
 -> [V1EndpointSlice]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1EndpointSliceList)
-> Parser (Maybe Text)
-> Parser
     ([V1EndpointSlice]
      -> Maybe Text -> Maybe V1ListMeta -> V1EndpointSliceList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1EndpointSlice]
   -> Maybe Text -> Maybe V1ListMeta -> V1EndpointSliceList)
-> Parser [V1EndpointSlice]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1EndpointSliceList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1EndpointSlice]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1EndpointSliceList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1EndpointSliceList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1EndpointSliceList)
-> Parser (Maybe V1ListMeta) -> Parser V1EndpointSliceList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1EndpointSliceList
instance A.ToJSON V1EndpointSliceList where
  toJSON :: V1EndpointSliceList -> Value
toJSON V1EndpointSliceList {[V1EndpointSlice]
Maybe Text
Maybe V1ListMeta
$sel:v1EndpointSliceListApiVersion:V1EndpointSliceList :: V1EndpointSliceList -> Maybe Text
$sel:v1EndpointSliceListItems:V1EndpointSliceList :: V1EndpointSliceList -> [V1EndpointSlice]
$sel:v1EndpointSliceListKind:V1EndpointSliceList :: V1EndpointSliceList -> Maybe Text
$sel:v1EndpointSliceListMetadata:V1EndpointSliceList :: V1EndpointSliceList -> Maybe V1ListMeta
v1EndpointSliceListApiVersion :: Maybe Text
v1EndpointSliceListItems :: [V1EndpointSlice]
v1EndpointSliceListKind :: Maybe Text
v1EndpointSliceListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1EndpointSliceListApiVersion
      , Key
"items" Key -> [V1EndpointSlice] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1EndpointSlice]
v1EndpointSliceListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1EndpointSliceListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1EndpointSliceListMetadata
      ]


-- | Construct a value of type 'V1EndpointSliceList' (by applying it's required fields, if any)
mkV1EndpointSliceList
  :: [V1EndpointSlice] -- ^ 'v1EndpointSliceListItems': items is the list of endpoint slices
  -> V1EndpointSliceList
mkV1EndpointSliceList :: [V1EndpointSlice] -> V1EndpointSliceList
mkV1EndpointSliceList [V1EndpointSlice]
v1EndpointSliceListItems =
  V1EndpointSliceList
  { $sel:v1EndpointSliceListApiVersion:V1EndpointSliceList :: Maybe Text
v1EndpointSliceListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1EndpointSlice]
$sel:v1EndpointSliceListItems:V1EndpointSliceList :: [V1EndpointSlice]
v1EndpointSliceListItems :: [V1EndpointSlice]
v1EndpointSliceListItems
  , $sel:v1EndpointSliceListKind:V1EndpointSliceList :: Maybe Text
v1EndpointSliceListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1EndpointSliceListMetadata:V1EndpointSliceList :: Maybe V1ListMeta
v1EndpointSliceListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1EndpointSubset
-- | V1EndpointSubset
-- EndpointSubset is a group of addresses with a common set of ports. The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given:   {    Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],    Ports:     [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]  }  The resulting set of endpoints can be viewed as:   a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],  b: [ 10.10.1.1:309, 10.10.2.2:309 ]
data V1EndpointSubset = V1EndpointSubset
  { V1EndpointSubset -> Maybe [V1EndpointAddress]
v1EndpointSubsetAddresses :: !(Maybe [V1EndpointAddress]) -- ^ "addresses" - IP addresses which offer the related ports that are marked as ready. These endpoints should be considered safe for load balancers and clients to utilize.
  , V1EndpointSubset -> Maybe [V1EndpointAddress]
v1EndpointSubsetNotReadyAddresses :: !(Maybe [V1EndpointAddress]) -- ^ "notReadyAddresses" - IP addresses which offer the related ports but are not currently marked as ready because they have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check.
  , V1EndpointSubset -> Maybe [CoreV1EndpointPort]
v1EndpointSubsetPorts :: !(Maybe [CoreV1EndpointPort]) -- ^ "ports" - Port numbers available on the related IP addresses.
  } deriving (Int -> V1EndpointSubset -> ShowS
[V1EndpointSubset] -> ShowS
V1EndpointSubset -> String
(Int -> V1EndpointSubset -> ShowS)
-> (V1EndpointSubset -> String)
-> ([V1EndpointSubset] -> ShowS)
-> Show V1EndpointSubset
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1EndpointSubset -> ShowS
showsPrec :: Int -> V1EndpointSubset -> ShowS
$cshow :: V1EndpointSubset -> String
show :: V1EndpointSubset -> String
$cshowList :: [V1EndpointSubset] -> ShowS
showList :: [V1EndpointSubset] -> ShowS
P.Show, V1EndpointSubset -> V1EndpointSubset -> Bool
(V1EndpointSubset -> V1EndpointSubset -> Bool)
-> (V1EndpointSubset -> V1EndpointSubset -> Bool)
-> Eq V1EndpointSubset
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1EndpointSubset -> V1EndpointSubset -> Bool
== :: V1EndpointSubset -> V1EndpointSubset -> Bool
$c/= :: V1EndpointSubset -> V1EndpointSubset -> Bool
/= :: V1EndpointSubset -> V1EndpointSubset -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1EndpointSubset
instance A.FromJSON V1EndpointSubset where
  parseJSON :: Value -> Parser V1EndpointSubset
parseJSON = String
-> (Object -> Parser V1EndpointSubset)
-> Value
-> Parser V1EndpointSubset
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1EndpointSubset" ((Object -> Parser V1EndpointSubset)
 -> Value -> Parser V1EndpointSubset)
-> (Object -> Parser V1EndpointSubset)
-> Value
-> Parser V1EndpointSubset
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1EndpointAddress]
-> Maybe [V1EndpointAddress]
-> Maybe [CoreV1EndpointPort]
-> V1EndpointSubset
V1EndpointSubset
      (Maybe [V1EndpointAddress]
 -> Maybe [V1EndpointAddress]
 -> Maybe [CoreV1EndpointPort]
 -> V1EndpointSubset)
-> Parser (Maybe [V1EndpointAddress])
-> Parser
     (Maybe [V1EndpointAddress]
      -> Maybe [CoreV1EndpointPort] -> V1EndpointSubset)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1EndpointAddress])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"addresses")
      Parser
  (Maybe [V1EndpointAddress]
   -> Maybe [CoreV1EndpointPort] -> V1EndpointSubset)
-> Parser (Maybe [V1EndpointAddress])
-> Parser (Maybe [CoreV1EndpointPort] -> V1EndpointSubset)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1EndpointAddress])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"notReadyAddresses")
      Parser (Maybe [CoreV1EndpointPort] -> V1EndpointSubset)
-> Parser (Maybe [CoreV1EndpointPort]) -> Parser V1EndpointSubset
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [CoreV1EndpointPort])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ports")

-- | ToJSON V1EndpointSubset
instance A.ToJSON V1EndpointSubset where
  toJSON :: V1EndpointSubset -> Value
toJSON V1EndpointSubset {Maybe [V1EndpointAddress]
Maybe [CoreV1EndpointPort]
$sel:v1EndpointSubsetAddresses:V1EndpointSubset :: V1EndpointSubset -> Maybe [V1EndpointAddress]
$sel:v1EndpointSubsetNotReadyAddresses:V1EndpointSubset :: V1EndpointSubset -> Maybe [V1EndpointAddress]
$sel:v1EndpointSubsetPorts:V1EndpointSubset :: V1EndpointSubset -> Maybe [CoreV1EndpointPort]
v1EndpointSubsetAddresses :: Maybe [V1EndpointAddress]
v1EndpointSubsetNotReadyAddresses :: Maybe [V1EndpointAddress]
v1EndpointSubsetPorts :: Maybe [CoreV1EndpointPort]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"addresses" Key -> Maybe [V1EndpointAddress] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1EndpointAddress]
v1EndpointSubsetAddresses
      , Key
"notReadyAddresses" Key -> Maybe [V1EndpointAddress] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1EndpointAddress]
v1EndpointSubsetNotReadyAddresses
      , Key
"ports" Key -> Maybe [CoreV1EndpointPort] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [CoreV1EndpointPort]
v1EndpointSubsetPorts
      ]


-- | Construct a value of type 'V1EndpointSubset' (by applying it's required fields, if any)
mkV1EndpointSubset
  :: V1EndpointSubset
mkV1EndpointSubset :: V1EndpointSubset
mkV1EndpointSubset =
  V1EndpointSubset
  { $sel:v1EndpointSubsetAddresses:V1EndpointSubset :: Maybe [V1EndpointAddress]
v1EndpointSubsetAddresses = Maybe [V1EndpointAddress]
forall a. Maybe a
Nothing
  , $sel:v1EndpointSubsetNotReadyAddresses:V1EndpointSubset :: Maybe [V1EndpointAddress]
v1EndpointSubsetNotReadyAddresses = Maybe [V1EndpointAddress]
forall a. Maybe a
Nothing
  , $sel:v1EndpointSubsetPorts:V1EndpointSubset :: Maybe [CoreV1EndpointPort]
v1EndpointSubsetPorts = Maybe [CoreV1EndpointPort]
forall a. Maybe a
Nothing
  }

-- ** V1Endpoints
-- | V1Endpoints
-- Endpoints is a collection of endpoints that implement the actual service. Example:    Name: \"mysvc\",   Subsets: [     {       Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],       Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]     },     {       Addresses: [{\"ip\": \"10.10.3.3\"}],       Ports: [{\"name\": \"a\", \"port\": 93}, {\"name\": \"b\", \"port\": 76}]     },  ]
data V1Endpoints = V1Endpoints
  { V1Endpoints -> Maybe Text
v1EndpointsApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1Endpoints -> Maybe Text
v1EndpointsKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1Endpoints -> Maybe V1ObjectMeta
v1EndpointsMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1Endpoints -> Maybe [V1EndpointSubset]
v1EndpointsSubsets :: !(Maybe [V1EndpointSubset]) -- ^ "subsets" - The set of all endpoints is the union of all subsets. Addresses are placed into subsets according to the IPs they share. A single address with multiple ports, some of which are ready and some of which are not (because they come from different containers) will result in the address being displayed in different subsets for the different ports. No address will appear in both Addresses and NotReadyAddresses in the same subset. Sets of addresses and ports that comprise a service.
  } deriving (Int -> V1Endpoints -> ShowS
[V1Endpoints] -> ShowS
V1Endpoints -> String
(Int -> V1Endpoints -> ShowS)
-> (V1Endpoints -> String)
-> ([V1Endpoints] -> ShowS)
-> Show V1Endpoints
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1Endpoints -> ShowS
showsPrec :: Int -> V1Endpoints -> ShowS
$cshow :: V1Endpoints -> String
show :: V1Endpoints -> String
$cshowList :: [V1Endpoints] -> ShowS
showList :: [V1Endpoints] -> ShowS
P.Show, V1Endpoints -> V1Endpoints -> Bool
(V1Endpoints -> V1Endpoints -> Bool)
-> (V1Endpoints -> V1Endpoints -> Bool) -> Eq V1Endpoints
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1Endpoints -> V1Endpoints -> Bool
== :: V1Endpoints -> V1Endpoints -> Bool
$c/= :: V1Endpoints -> V1Endpoints -> Bool
/= :: V1Endpoints -> V1Endpoints -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1Endpoints
instance A.FromJSON V1Endpoints where
  parseJSON :: Value -> Parser V1Endpoints
parseJSON = String
-> (Object -> Parser V1Endpoints) -> Value -> Parser V1Endpoints
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1Endpoints" ((Object -> Parser V1Endpoints) -> Value -> Parser V1Endpoints)
-> (Object -> Parser V1Endpoints) -> Value -> Parser V1Endpoints
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe [V1EndpointSubset]
-> V1Endpoints
V1Endpoints
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe [V1EndpointSubset]
 -> V1Endpoints)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta -> Maybe [V1EndpointSubset] -> V1Endpoints)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta -> Maybe [V1EndpointSubset] -> V1Endpoints)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta -> Maybe [V1EndpointSubset] -> V1Endpoints)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta -> Maybe [V1EndpointSubset] -> V1Endpoints)
-> Parser (Maybe V1ObjectMeta)
-> Parser (Maybe [V1EndpointSubset] -> V1Endpoints)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (Maybe [V1EndpointSubset] -> V1Endpoints)
-> Parser (Maybe [V1EndpointSubset]) -> Parser V1Endpoints
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1EndpointSubset])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"subsets")

-- | ToJSON V1Endpoints
instance A.ToJSON V1Endpoints where
  toJSON :: V1Endpoints -> Value
toJSON V1Endpoints {Maybe [V1EndpointSubset]
Maybe Text
Maybe V1ObjectMeta
$sel:v1EndpointsApiVersion:V1Endpoints :: V1Endpoints -> Maybe Text
$sel:v1EndpointsKind:V1Endpoints :: V1Endpoints -> Maybe Text
$sel:v1EndpointsMetadata:V1Endpoints :: V1Endpoints -> Maybe V1ObjectMeta
$sel:v1EndpointsSubsets:V1Endpoints :: V1Endpoints -> Maybe [V1EndpointSubset]
v1EndpointsApiVersion :: Maybe Text
v1EndpointsKind :: Maybe Text
v1EndpointsMetadata :: Maybe V1ObjectMeta
v1EndpointsSubsets :: Maybe [V1EndpointSubset]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1EndpointsApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1EndpointsKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1EndpointsMetadata
      , Key
"subsets" Key -> Maybe [V1EndpointSubset] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1EndpointSubset]
v1EndpointsSubsets
      ]


-- | Construct a value of type 'V1Endpoints' (by applying it's required fields, if any)
mkV1Endpoints
  :: V1Endpoints
mkV1Endpoints :: V1Endpoints
mkV1Endpoints =
  V1Endpoints
  { $sel:v1EndpointsApiVersion:V1Endpoints :: Maybe Text
v1EndpointsApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1EndpointsKind:V1Endpoints :: Maybe Text
v1EndpointsKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1EndpointsMetadata:V1Endpoints :: Maybe V1ObjectMeta
v1EndpointsMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1EndpointsSubsets:V1Endpoints :: Maybe [V1EndpointSubset]
v1EndpointsSubsets = Maybe [V1EndpointSubset]
forall a. Maybe a
Nothing
  }

-- ** V1EndpointsList
-- | V1EndpointsList
-- EndpointsList is a list of endpoints.
data V1EndpointsList = V1EndpointsList
  { V1EndpointsList -> Maybe Text
v1EndpointsListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1EndpointsList -> [V1Endpoints]
v1EndpointsListItems :: !([V1Endpoints]) -- ^ /Required/ "items" - List of endpoints.
  , V1EndpointsList -> Maybe Text
v1EndpointsListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1EndpointsList -> Maybe V1ListMeta
v1EndpointsListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1EndpointsList -> ShowS
[V1EndpointsList] -> ShowS
V1EndpointsList -> String
(Int -> V1EndpointsList -> ShowS)
-> (V1EndpointsList -> String)
-> ([V1EndpointsList] -> ShowS)
-> Show V1EndpointsList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1EndpointsList -> ShowS
showsPrec :: Int -> V1EndpointsList -> ShowS
$cshow :: V1EndpointsList -> String
show :: V1EndpointsList -> String
$cshowList :: [V1EndpointsList] -> ShowS
showList :: [V1EndpointsList] -> ShowS
P.Show, V1EndpointsList -> V1EndpointsList -> Bool
(V1EndpointsList -> V1EndpointsList -> Bool)
-> (V1EndpointsList -> V1EndpointsList -> Bool)
-> Eq V1EndpointsList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1EndpointsList -> V1EndpointsList -> Bool
== :: V1EndpointsList -> V1EndpointsList -> Bool
$c/= :: V1EndpointsList -> V1EndpointsList -> Bool
/= :: V1EndpointsList -> V1EndpointsList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1EndpointsList
instance A.FromJSON V1EndpointsList where
  parseJSON :: Value -> Parser V1EndpointsList
parseJSON = String
-> (Object -> Parser V1EndpointsList)
-> Value
-> Parser V1EndpointsList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1EndpointsList" ((Object -> Parser V1EndpointsList)
 -> Value -> Parser V1EndpointsList)
-> (Object -> Parser V1EndpointsList)
-> Value
-> Parser V1EndpointsList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1Endpoints]
-> Maybe Text
-> Maybe V1ListMeta
-> V1EndpointsList
V1EndpointsList
      (Maybe Text
 -> [V1Endpoints]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1EndpointsList)
-> Parser (Maybe Text)
-> Parser
     ([V1Endpoints]
      -> Maybe Text -> Maybe V1ListMeta -> V1EndpointsList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1Endpoints]
   -> Maybe Text -> Maybe V1ListMeta -> V1EndpointsList)
-> Parser [V1Endpoints]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1EndpointsList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1Endpoints]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1EndpointsList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1EndpointsList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1EndpointsList)
-> Parser (Maybe V1ListMeta) -> Parser V1EndpointsList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1EndpointsList
instance A.ToJSON V1EndpointsList where
  toJSON :: V1EndpointsList -> Value
toJSON V1EndpointsList {[V1Endpoints]
Maybe Text
Maybe V1ListMeta
$sel:v1EndpointsListApiVersion:V1EndpointsList :: V1EndpointsList -> Maybe Text
$sel:v1EndpointsListItems:V1EndpointsList :: V1EndpointsList -> [V1Endpoints]
$sel:v1EndpointsListKind:V1EndpointsList :: V1EndpointsList -> Maybe Text
$sel:v1EndpointsListMetadata:V1EndpointsList :: V1EndpointsList -> Maybe V1ListMeta
v1EndpointsListApiVersion :: Maybe Text
v1EndpointsListItems :: [V1Endpoints]
v1EndpointsListKind :: Maybe Text
v1EndpointsListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1EndpointsListApiVersion
      , Key
"items" Key -> [V1Endpoints] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1Endpoints]
v1EndpointsListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1EndpointsListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1EndpointsListMetadata
      ]


-- | Construct a value of type 'V1EndpointsList' (by applying it's required fields, if any)
mkV1EndpointsList
  :: [V1Endpoints] -- ^ 'v1EndpointsListItems': List of endpoints.
  -> V1EndpointsList
mkV1EndpointsList :: [V1Endpoints] -> V1EndpointsList
mkV1EndpointsList [V1Endpoints]
v1EndpointsListItems =
  V1EndpointsList
  { $sel:v1EndpointsListApiVersion:V1EndpointsList :: Maybe Text
v1EndpointsListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1Endpoints]
$sel:v1EndpointsListItems:V1EndpointsList :: [V1Endpoints]
v1EndpointsListItems :: [V1Endpoints]
v1EndpointsListItems
  , $sel:v1EndpointsListKind:V1EndpointsList :: Maybe Text
v1EndpointsListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1EndpointsListMetadata:V1EndpointsList :: Maybe V1ListMeta
v1EndpointsListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1EnvFromSource
-- | V1EnvFromSource
-- EnvFromSource represents the source of a set of ConfigMaps
data V1EnvFromSource = V1EnvFromSource
  { V1EnvFromSource -> Maybe V1ConfigMapEnvSource
v1EnvFromSourceConfigMapRef :: !(Maybe V1ConfigMapEnvSource) -- ^ "configMapRef"
  , V1EnvFromSource -> Maybe Text
v1EnvFromSourcePrefix :: !(Maybe Text) -- ^ "prefix" - An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.
  , V1EnvFromSource -> Maybe V1SecretEnvSource
v1EnvFromSourceSecretRef :: !(Maybe V1SecretEnvSource) -- ^ "secretRef"
  } deriving (Int -> V1EnvFromSource -> ShowS
[V1EnvFromSource] -> ShowS
V1EnvFromSource -> String
(Int -> V1EnvFromSource -> ShowS)
-> (V1EnvFromSource -> String)
-> ([V1EnvFromSource] -> ShowS)
-> Show V1EnvFromSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1EnvFromSource -> ShowS
showsPrec :: Int -> V1EnvFromSource -> ShowS
$cshow :: V1EnvFromSource -> String
show :: V1EnvFromSource -> String
$cshowList :: [V1EnvFromSource] -> ShowS
showList :: [V1EnvFromSource] -> ShowS
P.Show, V1EnvFromSource -> V1EnvFromSource -> Bool
(V1EnvFromSource -> V1EnvFromSource -> Bool)
-> (V1EnvFromSource -> V1EnvFromSource -> Bool)
-> Eq V1EnvFromSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1EnvFromSource -> V1EnvFromSource -> Bool
== :: V1EnvFromSource -> V1EnvFromSource -> Bool
$c/= :: V1EnvFromSource -> V1EnvFromSource -> Bool
/= :: V1EnvFromSource -> V1EnvFromSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1EnvFromSource
instance A.FromJSON V1EnvFromSource where
  parseJSON :: Value -> Parser V1EnvFromSource
parseJSON = String
-> (Object -> Parser V1EnvFromSource)
-> Value
-> Parser V1EnvFromSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1EnvFromSource" ((Object -> Parser V1EnvFromSource)
 -> Value -> Parser V1EnvFromSource)
-> (Object -> Parser V1EnvFromSource)
-> Value
-> Parser V1EnvFromSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1ConfigMapEnvSource
-> Maybe Text -> Maybe V1SecretEnvSource -> V1EnvFromSource
V1EnvFromSource
      (Maybe V1ConfigMapEnvSource
 -> Maybe Text -> Maybe V1SecretEnvSource -> V1EnvFromSource)
-> Parser (Maybe V1ConfigMapEnvSource)
-> Parser
     (Maybe Text -> Maybe V1SecretEnvSource -> V1EnvFromSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1ConfigMapEnvSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"configMapRef")
      Parser (Maybe Text -> Maybe V1SecretEnvSource -> V1EnvFromSource)
-> Parser (Maybe Text)
-> Parser (Maybe V1SecretEnvSource -> V1EnvFromSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"prefix")
      Parser (Maybe V1SecretEnvSource -> V1EnvFromSource)
-> Parser (Maybe V1SecretEnvSource) -> Parser V1EnvFromSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1SecretEnvSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"secretRef")

-- | ToJSON V1EnvFromSource
instance A.ToJSON V1EnvFromSource where
  toJSON :: V1EnvFromSource -> Value
toJSON V1EnvFromSource {Maybe Text
Maybe V1SecretEnvSource
Maybe V1ConfigMapEnvSource
$sel:v1EnvFromSourceConfigMapRef:V1EnvFromSource :: V1EnvFromSource -> Maybe V1ConfigMapEnvSource
$sel:v1EnvFromSourcePrefix:V1EnvFromSource :: V1EnvFromSource -> Maybe Text
$sel:v1EnvFromSourceSecretRef:V1EnvFromSource :: V1EnvFromSource -> Maybe V1SecretEnvSource
v1EnvFromSourceConfigMapRef :: Maybe V1ConfigMapEnvSource
v1EnvFromSourcePrefix :: Maybe Text
v1EnvFromSourceSecretRef :: Maybe V1SecretEnvSource
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"configMapRef" Key -> Maybe V1ConfigMapEnvSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ConfigMapEnvSource
v1EnvFromSourceConfigMapRef
      , Key
"prefix" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1EnvFromSourcePrefix
      , Key
"secretRef" Key -> Maybe V1SecretEnvSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1SecretEnvSource
v1EnvFromSourceSecretRef
      ]


-- | Construct a value of type 'V1EnvFromSource' (by applying it's required fields, if any)
mkV1EnvFromSource
  :: V1EnvFromSource
mkV1EnvFromSource :: V1EnvFromSource
mkV1EnvFromSource =
  V1EnvFromSource
  { $sel:v1EnvFromSourceConfigMapRef:V1EnvFromSource :: Maybe V1ConfigMapEnvSource
v1EnvFromSourceConfigMapRef = Maybe V1ConfigMapEnvSource
forall a. Maybe a
Nothing
  , $sel:v1EnvFromSourcePrefix:V1EnvFromSource :: Maybe Text
v1EnvFromSourcePrefix = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1EnvFromSourceSecretRef:V1EnvFromSource :: Maybe V1SecretEnvSource
v1EnvFromSourceSecretRef = Maybe V1SecretEnvSource
forall a. Maybe a
Nothing
  }

-- ** V1EnvVar
-- | V1EnvVar
-- EnvVar represents an environment variable present in a Container.
data V1EnvVar = V1EnvVar
  { V1EnvVar -> Text
v1EnvVarName :: !(Text) -- ^ /Required/ "name" - Name of the environment variable. Must be a C_IDENTIFIER.
  , V1EnvVar -> Maybe Text
v1EnvVarValue :: !(Maybe Text) -- ^ "value" - Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \&quot;$$(VAR_NAME)\&quot; will produce the string literal \&quot;$(VAR_NAME)\&quot;. Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \&quot;\&quot;.
  , V1EnvVar -> Maybe V1EnvVarSource
v1EnvVarValueFrom :: !(Maybe V1EnvVarSource) -- ^ "valueFrom"
  } deriving (Int -> V1EnvVar -> ShowS
[V1EnvVar] -> ShowS
V1EnvVar -> String
(Int -> V1EnvVar -> ShowS)
-> (V1EnvVar -> String) -> ([V1EnvVar] -> ShowS) -> Show V1EnvVar
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1EnvVar -> ShowS
showsPrec :: Int -> V1EnvVar -> ShowS
$cshow :: V1EnvVar -> String
show :: V1EnvVar -> String
$cshowList :: [V1EnvVar] -> ShowS
showList :: [V1EnvVar] -> ShowS
P.Show, V1EnvVar -> V1EnvVar -> Bool
(V1EnvVar -> V1EnvVar -> Bool)
-> (V1EnvVar -> V1EnvVar -> Bool) -> Eq V1EnvVar
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1EnvVar -> V1EnvVar -> Bool
== :: V1EnvVar -> V1EnvVar -> Bool
$c/= :: V1EnvVar -> V1EnvVar -> Bool
/= :: V1EnvVar -> V1EnvVar -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1EnvVar
instance A.FromJSON V1EnvVar where
  parseJSON :: Value -> Parser V1EnvVar
parseJSON = String -> (Object -> Parser V1EnvVar) -> Value -> Parser V1EnvVar
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1EnvVar" ((Object -> Parser V1EnvVar) -> Value -> Parser V1EnvVar)
-> (Object -> Parser V1EnvVar) -> Value -> Parser V1EnvVar
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Maybe Text -> Maybe V1EnvVarSource -> V1EnvVar
V1EnvVar
      (Text -> Maybe Text -> Maybe V1EnvVarSource -> V1EnvVar)
-> Parser Text
-> Parser (Maybe Text -> Maybe V1EnvVarSource -> V1EnvVar)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser (Maybe Text -> Maybe V1EnvVarSource -> V1EnvVar)
-> Parser (Maybe Text) -> Parser (Maybe V1EnvVarSource -> V1EnvVar)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"value")
      Parser (Maybe V1EnvVarSource -> V1EnvVar)
-> Parser (Maybe V1EnvVarSource) -> Parser V1EnvVar
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1EnvVarSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"valueFrom")

-- | ToJSON V1EnvVar
instance A.ToJSON V1EnvVar where
  toJSON :: V1EnvVar -> Value
toJSON V1EnvVar {Maybe Text
Maybe V1EnvVarSource
Text
$sel:v1EnvVarName:V1EnvVar :: V1EnvVar -> Text
$sel:v1EnvVarValue:V1EnvVar :: V1EnvVar -> Maybe Text
$sel:v1EnvVarValueFrom:V1EnvVar :: V1EnvVar -> Maybe V1EnvVarSource
v1EnvVarName :: Text
v1EnvVarValue :: Maybe Text
v1EnvVarValueFrom :: Maybe V1EnvVarSource
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1EnvVarName
      , Key
"value" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1EnvVarValue
      , Key
"valueFrom" Key -> Maybe V1EnvVarSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1EnvVarSource
v1EnvVarValueFrom
      ]


-- | Construct a value of type 'V1EnvVar' (by applying it's required fields, if any)
mkV1EnvVar
  :: Text -- ^ 'v1EnvVarName': Name of the environment variable. Must be a C_IDENTIFIER.
  -> V1EnvVar
mkV1EnvVar :: Text -> V1EnvVar
mkV1EnvVar Text
v1EnvVarName =
  V1EnvVar
  { Text
$sel:v1EnvVarName:V1EnvVar :: Text
v1EnvVarName :: Text
v1EnvVarName
  , $sel:v1EnvVarValue:V1EnvVar :: Maybe Text
v1EnvVarValue = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1EnvVarValueFrom:V1EnvVar :: Maybe V1EnvVarSource
v1EnvVarValueFrom = Maybe V1EnvVarSource
forall a. Maybe a
Nothing
  }

-- ** V1EnvVarSource
-- | V1EnvVarSource
-- EnvVarSource represents a source for the value of an EnvVar.
data V1EnvVarSource = V1EnvVarSource
  { V1EnvVarSource -> Maybe V1ConfigMapKeySelector
v1EnvVarSourceConfigMapKeyRef :: !(Maybe V1ConfigMapKeySelector) -- ^ "configMapKeyRef"
  , V1EnvVarSource -> Maybe V1ObjectFieldSelector
v1EnvVarSourceFieldRef :: !(Maybe V1ObjectFieldSelector) -- ^ "fieldRef"
  , V1EnvVarSource -> Maybe V1ResourceFieldSelector
v1EnvVarSourceResourceFieldRef :: !(Maybe V1ResourceFieldSelector) -- ^ "resourceFieldRef"
  , V1EnvVarSource -> Maybe V1SecretKeySelector
v1EnvVarSourceSecretKeyRef :: !(Maybe V1SecretKeySelector) -- ^ "secretKeyRef"
  } deriving (Int -> V1EnvVarSource -> ShowS
[V1EnvVarSource] -> ShowS
V1EnvVarSource -> String
(Int -> V1EnvVarSource -> ShowS)
-> (V1EnvVarSource -> String)
-> ([V1EnvVarSource] -> ShowS)
-> Show V1EnvVarSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1EnvVarSource -> ShowS
showsPrec :: Int -> V1EnvVarSource -> ShowS
$cshow :: V1EnvVarSource -> String
show :: V1EnvVarSource -> String
$cshowList :: [V1EnvVarSource] -> ShowS
showList :: [V1EnvVarSource] -> ShowS
P.Show, V1EnvVarSource -> V1EnvVarSource -> Bool
(V1EnvVarSource -> V1EnvVarSource -> Bool)
-> (V1EnvVarSource -> V1EnvVarSource -> Bool) -> Eq V1EnvVarSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1EnvVarSource -> V1EnvVarSource -> Bool
== :: V1EnvVarSource -> V1EnvVarSource -> Bool
$c/= :: V1EnvVarSource -> V1EnvVarSource -> Bool
/= :: V1EnvVarSource -> V1EnvVarSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1EnvVarSource
instance A.FromJSON V1EnvVarSource where
  parseJSON :: Value -> Parser V1EnvVarSource
parseJSON = String
-> (Object -> Parser V1EnvVarSource)
-> Value
-> Parser V1EnvVarSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1EnvVarSource" ((Object -> Parser V1EnvVarSource)
 -> Value -> Parser V1EnvVarSource)
-> (Object -> Parser V1EnvVarSource)
-> Value
-> Parser V1EnvVarSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1ConfigMapKeySelector
-> Maybe V1ObjectFieldSelector
-> Maybe V1ResourceFieldSelector
-> Maybe V1SecretKeySelector
-> V1EnvVarSource
V1EnvVarSource
      (Maybe V1ConfigMapKeySelector
 -> Maybe V1ObjectFieldSelector
 -> Maybe V1ResourceFieldSelector
 -> Maybe V1SecretKeySelector
 -> V1EnvVarSource)
-> Parser (Maybe V1ConfigMapKeySelector)
-> Parser
     (Maybe V1ObjectFieldSelector
      -> Maybe V1ResourceFieldSelector
      -> Maybe V1SecretKeySelector
      -> V1EnvVarSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1ConfigMapKeySelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"configMapKeyRef")
      Parser
  (Maybe V1ObjectFieldSelector
   -> Maybe V1ResourceFieldSelector
   -> Maybe V1SecretKeySelector
   -> V1EnvVarSource)
-> Parser (Maybe V1ObjectFieldSelector)
-> Parser
     (Maybe V1ResourceFieldSelector
      -> Maybe V1SecretKeySelector -> V1EnvVarSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectFieldSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fieldRef")
      Parser
  (Maybe V1ResourceFieldSelector
   -> Maybe V1SecretKeySelector -> V1EnvVarSource)
-> Parser (Maybe V1ResourceFieldSelector)
-> Parser (Maybe V1SecretKeySelector -> V1EnvVarSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ResourceFieldSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resourceFieldRef")
      Parser (Maybe V1SecretKeySelector -> V1EnvVarSource)
-> Parser (Maybe V1SecretKeySelector) -> Parser V1EnvVarSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1SecretKeySelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"secretKeyRef")

-- | ToJSON V1EnvVarSource
instance A.ToJSON V1EnvVarSource where
  toJSON :: V1EnvVarSource -> Value
toJSON V1EnvVarSource {Maybe V1SecretKeySelector
Maybe V1ResourceFieldSelector
Maybe V1ObjectFieldSelector
Maybe V1ConfigMapKeySelector
$sel:v1EnvVarSourceConfigMapKeyRef:V1EnvVarSource :: V1EnvVarSource -> Maybe V1ConfigMapKeySelector
$sel:v1EnvVarSourceFieldRef:V1EnvVarSource :: V1EnvVarSource -> Maybe V1ObjectFieldSelector
$sel:v1EnvVarSourceResourceFieldRef:V1EnvVarSource :: V1EnvVarSource -> Maybe V1ResourceFieldSelector
$sel:v1EnvVarSourceSecretKeyRef:V1EnvVarSource :: V1EnvVarSource -> Maybe V1SecretKeySelector
v1EnvVarSourceConfigMapKeyRef :: Maybe V1ConfigMapKeySelector
v1EnvVarSourceFieldRef :: Maybe V1ObjectFieldSelector
v1EnvVarSourceResourceFieldRef :: Maybe V1ResourceFieldSelector
v1EnvVarSourceSecretKeyRef :: Maybe V1SecretKeySelector
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"configMapKeyRef" Key -> Maybe V1ConfigMapKeySelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ConfigMapKeySelector
v1EnvVarSourceConfigMapKeyRef
      , Key
"fieldRef" Key -> Maybe V1ObjectFieldSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectFieldSelector
v1EnvVarSourceFieldRef
      , Key
"resourceFieldRef" Key -> Maybe V1ResourceFieldSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ResourceFieldSelector
v1EnvVarSourceResourceFieldRef
      , Key
"secretKeyRef" Key -> Maybe V1SecretKeySelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1SecretKeySelector
v1EnvVarSourceSecretKeyRef
      ]


-- | Construct a value of type 'V1EnvVarSource' (by applying it's required fields, if any)
mkV1EnvVarSource
  :: V1EnvVarSource
mkV1EnvVarSource :: V1EnvVarSource
mkV1EnvVarSource =
  V1EnvVarSource
  { $sel:v1EnvVarSourceConfigMapKeyRef:V1EnvVarSource :: Maybe V1ConfigMapKeySelector
v1EnvVarSourceConfigMapKeyRef = Maybe V1ConfigMapKeySelector
forall a. Maybe a
Nothing
  , $sel:v1EnvVarSourceFieldRef:V1EnvVarSource :: Maybe V1ObjectFieldSelector
v1EnvVarSourceFieldRef = Maybe V1ObjectFieldSelector
forall a. Maybe a
Nothing
  , $sel:v1EnvVarSourceResourceFieldRef:V1EnvVarSource :: Maybe V1ResourceFieldSelector
v1EnvVarSourceResourceFieldRef = Maybe V1ResourceFieldSelector
forall a. Maybe a
Nothing
  , $sel:v1EnvVarSourceSecretKeyRef:V1EnvVarSource :: Maybe V1SecretKeySelector
v1EnvVarSourceSecretKeyRef = Maybe V1SecretKeySelector
forall a. Maybe a
Nothing
  }

-- ** V1EphemeralContainer
-- | V1EphemeralContainer
-- An EphemeralContainer is a temporary container that you may add to an existing Pod for user-initiated activities such as debugging. Ephemeral containers have no resource or scheduling guarantees, and they will not be restarted when they exit or when a Pod is removed or restarted. The kubelet may evict a Pod if an ephemeral container causes the Pod to exceed its resource allocation.  To add an ephemeral container, use the ephemeralcontainers subresource of an existing Pod. Ephemeral containers may not be removed or restarted.
data V1EphemeralContainer = V1EphemeralContainer
  { V1EphemeralContainer -> Maybe [Text]
v1EphemeralContainerArgs :: !(Maybe [Text]) -- ^ "args" - Arguments to the entrypoint. The image&#39;s CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container&#39;s environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \&quot;$$(VAR_NAME)\&quot; will produce the string literal \&quot;$(VAR_NAME)\&quot;. Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
  , V1EphemeralContainer -> Maybe [Text]
v1EphemeralContainerCommand :: !(Maybe [Text]) -- ^ "command" - Entrypoint array. Not executed within a shell. The image&#39;s ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container&#39;s environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \&quot;$$(VAR_NAME)\&quot; will produce the string literal \&quot;$(VAR_NAME)\&quot;. Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
  , V1EphemeralContainer -> Maybe [V1EnvVar]
v1EphemeralContainerEnv :: !(Maybe [V1EnvVar]) -- ^ "env" - List of environment variables to set in the container. Cannot be updated.
  , V1EphemeralContainer -> Maybe [V1EnvFromSource]
v1EphemeralContainerEnvFrom :: !(Maybe [V1EnvFromSource]) -- ^ "envFrom" - List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.
  , V1EphemeralContainer -> Maybe Text
v1EphemeralContainerImage :: !(Maybe Text) -- ^ "image" - Container image name. More info: https://kubernetes.io/docs/concepts/containers/images
  , V1EphemeralContainer -> Maybe Text
v1EphemeralContainerImagePullPolicy :: !(Maybe Text) -- ^ "imagePullPolicy" - Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images
  , V1EphemeralContainer -> Maybe V1Lifecycle
v1EphemeralContainerLifecycle :: !(Maybe V1Lifecycle) -- ^ "lifecycle"
  , V1EphemeralContainer -> Maybe V1Probe
v1EphemeralContainerLivenessProbe :: !(Maybe V1Probe) -- ^ "livenessProbe"
  , V1EphemeralContainer -> Text
v1EphemeralContainerName :: !(Text) -- ^ /Required/ "name" - Name of the ephemeral container specified as a DNS_LABEL. This name must be unique among all containers, init containers and ephemeral containers.
  , V1EphemeralContainer -> Maybe [V1ContainerPort]
v1EphemeralContainerPorts :: !(Maybe [V1ContainerPort]) -- ^ "ports" - Ports are not allowed for ephemeral containers.
  , V1EphemeralContainer -> Maybe V1Probe
v1EphemeralContainerReadinessProbe :: !(Maybe V1Probe) -- ^ "readinessProbe"
  , V1EphemeralContainer -> Maybe [V1ContainerResizePolicy]
v1EphemeralContainerResizePolicy :: !(Maybe [V1ContainerResizePolicy]) -- ^ "resizePolicy" - Resources resize policy for the container.
  , V1EphemeralContainer -> Maybe V1ResourceRequirements
v1EphemeralContainerResources :: !(Maybe V1ResourceRequirements) -- ^ "resources"
  , V1EphemeralContainer -> Maybe Text
v1EphemeralContainerRestartPolicy :: !(Maybe Text) -- ^ "restartPolicy" - Restart policy for the container to manage the restart behavior of each container within a pod. This may only be set for init containers. You cannot set this field on ephemeral containers.
  , V1EphemeralContainer -> Maybe V1SecurityContext
v1EphemeralContainerSecurityContext :: !(Maybe V1SecurityContext) -- ^ "securityContext"
  , V1EphemeralContainer -> Maybe V1Probe
v1EphemeralContainerStartupProbe :: !(Maybe V1Probe) -- ^ "startupProbe"
  , V1EphemeralContainer -> Maybe Bool
v1EphemeralContainerStdin :: !(Maybe Bool) -- ^ "stdin" - Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.
  , V1EphemeralContainer -> Maybe Bool
v1EphemeralContainerStdinOnce :: !(Maybe Bool) -- ^ "stdinOnce" - Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false
  , V1EphemeralContainer -> Maybe Text
v1EphemeralContainerTargetContainerName :: !(Maybe Text) -- ^ "targetContainerName" - If set, the name of the container from PodSpec that this ephemeral container targets. The ephemeral container will be run in the namespaces (IPC, PID, etc) of this container. If not set then the ephemeral container uses the namespaces configured in the Pod spec.  The container runtime must implement support for this feature. If the runtime does not support namespace targeting then the result of setting this field is undefined.
  , V1EphemeralContainer -> Maybe Text
v1EphemeralContainerTerminationMessagePath :: !(Maybe Text) -- ^ "terminationMessagePath" - Optional: Path at which the file to which the container&#39;s termination message will be written is mounted into the container&#39;s filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.
  , V1EphemeralContainer -> Maybe Text
v1EphemeralContainerTerminationMessagePolicy :: !(Maybe Text) -- ^ "terminationMessagePolicy" - Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.
  , V1EphemeralContainer -> Maybe Bool
v1EphemeralContainerTty :: !(Maybe Bool) -- ^ "tty" - Whether this container should allocate a TTY for itself, also requires &#39;stdin&#39; to be true. Default is false.
  , V1EphemeralContainer -> Maybe [V1VolumeDevice]
v1EphemeralContainerVolumeDevices :: !(Maybe [V1VolumeDevice]) -- ^ "volumeDevices" - volumeDevices is the list of block devices to be used by the container.
  , V1EphemeralContainer -> Maybe [V1VolumeMount]
v1EphemeralContainerVolumeMounts :: !(Maybe [V1VolumeMount]) -- ^ "volumeMounts" - Pod volumes to mount into the container&#39;s filesystem. Subpath mounts are not allowed for ephemeral containers. Cannot be updated.
  , V1EphemeralContainer -> Maybe Text
v1EphemeralContainerWorkingDir :: !(Maybe Text) -- ^ "workingDir" - Container&#39;s working directory. If not specified, the container runtime&#39;s default will be used, which might be configured in the container image. Cannot be updated.
  } deriving (Int -> V1EphemeralContainer -> ShowS
[V1EphemeralContainer] -> ShowS
V1EphemeralContainer -> String
(Int -> V1EphemeralContainer -> ShowS)
-> (V1EphemeralContainer -> String)
-> ([V1EphemeralContainer] -> ShowS)
-> Show V1EphemeralContainer
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1EphemeralContainer -> ShowS
showsPrec :: Int -> V1EphemeralContainer -> ShowS
$cshow :: V1EphemeralContainer -> String
show :: V1EphemeralContainer -> String
$cshowList :: [V1EphemeralContainer] -> ShowS
showList :: [V1EphemeralContainer] -> ShowS
P.Show, V1EphemeralContainer -> V1EphemeralContainer -> Bool
(V1EphemeralContainer -> V1EphemeralContainer -> Bool)
-> (V1EphemeralContainer -> V1EphemeralContainer -> Bool)
-> Eq V1EphemeralContainer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1EphemeralContainer -> V1EphemeralContainer -> Bool
== :: V1EphemeralContainer -> V1EphemeralContainer -> Bool
$c/= :: V1EphemeralContainer -> V1EphemeralContainer -> Bool
/= :: V1EphemeralContainer -> V1EphemeralContainer -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1EphemeralContainer
instance A.FromJSON V1EphemeralContainer where
  parseJSON :: Value -> Parser V1EphemeralContainer
parseJSON = String
-> (Object -> Parser V1EphemeralContainer)
-> Value
-> Parser V1EphemeralContainer
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1EphemeralContainer" ((Object -> Parser V1EphemeralContainer)
 -> Value -> Parser V1EphemeralContainer)
-> (Object -> Parser V1EphemeralContainer)
-> Value
-> Parser V1EphemeralContainer
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [Text]
-> Maybe [Text]
-> Maybe [V1EnvVar]
-> Maybe [V1EnvFromSource]
-> Maybe Text
-> Maybe Text
-> Maybe V1Lifecycle
-> Maybe V1Probe
-> Text
-> Maybe [V1ContainerPort]
-> Maybe V1Probe
-> Maybe [V1ContainerResizePolicy]
-> Maybe V1ResourceRequirements
-> Maybe Text
-> Maybe V1SecurityContext
-> Maybe V1Probe
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe [V1VolumeDevice]
-> Maybe [V1VolumeMount]
-> Maybe Text
-> V1EphemeralContainer
V1EphemeralContainer
      (Maybe [Text]
 -> Maybe [Text]
 -> Maybe [V1EnvVar]
 -> Maybe [V1EnvFromSource]
 -> Maybe Text
 -> Maybe Text
 -> Maybe V1Lifecycle
 -> Maybe V1Probe
 -> Text
 -> Maybe [V1ContainerPort]
 -> Maybe V1Probe
 -> Maybe [V1ContainerResizePolicy]
 -> Maybe V1ResourceRequirements
 -> Maybe Text
 -> Maybe V1SecurityContext
 -> Maybe V1Probe
 -> Maybe Bool
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe [V1VolumeDevice]
 -> Maybe [V1VolumeMount]
 -> Maybe Text
 -> V1EphemeralContainer)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [Text]
      -> Maybe [V1EnvVar]
      -> Maybe [V1EnvFromSource]
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1Lifecycle
      -> Maybe V1Probe
      -> Text
      -> Maybe [V1ContainerPort]
      -> Maybe V1Probe
      -> Maybe [V1ContainerResizePolicy]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe V1SecurityContext
      -> Maybe V1Probe
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1EphemeralContainer)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"args")
      Parser
  (Maybe [Text]
   -> Maybe [V1EnvVar]
   -> Maybe [V1EnvFromSource]
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1Lifecycle
   -> Maybe V1Probe
   -> Text
   -> Maybe [V1ContainerPort]
   -> Maybe V1Probe
   -> Maybe [V1ContainerResizePolicy]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe V1SecurityContext
   -> Maybe V1Probe
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1EphemeralContainer)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [V1EnvVar]
      -> Maybe [V1EnvFromSource]
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1Lifecycle
      -> Maybe V1Probe
      -> Text
      -> Maybe [V1ContainerPort]
      -> Maybe V1Probe
      -> Maybe [V1ContainerResizePolicy]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe V1SecurityContext
      -> Maybe V1Probe
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1EphemeralContainer)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"command")
      Parser
  (Maybe [V1EnvVar]
   -> Maybe [V1EnvFromSource]
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1Lifecycle
   -> Maybe V1Probe
   -> Text
   -> Maybe [V1ContainerPort]
   -> Maybe V1Probe
   -> Maybe [V1ContainerResizePolicy]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe V1SecurityContext
   -> Maybe V1Probe
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1EphemeralContainer)
-> Parser (Maybe [V1EnvVar])
-> Parser
     (Maybe [V1EnvFromSource]
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1Lifecycle
      -> Maybe V1Probe
      -> Text
      -> Maybe [V1ContainerPort]
      -> Maybe V1Probe
      -> Maybe [V1ContainerResizePolicy]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe V1SecurityContext
      -> Maybe V1Probe
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1EphemeralContainer)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1EnvVar])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"env")
      Parser
  (Maybe [V1EnvFromSource]
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1Lifecycle
   -> Maybe V1Probe
   -> Text
   -> Maybe [V1ContainerPort]
   -> Maybe V1Probe
   -> Maybe [V1ContainerResizePolicy]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe V1SecurityContext
   -> Maybe V1Probe
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1EphemeralContainer)
-> Parser (Maybe [V1EnvFromSource])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe V1Lifecycle
      -> Maybe V1Probe
      -> Text
      -> Maybe [V1ContainerPort]
      -> Maybe V1Probe
      -> Maybe [V1ContainerResizePolicy]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe V1SecurityContext
      -> Maybe V1Probe
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1EphemeralContainer)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1EnvFromSource])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"envFrom")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe V1Lifecycle
   -> Maybe V1Probe
   -> Text
   -> Maybe [V1ContainerPort]
   -> Maybe V1Probe
   -> Maybe [V1ContainerResizePolicy]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe V1SecurityContext
   -> Maybe V1Probe
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1EphemeralContainer)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1Lifecycle
      -> Maybe V1Probe
      -> Text
      -> Maybe [V1ContainerPort]
      -> Maybe V1Probe
      -> Maybe [V1ContainerResizePolicy]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe V1SecurityContext
      -> Maybe V1Probe
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1EphemeralContainer)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"image")
      Parser
  (Maybe Text
   -> Maybe V1Lifecycle
   -> Maybe V1Probe
   -> Text
   -> Maybe [V1ContainerPort]
   -> Maybe V1Probe
   -> Maybe [V1ContainerResizePolicy]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe V1SecurityContext
   -> Maybe V1Probe
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1EphemeralContainer)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1Lifecycle
      -> Maybe V1Probe
      -> Text
      -> Maybe [V1ContainerPort]
      -> Maybe V1Probe
      -> Maybe [V1ContainerResizePolicy]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe V1SecurityContext
      -> Maybe V1Probe
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1EphemeralContainer)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"imagePullPolicy")
      Parser
  (Maybe V1Lifecycle
   -> Maybe V1Probe
   -> Text
   -> Maybe [V1ContainerPort]
   -> Maybe V1Probe
   -> Maybe [V1ContainerResizePolicy]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe V1SecurityContext
   -> Maybe V1Probe
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1EphemeralContainer)
-> Parser (Maybe V1Lifecycle)
-> Parser
     (Maybe V1Probe
      -> Text
      -> Maybe [V1ContainerPort]
      -> Maybe V1Probe
      -> Maybe [V1ContainerResizePolicy]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe V1SecurityContext
      -> Maybe V1Probe
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1EphemeralContainer)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1Lifecycle)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lifecycle")
      Parser
  (Maybe V1Probe
   -> Text
   -> Maybe [V1ContainerPort]
   -> Maybe V1Probe
   -> Maybe [V1ContainerResizePolicy]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe V1SecurityContext
   -> Maybe V1Probe
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1EphemeralContainer)
-> Parser (Maybe V1Probe)
-> Parser
     (Text
      -> Maybe [V1ContainerPort]
      -> Maybe V1Probe
      -> Maybe [V1ContainerResizePolicy]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe V1SecurityContext
      -> Maybe V1Probe
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1EphemeralContainer)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1Probe)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"livenessProbe")
      Parser
  (Text
   -> Maybe [V1ContainerPort]
   -> Maybe V1Probe
   -> Maybe [V1ContainerResizePolicy]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe V1SecurityContext
   -> Maybe V1Probe
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1EphemeralContainer)
-> Parser Text
-> Parser
     (Maybe [V1ContainerPort]
      -> Maybe V1Probe
      -> Maybe [V1ContainerResizePolicy]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe V1SecurityContext
      -> Maybe V1Probe
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1EphemeralContainer)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser
  (Maybe [V1ContainerPort]
   -> Maybe V1Probe
   -> Maybe [V1ContainerResizePolicy]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe V1SecurityContext
   -> Maybe V1Probe
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1EphemeralContainer)
-> Parser (Maybe [V1ContainerPort])
-> Parser
     (Maybe V1Probe
      -> Maybe [V1ContainerResizePolicy]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe V1SecurityContext
      -> Maybe V1Probe
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1EphemeralContainer)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1ContainerPort])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ports")
      Parser
  (Maybe V1Probe
   -> Maybe [V1ContainerResizePolicy]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe V1SecurityContext
   -> Maybe V1Probe
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1EphemeralContainer)
-> Parser (Maybe V1Probe)
-> Parser
     (Maybe [V1ContainerResizePolicy]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe V1SecurityContext
      -> Maybe V1Probe
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1EphemeralContainer)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1Probe)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readinessProbe")
      Parser
  (Maybe [V1ContainerResizePolicy]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe V1SecurityContext
   -> Maybe V1Probe
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1EphemeralContainer)
-> Parser (Maybe [V1ContainerResizePolicy])
-> Parser
     (Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe V1SecurityContext
      -> Maybe V1Probe
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1EphemeralContainer)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1ContainerResizePolicy])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resizePolicy")
      Parser
  (Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe V1SecurityContext
   -> Maybe V1Probe
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1EphemeralContainer)
-> Parser (Maybe V1ResourceRequirements)
-> Parser
     (Maybe Text
      -> Maybe V1SecurityContext
      -> Maybe V1Probe
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1EphemeralContainer)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ResourceRequirements)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resources")
      Parser
  (Maybe Text
   -> Maybe V1SecurityContext
   -> Maybe V1Probe
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1EphemeralContainer)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1SecurityContext
      -> Maybe V1Probe
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1EphemeralContainer)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"restartPolicy")
      Parser
  (Maybe V1SecurityContext
   -> Maybe V1Probe
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1EphemeralContainer)
-> Parser (Maybe V1SecurityContext)
-> Parser
     (Maybe V1Probe
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1EphemeralContainer)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1SecurityContext)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"securityContext")
      Parser
  (Maybe V1Probe
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1EphemeralContainer)
-> Parser (Maybe V1Probe)
-> Parser
     (Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1EphemeralContainer)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1Probe)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"startupProbe")
      Parser
  (Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1EphemeralContainer)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1EphemeralContainer)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"stdin")
      Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1EphemeralContainer)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1EphemeralContainer)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"stdinOnce")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1EphemeralContainer)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1EphemeralContainer)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"targetContainerName")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1EphemeralContainer)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1EphemeralContainer)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"terminationMessagePath")
      Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1EphemeralContainer)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount]
      -> Maybe Text
      -> V1EphemeralContainer)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"terminationMessagePolicy")
      Parser
  (Maybe Bool
   -> Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount]
   -> Maybe Text
   -> V1EphemeralContainer)
-> Parser (Maybe Bool)
-> Parser
     (Maybe [V1VolumeDevice]
      -> Maybe [V1VolumeMount] -> Maybe Text -> V1EphemeralContainer)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"tty")
      Parser
  (Maybe [V1VolumeDevice]
   -> Maybe [V1VolumeMount] -> Maybe Text -> V1EphemeralContainer)
-> Parser (Maybe [V1VolumeDevice])
-> Parser
     (Maybe [V1VolumeMount] -> Maybe Text -> V1EphemeralContainer)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1VolumeDevice])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"volumeDevices")
      Parser
  (Maybe [V1VolumeMount] -> Maybe Text -> V1EphemeralContainer)
-> Parser (Maybe [V1VolumeMount])
-> Parser (Maybe Text -> V1EphemeralContainer)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1VolumeMount])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"volumeMounts")
      Parser (Maybe Text -> V1EphemeralContainer)
-> Parser (Maybe Text) -> Parser V1EphemeralContainer
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"workingDir")

-- | ToJSON V1EphemeralContainer
instance A.ToJSON V1EphemeralContainer where
  toJSON :: V1EphemeralContainer -> Value
toJSON V1EphemeralContainer {Maybe Bool
Maybe [Text]
Maybe [V1VolumeMount]
Maybe [V1VolumeDevice]
Maybe [V1EnvVar]
Maybe [V1EnvFromSource]
Maybe [V1ContainerResizePolicy]
Maybe [V1ContainerPort]
Maybe Text
Maybe V1SecurityContext
Maybe V1ResourceRequirements
Maybe V1Probe
Maybe V1Lifecycle
Text
$sel:v1EphemeralContainerArgs:V1EphemeralContainer :: V1EphemeralContainer -> Maybe [Text]
$sel:v1EphemeralContainerCommand:V1EphemeralContainer :: V1EphemeralContainer -> Maybe [Text]
$sel:v1EphemeralContainerEnv:V1EphemeralContainer :: V1EphemeralContainer -> Maybe [V1EnvVar]
$sel:v1EphemeralContainerEnvFrom:V1EphemeralContainer :: V1EphemeralContainer -> Maybe [V1EnvFromSource]
$sel:v1EphemeralContainerImage:V1EphemeralContainer :: V1EphemeralContainer -> Maybe Text
$sel:v1EphemeralContainerImagePullPolicy:V1EphemeralContainer :: V1EphemeralContainer -> Maybe Text
$sel:v1EphemeralContainerLifecycle:V1EphemeralContainer :: V1EphemeralContainer -> Maybe V1Lifecycle
$sel:v1EphemeralContainerLivenessProbe:V1EphemeralContainer :: V1EphemeralContainer -> Maybe V1Probe
$sel:v1EphemeralContainerName:V1EphemeralContainer :: V1EphemeralContainer -> Text
$sel:v1EphemeralContainerPorts:V1EphemeralContainer :: V1EphemeralContainer -> Maybe [V1ContainerPort]
$sel:v1EphemeralContainerReadinessProbe:V1EphemeralContainer :: V1EphemeralContainer -> Maybe V1Probe
$sel:v1EphemeralContainerResizePolicy:V1EphemeralContainer :: V1EphemeralContainer -> Maybe [V1ContainerResizePolicy]
$sel:v1EphemeralContainerResources:V1EphemeralContainer :: V1EphemeralContainer -> Maybe V1ResourceRequirements
$sel:v1EphemeralContainerRestartPolicy:V1EphemeralContainer :: V1EphemeralContainer -> Maybe Text
$sel:v1EphemeralContainerSecurityContext:V1EphemeralContainer :: V1EphemeralContainer -> Maybe V1SecurityContext
$sel:v1EphemeralContainerStartupProbe:V1EphemeralContainer :: V1EphemeralContainer -> Maybe V1Probe
$sel:v1EphemeralContainerStdin:V1EphemeralContainer :: V1EphemeralContainer -> Maybe Bool
$sel:v1EphemeralContainerStdinOnce:V1EphemeralContainer :: V1EphemeralContainer -> Maybe Bool
$sel:v1EphemeralContainerTargetContainerName:V1EphemeralContainer :: V1EphemeralContainer -> Maybe Text
$sel:v1EphemeralContainerTerminationMessagePath:V1EphemeralContainer :: V1EphemeralContainer -> Maybe Text
$sel:v1EphemeralContainerTerminationMessagePolicy:V1EphemeralContainer :: V1EphemeralContainer -> Maybe Text
$sel:v1EphemeralContainerTty:V1EphemeralContainer :: V1EphemeralContainer -> Maybe Bool
$sel:v1EphemeralContainerVolumeDevices:V1EphemeralContainer :: V1EphemeralContainer -> Maybe [V1VolumeDevice]
$sel:v1EphemeralContainerVolumeMounts:V1EphemeralContainer :: V1EphemeralContainer -> Maybe [V1VolumeMount]
$sel:v1EphemeralContainerWorkingDir:V1EphemeralContainer :: V1EphemeralContainer -> Maybe Text
v1EphemeralContainerArgs :: Maybe [Text]
v1EphemeralContainerCommand :: Maybe [Text]
v1EphemeralContainerEnv :: Maybe [V1EnvVar]
v1EphemeralContainerEnvFrom :: Maybe [V1EnvFromSource]
v1EphemeralContainerImage :: Maybe Text
v1EphemeralContainerImagePullPolicy :: Maybe Text
v1EphemeralContainerLifecycle :: Maybe V1Lifecycle
v1EphemeralContainerLivenessProbe :: Maybe V1Probe
v1EphemeralContainerName :: Text
v1EphemeralContainerPorts :: Maybe [V1ContainerPort]
v1EphemeralContainerReadinessProbe :: Maybe V1Probe
v1EphemeralContainerResizePolicy :: Maybe [V1ContainerResizePolicy]
v1EphemeralContainerResources :: Maybe V1ResourceRequirements
v1EphemeralContainerRestartPolicy :: Maybe Text
v1EphemeralContainerSecurityContext :: Maybe V1SecurityContext
v1EphemeralContainerStartupProbe :: Maybe V1Probe
v1EphemeralContainerStdin :: Maybe Bool
v1EphemeralContainerStdinOnce :: Maybe Bool
v1EphemeralContainerTargetContainerName :: Maybe Text
v1EphemeralContainerTerminationMessagePath :: Maybe Text
v1EphemeralContainerTerminationMessagePolicy :: Maybe Text
v1EphemeralContainerTty :: Maybe Bool
v1EphemeralContainerVolumeDevices :: Maybe [V1VolumeDevice]
v1EphemeralContainerVolumeMounts :: Maybe [V1VolumeMount]
v1EphemeralContainerWorkingDir :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"args" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1EphemeralContainerArgs
      , Key
"command" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1EphemeralContainerCommand
      , Key
"env" Key -> Maybe [V1EnvVar] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1EnvVar]
v1EphemeralContainerEnv
      , Key
"envFrom" Key -> Maybe [V1EnvFromSource] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1EnvFromSource]
v1EphemeralContainerEnvFrom
      , Key
"image" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1EphemeralContainerImage
      , Key
"imagePullPolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1EphemeralContainerImagePullPolicy
      , Key
"lifecycle" Key -> Maybe V1Lifecycle -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1Lifecycle
v1EphemeralContainerLifecycle
      , Key
"livenessProbe" Key -> Maybe V1Probe -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1Probe
v1EphemeralContainerLivenessProbe
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1EphemeralContainerName
      , Key
"ports" Key -> Maybe [V1ContainerPort] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1ContainerPort]
v1EphemeralContainerPorts
      , Key
"readinessProbe" Key -> Maybe V1Probe -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1Probe
v1EphemeralContainerReadinessProbe
      , Key
"resizePolicy" Key -> Maybe [V1ContainerResizePolicy] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1ContainerResizePolicy]
v1EphemeralContainerResizePolicy
      , Key
"resources" Key -> Maybe V1ResourceRequirements -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ResourceRequirements
v1EphemeralContainerResources
      , Key
"restartPolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1EphemeralContainerRestartPolicy
      , Key
"securityContext" Key -> Maybe V1SecurityContext -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1SecurityContext
v1EphemeralContainerSecurityContext
      , Key
"startupProbe" Key -> Maybe V1Probe -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1Probe
v1EphemeralContainerStartupProbe
      , Key
"stdin" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1EphemeralContainerStdin
      , Key
"stdinOnce" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1EphemeralContainerStdinOnce
      , Key
"targetContainerName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1EphemeralContainerTargetContainerName
      , Key
"terminationMessagePath" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1EphemeralContainerTerminationMessagePath
      , Key
"terminationMessagePolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1EphemeralContainerTerminationMessagePolicy
      , Key
"tty" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1EphemeralContainerTty
      , Key
"volumeDevices" Key -> Maybe [V1VolumeDevice] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1VolumeDevice]
v1EphemeralContainerVolumeDevices
      , Key
"volumeMounts" Key -> Maybe [V1VolumeMount] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1VolumeMount]
v1EphemeralContainerVolumeMounts
      , Key
"workingDir" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1EphemeralContainerWorkingDir
      ]


-- | Construct a value of type 'V1EphemeralContainer' (by applying it's required fields, if any)
mkV1EphemeralContainer
  :: Text -- ^ 'v1EphemeralContainerName': Name of the ephemeral container specified as a DNS_LABEL. This name must be unique among all containers, init containers and ephemeral containers.
  -> V1EphemeralContainer
mkV1EphemeralContainer :: Text -> V1EphemeralContainer
mkV1EphemeralContainer Text
v1EphemeralContainerName =
  V1EphemeralContainer
  { $sel:v1EphemeralContainerArgs:V1EphemeralContainer :: Maybe [Text]
v1EphemeralContainerArgs = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1EphemeralContainerCommand:V1EphemeralContainer :: Maybe [Text]
v1EphemeralContainerCommand = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1EphemeralContainerEnv:V1EphemeralContainer :: Maybe [V1EnvVar]
v1EphemeralContainerEnv = Maybe [V1EnvVar]
forall a. Maybe a
Nothing
  , $sel:v1EphemeralContainerEnvFrom:V1EphemeralContainer :: Maybe [V1EnvFromSource]
v1EphemeralContainerEnvFrom = Maybe [V1EnvFromSource]
forall a. Maybe a
Nothing
  , $sel:v1EphemeralContainerImage:V1EphemeralContainer :: Maybe Text
v1EphemeralContainerImage = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1EphemeralContainerImagePullPolicy:V1EphemeralContainer :: Maybe Text
v1EphemeralContainerImagePullPolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1EphemeralContainerLifecycle:V1EphemeralContainer :: Maybe V1Lifecycle
v1EphemeralContainerLifecycle = Maybe V1Lifecycle
forall a. Maybe a
Nothing
  , $sel:v1EphemeralContainerLivenessProbe:V1EphemeralContainer :: Maybe V1Probe
v1EphemeralContainerLivenessProbe = Maybe V1Probe
forall a. Maybe a
Nothing
  , Text
$sel:v1EphemeralContainerName:V1EphemeralContainer :: Text
v1EphemeralContainerName :: Text
v1EphemeralContainerName
  , $sel:v1EphemeralContainerPorts:V1EphemeralContainer :: Maybe [V1ContainerPort]
v1EphemeralContainerPorts = Maybe [V1ContainerPort]
forall a. Maybe a
Nothing
  , $sel:v1EphemeralContainerReadinessProbe:V1EphemeralContainer :: Maybe V1Probe
v1EphemeralContainerReadinessProbe = Maybe V1Probe
forall a. Maybe a
Nothing
  , $sel:v1EphemeralContainerResizePolicy:V1EphemeralContainer :: Maybe [V1ContainerResizePolicy]
v1EphemeralContainerResizePolicy = Maybe [V1ContainerResizePolicy]
forall a. Maybe a
Nothing
  , $sel:v1EphemeralContainerResources:V1EphemeralContainer :: Maybe V1ResourceRequirements
v1EphemeralContainerResources = Maybe V1ResourceRequirements
forall a. Maybe a
Nothing
  , $sel:v1EphemeralContainerRestartPolicy:V1EphemeralContainer :: Maybe Text
v1EphemeralContainerRestartPolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1EphemeralContainerSecurityContext:V1EphemeralContainer :: Maybe V1SecurityContext
v1EphemeralContainerSecurityContext = Maybe V1SecurityContext
forall a. Maybe a
Nothing
  , $sel:v1EphemeralContainerStartupProbe:V1EphemeralContainer :: Maybe V1Probe
v1EphemeralContainerStartupProbe = Maybe V1Probe
forall a. Maybe a
Nothing
  , $sel:v1EphemeralContainerStdin:V1EphemeralContainer :: Maybe Bool
v1EphemeralContainerStdin = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1EphemeralContainerStdinOnce:V1EphemeralContainer :: Maybe Bool
v1EphemeralContainerStdinOnce = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1EphemeralContainerTargetContainerName:V1EphemeralContainer :: Maybe Text
v1EphemeralContainerTargetContainerName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1EphemeralContainerTerminationMessagePath:V1EphemeralContainer :: Maybe Text
v1EphemeralContainerTerminationMessagePath = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1EphemeralContainerTerminationMessagePolicy:V1EphemeralContainer :: Maybe Text
v1EphemeralContainerTerminationMessagePolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1EphemeralContainerTty:V1EphemeralContainer :: Maybe Bool
v1EphemeralContainerTty = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1EphemeralContainerVolumeDevices:V1EphemeralContainer :: Maybe [V1VolumeDevice]
v1EphemeralContainerVolumeDevices = Maybe [V1VolumeDevice]
forall a. Maybe a
Nothing
  , $sel:v1EphemeralContainerVolumeMounts:V1EphemeralContainer :: Maybe [V1VolumeMount]
v1EphemeralContainerVolumeMounts = Maybe [V1VolumeMount]
forall a. Maybe a
Nothing
  , $sel:v1EphemeralContainerWorkingDir:V1EphemeralContainer :: Maybe Text
v1EphemeralContainerWorkingDir = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1EphemeralVolumeSource
-- | V1EphemeralVolumeSource
-- Represents an ephemeral volume that is handled by a normal storage driver.
data V1EphemeralVolumeSource = V1EphemeralVolumeSource
  { V1EphemeralVolumeSource -> Maybe V1PersistentVolumeClaimTemplate
v1EphemeralVolumeSourceVolumeClaimTemplate :: !(Maybe V1PersistentVolumeClaimTemplate) -- ^ "volumeClaimTemplate"
  } deriving (Int -> V1EphemeralVolumeSource -> ShowS
[V1EphemeralVolumeSource] -> ShowS
V1EphemeralVolumeSource -> String
(Int -> V1EphemeralVolumeSource -> ShowS)
-> (V1EphemeralVolumeSource -> String)
-> ([V1EphemeralVolumeSource] -> ShowS)
-> Show V1EphemeralVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1EphemeralVolumeSource -> ShowS
showsPrec :: Int -> V1EphemeralVolumeSource -> ShowS
$cshow :: V1EphemeralVolumeSource -> String
show :: V1EphemeralVolumeSource -> String
$cshowList :: [V1EphemeralVolumeSource] -> ShowS
showList :: [V1EphemeralVolumeSource] -> ShowS
P.Show, V1EphemeralVolumeSource -> V1EphemeralVolumeSource -> Bool
(V1EphemeralVolumeSource -> V1EphemeralVolumeSource -> Bool)
-> (V1EphemeralVolumeSource -> V1EphemeralVolumeSource -> Bool)
-> Eq V1EphemeralVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1EphemeralVolumeSource -> V1EphemeralVolumeSource -> Bool
== :: V1EphemeralVolumeSource -> V1EphemeralVolumeSource -> Bool
$c/= :: V1EphemeralVolumeSource -> V1EphemeralVolumeSource -> Bool
/= :: V1EphemeralVolumeSource -> V1EphemeralVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1EphemeralVolumeSource
instance A.FromJSON V1EphemeralVolumeSource where
  parseJSON :: Value -> Parser V1EphemeralVolumeSource
parseJSON = String
-> (Object -> Parser V1EphemeralVolumeSource)
-> Value
-> Parser V1EphemeralVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1EphemeralVolumeSource" ((Object -> Parser V1EphemeralVolumeSource)
 -> Value -> Parser V1EphemeralVolumeSource)
-> (Object -> Parser V1EphemeralVolumeSource)
-> Value
-> Parser V1EphemeralVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1PersistentVolumeClaimTemplate -> V1EphemeralVolumeSource
V1EphemeralVolumeSource
      (Maybe V1PersistentVolumeClaimTemplate -> V1EphemeralVolumeSource)
-> Parser (Maybe V1PersistentVolumeClaimTemplate)
-> Parser V1EphemeralVolumeSource
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1PersistentVolumeClaimTemplate)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"volumeClaimTemplate")

-- | ToJSON V1EphemeralVolumeSource
instance A.ToJSON V1EphemeralVolumeSource where
  toJSON :: V1EphemeralVolumeSource -> Value
toJSON V1EphemeralVolumeSource {Maybe V1PersistentVolumeClaimTemplate
$sel:v1EphemeralVolumeSourceVolumeClaimTemplate:V1EphemeralVolumeSource :: V1EphemeralVolumeSource -> Maybe V1PersistentVolumeClaimTemplate
v1EphemeralVolumeSourceVolumeClaimTemplate :: Maybe V1PersistentVolumeClaimTemplate
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"volumeClaimTemplate" Key -> Maybe V1PersistentVolumeClaimTemplate -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1PersistentVolumeClaimTemplate
v1EphemeralVolumeSourceVolumeClaimTemplate
      ]


-- | Construct a value of type 'V1EphemeralVolumeSource' (by applying it's required fields, if any)
mkV1EphemeralVolumeSource
  :: V1EphemeralVolumeSource
mkV1EphemeralVolumeSource :: V1EphemeralVolumeSource
mkV1EphemeralVolumeSource =
  V1EphemeralVolumeSource
  { $sel:v1EphemeralVolumeSourceVolumeClaimTemplate:V1EphemeralVolumeSource :: Maybe V1PersistentVolumeClaimTemplate
v1EphemeralVolumeSourceVolumeClaimTemplate = Maybe V1PersistentVolumeClaimTemplate
forall a. Maybe a
Nothing
  }

-- ** V1EventSource
-- | V1EventSource
-- EventSource contains information for an event.
data V1EventSource = V1EventSource
  { V1EventSource -> Maybe Text
v1EventSourceComponent :: !(Maybe Text) -- ^ "component" - Component from which the event is generated.
  , V1EventSource -> Maybe Text
v1EventSourceHost :: !(Maybe Text) -- ^ "host" - Node name on which the event is generated.
  } deriving (Int -> V1EventSource -> ShowS
[V1EventSource] -> ShowS
V1EventSource -> String
(Int -> V1EventSource -> ShowS)
-> (V1EventSource -> String)
-> ([V1EventSource] -> ShowS)
-> Show V1EventSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1EventSource -> ShowS
showsPrec :: Int -> V1EventSource -> ShowS
$cshow :: V1EventSource -> String
show :: V1EventSource -> String
$cshowList :: [V1EventSource] -> ShowS
showList :: [V1EventSource] -> ShowS
P.Show, V1EventSource -> V1EventSource -> Bool
(V1EventSource -> V1EventSource -> Bool)
-> (V1EventSource -> V1EventSource -> Bool) -> Eq V1EventSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1EventSource -> V1EventSource -> Bool
== :: V1EventSource -> V1EventSource -> Bool
$c/= :: V1EventSource -> V1EventSource -> Bool
/= :: V1EventSource -> V1EventSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1EventSource
instance A.FromJSON V1EventSource where
  parseJSON :: Value -> Parser V1EventSource
parseJSON = String
-> (Object -> Parser V1EventSource)
-> Value
-> Parser V1EventSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1EventSource" ((Object -> Parser V1EventSource) -> Value -> Parser V1EventSource)
-> (Object -> Parser V1EventSource)
-> Value
-> Parser V1EventSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Maybe Text -> V1EventSource
V1EventSource
      (Maybe Text -> Maybe Text -> V1EventSource)
-> Parser (Maybe Text) -> Parser (Maybe Text -> V1EventSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"component")
      Parser (Maybe Text -> V1EventSource)
-> Parser (Maybe Text) -> Parser V1EventSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"host")

-- | ToJSON V1EventSource
instance A.ToJSON V1EventSource where
  toJSON :: V1EventSource -> Value
toJSON V1EventSource {Maybe Text
$sel:v1EventSourceComponent:V1EventSource :: V1EventSource -> Maybe Text
$sel:v1EventSourceHost:V1EventSource :: V1EventSource -> Maybe Text
v1EventSourceComponent :: Maybe Text
v1EventSourceHost :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"component" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1EventSourceComponent
      , Key
"host" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1EventSourceHost
      ]


-- | Construct a value of type 'V1EventSource' (by applying it's required fields, if any)
mkV1EventSource
  :: V1EventSource
mkV1EventSource :: V1EventSource
mkV1EventSource =
  V1EventSource
  { $sel:v1EventSourceComponent:V1EventSource :: Maybe Text
v1EventSourceComponent = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1EventSourceHost:V1EventSource :: Maybe Text
v1EventSourceHost = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1Eviction
-- | V1Eviction
-- Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod.  A request to cause such an eviction is created by POSTing to .../pods/<pod name>/evictions.
data V1Eviction = V1Eviction
  { V1Eviction -> Maybe Text
v1EvictionApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1Eviction -> Maybe V1DeleteOptions
v1EvictionDeleteOptions :: !(Maybe V1DeleteOptions) -- ^ "deleteOptions"
  , V1Eviction -> Maybe Text
v1EvictionKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1Eviction -> Maybe V1ObjectMeta
v1EvictionMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  } deriving (Int -> V1Eviction -> ShowS
[V1Eviction] -> ShowS
V1Eviction -> String
(Int -> V1Eviction -> ShowS)
-> (V1Eviction -> String)
-> ([V1Eviction] -> ShowS)
-> Show V1Eviction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1Eviction -> ShowS
showsPrec :: Int -> V1Eviction -> ShowS
$cshow :: V1Eviction -> String
show :: V1Eviction -> String
$cshowList :: [V1Eviction] -> ShowS
showList :: [V1Eviction] -> ShowS
P.Show, V1Eviction -> V1Eviction -> Bool
(V1Eviction -> V1Eviction -> Bool)
-> (V1Eviction -> V1Eviction -> Bool) -> Eq V1Eviction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1Eviction -> V1Eviction -> Bool
== :: V1Eviction -> V1Eviction -> Bool
$c/= :: V1Eviction -> V1Eviction -> Bool
/= :: V1Eviction -> V1Eviction -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1Eviction
instance A.FromJSON V1Eviction where
  parseJSON :: Value -> Parser V1Eviction
parseJSON = String
-> (Object -> Parser V1Eviction) -> Value -> Parser V1Eviction
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1Eviction" ((Object -> Parser V1Eviction) -> Value -> Parser V1Eviction)
-> (Object -> Parser V1Eviction) -> Value -> Parser V1Eviction
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe V1DeleteOptions
-> Maybe Text
-> Maybe V1ObjectMeta
-> V1Eviction
V1Eviction
      (Maybe Text
 -> Maybe V1DeleteOptions
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> V1Eviction)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1DeleteOptions
      -> Maybe Text -> Maybe V1ObjectMeta -> V1Eviction)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe V1DeleteOptions
   -> Maybe Text -> Maybe V1ObjectMeta -> V1Eviction)
-> Parser (Maybe V1DeleteOptions)
-> Parser (Maybe Text -> Maybe V1ObjectMeta -> V1Eviction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1DeleteOptions)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"deleteOptions")
      Parser (Maybe Text -> Maybe V1ObjectMeta -> V1Eviction)
-> Parser (Maybe Text) -> Parser (Maybe V1ObjectMeta -> V1Eviction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ObjectMeta -> V1Eviction)
-> Parser (Maybe V1ObjectMeta) -> Parser V1Eviction
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1Eviction
instance A.ToJSON V1Eviction where
  toJSON :: V1Eviction -> Value
toJSON V1Eviction {Maybe Text
Maybe V1ObjectMeta
Maybe V1DeleteOptions
$sel:v1EvictionApiVersion:V1Eviction :: V1Eviction -> Maybe Text
$sel:v1EvictionDeleteOptions:V1Eviction :: V1Eviction -> Maybe V1DeleteOptions
$sel:v1EvictionKind:V1Eviction :: V1Eviction -> Maybe Text
$sel:v1EvictionMetadata:V1Eviction :: V1Eviction -> Maybe V1ObjectMeta
v1EvictionApiVersion :: Maybe Text
v1EvictionDeleteOptions :: Maybe V1DeleteOptions
v1EvictionKind :: Maybe Text
v1EvictionMetadata :: Maybe V1ObjectMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1EvictionApiVersion
      , Key
"deleteOptions" Key -> Maybe V1DeleteOptions -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1DeleteOptions
v1EvictionDeleteOptions
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1EvictionKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1EvictionMetadata
      ]


-- | Construct a value of type 'V1Eviction' (by applying it's required fields, if any)
mkV1Eviction
  :: V1Eviction
mkV1Eviction :: V1Eviction
mkV1Eviction =
  V1Eviction
  { $sel:v1EvictionApiVersion:V1Eviction :: Maybe Text
v1EvictionApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1EvictionDeleteOptions:V1Eviction :: Maybe V1DeleteOptions
v1EvictionDeleteOptions = Maybe V1DeleteOptions
forall a. Maybe a
Nothing
  , $sel:v1EvictionKind:V1Eviction :: Maybe Text
v1EvictionKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1EvictionMetadata:V1Eviction :: Maybe V1ObjectMeta
v1EvictionMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  }

-- ** V1ExecAction
-- | V1ExecAction
-- ExecAction describes a \"run in container\" action.
data V1ExecAction = V1ExecAction
  { V1ExecAction -> Maybe [Text]
v1ExecActionCommand :: !(Maybe [Text]) -- ^ "command" - Command is the command line to execute inside the container, the working directory for the command  is root (&#39;/&#39;) in the container&#39;s filesystem. The command is simply exec&#39;d, it is not run inside a shell, so traditional shell instructions (&#39;|&#39;, etc) won&#39;t work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
  } deriving (Int -> V1ExecAction -> ShowS
[V1ExecAction] -> ShowS
V1ExecAction -> String
(Int -> V1ExecAction -> ShowS)
-> (V1ExecAction -> String)
-> ([V1ExecAction] -> ShowS)
-> Show V1ExecAction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ExecAction -> ShowS
showsPrec :: Int -> V1ExecAction -> ShowS
$cshow :: V1ExecAction -> String
show :: V1ExecAction -> String
$cshowList :: [V1ExecAction] -> ShowS
showList :: [V1ExecAction] -> ShowS
P.Show, V1ExecAction -> V1ExecAction -> Bool
(V1ExecAction -> V1ExecAction -> Bool)
-> (V1ExecAction -> V1ExecAction -> Bool) -> Eq V1ExecAction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ExecAction -> V1ExecAction -> Bool
== :: V1ExecAction -> V1ExecAction -> Bool
$c/= :: V1ExecAction -> V1ExecAction -> Bool
/= :: V1ExecAction -> V1ExecAction -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ExecAction
instance A.FromJSON V1ExecAction where
  parseJSON :: Value -> Parser V1ExecAction
parseJSON = String
-> (Object -> Parser V1ExecAction) -> Value -> Parser V1ExecAction
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ExecAction" ((Object -> Parser V1ExecAction) -> Value -> Parser V1ExecAction)
-> (Object -> Parser V1ExecAction) -> Value -> Parser V1ExecAction
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [Text] -> V1ExecAction
V1ExecAction
      (Maybe [Text] -> V1ExecAction)
-> Parser (Maybe [Text]) -> Parser V1ExecAction
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"command")

-- | ToJSON V1ExecAction
instance A.ToJSON V1ExecAction where
  toJSON :: V1ExecAction -> Value
toJSON V1ExecAction {Maybe [Text]
$sel:v1ExecActionCommand:V1ExecAction :: V1ExecAction -> Maybe [Text]
v1ExecActionCommand :: Maybe [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"command" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1ExecActionCommand
      ]


-- | Construct a value of type 'V1ExecAction' (by applying it's required fields, if any)
mkV1ExecAction
  :: V1ExecAction
mkV1ExecAction :: V1ExecAction
mkV1ExecAction =
  V1ExecAction
  { $sel:v1ExecActionCommand:V1ExecAction :: Maybe [Text]
v1ExecActionCommand = Maybe [Text]
forall a. Maybe a
Nothing
  }

-- ** V1ExemptPriorityLevelConfiguration
-- | V1ExemptPriorityLevelConfiguration
-- ExemptPriorityLevelConfiguration describes the configurable aspects of the handling of exempt requests. In the mandatory exempt configuration object the values in the fields here can be modified by authorized users, unlike the rest of the `spec`.
data V1ExemptPriorityLevelConfiguration = V1ExemptPriorityLevelConfiguration
  { V1ExemptPriorityLevelConfiguration -> Maybe Int
v1ExemptPriorityLevelConfigurationLendablePercent :: !(Maybe Int) -- ^ "lendablePercent" - &#x60;lendablePercent&#x60; prescribes the fraction of the level&#39;s NominalCL that can be borrowed by other priority levels.  This value of this field must be between 0 and 100, inclusive, and it defaults to 0. The number of seats that other levels can borrow from this level, known as this level&#39;s LendableConcurrencyLimit (LendableCL), is defined as follows.  LendableCL(i) &#x3D; round( NominalCL(i) * lendablePercent(i)/100.0 )
  , V1ExemptPriorityLevelConfiguration -> Maybe Int
v1ExemptPriorityLevelConfigurationNominalConcurrencyShares :: !(Maybe Int) -- ^ "nominalConcurrencyShares" - &#x60;nominalConcurrencyShares&#x60; (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level. This is the number of execution seats nominally reserved for this priority level. This DOES NOT limit the dispatching from this priority level but affects the other priority levels through the borrowing mechanism. The server&#39;s concurrency limit (ServerCL) is divided among all the priority levels in proportion to their NCS values:  NominalCL(i)  &#x3D; ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs &#x3D; sum[priority level k] NCS(k)  Bigger numbers mean a larger nominal concurrency limit, at the expense of every other priority level. This field has a default value of zero.
  } deriving (Int -> V1ExemptPriorityLevelConfiguration -> ShowS
[V1ExemptPriorityLevelConfiguration] -> ShowS
V1ExemptPriorityLevelConfiguration -> String
(Int -> V1ExemptPriorityLevelConfiguration -> ShowS)
-> (V1ExemptPriorityLevelConfiguration -> String)
-> ([V1ExemptPriorityLevelConfiguration] -> ShowS)
-> Show V1ExemptPriorityLevelConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ExemptPriorityLevelConfiguration -> ShowS
showsPrec :: Int -> V1ExemptPriorityLevelConfiguration -> ShowS
$cshow :: V1ExemptPriorityLevelConfiguration -> String
show :: V1ExemptPriorityLevelConfiguration -> String
$cshowList :: [V1ExemptPriorityLevelConfiguration] -> ShowS
showList :: [V1ExemptPriorityLevelConfiguration] -> ShowS
P.Show, V1ExemptPriorityLevelConfiguration
-> V1ExemptPriorityLevelConfiguration -> Bool
(V1ExemptPriorityLevelConfiguration
 -> V1ExemptPriorityLevelConfiguration -> Bool)
-> (V1ExemptPriorityLevelConfiguration
    -> V1ExemptPriorityLevelConfiguration -> Bool)
-> Eq V1ExemptPriorityLevelConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ExemptPriorityLevelConfiguration
-> V1ExemptPriorityLevelConfiguration -> Bool
== :: V1ExemptPriorityLevelConfiguration
-> V1ExemptPriorityLevelConfiguration -> Bool
$c/= :: V1ExemptPriorityLevelConfiguration
-> V1ExemptPriorityLevelConfiguration -> Bool
/= :: V1ExemptPriorityLevelConfiguration
-> V1ExemptPriorityLevelConfiguration -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ExemptPriorityLevelConfiguration
instance A.FromJSON V1ExemptPriorityLevelConfiguration where
  parseJSON :: Value -> Parser V1ExemptPriorityLevelConfiguration
parseJSON = String
-> (Object -> Parser V1ExemptPriorityLevelConfiguration)
-> Value
-> Parser V1ExemptPriorityLevelConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ExemptPriorityLevelConfiguration" ((Object -> Parser V1ExemptPriorityLevelConfiguration)
 -> Value -> Parser V1ExemptPriorityLevelConfiguration)
-> (Object -> Parser V1ExemptPriorityLevelConfiguration)
-> Value
-> Parser V1ExemptPriorityLevelConfiguration
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Int -> Maybe Int -> V1ExemptPriorityLevelConfiguration
V1ExemptPriorityLevelConfiguration
      (Maybe Int -> Maybe Int -> V1ExemptPriorityLevelConfiguration)
-> Parser (Maybe Int)
-> Parser (Maybe Int -> V1ExemptPriorityLevelConfiguration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lendablePercent")
      Parser (Maybe Int -> V1ExemptPriorityLevelConfiguration)
-> Parser (Maybe Int) -> Parser V1ExemptPriorityLevelConfiguration
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nominalConcurrencyShares")

-- | ToJSON V1ExemptPriorityLevelConfiguration
instance A.ToJSON V1ExemptPriorityLevelConfiguration where
  toJSON :: V1ExemptPriorityLevelConfiguration -> Value
toJSON V1ExemptPriorityLevelConfiguration {Maybe Int
$sel:v1ExemptPriorityLevelConfigurationLendablePercent:V1ExemptPriorityLevelConfiguration :: V1ExemptPriorityLevelConfiguration -> Maybe Int
$sel:v1ExemptPriorityLevelConfigurationNominalConcurrencyShares:V1ExemptPriorityLevelConfiguration :: V1ExemptPriorityLevelConfiguration -> Maybe Int
v1ExemptPriorityLevelConfigurationLendablePercent :: Maybe Int
v1ExemptPriorityLevelConfigurationNominalConcurrencyShares :: Maybe Int
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"lendablePercent" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1ExemptPriorityLevelConfigurationLendablePercent
      , Key
"nominalConcurrencyShares" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1ExemptPriorityLevelConfigurationNominalConcurrencyShares
      ]


-- | Construct a value of type 'V1ExemptPriorityLevelConfiguration' (by applying it's required fields, if any)
mkV1ExemptPriorityLevelConfiguration
  :: V1ExemptPriorityLevelConfiguration
mkV1ExemptPriorityLevelConfiguration :: V1ExemptPriorityLevelConfiguration
mkV1ExemptPriorityLevelConfiguration =
  V1ExemptPriorityLevelConfiguration
  { $sel:v1ExemptPriorityLevelConfigurationLendablePercent:V1ExemptPriorityLevelConfiguration :: Maybe Int
v1ExemptPriorityLevelConfigurationLendablePercent = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1ExemptPriorityLevelConfigurationNominalConcurrencyShares:V1ExemptPriorityLevelConfiguration :: Maybe Int
v1ExemptPriorityLevelConfigurationNominalConcurrencyShares = Maybe Int
forall a. Maybe a
Nothing
  }

-- ** V1ExpressionWarning
-- | V1ExpressionWarning
-- ExpressionWarning is a warning information that targets a specific expression.
data V1ExpressionWarning = V1ExpressionWarning
  { V1ExpressionWarning -> Text
v1ExpressionWarningFieldRef :: !(Text) -- ^ /Required/ "fieldRef" - The path to the field that refers the expression. For example, the reference to the expression of the first item of validations is \&quot;spec.validations[0].expression\&quot;
  , V1ExpressionWarning -> Text
v1ExpressionWarningWarning :: !(Text) -- ^ /Required/ "warning" - The content of type checking information in a human-readable form. Each line of the warning contains the type that the expression is checked against, followed by the type check error from the compiler.
  } deriving (Int -> V1ExpressionWarning -> ShowS
[V1ExpressionWarning] -> ShowS
V1ExpressionWarning -> String
(Int -> V1ExpressionWarning -> ShowS)
-> (V1ExpressionWarning -> String)
-> ([V1ExpressionWarning] -> ShowS)
-> Show V1ExpressionWarning
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ExpressionWarning -> ShowS
showsPrec :: Int -> V1ExpressionWarning -> ShowS
$cshow :: V1ExpressionWarning -> String
show :: V1ExpressionWarning -> String
$cshowList :: [V1ExpressionWarning] -> ShowS
showList :: [V1ExpressionWarning] -> ShowS
P.Show, V1ExpressionWarning -> V1ExpressionWarning -> Bool
(V1ExpressionWarning -> V1ExpressionWarning -> Bool)
-> (V1ExpressionWarning -> V1ExpressionWarning -> Bool)
-> Eq V1ExpressionWarning
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ExpressionWarning -> V1ExpressionWarning -> Bool
== :: V1ExpressionWarning -> V1ExpressionWarning -> Bool
$c/= :: V1ExpressionWarning -> V1ExpressionWarning -> Bool
/= :: V1ExpressionWarning -> V1ExpressionWarning -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ExpressionWarning
instance A.FromJSON V1ExpressionWarning where
  parseJSON :: Value -> Parser V1ExpressionWarning
parseJSON = String
-> (Object -> Parser V1ExpressionWarning)
-> Value
-> Parser V1ExpressionWarning
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ExpressionWarning" ((Object -> Parser V1ExpressionWarning)
 -> Value -> Parser V1ExpressionWarning)
-> (Object -> Parser V1ExpressionWarning)
-> Value
-> Parser V1ExpressionWarning
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Text -> V1ExpressionWarning
V1ExpressionWarning
      (Text -> Text -> V1ExpressionWarning)
-> Parser Text -> Parser (Text -> V1ExpressionWarning)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"fieldRef")
      Parser (Text -> V1ExpressionWarning)
-> Parser Text -> Parser V1ExpressionWarning
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"warning")

-- | ToJSON V1ExpressionWarning
instance A.ToJSON V1ExpressionWarning where
  toJSON :: V1ExpressionWarning -> Value
toJSON V1ExpressionWarning {Text
$sel:v1ExpressionWarningFieldRef:V1ExpressionWarning :: V1ExpressionWarning -> Text
$sel:v1ExpressionWarningWarning:V1ExpressionWarning :: V1ExpressionWarning -> Text
v1ExpressionWarningFieldRef :: Text
v1ExpressionWarningWarning :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"fieldRef" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ExpressionWarningFieldRef
      , Key
"warning" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ExpressionWarningWarning
      ]


-- | Construct a value of type 'V1ExpressionWarning' (by applying it's required fields, if any)
mkV1ExpressionWarning
  :: Text -- ^ 'v1ExpressionWarningFieldRef': The path to the field that refers the expression. For example, the reference to the expression of the first item of validations is \"spec.validations[0].expression\"
  -> Text -- ^ 'v1ExpressionWarningWarning': The content of type checking information in a human-readable form. Each line of the warning contains the type that the expression is checked against, followed by the type check error from the compiler.
  -> V1ExpressionWarning
mkV1ExpressionWarning :: Text -> Text -> V1ExpressionWarning
mkV1ExpressionWarning Text
v1ExpressionWarningFieldRef Text
v1ExpressionWarningWarning =
  V1ExpressionWarning
  { Text
$sel:v1ExpressionWarningFieldRef:V1ExpressionWarning :: Text
v1ExpressionWarningFieldRef :: Text
v1ExpressionWarningFieldRef
  , Text
$sel:v1ExpressionWarningWarning:V1ExpressionWarning :: Text
v1ExpressionWarningWarning :: Text
v1ExpressionWarningWarning
  }

-- ** V1ExternalDocumentation
-- | V1ExternalDocumentation
-- ExternalDocumentation allows referencing an external resource for extended documentation.
data V1ExternalDocumentation = V1ExternalDocumentation
  { V1ExternalDocumentation -> Maybe Text
v1ExternalDocumentationDescription :: !(Maybe Text) -- ^ "description"
  , V1ExternalDocumentation -> Maybe Text
v1ExternalDocumentationUrl :: !(Maybe Text) -- ^ "url"
  } deriving (Int -> V1ExternalDocumentation -> ShowS
[V1ExternalDocumentation] -> ShowS
V1ExternalDocumentation -> String
(Int -> V1ExternalDocumentation -> ShowS)
-> (V1ExternalDocumentation -> String)
-> ([V1ExternalDocumentation] -> ShowS)
-> Show V1ExternalDocumentation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ExternalDocumentation -> ShowS
showsPrec :: Int -> V1ExternalDocumentation -> ShowS
$cshow :: V1ExternalDocumentation -> String
show :: V1ExternalDocumentation -> String
$cshowList :: [V1ExternalDocumentation] -> ShowS
showList :: [V1ExternalDocumentation] -> ShowS
P.Show, V1ExternalDocumentation -> V1ExternalDocumentation -> Bool
(V1ExternalDocumentation -> V1ExternalDocumentation -> Bool)
-> (V1ExternalDocumentation -> V1ExternalDocumentation -> Bool)
-> Eq V1ExternalDocumentation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ExternalDocumentation -> V1ExternalDocumentation -> Bool
== :: V1ExternalDocumentation -> V1ExternalDocumentation -> Bool
$c/= :: V1ExternalDocumentation -> V1ExternalDocumentation -> Bool
/= :: V1ExternalDocumentation -> V1ExternalDocumentation -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ExternalDocumentation
instance A.FromJSON V1ExternalDocumentation where
  parseJSON :: Value -> Parser V1ExternalDocumentation
parseJSON = String
-> (Object -> Parser V1ExternalDocumentation)
-> Value
-> Parser V1ExternalDocumentation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ExternalDocumentation" ((Object -> Parser V1ExternalDocumentation)
 -> Value -> Parser V1ExternalDocumentation)
-> (Object -> Parser V1ExternalDocumentation)
-> Value
-> Parser V1ExternalDocumentation
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Maybe Text -> V1ExternalDocumentation
V1ExternalDocumentation
      (Maybe Text -> Maybe Text -> V1ExternalDocumentation)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> V1ExternalDocumentation)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"description")
      Parser (Maybe Text -> V1ExternalDocumentation)
-> Parser (Maybe Text) -> Parser V1ExternalDocumentation
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"url")

-- | ToJSON V1ExternalDocumentation
instance A.ToJSON V1ExternalDocumentation where
  toJSON :: V1ExternalDocumentation -> Value
toJSON V1ExternalDocumentation {Maybe Text
$sel:v1ExternalDocumentationDescription:V1ExternalDocumentation :: V1ExternalDocumentation -> Maybe Text
$sel:v1ExternalDocumentationUrl:V1ExternalDocumentation :: V1ExternalDocumentation -> Maybe Text
v1ExternalDocumentationDescription :: Maybe Text
v1ExternalDocumentationUrl :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"description" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ExternalDocumentationDescription
      , Key
"url" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ExternalDocumentationUrl
      ]


-- | Construct a value of type 'V1ExternalDocumentation' (by applying it's required fields, if any)
mkV1ExternalDocumentation
  :: V1ExternalDocumentation
mkV1ExternalDocumentation :: V1ExternalDocumentation
mkV1ExternalDocumentation =
  V1ExternalDocumentation
  { $sel:v1ExternalDocumentationDescription:V1ExternalDocumentation :: Maybe Text
v1ExternalDocumentationDescription = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ExternalDocumentationUrl:V1ExternalDocumentation :: Maybe Text
v1ExternalDocumentationUrl = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1FCVolumeSource
-- | V1FCVolumeSource
-- Represents a Fibre Channel volume. Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling.
data V1FCVolumeSource = V1FCVolumeSource
  { V1FCVolumeSource -> Maybe Text
v1FCVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \&quot;ext4\&quot;, \&quot;xfs\&quot;, \&quot;ntfs\&quot;. Implicitly inferred to be \&quot;ext4\&quot; if unspecified.
  , V1FCVolumeSource -> Maybe Int
v1FCVolumeSourceLun :: !(Maybe Int) -- ^ "lun" - lun is Optional: FC target lun number
  , V1FCVolumeSource -> Maybe Bool
v1FCVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
  , V1FCVolumeSource -> Maybe [Text]
v1FCVolumeSourceTargetWwns :: !(Maybe [Text]) -- ^ "targetWWNs" - targetWWNs is Optional: FC target worldwide names (WWNs)
  , V1FCVolumeSource -> Maybe [Text]
v1FCVolumeSourceWwids :: !(Maybe [Text]) -- ^ "wwids" - wwids Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.
  } deriving (Int -> V1FCVolumeSource -> ShowS
[V1FCVolumeSource] -> ShowS
V1FCVolumeSource -> String
(Int -> V1FCVolumeSource -> ShowS)
-> (V1FCVolumeSource -> String)
-> ([V1FCVolumeSource] -> ShowS)
-> Show V1FCVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1FCVolumeSource -> ShowS
showsPrec :: Int -> V1FCVolumeSource -> ShowS
$cshow :: V1FCVolumeSource -> String
show :: V1FCVolumeSource -> String
$cshowList :: [V1FCVolumeSource] -> ShowS
showList :: [V1FCVolumeSource] -> ShowS
P.Show, V1FCVolumeSource -> V1FCVolumeSource -> Bool
(V1FCVolumeSource -> V1FCVolumeSource -> Bool)
-> (V1FCVolumeSource -> V1FCVolumeSource -> Bool)
-> Eq V1FCVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1FCVolumeSource -> V1FCVolumeSource -> Bool
== :: V1FCVolumeSource -> V1FCVolumeSource -> Bool
$c/= :: V1FCVolumeSource -> V1FCVolumeSource -> Bool
/= :: V1FCVolumeSource -> V1FCVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1FCVolumeSource
instance A.FromJSON V1FCVolumeSource where
  parseJSON :: Value -> Parser V1FCVolumeSource
parseJSON = String
-> (Object -> Parser V1FCVolumeSource)
-> Value
-> Parser V1FCVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1FCVolumeSource" ((Object -> Parser V1FCVolumeSource)
 -> Value -> Parser V1FCVolumeSource)
-> (Object -> Parser V1FCVolumeSource)
-> Value
-> Parser V1FCVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe [Text]
-> Maybe [Text]
-> V1FCVolumeSource
V1FCVolumeSource
      (Maybe Text
 -> Maybe Int
 -> Maybe Bool
 -> Maybe [Text]
 -> Maybe [Text]
 -> V1FCVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Bool -> Maybe [Text] -> Maybe [Text] -> V1FCVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fsType")
      Parser
  (Maybe Int
   -> Maybe Bool -> Maybe [Text] -> Maybe [Text] -> V1FCVolumeSource)
-> Parser (Maybe Int)
-> Parser
     (Maybe Bool -> Maybe [Text] -> Maybe [Text] -> V1FCVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lun")
      Parser
  (Maybe Bool -> Maybe [Text] -> Maybe [Text] -> V1FCVolumeSource)
-> Parser (Maybe Bool)
-> Parser (Maybe [Text] -> Maybe [Text] -> V1FCVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readOnly")
      Parser (Maybe [Text] -> Maybe [Text] -> V1FCVolumeSource)
-> Parser (Maybe [Text])
-> Parser (Maybe [Text] -> V1FCVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"targetWWNs")
      Parser (Maybe [Text] -> V1FCVolumeSource)
-> Parser (Maybe [Text]) -> Parser V1FCVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"wwids")

-- | ToJSON V1FCVolumeSource
instance A.ToJSON V1FCVolumeSource where
  toJSON :: V1FCVolumeSource -> Value
toJSON V1FCVolumeSource {Maybe Bool
Maybe Int
Maybe [Text]
Maybe Text
$sel:v1FCVolumeSourceFsType:V1FCVolumeSource :: V1FCVolumeSource -> Maybe Text
$sel:v1FCVolumeSourceLun:V1FCVolumeSource :: V1FCVolumeSource -> Maybe Int
$sel:v1FCVolumeSourceReadOnly:V1FCVolumeSource :: V1FCVolumeSource -> Maybe Bool
$sel:v1FCVolumeSourceTargetWwns:V1FCVolumeSource :: V1FCVolumeSource -> Maybe [Text]
$sel:v1FCVolumeSourceWwids:V1FCVolumeSource :: V1FCVolumeSource -> Maybe [Text]
v1FCVolumeSourceFsType :: Maybe Text
v1FCVolumeSourceLun :: Maybe Int
v1FCVolumeSourceReadOnly :: Maybe Bool
v1FCVolumeSourceTargetWwns :: Maybe [Text]
v1FCVolumeSourceWwids :: Maybe [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"fsType" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1FCVolumeSourceFsType
      , Key
"lun" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1FCVolumeSourceLun
      , Key
"readOnly" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1FCVolumeSourceReadOnly
      , Key
"targetWWNs" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1FCVolumeSourceTargetWwns
      , Key
"wwids" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1FCVolumeSourceWwids
      ]


-- | Construct a value of type 'V1FCVolumeSource' (by applying it's required fields, if any)
mkV1FCVolumeSource
  :: V1FCVolumeSource
mkV1FCVolumeSource :: V1FCVolumeSource
mkV1FCVolumeSource =
  V1FCVolumeSource
  { $sel:v1FCVolumeSourceFsType:V1FCVolumeSource :: Maybe Text
v1FCVolumeSourceFsType = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1FCVolumeSourceLun:V1FCVolumeSource :: Maybe Int
v1FCVolumeSourceLun = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1FCVolumeSourceReadOnly:V1FCVolumeSource :: Maybe Bool
v1FCVolumeSourceReadOnly = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1FCVolumeSourceTargetWwns:V1FCVolumeSource :: Maybe [Text]
v1FCVolumeSourceTargetWwns = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1FCVolumeSourceWwids:V1FCVolumeSource :: Maybe [Text]
v1FCVolumeSourceWwids = Maybe [Text]
forall a. Maybe a
Nothing
  }

-- ** V1FieldSelectorAttributes
-- | V1FieldSelectorAttributes
-- FieldSelectorAttributes indicates a field limited access. Webhook authors are encouraged to * ensure rawSelector and requirements are not both set * consider the requirements field if set * not try to parse or consider the rawSelector field if set. This is to avoid another CVE-2022-2880 (i.e. getting different systems to agree on how exactly to parse a query is not something we want), see https://www.oxeye.io/resources/golang-parameter-smuggling-attack for more details. For the *SubjectAccessReview endpoints of the kube-apiserver: * If rawSelector is empty and requirements are empty, the request is not limited. * If rawSelector is present and requirements are empty, the rawSelector will be parsed and limited if the parsing succeeds. * If rawSelector is empty and requirements are present, the requirements should be honored * If rawSelector is present and requirements are present, the request is invalid.
data V1FieldSelectorAttributes = V1FieldSelectorAttributes
  { V1FieldSelectorAttributes -> Maybe Text
v1FieldSelectorAttributesRawSelector :: !(Maybe Text) -- ^ "rawSelector" - rawSelector is the serialization of a field selector that would be included in a query parameter. Webhook implementations are encouraged to ignore rawSelector. The kube-apiserver&#39;s *SubjectAccessReview will parse the rawSelector as long as the requirements are not present.
  , V1FieldSelectorAttributes -> Maybe [V1FieldSelectorRequirement]
v1FieldSelectorAttributesRequirements :: !(Maybe [V1FieldSelectorRequirement]) -- ^ "requirements" - requirements is the parsed interpretation of a field selector. All requirements must be met for a resource instance to match the selector. Webhook implementations should handle requirements, but how to handle them is up to the webhook. Since requirements can only limit the request, it is safe to authorize as unlimited request if the requirements are not understood.
  } deriving (Int -> V1FieldSelectorAttributes -> ShowS
[V1FieldSelectorAttributes] -> ShowS
V1FieldSelectorAttributes -> String
(Int -> V1FieldSelectorAttributes -> ShowS)
-> (V1FieldSelectorAttributes -> String)
-> ([V1FieldSelectorAttributes] -> ShowS)
-> Show V1FieldSelectorAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1FieldSelectorAttributes -> ShowS
showsPrec :: Int -> V1FieldSelectorAttributes -> ShowS
$cshow :: V1FieldSelectorAttributes -> String
show :: V1FieldSelectorAttributes -> String
$cshowList :: [V1FieldSelectorAttributes] -> ShowS
showList :: [V1FieldSelectorAttributes] -> ShowS
P.Show, V1FieldSelectorAttributes -> V1FieldSelectorAttributes -> Bool
(V1FieldSelectorAttributes -> V1FieldSelectorAttributes -> Bool)
-> (V1FieldSelectorAttributes -> V1FieldSelectorAttributes -> Bool)
-> Eq V1FieldSelectorAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1FieldSelectorAttributes -> V1FieldSelectorAttributes -> Bool
== :: V1FieldSelectorAttributes -> V1FieldSelectorAttributes -> Bool
$c/= :: V1FieldSelectorAttributes -> V1FieldSelectorAttributes -> Bool
/= :: V1FieldSelectorAttributes -> V1FieldSelectorAttributes -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1FieldSelectorAttributes
instance A.FromJSON V1FieldSelectorAttributes where
  parseJSON :: Value -> Parser V1FieldSelectorAttributes
parseJSON = String
-> (Object -> Parser V1FieldSelectorAttributes)
-> Value
-> Parser V1FieldSelectorAttributes
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1FieldSelectorAttributes" ((Object -> Parser V1FieldSelectorAttributes)
 -> Value -> Parser V1FieldSelectorAttributes)
-> (Object -> Parser V1FieldSelectorAttributes)
-> Value
-> Parser V1FieldSelectorAttributes
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe [V1FieldSelectorRequirement] -> V1FieldSelectorAttributes
V1FieldSelectorAttributes
      (Maybe Text
 -> Maybe [V1FieldSelectorRequirement] -> V1FieldSelectorAttributes)
-> Parser (Maybe Text)
-> Parser
     (Maybe [V1FieldSelectorRequirement] -> V1FieldSelectorAttributes)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"rawSelector")
      Parser
  (Maybe [V1FieldSelectorRequirement] -> V1FieldSelectorAttributes)
-> Parser (Maybe [V1FieldSelectorRequirement])
-> Parser V1FieldSelectorAttributes
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1FieldSelectorRequirement])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"requirements")

-- | ToJSON V1FieldSelectorAttributes
instance A.ToJSON V1FieldSelectorAttributes where
  toJSON :: V1FieldSelectorAttributes -> Value
toJSON V1FieldSelectorAttributes {Maybe [V1FieldSelectorRequirement]
Maybe Text
$sel:v1FieldSelectorAttributesRawSelector:V1FieldSelectorAttributes :: V1FieldSelectorAttributes -> Maybe Text
$sel:v1FieldSelectorAttributesRequirements:V1FieldSelectorAttributes :: V1FieldSelectorAttributes -> Maybe [V1FieldSelectorRequirement]
v1FieldSelectorAttributesRawSelector :: Maybe Text
v1FieldSelectorAttributesRequirements :: Maybe [V1FieldSelectorRequirement]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"rawSelector" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1FieldSelectorAttributesRawSelector
      , Key
"requirements" Key -> Maybe [V1FieldSelectorRequirement] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1FieldSelectorRequirement]
v1FieldSelectorAttributesRequirements
      ]


-- | Construct a value of type 'V1FieldSelectorAttributes' (by applying it's required fields, if any)
mkV1FieldSelectorAttributes
  :: V1FieldSelectorAttributes
mkV1FieldSelectorAttributes :: V1FieldSelectorAttributes
mkV1FieldSelectorAttributes =
  V1FieldSelectorAttributes
  { $sel:v1FieldSelectorAttributesRawSelector:V1FieldSelectorAttributes :: Maybe Text
v1FieldSelectorAttributesRawSelector = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1FieldSelectorAttributesRequirements:V1FieldSelectorAttributes :: Maybe [V1FieldSelectorRequirement]
v1FieldSelectorAttributesRequirements = Maybe [V1FieldSelectorRequirement]
forall a. Maybe a
Nothing
  }

-- ** V1FieldSelectorRequirement
-- | V1FieldSelectorRequirement
-- FieldSelectorRequirement is a selector that contains values, a key, and an operator that relates the key and values.
data V1FieldSelectorRequirement = V1FieldSelectorRequirement
  { V1FieldSelectorRequirement -> Text
v1FieldSelectorRequirementKey :: !(Text) -- ^ /Required/ "key" - key is the field selector key that the requirement applies to.
  , V1FieldSelectorRequirement -> Text
v1FieldSelectorRequirementOperator :: !(Text) -- ^ /Required/ "operator" - operator represents a key&#39;s relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. The list of operators may grow in the future.
  , V1FieldSelectorRequirement -> Maybe [Text]
v1FieldSelectorRequirementValues :: !(Maybe [Text]) -- ^ "values" - values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
  } deriving (Int -> V1FieldSelectorRequirement -> ShowS
[V1FieldSelectorRequirement] -> ShowS
V1FieldSelectorRequirement -> String
(Int -> V1FieldSelectorRequirement -> ShowS)
-> (V1FieldSelectorRequirement -> String)
-> ([V1FieldSelectorRequirement] -> ShowS)
-> Show V1FieldSelectorRequirement
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1FieldSelectorRequirement -> ShowS
showsPrec :: Int -> V1FieldSelectorRequirement -> ShowS
$cshow :: V1FieldSelectorRequirement -> String
show :: V1FieldSelectorRequirement -> String
$cshowList :: [V1FieldSelectorRequirement] -> ShowS
showList :: [V1FieldSelectorRequirement] -> ShowS
P.Show, V1FieldSelectorRequirement -> V1FieldSelectorRequirement -> Bool
(V1FieldSelectorRequirement -> V1FieldSelectorRequirement -> Bool)
-> (V1FieldSelectorRequirement
    -> V1FieldSelectorRequirement -> Bool)
-> Eq V1FieldSelectorRequirement
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1FieldSelectorRequirement -> V1FieldSelectorRequirement -> Bool
== :: V1FieldSelectorRequirement -> V1FieldSelectorRequirement -> Bool
$c/= :: V1FieldSelectorRequirement -> V1FieldSelectorRequirement -> Bool
/= :: V1FieldSelectorRequirement -> V1FieldSelectorRequirement -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1FieldSelectorRequirement
instance A.FromJSON V1FieldSelectorRequirement where
  parseJSON :: Value -> Parser V1FieldSelectorRequirement
parseJSON = String
-> (Object -> Parser V1FieldSelectorRequirement)
-> Value
-> Parser V1FieldSelectorRequirement
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1FieldSelectorRequirement" ((Object -> Parser V1FieldSelectorRequirement)
 -> Value -> Parser V1FieldSelectorRequirement)
-> (Object -> Parser V1FieldSelectorRequirement)
-> Value
-> Parser V1FieldSelectorRequirement
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Text -> Maybe [Text] -> V1FieldSelectorRequirement
V1FieldSelectorRequirement
      (Text -> Text -> Maybe [Text] -> V1FieldSelectorRequirement)
-> Parser Text
-> Parser (Text -> Maybe [Text] -> V1FieldSelectorRequirement)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"key")
      Parser (Text -> Maybe [Text] -> V1FieldSelectorRequirement)
-> Parser Text
-> Parser (Maybe [Text] -> V1FieldSelectorRequirement)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"operator")
      Parser (Maybe [Text] -> V1FieldSelectorRequirement)
-> Parser (Maybe [Text]) -> Parser V1FieldSelectorRequirement
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"values")

-- | ToJSON V1FieldSelectorRequirement
instance A.ToJSON V1FieldSelectorRequirement where
  toJSON :: V1FieldSelectorRequirement -> Value
toJSON V1FieldSelectorRequirement {Maybe [Text]
Text
$sel:v1FieldSelectorRequirementKey:V1FieldSelectorRequirement :: V1FieldSelectorRequirement -> Text
$sel:v1FieldSelectorRequirementOperator:V1FieldSelectorRequirement :: V1FieldSelectorRequirement -> Text
$sel:v1FieldSelectorRequirementValues:V1FieldSelectorRequirement :: V1FieldSelectorRequirement -> Maybe [Text]
v1FieldSelectorRequirementKey :: Text
v1FieldSelectorRequirementOperator :: Text
v1FieldSelectorRequirementValues :: Maybe [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"key" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1FieldSelectorRequirementKey
      , Key
"operator" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1FieldSelectorRequirementOperator
      , Key
"values" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1FieldSelectorRequirementValues
      ]


-- | Construct a value of type 'V1FieldSelectorRequirement' (by applying it's required fields, if any)
mkV1FieldSelectorRequirement
  :: Text -- ^ 'v1FieldSelectorRequirementKey': key is the field selector key that the requirement applies to.
  -> Text -- ^ 'v1FieldSelectorRequirementOperator': operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. The list of operators may grow in the future.
  -> V1FieldSelectorRequirement
mkV1FieldSelectorRequirement :: Text -> Text -> V1FieldSelectorRequirement
mkV1FieldSelectorRequirement Text
v1FieldSelectorRequirementKey Text
v1FieldSelectorRequirementOperator =
  V1FieldSelectorRequirement
  { Text
$sel:v1FieldSelectorRequirementKey:V1FieldSelectorRequirement :: Text
v1FieldSelectorRequirementKey :: Text
v1FieldSelectorRequirementKey
  , Text
$sel:v1FieldSelectorRequirementOperator:V1FieldSelectorRequirement :: Text
v1FieldSelectorRequirementOperator :: Text
v1FieldSelectorRequirementOperator
  , $sel:v1FieldSelectorRequirementValues:V1FieldSelectorRequirement :: Maybe [Text]
v1FieldSelectorRequirementValues = Maybe [Text]
forall a. Maybe a
Nothing
  }

-- ** V1FlexPersistentVolumeSource
-- | V1FlexPersistentVolumeSource
-- FlexPersistentVolumeSource represents a generic persistent volume resource that is provisioned/attached using an exec based plugin.
data V1FlexPersistentVolumeSource = V1FlexPersistentVolumeSource
  { V1FlexPersistentVolumeSource -> Text
v1FlexPersistentVolumeSourceDriver :: !(Text) -- ^ /Required/ "driver" - driver is the name of the driver to use for this volume.
  , V1FlexPersistentVolumeSource -> Maybe Text
v1FlexPersistentVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - fsType is the Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \&quot;ext4\&quot;, \&quot;xfs\&quot;, \&quot;ntfs\&quot;. The default filesystem depends on FlexVolume script.
  , V1FlexPersistentVolumeSource -> Maybe (Map String Text)
v1FlexPersistentVolumeSourceOptions :: !(Maybe (Map.Map String Text)) -- ^ "options" - options is Optional: this field holds extra command options if any.
  , V1FlexPersistentVolumeSource -> Maybe Bool
v1FlexPersistentVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - readOnly is Optional: defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
  , V1FlexPersistentVolumeSource -> Maybe V1SecretReference
v1FlexPersistentVolumeSourceSecretRef :: !(Maybe V1SecretReference) -- ^ "secretRef"
  } deriving (Int -> V1FlexPersistentVolumeSource -> ShowS
[V1FlexPersistentVolumeSource] -> ShowS
V1FlexPersistentVolumeSource -> String
(Int -> V1FlexPersistentVolumeSource -> ShowS)
-> (V1FlexPersistentVolumeSource -> String)
-> ([V1FlexPersistentVolumeSource] -> ShowS)
-> Show V1FlexPersistentVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1FlexPersistentVolumeSource -> ShowS
showsPrec :: Int -> V1FlexPersistentVolumeSource -> ShowS
$cshow :: V1FlexPersistentVolumeSource -> String
show :: V1FlexPersistentVolumeSource -> String
$cshowList :: [V1FlexPersistentVolumeSource] -> ShowS
showList :: [V1FlexPersistentVolumeSource] -> ShowS
P.Show, V1FlexPersistentVolumeSource
-> V1FlexPersistentVolumeSource -> Bool
(V1FlexPersistentVolumeSource
 -> V1FlexPersistentVolumeSource -> Bool)
-> (V1FlexPersistentVolumeSource
    -> V1FlexPersistentVolumeSource -> Bool)
-> Eq V1FlexPersistentVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1FlexPersistentVolumeSource
-> V1FlexPersistentVolumeSource -> Bool
== :: V1FlexPersistentVolumeSource
-> V1FlexPersistentVolumeSource -> Bool
$c/= :: V1FlexPersistentVolumeSource
-> V1FlexPersistentVolumeSource -> Bool
/= :: V1FlexPersistentVolumeSource
-> V1FlexPersistentVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1FlexPersistentVolumeSource
instance A.FromJSON V1FlexPersistentVolumeSource where
  parseJSON :: Value -> Parser V1FlexPersistentVolumeSource
parseJSON = String
-> (Object -> Parser V1FlexPersistentVolumeSource)
-> Value
-> Parser V1FlexPersistentVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1FlexPersistentVolumeSource" ((Object -> Parser V1FlexPersistentVolumeSource)
 -> Value -> Parser V1FlexPersistentVolumeSource)
-> (Object -> Parser V1FlexPersistentVolumeSource)
-> Value
-> Parser V1FlexPersistentVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text
-> Maybe Text
-> Maybe (Map String Text)
-> Maybe Bool
-> Maybe V1SecretReference
-> V1FlexPersistentVolumeSource
V1FlexPersistentVolumeSource
      (Text
 -> Maybe Text
 -> Maybe (Map String Text)
 -> Maybe Bool
 -> Maybe V1SecretReference
 -> V1FlexPersistentVolumeSource)
-> Parser Text
-> Parser
     (Maybe Text
      -> Maybe (Map String Text)
      -> Maybe Bool
      -> Maybe V1SecretReference
      -> V1FlexPersistentVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"driver")
      Parser
  (Maybe Text
   -> Maybe (Map String Text)
   -> Maybe Bool
   -> Maybe V1SecretReference
   -> V1FlexPersistentVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Maybe (Map String Text)
      -> Maybe Bool
      -> Maybe V1SecretReference
      -> V1FlexPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fsType")
      Parser
  (Maybe (Map String Text)
   -> Maybe Bool
   -> Maybe V1SecretReference
   -> V1FlexPersistentVolumeSource)
-> Parser (Maybe (Map String Text))
-> Parser
     (Maybe Bool
      -> Maybe V1SecretReference -> V1FlexPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String Text))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"options")
      Parser
  (Maybe Bool
   -> Maybe V1SecretReference -> V1FlexPersistentVolumeSource)
-> Parser (Maybe Bool)
-> Parser (Maybe V1SecretReference -> V1FlexPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readOnly")
      Parser (Maybe V1SecretReference -> V1FlexPersistentVolumeSource)
-> Parser (Maybe V1SecretReference)
-> Parser V1FlexPersistentVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1SecretReference)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"secretRef")

-- | ToJSON V1FlexPersistentVolumeSource
instance A.ToJSON V1FlexPersistentVolumeSource where
  toJSON :: V1FlexPersistentVolumeSource -> Value
toJSON V1FlexPersistentVolumeSource {Maybe Bool
Maybe (Map String Text)
Maybe Text
Maybe V1SecretReference
Text
$sel:v1FlexPersistentVolumeSourceDriver:V1FlexPersistentVolumeSource :: V1FlexPersistentVolumeSource -> Text
$sel:v1FlexPersistentVolumeSourceFsType:V1FlexPersistentVolumeSource :: V1FlexPersistentVolumeSource -> Maybe Text
$sel:v1FlexPersistentVolumeSourceOptions:V1FlexPersistentVolumeSource :: V1FlexPersistentVolumeSource -> Maybe (Map String Text)
$sel:v1FlexPersistentVolumeSourceReadOnly:V1FlexPersistentVolumeSource :: V1FlexPersistentVolumeSource -> Maybe Bool
$sel:v1FlexPersistentVolumeSourceSecretRef:V1FlexPersistentVolumeSource :: V1FlexPersistentVolumeSource -> Maybe V1SecretReference
v1FlexPersistentVolumeSourceDriver :: Text
v1FlexPersistentVolumeSourceFsType :: Maybe Text
v1FlexPersistentVolumeSourceOptions :: Maybe (Map String Text)
v1FlexPersistentVolumeSourceReadOnly :: Maybe Bool
v1FlexPersistentVolumeSourceSecretRef :: Maybe V1SecretReference
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"driver" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1FlexPersistentVolumeSourceDriver
      , Key
"fsType" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1FlexPersistentVolumeSourceFsType
      , Key
"options" Key -> Maybe (Map String Text) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Text)
v1FlexPersistentVolumeSourceOptions
      , Key
"readOnly" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1FlexPersistentVolumeSourceReadOnly
      , Key
"secretRef" Key -> Maybe V1SecretReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1SecretReference
v1FlexPersistentVolumeSourceSecretRef
      ]


-- | Construct a value of type 'V1FlexPersistentVolumeSource' (by applying it's required fields, if any)
mkV1FlexPersistentVolumeSource
  :: Text -- ^ 'v1FlexPersistentVolumeSourceDriver': driver is the name of the driver to use for this volume.
  -> V1FlexPersistentVolumeSource
mkV1FlexPersistentVolumeSource :: Text -> V1FlexPersistentVolumeSource
mkV1FlexPersistentVolumeSource Text
v1FlexPersistentVolumeSourceDriver =
  V1FlexPersistentVolumeSource
  { Text
$sel:v1FlexPersistentVolumeSourceDriver:V1FlexPersistentVolumeSource :: Text
v1FlexPersistentVolumeSourceDriver :: Text
v1FlexPersistentVolumeSourceDriver
  , $sel:v1FlexPersistentVolumeSourceFsType:V1FlexPersistentVolumeSource :: Maybe Text
v1FlexPersistentVolumeSourceFsType = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1FlexPersistentVolumeSourceOptions:V1FlexPersistentVolumeSource :: Maybe (Map String Text)
v1FlexPersistentVolumeSourceOptions = Maybe (Map String Text)
forall a. Maybe a
Nothing
  , $sel:v1FlexPersistentVolumeSourceReadOnly:V1FlexPersistentVolumeSource :: Maybe Bool
v1FlexPersistentVolumeSourceReadOnly = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1FlexPersistentVolumeSourceSecretRef:V1FlexPersistentVolumeSource :: Maybe V1SecretReference
v1FlexPersistentVolumeSourceSecretRef = Maybe V1SecretReference
forall a. Maybe a
Nothing
  }

-- ** V1FlexVolumeSource
-- | V1FlexVolumeSource
-- FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.
data V1FlexVolumeSource = V1FlexVolumeSource
  { V1FlexVolumeSource -> Text
v1FlexVolumeSourceDriver :: !(Text) -- ^ /Required/ "driver" - driver is the name of the driver to use for this volume.
  , V1FlexVolumeSource -> Maybe Text
v1FlexVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \&quot;ext4\&quot;, \&quot;xfs\&quot;, \&quot;ntfs\&quot;. The default filesystem depends on FlexVolume script.
  , V1FlexVolumeSource -> Maybe (Map String Text)
v1FlexVolumeSourceOptions :: !(Maybe (Map.Map String Text)) -- ^ "options" - options is Optional: this field holds extra command options if any.
  , V1FlexVolumeSource -> Maybe Bool
v1FlexVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - readOnly is Optional: defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
  , V1FlexVolumeSource -> Maybe V1LocalObjectReference
v1FlexVolumeSourceSecretRef :: !(Maybe V1LocalObjectReference) -- ^ "secretRef"
  } deriving (Int -> V1FlexVolumeSource -> ShowS
[V1FlexVolumeSource] -> ShowS
V1FlexVolumeSource -> String
(Int -> V1FlexVolumeSource -> ShowS)
-> (V1FlexVolumeSource -> String)
-> ([V1FlexVolumeSource] -> ShowS)
-> Show V1FlexVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1FlexVolumeSource -> ShowS
showsPrec :: Int -> V1FlexVolumeSource -> ShowS
$cshow :: V1FlexVolumeSource -> String
show :: V1FlexVolumeSource -> String
$cshowList :: [V1FlexVolumeSource] -> ShowS
showList :: [V1FlexVolumeSource] -> ShowS
P.Show, V1FlexVolumeSource -> V1FlexVolumeSource -> Bool
(V1FlexVolumeSource -> V1FlexVolumeSource -> Bool)
-> (V1FlexVolumeSource -> V1FlexVolumeSource -> Bool)
-> Eq V1FlexVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1FlexVolumeSource -> V1FlexVolumeSource -> Bool
== :: V1FlexVolumeSource -> V1FlexVolumeSource -> Bool
$c/= :: V1FlexVolumeSource -> V1FlexVolumeSource -> Bool
/= :: V1FlexVolumeSource -> V1FlexVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1FlexVolumeSource
instance A.FromJSON V1FlexVolumeSource where
  parseJSON :: Value -> Parser V1FlexVolumeSource
parseJSON = String
-> (Object -> Parser V1FlexVolumeSource)
-> Value
-> Parser V1FlexVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1FlexVolumeSource" ((Object -> Parser V1FlexVolumeSource)
 -> Value -> Parser V1FlexVolumeSource)
-> (Object -> Parser V1FlexVolumeSource)
-> Value
-> Parser V1FlexVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text
-> Maybe Text
-> Maybe (Map String Text)
-> Maybe Bool
-> Maybe V1LocalObjectReference
-> V1FlexVolumeSource
V1FlexVolumeSource
      (Text
 -> Maybe Text
 -> Maybe (Map String Text)
 -> Maybe Bool
 -> Maybe V1LocalObjectReference
 -> V1FlexVolumeSource)
-> Parser Text
-> Parser
     (Maybe Text
      -> Maybe (Map String Text)
      -> Maybe Bool
      -> Maybe V1LocalObjectReference
      -> V1FlexVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"driver")
      Parser
  (Maybe Text
   -> Maybe (Map String Text)
   -> Maybe Bool
   -> Maybe V1LocalObjectReference
   -> V1FlexVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Maybe (Map String Text)
      -> Maybe Bool
      -> Maybe V1LocalObjectReference
      -> V1FlexVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fsType")
      Parser
  (Maybe (Map String Text)
   -> Maybe Bool
   -> Maybe V1LocalObjectReference
   -> V1FlexVolumeSource)
-> Parser (Maybe (Map String Text))
-> Parser
     (Maybe Bool -> Maybe V1LocalObjectReference -> V1FlexVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String Text))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"options")
      Parser
  (Maybe Bool -> Maybe V1LocalObjectReference -> V1FlexVolumeSource)
-> Parser (Maybe Bool)
-> Parser (Maybe V1LocalObjectReference -> V1FlexVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readOnly")
      Parser (Maybe V1LocalObjectReference -> V1FlexVolumeSource)
-> Parser (Maybe V1LocalObjectReference)
-> Parser V1FlexVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LocalObjectReference)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"secretRef")

-- | ToJSON V1FlexVolumeSource
instance A.ToJSON V1FlexVolumeSource where
  toJSON :: V1FlexVolumeSource -> Value
toJSON V1FlexVolumeSource {Maybe Bool
Maybe (Map String Text)
Maybe Text
Maybe V1LocalObjectReference
Text
$sel:v1FlexVolumeSourceDriver:V1FlexVolumeSource :: V1FlexVolumeSource -> Text
$sel:v1FlexVolumeSourceFsType:V1FlexVolumeSource :: V1FlexVolumeSource -> Maybe Text
$sel:v1FlexVolumeSourceOptions:V1FlexVolumeSource :: V1FlexVolumeSource -> Maybe (Map String Text)
$sel:v1FlexVolumeSourceReadOnly:V1FlexVolumeSource :: V1FlexVolumeSource -> Maybe Bool
$sel:v1FlexVolumeSourceSecretRef:V1FlexVolumeSource :: V1FlexVolumeSource -> Maybe V1LocalObjectReference
v1FlexVolumeSourceDriver :: Text
v1FlexVolumeSourceFsType :: Maybe Text
v1FlexVolumeSourceOptions :: Maybe (Map String Text)
v1FlexVolumeSourceReadOnly :: Maybe Bool
v1FlexVolumeSourceSecretRef :: Maybe V1LocalObjectReference
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"driver" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1FlexVolumeSourceDriver
      , Key
"fsType" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1FlexVolumeSourceFsType
      , Key
"options" Key -> Maybe (Map String Text) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Text)
v1FlexVolumeSourceOptions
      , Key
"readOnly" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1FlexVolumeSourceReadOnly
      , Key
"secretRef" Key -> Maybe V1LocalObjectReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LocalObjectReference
v1FlexVolumeSourceSecretRef
      ]


-- | Construct a value of type 'V1FlexVolumeSource' (by applying it's required fields, if any)
mkV1FlexVolumeSource
  :: Text -- ^ 'v1FlexVolumeSourceDriver': driver is the name of the driver to use for this volume.
  -> V1FlexVolumeSource
mkV1FlexVolumeSource :: Text -> V1FlexVolumeSource
mkV1FlexVolumeSource Text
v1FlexVolumeSourceDriver =
  V1FlexVolumeSource
  { Text
$sel:v1FlexVolumeSourceDriver:V1FlexVolumeSource :: Text
v1FlexVolumeSourceDriver :: Text
v1FlexVolumeSourceDriver
  , $sel:v1FlexVolumeSourceFsType:V1FlexVolumeSource :: Maybe Text
v1FlexVolumeSourceFsType = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1FlexVolumeSourceOptions:V1FlexVolumeSource :: Maybe (Map String Text)
v1FlexVolumeSourceOptions = Maybe (Map String Text)
forall a. Maybe a
Nothing
  , $sel:v1FlexVolumeSourceReadOnly:V1FlexVolumeSource :: Maybe Bool
v1FlexVolumeSourceReadOnly = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1FlexVolumeSourceSecretRef:V1FlexVolumeSource :: Maybe V1LocalObjectReference
v1FlexVolumeSourceSecretRef = Maybe V1LocalObjectReference
forall a. Maybe a
Nothing
  }

-- ** V1FlockerVolumeSource
-- | V1FlockerVolumeSource
-- Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling.
data V1FlockerVolumeSource = V1FlockerVolumeSource
  { V1FlockerVolumeSource -> Maybe Text
v1FlockerVolumeSourceDatasetName :: !(Maybe Text) -- ^ "datasetName" - datasetName is Name of the dataset stored as metadata -&gt; name on the dataset for Flocker should be considered as deprecated
  , V1FlockerVolumeSource -> Maybe Text
v1FlockerVolumeSourceDatasetUuid :: !(Maybe Text) -- ^ "datasetUUID" - datasetUUID is the UUID of the dataset. This is unique identifier of a Flocker dataset
  } deriving (Int -> V1FlockerVolumeSource -> ShowS
[V1FlockerVolumeSource] -> ShowS
V1FlockerVolumeSource -> String
(Int -> V1FlockerVolumeSource -> ShowS)
-> (V1FlockerVolumeSource -> String)
-> ([V1FlockerVolumeSource] -> ShowS)
-> Show V1FlockerVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1FlockerVolumeSource -> ShowS
showsPrec :: Int -> V1FlockerVolumeSource -> ShowS
$cshow :: V1FlockerVolumeSource -> String
show :: V1FlockerVolumeSource -> String
$cshowList :: [V1FlockerVolumeSource] -> ShowS
showList :: [V1FlockerVolumeSource] -> ShowS
P.Show, V1FlockerVolumeSource -> V1FlockerVolumeSource -> Bool
(V1FlockerVolumeSource -> V1FlockerVolumeSource -> Bool)
-> (V1FlockerVolumeSource -> V1FlockerVolumeSource -> Bool)
-> Eq V1FlockerVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1FlockerVolumeSource -> V1FlockerVolumeSource -> Bool
== :: V1FlockerVolumeSource -> V1FlockerVolumeSource -> Bool
$c/= :: V1FlockerVolumeSource -> V1FlockerVolumeSource -> Bool
/= :: V1FlockerVolumeSource -> V1FlockerVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1FlockerVolumeSource
instance A.FromJSON V1FlockerVolumeSource where
  parseJSON :: Value -> Parser V1FlockerVolumeSource
parseJSON = String
-> (Object -> Parser V1FlockerVolumeSource)
-> Value
-> Parser V1FlockerVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1FlockerVolumeSource" ((Object -> Parser V1FlockerVolumeSource)
 -> Value -> Parser V1FlockerVolumeSource)
-> (Object -> Parser V1FlockerVolumeSource)
-> Value
-> Parser V1FlockerVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Maybe Text -> V1FlockerVolumeSource
V1FlockerVolumeSource
      (Maybe Text -> Maybe Text -> V1FlockerVolumeSource)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> V1FlockerVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"datasetName")
      Parser (Maybe Text -> V1FlockerVolumeSource)
-> Parser (Maybe Text) -> Parser V1FlockerVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"datasetUUID")

-- | ToJSON V1FlockerVolumeSource
instance A.ToJSON V1FlockerVolumeSource where
  toJSON :: V1FlockerVolumeSource -> Value
toJSON V1FlockerVolumeSource {Maybe Text
$sel:v1FlockerVolumeSourceDatasetName:V1FlockerVolumeSource :: V1FlockerVolumeSource -> Maybe Text
$sel:v1FlockerVolumeSourceDatasetUuid:V1FlockerVolumeSource :: V1FlockerVolumeSource -> Maybe Text
v1FlockerVolumeSourceDatasetName :: Maybe Text
v1FlockerVolumeSourceDatasetUuid :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"datasetName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1FlockerVolumeSourceDatasetName
      , Key
"datasetUUID" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1FlockerVolumeSourceDatasetUuid
      ]


-- | Construct a value of type 'V1FlockerVolumeSource' (by applying it's required fields, if any)
mkV1FlockerVolumeSource
  :: V1FlockerVolumeSource
mkV1FlockerVolumeSource :: V1FlockerVolumeSource
mkV1FlockerVolumeSource =
  V1FlockerVolumeSource
  { $sel:v1FlockerVolumeSourceDatasetName:V1FlockerVolumeSource :: Maybe Text
v1FlockerVolumeSourceDatasetName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1FlockerVolumeSourceDatasetUuid:V1FlockerVolumeSource :: Maybe Text
v1FlockerVolumeSourceDatasetUuid = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1FlowDistinguisherMethod
-- | V1FlowDistinguisherMethod
-- FlowDistinguisherMethod specifies the method of a flow distinguisher.
data V1FlowDistinguisherMethod = V1FlowDistinguisherMethod
  { V1FlowDistinguisherMethod -> Text
v1FlowDistinguisherMethodType :: !(Text) -- ^ /Required/ "type" - &#x60;type&#x60; is the type of flow distinguisher method The supported types are \&quot;ByUser\&quot; and \&quot;ByNamespace\&quot;. Required.
  } deriving (Int -> V1FlowDistinguisherMethod -> ShowS
[V1FlowDistinguisherMethod] -> ShowS
V1FlowDistinguisherMethod -> String
(Int -> V1FlowDistinguisherMethod -> ShowS)
-> (V1FlowDistinguisherMethod -> String)
-> ([V1FlowDistinguisherMethod] -> ShowS)
-> Show V1FlowDistinguisherMethod
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1FlowDistinguisherMethod -> ShowS
showsPrec :: Int -> V1FlowDistinguisherMethod -> ShowS
$cshow :: V1FlowDistinguisherMethod -> String
show :: V1FlowDistinguisherMethod -> String
$cshowList :: [V1FlowDistinguisherMethod] -> ShowS
showList :: [V1FlowDistinguisherMethod] -> ShowS
P.Show, V1FlowDistinguisherMethod -> V1FlowDistinguisherMethod -> Bool
(V1FlowDistinguisherMethod -> V1FlowDistinguisherMethod -> Bool)
-> (V1FlowDistinguisherMethod -> V1FlowDistinguisherMethod -> Bool)
-> Eq V1FlowDistinguisherMethod
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1FlowDistinguisherMethod -> V1FlowDistinguisherMethod -> Bool
== :: V1FlowDistinguisherMethod -> V1FlowDistinguisherMethod -> Bool
$c/= :: V1FlowDistinguisherMethod -> V1FlowDistinguisherMethod -> Bool
/= :: V1FlowDistinguisherMethod -> V1FlowDistinguisherMethod -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1FlowDistinguisherMethod
instance A.FromJSON V1FlowDistinguisherMethod where
  parseJSON :: Value -> Parser V1FlowDistinguisherMethod
parseJSON = String
-> (Object -> Parser V1FlowDistinguisherMethod)
-> Value
-> Parser V1FlowDistinguisherMethod
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1FlowDistinguisherMethod" ((Object -> Parser V1FlowDistinguisherMethod)
 -> Value -> Parser V1FlowDistinguisherMethod)
-> (Object -> Parser V1FlowDistinguisherMethod)
-> Value
-> Parser V1FlowDistinguisherMethod
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> V1FlowDistinguisherMethod
V1FlowDistinguisherMethod
      (Text -> V1FlowDistinguisherMethod)
-> Parser Text -> Parser V1FlowDistinguisherMethod
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"type")

-- | ToJSON V1FlowDistinguisherMethod
instance A.ToJSON V1FlowDistinguisherMethod where
  toJSON :: V1FlowDistinguisherMethod -> Value
toJSON V1FlowDistinguisherMethod {Text
$sel:v1FlowDistinguisherMethodType:V1FlowDistinguisherMethod :: V1FlowDistinguisherMethod -> Text
v1FlowDistinguisherMethodType :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1FlowDistinguisherMethodType
      ]


-- | Construct a value of type 'V1FlowDistinguisherMethod' (by applying it's required fields, if any)
mkV1FlowDistinguisherMethod
  :: Text -- ^ 'v1FlowDistinguisherMethodType': `type` is the type of flow distinguisher method The supported types are \"ByUser\" and \"ByNamespace\". Required.
  -> V1FlowDistinguisherMethod
mkV1FlowDistinguisherMethod :: Text -> V1FlowDistinguisherMethod
mkV1FlowDistinguisherMethod Text
v1FlowDistinguisherMethodType =
  V1FlowDistinguisherMethod
  { Text
$sel:v1FlowDistinguisherMethodType:V1FlowDistinguisherMethod :: Text
v1FlowDistinguisherMethodType :: Text
v1FlowDistinguisherMethodType
  }

-- ** V1FlowSchema
-- | V1FlowSchema
-- FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of inbound API requests with similar attributes and is identified by a pair of strings: the name of the FlowSchema and a \"flow distinguisher\".
data V1FlowSchema = V1FlowSchema
  { V1FlowSchema -> Maybe Text
v1FlowSchemaApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1FlowSchema -> Maybe Text
v1FlowSchemaKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1FlowSchema -> Maybe V1ObjectMeta
v1FlowSchemaMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1FlowSchema -> Maybe V1FlowSchemaSpec
v1FlowSchemaSpec :: !(Maybe V1FlowSchemaSpec) -- ^ "spec"
  , V1FlowSchema -> Maybe V1FlowSchemaStatus
v1FlowSchemaStatus :: !(Maybe V1FlowSchemaStatus) -- ^ "status"
  } deriving (Int -> V1FlowSchema -> ShowS
[V1FlowSchema] -> ShowS
V1FlowSchema -> String
(Int -> V1FlowSchema -> ShowS)
-> (V1FlowSchema -> String)
-> ([V1FlowSchema] -> ShowS)
-> Show V1FlowSchema
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1FlowSchema -> ShowS
showsPrec :: Int -> V1FlowSchema -> ShowS
$cshow :: V1FlowSchema -> String
show :: V1FlowSchema -> String
$cshowList :: [V1FlowSchema] -> ShowS
showList :: [V1FlowSchema] -> ShowS
P.Show, V1FlowSchema -> V1FlowSchema -> Bool
(V1FlowSchema -> V1FlowSchema -> Bool)
-> (V1FlowSchema -> V1FlowSchema -> Bool) -> Eq V1FlowSchema
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1FlowSchema -> V1FlowSchema -> Bool
== :: V1FlowSchema -> V1FlowSchema -> Bool
$c/= :: V1FlowSchema -> V1FlowSchema -> Bool
/= :: V1FlowSchema -> V1FlowSchema -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1FlowSchema
instance A.FromJSON V1FlowSchema where
  parseJSON :: Value -> Parser V1FlowSchema
parseJSON = String
-> (Object -> Parser V1FlowSchema) -> Value -> Parser V1FlowSchema
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1FlowSchema" ((Object -> Parser V1FlowSchema) -> Value -> Parser V1FlowSchema)
-> (Object -> Parser V1FlowSchema) -> Value -> Parser V1FlowSchema
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1FlowSchemaSpec
-> Maybe V1FlowSchemaStatus
-> V1FlowSchema
V1FlowSchema
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1FlowSchemaSpec
 -> Maybe V1FlowSchemaStatus
 -> V1FlowSchema)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1FlowSchemaSpec
      -> Maybe V1FlowSchemaStatus
      -> V1FlowSchema)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1FlowSchemaSpec
   -> Maybe V1FlowSchemaStatus
   -> V1FlowSchema)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1FlowSchemaSpec
      -> Maybe V1FlowSchemaStatus
      -> V1FlowSchema)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1FlowSchemaSpec
   -> Maybe V1FlowSchemaStatus
   -> V1FlowSchema)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe V1FlowSchemaSpec
      -> Maybe V1FlowSchemaStatus -> V1FlowSchema)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (Maybe V1FlowSchemaSpec
   -> Maybe V1FlowSchemaStatus -> V1FlowSchema)
-> Parser (Maybe V1FlowSchemaSpec)
-> Parser (Maybe V1FlowSchemaStatus -> V1FlowSchema)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1FlowSchemaSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")
      Parser (Maybe V1FlowSchemaStatus -> V1FlowSchema)
-> Parser (Maybe V1FlowSchemaStatus) -> Parser V1FlowSchema
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1FlowSchemaStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1FlowSchema
instance A.ToJSON V1FlowSchema where
  toJSON :: V1FlowSchema -> Value
toJSON V1FlowSchema {Maybe Text
Maybe V1ObjectMeta
Maybe V1FlowSchemaStatus
Maybe V1FlowSchemaSpec
$sel:v1FlowSchemaApiVersion:V1FlowSchema :: V1FlowSchema -> Maybe Text
$sel:v1FlowSchemaKind:V1FlowSchema :: V1FlowSchema -> Maybe Text
$sel:v1FlowSchemaMetadata:V1FlowSchema :: V1FlowSchema -> Maybe V1ObjectMeta
$sel:v1FlowSchemaSpec:V1FlowSchema :: V1FlowSchema -> Maybe V1FlowSchemaSpec
$sel:v1FlowSchemaStatus:V1FlowSchema :: V1FlowSchema -> Maybe V1FlowSchemaStatus
v1FlowSchemaApiVersion :: Maybe Text
v1FlowSchemaKind :: Maybe Text
v1FlowSchemaMetadata :: Maybe V1ObjectMeta
v1FlowSchemaSpec :: Maybe V1FlowSchemaSpec
v1FlowSchemaStatus :: Maybe V1FlowSchemaStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1FlowSchemaApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1FlowSchemaKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1FlowSchemaMetadata
      , Key
"spec" Key -> Maybe V1FlowSchemaSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1FlowSchemaSpec
v1FlowSchemaSpec
      , Key
"status" Key -> Maybe V1FlowSchemaStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1FlowSchemaStatus
v1FlowSchemaStatus
      ]


-- | Construct a value of type 'V1FlowSchema' (by applying it's required fields, if any)
mkV1FlowSchema
  :: V1FlowSchema
mkV1FlowSchema :: V1FlowSchema
mkV1FlowSchema =
  V1FlowSchema
  { $sel:v1FlowSchemaApiVersion:V1FlowSchema :: Maybe Text
v1FlowSchemaApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1FlowSchemaKind:V1FlowSchema :: Maybe Text
v1FlowSchemaKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1FlowSchemaMetadata:V1FlowSchema :: Maybe V1ObjectMeta
v1FlowSchemaMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1FlowSchemaSpec:V1FlowSchema :: Maybe V1FlowSchemaSpec
v1FlowSchemaSpec = Maybe V1FlowSchemaSpec
forall a. Maybe a
Nothing
  , $sel:v1FlowSchemaStatus:V1FlowSchema :: Maybe V1FlowSchemaStatus
v1FlowSchemaStatus = Maybe V1FlowSchemaStatus
forall a. Maybe a
Nothing
  }

-- ** V1FlowSchemaCondition
-- | V1FlowSchemaCondition
-- FlowSchemaCondition describes conditions for a FlowSchema.
data V1FlowSchemaCondition = V1FlowSchemaCondition
  { V1FlowSchemaCondition -> Maybe DateTime
v1FlowSchemaConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - &#x60;lastTransitionTime&#x60; is the last time the condition transitioned from one status to another.
  , V1FlowSchemaCondition -> Maybe Text
v1FlowSchemaConditionMessage :: !(Maybe Text) -- ^ "message" - &#x60;message&#x60; is a human-readable message indicating details about last transition.
  , V1FlowSchemaCondition -> Maybe Text
v1FlowSchemaConditionReason :: !(Maybe Text) -- ^ "reason" - &#x60;reason&#x60; is a unique, one-word, CamelCase reason for the condition&#39;s last transition.
  , V1FlowSchemaCondition -> Maybe Text
v1FlowSchemaConditionStatus :: !(Maybe Text) -- ^ "status" - &#x60;status&#x60; is the status of the condition. Can be True, False, Unknown. Required.
  , V1FlowSchemaCondition -> Maybe Text
v1FlowSchemaConditionType :: !(Maybe Text) -- ^ "type" - &#x60;type&#x60; is the type of the condition. Required.
  } deriving (Int -> V1FlowSchemaCondition -> ShowS
[V1FlowSchemaCondition] -> ShowS
V1FlowSchemaCondition -> String
(Int -> V1FlowSchemaCondition -> ShowS)
-> (V1FlowSchemaCondition -> String)
-> ([V1FlowSchemaCondition] -> ShowS)
-> Show V1FlowSchemaCondition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1FlowSchemaCondition -> ShowS
showsPrec :: Int -> V1FlowSchemaCondition -> ShowS
$cshow :: V1FlowSchemaCondition -> String
show :: V1FlowSchemaCondition -> String
$cshowList :: [V1FlowSchemaCondition] -> ShowS
showList :: [V1FlowSchemaCondition] -> ShowS
P.Show, V1FlowSchemaCondition -> V1FlowSchemaCondition -> Bool
(V1FlowSchemaCondition -> V1FlowSchemaCondition -> Bool)
-> (V1FlowSchemaCondition -> V1FlowSchemaCondition -> Bool)
-> Eq V1FlowSchemaCondition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1FlowSchemaCondition -> V1FlowSchemaCondition -> Bool
== :: V1FlowSchemaCondition -> V1FlowSchemaCondition -> Bool
$c/= :: V1FlowSchemaCondition -> V1FlowSchemaCondition -> Bool
/= :: V1FlowSchemaCondition -> V1FlowSchemaCondition -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1FlowSchemaCondition
instance A.FromJSON V1FlowSchemaCondition where
  parseJSON :: Value -> Parser V1FlowSchemaCondition
parseJSON = String
-> (Object -> Parser V1FlowSchemaCondition)
-> Value
-> Parser V1FlowSchemaCondition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1FlowSchemaCondition" ((Object -> Parser V1FlowSchemaCondition)
 -> Value -> Parser V1FlowSchemaCondition)
-> (Object -> Parser V1FlowSchemaCondition)
-> Value
-> Parser V1FlowSchemaCondition
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe DateTime
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> V1FlowSchemaCondition
V1FlowSchemaCondition
      (Maybe DateTime
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> V1FlowSchemaCondition)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Maybe Text -> V1FlowSchemaCondition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lastTransitionTime")
      Parser
  (Maybe Text
   -> Maybe Text -> Maybe Text -> Maybe Text -> V1FlowSchemaCondition)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> Maybe Text -> V1FlowSchemaCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"message")
      Parser
  (Maybe Text -> Maybe Text -> Maybe Text -> V1FlowSchemaCondition)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> V1FlowSchemaCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reason")
      Parser (Maybe Text -> Maybe Text -> V1FlowSchemaCondition)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> V1FlowSchemaCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")
      Parser (Maybe Text -> V1FlowSchemaCondition)
-> Parser (Maybe Text) -> Parser V1FlowSchemaCondition
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"type")

-- | ToJSON V1FlowSchemaCondition
instance A.ToJSON V1FlowSchemaCondition where
  toJSON :: V1FlowSchemaCondition -> Value
toJSON V1FlowSchemaCondition {Maybe Text
Maybe DateTime
$sel:v1FlowSchemaConditionLastTransitionTime:V1FlowSchemaCondition :: V1FlowSchemaCondition -> Maybe DateTime
$sel:v1FlowSchemaConditionMessage:V1FlowSchemaCondition :: V1FlowSchemaCondition -> Maybe Text
$sel:v1FlowSchemaConditionReason:V1FlowSchemaCondition :: V1FlowSchemaCondition -> Maybe Text
$sel:v1FlowSchemaConditionStatus:V1FlowSchemaCondition :: V1FlowSchemaCondition -> Maybe Text
$sel:v1FlowSchemaConditionType:V1FlowSchemaCondition :: V1FlowSchemaCondition -> Maybe Text
v1FlowSchemaConditionLastTransitionTime :: Maybe DateTime
v1FlowSchemaConditionMessage :: Maybe Text
v1FlowSchemaConditionReason :: Maybe Text
v1FlowSchemaConditionStatus :: Maybe Text
v1FlowSchemaConditionType :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"lastTransitionTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1FlowSchemaConditionLastTransitionTime
      , Key
"message" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1FlowSchemaConditionMessage
      , Key
"reason" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1FlowSchemaConditionReason
      , Key
"status" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1FlowSchemaConditionStatus
      , Key
"type" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1FlowSchemaConditionType
      ]


-- | Construct a value of type 'V1FlowSchemaCondition' (by applying it's required fields, if any)
mkV1FlowSchemaCondition
  :: V1FlowSchemaCondition
mkV1FlowSchemaCondition :: V1FlowSchemaCondition
mkV1FlowSchemaCondition =
  V1FlowSchemaCondition
  { $sel:v1FlowSchemaConditionLastTransitionTime:V1FlowSchemaCondition :: Maybe DateTime
v1FlowSchemaConditionLastTransitionTime = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1FlowSchemaConditionMessage:V1FlowSchemaCondition :: Maybe Text
v1FlowSchemaConditionMessage = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1FlowSchemaConditionReason:V1FlowSchemaCondition :: Maybe Text
v1FlowSchemaConditionReason = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1FlowSchemaConditionStatus:V1FlowSchemaCondition :: Maybe Text
v1FlowSchemaConditionStatus = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1FlowSchemaConditionType:V1FlowSchemaCondition :: Maybe Text
v1FlowSchemaConditionType = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1FlowSchemaList
-- | V1FlowSchemaList
-- FlowSchemaList is a list of FlowSchema objects.
data V1FlowSchemaList = V1FlowSchemaList
  { V1FlowSchemaList -> Maybe Text
v1FlowSchemaListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1FlowSchemaList -> [V1FlowSchema]
v1FlowSchemaListItems :: !([V1FlowSchema]) -- ^ /Required/ "items" - &#x60;items&#x60; is a list of FlowSchemas.
  , V1FlowSchemaList -> Maybe Text
v1FlowSchemaListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1FlowSchemaList -> Maybe V1ListMeta
v1FlowSchemaListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1FlowSchemaList -> ShowS
[V1FlowSchemaList] -> ShowS
V1FlowSchemaList -> String
(Int -> V1FlowSchemaList -> ShowS)
-> (V1FlowSchemaList -> String)
-> ([V1FlowSchemaList] -> ShowS)
-> Show V1FlowSchemaList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1FlowSchemaList -> ShowS
showsPrec :: Int -> V1FlowSchemaList -> ShowS
$cshow :: V1FlowSchemaList -> String
show :: V1FlowSchemaList -> String
$cshowList :: [V1FlowSchemaList] -> ShowS
showList :: [V1FlowSchemaList] -> ShowS
P.Show, V1FlowSchemaList -> V1FlowSchemaList -> Bool
(V1FlowSchemaList -> V1FlowSchemaList -> Bool)
-> (V1FlowSchemaList -> V1FlowSchemaList -> Bool)
-> Eq V1FlowSchemaList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1FlowSchemaList -> V1FlowSchemaList -> Bool
== :: V1FlowSchemaList -> V1FlowSchemaList -> Bool
$c/= :: V1FlowSchemaList -> V1FlowSchemaList -> Bool
/= :: V1FlowSchemaList -> V1FlowSchemaList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1FlowSchemaList
instance A.FromJSON V1FlowSchemaList where
  parseJSON :: Value -> Parser V1FlowSchemaList
parseJSON = String
-> (Object -> Parser V1FlowSchemaList)
-> Value
-> Parser V1FlowSchemaList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1FlowSchemaList" ((Object -> Parser V1FlowSchemaList)
 -> Value -> Parser V1FlowSchemaList)
-> (Object -> Parser V1FlowSchemaList)
-> Value
-> Parser V1FlowSchemaList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1FlowSchema]
-> Maybe Text
-> Maybe V1ListMeta
-> V1FlowSchemaList
V1FlowSchemaList
      (Maybe Text
 -> [V1FlowSchema]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1FlowSchemaList)
-> Parser (Maybe Text)
-> Parser
     ([V1FlowSchema]
      -> Maybe Text -> Maybe V1ListMeta -> V1FlowSchemaList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1FlowSchema]
   -> Maybe Text -> Maybe V1ListMeta -> V1FlowSchemaList)
-> Parser [V1FlowSchema]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1FlowSchemaList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1FlowSchema]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1FlowSchemaList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1FlowSchemaList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1FlowSchemaList)
-> Parser (Maybe V1ListMeta) -> Parser V1FlowSchemaList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1FlowSchemaList
instance A.ToJSON V1FlowSchemaList where
  toJSON :: V1FlowSchemaList -> Value
toJSON V1FlowSchemaList {[V1FlowSchema]
Maybe Text
Maybe V1ListMeta
$sel:v1FlowSchemaListApiVersion:V1FlowSchemaList :: V1FlowSchemaList -> Maybe Text
$sel:v1FlowSchemaListItems:V1FlowSchemaList :: V1FlowSchemaList -> [V1FlowSchema]
$sel:v1FlowSchemaListKind:V1FlowSchemaList :: V1FlowSchemaList -> Maybe Text
$sel:v1FlowSchemaListMetadata:V1FlowSchemaList :: V1FlowSchemaList -> Maybe V1ListMeta
v1FlowSchemaListApiVersion :: Maybe Text
v1FlowSchemaListItems :: [V1FlowSchema]
v1FlowSchemaListKind :: Maybe Text
v1FlowSchemaListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1FlowSchemaListApiVersion
      , Key
"items" Key -> [V1FlowSchema] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1FlowSchema]
v1FlowSchemaListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1FlowSchemaListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1FlowSchemaListMetadata
      ]


-- | Construct a value of type 'V1FlowSchemaList' (by applying it's required fields, if any)
mkV1FlowSchemaList
  :: [V1FlowSchema] -- ^ 'v1FlowSchemaListItems': `items` is a list of FlowSchemas.
  -> V1FlowSchemaList
mkV1FlowSchemaList :: [V1FlowSchema] -> V1FlowSchemaList
mkV1FlowSchemaList [V1FlowSchema]
v1FlowSchemaListItems =
  V1FlowSchemaList
  { $sel:v1FlowSchemaListApiVersion:V1FlowSchemaList :: Maybe Text
v1FlowSchemaListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1FlowSchema]
$sel:v1FlowSchemaListItems:V1FlowSchemaList :: [V1FlowSchema]
v1FlowSchemaListItems :: [V1FlowSchema]
v1FlowSchemaListItems
  , $sel:v1FlowSchemaListKind:V1FlowSchemaList :: Maybe Text
v1FlowSchemaListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1FlowSchemaListMetadata:V1FlowSchemaList :: Maybe V1ListMeta
v1FlowSchemaListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1FlowSchemaSpec
-- | V1FlowSchemaSpec
-- FlowSchemaSpec describes how the FlowSchema's specification looks like.
data V1FlowSchemaSpec = V1FlowSchemaSpec
  { V1FlowSchemaSpec -> Maybe V1FlowDistinguisherMethod
v1FlowSchemaSpecDistinguisherMethod :: !(Maybe V1FlowDistinguisherMethod) -- ^ "distinguisherMethod"
  , V1FlowSchemaSpec -> Maybe Int
v1FlowSchemaSpecMatchingPrecedence :: !(Maybe Int) -- ^ "matchingPrecedence" - &#x60;matchingPrecedence&#x60; is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence.  Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default.
  , V1FlowSchemaSpec -> V1PriorityLevelConfigurationReference
v1FlowSchemaSpecPriorityLevelConfiguration :: !(V1PriorityLevelConfigurationReference) -- ^ /Required/ "priorityLevelConfiguration"
  , V1FlowSchemaSpec -> Maybe [V1PolicyRulesWithSubjects]
v1FlowSchemaSpecRules :: !(Maybe [V1PolicyRulesWithSubjects]) -- ^ "rules" - &#x60;rules&#x60; describes which requests will match this flow schema. This FlowSchema matches a request if and only if at least one member of rules matches the request. if it is an empty slice, there will be no requests matching the FlowSchema.
  } deriving (Int -> V1FlowSchemaSpec -> ShowS
[V1FlowSchemaSpec] -> ShowS
V1FlowSchemaSpec -> String
(Int -> V1FlowSchemaSpec -> ShowS)
-> (V1FlowSchemaSpec -> String)
-> ([V1FlowSchemaSpec] -> ShowS)
-> Show V1FlowSchemaSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1FlowSchemaSpec -> ShowS
showsPrec :: Int -> V1FlowSchemaSpec -> ShowS
$cshow :: V1FlowSchemaSpec -> String
show :: V1FlowSchemaSpec -> String
$cshowList :: [V1FlowSchemaSpec] -> ShowS
showList :: [V1FlowSchemaSpec] -> ShowS
P.Show, V1FlowSchemaSpec -> V1FlowSchemaSpec -> Bool
(V1FlowSchemaSpec -> V1FlowSchemaSpec -> Bool)
-> (V1FlowSchemaSpec -> V1FlowSchemaSpec -> Bool)
-> Eq V1FlowSchemaSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1FlowSchemaSpec -> V1FlowSchemaSpec -> Bool
== :: V1FlowSchemaSpec -> V1FlowSchemaSpec -> Bool
$c/= :: V1FlowSchemaSpec -> V1FlowSchemaSpec -> Bool
/= :: V1FlowSchemaSpec -> V1FlowSchemaSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1FlowSchemaSpec
instance A.FromJSON V1FlowSchemaSpec where
  parseJSON :: Value -> Parser V1FlowSchemaSpec
parseJSON = String
-> (Object -> Parser V1FlowSchemaSpec)
-> Value
-> Parser V1FlowSchemaSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1FlowSchemaSpec" ((Object -> Parser V1FlowSchemaSpec)
 -> Value -> Parser V1FlowSchemaSpec)
-> (Object -> Parser V1FlowSchemaSpec)
-> Value
-> Parser V1FlowSchemaSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1FlowDistinguisherMethod
-> Maybe Int
-> V1PriorityLevelConfigurationReference
-> Maybe [V1PolicyRulesWithSubjects]
-> V1FlowSchemaSpec
V1FlowSchemaSpec
      (Maybe V1FlowDistinguisherMethod
 -> Maybe Int
 -> V1PriorityLevelConfigurationReference
 -> Maybe [V1PolicyRulesWithSubjects]
 -> V1FlowSchemaSpec)
-> Parser (Maybe V1FlowDistinguisherMethod)
-> Parser
     (Maybe Int
      -> V1PriorityLevelConfigurationReference
      -> Maybe [V1PolicyRulesWithSubjects]
      -> V1FlowSchemaSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1FlowDistinguisherMethod)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"distinguisherMethod")
      Parser
  (Maybe Int
   -> V1PriorityLevelConfigurationReference
   -> Maybe [V1PolicyRulesWithSubjects]
   -> V1FlowSchemaSpec)
-> Parser (Maybe Int)
-> Parser
     (V1PriorityLevelConfigurationReference
      -> Maybe [V1PolicyRulesWithSubjects] -> V1FlowSchemaSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"matchingPrecedence")
      Parser
  (V1PriorityLevelConfigurationReference
   -> Maybe [V1PolicyRulesWithSubjects] -> V1FlowSchemaSpec)
-> Parser V1PriorityLevelConfigurationReference
-> Parser (Maybe [V1PolicyRulesWithSubjects] -> V1FlowSchemaSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1PriorityLevelConfigurationReference
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"priorityLevelConfiguration")
      Parser (Maybe [V1PolicyRulesWithSubjects] -> V1FlowSchemaSpec)
-> Parser (Maybe [V1PolicyRulesWithSubjects])
-> Parser V1FlowSchemaSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1PolicyRulesWithSubjects])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"rules")

-- | ToJSON V1FlowSchemaSpec
instance A.ToJSON V1FlowSchemaSpec where
  toJSON :: V1FlowSchemaSpec -> Value
toJSON V1FlowSchemaSpec {Maybe Int
Maybe [V1PolicyRulesWithSubjects]
Maybe V1FlowDistinguisherMethod
V1PriorityLevelConfigurationReference
$sel:v1FlowSchemaSpecDistinguisherMethod:V1FlowSchemaSpec :: V1FlowSchemaSpec -> Maybe V1FlowDistinguisherMethod
$sel:v1FlowSchemaSpecMatchingPrecedence:V1FlowSchemaSpec :: V1FlowSchemaSpec -> Maybe Int
$sel:v1FlowSchemaSpecPriorityLevelConfiguration:V1FlowSchemaSpec :: V1FlowSchemaSpec -> V1PriorityLevelConfigurationReference
$sel:v1FlowSchemaSpecRules:V1FlowSchemaSpec :: V1FlowSchemaSpec -> Maybe [V1PolicyRulesWithSubjects]
v1FlowSchemaSpecDistinguisherMethod :: Maybe V1FlowDistinguisherMethod
v1FlowSchemaSpecMatchingPrecedence :: Maybe Int
v1FlowSchemaSpecPriorityLevelConfiguration :: V1PriorityLevelConfigurationReference
v1FlowSchemaSpecRules :: Maybe [V1PolicyRulesWithSubjects]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"distinguisherMethod" Key -> Maybe V1FlowDistinguisherMethod -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1FlowDistinguisherMethod
v1FlowSchemaSpecDistinguisherMethod
      , Key
"matchingPrecedence" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1FlowSchemaSpecMatchingPrecedence
      , Key
"priorityLevelConfiguration" Key -> V1PriorityLevelConfigurationReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1PriorityLevelConfigurationReference
v1FlowSchemaSpecPriorityLevelConfiguration
      , Key
"rules" Key -> Maybe [V1PolicyRulesWithSubjects] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1PolicyRulesWithSubjects]
v1FlowSchemaSpecRules
      ]


-- | Construct a value of type 'V1FlowSchemaSpec' (by applying it's required fields, if any)
mkV1FlowSchemaSpec
  :: V1PriorityLevelConfigurationReference -- ^ 'v1FlowSchemaSpecPriorityLevelConfiguration' 
  -> V1FlowSchemaSpec
mkV1FlowSchemaSpec :: V1PriorityLevelConfigurationReference -> V1FlowSchemaSpec
mkV1FlowSchemaSpec V1PriorityLevelConfigurationReference
v1FlowSchemaSpecPriorityLevelConfiguration =
  V1FlowSchemaSpec
  { $sel:v1FlowSchemaSpecDistinguisherMethod:V1FlowSchemaSpec :: Maybe V1FlowDistinguisherMethod
v1FlowSchemaSpecDistinguisherMethod = Maybe V1FlowDistinguisherMethod
forall a. Maybe a
Nothing
  , $sel:v1FlowSchemaSpecMatchingPrecedence:V1FlowSchemaSpec :: Maybe Int
v1FlowSchemaSpecMatchingPrecedence = Maybe Int
forall a. Maybe a
Nothing
  , V1PriorityLevelConfigurationReference
$sel:v1FlowSchemaSpecPriorityLevelConfiguration:V1FlowSchemaSpec :: V1PriorityLevelConfigurationReference
v1FlowSchemaSpecPriorityLevelConfiguration :: V1PriorityLevelConfigurationReference
v1FlowSchemaSpecPriorityLevelConfiguration
  , $sel:v1FlowSchemaSpecRules:V1FlowSchemaSpec :: Maybe [V1PolicyRulesWithSubjects]
v1FlowSchemaSpecRules = Maybe [V1PolicyRulesWithSubjects]
forall a. Maybe a
Nothing
  }

-- ** V1FlowSchemaStatus
-- | V1FlowSchemaStatus
-- FlowSchemaStatus represents the current state of a FlowSchema.
data V1FlowSchemaStatus = V1FlowSchemaStatus
  { V1FlowSchemaStatus -> Maybe [V1FlowSchemaCondition]
v1FlowSchemaStatusConditions :: !(Maybe [V1FlowSchemaCondition]) -- ^ "conditions" - &#x60;conditions&#x60; is a list of the current states of FlowSchema.
  } deriving (Int -> V1FlowSchemaStatus -> ShowS
[V1FlowSchemaStatus] -> ShowS
V1FlowSchemaStatus -> String
(Int -> V1FlowSchemaStatus -> ShowS)
-> (V1FlowSchemaStatus -> String)
-> ([V1FlowSchemaStatus] -> ShowS)
-> Show V1FlowSchemaStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1FlowSchemaStatus -> ShowS
showsPrec :: Int -> V1FlowSchemaStatus -> ShowS
$cshow :: V1FlowSchemaStatus -> String
show :: V1FlowSchemaStatus -> String
$cshowList :: [V1FlowSchemaStatus] -> ShowS
showList :: [V1FlowSchemaStatus] -> ShowS
P.Show, V1FlowSchemaStatus -> V1FlowSchemaStatus -> Bool
(V1FlowSchemaStatus -> V1FlowSchemaStatus -> Bool)
-> (V1FlowSchemaStatus -> V1FlowSchemaStatus -> Bool)
-> Eq V1FlowSchemaStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1FlowSchemaStatus -> V1FlowSchemaStatus -> Bool
== :: V1FlowSchemaStatus -> V1FlowSchemaStatus -> Bool
$c/= :: V1FlowSchemaStatus -> V1FlowSchemaStatus -> Bool
/= :: V1FlowSchemaStatus -> V1FlowSchemaStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1FlowSchemaStatus
instance A.FromJSON V1FlowSchemaStatus where
  parseJSON :: Value -> Parser V1FlowSchemaStatus
parseJSON = String
-> (Object -> Parser V1FlowSchemaStatus)
-> Value
-> Parser V1FlowSchemaStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1FlowSchemaStatus" ((Object -> Parser V1FlowSchemaStatus)
 -> Value -> Parser V1FlowSchemaStatus)
-> (Object -> Parser V1FlowSchemaStatus)
-> Value
-> Parser V1FlowSchemaStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1FlowSchemaCondition] -> V1FlowSchemaStatus
V1FlowSchemaStatus
      (Maybe [V1FlowSchemaCondition] -> V1FlowSchemaStatus)
-> Parser (Maybe [V1FlowSchemaCondition])
-> Parser V1FlowSchemaStatus
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1FlowSchemaCondition])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"conditions")

-- | ToJSON V1FlowSchemaStatus
instance A.ToJSON V1FlowSchemaStatus where
  toJSON :: V1FlowSchemaStatus -> Value
toJSON V1FlowSchemaStatus {Maybe [V1FlowSchemaCondition]
$sel:v1FlowSchemaStatusConditions:V1FlowSchemaStatus :: V1FlowSchemaStatus -> Maybe [V1FlowSchemaCondition]
v1FlowSchemaStatusConditions :: Maybe [V1FlowSchemaCondition]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"conditions" Key -> Maybe [V1FlowSchemaCondition] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1FlowSchemaCondition]
v1FlowSchemaStatusConditions
      ]


-- | Construct a value of type 'V1FlowSchemaStatus' (by applying it's required fields, if any)
mkV1FlowSchemaStatus
  :: V1FlowSchemaStatus
mkV1FlowSchemaStatus :: V1FlowSchemaStatus
mkV1FlowSchemaStatus =
  V1FlowSchemaStatus
  { $sel:v1FlowSchemaStatusConditions:V1FlowSchemaStatus :: Maybe [V1FlowSchemaCondition]
v1FlowSchemaStatusConditions = Maybe [V1FlowSchemaCondition]
forall a. Maybe a
Nothing
  }

-- ** V1ForZone
-- | V1ForZone
-- ForZone provides information about which zones should consume this endpoint.
data V1ForZone = V1ForZone
  { V1ForZone -> Text
v1ForZoneName :: !(Text) -- ^ /Required/ "name" - name represents the name of the zone.
  } deriving (Int -> V1ForZone -> ShowS
[V1ForZone] -> ShowS
V1ForZone -> String
(Int -> V1ForZone -> ShowS)
-> (V1ForZone -> String)
-> ([V1ForZone] -> ShowS)
-> Show V1ForZone
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ForZone -> ShowS
showsPrec :: Int -> V1ForZone -> ShowS
$cshow :: V1ForZone -> String
show :: V1ForZone -> String
$cshowList :: [V1ForZone] -> ShowS
showList :: [V1ForZone] -> ShowS
P.Show, V1ForZone -> V1ForZone -> Bool
(V1ForZone -> V1ForZone -> Bool)
-> (V1ForZone -> V1ForZone -> Bool) -> Eq V1ForZone
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ForZone -> V1ForZone -> Bool
== :: V1ForZone -> V1ForZone -> Bool
$c/= :: V1ForZone -> V1ForZone -> Bool
/= :: V1ForZone -> V1ForZone -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ForZone
instance A.FromJSON V1ForZone where
  parseJSON :: Value -> Parser V1ForZone
parseJSON = String -> (Object -> Parser V1ForZone) -> Value -> Parser V1ForZone
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ForZone" ((Object -> Parser V1ForZone) -> Value -> Parser V1ForZone)
-> (Object -> Parser V1ForZone) -> Value -> Parser V1ForZone
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> V1ForZone
V1ForZone
      (Text -> V1ForZone) -> Parser Text -> Parser V1ForZone
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")

-- | ToJSON V1ForZone
instance A.ToJSON V1ForZone where
  toJSON :: V1ForZone -> Value
toJSON V1ForZone {Text
$sel:v1ForZoneName:V1ForZone :: V1ForZone -> Text
v1ForZoneName :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ForZoneName
      ]


-- | Construct a value of type 'V1ForZone' (by applying it's required fields, if any)
mkV1ForZone
  :: Text -- ^ 'v1ForZoneName': name represents the name of the zone.
  -> V1ForZone
mkV1ForZone :: Text -> V1ForZone
mkV1ForZone Text
v1ForZoneName =
  V1ForZone
  { Text
$sel:v1ForZoneName:V1ForZone :: Text
v1ForZoneName :: Text
v1ForZoneName
  }

-- ** V1GCEPersistentDiskVolumeSource
-- | V1GCEPersistentDiskVolumeSource
-- Represents a Persistent Disk resource in Google Compute Engine.  A GCE PD must exist before mounting to a container. The disk must also be in the same GCE project and zone as the kubelet. A GCE PD can only be mounted as read/write once or read-only many times. GCE PDs support ownership management and SELinux relabeling.
data V1GCEPersistentDiskVolumeSource = V1GCEPersistentDiskVolumeSource
  { V1GCEPersistentDiskVolumeSource -> Maybe Text
v1GCEPersistentDiskVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - fsType is filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \&quot;ext4\&quot;, \&quot;xfs\&quot;, \&quot;ntfs\&quot;. Implicitly inferred to be \&quot;ext4\&quot; if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
  , V1GCEPersistentDiskVolumeSource -> Maybe Int
v1GCEPersistentDiskVolumeSourcePartition :: !(Maybe Int) -- ^ "partition" - partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \&quot;1\&quot;. Similarly, the volume partition for /dev/sda is \&quot;0\&quot; (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
  , V1GCEPersistentDiskVolumeSource -> Text
v1GCEPersistentDiskVolumeSourcePdName :: !(Text) -- ^ /Required/ "pdName" - pdName is unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
  , V1GCEPersistentDiskVolumeSource -> Maybe Bool
v1GCEPersistentDiskVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
  } deriving (Int -> V1GCEPersistentDiskVolumeSource -> ShowS
[V1GCEPersistentDiskVolumeSource] -> ShowS
V1GCEPersistentDiskVolumeSource -> String
(Int -> V1GCEPersistentDiskVolumeSource -> ShowS)
-> (V1GCEPersistentDiskVolumeSource -> String)
-> ([V1GCEPersistentDiskVolumeSource] -> ShowS)
-> Show V1GCEPersistentDiskVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1GCEPersistentDiskVolumeSource -> ShowS
showsPrec :: Int -> V1GCEPersistentDiskVolumeSource -> ShowS
$cshow :: V1GCEPersistentDiskVolumeSource -> String
show :: V1GCEPersistentDiskVolumeSource -> String
$cshowList :: [V1GCEPersistentDiskVolumeSource] -> ShowS
showList :: [V1GCEPersistentDiskVolumeSource] -> ShowS
P.Show, V1GCEPersistentDiskVolumeSource
-> V1GCEPersistentDiskVolumeSource -> Bool
(V1GCEPersistentDiskVolumeSource
 -> V1GCEPersistentDiskVolumeSource -> Bool)
-> (V1GCEPersistentDiskVolumeSource
    -> V1GCEPersistentDiskVolumeSource -> Bool)
-> Eq V1GCEPersistentDiskVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1GCEPersistentDiskVolumeSource
-> V1GCEPersistentDiskVolumeSource -> Bool
== :: V1GCEPersistentDiskVolumeSource
-> V1GCEPersistentDiskVolumeSource -> Bool
$c/= :: V1GCEPersistentDiskVolumeSource
-> V1GCEPersistentDiskVolumeSource -> Bool
/= :: V1GCEPersistentDiskVolumeSource
-> V1GCEPersistentDiskVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1GCEPersistentDiskVolumeSource
instance A.FromJSON V1GCEPersistentDiskVolumeSource where
  parseJSON :: Value -> Parser V1GCEPersistentDiskVolumeSource
parseJSON = String
-> (Object -> Parser V1GCEPersistentDiskVolumeSource)
-> Value
-> Parser V1GCEPersistentDiskVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1GCEPersistentDiskVolumeSource" ((Object -> Parser V1GCEPersistentDiskVolumeSource)
 -> Value -> Parser V1GCEPersistentDiskVolumeSource)
-> (Object -> Parser V1GCEPersistentDiskVolumeSource)
-> Value
-> Parser V1GCEPersistentDiskVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Int
-> Text
-> Maybe Bool
-> V1GCEPersistentDiskVolumeSource
V1GCEPersistentDiskVolumeSource
      (Maybe Text
 -> Maybe Int
 -> Text
 -> Maybe Bool
 -> V1GCEPersistentDiskVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Text -> Maybe Bool -> V1GCEPersistentDiskVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fsType")
      Parser
  (Maybe Int
   -> Text -> Maybe Bool -> V1GCEPersistentDiskVolumeSource)
-> Parser (Maybe Int)
-> Parser (Text -> Maybe Bool -> V1GCEPersistentDiskVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"partition")
      Parser (Text -> Maybe Bool -> V1GCEPersistentDiskVolumeSource)
-> Parser Text
-> Parser (Maybe Bool -> V1GCEPersistentDiskVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"pdName")
      Parser (Maybe Bool -> V1GCEPersistentDiskVolumeSource)
-> Parser (Maybe Bool) -> Parser V1GCEPersistentDiskVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readOnly")

-- | ToJSON V1GCEPersistentDiskVolumeSource
instance A.ToJSON V1GCEPersistentDiskVolumeSource where
  toJSON :: V1GCEPersistentDiskVolumeSource -> Value
toJSON V1GCEPersistentDiskVolumeSource {Maybe Bool
Maybe Int
Maybe Text
Text
$sel:v1GCEPersistentDiskVolumeSourceFsType:V1GCEPersistentDiskVolumeSource :: V1GCEPersistentDiskVolumeSource -> Maybe Text
$sel:v1GCEPersistentDiskVolumeSourcePartition:V1GCEPersistentDiskVolumeSource :: V1GCEPersistentDiskVolumeSource -> Maybe Int
$sel:v1GCEPersistentDiskVolumeSourcePdName:V1GCEPersistentDiskVolumeSource :: V1GCEPersistentDiskVolumeSource -> Text
$sel:v1GCEPersistentDiskVolumeSourceReadOnly:V1GCEPersistentDiskVolumeSource :: V1GCEPersistentDiskVolumeSource -> Maybe Bool
v1GCEPersistentDiskVolumeSourceFsType :: Maybe Text
v1GCEPersistentDiskVolumeSourcePartition :: Maybe Int
v1GCEPersistentDiskVolumeSourcePdName :: Text
v1GCEPersistentDiskVolumeSourceReadOnly :: Maybe Bool
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"fsType" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1GCEPersistentDiskVolumeSourceFsType
      , Key
"partition" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1GCEPersistentDiskVolumeSourcePartition
      , Key
"pdName" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1GCEPersistentDiskVolumeSourcePdName
      , Key
"readOnly" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1GCEPersistentDiskVolumeSourceReadOnly
      ]


-- | Construct a value of type 'V1GCEPersistentDiskVolumeSource' (by applying it's required fields, if any)
mkV1GCEPersistentDiskVolumeSource
  :: Text -- ^ 'v1GCEPersistentDiskVolumeSourcePdName': pdName is unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
  -> V1GCEPersistentDiskVolumeSource
mkV1GCEPersistentDiskVolumeSource :: Text -> V1GCEPersistentDiskVolumeSource
mkV1GCEPersistentDiskVolumeSource Text
v1GCEPersistentDiskVolumeSourcePdName =
  V1GCEPersistentDiskVolumeSource
  { $sel:v1GCEPersistentDiskVolumeSourceFsType:V1GCEPersistentDiskVolumeSource :: Maybe Text
v1GCEPersistentDiskVolumeSourceFsType = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1GCEPersistentDiskVolumeSourcePartition:V1GCEPersistentDiskVolumeSource :: Maybe Int
v1GCEPersistentDiskVolumeSourcePartition = Maybe Int
forall a. Maybe a
Nothing
  , Text
$sel:v1GCEPersistentDiskVolumeSourcePdName:V1GCEPersistentDiskVolumeSource :: Text
v1GCEPersistentDiskVolumeSourcePdName :: Text
v1GCEPersistentDiskVolumeSourcePdName
  , $sel:v1GCEPersistentDiskVolumeSourceReadOnly:V1GCEPersistentDiskVolumeSource :: Maybe Bool
v1GCEPersistentDiskVolumeSourceReadOnly = Maybe Bool
forall a. Maybe a
Nothing
  }

-- ** V1GRPCAction
-- | V1GRPCAction
-- GRPCAction specifies an action involving a GRPC service.
data V1GRPCAction = V1GRPCAction
  { V1GRPCAction -> Int
v1GRPCActionPort :: !(Int) -- ^ /Required/ "port" - Port number of the gRPC service. Number must be in the range 1 to 65535.
  , V1GRPCAction -> Maybe Text
v1GRPCActionService :: !(Maybe Text) -- ^ "service" - Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).  If this is not specified, the default behavior is defined by gRPC.
  } deriving (Int -> V1GRPCAction -> ShowS
[V1GRPCAction] -> ShowS
V1GRPCAction -> String
(Int -> V1GRPCAction -> ShowS)
-> (V1GRPCAction -> String)
-> ([V1GRPCAction] -> ShowS)
-> Show V1GRPCAction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1GRPCAction -> ShowS
showsPrec :: Int -> V1GRPCAction -> ShowS
$cshow :: V1GRPCAction -> String
show :: V1GRPCAction -> String
$cshowList :: [V1GRPCAction] -> ShowS
showList :: [V1GRPCAction] -> ShowS
P.Show, V1GRPCAction -> V1GRPCAction -> Bool
(V1GRPCAction -> V1GRPCAction -> Bool)
-> (V1GRPCAction -> V1GRPCAction -> Bool) -> Eq V1GRPCAction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1GRPCAction -> V1GRPCAction -> Bool
== :: V1GRPCAction -> V1GRPCAction -> Bool
$c/= :: V1GRPCAction -> V1GRPCAction -> Bool
/= :: V1GRPCAction -> V1GRPCAction -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1GRPCAction
instance A.FromJSON V1GRPCAction where
  parseJSON :: Value -> Parser V1GRPCAction
parseJSON = String
-> (Object -> Parser V1GRPCAction) -> Value -> Parser V1GRPCAction
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1GRPCAction" ((Object -> Parser V1GRPCAction) -> Value -> Parser V1GRPCAction)
-> (Object -> Parser V1GRPCAction) -> Value -> Parser V1GRPCAction
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Int -> Maybe Text -> V1GRPCAction
V1GRPCAction
      (Int -> Maybe Text -> V1GRPCAction)
-> Parser Int -> Parser (Maybe Text -> V1GRPCAction)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"port")
      Parser (Maybe Text -> V1GRPCAction)
-> Parser (Maybe Text) -> Parser V1GRPCAction
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"service")

-- | ToJSON V1GRPCAction
instance A.ToJSON V1GRPCAction where
  toJSON :: V1GRPCAction -> Value
toJSON V1GRPCAction {Int
Maybe Text
$sel:v1GRPCActionPort:V1GRPCAction :: V1GRPCAction -> Int
$sel:v1GRPCActionService:V1GRPCAction :: V1GRPCAction -> Maybe Text
v1GRPCActionPort :: Int
v1GRPCActionService :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"port" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v1GRPCActionPort
      , Key
"service" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1GRPCActionService
      ]


-- | Construct a value of type 'V1GRPCAction' (by applying it's required fields, if any)
mkV1GRPCAction
  :: Int -- ^ 'v1GRPCActionPort': Port number of the gRPC service. Number must be in the range 1 to 65535.
  -> V1GRPCAction
mkV1GRPCAction :: Int -> V1GRPCAction
mkV1GRPCAction Int
v1GRPCActionPort =
  V1GRPCAction
  { Int
$sel:v1GRPCActionPort:V1GRPCAction :: Int
v1GRPCActionPort :: Int
v1GRPCActionPort
  , $sel:v1GRPCActionService:V1GRPCAction :: Maybe Text
v1GRPCActionService = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1GitRepoVolumeSource
-- | V1GitRepoVolumeSource
-- Represents a volume that is populated with the contents of a git repository. Git repo volumes do not support ownership management. Git repo volumes support SELinux relabeling.  DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.
data V1GitRepoVolumeSource = V1GitRepoVolumeSource
  { V1GitRepoVolumeSource -> Maybe Text
v1GitRepoVolumeSourceDirectory :: !(Maybe Text) -- ^ "directory" - directory is the target directory name. Must not contain or start with &#39;..&#39;.  If &#39;.&#39; is supplied, the volume directory will be the git repository.  Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.
  , V1GitRepoVolumeSource -> Text
v1GitRepoVolumeSourceRepository :: !(Text) -- ^ /Required/ "repository" - repository is the URL
  , V1GitRepoVolumeSource -> Maybe Text
v1GitRepoVolumeSourceRevision :: !(Maybe Text) -- ^ "revision" - revision is the commit hash for the specified revision.
  } deriving (Int -> V1GitRepoVolumeSource -> ShowS
[V1GitRepoVolumeSource] -> ShowS
V1GitRepoVolumeSource -> String
(Int -> V1GitRepoVolumeSource -> ShowS)
-> (V1GitRepoVolumeSource -> String)
-> ([V1GitRepoVolumeSource] -> ShowS)
-> Show V1GitRepoVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1GitRepoVolumeSource -> ShowS
showsPrec :: Int -> V1GitRepoVolumeSource -> ShowS
$cshow :: V1GitRepoVolumeSource -> String
show :: V1GitRepoVolumeSource -> String
$cshowList :: [V1GitRepoVolumeSource] -> ShowS
showList :: [V1GitRepoVolumeSource] -> ShowS
P.Show, V1GitRepoVolumeSource -> V1GitRepoVolumeSource -> Bool
(V1GitRepoVolumeSource -> V1GitRepoVolumeSource -> Bool)
-> (V1GitRepoVolumeSource -> V1GitRepoVolumeSource -> Bool)
-> Eq V1GitRepoVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1GitRepoVolumeSource -> V1GitRepoVolumeSource -> Bool
== :: V1GitRepoVolumeSource -> V1GitRepoVolumeSource -> Bool
$c/= :: V1GitRepoVolumeSource -> V1GitRepoVolumeSource -> Bool
/= :: V1GitRepoVolumeSource -> V1GitRepoVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1GitRepoVolumeSource
instance A.FromJSON V1GitRepoVolumeSource where
  parseJSON :: Value -> Parser V1GitRepoVolumeSource
parseJSON = String
-> (Object -> Parser V1GitRepoVolumeSource)
-> Value
-> Parser V1GitRepoVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1GitRepoVolumeSource" ((Object -> Parser V1GitRepoVolumeSource)
 -> Value -> Parser V1GitRepoVolumeSource)
-> (Object -> Parser V1GitRepoVolumeSource)
-> Value
-> Parser V1GitRepoVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Text -> Maybe Text -> V1GitRepoVolumeSource
V1GitRepoVolumeSource
      (Maybe Text -> Text -> Maybe Text -> V1GitRepoVolumeSource)
-> Parser (Maybe Text)
-> Parser (Text -> Maybe Text -> V1GitRepoVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"directory")
      Parser (Text -> Maybe Text -> V1GitRepoVolumeSource)
-> Parser Text -> Parser (Maybe Text -> V1GitRepoVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"repository")
      Parser (Maybe Text -> V1GitRepoVolumeSource)
-> Parser (Maybe Text) -> Parser V1GitRepoVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"revision")

-- | ToJSON V1GitRepoVolumeSource
instance A.ToJSON V1GitRepoVolumeSource where
  toJSON :: V1GitRepoVolumeSource -> Value
toJSON V1GitRepoVolumeSource {Maybe Text
Text
$sel:v1GitRepoVolumeSourceDirectory:V1GitRepoVolumeSource :: V1GitRepoVolumeSource -> Maybe Text
$sel:v1GitRepoVolumeSourceRepository:V1GitRepoVolumeSource :: V1GitRepoVolumeSource -> Text
$sel:v1GitRepoVolumeSourceRevision:V1GitRepoVolumeSource :: V1GitRepoVolumeSource -> Maybe Text
v1GitRepoVolumeSourceDirectory :: Maybe Text
v1GitRepoVolumeSourceRepository :: Text
v1GitRepoVolumeSourceRevision :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"directory" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1GitRepoVolumeSourceDirectory
      , Key
"repository" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1GitRepoVolumeSourceRepository
      , Key
"revision" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1GitRepoVolumeSourceRevision
      ]


-- | Construct a value of type 'V1GitRepoVolumeSource' (by applying it's required fields, if any)
mkV1GitRepoVolumeSource
  :: Text -- ^ 'v1GitRepoVolumeSourceRepository': repository is the URL
  -> V1GitRepoVolumeSource
mkV1GitRepoVolumeSource :: Text -> V1GitRepoVolumeSource
mkV1GitRepoVolumeSource Text
v1GitRepoVolumeSourceRepository =
  V1GitRepoVolumeSource
  { $sel:v1GitRepoVolumeSourceDirectory:V1GitRepoVolumeSource :: Maybe Text
v1GitRepoVolumeSourceDirectory = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1GitRepoVolumeSourceRepository:V1GitRepoVolumeSource :: Text
v1GitRepoVolumeSourceRepository :: Text
v1GitRepoVolumeSourceRepository
  , $sel:v1GitRepoVolumeSourceRevision:V1GitRepoVolumeSource :: Maybe Text
v1GitRepoVolumeSourceRevision = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1GlusterfsPersistentVolumeSource
-- | V1GlusterfsPersistentVolumeSource
-- Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.
data V1GlusterfsPersistentVolumeSource = V1GlusterfsPersistentVolumeSource
  { V1GlusterfsPersistentVolumeSource -> Text
v1GlusterfsPersistentVolumeSourceEndpoints :: !(Text) -- ^ /Required/ "endpoints" - endpoints is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
  , V1GlusterfsPersistentVolumeSource -> Maybe Text
v1GlusterfsPersistentVolumeSourceEndpointsNamespace :: !(Maybe Text) -- ^ "endpointsNamespace" - endpointsNamespace is the namespace that contains Glusterfs endpoint. If this field is empty, the EndpointNamespace defaults to the same namespace as the bound PVC. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
  , V1GlusterfsPersistentVolumeSource -> Text
v1GlusterfsPersistentVolumeSourcePath :: !(Text) -- ^ /Required/ "path" - path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
  , V1GlusterfsPersistentVolumeSource -> Maybe Bool
v1GlusterfsPersistentVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - readOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
  } deriving (Int -> V1GlusterfsPersistentVolumeSource -> ShowS
[V1GlusterfsPersistentVolumeSource] -> ShowS
V1GlusterfsPersistentVolumeSource -> String
(Int -> V1GlusterfsPersistentVolumeSource -> ShowS)
-> (V1GlusterfsPersistentVolumeSource -> String)
-> ([V1GlusterfsPersistentVolumeSource] -> ShowS)
-> Show V1GlusterfsPersistentVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1GlusterfsPersistentVolumeSource -> ShowS
showsPrec :: Int -> V1GlusterfsPersistentVolumeSource -> ShowS
$cshow :: V1GlusterfsPersistentVolumeSource -> String
show :: V1GlusterfsPersistentVolumeSource -> String
$cshowList :: [V1GlusterfsPersistentVolumeSource] -> ShowS
showList :: [V1GlusterfsPersistentVolumeSource] -> ShowS
P.Show, V1GlusterfsPersistentVolumeSource
-> V1GlusterfsPersistentVolumeSource -> Bool
(V1GlusterfsPersistentVolumeSource
 -> V1GlusterfsPersistentVolumeSource -> Bool)
-> (V1GlusterfsPersistentVolumeSource
    -> V1GlusterfsPersistentVolumeSource -> Bool)
-> Eq V1GlusterfsPersistentVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1GlusterfsPersistentVolumeSource
-> V1GlusterfsPersistentVolumeSource -> Bool
== :: V1GlusterfsPersistentVolumeSource
-> V1GlusterfsPersistentVolumeSource -> Bool
$c/= :: V1GlusterfsPersistentVolumeSource
-> V1GlusterfsPersistentVolumeSource -> Bool
/= :: V1GlusterfsPersistentVolumeSource
-> V1GlusterfsPersistentVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1GlusterfsPersistentVolumeSource
instance A.FromJSON V1GlusterfsPersistentVolumeSource where
  parseJSON :: Value -> Parser V1GlusterfsPersistentVolumeSource
parseJSON = String
-> (Object -> Parser V1GlusterfsPersistentVolumeSource)
-> Value
-> Parser V1GlusterfsPersistentVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1GlusterfsPersistentVolumeSource" ((Object -> Parser V1GlusterfsPersistentVolumeSource)
 -> Value -> Parser V1GlusterfsPersistentVolumeSource)
-> (Object -> Parser V1GlusterfsPersistentVolumeSource)
-> Value
-> Parser V1GlusterfsPersistentVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text
-> Maybe Text
-> Text
-> Maybe Bool
-> V1GlusterfsPersistentVolumeSource
V1GlusterfsPersistentVolumeSource
      (Text
 -> Maybe Text
 -> Text
 -> Maybe Bool
 -> V1GlusterfsPersistentVolumeSource)
-> Parser Text
-> Parser
     (Maybe Text
      -> Text -> Maybe Bool -> V1GlusterfsPersistentVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"endpoints")
      Parser
  (Maybe Text
   -> Text -> Maybe Bool -> V1GlusterfsPersistentVolumeSource)
-> Parser (Maybe Text)
-> Parser (Text -> Maybe Bool -> V1GlusterfsPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"endpointsNamespace")
      Parser (Text -> Maybe Bool -> V1GlusterfsPersistentVolumeSource)
-> Parser Text
-> Parser (Maybe Bool -> V1GlusterfsPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"path")
      Parser (Maybe Bool -> V1GlusterfsPersistentVolumeSource)
-> Parser (Maybe Bool) -> Parser V1GlusterfsPersistentVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readOnly")

-- | ToJSON V1GlusterfsPersistentVolumeSource
instance A.ToJSON V1GlusterfsPersistentVolumeSource where
  toJSON :: V1GlusterfsPersistentVolumeSource -> Value
toJSON V1GlusterfsPersistentVolumeSource {Maybe Bool
Maybe Text
Text
$sel:v1GlusterfsPersistentVolumeSourceEndpoints:V1GlusterfsPersistentVolumeSource :: V1GlusterfsPersistentVolumeSource -> Text
$sel:v1GlusterfsPersistentVolumeSourceEndpointsNamespace:V1GlusterfsPersistentVolumeSource :: V1GlusterfsPersistentVolumeSource -> Maybe Text
$sel:v1GlusterfsPersistentVolumeSourcePath:V1GlusterfsPersistentVolumeSource :: V1GlusterfsPersistentVolumeSource -> Text
$sel:v1GlusterfsPersistentVolumeSourceReadOnly:V1GlusterfsPersistentVolumeSource :: V1GlusterfsPersistentVolumeSource -> Maybe Bool
v1GlusterfsPersistentVolumeSourceEndpoints :: Text
v1GlusterfsPersistentVolumeSourceEndpointsNamespace :: Maybe Text
v1GlusterfsPersistentVolumeSourcePath :: Text
v1GlusterfsPersistentVolumeSourceReadOnly :: Maybe Bool
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"endpoints" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1GlusterfsPersistentVolumeSourceEndpoints
      , Key
"endpointsNamespace" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1GlusterfsPersistentVolumeSourceEndpointsNamespace
      , Key
"path" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1GlusterfsPersistentVolumeSourcePath
      , Key
"readOnly" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1GlusterfsPersistentVolumeSourceReadOnly
      ]


-- | Construct a value of type 'V1GlusterfsPersistentVolumeSource' (by applying it's required fields, if any)
mkV1GlusterfsPersistentVolumeSource
  :: Text -- ^ 'v1GlusterfsPersistentVolumeSourceEndpoints': endpoints is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
  -> Text -- ^ 'v1GlusterfsPersistentVolumeSourcePath': path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
  -> V1GlusterfsPersistentVolumeSource
mkV1GlusterfsPersistentVolumeSource :: Text -> Text -> V1GlusterfsPersistentVolumeSource
mkV1GlusterfsPersistentVolumeSource Text
v1GlusterfsPersistentVolumeSourceEndpoints Text
v1GlusterfsPersistentVolumeSourcePath =
  V1GlusterfsPersistentVolumeSource
  { Text
$sel:v1GlusterfsPersistentVolumeSourceEndpoints:V1GlusterfsPersistentVolumeSource :: Text
v1GlusterfsPersistentVolumeSourceEndpoints :: Text
v1GlusterfsPersistentVolumeSourceEndpoints
  , $sel:v1GlusterfsPersistentVolumeSourceEndpointsNamespace:V1GlusterfsPersistentVolumeSource :: Maybe Text
v1GlusterfsPersistentVolumeSourceEndpointsNamespace = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1GlusterfsPersistentVolumeSourcePath:V1GlusterfsPersistentVolumeSource :: Text
v1GlusterfsPersistentVolumeSourcePath :: Text
v1GlusterfsPersistentVolumeSourcePath
  , $sel:v1GlusterfsPersistentVolumeSourceReadOnly:V1GlusterfsPersistentVolumeSource :: Maybe Bool
v1GlusterfsPersistentVolumeSourceReadOnly = Maybe Bool
forall a. Maybe a
Nothing
  }

-- ** V1GlusterfsVolumeSource
-- | V1GlusterfsVolumeSource
-- Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.
data V1GlusterfsVolumeSource = V1GlusterfsVolumeSource
  { V1GlusterfsVolumeSource -> Text
v1GlusterfsVolumeSourceEndpoints :: !(Text) -- ^ /Required/ "endpoints" - endpoints is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
  , V1GlusterfsVolumeSource -> Text
v1GlusterfsVolumeSourcePath :: !(Text) -- ^ /Required/ "path" - path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
  , V1GlusterfsVolumeSource -> Maybe Bool
v1GlusterfsVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - readOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
  } deriving (Int -> V1GlusterfsVolumeSource -> ShowS
[V1GlusterfsVolumeSource] -> ShowS
V1GlusterfsVolumeSource -> String
(Int -> V1GlusterfsVolumeSource -> ShowS)
-> (V1GlusterfsVolumeSource -> String)
-> ([V1GlusterfsVolumeSource] -> ShowS)
-> Show V1GlusterfsVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1GlusterfsVolumeSource -> ShowS
showsPrec :: Int -> V1GlusterfsVolumeSource -> ShowS
$cshow :: V1GlusterfsVolumeSource -> String
show :: V1GlusterfsVolumeSource -> String
$cshowList :: [V1GlusterfsVolumeSource] -> ShowS
showList :: [V1GlusterfsVolumeSource] -> ShowS
P.Show, V1GlusterfsVolumeSource -> V1GlusterfsVolumeSource -> Bool
(V1GlusterfsVolumeSource -> V1GlusterfsVolumeSource -> Bool)
-> (V1GlusterfsVolumeSource -> V1GlusterfsVolumeSource -> Bool)
-> Eq V1GlusterfsVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1GlusterfsVolumeSource -> V1GlusterfsVolumeSource -> Bool
== :: V1GlusterfsVolumeSource -> V1GlusterfsVolumeSource -> Bool
$c/= :: V1GlusterfsVolumeSource -> V1GlusterfsVolumeSource -> Bool
/= :: V1GlusterfsVolumeSource -> V1GlusterfsVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1GlusterfsVolumeSource
instance A.FromJSON V1GlusterfsVolumeSource where
  parseJSON :: Value -> Parser V1GlusterfsVolumeSource
parseJSON = String
-> (Object -> Parser V1GlusterfsVolumeSource)
-> Value
-> Parser V1GlusterfsVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1GlusterfsVolumeSource" ((Object -> Parser V1GlusterfsVolumeSource)
 -> Value -> Parser V1GlusterfsVolumeSource)
-> (Object -> Parser V1GlusterfsVolumeSource)
-> Value
-> Parser V1GlusterfsVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Text -> Maybe Bool -> V1GlusterfsVolumeSource
V1GlusterfsVolumeSource
      (Text -> Text -> Maybe Bool -> V1GlusterfsVolumeSource)
-> Parser Text
-> Parser (Text -> Maybe Bool -> V1GlusterfsVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"endpoints")
      Parser (Text -> Maybe Bool -> V1GlusterfsVolumeSource)
-> Parser Text -> Parser (Maybe Bool -> V1GlusterfsVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"path")
      Parser (Maybe Bool -> V1GlusterfsVolumeSource)
-> Parser (Maybe Bool) -> Parser V1GlusterfsVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readOnly")

-- | ToJSON V1GlusterfsVolumeSource
instance A.ToJSON V1GlusterfsVolumeSource where
  toJSON :: V1GlusterfsVolumeSource -> Value
toJSON V1GlusterfsVolumeSource {Maybe Bool
Text
$sel:v1GlusterfsVolumeSourceEndpoints:V1GlusterfsVolumeSource :: V1GlusterfsVolumeSource -> Text
$sel:v1GlusterfsVolumeSourcePath:V1GlusterfsVolumeSource :: V1GlusterfsVolumeSource -> Text
$sel:v1GlusterfsVolumeSourceReadOnly:V1GlusterfsVolumeSource :: V1GlusterfsVolumeSource -> Maybe Bool
v1GlusterfsVolumeSourceEndpoints :: Text
v1GlusterfsVolumeSourcePath :: Text
v1GlusterfsVolumeSourceReadOnly :: Maybe Bool
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"endpoints" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1GlusterfsVolumeSourceEndpoints
      , Key
"path" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1GlusterfsVolumeSourcePath
      , Key
"readOnly" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1GlusterfsVolumeSourceReadOnly
      ]


-- | Construct a value of type 'V1GlusterfsVolumeSource' (by applying it's required fields, if any)
mkV1GlusterfsVolumeSource
  :: Text -- ^ 'v1GlusterfsVolumeSourceEndpoints': endpoints is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
  -> Text -- ^ 'v1GlusterfsVolumeSourcePath': path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
  -> V1GlusterfsVolumeSource
mkV1GlusterfsVolumeSource :: Text -> Text -> V1GlusterfsVolumeSource
mkV1GlusterfsVolumeSource Text
v1GlusterfsVolumeSourceEndpoints Text
v1GlusterfsVolumeSourcePath =
  V1GlusterfsVolumeSource
  { Text
$sel:v1GlusterfsVolumeSourceEndpoints:V1GlusterfsVolumeSource :: Text
v1GlusterfsVolumeSourceEndpoints :: Text
v1GlusterfsVolumeSourceEndpoints
  , Text
$sel:v1GlusterfsVolumeSourcePath:V1GlusterfsVolumeSource :: Text
v1GlusterfsVolumeSourcePath :: Text
v1GlusterfsVolumeSourcePath
  , $sel:v1GlusterfsVolumeSourceReadOnly:V1GlusterfsVolumeSource :: Maybe Bool
v1GlusterfsVolumeSourceReadOnly = Maybe Bool
forall a. Maybe a
Nothing
  }

-- ** V1GroupSubject
-- | V1GroupSubject
-- GroupSubject holds detailed information for group-kind subject.
data V1GroupSubject = V1GroupSubject
  { V1GroupSubject -> Text
v1GroupSubjectName :: !(Text) -- ^ /Required/ "name" - name is the user group that matches, or \&quot;*\&quot; to match all user groups. See https://github.com/kubernetes/apiserver/blob/master/pkg/authentication/user/user.go for some well-known group names. Required.
  } deriving (Int -> V1GroupSubject -> ShowS
[V1GroupSubject] -> ShowS
V1GroupSubject -> String
(Int -> V1GroupSubject -> ShowS)
-> (V1GroupSubject -> String)
-> ([V1GroupSubject] -> ShowS)
-> Show V1GroupSubject
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1GroupSubject -> ShowS
showsPrec :: Int -> V1GroupSubject -> ShowS
$cshow :: V1GroupSubject -> String
show :: V1GroupSubject -> String
$cshowList :: [V1GroupSubject] -> ShowS
showList :: [V1GroupSubject] -> ShowS
P.Show, V1GroupSubject -> V1GroupSubject -> Bool
(V1GroupSubject -> V1GroupSubject -> Bool)
-> (V1GroupSubject -> V1GroupSubject -> Bool) -> Eq V1GroupSubject
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1GroupSubject -> V1GroupSubject -> Bool
== :: V1GroupSubject -> V1GroupSubject -> Bool
$c/= :: V1GroupSubject -> V1GroupSubject -> Bool
/= :: V1GroupSubject -> V1GroupSubject -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1GroupSubject
instance A.FromJSON V1GroupSubject where
  parseJSON :: Value -> Parser V1GroupSubject
parseJSON = String
-> (Object -> Parser V1GroupSubject)
-> Value
-> Parser V1GroupSubject
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1GroupSubject" ((Object -> Parser V1GroupSubject)
 -> Value -> Parser V1GroupSubject)
-> (Object -> Parser V1GroupSubject)
-> Value
-> Parser V1GroupSubject
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> V1GroupSubject
V1GroupSubject
      (Text -> V1GroupSubject) -> Parser Text -> Parser V1GroupSubject
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")

-- | ToJSON V1GroupSubject
instance A.ToJSON V1GroupSubject where
  toJSON :: V1GroupSubject -> Value
toJSON V1GroupSubject {Text
$sel:v1GroupSubjectName:V1GroupSubject :: V1GroupSubject -> Text
v1GroupSubjectName :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1GroupSubjectName
      ]


-- | Construct a value of type 'V1GroupSubject' (by applying it's required fields, if any)
mkV1GroupSubject
  :: Text -- ^ 'v1GroupSubjectName': name is the user group that matches, or \"*\" to match all user groups. See https://github.com/kubernetes/apiserver/blob/master/pkg/authentication/user/user.go for some well-known group names. Required.
  -> V1GroupSubject
mkV1GroupSubject :: Text -> V1GroupSubject
mkV1GroupSubject Text
v1GroupSubjectName =
  V1GroupSubject
  { Text
$sel:v1GroupSubjectName:V1GroupSubject :: Text
v1GroupSubjectName :: Text
v1GroupSubjectName
  }

-- ** V1GroupVersionForDiscovery
-- | V1GroupVersionForDiscovery
-- GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility.
data V1GroupVersionForDiscovery = V1GroupVersionForDiscovery
  { V1GroupVersionForDiscovery -> Text
v1GroupVersionForDiscoveryGroupVersion :: !(Text) -- ^ /Required/ "groupVersion" - groupVersion specifies the API group and version in the form \&quot;group/version\&quot;
  , V1GroupVersionForDiscovery -> Text
v1GroupVersionForDiscoveryVersion :: !(Text) -- ^ /Required/ "version" - version specifies the version in the form of \&quot;version\&quot;. This is to save the clients the trouble of splitting the GroupVersion.
  } deriving (Int -> V1GroupVersionForDiscovery -> ShowS
[V1GroupVersionForDiscovery] -> ShowS
V1GroupVersionForDiscovery -> String
(Int -> V1GroupVersionForDiscovery -> ShowS)
-> (V1GroupVersionForDiscovery -> String)
-> ([V1GroupVersionForDiscovery] -> ShowS)
-> Show V1GroupVersionForDiscovery
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1GroupVersionForDiscovery -> ShowS
showsPrec :: Int -> V1GroupVersionForDiscovery -> ShowS
$cshow :: V1GroupVersionForDiscovery -> String
show :: V1GroupVersionForDiscovery -> String
$cshowList :: [V1GroupVersionForDiscovery] -> ShowS
showList :: [V1GroupVersionForDiscovery] -> ShowS
P.Show, V1GroupVersionForDiscovery -> V1GroupVersionForDiscovery -> Bool
(V1GroupVersionForDiscovery -> V1GroupVersionForDiscovery -> Bool)
-> (V1GroupVersionForDiscovery
    -> V1GroupVersionForDiscovery -> Bool)
-> Eq V1GroupVersionForDiscovery
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1GroupVersionForDiscovery -> V1GroupVersionForDiscovery -> Bool
== :: V1GroupVersionForDiscovery -> V1GroupVersionForDiscovery -> Bool
$c/= :: V1GroupVersionForDiscovery -> V1GroupVersionForDiscovery -> Bool
/= :: V1GroupVersionForDiscovery -> V1GroupVersionForDiscovery -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1GroupVersionForDiscovery
instance A.FromJSON V1GroupVersionForDiscovery where
  parseJSON :: Value -> Parser V1GroupVersionForDiscovery
parseJSON = String
-> (Object -> Parser V1GroupVersionForDiscovery)
-> Value
-> Parser V1GroupVersionForDiscovery
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1GroupVersionForDiscovery" ((Object -> Parser V1GroupVersionForDiscovery)
 -> Value -> Parser V1GroupVersionForDiscovery)
-> (Object -> Parser V1GroupVersionForDiscovery)
-> Value
-> Parser V1GroupVersionForDiscovery
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Text -> V1GroupVersionForDiscovery
V1GroupVersionForDiscovery
      (Text -> Text -> V1GroupVersionForDiscovery)
-> Parser Text -> Parser (Text -> V1GroupVersionForDiscovery)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"groupVersion")
      Parser (Text -> V1GroupVersionForDiscovery)
-> Parser Text -> Parser V1GroupVersionForDiscovery
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"version")

-- | ToJSON V1GroupVersionForDiscovery
instance A.ToJSON V1GroupVersionForDiscovery where
  toJSON :: V1GroupVersionForDiscovery -> Value
toJSON V1GroupVersionForDiscovery {Text
$sel:v1GroupVersionForDiscoveryGroupVersion:V1GroupVersionForDiscovery :: V1GroupVersionForDiscovery -> Text
$sel:v1GroupVersionForDiscoveryVersion:V1GroupVersionForDiscovery :: V1GroupVersionForDiscovery -> Text
v1GroupVersionForDiscoveryGroupVersion :: Text
v1GroupVersionForDiscoveryVersion :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"groupVersion" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1GroupVersionForDiscoveryGroupVersion
      , Key
"version" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1GroupVersionForDiscoveryVersion
      ]


-- | Construct a value of type 'V1GroupVersionForDiscovery' (by applying it's required fields, if any)
mkV1GroupVersionForDiscovery
  :: Text -- ^ 'v1GroupVersionForDiscoveryGroupVersion': groupVersion specifies the API group and version in the form \"group/version\"
  -> Text -- ^ 'v1GroupVersionForDiscoveryVersion': version specifies the version in the form of \"version\". This is to save the clients the trouble of splitting the GroupVersion.
  -> V1GroupVersionForDiscovery
mkV1GroupVersionForDiscovery :: Text -> Text -> V1GroupVersionForDiscovery
mkV1GroupVersionForDiscovery Text
v1GroupVersionForDiscoveryGroupVersion Text
v1GroupVersionForDiscoveryVersion =
  V1GroupVersionForDiscovery
  { Text
$sel:v1GroupVersionForDiscoveryGroupVersion:V1GroupVersionForDiscovery :: Text
v1GroupVersionForDiscoveryGroupVersion :: Text
v1GroupVersionForDiscoveryGroupVersion
  , Text
$sel:v1GroupVersionForDiscoveryVersion:V1GroupVersionForDiscovery :: Text
v1GroupVersionForDiscoveryVersion :: Text
v1GroupVersionForDiscoveryVersion
  }

-- ** V1HTTPGetAction
-- | V1HTTPGetAction
-- HTTPGetAction describes an action based on HTTP Get requests.
data V1HTTPGetAction = V1HTTPGetAction
  { V1HTTPGetAction -> Maybe Text
v1HTTPGetActionHost :: !(Maybe Text) -- ^ "host" - Host name to connect to, defaults to the pod IP. You probably want to set \&quot;Host\&quot; in httpHeaders instead.
  , V1HTTPGetAction -> Maybe [V1HTTPHeader]
v1HTTPGetActionHttpHeaders :: !(Maybe [V1HTTPHeader]) -- ^ "httpHeaders" - Custom headers to set in the request. HTTP allows repeated headers.
  , V1HTTPGetAction -> Maybe Text
v1HTTPGetActionPath :: !(Maybe Text) -- ^ "path" - Path to access on the HTTP server.
  , V1HTTPGetAction -> IntOrString
v1HTTPGetActionPort :: !(IntOrString) -- ^ /Required/ "port"
  , V1HTTPGetAction -> Maybe Text
v1HTTPGetActionScheme :: !(Maybe Text) -- ^ "scheme" - Scheme to use for connecting to the host. Defaults to HTTP.
  } deriving (Int -> V1HTTPGetAction -> ShowS
[V1HTTPGetAction] -> ShowS
V1HTTPGetAction -> String
(Int -> V1HTTPGetAction -> ShowS)
-> (V1HTTPGetAction -> String)
-> ([V1HTTPGetAction] -> ShowS)
-> Show V1HTTPGetAction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1HTTPGetAction -> ShowS
showsPrec :: Int -> V1HTTPGetAction -> ShowS
$cshow :: V1HTTPGetAction -> String
show :: V1HTTPGetAction -> String
$cshowList :: [V1HTTPGetAction] -> ShowS
showList :: [V1HTTPGetAction] -> ShowS
P.Show, V1HTTPGetAction -> V1HTTPGetAction -> Bool
(V1HTTPGetAction -> V1HTTPGetAction -> Bool)
-> (V1HTTPGetAction -> V1HTTPGetAction -> Bool)
-> Eq V1HTTPGetAction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1HTTPGetAction -> V1HTTPGetAction -> Bool
== :: V1HTTPGetAction -> V1HTTPGetAction -> Bool
$c/= :: V1HTTPGetAction -> V1HTTPGetAction -> Bool
/= :: V1HTTPGetAction -> V1HTTPGetAction -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1HTTPGetAction
instance A.FromJSON V1HTTPGetAction where
  parseJSON :: Value -> Parser V1HTTPGetAction
parseJSON = String
-> (Object -> Parser V1HTTPGetAction)
-> Value
-> Parser V1HTTPGetAction
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1HTTPGetAction" ((Object -> Parser V1HTTPGetAction)
 -> Value -> Parser V1HTTPGetAction)
-> (Object -> Parser V1HTTPGetAction)
-> Value
-> Parser V1HTTPGetAction
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe [V1HTTPHeader]
-> Maybe Text
-> IntOrString
-> Maybe Text
-> V1HTTPGetAction
V1HTTPGetAction
      (Maybe Text
 -> Maybe [V1HTTPHeader]
 -> Maybe Text
 -> IntOrString
 -> Maybe Text
 -> V1HTTPGetAction)
-> Parser (Maybe Text)
-> Parser
     (Maybe [V1HTTPHeader]
      -> Maybe Text -> IntOrString -> Maybe Text -> V1HTTPGetAction)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"host")
      Parser
  (Maybe [V1HTTPHeader]
   -> Maybe Text -> IntOrString -> Maybe Text -> V1HTTPGetAction)
-> Parser (Maybe [V1HTTPHeader])
-> Parser
     (Maybe Text -> IntOrString -> Maybe Text -> V1HTTPGetAction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1HTTPHeader])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"httpHeaders")
      Parser (Maybe Text -> IntOrString -> Maybe Text -> V1HTTPGetAction)
-> Parser (Maybe Text)
-> Parser (IntOrString -> Maybe Text -> V1HTTPGetAction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"path")
      Parser (IntOrString -> Maybe Text -> V1HTTPGetAction)
-> Parser IntOrString -> Parser (Maybe Text -> V1HTTPGetAction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser IntOrString
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"port")
      Parser (Maybe Text -> V1HTTPGetAction)
-> Parser (Maybe Text) -> Parser V1HTTPGetAction
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"scheme")

-- | ToJSON V1HTTPGetAction
instance A.ToJSON V1HTTPGetAction where
  toJSON :: V1HTTPGetAction -> Value
toJSON V1HTTPGetAction {Maybe [V1HTTPHeader]
Maybe Text
IntOrString
$sel:v1HTTPGetActionHost:V1HTTPGetAction :: V1HTTPGetAction -> Maybe Text
$sel:v1HTTPGetActionHttpHeaders:V1HTTPGetAction :: V1HTTPGetAction -> Maybe [V1HTTPHeader]
$sel:v1HTTPGetActionPath:V1HTTPGetAction :: V1HTTPGetAction -> Maybe Text
$sel:v1HTTPGetActionPort:V1HTTPGetAction :: V1HTTPGetAction -> IntOrString
$sel:v1HTTPGetActionScheme:V1HTTPGetAction :: V1HTTPGetAction -> Maybe Text
v1HTTPGetActionHost :: Maybe Text
v1HTTPGetActionHttpHeaders :: Maybe [V1HTTPHeader]
v1HTTPGetActionPath :: Maybe Text
v1HTTPGetActionPort :: IntOrString
v1HTTPGetActionScheme :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"host" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1HTTPGetActionHost
      , Key
"httpHeaders" Key -> Maybe [V1HTTPHeader] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1HTTPHeader]
v1HTTPGetActionHttpHeaders
      , Key
"path" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1HTTPGetActionPath
      , Key
"port" Key -> IntOrString -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= IntOrString
v1HTTPGetActionPort
      , Key
"scheme" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1HTTPGetActionScheme
      ]


-- | Construct a value of type 'V1HTTPGetAction' (by applying it's required fields, if any)
mkV1HTTPGetAction
  :: IntOrString -- ^ 'v1HTTPGetActionPort' 
  -> V1HTTPGetAction
mkV1HTTPGetAction :: IntOrString -> V1HTTPGetAction
mkV1HTTPGetAction IntOrString
v1HTTPGetActionPort =
  V1HTTPGetAction
  { $sel:v1HTTPGetActionHost:V1HTTPGetAction :: Maybe Text
v1HTTPGetActionHost = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1HTTPGetActionHttpHeaders:V1HTTPGetAction :: Maybe [V1HTTPHeader]
v1HTTPGetActionHttpHeaders = Maybe [V1HTTPHeader]
forall a. Maybe a
Nothing
  , $sel:v1HTTPGetActionPath:V1HTTPGetAction :: Maybe Text
v1HTTPGetActionPath = Maybe Text
forall a. Maybe a
Nothing
  , IntOrString
$sel:v1HTTPGetActionPort:V1HTTPGetAction :: IntOrString
v1HTTPGetActionPort :: IntOrString
v1HTTPGetActionPort
  , $sel:v1HTTPGetActionScheme:V1HTTPGetAction :: Maybe Text
v1HTTPGetActionScheme = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1HTTPHeader
-- | V1HTTPHeader
-- HTTPHeader describes a custom header to be used in HTTP probes
data V1HTTPHeader = V1HTTPHeader
  { V1HTTPHeader -> Text
v1HTTPHeaderName :: !(Text) -- ^ /Required/ "name" - The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header.
  , V1HTTPHeader -> Text
v1HTTPHeaderValue :: !(Text) -- ^ /Required/ "value" - The header field value
  } deriving (Int -> V1HTTPHeader -> ShowS
[V1HTTPHeader] -> ShowS
V1HTTPHeader -> String
(Int -> V1HTTPHeader -> ShowS)
-> (V1HTTPHeader -> String)
-> ([V1HTTPHeader] -> ShowS)
-> Show V1HTTPHeader
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1HTTPHeader -> ShowS
showsPrec :: Int -> V1HTTPHeader -> ShowS
$cshow :: V1HTTPHeader -> String
show :: V1HTTPHeader -> String
$cshowList :: [V1HTTPHeader] -> ShowS
showList :: [V1HTTPHeader] -> ShowS
P.Show, V1HTTPHeader -> V1HTTPHeader -> Bool
(V1HTTPHeader -> V1HTTPHeader -> Bool)
-> (V1HTTPHeader -> V1HTTPHeader -> Bool) -> Eq V1HTTPHeader
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1HTTPHeader -> V1HTTPHeader -> Bool
== :: V1HTTPHeader -> V1HTTPHeader -> Bool
$c/= :: V1HTTPHeader -> V1HTTPHeader -> Bool
/= :: V1HTTPHeader -> V1HTTPHeader -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1HTTPHeader
instance A.FromJSON V1HTTPHeader where
  parseJSON :: Value -> Parser V1HTTPHeader
parseJSON = String
-> (Object -> Parser V1HTTPHeader) -> Value -> Parser V1HTTPHeader
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1HTTPHeader" ((Object -> Parser V1HTTPHeader) -> Value -> Parser V1HTTPHeader)
-> (Object -> Parser V1HTTPHeader) -> Value -> Parser V1HTTPHeader
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Text -> V1HTTPHeader
V1HTTPHeader
      (Text -> Text -> V1HTTPHeader)
-> Parser Text -> Parser (Text -> V1HTTPHeader)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser (Text -> V1HTTPHeader) -> Parser Text -> Parser V1HTTPHeader
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"value")

-- | ToJSON V1HTTPHeader
instance A.ToJSON V1HTTPHeader where
  toJSON :: V1HTTPHeader -> Value
toJSON V1HTTPHeader {Text
$sel:v1HTTPHeaderName:V1HTTPHeader :: V1HTTPHeader -> Text
$sel:v1HTTPHeaderValue:V1HTTPHeader :: V1HTTPHeader -> Text
v1HTTPHeaderName :: Text
v1HTTPHeaderValue :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1HTTPHeaderName
      , Key
"value" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1HTTPHeaderValue
      ]


-- | Construct a value of type 'V1HTTPHeader' (by applying it's required fields, if any)
mkV1HTTPHeader
  :: Text -- ^ 'v1HTTPHeaderName': The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header.
  -> Text -- ^ 'v1HTTPHeaderValue': The header field value
  -> V1HTTPHeader
mkV1HTTPHeader :: Text -> Text -> V1HTTPHeader
mkV1HTTPHeader Text
v1HTTPHeaderName Text
v1HTTPHeaderValue =
  V1HTTPHeader
  { Text
$sel:v1HTTPHeaderName:V1HTTPHeader :: Text
v1HTTPHeaderName :: Text
v1HTTPHeaderName
  , Text
$sel:v1HTTPHeaderValue:V1HTTPHeader :: Text
v1HTTPHeaderValue :: Text
v1HTTPHeaderValue
  }

-- ** V1HTTPIngressPath
-- | V1HTTPIngressPath
-- HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend.
data V1HTTPIngressPath = V1HTTPIngressPath
  { V1HTTPIngressPath -> V1IngressBackend
v1HTTPIngressPathBackend :: !(V1IngressBackend) -- ^ /Required/ "backend"
  , V1HTTPIngressPath -> Maybe Text
v1HTTPIngressPathPath :: !(Maybe Text) -- ^ "path" - path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \&quot;path\&quot; part of a URL as defined by RFC 3986. Paths must begin with a &#39;/&#39; and must be present when using PathType with value \&quot;Exact\&quot; or \&quot;Prefix\&quot;.
  , V1HTTPIngressPath -> Text
v1HTTPIngressPathPathType :: !(Text) -- ^ /Required/ "pathType" - pathType determines the interpretation of the path matching. PathType can be one of the following values: * Exact: Matches the URL path exactly. * Prefix: Matches based on a URL path prefix split by &#39;/&#39;. Matching is   done on a path element by element basis. A path element refers is the   list of labels in the path split by the &#39;/&#39; separator. A request is a   match for path p if every p is an element-wise prefix of p of the   request path. Note that if the last element of the path is a substring   of the last element in request path, it is not a match (e.g. /foo/bar   matches /foo/bar/baz, but does not match /foo/barbaz). * ImplementationSpecific: Interpretation of the Path matching is up to   the IngressClass. Implementations can treat this as a separate PathType   or treat it identically to Prefix or Exact path types. Implementations are required to support all path types.
  } deriving (Int -> V1HTTPIngressPath -> ShowS
[V1HTTPIngressPath] -> ShowS
V1HTTPIngressPath -> String
(Int -> V1HTTPIngressPath -> ShowS)
-> (V1HTTPIngressPath -> String)
-> ([V1HTTPIngressPath] -> ShowS)
-> Show V1HTTPIngressPath
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1HTTPIngressPath -> ShowS
showsPrec :: Int -> V1HTTPIngressPath -> ShowS
$cshow :: V1HTTPIngressPath -> String
show :: V1HTTPIngressPath -> String
$cshowList :: [V1HTTPIngressPath] -> ShowS
showList :: [V1HTTPIngressPath] -> ShowS
P.Show, V1HTTPIngressPath -> V1HTTPIngressPath -> Bool
(V1HTTPIngressPath -> V1HTTPIngressPath -> Bool)
-> (V1HTTPIngressPath -> V1HTTPIngressPath -> Bool)
-> Eq V1HTTPIngressPath
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1HTTPIngressPath -> V1HTTPIngressPath -> Bool
== :: V1HTTPIngressPath -> V1HTTPIngressPath -> Bool
$c/= :: V1HTTPIngressPath -> V1HTTPIngressPath -> Bool
/= :: V1HTTPIngressPath -> V1HTTPIngressPath -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1HTTPIngressPath
instance A.FromJSON V1HTTPIngressPath where
  parseJSON :: Value -> Parser V1HTTPIngressPath
parseJSON = String
-> (Object -> Parser V1HTTPIngressPath)
-> Value
-> Parser V1HTTPIngressPath
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1HTTPIngressPath" ((Object -> Parser V1HTTPIngressPath)
 -> Value -> Parser V1HTTPIngressPath)
-> (Object -> Parser V1HTTPIngressPath)
-> Value
-> Parser V1HTTPIngressPath
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    V1IngressBackend -> Maybe Text -> Text -> V1HTTPIngressPath
V1HTTPIngressPath
      (V1IngressBackend -> Maybe Text -> Text -> V1HTTPIngressPath)
-> Parser V1IngressBackend
-> Parser (Maybe Text -> Text -> V1HTTPIngressPath)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser V1IngressBackend
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"backend")
      Parser (Maybe Text -> Text -> V1HTTPIngressPath)
-> Parser (Maybe Text) -> Parser (Text -> V1HTTPIngressPath)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"path")
      Parser (Text -> V1HTTPIngressPath)
-> Parser Text -> Parser V1HTTPIngressPath
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"pathType")

-- | ToJSON V1HTTPIngressPath
instance A.ToJSON V1HTTPIngressPath where
  toJSON :: V1HTTPIngressPath -> Value
toJSON V1HTTPIngressPath {Maybe Text
Text
V1IngressBackend
$sel:v1HTTPIngressPathBackend:V1HTTPIngressPath :: V1HTTPIngressPath -> V1IngressBackend
$sel:v1HTTPIngressPathPath:V1HTTPIngressPath :: V1HTTPIngressPath -> Maybe Text
$sel:v1HTTPIngressPathPathType:V1HTTPIngressPath :: V1HTTPIngressPath -> Text
v1HTTPIngressPathBackend :: V1IngressBackend
v1HTTPIngressPathPath :: Maybe Text
v1HTTPIngressPathPathType :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"backend" Key -> V1IngressBackend -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1IngressBackend
v1HTTPIngressPathBackend
      , Key
"path" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1HTTPIngressPathPath
      , Key
"pathType" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1HTTPIngressPathPathType
      ]


-- | Construct a value of type 'V1HTTPIngressPath' (by applying it's required fields, if any)
mkV1HTTPIngressPath
  :: V1IngressBackend -- ^ 'v1HTTPIngressPathBackend' 
  -> Text -- ^ 'v1HTTPIngressPathPathType': pathType determines the interpretation of the path matching. PathType can be one of the following values: * Exact: Matches the URL path exactly. * Prefix: Matches based on a URL path prefix split by '/'. Matching is   done on a path element by element basis. A path element refers is the   list of labels in the path split by the '/' separator. A request is a   match for path p if every p is an element-wise prefix of p of the   request path. Note that if the last element of the path is a substring   of the last element in request path, it is not a match (e.g. /foo/bar   matches /foo/bar/baz, but does not match /foo/barbaz). * ImplementationSpecific: Interpretation of the Path matching is up to   the IngressClass. Implementations can treat this as a separate PathType   or treat it identically to Prefix or Exact path types. Implementations are required to support all path types.
  -> V1HTTPIngressPath
mkV1HTTPIngressPath :: V1IngressBackend -> Text -> V1HTTPIngressPath
mkV1HTTPIngressPath V1IngressBackend
v1HTTPIngressPathBackend Text
v1HTTPIngressPathPathType =
  V1HTTPIngressPath
  { V1IngressBackend
$sel:v1HTTPIngressPathBackend:V1HTTPIngressPath :: V1IngressBackend
v1HTTPIngressPathBackend :: V1IngressBackend
v1HTTPIngressPathBackend
  , $sel:v1HTTPIngressPathPath:V1HTTPIngressPath :: Maybe Text
v1HTTPIngressPathPath = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1HTTPIngressPathPathType:V1HTTPIngressPath :: Text
v1HTTPIngressPathPathType :: Text
v1HTTPIngressPathPathType
  }

-- ** V1HTTPIngressRuleValue
-- | V1HTTPIngressRuleValue
-- HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http://<host>/<path>?<searchpart> -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'.
data V1HTTPIngressRuleValue = V1HTTPIngressRuleValue
  { V1HTTPIngressRuleValue -> [V1HTTPIngressPath]
v1HTTPIngressRuleValuePaths :: !([V1HTTPIngressPath]) -- ^ /Required/ "paths" - paths is a collection of paths that map requests to backends.
  } deriving (Int -> V1HTTPIngressRuleValue -> ShowS
[V1HTTPIngressRuleValue] -> ShowS
V1HTTPIngressRuleValue -> String
(Int -> V1HTTPIngressRuleValue -> ShowS)
-> (V1HTTPIngressRuleValue -> String)
-> ([V1HTTPIngressRuleValue] -> ShowS)
-> Show V1HTTPIngressRuleValue
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1HTTPIngressRuleValue -> ShowS
showsPrec :: Int -> V1HTTPIngressRuleValue -> ShowS
$cshow :: V1HTTPIngressRuleValue -> String
show :: V1HTTPIngressRuleValue -> String
$cshowList :: [V1HTTPIngressRuleValue] -> ShowS
showList :: [V1HTTPIngressRuleValue] -> ShowS
P.Show, V1HTTPIngressRuleValue -> V1HTTPIngressRuleValue -> Bool
(V1HTTPIngressRuleValue -> V1HTTPIngressRuleValue -> Bool)
-> (V1HTTPIngressRuleValue -> V1HTTPIngressRuleValue -> Bool)
-> Eq V1HTTPIngressRuleValue
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1HTTPIngressRuleValue -> V1HTTPIngressRuleValue -> Bool
== :: V1HTTPIngressRuleValue -> V1HTTPIngressRuleValue -> Bool
$c/= :: V1HTTPIngressRuleValue -> V1HTTPIngressRuleValue -> Bool
/= :: V1HTTPIngressRuleValue -> V1HTTPIngressRuleValue -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1HTTPIngressRuleValue
instance A.FromJSON V1HTTPIngressRuleValue where
  parseJSON :: Value -> Parser V1HTTPIngressRuleValue
parseJSON = String
-> (Object -> Parser V1HTTPIngressRuleValue)
-> Value
-> Parser V1HTTPIngressRuleValue
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1HTTPIngressRuleValue" ((Object -> Parser V1HTTPIngressRuleValue)
 -> Value -> Parser V1HTTPIngressRuleValue)
-> (Object -> Parser V1HTTPIngressRuleValue)
-> Value
-> Parser V1HTTPIngressRuleValue
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    [V1HTTPIngressPath] -> V1HTTPIngressRuleValue
V1HTTPIngressRuleValue
      ([V1HTTPIngressPath] -> V1HTTPIngressRuleValue)
-> Parser [V1HTTPIngressPath] -> Parser V1HTTPIngressRuleValue
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser [V1HTTPIngressPath]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"paths")

-- | ToJSON V1HTTPIngressRuleValue
instance A.ToJSON V1HTTPIngressRuleValue where
  toJSON :: V1HTTPIngressRuleValue -> Value
toJSON V1HTTPIngressRuleValue {[V1HTTPIngressPath]
$sel:v1HTTPIngressRuleValuePaths:V1HTTPIngressRuleValue :: V1HTTPIngressRuleValue -> [V1HTTPIngressPath]
v1HTTPIngressRuleValuePaths :: [V1HTTPIngressPath]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"paths" Key -> [V1HTTPIngressPath] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1HTTPIngressPath]
v1HTTPIngressRuleValuePaths
      ]


-- | Construct a value of type 'V1HTTPIngressRuleValue' (by applying it's required fields, if any)
mkV1HTTPIngressRuleValue
  :: [V1HTTPIngressPath] -- ^ 'v1HTTPIngressRuleValuePaths': paths is a collection of paths that map requests to backends.
  -> V1HTTPIngressRuleValue
mkV1HTTPIngressRuleValue :: [V1HTTPIngressPath] -> V1HTTPIngressRuleValue
mkV1HTTPIngressRuleValue [V1HTTPIngressPath]
v1HTTPIngressRuleValuePaths =
  V1HTTPIngressRuleValue
  { [V1HTTPIngressPath]
$sel:v1HTTPIngressRuleValuePaths:V1HTTPIngressRuleValue :: [V1HTTPIngressPath]
v1HTTPIngressRuleValuePaths :: [V1HTTPIngressPath]
v1HTTPIngressRuleValuePaths
  }

-- ** V1HorizontalPodAutoscaler
-- | V1HorizontalPodAutoscaler
-- configuration of a horizontal pod autoscaler.
data V1HorizontalPodAutoscaler = V1HorizontalPodAutoscaler
  { V1HorizontalPodAutoscaler -> Maybe Text
v1HorizontalPodAutoscalerApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1HorizontalPodAutoscaler -> Maybe Text
v1HorizontalPodAutoscalerKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1HorizontalPodAutoscaler -> Maybe V1ObjectMeta
v1HorizontalPodAutoscalerMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1HorizontalPodAutoscaler -> Maybe V1HorizontalPodAutoscalerSpec
v1HorizontalPodAutoscalerSpec :: !(Maybe V1HorizontalPodAutoscalerSpec) -- ^ "spec"
  , V1HorizontalPodAutoscaler -> Maybe V1HorizontalPodAutoscalerStatus
v1HorizontalPodAutoscalerStatus :: !(Maybe V1HorizontalPodAutoscalerStatus) -- ^ "status"
  } deriving (Int -> V1HorizontalPodAutoscaler -> ShowS
[V1HorizontalPodAutoscaler] -> ShowS
V1HorizontalPodAutoscaler -> String
(Int -> V1HorizontalPodAutoscaler -> ShowS)
-> (V1HorizontalPodAutoscaler -> String)
-> ([V1HorizontalPodAutoscaler] -> ShowS)
-> Show V1HorizontalPodAutoscaler
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1HorizontalPodAutoscaler -> ShowS
showsPrec :: Int -> V1HorizontalPodAutoscaler -> ShowS
$cshow :: V1HorizontalPodAutoscaler -> String
show :: V1HorizontalPodAutoscaler -> String
$cshowList :: [V1HorizontalPodAutoscaler] -> ShowS
showList :: [V1HorizontalPodAutoscaler] -> ShowS
P.Show, V1HorizontalPodAutoscaler -> V1HorizontalPodAutoscaler -> Bool
(V1HorizontalPodAutoscaler -> V1HorizontalPodAutoscaler -> Bool)
-> (V1HorizontalPodAutoscaler -> V1HorizontalPodAutoscaler -> Bool)
-> Eq V1HorizontalPodAutoscaler
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1HorizontalPodAutoscaler -> V1HorizontalPodAutoscaler -> Bool
== :: V1HorizontalPodAutoscaler -> V1HorizontalPodAutoscaler -> Bool
$c/= :: V1HorizontalPodAutoscaler -> V1HorizontalPodAutoscaler -> Bool
/= :: V1HorizontalPodAutoscaler -> V1HorizontalPodAutoscaler -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1HorizontalPodAutoscaler
instance A.FromJSON V1HorizontalPodAutoscaler where
  parseJSON :: Value -> Parser V1HorizontalPodAutoscaler
parseJSON = String
-> (Object -> Parser V1HorizontalPodAutoscaler)
-> Value
-> Parser V1HorizontalPodAutoscaler
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1HorizontalPodAutoscaler" ((Object -> Parser V1HorizontalPodAutoscaler)
 -> Value -> Parser V1HorizontalPodAutoscaler)
-> (Object -> Parser V1HorizontalPodAutoscaler)
-> Value
-> Parser V1HorizontalPodAutoscaler
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1HorizontalPodAutoscalerSpec
-> Maybe V1HorizontalPodAutoscalerStatus
-> V1HorizontalPodAutoscaler
V1HorizontalPodAutoscaler
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1HorizontalPodAutoscalerSpec
 -> Maybe V1HorizontalPodAutoscalerStatus
 -> V1HorizontalPodAutoscaler)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1HorizontalPodAutoscalerSpec
      -> Maybe V1HorizontalPodAutoscalerStatus
      -> V1HorizontalPodAutoscaler)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1HorizontalPodAutoscalerSpec
   -> Maybe V1HorizontalPodAutoscalerStatus
   -> V1HorizontalPodAutoscaler)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1HorizontalPodAutoscalerSpec
      -> Maybe V1HorizontalPodAutoscalerStatus
      -> V1HorizontalPodAutoscaler)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1HorizontalPodAutoscalerSpec
   -> Maybe V1HorizontalPodAutoscalerStatus
   -> V1HorizontalPodAutoscaler)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe V1HorizontalPodAutoscalerSpec
      -> Maybe V1HorizontalPodAutoscalerStatus
      -> V1HorizontalPodAutoscaler)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (Maybe V1HorizontalPodAutoscalerSpec
   -> Maybe V1HorizontalPodAutoscalerStatus
   -> V1HorizontalPodAutoscaler)
-> Parser (Maybe V1HorizontalPodAutoscalerSpec)
-> Parser
     (Maybe V1HorizontalPodAutoscalerStatus
      -> V1HorizontalPodAutoscaler)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1HorizontalPodAutoscalerSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")
      Parser
  (Maybe V1HorizontalPodAutoscalerStatus
   -> V1HorizontalPodAutoscaler)
-> Parser (Maybe V1HorizontalPodAutoscalerStatus)
-> Parser V1HorizontalPodAutoscaler
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1HorizontalPodAutoscalerStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1HorizontalPodAutoscaler
instance A.ToJSON V1HorizontalPodAutoscaler where
  toJSON :: V1HorizontalPodAutoscaler -> Value
toJSON V1HorizontalPodAutoscaler {Maybe Text
Maybe V1ObjectMeta
Maybe V1HorizontalPodAutoscalerStatus
Maybe V1HorizontalPodAutoscalerSpec
$sel:v1HorizontalPodAutoscalerApiVersion:V1HorizontalPodAutoscaler :: V1HorizontalPodAutoscaler -> Maybe Text
$sel:v1HorizontalPodAutoscalerKind:V1HorizontalPodAutoscaler :: V1HorizontalPodAutoscaler -> Maybe Text
$sel:v1HorizontalPodAutoscalerMetadata:V1HorizontalPodAutoscaler :: V1HorizontalPodAutoscaler -> Maybe V1ObjectMeta
$sel:v1HorizontalPodAutoscalerSpec:V1HorizontalPodAutoscaler :: V1HorizontalPodAutoscaler -> Maybe V1HorizontalPodAutoscalerSpec
$sel:v1HorizontalPodAutoscalerStatus:V1HorizontalPodAutoscaler :: V1HorizontalPodAutoscaler -> Maybe V1HorizontalPodAutoscalerStatus
v1HorizontalPodAutoscalerApiVersion :: Maybe Text
v1HorizontalPodAutoscalerKind :: Maybe Text
v1HorizontalPodAutoscalerMetadata :: Maybe V1ObjectMeta
v1HorizontalPodAutoscalerSpec :: Maybe V1HorizontalPodAutoscalerSpec
v1HorizontalPodAutoscalerStatus :: Maybe V1HorizontalPodAutoscalerStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1HorizontalPodAutoscalerApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1HorizontalPodAutoscalerKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1HorizontalPodAutoscalerMetadata
      , Key
"spec" Key -> Maybe V1HorizontalPodAutoscalerSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1HorizontalPodAutoscalerSpec
v1HorizontalPodAutoscalerSpec
      , Key
"status" Key -> Maybe V1HorizontalPodAutoscalerStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1HorizontalPodAutoscalerStatus
v1HorizontalPodAutoscalerStatus
      ]


-- | Construct a value of type 'V1HorizontalPodAutoscaler' (by applying it's required fields, if any)
mkV1HorizontalPodAutoscaler
  :: V1HorizontalPodAutoscaler
mkV1HorizontalPodAutoscaler :: V1HorizontalPodAutoscaler
mkV1HorizontalPodAutoscaler =
  V1HorizontalPodAutoscaler
  { $sel:v1HorizontalPodAutoscalerApiVersion:V1HorizontalPodAutoscaler :: Maybe Text
v1HorizontalPodAutoscalerApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1HorizontalPodAutoscalerKind:V1HorizontalPodAutoscaler :: Maybe Text
v1HorizontalPodAutoscalerKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1HorizontalPodAutoscalerMetadata:V1HorizontalPodAutoscaler :: Maybe V1ObjectMeta
v1HorizontalPodAutoscalerMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1HorizontalPodAutoscalerSpec:V1HorizontalPodAutoscaler :: Maybe V1HorizontalPodAutoscalerSpec
v1HorizontalPodAutoscalerSpec = Maybe V1HorizontalPodAutoscalerSpec
forall a. Maybe a
Nothing
  , $sel:v1HorizontalPodAutoscalerStatus:V1HorizontalPodAutoscaler :: Maybe V1HorizontalPodAutoscalerStatus
v1HorizontalPodAutoscalerStatus = Maybe V1HorizontalPodAutoscalerStatus
forall a. Maybe a
Nothing
  }

-- ** V1HorizontalPodAutoscalerList
-- | V1HorizontalPodAutoscalerList
-- list of horizontal pod autoscaler objects.
data V1HorizontalPodAutoscalerList = V1HorizontalPodAutoscalerList
  { V1HorizontalPodAutoscalerList -> Maybe Text
v1HorizontalPodAutoscalerListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1HorizontalPodAutoscalerList -> [V1HorizontalPodAutoscaler]
v1HorizontalPodAutoscalerListItems :: !([V1HorizontalPodAutoscaler]) -- ^ /Required/ "items" - items is the list of horizontal pod autoscaler objects.
  , V1HorizontalPodAutoscalerList -> Maybe Text
v1HorizontalPodAutoscalerListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1HorizontalPodAutoscalerList -> Maybe V1ListMeta
v1HorizontalPodAutoscalerListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1HorizontalPodAutoscalerList -> ShowS
[V1HorizontalPodAutoscalerList] -> ShowS
V1HorizontalPodAutoscalerList -> String
(Int -> V1HorizontalPodAutoscalerList -> ShowS)
-> (V1HorizontalPodAutoscalerList -> String)
-> ([V1HorizontalPodAutoscalerList] -> ShowS)
-> Show V1HorizontalPodAutoscalerList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1HorizontalPodAutoscalerList -> ShowS
showsPrec :: Int -> V1HorizontalPodAutoscalerList -> ShowS
$cshow :: V1HorizontalPodAutoscalerList -> String
show :: V1HorizontalPodAutoscalerList -> String
$cshowList :: [V1HorizontalPodAutoscalerList] -> ShowS
showList :: [V1HorizontalPodAutoscalerList] -> ShowS
P.Show, V1HorizontalPodAutoscalerList
-> V1HorizontalPodAutoscalerList -> Bool
(V1HorizontalPodAutoscalerList
 -> V1HorizontalPodAutoscalerList -> Bool)
-> (V1HorizontalPodAutoscalerList
    -> V1HorizontalPodAutoscalerList -> Bool)
-> Eq V1HorizontalPodAutoscalerList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1HorizontalPodAutoscalerList
-> V1HorizontalPodAutoscalerList -> Bool
== :: V1HorizontalPodAutoscalerList
-> V1HorizontalPodAutoscalerList -> Bool
$c/= :: V1HorizontalPodAutoscalerList
-> V1HorizontalPodAutoscalerList -> Bool
/= :: V1HorizontalPodAutoscalerList
-> V1HorizontalPodAutoscalerList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1HorizontalPodAutoscalerList
instance A.FromJSON V1HorizontalPodAutoscalerList where
  parseJSON :: Value -> Parser V1HorizontalPodAutoscalerList
parseJSON = String
-> (Object -> Parser V1HorizontalPodAutoscalerList)
-> Value
-> Parser V1HorizontalPodAutoscalerList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1HorizontalPodAutoscalerList" ((Object -> Parser V1HorizontalPodAutoscalerList)
 -> Value -> Parser V1HorizontalPodAutoscalerList)
-> (Object -> Parser V1HorizontalPodAutoscalerList)
-> Value
-> Parser V1HorizontalPodAutoscalerList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1HorizontalPodAutoscaler]
-> Maybe Text
-> Maybe V1ListMeta
-> V1HorizontalPodAutoscalerList
V1HorizontalPodAutoscalerList
      (Maybe Text
 -> [V1HorizontalPodAutoscaler]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1HorizontalPodAutoscalerList)
-> Parser (Maybe Text)
-> Parser
     ([V1HorizontalPodAutoscaler]
      -> Maybe Text -> Maybe V1ListMeta -> V1HorizontalPodAutoscalerList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1HorizontalPodAutoscaler]
   -> Maybe Text -> Maybe V1ListMeta -> V1HorizontalPodAutoscalerList)
-> Parser [V1HorizontalPodAutoscaler]
-> Parser
     (Maybe Text -> Maybe V1ListMeta -> V1HorizontalPodAutoscalerList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1HorizontalPodAutoscaler]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser
  (Maybe Text -> Maybe V1ListMeta -> V1HorizontalPodAutoscalerList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1HorizontalPodAutoscalerList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1HorizontalPodAutoscalerList)
-> Parser (Maybe V1ListMeta)
-> Parser V1HorizontalPodAutoscalerList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1HorizontalPodAutoscalerList
instance A.ToJSON V1HorizontalPodAutoscalerList where
  toJSON :: V1HorizontalPodAutoscalerList -> Value
toJSON V1HorizontalPodAutoscalerList {[V1HorizontalPodAutoscaler]
Maybe Text
Maybe V1ListMeta
$sel:v1HorizontalPodAutoscalerListApiVersion:V1HorizontalPodAutoscalerList :: V1HorizontalPodAutoscalerList -> Maybe Text
$sel:v1HorizontalPodAutoscalerListItems:V1HorizontalPodAutoscalerList :: V1HorizontalPodAutoscalerList -> [V1HorizontalPodAutoscaler]
$sel:v1HorizontalPodAutoscalerListKind:V1HorizontalPodAutoscalerList :: V1HorizontalPodAutoscalerList -> Maybe Text
$sel:v1HorizontalPodAutoscalerListMetadata:V1HorizontalPodAutoscalerList :: V1HorizontalPodAutoscalerList -> Maybe V1ListMeta
v1HorizontalPodAutoscalerListApiVersion :: Maybe Text
v1HorizontalPodAutoscalerListItems :: [V1HorizontalPodAutoscaler]
v1HorizontalPodAutoscalerListKind :: Maybe Text
v1HorizontalPodAutoscalerListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1HorizontalPodAutoscalerListApiVersion
      , Key
"items" Key -> [V1HorizontalPodAutoscaler] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1HorizontalPodAutoscaler]
v1HorizontalPodAutoscalerListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1HorizontalPodAutoscalerListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1HorizontalPodAutoscalerListMetadata
      ]


-- | Construct a value of type 'V1HorizontalPodAutoscalerList' (by applying it's required fields, if any)
mkV1HorizontalPodAutoscalerList
  :: [V1HorizontalPodAutoscaler] -- ^ 'v1HorizontalPodAutoscalerListItems': items is the list of horizontal pod autoscaler objects.
  -> V1HorizontalPodAutoscalerList
mkV1HorizontalPodAutoscalerList :: [V1HorizontalPodAutoscaler] -> V1HorizontalPodAutoscalerList
mkV1HorizontalPodAutoscalerList [V1HorizontalPodAutoscaler]
v1HorizontalPodAutoscalerListItems =
  V1HorizontalPodAutoscalerList
  { $sel:v1HorizontalPodAutoscalerListApiVersion:V1HorizontalPodAutoscalerList :: Maybe Text
v1HorizontalPodAutoscalerListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1HorizontalPodAutoscaler]
$sel:v1HorizontalPodAutoscalerListItems:V1HorizontalPodAutoscalerList :: [V1HorizontalPodAutoscaler]
v1HorizontalPodAutoscalerListItems :: [V1HorizontalPodAutoscaler]
v1HorizontalPodAutoscalerListItems
  , $sel:v1HorizontalPodAutoscalerListKind:V1HorizontalPodAutoscalerList :: Maybe Text
v1HorizontalPodAutoscalerListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1HorizontalPodAutoscalerListMetadata:V1HorizontalPodAutoscalerList :: Maybe V1ListMeta
v1HorizontalPodAutoscalerListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1HorizontalPodAutoscalerSpec
-- | V1HorizontalPodAutoscalerSpec
-- specification of a horizontal pod autoscaler.
data V1HorizontalPodAutoscalerSpec = V1HorizontalPodAutoscalerSpec
  { V1HorizontalPodAutoscalerSpec -> Int
v1HorizontalPodAutoscalerSpecMaxReplicas :: !(Int) -- ^ /Required/ "maxReplicas" - maxReplicas is the upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.
  , V1HorizontalPodAutoscalerSpec -> Maybe Int
v1HorizontalPodAutoscalerSpecMinReplicas :: !(Maybe Int) -- ^ "minReplicas" - minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down.  It defaults to 1 pod.  minReplicas is allowed to be 0 if the alpha feature gate HPAScaleToZero is enabled and at least one Object or External metric is configured.  Scaling is active as long as at least one metric value is available.
  , V1HorizontalPodAutoscalerSpec -> V1CrossVersionObjectReference
v1HorizontalPodAutoscalerSpecScaleTargetRef :: !(V1CrossVersionObjectReference) -- ^ /Required/ "scaleTargetRef"
  , V1HorizontalPodAutoscalerSpec -> Maybe Int
v1HorizontalPodAutoscalerSpecTargetCpuUtilizationPercentage :: !(Maybe Int) -- ^ "targetCPUUtilizationPercentage" - targetCPUUtilizationPercentage is the target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used.
  } deriving (Int -> V1HorizontalPodAutoscalerSpec -> ShowS
[V1HorizontalPodAutoscalerSpec] -> ShowS
V1HorizontalPodAutoscalerSpec -> String
(Int -> V1HorizontalPodAutoscalerSpec -> ShowS)
-> (V1HorizontalPodAutoscalerSpec -> String)
-> ([V1HorizontalPodAutoscalerSpec] -> ShowS)
-> Show V1HorizontalPodAutoscalerSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1HorizontalPodAutoscalerSpec -> ShowS
showsPrec :: Int -> V1HorizontalPodAutoscalerSpec -> ShowS
$cshow :: V1HorizontalPodAutoscalerSpec -> String
show :: V1HorizontalPodAutoscalerSpec -> String
$cshowList :: [V1HorizontalPodAutoscalerSpec] -> ShowS
showList :: [V1HorizontalPodAutoscalerSpec] -> ShowS
P.Show, V1HorizontalPodAutoscalerSpec
-> V1HorizontalPodAutoscalerSpec -> Bool
(V1HorizontalPodAutoscalerSpec
 -> V1HorizontalPodAutoscalerSpec -> Bool)
-> (V1HorizontalPodAutoscalerSpec
    -> V1HorizontalPodAutoscalerSpec -> Bool)
-> Eq V1HorizontalPodAutoscalerSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1HorizontalPodAutoscalerSpec
-> V1HorizontalPodAutoscalerSpec -> Bool
== :: V1HorizontalPodAutoscalerSpec
-> V1HorizontalPodAutoscalerSpec -> Bool
$c/= :: V1HorizontalPodAutoscalerSpec
-> V1HorizontalPodAutoscalerSpec -> Bool
/= :: V1HorizontalPodAutoscalerSpec
-> V1HorizontalPodAutoscalerSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1HorizontalPodAutoscalerSpec
instance A.FromJSON V1HorizontalPodAutoscalerSpec where
  parseJSON :: Value -> Parser V1HorizontalPodAutoscalerSpec
parseJSON = String
-> (Object -> Parser V1HorizontalPodAutoscalerSpec)
-> Value
-> Parser V1HorizontalPodAutoscalerSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1HorizontalPodAutoscalerSpec" ((Object -> Parser V1HorizontalPodAutoscalerSpec)
 -> Value -> Parser V1HorizontalPodAutoscalerSpec)
-> (Object -> Parser V1HorizontalPodAutoscalerSpec)
-> Value
-> Parser V1HorizontalPodAutoscalerSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Int
-> Maybe Int
-> V1CrossVersionObjectReference
-> Maybe Int
-> V1HorizontalPodAutoscalerSpec
V1HorizontalPodAutoscalerSpec
      (Int
 -> Maybe Int
 -> V1CrossVersionObjectReference
 -> Maybe Int
 -> V1HorizontalPodAutoscalerSpec)
-> Parser Int
-> Parser
     (Maybe Int
      -> V1CrossVersionObjectReference
      -> Maybe Int
      -> V1HorizontalPodAutoscalerSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"maxReplicas")
      Parser
  (Maybe Int
   -> V1CrossVersionObjectReference
   -> Maybe Int
   -> V1HorizontalPodAutoscalerSpec)
-> Parser (Maybe Int)
-> Parser
     (V1CrossVersionObjectReference
      -> Maybe Int -> V1HorizontalPodAutoscalerSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"minReplicas")
      Parser
  (V1CrossVersionObjectReference
   -> Maybe Int -> V1HorizontalPodAutoscalerSpec)
-> Parser V1CrossVersionObjectReference
-> Parser (Maybe Int -> V1HorizontalPodAutoscalerSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1CrossVersionObjectReference
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"scaleTargetRef")
      Parser (Maybe Int -> V1HorizontalPodAutoscalerSpec)
-> Parser (Maybe Int) -> Parser V1HorizontalPodAutoscalerSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"targetCPUUtilizationPercentage")

-- | ToJSON V1HorizontalPodAutoscalerSpec
instance A.ToJSON V1HorizontalPodAutoscalerSpec where
  toJSON :: V1HorizontalPodAutoscalerSpec -> Value
toJSON V1HorizontalPodAutoscalerSpec {Int
Maybe Int
V1CrossVersionObjectReference
$sel:v1HorizontalPodAutoscalerSpecMaxReplicas:V1HorizontalPodAutoscalerSpec :: V1HorizontalPodAutoscalerSpec -> Int
$sel:v1HorizontalPodAutoscalerSpecMinReplicas:V1HorizontalPodAutoscalerSpec :: V1HorizontalPodAutoscalerSpec -> Maybe Int
$sel:v1HorizontalPodAutoscalerSpecScaleTargetRef:V1HorizontalPodAutoscalerSpec :: V1HorizontalPodAutoscalerSpec -> V1CrossVersionObjectReference
$sel:v1HorizontalPodAutoscalerSpecTargetCpuUtilizationPercentage:V1HorizontalPodAutoscalerSpec :: V1HorizontalPodAutoscalerSpec -> Maybe Int
v1HorizontalPodAutoscalerSpecMaxReplicas :: Int
v1HorizontalPodAutoscalerSpecMinReplicas :: Maybe Int
v1HorizontalPodAutoscalerSpecScaleTargetRef :: V1CrossVersionObjectReference
v1HorizontalPodAutoscalerSpecTargetCpuUtilizationPercentage :: Maybe Int
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"maxReplicas" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v1HorizontalPodAutoscalerSpecMaxReplicas
      , Key
"minReplicas" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1HorizontalPodAutoscalerSpecMinReplicas
      , Key
"scaleTargetRef" Key -> V1CrossVersionObjectReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1CrossVersionObjectReference
v1HorizontalPodAutoscalerSpecScaleTargetRef
      , Key
"targetCPUUtilizationPercentage" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1HorizontalPodAutoscalerSpecTargetCpuUtilizationPercentage
      ]


-- | Construct a value of type 'V1HorizontalPodAutoscalerSpec' (by applying it's required fields, if any)
mkV1HorizontalPodAutoscalerSpec
  :: Int -- ^ 'v1HorizontalPodAutoscalerSpecMaxReplicas': maxReplicas is the upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.
  -> V1CrossVersionObjectReference -- ^ 'v1HorizontalPodAutoscalerSpecScaleTargetRef' 
  -> V1HorizontalPodAutoscalerSpec
mkV1HorizontalPodAutoscalerSpec :: Int
-> V1CrossVersionObjectReference -> V1HorizontalPodAutoscalerSpec
mkV1HorizontalPodAutoscalerSpec Int
v1HorizontalPodAutoscalerSpecMaxReplicas V1CrossVersionObjectReference
v1HorizontalPodAutoscalerSpecScaleTargetRef =
  V1HorizontalPodAutoscalerSpec
  { Int
$sel:v1HorizontalPodAutoscalerSpecMaxReplicas:V1HorizontalPodAutoscalerSpec :: Int
v1HorizontalPodAutoscalerSpecMaxReplicas :: Int
v1HorizontalPodAutoscalerSpecMaxReplicas
  , $sel:v1HorizontalPodAutoscalerSpecMinReplicas:V1HorizontalPodAutoscalerSpec :: Maybe Int
v1HorizontalPodAutoscalerSpecMinReplicas = Maybe Int
forall a. Maybe a
Nothing
  , V1CrossVersionObjectReference
$sel:v1HorizontalPodAutoscalerSpecScaleTargetRef:V1HorizontalPodAutoscalerSpec :: V1CrossVersionObjectReference
v1HorizontalPodAutoscalerSpecScaleTargetRef :: V1CrossVersionObjectReference
v1HorizontalPodAutoscalerSpecScaleTargetRef
  , $sel:v1HorizontalPodAutoscalerSpecTargetCpuUtilizationPercentage:V1HorizontalPodAutoscalerSpec :: Maybe Int
v1HorizontalPodAutoscalerSpecTargetCpuUtilizationPercentage = Maybe Int
forall a. Maybe a
Nothing
  }

-- ** V1HorizontalPodAutoscalerStatus
-- | V1HorizontalPodAutoscalerStatus
-- current status of a horizontal pod autoscaler
data V1HorizontalPodAutoscalerStatus = V1HorizontalPodAutoscalerStatus
  { V1HorizontalPodAutoscalerStatus -> Maybe Int
v1HorizontalPodAutoscalerStatusCurrentCpuUtilizationPercentage :: !(Maybe Int) -- ^ "currentCPUUtilizationPercentage" - currentCPUUtilizationPercentage is the current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU.
  , V1HorizontalPodAutoscalerStatus -> Int
v1HorizontalPodAutoscalerStatusCurrentReplicas :: !(Int) -- ^ /Required/ "currentReplicas" - currentReplicas is the current number of replicas of pods managed by this autoscaler.
  , V1HorizontalPodAutoscalerStatus -> Int
v1HorizontalPodAutoscalerStatusDesiredReplicas :: !(Int) -- ^ /Required/ "desiredReplicas" - desiredReplicas is the  desired number of replicas of pods managed by this autoscaler.
  , V1HorizontalPodAutoscalerStatus -> Maybe DateTime
v1HorizontalPodAutoscalerStatusLastScaleTime :: !(Maybe DateTime) -- ^ "lastScaleTime" - lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed.
  , V1HorizontalPodAutoscalerStatus -> Maybe Integer
v1HorizontalPodAutoscalerStatusObservedGeneration :: !(Maybe Integer) -- ^ "observedGeneration" - observedGeneration is the most recent generation observed by this autoscaler.
  } deriving (Int -> V1HorizontalPodAutoscalerStatus -> ShowS
[V1HorizontalPodAutoscalerStatus] -> ShowS
V1HorizontalPodAutoscalerStatus -> String
(Int -> V1HorizontalPodAutoscalerStatus -> ShowS)
-> (V1HorizontalPodAutoscalerStatus -> String)
-> ([V1HorizontalPodAutoscalerStatus] -> ShowS)
-> Show V1HorizontalPodAutoscalerStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1HorizontalPodAutoscalerStatus -> ShowS
showsPrec :: Int -> V1HorizontalPodAutoscalerStatus -> ShowS
$cshow :: V1HorizontalPodAutoscalerStatus -> String
show :: V1HorizontalPodAutoscalerStatus -> String
$cshowList :: [V1HorizontalPodAutoscalerStatus] -> ShowS
showList :: [V1HorizontalPodAutoscalerStatus] -> ShowS
P.Show, V1HorizontalPodAutoscalerStatus
-> V1HorizontalPodAutoscalerStatus -> Bool
(V1HorizontalPodAutoscalerStatus
 -> V1HorizontalPodAutoscalerStatus -> Bool)
-> (V1HorizontalPodAutoscalerStatus
    -> V1HorizontalPodAutoscalerStatus -> Bool)
-> Eq V1HorizontalPodAutoscalerStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1HorizontalPodAutoscalerStatus
-> V1HorizontalPodAutoscalerStatus -> Bool
== :: V1HorizontalPodAutoscalerStatus
-> V1HorizontalPodAutoscalerStatus -> Bool
$c/= :: V1HorizontalPodAutoscalerStatus
-> V1HorizontalPodAutoscalerStatus -> Bool
/= :: V1HorizontalPodAutoscalerStatus
-> V1HorizontalPodAutoscalerStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1HorizontalPodAutoscalerStatus
instance A.FromJSON V1HorizontalPodAutoscalerStatus where
  parseJSON :: Value -> Parser V1HorizontalPodAutoscalerStatus
parseJSON = String
-> (Object -> Parser V1HorizontalPodAutoscalerStatus)
-> Value
-> Parser V1HorizontalPodAutoscalerStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1HorizontalPodAutoscalerStatus" ((Object -> Parser V1HorizontalPodAutoscalerStatus)
 -> Value -> Parser V1HorizontalPodAutoscalerStatus)
-> (Object -> Parser V1HorizontalPodAutoscalerStatus)
-> Value
-> Parser V1HorizontalPodAutoscalerStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Int
-> Int
-> Int
-> Maybe DateTime
-> Maybe Integer
-> V1HorizontalPodAutoscalerStatus
V1HorizontalPodAutoscalerStatus
      (Maybe Int
 -> Int
 -> Int
 -> Maybe DateTime
 -> Maybe Integer
 -> V1HorizontalPodAutoscalerStatus)
-> Parser (Maybe Int)
-> Parser
     (Int
      -> Int
      -> Maybe DateTime
      -> Maybe Integer
      -> V1HorizontalPodAutoscalerStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"currentCPUUtilizationPercentage")
      Parser
  (Int
   -> Int
   -> Maybe DateTime
   -> Maybe Integer
   -> V1HorizontalPodAutoscalerStatus)
-> Parser Int
-> Parser
     (Int
      -> Maybe DateTime
      -> Maybe Integer
      -> V1HorizontalPodAutoscalerStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"currentReplicas")
      Parser
  (Int
   -> Maybe DateTime
   -> Maybe Integer
   -> V1HorizontalPodAutoscalerStatus)
-> Parser Int
-> Parser
     (Maybe DateTime
      -> Maybe Integer -> V1HorizontalPodAutoscalerStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"desiredReplicas")
      Parser
  (Maybe DateTime
   -> Maybe Integer -> V1HorizontalPodAutoscalerStatus)
-> Parser (Maybe DateTime)
-> Parser (Maybe Integer -> V1HorizontalPodAutoscalerStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lastScaleTime")
      Parser (Maybe Integer -> V1HorizontalPodAutoscalerStatus)
-> Parser (Maybe Integer) -> Parser V1HorizontalPodAutoscalerStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"observedGeneration")

-- | ToJSON V1HorizontalPodAutoscalerStatus
instance A.ToJSON V1HorizontalPodAutoscalerStatus where
  toJSON :: V1HorizontalPodAutoscalerStatus -> Value
toJSON V1HorizontalPodAutoscalerStatus {Int
Maybe Int
Maybe Integer
Maybe DateTime
$sel:v1HorizontalPodAutoscalerStatusCurrentCpuUtilizationPercentage:V1HorizontalPodAutoscalerStatus :: V1HorizontalPodAutoscalerStatus -> Maybe Int
$sel:v1HorizontalPodAutoscalerStatusCurrentReplicas:V1HorizontalPodAutoscalerStatus :: V1HorizontalPodAutoscalerStatus -> Int
$sel:v1HorizontalPodAutoscalerStatusDesiredReplicas:V1HorizontalPodAutoscalerStatus :: V1HorizontalPodAutoscalerStatus -> Int
$sel:v1HorizontalPodAutoscalerStatusLastScaleTime:V1HorizontalPodAutoscalerStatus :: V1HorizontalPodAutoscalerStatus -> Maybe DateTime
$sel:v1HorizontalPodAutoscalerStatusObservedGeneration:V1HorizontalPodAutoscalerStatus :: V1HorizontalPodAutoscalerStatus -> Maybe Integer
v1HorizontalPodAutoscalerStatusCurrentCpuUtilizationPercentage :: Maybe Int
v1HorizontalPodAutoscalerStatusCurrentReplicas :: Int
v1HorizontalPodAutoscalerStatusDesiredReplicas :: Int
v1HorizontalPodAutoscalerStatusLastScaleTime :: Maybe DateTime
v1HorizontalPodAutoscalerStatusObservedGeneration :: Maybe Integer
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"currentCPUUtilizationPercentage" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1HorizontalPodAutoscalerStatusCurrentCpuUtilizationPercentage
      , Key
"currentReplicas" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v1HorizontalPodAutoscalerStatusCurrentReplicas
      , Key
"desiredReplicas" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v1HorizontalPodAutoscalerStatusDesiredReplicas
      , Key
"lastScaleTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1HorizontalPodAutoscalerStatusLastScaleTime
      , Key
"observedGeneration" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1HorizontalPodAutoscalerStatusObservedGeneration
      ]


-- | Construct a value of type 'V1HorizontalPodAutoscalerStatus' (by applying it's required fields, if any)
mkV1HorizontalPodAutoscalerStatus
  :: Int -- ^ 'v1HorizontalPodAutoscalerStatusCurrentReplicas': currentReplicas is the current number of replicas of pods managed by this autoscaler.
  -> Int -- ^ 'v1HorizontalPodAutoscalerStatusDesiredReplicas': desiredReplicas is the  desired number of replicas of pods managed by this autoscaler.
  -> V1HorizontalPodAutoscalerStatus
mkV1HorizontalPodAutoscalerStatus :: Int -> Int -> V1HorizontalPodAutoscalerStatus
mkV1HorizontalPodAutoscalerStatus Int
v1HorizontalPodAutoscalerStatusCurrentReplicas Int
v1HorizontalPodAutoscalerStatusDesiredReplicas =
  V1HorizontalPodAutoscalerStatus
  { $sel:v1HorizontalPodAutoscalerStatusCurrentCpuUtilizationPercentage:V1HorizontalPodAutoscalerStatus :: Maybe Int
v1HorizontalPodAutoscalerStatusCurrentCpuUtilizationPercentage = Maybe Int
forall a. Maybe a
Nothing
  , Int
$sel:v1HorizontalPodAutoscalerStatusCurrentReplicas:V1HorizontalPodAutoscalerStatus :: Int
v1HorizontalPodAutoscalerStatusCurrentReplicas :: Int
v1HorizontalPodAutoscalerStatusCurrentReplicas
  , Int
$sel:v1HorizontalPodAutoscalerStatusDesiredReplicas:V1HorizontalPodAutoscalerStatus :: Int
v1HorizontalPodAutoscalerStatusDesiredReplicas :: Int
v1HorizontalPodAutoscalerStatusDesiredReplicas
  , $sel:v1HorizontalPodAutoscalerStatusLastScaleTime:V1HorizontalPodAutoscalerStatus :: Maybe DateTime
v1HorizontalPodAutoscalerStatusLastScaleTime = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1HorizontalPodAutoscalerStatusObservedGeneration:V1HorizontalPodAutoscalerStatus :: Maybe Integer
v1HorizontalPodAutoscalerStatusObservedGeneration = Maybe Integer
forall a. Maybe a
Nothing
  }

-- ** V1HostAlias
-- | V1HostAlias
-- HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file.
data V1HostAlias = V1HostAlias
  { V1HostAlias -> Maybe [Text]
v1HostAliasHostnames :: !(Maybe [Text]) -- ^ "hostnames" - Hostnames for the above IP address.
  , V1HostAlias -> Text
v1HostAliasIp :: !(Text) -- ^ /Required/ "ip" - IP address of the host file entry.
  } deriving (Int -> V1HostAlias -> ShowS
[V1HostAlias] -> ShowS
V1HostAlias -> String
(Int -> V1HostAlias -> ShowS)
-> (V1HostAlias -> String)
-> ([V1HostAlias] -> ShowS)
-> Show V1HostAlias
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1HostAlias -> ShowS
showsPrec :: Int -> V1HostAlias -> ShowS
$cshow :: V1HostAlias -> String
show :: V1HostAlias -> String
$cshowList :: [V1HostAlias] -> ShowS
showList :: [V1HostAlias] -> ShowS
P.Show, V1HostAlias -> V1HostAlias -> Bool
(V1HostAlias -> V1HostAlias -> Bool)
-> (V1HostAlias -> V1HostAlias -> Bool) -> Eq V1HostAlias
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1HostAlias -> V1HostAlias -> Bool
== :: V1HostAlias -> V1HostAlias -> Bool
$c/= :: V1HostAlias -> V1HostAlias -> Bool
/= :: V1HostAlias -> V1HostAlias -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1HostAlias
instance A.FromJSON V1HostAlias where
  parseJSON :: Value -> Parser V1HostAlias
parseJSON = String
-> (Object -> Parser V1HostAlias) -> Value -> Parser V1HostAlias
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1HostAlias" ((Object -> Parser V1HostAlias) -> Value -> Parser V1HostAlias)
-> (Object -> Parser V1HostAlias) -> Value -> Parser V1HostAlias
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [Text] -> Text -> V1HostAlias
V1HostAlias
      (Maybe [Text] -> Text -> V1HostAlias)
-> Parser (Maybe [Text]) -> Parser (Text -> V1HostAlias)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"hostnames")
      Parser (Text -> V1HostAlias) -> Parser Text -> Parser V1HostAlias
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"ip")

-- | ToJSON V1HostAlias
instance A.ToJSON V1HostAlias where
  toJSON :: V1HostAlias -> Value
toJSON V1HostAlias {Maybe [Text]
Text
$sel:v1HostAliasHostnames:V1HostAlias :: V1HostAlias -> Maybe [Text]
$sel:v1HostAliasIp:V1HostAlias :: V1HostAlias -> Text
v1HostAliasHostnames :: Maybe [Text]
v1HostAliasIp :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"hostnames" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1HostAliasHostnames
      , Key
"ip" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1HostAliasIp
      ]


-- | Construct a value of type 'V1HostAlias' (by applying it's required fields, if any)
mkV1HostAlias
  :: Text -- ^ 'v1HostAliasIp': IP address of the host file entry.
  -> V1HostAlias
mkV1HostAlias :: Text -> V1HostAlias
mkV1HostAlias Text
v1HostAliasIp =
  V1HostAlias
  { $sel:v1HostAliasHostnames:V1HostAlias :: Maybe [Text]
v1HostAliasHostnames = Maybe [Text]
forall a. Maybe a
Nothing
  , Text
$sel:v1HostAliasIp:V1HostAlias :: Text
v1HostAliasIp :: Text
v1HostAliasIp
  }

-- ** V1HostIP
-- | V1HostIP
-- HostIP represents a single IP address allocated to the host.
data V1HostIP = V1HostIP
  { V1HostIP -> Text
v1HostIPIp :: !(Text) -- ^ /Required/ "ip" - IP is the IP address assigned to the host
  } deriving (Int -> V1HostIP -> ShowS
[V1HostIP] -> ShowS
V1HostIP -> String
(Int -> V1HostIP -> ShowS)
-> (V1HostIP -> String) -> ([V1HostIP] -> ShowS) -> Show V1HostIP
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1HostIP -> ShowS
showsPrec :: Int -> V1HostIP -> ShowS
$cshow :: V1HostIP -> String
show :: V1HostIP -> String
$cshowList :: [V1HostIP] -> ShowS
showList :: [V1HostIP] -> ShowS
P.Show, V1HostIP -> V1HostIP -> Bool
(V1HostIP -> V1HostIP -> Bool)
-> (V1HostIP -> V1HostIP -> Bool) -> Eq V1HostIP
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1HostIP -> V1HostIP -> Bool
== :: V1HostIP -> V1HostIP -> Bool
$c/= :: V1HostIP -> V1HostIP -> Bool
/= :: V1HostIP -> V1HostIP -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1HostIP
instance A.FromJSON V1HostIP where
  parseJSON :: Value -> Parser V1HostIP
parseJSON = String -> (Object -> Parser V1HostIP) -> Value -> Parser V1HostIP
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1HostIP" ((Object -> Parser V1HostIP) -> Value -> Parser V1HostIP)
-> (Object -> Parser V1HostIP) -> Value -> Parser V1HostIP
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> V1HostIP
V1HostIP
      (Text -> V1HostIP) -> Parser Text -> Parser V1HostIP
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"ip")

-- | ToJSON V1HostIP
instance A.ToJSON V1HostIP where
  toJSON :: V1HostIP -> Value
toJSON V1HostIP {Text
$sel:v1HostIPIp:V1HostIP :: V1HostIP -> Text
v1HostIPIp :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"ip" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1HostIPIp
      ]


-- | Construct a value of type 'V1HostIP' (by applying it's required fields, if any)
mkV1HostIP
  :: Text -- ^ 'v1HostIPIp': IP is the IP address assigned to the host
  -> V1HostIP
mkV1HostIP :: Text -> V1HostIP
mkV1HostIP Text
v1HostIPIp =
  V1HostIP
  { Text
$sel:v1HostIPIp:V1HostIP :: Text
v1HostIPIp :: Text
v1HostIPIp
  }

-- ** V1HostPathVolumeSource
-- | V1HostPathVolumeSource
-- Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.
data V1HostPathVolumeSource = V1HostPathVolumeSource
  { V1HostPathVolumeSource -> Text
v1HostPathVolumeSourcePath :: !(Text) -- ^ /Required/ "path" - path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
  , V1HostPathVolumeSource -> Maybe Text
v1HostPathVolumeSourceType :: !(Maybe Text) -- ^ "type" - type for HostPath Volume Defaults to \&quot;\&quot; More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
  } deriving (Int -> V1HostPathVolumeSource -> ShowS
[V1HostPathVolumeSource] -> ShowS
V1HostPathVolumeSource -> String
(Int -> V1HostPathVolumeSource -> ShowS)
-> (V1HostPathVolumeSource -> String)
-> ([V1HostPathVolumeSource] -> ShowS)
-> Show V1HostPathVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1HostPathVolumeSource -> ShowS
showsPrec :: Int -> V1HostPathVolumeSource -> ShowS
$cshow :: V1HostPathVolumeSource -> String
show :: V1HostPathVolumeSource -> String
$cshowList :: [V1HostPathVolumeSource] -> ShowS
showList :: [V1HostPathVolumeSource] -> ShowS
P.Show, V1HostPathVolumeSource -> V1HostPathVolumeSource -> Bool
(V1HostPathVolumeSource -> V1HostPathVolumeSource -> Bool)
-> (V1HostPathVolumeSource -> V1HostPathVolumeSource -> Bool)
-> Eq V1HostPathVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1HostPathVolumeSource -> V1HostPathVolumeSource -> Bool
== :: V1HostPathVolumeSource -> V1HostPathVolumeSource -> Bool
$c/= :: V1HostPathVolumeSource -> V1HostPathVolumeSource -> Bool
/= :: V1HostPathVolumeSource -> V1HostPathVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1HostPathVolumeSource
instance A.FromJSON V1HostPathVolumeSource where
  parseJSON :: Value -> Parser V1HostPathVolumeSource
parseJSON = String
-> (Object -> Parser V1HostPathVolumeSource)
-> Value
-> Parser V1HostPathVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1HostPathVolumeSource" ((Object -> Parser V1HostPathVolumeSource)
 -> Value -> Parser V1HostPathVolumeSource)
-> (Object -> Parser V1HostPathVolumeSource)
-> Value
-> Parser V1HostPathVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Maybe Text -> V1HostPathVolumeSource
V1HostPathVolumeSource
      (Text -> Maybe Text -> V1HostPathVolumeSource)
-> Parser Text -> Parser (Maybe Text -> V1HostPathVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"path")
      Parser (Maybe Text -> V1HostPathVolumeSource)
-> Parser (Maybe Text) -> Parser V1HostPathVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"type")

-- | ToJSON V1HostPathVolumeSource
instance A.ToJSON V1HostPathVolumeSource where
  toJSON :: V1HostPathVolumeSource -> Value
toJSON V1HostPathVolumeSource {Maybe Text
Text
$sel:v1HostPathVolumeSourcePath:V1HostPathVolumeSource :: V1HostPathVolumeSource -> Text
$sel:v1HostPathVolumeSourceType:V1HostPathVolumeSource :: V1HostPathVolumeSource -> Maybe Text
v1HostPathVolumeSourcePath :: Text
v1HostPathVolumeSourceType :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"path" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1HostPathVolumeSourcePath
      , Key
"type" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1HostPathVolumeSourceType
      ]


-- | Construct a value of type 'V1HostPathVolumeSource' (by applying it's required fields, if any)
mkV1HostPathVolumeSource
  :: Text -- ^ 'v1HostPathVolumeSourcePath': path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
  -> V1HostPathVolumeSource
mkV1HostPathVolumeSource :: Text -> V1HostPathVolumeSource
mkV1HostPathVolumeSource Text
v1HostPathVolumeSourcePath =
  V1HostPathVolumeSource
  { Text
$sel:v1HostPathVolumeSourcePath:V1HostPathVolumeSource :: Text
v1HostPathVolumeSourcePath :: Text
v1HostPathVolumeSourcePath
  , $sel:v1HostPathVolumeSourceType:V1HostPathVolumeSource :: Maybe Text
v1HostPathVolumeSourceType = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1IPBlock
-- | V1IPBlock
-- IPBlock describes a particular CIDR (Ex. \"192.168.1.0/24\",\"2001:db8::/64\") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.
data V1IPBlock = V1IPBlock
  { V1IPBlock -> Text
v1IPBlockCidr :: !(Text) -- ^ /Required/ "cidr" - cidr is a string representing the IPBlock Valid examples are \&quot;192.168.1.0/24\&quot; or \&quot;2001:db8::/64\&quot;
  , V1IPBlock -> Maybe [Text]
v1IPBlockExcept :: !(Maybe [Text]) -- ^ "except" - except is a slice of CIDRs that should not be included within an IPBlock Valid examples are \&quot;192.168.1.0/24\&quot; or \&quot;2001:db8::/64\&quot; Except values will be rejected if they are outside the cidr range
  } deriving (Int -> V1IPBlock -> ShowS
[V1IPBlock] -> ShowS
V1IPBlock -> String
(Int -> V1IPBlock -> ShowS)
-> (V1IPBlock -> String)
-> ([V1IPBlock] -> ShowS)
-> Show V1IPBlock
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1IPBlock -> ShowS
showsPrec :: Int -> V1IPBlock -> ShowS
$cshow :: V1IPBlock -> String
show :: V1IPBlock -> String
$cshowList :: [V1IPBlock] -> ShowS
showList :: [V1IPBlock] -> ShowS
P.Show, V1IPBlock -> V1IPBlock -> Bool
(V1IPBlock -> V1IPBlock -> Bool)
-> (V1IPBlock -> V1IPBlock -> Bool) -> Eq V1IPBlock
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1IPBlock -> V1IPBlock -> Bool
== :: V1IPBlock -> V1IPBlock -> Bool
$c/= :: V1IPBlock -> V1IPBlock -> Bool
/= :: V1IPBlock -> V1IPBlock -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1IPBlock
instance A.FromJSON V1IPBlock where
  parseJSON :: Value -> Parser V1IPBlock
parseJSON = String -> (Object -> Parser V1IPBlock) -> Value -> Parser V1IPBlock
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1IPBlock" ((Object -> Parser V1IPBlock) -> Value -> Parser V1IPBlock)
-> (Object -> Parser V1IPBlock) -> Value -> Parser V1IPBlock
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Maybe [Text] -> V1IPBlock
V1IPBlock
      (Text -> Maybe [Text] -> V1IPBlock)
-> Parser Text -> Parser (Maybe [Text] -> V1IPBlock)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"cidr")
      Parser (Maybe [Text] -> V1IPBlock)
-> Parser (Maybe [Text]) -> Parser V1IPBlock
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"except")

-- | ToJSON V1IPBlock
instance A.ToJSON V1IPBlock where
  toJSON :: V1IPBlock -> Value
toJSON V1IPBlock {Maybe [Text]
Text
$sel:v1IPBlockCidr:V1IPBlock :: V1IPBlock -> Text
$sel:v1IPBlockExcept:V1IPBlock :: V1IPBlock -> Maybe [Text]
v1IPBlockCidr :: Text
v1IPBlockExcept :: Maybe [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"cidr" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1IPBlockCidr
      , Key
"except" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1IPBlockExcept
      ]


-- | Construct a value of type 'V1IPBlock' (by applying it's required fields, if any)
mkV1IPBlock
  :: Text -- ^ 'v1IPBlockCidr': cidr is a string representing the IPBlock Valid examples are \"192.168.1.0/24\" or \"2001:db8::/64\"
  -> V1IPBlock
mkV1IPBlock :: Text -> V1IPBlock
mkV1IPBlock Text
v1IPBlockCidr =
  V1IPBlock
  { Text
$sel:v1IPBlockCidr:V1IPBlock :: Text
v1IPBlockCidr :: Text
v1IPBlockCidr
  , $sel:v1IPBlockExcept:V1IPBlock :: Maybe [Text]
v1IPBlockExcept = Maybe [Text]
forall a. Maybe a
Nothing
  }

-- ** V1ISCSIPersistentVolumeSource
-- | V1ISCSIPersistentVolumeSource
-- ISCSIPersistentVolumeSource represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.
data V1ISCSIPersistentVolumeSource = V1ISCSIPersistentVolumeSource
  { V1ISCSIPersistentVolumeSource -> Maybe Bool
v1ISCSIPersistentVolumeSourceChapAuthDiscovery :: !(Maybe Bool) -- ^ "chapAuthDiscovery" - chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication
  , V1ISCSIPersistentVolumeSource -> Maybe Bool
v1ISCSIPersistentVolumeSourceChapAuthSession :: !(Maybe Bool) -- ^ "chapAuthSession" - chapAuthSession defines whether support iSCSI Session CHAP authentication
  , V1ISCSIPersistentVolumeSource -> Maybe Text
v1ISCSIPersistentVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \&quot;ext4\&quot;, \&quot;xfs\&quot;, \&quot;ntfs\&quot;. Implicitly inferred to be \&quot;ext4\&quot; if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi
  , V1ISCSIPersistentVolumeSource -> Maybe Text
v1ISCSIPersistentVolumeSourceInitiatorName :: !(Maybe Text) -- ^ "initiatorName" - initiatorName is the custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface &lt;target portal&gt;:&lt;volume name&gt; will be created for the connection.
  , V1ISCSIPersistentVolumeSource -> Text
v1ISCSIPersistentVolumeSourceIqn :: !(Text) -- ^ /Required/ "iqn" - iqn is Target iSCSI Qualified Name.
  , V1ISCSIPersistentVolumeSource -> Maybe Text
v1ISCSIPersistentVolumeSourceIscsiInterface :: !(Maybe Text) -- ^ "iscsiInterface" - iscsiInterface is the interface Name that uses an iSCSI transport. Defaults to &#39;default&#39; (tcp).
  , V1ISCSIPersistentVolumeSource -> Int
v1ISCSIPersistentVolumeSourceLun :: !(Int) -- ^ /Required/ "lun" - lun is iSCSI Target Lun number.
  , V1ISCSIPersistentVolumeSource -> Maybe [Text]
v1ISCSIPersistentVolumeSourcePortals :: !(Maybe [Text]) -- ^ "portals" - portals is the iSCSI Target Portal List. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).
  , V1ISCSIPersistentVolumeSource -> Maybe Bool
v1ISCSIPersistentVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.
  , V1ISCSIPersistentVolumeSource -> Maybe V1SecretReference
v1ISCSIPersistentVolumeSourceSecretRef :: !(Maybe V1SecretReference) -- ^ "secretRef"
  , V1ISCSIPersistentVolumeSource -> Text
v1ISCSIPersistentVolumeSourceTargetPortal :: !(Text) -- ^ /Required/ "targetPortal" - targetPortal is iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).
  } deriving (Int -> V1ISCSIPersistentVolumeSource -> ShowS
[V1ISCSIPersistentVolumeSource] -> ShowS
V1ISCSIPersistentVolumeSource -> String
(Int -> V1ISCSIPersistentVolumeSource -> ShowS)
-> (V1ISCSIPersistentVolumeSource -> String)
-> ([V1ISCSIPersistentVolumeSource] -> ShowS)
-> Show V1ISCSIPersistentVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ISCSIPersistentVolumeSource -> ShowS
showsPrec :: Int -> V1ISCSIPersistentVolumeSource -> ShowS
$cshow :: V1ISCSIPersistentVolumeSource -> String
show :: V1ISCSIPersistentVolumeSource -> String
$cshowList :: [V1ISCSIPersistentVolumeSource] -> ShowS
showList :: [V1ISCSIPersistentVolumeSource] -> ShowS
P.Show, V1ISCSIPersistentVolumeSource
-> V1ISCSIPersistentVolumeSource -> Bool
(V1ISCSIPersistentVolumeSource
 -> V1ISCSIPersistentVolumeSource -> Bool)
-> (V1ISCSIPersistentVolumeSource
    -> V1ISCSIPersistentVolumeSource -> Bool)
-> Eq V1ISCSIPersistentVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ISCSIPersistentVolumeSource
-> V1ISCSIPersistentVolumeSource -> Bool
== :: V1ISCSIPersistentVolumeSource
-> V1ISCSIPersistentVolumeSource -> Bool
$c/= :: V1ISCSIPersistentVolumeSource
-> V1ISCSIPersistentVolumeSource -> Bool
/= :: V1ISCSIPersistentVolumeSource
-> V1ISCSIPersistentVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ISCSIPersistentVolumeSource
instance A.FromJSON V1ISCSIPersistentVolumeSource where
  parseJSON :: Value -> Parser V1ISCSIPersistentVolumeSource
parseJSON = String
-> (Object -> Parser V1ISCSIPersistentVolumeSource)
-> Value
-> Parser V1ISCSIPersistentVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ISCSIPersistentVolumeSource" ((Object -> Parser V1ISCSIPersistentVolumeSource)
 -> Value -> Parser V1ISCSIPersistentVolumeSource)
-> (Object -> Parser V1ISCSIPersistentVolumeSource)
-> Value
-> Parser V1ISCSIPersistentVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Text
-> Maybe Text
-> Int
-> Maybe [Text]
-> Maybe Bool
-> Maybe V1SecretReference
-> Text
-> V1ISCSIPersistentVolumeSource
V1ISCSIPersistentVolumeSource
      (Maybe Bool
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> Maybe Text
 -> Int
 -> Maybe [Text]
 -> Maybe Bool
 -> Maybe V1SecretReference
 -> Text
 -> V1ISCSIPersistentVolumeSource)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Maybe Text
      -> Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe V1SecretReference
      -> Text
      -> V1ISCSIPersistentVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"chapAuthDiscovery")
      Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Maybe Text
   -> Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe V1SecretReference
   -> Text
   -> V1ISCSIPersistentVolumeSource)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Text
      -> Maybe Text
      -> Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe V1SecretReference
      -> Text
      -> V1ISCSIPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"chapAuthSession")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Text
   -> Maybe Text
   -> Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe V1SecretReference
   -> Text
   -> V1ISCSIPersistentVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Text
      -> Maybe Text
      -> Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe V1SecretReference
      -> Text
      -> V1ISCSIPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fsType")
      Parser
  (Maybe Text
   -> Text
   -> Maybe Text
   -> Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe V1SecretReference
   -> Text
   -> V1ISCSIPersistentVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Text
      -> Maybe Text
      -> Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe V1SecretReference
      -> Text
      -> V1ISCSIPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"initiatorName")
      Parser
  (Text
   -> Maybe Text
   -> Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe V1SecretReference
   -> Text
   -> V1ISCSIPersistentVolumeSource)
-> Parser Text
-> Parser
     (Maybe Text
      -> Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe V1SecretReference
      -> Text
      -> V1ISCSIPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"iqn")
      Parser
  (Maybe Text
   -> Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe V1SecretReference
   -> Text
   -> V1ISCSIPersistentVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe V1SecretReference
      -> Text
      -> V1ISCSIPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"iscsiInterface")
      Parser
  (Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe V1SecretReference
   -> Text
   -> V1ISCSIPersistentVolumeSource)
-> Parser Int
-> Parser
     (Maybe [Text]
      -> Maybe Bool
      -> Maybe V1SecretReference
      -> Text
      -> V1ISCSIPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"lun")
      Parser
  (Maybe [Text]
   -> Maybe Bool
   -> Maybe V1SecretReference
   -> Text
   -> V1ISCSIPersistentVolumeSource)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Bool
      -> Maybe V1SecretReference
      -> Text
      -> V1ISCSIPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"portals")
      Parser
  (Maybe Bool
   -> Maybe V1SecretReference
   -> Text
   -> V1ISCSIPersistentVolumeSource)
-> Parser (Maybe Bool)
-> Parser
     (Maybe V1SecretReference -> Text -> V1ISCSIPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readOnly")
      Parser
  (Maybe V1SecretReference -> Text -> V1ISCSIPersistentVolumeSource)
-> Parser (Maybe V1SecretReference)
-> Parser (Text -> V1ISCSIPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1SecretReference)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"secretRef")
      Parser (Text -> V1ISCSIPersistentVolumeSource)
-> Parser Text -> Parser V1ISCSIPersistentVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"targetPortal")

-- | ToJSON V1ISCSIPersistentVolumeSource
instance A.ToJSON V1ISCSIPersistentVolumeSource where
  toJSON :: V1ISCSIPersistentVolumeSource -> Value
toJSON V1ISCSIPersistentVolumeSource {Int
Maybe Bool
Maybe [Text]
Maybe Text
Maybe V1SecretReference
Text
$sel:v1ISCSIPersistentVolumeSourceChapAuthDiscovery:V1ISCSIPersistentVolumeSource :: V1ISCSIPersistentVolumeSource -> Maybe Bool
$sel:v1ISCSIPersistentVolumeSourceChapAuthSession:V1ISCSIPersistentVolumeSource :: V1ISCSIPersistentVolumeSource -> Maybe Bool
$sel:v1ISCSIPersistentVolumeSourceFsType:V1ISCSIPersistentVolumeSource :: V1ISCSIPersistentVolumeSource -> Maybe Text
$sel:v1ISCSIPersistentVolumeSourceInitiatorName:V1ISCSIPersistentVolumeSource :: V1ISCSIPersistentVolumeSource -> Maybe Text
$sel:v1ISCSIPersistentVolumeSourceIqn:V1ISCSIPersistentVolumeSource :: V1ISCSIPersistentVolumeSource -> Text
$sel:v1ISCSIPersistentVolumeSourceIscsiInterface:V1ISCSIPersistentVolumeSource :: V1ISCSIPersistentVolumeSource -> Maybe Text
$sel:v1ISCSIPersistentVolumeSourceLun:V1ISCSIPersistentVolumeSource :: V1ISCSIPersistentVolumeSource -> Int
$sel:v1ISCSIPersistentVolumeSourcePortals:V1ISCSIPersistentVolumeSource :: V1ISCSIPersistentVolumeSource -> Maybe [Text]
$sel:v1ISCSIPersistentVolumeSourceReadOnly:V1ISCSIPersistentVolumeSource :: V1ISCSIPersistentVolumeSource -> Maybe Bool
$sel:v1ISCSIPersistentVolumeSourceSecretRef:V1ISCSIPersistentVolumeSource :: V1ISCSIPersistentVolumeSource -> Maybe V1SecretReference
$sel:v1ISCSIPersistentVolumeSourceTargetPortal:V1ISCSIPersistentVolumeSource :: V1ISCSIPersistentVolumeSource -> Text
v1ISCSIPersistentVolumeSourceChapAuthDiscovery :: Maybe Bool
v1ISCSIPersistentVolumeSourceChapAuthSession :: Maybe Bool
v1ISCSIPersistentVolumeSourceFsType :: Maybe Text
v1ISCSIPersistentVolumeSourceInitiatorName :: Maybe Text
v1ISCSIPersistentVolumeSourceIqn :: Text
v1ISCSIPersistentVolumeSourceIscsiInterface :: Maybe Text
v1ISCSIPersistentVolumeSourceLun :: Int
v1ISCSIPersistentVolumeSourcePortals :: Maybe [Text]
v1ISCSIPersistentVolumeSourceReadOnly :: Maybe Bool
v1ISCSIPersistentVolumeSourceSecretRef :: Maybe V1SecretReference
v1ISCSIPersistentVolumeSourceTargetPortal :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"chapAuthDiscovery" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1ISCSIPersistentVolumeSourceChapAuthDiscovery
      , Key
"chapAuthSession" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1ISCSIPersistentVolumeSourceChapAuthSession
      , Key
"fsType" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ISCSIPersistentVolumeSourceFsType
      , Key
"initiatorName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ISCSIPersistentVolumeSourceInitiatorName
      , Key
"iqn" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ISCSIPersistentVolumeSourceIqn
      , Key
"iscsiInterface" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ISCSIPersistentVolumeSourceIscsiInterface
      , Key
"lun" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v1ISCSIPersistentVolumeSourceLun
      , Key
"portals" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1ISCSIPersistentVolumeSourcePortals
      , Key
"readOnly" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1ISCSIPersistentVolumeSourceReadOnly
      , Key
"secretRef" Key -> Maybe V1SecretReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1SecretReference
v1ISCSIPersistentVolumeSourceSecretRef
      , Key
"targetPortal" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ISCSIPersistentVolumeSourceTargetPortal
      ]


-- | Construct a value of type 'V1ISCSIPersistentVolumeSource' (by applying it's required fields, if any)
mkV1ISCSIPersistentVolumeSource
  :: Text -- ^ 'v1ISCSIPersistentVolumeSourceIqn': iqn is Target iSCSI Qualified Name.
  -> Int -- ^ 'v1ISCSIPersistentVolumeSourceLun': lun is iSCSI Target Lun number.
  -> Text -- ^ 'v1ISCSIPersistentVolumeSourceTargetPortal': targetPortal is iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).
  -> V1ISCSIPersistentVolumeSource
mkV1ISCSIPersistentVolumeSource :: Text -> Int -> Text -> V1ISCSIPersistentVolumeSource
mkV1ISCSIPersistentVolumeSource Text
v1ISCSIPersistentVolumeSourceIqn Int
v1ISCSIPersistentVolumeSourceLun Text
v1ISCSIPersistentVolumeSourceTargetPortal =
  V1ISCSIPersistentVolumeSource
  { $sel:v1ISCSIPersistentVolumeSourceChapAuthDiscovery:V1ISCSIPersistentVolumeSource :: Maybe Bool
v1ISCSIPersistentVolumeSourceChapAuthDiscovery = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1ISCSIPersistentVolumeSourceChapAuthSession:V1ISCSIPersistentVolumeSource :: Maybe Bool
v1ISCSIPersistentVolumeSourceChapAuthSession = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1ISCSIPersistentVolumeSourceFsType:V1ISCSIPersistentVolumeSource :: Maybe Text
v1ISCSIPersistentVolumeSourceFsType = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ISCSIPersistentVolumeSourceInitiatorName:V1ISCSIPersistentVolumeSource :: Maybe Text
v1ISCSIPersistentVolumeSourceInitiatorName = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1ISCSIPersistentVolumeSourceIqn:V1ISCSIPersistentVolumeSource :: Text
v1ISCSIPersistentVolumeSourceIqn :: Text
v1ISCSIPersistentVolumeSourceIqn
  , $sel:v1ISCSIPersistentVolumeSourceIscsiInterface:V1ISCSIPersistentVolumeSource :: Maybe Text
v1ISCSIPersistentVolumeSourceIscsiInterface = Maybe Text
forall a. Maybe a
Nothing
  , Int
$sel:v1ISCSIPersistentVolumeSourceLun:V1ISCSIPersistentVolumeSource :: Int
v1ISCSIPersistentVolumeSourceLun :: Int
v1ISCSIPersistentVolumeSourceLun
  , $sel:v1ISCSIPersistentVolumeSourcePortals:V1ISCSIPersistentVolumeSource :: Maybe [Text]
v1ISCSIPersistentVolumeSourcePortals = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1ISCSIPersistentVolumeSourceReadOnly:V1ISCSIPersistentVolumeSource :: Maybe Bool
v1ISCSIPersistentVolumeSourceReadOnly = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1ISCSIPersistentVolumeSourceSecretRef:V1ISCSIPersistentVolumeSource :: Maybe V1SecretReference
v1ISCSIPersistentVolumeSourceSecretRef = Maybe V1SecretReference
forall a. Maybe a
Nothing
  , Text
$sel:v1ISCSIPersistentVolumeSourceTargetPortal:V1ISCSIPersistentVolumeSource :: Text
v1ISCSIPersistentVolumeSourceTargetPortal :: Text
v1ISCSIPersistentVolumeSourceTargetPortal
  }

-- ** V1ISCSIVolumeSource
-- | V1ISCSIVolumeSource
-- Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.
data V1ISCSIVolumeSource = V1ISCSIVolumeSource
  { V1ISCSIVolumeSource -> Maybe Bool
v1ISCSIVolumeSourceChapAuthDiscovery :: !(Maybe Bool) -- ^ "chapAuthDiscovery" - chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication
  , V1ISCSIVolumeSource -> Maybe Bool
v1ISCSIVolumeSourceChapAuthSession :: !(Maybe Bool) -- ^ "chapAuthSession" - chapAuthSession defines whether support iSCSI Session CHAP authentication
  , V1ISCSIVolumeSource -> Maybe Text
v1ISCSIVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \&quot;ext4\&quot;, \&quot;xfs\&quot;, \&quot;ntfs\&quot;. Implicitly inferred to be \&quot;ext4\&quot; if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi
  , V1ISCSIVolumeSource -> Maybe Text
v1ISCSIVolumeSourceInitiatorName :: !(Maybe Text) -- ^ "initiatorName" - initiatorName is the custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface &lt;target portal&gt;:&lt;volume name&gt; will be created for the connection.
  , V1ISCSIVolumeSource -> Text
v1ISCSIVolumeSourceIqn :: !(Text) -- ^ /Required/ "iqn" - iqn is the target iSCSI Qualified Name.
  , V1ISCSIVolumeSource -> Maybe Text
v1ISCSIVolumeSourceIscsiInterface :: !(Maybe Text) -- ^ "iscsiInterface" - iscsiInterface is the interface Name that uses an iSCSI transport. Defaults to &#39;default&#39; (tcp).
  , V1ISCSIVolumeSource -> Int
v1ISCSIVolumeSourceLun :: !(Int) -- ^ /Required/ "lun" - lun represents iSCSI Target Lun number.
  , V1ISCSIVolumeSource -> Maybe [Text]
v1ISCSIVolumeSourcePortals :: !(Maybe [Text]) -- ^ "portals" - portals is the iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).
  , V1ISCSIVolumeSource -> Maybe Bool
v1ISCSIVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.
  , V1ISCSIVolumeSource -> Maybe V1LocalObjectReference
v1ISCSIVolumeSourceSecretRef :: !(Maybe V1LocalObjectReference) -- ^ "secretRef"
  , V1ISCSIVolumeSource -> Text
v1ISCSIVolumeSourceTargetPortal :: !(Text) -- ^ /Required/ "targetPortal" - targetPortal is iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).
  } deriving (Int -> V1ISCSIVolumeSource -> ShowS
[V1ISCSIVolumeSource] -> ShowS
V1ISCSIVolumeSource -> String
(Int -> V1ISCSIVolumeSource -> ShowS)
-> (V1ISCSIVolumeSource -> String)
-> ([V1ISCSIVolumeSource] -> ShowS)
-> Show V1ISCSIVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ISCSIVolumeSource -> ShowS
showsPrec :: Int -> V1ISCSIVolumeSource -> ShowS
$cshow :: V1ISCSIVolumeSource -> String
show :: V1ISCSIVolumeSource -> String
$cshowList :: [V1ISCSIVolumeSource] -> ShowS
showList :: [V1ISCSIVolumeSource] -> ShowS
P.Show, V1ISCSIVolumeSource -> V1ISCSIVolumeSource -> Bool
(V1ISCSIVolumeSource -> V1ISCSIVolumeSource -> Bool)
-> (V1ISCSIVolumeSource -> V1ISCSIVolumeSource -> Bool)
-> Eq V1ISCSIVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ISCSIVolumeSource -> V1ISCSIVolumeSource -> Bool
== :: V1ISCSIVolumeSource -> V1ISCSIVolumeSource -> Bool
$c/= :: V1ISCSIVolumeSource -> V1ISCSIVolumeSource -> Bool
/= :: V1ISCSIVolumeSource -> V1ISCSIVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ISCSIVolumeSource
instance A.FromJSON V1ISCSIVolumeSource where
  parseJSON :: Value -> Parser V1ISCSIVolumeSource
parseJSON = String
-> (Object -> Parser V1ISCSIVolumeSource)
-> Value
-> Parser V1ISCSIVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ISCSIVolumeSource" ((Object -> Parser V1ISCSIVolumeSource)
 -> Value -> Parser V1ISCSIVolumeSource)
-> (Object -> Parser V1ISCSIVolumeSource)
-> Value
-> Parser V1ISCSIVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Text
-> Maybe Text
-> Int
-> Maybe [Text]
-> Maybe Bool
-> Maybe V1LocalObjectReference
-> Text
-> V1ISCSIVolumeSource
V1ISCSIVolumeSource
      (Maybe Bool
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> Maybe Text
 -> Int
 -> Maybe [Text]
 -> Maybe Bool
 -> Maybe V1LocalObjectReference
 -> Text
 -> V1ISCSIVolumeSource)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Maybe Text
      -> Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe V1LocalObjectReference
      -> Text
      -> V1ISCSIVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"chapAuthDiscovery")
      Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Maybe Text
   -> Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe V1LocalObjectReference
   -> Text
   -> V1ISCSIVolumeSource)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Text
      -> Maybe Text
      -> Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe V1LocalObjectReference
      -> Text
      -> V1ISCSIVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"chapAuthSession")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Text
   -> Maybe Text
   -> Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe V1LocalObjectReference
   -> Text
   -> V1ISCSIVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Text
      -> Maybe Text
      -> Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe V1LocalObjectReference
      -> Text
      -> V1ISCSIVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fsType")
      Parser
  (Maybe Text
   -> Text
   -> Maybe Text
   -> Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe V1LocalObjectReference
   -> Text
   -> V1ISCSIVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Text
      -> Maybe Text
      -> Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe V1LocalObjectReference
      -> Text
      -> V1ISCSIVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"initiatorName")
      Parser
  (Text
   -> Maybe Text
   -> Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe V1LocalObjectReference
   -> Text
   -> V1ISCSIVolumeSource)
-> Parser Text
-> Parser
     (Maybe Text
      -> Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe V1LocalObjectReference
      -> Text
      -> V1ISCSIVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"iqn")
      Parser
  (Maybe Text
   -> Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe V1LocalObjectReference
   -> Text
   -> V1ISCSIVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe V1LocalObjectReference
      -> Text
      -> V1ISCSIVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"iscsiInterface")
      Parser
  (Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe V1LocalObjectReference
   -> Text
   -> V1ISCSIVolumeSource)
-> Parser Int
-> Parser
     (Maybe [Text]
      -> Maybe Bool
      -> Maybe V1LocalObjectReference
      -> Text
      -> V1ISCSIVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"lun")
      Parser
  (Maybe [Text]
   -> Maybe Bool
   -> Maybe V1LocalObjectReference
   -> Text
   -> V1ISCSIVolumeSource)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Bool
      -> Maybe V1LocalObjectReference -> Text -> V1ISCSIVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"portals")
      Parser
  (Maybe Bool
   -> Maybe V1LocalObjectReference -> Text -> V1ISCSIVolumeSource)
-> Parser (Maybe Bool)
-> Parser
     (Maybe V1LocalObjectReference -> Text -> V1ISCSIVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readOnly")
      Parser
  (Maybe V1LocalObjectReference -> Text -> V1ISCSIVolumeSource)
-> Parser (Maybe V1LocalObjectReference)
-> Parser (Text -> V1ISCSIVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LocalObjectReference)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"secretRef")
      Parser (Text -> V1ISCSIVolumeSource)
-> Parser Text -> Parser V1ISCSIVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"targetPortal")

-- | ToJSON V1ISCSIVolumeSource
instance A.ToJSON V1ISCSIVolumeSource where
  toJSON :: V1ISCSIVolumeSource -> Value
toJSON V1ISCSIVolumeSource {Int
Maybe Bool
Maybe [Text]
Maybe Text
Maybe V1LocalObjectReference
Text
$sel:v1ISCSIVolumeSourceChapAuthDiscovery:V1ISCSIVolumeSource :: V1ISCSIVolumeSource -> Maybe Bool
$sel:v1ISCSIVolumeSourceChapAuthSession:V1ISCSIVolumeSource :: V1ISCSIVolumeSource -> Maybe Bool
$sel:v1ISCSIVolumeSourceFsType:V1ISCSIVolumeSource :: V1ISCSIVolumeSource -> Maybe Text
$sel:v1ISCSIVolumeSourceInitiatorName:V1ISCSIVolumeSource :: V1ISCSIVolumeSource -> Maybe Text
$sel:v1ISCSIVolumeSourceIqn:V1ISCSIVolumeSource :: V1ISCSIVolumeSource -> Text
$sel:v1ISCSIVolumeSourceIscsiInterface:V1ISCSIVolumeSource :: V1ISCSIVolumeSource -> Maybe Text
$sel:v1ISCSIVolumeSourceLun:V1ISCSIVolumeSource :: V1ISCSIVolumeSource -> Int
$sel:v1ISCSIVolumeSourcePortals:V1ISCSIVolumeSource :: V1ISCSIVolumeSource -> Maybe [Text]
$sel:v1ISCSIVolumeSourceReadOnly:V1ISCSIVolumeSource :: V1ISCSIVolumeSource -> Maybe Bool
$sel:v1ISCSIVolumeSourceSecretRef:V1ISCSIVolumeSource :: V1ISCSIVolumeSource -> Maybe V1LocalObjectReference
$sel:v1ISCSIVolumeSourceTargetPortal:V1ISCSIVolumeSource :: V1ISCSIVolumeSource -> Text
v1ISCSIVolumeSourceChapAuthDiscovery :: Maybe Bool
v1ISCSIVolumeSourceChapAuthSession :: Maybe Bool
v1ISCSIVolumeSourceFsType :: Maybe Text
v1ISCSIVolumeSourceInitiatorName :: Maybe Text
v1ISCSIVolumeSourceIqn :: Text
v1ISCSIVolumeSourceIscsiInterface :: Maybe Text
v1ISCSIVolumeSourceLun :: Int
v1ISCSIVolumeSourcePortals :: Maybe [Text]
v1ISCSIVolumeSourceReadOnly :: Maybe Bool
v1ISCSIVolumeSourceSecretRef :: Maybe V1LocalObjectReference
v1ISCSIVolumeSourceTargetPortal :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"chapAuthDiscovery" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1ISCSIVolumeSourceChapAuthDiscovery
      , Key
"chapAuthSession" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1ISCSIVolumeSourceChapAuthSession
      , Key
"fsType" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ISCSIVolumeSourceFsType
      , Key
"initiatorName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ISCSIVolumeSourceInitiatorName
      , Key
"iqn" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ISCSIVolumeSourceIqn
      , Key
"iscsiInterface" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ISCSIVolumeSourceIscsiInterface
      , Key
"lun" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v1ISCSIVolumeSourceLun
      , Key
"portals" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1ISCSIVolumeSourcePortals
      , Key
"readOnly" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1ISCSIVolumeSourceReadOnly
      , Key
"secretRef" Key -> Maybe V1LocalObjectReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LocalObjectReference
v1ISCSIVolumeSourceSecretRef
      , Key
"targetPortal" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ISCSIVolumeSourceTargetPortal
      ]


-- | Construct a value of type 'V1ISCSIVolumeSource' (by applying it's required fields, if any)
mkV1ISCSIVolumeSource
  :: Text -- ^ 'v1ISCSIVolumeSourceIqn': iqn is the target iSCSI Qualified Name.
  -> Int -- ^ 'v1ISCSIVolumeSourceLun': lun represents iSCSI Target Lun number.
  -> Text -- ^ 'v1ISCSIVolumeSourceTargetPortal': targetPortal is iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).
  -> V1ISCSIVolumeSource
mkV1ISCSIVolumeSource :: Text -> Int -> Text -> V1ISCSIVolumeSource
mkV1ISCSIVolumeSource Text
v1ISCSIVolumeSourceIqn Int
v1ISCSIVolumeSourceLun Text
v1ISCSIVolumeSourceTargetPortal =
  V1ISCSIVolumeSource
  { $sel:v1ISCSIVolumeSourceChapAuthDiscovery:V1ISCSIVolumeSource :: Maybe Bool
v1ISCSIVolumeSourceChapAuthDiscovery = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1ISCSIVolumeSourceChapAuthSession:V1ISCSIVolumeSource :: Maybe Bool
v1ISCSIVolumeSourceChapAuthSession = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1ISCSIVolumeSourceFsType:V1ISCSIVolumeSource :: Maybe Text
v1ISCSIVolumeSourceFsType = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ISCSIVolumeSourceInitiatorName:V1ISCSIVolumeSource :: Maybe Text
v1ISCSIVolumeSourceInitiatorName = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1ISCSIVolumeSourceIqn:V1ISCSIVolumeSource :: Text
v1ISCSIVolumeSourceIqn :: Text
v1ISCSIVolumeSourceIqn
  , $sel:v1ISCSIVolumeSourceIscsiInterface:V1ISCSIVolumeSource :: Maybe Text
v1ISCSIVolumeSourceIscsiInterface = Maybe Text
forall a. Maybe a
Nothing
  , Int
$sel:v1ISCSIVolumeSourceLun:V1ISCSIVolumeSource :: Int
v1ISCSIVolumeSourceLun :: Int
v1ISCSIVolumeSourceLun
  , $sel:v1ISCSIVolumeSourcePortals:V1ISCSIVolumeSource :: Maybe [Text]
v1ISCSIVolumeSourcePortals = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1ISCSIVolumeSourceReadOnly:V1ISCSIVolumeSource :: Maybe Bool
v1ISCSIVolumeSourceReadOnly = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1ISCSIVolumeSourceSecretRef:V1ISCSIVolumeSource :: Maybe V1LocalObjectReference
v1ISCSIVolumeSourceSecretRef = Maybe V1LocalObjectReference
forall a. Maybe a
Nothing
  , Text
$sel:v1ISCSIVolumeSourceTargetPortal:V1ISCSIVolumeSource :: Text
v1ISCSIVolumeSourceTargetPortal :: Text
v1ISCSIVolumeSourceTargetPortal
  }

-- ** V1ImageVolumeSource
-- | V1ImageVolumeSource
-- ImageVolumeSource represents a image volume resource.
data V1ImageVolumeSource = V1ImageVolumeSource
  { V1ImageVolumeSource -> Maybe Text
v1ImageVolumeSourcePullPolicy :: !(Maybe Text) -- ^ "pullPolicy" - Policy for pulling OCI objects. Possible values are: Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn&#39;t present. IfNotPresent: the kubelet pulls if the reference isn&#39;t already present on disk. Container creation will fail if the reference isn&#39;t present and the pull fails. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise.
  , V1ImageVolumeSource -> Maybe Text
v1ImageVolumeSourceReference :: !(Maybe Text) -- ^ "reference" - Required: Image or artifact reference to be used. Behaves in the same way as pod.spec.containers[*].image. Pull secrets will be assembled in the same way as for the container image by looking up node credentials, SA image pull secrets, and pod spec image pull secrets. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets.
  } deriving (Int -> V1ImageVolumeSource -> ShowS
[V1ImageVolumeSource] -> ShowS
V1ImageVolumeSource -> String
(Int -> V1ImageVolumeSource -> ShowS)
-> (V1ImageVolumeSource -> String)
-> ([V1ImageVolumeSource] -> ShowS)
-> Show V1ImageVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ImageVolumeSource -> ShowS
showsPrec :: Int -> V1ImageVolumeSource -> ShowS
$cshow :: V1ImageVolumeSource -> String
show :: V1ImageVolumeSource -> String
$cshowList :: [V1ImageVolumeSource] -> ShowS
showList :: [V1ImageVolumeSource] -> ShowS
P.Show, V1ImageVolumeSource -> V1ImageVolumeSource -> Bool
(V1ImageVolumeSource -> V1ImageVolumeSource -> Bool)
-> (V1ImageVolumeSource -> V1ImageVolumeSource -> Bool)
-> Eq V1ImageVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ImageVolumeSource -> V1ImageVolumeSource -> Bool
== :: V1ImageVolumeSource -> V1ImageVolumeSource -> Bool
$c/= :: V1ImageVolumeSource -> V1ImageVolumeSource -> Bool
/= :: V1ImageVolumeSource -> V1ImageVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ImageVolumeSource
instance A.FromJSON V1ImageVolumeSource where
  parseJSON :: Value -> Parser V1ImageVolumeSource
parseJSON = String
-> (Object -> Parser V1ImageVolumeSource)
-> Value
-> Parser V1ImageVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ImageVolumeSource" ((Object -> Parser V1ImageVolumeSource)
 -> Value -> Parser V1ImageVolumeSource)
-> (Object -> Parser V1ImageVolumeSource)
-> Value
-> Parser V1ImageVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Maybe Text -> V1ImageVolumeSource
V1ImageVolumeSource
      (Maybe Text -> Maybe Text -> V1ImageVolumeSource)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> V1ImageVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"pullPolicy")
      Parser (Maybe Text -> V1ImageVolumeSource)
-> Parser (Maybe Text) -> Parser V1ImageVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reference")

-- | ToJSON V1ImageVolumeSource
instance A.ToJSON V1ImageVolumeSource where
  toJSON :: V1ImageVolumeSource -> Value
toJSON V1ImageVolumeSource {Maybe Text
$sel:v1ImageVolumeSourcePullPolicy:V1ImageVolumeSource :: V1ImageVolumeSource -> Maybe Text
$sel:v1ImageVolumeSourceReference:V1ImageVolumeSource :: V1ImageVolumeSource -> Maybe Text
v1ImageVolumeSourcePullPolicy :: Maybe Text
v1ImageVolumeSourceReference :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"pullPolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ImageVolumeSourcePullPolicy
      , Key
"reference" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ImageVolumeSourceReference
      ]


-- | Construct a value of type 'V1ImageVolumeSource' (by applying it's required fields, if any)
mkV1ImageVolumeSource
  :: V1ImageVolumeSource
mkV1ImageVolumeSource :: V1ImageVolumeSource
mkV1ImageVolumeSource =
  V1ImageVolumeSource
  { $sel:v1ImageVolumeSourcePullPolicy:V1ImageVolumeSource :: Maybe Text
v1ImageVolumeSourcePullPolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ImageVolumeSourceReference:V1ImageVolumeSource :: Maybe Text
v1ImageVolumeSourceReference = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1Ingress
-- | V1Ingress
-- Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.
data V1Ingress = V1Ingress
  { V1Ingress -> Maybe Text
v1IngressApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1Ingress -> Maybe Text
v1IngressKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1Ingress -> Maybe V1ObjectMeta
v1IngressMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1Ingress -> Maybe V1IngressSpec
v1IngressSpec :: !(Maybe V1IngressSpec) -- ^ "spec"
  , V1Ingress -> Maybe V1IngressStatus
v1IngressStatus :: !(Maybe V1IngressStatus) -- ^ "status"
  } deriving (Int -> V1Ingress -> ShowS
[V1Ingress] -> ShowS
V1Ingress -> String
(Int -> V1Ingress -> ShowS)
-> (V1Ingress -> String)
-> ([V1Ingress] -> ShowS)
-> Show V1Ingress
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1Ingress -> ShowS
showsPrec :: Int -> V1Ingress -> ShowS
$cshow :: V1Ingress -> String
show :: V1Ingress -> String
$cshowList :: [V1Ingress] -> ShowS
showList :: [V1Ingress] -> ShowS
P.Show, V1Ingress -> V1Ingress -> Bool
(V1Ingress -> V1Ingress -> Bool)
-> (V1Ingress -> V1Ingress -> Bool) -> Eq V1Ingress
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1Ingress -> V1Ingress -> Bool
== :: V1Ingress -> V1Ingress -> Bool
$c/= :: V1Ingress -> V1Ingress -> Bool
/= :: V1Ingress -> V1Ingress -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1Ingress
instance A.FromJSON V1Ingress where
  parseJSON :: Value -> Parser V1Ingress
parseJSON = String -> (Object -> Parser V1Ingress) -> Value -> Parser V1Ingress
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1Ingress" ((Object -> Parser V1Ingress) -> Value -> Parser V1Ingress)
-> (Object -> Parser V1Ingress) -> Value -> Parser V1Ingress
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1IngressSpec
-> Maybe V1IngressStatus
-> V1Ingress
V1Ingress
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1IngressSpec
 -> Maybe V1IngressStatus
 -> V1Ingress)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1IngressSpec
      -> Maybe V1IngressStatus
      -> V1Ingress)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1IngressSpec
   -> Maybe V1IngressStatus
   -> V1Ingress)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1IngressSpec -> Maybe V1IngressStatus -> V1Ingress)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1IngressSpec -> Maybe V1IngressStatus -> V1Ingress)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe V1IngressSpec -> Maybe V1IngressStatus -> V1Ingress)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (Maybe V1IngressSpec -> Maybe V1IngressStatus -> V1Ingress)
-> Parser (Maybe V1IngressSpec)
-> Parser (Maybe V1IngressStatus -> V1Ingress)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1IngressSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")
      Parser (Maybe V1IngressStatus -> V1Ingress)
-> Parser (Maybe V1IngressStatus) -> Parser V1Ingress
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1IngressStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1Ingress
instance A.ToJSON V1Ingress where
  toJSON :: V1Ingress -> Value
toJSON V1Ingress {Maybe Text
Maybe V1ObjectMeta
Maybe V1IngressStatus
Maybe V1IngressSpec
$sel:v1IngressApiVersion:V1Ingress :: V1Ingress -> Maybe Text
$sel:v1IngressKind:V1Ingress :: V1Ingress -> Maybe Text
$sel:v1IngressMetadata:V1Ingress :: V1Ingress -> Maybe V1ObjectMeta
$sel:v1IngressSpec:V1Ingress :: V1Ingress -> Maybe V1IngressSpec
$sel:v1IngressStatus:V1Ingress :: V1Ingress -> Maybe V1IngressStatus
v1IngressApiVersion :: Maybe Text
v1IngressKind :: Maybe Text
v1IngressMetadata :: Maybe V1ObjectMeta
v1IngressSpec :: Maybe V1IngressSpec
v1IngressStatus :: Maybe V1IngressStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1IngressApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1IngressKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1IngressMetadata
      , Key
"spec" Key -> Maybe V1IngressSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1IngressSpec
v1IngressSpec
      , Key
"status" Key -> Maybe V1IngressStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1IngressStatus
v1IngressStatus
      ]


-- | Construct a value of type 'V1Ingress' (by applying it's required fields, if any)
mkV1Ingress
  :: V1Ingress
mkV1Ingress :: V1Ingress
mkV1Ingress =
  V1Ingress
  { $sel:v1IngressApiVersion:V1Ingress :: Maybe Text
v1IngressApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1IngressKind:V1Ingress :: Maybe Text
v1IngressKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1IngressMetadata:V1Ingress :: Maybe V1ObjectMeta
v1IngressMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1IngressSpec:V1Ingress :: Maybe V1IngressSpec
v1IngressSpec = Maybe V1IngressSpec
forall a. Maybe a
Nothing
  , $sel:v1IngressStatus:V1Ingress :: Maybe V1IngressStatus
v1IngressStatus = Maybe V1IngressStatus
forall a. Maybe a
Nothing
  }

-- ** V1IngressBackend
-- | V1IngressBackend
-- IngressBackend describes all endpoints for a given service and port.
data V1IngressBackend = V1IngressBackend
  { V1IngressBackend -> Maybe V1TypedLocalObjectReference
v1IngressBackendResource :: !(Maybe V1TypedLocalObjectReference) -- ^ "resource"
  , V1IngressBackend -> Maybe V1IngressServiceBackend
v1IngressBackendService :: !(Maybe V1IngressServiceBackend) -- ^ "service"
  } deriving (Int -> V1IngressBackend -> ShowS
[V1IngressBackend] -> ShowS
V1IngressBackend -> String
(Int -> V1IngressBackend -> ShowS)
-> (V1IngressBackend -> String)
-> ([V1IngressBackend] -> ShowS)
-> Show V1IngressBackend
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1IngressBackend -> ShowS
showsPrec :: Int -> V1IngressBackend -> ShowS
$cshow :: V1IngressBackend -> String
show :: V1IngressBackend -> String
$cshowList :: [V1IngressBackend] -> ShowS
showList :: [V1IngressBackend] -> ShowS
P.Show, V1IngressBackend -> V1IngressBackend -> Bool
(V1IngressBackend -> V1IngressBackend -> Bool)
-> (V1IngressBackend -> V1IngressBackend -> Bool)
-> Eq V1IngressBackend
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1IngressBackend -> V1IngressBackend -> Bool
== :: V1IngressBackend -> V1IngressBackend -> Bool
$c/= :: V1IngressBackend -> V1IngressBackend -> Bool
/= :: V1IngressBackend -> V1IngressBackend -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1IngressBackend
instance A.FromJSON V1IngressBackend where
  parseJSON :: Value -> Parser V1IngressBackend
parseJSON = String
-> (Object -> Parser V1IngressBackend)
-> Value
-> Parser V1IngressBackend
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1IngressBackend" ((Object -> Parser V1IngressBackend)
 -> Value -> Parser V1IngressBackend)
-> (Object -> Parser V1IngressBackend)
-> Value
-> Parser V1IngressBackend
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1TypedLocalObjectReference
-> Maybe V1IngressServiceBackend -> V1IngressBackend
V1IngressBackend
      (Maybe V1TypedLocalObjectReference
 -> Maybe V1IngressServiceBackend -> V1IngressBackend)
-> Parser (Maybe V1TypedLocalObjectReference)
-> Parser (Maybe V1IngressServiceBackend -> V1IngressBackend)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1TypedLocalObjectReference)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resource")
      Parser (Maybe V1IngressServiceBackend -> V1IngressBackend)
-> Parser (Maybe V1IngressServiceBackend)
-> Parser V1IngressBackend
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1IngressServiceBackend)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"service")

-- | ToJSON V1IngressBackend
instance A.ToJSON V1IngressBackend where
  toJSON :: V1IngressBackend -> Value
toJSON V1IngressBackend {Maybe V1TypedLocalObjectReference
Maybe V1IngressServiceBackend
$sel:v1IngressBackendResource:V1IngressBackend :: V1IngressBackend -> Maybe V1TypedLocalObjectReference
$sel:v1IngressBackendService:V1IngressBackend :: V1IngressBackend -> Maybe V1IngressServiceBackend
v1IngressBackendResource :: Maybe V1TypedLocalObjectReference
v1IngressBackendService :: Maybe V1IngressServiceBackend
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"resource" Key -> Maybe V1TypedLocalObjectReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1TypedLocalObjectReference
v1IngressBackendResource
      , Key
"service" Key -> Maybe V1IngressServiceBackend -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1IngressServiceBackend
v1IngressBackendService
      ]


-- | Construct a value of type 'V1IngressBackend' (by applying it's required fields, if any)
mkV1IngressBackend
  :: V1IngressBackend
mkV1IngressBackend :: V1IngressBackend
mkV1IngressBackend =
  V1IngressBackend
  { $sel:v1IngressBackendResource:V1IngressBackend :: Maybe V1TypedLocalObjectReference
v1IngressBackendResource = Maybe V1TypedLocalObjectReference
forall a. Maybe a
Nothing
  , $sel:v1IngressBackendService:V1IngressBackend :: Maybe V1IngressServiceBackend
v1IngressBackendService = Maybe V1IngressServiceBackend
forall a. Maybe a
Nothing
  }

-- ** V1IngressClass
-- | V1IngressClass
-- IngressClass represents the class of the Ingress, referenced by the Ingress Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class.
data V1IngressClass = V1IngressClass
  { V1IngressClass -> Maybe Text
v1IngressClassApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1IngressClass -> Maybe Text
v1IngressClassKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1IngressClass -> Maybe V1ObjectMeta
v1IngressClassMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1IngressClass -> Maybe V1IngressClassSpec
v1IngressClassSpec :: !(Maybe V1IngressClassSpec) -- ^ "spec"
  } deriving (Int -> V1IngressClass -> ShowS
[V1IngressClass] -> ShowS
V1IngressClass -> String
(Int -> V1IngressClass -> ShowS)
-> (V1IngressClass -> String)
-> ([V1IngressClass] -> ShowS)
-> Show V1IngressClass
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1IngressClass -> ShowS
showsPrec :: Int -> V1IngressClass -> ShowS
$cshow :: V1IngressClass -> String
show :: V1IngressClass -> String
$cshowList :: [V1IngressClass] -> ShowS
showList :: [V1IngressClass] -> ShowS
P.Show, V1IngressClass -> V1IngressClass -> Bool
(V1IngressClass -> V1IngressClass -> Bool)
-> (V1IngressClass -> V1IngressClass -> Bool) -> Eq V1IngressClass
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1IngressClass -> V1IngressClass -> Bool
== :: V1IngressClass -> V1IngressClass -> Bool
$c/= :: V1IngressClass -> V1IngressClass -> Bool
/= :: V1IngressClass -> V1IngressClass -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1IngressClass
instance A.FromJSON V1IngressClass where
  parseJSON :: Value -> Parser V1IngressClass
parseJSON = String
-> (Object -> Parser V1IngressClass)
-> Value
-> Parser V1IngressClass
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1IngressClass" ((Object -> Parser V1IngressClass)
 -> Value -> Parser V1IngressClass)
-> (Object -> Parser V1IngressClass)
-> Value
-> Parser V1IngressClass
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1IngressClassSpec
-> V1IngressClass
V1IngressClass
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1IngressClassSpec
 -> V1IngressClass)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1IngressClassSpec
      -> V1IngressClass)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1IngressClassSpec
   -> V1IngressClass)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta -> Maybe V1IngressClassSpec -> V1IngressClass)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta -> Maybe V1IngressClassSpec -> V1IngressClass)
-> Parser (Maybe V1ObjectMeta)
-> Parser (Maybe V1IngressClassSpec -> V1IngressClass)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (Maybe V1IngressClassSpec -> V1IngressClass)
-> Parser (Maybe V1IngressClassSpec) -> Parser V1IngressClass
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1IngressClassSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")

-- | ToJSON V1IngressClass
instance A.ToJSON V1IngressClass where
  toJSON :: V1IngressClass -> Value
toJSON V1IngressClass {Maybe Text
Maybe V1ObjectMeta
Maybe V1IngressClassSpec
$sel:v1IngressClassApiVersion:V1IngressClass :: V1IngressClass -> Maybe Text
$sel:v1IngressClassKind:V1IngressClass :: V1IngressClass -> Maybe Text
$sel:v1IngressClassMetadata:V1IngressClass :: V1IngressClass -> Maybe V1ObjectMeta
$sel:v1IngressClassSpec:V1IngressClass :: V1IngressClass -> Maybe V1IngressClassSpec
v1IngressClassApiVersion :: Maybe Text
v1IngressClassKind :: Maybe Text
v1IngressClassMetadata :: Maybe V1ObjectMeta
v1IngressClassSpec :: Maybe V1IngressClassSpec
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1IngressClassApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1IngressClassKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1IngressClassMetadata
      , Key
"spec" Key -> Maybe V1IngressClassSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1IngressClassSpec
v1IngressClassSpec
      ]


-- | Construct a value of type 'V1IngressClass' (by applying it's required fields, if any)
mkV1IngressClass
  :: V1IngressClass
mkV1IngressClass :: V1IngressClass
mkV1IngressClass =
  V1IngressClass
  { $sel:v1IngressClassApiVersion:V1IngressClass :: Maybe Text
v1IngressClassApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1IngressClassKind:V1IngressClass :: Maybe Text
v1IngressClassKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1IngressClassMetadata:V1IngressClass :: Maybe V1ObjectMeta
v1IngressClassMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1IngressClassSpec:V1IngressClass :: Maybe V1IngressClassSpec
v1IngressClassSpec = Maybe V1IngressClassSpec
forall a. Maybe a
Nothing
  }

-- ** V1IngressClassList
-- | V1IngressClassList
-- IngressClassList is a collection of IngressClasses.
data V1IngressClassList = V1IngressClassList
  { V1IngressClassList -> Maybe Text
v1IngressClassListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1IngressClassList -> [V1IngressClass]
v1IngressClassListItems :: !([V1IngressClass]) -- ^ /Required/ "items" - items is the list of IngressClasses.
  , V1IngressClassList -> Maybe Text
v1IngressClassListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1IngressClassList -> Maybe V1ListMeta
v1IngressClassListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1IngressClassList -> ShowS
[V1IngressClassList] -> ShowS
V1IngressClassList -> String
(Int -> V1IngressClassList -> ShowS)
-> (V1IngressClassList -> String)
-> ([V1IngressClassList] -> ShowS)
-> Show V1IngressClassList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1IngressClassList -> ShowS
showsPrec :: Int -> V1IngressClassList -> ShowS
$cshow :: V1IngressClassList -> String
show :: V1IngressClassList -> String
$cshowList :: [V1IngressClassList] -> ShowS
showList :: [V1IngressClassList] -> ShowS
P.Show, V1IngressClassList -> V1IngressClassList -> Bool
(V1IngressClassList -> V1IngressClassList -> Bool)
-> (V1IngressClassList -> V1IngressClassList -> Bool)
-> Eq V1IngressClassList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1IngressClassList -> V1IngressClassList -> Bool
== :: V1IngressClassList -> V1IngressClassList -> Bool
$c/= :: V1IngressClassList -> V1IngressClassList -> Bool
/= :: V1IngressClassList -> V1IngressClassList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1IngressClassList
instance A.FromJSON V1IngressClassList where
  parseJSON :: Value -> Parser V1IngressClassList
parseJSON = String
-> (Object -> Parser V1IngressClassList)
-> Value
-> Parser V1IngressClassList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1IngressClassList" ((Object -> Parser V1IngressClassList)
 -> Value -> Parser V1IngressClassList)
-> (Object -> Parser V1IngressClassList)
-> Value
-> Parser V1IngressClassList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1IngressClass]
-> Maybe Text
-> Maybe V1ListMeta
-> V1IngressClassList
V1IngressClassList
      (Maybe Text
 -> [V1IngressClass]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1IngressClassList)
-> Parser (Maybe Text)
-> Parser
     ([V1IngressClass]
      -> Maybe Text -> Maybe V1ListMeta -> V1IngressClassList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1IngressClass]
   -> Maybe Text -> Maybe V1ListMeta -> V1IngressClassList)
-> Parser [V1IngressClass]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1IngressClassList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1IngressClass]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1IngressClassList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1IngressClassList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1IngressClassList)
-> Parser (Maybe V1ListMeta) -> Parser V1IngressClassList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1IngressClassList
instance A.ToJSON V1IngressClassList where
  toJSON :: V1IngressClassList -> Value
toJSON V1IngressClassList {[V1IngressClass]
Maybe Text
Maybe V1ListMeta
$sel:v1IngressClassListApiVersion:V1IngressClassList :: V1IngressClassList -> Maybe Text
$sel:v1IngressClassListItems:V1IngressClassList :: V1IngressClassList -> [V1IngressClass]
$sel:v1IngressClassListKind:V1IngressClassList :: V1IngressClassList -> Maybe Text
$sel:v1IngressClassListMetadata:V1IngressClassList :: V1IngressClassList -> Maybe V1ListMeta
v1IngressClassListApiVersion :: Maybe Text
v1IngressClassListItems :: [V1IngressClass]
v1IngressClassListKind :: Maybe Text
v1IngressClassListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1IngressClassListApiVersion
      , Key
"items" Key -> [V1IngressClass] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1IngressClass]
v1IngressClassListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1IngressClassListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1IngressClassListMetadata
      ]


-- | Construct a value of type 'V1IngressClassList' (by applying it's required fields, if any)
mkV1IngressClassList
  :: [V1IngressClass] -- ^ 'v1IngressClassListItems': items is the list of IngressClasses.
  -> V1IngressClassList
mkV1IngressClassList :: [V1IngressClass] -> V1IngressClassList
mkV1IngressClassList [V1IngressClass]
v1IngressClassListItems =
  V1IngressClassList
  { $sel:v1IngressClassListApiVersion:V1IngressClassList :: Maybe Text
v1IngressClassListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1IngressClass]
$sel:v1IngressClassListItems:V1IngressClassList :: [V1IngressClass]
v1IngressClassListItems :: [V1IngressClass]
v1IngressClassListItems
  , $sel:v1IngressClassListKind:V1IngressClassList :: Maybe Text
v1IngressClassListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1IngressClassListMetadata:V1IngressClassList :: Maybe V1ListMeta
v1IngressClassListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1IngressClassParametersReference
-- | V1IngressClassParametersReference
-- IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource.
data V1IngressClassParametersReference = V1IngressClassParametersReference
  { V1IngressClassParametersReference -> Maybe Text
v1IngressClassParametersReferenceApiGroup :: !(Maybe Text) -- ^ "apiGroup" - apiGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.
  , V1IngressClassParametersReference -> Text
v1IngressClassParametersReferenceKind :: !(Text) -- ^ /Required/ "kind" - kind is the type of resource being referenced.
  , V1IngressClassParametersReference -> Text
v1IngressClassParametersReferenceName :: !(Text) -- ^ /Required/ "name" - name is the name of resource being referenced.
  , V1IngressClassParametersReference -> Maybe Text
v1IngressClassParametersReferenceNamespace :: !(Maybe Text) -- ^ "namespace" - namespace is the namespace of the resource being referenced. This field is required when scope is set to \&quot;Namespace\&quot; and must be unset when scope is set to \&quot;Cluster\&quot;.
  , V1IngressClassParametersReference -> Maybe Text
v1IngressClassParametersReferenceScope :: !(Maybe Text) -- ^ "scope" - scope represents if this refers to a cluster or namespace scoped resource. This may be set to \&quot;Cluster\&quot; (default) or \&quot;Namespace\&quot;.
  } deriving (Int -> V1IngressClassParametersReference -> ShowS
[V1IngressClassParametersReference] -> ShowS
V1IngressClassParametersReference -> String
(Int -> V1IngressClassParametersReference -> ShowS)
-> (V1IngressClassParametersReference -> String)
-> ([V1IngressClassParametersReference] -> ShowS)
-> Show V1IngressClassParametersReference
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1IngressClassParametersReference -> ShowS
showsPrec :: Int -> V1IngressClassParametersReference -> ShowS
$cshow :: V1IngressClassParametersReference -> String
show :: V1IngressClassParametersReference -> String
$cshowList :: [V1IngressClassParametersReference] -> ShowS
showList :: [V1IngressClassParametersReference] -> ShowS
P.Show, V1IngressClassParametersReference
-> V1IngressClassParametersReference -> Bool
(V1IngressClassParametersReference
 -> V1IngressClassParametersReference -> Bool)
-> (V1IngressClassParametersReference
    -> V1IngressClassParametersReference -> Bool)
-> Eq V1IngressClassParametersReference
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1IngressClassParametersReference
-> V1IngressClassParametersReference -> Bool
== :: V1IngressClassParametersReference
-> V1IngressClassParametersReference -> Bool
$c/= :: V1IngressClassParametersReference
-> V1IngressClassParametersReference -> Bool
/= :: V1IngressClassParametersReference
-> V1IngressClassParametersReference -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1IngressClassParametersReference
instance A.FromJSON V1IngressClassParametersReference where
  parseJSON :: Value -> Parser V1IngressClassParametersReference
parseJSON = String
-> (Object -> Parser V1IngressClassParametersReference)
-> Value
-> Parser V1IngressClassParametersReference
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1IngressClassParametersReference" ((Object -> Parser V1IngressClassParametersReference)
 -> Value -> Parser V1IngressClassParametersReference)
-> (Object -> Parser V1IngressClassParametersReference)
-> Value
-> Parser V1IngressClassParametersReference
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Text
-> Text
-> Maybe Text
-> Maybe Text
-> V1IngressClassParametersReference
V1IngressClassParametersReference
      (Maybe Text
 -> Text
 -> Text
 -> Maybe Text
 -> Maybe Text
 -> V1IngressClassParametersReference)
-> Parser (Maybe Text)
-> Parser
     (Text
      -> Text
      -> Maybe Text
      -> Maybe Text
      -> V1IngressClassParametersReference)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiGroup")
      Parser
  (Text
   -> Text
   -> Maybe Text
   -> Maybe Text
   -> V1IngressClassParametersReference)
-> Parser Text
-> Parser
     (Text
      -> Maybe Text -> Maybe Text -> V1IngressClassParametersReference)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"kind")
      Parser
  (Text
   -> Maybe Text -> Maybe Text -> V1IngressClassParametersReference)
-> Parser Text
-> Parser
     (Maybe Text -> Maybe Text -> V1IngressClassParametersReference)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser
  (Maybe Text -> Maybe Text -> V1IngressClassParametersReference)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> V1IngressClassParametersReference)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"namespace")
      Parser (Maybe Text -> V1IngressClassParametersReference)
-> Parser (Maybe Text) -> Parser V1IngressClassParametersReference
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"scope")

-- | ToJSON V1IngressClassParametersReference
instance A.ToJSON V1IngressClassParametersReference where
  toJSON :: V1IngressClassParametersReference -> Value
toJSON V1IngressClassParametersReference {Maybe Text
Text
$sel:v1IngressClassParametersReferenceApiGroup:V1IngressClassParametersReference :: V1IngressClassParametersReference -> Maybe Text
$sel:v1IngressClassParametersReferenceKind:V1IngressClassParametersReference :: V1IngressClassParametersReference -> Text
$sel:v1IngressClassParametersReferenceName:V1IngressClassParametersReference :: V1IngressClassParametersReference -> Text
$sel:v1IngressClassParametersReferenceNamespace:V1IngressClassParametersReference :: V1IngressClassParametersReference -> Maybe Text
$sel:v1IngressClassParametersReferenceScope:V1IngressClassParametersReference :: V1IngressClassParametersReference -> Maybe Text
v1IngressClassParametersReferenceApiGroup :: Maybe Text
v1IngressClassParametersReferenceKind :: Text
v1IngressClassParametersReferenceName :: Text
v1IngressClassParametersReferenceNamespace :: Maybe Text
v1IngressClassParametersReferenceScope :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiGroup" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1IngressClassParametersReferenceApiGroup
      , Key
"kind" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1IngressClassParametersReferenceKind
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1IngressClassParametersReferenceName
      , Key
"namespace" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1IngressClassParametersReferenceNamespace
      , Key
"scope" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1IngressClassParametersReferenceScope
      ]


-- | Construct a value of type 'V1IngressClassParametersReference' (by applying it's required fields, if any)
mkV1IngressClassParametersReference
  :: Text -- ^ 'v1IngressClassParametersReferenceKind': kind is the type of resource being referenced.
  -> Text -- ^ 'v1IngressClassParametersReferenceName': name is the name of resource being referenced.
  -> V1IngressClassParametersReference
mkV1IngressClassParametersReference :: Text -> Text -> V1IngressClassParametersReference
mkV1IngressClassParametersReference Text
v1IngressClassParametersReferenceKind Text
v1IngressClassParametersReferenceName =
  V1IngressClassParametersReference
  { $sel:v1IngressClassParametersReferenceApiGroup:V1IngressClassParametersReference :: Maybe Text
v1IngressClassParametersReferenceApiGroup = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1IngressClassParametersReferenceKind:V1IngressClassParametersReference :: Text
v1IngressClassParametersReferenceKind :: Text
v1IngressClassParametersReferenceKind
  , Text
$sel:v1IngressClassParametersReferenceName:V1IngressClassParametersReference :: Text
v1IngressClassParametersReferenceName :: Text
v1IngressClassParametersReferenceName
  , $sel:v1IngressClassParametersReferenceNamespace:V1IngressClassParametersReference :: Maybe Text
v1IngressClassParametersReferenceNamespace = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1IngressClassParametersReferenceScope:V1IngressClassParametersReference :: Maybe Text
v1IngressClassParametersReferenceScope = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1IngressClassSpec
-- | V1IngressClassSpec
-- IngressClassSpec provides information about the class of an Ingress.
data V1IngressClassSpec = V1IngressClassSpec
  { V1IngressClassSpec -> Maybe Text
v1IngressClassSpecController :: !(Maybe Text) -- ^ "controller" - controller refers to the name of the controller that should handle this class. This allows for different \&quot;flavors\&quot; that are controlled by the same controller. For example, you may have different parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. \&quot;acme.io/ingress-controller\&quot;. This field is immutable.
  , V1IngressClassSpec -> Maybe V1IngressClassParametersReference
v1IngressClassSpecParameters :: !(Maybe V1IngressClassParametersReference) -- ^ "parameters"
  } deriving (Int -> V1IngressClassSpec -> ShowS
[V1IngressClassSpec] -> ShowS
V1IngressClassSpec -> String
(Int -> V1IngressClassSpec -> ShowS)
-> (V1IngressClassSpec -> String)
-> ([V1IngressClassSpec] -> ShowS)
-> Show V1IngressClassSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1IngressClassSpec -> ShowS
showsPrec :: Int -> V1IngressClassSpec -> ShowS
$cshow :: V1IngressClassSpec -> String
show :: V1IngressClassSpec -> String
$cshowList :: [V1IngressClassSpec] -> ShowS
showList :: [V1IngressClassSpec] -> ShowS
P.Show, V1IngressClassSpec -> V1IngressClassSpec -> Bool
(V1IngressClassSpec -> V1IngressClassSpec -> Bool)
-> (V1IngressClassSpec -> V1IngressClassSpec -> Bool)
-> Eq V1IngressClassSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1IngressClassSpec -> V1IngressClassSpec -> Bool
== :: V1IngressClassSpec -> V1IngressClassSpec -> Bool
$c/= :: V1IngressClassSpec -> V1IngressClassSpec -> Bool
/= :: V1IngressClassSpec -> V1IngressClassSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1IngressClassSpec
instance A.FromJSON V1IngressClassSpec where
  parseJSON :: Value -> Parser V1IngressClassSpec
parseJSON = String
-> (Object -> Parser V1IngressClassSpec)
-> Value
-> Parser V1IngressClassSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1IngressClassSpec" ((Object -> Parser V1IngressClassSpec)
 -> Value -> Parser V1IngressClassSpec)
-> (Object -> Parser V1IngressClassSpec)
-> Value
-> Parser V1IngressClassSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe V1IngressClassParametersReference -> V1IngressClassSpec
V1IngressClassSpec
      (Maybe Text
 -> Maybe V1IngressClassParametersReference -> V1IngressClassSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1IngressClassParametersReference -> V1IngressClassSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"controller")
      Parser
  (Maybe V1IngressClassParametersReference -> V1IngressClassSpec)
-> Parser (Maybe V1IngressClassParametersReference)
-> Parser V1IngressClassSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1IngressClassParametersReference)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"parameters")

-- | ToJSON V1IngressClassSpec
instance A.ToJSON V1IngressClassSpec where
  toJSON :: V1IngressClassSpec -> Value
toJSON V1IngressClassSpec {Maybe Text
Maybe V1IngressClassParametersReference
$sel:v1IngressClassSpecController:V1IngressClassSpec :: V1IngressClassSpec -> Maybe Text
$sel:v1IngressClassSpecParameters:V1IngressClassSpec :: V1IngressClassSpec -> Maybe V1IngressClassParametersReference
v1IngressClassSpecController :: Maybe Text
v1IngressClassSpecParameters :: Maybe V1IngressClassParametersReference
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"controller" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1IngressClassSpecController
      , Key
"parameters" Key -> Maybe V1IngressClassParametersReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1IngressClassParametersReference
v1IngressClassSpecParameters
      ]


-- | Construct a value of type 'V1IngressClassSpec' (by applying it's required fields, if any)
mkV1IngressClassSpec
  :: V1IngressClassSpec
mkV1IngressClassSpec :: V1IngressClassSpec
mkV1IngressClassSpec =
  V1IngressClassSpec
  { $sel:v1IngressClassSpecController:V1IngressClassSpec :: Maybe Text
v1IngressClassSpecController = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1IngressClassSpecParameters:V1IngressClassSpec :: Maybe V1IngressClassParametersReference
v1IngressClassSpecParameters = Maybe V1IngressClassParametersReference
forall a. Maybe a
Nothing
  }

-- ** V1IngressList
-- | V1IngressList
-- IngressList is a collection of Ingress.
data V1IngressList = V1IngressList
  { V1IngressList -> Maybe Text
v1IngressListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1IngressList -> [V1Ingress]
v1IngressListItems :: !([V1Ingress]) -- ^ /Required/ "items" - items is the list of Ingress.
  , V1IngressList -> Maybe Text
v1IngressListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1IngressList -> Maybe V1ListMeta
v1IngressListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1IngressList -> ShowS
[V1IngressList] -> ShowS
V1IngressList -> String
(Int -> V1IngressList -> ShowS)
-> (V1IngressList -> String)
-> ([V1IngressList] -> ShowS)
-> Show V1IngressList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1IngressList -> ShowS
showsPrec :: Int -> V1IngressList -> ShowS
$cshow :: V1IngressList -> String
show :: V1IngressList -> String
$cshowList :: [V1IngressList] -> ShowS
showList :: [V1IngressList] -> ShowS
P.Show, V1IngressList -> V1IngressList -> Bool
(V1IngressList -> V1IngressList -> Bool)
-> (V1IngressList -> V1IngressList -> Bool) -> Eq V1IngressList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1IngressList -> V1IngressList -> Bool
== :: V1IngressList -> V1IngressList -> Bool
$c/= :: V1IngressList -> V1IngressList -> Bool
/= :: V1IngressList -> V1IngressList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1IngressList
instance A.FromJSON V1IngressList where
  parseJSON :: Value -> Parser V1IngressList
parseJSON = String
-> (Object -> Parser V1IngressList)
-> Value
-> Parser V1IngressList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1IngressList" ((Object -> Parser V1IngressList) -> Value -> Parser V1IngressList)
-> (Object -> Parser V1IngressList)
-> Value
-> Parser V1IngressList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1Ingress] -> Maybe Text -> Maybe V1ListMeta -> V1IngressList
V1IngressList
      (Maybe Text
 -> [V1Ingress] -> Maybe Text -> Maybe V1ListMeta -> V1IngressList)
-> Parser (Maybe Text)
-> Parser
     ([V1Ingress] -> Maybe Text -> Maybe V1ListMeta -> V1IngressList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1Ingress] -> Maybe Text -> Maybe V1ListMeta -> V1IngressList)
-> Parser [V1Ingress]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1IngressList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1Ingress]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1IngressList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1IngressList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1IngressList)
-> Parser (Maybe V1ListMeta) -> Parser V1IngressList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1IngressList
instance A.ToJSON V1IngressList where
  toJSON :: V1IngressList -> Value
toJSON V1IngressList {[V1Ingress]
Maybe Text
Maybe V1ListMeta
$sel:v1IngressListApiVersion:V1IngressList :: V1IngressList -> Maybe Text
$sel:v1IngressListItems:V1IngressList :: V1IngressList -> [V1Ingress]
$sel:v1IngressListKind:V1IngressList :: V1IngressList -> Maybe Text
$sel:v1IngressListMetadata:V1IngressList :: V1IngressList -> Maybe V1ListMeta
v1IngressListApiVersion :: Maybe Text
v1IngressListItems :: [V1Ingress]
v1IngressListKind :: Maybe Text
v1IngressListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1IngressListApiVersion
      , Key
"items" Key -> [V1Ingress] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1Ingress]
v1IngressListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1IngressListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1IngressListMetadata
      ]


-- | Construct a value of type 'V1IngressList' (by applying it's required fields, if any)
mkV1IngressList
  :: [V1Ingress] -- ^ 'v1IngressListItems': items is the list of Ingress.
  -> V1IngressList
mkV1IngressList :: [V1Ingress] -> V1IngressList
mkV1IngressList [V1Ingress]
v1IngressListItems =
  V1IngressList
  { $sel:v1IngressListApiVersion:V1IngressList :: Maybe Text
v1IngressListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1Ingress]
$sel:v1IngressListItems:V1IngressList :: [V1Ingress]
v1IngressListItems :: [V1Ingress]
v1IngressListItems
  , $sel:v1IngressListKind:V1IngressList :: Maybe Text
v1IngressListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1IngressListMetadata:V1IngressList :: Maybe V1ListMeta
v1IngressListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1IngressLoadBalancerIngress
-- | V1IngressLoadBalancerIngress
-- IngressLoadBalancerIngress represents the status of a load-balancer ingress point.
data V1IngressLoadBalancerIngress = V1IngressLoadBalancerIngress
  { V1IngressLoadBalancerIngress -> Maybe Text
v1IngressLoadBalancerIngressHostname :: !(Maybe Text) -- ^ "hostname" - hostname is set for load-balancer ingress points that are DNS based.
  , V1IngressLoadBalancerIngress -> Maybe Text
v1IngressLoadBalancerIngressIp :: !(Maybe Text) -- ^ "ip" - ip is set for load-balancer ingress points that are IP based.
  , V1IngressLoadBalancerIngress -> Maybe [V1IngressPortStatus]
v1IngressLoadBalancerIngressPorts :: !(Maybe [V1IngressPortStatus]) -- ^ "ports" - ports provides information about the ports exposed by this LoadBalancer.
  } deriving (Int -> V1IngressLoadBalancerIngress -> ShowS
[V1IngressLoadBalancerIngress] -> ShowS
V1IngressLoadBalancerIngress -> String
(Int -> V1IngressLoadBalancerIngress -> ShowS)
-> (V1IngressLoadBalancerIngress -> String)
-> ([V1IngressLoadBalancerIngress] -> ShowS)
-> Show V1IngressLoadBalancerIngress
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1IngressLoadBalancerIngress -> ShowS
showsPrec :: Int -> V1IngressLoadBalancerIngress -> ShowS
$cshow :: V1IngressLoadBalancerIngress -> String
show :: V1IngressLoadBalancerIngress -> String
$cshowList :: [V1IngressLoadBalancerIngress] -> ShowS
showList :: [V1IngressLoadBalancerIngress] -> ShowS
P.Show, V1IngressLoadBalancerIngress
-> V1IngressLoadBalancerIngress -> Bool
(V1IngressLoadBalancerIngress
 -> V1IngressLoadBalancerIngress -> Bool)
-> (V1IngressLoadBalancerIngress
    -> V1IngressLoadBalancerIngress -> Bool)
-> Eq V1IngressLoadBalancerIngress
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1IngressLoadBalancerIngress
-> V1IngressLoadBalancerIngress -> Bool
== :: V1IngressLoadBalancerIngress
-> V1IngressLoadBalancerIngress -> Bool
$c/= :: V1IngressLoadBalancerIngress
-> V1IngressLoadBalancerIngress -> Bool
/= :: V1IngressLoadBalancerIngress
-> V1IngressLoadBalancerIngress -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1IngressLoadBalancerIngress
instance A.FromJSON V1IngressLoadBalancerIngress where
  parseJSON :: Value -> Parser V1IngressLoadBalancerIngress
parseJSON = String
-> (Object -> Parser V1IngressLoadBalancerIngress)
-> Value
-> Parser V1IngressLoadBalancerIngress
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1IngressLoadBalancerIngress" ((Object -> Parser V1IngressLoadBalancerIngress)
 -> Value -> Parser V1IngressLoadBalancerIngress)
-> (Object -> Parser V1IngressLoadBalancerIngress)
-> Value
-> Parser V1IngressLoadBalancerIngress
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe [V1IngressPortStatus]
-> V1IngressLoadBalancerIngress
V1IngressLoadBalancerIngress
      (Maybe Text
 -> Maybe Text
 -> Maybe [V1IngressPortStatus]
 -> V1IngressLoadBalancerIngress)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [V1IngressPortStatus] -> V1IngressLoadBalancerIngress)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"hostname")
      Parser
  (Maybe Text
   -> Maybe [V1IngressPortStatus] -> V1IngressLoadBalancerIngress)
-> Parser (Maybe Text)
-> Parser
     (Maybe [V1IngressPortStatus] -> V1IngressLoadBalancerIngress)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ip")
      Parser
  (Maybe [V1IngressPortStatus] -> V1IngressLoadBalancerIngress)
-> Parser (Maybe [V1IngressPortStatus])
-> Parser V1IngressLoadBalancerIngress
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1IngressPortStatus])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ports")

-- | ToJSON V1IngressLoadBalancerIngress
instance A.ToJSON V1IngressLoadBalancerIngress where
  toJSON :: V1IngressLoadBalancerIngress -> Value
toJSON V1IngressLoadBalancerIngress {Maybe [V1IngressPortStatus]
Maybe Text
$sel:v1IngressLoadBalancerIngressHostname:V1IngressLoadBalancerIngress :: V1IngressLoadBalancerIngress -> Maybe Text
$sel:v1IngressLoadBalancerIngressIp:V1IngressLoadBalancerIngress :: V1IngressLoadBalancerIngress -> Maybe Text
$sel:v1IngressLoadBalancerIngressPorts:V1IngressLoadBalancerIngress :: V1IngressLoadBalancerIngress -> Maybe [V1IngressPortStatus]
v1IngressLoadBalancerIngressHostname :: Maybe Text
v1IngressLoadBalancerIngressIp :: Maybe Text
v1IngressLoadBalancerIngressPorts :: Maybe [V1IngressPortStatus]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"hostname" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1IngressLoadBalancerIngressHostname
      , Key
"ip" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1IngressLoadBalancerIngressIp
      , Key
"ports" Key -> Maybe [V1IngressPortStatus] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1IngressPortStatus]
v1IngressLoadBalancerIngressPorts
      ]


-- | Construct a value of type 'V1IngressLoadBalancerIngress' (by applying it's required fields, if any)
mkV1IngressLoadBalancerIngress
  :: V1IngressLoadBalancerIngress
mkV1IngressLoadBalancerIngress :: V1IngressLoadBalancerIngress
mkV1IngressLoadBalancerIngress =
  V1IngressLoadBalancerIngress
  { $sel:v1IngressLoadBalancerIngressHostname:V1IngressLoadBalancerIngress :: Maybe Text
v1IngressLoadBalancerIngressHostname = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1IngressLoadBalancerIngressIp:V1IngressLoadBalancerIngress :: Maybe Text
v1IngressLoadBalancerIngressIp = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1IngressLoadBalancerIngressPorts:V1IngressLoadBalancerIngress :: Maybe [V1IngressPortStatus]
v1IngressLoadBalancerIngressPorts = Maybe [V1IngressPortStatus]
forall a. Maybe a
Nothing
  }

-- ** V1IngressLoadBalancerStatus
-- | V1IngressLoadBalancerStatus
-- IngressLoadBalancerStatus represents the status of a load-balancer.
data V1IngressLoadBalancerStatus = V1IngressLoadBalancerStatus
  { V1IngressLoadBalancerStatus -> Maybe [V1IngressLoadBalancerIngress]
v1IngressLoadBalancerStatusIngress :: !(Maybe [V1IngressLoadBalancerIngress]) -- ^ "ingress" - ingress is a list containing ingress points for the load-balancer.
  } deriving (Int -> V1IngressLoadBalancerStatus -> ShowS
[V1IngressLoadBalancerStatus] -> ShowS
V1IngressLoadBalancerStatus -> String
(Int -> V1IngressLoadBalancerStatus -> ShowS)
-> (V1IngressLoadBalancerStatus -> String)
-> ([V1IngressLoadBalancerStatus] -> ShowS)
-> Show V1IngressLoadBalancerStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1IngressLoadBalancerStatus -> ShowS
showsPrec :: Int -> V1IngressLoadBalancerStatus -> ShowS
$cshow :: V1IngressLoadBalancerStatus -> String
show :: V1IngressLoadBalancerStatus -> String
$cshowList :: [V1IngressLoadBalancerStatus] -> ShowS
showList :: [V1IngressLoadBalancerStatus] -> ShowS
P.Show, V1IngressLoadBalancerStatus -> V1IngressLoadBalancerStatus -> Bool
(V1IngressLoadBalancerStatus
 -> V1IngressLoadBalancerStatus -> Bool)
-> (V1IngressLoadBalancerStatus
    -> V1IngressLoadBalancerStatus -> Bool)
-> Eq V1IngressLoadBalancerStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1IngressLoadBalancerStatus -> V1IngressLoadBalancerStatus -> Bool
== :: V1IngressLoadBalancerStatus -> V1IngressLoadBalancerStatus -> Bool
$c/= :: V1IngressLoadBalancerStatus -> V1IngressLoadBalancerStatus -> Bool
/= :: V1IngressLoadBalancerStatus -> V1IngressLoadBalancerStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1IngressLoadBalancerStatus
instance A.FromJSON V1IngressLoadBalancerStatus where
  parseJSON :: Value -> Parser V1IngressLoadBalancerStatus
parseJSON = String
-> (Object -> Parser V1IngressLoadBalancerStatus)
-> Value
-> Parser V1IngressLoadBalancerStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1IngressLoadBalancerStatus" ((Object -> Parser V1IngressLoadBalancerStatus)
 -> Value -> Parser V1IngressLoadBalancerStatus)
-> (Object -> Parser V1IngressLoadBalancerStatus)
-> Value
-> Parser V1IngressLoadBalancerStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1IngressLoadBalancerIngress] -> V1IngressLoadBalancerStatus
V1IngressLoadBalancerStatus
      (Maybe [V1IngressLoadBalancerIngress]
 -> V1IngressLoadBalancerStatus)
-> Parser (Maybe [V1IngressLoadBalancerIngress])
-> Parser V1IngressLoadBalancerStatus
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1IngressLoadBalancerIngress])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ingress")

-- | ToJSON V1IngressLoadBalancerStatus
instance A.ToJSON V1IngressLoadBalancerStatus where
  toJSON :: V1IngressLoadBalancerStatus -> Value
toJSON V1IngressLoadBalancerStatus {Maybe [V1IngressLoadBalancerIngress]
$sel:v1IngressLoadBalancerStatusIngress:V1IngressLoadBalancerStatus :: V1IngressLoadBalancerStatus -> Maybe [V1IngressLoadBalancerIngress]
v1IngressLoadBalancerStatusIngress :: Maybe [V1IngressLoadBalancerIngress]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"ingress" Key -> Maybe [V1IngressLoadBalancerIngress] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1IngressLoadBalancerIngress]
v1IngressLoadBalancerStatusIngress
      ]


-- | Construct a value of type 'V1IngressLoadBalancerStatus' (by applying it's required fields, if any)
mkV1IngressLoadBalancerStatus
  :: V1IngressLoadBalancerStatus
mkV1IngressLoadBalancerStatus :: V1IngressLoadBalancerStatus
mkV1IngressLoadBalancerStatus =
  V1IngressLoadBalancerStatus
  { $sel:v1IngressLoadBalancerStatusIngress:V1IngressLoadBalancerStatus :: Maybe [V1IngressLoadBalancerIngress]
v1IngressLoadBalancerStatusIngress = Maybe [V1IngressLoadBalancerIngress]
forall a. Maybe a
Nothing
  }

-- ** V1IngressPortStatus
-- | V1IngressPortStatus
-- IngressPortStatus represents the error condition of a service port
data V1IngressPortStatus = V1IngressPortStatus
  { V1IngressPortStatus -> Maybe Text
v1IngressPortStatusError :: !(Maybe Text) -- ^ "error" - error is to record the problem with the service port The format of the error shall comply with the following rules: - built-in error values shall be specified in this file and those shall use   CamelCase names - cloud provider specific error values must have names that comply with the   format foo.example.com/CamelCase.
  , V1IngressPortStatus -> Int
v1IngressPortStatusPort :: !(Int) -- ^ /Required/ "port" - port is the port number of the ingress port.
  , V1IngressPortStatus -> Text
v1IngressPortStatusProtocol :: !(Text) -- ^ /Required/ "protocol" - protocol is the protocol of the ingress port. The supported values are: \&quot;TCP\&quot;, \&quot;UDP\&quot;, \&quot;SCTP\&quot;
  } deriving (Int -> V1IngressPortStatus -> ShowS
[V1IngressPortStatus] -> ShowS
V1IngressPortStatus -> String
(Int -> V1IngressPortStatus -> ShowS)
-> (V1IngressPortStatus -> String)
-> ([V1IngressPortStatus] -> ShowS)
-> Show V1IngressPortStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1IngressPortStatus -> ShowS
showsPrec :: Int -> V1IngressPortStatus -> ShowS
$cshow :: V1IngressPortStatus -> String
show :: V1IngressPortStatus -> String
$cshowList :: [V1IngressPortStatus] -> ShowS
showList :: [V1IngressPortStatus] -> ShowS
P.Show, V1IngressPortStatus -> V1IngressPortStatus -> Bool
(V1IngressPortStatus -> V1IngressPortStatus -> Bool)
-> (V1IngressPortStatus -> V1IngressPortStatus -> Bool)
-> Eq V1IngressPortStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1IngressPortStatus -> V1IngressPortStatus -> Bool
== :: V1IngressPortStatus -> V1IngressPortStatus -> Bool
$c/= :: V1IngressPortStatus -> V1IngressPortStatus -> Bool
/= :: V1IngressPortStatus -> V1IngressPortStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1IngressPortStatus
instance A.FromJSON V1IngressPortStatus where
  parseJSON :: Value -> Parser V1IngressPortStatus
parseJSON = String
-> (Object -> Parser V1IngressPortStatus)
-> Value
-> Parser V1IngressPortStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1IngressPortStatus" ((Object -> Parser V1IngressPortStatus)
 -> Value -> Parser V1IngressPortStatus)
-> (Object -> Parser V1IngressPortStatus)
-> Value
-> Parser V1IngressPortStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Int -> Text -> V1IngressPortStatus
V1IngressPortStatus
      (Maybe Text -> Int -> Text -> V1IngressPortStatus)
-> Parser (Maybe Text)
-> Parser (Int -> Text -> V1IngressPortStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"error")
      Parser (Int -> Text -> V1IngressPortStatus)
-> Parser Int -> Parser (Text -> V1IngressPortStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"port")
      Parser (Text -> V1IngressPortStatus)
-> Parser Text -> Parser V1IngressPortStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"protocol")

-- | ToJSON V1IngressPortStatus
instance A.ToJSON V1IngressPortStatus where
  toJSON :: V1IngressPortStatus -> Value
toJSON V1IngressPortStatus {Int
Maybe Text
Text
$sel:v1IngressPortStatusError:V1IngressPortStatus :: V1IngressPortStatus -> Maybe Text
$sel:v1IngressPortStatusPort:V1IngressPortStatus :: V1IngressPortStatus -> Int
$sel:v1IngressPortStatusProtocol:V1IngressPortStatus :: V1IngressPortStatus -> Text
v1IngressPortStatusError :: Maybe Text
v1IngressPortStatusPort :: Int
v1IngressPortStatusProtocol :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"error" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1IngressPortStatusError
      , Key
"port" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v1IngressPortStatusPort
      , Key
"protocol" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1IngressPortStatusProtocol
      ]


-- | Construct a value of type 'V1IngressPortStatus' (by applying it's required fields, if any)
mkV1IngressPortStatus
  :: Int -- ^ 'v1IngressPortStatusPort': port is the port number of the ingress port.
  -> Text -- ^ 'v1IngressPortStatusProtocol': protocol is the protocol of the ingress port. The supported values are: \"TCP\", \"UDP\", \"SCTP\"
  -> V1IngressPortStatus
mkV1IngressPortStatus :: Int -> Text -> V1IngressPortStatus
mkV1IngressPortStatus Int
v1IngressPortStatusPort Text
v1IngressPortStatusProtocol =
  V1IngressPortStatus
  { $sel:v1IngressPortStatusError:V1IngressPortStatus :: Maybe Text
v1IngressPortStatusError = Maybe Text
forall a. Maybe a
Nothing
  , Int
$sel:v1IngressPortStatusPort:V1IngressPortStatus :: Int
v1IngressPortStatusPort :: Int
v1IngressPortStatusPort
  , Text
$sel:v1IngressPortStatusProtocol:V1IngressPortStatus :: Text
v1IngressPortStatusProtocol :: Text
v1IngressPortStatusProtocol
  }

-- ** V1IngressRule
-- | V1IngressRule
-- IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.
data V1IngressRule = V1IngressRule
  { V1IngressRule -> Maybe Text
v1IngressRuleHost :: !(Maybe Text) -- ^ "host" - host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \&quot;host\&quot; part of the URI as defined in RFC 3986: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to    the IP in the Spec of the parent Ingress. 2. The &#x60;:&#x60; delimiter is not respected because ports are not allowed.    Currently the port of an Ingress is implicitly :80 for http and    :443 for https. Both these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.  host can be \&quot;precise\&quot; which is a domain name without the terminating dot of a network host (e.g. \&quot;foo.bar.com\&quot;) or \&quot;wildcard\&quot;, which is a domain name prefixed with a single wildcard label (e.g. \&quot;*.foo.com\&quot;). The wildcard character &#39;*&#39; must appear by itself as the first DNS label and matches only a single label. You cannot have a wildcard label by itself (e.g. Host &#x3D;&#x3D; \&quot;*\&quot;). Requests will be matched against the Host field in the following way: 1. If host is precise, the request matches this rule if the http host header is equal to Host. 2. If host is a wildcard, then the request matches this rule if the http host header is to equal to the suffix (removing the first label) of the wildcard rule.
  , V1IngressRule -> Maybe V1HTTPIngressRuleValue
v1IngressRuleHttp :: !(Maybe V1HTTPIngressRuleValue) -- ^ "http"
  } deriving (Int -> V1IngressRule -> ShowS
[V1IngressRule] -> ShowS
V1IngressRule -> String
(Int -> V1IngressRule -> ShowS)
-> (V1IngressRule -> String)
-> ([V1IngressRule] -> ShowS)
-> Show V1IngressRule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1IngressRule -> ShowS
showsPrec :: Int -> V1IngressRule -> ShowS
$cshow :: V1IngressRule -> String
show :: V1IngressRule -> String
$cshowList :: [V1IngressRule] -> ShowS
showList :: [V1IngressRule] -> ShowS
P.Show, V1IngressRule -> V1IngressRule -> Bool
(V1IngressRule -> V1IngressRule -> Bool)
-> (V1IngressRule -> V1IngressRule -> Bool) -> Eq V1IngressRule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1IngressRule -> V1IngressRule -> Bool
== :: V1IngressRule -> V1IngressRule -> Bool
$c/= :: V1IngressRule -> V1IngressRule -> Bool
/= :: V1IngressRule -> V1IngressRule -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1IngressRule
instance A.FromJSON V1IngressRule where
  parseJSON :: Value -> Parser V1IngressRule
parseJSON = String
-> (Object -> Parser V1IngressRule)
-> Value
-> Parser V1IngressRule
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1IngressRule" ((Object -> Parser V1IngressRule) -> Value -> Parser V1IngressRule)
-> (Object -> Parser V1IngressRule)
-> Value
-> Parser V1IngressRule
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Maybe V1HTTPIngressRuleValue -> V1IngressRule
V1IngressRule
      (Maybe Text -> Maybe V1HTTPIngressRuleValue -> V1IngressRule)
-> Parser (Maybe Text)
-> Parser (Maybe V1HTTPIngressRuleValue -> V1IngressRule)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"host")
      Parser (Maybe V1HTTPIngressRuleValue -> V1IngressRule)
-> Parser (Maybe V1HTTPIngressRuleValue) -> Parser V1IngressRule
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1HTTPIngressRuleValue)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"http")

-- | ToJSON V1IngressRule
instance A.ToJSON V1IngressRule where
  toJSON :: V1IngressRule -> Value
toJSON V1IngressRule {Maybe Text
Maybe V1HTTPIngressRuleValue
$sel:v1IngressRuleHost:V1IngressRule :: V1IngressRule -> Maybe Text
$sel:v1IngressRuleHttp:V1IngressRule :: V1IngressRule -> Maybe V1HTTPIngressRuleValue
v1IngressRuleHost :: Maybe Text
v1IngressRuleHttp :: Maybe V1HTTPIngressRuleValue
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"host" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1IngressRuleHost
      , Key
"http" Key -> Maybe V1HTTPIngressRuleValue -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1HTTPIngressRuleValue
v1IngressRuleHttp
      ]


-- | Construct a value of type 'V1IngressRule' (by applying it's required fields, if any)
mkV1IngressRule
  :: V1IngressRule
mkV1IngressRule :: V1IngressRule
mkV1IngressRule =
  V1IngressRule
  { $sel:v1IngressRuleHost:V1IngressRule :: Maybe Text
v1IngressRuleHost = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1IngressRuleHttp:V1IngressRule :: Maybe V1HTTPIngressRuleValue
v1IngressRuleHttp = Maybe V1HTTPIngressRuleValue
forall a. Maybe a
Nothing
  }

-- ** V1IngressServiceBackend
-- | V1IngressServiceBackend
-- IngressServiceBackend references a Kubernetes Service as a Backend.
data V1IngressServiceBackend = V1IngressServiceBackend
  { V1IngressServiceBackend -> Text
v1IngressServiceBackendName :: !(Text) -- ^ /Required/ "name" - name is the referenced service. The service must exist in the same namespace as the Ingress object.
  , V1IngressServiceBackend -> Maybe V1ServiceBackendPort
v1IngressServiceBackendPort :: !(Maybe V1ServiceBackendPort) -- ^ "port"
  } deriving (Int -> V1IngressServiceBackend -> ShowS
[V1IngressServiceBackend] -> ShowS
V1IngressServiceBackend -> String
(Int -> V1IngressServiceBackend -> ShowS)
-> (V1IngressServiceBackend -> String)
-> ([V1IngressServiceBackend] -> ShowS)
-> Show V1IngressServiceBackend
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1IngressServiceBackend -> ShowS
showsPrec :: Int -> V1IngressServiceBackend -> ShowS
$cshow :: V1IngressServiceBackend -> String
show :: V1IngressServiceBackend -> String
$cshowList :: [V1IngressServiceBackend] -> ShowS
showList :: [V1IngressServiceBackend] -> ShowS
P.Show, V1IngressServiceBackend -> V1IngressServiceBackend -> Bool
(V1IngressServiceBackend -> V1IngressServiceBackend -> Bool)
-> (V1IngressServiceBackend -> V1IngressServiceBackend -> Bool)
-> Eq V1IngressServiceBackend
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1IngressServiceBackend -> V1IngressServiceBackend -> Bool
== :: V1IngressServiceBackend -> V1IngressServiceBackend -> Bool
$c/= :: V1IngressServiceBackend -> V1IngressServiceBackend -> Bool
/= :: V1IngressServiceBackend -> V1IngressServiceBackend -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1IngressServiceBackend
instance A.FromJSON V1IngressServiceBackend where
  parseJSON :: Value -> Parser V1IngressServiceBackend
parseJSON = String
-> (Object -> Parser V1IngressServiceBackend)
-> Value
-> Parser V1IngressServiceBackend
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1IngressServiceBackend" ((Object -> Parser V1IngressServiceBackend)
 -> Value -> Parser V1IngressServiceBackend)
-> (Object -> Parser V1IngressServiceBackend)
-> Value
-> Parser V1IngressServiceBackend
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Maybe V1ServiceBackendPort -> V1IngressServiceBackend
V1IngressServiceBackend
      (Text -> Maybe V1ServiceBackendPort -> V1IngressServiceBackend)
-> Parser Text
-> Parser (Maybe V1ServiceBackendPort -> V1IngressServiceBackend)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser (Maybe V1ServiceBackendPort -> V1IngressServiceBackend)
-> Parser (Maybe V1ServiceBackendPort)
-> Parser V1IngressServiceBackend
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ServiceBackendPort)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"port")

-- | ToJSON V1IngressServiceBackend
instance A.ToJSON V1IngressServiceBackend where
  toJSON :: V1IngressServiceBackend -> Value
toJSON V1IngressServiceBackend {Maybe V1ServiceBackendPort
Text
$sel:v1IngressServiceBackendName:V1IngressServiceBackend :: V1IngressServiceBackend -> Text
$sel:v1IngressServiceBackendPort:V1IngressServiceBackend :: V1IngressServiceBackend -> Maybe V1ServiceBackendPort
v1IngressServiceBackendName :: Text
v1IngressServiceBackendPort :: Maybe V1ServiceBackendPort
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1IngressServiceBackendName
      , Key
"port" Key -> Maybe V1ServiceBackendPort -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ServiceBackendPort
v1IngressServiceBackendPort
      ]


-- | Construct a value of type 'V1IngressServiceBackend' (by applying it's required fields, if any)
mkV1IngressServiceBackend
  :: Text -- ^ 'v1IngressServiceBackendName': name is the referenced service. The service must exist in the same namespace as the Ingress object.
  -> V1IngressServiceBackend
mkV1IngressServiceBackend :: Text -> V1IngressServiceBackend
mkV1IngressServiceBackend Text
v1IngressServiceBackendName =
  V1IngressServiceBackend
  { Text
$sel:v1IngressServiceBackendName:V1IngressServiceBackend :: Text
v1IngressServiceBackendName :: Text
v1IngressServiceBackendName
  , $sel:v1IngressServiceBackendPort:V1IngressServiceBackend :: Maybe V1ServiceBackendPort
v1IngressServiceBackendPort = Maybe V1ServiceBackendPort
forall a. Maybe a
Nothing
  }

-- ** V1IngressSpec
-- | V1IngressSpec
-- IngressSpec describes the Ingress the user wishes to exist.
data V1IngressSpec = V1IngressSpec
  { V1IngressSpec -> Maybe V1IngressBackend
v1IngressSpecDefaultBackend :: !(Maybe V1IngressBackend) -- ^ "defaultBackend"
  , V1IngressSpec -> Maybe Text
v1IngressSpecIngressClassName :: !(Maybe Text) -- ^ "ingressClassName" - ingressClassName is the name of an IngressClass cluster resource. Ingress controller implementations use this field to know whether they should be serving this Ingress resource, by a transitive connection (controller -&gt; IngressClass -&gt; Ingress resource). Although the &#x60;kubernetes.io/ingress.class&#x60; annotation (simple constant name) was never formally defined, it was widely supported by Ingress controllers to create a direct binding between Ingress controller and Ingress resources. Newly created Ingress resources should prefer using the field. However, even though the annotation is officially deprecated, for backwards compatibility reasons, ingress controllers should still honor that annotation if present.
  , V1IngressSpec -> Maybe [V1IngressRule]
v1IngressSpecRules :: !(Maybe [V1IngressRule]) -- ^ "rules" - rules is a list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.
  , V1IngressSpec -> Maybe [V1IngressTLS]
v1IngressSpecTls :: !(Maybe [V1IngressTLS]) -- ^ "tls" - tls represents the TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.
  } deriving (Int -> V1IngressSpec -> ShowS
[V1IngressSpec] -> ShowS
V1IngressSpec -> String
(Int -> V1IngressSpec -> ShowS)
-> (V1IngressSpec -> String)
-> ([V1IngressSpec] -> ShowS)
-> Show V1IngressSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1IngressSpec -> ShowS
showsPrec :: Int -> V1IngressSpec -> ShowS
$cshow :: V1IngressSpec -> String
show :: V1IngressSpec -> String
$cshowList :: [V1IngressSpec] -> ShowS
showList :: [V1IngressSpec] -> ShowS
P.Show, V1IngressSpec -> V1IngressSpec -> Bool
(V1IngressSpec -> V1IngressSpec -> Bool)
-> (V1IngressSpec -> V1IngressSpec -> Bool) -> Eq V1IngressSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1IngressSpec -> V1IngressSpec -> Bool
== :: V1IngressSpec -> V1IngressSpec -> Bool
$c/= :: V1IngressSpec -> V1IngressSpec -> Bool
/= :: V1IngressSpec -> V1IngressSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1IngressSpec
instance A.FromJSON V1IngressSpec where
  parseJSON :: Value -> Parser V1IngressSpec
parseJSON = String
-> (Object -> Parser V1IngressSpec)
-> Value
-> Parser V1IngressSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1IngressSpec" ((Object -> Parser V1IngressSpec) -> Value -> Parser V1IngressSpec)
-> (Object -> Parser V1IngressSpec)
-> Value
-> Parser V1IngressSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1IngressBackend
-> Maybe Text
-> Maybe [V1IngressRule]
-> Maybe [V1IngressTLS]
-> V1IngressSpec
V1IngressSpec
      (Maybe V1IngressBackend
 -> Maybe Text
 -> Maybe [V1IngressRule]
 -> Maybe [V1IngressTLS]
 -> V1IngressSpec)
-> Parser (Maybe V1IngressBackend)
-> Parser
     (Maybe Text
      -> Maybe [V1IngressRule] -> Maybe [V1IngressTLS] -> V1IngressSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1IngressBackend)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"defaultBackend")
      Parser
  (Maybe Text
   -> Maybe [V1IngressRule] -> Maybe [V1IngressTLS] -> V1IngressSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe [V1IngressRule] -> Maybe [V1IngressTLS] -> V1IngressSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ingressClassName")
      Parser
  (Maybe [V1IngressRule] -> Maybe [V1IngressTLS] -> V1IngressSpec)
-> Parser (Maybe [V1IngressRule])
-> Parser (Maybe [V1IngressTLS] -> V1IngressSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1IngressRule])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"rules")
      Parser (Maybe [V1IngressTLS] -> V1IngressSpec)
-> Parser (Maybe [V1IngressTLS]) -> Parser V1IngressSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1IngressTLS])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"tls")

-- | ToJSON V1IngressSpec
instance A.ToJSON V1IngressSpec where
  toJSON :: V1IngressSpec -> Value
toJSON V1IngressSpec {Maybe [V1IngressTLS]
Maybe [V1IngressRule]
Maybe Text
Maybe V1IngressBackend
$sel:v1IngressSpecDefaultBackend:V1IngressSpec :: V1IngressSpec -> Maybe V1IngressBackend
$sel:v1IngressSpecIngressClassName:V1IngressSpec :: V1IngressSpec -> Maybe Text
$sel:v1IngressSpecRules:V1IngressSpec :: V1IngressSpec -> Maybe [V1IngressRule]
$sel:v1IngressSpecTls:V1IngressSpec :: V1IngressSpec -> Maybe [V1IngressTLS]
v1IngressSpecDefaultBackend :: Maybe V1IngressBackend
v1IngressSpecIngressClassName :: Maybe Text
v1IngressSpecRules :: Maybe [V1IngressRule]
v1IngressSpecTls :: Maybe [V1IngressTLS]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"defaultBackend" Key -> Maybe V1IngressBackend -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1IngressBackend
v1IngressSpecDefaultBackend
      , Key
"ingressClassName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1IngressSpecIngressClassName
      , Key
"rules" Key -> Maybe [V1IngressRule] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1IngressRule]
v1IngressSpecRules
      , Key
"tls" Key -> Maybe [V1IngressTLS] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1IngressTLS]
v1IngressSpecTls
      ]


-- | Construct a value of type 'V1IngressSpec' (by applying it's required fields, if any)
mkV1IngressSpec
  :: V1IngressSpec
mkV1IngressSpec :: V1IngressSpec
mkV1IngressSpec =
  V1IngressSpec
  { $sel:v1IngressSpecDefaultBackend:V1IngressSpec :: Maybe V1IngressBackend
v1IngressSpecDefaultBackend = Maybe V1IngressBackend
forall a. Maybe a
Nothing
  , $sel:v1IngressSpecIngressClassName:V1IngressSpec :: Maybe Text
v1IngressSpecIngressClassName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1IngressSpecRules:V1IngressSpec :: Maybe [V1IngressRule]
v1IngressSpecRules = Maybe [V1IngressRule]
forall a. Maybe a
Nothing
  , $sel:v1IngressSpecTls:V1IngressSpec :: Maybe [V1IngressTLS]
v1IngressSpecTls = Maybe [V1IngressTLS]
forall a. Maybe a
Nothing
  }

-- ** V1IngressStatus
-- | V1IngressStatus
-- IngressStatus describe the current state of the Ingress.
data V1IngressStatus = V1IngressStatus
  { V1IngressStatus -> Maybe V1IngressLoadBalancerStatus
v1IngressStatusLoadBalancer :: !(Maybe V1IngressLoadBalancerStatus) -- ^ "loadBalancer"
  } deriving (Int -> V1IngressStatus -> ShowS
[V1IngressStatus] -> ShowS
V1IngressStatus -> String
(Int -> V1IngressStatus -> ShowS)
-> (V1IngressStatus -> String)
-> ([V1IngressStatus] -> ShowS)
-> Show V1IngressStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1IngressStatus -> ShowS
showsPrec :: Int -> V1IngressStatus -> ShowS
$cshow :: V1IngressStatus -> String
show :: V1IngressStatus -> String
$cshowList :: [V1IngressStatus] -> ShowS
showList :: [V1IngressStatus] -> ShowS
P.Show, V1IngressStatus -> V1IngressStatus -> Bool
(V1IngressStatus -> V1IngressStatus -> Bool)
-> (V1IngressStatus -> V1IngressStatus -> Bool)
-> Eq V1IngressStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1IngressStatus -> V1IngressStatus -> Bool
== :: V1IngressStatus -> V1IngressStatus -> Bool
$c/= :: V1IngressStatus -> V1IngressStatus -> Bool
/= :: V1IngressStatus -> V1IngressStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1IngressStatus
instance A.FromJSON V1IngressStatus where
  parseJSON :: Value -> Parser V1IngressStatus
parseJSON = String
-> (Object -> Parser V1IngressStatus)
-> Value
-> Parser V1IngressStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1IngressStatus" ((Object -> Parser V1IngressStatus)
 -> Value -> Parser V1IngressStatus)
-> (Object -> Parser V1IngressStatus)
-> Value
-> Parser V1IngressStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1IngressLoadBalancerStatus -> V1IngressStatus
V1IngressStatus
      (Maybe V1IngressLoadBalancerStatus -> V1IngressStatus)
-> Parser (Maybe V1IngressLoadBalancerStatus)
-> Parser V1IngressStatus
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1IngressLoadBalancerStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"loadBalancer")

-- | ToJSON V1IngressStatus
instance A.ToJSON V1IngressStatus where
  toJSON :: V1IngressStatus -> Value
toJSON V1IngressStatus {Maybe V1IngressLoadBalancerStatus
$sel:v1IngressStatusLoadBalancer:V1IngressStatus :: V1IngressStatus -> Maybe V1IngressLoadBalancerStatus
v1IngressStatusLoadBalancer :: Maybe V1IngressLoadBalancerStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"loadBalancer" Key -> Maybe V1IngressLoadBalancerStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1IngressLoadBalancerStatus
v1IngressStatusLoadBalancer
      ]


-- | Construct a value of type 'V1IngressStatus' (by applying it's required fields, if any)
mkV1IngressStatus
  :: V1IngressStatus
mkV1IngressStatus :: V1IngressStatus
mkV1IngressStatus =
  V1IngressStatus
  { $sel:v1IngressStatusLoadBalancer:V1IngressStatus :: Maybe V1IngressLoadBalancerStatus
v1IngressStatusLoadBalancer = Maybe V1IngressLoadBalancerStatus
forall a. Maybe a
Nothing
  }

-- ** V1IngressTLS
-- | V1IngressTLS
-- IngressTLS describes the transport layer security associated with an ingress.
data V1IngressTLS = V1IngressTLS
  { V1IngressTLS -> Maybe [Text]
v1IngressTLSHosts :: !(Maybe [Text]) -- ^ "hosts" - hosts is a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.
  , V1IngressTLS -> Maybe Text
v1IngressTLSSecretName :: !(Maybe Text) -- ^ "secretName" - secretName is the name of the secret used to terminate TLS traffic on port 443. Field is left optional to allow TLS routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \&quot;Host\&quot; header field used by an IngressRule, the SNI host is used for termination and value of the \&quot;Host\&quot; header is used for routing.
  } deriving (Int -> V1IngressTLS -> ShowS
[V1IngressTLS] -> ShowS
V1IngressTLS -> String
(Int -> V1IngressTLS -> ShowS)
-> (V1IngressTLS -> String)
-> ([V1IngressTLS] -> ShowS)
-> Show V1IngressTLS
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1IngressTLS -> ShowS
showsPrec :: Int -> V1IngressTLS -> ShowS
$cshow :: V1IngressTLS -> String
show :: V1IngressTLS -> String
$cshowList :: [V1IngressTLS] -> ShowS
showList :: [V1IngressTLS] -> ShowS
P.Show, V1IngressTLS -> V1IngressTLS -> Bool
(V1IngressTLS -> V1IngressTLS -> Bool)
-> (V1IngressTLS -> V1IngressTLS -> Bool) -> Eq V1IngressTLS
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1IngressTLS -> V1IngressTLS -> Bool
== :: V1IngressTLS -> V1IngressTLS -> Bool
$c/= :: V1IngressTLS -> V1IngressTLS -> Bool
/= :: V1IngressTLS -> V1IngressTLS -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1IngressTLS
instance A.FromJSON V1IngressTLS where
  parseJSON :: Value -> Parser V1IngressTLS
parseJSON = String
-> (Object -> Parser V1IngressTLS) -> Value -> Parser V1IngressTLS
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1IngressTLS" ((Object -> Parser V1IngressTLS) -> Value -> Parser V1IngressTLS)
-> (Object -> Parser V1IngressTLS) -> Value -> Parser V1IngressTLS
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [Text] -> Maybe Text -> V1IngressTLS
V1IngressTLS
      (Maybe [Text] -> Maybe Text -> V1IngressTLS)
-> Parser (Maybe [Text]) -> Parser (Maybe Text -> V1IngressTLS)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"hosts")
      Parser (Maybe Text -> V1IngressTLS)
-> Parser (Maybe Text) -> Parser V1IngressTLS
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"secretName")

-- | ToJSON V1IngressTLS
instance A.ToJSON V1IngressTLS where
  toJSON :: V1IngressTLS -> Value
toJSON V1IngressTLS {Maybe [Text]
Maybe Text
$sel:v1IngressTLSHosts:V1IngressTLS :: V1IngressTLS -> Maybe [Text]
$sel:v1IngressTLSSecretName:V1IngressTLS :: V1IngressTLS -> Maybe Text
v1IngressTLSHosts :: Maybe [Text]
v1IngressTLSSecretName :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"hosts" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1IngressTLSHosts
      , Key
"secretName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1IngressTLSSecretName
      ]


-- | Construct a value of type 'V1IngressTLS' (by applying it's required fields, if any)
mkV1IngressTLS
  :: V1IngressTLS
mkV1IngressTLS :: V1IngressTLS
mkV1IngressTLS =
  V1IngressTLS
  { $sel:v1IngressTLSHosts:V1IngressTLS :: Maybe [Text]
v1IngressTLSHosts = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1IngressTLSSecretName:V1IngressTLS :: Maybe Text
v1IngressTLSSecretName = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1JSONSchemaProps
-- | V1JSONSchemaProps
-- JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/).
data V1JSONSchemaProps = V1JSONSchemaProps
  { V1JSONSchemaProps -> Maybe Text
v1JSONSchemaPropsRef :: !(Maybe Text) -- ^ "$ref"
  , V1JSONSchemaProps -> Maybe Text
v1JSONSchemaPropsSchema :: !(Maybe Text) -- ^ "$schema"
  , V1JSONSchemaProps -> Maybe Value
v1JSONSchemaPropsAdditionalItems :: !(Maybe A.Value) -- ^ "additionalItems" - JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. Defaults to true for the boolean property.
  , V1JSONSchemaProps -> Maybe Value
v1JSONSchemaPropsAdditionalProperties :: !(Maybe A.Value) -- ^ "additionalProperties" - JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. Defaults to true for the boolean property.
  , V1JSONSchemaProps -> Maybe [V1JSONSchemaProps]
v1JSONSchemaPropsAllOf :: !(Maybe [V1JSONSchemaProps]) -- ^ "allOf"
  , V1JSONSchemaProps -> Maybe [V1JSONSchemaProps]
v1JSONSchemaPropsAnyOf :: !(Maybe [V1JSONSchemaProps]) -- ^ "anyOf"
  , V1JSONSchemaProps -> Maybe Value
v1JSONSchemaPropsDefault :: !(Maybe A.Value) -- ^ "default" - default is a default value for undefined object fields. Defaulting is a beta feature under the CustomResourceDefaulting feature gate. Defaulting requires spec.preserveUnknownFields to be false.
  , V1JSONSchemaProps -> Maybe (Map String V1JSONSchemaProps)
v1JSONSchemaPropsDefinitions :: !(Maybe (Map.Map String V1JSONSchemaProps)) -- ^ "definitions"
  , V1JSONSchemaProps -> Maybe (Map String Value)
v1JSONSchemaPropsDependencies :: !(Maybe (Map.Map String A.Value)) -- ^ "dependencies"
  , V1JSONSchemaProps -> Maybe Text
v1JSONSchemaPropsDescription :: !(Maybe Text) -- ^ "description"
  , V1JSONSchemaProps -> Maybe [Value]
v1JSONSchemaPropsEnum :: !(Maybe [A.Value]) -- ^ "enum"
  , V1JSONSchemaProps -> Maybe Value
v1JSONSchemaPropsExample :: !(Maybe A.Value) -- ^ "example" - JSON represents any valid JSON value. These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.
  , V1JSONSchemaProps -> Maybe Bool
v1JSONSchemaPropsExclusiveMaximum :: !(Maybe Bool) -- ^ "exclusiveMaximum"
  , V1JSONSchemaProps -> Maybe Bool
v1JSONSchemaPropsExclusiveMinimum :: !(Maybe Bool) -- ^ "exclusiveMinimum"
  , V1JSONSchemaProps -> Maybe V1ExternalDocumentation
v1JSONSchemaPropsExternalDocs :: !(Maybe V1ExternalDocumentation) -- ^ "externalDocs"
  , V1JSONSchemaProps -> Maybe Text
v1JSONSchemaPropsFormat :: !(Maybe Text) -- ^ "format" - format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated:  - bsonobjectid: a bson object ID, i.e. a 24 characters hex string - uri: an URI as parsed by Golang net/url.ParseRequestURI - email: an email address as parsed by Golang net/mail.ParseAddress - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. - ipv4: an IPv4 IP as parsed by Golang net.ParseIP - ipv6: an IPv6 IP as parsed by Golang net.ParseIP - cidr: a CIDR as parsed by Golang net.ParseCIDR - mac: a MAC address as parsed by Golang net.ParseMAC - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - isbn: an ISBN10 or ISBN13 number string like \&quot;0321751043\&quot; or \&quot;978-0321751041\&quot; - isbn10: an ISBN10 number string like \&quot;0321751043\&quot; - isbn13: an ISBN13 number string like \&quot;978-0321751041\&quot; - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\\\d{3})\\\\d{11})$ with any non digit characters mixed in - ssn: a U.S. social security number following the regex ^\\\\d{3}[- ]?\\\\d{2}[- ]?\\\\d{4}$ - hexcolor: an hexadecimal color code like \&quot;#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ - rgbcolor: an RGB color code like rgb like \&quot;rgb(255,255,2559\&quot; - byte: base64 encoded binary data - password: any kind of string - date: a date string like \&quot;2006-01-02\&quot; as defined by full-date in RFC3339 - duration: a duration string like \&quot;22 ns\&quot; as parsed by Golang time.ParseDuration or compatible with Scala duration format - datetime: a date time string like \&quot;2014-12-15T19:30:20.000Z\&quot; as defined by date-time in RFC3339.
  , V1JSONSchemaProps -> Maybe Text
v1JSONSchemaPropsId :: !(Maybe Text) -- ^ "id"
  , V1JSONSchemaProps -> Maybe Value
v1JSONSchemaPropsItems :: !(Maybe A.Value) -- ^ "items" - JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps or an array of JSONSchemaProps. Mainly here for serialization purposes.
  , V1JSONSchemaProps -> Maybe Integer
v1JSONSchemaPropsMaxItems :: !(Maybe Integer) -- ^ "maxItems"
  , V1JSONSchemaProps -> Maybe Integer
v1JSONSchemaPropsMaxLength :: !(Maybe Integer) -- ^ "maxLength"
  , V1JSONSchemaProps -> Maybe Integer
v1JSONSchemaPropsMaxProperties :: !(Maybe Integer) -- ^ "maxProperties"
  , V1JSONSchemaProps -> Maybe Double
v1JSONSchemaPropsMaximum :: !(Maybe Double) -- ^ "maximum"
  , V1JSONSchemaProps -> Maybe Integer
v1JSONSchemaPropsMinItems :: !(Maybe Integer) -- ^ "minItems"
  , V1JSONSchemaProps -> Maybe Integer
v1JSONSchemaPropsMinLength :: !(Maybe Integer) -- ^ "minLength"
  , V1JSONSchemaProps -> Maybe Integer
v1JSONSchemaPropsMinProperties :: !(Maybe Integer) -- ^ "minProperties"
  , V1JSONSchemaProps -> Maybe Double
v1JSONSchemaPropsMinimum :: !(Maybe Double) -- ^ "minimum"
  , V1JSONSchemaProps -> Maybe Double
v1JSONSchemaPropsMultipleOf :: !(Maybe Double) -- ^ "multipleOf"
  , V1JSONSchemaProps -> Maybe V1JSONSchemaProps
v1JSONSchemaPropsNot :: !(Maybe V1JSONSchemaProps) -- ^ "not"
  , V1JSONSchemaProps -> Maybe Bool
v1JSONSchemaPropsNullable :: !(Maybe Bool) -- ^ "nullable"
  , V1JSONSchemaProps -> Maybe [V1JSONSchemaProps]
v1JSONSchemaPropsOneOf :: !(Maybe [V1JSONSchemaProps]) -- ^ "oneOf"
  , V1JSONSchemaProps -> Maybe Text
v1JSONSchemaPropsPattern :: !(Maybe Text) -- ^ "pattern"
  , V1JSONSchemaProps -> Maybe (Map String V1JSONSchemaProps)
v1JSONSchemaPropsPatternProperties :: !(Maybe (Map.Map String V1JSONSchemaProps)) -- ^ "patternProperties"
  , V1JSONSchemaProps -> Maybe (Map String V1JSONSchemaProps)
v1JSONSchemaPropsProperties :: !(Maybe (Map.Map String V1JSONSchemaProps)) -- ^ "properties"
  , V1JSONSchemaProps -> Maybe [Text]
v1JSONSchemaPropsRequired :: !(Maybe [Text]) -- ^ "required"
  , V1JSONSchemaProps -> Maybe Text
v1JSONSchemaPropsTitle :: !(Maybe Text) -- ^ "title"
  , V1JSONSchemaProps -> Maybe Text
v1JSONSchemaPropsType :: !(Maybe Text) -- ^ "type"
  , V1JSONSchemaProps -> Maybe Bool
v1JSONSchemaPropsUniqueItems :: !(Maybe Bool) -- ^ "uniqueItems"
  , V1JSONSchemaProps -> Maybe Bool
v1JSONSchemaPropsXKubernetesEmbeddedResource :: !(Maybe Bool) -- ^ "x-kubernetes-embedded-resource" - x-kubernetes-embedded-resource defines that the value is an embedded Kubernetes runtime.Object, with TypeMeta and ObjectMeta. The type must be object. It is allowed to further restrict the embedded object. kind, apiVersion and metadata are validated automatically. x-kubernetes-preserve-unknown-fields is allowed to be true, but does not have to be if the object is fully specified (up to kind, apiVersion, metadata).
  , V1JSONSchemaProps -> Maybe Bool
v1JSONSchemaPropsXKubernetesIntOrString :: !(Maybe Bool) -- ^ "x-kubernetes-int-or-string" - x-kubernetes-int-or-string specifies that this value is either an integer or a string. If this is true, an empty type is allowed and type as child of anyOf is permitted if following one of the following patterns:  1) anyOf:    - type: integer    - type: string 2) allOf:    - anyOf:      - type: integer      - type: string    - ... zero or more
  , V1JSONSchemaProps -> Maybe [Text]
v1JSONSchemaPropsXKubernetesListMapKeys :: !(Maybe [Text]) -- ^ "x-kubernetes-list-map-keys" - x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type &#x60;map&#x60; by specifying the keys used as the index of the map.  This tag MUST only be used on lists that have the \&quot;x-kubernetes-list-type\&quot; extension set to \&quot;map\&quot;. Also, the values specified for this attribute must be a scalar typed field of the child structure (no nesting is supported).  The properties specified must either be required or have a default value, to ensure those properties are present for all list items.
  , V1JSONSchemaProps -> Maybe Text
v1JSONSchemaPropsXKubernetesListType :: !(Maybe Text) -- ^ "x-kubernetes-list-type" - x-kubernetes-list-type annotates an array to further describe its topology. This extension must only be used on lists and may have 3 possible values:  1) &#x60;atomic&#x60;: the list is treated as a single entity, like a scalar.      Atomic lists will be entirely replaced when updated. This extension      may be used on any type of list (struct, scalar, ...). 2) &#x60;set&#x60;:      Sets are lists that must not have multiple items with the same value. Each      value must be a scalar, an object with x-kubernetes-map-type &#x60;atomic&#x60; or an      array with x-kubernetes-list-type &#x60;atomic&#x60;. 3) &#x60;map&#x60;:      These lists are like maps in that their elements have a non-index key      used to identify them. Order is preserved upon merge. The map tag      must only be used on a list with elements of type object. Defaults to atomic for arrays.
  , V1JSONSchemaProps -> Maybe Text
v1JSONSchemaPropsXKubernetesMapType :: !(Maybe Text) -- ^ "x-kubernetes-map-type" - x-kubernetes-map-type annotates an object to further describe its topology. This extension must only be used when type is object and may have 2 possible values:  1) &#x60;granular&#x60;:      These maps are actual maps (key-value pairs) and each fields are independent      from each other (they can each be manipulated by separate actors). This is      the default behaviour for all maps. 2) &#x60;atomic&#x60;: the list is treated as a single entity, like a scalar.      Atomic maps will be entirely replaced when updated.
  , V1JSONSchemaProps -> Maybe Bool
v1JSONSchemaPropsXKubernetesPreserveUnknownFields :: !(Maybe Bool) -- ^ "x-kubernetes-preserve-unknown-fields" - x-kubernetes-preserve-unknown-fields stops the API server decoding step from pruning fields which are not specified in the validation schema. This affects fields recursively, but switches back to normal pruning behaviour if nested properties or additionalProperties are specified in the schema. This can either be true or undefined. False is forbidden.
  , V1JSONSchemaProps -> Maybe [V1ValidationRule]
v1JSONSchemaPropsXKubernetesValidations :: !(Maybe [V1ValidationRule]) -- ^ "x-kubernetes-validations" - x-kubernetes-validations describes a list of validation rules written in the CEL expression language.
  } deriving (Int -> V1JSONSchemaProps -> ShowS
[V1JSONSchemaProps] -> ShowS
V1JSONSchemaProps -> String
(Int -> V1JSONSchemaProps -> ShowS)
-> (V1JSONSchemaProps -> String)
-> ([V1JSONSchemaProps] -> ShowS)
-> Show V1JSONSchemaProps
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1JSONSchemaProps -> ShowS
showsPrec :: Int -> V1JSONSchemaProps -> ShowS
$cshow :: V1JSONSchemaProps -> String
show :: V1JSONSchemaProps -> String
$cshowList :: [V1JSONSchemaProps] -> ShowS
showList :: [V1JSONSchemaProps] -> ShowS
P.Show, V1JSONSchemaProps -> V1JSONSchemaProps -> Bool
(V1JSONSchemaProps -> V1JSONSchemaProps -> Bool)
-> (V1JSONSchemaProps -> V1JSONSchemaProps -> Bool)
-> Eq V1JSONSchemaProps
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1JSONSchemaProps -> V1JSONSchemaProps -> Bool
== :: V1JSONSchemaProps -> V1JSONSchemaProps -> Bool
$c/= :: V1JSONSchemaProps -> V1JSONSchemaProps -> Bool
/= :: V1JSONSchemaProps -> V1JSONSchemaProps -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1JSONSchemaProps
instance A.FromJSON V1JSONSchemaProps where
  parseJSON :: Value -> Parser V1JSONSchemaProps
parseJSON = String
-> (Object -> Parser V1JSONSchemaProps)
-> Value
-> Parser V1JSONSchemaProps
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1JSONSchemaProps" ((Object -> Parser V1JSONSchemaProps)
 -> Value -> Parser V1JSONSchemaProps)
-> (Object -> Parser V1JSONSchemaProps)
-> Value
-> Parser V1JSONSchemaProps
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Value
-> Maybe [V1JSONSchemaProps]
-> Maybe [V1JSONSchemaProps]
-> Maybe Value
-> Maybe (Map String V1JSONSchemaProps)
-> Maybe (Map String Value)
-> Maybe Text
-> Maybe [Value]
-> Maybe Value
-> Maybe Bool
-> Maybe Bool
-> Maybe V1ExternalDocumentation
-> Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Double
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Double
-> Maybe Double
-> Maybe V1JSONSchemaProps
-> Maybe Bool
-> Maybe [V1JSONSchemaProps]
-> Maybe Text
-> Maybe (Map String V1JSONSchemaProps)
-> Maybe (Map String V1JSONSchemaProps)
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe [V1ValidationRule]
-> V1JSONSchemaProps
V1JSONSchemaProps
      (Maybe Text
 -> Maybe Text
 -> Maybe Value
 -> Maybe Value
 -> Maybe [V1JSONSchemaProps]
 -> Maybe [V1JSONSchemaProps]
 -> Maybe Value
 -> Maybe (Map String V1JSONSchemaProps)
 -> Maybe (Map String Value)
 -> Maybe Text
 -> Maybe [Value]
 -> Maybe Value
 -> Maybe Bool
 -> Maybe Bool
 -> Maybe V1ExternalDocumentation
 -> Maybe Text
 -> Maybe Text
 -> Maybe Value
 -> Maybe Integer
 -> Maybe Integer
 -> Maybe Integer
 -> Maybe Double
 -> Maybe Integer
 -> Maybe Integer
 -> Maybe Integer
 -> Maybe Double
 -> Maybe Double
 -> Maybe V1JSONSchemaProps
 -> Maybe Bool
 -> Maybe [V1JSONSchemaProps]
 -> Maybe Text
 -> Maybe (Map String V1JSONSchemaProps)
 -> Maybe (Map String V1JSONSchemaProps)
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Bool
 -> Maybe Bool
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe [V1ValidationRule]
 -> V1JSONSchemaProps)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Value
      -> Maybe Value
      -> Maybe [V1JSONSchemaProps]
      -> Maybe [V1JSONSchemaProps]
      -> Maybe Value
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String Value)
      -> Maybe Text
      -> Maybe [Value]
      -> Maybe Value
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe V1ExternalDocumentation
      -> Maybe Text
      -> Maybe Text
      -> Maybe Value
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Double
      -> Maybe V1JSONSchemaProps
      -> Maybe Bool
      -> Maybe [V1JSONSchemaProps]
      -> Maybe Text
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"$ref")
      Parser
  (Maybe Text
   -> Maybe Value
   -> Maybe Value
   -> Maybe [V1JSONSchemaProps]
   -> Maybe [V1JSONSchemaProps]
   -> Maybe Value
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String Value)
   -> Maybe Text
   -> Maybe [Value]
   -> Maybe Value
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe V1ExternalDocumentation
   -> Maybe Text
   -> Maybe Text
   -> Maybe Value
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Double
   -> Maybe V1JSONSchemaProps
   -> Maybe Bool
   -> Maybe [V1JSONSchemaProps]
   -> Maybe Text
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe Text)
-> Parser
     (Maybe Value
      -> Maybe Value
      -> Maybe [V1JSONSchemaProps]
      -> Maybe [V1JSONSchemaProps]
      -> Maybe Value
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String Value)
      -> Maybe Text
      -> Maybe [Value]
      -> Maybe Value
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe V1ExternalDocumentation
      -> Maybe Text
      -> Maybe Text
      -> Maybe Value
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Double
      -> Maybe V1JSONSchemaProps
      -> Maybe Bool
      -> Maybe [V1JSONSchemaProps]
      -> Maybe Text
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"$schema")
      Parser
  (Maybe Value
   -> Maybe Value
   -> Maybe [V1JSONSchemaProps]
   -> Maybe [V1JSONSchemaProps]
   -> Maybe Value
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String Value)
   -> Maybe Text
   -> Maybe [Value]
   -> Maybe Value
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe V1ExternalDocumentation
   -> Maybe Text
   -> Maybe Text
   -> Maybe Value
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Double
   -> Maybe V1JSONSchemaProps
   -> Maybe Bool
   -> Maybe [V1JSONSchemaProps]
   -> Maybe Text
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe Value)
-> Parser
     (Maybe Value
      -> Maybe [V1JSONSchemaProps]
      -> Maybe [V1JSONSchemaProps]
      -> Maybe Value
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String Value)
      -> Maybe Text
      -> Maybe [Value]
      -> Maybe Value
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe V1ExternalDocumentation
      -> Maybe Text
      -> Maybe Text
      -> Maybe Value
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Double
      -> Maybe V1JSONSchemaProps
      -> Maybe Bool
      -> Maybe [V1JSONSchemaProps]
      -> Maybe Text
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Value)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"additionalItems")
      Parser
  (Maybe Value
   -> Maybe [V1JSONSchemaProps]
   -> Maybe [V1JSONSchemaProps]
   -> Maybe Value
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String Value)
   -> Maybe Text
   -> Maybe [Value]
   -> Maybe Value
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe V1ExternalDocumentation
   -> Maybe Text
   -> Maybe Text
   -> Maybe Value
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Double
   -> Maybe V1JSONSchemaProps
   -> Maybe Bool
   -> Maybe [V1JSONSchemaProps]
   -> Maybe Text
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe Value)
-> Parser
     (Maybe [V1JSONSchemaProps]
      -> Maybe [V1JSONSchemaProps]
      -> Maybe Value
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String Value)
      -> Maybe Text
      -> Maybe [Value]
      -> Maybe Value
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe V1ExternalDocumentation
      -> Maybe Text
      -> Maybe Text
      -> Maybe Value
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Double
      -> Maybe V1JSONSchemaProps
      -> Maybe Bool
      -> Maybe [V1JSONSchemaProps]
      -> Maybe Text
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Value)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"additionalProperties")
      Parser
  (Maybe [V1JSONSchemaProps]
   -> Maybe [V1JSONSchemaProps]
   -> Maybe Value
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String Value)
   -> Maybe Text
   -> Maybe [Value]
   -> Maybe Value
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe V1ExternalDocumentation
   -> Maybe Text
   -> Maybe Text
   -> Maybe Value
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Double
   -> Maybe V1JSONSchemaProps
   -> Maybe Bool
   -> Maybe [V1JSONSchemaProps]
   -> Maybe Text
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe [V1JSONSchemaProps])
-> Parser
     (Maybe [V1JSONSchemaProps]
      -> Maybe Value
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String Value)
      -> Maybe Text
      -> Maybe [Value]
      -> Maybe Value
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe V1ExternalDocumentation
      -> Maybe Text
      -> Maybe Text
      -> Maybe Value
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Double
      -> Maybe V1JSONSchemaProps
      -> Maybe Bool
      -> Maybe [V1JSONSchemaProps]
      -> Maybe Text
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1JSONSchemaProps])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"allOf")
      Parser
  (Maybe [V1JSONSchemaProps]
   -> Maybe Value
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String Value)
   -> Maybe Text
   -> Maybe [Value]
   -> Maybe Value
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe V1ExternalDocumentation
   -> Maybe Text
   -> Maybe Text
   -> Maybe Value
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Double
   -> Maybe V1JSONSchemaProps
   -> Maybe Bool
   -> Maybe [V1JSONSchemaProps]
   -> Maybe Text
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe [V1JSONSchemaProps])
-> Parser
     (Maybe Value
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String Value)
      -> Maybe Text
      -> Maybe [Value]
      -> Maybe Value
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe V1ExternalDocumentation
      -> Maybe Text
      -> Maybe Text
      -> Maybe Value
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Double
      -> Maybe V1JSONSchemaProps
      -> Maybe Bool
      -> Maybe [V1JSONSchemaProps]
      -> Maybe Text
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1JSONSchemaProps])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"anyOf")
      Parser
  (Maybe Value
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String Value)
   -> Maybe Text
   -> Maybe [Value]
   -> Maybe Value
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe V1ExternalDocumentation
   -> Maybe Text
   -> Maybe Text
   -> Maybe Value
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Double
   -> Maybe V1JSONSchemaProps
   -> Maybe Bool
   -> Maybe [V1JSONSchemaProps]
   -> Maybe Text
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe Value)
-> Parser
     (Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String Value)
      -> Maybe Text
      -> Maybe [Value]
      -> Maybe Value
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe V1ExternalDocumentation
      -> Maybe Text
      -> Maybe Text
      -> Maybe Value
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Double
      -> Maybe V1JSONSchemaProps
      -> Maybe Bool
      -> Maybe [V1JSONSchemaProps]
      -> Maybe Text
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Value)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"default")
      Parser
  (Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String Value)
   -> Maybe Text
   -> Maybe [Value]
   -> Maybe Value
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe V1ExternalDocumentation
   -> Maybe Text
   -> Maybe Text
   -> Maybe Value
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Double
   -> Maybe V1JSONSchemaProps
   -> Maybe Bool
   -> Maybe [V1JSONSchemaProps]
   -> Maybe Text
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe (Map String V1JSONSchemaProps))
-> Parser
     (Maybe (Map String Value)
      -> Maybe Text
      -> Maybe [Value]
      -> Maybe Value
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe V1ExternalDocumentation
      -> Maybe Text
      -> Maybe Text
      -> Maybe Value
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Double
      -> Maybe V1JSONSchemaProps
      -> Maybe Bool
      -> Maybe [V1JSONSchemaProps]
      -> Maybe Text
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String V1JSONSchemaProps))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"definitions")
      Parser
  (Maybe (Map String Value)
   -> Maybe Text
   -> Maybe [Value]
   -> Maybe Value
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe V1ExternalDocumentation
   -> Maybe Text
   -> Maybe Text
   -> Maybe Value
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Double
   -> Maybe V1JSONSchemaProps
   -> Maybe Bool
   -> Maybe [V1JSONSchemaProps]
   -> Maybe Text
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe (Map String Value))
-> Parser
     (Maybe Text
      -> Maybe [Value]
      -> Maybe Value
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe V1ExternalDocumentation
      -> Maybe Text
      -> Maybe Text
      -> Maybe Value
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Double
      -> Maybe V1JSONSchemaProps
      -> Maybe Bool
      -> Maybe [V1JSONSchemaProps]
      -> Maybe Text
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String Value))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"dependencies")
      Parser
  (Maybe Text
   -> Maybe [Value]
   -> Maybe Value
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe V1ExternalDocumentation
   -> Maybe Text
   -> Maybe Text
   -> Maybe Value
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Double
   -> Maybe V1JSONSchemaProps
   -> Maybe Bool
   -> Maybe [V1JSONSchemaProps]
   -> Maybe Text
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Value]
      -> Maybe Value
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe V1ExternalDocumentation
      -> Maybe Text
      -> Maybe Text
      -> Maybe Value
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Double
      -> Maybe V1JSONSchemaProps
      -> Maybe Bool
      -> Maybe [V1JSONSchemaProps]
      -> Maybe Text
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"description")
      Parser
  (Maybe [Value]
   -> Maybe Value
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe V1ExternalDocumentation
   -> Maybe Text
   -> Maybe Text
   -> Maybe Value
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Double
   -> Maybe V1JSONSchemaProps
   -> Maybe Bool
   -> Maybe [V1JSONSchemaProps]
   -> Maybe Text
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe [Value])
-> Parser
     (Maybe Value
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe V1ExternalDocumentation
      -> Maybe Text
      -> Maybe Text
      -> Maybe Value
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Double
      -> Maybe V1JSONSchemaProps
      -> Maybe Bool
      -> Maybe [V1JSONSchemaProps]
      -> Maybe Text
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Value])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"enum")
      Parser
  (Maybe Value
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe V1ExternalDocumentation
   -> Maybe Text
   -> Maybe Text
   -> Maybe Value
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Double
   -> Maybe V1JSONSchemaProps
   -> Maybe Bool
   -> Maybe [V1JSONSchemaProps]
   -> Maybe Text
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe Value)
-> Parser
     (Maybe Bool
      -> Maybe Bool
      -> Maybe V1ExternalDocumentation
      -> Maybe Text
      -> Maybe Text
      -> Maybe Value
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Double
      -> Maybe V1JSONSchemaProps
      -> Maybe Bool
      -> Maybe [V1JSONSchemaProps]
      -> Maybe Text
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Value)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"example")
      Parser
  (Maybe Bool
   -> Maybe Bool
   -> Maybe V1ExternalDocumentation
   -> Maybe Text
   -> Maybe Text
   -> Maybe Value
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Double
   -> Maybe V1JSONSchemaProps
   -> Maybe Bool
   -> Maybe [V1JSONSchemaProps]
   -> Maybe Text
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Bool
      -> Maybe V1ExternalDocumentation
      -> Maybe Text
      -> Maybe Text
      -> Maybe Value
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Double
      -> Maybe V1JSONSchemaProps
      -> Maybe Bool
      -> Maybe [V1JSONSchemaProps]
      -> Maybe Text
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"exclusiveMaximum")
      Parser
  (Maybe Bool
   -> Maybe V1ExternalDocumentation
   -> Maybe Text
   -> Maybe Text
   -> Maybe Value
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Double
   -> Maybe V1JSONSchemaProps
   -> Maybe Bool
   -> Maybe [V1JSONSchemaProps]
   -> Maybe Text
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe Bool)
-> Parser
     (Maybe V1ExternalDocumentation
      -> Maybe Text
      -> Maybe Text
      -> Maybe Value
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Double
      -> Maybe V1JSONSchemaProps
      -> Maybe Bool
      -> Maybe [V1JSONSchemaProps]
      -> Maybe Text
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"exclusiveMinimum")
      Parser
  (Maybe V1ExternalDocumentation
   -> Maybe Text
   -> Maybe Text
   -> Maybe Value
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Double
   -> Maybe V1JSONSchemaProps
   -> Maybe Bool
   -> Maybe [V1JSONSchemaProps]
   -> Maybe Text
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe V1ExternalDocumentation)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Value
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Double
      -> Maybe V1JSONSchemaProps
      -> Maybe Bool
      -> Maybe [V1JSONSchemaProps]
      -> Maybe Text
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ExternalDocumentation)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"externalDocs")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Value
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Double
   -> Maybe V1JSONSchemaProps
   -> Maybe Bool
   -> Maybe [V1JSONSchemaProps]
   -> Maybe Text
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Value
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Double
      -> Maybe V1JSONSchemaProps
      -> Maybe Bool
      -> Maybe [V1JSONSchemaProps]
      -> Maybe Text
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"format")
      Parser
  (Maybe Text
   -> Maybe Value
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Double
   -> Maybe V1JSONSchemaProps
   -> Maybe Bool
   -> Maybe [V1JSONSchemaProps]
   -> Maybe Text
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe Text)
-> Parser
     (Maybe Value
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Double
      -> Maybe V1JSONSchemaProps
      -> Maybe Bool
      -> Maybe [V1JSONSchemaProps]
      -> Maybe Text
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"id")
      Parser
  (Maybe Value
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Double
   -> Maybe V1JSONSchemaProps
   -> Maybe Bool
   -> Maybe [V1JSONSchemaProps]
   -> Maybe Text
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe Value)
-> Parser
     (Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Double
      -> Maybe V1JSONSchemaProps
      -> Maybe Bool
      -> Maybe [V1JSONSchemaProps]
      -> Maybe Text
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Value)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"items")
      Parser
  (Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Double
   -> Maybe V1JSONSchemaProps
   -> Maybe Bool
   -> Maybe [V1JSONSchemaProps]
   -> Maybe Text
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Double
      -> Maybe V1JSONSchemaProps
      -> Maybe Bool
      -> Maybe [V1JSONSchemaProps]
      -> Maybe Text
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"maxItems")
      Parser
  (Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Double
   -> Maybe V1JSONSchemaProps
   -> Maybe Bool
   -> Maybe [V1JSONSchemaProps]
   -> Maybe Text
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Integer
      -> Maybe Double
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Double
      -> Maybe V1JSONSchemaProps
      -> Maybe Bool
      -> Maybe [V1JSONSchemaProps]
      -> Maybe Text
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"maxLength")
      Parser
  (Maybe Integer
   -> Maybe Double
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Double
   -> Maybe V1JSONSchemaProps
   -> Maybe Bool
   -> Maybe [V1JSONSchemaProps]
   -> Maybe Text
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Double
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Double
      -> Maybe V1JSONSchemaProps
      -> Maybe Bool
      -> Maybe [V1JSONSchemaProps]
      -> Maybe Text
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"maxProperties")
      Parser
  (Maybe Double
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Double
   -> Maybe V1JSONSchemaProps
   -> Maybe Bool
   -> Maybe [V1JSONSchemaProps]
   -> Maybe Text
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe Double)
-> Parser
     (Maybe Integer
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Double
      -> Maybe V1JSONSchemaProps
      -> Maybe Bool
      -> Maybe [V1JSONSchemaProps]
      -> Maybe Text
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"maximum")
      Parser
  (Maybe Integer
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Double
   -> Maybe V1JSONSchemaProps
   -> Maybe Bool
   -> Maybe [V1JSONSchemaProps]
   -> Maybe Text
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Integer
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Double
      -> Maybe V1JSONSchemaProps
      -> Maybe Bool
      -> Maybe [V1JSONSchemaProps]
      -> Maybe Text
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"minItems")
      Parser
  (Maybe Integer
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Double
   -> Maybe V1JSONSchemaProps
   -> Maybe Bool
   -> Maybe [V1JSONSchemaProps]
   -> Maybe Text
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Integer
      -> Maybe Double
      -> Maybe Double
      -> Maybe V1JSONSchemaProps
      -> Maybe Bool
      -> Maybe [V1JSONSchemaProps]
      -> Maybe Text
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"minLength")
      Parser
  (Maybe Integer
   -> Maybe Double
   -> Maybe Double
   -> Maybe V1JSONSchemaProps
   -> Maybe Bool
   -> Maybe [V1JSONSchemaProps]
   -> Maybe Text
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Double
      -> Maybe Double
      -> Maybe V1JSONSchemaProps
      -> Maybe Bool
      -> Maybe [V1JSONSchemaProps]
      -> Maybe Text
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"minProperties")
      Parser
  (Maybe Double
   -> Maybe Double
   -> Maybe V1JSONSchemaProps
   -> Maybe Bool
   -> Maybe [V1JSONSchemaProps]
   -> Maybe Text
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe Double)
-> Parser
     (Maybe Double
      -> Maybe V1JSONSchemaProps
      -> Maybe Bool
      -> Maybe [V1JSONSchemaProps]
      -> Maybe Text
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"minimum")
      Parser
  (Maybe Double
   -> Maybe V1JSONSchemaProps
   -> Maybe Bool
   -> Maybe [V1JSONSchemaProps]
   -> Maybe Text
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe Double)
-> Parser
     (Maybe V1JSONSchemaProps
      -> Maybe Bool
      -> Maybe [V1JSONSchemaProps]
      -> Maybe Text
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"multipleOf")
      Parser
  (Maybe V1JSONSchemaProps
   -> Maybe Bool
   -> Maybe [V1JSONSchemaProps]
   -> Maybe Text
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe V1JSONSchemaProps)
-> Parser
     (Maybe Bool
      -> Maybe [V1JSONSchemaProps]
      -> Maybe Text
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1JSONSchemaProps)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"not")
      Parser
  (Maybe Bool
   -> Maybe [V1JSONSchemaProps]
   -> Maybe Text
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe Bool)
-> Parser
     (Maybe [V1JSONSchemaProps]
      -> Maybe Text
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nullable")
      Parser
  (Maybe [V1JSONSchemaProps]
   -> Maybe Text
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe [V1JSONSchemaProps])
-> Parser
     (Maybe Text
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1JSONSchemaProps])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"oneOf")
      Parser
  (Maybe Text
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe Text)
-> Parser
     (Maybe (Map String V1JSONSchemaProps)
      -> Maybe (Map String V1JSONSchemaProps)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"pattern")
      Parser
  (Maybe (Map String V1JSONSchemaProps)
   -> Maybe (Map String V1JSONSchemaProps)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe (Map String V1JSONSchemaProps))
-> Parser
     (Maybe (Map String V1JSONSchemaProps)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String V1JSONSchemaProps))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"patternProperties")
      Parser
  (Maybe (Map String V1JSONSchemaProps)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe (Map String V1JSONSchemaProps))
-> Parser
     (Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String V1JSONSchemaProps))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"properties")
      Parser
  (Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"required")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"title")
      Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"type")
      Parser
  (Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Bool
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"uniqueItems")
      Parser
  (Maybe Bool
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Bool
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"x-kubernetes-embedded-resource")
      Parser
  (Maybe Bool
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe Bool)
-> Parser
     (Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"x-kubernetes-int-or-string")
      Parser
  (Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1ValidationRule]
      -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"x-kubernetes-list-map-keys")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1ValidationRule]
   -> V1JSONSchemaProps)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Bool -> Maybe [V1ValidationRule] -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"x-kubernetes-list-type")
      Parser
  (Maybe Text
   -> Maybe Bool -> Maybe [V1ValidationRule] -> V1JSONSchemaProps)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool -> Maybe [V1ValidationRule] -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"x-kubernetes-map-type")
      Parser
  (Maybe Bool -> Maybe [V1ValidationRule] -> V1JSONSchemaProps)
-> Parser (Maybe Bool)
-> Parser (Maybe [V1ValidationRule] -> V1JSONSchemaProps)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"x-kubernetes-preserve-unknown-fields")
      Parser (Maybe [V1ValidationRule] -> V1JSONSchemaProps)
-> Parser (Maybe [V1ValidationRule]) -> Parser V1JSONSchemaProps
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1ValidationRule])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"x-kubernetes-validations")

-- | ToJSON V1JSONSchemaProps
instance A.ToJSON V1JSONSchemaProps where
  toJSON :: V1JSONSchemaProps -> Value
toJSON V1JSONSchemaProps {Maybe Bool
Maybe Double
Maybe Integer
Maybe [Value]
Maybe [Text]
Maybe [V1ValidationRule]
Maybe [V1JSONSchemaProps]
Maybe Value
Maybe (Map String Value)
Maybe (Map String V1JSONSchemaProps)
Maybe Text
Maybe V1JSONSchemaProps
Maybe V1ExternalDocumentation
$sel:v1JSONSchemaPropsRef:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe Text
$sel:v1JSONSchemaPropsSchema:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe Text
$sel:v1JSONSchemaPropsAdditionalItems:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe Value
$sel:v1JSONSchemaPropsAdditionalProperties:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe Value
$sel:v1JSONSchemaPropsAllOf:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe [V1JSONSchemaProps]
$sel:v1JSONSchemaPropsAnyOf:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe [V1JSONSchemaProps]
$sel:v1JSONSchemaPropsDefault:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe Value
$sel:v1JSONSchemaPropsDefinitions:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe (Map String V1JSONSchemaProps)
$sel:v1JSONSchemaPropsDependencies:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe (Map String Value)
$sel:v1JSONSchemaPropsDescription:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe Text
$sel:v1JSONSchemaPropsEnum:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe [Value]
$sel:v1JSONSchemaPropsExample:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe Value
$sel:v1JSONSchemaPropsExclusiveMaximum:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe Bool
$sel:v1JSONSchemaPropsExclusiveMinimum:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe Bool
$sel:v1JSONSchemaPropsExternalDocs:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe V1ExternalDocumentation
$sel:v1JSONSchemaPropsFormat:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe Text
$sel:v1JSONSchemaPropsId:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe Text
$sel:v1JSONSchemaPropsItems:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe Value
$sel:v1JSONSchemaPropsMaxItems:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe Integer
$sel:v1JSONSchemaPropsMaxLength:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe Integer
$sel:v1JSONSchemaPropsMaxProperties:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe Integer
$sel:v1JSONSchemaPropsMaximum:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe Double
$sel:v1JSONSchemaPropsMinItems:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe Integer
$sel:v1JSONSchemaPropsMinLength:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe Integer
$sel:v1JSONSchemaPropsMinProperties:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe Integer
$sel:v1JSONSchemaPropsMinimum:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe Double
$sel:v1JSONSchemaPropsMultipleOf:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe Double
$sel:v1JSONSchemaPropsNot:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe V1JSONSchemaProps
$sel:v1JSONSchemaPropsNullable:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe Bool
$sel:v1JSONSchemaPropsOneOf:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe [V1JSONSchemaProps]
$sel:v1JSONSchemaPropsPattern:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe Text
$sel:v1JSONSchemaPropsPatternProperties:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe (Map String V1JSONSchemaProps)
$sel:v1JSONSchemaPropsProperties:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe (Map String V1JSONSchemaProps)
$sel:v1JSONSchemaPropsRequired:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe [Text]
$sel:v1JSONSchemaPropsTitle:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe Text
$sel:v1JSONSchemaPropsType:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe Text
$sel:v1JSONSchemaPropsUniqueItems:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe Bool
$sel:v1JSONSchemaPropsXKubernetesEmbeddedResource:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe Bool
$sel:v1JSONSchemaPropsXKubernetesIntOrString:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe Bool
$sel:v1JSONSchemaPropsXKubernetesListMapKeys:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe [Text]
$sel:v1JSONSchemaPropsXKubernetesListType:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe Text
$sel:v1JSONSchemaPropsXKubernetesMapType:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe Text
$sel:v1JSONSchemaPropsXKubernetesPreserveUnknownFields:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe Bool
$sel:v1JSONSchemaPropsXKubernetesValidations:V1JSONSchemaProps :: V1JSONSchemaProps -> Maybe [V1ValidationRule]
v1JSONSchemaPropsRef :: Maybe Text
v1JSONSchemaPropsSchema :: Maybe Text
v1JSONSchemaPropsAdditionalItems :: Maybe Value
v1JSONSchemaPropsAdditionalProperties :: Maybe Value
v1JSONSchemaPropsAllOf :: Maybe [V1JSONSchemaProps]
v1JSONSchemaPropsAnyOf :: Maybe [V1JSONSchemaProps]
v1JSONSchemaPropsDefault :: Maybe Value
v1JSONSchemaPropsDefinitions :: Maybe (Map String V1JSONSchemaProps)
v1JSONSchemaPropsDependencies :: Maybe (Map String Value)
v1JSONSchemaPropsDescription :: Maybe Text
v1JSONSchemaPropsEnum :: Maybe [Value]
v1JSONSchemaPropsExample :: Maybe Value
v1JSONSchemaPropsExclusiveMaximum :: Maybe Bool
v1JSONSchemaPropsExclusiveMinimum :: Maybe Bool
v1JSONSchemaPropsExternalDocs :: Maybe V1ExternalDocumentation
v1JSONSchemaPropsFormat :: Maybe Text
v1JSONSchemaPropsId :: Maybe Text
v1JSONSchemaPropsItems :: Maybe Value
v1JSONSchemaPropsMaxItems :: Maybe Integer
v1JSONSchemaPropsMaxLength :: Maybe Integer
v1JSONSchemaPropsMaxProperties :: Maybe Integer
v1JSONSchemaPropsMaximum :: Maybe Double
v1JSONSchemaPropsMinItems :: Maybe Integer
v1JSONSchemaPropsMinLength :: Maybe Integer
v1JSONSchemaPropsMinProperties :: Maybe Integer
v1JSONSchemaPropsMinimum :: Maybe Double
v1JSONSchemaPropsMultipleOf :: Maybe Double
v1JSONSchemaPropsNot :: Maybe V1JSONSchemaProps
v1JSONSchemaPropsNullable :: Maybe Bool
v1JSONSchemaPropsOneOf :: Maybe [V1JSONSchemaProps]
v1JSONSchemaPropsPattern :: Maybe Text
v1JSONSchemaPropsPatternProperties :: Maybe (Map String V1JSONSchemaProps)
v1JSONSchemaPropsProperties :: Maybe (Map String V1JSONSchemaProps)
v1JSONSchemaPropsRequired :: Maybe [Text]
v1JSONSchemaPropsTitle :: Maybe Text
v1JSONSchemaPropsType :: Maybe Text
v1JSONSchemaPropsUniqueItems :: Maybe Bool
v1JSONSchemaPropsXKubernetesEmbeddedResource :: Maybe Bool
v1JSONSchemaPropsXKubernetesIntOrString :: Maybe Bool
v1JSONSchemaPropsXKubernetesListMapKeys :: Maybe [Text]
v1JSONSchemaPropsXKubernetesListType :: Maybe Text
v1JSONSchemaPropsXKubernetesMapType :: Maybe Text
v1JSONSchemaPropsXKubernetesPreserveUnknownFields :: Maybe Bool
v1JSONSchemaPropsXKubernetesValidations :: Maybe [V1ValidationRule]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"$ref" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1JSONSchemaPropsRef
      , Key
"$schema" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1JSONSchemaPropsSchema
      , Key
"additionalItems" Key -> Maybe Value -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Value
v1JSONSchemaPropsAdditionalItems
      , Key
"additionalProperties" Key -> Maybe Value -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Value
v1JSONSchemaPropsAdditionalProperties
      , Key
"allOf" Key -> Maybe [V1JSONSchemaProps] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1JSONSchemaProps]
v1JSONSchemaPropsAllOf
      , Key
"anyOf" Key -> Maybe [V1JSONSchemaProps] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1JSONSchemaProps]
v1JSONSchemaPropsAnyOf
      , Key
"default" Key -> Maybe Value -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Value
v1JSONSchemaPropsDefault
      , Key
"definitions" Key -> Maybe (Map String V1JSONSchemaProps) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String V1JSONSchemaProps)
v1JSONSchemaPropsDefinitions
      , Key
"dependencies" Key -> Maybe (Map String Value) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Value)
v1JSONSchemaPropsDependencies
      , Key
"description" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1JSONSchemaPropsDescription
      , Key
"enum" Key -> Maybe [Value] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Value]
v1JSONSchemaPropsEnum
      , Key
"example" Key -> Maybe Value -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Value
v1JSONSchemaPropsExample
      , Key
"exclusiveMaximum" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1JSONSchemaPropsExclusiveMaximum
      , Key
"exclusiveMinimum" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1JSONSchemaPropsExclusiveMinimum
      , Key
"externalDocs" Key -> Maybe V1ExternalDocumentation -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ExternalDocumentation
v1JSONSchemaPropsExternalDocs
      , Key
"format" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1JSONSchemaPropsFormat
      , Key
"id" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1JSONSchemaPropsId
      , Key
"items" Key -> Maybe Value -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Value
v1JSONSchemaPropsItems
      , Key
"maxItems" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1JSONSchemaPropsMaxItems
      , Key
"maxLength" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1JSONSchemaPropsMaxLength
      , Key
"maxProperties" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1JSONSchemaPropsMaxProperties
      , Key
"maximum" Key -> Maybe Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Double
v1JSONSchemaPropsMaximum
      , Key
"minItems" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1JSONSchemaPropsMinItems
      , Key
"minLength" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1JSONSchemaPropsMinLength
      , Key
"minProperties" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1JSONSchemaPropsMinProperties
      , Key
"minimum" Key -> Maybe Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Double
v1JSONSchemaPropsMinimum
      , Key
"multipleOf" Key -> Maybe Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Double
v1JSONSchemaPropsMultipleOf
      , Key
"not" Key -> Maybe V1JSONSchemaProps -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1JSONSchemaProps
v1JSONSchemaPropsNot
      , Key
"nullable" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1JSONSchemaPropsNullable
      , Key
"oneOf" Key -> Maybe [V1JSONSchemaProps] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1JSONSchemaProps]
v1JSONSchemaPropsOneOf
      , Key
"pattern" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1JSONSchemaPropsPattern
      , Key
"patternProperties" Key -> Maybe (Map String V1JSONSchemaProps) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String V1JSONSchemaProps)
v1JSONSchemaPropsPatternProperties
      , Key
"properties" Key -> Maybe (Map String V1JSONSchemaProps) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String V1JSONSchemaProps)
v1JSONSchemaPropsProperties
      , Key
"required" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1JSONSchemaPropsRequired
      , Key
"title" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1JSONSchemaPropsTitle
      , Key
"type" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1JSONSchemaPropsType
      , Key
"uniqueItems" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1JSONSchemaPropsUniqueItems
      , Key
"x-kubernetes-embedded-resource" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1JSONSchemaPropsXKubernetesEmbeddedResource
      , Key
"x-kubernetes-int-or-string" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1JSONSchemaPropsXKubernetesIntOrString
      , Key
"x-kubernetes-list-map-keys" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1JSONSchemaPropsXKubernetesListMapKeys
      , Key
"x-kubernetes-list-type" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1JSONSchemaPropsXKubernetesListType
      , Key
"x-kubernetes-map-type" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1JSONSchemaPropsXKubernetesMapType
      , Key
"x-kubernetes-preserve-unknown-fields" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1JSONSchemaPropsXKubernetesPreserveUnknownFields
      , Key
"x-kubernetes-validations" Key -> Maybe [V1ValidationRule] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1ValidationRule]
v1JSONSchemaPropsXKubernetesValidations
      ]


-- | Construct a value of type 'V1JSONSchemaProps' (by applying it's required fields, if any)
mkV1JSONSchemaProps
  :: V1JSONSchemaProps
mkV1JSONSchemaProps :: V1JSONSchemaProps
mkV1JSONSchemaProps =
  V1JSONSchemaProps
  { $sel:v1JSONSchemaPropsRef:V1JSONSchemaProps :: Maybe Text
v1JSONSchemaPropsRef = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsSchema:V1JSONSchemaProps :: Maybe Text
v1JSONSchemaPropsSchema = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsAdditionalItems:V1JSONSchemaProps :: Maybe Value
v1JSONSchemaPropsAdditionalItems = Maybe Value
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsAdditionalProperties:V1JSONSchemaProps :: Maybe Value
v1JSONSchemaPropsAdditionalProperties = Maybe Value
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsAllOf:V1JSONSchemaProps :: Maybe [V1JSONSchemaProps]
v1JSONSchemaPropsAllOf = Maybe [V1JSONSchemaProps]
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsAnyOf:V1JSONSchemaProps :: Maybe [V1JSONSchemaProps]
v1JSONSchemaPropsAnyOf = Maybe [V1JSONSchemaProps]
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsDefault:V1JSONSchemaProps :: Maybe Value
v1JSONSchemaPropsDefault = Maybe Value
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsDefinitions:V1JSONSchemaProps :: Maybe (Map String V1JSONSchemaProps)
v1JSONSchemaPropsDefinitions = Maybe (Map String V1JSONSchemaProps)
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsDependencies:V1JSONSchemaProps :: Maybe (Map String Value)
v1JSONSchemaPropsDependencies = Maybe (Map String Value)
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsDescription:V1JSONSchemaProps :: Maybe Text
v1JSONSchemaPropsDescription = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsEnum:V1JSONSchemaProps :: Maybe [Value]
v1JSONSchemaPropsEnum = Maybe [Value]
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsExample:V1JSONSchemaProps :: Maybe Value
v1JSONSchemaPropsExample = Maybe Value
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsExclusiveMaximum:V1JSONSchemaProps :: Maybe Bool
v1JSONSchemaPropsExclusiveMaximum = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsExclusiveMinimum:V1JSONSchemaProps :: Maybe Bool
v1JSONSchemaPropsExclusiveMinimum = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsExternalDocs:V1JSONSchemaProps :: Maybe V1ExternalDocumentation
v1JSONSchemaPropsExternalDocs = Maybe V1ExternalDocumentation
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsFormat:V1JSONSchemaProps :: Maybe Text
v1JSONSchemaPropsFormat = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsId:V1JSONSchemaProps :: Maybe Text
v1JSONSchemaPropsId = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsItems:V1JSONSchemaProps :: Maybe Value
v1JSONSchemaPropsItems = Maybe Value
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsMaxItems:V1JSONSchemaProps :: Maybe Integer
v1JSONSchemaPropsMaxItems = Maybe Integer
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsMaxLength:V1JSONSchemaProps :: Maybe Integer
v1JSONSchemaPropsMaxLength = Maybe Integer
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsMaxProperties:V1JSONSchemaProps :: Maybe Integer
v1JSONSchemaPropsMaxProperties = Maybe Integer
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsMaximum:V1JSONSchemaProps :: Maybe Double
v1JSONSchemaPropsMaximum = Maybe Double
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsMinItems:V1JSONSchemaProps :: Maybe Integer
v1JSONSchemaPropsMinItems = Maybe Integer
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsMinLength:V1JSONSchemaProps :: Maybe Integer
v1JSONSchemaPropsMinLength = Maybe Integer
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsMinProperties:V1JSONSchemaProps :: Maybe Integer
v1JSONSchemaPropsMinProperties = Maybe Integer
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsMinimum:V1JSONSchemaProps :: Maybe Double
v1JSONSchemaPropsMinimum = Maybe Double
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsMultipleOf:V1JSONSchemaProps :: Maybe Double
v1JSONSchemaPropsMultipleOf = Maybe Double
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsNot:V1JSONSchemaProps :: Maybe V1JSONSchemaProps
v1JSONSchemaPropsNot = Maybe V1JSONSchemaProps
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsNullable:V1JSONSchemaProps :: Maybe Bool
v1JSONSchemaPropsNullable = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsOneOf:V1JSONSchemaProps :: Maybe [V1JSONSchemaProps]
v1JSONSchemaPropsOneOf = Maybe [V1JSONSchemaProps]
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsPattern:V1JSONSchemaProps :: Maybe Text
v1JSONSchemaPropsPattern = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsPatternProperties:V1JSONSchemaProps :: Maybe (Map String V1JSONSchemaProps)
v1JSONSchemaPropsPatternProperties = Maybe (Map String V1JSONSchemaProps)
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsProperties:V1JSONSchemaProps :: Maybe (Map String V1JSONSchemaProps)
v1JSONSchemaPropsProperties = Maybe (Map String V1JSONSchemaProps)
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsRequired:V1JSONSchemaProps :: Maybe [Text]
v1JSONSchemaPropsRequired = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsTitle:V1JSONSchemaProps :: Maybe Text
v1JSONSchemaPropsTitle = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsType:V1JSONSchemaProps :: Maybe Text
v1JSONSchemaPropsType = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsUniqueItems:V1JSONSchemaProps :: Maybe Bool
v1JSONSchemaPropsUniqueItems = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsXKubernetesEmbeddedResource:V1JSONSchemaProps :: Maybe Bool
v1JSONSchemaPropsXKubernetesEmbeddedResource = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsXKubernetesIntOrString:V1JSONSchemaProps :: Maybe Bool
v1JSONSchemaPropsXKubernetesIntOrString = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsXKubernetesListMapKeys:V1JSONSchemaProps :: Maybe [Text]
v1JSONSchemaPropsXKubernetesListMapKeys = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsXKubernetesListType:V1JSONSchemaProps :: Maybe Text
v1JSONSchemaPropsXKubernetesListType = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsXKubernetesMapType:V1JSONSchemaProps :: Maybe Text
v1JSONSchemaPropsXKubernetesMapType = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsXKubernetesPreserveUnknownFields:V1JSONSchemaProps :: Maybe Bool
v1JSONSchemaPropsXKubernetesPreserveUnknownFields = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1JSONSchemaPropsXKubernetesValidations:V1JSONSchemaProps :: Maybe [V1ValidationRule]
v1JSONSchemaPropsXKubernetesValidations = Maybe [V1ValidationRule]
forall a. Maybe a
Nothing
  }

-- ** V1Job
-- | V1Job
-- Job represents the configuration of a single job.
data V1Job = V1Job
  { V1Job -> Maybe Text
v1JobApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1Job -> Maybe Text
v1JobKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1Job -> Maybe V1ObjectMeta
v1JobMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1Job -> Maybe V1JobSpec
v1JobSpec :: !(Maybe V1JobSpec) -- ^ "spec"
  , V1Job -> Maybe V1JobStatus
v1JobStatus :: !(Maybe V1JobStatus) -- ^ "status"
  } deriving (Int -> V1Job -> ShowS
[V1Job] -> ShowS
V1Job -> String
(Int -> V1Job -> ShowS)
-> (V1Job -> String) -> ([V1Job] -> ShowS) -> Show V1Job
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1Job -> ShowS
showsPrec :: Int -> V1Job -> ShowS
$cshow :: V1Job -> String
show :: V1Job -> String
$cshowList :: [V1Job] -> ShowS
showList :: [V1Job] -> ShowS
P.Show, V1Job -> V1Job -> Bool
(V1Job -> V1Job -> Bool) -> (V1Job -> V1Job -> Bool) -> Eq V1Job
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1Job -> V1Job -> Bool
== :: V1Job -> V1Job -> Bool
$c/= :: V1Job -> V1Job -> Bool
/= :: V1Job -> V1Job -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1Job
instance A.FromJSON V1Job where
  parseJSON :: Value -> Parser V1Job
parseJSON = String -> (Object -> Parser V1Job) -> Value -> Parser V1Job
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1Job" ((Object -> Parser V1Job) -> Value -> Parser V1Job)
-> (Object -> Parser V1Job) -> Value -> Parser V1Job
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1JobSpec
-> Maybe V1JobStatus
-> V1Job
V1Job
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1JobSpec
 -> Maybe V1JobStatus
 -> V1Job)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1JobSpec
      -> Maybe V1JobStatus
      -> V1Job)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1JobSpec
   -> Maybe V1JobStatus
   -> V1Job)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1JobSpec -> Maybe V1JobStatus -> V1Job)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1JobSpec -> Maybe V1JobStatus -> V1Job)
-> Parser (Maybe V1ObjectMeta)
-> Parser (Maybe V1JobSpec -> Maybe V1JobStatus -> V1Job)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (Maybe V1JobSpec -> Maybe V1JobStatus -> V1Job)
-> Parser (Maybe V1JobSpec) -> Parser (Maybe V1JobStatus -> V1Job)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1JobSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")
      Parser (Maybe V1JobStatus -> V1Job)
-> Parser (Maybe V1JobStatus) -> Parser V1Job
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1JobStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1Job
instance A.ToJSON V1Job where
  toJSON :: V1Job -> Value
toJSON V1Job {Maybe Text
Maybe V1ObjectMeta
Maybe V1JobStatus
Maybe V1JobSpec
$sel:v1JobApiVersion:V1Job :: V1Job -> Maybe Text
$sel:v1JobKind:V1Job :: V1Job -> Maybe Text
$sel:v1JobMetadata:V1Job :: V1Job -> Maybe V1ObjectMeta
$sel:v1JobSpec:V1Job :: V1Job -> Maybe V1JobSpec
$sel:v1JobStatus:V1Job :: V1Job -> Maybe V1JobStatus
v1JobApiVersion :: Maybe Text
v1JobKind :: Maybe Text
v1JobMetadata :: Maybe V1ObjectMeta
v1JobSpec :: Maybe V1JobSpec
v1JobStatus :: Maybe V1JobStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1JobApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1JobKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1JobMetadata
      , Key
"spec" Key -> Maybe V1JobSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1JobSpec
v1JobSpec
      , Key
"status" Key -> Maybe V1JobStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1JobStatus
v1JobStatus
      ]


-- | Construct a value of type 'V1Job' (by applying it's required fields, if any)
mkV1Job
  :: V1Job
mkV1Job :: V1Job
mkV1Job =
  V1Job
  { $sel:v1JobApiVersion:V1Job :: Maybe Text
v1JobApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1JobKind:V1Job :: Maybe Text
v1JobKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1JobMetadata:V1Job :: Maybe V1ObjectMeta
v1JobMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1JobSpec:V1Job :: Maybe V1JobSpec
v1JobSpec = Maybe V1JobSpec
forall a. Maybe a
Nothing
  , $sel:v1JobStatus:V1Job :: Maybe V1JobStatus
v1JobStatus = Maybe V1JobStatus
forall a. Maybe a
Nothing
  }

-- ** V1JobCondition
-- | V1JobCondition
-- JobCondition describes current state of a job.
data V1JobCondition = V1JobCondition
  { V1JobCondition -> Maybe DateTime
v1JobConditionLastProbeTime :: !(Maybe DateTime) -- ^ "lastProbeTime" - Last time the condition was checked.
  , V1JobCondition -> Maybe DateTime
v1JobConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - Last time the condition transit from one status to another.
  , V1JobCondition -> Maybe Text
v1JobConditionMessage :: !(Maybe Text) -- ^ "message" - Human readable message indicating details about last transition.
  , V1JobCondition -> Maybe Text
v1JobConditionReason :: !(Maybe Text) -- ^ "reason" - (brief) reason for the condition&#39;s last transition.
  , V1JobCondition -> Text
v1JobConditionStatus :: !(Text) -- ^ /Required/ "status" - Status of the condition, one of True, False, Unknown.
  , V1JobCondition -> Text
v1JobConditionType :: !(Text) -- ^ /Required/ "type" - Type of job condition, Complete or Failed.
  } deriving (Int -> V1JobCondition -> ShowS
[V1JobCondition] -> ShowS
V1JobCondition -> String
(Int -> V1JobCondition -> ShowS)
-> (V1JobCondition -> String)
-> ([V1JobCondition] -> ShowS)
-> Show V1JobCondition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1JobCondition -> ShowS
showsPrec :: Int -> V1JobCondition -> ShowS
$cshow :: V1JobCondition -> String
show :: V1JobCondition -> String
$cshowList :: [V1JobCondition] -> ShowS
showList :: [V1JobCondition] -> ShowS
P.Show, V1JobCondition -> V1JobCondition -> Bool
(V1JobCondition -> V1JobCondition -> Bool)
-> (V1JobCondition -> V1JobCondition -> Bool) -> Eq V1JobCondition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1JobCondition -> V1JobCondition -> Bool
== :: V1JobCondition -> V1JobCondition -> Bool
$c/= :: V1JobCondition -> V1JobCondition -> Bool
/= :: V1JobCondition -> V1JobCondition -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1JobCondition
instance A.FromJSON V1JobCondition where
  parseJSON :: Value -> Parser V1JobCondition
parseJSON = String
-> (Object -> Parser V1JobCondition)
-> Value
-> Parser V1JobCondition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1JobCondition" ((Object -> Parser V1JobCondition)
 -> Value -> Parser V1JobCondition)
-> (Object -> Parser V1JobCondition)
-> Value
-> Parser V1JobCondition
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe DateTime
-> Maybe DateTime
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> V1JobCondition
V1JobCondition
      (Maybe DateTime
 -> Maybe DateTime
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> Text
 -> V1JobCondition)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe DateTime
      -> Maybe Text -> Maybe Text -> Text -> Text -> V1JobCondition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lastProbeTime")
      Parser
  (Maybe DateTime
   -> Maybe Text -> Maybe Text -> Text -> Text -> V1JobCondition)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe Text -> Maybe Text -> Text -> Text -> V1JobCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lastTransitionTime")
      Parser (Maybe Text -> Maybe Text -> Text -> Text -> V1JobCondition)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Text -> Text -> V1JobCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"message")
      Parser (Maybe Text -> Text -> Text -> V1JobCondition)
-> Parser (Maybe Text) -> Parser (Text -> Text -> V1JobCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reason")
      Parser (Text -> Text -> V1JobCondition)
-> Parser Text -> Parser (Text -> V1JobCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"status")
      Parser (Text -> V1JobCondition)
-> Parser Text -> Parser V1JobCondition
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"type")

-- | ToJSON V1JobCondition
instance A.ToJSON V1JobCondition where
  toJSON :: V1JobCondition -> Value
toJSON V1JobCondition {Maybe Text
Maybe DateTime
Text
$sel:v1JobConditionLastProbeTime:V1JobCondition :: V1JobCondition -> Maybe DateTime
$sel:v1JobConditionLastTransitionTime:V1JobCondition :: V1JobCondition -> Maybe DateTime
$sel:v1JobConditionMessage:V1JobCondition :: V1JobCondition -> Maybe Text
$sel:v1JobConditionReason:V1JobCondition :: V1JobCondition -> Maybe Text
$sel:v1JobConditionStatus:V1JobCondition :: V1JobCondition -> Text
$sel:v1JobConditionType:V1JobCondition :: V1JobCondition -> Text
v1JobConditionLastProbeTime :: Maybe DateTime
v1JobConditionLastTransitionTime :: Maybe DateTime
v1JobConditionMessage :: Maybe Text
v1JobConditionReason :: Maybe Text
v1JobConditionStatus :: Text
v1JobConditionType :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"lastProbeTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1JobConditionLastProbeTime
      , Key
"lastTransitionTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1JobConditionLastTransitionTime
      , Key
"message" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1JobConditionMessage
      , Key
"reason" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1JobConditionReason
      , Key
"status" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1JobConditionStatus
      , Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1JobConditionType
      ]


-- | Construct a value of type 'V1JobCondition' (by applying it's required fields, if any)
mkV1JobCondition
  :: Text -- ^ 'v1JobConditionStatus': Status of the condition, one of True, False, Unknown.
  -> Text -- ^ 'v1JobConditionType': Type of job condition, Complete or Failed.
  -> V1JobCondition
mkV1JobCondition :: Text -> Text -> V1JobCondition
mkV1JobCondition Text
v1JobConditionStatus Text
v1JobConditionType =
  V1JobCondition
  { $sel:v1JobConditionLastProbeTime:V1JobCondition :: Maybe DateTime
v1JobConditionLastProbeTime = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1JobConditionLastTransitionTime:V1JobCondition :: Maybe DateTime
v1JobConditionLastTransitionTime = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1JobConditionMessage:V1JobCondition :: Maybe Text
v1JobConditionMessage = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1JobConditionReason:V1JobCondition :: Maybe Text
v1JobConditionReason = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1JobConditionStatus:V1JobCondition :: Text
v1JobConditionStatus :: Text
v1JobConditionStatus
  , Text
$sel:v1JobConditionType:V1JobCondition :: Text
v1JobConditionType :: Text
v1JobConditionType
  }

-- ** V1JobList
-- | V1JobList
-- JobList is a collection of jobs.
data V1JobList = V1JobList
  { V1JobList -> Maybe Text
v1JobListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1JobList -> [V1Job]
v1JobListItems :: !([V1Job]) -- ^ /Required/ "items" - items is the list of Jobs.
  , V1JobList -> Maybe Text
v1JobListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1JobList -> Maybe V1ListMeta
v1JobListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1JobList -> ShowS
[V1JobList] -> ShowS
V1JobList -> String
(Int -> V1JobList -> ShowS)
-> (V1JobList -> String)
-> ([V1JobList] -> ShowS)
-> Show V1JobList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1JobList -> ShowS
showsPrec :: Int -> V1JobList -> ShowS
$cshow :: V1JobList -> String
show :: V1JobList -> String
$cshowList :: [V1JobList] -> ShowS
showList :: [V1JobList] -> ShowS
P.Show, V1JobList -> V1JobList -> Bool
(V1JobList -> V1JobList -> Bool)
-> (V1JobList -> V1JobList -> Bool) -> Eq V1JobList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1JobList -> V1JobList -> Bool
== :: V1JobList -> V1JobList -> Bool
$c/= :: V1JobList -> V1JobList -> Bool
/= :: V1JobList -> V1JobList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1JobList
instance A.FromJSON V1JobList where
  parseJSON :: Value -> Parser V1JobList
parseJSON = String -> (Object -> Parser V1JobList) -> Value -> Parser V1JobList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1JobList" ((Object -> Parser V1JobList) -> Value -> Parser V1JobList)
-> (Object -> Parser V1JobList) -> Value -> Parser V1JobList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1Job] -> Maybe Text -> Maybe V1ListMeta -> V1JobList
V1JobList
      (Maybe Text
 -> [V1Job] -> Maybe Text -> Maybe V1ListMeta -> V1JobList)
-> Parser (Maybe Text)
-> Parser ([V1Job] -> Maybe Text -> Maybe V1ListMeta -> V1JobList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser ([V1Job] -> Maybe Text -> Maybe V1ListMeta -> V1JobList)
-> Parser [V1Job]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1JobList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1Job]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1JobList)
-> Parser (Maybe Text) -> Parser (Maybe V1ListMeta -> V1JobList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1JobList)
-> Parser (Maybe V1ListMeta) -> Parser V1JobList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1JobList
instance A.ToJSON V1JobList where
  toJSON :: V1JobList -> Value
toJSON V1JobList {[V1Job]
Maybe Text
Maybe V1ListMeta
$sel:v1JobListApiVersion:V1JobList :: V1JobList -> Maybe Text
$sel:v1JobListItems:V1JobList :: V1JobList -> [V1Job]
$sel:v1JobListKind:V1JobList :: V1JobList -> Maybe Text
$sel:v1JobListMetadata:V1JobList :: V1JobList -> Maybe V1ListMeta
v1JobListApiVersion :: Maybe Text
v1JobListItems :: [V1Job]
v1JobListKind :: Maybe Text
v1JobListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1JobListApiVersion
      , Key
"items" Key -> [V1Job] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1Job]
v1JobListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1JobListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1JobListMetadata
      ]


-- | Construct a value of type 'V1JobList' (by applying it's required fields, if any)
mkV1JobList
  :: [V1Job] -- ^ 'v1JobListItems': items is the list of Jobs.
  -> V1JobList
mkV1JobList :: [V1Job] -> V1JobList
mkV1JobList [V1Job]
v1JobListItems =
  V1JobList
  { $sel:v1JobListApiVersion:V1JobList :: Maybe Text
v1JobListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1Job]
$sel:v1JobListItems:V1JobList :: [V1Job]
v1JobListItems :: [V1Job]
v1JobListItems
  , $sel:v1JobListKind:V1JobList :: Maybe Text
v1JobListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1JobListMetadata:V1JobList :: Maybe V1ListMeta
v1JobListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1JobSpec
-- | V1JobSpec
-- JobSpec describes how the job execution will look like.
data V1JobSpec = V1JobSpec
  { V1JobSpec -> Maybe Integer
v1JobSpecActiveDeadlineSeconds :: !(Maybe Integer) -- ^ "activeDeadlineSeconds" - Specifies the duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it; value must be positive integer. If a Job is suspended (at creation or through an update), this timer will effectively be stopped and reset when the Job is resumed again.
  , V1JobSpec -> Maybe Int
v1JobSpecBackoffLimit :: !(Maybe Int) -- ^ "backoffLimit" - Specifies the number of retries before marking this job failed. Defaults to 6
  , V1JobSpec -> Maybe Int
v1JobSpecBackoffLimitPerIndex :: !(Maybe Int) -- ^ "backoffLimitPerIndex" - Specifies the limit for the number of retries within an index before marking this index as failed. When enabled the number of failures per index is kept in the pod&#39;s batch.kubernetes.io/job-index-failure-count annotation. It can only be set when Job&#39;s completionMode&#x3D;Indexed, and the Pod&#39;s restart policy is Never. The field is immutable. This field is beta-level. It can be used when the &#x60;JobBackoffLimitPerIndex&#x60; feature gate is enabled (enabled by default).
  , V1JobSpec -> Maybe Text
v1JobSpecCompletionMode :: !(Maybe Text) -- ^ "completionMode" - completionMode specifies how Pod completions are tracked. It can be &#x60;NonIndexed&#x60; (default) or &#x60;Indexed&#x60;.  &#x60;NonIndexed&#x60; means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other.  &#x60;Indexed&#x60; means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is &#x60;Indexed&#x60;, .spec.completions must be specified and &#x60;.spec.parallelism&#x60; must be less than or equal to 10^5. In addition, The Pod name takes the form &#x60;$(job-name)-$(index)-$(random-string)&#x60;, the Pod hostname takes the form &#x60;$(job-name)-$(index)&#x60;.  More completion modes can be added in the future. If the Job controller observes a mode that it doesn&#39;t recognize, which is possible during upgrades due to version skew, the controller skips updates for the Job.
  , V1JobSpec -> Maybe Int
v1JobSpecCompletions :: !(Maybe Int) -- ^ "completions" - Specifies the desired number of successfully finished pods the job should be run with.  Setting to null means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value.  Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
  , V1JobSpec -> Maybe Text
v1JobSpecManagedBy :: !(Maybe Text) -- ^ "managedBy" - ManagedBy field indicates the controller that manages a Job. The k8s Job controller reconciles jobs which don&#39;t have this field at all or the field value is the reserved string &#x60;kubernetes.io/job-controller&#x60;, but skips reconciling Jobs with a custom value for this field. The value must be a valid domain-prefixed path (e.g. acme.io/foo) - all characters before the first \&quot;/\&quot; must be a valid subdomain as defined by RFC 1123. All characters trailing the first \&quot;/\&quot; must be valid HTTP Path characters as defined by RFC 3986. The value cannot exceed 63 characters. This field is immutable.  This field is beta-level. The job controller accepts setting the field when the feature gate JobManagedBy is enabled (enabled by default).
  , V1JobSpec -> Maybe Bool
v1JobSpecManualSelector :: !(Maybe Bool) -- ^ "manualSelector" - manualSelector controls generation of pod labels and pod selectors. Leave &#x60;manualSelector&#x60; unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template.  When true, the user is responsible for picking unique labels and specifying the selector.  Failure to pick a unique label may cause this and other jobs to not function correctly.  However, You may see &#x60;manualSelector&#x3D;true&#x60; in jobs that were created with the old &#x60;extensions/v1beta1&#x60; API. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector
  , V1JobSpec -> Maybe Int
v1JobSpecMaxFailedIndexes :: !(Maybe Int) -- ^ "maxFailedIndexes" - Specifies the maximal number of failed indexes before marking the Job as failed, when backoffLimitPerIndex is set. Once the number of failed indexes exceeds this number the entire Job is marked as Failed and its execution is terminated. When left as null the job continues execution of all of its indexes and is marked with the &#x60;Complete&#x60; Job condition. It can only be specified when backoffLimitPerIndex is set. It can be null or up to completions. It is required and must be less than or equal to 10^4 when is completions greater than 10^5. This field is beta-level. It can be used when the &#x60;JobBackoffLimitPerIndex&#x60; feature gate is enabled (enabled by default).
  , V1JobSpec -> Maybe Int
v1JobSpecParallelism :: !(Maybe Int) -- ^ "parallelism" - Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) &lt; .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
  , V1JobSpec -> Maybe V1PodFailurePolicy
v1JobSpecPodFailurePolicy :: !(Maybe V1PodFailurePolicy) -- ^ "podFailurePolicy"
  , V1JobSpec -> Maybe Text
v1JobSpecPodReplacementPolicy :: !(Maybe Text) -- ^ "podReplacementPolicy" - podReplacementPolicy specifies when to create replacement Pods. Possible values are: - TerminatingOrFailed means that we recreate pods   when they are terminating (has a metadata.deletionTimestamp) or failed. - Failed means to wait until a previously created Pod is fully terminated (has phase   Failed or Succeeded) before creating a replacement Pod.  When using podFailurePolicy, Failed is the the only allowed value. TerminatingOrFailed and Failed are allowed values when podFailurePolicy is not in use. This is an beta field. To use this, enable the JobPodReplacementPolicy feature toggle. This is on by default.
  , V1JobSpec -> Maybe V1LabelSelector
v1JobSpecSelector :: !(Maybe V1LabelSelector) -- ^ "selector"
  , V1JobSpec -> Maybe V1SuccessPolicy
v1JobSpecSuccessPolicy :: !(Maybe V1SuccessPolicy) -- ^ "successPolicy"
  , V1JobSpec -> Maybe Bool
v1JobSpecSuspend :: !(Maybe Bool) -- ^ "suspend" - suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job, effectively resetting the ActiveDeadlineSeconds timer too. Defaults to false.
  , V1JobSpec -> V1PodTemplateSpec
v1JobSpecTemplate :: !(V1PodTemplateSpec) -- ^ /Required/ "template"
  , V1JobSpec -> Maybe Int
v1JobSpecTtlSecondsAfterFinished :: !(Maybe Int) -- ^ "ttlSecondsAfterFinished" - ttlSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is unset, the Job won&#39;t be automatically deleted. If this field is set to zero, the Job becomes eligible to be deleted immediately after it finishes.
  } deriving (Int -> V1JobSpec -> ShowS
[V1JobSpec] -> ShowS
V1JobSpec -> String
(Int -> V1JobSpec -> ShowS)
-> (V1JobSpec -> String)
-> ([V1JobSpec] -> ShowS)
-> Show V1JobSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1JobSpec -> ShowS
showsPrec :: Int -> V1JobSpec -> ShowS
$cshow :: V1JobSpec -> String
show :: V1JobSpec -> String
$cshowList :: [V1JobSpec] -> ShowS
showList :: [V1JobSpec] -> ShowS
P.Show, V1JobSpec -> V1JobSpec -> Bool
(V1JobSpec -> V1JobSpec -> Bool)
-> (V1JobSpec -> V1JobSpec -> Bool) -> Eq V1JobSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1JobSpec -> V1JobSpec -> Bool
== :: V1JobSpec -> V1JobSpec -> Bool
$c/= :: V1JobSpec -> V1JobSpec -> Bool
/= :: V1JobSpec -> V1JobSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1JobSpec
instance A.FromJSON V1JobSpec where
  parseJSON :: Value -> Parser V1JobSpec
parseJSON = String -> (Object -> Parser V1JobSpec) -> Value -> Parser V1JobSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1JobSpec" ((Object -> Parser V1JobSpec) -> Value -> Parser V1JobSpec)
-> (Object -> Parser V1JobSpec) -> Value -> Parser V1JobSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Integer
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Bool
-> Maybe Int
-> Maybe Int
-> Maybe V1PodFailurePolicy
-> Maybe Text
-> Maybe V1LabelSelector
-> Maybe V1SuccessPolicy
-> Maybe Bool
-> V1PodTemplateSpec
-> Maybe Int
-> V1JobSpec
V1JobSpec
      (Maybe Integer
 -> Maybe Int
 -> Maybe Int
 -> Maybe Text
 -> Maybe Int
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Int
 -> Maybe Int
 -> Maybe V1PodFailurePolicy
 -> Maybe Text
 -> Maybe V1LabelSelector
 -> Maybe V1SuccessPolicy
 -> Maybe Bool
 -> V1PodTemplateSpec
 -> Maybe Int
 -> V1JobSpec)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> Maybe V1PodFailurePolicy
      -> Maybe Text
      -> Maybe V1LabelSelector
      -> Maybe V1SuccessPolicy
      -> Maybe Bool
      -> V1PodTemplateSpec
      -> Maybe Int
      -> V1JobSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"activeDeadlineSeconds")
      Parser
  (Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> Maybe V1PodFailurePolicy
   -> Maybe Text
   -> Maybe V1LabelSelector
   -> Maybe V1SuccessPolicy
   -> Maybe Bool
   -> V1PodTemplateSpec
   -> Maybe Int
   -> V1JobSpec)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> Maybe V1PodFailurePolicy
      -> Maybe Text
      -> Maybe V1LabelSelector
      -> Maybe V1SuccessPolicy
      -> Maybe Bool
      -> V1PodTemplateSpec
      -> Maybe Int
      -> V1JobSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"backoffLimit")
      Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> Maybe V1PodFailurePolicy
   -> Maybe Text
   -> Maybe V1LabelSelector
   -> Maybe V1SuccessPolicy
   -> Maybe Bool
   -> V1PodTemplateSpec
   -> Maybe Int
   -> V1JobSpec)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> Maybe V1PodFailurePolicy
      -> Maybe Text
      -> Maybe V1LabelSelector
      -> Maybe V1SuccessPolicy
      -> Maybe Bool
      -> V1PodTemplateSpec
      -> Maybe Int
      -> V1JobSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"backoffLimitPerIndex")
      Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> Maybe V1PodFailurePolicy
   -> Maybe Text
   -> Maybe V1LabelSelector
   -> Maybe V1SuccessPolicy
   -> Maybe Bool
   -> V1PodTemplateSpec
   -> Maybe Int
   -> V1JobSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> Maybe V1PodFailurePolicy
      -> Maybe Text
      -> Maybe V1LabelSelector
      -> Maybe V1SuccessPolicy
      -> Maybe Bool
      -> V1PodTemplateSpec
      -> Maybe Int
      -> V1JobSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"completionMode")
      Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> Maybe V1PodFailurePolicy
   -> Maybe Text
   -> Maybe V1LabelSelector
   -> Maybe V1SuccessPolicy
   -> Maybe Bool
   -> V1PodTemplateSpec
   -> Maybe Int
   -> V1JobSpec)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> Maybe V1PodFailurePolicy
      -> Maybe Text
      -> Maybe V1LabelSelector
      -> Maybe V1SuccessPolicy
      -> Maybe Bool
      -> V1PodTemplateSpec
      -> Maybe Int
      -> V1JobSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"completions")
      Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> Maybe V1PodFailurePolicy
   -> Maybe Text
   -> Maybe V1LabelSelector
   -> Maybe V1SuccessPolicy
   -> Maybe Bool
   -> V1PodTemplateSpec
   -> Maybe Int
   -> V1JobSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> Maybe V1PodFailurePolicy
      -> Maybe Text
      -> Maybe V1LabelSelector
      -> Maybe V1SuccessPolicy
      -> Maybe Bool
      -> V1PodTemplateSpec
      -> Maybe Int
      -> V1JobSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"managedBy")
      Parser
  (Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> Maybe V1PodFailurePolicy
   -> Maybe Text
   -> Maybe V1LabelSelector
   -> Maybe V1SuccessPolicy
   -> Maybe Bool
   -> V1PodTemplateSpec
   -> Maybe Int
   -> V1JobSpec)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Int
      -> Maybe Int
      -> Maybe V1PodFailurePolicy
      -> Maybe Text
      -> Maybe V1LabelSelector
      -> Maybe V1SuccessPolicy
      -> Maybe Bool
      -> V1PodTemplateSpec
      -> Maybe Int
      -> V1JobSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"manualSelector")
      Parser
  (Maybe Int
   -> Maybe Int
   -> Maybe V1PodFailurePolicy
   -> Maybe Text
   -> Maybe V1LabelSelector
   -> Maybe V1SuccessPolicy
   -> Maybe Bool
   -> V1PodTemplateSpec
   -> Maybe Int
   -> V1JobSpec)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe V1PodFailurePolicy
      -> Maybe Text
      -> Maybe V1LabelSelector
      -> Maybe V1SuccessPolicy
      -> Maybe Bool
      -> V1PodTemplateSpec
      -> Maybe Int
      -> V1JobSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"maxFailedIndexes")
      Parser
  (Maybe Int
   -> Maybe V1PodFailurePolicy
   -> Maybe Text
   -> Maybe V1LabelSelector
   -> Maybe V1SuccessPolicy
   -> Maybe Bool
   -> V1PodTemplateSpec
   -> Maybe Int
   -> V1JobSpec)
-> Parser (Maybe Int)
-> Parser
     (Maybe V1PodFailurePolicy
      -> Maybe Text
      -> Maybe V1LabelSelector
      -> Maybe V1SuccessPolicy
      -> Maybe Bool
      -> V1PodTemplateSpec
      -> Maybe Int
      -> V1JobSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"parallelism")
      Parser
  (Maybe V1PodFailurePolicy
   -> Maybe Text
   -> Maybe V1LabelSelector
   -> Maybe V1SuccessPolicy
   -> Maybe Bool
   -> V1PodTemplateSpec
   -> Maybe Int
   -> V1JobSpec)
-> Parser (Maybe V1PodFailurePolicy)
-> Parser
     (Maybe Text
      -> Maybe V1LabelSelector
      -> Maybe V1SuccessPolicy
      -> Maybe Bool
      -> V1PodTemplateSpec
      -> Maybe Int
      -> V1JobSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1PodFailurePolicy)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"podFailurePolicy")
      Parser
  (Maybe Text
   -> Maybe V1LabelSelector
   -> Maybe V1SuccessPolicy
   -> Maybe Bool
   -> V1PodTemplateSpec
   -> Maybe Int
   -> V1JobSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1LabelSelector
      -> Maybe V1SuccessPolicy
      -> Maybe Bool
      -> V1PodTemplateSpec
      -> Maybe Int
      -> V1JobSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"podReplacementPolicy")
      Parser
  (Maybe V1LabelSelector
   -> Maybe V1SuccessPolicy
   -> Maybe Bool
   -> V1PodTemplateSpec
   -> Maybe Int
   -> V1JobSpec)
-> Parser (Maybe V1LabelSelector)
-> Parser
     (Maybe V1SuccessPolicy
      -> Maybe Bool -> V1PodTemplateSpec -> Maybe Int -> V1JobSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LabelSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"selector")
      Parser
  (Maybe V1SuccessPolicy
   -> Maybe Bool -> V1PodTemplateSpec -> Maybe Int -> V1JobSpec)
-> Parser (Maybe V1SuccessPolicy)
-> Parser
     (Maybe Bool -> V1PodTemplateSpec -> Maybe Int -> V1JobSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1SuccessPolicy)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"successPolicy")
      Parser (Maybe Bool -> V1PodTemplateSpec -> Maybe Int -> V1JobSpec)
-> Parser (Maybe Bool)
-> Parser (V1PodTemplateSpec -> Maybe Int -> V1JobSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"suspend")
      Parser (V1PodTemplateSpec -> Maybe Int -> V1JobSpec)
-> Parser V1PodTemplateSpec -> Parser (Maybe Int -> V1JobSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1PodTemplateSpec
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"template")
      Parser (Maybe Int -> V1JobSpec)
-> Parser (Maybe Int) -> Parser V1JobSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ttlSecondsAfterFinished")

-- | ToJSON V1JobSpec
instance A.ToJSON V1JobSpec where
  toJSON :: V1JobSpec -> Value
toJSON V1JobSpec {Maybe Bool
Maybe Int
Maybe Integer
Maybe Text
Maybe V1SuccessPolicy
Maybe V1PodFailurePolicy
Maybe V1LabelSelector
V1PodTemplateSpec
$sel:v1JobSpecActiveDeadlineSeconds:V1JobSpec :: V1JobSpec -> Maybe Integer
$sel:v1JobSpecBackoffLimit:V1JobSpec :: V1JobSpec -> Maybe Int
$sel:v1JobSpecBackoffLimitPerIndex:V1JobSpec :: V1JobSpec -> Maybe Int
$sel:v1JobSpecCompletionMode:V1JobSpec :: V1JobSpec -> Maybe Text
$sel:v1JobSpecCompletions:V1JobSpec :: V1JobSpec -> Maybe Int
$sel:v1JobSpecManagedBy:V1JobSpec :: V1JobSpec -> Maybe Text
$sel:v1JobSpecManualSelector:V1JobSpec :: V1JobSpec -> Maybe Bool
$sel:v1JobSpecMaxFailedIndexes:V1JobSpec :: V1JobSpec -> Maybe Int
$sel:v1JobSpecParallelism:V1JobSpec :: V1JobSpec -> Maybe Int
$sel:v1JobSpecPodFailurePolicy:V1JobSpec :: V1JobSpec -> Maybe V1PodFailurePolicy
$sel:v1JobSpecPodReplacementPolicy:V1JobSpec :: V1JobSpec -> Maybe Text
$sel:v1JobSpecSelector:V1JobSpec :: V1JobSpec -> Maybe V1LabelSelector
$sel:v1JobSpecSuccessPolicy:V1JobSpec :: V1JobSpec -> Maybe V1SuccessPolicy
$sel:v1JobSpecSuspend:V1JobSpec :: V1JobSpec -> Maybe Bool
$sel:v1JobSpecTemplate:V1JobSpec :: V1JobSpec -> V1PodTemplateSpec
$sel:v1JobSpecTtlSecondsAfterFinished:V1JobSpec :: V1JobSpec -> Maybe Int
v1JobSpecActiveDeadlineSeconds :: Maybe Integer
v1JobSpecBackoffLimit :: Maybe Int
v1JobSpecBackoffLimitPerIndex :: Maybe Int
v1JobSpecCompletionMode :: Maybe Text
v1JobSpecCompletions :: Maybe Int
v1JobSpecManagedBy :: Maybe Text
v1JobSpecManualSelector :: Maybe Bool
v1JobSpecMaxFailedIndexes :: Maybe Int
v1JobSpecParallelism :: Maybe Int
v1JobSpecPodFailurePolicy :: Maybe V1PodFailurePolicy
v1JobSpecPodReplacementPolicy :: Maybe Text
v1JobSpecSelector :: Maybe V1LabelSelector
v1JobSpecSuccessPolicy :: Maybe V1SuccessPolicy
v1JobSpecSuspend :: Maybe Bool
v1JobSpecTemplate :: V1PodTemplateSpec
v1JobSpecTtlSecondsAfterFinished :: Maybe Int
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"activeDeadlineSeconds" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1JobSpecActiveDeadlineSeconds
      , Key
"backoffLimit" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1JobSpecBackoffLimit
      , Key
"backoffLimitPerIndex" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1JobSpecBackoffLimitPerIndex
      , Key
"completionMode" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1JobSpecCompletionMode
      , Key
"completions" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1JobSpecCompletions
      , Key
"managedBy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1JobSpecManagedBy
      , Key
"manualSelector" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1JobSpecManualSelector
      , Key
"maxFailedIndexes" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1JobSpecMaxFailedIndexes
      , Key
"parallelism" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1JobSpecParallelism
      , Key
"podFailurePolicy" Key -> Maybe V1PodFailurePolicy -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1PodFailurePolicy
v1JobSpecPodFailurePolicy
      , Key
"podReplacementPolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1JobSpecPodReplacementPolicy
      , Key
"selector" Key -> Maybe V1LabelSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LabelSelector
v1JobSpecSelector
      , Key
"successPolicy" Key -> Maybe V1SuccessPolicy -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1SuccessPolicy
v1JobSpecSuccessPolicy
      , Key
"suspend" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1JobSpecSuspend
      , Key
"template" Key -> V1PodTemplateSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1PodTemplateSpec
v1JobSpecTemplate
      , Key
"ttlSecondsAfterFinished" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1JobSpecTtlSecondsAfterFinished
      ]


-- | Construct a value of type 'V1JobSpec' (by applying it's required fields, if any)
mkV1JobSpec
  :: V1PodTemplateSpec -- ^ 'v1JobSpecTemplate' 
  -> V1JobSpec
mkV1JobSpec :: V1PodTemplateSpec -> V1JobSpec
mkV1JobSpec V1PodTemplateSpec
v1JobSpecTemplate =
  V1JobSpec
  { $sel:v1JobSpecActiveDeadlineSeconds:V1JobSpec :: Maybe Integer
v1JobSpecActiveDeadlineSeconds = Maybe Integer
forall a. Maybe a
Nothing
  , $sel:v1JobSpecBackoffLimit:V1JobSpec :: Maybe Int
v1JobSpecBackoffLimit = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1JobSpecBackoffLimitPerIndex:V1JobSpec :: Maybe Int
v1JobSpecBackoffLimitPerIndex = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1JobSpecCompletionMode:V1JobSpec :: Maybe Text
v1JobSpecCompletionMode = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1JobSpecCompletions:V1JobSpec :: Maybe Int
v1JobSpecCompletions = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1JobSpecManagedBy:V1JobSpec :: Maybe Text
v1JobSpecManagedBy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1JobSpecManualSelector:V1JobSpec :: Maybe Bool
v1JobSpecManualSelector = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1JobSpecMaxFailedIndexes:V1JobSpec :: Maybe Int
v1JobSpecMaxFailedIndexes = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1JobSpecParallelism:V1JobSpec :: Maybe Int
v1JobSpecParallelism = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1JobSpecPodFailurePolicy:V1JobSpec :: Maybe V1PodFailurePolicy
v1JobSpecPodFailurePolicy = Maybe V1PodFailurePolicy
forall a. Maybe a
Nothing
  , $sel:v1JobSpecPodReplacementPolicy:V1JobSpec :: Maybe Text
v1JobSpecPodReplacementPolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1JobSpecSelector:V1JobSpec :: Maybe V1LabelSelector
v1JobSpecSelector = Maybe V1LabelSelector
forall a. Maybe a
Nothing
  , $sel:v1JobSpecSuccessPolicy:V1JobSpec :: Maybe V1SuccessPolicy
v1JobSpecSuccessPolicy = Maybe V1SuccessPolicy
forall a. Maybe a
Nothing
  , $sel:v1JobSpecSuspend:V1JobSpec :: Maybe Bool
v1JobSpecSuspend = Maybe Bool
forall a. Maybe a
Nothing
  , V1PodTemplateSpec
$sel:v1JobSpecTemplate:V1JobSpec :: V1PodTemplateSpec
v1JobSpecTemplate :: V1PodTemplateSpec
v1JobSpecTemplate
  , $sel:v1JobSpecTtlSecondsAfterFinished:V1JobSpec :: Maybe Int
v1JobSpecTtlSecondsAfterFinished = Maybe Int
forall a. Maybe a
Nothing
  }

-- ** V1JobStatus
-- | V1JobStatus
-- JobStatus represents the current state of a Job.
data V1JobStatus = V1JobStatus
  { V1JobStatus -> Maybe Int
v1JobStatusActive :: !(Maybe Int) -- ^ "active" - The number of pending and running pods which are not terminating (without a deletionTimestamp). The value is zero for finished jobs.
  , V1JobStatus -> Maybe Text
v1JobStatusCompletedIndexes :: !(Maybe Text) -- ^ "completedIndexes" - completedIndexes holds the completed indexes when .spec.completionMode &#x3D; \&quot;Indexed\&quot; in a text format. The indexes are represented as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as \&quot;1,3-5,7\&quot;.
  , V1JobStatus -> Maybe DateTime
v1JobStatusCompletionTime :: !(Maybe DateTime) -- ^ "completionTime" - Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is set when the job finishes successfully, and only then. The value cannot be updated or removed. The value indicates the same or later point in time as the startTime field.
  , V1JobStatus -> Maybe [V1JobCondition]
v1JobStatusConditions :: !(Maybe [V1JobCondition]) -- ^ "conditions" - The latest available observations of an object&#39;s current state. When a Job fails, one of the conditions will have type \&quot;Failed\&quot; and status true. When a Job is suspended, one of the conditions will have type \&quot;Suspended\&quot; and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type \&quot;Complete\&quot; and status true.  A job is considered finished when it is in a terminal condition, either \&quot;Complete\&quot; or \&quot;Failed\&quot;. A Job cannot have both the \&quot;Complete\&quot; and \&quot;Failed\&quot; conditions. Additionally, it cannot be in the \&quot;Complete\&quot; and \&quot;FailureTarget\&quot; conditions. The \&quot;Complete\&quot;, \&quot;Failed\&quot; and \&quot;FailureTarget\&quot; conditions cannot be disabled.  More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
  , V1JobStatus -> Maybe Int
v1JobStatusFailed :: !(Maybe Int) -- ^ "failed" - The number of pods which reached phase Failed. The value increases monotonically.
  , V1JobStatus -> Maybe Text
v1JobStatusFailedIndexes :: !(Maybe Text) -- ^ "failedIndexes" - FailedIndexes holds the failed indexes when spec.backoffLimitPerIndex is set. The indexes are represented in the text format analogous as for the &#x60;completedIndexes&#x60; field, ie. they are kept as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the failed indexes are 1, 3, 4, 5 and 7, they are represented as \&quot;1,3-5,7\&quot;. The set of failed indexes cannot overlap with the set of completed indexes.  This field is beta-level. It can be used when the &#x60;JobBackoffLimitPerIndex&#x60; feature gate is enabled (enabled by default).
  , V1JobStatus -> Maybe Int
v1JobStatusReady :: !(Maybe Int) -- ^ "ready" - The number of active pods which have a Ready condition and are not terminating (without a deletionTimestamp).
  , V1JobStatus -> Maybe DateTime
v1JobStatusStartTime :: !(Maybe DateTime) -- ^ "startTime" - Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC.  Once set, the field can only be removed when the job is suspended. The field cannot be modified while the job is unsuspended or finished.
  , V1JobStatus -> Maybe Int
v1JobStatusSucceeded :: !(Maybe Int) -- ^ "succeeded" - The number of pods which reached phase Succeeded. The value increases monotonically for a given spec. However, it may decrease in reaction to scale down of elastic indexed jobs.
  , V1JobStatus -> Maybe Int
v1JobStatusTerminating :: !(Maybe Int) -- ^ "terminating" - The number of pods which are terminating (in phase Pending or Running and have a deletionTimestamp).  This field is beta-level. The job controller populates the field when the feature gate JobPodReplacementPolicy is enabled (enabled by default).
  , V1JobStatus -> Maybe V1UncountedTerminatedPods
v1JobStatusUncountedTerminatedPods :: !(Maybe V1UncountedTerminatedPods) -- ^ "uncountedTerminatedPods"
  } deriving (Int -> V1JobStatus -> ShowS
[V1JobStatus] -> ShowS
V1JobStatus -> String
(Int -> V1JobStatus -> ShowS)
-> (V1JobStatus -> String)
-> ([V1JobStatus] -> ShowS)
-> Show V1JobStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1JobStatus -> ShowS
showsPrec :: Int -> V1JobStatus -> ShowS
$cshow :: V1JobStatus -> String
show :: V1JobStatus -> String
$cshowList :: [V1JobStatus] -> ShowS
showList :: [V1JobStatus] -> ShowS
P.Show, V1JobStatus -> V1JobStatus -> Bool
(V1JobStatus -> V1JobStatus -> Bool)
-> (V1JobStatus -> V1JobStatus -> Bool) -> Eq V1JobStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1JobStatus -> V1JobStatus -> Bool
== :: V1JobStatus -> V1JobStatus -> Bool
$c/= :: V1JobStatus -> V1JobStatus -> Bool
/= :: V1JobStatus -> V1JobStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1JobStatus
instance A.FromJSON V1JobStatus where
  parseJSON :: Value -> Parser V1JobStatus
parseJSON = String
-> (Object -> Parser V1JobStatus) -> Value -> Parser V1JobStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1JobStatus" ((Object -> Parser V1JobStatus) -> Value -> Parser V1JobStatus)
-> (Object -> Parser V1JobStatus) -> Value -> Parser V1JobStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Int
-> Maybe Text
-> Maybe DateTime
-> Maybe [V1JobCondition]
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe DateTime
-> Maybe Int
-> Maybe Int
-> Maybe V1UncountedTerminatedPods
-> V1JobStatus
V1JobStatus
      (Maybe Int
 -> Maybe Text
 -> Maybe DateTime
 -> Maybe [V1JobCondition]
 -> Maybe Int
 -> Maybe Text
 -> Maybe Int
 -> Maybe DateTime
 -> Maybe Int
 -> Maybe Int
 -> Maybe V1UncountedTerminatedPods
 -> V1JobStatus)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe DateTime
      -> Maybe [V1JobCondition]
      -> Maybe Int
      -> Maybe Text
      -> Maybe Int
      -> Maybe DateTime
      -> Maybe Int
      -> Maybe Int
      -> Maybe V1UncountedTerminatedPods
      -> V1JobStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"active")
      Parser
  (Maybe Text
   -> Maybe DateTime
   -> Maybe [V1JobCondition]
   -> Maybe Int
   -> Maybe Text
   -> Maybe Int
   -> Maybe DateTime
   -> Maybe Int
   -> Maybe Int
   -> Maybe V1UncountedTerminatedPods
   -> V1JobStatus)
-> Parser (Maybe Text)
-> Parser
     (Maybe DateTime
      -> Maybe [V1JobCondition]
      -> Maybe Int
      -> Maybe Text
      -> Maybe Int
      -> Maybe DateTime
      -> Maybe Int
      -> Maybe Int
      -> Maybe V1UncountedTerminatedPods
      -> V1JobStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"completedIndexes")
      Parser
  (Maybe DateTime
   -> Maybe [V1JobCondition]
   -> Maybe Int
   -> Maybe Text
   -> Maybe Int
   -> Maybe DateTime
   -> Maybe Int
   -> Maybe Int
   -> Maybe V1UncountedTerminatedPods
   -> V1JobStatus)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe [V1JobCondition]
      -> Maybe Int
      -> Maybe Text
      -> Maybe Int
      -> Maybe DateTime
      -> Maybe Int
      -> Maybe Int
      -> Maybe V1UncountedTerminatedPods
      -> V1JobStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"completionTime")
      Parser
  (Maybe [V1JobCondition]
   -> Maybe Int
   -> Maybe Text
   -> Maybe Int
   -> Maybe DateTime
   -> Maybe Int
   -> Maybe Int
   -> Maybe V1UncountedTerminatedPods
   -> V1JobStatus)
-> Parser (Maybe [V1JobCondition])
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Int
      -> Maybe DateTime
      -> Maybe Int
      -> Maybe Int
      -> Maybe V1UncountedTerminatedPods
      -> V1JobStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1JobCondition])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"conditions")
      Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Int
   -> Maybe DateTime
   -> Maybe Int
   -> Maybe Int
   -> Maybe V1UncountedTerminatedPods
   -> V1JobStatus)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe DateTime
      -> Maybe Int
      -> Maybe Int
      -> Maybe V1UncountedTerminatedPods
      -> V1JobStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"failed")
      Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe DateTime
   -> Maybe Int
   -> Maybe Int
   -> Maybe V1UncountedTerminatedPods
   -> V1JobStatus)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe DateTime
      -> Maybe Int
      -> Maybe Int
      -> Maybe V1UncountedTerminatedPods
      -> V1JobStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"failedIndexes")
      Parser
  (Maybe Int
   -> Maybe DateTime
   -> Maybe Int
   -> Maybe Int
   -> Maybe V1UncountedTerminatedPods
   -> V1JobStatus)
-> Parser (Maybe Int)
-> Parser
     (Maybe DateTime
      -> Maybe Int
      -> Maybe Int
      -> Maybe V1UncountedTerminatedPods
      -> V1JobStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ready")
      Parser
  (Maybe DateTime
   -> Maybe Int
   -> Maybe Int
   -> Maybe V1UncountedTerminatedPods
   -> V1JobStatus)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe Int
      -> Maybe Int -> Maybe V1UncountedTerminatedPods -> V1JobStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"startTime")
      Parser
  (Maybe Int
   -> Maybe Int -> Maybe V1UncountedTerminatedPods -> V1JobStatus)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int -> Maybe V1UncountedTerminatedPods -> V1JobStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"succeeded")
      Parser
  (Maybe Int -> Maybe V1UncountedTerminatedPods -> V1JobStatus)
-> Parser (Maybe Int)
-> Parser (Maybe V1UncountedTerminatedPods -> V1JobStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"terminating")
      Parser (Maybe V1UncountedTerminatedPods -> V1JobStatus)
-> Parser (Maybe V1UncountedTerminatedPods) -> Parser V1JobStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1UncountedTerminatedPods)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"uncountedTerminatedPods")

-- | ToJSON V1JobStatus
instance A.ToJSON V1JobStatus where
  toJSON :: V1JobStatus -> Value
toJSON V1JobStatus {Maybe Int
Maybe [V1JobCondition]
Maybe Text
Maybe DateTime
Maybe V1UncountedTerminatedPods
$sel:v1JobStatusActive:V1JobStatus :: V1JobStatus -> Maybe Int
$sel:v1JobStatusCompletedIndexes:V1JobStatus :: V1JobStatus -> Maybe Text
$sel:v1JobStatusCompletionTime:V1JobStatus :: V1JobStatus -> Maybe DateTime
$sel:v1JobStatusConditions:V1JobStatus :: V1JobStatus -> Maybe [V1JobCondition]
$sel:v1JobStatusFailed:V1JobStatus :: V1JobStatus -> Maybe Int
$sel:v1JobStatusFailedIndexes:V1JobStatus :: V1JobStatus -> Maybe Text
$sel:v1JobStatusReady:V1JobStatus :: V1JobStatus -> Maybe Int
$sel:v1JobStatusStartTime:V1JobStatus :: V1JobStatus -> Maybe DateTime
$sel:v1JobStatusSucceeded:V1JobStatus :: V1JobStatus -> Maybe Int
$sel:v1JobStatusTerminating:V1JobStatus :: V1JobStatus -> Maybe Int
$sel:v1JobStatusUncountedTerminatedPods:V1JobStatus :: V1JobStatus -> Maybe V1UncountedTerminatedPods
v1JobStatusActive :: Maybe Int
v1JobStatusCompletedIndexes :: Maybe Text
v1JobStatusCompletionTime :: Maybe DateTime
v1JobStatusConditions :: Maybe [V1JobCondition]
v1JobStatusFailed :: Maybe Int
v1JobStatusFailedIndexes :: Maybe Text
v1JobStatusReady :: Maybe Int
v1JobStatusStartTime :: Maybe DateTime
v1JobStatusSucceeded :: Maybe Int
v1JobStatusTerminating :: Maybe Int
v1JobStatusUncountedTerminatedPods :: Maybe V1UncountedTerminatedPods
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"active" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1JobStatusActive
      , Key
"completedIndexes" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1JobStatusCompletedIndexes
      , Key
"completionTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1JobStatusCompletionTime
      , Key
"conditions" Key -> Maybe [V1JobCondition] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1JobCondition]
v1JobStatusConditions
      , Key
"failed" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1JobStatusFailed
      , Key
"failedIndexes" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1JobStatusFailedIndexes
      , Key
"ready" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1JobStatusReady
      , Key
"startTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1JobStatusStartTime
      , Key
"succeeded" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1JobStatusSucceeded
      , Key
"terminating" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1JobStatusTerminating
      , Key
"uncountedTerminatedPods" Key -> Maybe V1UncountedTerminatedPods -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1UncountedTerminatedPods
v1JobStatusUncountedTerminatedPods
      ]


-- | Construct a value of type 'V1JobStatus' (by applying it's required fields, if any)
mkV1JobStatus
  :: V1JobStatus
mkV1JobStatus :: V1JobStatus
mkV1JobStatus =
  V1JobStatus
  { $sel:v1JobStatusActive:V1JobStatus :: Maybe Int
v1JobStatusActive = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1JobStatusCompletedIndexes:V1JobStatus :: Maybe Text
v1JobStatusCompletedIndexes = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1JobStatusCompletionTime:V1JobStatus :: Maybe DateTime
v1JobStatusCompletionTime = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1JobStatusConditions:V1JobStatus :: Maybe [V1JobCondition]
v1JobStatusConditions = Maybe [V1JobCondition]
forall a. Maybe a
Nothing
  , $sel:v1JobStatusFailed:V1JobStatus :: Maybe Int
v1JobStatusFailed = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1JobStatusFailedIndexes:V1JobStatus :: Maybe Text
v1JobStatusFailedIndexes = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1JobStatusReady:V1JobStatus :: Maybe Int
v1JobStatusReady = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1JobStatusStartTime:V1JobStatus :: Maybe DateTime
v1JobStatusStartTime = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1JobStatusSucceeded:V1JobStatus :: Maybe Int
v1JobStatusSucceeded = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1JobStatusTerminating:V1JobStatus :: Maybe Int
v1JobStatusTerminating = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1JobStatusUncountedTerminatedPods:V1JobStatus :: Maybe V1UncountedTerminatedPods
v1JobStatusUncountedTerminatedPods = Maybe V1UncountedTerminatedPods
forall a. Maybe a
Nothing
  }

-- ** V1JobTemplateSpec
-- | V1JobTemplateSpec
-- JobTemplateSpec describes the data a Job should have when created from a template
data V1JobTemplateSpec = V1JobTemplateSpec
  { V1JobTemplateSpec -> Maybe V1ObjectMeta
v1JobTemplateSpecMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1JobTemplateSpec -> Maybe V1JobSpec
v1JobTemplateSpecSpec :: !(Maybe V1JobSpec) -- ^ "spec"
  } deriving (Int -> V1JobTemplateSpec -> ShowS
[V1JobTemplateSpec] -> ShowS
V1JobTemplateSpec -> String
(Int -> V1JobTemplateSpec -> ShowS)
-> (V1JobTemplateSpec -> String)
-> ([V1JobTemplateSpec] -> ShowS)
-> Show V1JobTemplateSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1JobTemplateSpec -> ShowS
showsPrec :: Int -> V1JobTemplateSpec -> ShowS
$cshow :: V1JobTemplateSpec -> String
show :: V1JobTemplateSpec -> String
$cshowList :: [V1JobTemplateSpec] -> ShowS
showList :: [V1JobTemplateSpec] -> ShowS
P.Show, V1JobTemplateSpec -> V1JobTemplateSpec -> Bool
(V1JobTemplateSpec -> V1JobTemplateSpec -> Bool)
-> (V1JobTemplateSpec -> V1JobTemplateSpec -> Bool)
-> Eq V1JobTemplateSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1JobTemplateSpec -> V1JobTemplateSpec -> Bool
== :: V1JobTemplateSpec -> V1JobTemplateSpec -> Bool
$c/= :: V1JobTemplateSpec -> V1JobTemplateSpec -> Bool
/= :: V1JobTemplateSpec -> V1JobTemplateSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1JobTemplateSpec
instance A.FromJSON V1JobTemplateSpec where
  parseJSON :: Value -> Parser V1JobTemplateSpec
parseJSON = String
-> (Object -> Parser V1JobTemplateSpec)
-> Value
-> Parser V1JobTemplateSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1JobTemplateSpec" ((Object -> Parser V1JobTemplateSpec)
 -> Value -> Parser V1JobTemplateSpec)
-> (Object -> Parser V1JobTemplateSpec)
-> Value
-> Parser V1JobTemplateSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1ObjectMeta -> Maybe V1JobSpec -> V1JobTemplateSpec
V1JobTemplateSpec
      (Maybe V1ObjectMeta -> Maybe V1JobSpec -> V1JobTemplateSpec)
-> Parser (Maybe V1ObjectMeta)
-> Parser (Maybe V1JobSpec -> V1JobTemplateSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (Maybe V1JobSpec -> V1JobTemplateSpec)
-> Parser (Maybe V1JobSpec) -> Parser V1JobTemplateSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1JobSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")

-- | ToJSON V1JobTemplateSpec
instance A.ToJSON V1JobTemplateSpec where
  toJSON :: V1JobTemplateSpec -> Value
toJSON V1JobTemplateSpec {Maybe V1ObjectMeta
Maybe V1JobSpec
$sel:v1JobTemplateSpecMetadata:V1JobTemplateSpec :: V1JobTemplateSpec -> Maybe V1ObjectMeta
$sel:v1JobTemplateSpecSpec:V1JobTemplateSpec :: V1JobTemplateSpec -> Maybe V1JobSpec
v1JobTemplateSpecMetadata :: Maybe V1ObjectMeta
v1JobTemplateSpecSpec :: Maybe V1JobSpec
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1JobTemplateSpecMetadata
      , Key
"spec" Key -> Maybe V1JobSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1JobSpec
v1JobTemplateSpecSpec
      ]


-- | Construct a value of type 'V1JobTemplateSpec' (by applying it's required fields, if any)
mkV1JobTemplateSpec
  :: V1JobTemplateSpec
mkV1JobTemplateSpec :: V1JobTemplateSpec
mkV1JobTemplateSpec =
  V1JobTemplateSpec
  { $sel:v1JobTemplateSpecMetadata:V1JobTemplateSpec :: Maybe V1ObjectMeta
v1JobTemplateSpecMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1JobTemplateSpecSpec:V1JobTemplateSpec :: Maybe V1JobSpec
v1JobTemplateSpecSpec = Maybe V1JobSpec
forall a. Maybe a
Nothing
  }

-- ** V1KeyToPath
-- | V1KeyToPath
-- Maps a string key to a path within a volume.
data V1KeyToPath = V1KeyToPath
  { V1KeyToPath -> Text
v1KeyToPathKey :: !(Text) -- ^ /Required/ "key" - key is the key to project.
  , V1KeyToPath -> Maybe Int
v1KeyToPathMode :: !(Maybe Int) -- ^ "mode" - mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
  , V1KeyToPath -> Text
v1KeyToPathPath :: !(Text) -- ^ /Required/ "path" - path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element &#39;..&#39;. May not start with the string &#39;..&#39;.
  } deriving (Int -> V1KeyToPath -> ShowS
[V1KeyToPath] -> ShowS
V1KeyToPath -> String
(Int -> V1KeyToPath -> ShowS)
-> (V1KeyToPath -> String)
-> ([V1KeyToPath] -> ShowS)
-> Show V1KeyToPath
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1KeyToPath -> ShowS
showsPrec :: Int -> V1KeyToPath -> ShowS
$cshow :: V1KeyToPath -> String
show :: V1KeyToPath -> String
$cshowList :: [V1KeyToPath] -> ShowS
showList :: [V1KeyToPath] -> ShowS
P.Show, V1KeyToPath -> V1KeyToPath -> Bool
(V1KeyToPath -> V1KeyToPath -> Bool)
-> (V1KeyToPath -> V1KeyToPath -> Bool) -> Eq V1KeyToPath
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1KeyToPath -> V1KeyToPath -> Bool
== :: V1KeyToPath -> V1KeyToPath -> Bool
$c/= :: V1KeyToPath -> V1KeyToPath -> Bool
/= :: V1KeyToPath -> V1KeyToPath -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1KeyToPath
instance A.FromJSON V1KeyToPath where
  parseJSON :: Value -> Parser V1KeyToPath
parseJSON = String
-> (Object -> Parser V1KeyToPath) -> Value -> Parser V1KeyToPath
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1KeyToPath" ((Object -> Parser V1KeyToPath) -> Value -> Parser V1KeyToPath)
-> (Object -> Parser V1KeyToPath) -> Value -> Parser V1KeyToPath
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Maybe Int -> Text -> V1KeyToPath
V1KeyToPath
      (Text -> Maybe Int -> Text -> V1KeyToPath)
-> Parser Text -> Parser (Maybe Int -> Text -> V1KeyToPath)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"key")
      Parser (Maybe Int -> Text -> V1KeyToPath)
-> Parser (Maybe Int) -> Parser (Text -> V1KeyToPath)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"mode")
      Parser (Text -> V1KeyToPath) -> Parser Text -> Parser V1KeyToPath
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"path")

-- | ToJSON V1KeyToPath
instance A.ToJSON V1KeyToPath where
  toJSON :: V1KeyToPath -> Value
toJSON V1KeyToPath {Maybe Int
Text
$sel:v1KeyToPathKey:V1KeyToPath :: V1KeyToPath -> Text
$sel:v1KeyToPathMode:V1KeyToPath :: V1KeyToPath -> Maybe Int
$sel:v1KeyToPathPath:V1KeyToPath :: V1KeyToPath -> Text
v1KeyToPathKey :: Text
v1KeyToPathMode :: Maybe Int
v1KeyToPathPath :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"key" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1KeyToPathKey
      , Key
"mode" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1KeyToPathMode
      , Key
"path" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1KeyToPathPath
      ]


-- | Construct a value of type 'V1KeyToPath' (by applying it's required fields, if any)
mkV1KeyToPath
  :: Text -- ^ 'v1KeyToPathKey': key is the key to project.
  -> Text -- ^ 'v1KeyToPathPath': path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.
  -> V1KeyToPath
mkV1KeyToPath :: Text -> Text -> V1KeyToPath
mkV1KeyToPath Text
v1KeyToPathKey Text
v1KeyToPathPath =
  V1KeyToPath
  { Text
$sel:v1KeyToPathKey:V1KeyToPath :: Text
v1KeyToPathKey :: Text
v1KeyToPathKey
  , $sel:v1KeyToPathMode:V1KeyToPath :: Maybe Int
v1KeyToPathMode = Maybe Int
forall a. Maybe a
Nothing
  , Text
$sel:v1KeyToPathPath:V1KeyToPath :: Text
v1KeyToPathPath :: Text
v1KeyToPathPath
  }

-- ** V1LabelSelector
-- | V1LabelSelector
-- A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
data V1LabelSelector = V1LabelSelector
  { V1LabelSelector -> Maybe [V1LabelSelectorRequirement]
v1LabelSelectorMatchExpressions :: !(Maybe [V1LabelSelectorRequirement]) -- ^ "matchExpressions" - matchExpressions is a list of label selector requirements. The requirements are ANDed.
  , V1LabelSelector -> Maybe (Map String Text)
v1LabelSelectorMatchLabels :: !(Maybe (Map.Map String Text)) -- ^ "matchLabels" - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \&quot;key\&quot;, the operator is \&quot;In\&quot;, and the values array contains only \&quot;value\&quot;. The requirements are ANDed.
  } deriving (Int -> V1LabelSelector -> ShowS
[V1LabelSelector] -> ShowS
V1LabelSelector -> String
(Int -> V1LabelSelector -> ShowS)
-> (V1LabelSelector -> String)
-> ([V1LabelSelector] -> ShowS)
-> Show V1LabelSelector
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1LabelSelector -> ShowS
showsPrec :: Int -> V1LabelSelector -> ShowS
$cshow :: V1LabelSelector -> String
show :: V1LabelSelector -> String
$cshowList :: [V1LabelSelector] -> ShowS
showList :: [V1LabelSelector] -> ShowS
P.Show, V1LabelSelector -> V1LabelSelector -> Bool
(V1LabelSelector -> V1LabelSelector -> Bool)
-> (V1LabelSelector -> V1LabelSelector -> Bool)
-> Eq V1LabelSelector
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1LabelSelector -> V1LabelSelector -> Bool
== :: V1LabelSelector -> V1LabelSelector -> Bool
$c/= :: V1LabelSelector -> V1LabelSelector -> Bool
/= :: V1LabelSelector -> V1LabelSelector -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1LabelSelector
instance A.FromJSON V1LabelSelector where
  parseJSON :: Value -> Parser V1LabelSelector
parseJSON = String
-> (Object -> Parser V1LabelSelector)
-> Value
-> Parser V1LabelSelector
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1LabelSelector" ((Object -> Parser V1LabelSelector)
 -> Value -> Parser V1LabelSelector)
-> (Object -> Parser V1LabelSelector)
-> Value
-> Parser V1LabelSelector
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1LabelSelectorRequirement]
-> Maybe (Map String Text) -> V1LabelSelector
V1LabelSelector
      (Maybe [V1LabelSelectorRequirement]
 -> Maybe (Map String Text) -> V1LabelSelector)
-> Parser (Maybe [V1LabelSelectorRequirement])
-> Parser (Maybe (Map String Text) -> V1LabelSelector)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1LabelSelectorRequirement])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"matchExpressions")
      Parser (Maybe (Map String Text) -> V1LabelSelector)
-> Parser (Maybe (Map String Text)) -> Parser V1LabelSelector
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String Text))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"matchLabels")

-- | ToJSON V1LabelSelector
instance A.ToJSON V1LabelSelector where
  toJSON :: V1LabelSelector -> Value
toJSON V1LabelSelector {Maybe [V1LabelSelectorRequirement]
Maybe (Map String Text)
$sel:v1LabelSelectorMatchExpressions:V1LabelSelector :: V1LabelSelector -> Maybe [V1LabelSelectorRequirement]
$sel:v1LabelSelectorMatchLabels:V1LabelSelector :: V1LabelSelector -> Maybe (Map String Text)
v1LabelSelectorMatchExpressions :: Maybe [V1LabelSelectorRequirement]
v1LabelSelectorMatchLabels :: Maybe (Map String Text)
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"matchExpressions" Key -> Maybe [V1LabelSelectorRequirement] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1LabelSelectorRequirement]
v1LabelSelectorMatchExpressions
      , Key
"matchLabels" Key -> Maybe (Map String Text) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Text)
v1LabelSelectorMatchLabels
      ]


-- | Construct a value of type 'V1LabelSelector' (by applying it's required fields, if any)
mkV1LabelSelector
  :: V1LabelSelector
mkV1LabelSelector :: V1LabelSelector
mkV1LabelSelector =
  V1LabelSelector
  { $sel:v1LabelSelectorMatchExpressions:V1LabelSelector :: Maybe [V1LabelSelectorRequirement]
v1LabelSelectorMatchExpressions = Maybe [V1LabelSelectorRequirement]
forall a. Maybe a
Nothing
  , $sel:v1LabelSelectorMatchLabels:V1LabelSelector :: Maybe (Map String Text)
v1LabelSelectorMatchLabels = Maybe (Map String Text)
forall a. Maybe a
Nothing
  }

-- ** V1LabelSelectorAttributes
-- | V1LabelSelectorAttributes
-- LabelSelectorAttributes indicates a label limited access. Webhook authors are encouraged to * ensure rawSelector and requirements are not both set * consider the requirements field if set * not try to parse or consider the rawSelector field if set. This is to avoid another CVE-2022-2880 (i.e. getting different systems to agree on how exactly to parse a query is not something we want), see https://www.oxeye.io/resources/golang-parameter-smuggling-attack for more details. For the *SubjectAccessReview endpoints of the kube-apiserver: * If rawSelector is empty and requirements are empty, the request is not limited. * If rawSelector is present and requirements are empty, the rawSelector will be parsed and limited if the parsing succeeds. * If rawSelector is empty and requirements are present, the requirements should be honored * If rawSelector is present and requirements are present, the request is invalid.
data V1LabelSelectorAttributes = V1LabelSelectorAttributes
  { V1LabelSelectorAttributes -> Maybe Text
v1LabelSelectorAttributesRawSelector :: !(Maybe Text) -- ^ "rawSelector" - rawSelector is the serialization of a field selector that would be included in a query parameter. Webhook implementations are encouraged to ignore rawSelector. The kube-apiserver&#39;s *SubjectAccessReview will parse the rawSelector as long as the requirements are not present.
  , V1LabelSelectorAttributes -> Maybe [V1LabelSelectorRequirement]
v1LabelSelectorAttributesRequirements :: !(Maybe [V1LabelSelectorRequirement]) -- ^ "requirements" - requirements is the parsed interpretation of a label selector. All requirements must be met for a resource instance to match the selector. Webhook implementations should handle requirements, but how to handle them is up to the webhook. Since requirements can only limit the request, it is safe to authorize as unlimited request if the requirements are not understood.
  } deriving (Int -> V1LabelSelectorAttributes -> ShowS
[V1LabelSelectorAttributes] -> ShowS
V1LabelSelectorAttributes -> String
(Int -> V1LabelSelectorAttributes -> ShowS)
-> (V1LabelSelectorAttributes -> String)
-> ([V1LabelSelectorAttributes] -> ShowS)
-> Show V1LabelSelectorAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1LabelSelectorAttributes -> ShowS
showsPrec :: Int -> V1LabelSelectorAttributes -> ShowS
$cshow :: V1LabelSelectorAttributes -> String
show :: V1LabelSelectorAttributes -> String
$cshowList :: [V1LabelSelectorAttributes] -> ShowS
showList :: [V1LabelSelectorAttributes] -> ShowS
P.Show, V1LabelSelectorAttributes -> V1LabelSelectorAttributes -> Bool
(V1LabelSelectorAttributes -> V1LabelSelectorAttributes -> Bool)
-> (V1LabelSelectorAttributes -> V1LabelSelectorAttributes -> Bool)
-> Eq V1LabelSelectorAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1LabelSelectorAttributes -> V1LabelSelectorAttributes -> Bool
== :: V1LabelSelectorAttributes -> V1LabelSelectorAttributes -> Bool
$c/= :: V1LabelSelectorAttributes -> V1LabelSelectorAttributes -> Bool
/= :: V1LabelSelectorAttributes -> V1LabelSelectorAttributes -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1LabelSelectorAttributes
instance A.FromJSON V1LabelSelectorAttributes where
  parseJSON :: Value -> Parser V1LabelSelectorAttributes
parseJSON = String
-> (Object -> Parser V1LabelSelectorAttributes)
-> Value
-> Parser V1LabelSelectorAttributes
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1LabelSelectorAttributes" ((Object -> Parser V1LabelSelectorAttributes)
 -> Value -> Parser V1LabelSelectorAttributes)
-> (Object -> Parser V1LabelSelectorAttributes)
-> Value
-> Parser V1LabelSelectorAttributes
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe [V1LabelSelectorRequirement] -> V1LabelSelectorAttributes
V1LabelSelectorAttributes
      (Maybe Text
 -> Maybe [V1LabelSelectorRequirement] -> V1LabelSelectorAttributes)
-> Parser (Maybe Text)
-> Parser
     (Maybe [V1LabelSelectorRequirement] -> V1LabelSelectorAttributes)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"rawSelector")
      Parser
  (Maybe [V1LabelSelectorRequirement] -> V1LabelSelectorAttributes)
-> Parser (Maybe [V1LabelSelectorRequirement])
-> Parser V1LabelSelectorAttributes
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1LabelSelectorRequirement])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"requirements")

-- | ToJSON V1LabelSelectorAttributes
instance A.ToJSON V1LabelSelectorAttributes where
  toJSON :: V1LabelSelectorAttributes -> Value
toJSON V1LabelSelectorAttributes {Maybe [V1LabelSelectorRequirement]
Maybe Text
$sel:v1LabelSelectorAttributesRawSelector:V1LabelSelectorAttributes :: V1LabelSelectorAttributes -> Maybe Text
$sel:v1LabelSelectorAttributesRequirements:V1LabelSelectorAttributes :: V1LabelSelectorAttributes -> Maybe [V1LabelSelectorRequirement]
v1LabelSelectorAttributesRawSelector :: Maybe Text
v1LabelSelectorAttributesRequirements :: Maybe [V1LabelSelectorRequirement]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"rawSelector" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1LabelSelectorAttributesRawSelector
      , Key
"requirements" Key -> Maybe [V1LabelSelectorRequirement] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1LabelSelectorRequirement]
v1LabelSelectorAttributesRequirements
      ]


-- | Construct a value of type 'V1LabelSelectorAttributes' (by applying it's required fields, if any)
mkV1LabelSelectorAttributes
  :: V1LabelSelectorAttributes
mkV1LabelSelectorAttributes :: V1LabelSelectorAttributes
mkV1LabelSelectorAttributes =
  V1LabelSelectorAttributes
  { $sel:v1LabelSelectorAttributesRawSelector:V1LabelSelectorAttributes :: Maybe Text
v1LabelSelectorAttributesRawSelector = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1LabelSelectorAttributesRequirements:V1LabelSelectorAttributes :: Maybe [V1LabelSelectorRequirement]
v1LabelSelectorAttributesRequirements = Maybe [V1LabelSelectorRequirement]
forall a. Maybe a
Nothing
  }

-- ** V1LabelSelectorRequirement
-- | V1LabelSelectorRequirement
-- A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
data V1LabelSelectorRequirement = V1LabelSelectorRequirement
  { V1LabelSelectorRequirement -> Text
v1LabelSelectorRequirementKey :: !(Text) -- ^ /Required/ "key" - key is the label key that the selector applies to.
  , V1LabelSelectorRequirement -> Text
v1LabelSelectorRequirementOperator :: !(Text) -- ^ /Required/ "operator" - operator represents a key&#39;s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
  , V1LabelSelectorRequirement -> Maybe [Text]
v1LabelSelectorRequirementValues :: !(Maybe [Text]) -- ^ "values" - values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
  } deriving (Int -> V1LabelSelectorRequirement -> ShowS
[V1LabelSelectorRequirement] -> ShowS
V1LabelSelectorRequirement -> String
(Int -> V1LabelSelectorRequirement -> ShowS)
-> (V1LabelSelectorRequirement -> String)
-> ([V1LabelSelectorRequirement] -> ShowS)
-> Show V1LabelSelectorRequirement
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1LabelSelectorRequirement -> ShowS
showsPrec :: Int -> V1LabelSelectorRequirement -> ShowS
$cshow :: V1LabelSelectorRequirement -> String
show :: V1LabelSelectorRequirement -> String
$cshowList :: [V1LabelSelectorRequirement] -> ShowS
showList :: [V1LabelSelectorRequirement] -> ShowS
P.Show, V1LabelSelectorRequirement -> V1LabelSelectorRequirement -> Bool
(V1LabelSelectorRequirement -> V1LabelSelectorRequirement -> Bool)
-> (V1LabelSelectorRequirement
    -> V1LabelSelectorRequirement -> Bool)
-> Eq V1LabelSelectorRequirement
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1LabelSelectorRequirement -> V1LabelSelectorRequirement -> Bool
== :: V1LabelSelectorRequirement -> V1LabelSelectorRequirement -> Bool
$c/= :: V1LabelSelectorRequirement -> V1LabelSelectorRequirement -> Bool
/= :: V1LabelSelectorRequirement -> V1LabelSelectorRequirement -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1LabelSelectorRequirement
instance A.FromJSON V1LabelSelectorRequirement where
  parseJSON :: Value -> Parser V1LabelSelectorRequirement
parseJSON = String
-> (Object -> Parser V1LabelSelectorRequirement)
-> Value
-> Parser V1LabelSelectorRequirement
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1LabelSelectorRequirement" ((Object -> Parser V1LabelSelectorRequirement)
 -> Value -> Parser V1LabelSelectorRequirement)
-> (Object -> Parser V1LabelSelectorRequirement)
-> Value
-> Parser V1LabelSelectorRequirement
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Text -> Maybe [Text] -> V1LabelSelectorRequirement
V1LabelSelectorRequirement
      (Text -> Text -> Maybe [Text] -> V1LabelSelectorRequirement)
-> Parser Text
-> Parser (Text -> Maybe [Text] -> V1LabelSelectorRequirement)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"key")
      Parser (Text -> Maybe [Text] -> V1LabelSelectorRequirement)
-> Parser Text
-> Parser (Maybe [Text] -> V1LabelSelectorRequirement)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"operator")
      Parser (Maybe [Text] -> V1LabelSelectorRequirement)
-> Parser (Maybe [Text]) -> Parser V1LabelSelectorRequirement
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"values")

-- | ToJSON V1LabelSelectorRequirement
instance A.ToJSON V1LabelSelectorRequirement where
  toJSON :: V1LabelSelectorRequirement -> Value
toJSON V1LabelSelectorRequirement {Maybe [Text]
Text
$sel:v1LabelSelectorRequirementKey:V1LabelSelectorRequirement :: V1LabelSelectorRequirement -> Text
$sel:v1LabelSelectorRequirementOperator:V1LabelSelectorRequirement :: V1LabelSelectorRequirement -> Text
$sel:v1LabelSelectorRequirementValues:V1LabelSelectorRequirement :: V1LabelSelectorRequirement -> Maybe [Text]
v1LabelSelectorRequirementKey :: Text
v1LabelSelectorRequirementOperator :: Text
v1LabelSelectorRequirementValues :: Maybe [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"key" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1LabelSelectorRequirementKey
      , Key
"operator" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1LabelSelectorRequirementOperator
      , Key
"values" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1LabelSelectorRequirementValues
      ]


-- | Construct a value of type 'V1LabelSelectorRequirement' (by applying it's required fields, if any)
mkV1LabelSelectorRequirement
  :: Text -- ^ 'v1LabelSelectorRequirementKey': key is the label key that the selector applies to.
  -> Text -- ^ 'v1LabelSelectorRequirementOperator': operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
  -> V1LabelSelectorRequirement
mkV1LabelSelectorRequirement :: Text -> Text -> V1LabelSelectorRequirement
mkV1LabelSelectorRequirement Text
v1LabelSelectorRequirementKey Text
v1LabelSelectorRequirementOperator =
  V1LabelSelectorRequirement
  { Text
$sel:v1LabelSelectorRequirementKey:V1LabelSelectorRequirement :: Text
v1LabelSelectorRequirementKey :: Text
v1LabelSelectorRequirementKey
  , Text
$sel:v1LabelSelectorRequirementOperator:V1LabelSelectorRequirement :: Text
v1LabelSelectorRequirementOperator :: Text
v1LabelSelectorRequirementOperator
  , $sel:v1LabelSelectorRequirementValues:V1LabelSelectorRequirement :: Maybe [Text]
v1LabelSelectorRequirementValues = Maybe [Text]
forall a. Maybe a
Nothing
  }

-- ** V1Lease
-- | V1Lease
-- Lease defines a lease concept.
data V1Lease = V1Lease
  { V1Lease -> Maybe Text
v1LeaseApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1Lease -> Maybe Text
v1LeaseKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1Lease -> Maybe V1ObjectMeta
v1LeaseMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1Lease -> Maybe V1LeaseSpec
v1LeaseSpec :: !(Maybe V1LeaseSpec) -- ^ "spec"
  } deriving (Int -> V1Lease -> ShowS
[V1Lease] -> ShowS
V1Lease -> String
(Int -> V1Lease -> ShowS)
-> (V1Lease -> String) -> ([V1Lease] -> ShowS) -> Show V1Lease
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1Lease -> ShowS
showsPrec :: Int -> V1Lease -> ShowS
$cshow :: V1Lease -> String
show :: V1Lease -> String
$cshowList :: [V1Lease] -> ShowS
showList :: [V1Lease] -> ShowS
P.Show, V1Lease -> V1Lease -> Bool
(V1Lease -> V1Lease -> Bool)
-> (V1Lease -> V1Lease -> Bool) -> Eq V1Lease
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1Lease -> V1Lease -> Bool
== :: V1Lease -> V1Lease -> Bool
$c/= :: V1Lease -> V1Lease -> Bool
/= :: V1Lease -> V1Lease -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1Lease
instance A.FromJSON V1Lease where
  parseJSON :: Value -> Parser V1Lease
parseJSON = String -> (Object -> Parser V1Lease) -> Value -> Parser V1Lease
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1Lease" ((Object -> Parser V1Lease) -> Value -> Parser V1Lease)
-> (Object -> Parser V1Lease) -> Value -> Parser V1Lease
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text -> Maybe V1ObjectMeta -> Maybe V1LeaseSpec -> V1Lease
V1Lease
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1LeaseSpec
 -> V1Lease)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe V1ObjectMeta -> Maybe V1LeaseSpec -> V1Lease)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text -> Maybe V1ObjectMeta -> Maybe V1LeaseSpec -> V1Lease)
-> Parser (Maybe Text)
-> Parser (Maybe V1ObjectMeta -> Maybe V1LeaseSpec -> V1Lease)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ObjectMeta -> Maybe V1LeaseSpec -> V1Lease)
-> Parser (Maybe V1ObjectMeta)
-> Parser (Maybe V1LeaseSpec -> V1Lease)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (Maybe V1LeaseSpec -> V1Lease)
-> Parser (Maybe V1LeaseSpec) -> Parser V1Lease
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LeaseSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")

-- | ToJSON V1Lease
instance A.ToJSON V1Lease where
  toJSON :: V1Lease -> Value
toJSON V1Lease {Maybe Text
Maybe V1ObjectMeta
Maybe V1LeaseSpec
$sel:v1LeaseApiVersion:V1Lease :: V1Lease -> Maybe Text
$sel:v1LeaseKind:V1Lease :: V1Lease -> Maybe Text
$sel:v1LeaseMetadata:V1Lease :: V1Lease -> Maybe V1ObjectMeta
$sel:v1LeaseSpec:V1Lease :: V1Lease -> Maybe V1LeaseSpec
v1LeaseApiVersion :: Maybe Text
v1LeaseKind :: Maybe Text
v1LeaseMetadata :: Maybe V1ObjectMeta
v1LeaseSpec :: Maybe V1LeaseSpec
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1LeaseApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1LeaseKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1LeaseMetadata
      , Key
"spec" Key -> Maybe V1LeaseSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LeaseSpec
v1LeaseSpec
      ]


-- | Construct a value of type 'V1Lease' (by applying it's required fields, if any)
mkV1Lease
  :: V1Lease
mkV1Lease :: V1Lease
mkV1Lease =
  V1Lease
  { $sel:v1LeaseApiVersion:V1Lease :: Maybe Text
v1LeaseApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1LeaseKind:V1Lease :: Maybe Text
v1LeaseKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1LeaseMetadata:V1Lease :: Maybe V1ObjectMeta
v1LeaseMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1LeaseSpec:V1Lease :: Maybe V1LeaseSpec
v1LeaseSpec = Maybe V1LeaseSpec
forall a. Maybe a
Nothing
  }

-- ** V1LeaseList
-- | V1LeaseList
-- LeaseList is a list of Lease objects.
data V1LeaseList = V1LeaseList
  { V1LeaseList -> Maybe Text
v1LeaseListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1LeaseList -> [V1Lease]
v1LeaseListItems :: !([V1Lease]) -- ^ /Required/ "items" - items is a list of schema objects.
  , V1LeaseList -> Maybe Text
v1LeaseListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1LeaseList -> Maybe V1ListMeta
v1LeaseListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1LeaseList -> ShowS
[V1LeaseList] -> ShowS
V1LeaseList -> String
(Int -> V1LeaseList -> ShowS)
-> (V1LeaseList -> String)
-> ([V1LeaseList] -> ShowS)
-> Show V1LeaseList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1LeaseList -> ShowS
showsPrec :: Int -> V1LeaseList -> ShowS
$cshow :: V1LeaseList -> String
show :: V1LeaseList -> String
$cshowList :: [V1LeaseList] -> ShowS
showList :: [V1LeaseList] -> ShowS
P.Show, V1LeaseList -> V1LeaseList -> Bool
(V1LeaseList -> V1LeaseList -> Bool)
-> (V1LeaseList -> V1LeaseList -> Bool) -> Eq V1LeaseList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1LeaseList -> V1LeaseList -> Bool
== :: V1LeaseList -> V1LeaseList -> Bool
$c/= :: V1LeaseList -> V1LeaseList -> Bool
/= :: V1LeaseList -> V1LeaseList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1LeaseList
instance A.FromJSON V1LeaseList where
  parseJSON :: Value -> Parser V1LeaseList
parseJSON = String
-> (Object -> Parser V1LeaseList) -> Value -> Parser V1LeaseList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1LeaseList" ((Object -> Parser V1LeaseList) -> Value -> Parser V1LeaseList)
-> (Object -> Parser V1LeaseList) -> Value -> Parser V1LeaseList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1Lease] -> Maybe Text -> Maybe V1ListMeta -> V1LeaseList
V1LeaseList
      (Maybe Text
 -> [V1Lease] -> Maybe Text -> Maybe V1ListMeta -> V1LeaseList)
-> Parser (Maybe Text)
-> Parser
     ([V1Lease] -> Maybe Text -> Maybe V1ListMeta -> V1LeaseList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser ([V1Lease] -> Maybe Text -> Maybe V1ListMeta -> V1LeaseList)
-> Parser [V1Lease]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1LeaseList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1Lease]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1LeaseList)
-> Parser (Maybe Text) -> Parser (Maybe V1ListMeta -> V1LeaseList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1LeaseList)
-> Parser (Maybe V1ListMeta) -> Parser V1LeaseList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1LeaseList
instance A.ToJSON V1LeaseList where
  toJSON :: V1LeaseList -> Value
toJSON V1LeaseList {[V1Lease]
Maybe Text
Maybe V1ListMeta
$sel:v1LeaseListApiVersion:V1LeaseList :: V1LeaseList -> Maybe Text
$sel:v1LeaseListItems:V1LeaseList :: V1LeaseList -> [V1Lease]
$sel:v1LeaseListKind:V1LeaseList :: V1LeaseList -> Maybe Text
$sel:v1LeaseListMetadata:V1LeaseList :: V1LeaseList -> Maybe V1ListMeta
v1LeaseListApiVersion :: Maybe Text
v1LeaseListItems :: [V1Lease]
v1LeaseListKind :: Maybe Text
v1LeaseListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1LeaseListApiVersion
      , Key
"items" Key -> [V1Lease] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1Lease]
v1LeaseListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1LeaseListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1LeaseListMetadata
      ]


-- | Construct a value of type 'V1LeaseList' (by applying it's required fields, if any)
mkV1LeaseList
  :: [V1Lease] -- ^ 'v1LeaseListItems': items is a list of schema objects.
  -> V1LeaseList
mkV1LeaseList :: [V1Lease] -> V1LeaseList
mkV1LeaseList [V1Lease]
v1LeaseListItems =
  V1LeaseList
  { $sel:v1LeaseListApiVersion:V1LeaseList :: Maybe Text
v1LeaseListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1Lease]
$sel:v1LeaseListItems:V1LeaseList :: [V1Lease]
v1LeaseListItems :: [V1Lease]
v1LeaseListItems
  , $sel:v1LeaseListKind:V1LeaseList :: Maybe Text
v1LeaseListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1LeaseListMetadata:V1LeaseList :: Maybe V1ListMeta
v1LeaseListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1LeaseSpec
-- | V1LeaseSpec
-- LeaseSpec is a specification of a Lease.
data V1LeaseSpec = V1LeaseSpec
  { V1LeaseSpec -> Maybe DateTime
v1LeaseSpecAcquireTime :: !(Maybe DateTime) -- ^ "acquireTime" - acquireTime is a time when the current lease was acquired.
  , V1LeaseSpec -> Maybe Text
v1LeaseSpecHolderIdentity :: !(Maybe Text) -- ^ "holderIdentity" - holderIdentity contains the identity of the holder of a current lease. If Coordinated Leader Election is used, the holder identity must be equal to the elected LeaseCandidate.metadata.name field.
  , V1LeaseSpec -> Maybe Int
v1LeaseSpecLeaseDurationSeconds :: !(Maybe Int) -- ^ "leaseDurationSeconds" - leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measured against the time of last observed renewTime.
  , V1LeaseSpec -> Maybe Int
v1LeaseSpecLeaseTransitions :: !(Maybe Int) -- ^ "leaseTransitions" - leaseTransitions is the number of transitions of a lease between holders.
  , V1LeaseSpec -> Maybe Text
v1LeaseSpecPreferredHolder :: !(Maybe Text) -- ^ "preferredHolder" - PreferredHolder signals to a lease holder that the lease has a more optimal holder and should be given up. This field can only be set if Strategy is also set.
  , V1LeaseSpec -> Maybe DateTime
v1LeaseSpecRenewTime :: !(Maybe DateTime) -- ^ "renewTime" - renewTime is a time when the current holder of a lease has last updated the lease.
  , V1LeaseSpec -> Maybe Text
v1LeaseSpecStrategy :: !(Maybe Text) -- ^ "strategy" - Strategy indicates the strategy for picking the leader for coordinated leader election. If the field is not specified, there is no active coordination for this lease. (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.
  } deriving (Int -> V1LeaseSpec -> ShowS
[V1LeaseSpec] -> ShowS
V1LeaseSpec -> String
(Int -> V1LeaseSpec -> ShowS)
-> (V1LeaseSpec -> String)
-> ([V1LeaseSpec] -> ShowS)
-> Show V1LeaseSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1LeaseSpec -> ShowS
showsPrec :: Int -> V1LeaseSpec -> ShowS
$cshow :: V1LeaseSpec -> String
show :: V1LeaseSpec -> String
$cshowList :: [V1LeaseSpec] -> ShowS
showList :: [V1LeaseSpec] -> ShowS
P.Show, V1LeaseSpec -> V1LeaseSpec -> Bool
(V1LeaseSpec -> V1LeaseSpec -> Bool)
-> (V1LeaseSpec -> V1LeaseSpec -> Bool) -> Eq V1LeaseSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1LeaseSpec -> V1LeaseSpec -> Bool
== :: V1LeaseSpec -> V1LeaseSpec -> Bool
$c/= :: V1LeaseSpec -> V1LeaseSpec -> Bool
/= :: V1LeaseSpec -> V1LeaseSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1LeaseSpec
instance A.FromJSON V1LeaseSpec where
  parseJSON :: Value -> Parser V1LeaseSpec
parseJSON = String
-> (Object -> Parser V1LeaseSpec) -> Value -> Parser V1LeaseSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1LeaseSpec" ((Object -> Parser V1LeaseSpec) -> Value -> Parser V1LeaseSpec)
-> (Object -> Parser V1LeaseSpec) -> Value -> Parser V1LeaseSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe DateTime
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> V1LeaseSpec
V1LeaseSpec
      (Maybe DateTime
 -> Maybe Text
 -> Maybe Int
 -> Maybe Int
 -> Maybe Text
 -> Maybe DateTime
 -> Maybe Text
 -> V1LeaseSpec)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe DateTime
      -> Maybe Text
      -> V1LeaseSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"acquireTime")
      Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe DateTime
   -> Maybe Text
   -> V1LeaseSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe DateTime
      -> Maybe Text
      -> V1LeaseSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"holderIdentity")
      Parser
  (Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe DateTime
   -> Maybe Text
   -> V1LeaseSpec)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe Text -> Maybe DateTime -> Maybe Text -> V1LeaseSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"leaseDurationSeconds")
      Parser
  (Maybe Int
   -> Maybe Text -> Maybe DateTime -> Maybe Text -> V1LeaseSpec)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text -> Maybe DateTime -> Maybe Text -> V1LeaseSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"leaseTransitions")
      Parser (Maybe Text -> Maybe DateTime -> Maybe Text -> V1LeaseSpec)
-> Parser (Maybe Text)
-> Parser (Maybe DateTime -> Maybe Text -> V1LeaseSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"preferredHolder")
      Parser (Maybe DateTime -> Maybe Text -> V1LeaseSpec)
-> Parser (Maybe DateTime) -> Parser (Maybe Text -> V1LeaseSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"renewTime")
      Parser (Maybe Text -> V1LeaseSpec)
-> Parser (Maybe Text) -> Parser V1LeaseSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"strategy")

-- | ToJSON V1LeaseSpec
instance A.ToJSON V1LeaseSpec where
  toJSON :: V1LeaseSpec -> Value
toJSON V1LeaseSpec {Maybe Int
Maybe Text
Maybe DateTime
$sel:v1LeaseSpecAcquireTime:V1LeaseSpec :: V1LeaseSpec -> Maybe DateTime
$sel:v1LeaseSpecHolderIdentity:V1LeaseSpec :: V1LeaseSpec -> Maybe Text
$sel:v1LeaseSpecLeaseDurationSeconds:V1LeaseSpec :: V1LeaseSpec -> Maybe Int
$sel:v1LeaseSpecLeaseTransitions:V1LeaseSpec :: V1LeaseSpec -> Maybe Int
$sel:v1LeaseSpecPreferredHolder:V1LeaseSpec :: V1LeaseSpec -> Maybe Text
$sel:v1LeaseSpecRenewTime:V1LeaseSpec :: V1LeaseSpec -> Maybe DateTime
$sel:v1LeaseSpecStrategy:V1LeaseSpec :: V1LeaseSpec -> Maybe Text
v1LeaseSpecAcquireTime :: Maybe DateTime
v1LeaseSpecHolderIdentity :: Maybe Text
v1LeaseSpecLeaseDurationSeconds :: Maybe Int
v1LeaseSpecLeaseTransitions :: Maybe Int
v1LeaseSpecPreferredHolder :: Maybe Text
v1LeaseSpecRenewTime :: Maybe DateTime
v1LeaseSpecStrategy :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"acquireTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1LeaseSpecAcquireTime
      , Key
"holderIdentity" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1LeaseSpecHolderIdentity
      , Key
"leaseDurationSeconds" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1LeaseSpecLeaseDurationSeconds
      , Key
"leaseTransitions" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1LeaseSpecLeaseTransitions
      , Key
"preferredHolder" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1LeaseSpecPreferredHolder
      , Key
"renewTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1LeaseSpecRenewTime
      , Key
"strategy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1LeaseSpecStrategy
      ]


-- | Construct a value of type 'V1LeaseSpec' (by applying it's required fields, if any)
mkV1LeaseSpec
  :: V1LeaseSpec
mkV1LeaseSpec :: V1LeaseSpec
mkV1LeaseSpec =
  V1LeaseSpec
  { $sel:v1LeaseSpecAcquireTime:V1LeaseSpec :: Maybe DateTime
v1LeaseSpecAcquireTime = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1LeaseSpecHolderIdentity:V1LeaseSpec :: Maybe Text
v1LeaseSpecHolderIdentity = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1LeaseSpecLeaseDurationSeconds:V1LeaseSpec :: Maybe Int
v1LeaseSpecLeaseDurationSeconds = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1LeaseSpecLeaseTransitions:V1LeaseSpec :: Maybe Int
v1LeaseSpecLeaseTransitions = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1LeaseSpecPreferredHolder:V1LeaseSpec :: Maybe Text
v1LeaseSpecPreferredHolder = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1LeaseSpecRenewTime:V1LeaseSpec :: Maybe DateTime
v1LeaseSpecRenewTime = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1LeaseSpecStrategy:V1LeaseSpec :: Maybe Text
v1LeaseSpecStrategy = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1Lifecycle
-- | V1Lifecycle
-- Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted.
data V1Lifecycle = V1Lifecycle
  { V1Lifecycle -> Maybe V1LifecycleHandler
v1LifecyclePostStart :: !(Maybe V1LifecycleHandler) -- ^ "postStart"
  , V1Lifecycle -> Maybe V1LifecycleHandler
v1LifecyclePreStop :: !(Maybe V1LifecycleHandler) -- ^ "preStop"
  } deriving (Int -> V1Lifecycle -> ShowS
[V1Lifecycle] -> ShowS
V1Lifecycle -> String
(Int -> V1Lifecycle -> ShowS)
-> (V1Lifecycle -> String)
-> ([V1Lifecycle] -> ShowS)
-> Show V1Lifecycle
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1Lifecycle -> ShowS
showsPrec :: Int -> V1Lifecycle -> ShowS
$cshow :: V1Lifecycle -> String
show :: V1Lifecycle -> String
$cshowList :: [V1Lifecycle] -> ShowS
showList :: [V1Lifecycle] -> ShowS
P.Show, V1Lifecycle -> V1Lifecycle -> Bool
(V1Lifecycle -> V1Lifecycle -> Bool)
-> (V1Lifecycle -> V1Lifecycle -> Bool) -> Eq V1Lifecycle
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1Lifecycle -> V1Lifecycle -> Bool
== :: V1Lifecycle -> V1Lifecycle -> Bool
$c/= :: V1Lifecycle -> V1Lifecycle -> Bool
/= :: V1Lifecycle -> V1Lifecycle -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1Lifecycle
instance A.FromJSON V1Lifecycle where
  parseJSON :: Value -> Parser V1Lifecycle
parseJSON = String
-> (Object -> Parser V1Lifecycle) -> Value -> Parser V1Lifecycle
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1Lifecycle" ((Object -> Parser V1Lifecycle) -> Value -> Parser V1Lifecycle)
-> (Object -> Parser V1Lifecycle) -> Value -> Parser V1Lifecycle
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1LifecycleHandler -> Maybe V1LifecycleHandler -> V1Lifecycle
V1Lifecycle
      (Maybe V1LifecycleHandler
 -> Maybe V1LifecycleHandler -> V1Lifecycle)
-> Parser (Maybe V1LifecycleHandler)
-> Parser (Maybe V1LifecycleHandler -> V1Lifecycle)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1LifecycleHandler)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"postStart")
      Parser (Maybe V1LifecycleHandler -> V1Lifecycle)
-> Parser (Maybe V1LifecycleHandler) -> Parser V1Lifecycle
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LifecycleHandler)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"preStop")

-- | ToJSON V1Lifecycle
instance A.ToJSON V1Lifecycle where
  toJSON :: V1Lifecycle -> Value
toJSON V1Lifecycle {Maybe V1LifecycleHandler
$sel:v1LifecyclePostStart:V1Lifecycle :: V1Lifecycle -> Maybe V1LifecycleHandler
$sel:v1LifecyclePreStop:V1Lifecycle :: V1Lifecycle -> Maybe V1LifecycleHandler
v1LifecyclePostStart :: Maybe V1LifecycleHandler
v1LifecyclePreStop :: Maybe V1LifecycleHandler
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"postStart" Key -> Maybe V1LifecycleHandler -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LifecycleHandler
v1LifecyclePostStart
      , Key
"preStop" Key -> Maybe V1LifecycleHandler -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LifecycleHandler
v1LifecyclePreStop
      ]


-- | Construct a value of type 'V1Lifecycle' (by applying it's required fields, if any)
mkV1Lifecycle
  :: V1Lifecycle
mkV1Lifecycle :: V1Lifecycle
mkV1Lifecycle =
  V1Lifecycle
  { $sel:v1LifecyclePostStart:V1Lifecycle :: Maybe V1LifecycleHandler
v1LifecyclePostStart = Maybe V1LifecycleHandler
forall a. Maybe a
Nothing
  , $sel:v1LifecyclePreStop:V1Lifecycle :: Maybe V1LifecycleHandler
v1LifecyclePreStop = Maybe V1LifecycleHandler
forall a. Maybe a
Nothing
  }

-- ** V1LifecycleHandler
-- | V1LifecycleHandler
-- LifecycleHandler defines a specific action that should be taken in a lifecycle hook. One and only one of the fields, except TCPSocket must be specified.
data V1LifecycleHandler = V1LifecycleHandler
  { V1LifecycleHandler -> Maybe V1ExecAction
v1LifecycleHandlerExec :: !(Maybe V1ExecAction) -- ^ "exec"
  , V1LifecycleHandler -> Maybe V1HTTPGetAction
v1LifecycleHandlerHttpGet :: !(Maybe V1HTTPGetAction) -- ^ "httpGet"
  , V1LifecycleHandler -> Maybe V1SleepAction
v1LifecycleHandlerSleep :: !(Maybe V1SleepAction) -- ^ "sleep"
  , V1LifecycleHandler -> Maybe V1TCPSocketAction
v1LifecycleHandlerTcpSocket :: !(Maybe V1TCPSocketAction) -- ^ "tcpSocket"
  } deriving (Int -> V1LifecycleHandler -> ShowS
[V1LifecycleHandler] -> ShowS
V1LifecycleHandler -> String
(Int -> V1LifecycleHandler -> ShowS)
-> (V1LifecycleHandler -> String)
-> ([V1LifecycleHandler] -> ShowS)
-> Show V1LifecycleHandler
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1LifecycleHandler -> ShowS
showsPrec :: Int -> V1LifecycleHandler -> ShowS
$cshow :: V1LifecycleHandler -> String
show :: V1LifecycleHandler -> String
$cshowList :: [V1LifecycleHandler] -> ShowS
showList :: [V1LifecycleHandler] -> ShowS
P.Show, V1LifecycleHandler -> V1LifecycleHandler -> Bool
(V1LifecycleHandler -> V1LifecycleHandler -> Bool)
-> (V1LifecycleHandler -> V1LifecycleHandler -> Bool)
-> Eq V1LifecycleHandler
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1LifecycleHandler -> V1LifecycleHandler -> Bool
== :: V1LifecycleHandler -> V1LifecycleHandler -> Bool
$c/= :: V1LifecycleHandler -> V1LifecycleHandler -> Bool
/= :: V1LifecycleHandler -> V1LifecycleHandler -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1LifecycleHandler
instance A.FromJSON V1LifecycleHandler where
  parseJSON :: Value -> Parser V1LifecycleHandler
parseJSON = String
-> (Object -> Parser V1LifecycleHandler)
-> Value
-> Parser V1LifecycleHandler
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1LifecycleHandler" ((Object -> Parser V1LifecycleHandler)
 -> Value -> Parser V1LifecycleHandler)
-> (Object -> Parser V1LifecycleHandler)
-> Value
-> Parser V1LifecycleHandler
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1ExecAction
-> Maybe V1HTTPGetAction
-> Maybe V1SleepAction
-> Maybe V1TCPSocketAction
-> V1LifecycleHandler
V1LifecycleHandler
      (Maybe V1ExecAction
 -> Maybe V1HTTPGetAction
 -> Maybe V1SleepAction
 -> Maybe V1TCPSocketAction
 -> V1LifecycleHandler)
-> Parser (Maybe V1ExecAction)
-> Parser
     (Maybe V1HTTPGetAction
      -> Maybe V1SleepAction
      -> Maybe V1TCPSocketAction
      -> V1LifecycleHandler)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1ExecAction)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"exec")
      Parser
  (Maybe V1HTTPGetAction
   -> Maybe V1SleepAction
   -> Maybe V1TCPSocketAction
   -> V1LifecycleHandler)
-> Parser (Maybe V1HTTPGetAction)
-> Parser
     (Maybe V1SleepAction
      -> Maybe V1TCPSocketAction -> V1LifecycleHandler)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1HTTPGetAction)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"httpGet")
      Parser
  (Maybe V1SleepAction
   -> Maybe V1TCPSocketAction -> V1LifecycleHandler)
-> Parser (Maybe V1SleepAction)
-> Parser (Maybe V1TCPSocketAction -> V1LifecycleHandler)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1SleepAction)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"sleep")
      Parser (Maybe V1TCPSocketAction -> V1LifecycleHandler)
-> Parser (Maybe V1TCPSocketAction) -> Parser V1LifecycleHandler
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1TCPSocketAction)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"tcpSocket")

-- | ToJSON V1LifecycleHandler
instance A.ToJSON V1LifecycleHandler where
  toJSON :: V1LifecycleHandler -> Value
toJSON V1LifecycleHandler {Maybe V1TCPSocketAction
Maybe V1SleepAction
Maybe V1HTTPGetAction
Maybe V1ExecAction
$sel:v1LifecycleHandlerExec:V1LifecycleHandler :: V1LifecycleHandler -> Maybe V1ExecAction
$sel:v1LifecycleHandlerHttpGet:V1LifecycleHandler :: V1LifecycleHandler -> Maybe V1HTTPGetAction
$sel:v1LifecycleHandlerSleep:V1LifecycleHandler :: V1LifecycleHandler -> Maybe V1SleepAction
$sel:v1LifecycleHandlerTcpSocket:V1LifecycleHandler :: V1LifecycleHandler -> Maybe V1TCPSocketAction
v1LifecycleHandlerExec :: Maybe V1ExecAction
v1LifecycleHandlerHttpGet :: Maybe V1HTTPGetAction
v1LifecycleHandlerSleep :: Maybe V1SleepAction
v1LifecycleHandlerTcpSocket :: Maybe V1TCPSocketAction
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"exec" Key -> Maybe V1ExecAction -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ExecAction
v1LifecycleHandlerExec
      , Key
"httpGet" Key -> Maybe V1HTTPGetAction -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1HTTPGetAction
v1LifecycleHandlerHttpGet
      , Key
"sleep" Key -> Maybe V1SleepAction -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1SleepAction
v1LifecycleHandlerSleep
      , Key
"tcpSocket" Key -> Maybe V1TCPSocketAction -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1TCPSocketAction
v1LifecycleHandlerTcpSocket
      ]


-- | Construct a value of type 'V1LifecycleHandler' (by applying it's required fields, if any)
mkV1LifecycleHandler
  :: V1LifecycleHandler
mkV1LifecycleHandler :: V1LifecycleHandler
mkV1LifecycleHandler =
  V1LifecycleHandler
  { $sel:v1LifecycleHandlerExec:V1LifecycleHandler :: Maybe V1ExecAction
v1LifecycleHandlerExec = Maybe V1ExecAction
forall a. Maybe a
Nothing
  , $sel:v1LifecycleHandlerHttpGet:V1LifecycleHandler :: Maybe V1HTTPGetAction
v1LifecycleHandlerHttpGet = Maybe V1HTTPGetAction
forall a. Maybe a
Nothing
  , $sel:v1LifecycleHandlerSleep:V1LifecycleHandler :: Maybe V1SleepAction
v1LifecycleHandlerSleep = Maybe V1SleepAction
forall a. Maybe a
Nothing
  , $sel:v1LifecycleHandlerTcpSocket:V1LifecycleHandler :: Maybe V1TCPSocketAction
v1LifecycleHandlerTcpSocket = Maybe V1TCPSocketAction
forall a. Maybe a
Nothing
  }

-- ** V1LimitRange
-- | V1LimitRange
-- LimitRange sets resource usage limits for each kind of resource in a Namespace.
data V1LimitRange = V1LimitRange
  { V1LimitRange -> Maybe Text
v1LimitRangeApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1LimitRange -> Maybe Text
v1LimitRangeKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1LimitRange -> Maybe V1ObjectMeta
v1LimitRangeMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1LimitRange -> Maybe V1LimitRangeSpec
v1LimitRangeSpec :: !(Maybe V1LimitRangeSpec) -- ^ "spec"
  } deriving (Int -> V1LimitRange -> ShowS
[V1LimitRange] -> ShowS
V1LimitRange -> String
(Int -> V1LimitRange -> ShowS)
-> (V1LimitRange -> String)
-> ([V1LimitRange] -> ShowS)
-> Show V1LimitRange
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1LimitRange -> ShowS
showsPrec :: Int -> V1LimitRange -> ShowS
$cshow :: V1LimitRange -> String
show :: V1LimitRange -> String
$cshowList :: [V1LimitRange] -> ShowS
showList :: [V1LimitRange] -> ShowS
P.Show, V1LimitRange -> V1LimitRange -> Bool
(V1LimitRange -> V1LimitRange -> Bool)
-> (V1LimitRange -> V1LimitRange -> Bool) -> Eq V1LimitRange
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1LimitRange -> V1LimitRange -> Bool
== :: V1LimitRange -> V1LimitRange -> Bool
$c/= :: V1LimitRange -> V1LimitRange -> Bool
/= :: V1LimitRange -> V1LimitRange -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1LimitRange
instance A.FromJSON V1LimitRange where
  parseJSON :: Value -> Parser V1LimitRange
parseJSON = String
-> (Object -> Parser V1LimitRange) -> Value -> Parser V1LimitRange
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1LimitRange" ((Object -> Parser V1LimitRange) -> Value -> Parser V1LimitRange)
-> (Object -> Parser V1LimitRange) -> Value -> Parser V1LimitRange
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1LimitRangeSpec
-> V1LimitRange
V1LimitRange
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1LimitRangeSpec
 -> V1LimitRange)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta -> Maybe V1LimitRangeSpec -> V1LimitRange)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta -> Maybe V1LimitRangeSpec -> V1LimitRange)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta -> Maybe V1LimitRangeSpec -> V1LimitRange)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta -> Maybe V1LimitRangeSpec -> V1LimitRange)
-> Parser (Maybe V1ObjectMeta)
-> Parser (Maybe V1LimitRangeSpec -> V1LimitRange)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (Maybe V1LimitRangeSpec -> V1LimitRange)
-> Parser (Maybe V1LimitRangeSpec) -> Parser V1LimitRange
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LimitRangeSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")

-- | ToJSON V1LimitRange
instance A.ToJSON V1LimitRange where
  toJSON :: V1LimitRange -> Value
toJSON V1LimitRange {Maybe Text
Maybe V1ObjectMeta
Maybe V1LimitRangeSpec
$sel:v1LimitRangeApiVersion:V1LimitRange :: V1LimitRange -> Maybe Text
$sel:v1LimitRangeKind:V1LimitRange :: V1LimitRange -> Maybe Text
$sel:v1LimitRangeMetadata:V1LimitRange :: V1LimitRange -> Maybe V1ObjectMeta
$sel:v1LimitRangeSpec:V1LimitRange :: V1LimitRange -> Maybe V1LimitRangeSpec
v1LimitRangeApiVersion :: Maybe Text
v1LimitRangeKind :: Maybe Text
v1LimitRangeMetadata :: Maybe V1ObjectMeta
v1LimitRangeSpec :: Maybe V1LimitRangeSpec
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1LimitRangeApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1LimitRangeKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1LimitRangeMetadata
      , Key
"spec" Key -> Maybe V1LimitRangeSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LimitRangeSpec
v1LimitRangeSpec
      ]


-- | Construct a value of type 'V1LimitRange' (by applying it's required fields, if any)
mkV1LimitRange
  :: V1LimitRange
mkV1LimitRange :: V1LimitRange
mkV1LimitRange =
  V1LimitRange
  { $sel:v1LimitRangeApiVersion:V1LimitRange :: Maybe Text
v1LimitRangeApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1LimitRangeKind:V1LimitRange :: Maybe Text
v1LimitRangeKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1LimitRangeMetadata:V1LimitRange :: Maybe V1ObjectMeta
v1LimitRangeMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1LimitRangeSpec:V1LimitRange :: Maybe V1LimitRangeSpec
v1LimitRangeSpec = Maybe V1LimitRangeSpec
forall a. Maybe a
Nothing
  }

-- ** V1LimitRangeItem
-- | V1LimitRangeItem
-- LimitRangeItem defines a min/max usage limit for any resource that matches on kind.
data V1LimitRangeItem = V1LimitRangeItem
  { V1LimitRangeItem -> Maybe (Map String Quantity)
v1LimitRangeItemDefault :: !(Maybe (Map.Map String Quantity)) -- ^ "default" - Default resource requirement limit value by resource name if resource limit is omitted.
  , V1LimitRangeItem -> Maybe (Map String Quantity)
v1LimitRangeItemDefaultRequest :: !(Maybe (Map.Map String Quantity)) -- ^ "defaultRequest" - DefaultRequest is the default resource requirement request value by resource name if resource request is omitted.
  , V1LimitRangeItem -> Maybe (Map String Quantity)
v1LimitRangeItemMax :: !(Maybe (Map.Map String Quantity)) -- ^ "max" - Max usage constraints on this kind by resource name.
  , V1LimitRangeItem -> Maybe (Map String Quantity)
v1LimitRangeItemMaxLimitRequestRatio :: !(Maybe (Map.Map String Quantity)) -- ^ "maxLimitRequestRatio" - MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource.
  , V1LimitRangeItem -> Maybe (Map String Quantity)
v1LimitRangeItemMin :: !(Maybe (Map.Map String Quantity)) -- ^ "min" - Min usage constraints on this kind by resource name.
  , V1LimitRangeItem -> Text
v1LimitRangeItemType :: !(Text) -- ^ /Required/ "type" - Type of resource that this limit applies to.
  } deriving (Int -> V1LimitRangeItem -> ShowS
[V1LimitRangeItem] -> ShowS
V1LimitRangeItem -> String
(Int -> V1LimitRangeItem -> ShowS)
-> (V1LimitRangeItem -> String)
-> ([V1LimitRangeItem] -> ShowS)
-> Show V1LimitRangeItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1LimitRangeItem -> ShowS
showsPrec :: Int -> V1LimitRangeItem -> ShowS
$cshow :: V1LimitRangeItem -> String
show :: V1LimitRangeItem -> String
$cshowList :: [V1LimitRangeItem] -> ShowS
showList :: [V1LimitRangeItem] -> ShowS
P.Show, V1LimitRangeItem -> V1LimitRangeItem -> Bool
(V1LimitRangeItem -> V1LimitRangeItem -> Bool)
-> (V1LimitRangeItem -> V1LimitRangeItem -> Bool)
-> Eq V1LimitRangeItem
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1LimitRangeItem -> V1LimitRangeItem -> Bool
== :: V1LimitRangeItem -> V1LimitRangeItem -> Bool
$c/= :: V1LimitRangeItem -> V1LimitRangeItem -> Bool
/= :: V1LimitRangeItem -> V1LimitRangeItem -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1LimitRangeItem
instance A.FromJSON V1LimitRangeItem where
  parseJSON :: Value -> Parser V1LimitRangeItem
parseJSON = String
-> (Object -> Parser V1LimitRangeItem)
-> Value
-> Parser V1LimitRangeItem
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1LimitRangeItem" ((Object -> Parser V1LimitRangeItem)
 -> Value -> Parser V1LimitRangeItem)
-> (Object -> Parser V1LimitRangeItem)
-> Value
-> Parser V1LimitRangeItem
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe (Map String Quantity)
-> Maybe (Map String Quantity)
-> Maybe (Map String Quantity)
-> Maybe (Map String Quantity)
-> Maybe (Map String Quantity)
-> Text
-> V1LimitRangeItem
V1LimitRangeItem
      (Maybe (Map String Quantity)
 -> Maybe (Map String Quantity)
 -> Maybe (Map String Quantity)
 -> Maybe (Map String Quantity)
 -> Maybe (Map String Quantity)
 -> Text
 -> V1LimitRangeItem)
-> Parser (Maybe (Map String Quantity))
-> Parser
     (Maybe (Map String Quantity)
      -> Maybe (Map String Quantity)
      -> Maybe (Map String Quantity)
      -> Maybe (Map String Quantity)
      -> Text
      -> V1LimitRangeItem)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe (Map String Quantity))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"default")
      Parser
  (Maybe (Map String Quantity)
   -> Maybe (Map String Quantity)
   -> Maybe (Map String Quantity)
   -> Maybe (Map String Quantity)
   -> Text
   -> V1LimitRangeItem)
-> Parser (Maybe (Map String Quantity))
-> Parser
     (Maybe (Map String Quantity)
      -> Maybe (Map String Quantity)
      -> Maybe (Map String Quantity)
      -> Text
      -> V1LimitRangeItem)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String Quantity))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"defaultRequest")
      Parser
  (Maybe (Map String Quantity)
   -> Maybe (Map String Quantity)
   -> Maybe (Map String Quantity)
   -> Text
   -> V1LimitRangeItem)
-> Parser (Maybe (Map String Quantity))
-> Parser
     (Maybe (Map String Quantity)
      -> Maybe (Map String Quantity) -> Text -> V1LimitRangeItem)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String Quantity))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"max")
      Parser
  (Maybe (Map String Quantity)
   -> Maybe (Map String Quantity) -> Text -> V1LimitRangeItem)
-> Parser (Maybe (Map String Quantity))
-> Parser (Maybe (Map String Quantity) -> Text -> V1LimitRangeItem)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String Quantity))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"maxLimitRequestRatio")
      Parser (Maybe (Map String Quantity) -> Text -> V1LimitRangeItem)
-> Parser (Maybe (Map String Quantity))
-> Parser (Text -> V1LimitRangeItem)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String Quantity))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"min")
      Parser (Text -> V1LimitRangeItem)
-> Parser Text -> Parser V1LimitRangeItem
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"type")

-- | ToJSON V1LimitRangeItem
instance A.ToJSON V1LimitRangeItem where
  toJSON :: V1LimitRangeItem -> Value
toJSON V1LimitRangeItem {Maybe (Map String Quantity)
Text
$sel:v1LimitRangeItemDefault:V1LimitRangeItem :: V1LimitRangeItem -> Maybe (Map String Quantity)
$sel:v1LimitRangeItemDefaultRequest:V1LimitRangeItem :: V1LimitRangeItem -> Maybe (Map String Quantity)
$sel:v1LimitRangeItemMax:V1LimitRangeItem :: V1LimitRangeItem -> Maybe (Map String Quantity)
$sel:v1LimitRangeItemMaxLimitRequestRatio:V1LimitRangeItem :: V1LimitRangeItem -> Maybe (Map String Quantity)
$sel:v1LimitRangeItemMin:V1LimitRangeItem :: V1LimitRangeItem -> Maybe (Map String Quantity)
$sel:v1LimitRangeItemType:V1LimitRangeItem :: V1LimitRangeItem -> Text
v1LimitRangeItemDefault :: Maybe (Map String Quantity)
v1LimitRangeItemDefaultRequest :: Maybe (Map String Quantity)
v1LimitRangeItemMax :: Maybe (Map String Quantity)
v1LimitRangeItemMaxLimitRequestRatio :: Maybe (Map String Quantity)
v1LimitRangeItemMin :: Maybe (Map String Quantity)
v1LimitRangeItemType :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"default" Key -> Maybe (Map String Quantity) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Quantity)
v1LimitRangeItemDefault
      , Key
"defaultRequest" Key -> Maybe (Map String Quantity) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Quantity)
v1LimitRangeItemDefaultRequest
      , Key
"max" Key -> Maybe (Map String Quantity) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Quantity)
v1LimitRangeItemMax
      , Key
"maxLimitRequestRatio" Key -> Maybe (Map String Quantity) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Quantity)
v1LimitRangeItemMaxLimitRequestRatio
      , Key
"min" Key -> Maybe (Map String Quantity) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Quantity)
v1LimitRangeItemMin
      , Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1LimitRangeItemType
      ]


-- | Construct a value of type 'V1LimitRangeItem' (by applying it's required fields, if any)
mkV1LimitRangeItem
  :: Text -- ^ 'v1LimitRangeItemType': Type of resource that this limit applies to.
  -> V1LimitRangeItem
mkV1LimitRangeItem :: Text -> V1LimitRangeItem
mkV1LimitRangeItem Text
v1LimitRangeItemType =
  V1LimitRangeItem
  { $sel:v1LimitRangeItemDefault:V1LimitRangeItem :: Maybe (Map String Quantity)
v1LimitRangeItemDefault = Maybe (Map String Quantity)
forall a. Maybe a
Nothing
  , $sel:v1LimitRangeItemDefaultRequest:V1LimitRangeItem :: Maybe (Map String Quantity)
v1LimitRangeItemDefaultRequest = Maybe (Map String Quantity)
forall a. Maybe a
Nothing
  , $sel:v1LimitRangeItemMax:V1LimitRangeItem :: Maybe (Map String Quantity)
v1LimitRangeItemMax = Maybe (Map String Quantity)
forall a. Maybe a
Nothing
  , $sel:v1LimitRangeItemMaxLimitRequestRatio:V1LimitRangeItem :: Maybe (Map String Quantity)
v1LimitRangeItemMaxLimitRequestRatio = Maybe (Map String Quantity)
forall a. Maybe a
Nothing
  , $sel:v1LimitRangeItemMin:V1LimitRangeItem :: Maybe (Map String Quantity)
v1LimitRangeItemMin = Maybe (Map String Quantity)
forall a. Maybe a
Nothing
  , Text
$sel:v1LimitRangeItemType:V1LimitRangeItem :: Text
v1LimitRangeItemType :: Text
v1LimitRangeItemType
  }

-- ** V1LimitRangeList
-- | V1LimitRangeList
-- LimitRangeList is a list of LimitRange items.
data V1LimitRangeList = V1LimitRangeList
  { V1LimitRangeList -> Maybe Text
v1LimitRangeListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1LimitRangeList -> [V1LimitRange]
v1LimitRangeListItems :: !([V1LimitRange]) -- ^ /Required/ "items" - Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
  , V1LimitRangeList -> Maybe Text
v1LimitRangeListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1LimitRangeList -> Maybe V1ListMeta
v1LimitRangeListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1LimitRangeList -> ShowS
[V1LimitRangeList] -> ShowS
V1LimitRangeList -> String
(Int -> V1LimitRangeList -> ShowS)
-> (V1LimitRangeList -> String)
-> ([V1LimitRangeList] -> ShowS)
-> Show V1LimitRangeList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1LimitRangeList -> ShowS
showsPrec :: Int -> V1LimitRangeList -> ShowS
$cshow :: V1LimitRangeList -> String
show :: V1LimitRangeList -> String
$cshowList :: [V1LimitRangeList] -> ShowS
showList :: [V1LimitRangeList] -> ShowS
P.Show, V1LimitRangeList -> V1LimitRangeList -> Bool
(V1LimitRangeList -> V1LimitRangeList -> Bool)
-> (V1LimitRangeList -> V1LimitRangeList -> Bool)
-> Eq V1LimitRangeList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1LimitRangeList -> V1LimitRangeList -> Bool
== :: V1LimitRangeList -> V1LimitRangeList -> Bool
$c/= :: V1LimitRangeList -> V1LimitRangeList -> Bool
/= :: V1LimitRangeList -> V1LimitRangeList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1LimitRangeList
instance A.FromJSON V1LimitRangeList where
  parseJSON :: Value -> Parser V1LimitRangeList
parseJSON = String
-> (Object -> Parser V1LimitRangeList)
-> Value
-> Parser V1LimitRangeList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1LimitRangeList" ((Object -> Parser V1LimitRangeList)
 -> Value -> Parser V1LimitRangeList)
-> (Object -> Parser V1LimitRangeList)
-> Value
-> Parser V1LimitRangeList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1LimitRange]
-> Maybe Text
-> Maybe V1ListMeta
-> V1LimitRangeList
V1LimitRangeList
      (Maybe Text
 -> [V1LimitRange]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1LimitRangeList)
-> Parser (Maybe Text)
-> Parser
     ([V1LimitRange]
      -> Maybe Text -> Maybe V1ListMeta -> V1LimitRangeList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1LimitRange]
   -> Maybe Text -> Maybe V1ListMeta -> V1LimitRangeList)
-> Parser [V1LimitRange]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1LimitRangeList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1LimitRange]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1LimitRangeList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1LimitRangeList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1LimitRangeList)
-> Parser (Maybe V1ListMeta) -> Parser V1LimitRangeList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1LimitRangeList
instance A.ToJSON V1LimitRangeList where
  toJSON :: V1LimitRangeList -> Value
toJSON V1LimitRangeList {[V1LimitRange]
Maybe Text
Maybe V1ListMeta
$sel:v1LimitRangeListApiVersion:V1LimitRangeList :: V1LimitRangeList -> Maybe Text
$sel:v1LimitRangeListItems:V1LimitRangeList :: V1LimitRangeList -> [V1LimitRange]
$sel:v1LimitRangeListKind:V1LimitRangeList :: V1LimitRangeList -> Maybe Text
$sel:v1LimitRangeListMetadata:V1LimitRangeList :: V1LimitRangeList -> Maybe V1ListMeta
v1LimitRangeListApiVersion :: Maybe Text
v1LimitRangeListItems :: [V1LimitRange]
v1LimitRangeListKind :: Maybe Text
v1LimitRangeListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1LimitRangeListApiVersion
      , Key
"items" Key -> [V1LimitRange] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1LimitRange]
v1LimitRangeListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1LimitRangeListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1LimitRangeListMetadata
      ]


-- | Construct a value of type 'V1LimitRangeList' (by applying it's required fields, if any)
mkV1LimitRangeList
  :: [V1LimitRange] -- ^ 'v1LimitRangeListItems': Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
  -> V1LimitRangeList
mkV1LimitRangeList :: [V1LimitRange] -> V1LimitRangeList
mkV1LimitRangeList [V1LimitRange]
v1LimitRangeListItems =
  V1LimitRangeList
  { $sel:v1LimitRangeListApiVersion:V1LimitRangeList :: Maybe Text
v1LimitRangeListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1LimitRange]
$sel:v1LimitRangeListItems:V1LimitRangeList :: [V1LimitRange]
v1LimitRangeListItems :: [V1LimitRange]
v1LimitRangeListItems
  , $sel:v1LimitRangeListKind:V1LimitRangeList :: Maybe Text
v1LimitRangeListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1LimitRangeListMetadata:V1LimitRangeList :: Maybe V1ListMeta
v1LimitRangeListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1LimitRangeSpec
-- | V1LimitRangeSpec
-- LimitRangeSpec defines a min/max usage limit for resources that match on kind.
data V1LimitRangeSpec = V1LimitRangeSpec
  { V1LimitRangeSpec -> [V1LimitRangeItem]
v1LimitRangeSpecLimits :: !([V1LimitRangeItem]) -- ^ /Required/ "limits" - Limits is the list of LimitRangeItem objects that are enforced.
  } deriving (Int -> V1LimitRangeSpec -> ShowS
[V1LimitRangeSpec] -> ShowS
V1LimitRangeSpec -> String
(Int -> V1LimitRangeSpec -> ShowS)
-> (V1LimitRangeSpec -> String)
-> ([V1LimitRangeSpec] -> ShowS)
-> Show V1LimitRangeSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1LimitRangeSpec -> ShowS
showsPrec :: Int -> V1LimitRangeSpec -> ShowS
$cshow :: V1LimitRangeSpec -> String
show :: V1LimitRangeSpec -> String
$cshowList :: [V1LimitRangeSpec] -> ShowS
showList :: [V1LimitRangeSpec] -> ShowS
P.Show, V1LimitRangeSpec -> V1LimitRangeSpec -> Bool
(V1LimitRangeSpec -> V1LimitRangeSpec -> Bool)
-> (V1LimitRangeSpec -> V1LimitRangeSpec -> Bool)
-> Eq V1LimitRangeSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1LimitRangeSpec -> V1LimitRangeSpec -> Bool
== :: V1LimitRangeSpec -> V1LimitRangeSpec -> Bool
$c/= :: V1LimitRangeSpec -> V1LimitRangeSpec -> Bool
/= :: V1LimitRangeSpec -> V1LimitRangeSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1LimitRangeSpec
instance A.FromJSON V1LimitRangeSpec where
  parseJSON :: Value -> Parser V1LimitRangeSpec
parseJSON = String
-> (Object -> Parser V1LimitRangeSpec)
-> Value
-> Parser V1LimitRangeSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1LimitRangeSpec" ((Object -> Parser V1LimitRangeSpec)
 -> Value -> Parser V1LimitRangeSpec)
-> (Object -> Parser V1LimitRangeSpec)
-> Value
-> Parser V1LimitRangeSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    [V1LimitRangeItem] -> V1LimitRangeSpec
V1LimitRangeSpec
      ([V1LimitRangeItem] -> V1LimitRangeSpec)
-> Parser [V1LimitRangeItem] -> Parser V1LimitRangeSpec
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser [V1LimitRangeItem]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"limits")

-- | ToJSON V1LimitRangeSpec
instance A.ToJSON V1LimitRangeSpec where
  toJSON :: V1LimitRangeSpec -> Value
toJSON V1LimitRangeSpec {[V1LimitRangeItem]
$sel:v1LimitRangeSpecLimits:V1LimitRangeSpec :: V1LimitRangeSpec -> [V1LimitRangeItem]
v1LimitRangeSpecLimits :: [V1LimitRangeItem]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"limits" Key -> [V1LimitRangeItem] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1LimitRangeItem]
v1LimitRangeSpecLimits
      ]


-- | Construct a value of type 'V1LimitRangeSpec' (by applying it's required fields, if any)
mkV1LimitRangeSpec
  :: [V1LimitRangeItem] -- ^ 'v1LimitRangeSpecLimits': Limits is the list of LimitRangeItem objects that are enforced.
  -> V1LimitRangeSpec
mkV1LimitRangeSpec :: [V1LimitRangeItem] -> V1LimitRangeSpec
mkV1LimitRangeSpec [V1LimitRangeItem]
v1LimitRangeSpecLimits =
  V1LimitRangeSpec
  { [V1LimitRangeItem]
$sel:v1LimitRangeSpecLimits:V1LimitRangeSpec :: [V1LimitRangeItem]
v1LimitRangeSpecLimits :: [V1LimitRangeItem]
v1LimitRangeSpecLimits
  }

-- ** V1LimitResponse
-- | V1LimitResponse
-- LimitResponse defines how to handle requests that can not be executed right now.
data V1LimitResponse = V1LimitResponse
  { V1LimitResponse -> Maybe V1QueuingConfiguration
v1LimitResponseQueuing :: !(Maybe V1QueuingConfiguration) -- ^ "queuing"
  , V1LimitResponse -> Text
v1LimitResponseType :: !(Text) -- ^ /Required/ "type" - &#x60;type&#x60; is \&quot;Queue\&quot; or \&quot;Reject\&quot;. \&quot;Queue\&quot; means that requests that can not be executed upon arrival are held in a queue until they can be executed or a queuing limit is reached. \&quot;Reject\&quot; means that requests that can not be executed upon arrival are rejected. Required.
  } deriving (Int -> V1LimitResponse -> ShowS
[V1LimitResponse] -> ShowS
V1LimitResponse -> String
(Int -> V1LimitResponse -> ShowS)
-> (V1LimitResponse -> String)
-> ([V1LimitResponse] -> ShowS)
-> Show V1LimitResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1LimitResponse -> ShowS
showsPrec :: Int -> V1LimitResponse -> ShowS
$cshow :: V1LimitResponse -> String
show :: V1LimitResponse -> String
$cshowList :: [V1LimitResponse] -> ShowS
showList :: [V1LimitResponse] -> ShowS
P.Show, V1LimitResponse -> V1LimitResponse -> Bool
(V1LimitResponse -> V1LimitResponse -> Bool)
-> (V1LimitResponse -> V1LimitResponse -> Bool)
-> Eq V1LimitResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1LimitResponse -> V1LimitResponse -> Bool
== :: V1LimitResponse -> V1LimitResponse -> Bool
$c/= :: V1LimitResponse -> V1LimitResponse -> Bool
/= :: V1LimitResponse -> V1LimitResponse -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1LimitResponse
instance A.FromJSON V1LimitResponse where
  parseJSON :: Value -> Parser V1LimitResponse
parseJSON = String
-> (Object -> Parser V1LimitResponse)
-> Value
-> Parser V1LimitResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1LimitResponse" ((Object -> Parser V1LimitResponse)
 -> Value -> Parser V1LimitResponse)
-> (Object -> Parser V1LimitResponse)
-> Value
-> Parser V1LimitResponse
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1QueuingConfiguration -> Text -> V1LimitResponse
V1LimitResponse
      (Maybe V1QueuingConfiguration -> Text -> V1LimitResponse)
-> Parser (Maybe V1QueuingConfiguration)
-> Parser (Text -> V1LimitResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1QueuingConfiguration)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"queuing")
      Parser (Text -> V1LimitResponse)
-> Parser Text -> Parser V1LimitResponse
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"type")

-- | ToJSON V1LimitResponse
instance A.ToJSON V1LimitResponse where
  toJSON :: V1LimitResponse -> Value
toJSON V1LimitResponse {Maybe V1QueuingConfiguration
Text
$sel:v1LimitResponseQueuing:V1LimitResponse :: V1LimitResponse -> Maybe V1QueuingConfiguration
$sel:v1LimitResponseType:V1LimitResponse :: V1LimitResponse -> Text
v1LimitResponseQueuing :: Maybe V1QueuingConfiguration
v1LimitResponseType :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"queuing" Key -> Maybe V1QueuingConfiguration -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1QueuingConfiguration
v1LimitResponseQueuing
      , Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1LimitResponseType
      ]


-- | Construct a value of type 'V1LimitResponse' (by applying it's required fields, if any)
mkV1LimitResponse
  :: Text -- ^ 'v1LimitResponseType': `type` is \"Queue\" or \"Reject\". \"Queue\" means that requests that can not be executed upon arrival are held in a queue until they can be executed or a queuing limit is reached. \"Reject\" means that requests that can not be executed upon arrival are rejected. Required.
  -> V1LimitResponse
mkV1LimitResponse :: Text -> V1LimitResponse
mkV1LimitResponse Text
v1LimitResponseType =
  V1LimitResponse
  { $sel:v1LimitResponseQueuing:V1LimitResponse :: Maybe V1QueuingConfiguration
v1LimitResponseQueuing = Maybe V1QueuingConfiguration
forall a. Maybe a
Nothing
  , Text
$sel:v1LimitResponseType:V1LimitResponse :: Text
v1LimitResponseType :: Text
v1LimitResponseType
  }

-- ** V1LimitedPriorityLevelConfiguration
-- | V1LimitedPriorityLevelConfiguration
-- LimitedPriorityLevelConfiguration specifies how to handle requests that are subject to limits. It addresses two issues:   - How are requests for this priority level limited?   - What should be done with requests that exceed the limit?
data V1LimitedPriorityLevelConfiguration = V1LimitedPriorityLevelConfiguration
  { V1LimitedPriorityLevelConfiguration -> Maybe Int
v1LimitedPriorityLevelConfigurationBorrowingLimitPercent :: !(Maybe Int) -- ^ "borrowingLimitPercent" - &#x60;borrowingLimitPercent&#x60;, if present, configures a limit on how many seats this priority level can borrow from other priority levels. The limit is known as this level&#39;s BorrowingConcurrencyLimit (BorrowingCL) and is a limit on the total number of seats that this level may borrow at any one time. This field holds the ratio of that limit to the level&#39;s nominal concurrency limit. When this field is non-nil, it must hold a non-negative integer and the limit is calculated as follows.  BorrowingCL(i) &#x3D; round( NominalCL(i) * borrowingLimitPercent(i)/100.0 )  The value of this field can be more than 100, implying that this priority level can borrow a number of seats that is greater than its own nominal concurrency limit (NominalCL). When this field is left &#x60;nil&#x60;, the limit is effectively infinite.
  , V1LimitedPriorityLevelConfiguration -> Maybe Int
v1LimitedPriorityLevelConfigurationLendablePercent :: !(Maybe Int) -- ^ "lendablePercent" - &#x60;lendablePercent&#x60; prescribes the fraction of the level&#39;s NominalCL that can be borrowed by other priority levels. The value of this field must be between 0 and 100, inclusive, and it defaults to 0. The number of seats that other levels can borrow from this level, known as this level&#39;s LendableConcurrencyLimit (LendableCL), is defined as follows.  LendableCL(i) &#x3D; round( NominalCL(i) * lendablePercent(i)/100.0 )
  , V1LimitedPriorityLevelConfiguration -> Maybe V1LimitResponse
v1LimitedPriorityLevelConfigurationLimitResponse :: !(Maybe V1LimitResponse) -- ^ "limitResponse"
  , V1LimitedPriorityLevelConfiguration -> Maybe Int
v1LimitedPriorityLevelConfigurationNominalConcurrencyShares :: !(Maybe Int) -- ^ "nominalConcurrencyShares" - &#x60;nominalConcurrencyShares&#x60; (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level. This is the number of execution seats available at this priority level. This is used both for requests dispatched from this priority level as well as requests dispatched from other priority levels borrowing seats from this level. The server&#39;s concurrency limit (ServerCL) is divided among the Limited priority levels in proportion to their NCS values:  NominalCL(i)  &#x3D; ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs &#x3D; sum[priority level k] NCS(k)  Bigger numbers mean a larger nominal concurrency limit, at the expense of every other priority level.  If not specified, this field defaults to a value of 30.  Setting this field to zero supports the construction of a \&quot;jail\&quot; for this priority level that is used to hold some request(s)
  } deriving (Int -> V1LimitedPriorityLevelConfiguration -> ShowS
[V1LimitedPriorityLevelConfiguration] -> ShowS
V1LimitedPriorityLevelConfiguration -> String
(Int -> V1LimitedPriorityLevelConfiguration -> ShowS)
-> (V1LimitedPriorityLevelConfiguration -> String)
-> ([V1LimitedPriorityLevelConfiguration] -> ShowS)
-> Show V1LimitedPriorityLevelConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1LimitedPriorityLevelConfiguration -> ShowS
showsPrec :: Int -> V1LimitedPriorityLevelConfiguration -> ShowS
$cshow :: V1LimitedPriorityLevelConfiguration -> String
show :: V1LimitedPriorityLevelConfiguration -> String
$cshowList :: [V1LimitedPriorityLevelConfiguration] -> ShowS
showList :: [V1LimitedPriorityLevelConfiguration] -> ShowS
P.Show, V1LimitedPriorityLevelConfiguration
-> V1LimitedPriorityLevelConfiguration -> Bool
(V1LimitedPriorityLevelConfiguration
 -> V1LimitedPriorityLevelConfiguration -> Bool)
-> (V1LimitedPriorityLevelConfiguration
    -> V1LimitedPriorityLevelConfiguration -> Bool)
-> Eq V1LimitedPriorityLevelConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1LimitedPriorityLevelConfiguration
-> V1LimitedPriorityLevelConfiguration -> Bool
== :: V1LimitedPriorityLevelConfiguration
-> V1LimitedPriorityLevelConfiguration -> Bool
$c/= :: V1LimitedPriorityLevelConfiguration
-> V1LimitedPriorityLevelConfiguration -> Bool
/= :: V1LimitedPriorityLevelConfiguration
-> V1LimitedPriorityLevelConfiguration -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1LimitedPriorityLevelConfiguration
instance A.FromJSON V1LimitedPriorityLevelConfiguration where
  parseJSON :: Value -> Parser V1LimitedPriorityLevelConfiguration
parseJSON = String
-> (Object -> Parser V1LimitedPriorityLevelConfiguration)
-> Value
-> Parser V1LimitedPriorityLevelConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1LimitedPriorityLevelConfiguration" ((Object -> Parser V1LimitedPriorityLevelConfiguration)
 -> Value -> Parser V1LimitedPriorityLevelConfiguration)
-> (Object -> Parser V1LimitedPriorityLevelConfiguration)
-> Value
-> Parser V1LimitedPriorityLevelConfiguration
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Int
-> Maybe Int
-> Maybe V1LimitResponse
-> Maybe Int
-> V1LimitedPriorityLevelConfiguration
V1LimitedPriorityLevelConfiguration
      (Maybe Int
 -> Maybe Int
 -> Maybe V1LimitResponse
 -> Maybe Int
 -> V1LimitedPriorityLevelConfiguration)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe V1LimitResponse
      -> Maybe Int
      -> V1LimitedPriorityLevelConfiguration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"borrowingLimitPercent")
      Parser
  (Maybe Int
   -> Maybe V1LimitResponse
   -> Maybe Int
   -> V1LimitedPriorityLevelConfiguration)
-> Parser (Maybe Int)
-> Parser
     (Maybe V1LimitResponse
      -> Maybe Int -> V1LimitedPriorityLevelConfiguration)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lendablePercent")
      Parser
  (Maybe V1LimitResponse
   -> Maybe Int -> V1LimitedPriorityLevelConfiguration)
-> Parser (Maybe V1LimitResponse)
-> Parser (Maybe Int -> V1LimitedPriorityLevelConfiguration)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LimitResponse)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"limitResponse")
      Parser (Maybe Int -> V1LimitedPriorityLevelConfiguration)
-> Parser (Maybe Int) -> Parser V1LimitedPriorityLevelConfiguration
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nominalConcurrencyShares")

-- | ToJSON V1LimitedPriorityLevelConfiguration
instance A.ToJSON V1LimitedPriorityLevelConfiguration where
  toJSON :: V1LimitedPriorityLevelConfiguration -> Value
toJSON V1LimitedPriorityLevelConfiguration {Maybe Int
Maybe V1LimitResponse
$sel:v1LimitedPriorityLevelConfigurationBorrowingLimitPercent:V1LimitedPriorityLevelConfiguration :: V1LimitedPriorityLevelConfiguration -> Maybe Int
$sel:v1LimitedPriorityLevelConfigurationLendablePercent:V1LimitedPriorityLevelConfiguration :: V1LimitedPriorityLevelConfiguration -> Maybe Int
$sel:v1LimitedPriorityLevelConfigurationLimitResponse:V1LimitedPriorityLevelConfiguration :: V1LimitedPriorityLevelConfiguration -> Maybe V1LimitResponse
$sel:v1LimitedPriorityLevelConfigurationNominalConcurrencyShares:V1LimitedPriorityLevelConfiguration :: V1LimitedPriorityLevelConfiguration -> Maybe Int
v1LimitedPriorityLevelConfigurationBorrowingLimitPercent :: Maybe Int
v1LimitedPriorityLevelConfigurationLendablePercent :: Maybe Int
v1LimitedPriorityLevelConfigurationLimitResponse :: Maybe V1LimitResponse
v1LimitedPriorityLevelConfigurationNominalConcurrencyShares :: Maybe Int
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"borrowingLimitPercent" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1LimitedPriorityLevelConfigurationBorrowingLimitPercent
      , Key
"lendablePercent" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1LimitedPriorityLevelConfigurationLendablePercent
      , Key
"limitResponse" Key -> Maybe V1LimitResponse -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LimitResponse
v1LimitedPriorityLevelConfigurationLimitResponse
      , Key
"nominalConcurrencyShares" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1LimitedPriorityLevelConfigurationNominalConcurrencyShares
      ]


-- | Construct a value of type 'V1LimitedPriorityLevelConfiguration' (by applying it's required fields, if any)
mkV1LimitedPriorityLevelConfiguration
  :: V1LimitedPriorityLevelConfiguration
mkV1LimitedPriorityLevelConfiguration :: V1LimitedPriorityLevelConfiguration
mkV1LimitedPriorityLevelConfiguration =
  V1LimitedPriorityLevelConfiguration
  { $sel:v1LimitedPriorityLevelConfigurationBorrowingLimitPercent:V1LimitedPriorityLevelConfiguration :: Maybe Int
v1LimitedPriorityLevelConfigurationBorrowingLimitPercent = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1LimitedPriorityLevelConfigurationLendablePercent:V1LimitedPriorityLevelConfiguration :: Maybe Int
v1LimitedPriorityLevelConfigurationLendablePercent = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1LimitedPriorityLevelConfigurationLimitResponse:V1LimitedPriorityLevelConfiguration :: Maybe V1LimitResponse
v1LimitedPriorityLevelConfigurationLimitResponse = Maybe V1LimitResponse
forall a. Maybe a
Nothing
  , $sel:v1LimitedPriorityLevelConfigurationNominalConcurrencyShares:V1LimitedPriorityLevelConfiguration :: Maybe Int
v1LimitedPriorityLevelConfigurationNominalConcurrencyShares = Maybe Int
forall a. Maybe a
Nothing
  }

-- ** V1LinuxContainerUser
-- | V1LinuxContainerUser
-- LinuxContainerUser represents user identity information in Linux containers
data V1LinuxContainerUser = V1LinuxContainerUser
  { V1LinuxContainerUser -> Integer
v1LinuxContainerUserGid :: !(Integer) -- ^ /Required/ "gid" - GID is the primary gid initially attached to the first process in the container
  , V1LinuxContainerUser -> Maybe [Integer]
v1LinuxContainerUserSupplementalGroups :: !(Maybe [Integer]) -- ^ "supplementalGroups" - SupplementalGroups are the supplemental groups initially attached to the first process in the container
  , V1LinuxContainerUser -> Integer
v1LinuxContainerUserUid :: !(Integer) -- ^ /Required/ "uid" - UID is the primary uid initially attached to the first process in the container
  } deriving (Int -> V1LinuxContainerUser -> ShowS
[V1LinuxContainerUser] -> ShowS
V1LinuxContainerUser -> String
(Int -> V1LinuxContainerUser -> ShowS)
-> (V1LinuxContainerUser -> String)
-> ([V1LinuxContainerUser] -> ShowS)
-> Show V1LinuxContainerUser
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1LinuxContainerUser -> ShowS
showsPrec :: Int -> V1LinuxContainerUser -> ShowS
$cshow :: V1LinuxContainerUser -> String
show :: V1LinuxContainerUser -> String
$cshowList :: [V1LinuxContainerUser] -> ShowS
showList :: [V1LinuxContainerUser] -> ShowS
P.Show, V1LinuxContainerUser -> V1LinuxContainerUser -> Bool
(V1LinuxContainerUser -> V1LinuxContainerUser -> Bool)
-> (V1LinuxContainerUser -> V1LinuxContainerUser -> Bool)
-> Eq V1LinuxContainerUser
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1LinuxContainerUser -> V1LinuxContainerUser -> Bool
== :: V1LinuxContainerUser -> V1LinuxContainerUser -> Bool
$c/= :: V1LinuxContainerUser -> V1LinuxContainerUser -> Bool
/= :: V1LinuxContainerUser -> V1LinuxContainerUser -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1LinuxContainerUser
instance A.FromJSON V1LinuxContainerUser where
  parseJSON :: Value -> Parser V1LinuxContainerUser
parseJSON = String
-> (Object -> Parser V1LinuxContainerUser)
-> Value
-> Parser V1LinuxContainerUser
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1LinuxContainerUser" ((Object -> Parser V1LinuxContainerUser)
 -> Value -> Parser V1LinuxContainerUser)
-> (Object -> Parser V1LinuxContainerUser)
-> Value
-> Parser V1LinuxContainerUser
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Integer -> Maybe [Integer] -> Integer -> V1LinuxContainerUser
V1LinuxContainerUser
      (Integer -> Maybe [Integer] -> Integer -> V1LinuxContainerUser)
-> Parser Integer
-> Parser (Maybe [Integer] -> Integer -> V1LinuxContainerUser)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Integer
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"gid")
      Parser (Maybe [Integer] -> Integer -> V1LinuxContainerUser)
-> Parser (Maybe [Integer])
-> Parser (Integer -> V1LinuxContainerUser)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Integer])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"supplementalGroups")
      Parser (Integer -> V1LinuxContainerUser)
-> Parser Integer -> Parser V1LinuxContainerUser
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Integer
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"uid")

-- | ToJSON V1LinuxContainerUser
instance A.ToJSON V1LinuxContainerUser where
  toJSON :: V1LinuxContainerUser -> Value
toJSON V1LinuxContainerUser {Integer
Maybe [Integer]
$sel:v1LinuxContainerUserGid:V1LinuxContainerUser :: V1LinuxContainerUser -> Integer
$sel:v1LinuxContainerUserSupplementalGroups:V1LinuxContainerUser :: V1LinuxContainerUser -> Maybe [Integer]
$sel:v1LinuxContainerUserUid:V1LinuxContainerUser :: V1LinuxContainerUser -> Integer
v1LinuxContainerUserGid :: Integer
v1LinuxContainerUserSupplementalGroups :: Maybe [Integer]
v1LinuxContainerUserUid :: Integer
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"gid" Key -> Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Integer
v1LinuxContainerUserGid
      , Key
"supplementalGroups" Key -> Maybe [Integer] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Integer]
v1LinuxContainerUserSupplementalGroups
      , Key
"uid" Key -> Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Integer
v1LinuxContainerUserUid
      ]


-- | Construct a value of type 'V1LinuxContainerUser' (by applying it's required fields, if any)
mkV1LinuxContainerUser
  :: Integer -- ^ 'v1LinuxContainerUserGid': GID is the primary gid initially attached to the first process in the container
  -> Integer -- ^ 'v1LinuxContainerUserUid': UID is the primary uid initially attached to the first process in the container
  -> V1LinuxContainerUser
mkV1LinuxContainerUser :: Integer -> Integer -> V1LinuxContainerUser
mkV1LinuxContainerUser Integer
v1LinuxContainerUserGid Integer
v1LinuxContainerUserUid =
  V1LinuxContainerUser
  { Integer
$sel:v1LinuxContainerUserGid:V1LinuxContainerUser :: Integer
v1LinuxContainerUserGid :: Integer
v1LinuxContainerUserGid
  , $sel:v1LinuxContainerUserSupplementalGroups:V1LinuxContainerUser :: Maybe [Integer]
v1LinuxContainerUserSupplementalGroups = Maybe [Integer]
forall a. Maybe a
Nothing
  , Integer
$sel:v1LinuxContainerUserUid:V1LinuxContainerUser :: Integer
v1LinuxContainerUserUid :: Integer
v1LinuxContainerUserUid
  }

-- ** V1ListMeta
-- | V1ListMeta
-- ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.
data V1ListMeta = V1ListMeta
  { V1ListMeta -> Maybe Text
v1ListMetaContinue :: !(Maybe Text) -- ^ "continue" - continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message.
  , V1ListMeta -> Maybe Integer
v1ListMetaRemainingItemCount :: !(Maybe Integer) -- ^ "remainingItemCount" - remainingItemCount is the number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact.
  , V1ListMeta -> Maybe Text
v1ListMetaResourceVersion :: !(Maybe Text) -- ^ "resourceVersion" - String that identifies the server&#39;s internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
  , V1ListMeta -> Maybe Text
v1ListMetaSelfLink :: !(Maybe Text) -- ^ "selfLink" - Deprecated: selfLink is a legacy read-only field that is no longer populated by the system.
  } deriving (Int -> V1ListMeta -> ShowS
[V1ListMeta] -> ShowS
V1ListMeta -> String
(Int -> V1ListMeta -> ShowS)
-> (V1ListMeta -> String)
-> ([V1ListMeta] -> ShowS)
-> Show V1ListMeta
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ListMeta -> ShowS
showsPrec :: Int -> V1ListMeta -> ShowS
$cshow :: V1ListMeta -> String
show :: V1ListMeta -> String
$cshowList :: [V1ListMeta] -> ShowS
showList :: [V1ListMeta] -> ShowS
P.Show, V1ListMeta -> V1ListMeta -> Bool
(V1ListMeta -> V1ListMeta -> Bool)
-> (V1ListMeta -> V1ListMeta -> Bool) -> Eq V1ListMeta
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ListMeta -> V1ListMeta -> Bool
== :: V1ListMeta -> V1ListMeta -> Bool
$c/= :: V1ListMeta -> V1ListMeta -> Bool
/= :: V1ListMeta -> V1ListMeta -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ListMeta
instance A.FromJSON V1ListMeta where
  parseJSON :: Value -> Parser V1ListMeta
parseJSON = String
-> (Object -> Parser V1ListMeta) -> Value -> Parser V1ListMeta
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ListMeta" ((Object -> Parser V1ListMeta) -> Value -> Parser V1ListMeta)
-> (Object -> Parser V1ListMeta) -> Value -> Parser V1ListMeta
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Integer -> Maybe Text -> Maybe Text -> V1ListMeta
V1ListMeta
      (Maybe Text
 -> Maybe Integer -> Maybe Text -> Maybe Text -> V1ListMeta)
-> Parser (Maybe Text)
-> Parser (Maybe Integer -> Maybe Text -> Maybe Text -> V1ListMeta)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"continue")
      Parser (Maybe Integer -> Maybe Text -> Maybe Text -> V1ListMeta)
-> Parser (Maybe Integer)
-> Parser (Maybe Text -> Maybe Text -> V1ListMeta)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"remainingItemCount")
      Parser (Maybe Text -> Maybe Text -> V1ListMeta)
-> Parser (Maybe Text) -> Parser (Maybe Text -> V1ListMeta)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resourceVersion")
      Parser (Maybe Text -> V1ListMeta)
-> Parser (Maybe Text) -> Parser V1ListMeta
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"selfLink")

-- | ToJSON V1ListMeta
instance A.ToJSON V1ListMeta where
  toJSON :: V1ListMeta -> Value
toJSON V1ListMeta {Maybe Integer
Maybe Text
$sel:v1ListMetaContinue:V1ListMeta :: V1ListMeta -> Maybe Text
$sel:v1ListMetaRemainingItemCount:V1ListMeta :: V1ListMeta -> Maybe Integer
$sel:v1ListMetaResourceVersion:V1ListMeta :: V1ListMeta -> Maybe Text
$sel:v1ListMetaSelfLink:V1ListMeta :: V1ListMeta -> Maybe Text
v1ListMetaContinue :: Maybe Text
v1ListMetaRemainingItemCount :: Maybe Integer
v1ListMetaResourceVersion :: Maybe Text
v1ListMetaSelfLink :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"continue" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ListMetaContinue
      , Key
"remainingItemCount" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1ListMetaRemainingItemCount
      , Key
"resourceVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ListMetaResourceVersion
      , Key
"selfLink" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ListMetaSelfLink
      ]


-- | Construct a value of type 'V1ListMeta' (by applying it's required fields, if any)
mkV1ListMeta
  :: V1ListMeta
mkV1ListMeta :: V1ListMeta
mkV1ListMeta =
  V1ListMeta
  { $sel:v1ListMetaContinue:V1ListMeta :: Maybe Text
v1ListMetaContinue = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ListMetaRemainingItemCount:V1ListMeta :: Maybe Integer
v1ListMetaRemainingItemCount = Maybe Integer
forall a. Maybe a
Nothing
  , $sel:v1ListMetaResourceVersion:V1ListMeta :: Maybe Text
v1ListMetaResourceVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ListMetaSelfLink:V1ListMeta :: Maybe Text
v1ListMetaSelfLink = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1LoadBalancerIngress
-- | V1LoadBalancerIngress
-- LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point.
data V1LoadBalancerIngress = V1LoadBalancerIngress
  { V1LoadBalancerIngress -> Maybe Text
v1LoadBalancerIngressHostname :: !(Maybe Text) -- ^ "hostname" - Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers)
  , V1LoadBalancerIngress -> Maybe Text
v1LoadBalancerIngressIp :: !(Maybe Text) -- ^ "ip" - IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers)
  , V1LoadBalancerIngress -> Maybe Text
v1LoadBalancerIngressIpMode :: !(Maybe Text) -- ^ "ipMode" - IPMode specifies how the load-balancer IP behaves, and may only be specified when the ip field is specified. Setting this to \&quot;VIP\&quot; indicates that traffic is delivered to the node with the destination set to the load-balancer&#39;s IP and port. Setting this to \&quot;Proxy\&quot; indicates that traffic is delivered to the node or pod with the destination set to the node&#39;s IP and node port or the pod&#39;s IP and port. Service implementations may use this information to adjust traffic routing.
  , V1LoadBalancerIngress -> Maybe [V1PortStatus]
v1LoadBalancerIngressPorts :: !(Maybe [V1PortStatus]) -- ^ "ports" - Ports is a list of records of service ports If used, every port defined in the service should have an entry in it
  } deriving (Int -> V1LoadBalancerIngress -> ShowS
[V1LoadBalancerIngress] -> ShowS
V1LoadBalancerIngress -> String
(Int -> V1LoadBalancerIngress -> ShowS)
-> (V1LoadBalancerIngress -> String)
-> ([V1LoadBalancerIngress] -> ShowS)
-> Show V1LoadBalancerIngress
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1LoadBalancerIngress -> ShowS
showsPrec :: Int -> V1LoadBalancerIngress -> ShowS
$cshow :: V1LoadBalancerIngress -> String
show :: V1LoadBalancerIngress -> String
$cshowList :: [V1LoadBalancerIngress] -> ShowS
showList :: [V1LoadBalancerIngress] -> ShowS
P.Show, V1LoadBalancerIngress -> V1LoadBalancerIngress -> Bool
(V1LoadBalancerIngress -> V1LoadBalancerIngress -> Bool)
-> (V1LoadBalancerIngress -> V1LoadBalancerIngress -> Bool)
-> Eq V1LoadBalancerIngress
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1LoadBalancerIngress -> V1LoadBalancerIngress -> Bool
== :: V1LoadBalancerIngress -> V1LoadBalancerIngress -> Bool
$c/= :: V1LoadBalancerIngress -> V1LoadBalancerIngress -> Bool
/= :: V1LoadBalancerIngress -> V1LoadBalancerIngress -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1LoadBalancerIngress
instance A.FromJSON V1LoadBalancerIngress where
  parseJSON :: Value -> Parser V1LoadBalancerIngress
parseJSON = String
-> (Object -> Parser V1LoadBalancerIngress)
-> Value
-> Parser V1LoadBalancerIngress
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1LoadBalancerIngress" ((Object -> Parser V1LoadBalancerIngress)
 -> Value -> Parser V1LoadBalancerIngress)
-> (Object -> Parser V1LoadBalancerIngress)
-> Value
-> Parser V1LoadBalancerIngress
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [V1PortStatus]
-> V1LoadBalancerIngress
V1LoadBalancerIngress
      (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [V1PortStatus]
 -> V1LoadBalancerIngress)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe [V1PortStatus] -> V1LoadBalancerIngress)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"hostname")
      Parser
  (Maybe Text
   -> Maybe Text -> Maybe [V1PortStatus] -> V1LoadBalancerIngress)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe [V1PortStatus] -> V1LoadBalancerIngress)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ip")
      Parser
  (Maybe Text -> Maybe [V1PortStatus] -> V1LoadBalancerIngress)
-> Parser (Maybe Text)
-> Parser (Maybe [V1PortStatus] -> V1LoadBalancerIngress)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ipMode")
      Parser (Maybe [V1PortStatus] -> V1LoadBalancerIngress)
-> Parser (Maybe [V1PortStatus]) -> Parser V1LoadBalancerIngress
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1PortStatus])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ports")

-- | ToJSON V1LoadBalancerIngress
instance A.ToJSON V1LoadBalancerIngress where
  toJSON :: V1LoadBalancerIngress -> Value
toJSON V1LoadBalancerIngress {Maybe [V1PortStatus]
Maybe Text
$sel:v1LoadBalancerIngressHostname:V1LoadBalancerIngress :: V1LoadBalancerIngress -> Maybe Text
$sel:v1LoadBalancerIngressIp:V1LoadBalancerIngress :: V1LoadBalancerIngress -> Maybe Text
$sel:v1LoadBalancerIngressIpMode:V1LoadBalancerIngress :: V1LoadBalancerIngress -> Maybe Text
$sel:v1LoadBalancerIngressPorts:V1LoadBalancerIngress :: V1LoadBalancerIngress -> Maybe [V1PortStatus]
v1LoadBalancerIngressHostname :: Maybe Text
v1LoadBalancerIngressIp :: Maybe Text
v1LoadBalancerIngressIpMode :: Maybe Text
v1LoadBalancerIngressPorts :: Maybe [V1PortStatus]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"hostname" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1LoadBalancerIngressHostname
      , Key
"ip" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1LoadBalancerIngressIp
      , Key
"ipMode" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1LoadBalancerIngressIpMode
      , Key
"ports" Key -> Maybe [V1PortStatus] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1PortStatus]
v1LoadBalancerIngressPorts
      ]


-- | Construct a value of type 'V1LoadBalancerIngress' (by applying it's required fields, if any)
mkV1LoadBalancerIngress
  :: V1LoadBalancerIngress
mkV1LoadBalancerIngress :: V1LoadBalancerIngress
mkV1LoadBalancerIngress =
  V1LoadBalancerIngress
  { $sel:v1LoadBalancerIngressHostname:V1LoadBalancerIngress :: Maybe Text
v1LoadBalancerIngressHostname = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1LoadBalancerIngressIp:V1LoadBalancerIngress :: Maybe Text
v1LoadBalancerIngressIp = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1LoadBalancerIngressIpMode:V1LoadBalancerIngress :: Maybe Text
v1LoadBalancerIngressIpMode = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1LoadBalancerIngressPorts:V1LoadBalancerIngress :: Maybe [V1PortStatus]
v1LoadBalancerIngressPorts = Maybe [V1PortStatus]
forall a. Maybe a
Nothing
  }

-- ** V1LoadBalancerStatus
-- | V1LoadBalancerStatus
-- LoadBalancerStatus represents the status of a load-balancer.
data V1LoadBalancerStatus = V1LoadBalancerStatus
  { V1LoadBalancerStatus -> Maybe [V1LoadBalancerIngress]
v1LoadBalancerStatusIngress :: !(Maybe [V1LoadBalancerIngress]) -- ^ "ingress" - Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points.
  } deriving (Int -> V1LoadBalancerStatus -> ShowS
[V1LoadBalancerStatus] -> ShowS
V1LoadBalancerStatus -> String
(Int -> V1LoadBalancerStatus -> ShowS)
-> (V1LoadBalancerStatus -> String)
-> ([V1LoadBalancerStatus] -> ShowS)
-> Show V1LoadBalancerStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1LoadBalancerStatus -> ShowS
showsPrec :: Int -> V1LoadBalancerStatus -> ShowS
$cshow :: V1LoadBalancerStatus -> String
show :: V1LoadBalancerStatus -> String
$cshowList :: [V1LoadBalancerStatus] -> ShowS
showList :: [V1LoadBalancerStatus] -> ShowS
P.Show, V1LoadBalancerStatus -> V1LoadBalancerStatus -> Bool
(V1LoadBalancerStatus -> V1LoadBalancerStatus -> Bool)
-> (V1LoadBalancerStatus -> V1LoadBalancerStatus -> Bool)
-> Eq V1LoadBalancerStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1LoadBalancerStatus -> V1LoadBalancerStatus -> Bool
== :: V1LoadBalancerStatus -> V1LoadBalancerStatus -> Bool
$c/= :: V1LoadBalancerStatus -> V1LoadBalancerStatus -> Bool
/= :: V1LoadBalancerStatus -> V1LoadBalancerStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1LoadBalancerStatus
instance A.FromJSON V1LoadBalancerStatus where
  parseJSON :: Value -> Parser V1LoadBalancerStatus
parseJSON = String
-> (Object -> Parser V1LoadBalancerStatus)
-> Value
-> Parser V1LoadBalancerStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1LoadBalancerStatus" ((Object -> Parser V1LoadBalancerStatus)
 -> Value -> Parser V1LoadBalancerStatus)
-> (Object -> Parser V1LoadBalancerStatus)
-> Value
-> Parser V1LoadBalancerStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1LoadBalancerIngress] -> V1LoadBalancerStatus
V1LoadBalancerStatus
      (Maybe [V1LoadBalancerIngress] -> V1LoadBalancerStatus)
-> Parser (Maybe [V1LoadBalancerIngress])
-> Parser V1LoadBalancerStatus
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1LoadBalancerIngress])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ingress")

-- | ToJSON V1LoadBalancerStatus
instance A.ToJSON V1LoadBalancerStatus where
  toJSON :: V1LoadBalancerStatus -> Value
toJSON V1LoadBalancerStatus {Maybe [V1LoadBalancerIngress]
$sel:v1LoadBalancerStatusIngress:V1LoadBalancerStatus :: V1LoadBalancerStatus -> Maybe [V1LoadBalancerIngress]
v1LoadBalancerStatusIngress :: Maybe [V1LoadBalancerIngress]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"ingress" Key -> Maybe [V1LoadBalancerIngress] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1LoadBalancerIngress]
v1LoadBalancerStatusIngress
      ]


-- | Construct a value of type 'V1LoadBalancerStatus' (by applying it's required fields, if any)
mkV1LoadBalancerStatus
  :: V1LoadBalancerStatus
mkV1LoadBalancerStatus :: V1LoadBalancerStatus
mkV1LoadBalancerStatus =
  V1LoadBalancerStatus
  { $sel:v1LoadBalancerStatusIngress:V1LoadBalancerStatus :: Maybe [V1LoadBalancerIngress]
v1LoadBalancerStatusIngress = Maybe [V1LoadBalancerIngress]
forall a. Maybe a
Nothing
  }

-- ** V1LocalObjectReference
-- | V1LocalObjectReference
-- LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.
data V1LocalObjectReference = V1LocalObjectReference
  { V1LocalObjectReference -> Maybe Text
v1LocalObjectReferenceName :: !(Maybe Text) -- ^ "name" - Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  } deriving (Int -> V1LocalObjectReference -> ShowS
[V1LocalObjectReference] -> ShowS
V1LocalObjectReference -> String
(Int -> V1LocalObjectReference -> ShowS)
-> (V1LocalObjectReference -> String)
-> ([V1LocalObjectReference] -> ShowS)
-> Show V1LocalObjectReference
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1LocalObjectReference -> ShowS
showsPrec :: Int -> V1LocalObjectReference -> ShowS
$cshow :: V1LocalObjectReference -> String
show :: V1LocalObjectReference -> String
$cshowList :: [V1LocalObjectReference] -> ShowS
showList :: [V1LocalObjectReference] -> ShowS
P.Show, V1LocalObjectReference -> V1LocalObjectReference -> Bool
(V1LocalObjectReference -> V1LocalObjectReference -> Bool)
-> (V1LocalObjectReference -> V1LocalObjectReference -> Bool)
-> Eq V1LocalObjectReference
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1LocalObjectReference -> V1LocalObjectReference -> Bool
== :: V1LocalObjectReference -> V1LocalObjectReference -> Bool
$c/= :: V1LocalObjectReference -> V1LocalObjectReference -> Bool
/= :: V1LocalObjectReference -> V1LocalObjectReference -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1LocalObjectReference
instance A.FromJSON V1LocalObjectReference where
  parseJSON :: Value -> Parser V1LocalObjectReference
parseJSON = String
-> (Object -> Parser V1LocalObjectReference)
-> Value
-> Parser V1LocalObjectReference
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1LocalObjectReference" ((Object -> Parser V1LocalObjectReference)
 -> Value -> Parser V1LocalObjectReference)
-> (Object -> Parser V1LocalObjectReference)
-> Value
-> Parser V1LocalObjectReference
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> V1LocalObjectReference
V1LocalObjectReference
      (Maybe Text -> V1LocalObjectReference)
-> Parser (Maybe Text) -> Parser V1LocalObjectReference
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"name")

-- | ToJSON V1LocalObjectReference
instance A.ToJSON V1LocalObjectReference where
  toJSON :: V1LocalObjectReference -> Value
toJSON V1LocalObjectReference {Maybe Text
$sel:v1LocalObjectReferenceName:V1LocalObjectReference :: V1LocalObjectReference -> Maybe Text
v1LocalObjectReferenceName :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"name" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1LocalObjectReferenceName
      ]


-- | Construct a value of type 'V1LocalObjectReference' (by applying it's required fields, if any)
mkV1LocalObjectReference
  :: V1LocalObjectReference
mkV1LocalObjectReference :: V1LocalObjectReference
mkV1LocalObjectReference =
  V1LocalObjectReference
  { $sel:v1LocalObjectReferenceName:V1LocalObjectReference :: Maybe Text
v1LocalObjectReferenceName = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1LocalSubjectAccessReview
-- | V1LocalSubjectAccessReview
-- LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.
data V1LocalSubjectAccessReview = V1LocalSubjectAccessReview
  { V1LocalSubjectAccessReview -> Maybe Text
v1LocalSubjectAccessReviewApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1LocalSubjectAccessReview -> Maybe Text
v1LocalSubjectAccessReviewKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1LocalSubjectAccessReview -> Maybe V1ObjectMeta
v1LocalSubjectAccessReviewMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1LocalSubjectAccessReview -> V1SubjectAccessReviewSpec
v1LocalSubjectAccessReviewSpec :: !(V1SubjectAccessReviewSpec) -- ^ /Required/ "spec"
  , V1LocalSubjectAccessReview -> Maybe V1SubjectAccessReviewStatus
v1LocalSubjectAccessReviewStatus :: !(Maybe V1SubjectAccessReviewStatus) -- ^ "status"
  } deriving (Int -> V1LocalSubjectAccessReview -> ShowS
[V1LocalSubjectAccessReview] -> ShowS
V1LocalSubjectAccessReview -> String
(Int -> V1LocalSubjectAccessReview -> ShowS)
-> (V1LocalSubjectAccessReview -> String)
-> ([V1LocalSubjectAccessReview] -> ShowS)
-> Show V1LocalSubjectAccessReview
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1LocalSubjectAccessReview -> ShowS
showsPrec :: Int -> V1LocalSubjectAccessReview -> ShowS
$cshow :: V1LocalSubjectAccessReview -> String
show :: V1LocalSubjectAccessReview -> String
$cshowList :: [V1LocalSubjectAccessReview] -> ShowS
showList :: [V1LocalSubjectAccessReview] -> ShowS
P.Show, V1LocalSubjectAccessReview -> V1LocalSubjectAccessReview -> Bool
(V1LocalSubjectAccessReview -> V1LocalSubjectAccessReview -> Bool)
-> (V1LocalSubjectAccessReview
    -> V1LocalSubjectAccessReview -> Bool)
-> Eq V1LocalSubjectAccessReview
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1LocalSubjectAccessReview -> V1LocalSubjectAccessReview -> Bool
== :: V1LocalSubjectAccessReview -> V1LocalSubjectAccessReview -> Bool
$c/= :: V1LocalSubjectAccessReview -> V1LocalSubjectAccessReview -> Bool
/= :: V1LocalSubjectAccessReview -> V1LocalSubjectAccessReview -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1LocalSubjectAccessReview
instance A.FromJSON V1LocalSubjectAccessReview where
  parseJSON :: Value -> Parser V1LocalSubjectAccessReview
parseJSON = String
-> (Object -> Parser V1LocalSubjectAccessReview)
-> Value
-> Parser V1LocalSubjectAccessReview
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1LocalSubjectAccessReview" ((Object -> Parser V1LocalSubjectAccessReview)
 -> Value -> Parser V1LocalSubjectAccessReview)
-> (Object -> Parser V1LocalSubjectAccessReview)
-> Value
-> Parser V1LocalSubjectAccessReview
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> V1SubjectAccessReviewSpec
-> Maybe V1SubjectAccessReviewStatus
-> V1LocalSubjectAccessReview
V1LocalSubjectAccessReview
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> V1SubjectAccessReviewSpec
 -> Maybe V1SubjectAccessReviewStatus
 -> V1LocalSubjectAccessReview)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> V1SubjectAccessReviewSpec
      -> Maybe V1SubjectAccessReviewStatus
      -> V1LocalSubjectAccessReview)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> V1SubjectAccessReviewSpec
   -> Maybe V1SubjectAccessReviewStatus
   -> V1LocalSubjectAccessReview)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> V1SubjectAccessReviewSpec
      -> Maybe V1SubjectAccessReviewStatus
      -> V1LocalSubjectAccessReview)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> V1SubjectAccessReviewSpec
   -> Maybe V1SubjectAccessReviewStatus
   -> V1LocalSubjectAccessReview)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (V1SubjectAccessReviewSpec
      -> Maybe V1SubjectAccessReviewStatus -> V1LocalSubjectAccessReview)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (V1SubjectAccessReviewSpec
   -> Maybe V1SubjectAccessReviewStatus -> V1LocalSubjectAccessReview)
-> Parser V1SubjectAccessReviewSpec
-> Parser
     (Maybe V1SubjectAccessReviewStatus -> V1LocalSubjectAccessReview)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1SubjectAccessReviewSpec
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"spec")
      Parser
  (Maybe V1SubjectAccessReviewStatus -> V1LocalSubjectAccessReview)
-> Parser (Maybe V1SubjectAccessReviewStatus)
-> Parser V1LocalSubjectAccessReview
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1SubjectAccessReviewStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1LocalSubjectAccessReview
instance A.ToJSON V1LocalSubjectAccessReview where
  toJSON :: V1LocalSubjectAccessReview -> Value
toJSON V1LocalSubjectAccessReview {Maybe Text
Maybe V1SubjectAccessReviewStatus
Maybe V1ObjectMeta
V1SubjectAccessReviewSpec
$sel:v1LocalSubjectAccessReviewApiVersion:V1LocalSubjectAccessReview :: V1LocalSubjectAccessReview -> Maybe Text
$sel:v1LocalSubjectAccessReviewKind:V1LocalSubjectAccessReview :: V1LocalSubjectAccessReview -> Maybe Text
$sel:v1LocalSubjectAccessReviewMetadata:V1LocalSubjectAccessReview :: V1LocalSubjectAccessReview -> Maybe V1ObjectMeta
$sel:v1LocalSubjectAccessReviewSpec:V1LocalSubjectAccessReview :: V1LocalSubjectAccessReview -> V1SubjectAccessReviewSpec
$sel:v1LocalSubjectAccessReviewStatus:V1LocalSubjectAccessReview :: V1LocalSubjectAccessReview -> Maybe V1SubjectAccessReviewStatus
v1LocalSubjectAccessReviewApiVersion :: Maybe Text
v1LocalSubjectAccessReviewKind :: Maybe Text
v1LocalSubjectAccessReviewMetadata :: Maybe V1ObjectMeta
v1LocalSubjectAccessReviewSpec :: V1SubjectAccessReviewSpec
v1LocalSubjectAccessReviewStatus :: Maybe V1SubjectAccessReviewStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1LocalSubjectAccessReviewApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1LocalSubjectAccessReviewKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1LocalSubjectAccessReviewMetadata
      , Key
"spec" Key -> V1SubjectAccessReviewSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1SubjectAccessReviewSpec
v1LocalSubjectAccessReviewSpec
      , Key
"status" Key -> Maybe V1SubjectAccessReviewStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1SubjectAccessReviewStatus
v1LocalSubjectAccessReviewStatus
      ]


-- | Construct a value of type 'V1LocalSubjectAccessReview' (by applying it's required fields, if any)
mkV1LocalSubjectAccessReview
  :: V1SubjectAccessReviewSpec -- ^ 'v1LocalSubjectAccessReviewSpec' 
  -> V1LocalSubjectAccessReview
mkV1LocalSubjectAccessReview :: V1SubjectAccessReviewSpec -> V1LocalSubjectAccessReview
mkV1LocalSubjectAccessReview V1SubjectAccessReviewSpec
v1LocalSubjectAccessReviewSpec =
  V1LocalSubjectAccessReview
  { $sel:v1LocalSubjectAccessReviewApiVersion:V1LocalSubjectAccessReview :: Maybe Text
v1LocalSubjectAccessReviewApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1LocalSubjectAccessReviewKind:V1LocalSubjectAccessReview :: Maybe Text
v1LocalSubjectAccessReviewKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1LocalSubjectAccessReviewMetadata:V1LocalSubjectAccessReview :: Maybe V1ObjectMeta
v1LocalSubjectAccessReviewMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , V1SubjectAccessReviewSpec
$sel:v1LocalSubjectAccessReviewSpec:V1LocalSubjectAccessReview :: V1SubjectAccessReviewSpec
v1LocalSubjectAccessReviewSpec :: V1SubjectAccessReviewSpec
v1LocalSubjectAccessReviewSpec
  , $sel:v1LocalSubjectAccessReviewStatus:V1LocalSubjectAccessReview :: Maybe V1SubjectAccessReviewStatus
v1LocalSubjectAccessReviewStatus = Maybe V1SubjectAccessReviewStatus
forall a. Maybe a
Nothing
  }

-- ** V1LocalVolumeSource
-- | V1LocalVolumeSource
-- Local represents directly-attached storage with node affinity
data V1LocalVolumeSource = V1LocalVolumeSource
  { V1LocalVolumeSource -> Maybe Text
v1LocalVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - fsType is the filesystem type to mount. It applies only when the Path is a block device. Must be a filesystem type supported by the host operating system. Ex. \&quot;ext4\&quot;, \&quot;xfs\&quot;, \&quot;ntfs\&quot;. The default value is to auto-select a filesystem if unspecified.
  , V1LocalVolumeSource -> Text
v1LocalVolumeSourcePath :: !(Text) -- ^ /Required/ "path" - path of the full path to the volume on the node. It can be either a directory or block device (disk, partition, ...).
  } deriving (Int -> V1LocalVolumeSource -> ShowS
[V1LocalVolumeSource] -> ShowS
V1LocalVolumeSource -> String
(Int -> V1LocalVolumeSource -> ShowS)
-> (V1LocalVolumeSource -> String)
-> ([V1LocalVolumeSource] -> ShowS)
-> Show V1LocalVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1LocalVolumeSource -> ShowS
showsPrec :: Int -> V1LocalVolumeSource -> ShowS
$cshow :: V1LocalVolumeSource -> String
show :: V1LocalVolumeSource -> String
$cshowList :: [V1LocalVolumeSource] -> ShowS
showList :: [V1LocalVolumeSource] -> ShowS
P.Show, V1LocalVolumeSource -> V1LocalVolumeSource -> Bool
(V1LocalVolumeSource -> V1LocalVolumeSource -> Bool)
-> (V1LocalVolumeSource -> V1LocalVolumeSource -> Bool)
-> Eq V1LocalVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1LocalVolumeSource -> V1LocalVolumeSource -> Bool
== :: V1LocalVolumeSource -> V1LocalVolumeSource -> Bool
$c/= :: V1LocalVolumeSource -> V1LocalVolumeSource -> Bool
/= :: V1LocalVolumeSource -> V1LocalVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1LocalVolumeSource
instance A.FromJSON V1LocalVolumeSource where
  parseJSON :: Value -> Parser V1LocalVolumeSource
parseJSON = String
-> (Object -> Parser V1LocalVolumeSource)
-> Value
-> Parser V1LocalVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1LocalVolumeSource" ((Object -> Parser V1LocalVolumeSource)
 -> Value -> Parser V1LocalVolumeSource)
-> (Object -> Parser V1LocalVolumeSource)
-> Value
-> Parser V1LocalVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Text -> V1LocalVolumeSource
V1LocalVolumeSource
      (Maybe Text -> Text -> V1LocalVolumeSource)
-> Parser (Maybe Text) -> Parser (Text -> V1LocalVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fsType")
      Parser (Text -> V1LocalVolumeSource)
-> Parser Text -> Parser V1LocalVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"path")

-- | ToJSON V1LocalVolumeSource
instance A.ToJSON V1LocalVolumeSource where
  toJSON :: V1LocalVolumeSource -> Value
toJSON V1LocalVolumeSource {Maybe Text
Text
$sel:v1LocalVolumeSourceFsType:V1LocalVolumeSource :: V1LocalVolumeSource -> Maybe Text
$sel:v1LocalVolumeSourcePath:V1LocalVolumeSource :: V1LocalVolumeSource -> Text
v1LocalVolumeSourceFsType :: Maybe Text
v1LocalVolumeSourcePath :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"fsType" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1LocalVolumeSourceFsType
      , Key
"path" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1LocalVolumeSourcePath
      ]


-- | Construct a value of type 'V1LocalVolumeSource' (by applying it's required fields, if any)
mkV1LocalVolumeSource
  :: Text -- ^ 'v1LocalVolumeSourcePath': path of the full path to the volume on the node. It can be either a directory or block device (disk, partition, ...).
  -> V1LocalVolumeSource
mkV1LocalVolumeSource :: Text -> V1LocalVolumeSource
mkV1LocalVolumeSource Text
v1LocalVolumeSourcePath =
  V1LocalVolumeSource
  { $sel:v1LocalVolumeSourceFsType:V1LocalVolumeSource :: Maybe Text
v1LocalVolumeSourceFsType = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1LocalVolumeSourcePath:V1LocalVolumeSource :: Text
v1LocalVolumeSourcePath :: Text
v1LocalVolumeSourcePath
  }

-- ** V1ManagedFieldsEntry
-- | V1ManagedFieldsEntry
-- ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to.
data V1ManagedFieldsEntry = V1ManagedFieldsEntry
  { V1ManagedFieldsEntry -> Maybe Text
v1ManagedFieldsEntryApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the version of this resource that this field set applies to. The format is \&quot;group/version\&quot; just like the top-level APIVersion field. It is necessary to track the version of a field set because it cannot be automatically converted.
  , V1ManagedFieldsEntry -> Maybe Text
v1ManagedFieldsEntryFieldsType :: !(Maybe Text) -- ^ "fieldsType" - FieldsType is the discriminator for the different fields format and version. There is currently only one possible value: \&quot;FieldsV1\&quot;
  , V1ManagedFieldsEntry -> Maybe Value
v1ManagedFieldsEntryFieldsV1 :: !(Maybe A.Value) -- ^ "fieldsV1" - FieldsV1 holds the first JSON version format as described in the \&quot;FieldsV1\&quot; type.
  , V1ManagedFieldsEntry -> Maybe Text
v1ManagedFieldsEntryManager :: !(Maybe Text) -- ^ "manager" - Manager is an identifier of the workflow managing these fields.
  , V1ManagedFieldsEntry -> Maybe Text
v1ManagedFieldsEntryOperation :: !(Maybe Text) -- ^ "operation" - Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are &#39;Apply&#39; and &#39;Update&#39;.
  , V1ManagedFieldsEntry -> Maybe Text
v1ManagedFieldsEntrySubresource :: !(Maybe Text) -- ^ "subresource" - Subresource is the name of the subresource used to update that object, or empty string if the object was updated through the main resource. The value of this field is used to distinguish between managers, even if they share the same name. For example, a status update will be distinct from a regular update using the same manager name. Note that the APIVersion field is not related to the Subresource field and it always corresponds to the version of the main resource.
  , V1ManagedFieldsEntry -> Maybe DateTime
v1ManagedFieldsEntryTime :: !(Maybe DateTime) -- ^ "time" - Time is the timestamp of when the ManagedFields entry was added. The timestamp will also be updated if a field is added, the manager changes any of the owned fields value or removes a field. The timestamp does not update when a field is removed from the entry because another manager took it over.
  } deriving (Int -> V1ManagedFieldsEntry -> ShowS
[V1ManagedFieldsEntry] -> ShowS
V1ManagedFieldsEntry -> String
(Int -> V1ManagedFieldsEntry -> ShowS)
-> (V1ManagedFieldsEntry -> String)
-> ([V1ManagedFieldsEntry] -> ShowS)
-> Show V1ManagedFieldsEntry
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ManagedFieldsEntry -> ShowS
showsPrec :: Int -> V1ManagedFieldsEntry -> ShowS
$cshow :: V1ManagedFieldsEntry -> String
show :: V1ManagedFieldsEntry -> String
$cshowList :: [V1ManagedFieldsEntry] -> ShowS
showList :: [V1ManagedFieldsEntry] -> ShowS
P.Show, V1ManagedFieldsEntry -> V1ManagedFieldsEntry -> Bool
(V1ManagedFieldsEntry -> V1ManagedFieldsEntry -> Bool)
-> (V1ManagedFieldsEntry -> V1ManagedFieldsEntry -> Bool)
-> Eq V1ManagedFieldsEntry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ManagedFieldsEntry -> V1ManagedFieldsEntry -> Bool
== :: V1ManagedFieldsEntry -> V1ManagedFieldsEntry -> Bool
$c/= :: V1ManagedFieldsEntry -> V1ManagedFieldsEntry -> Bool
/= :: V1ManagedFieldsEntry -> V1ManagedFieldsEntry -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ManagedFieldsEntry
instance A.FromJSON V1ManagedFieldsEntry where
  parseJSON :: Value -> Parser V1ManagedFieldsEntry
parseJSON = String
-> (Object -> Parser V1ManagedFieldsEntry)
-> Value
-> Parser V1ManagedFieldsEntry
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ManagedFieldsEntry" ((Object -> Parser V1ManagedFieldsEntry)
 -> Value -> Parser V1ManagedFieldsEntry)
-> (Object -> Parser V1ManagedFieldsEntry)
-> Value
-> Parser V1ManagedFieldsEntry
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> V1ManagedFieldsEntry
V1ManagedFieldsEntry
      (Maybe Text
 -> Maybe Text
 -> Maybe Value
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe DateTime
 -> V1ManagedFieldsEntry)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Value
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe DateTime
      -> V1ManagedFieldsEntry)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe Value
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe DateTime
   -> V1ManagedFieldsEntry)
-> Parser (Maybe Text)
-> Parser
     (Maybe Value
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe DateTime
      -> V1ManagedFieldsEntry)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fieldsType")
      Parser
  (Maybe Value
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe DateTime
   -> V1ManagedFieldsEntry)
-> Parser (Maybe Value)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe DateTime
      -> V1ManagedFieldsEntry)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Value)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fieldsV1")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe DateTime
   -> V1ManagedFieldsEntry)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe DateTime -> V1ManagedFieldsEntry)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"manager")
      Parser
  (Maybe Text
   -> Maybe Text -> Maybe DateTime -> V1ManagedFieldsEntry)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe DateTime -> V1ManagedFieldsEntry)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"operation")
      Parser (Maybe Text -> Maybe DateTime -> V1ManagedFieldsEntry)
-> Parser (Maybe Text)
-> Parser (Maybe DateTime -> V1ManagedFieldsEntry)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"subresource")
      Parser (Maybe DateTime -> V1ManagedFieldsEntry)
-> Parser (Maybe DateTime) -> Parser V1ManagedFieldsEntry
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"time")

-- | ToJSON V1ManagedFieldsEntry
instance A.ToJSON V1ManagedFieldsEntry where
  toJSON :: V1ManagedFieldsEntry -> Value
toJSON V1ManagedFieldsEntry {Maybe Value
Maybe Text
Maybe DateTime
$sel:v1ManagedFieldsEntryApiVersion:V1ManagedFieldsEntry :: V1ManagedFieldsEntry -> Maybe Text
$sel:v1ManagedFieldsEntryFieldsType:V1ManagedFieldsEntry :: V1ManagedFieldsEntry -> Maybe Text
$sel:v1ManagedFieldsEntryFieldsV1:V1ManagedFieldsEntry :: V1ManagedFieldsEntry -> Maybe Value
$sel:v1ManagedFieldsEntryManager:V1ManagedFieldsEntry :: V1ManagedFieldsEntry -> Maybe Text
$sel:v1ManagedFieldsEntryOperation:V1ManagedFieldsEntry :: V1ManagedFieldsEntry -> Maybe Text
$sel:v1ManagedFieldsEntrySubresource:V1ManagedFieldsEntry :: V1ManagedFieldsEntry -> Maybe Text
$sel:v1ManagedFieldsEntryTime:V1ManagedFieldsEntry :: V1ManagedFieldsEntry -> Maybe DateTime
v1ManagedFieldsEntryApiVersion :: Maybe Text
v1ManagedFieldsEntryFieldsType :: Maybe Text
v1ManagedFieldsEntryFieldsV1 :: Maybe Value
v1ManagedFieldsEntryManager :: Maybe Text
v1ManagedFieldsEntryOperation :: Maybe Text
v1ManagedFieldsEntrySubresource :: Maybe Text
v1ManagedFieldsEntryTime :: Maybe DateTime
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ManagedFieldsEntryApiVersion
      , Key
"fieldsType" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ManagedFieldsEntryFieldsType
      , Key
"fieldsV1" Key -> Maybe Value -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Value
v1ManagedFieldsEntryFieldsV1
      , Key
"manager" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ManagedFieldsEntryManager
      , Key
"operation" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ManagedFieldsEntryOperation
      , Key
"subresource" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ManagedFieldsEntrySubresource
      , Key
"time" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1ManagedFieldsEntryTime
      ]


-- | Construct a value of type 'V1ManagedFieldsEntry' (by applying it's required fields, if any)
mkV1ManagedFieldsEntry
  :: V1ManagedFieldsEntry
mkV1ManagedFieldsEntry :: V1ManagedFieldsEntry
mkV1ManagedFieldsEntry =
  V1ManagedFieldsEntry
  { $sel:v1ManagedFieldsEntryApiVersion:V1ManagedFieldsEntry :: Maybe Text
v1ManagedFieldsEntryApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ManagedFieldsEntryFieldsType:V1ManagedFieldsEntry :: Maybe Text
v1ManagedFieldsEntryFieldsType = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ManagedFieldsEntryFieldsV1:V1ManagedFieldsEntry :: Maybe Value
v1ManagedFieldsEntryFieldsV1 = Maybe Value
forall a. Maybe a
Nothing
  , $sel:v1ManagedFieldsEntryManager:V1ManagedFieldsEntry :: Maybe Text
v1ManagedFieldsEntryManager = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ManagedFieldsEntryOperation:V1ManagedFieldsEntry :: Maybe Text
v1ManagedFieldsEntryOperation = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ManagedFieldsEntrySubresource:V1ManagedFieldsEntry :: Maybe Text
v1ManagedFieldsEntrySubresource = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ManagedFieldsEntryTime:V1ManagedFieldsEntry :: Maybe DateTime
v1ManagedFieldsEntryTime = Maybe DateTime
forall a. Maybe a
Nothing
  }

-- ** V1MatchCondition
-- | V1MatchCondition
-- MatchCondition represents a condition which must by fulfilled for a request to be sent to a webhook.
data V1MatchCondition = V1MatchCondition
  { V1MatchCondition -> Text
v1MatchConditionExpression :: !(Text) -- ^ /Required/ "expression" - Expression represents the expression which will be evaluated by CEL. Must evaluate to bool. CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:  &#39;object&#39; - The object from the incoming request. The value is null for DELETE requests. &#39;oldObject&#39; - The existing object. The value is null for CREATE requests. &#39;request&#39; - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest). &#39;authorizer&#39; - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.   See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz &#39;authorizer.requestResource&#39; - A CEL ResourceCheck constructed from the &#39;authorizer&#39; and configured with the   request resource. Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/  Required.
  , V1MatchCondition -> Text
v1MatchConditionName :: !(Text) -- ^ /Required/ "name" - Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, &#39;-&#39;, &#39;_&#39; or &#39;.&#39;, and must start and end with an alphanumeric character (e.g. &#39;MyName&#39;,  or &#39;my.name&#39;,  or &#39;123-abc&#39;, regex used for validation is &#39;([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]&#39;) with an optional DNS subdomain prefix and &#39;/&#39; (e.g. &#39;example.com/MyName&#39;)  Required.
  } deriving (Int -> V1MatchCondition -> ShowS
[V1MatchCondition] -> ShowS
V1MatchCondition -> String
(Int -> V1MatchCondition -> ShowS)
-> (V1MatchCondition -> String)
-> ([V1MatchCondition] -> ShowS)
-> Show V1MatchCondition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1MatchCondition -> ShowS
showsPrec :: Int -> V1MatchCondition -> ShowS
$cshow :: V1MatchCondition -> String
show :: V1MatchCondition -> String
$cshowList :: [V1MatchCondition] -> ShowS
showList :: [V1MatchCondition] -> ShowS
P.Show, V1MatchCondition -> V1MatchCondition -> Bool
(V1MatchCondition -> V1MatchCondition -> Bool)
-> (V1MatchCondition -> V1MatchCondition -> Bool)
-> Eq V1MatchCondition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1MatchCondition -> V1MatchCondition -> Bool
== :: V1MatchCondition -> V1MatchCondition -> Bool
$c/= :: V1MatchCondition -> V1MatchCondition -> Bool
/= :: V1MatchCondition -> V1MatchCondition -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1MatchCondition
instance A.FromJSON V1MatchCondition where
  parseJSON :: Value -> Parser V1MatchCondition
parseJSON = String
-> (Object -> Parser V1MatchCondition)
-> Value
-> Parser V1MatchCondition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1MatchCondition" ((Object -> Parser V1MatchCondition)
 -> Value -> Parser V1MatchCondition)
-> (Object -> Parser V1MatchCondition)
-> Value
-> Parser V1MatchCondition
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Text -> V1MatchCondition
V1MatchCondition
      (Text -> Text -> V1MatchCondition)
-> Parser Text -> Parser (Text -> V1MatchCondition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"expression")
      Parser (Text -> V1MatchCondition)
-> Parser Text -> Parser V1MatchCondition
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")

-- | ToJSON V1MatchCondition
instance A.ToJSON V1MatchCondition where
  toJSON :: V1MatchCondition -> Value
toJSON V1MatchCondition {Text
$sel:v1MatchConditionExpression:V1MatchCondition :: V1MatchCondition -> Text
$sel:v1MatchConditionName:V1MatchCondition :: V1MatchCondition -> Text
v1MatchConditionExpression :: Text
v1MatchConditionName :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"expression" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1MatchConditionExpression
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1MatchConditionName
      ]


-- | Construct a value of type 'V1MatchCondition' (by applying it's required fields, if any)
mkV1MatchCondition
  :: Text -- ^ 'v1MatchConditionExpression': Expression represents the expression which will be evaluated by CEL. Must evaluate to bool. CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:  'object' - The object from the incoming request. The value is null for DELETE requests. 'oldObject' - The existing object. The value is null for CREATE requests. 'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest). 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.   See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the   request resource. Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/  Required.
  -> Text -- ^ 'v1MatchConditionName': Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName',  or 'my.name',  or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')  Required.
  -> V1MatchCondition
mkV1MatchCondition :: Text -> Text -> V1MatchCondition
mkV1MatchCondition Text
v1MatchConditionExpression Text
v1MatchConditionName =
  V1MatchCondition
  { Text
$sel:v1MatchConditionExpression:V1MatchCondition :: Text
v1MatchConditionExpression :: Text
v1MatchConditionExpression
  , Text
$sel:v1MatchConditionName:V1MatchCondition :: Text
v1MatchConditionName :: Text
v1MatchConditionName
  }

-- ** V1MatchResources
-- | V1MatchResources
-- MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
data V1MatchResources = V1MatchResources
  { V1MatchResources -> Maybe [V1NamedRuleWithOperations]
v1MatchResourcesExcludeResourceRules :: !(Maybe [V1NamedRuleWithOperations]) -- ^ "excludeResourceRules" - ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
  , V1MatchResources -> Maybe Text
v1MatchResourcesMatchPolicy :: !(Maybe Text) -- ^ "matchPolicy" - matchPolicy defines how the \&quot;MatchResources\&quot; list is used to match incoming requests. Allowed values are \&quot;Exact\&quot; or \&quot;Equivalent\&quot;.  - Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \&quot;rules\&quot; only included &#x60;apiGroups:[\&quot;apps\&quot;], apiVersions:[\&quot;v1\&quot;], resources: [\&quot;deployments\&quot;]&#x60;, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy.  - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \&quot;rules\&quot; only included &#x60;apiGroups:[\&quot;apps\&quot;], apiVersions:[\&quot;v1\&quot;], resources: [\&quot;deployments\&quot;]&#x60;, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy.  Defaults to \&quot;Equivalent\&quot;
  , V1MatchResources -> Maybe V1LabelSelector
v1MatchResourcesNamespaceSelector :: !(Maybe V1LabelSelector) -- ^ "namespaceSelector"
  , V1MatchResources -> Maybe V1LabelSelector
v1MatchResourcesObjectSelector :: !(Maybe V1LabelSelector) -- ^ "objectSelector"
  , V1MatchResources -> Maybe [V1NamedRuleWithOperations]
v1MatchResourcesResourceRules :: !(Maybe [V1NamedRuleWithOperations]) -- ^ "resourceRules" - ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. The policy cares about an operation if it matches _any_ Rule.
  } deriving (Int -> V1MatchResources -> ShowS
[V1MatchResources] -> ShowS
V1MatchResources -> String
(Int -> V1MatchResources -> ShowS)
-> (V1MatchResources -> String)
-> ([V1MatchResources] -> ShowS)
-> Show V1MatchResources
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1MatchResources -> ShowS
showsPrec :: Int -> V1MatchResources -> ShowS
$cshow :: V1MatchResources -> String
show :: V1MatchResources -> String
$cshowList :: [V1MatchResources] -> ShowS
showList :: [V1MatchResources] -> ShowS
P.Show, V1MatchResources -> V1MatchResources -> Bool
(V1MatchResources -> V1MatchResources -> Bool)
-> (V1MatchResources -> V1MatchResources -> Bool)
-> Eq V1MatchResources
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1MatchResources -> V1MatchResources -> Bool
== :: V1MatchResources -> V1MatchResources -> Bool
$c/= :: V1MatchResources -> V1MatchResources -> Bool
/= :: V1MatchResources -> V1MatchResources -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1MatchResources
instance A.FromJSON V1MatchResources where
  parseJSON :: Value -> Parser V1MatchResources
parseJSON = String
-> (Object -> Parser V1MatchResources)
-> Value
-> Parser V1MatchResources
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1MatchResources" ((Object -> Parser V1MatchResources)
 -> Value -> Parser V1MatchResources)
-> (Object -> Parser V1MatchResources)
-> Value
-> Parser V1MatchResources
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1NamedRuleWithOperations]
-> Maybe Text
-> Maybe V1LabelSelector
-> Maybe V1LabelSelector
-> Maybe [V1NamedRuleWithOperations]
-> V1MatchResources
V1MatchResources
      (Maybe [V1NamedRuleWithOperations]
 -> Maybe Text
 -> Maybe V1LabelSelector
 -> Maybe V1LabelSelector
 -> Maybe [V1NamedRuleWithOperations]
 -> V1MatchResources)
-> Parser (Maybe [V1NamedRuleWithOperations])
-> Parser
     (Maybe Text
      -> Maybe V1LabelSelector
      -> Maybe V1LabelSelector
      -> Maybe [V1NamedRuleWithOperations]
      -> V1MatchResources)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1NamedRuleWithOperations])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"excludeResourceRules")
      Parser
  (Maybe Text
   -> Maybe V1LabelSelector
   -> Maybe V1LabelSelector
   -> Maybe [V1NamedRuleWithOperations]
   -> V1MatchResources)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1LabelSelector
      -> Maybe V1LabelSelector
      -> Maybe [V1NamedRuleWithOperations]
      -> V1MatchResources)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"matchPolicy")
      Parser
  (Maybe V1LabelSelector
   -> Maybe V1LabelSelector
   -> Maybe [V1NamedRuleWithOperations]
   -> V1MatchResources)
-> Parser (Maybe V1LabelSelector)
-> Parser
     (Maybe V1LabelSelector
      -> Maybe [V1NamedRuleWithOperations] -> V1MatchResources)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LabelSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"namespaceSelector")
      Parser
  (Maybe V1LabelSelector
   -> Maybe [V1NamedRuleWithOperations] -> V1MatchResources)
-> Parser (Maybe V1LabelSelector)
-> Parser (Maybe [V1NamedRuleWithOperations] -> V1MatchResources)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LabelSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"objectSelector")
      Parser (Maybe [V1NamedRuleWithOperations] -> V1MatchResources)
-> Parser (Maybe [V1NamedRuleWithOperations])
-> Parser V1MatchResources
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1NamedRuleWithOperations])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resourceRules")

-- | ToJSON V1MatchResources
instance A.ToJSON V1MatchResources where
  toJSON :: V1MatchResources -> Value
toJSON V1MatchResources {Maybe [V1NamedRuleWithOperations]
Maybe Text
Maybe V1LabelSelector
$sel:v1MatchResourcesExcludeResourceRules:V1MatchResources :: V1MatchResources -> Maybe [V1NamedRuleWithOperations]
$sel:v1MatchResourcesMatchPolicy:V1MatchResources :: V1MatchResources -> Maybe Text
$sel:v1MatchResourcesNamespaceSelector:V1MatchResources :: V1MatchResources -> Maybe V1LabelSelector
$sel:v1MatchResourcesObjectSelector:V1MatchResources :: V1MatchResources -> Maybe V1LabelSelector
$sel:v1MatchResourcesResourceRules:V1MatchResources :: V1MatchResources -> Maybe [V1NamedRuleWithOperations]
v1MatchResourcesExcludeResourceRules :: Maybe [V1NamedRuleWithOperations]
v1MatchResourcesMatchPolicy :: Maybe Text
v1MatchResourcesNamespaceSelector :: Maybe V1LabelSelector
v1MatchResourcesObjectSelector :: Maybe V1LabelSelector
v1MatchResourcesResourceRules :: Maybe [V1NamedRuleWithOperations]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"excludeResourceRules" Key -> Maybe [V1NamedRuleWithOperations] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1NamedRuleWithOperations]
v1MatchResourcesExcludeResourceRules
      , Key
"matchPolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1MatchResourcesMatchPolicy
      , Key
"namespaceSelector" Key -> Maybe V1LabelSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LabelSelector
v1MatchResourcesNamespaceSelector
      , Key
"objectSelector" Key -> Maybe V1LabelSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LabelSelector
v1MatchResourcesObjectSelector
      , Key
"resourceRules" Key -> Maybe [V1NamedRuleWithOperations] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1NamedRuleWithOperations]
v1MatchResourcesResourceRules
      ]


-- | Construct a value of type 'V1MatchResources' (by applying it's required fields, if any)
mkV1MatchResources
  :: V1MatchResources
mkV1MatchResources :: V1MatchResources
mkV1MatchResources =
  V1MatchResources
  { $sel:v1MatchResourcesExcludeResourceRules:V1MatchResources :: Maybe [V1NamedRuleWithOperations]
v1MatchResourcesExcludeResourceRules = Maybe [V1NamedRuleWithOperations]
forall a. Maybe a
Nothing
  , $sel:v1MatchResourcesMatchPolicy:V1MatchResources :: Maybe Text
v1MatchResourcesMatchPolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1MatchResourcesNamespaceSelector:V1MatchResources :: Maybe V1LabelSelector
v1MatchResourcesNamespaceSelector = Maybe V1LabelSelector
forall a. Maybe a
Nothing
  , $sel:v1MatchResourcesObjectSelector:V1MatchResources :: Maybe V1LabelSelector
v1MatchResourcesObjectSelector = Maybe V1LabelSelector
forall a. Maybe a
Nothing
  , $sel:v1MatchResourcesResourceRules:V1MatchResources :: Maybe [V1NamedRuleWithOperations]
v1MatchResourcesResourceRules = Maybe [V1NamedRuleWithOperations]
forall a. Maybe a
Nothing
  }

-- ** V1ModifyVolumeStatus
-- | V1ModifyVolumeStatus
-- ModifyVolumeStatus represents the status object of ControllerModifyVolume operation
data V1ModifyVolumeStatus = V1ModifyVolumeStatus
  { V1ModifyVolumeStatus -> Text
v1ModifyVolumeStatusStatus :: !(Text) -- ^ /Required/ "status" - status is the status of the ControllerModifyVolume operation. It can be in any of following states:  - Pending    Pending indicates that the PersistentVolumeClaim cannot be modified due to unmet requirements, such as    the specified VolumeAttributesClass not existing.  - InProgress    InProgress indicates that the volume is being modified.  - Infeasible   Infeasible indicates that the request has been rejected as invalid by the CSI driver. To    resolve the error, a valid VolumeAttributesClass needs to be specified. Note: New statuses can be added in the future. Consumers should check for unknown statuses and fail appropriately.
  , V1ModifyVolumeStatus -> Maybe Text
v1ModifyVolumeStatusTargetVolumeAttributesClassName :: !(Maybe Text) -- ^ "targetVolumeAttributesClassName" - targetVolumeAttributesClassName is the name of the VolumeAttributesClass the PVC currently being reconciled
  } deriving (Int -> V1ModifyVolumeStatus -> ShowS
[V1ModifyVolumeStatus] -> ShowS
V1ModifyVolumeStatus -> String
(Int -> V1ModifyVolumeStatus -> ShowS)
-> (V1ModifyVolumeStatus -> String)
-> ([V1ModifyVolumeStatus] -> ShowS)
-> Show V1ModifyVolumeStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ModifyVolumeStatus -> ShowS
showsPrec :: Int -> V1ModifyVolumeStatus -> ShowS
$cshow :: V1ModifyVolumeStatus -> String
show :: V1ModifyVolumeStatus -> String
$cshowList :: [V1ModifyVolumeStatus] -> ShowS
showList :: [V1ModifyVolumeStatus] -> ShowS
P.Show, V1ModifyVolumeStatus -> V1ModifyVolumeStatus -> Bool
(V1ModifyVolumeStatus -> V1ModifyVolumeStatus -> Bool)
-> (V1ModifyVolumeStatus -> V1ModifyVolumeStatus -> Bool)
-> Eq V1ModifyVolumeStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ModifyVolumeStatus -> V1ModifyVolumeStatus -> Bool
== :: V1ModifyVolumeStatus -> V1ModifyVolumeStatus -> Bool
$c/= :: V1ModifyVolumeStatus -> V1ModifyVolumeStatus -> Bool
/= :: V1ModifyVolumeStatus -> V1ModifyVolumeStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ModifyVolumeStatus
instance A.FromJSON V1ModifyVolumeStatus where
  parseJSON :: Value -> Parser V1ModifyVolumeStatus
parseJSON = String
-> (Object -> Parser V1ModifyVolumeStatus)
-> Value
-> Parser V1ModifyVolumeStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ModifyVolumeStatus" ((Object -> Parser V1ModifyVolumeStatus)
 -> Value -> Parser V1ModifyVolumeStatus)
-> (Object -> Parser V1ModifyVolumeStatus)
-> Value
-> Parser V1ModifyVolumeStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Maybe Text -> V1ModifyVolumeStatus
V1ModifyVolumeStatus
      (Text -> Maybe Text -> V1ModifyVolumeStatus)
-> Parser Text -> Parser (Maybe Text -> V1ModifyVolumeStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"status")
      Parser (Maybe Text -> V1ModifyVolumeStatus)
-> Parser (Maybe Text) -> Parser V1ModifyVolumeStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"targetVolumeAttributesClassName")

-- | ToJSON V1ModifyVolumeStatus
instance A.ToJSON V1ModifyVolumeStatus where
  toJSON :: V1ModifyVolumeStatus -> Value
toJSON V1ModifyVolumeStatus {Maybe Text
Text
$sel:v1ModifyVolumeStatusStatus:V1ModifyVolumeStatus :: V1ModifyVolumeStatus -> Text
$sel:v1ModifyVolumeStatusTargetVolumeAttributesClassName:V1ModifyVolumeStatus :: V1ModifyVolumeStatus -> Maybe Text
v1ModifyVolumeStatusStatus :: Text
v1ModifyVolumeStatusTargetVolumeAttributesClassName :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"status" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ModifyVolumeStatusStatus
      , Key
"targetVolumeAttributesClassName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ModifyVolumeStatusTargetVolumeAttributesClassName
      ]


-- | Construct a value of type 'V1ModifyVolumeStatus' (by applying it's required fields, if any)
mkV1ModifyVolumeStatus
  :: Text -- ^ 'v1ModifyVolumeStatusStatus': status is the status of the ControllerModifyVolume operation. It can be in any of following states:  - Pending    Pending indicates that the PersistentVolumeClaim cannot be modified due to unmet requirements, such as    the specified VolumeAttributesClass not existing.  - InProgress    InProgress indicates that the volume is being modified.  - Infeasible   Infeasible indicates that the request has been rejected as invalid by the CSI driver. To    resolve the error, a valid VolumeAttributesClass needs to be specified. Note: New statuses can be added in the future. Consumers should check for unknown statuses and fail appropriately.
  -> V1ModifyVolumeStatus
mkV1ModifyVolumeStatus :: Text -> V1ModifyVolumeStatus
mkV1ModifyVolumeStatus Text
v1ModifyVolumeStatusStatus =
  V1ModifyVolumeStatus
  { Text
$sel:v1ModifyVolumeStatusStatus:V1ModifyVolumeStatus :: Text
v1ModifyVolumeStatusStatus :: Text
v1ModifyVolumeStatusStatus
  , $sel:v1ModifyVolumeStatusTargetVolumeAttributesClassName:V1ModifyVolumeStatus :: Maybe Text
v1ModifyVolumeStatusTargetVolumeAttributesClassName = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1MutatingWebhook
-- | V1MutatingWebhook
-- MutatingWebhook describes an admission webhook and the resources and operations it applies to.
data V1MutatingWebhook = V1MutatingWebhook
  { V1MutatingWebhook -> [Text]
v1MutatingWebhookAdmissionReviewVersions :: !([Text]) -- ^ /Required/ "admissionReviewVersions" - AdmissionReviewVersions is an ordered list of preferred &#x60;AdmissionReview&#x60; versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy.
  , V1MutatingWebhook -> AdmissionregistrationV1WebhookClientConfig
v1MutatingWebhookClientConfig :: !(AdmissionregistrationV1WebhookClientConfig) -- ^ /Required/ "clientConfig"
  , V1MutatingWebhook -> Maybe Text
v1MutatingWebhookFailurePolicy :: !(Maybe Text) -- ^ "failurePolicy" - FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail.
  , V1MutatingWebhook -> Maybe [V1MatchCondition]
v1MutatingWebhookMatchConditions :: !(Maybe [V1MatchCondition]) -- ^ "matchConditions" - MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.  The exact matching logic is (in order):   1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.   2. If ALL matchConditions evaluate to TRUE, the webhook is called.   3. If any matchCondition evaluates to an error (but none are FALSE):      - If failurePolicy&#x3D;Fail, reject the request      - If failurePolicy&#x3D;Ignore, the error is ignored and the webhook is skipped
  , V1MutatingWebhook -> Maybe Text
v1MutatingWebhookMatchPolicy :: !(Maybe Text) -- ^ "matchPolicy" - matchPolicy defines how the \&quot;rules\&quot; list is used to match incoming requests. Allowed values are \&quot;Exact\&quot; or \&quot;Equivalent\&quot;.  - Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \&quot;rules\&quot; only included &#x60;apiGroups:[\&quot;apps\&quot;], apiVersions:[\&quot;v1\&quot;], resources: [\&quot;deployments\&quot;]&#x60;, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook.  - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \&quot;rules\&quot; only included &#x60;apiGroups:[\&quot;apps\&quot;], apiVersions:[\&quot;v1\&quot;], resources: [\&quot;deployments\&quot;]&#x60;, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook.  Defaults to \&quot;Equivalent\&quot;
  , V1MutatingWebhook -> Text
v1MutatingWebhookName :: !(Text) -- ^ /Required/ "name" - The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \&quot;imagepolicy\&quot; is the name of the webhook, and kubernetes.io is the name of the organization. Required.
  , V1MutatingWebhook -> Maybe V1LabelSelector
v1MutatingWebhookNamespaceSelector :: !(Maybe V1LabelSelector) -- ^ "namespaceSelector"
  , V1MutatingWebhook -> Maybe V1LabelSelector
v1MutatingWebhookObjectSelector :: !(Maybe V1LabelSelector) -- ^ "objectSelector"
  , V1MutatingWebhook -> Maybe Text
v1MutatingWebhookReinvocationPolicy :: !(Maybe Text) -- ^ "reinvocationPolicy" - reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. Allowed values are \&quot;Never\&quot; and \&quot;IfNeeded\&quot;.  Never: the webhook will not be called more than once in a single admission evaluation.  IfNeeded: the webhook will be called at least one additional time as part of the admission evaluation if the object being admitted is modified by other admission plugins after the initial webhook call. Webhooks that specify this option *must* be idempotent, able to process objects they previously admitted. Note: * the number of additional invocations is not guaranteed to be exactly one. * if additional invocations result in further modifications to the object, webhooks are not guaranteed to be invoked again. * webhooks that use this option may be reordered to minimize the number of additional invocations. * to validate an object after all mutations are guaranteed complete, use a validating admission webhook instead.  Defaults to \&quot;Never\&quot;.
  , V1MutatingWebhook -> Maybe [V1RuleWithOperations]
v1MutatingWebhookRules :: !(Maybe [V1RuleWithOperations]) -- ^ "rules" - Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.
  , V1MutatingWebhook -> Text
v1MutatingWebhookSideEffects :: !(Text) -- ^ /Required/ "sideEffects" - SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects &#x3D;&#x3D; Unknown or Some.
  , V1MutatingWebhook -> Maybe Int
v1MutatingWebhookTimeoutSeconds :: !(Maybe Int) -- ^ "timeoutSeconds" - TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds.
  } deriving (Int -> V1MutatingWebhook -> ShowS
[V1MutatingWebhook] -> ShowS
V1MutatingWebhook -> String
(Int -> V1MutatingWebhook -> ShowS)
-> (V1MutatingWebhook -> String)
-> ([V1MutatingWebhook] -> ShowS)
-> Show V1MutatingWebhook
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1MutatingWebhook -> ShowS
showsPrec :: Int -> V1MutatingWebhook -> ShowS
$cshow :: V1MutatingWebhook -> String
show :: V1MutatingWebhook -> String
$cshowList :: [V1MutatingWebhook] -> ShowS
showList :: [V1MutatingWebhook] -> ShowS
P.Show, V1MutatingWebhook -> V1MutatingWebhook -> Bool
(V1MutatingWebhook -> V1MutatingWebhook -> Bool)
-> (V1MutatingWebhook -> V1MutatingWebhook -> Bool)
-> Eq V1MutatingWebhook
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1MutatingWebhook -> V1MutatingWebhook -> Bool
== :: V1MutatingWebhook -> V1MutatingWebhook -> Bool
$c/= :: V1MutatingWebhook -> V1MutatingWebhook -> Bool
/= :: V1MutatingWebhook -> V1MutatingWebhook -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1MutatingWebhook
instance A.FromJSON V1MutatingWebhook where
  parseJSON :: Value -> Parser V1MutatingWebhook
parseJSON = String
-> (Object -> Parser V1MutatingWebhook)
-> Value
-> Parser V1MutatingWebhook
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1MutatingWebhook" ((Object -> Parser V1MutatingWebhook)
 -> Value -> Parser V1MutatingWebhook)
-> (Object -> Parser V1MutatingWebhook)
-> Value
-> Parser V1MutatingWebhook
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    [Text]
-> AdmissionregistrationV1WebhookClientConfig
-> Maybe Text
-> Maybe [V1MatchCondition]
-> Maybe Text
-> Text
-> Maybe V1LabelSelector
-> Maybe V1LabelSelector
-> Maybe Text
-> Maybe [V1RuleWithOperations]
-> Text
-> Maybe Int
-> V1MutatingWebhook
V1MutatingWebhook
      ([Text]
 -> AdmissionregistrationV1WebhookClientConfig
 -> Maybe Text
 -> Maybe [V1MatchCondition]
 -> Maybe Text
 -> Text
 -> Maybe V1LabelSelector
 -> Maybe V1LabelSelector
 -> Maybe Text
 -> Maybe [V1RuleWithOperations]
 -> Text
 -> Maybe Int
 -> V1MutatingWebhook)
-> Parser [Text]
-> Parser
     (AdmissionregistrationV1WebhookClientConfig
      -> Maybe Text
      -> Maybe [V1MatchCondition]
      -> Maybe Text
      -> Text
      -> Maybe V1LabelSelector
      -> Maybe V1LabelSelector
      -> Maybe Text
      -> Maybe [V1RuleWithOperations]
      -> Text
      -> Maybe Int
      -> V1MutatingWebhook)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"admissionReviewVersions")
      Parser
  (AdmissionregistrationV1WebhookClientConfig
   -> Maybe Text
   -> Maybe [V1MatchCondition]
   -> Maybe Text
   -> Text
   -> Maybe V1LabelSelector
   -> Maybe V1LabelSelector
   -> Maybe Text
   -> Maybe [V1RuleWithOperations]
   -> Text
   -> Maybe Int
   -> V1MutatingWebhook)
-> Parser AdmissionregistrationV1WebhookClientConfig
-> Parser
     (Maybe Text
      -> Maybe [V1MatchCondition]
      -> Maybe Text
      -> Text
      -> Maybe V1LabelSelector
      -> Maybe V1LabelSelector
      -> Maybe Text
      -> Maybe [V1RuleWithOperations]
      -> Text
      -> Maybe Int
      -> V1MutatingWebhook)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser AdmissionregistrationV1WebhookClientConfig
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"clientConfig")
      Parser
  (Maybe Text
   -> Maybe [V1MatchCondition]
   -> Maybe Text
   -> Text
   -> Maybe V1LabelSelector
   -> Maybe V1LabelSelector
   -> Maybe Text
   -> Maybe [V1RuleWithOperations]
   -> Text
   -> Maybe Int
   -> V1MutatingWebhook)
-> Parser (Maybe Text)
-> Parser
     (Maybe [V1MatchCondition]
      -> Maybe Text
      -> Text
      -> Maybe V1LabelSelector
      -> Maybe V1LabelSelector
      -> Maybe Text
      -> Maybe [V1RuleWithOperations]
      -> Text
      -> Maybe Int
      -> V1MutatingWebhook)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"failurePolicy")
      Parser
  (Maybe [V1MatchCondition]
   -> Maybe Text
   -> Text
   -> Maybe V1LabelSelector
   -> Maybe V1LabelSelector
   -> Maybe Text
   -> Maybe [V1RuleWithOperations]
   -> Text
   -> Maybe Int
   -> V1MutatingWebhook)
-> Parser (Maybe [V1MatchCondition])
-> Parser
     (Maybe Text
      -> Text
      -> Maybe V1LabelSelector
      -> Maybe V1LabelSelector
      -> Maybe Text
      -> Maybe [V1RuleWithOperations]
      -> Text
      -> Maybe Int
      -> V1MutatingWebhook)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1MatchCondition])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"matchConditions")
      Parser
  (Maybe Text
   -> Text
   -> Maybe V1LabelSelector
   -> Maybe V1LabelSelector
   -> Maybe Text
   -> Maybe [V1RuleWithOperations]
   -> Text
   -> Maybe Int
   -> V1MutatingWebhook)
-> Parser (Maybe Text)
-> Parser
     (Text
      -> Maybe V1LabelSelector
      -> Maybe V1LabelSelector
      -> Maybe Text
      -> Maybe [V1RuleWithOperations]
      -> Text
      -> Maybe Int
      -> V1MutatingWebhook)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"matchPolicy")
      Parser
  (Text
   -> Maybe V1LabelSelector
   -> Maybe V1LabelSelector
   -> Maybe Text
   -> Maybe [V1RuleWithOperations]
   -> Text
   -> Maybe Int
   -> V1MutatingWebhook)
-> Parser Text
-> Parser
     (Maybe V1LabelSelector
      -> Maybe V1LabelSelector
      -> Maybe Text
      -> Maybe [V1RuleWithOperations]
      -> Text
      -> Maybe Int
      -> V1MutatingWebhook)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser
  (Maybe V1LabelSelector
   -> Maybe V1LabelSelector
   -> Maybe Text
   -> Maybe [V1RuleWithOperations]
   -> Text
   -> Maybe Int
   -> V1MutatingWebhook)
-> Parser (Maybe V1LabelSelector)
-> Parser
     (Maybe V1LabelSelector
      -> Maybe Text
      -> Maybe [V1RuleWithOperations]
      -> Text
      -> Maybe Int
      -> V1MutatingWebhook)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LabelSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"namespaceSelector")
      Parser
  (Maybe V1LabelSelector
   -> Maybe Text
   -> Maybe [V1RuleWithOperations]
   -> Text
   -> Maybe Int
   -> V1MutatingWebhook)
-> Parser (Maybe V1LabelSelector)
-> Parser
     (Maybe Text
      -> Maybe [V1RuleWithOperations]
      -> Text
      -> Maybe Int
      -> V1MutatingWebhook)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LabelSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"objectSelector")
      Parser
  (Maybe Text
   -> Maybe [V1RuleWithOperations]
   -> Text
   -> Maybe Int
   -> V1MutatingWebhook)
-> Parser (Maybe Text)
-> Parser
     (Maybe [V1RuleWithOperations]
      -> Text -> Maybe Int -> V1MutatingWebhook)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reinvocationPolicy")
      Parser
  (Maybe [V1RuleWithOperations]
   -> Text -> Maybe Int -> V1MutatingWebhook)
-> Parser (Maybe [V1RuleWithOperations])
-> Parser (Text -> Maybe Int -> V1MutatingWebhook)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1RuleWithOperations])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"rules")
      Parser (Text -> Maybe Int -> V1MutatingWebhook)
-> Parser Text -> Parser (Maybe Int -> V1MutatingWebhook)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"sideEffects")
      Parser (Maybe Int -> V1MutatingWebhook)
-> Parser (Maybe Int) -> Parser V1MutatingWebhook
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"timeoutSeconds")

-- | ToJSON V1MutatingWebhook
instance A.ToJSON V1MutatingWebhook where
  toJSON :: V1MutatingWebhook -> Value
toJSON V1MutatingWebhook {[Text]
Maybe Int
Maybe [V1RuleWithOperations]
Maybe [V1MatchCondition]
Maybe Text
Maybe V1LabelSelector
Text
AdmissionregistrationV1WebhookClientConfig
$sel:v1MutatingWebhookAdmissionReviewVersions:V1MutatingWebhook :: V1MutatingWebhook -> [Text]
$sel:v1MutatingWebhookClientConfig:V1MutatingWebhook :: V1MutatingWebhook -> AdmissionregistrationV1WebhookClientConfig
$sel:v1MutatingWebhookFailurePolicy:V1MutatingWebhook :: V1MutatingWebhook -> Maybe Text
$sel:v1MutatingWebhookMatchConditions:V1MutatingWebhook :: V1MutatingWebhook -> Maybe [V1MatchCondition]
$sel:v1MutatingWebhookMatchPolicy:V1MutatingWebhook :: V1MutatingWebhook -> Maybe Text
$sel:v1MutatingWebhookName:V1MutatingWebhook :: V1MutatingWebhook -> Text
$sel:v1MutatingWebhookNamespaceSelector:V1MutatingWebhook :: V1MutatingWebhook -> Maybe V1LabelSelector
$sel:v1MutatingWebhookObjectSelector:V1MutatingWebhook :: V1MutatingWebhook -> Maybe V1LabelSelector
$sel:v1MutatingWebhookReinvocationPolicy:V1MutatingWebhook :: V1MutatingWebhook -> Maybe Text
$sel:v1MutatingWebhookRules:V1MutatingWebhook :: V1MutatingWebhook -> Maybe [V1RuleWithOperations]
$sel:v1MutatingWebhookSideEffects:V1MutatingWebhook :: V1MutatingWebhook -> Text
$sel:v1MutatingWebhookTimeoutSeconds:V1MutatingWebhook :: V1MutatingWebhook -> Maybe Int
v1MutatingWebhookAdmissionReviewVersions :: [Text]
v1MutatingWebhookClientConfig :: AdmissionregistrationV1WebhookClientConfig
v1MutatingWebhookFailurePolicy :: Maybe Text
v1MutatingWebhookMatchConditions :: Maybe [V1MatchCondition]
v1MutatingWebhookMatchPolicy :: Maybe Text
v1MutatingWebhookName :: Text
v1MutatingWebhookNamespaceSelector :: Maybe V1LabelSelector
v1MutatingWebhookObjectSelector :: Maybe V1LabelSelector
v1MutatingWebhookReinvocationPolicy :: Maybe Text
v1MutatingWebhookRules :: Maybe [V1RuleWithOperations]
v1MutatingWebhookSideEffects :: Text
v1MutatingWebhookTimeoutSeconds :: Maybe Int
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"admissionReviewVersions" Key -> [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [Text]
v1MutatingWebhookAdmissionReviewVersions
      , Key
"clientConfig" Key -> AdmissionregistrationV1WebhookClientConfig -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= AdmissionregistrationV1WebhookClientConfig
v1MutatingWebhookClientConfig
      , Key
"failurePolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1MutatingWebhookFailurePolicy
      , Key
"matchConditions" Key -> Maybe [V1MatchCondition] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1MatchCondition]
v1MutatingWebhookMatchConditions
      , Key
"matchPolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1MutatingWebhookMatchPolicy
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1MutatingWebhookName
      , Key
"namespaceSelector" Key -> Maybe V1LabelSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LabelSelector
v1MutatingWebhookNamespaceSelector
      , Key
"objectSelector" Key -> Maybe V1LabelSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LabelSelector
v1MutatingWebhookObjectSelector
      , Key
"reinvocationPolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1MutatingWebhookReinvocationPolicy
      , Key
"rules" Key -> Maybe [V1RuleWithOperations] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1RuleWithOperations]
v1MutatingWebhookRules
      , Key
"sideEffects" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1MutatingWebhookSideEffects
      , Key
"timeoutSeconds" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1MutatingWebhookTimeoutSeconds
      ]


-- | Construct a value of type 'V1MutatingWebhook' (by applying it's required fields, if any)
mkV1MutatingWebhook
  :: [Text] -- ^ 'v1MutatingWebhookAdmissionReviewVersions': AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy.
  -> AdmissionregistrationV1WebhookClientConfig -- ^ 'v1MutatingWebhookClientConfig' 
  -> Text -- ^ 'v1MutatingWebhookName': The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required.
  -> Text -- ^ 'v1MutatingWebhookSideEffects': SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some.
  -> V1MutatingWebhook
mkV1MutatingWebhook :: [Text]
-> AdmissionregistrationV1WebhookClientConfig
-> Text
-> Text
-> V1MutatingWebhook
mkV1MutatingWebhook [Text]
v1MutatingWebhookAdmissionReviewVersions AdmissionregistrationV1WebhookClientConfig
v1MutatingWebhookClientConfig Text
v1MutatingWebhookName Text
v1MutatingWebhookSideEffects =
  V1MutatingWebhook
  { [Text]
$sel:v1MutatingWebhookAdmissionReviewVersions:V1MutatingWebhook :: [Text]
v1MutatingWebhookAdmissionReviewVersions :: [Text]
v1MutatingWebhookAdmissionReviewVersions
  , AdmissionregistrationV1WebhookClientConfig
$sel:v1MutatingWebhookClientConfig:V1MutatingWebhook :: AdmissionregistrationV1WebhookClientConfig
v1MutatingWebhookClientConfig :: AdmissionregistrationV1WebhookClientConfig
v1MutatingWebhookClientConfig
  , $sel:v1MutatingWebhookFailurePolicy:V1MutatingWebhook :: Maybe Text
v1MutatingWebhookFailurePolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1MutatingWebhookMatchConditions:V1MutatingWebhook :: Maybe [V1MatchCondition]
v1MutatingWebhookMatchConditions = Maybe [V1MatchCondition]
forall a. Maybe a
Nothing
  , $sel:v1MutatingWebhookMatchPolicy:V1MutatingWebhook :: Maybe Text
v1MutatingWebhookMatchPolicy = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1MutatingWebhookName:V1MutatingWebhook :: Text
v1MutatingWebhookName :: Text
v1MutatingWebhookName
  , $sel:v1MutatingWebhookNamespaceSelector:V1MutatingWebhook :: Maybe V1LabelSelector
v1MutatingWebhookNamespaceSelector = Maybe V1LabelSelector
forall a. Maybe a
Nothing
  , $sel:v1MutatingWebhookObjectSelector:V1MutatingWebhook :: Maybe V1LabelSelector
v1MutatingWebhookObjectSelector = Maybe V1LabelSelector
forall a. Maybe a
Nothing
  , $sel:v1MutatingWebhookReinvocationPolicy:V1MutatingWebhook :: Maybe Text
v1MutatingWebhookReinvocationPolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1MutatingWebhookRules:V1MutatingWebhook :: Maybe [V1RuleWithOperations]
v1MutatingWebhookRules = Maybe [V1RuleWithOperations]
forall a. Maybe a
Nothing
  , Text
$sel:v1MutatingWebhookSideEffects:V1MutatingWebhook :: Text
v1MutatingWebhookSideEffects :: Text
v1MutatingWebhookSideEffects
  , $sel:v1MutatingWebhookTimeoutSeconds:V1MutatingWebhook :: Maybe Int
v1MutatingWebhookTimeoutSeconds = Maybe Int
forall a. Maybe a
Nothing
  }

-- ** V1MutatingWebhookConfiguration
-- | V1MutatingWebhookConfiguration
-- MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.
data V1MutatingWebhookConfiguration = V1MutatingWebhookConfiguration
  { V1MutatingWebhookConfiguration -> Maybe Text
v1MutatingWebhookConfigurationApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1MutatingWebhookConfiguration -> Maybe Text
v1MutatingWebhookConfigurationKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1MutatingWebhookConfiguration -> Maybe V1ObjectMeta
v1MutatingWebhookConfigurationMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1MutatingWebhookConfiguration -> Maybe [V1MutatingWebhook]
v1MutatingWebhookConfigurationWebhooks :: !(Maybe [V1MutatingWebhook]) -- ^ "webhooks" - Webhooks is a list of webhooks and the affected resources and operations.
  } deriving (Int -> V1MutatingWebhookConfiguration -> ShowS
[V1MutatingWebhookConfiguration] -> ShowS
V1MutatingWebhookConfiguration -> String
(Int -> V1MutatingWebhookConfiguration -> ShowS)
-> (V1MutatingWebhookConfiguration -> String)
-> ([V1MutatingWebhookConfiguration] -> ShowS)
-> Show V1MutatingWebhookConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1MutatingWebhookConfiguration -> ShowS
showsPrec :: Int -> V1MutatingWebhookConfiguration -> ShowS
$cshow :: V1MutatingWebhookConfiguration -> String
show :: V1MutatingWebhookConfiguration -> String
$cshowList :: [V1MutatingWebhookConfiguration] -> ShowS
showList :: [V1MutatingWebhookConfiguration] -> ShowS
P.Show, V1MutatingWebhookConfiguration
-> V1MutatingWebhookConfiguration -> Bool
(V1MutatingWebhookConfiguration
 -> V1MutatingWebhookConfiguration -> Bool)
-> (V1MutatingWebhookConfiguration
    -> V1MutatingWebhookConfiguration -> Bool)
-> Eq V1MutatingWebhookConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1MutatingWebhookConfiguration
-> V1MutatingWebhookConfiguration -> Bool
== :: V1MutatingWebhookConfiguration
-> V1MutatingWebhookConfiguration -> Bool
$c/= :: V1MutatingWebhookConfiguration
-> V1MutatingWebhookConfiguration -> Bool
/= :: V1MutatingWebhookConfiguration
-> V1MutatingWebhookConfiguration -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1MutatingWebhookConfiguration
instance A.FromJSON V1MutatingWebhookConfiguration where
  parseJSON :: Value -> Parser V1MutatingWebhookConfiguration
parseJSON = String
-> (Object -> Parser V1MutatingWebhookConfiguration)
-> Value
-> Parser V1MutatingWebhookConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1MutatingWebhookConfiguration" ((Object -> Parser V1MutatingWebhookConfiguration)
 -> Value -> Parser V1MutatingWebhookConfiguration)
-> (Object -> Parser V1MutatingWebhookConfiguration)
-> Value
-> Parser V1MutatingWebhookConfiguration
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe [V1MutatingWebhook]
-> V1MutatingWebhookConfiguration
V1MutatingWebhookConfiguration
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe [V1MutatingWebhook]
 -> V1MutatingWebhookConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe [V1MutatingWebhook]
      -> V1MutatingWebhookConfiguration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe [V1MutatingWebhook]
   -> V1MutatingWebhookConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe [V1MutatingWebhook] -> V1MutatingWebhookConfiguration)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe [V1MutatingWebhook] -> V1MutatingWebhookConfiguration)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe [V1MutatingWebhook] -> V1MutatingWebhookConfiguration)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (Maybe [V1MutatingWebhook] -> V1MutatingWebhookConfiguration)
-> Parser (Maybe [V1MutatingWebhook])
-> Parser V1MutatingWebhookConfiguration
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1MutatingWebhook])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"webhooks")

-- | ToJSON V1MutatingWebhookConfiguration
instance A.ToJSON V1MutatingWebhookConfiguration where
  toJSON :: V1MutatingWebhookConfiguration -> Value
toJSON V1MutatingWebhookConfiguration {Maybe [V1MutatingWebhook]
Maybe Text
Maybe V1ObjectMeta
$sel:v1MutatingWebhookConfigurationApiVersion:V1MutatingWebhookConfiguration :: V1MutatingWebhookConfiguration -> Maybe Text
$sel:v1MutatingWebhookConfigurationKind:V1MutatingWebhookConfiguration :: V1MutatingWebhookConfiguration -> Maybe Text
$sel:v1MutatingWebhookConfigurationMetadata:V1MutatingWebhookConfiguration :: V1MutatingWebhookConfiguration -> Maybe V1ObjectMeta
$sel:v1MutatingWebhookConfigurationWebhooks:V1MutatingWebhookConfiguration :: V1MutatingWebhookConfiguration -> Maybe [V1MutatingWebhook]
v1MutatingWebhookConfigurationApiVersion :: Maybe Text
v1MutatingWebhookConfigurationKind :: Maybe Text
v1MutatingWebhookConfigurationMetadata :: Maybe V1ObjectMeta
v1MutatingWebhookConfigurationWebhooks :: Maybe [V1MutatingWebhook]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1MutatingWebhookConfigurationApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1MutatingWebhookConfigurationKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1MutatingWebhookConfigurationMetadata
      , Key
"webhooks" Key -> Maybe [V1MutatingWebhook] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1MutatingWebhook]
v1MutatingWebhookConfigurationWebhooks
      ]


-- | Construct a value of type 'V1MutatingWebhookConfiguration' (by applying it's required fields, if any)
mkV1MutatingWebhookConfiguration
  :: V1MutatingWebhookConfiguration
mkV1MutatingWebhookConfiguration :: V1MutatingWebhookConfiguration
mkV1MutatingWebhookConfiguration =
  V1MutatingWebhookConfiguration
  { $sel:v1MutatingWebhookConfigurationApiVersion:V1MutatingWebhookConfiguration :: Maybe Text
v1MutatingWebhookConfigurationApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1MutatingWebhookConfigurationKind:V1MutatingWebhookConfiguration :: Maybe Text
v1MutatingWebhookConfigurationKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1MutatingWebhookConfigurationMetadata:V1MutatingWebhookConfiguration :: Maybe V1ObjectMeta
v1MutatingWebhookConfigurationMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1MutatingWebhookConfigurationWebhooks:V1MutatingWebhookConfiguration :: Maybe [V1MutatingWebhook]
v1MutatingWebhookConfigurationWebhooks = Maybe [V1MutatingWebhook]
forall a. Maybe a
Nothing
  }

-- ** V1MutatingWebhookConfigurationList
-- | V1MutatingWebhookConfigurationList
-- MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration.
data V1MutatingWebhookConfigurationList = V1MutatingWebhookConfigurationList
  { V1MutatingWebhookConfigurationList -> Maybe Text
v1MutatingWebhookConfigurationListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1MutatingWebhookConfigurationList
-> [V1MutatingWebhookConfiguration]
v1MutatingWebhookConfigurationListItems :: !([V1MutatingWebhookConfiguration]) -- ^ /Required/ "items" - List of MutatingWebhookConfiguration.
  , V1MutatingWebhookConfigurationList -> Maybe Text
v1MutatingWebhookConfigurationListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1MutatingWebhookConfigurationList -> Maybe V1ListMeta
v1MutatingWebhookConfigurationListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1MutatingWebhookConfigurationList -> ShowS
[V1MutatingWebhookConfigurationList] -> ShowS
V1MutatingWebhookConfigurationList -> String
(Int -> V1MutatingWebhookConfigurationList -> ShowS)
-> (V1MutatingWebhookConfigurationList -> String)
-> ([V1MutatingWebhookConfigurationList] -> ShowS)
-> Show V1MutatingWebhookConfigurationList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1MutatingWebhookConfigurationList -> ShowS
showsPrec :: Int -> V1MutatingWebhookConfigurationList -> ShowS
$cshow :: V1MutatingWebhookConfigurationList -> String
show :: V1MutatingWebhookConfigurationList -> String
$cshowList :: [V1MutatingWebhookConfigurationList] -> ShowS
showList :: [V1MutatingWebhookConfigurationList] -> ShowS
P.Show, V1MutatingWebhookConfigurationList
-> V1MutatingWebhookConfigurationList -> Bool
(V1MutatingWebhookConfigurationList
 -> V1MutatingWebhookConfigurationList -> Bool)
-> (V1MutatingWebhookConfigurationList
    -> V1MutatingWebhookConfigurationList -> Bool)
-> Eq V1MutatingWebhookConfigurationList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1MutatingWebhookConfigurationList
-> V1MutatingWebhookConfigurationList -> Bool
== :: V1MutatingWebhookConfigurationList
-> V1MutatingWebhookConfigurationList -> Bool
$c/= :: V1MutatingWebhookConfigurationList
-> V1MutatingWebhookConfigurationList -> Bool
/= :: V1MutatingWebhookConfigurationList
-> V1MutatingWebhookConfigurationList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1MutatingWebhookConfigurationList
instance A.FromJSON V1MutatingWebhookConfigurationList where
  parseJSON :: Value -> Parser V1MutatingWebhookConfigurationList
parseJSON = String
-> (Object -> Parser V1MutatingWebhookConfigurationList)
-> Value
-> Parser V1MutatingWebhookConfigurationList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1MutatingWebhookConfigurationList" ((Object -> Parser V1MutatingWebhookConfigurationList)
 -> Value -> Parser V1MutatingWebhookConfigurationList)
-> (Object -> Parser V1MutatingWebhookConfigurationList)
-> Value
-> Parser V1MutatingWebhookConfigurationList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1MutatingWebhookConfiguration]
-> Maybe Text
-> Maybe V1ListMeta
-> V1MutatingWebhookConfigurationList
V1MutatingWebhookConfigurationList
      (Maybe Text
 -> [V1MutatingWebhookConfiguration]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1MutatingWebhookConfigurationList)
-> Parser (Maybe Text)
-> Parser
     ([V1MutatingWebhookConfiguration]
      -> Maybe Text
      -> Maybe V1ListMeta
      -> V1MutatingWebhookConfigurationList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1MutatingWebhookConfiguration]
   -> Maybe Text
   -> Maybe V1ListMeta
   -> V1MutatingWebhookConfigurationList)
-> Parser [V1MutatingWebhookConfiguration]
-> Parser
     (Maybe Text
      -> Maybe V1ListMeta -> V1MutatingWebhookConfigurationList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1MutatingWebhookConfiguration]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser
  (Maybe Text
   -> Maybe V1ListMeta -> V1MutatingWebhookConfigurationList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1MutatingWebhookConfigurationList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1MutatingWebhookConfigurationList)
-> Parser (Maybe V1ListMeta)
-> Parser V1MutatingWebhookConfigurationList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1MutatingWebhookConfigurationList
instance A.ToJSON V1MutatingWebhookConfigurationList where
  toJSON :: V1MutatingWebhookConfigurationList -> Value
toJSON V1MutatingWebhookConfigurationList {[V1MutatingWebhookConfiguration]
Maybe Text
Maybe V1ListMeta
$sel:v1MutatingWebhookConfigurationListApiVersion:V1MutatingWebhookConfigurationList :: V1MutatingWebhookConfigurationList -> Maybe Text
$sel:v1MutatingWebhookConfigurationListItems:V1MutatingWebhookConfigurationList :: V1MutatingWebhookConfigurationList
-> [V1MutatingWebhookConfiguration]
$sel:v1MutatingWebhookConfigurationListKind:V1MutatingWebhookConfigurationList :: V1MutatingWebhookConfigurationList -> Maybe Text
$sel:v1MutatingWebhookConfigurationListMetadata:V1MutatingWebhookConfigurationList :: V1MutatingWebhookConfigurationList -> Maybe V1ListMeta
v1MutatingWebhookConfigurationListApiVersion :: Maybe Text
v1MutatingWebhookConfigurationListItems :: [V1MutatingWebhookConfiguration]
v1MutatingWebhookConfigurationListKind :: Maybe Text
v1MutatingWebhookConfigurationListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1MutatingWebhookConfigurationListApiVersion
      , Key
"items" Key -> [V1MutatingWebhookConfiguration] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1MutatingWebhookConfiguration]
v1MutatingWebhookConfigurationListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1MutatingWebhookConfigurationListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1MutatingWebhookConfigurationListMetadata
      ]


-- | Construct a value of type 'V1MutatingWebhookConfigurationList' (by applying it's required fields, if any)
mkV1MutatingWebhookConfigurationList
  :: [V1MutatingWebhookConfiguration] -- ^ 'v1MutatingWebhookConfigurationListItems': List of MutatingWebhookConfiguration.
  -> V1MutatingWebhookConfigurationList
mkV1MutatingWebhookConfigurationList :: [V1MutatingWebhookConfiguration]
-> V1MutatingWebhookConfigurationList
mkV1MutatingWebhookConfigurationList [V1MutatingWebhookConfiguration]
v1MutatingWebhookConfigurationListItems =
  V1MutatingWebhookConfigurationList
  { $sel:v1MutatingWebhookConfigurationListApiVersion:V1MutatingWebhookConfigurationList :: Maybe Text
v1MutatingWebhookConfigurationListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1MutatingWebhookConfiguration]
$sel:v1MutatingWebhookConfigurationListItems:V1MutatingWebhookConfigurationList :: [V1MutatingWebhookConfiguration]
v1MutatingWebhookConfigurationListItems :: [V1MutatingWebhookConfiguration]
v1MutatingWebhookConfigurationListItems
  , $sel:v1MutatingWebhookConfigurationListKind:V1MutatingWebhookConfigurationList :: Maybe Text
v1MutatingWebhookConfigurationListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1MutatingWebhookConfigurationListMetadata:V1MutatingWebhookConfigurationList :: Maybe V1ListMeta
v1MutatingWebhookConfigurationListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1NFSVolumeSource
-- | V1NFSVolumeSource
-- Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling.
data V1NFSVolumeSource = V1NFSVolumeSource
  { V1NFSVolumeSource -> Text
v1NFSVolumeSourcePath :: !(Text) -- ^ /Required/ "path" - path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
  , V1NFSVolumeSource -> Maybe Bool
v1NFSVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - readOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
  , V1NFSVolumeSource -> Text
v1NFSVolumeSourceServer :: !(Text) -- ^ /Required/ "server" - server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
  } deriving (Int -> V1NFSVolumeSource -> ShowS
[V1NFSVolumeSource] -> ShowS
V1NFSVolumeSource -> String
(Int -> V1NFSVolumeSource -> ShowS)
-> (V1NFSVolumeSource -> String)
-> ([V1NFSVolumeSource] -> ShowS)
-> Show V1NFSVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1NFSVolumeSource -> ShowS
showsPrec :: Int -> V1NFSVolumeSource -> ShowS
$cshow :: V1NFSVolumeSource -> String
show :: V1NFSVolumeSource -> String
$cshowList :: [V1NFSVolumeSource] -> ShowS
showList :: [V1NFSVolumeSource] -> ShowS
P.Show, V1NFSVolumeSource -> V1NFSVolumeSource -> Bool
(V1NFSVolumeSource -> V1NFSVolumeSource -> Bool)
-> (V1NFSVolumeSource -> V1NFSVolumeSource -> Bool)
-> Eq V1NFSVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1NFSVolumeSource -> V1NFSVolumeSource -> Bool
== :: V1NFSVolumeSource -> V1NFSVolumeSource -> Bool
$c/= :: V1NFSVolumeSource -> V1NFSVolumeSource -> Bool
/= :: V1NFSVolumeSource -> V1NFSVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1NFSVolumeSource
instance A.FromJSON V1NFSVolumeSource where
  parseJSON :: Value -> Parser V1NFSVolumeSource
parseJSON = String
-> (Object -> Parser V1NFSVolumeSource)
-> Value
-> Parser V1NFSVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1NFSVolumeSource" ((Object -> Parser V1NFSVolumeSource)
 -> Value -> Parser V1NFSVolumeSource)
-> (Object -> Parser V1NFSVolumeSource)
-> Value
-> Parser V1NFSVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Maybe Bool -> Text -> V1NFSVolumeSource
V1NFSVolumeSource
      (Text -> Maybe Bool -> Text -> V1NFSVolumeSource)
-> Parser Text -> Parser (Maybe Bool -> Text -> V1NFSVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"path")
      Parser (Maybe Bool -> Text -> V1NFSVolumeSource)
-> Parser (Maybe Bool) -> Parser (Text -> V1NFSVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readOnly")
      Parser (Text -> V1NFSVolumeSource)
-> Parser Text -> Parser V1NFSVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"server")

-- | ToJSON V1NFSVolumeSource
instance A.ToJSON V1NFSVolumeSource where
  toJSON :: V1NFSVolumeSource -> Value
toJSON V1NFSVolumeSource {Maybe Bool
Text
$sel:v1NFSVolumeSourcePath:V1NFSVolumeSource :: V1NFSVolumeSource -> Text
$sel:v1NFSVolumeSourceReadOnly:V1NFSVolumeSource :: V1NFSVolumeSource -> Maybe Bool
$sel:v1NFSVolumeSourceServer:V1NFSVolumeSource :: V1NFSVolumeSource -> Text
v1NFSVolumeSourcePath :: Text
v1NFSVolumeSourceReadOnly :: Maybe Bool
v1NFSVolumeSourceServer :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"path" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1NFSVolumeSourcePath
      , Key
"readOnly" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1NFSVolumeSourceReadOnly
      , Key
"server" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1NFSVolumeSourceServer
      ]


-- | Construct a value of type 'V1NFSVolumeSource' (by applying it's required fields, if any)
mkV1NFSVolumeSource
  :: Text -- ^ 'v1NFSVolumeSourcePath': path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
  -> Text -- ^ 'v1NFSVolumeSourceServer': server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
  -> V1NFSVolumeSource
mkV1NFSVolumeSource :: Text -> Text -> V1NFSVolumeSource
mkV1NFSVolumeSource Text
v1NFSVolumeSourcePath Text
v1NFSVolumeSourceServer =
  V1NFSVolumeSource
  { Text
$sel:v1NFSVolumeSourcePath:V1NFSVolumeSource :: Text
v1NFSVolumeSourcePath :: Text
v1NFSVolumeSourcePath
  , $sel:v1NFSVolumeSourceReadOnly:V1NFSVolumeSource :: Maybe Bool
v1NFSVolumeSourceReadOnly = Maybe Bool
forall a. Maybe a
Nothing
  , Text
$sel:v1NFSVolumeSourceServer:V1NFSVolumeSource :: Text
v1NFSVolumeSourceServer :: Text
v1NFSVolumeSourceServer
  }

-- ** V1NamedRuleWithOperations
-- | V1NamedRuleWithOperations
-- NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.
data V1NamedRuleWithOperations = V1NamedRuleWithOperations
  { V1NamedRuleWithOperations -> Maybe [Text]
v1NamedRuleWithOperationsApiGroups :: !(Maybe [Text]) -- ^ "apiGroups" - APIGroups is the API groups the resources belong to. &#39;*&#39; is all groups. If &#39;*&#39; is present, the length of the slice must be one. Required.
  , V1NamedRuleWithOperations -> Maybe [Text]
v1NamedRuleWithOperationsApiVersions :: !(Maybe [Text]) -- ^ "apiVersions" - APIVersions is the API versions the resources belong to. &#39;*&#39; is all versions. If &#39;*&#39; is present, the length of the slice must be one. Required.
  , V1NamedRuleWithOperations -> Maybe [Text]
v1NamedRuleWithOperationsOperations :: !(Maybe [Text]) -- ^ "operations" - Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If &#39;*&#39; is present, the length of the slice must be one. Required.
  , V1NamedRuleWithOperations -> Maybe [Text]
v1NamedRuleWithOperationsResourceNames :: !(Maybe [Text]) -- ^ "resourceNames" - ResourceNames is an optional white list of names that the rule applies to.  An empty set means that everything is allowed.
  , V1NamedRuleWithOperations -> Maybe [Text]
v1NamedRuleWithOperationsResources :: !(Maybe [Text]) -- ^ "resources" - Resources is a list of resources this rule applies to.  For example: &#39;pods&#39; means pods. &#39;pods/log&#39; means the log subresource of pods. &#39;*&#39; means all resources, but not subresources. &#39;pods/*&#39; means all subresources of pods. &#39;*/scale&#39; means all scale subresources. &#39;*/*&#39; means all resources and their subresources.  If wildcard is present, the validation rule will ensure resources do not overlap with each other.  Depending on the enclosing object, subresources might not be allowed. Required.
  , V1NamedRuleWithOperations -> Maybe Text
v1NamedRuleWithOperationsScope :: !(Maybe Text) -- ^ "scope" - scope specifies the scope of this rule. Valid values are \&quot;Cluster\&quot;, \&quot;Namespaced\&quot;, and \&quot;*\&quot; \&quot;Cluster\&quot; means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \&quot;Namespaced\&quot; means that only namespaced resources will match this rule. \&quot;*\&quot; means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \&quot;*\&quot;.
  } deriving (Int -> V1NamedRuleWithOperations -> ShowS
[V1NamedRuleWithOperations] -> ShowS
V1NamedRuleWithOperations -> String
(Int -> V1NamedRuleWithOperations -> ShowS)
-> (V1NamedRuleWithOperations -> String)
-> ([V1NamedRuleWithOperations] -> ShowS)
-> Show V1NamedRuleWithOperations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1NamedRuleWithOperations -> ShowS
showsPrec :: Int -> V1NamedRuleWithOperations -> ShowS
$cshow :: V1NamedRuleWithOperations -> String
show :: V1NamedRuleWithOperations -> String
$cshowList :: [V1NamedRuleWithOperations] -> ShowS
showList :: [V1NamedRuleWithOperations] -> ShowS
P.Show, V1NamedRuleWithOperations -> V1NamedRuleWithOperations -> Bool
(V1NamedRuleWithOperations -> V1NamedRuleWithOperations -> Bool)
-> (V1NamedRuleWithOperations -> V1NamedRuleWithOperations -> Bool)
-> Eq V1NamedRuleWithOperations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1NamedRuleWithOperations -> V1NamedRuleWithOperations -> Bool
== :: V1NamedRuleWithOperations -> V1NamedRuleWithOperations -> Bool
$c/= :: V1NamedRuleWithOperations -> V1NamedRuleWithOperations -> Bool
/= :: V1NamedRuleWithOperations -> V1NamedRuleWithOperations -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1NamedRuleWithOperations
instance A.FromJSON V1NamedRuleWithOperations where
  parseJSON :: Value -> Parser V1NamedRuleWithOperations
parseJSON = String
-> (Object -> Parser V1NamedRuleWithOperations)
-> Value
-> Parser V1NamedRuleWithOperations
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1NamedRuleWithOperations" ((Object -> Parser V1NamedRuleWithOperations)
 -> Value -> Parser V1NamedRuleWithOperations)
-> (Object -> Parser V1NamedRuleWithOperations)
-> Value
-> Parser V1NamedRuleWithOperations
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> V1NamedRuleWithOperations
V1NamedRuleWithOperations
      (Maybe [Text]
 -> Maybe [Text]
 -> Maybe [Text]
 -> Maybe [Text]
 -> Maybe [Text]
 -> Maybe Text
 -> V1NamedRuleWithOperations)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [Text]
      -> Maybe [Text]
      -> Maybe [Text]
      -> Maybe [Text]
      -> Maybe Text
      -> V1NamedRuleWithOperations)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiGroups")
      Parser
  (Maybe [Text]
   -> Maybe [Text]
   -> Maybe [Text]
   -> Maybe [Text]
   -> Maybe Text
   -> V1NamedRuleWithOperations)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [Text]
      -> Maybe [Text]
      -> Maybe [Text]
      -> Maybe Text
      -> V1NamedRuleWithOperations)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersions")
      Parser
  (Maybe [Text]
   -> Maybe [Text]
   -> Maybe [Text]
   -> Maybe Text
   -> V1NamedRuleWithOperations)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [Text]
      -> Maybe [Text] -> Maybe Text -> V1NamedRuleWithOperations)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"operations")
      Parser
  (Maybe [Text]
   -> Maybe [Text] -> Maybe Text -> V1NamedRuleWithOperations)
-> Parser (Maybe [Text])
-> Parser (Maybe [Text] -> Maybe Text -> V1NamedRuleWithOperations)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resourceNames")
      Parser (Maybe [Text] -> Maybe Text -> V1NamedRuleWithOperations)
-> Parser (Maybe [Text])
-> Parser (Maybe Text -> V1NamedRuleWithOperations)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resources")
      Parser (Maybe Text -> V1NamedRuleWithOperations)
-> Parser (Maybe Text) -> Parser V1NamedRuleWithOperations
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"scope")

-- | ToJSON V1NamedRuleWithOperations
instance A.ToJSON V1NamedRuleWithOperations where
  toJSON :: V1NamedRuleWithOperations -> Value
toJSON V1NamedRuleWithOperations {Maybe [Text]
Maybe Text
$sel:v1NamedRuleWithOperationsApiGroups:V1NamedRuleWithOperations :: V1NamedRuleWithOperations -> Maybe [Text]
$sel:v1NamedRuleWithOperationsApiVersions:V1NamedRuleWithOperations :: V1NamedRuleWithOperations -> Maybe [Text]
$sel:v1NamedRuleWithOperationsOperations:V1NamedRuleWithOperations :: V1NamedRuleWithOperations -> Maybe [Text]
$sel:v1NamedRuleWithOperationsResourceNames:V1NamedRuleWithOperations :: V1NamedRuleWithOperations -> Maybe [Text]
$sel:v1NamedRuleWithOperationsResources:V1NamedRuleWithOperations :: V1NamedRuleWithOperations -> Maybe [Text]
$sel:v1NamedRuleWithOperationsScope:V1NamedRuleWithOperations :: V1NamedRuleWithOperations -> Maybe Text
v1NamedRuleWithOperationsApiGroups :: Maybe [Text]
v1NamedRuleWithOperationsApiVersions :: Maybe [Text]
v1NamedRuleWithOperationsOperations :: Maybe [Text]
v1NamedRuleWithOperationsResourceNames :: Maybe [Text]
v1NamedRuleWithOperationsResources :: Maybe [Text]
v1NamedRuleWithOperationsScope :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiGroups" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1NamedRuleWithOperationsApiGroups
      , Key
"apiVersions" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1NamedRuleWithOperationsApiVersions
      , Key
"operations" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1NamedRuleWithOperationsOperations
      , Key
"resourceNames" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1NamedRuleWithOperationsResourceNames
      , Key
"resources" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1NamedRuleWithOperationsResources
      , Key
"scope" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1NamedRuleWithOperationsScope
      ]


-- | Construct a value of type 'V1NamedRuleWithOperations' (by applying it's required fields, if any)
mkV1NamedRuleWithOperations
  :: V1NamedRuleWithOperations
mkV1NamedRuleWithOperations :: V1NamedRuleWithOperations
mkV1NamedRuleWithOperations =
  V1NamedRuleWithOperations
  { $sel:v1NamedRuleWithOperationsApiGroups:V1NamedRuleWithOperations :: Maybe [Text]
v1NamedRuleWithOperationsApiGroups = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1NamedRuleWithOperationsApiVersions:V1NamedRuleWithOperations :: Maybe [Text]
v1NamedRuleWithOperationsApiVersions = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1NamedRuleWithOperationsOperations:V1NamedRuleWithOperations :: Maybe [Text]
v1NamedRuleWithOperationsOperations = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1NamedRuleWithOperationsResourceNames:V1NamedRuleWithOperations :: Maybe [Text]
v1NamedRuleWithOperationsResourceNames = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1NamedRuleWithOperationsResources:V1NamedRuleWithOperations :: Maybe [Text]
v1NamedRuleWithOperationsResources = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1NamedRuleWithOperationsScope:V1NamedRuleWithOperations :: Maybe Text
v1NamedRuleWithOperationsScope = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1Namespace
-- | V1Namespace
-- Namespace provides a scope for Names. Use of multiple namespaces is optional.
data V1Namespace = V1Namespace
  { V1Namespace -> Maybe Text
v1NamespaceApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1Namespace -> Maybe Text
v1NamespaceKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1Namespace -> Maybe V1ObjectMeta
v1NamespaceMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1Namespace -> Maybe V1NamespaceSpec
v1NamespaceSpec :: !(Maybe V1NamespaceSpec) -- ^ "spec"
  , V1Namespace -> Maybe V1NamespaceStatus
v1NamespaceStatus :: !(Maybe V1NamespaceStatus) -- ^ "status"
  } deriving (Int -> V1Namespace -> ShowS
[V1Namespace] -> ShowS
V1Namespace -> String
(Int -> V1Namespace -> ShowS)
-> (V1Namespace -> String)
-> ([V1Namespace] -> ShowS)
-> Show V1Namespace
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1Namespace -> ShowS
showsPrec :: Int -> V1Namespace -> ShowS
$cshow :: V1Namespace -> String
show :: V1Namespace -> String
$cshowList :: [V1Namespace] -> ShowS
showList :: [V1Namespace] -> ShowS
P.Show, V1Namespace -> V1Namespace -> Bool
(V1Namespace -> V1Namespace -> Bool)
-> (V1Namespace -> V1Namespace -> Bool) -> Eq V1Namespace
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1Namespace -> V1Namespace -> Bool
== :: V1Namespace -> V1Namespace -> Bool
$c/= :: V1Namespace -> V1Namespace -> Bool
/= :: V1Namespace -> V1Namespace -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1Namespace
instance A.FromJSON V1Namespace where
  parseJSON :: Value -> Parser V1Namespace
parseJSON = String
-> (Object -> Parser V1Namespace) -> Value -> Parser V1Namespace
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1Namespace" ((Object -> Parser V1Namespace) -> Value -> Parser V1Namespace)
-> (Object -> Parser V1Namespace) -> Value -> Parser V1Namespace
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1NamespaceSpec
-> Maybe V1NamespaceStatus
-> V1Namespace
V1Namespace
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1NamespaceSpec
 -> Maybe V1NamespaceStatus
 -> V1Namespace)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1NamespaceSpec
      -> Maybe V1NamespaceStatus
      -> V1Namespace)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1NamespaceSpec
   -> Maybe V1NamespaceStatus
   -> V1Namespace)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1NamespaceSpec -> Maybe V1NamespaceStatus -> V1Namespace)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1NamespaceSpec -> Maybe V1NamespaceStatus -> V1Namespace)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe V1NamespaceSpec -> Maybe V1NamespaceStatus -> V1Namespace)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (Maybe V1NamespaceSpec -> Maybe V1NamespaceStatus -> V1Namespace)
-> Parser (Maybe V1NamespaceSpec)
-> Parser (Maybe V1NamespaceStatus -> V1Namespace)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1NamespaceSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")
      Parser (Maybe V1NamespaceStatus -> V1Namespace)
-> Parser (Maybe V1NamespaceStatus) -> Parser V1Namespace
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1NamespaceStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1Namespace
instance A.ToJSON V1Namespace where
  toJSON :: V1Namespace -> Value
toJSON V1Namespace {Maybe Text
Maybe V1ObjectMeta
Maybe V1NamespaceStatus
Maybe V1NamespaceSpec
$sel:v1NamespaceApiVersion:V1Namespace :: V1Namespace -> Maybe Text
$sel:v1NamespaceKind:V1Namespace :: V1Namespace -> Maybe Text
$sel:v1NamespaceMetadata:V1Namespace :: V1Namespace -> Maybe V1ObjectMeta
$sel:v1NamespaceSpec:V1Namespace :: V1Namespace -> Maybe V1NamespaceSpec
$sel:v1NamespaceStatus:V1Namespace :: V1Namespace -> Maybe V1NamespaceStatus
v1NamespaceApiVersion :: Maybe Text
v1NamespaceKind :: Maybe Text
v1NamespaceMetadata :: Maybe V1ObjectMeta
v1NamespaceSpec :: Maybe V1NamespaceSpec
v1NamespaceStatus :: Maybe V1NamespaceStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1NamespaceApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1NamespaceKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1NamespaceMetadata
      , Key
"spec" Key -> Maybe V1NamespaceSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1NamespaceSpec
v1NamespaceSpec
      , Key
"status" Key -> Maybe V1NamespaceStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1NamespaceStatus
v1NamespaceStatus
      ]


-- | Construct a value of type 'V1Namespace' (by applying it's required fields, if any)
mkV1Namespace
  :: V1Namespace
mkV1Namespace :: V1Namespace
mkV1Namespace =
  V1Namespace
  { $sel:v1NamespaceApiVersion:V1Namespace :: Maybe Text
v1NamespaceApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1NamespaceKind:V1Namespace :: Maybe Text
v1NamespaceKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1NamespaceMetadata:V1Namespace :: Maybe V1ObjectMeta
v1NamespaceMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1NamespaceSpec:V1Namespace :: Maybe V1NamespaceSpec
v1NamespaceSpec = Maybe V1NamespaceSpec
forall a. Maybe a
Nothing
  , $sel:v1NamespaceStatus:V1Namespace :: Maybe V1NamespaceStatus
v1NamespaceStatus = Maybe V1NamespaceStatus
forall a. Maybe a
Nothing
  }

-- ** V1NamespaceCondition
-- | V1NamespaceCondition
-- NamespaceCondition contains details about state of namespace.
data V1NamespaceCondition = V1NamespaceCondition
  { V1NamespaceCondition -> Maybe DateTime
v1NamespaceConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - Last time the condition transitioned from one status to another.
  , V1NamespaceCondition -> Maybe Text
v1NamespaceConditionMessage :: !(Maybe Text) -- ^ "message" - Human-readable message indicating details about last transition.
  , V1NamespaceCondition -> Maybe Text
v1NamespaceConditionReason :: !(Maybe Text) -- ^ "reason" - Unique, one-word, CamelCase reason for the condition&#39;s last transition.
  , V1NamespaceCondition -> Text
v1NamespaceConditionStatus :: !(Text) -- ^ /Required/ "status" - Status of the condition, one of True, False, Unknown.
  , V1NamespaceCondition -> Text
v1NamespaceConditionType :: !(Text) -- ^ /Required/ "type" - Type of namespace controller condition.
  } deriving (Int -> V1NamespaceCondition -> ShowS
[V1NamespaceCondition] -> ShowS
V1NamespaceCondition -> String
(Int -> V1NamespaceCondition -> ShowS)
-> (V1NamespaceCondition -> String)
-> ([V1NamespaceCondition] -> ShowS)
-> Show V1NamespaceCondition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1NamespaceCondition -> ShowS
showsPrec :: Int -> V1NamespaceCondition -> ShowS
$cshow :: V1NamespaceCondition -> String
show :: V1NamespaceCondition -> String
$cshowList :: [V1NamespaceCondition] -> ShowS
showList :: [V1NamespaceCondition] -> ShowS
P.Show, V1NamespaceCondition -> V1NamespaceCondition -> Bool
(V1NamespaceCondition -> V1NamespaceCondition -> Bool)
-> (V1NamespaceCondition -> V1NamespaceCondition -> Bool)
-> Eq V1NamespaceCondition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1NamespaceCondition -> V1NamespaceCondition -> Bool
== :: V1NamespaceCondition -> V1NamespaceCondition -> Bool
$c/= :: V1NamespaceCondition -> V1NamespaceCondition -> Bool
/= :: V1NamespaceCondition -> V1NamespaceCondition -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1NamespaceCondition
instance A.FromJSON V1NamespaceCondition where
  parseJSON :: Value -> Parser V1NamespaceCondition
parseJSON = String
-> (Object -> Parser V1NamespaceCondition)
-> Value
-> Parser V1NamespaceCondition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1NamespaceCondition" ((Object -> Parser V1NamespaceCondition)
 -> Value -> Parser V1NamespaceCondition)
-> (Object -> Parser V1NamespaceCondition)
-> Value
-> Parser V1NamespaceCondition
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe DateTime
-> Maybe Text -> Maybe Text -> Text -> Text -> V1NamespaceCondition
V1NamespaceCondition
      (Maybe DateTime
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> Text
 -> V1NamespaceCondition)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe Text -> Maybe Text -> Text -> Text -> V1NamespaceCondition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lastTransitionTime")
      Parser
  (Maybe Text -> Maybe Text -> Text -> Text -> V1NamespaceCondition)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Text -> Text -> V1NamespaceCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"message")
      Parser (Maybe Text -> Text -> Text -> V1NamespaceCondition)
-> Parser (Maybe Text)
-> Parser (Text -> Text -> V1NamespaceCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reason")
      Parser (Text -> Text -> V1NamespaceCondition)
-> Parser Text -> Parser (Text -> V1NamespaceCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"status")
      Parser (Text -> V1NamespaceCondition)
-> Parser Text -> Parser V1NamespaceCondition
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"type")

-- | ToJSON V1NamespaceCondition
instance A.ToJSON V1NamespaceCondition where
  toJSON :: V1NamespaceCondition -> Value
toJSON V1NamespaceCondition {Maybe Text
Maybe DateTime
Text
$sel:v1NamespaceConditionLastTransitionTime:V1NamespaceCondition :: V1NamespaceCondition -> Maybe DateTime
$sel:v1NamespaceConditionMessage:V1NamespaceCondition :: V1NamespaceCondition -> Maybe Text
$sel:v1NamespaceConditionReason:V1NamespaceCondition :: V1NamespaceCondition -> Maybe Text
$sel:v1NamespaceConditionStatus:V1NamespaceCondition :: V1NamespaceCondition -> Text
$sel:v1NamespaceConditionType:V1NamespaceCondition :: V1NamespaceCondition -> Text
v1NamespaceConditionLastTransitionTime :: Maybe DateTime
v1NamespaceConditionMessage :: Maybe Text
v1NamespaceConditionReason :: Maybe Text
v1NamespaceConditionStatus :: Text
v1NamespaceConditionType :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"lastTransitionTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1NamespaceConditionLastTransitionTime
      , Key
"message" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1NamespaceConditionMessage
      , Key
"reason" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1NamespaceConditionReason
      , Key
"status" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1NamespaceConditionStatus
      , Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1NamespaceConditionType
      ]


-- | Construct a value of type 'V1NamespaceCondition' (by applying it's required fields, if any)
mkV1NamespaceCondition
  :: Text -- ^ 'v1NamespaceConditionStatus': Status of the condition, one of True, False, Unknown.
  -> Text -- ^ 'v1NamespaceConditionType': Type of namespace controller condition.
  -> V1NamespaceCondition
mkV1NamespaceCondition :: Text -> Text -> V1NamespaceCondition
mkV1NamespaceCondition Text
v1NamespaceConditionStatus Text
v1NamespaceConditionType =
  V1NamespaceCondition
  { $sel:v1NamespaceConditionLastTransitionTime:V1NamespaceCondition :: Maybe DateTime
v1NamespaceConditionLastTransitionTime = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1NamespaceConditionMessage:V1NamespaceCondition :: Maybe Text
v1NamespaceConditionMessage = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1NamespaceConditionReason:V1NamespaceCondition :: Maybe Text
v1NamespaceConditionReason = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1NamespaceConditionStatus:V1NamespaceCondition :: Text
v1NamespaceConditionStatus :: Text
v1NamespaceConditionStatus
  , Text
$sel:v1NamespaceConditionType:V1NamespaceCondition :: Text
v1NamespaceConditionType :: Text
v1NamespaceConditionType
  }

-- ** V1NamespaceList
-- | V1NamespaceList
-- NamespaceList is a list of Namespaces.
data V1NamespaceList = V1NamespaceList
  { V1NamespaceList -> Maybe Text
v1NamespaceListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1NamespaceList -> [V1Namespace]
v1NamespaceListItems :: !([V1Namespace]) -- ^ /Required/ "items" - Items is the list of Namespace objects in the list. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
  , V1NamespaceList -> Maybe Text
v1NamespaceListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1NamespaceList -> Maybe V1ListMeta
v1NamespaceListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1NamespaceList -> ShowS
[V1NamespaceList] -> ShowS
V1NamespaceList -> String
(Int -> V1NamespaceList -> ShowS)
-> (V1NamespaceList -> String)
-> ([V1NamespaceList] -> ShowS)
-> Show V1NamespaceList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1NamespaceList -> ShowS
showsPrec :: Int -> V1NamespaceList -> ShowS
$cshow :: V1NamespaceList -> String
show :: V1NamespaceList -> String
$cshowList :: [V1NamespaceList] -> ShowS
showList :: [V1NamespaceList] -> ShowS
P.Show, V1NamespaceList -> V1NamespaceList -> Bool
(V1NamespaceList -> V1NamespaceList -> Bool)
-> (V1NamespaceList -> V1NamespaceList -> Bool)
-> Eq V1NamespaceList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1NamespaceList -> V1NamespaceList -> Bool
== :: V1NamespaceList -> V1NamespaceList -> Bool
$c/= :: V1NamespaceList -> V1NamespaceList -> Bool
/= :: V1NamespaceList -> V1NamespaceList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1NamespaceList
instance A.FromJSON V1NamespaceList where
  parseJSON :: Value -> Parser V1NamespaceList
parseJSON = String
-> (Object -> Parser V1NamespaceList)
-> Value
-> Parser V1NamespaceList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1NamespaceList" ((Object -> Parser V1NamespaceList)
 -> Value -> Parser V1NamespaceList)
-> (Object -> Parser V1NamespaceList)
-> Value
-> Parser V1NamespaceList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1Namespace]
-> Maybe Text
-> Maybe V1ListMeta
-> V1NamespaceList
V1NamespaceList
      (Maybe Text
 -> [V1Namespace]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1NamespaceList)
-> Parser (Maybe Text)
-> Parser
     ([V1Namespace]
      -> Maybe Text -> Maybe V1ListMeta -> V1NamespaceList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1Namespace]
   -> Maybe Text -> Maybe V1ListMeta -> V1NamespaceList)
-> Parser [V1Namespace]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1NamespaceList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1Namespace]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1NamespaceList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1NamespaceList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1NamespaceList)
-> Parser (Maybe V1ListMeta) -> Parser V1NamespaceList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1NamespaceList
instance A.ToJSON V1NamespaceList where
  toJSON :: V1NamespaceList -> Value
toJSON V1NamespaceList {[V1Namespace]
Maybe Text
Maybe V1ListMeta
$sel:v1NamespaceListApiVersion:V1NamespaceList :: V1NamespaceList -> Maybe Text
$sel:v1NamespaceListItems:V1NamespaceList :: V1NamespaceList -> [V1Namespace]
$sel:v1NamespaceListKind:V1NamespaceList :: V1NamespaceList -> Maybe Text
$sel:v1NamespaceListMetadata:V1NamespaceList :: V1NamespaceList -> Maybe V1ListMeta
v1NamespaceListApiVersion :: Maybe Text
v1NamespaceListItems :: [V1Namespace]
v1NamespaceListKind :: Maybe Text
v1NamespaceListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1NamespaceListApiVersion
      , Key
"items" Key -> [V1Namespace] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1Namespace]
v1NamespaceListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1NamespaceListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1NamespaceListMetadata
      ]


-- | Construct a value of type 'V1NamespaceList' (by applying it's required fields, if any)
mkV1NamespaceList
  :: [V1Namespace] -- ^ 'v1NamespaceListItems': Items is the list of Namespace objects in the list. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
  -> V1NamespaceList
mkV1NamespaceList :: [V1Namespace] -> V1NamespaceList
mkV1NamespaceList [V1Namespace]
v1NamespaceListItems =
  V1NamespaceList
  { $sel:v1NamespaceListApiVersion:V1NamespaceList :: Maybe Text
v1NamespaceListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1Namespace]
$sel:v1NamespaceListItems:V1NamespaceList :: [V1Namespace]
v1NamespaceListItems :: [V1Namespace]
v1NamespaceListItems
  , $sel:v1NamespaceListKind:V1NamespaceList :: Maybe Text
v1NamespaceListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1NamespaceListMetadata:V1NamespaceList :: Maybe V1ListMeta
v1NamespaceListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1NamespaceSpec
-- | V1NamespaceSpec
-- NamespaceSpec describes the attributes on a Namespace.
data V1NamespaceSpec = V1NamespaceSpec
  { V1NamespaceSpec -> Maybe [Text]
v1NamespaceSpecFinalizers :: !(Maybe [Text]) -- ^ "finalizers" - Finalizers is an opaque list of values that must be empty to permanently remove object from storage. More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/
  } deriving (Int -> V1NamespaceSpec -> ShowS
[V1NamespaceSpec] -> ShowS
V1NamespaceSpec -> String
(Int -> V1NamespaceSpec -> ShowS)
-> (V1NamespaceSpec -> String)
-> ([V1NamespaceSpec] -> ShowS)
-> Show V1NamespaceSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1NamespaceSpec -> ShowS
showsPrec :: Int -> V1NamespaceSpec -> ShowS
$cshow :: V1NamespaceSpec -> String
show :: V1NamespaceSpec -> String
$cshowList :: [V1NamespaceSpec] -> ShowS
showList :: [V1NamespaceSpec] -> ShowS
P.Show, V1NamespaceSpec -> V1NamespaceSpec -> Bool
(V1NamespaceSpec -> V1NamespaceSpec -> Bool)
-> (V1NamespaceSpec -> V1NamespaceSpec -> Bool)
-> Eq V1NamespaceSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1NamespaceSpec -> V1NamespaceSpec -> Bool
== :: V1NamespaceSpec -> V1NamespaceSpec -> Bool
$c/= :: V1NamespaceSpec -> V1NamespaceSpec -> Bool
/= :: V1NamespaceSpec -> V1NamespaceSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1NamespaceSpec
instance A.FromJSON V1NamespaceSpec where
  parseJSON :: Value -> Parser V1NamespaceSpec
parseJSON = String
-> (Object -> Parser V1NamespaceSpec)
-> Value
-> Parser V1NamespaceSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1NamespaceSpec" ((Object -> Parser V1NamespaceSpec)
 -> Value -> Parser V1NamespaceSpec)
-> (Object -> Parser V1NamespaceSpec)
-> Value
-> Parser V1NamespaceSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [Text] -> V1NamespaceSpec
V1NamespaceSpec
      (Maybe [Text] -> V1NamespaceSpec)
-> Parser (Maybe [Text]) -> Parser V1NamespaceSpec
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"finalizers")

-- | ToJSON V1NamespaceSpec
instance A.ToJSON V1NamespaceSpec where
  toJSON :: V1NamespaceSpec -> Value
toJSON V1NamespaceSpec {Maybe [Text]
$sel:v1NamespaceSpecFinalizers:V1NamespaceSpec :: V1NamespaceSpec -> Maybe [Text]
v1NamespaceSpecFinalizers :: Maybe [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"finalizers" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1NamespaceSpecFinalizers
      ]


-- | Construct a value of type 'V1NamespaceSpec' (by applying it's required fields, if any)
mkV1NamespaceSpec
  :: V1NamespaceSpec
mkV1NamespaceSpec :: V1NamespaceSpec
mkV1NamespaceSpec =
  V1NamespaceSpec
  { $sel:v1NamespaceSpecFinalizers:V1NamespaceSpec :: Maybe [Text]
v1NamespaceSpecFinalizers = Maybe [Text]
forall a. Maybe a
Nothing
  }

-- ** V1NamespaceStatus
-- | V1NamespaceStatus
-- NamespaceStatus is information about the current status of a Namespace.
data V1NamespaceStatus = V1NamespaceStatus
  { V1NamespaceStatus -> Maybe [V1NamespaceCondition]
v1NamespaceStatusConditions :: !(Maybe [V1NamespaceCondition]) -- ^ "conditions" - Represents the latest available observations of a namespace&#39;s current state.
  , V1NamespaceStatus -> Maybe Text
v1NamespaceStatusPhase :: !(Maybe Text) -- ^ "phase" - Phase is the current lifecycle phase of the namespace. More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/
  } deriving (Int -> V1NamespaceStatus -> ShowS
[V1NamespaceStatus] -> ShowS
V1NamespaceStatus -> String
(Int -> V1NamespaceStatus -> ShowS)
-> (V1NamespaceStatus -> String)
-> ([V1NamespaceStatus] -> ShowS)
-> Show V1NamespaceStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1NamespaceStatus -> ShowS
showsPrec :: Int -> V1NamespaceStatus -> ShowS
$cshow :: V1NamespaceStatus -> String
show :: V1NamespaceStatus -> String
$cshowList :: [V1NamespaceStatus] -> ShowS
showList :: [V1NamespaceStatus] -> ShowS
P.Show, V1NamespaceStatus -> V1NamespaceStatus -> Bool
(V1NamespaceStatus -> V1NamespaceStatus -> Bool)
-> (V1NamespaceStatus -> V1NamespaceStatus -> Bool)
-> Eq V1NamespaceStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1NamespaceStatus -> V1NamespaceStatus -> Bool
== :: V1NamespaceStatus -> V1NamespaceStatus -> Bool
$c/= :: V1NamespaceStatus -> V1NamespaceStatus -> Bool
/= :: V1NamespaceStatus -> V1NamespaceStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1NamespaceStatus
instance A.FromJSON V1NamespaceStatus where
  parseJSON :: Value -> Parser V1NamespaceStatus
parseJSON = String
-> (Object -> Parser V1NamespaceStatus)
-> Value
-> Parser V1NamespaceStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1NamespaceStatus" ((Object -> Parser V1NamespaceStatus)
 -> Value -> Parser V1NamespaceStatus)
-> (Object -> Parser V1NamespaceStatus)
-> Value
-> Parser V1NamespaceStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1NamespaceCondition] -> Maybe Text -> V1NamespaceStatus
V1NamespaceStatus
      (Maybe [V1NamespaceCondition] -> Maybe Text -> V1NamespaceStatus)
-> Parser (Maybe [V1NamespaceCondition])
-> Parser (Maybe Text -> V1NamespaceStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1NamespaceCondition])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"conditions")
      Parser (Maybe Text -> V1NamespaceStatus)
-> Parser (Maybe Text) -> Parser V1NamespaceStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"phase")

-- | ToJSON V1NamespaceStatus
instance A.ToJSON V1NamespaceStatus where
  toJSON :: V1NamespaceStatus -> Value
toJSON V1NamespaceStatus {Maybe [V1NamespaceCondition]
Maybe Text
$sel:v1NamespaceStatusConditions:V1NamespaceStatus :: V1NamespaceStatus -> Maybe [V1NamespaceCondition]
$sel:v1NamespaceStatusPhase:V1NamespaceStatus :: V1NamespaceStatus -> Maybe Text
v1NamespaceStatusConditions :: Maybe [V1NamespaceCondition]
v1NamespaceStatusPhase :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"conditions" Key -> Maybe [V1NamespaceCondition] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1NamespaceCondition]
v1NamespaceStatusConditions
      , Key
"phase" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1NamespaceStatusPhase
      ]


-- | Construct a value of type 'V1NamespaceStatus' (by applying it's required fields, if any)
mkV1NamespaceStatus
  :: V1NamespaceStatus
mkV1NamespaceStatus :: V1NamespaceStatus
mkV1NamespaceStatus =
  V1NamespaceStatus
  { $sel:v1NamespaceStatusConditions:V1NamespaceStatus :: Maybe [V1NamespaceCondition]
v1NamespaceStatusConditions = Maybe [V1NamespaceCondition]
forall a. Maybe a
Nothing
  , $sel:v1NamespaceStatusPhase:V1NamespaceStatus :: Maybe Text
v1NamespaceStatusPhase = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1NetworkPolicy
-- | V1NetworkPolicy
-- NetworkPolicy describes what network traffic is allowed for a set of Pods
data V1NetworkPolicy = V1NetworkPolicy
  { V1NetworkPolicy -> Maybe Text
v1NetworkPolicyApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1NetworkPolicy -> Maybe Text
v1NetworkPolicyKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1NetworkPolicy -> Maybe V1ObjectMeta
v1NetworkPolicyMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1NetworkPolicy -> Maybe V1NetworkPolicySpec
v1NetworkPolicySpec :: !(Maybe V1NetworkPolicySpec) -- ^ "spec"
  } deriving (Int -> V1NetworkPolicy -> ShowS
[V1NetworkPolicy] -> ShowS
V1NetworkPolicy -> String
(Int -> V1NetworkPolicy -> ShowS)
-> (V1NetworkPolicy -> String)
-> ([V1NetworkPolicy] -> ShowS)
-> Show V1NetworkPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1NetworkPolicy -> ShowS
showsPrec :: Int -> V1NetworkPolicy -> ShowS
$cshow :: V1NetworkPolicy -> String
show :: V1NetworkPolicy -> String
$cshowList :: [V1NetworkPolicy] -> ShowS
showList :: [V1NetworkPolicy] -> ShowS
P.Show, V1NetworkPolicy -> V1NetworkPolicy -> Bool
(V1NetworkPolicy -> V1NetworkPolicy -> Bool)
-> (V1NetworkPolicy -> V1NetworkPolicy -> Bool)
-> Eq V1NetworkPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1NetworkPolicy -> V1NetworkPolicy -> Bool
== :: V1NetworkPolicy -> V1NetworkPolicy -> Bool
$c/= :: V1NetworkPolicy -> V1NetworkPolicy -> Bool
/= :: V1NetworkPolicy -> V1NetworkPolicy -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1NetworkPolicy
instance A.FromJSON V1NetworkPolicy where
  parseJSON :: Value -> Parser V1NetworkPolicy
parseJSON = String
-> (Object -> Parser V1NetworkPolicy)
-> Value
-> Parser V1NetworkPolicy
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1NetworkPolicy" ((Object -> Parser V1NetworkPolicy)
 -> Value -> Parser V1NetworkPolicy)
-> (Object -> Parser V1NetworkPolicy)
-> Value
-> Parser V1NetworkPolicy
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1NetworkPolicySpec
-> V1NetworkPolicy
V1NetworkPolicy
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1NetworkPolicySpec
 -> V1NetworkPolicy)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1NetworkPolicySpec
      -> V1NetworkPolicy)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1NetworkPolicySpec
   -> V1NetworkPolicy)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1NetworkPolicySpec -> V1NetworkPolicy)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1NetworkPolicySpec -> V1NetworkPolicy)
-> Parser (Maybe V1ObjectMeta)
-> Parser (Maybe V1NetworkPolicySpec -> V1NetworkPolicy)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (Maybe V1NetworkPolicySpec -> V1NetworkPolicy)
-> Parser (Maybe V1NetworkPolicySpec) -> Parser V1NetworkPolicy
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1NetworkPolicySpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")

-- | ToJSON V1NetworkPolicy
instance A.ToJSON V1NetworkPolicy where
  toJSON :: V1NetworkPolicy -> Value
toJSON V1NetworkPolicy {Maybe Text
Maybe V1ObjectMeta
Maybe V1NetworkPolicySpec
$sel:v1NetworkPolicyApiVersion:V1NetworkPolicy :: V1NetworkPolicy -> Maybe Text
$sel:v1NetworkPolicyKind:V1NetworkPolicy :: V1NetworkPolicy -> Maybe Text
$sel:v1NetworkPolicyMetadata:V1NetworkPolicy :: V1NetworkPolicy -> Maybe V1ObjectMeta
$sel:v1NetworkPolicySpec:V1NetworkPolicy :: V1NetworkPolicy -> Maybe V1NetworkPolicySpec
v1NetworkPolicyApiVersion :: Maybe Text
v1NetworkPolicyKind :: Maybe Text
v1NetworkPolicyMetadata :: Maybe V1ObjectMeta
v1NetworkPolicySpec :: Maybe V1NetworkPolicySpec
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1NetworkPolicyApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1NetworkPolicyKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1NetworkPolicyMetadata
      , Key
"spec" Key -> Maybe V1NetworkPolicySpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1NetworkPolicySpec
v1NetworkPolicySpec
      ]


-- | Construct a value of type 'V1NetworkPolicy' (by applying it's required fields, if any)
mkV1NetworkPolicy
  :: V1NetworkPolicy
mkV1NetworkPolicy :: V1NetworkPolicy
mkV1NetworkPolicy =
  V1NetworkPolicy
  { $sel:v1NetworkPolicyApiVersion:V1NetworkPolicy :: Maybe Text
v1NetworkPolicyApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1NetworkPolicyKind:V1NetworkPolicy :: Maybe Text
v1NetworkPolicyKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1NetworkPolicyMetadata:V1NetworkPolicy :: Maybe V1ObjectMeta
v1NetworkPolicyMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1NetworkPolicySpec:V1NetworkPolicy :: Maybe V1NetworkPolicySpec
v1NetworkPolicySpec = Maybe V1NetworkPolicySpec
forall a. Maybe a
Nothing
  }

-- ** V1NetworkPolicyEgressRule
-- | V1NetworkPolicyEgressRule
-- NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8
data V1NetworkPolicyEgressRule = V1NetworkPolicyEgressRule
  { V1NetworkPolicyEgressRule -> Maybe [V1NetworkPolicyPort]
v1NetworkPolicyEgressRulePorts :: !(Maybe [V1NetworkPolicyPort]) -- ^ "ports" - ports is a list of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.
  , V1NetworkPolicyEgressRule -> Maybe [V1NetworkPolicyPeer]
v1NetworkPolicyEgressRuleTo :: !(Maybe [V1NetworkPolicyPeer]) -- ^ "to" - to is a list of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list.
  } deriving (Int -> V1NetworkPolicyEgressRule -> ShowS
[V1NetworkPolicyEgressRule] -> ShowS
V1NetworkPolicyEgressRule -> String
(Int -> V1NetworkPolicyEgressRule -> ShowS)
-> (V1NetworkPolicyEgressRule -> String)
-> ([V1NetworkPolicyEgressRule] -> ShowS)
-> Show V1NetworkPolicyEgressRule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1NetworkPolicyEgressRule -> ShowS
showsPrec :: Int -> V1NetworkPolicyEgressRule -> ShowS
$cshow :: V1NetworkPolicyEgressRule -> String
show :: V1NetworkPolicyEgressRule -> String
$cshowList :: [V1NetworkPolicyEgressRule] -> ShowS
showList :: [V1NetworkPolicyEgressRule] -> ShowS
P.Show, V1NetworkPolicyEgressRule -> V1NetworkPolicyEgressRule -> Bool
(V1NetworkPolicyEgressRule -> V1NetworkPolicyEgressRule -> Bool)
-> (V1NetworkPolicyEgressRule -> V1NetworkPolicyEgressRule -> Bool)
-> Eq V1NetworkPolicyEgressRule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1NetworkPolicyEgressRule -> V1NetworkPolicyEgressRule -> Bool
== :: V1NetworkPolicyEgressRule -> V1NetworkPolicyEgressRule -> Bool
$c/= :: V1NetworkPolicyEgressRule -> V1NetworkPolicyEgressRule -> Bool
/= :: V1NetworkPolicyEgressRule -> V1NetworkPolicyEgressRule -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1NetworkPolicyEgressRule
instance A.FromJSON V1NetworkPolicyEgressRule where
  parseJSON :: Value -> Parser V1NetworkPolicyEgressRule
parseJSON = String
-> (Object -> Parser V1NetworkPolicyEgressRule)
-> Value
-> Parser V1NetworkPolicyEgressRule
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1NetworkPolicyEgressRule" ((Object -> Parser V1NetworkPolicyEgressRule)
 -> Value -> Parser V1NetworkPolicyEgressRule)
-> (Object -> Parser V1NetworkPolicyEgressRule)
-> Value
-> Parser V1NetworkPolicyEgressRule
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1NetworkPolicyPort]
-> Maybe [V1NetworkPolicyPeer] -> V1NetworkPolicyEgressRule
V1NetworkPolicyEgressRule
      (Maybe [V1NetworkPolicyPort]
 -> Maybe [V1NetworkPolicyPeer] -> V1NetworkPolicyEgressRule)
-> Parser (Maybe [V1NetworkPolicyPort])
-> Parser
     (Maybe [V1NetworkPolicyPeer] -> V1NetworkPolicyEgressRule)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1NetworkPolicyPort])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ports")
      Parser (Maybe [V1NetworkPolicyPeer] -> V1NetworkPolicyEgressRule)
-> Parser (Maybe [V1NetworkPolicyPeer])
-> Parser V1NetworkPolicyEgressRule
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1NetworkPolicyPeer])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"to")

-- | ToJSON V1NetworkPolicyEgressRule
instance A.ToJSON V1NetworkPolicyEgressRule where
  toJSON :: V1NetworkPolicyEgressRule -> Value
toJSON V1NetworkPolicyEgressRule {Maybe [V1NetworkPolicyPort]
Maybe [V1NetworkPolicyPeer]
$sel:v1NetworkPolicyEgressRulePorts:V1NetworkPolicyEgressRule :: V1NetworkPolicyEgressRule -> Maybe [V1NetworkPolicyPort]
$sel:v1NetworkPolicyEgressRuleTo:V1NetworkPolicyEgressRule :: V1NetworkPolicyEgressRule -> Maybe [V1NetworkPolicyPeer]
v1NetworkPolicyEgressRulePorts :: Maybe [V1NetworkPolicyPort]
v1NetworkPolicyEgressRuleTo :: Maybe [V1NetworkPolicyPeer]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"ports" Key -> Maybe [V1NetworkPolicyPort] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1NetworkPolicyPort]
v1NetworkPolicyEgressRulePorts
      , Key
"to" Key -> Maybe [V1NetworkPolicyPeer] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1NetworkPolicyPeer]
v1NetworkPolicyEgressRuleTo
      ]


-- | Construct a value of type 'V1NetworkPolicyEgressRule' (by applying it's required fields, if any)
mkV1NetworkPolicyEgressRule
  :: V1NetworkPolicyEgressRule
mkV1NetworkPolicyEgressRule :: V1NetworkPolicyEgressRule
mkV1NetworkPolicyEgressRule =
  V1NetworkPolicyEgressRule
  { $sel:v1NetworkPolicyEgressRulePorts:V1NetworkPolicyEgressRule :: Maybe [V1NetworkPolicyPort]
v1NetworkPolicyEgressRulePorts = Maybe [V1NetworkPolicyPort]
forall a. Maybe a
Nothing
  , $sel:v1NetworkPolicyEgressRuleTo:V1NetworkPolicyEgressRule :: Maybe [V1NetworkPolicyPeer]
v1NetworkPolicyEgressRuleTo = Maybe [V1NetworkPolicyPeer]
forall a. Maybe a
Nothing
  }

-- ** V1NetworkPolicyIngressRule
-- | V1NetworkPolicyIngressRule
-- NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.
data V1NetworkPolicyIngressRule = V1NetworkPolicyIngressRule
  { V1NetworkPolicyIngressRule -> Maybe [V1NetworkPolicyPeer]
v1NetworkPolicyIngressRuleFrom :: !(Maybe [V1NetworkPolicyPeer]) -- ^ "from" - from is a list of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the from list.
  , V1NetworkPolicyIngressRule -> Maybe [V1NetworkPolicyPort]
v1NetworkPolicyIngressRulePorts :: !(Maybe [V1NetworkPolicyPort]) -- ^ "ports" - ports is a list of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.
  } deriving (Int -> V1NetworkPolicyIngressRule -> ShowS
[V1NetworkPolicyIngressRule] -> ShowS
V1NetworkPolicyIngressRule -> String
(Int -> V1NetworkPolicyIngressRule -> ShowS)
-> (V1NetworkPolicyIngressRule -> String)
-> ([V1NetworkPolicyIngressRule] -> ShowS)
-> Show V1NetworkPolicyIngressRule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1NetworkPolicyIngressRule -> ShowS
showsPrec :: Int -> V1NetworkPolicyIngressRule -> ShowS
$cshow :: V1NetworkPolicyIngressRule -> String
show :: V1NetworkPolicyIngressRule -> String
$cshowList :: [V1NetworkPolicyIngressRule] -> ShowS
showList :: [V1NetworkPolicyIngressRule] -> ShowS
P.Show, V1NetworkPolicyIngressRule -> V1NetworkPolicyIngressRule -> Bool
(V1NetworkPolicyIngressRule -> V1NetworkPolicyIngressRule -> Bool)
-> (V1NetworkPolicyIngressRule
    -> V1NetworkPolicyIngressRule -> Bool)
-> Eq V1NetworkPolicyIngressRule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1NetworkPolicyIngressRule -> V1NetworkPolicyIngressRule -> Bool
== :: V1NetworkPolicyIngressRule -> V1NetworkPolicyIngressRule -> Bool
$c/= :: V1NetworkPolicyIngressRule -> V1NetworkPolicyIngressRule -> Bool
/= :: V1NetworkPolicyIngressRule -> V1NetworkPolicyIngressRule -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1NetworkPolicyIngressRule
instance A.FromJSON V1NetworkPolicyIngressRule where
  parseJSON :: Value -> Parser V1NetworkPolicyIngressRule
parseJSON = String
-> (Object -> Parser V1NetworkPolicyIngressRule)
-> Value
-> Parser V1NetworkPolicyIngressRule
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1NetworkPolicyIngressRule" ((Object -> Parser V1NetworkPolicyIngressRule)
 -> Value -> Parser V1NetworkPolicyIngressRule)
-> (Object -> Parser V1NetworkPolicyIngressRule)
-> Value
-> Parser V1NetworkPolicyIngressRule
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1NetworkPolicyPeer]
-> Maybe [V1NetworkPolicyPort] -> V1NetworkPolicyIngressRule
V1NetworkPolicyIngressRule
      (Maybe [V1NetworkPolicyPeer]
 -> Maybe [V1NetworkPolicyPort] -> V1NetworkPolicyIngressRule)
-> Parser (Maybe [V1NetworkPolicyPeer])
-> Parser
     (Maybe [V1NetworkPolicyPort] -> V1NetworkPolicyIngressRule)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1NetworkPolicyPeer])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"from")
      Parser (Maybe [V1NetworkPolicyPort] -> V1NetworkPolicyIngressRule)
-> Parser (Maybe [V1NetworkPolicyPort])
-> Parser V1NetworkPolicyIngressRule
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1NetworkPolicyPort])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ports")

-- | ToJSON V1NetworkPolicyIngressRule
instance A.ToJSON V1NetworkPolicyIngressRule where
  toJSON :: V1NetworkPolicyIngressRule -> Value
toJSON V1NetworkPolicyIngressRule {Maybe [V1NetworkPolicyPort]
Maybe [V1NetworkPolicyPeer]
$sel:v1NetworkPolicyIngressRuleFrom:V1NetworkPolicyIngressRule :: V1NetworkPolicyIngressRule -> Maybe [V1NetworkPolicyPeer]
$sel:v1NetworkPolicyIngressRulePorts:V1NetworkPolicyIngressRule :: V1NetworkPolicyIngressRule -> Maybe [V1NetworkPolicyPort]
v1NetworkPolicyIngressRuleFrom :: Maybe [V1NetworkPolicyPeer]
v1NetworkPolicyIngressRulePorts :: Maybe [V1NetworkPolicyPort]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"from" Key -> Maybe [V1NetworkPolicyPeer] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1NetworkPolicyPeer]
v1NetworkPolicyIngressRuleFrom
      , Key
"ports" Key -> Maybe [V1NetworkPolicyPort] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1NetworkPolicyPort]
v1NetworkPolicyIngressRulePorts
      ]


-- | Construct a value of type 'V1NetworkPolicyIngressRule' (by applying it's required fields, if any)
mkV1NetworkPolicyIngressRule
  :: V1NetworkPolicyIngressRule
mkV1NetworkPolicyIngressRule :: V1NetworkPolicyIngressRule
mkV1NetworkPolicyIngressRule =
  V1NetworkPolicyIngressRule
  { $sel:v1NetworkPolicyIngressRuleFrom:V1NetworkPolicyIngressRule :: Maybe [V1NetworkPolicyPeer]
v1NetworkPolicyIngressRuleFrom = Maybe [V1NetworkPolicyPeer]
forall a. Maybe a
Nothing
  , $sel:v1NetworkPolicyIngressRulePorts:V1NetworkPolicyIngressRule :: Maybe [V1NetworkPolicyPort]
v1NetworkPolicyIngressRulePorts = Maybe [V1NetworkPolicyPort]
forall a. Maybe a
Nothing
  }

-- ** V1NetworkPolicyList
-- | V1NetworkPolicyList
-- NetworkPolicyList is a list of NetworkPolicy objects.
data V1NetworkPolicyList = V1NetworkPolicyList
  { V1NetworkPolicyList -> Maybe Text
v1NetworkPolicyListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1NetworkPolicyList -> [V1NetworkPolicy]
v1NetworkPolicyListItems :: !([V1NetworkPolicy]) -- ^ /Required/ "items" - items is a list of schema objects.
  , V1NetworkPolicyList -> Maybe Text
v1NetworkPolicyListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1NetworkPolicyList -> Maybe V1ListMeta
v1NetworkPolicyListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1NetworkPolicyList -> ShowS
[V1NetworkPolicyList] -> ShowS
V1NetworkPolicyList -> String
(Int -> V1NetworkPolicyList -> ShowS)
-> (V1NetworkPolicyList -> String)
-> ([V1NetworkPolicyList] -> ShowS)
-> Show V1NetworkPolicyList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1NetworkPolicyList -> ShowS
showsPrec :: Int -> V1NetworkPolicyList -> ShowS
$cshow :: V1NetworkPolicyList -> String
show :: V1NetworkPolicyList -> String
$cshowList :: [V1NetworkPolicyList] -> ShowS
showList :: [V1NetworkPolicyList] -> ShowS
P.Show, V1NetworkPolicyList -> V1NetworkPolicyList -> Bool
(V1NetworkPolicyList -> V1NetworkPolicyList -> Bool)
-> (V1NetworkPolicyList -> V1NetworkPolicyList -> Bool)
-> Eq V1NetworkPolicyList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1NetworkPolicyList -> V1NetworkPolicyList -> Bool
== :: V1NetworkPolicyList -> V1NetworkPolicyList -> Bool
$c/= :: V1NetworkPolicyList -> V1NetworkPolicyList -> Bool
/= :: V1NetworkPolicyList -> V1NetworkPolicyList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1NetworkPolicyList
instance A.FromJSON V1NetworkPolicyList where
  parseJSON :: Value -> Parser V1NetworkPolicyList
parseJSON = String
-> (Object -> Parser V1NetworkPolicyList)
-> Value
-> Parser V1NetworkPolicyList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1NetworkPolicyList" ((Object -> Parser V1NetworkPolicyList)
 -> Value -> Parser V1NetworkPolicyList)
-> (Object -> Parser V1NetworkPolicyList)
-> Value
-> Parser V1NetworkPolicyList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1NetworkPolicy]
-> Maybe Text
-> Maybe V1ListMeta
-> V1NetworkPolicyList
V1NetworkPolicyList
      (Maybe Text
 -> [V1NetworkPolicy]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1NetworkPolicyList)
-> Parser (Maybe Text)
-> Parser
     ([V1NetworkPolicy]
      -> Maybe Text -> Maybe V1ListMeta -> V1NetworkPolicyList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1NetworkPolicy]
   -> Maybe Text -> Maybe V1ListMeta -> V1NetworkPolicyList)
-> Parser [V1NetworkPolicy]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1NetworkPolicyList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1NetworkPolicy]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1NetworkPolicyList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1NetworkPolicyList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1NetworkPolicyList)
-> Parser (Maybe V1ListMeta) -> Parser V1NetworkPolicyList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1NetworkPolicyList
instance A.ToJSON V1NetworkPolicyList where
  toJSON :: V1NetworkPolicyList -> Value
toJSON V1NetworkPolicyList {[V1NetworkPolicy]
Maybe Text
Maybe V1ListMeta
$sel:v1NetworkPolicyListApiVersion:V1NetworkPolicyList :: V1NetworkPolicyList -> Maybe Text
$sel:v1NetworkPolicyListItems:V1NetworkPolicyList :: V1NetworkPolicyList -> [V1NetworkPolicy]
$sel:v1NetworkPolicyListKind:V1NetworkPolicyList :: V1NetworkPolicyList -> Maybe Text
$sel:v1NetworkPolicyListMetadata:V1NetworkPolicyList :: V1NetworkPolicyList -> Maybe V1ListMeta
v1NetworkPolicyListApiVersion :: Maybe Text
v1NetworkPolicyListItems :: [V1NetworkPolicy]
v1NetworkPolicyListKind :: Maybe Text
v1NetworkPolicyListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1NetworkPolicyListApiVersion
      , Key
"items" Key -> [V1NetworkPolicy] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1NetworkPolicy]
v1NetworkPolicyListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1NetworkPolicyListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1NetworkPolicyListMetadata
      ]


-- | Construct a value of type 'V1NetworkPolicyList' (by applying it's required fields, if any)
mkV1NetworkPolicyList
  :: [V1NetworkPolicy] -- ^ 'v1NetworkPolicyListItems': items is a list of schema objects.
  -> V1NetworkPolicyList
mkV1NetworkPolicyList :: [V1NetworkPolicy] -> V1NetworkPolicyList
mkV1NetworkPolicyList [V1NetworkPolicy]
v1NetworkPolicyListItems =
  V1NetworkPolicyList
  { $sel:v1NetworkPolicyListApiVersion:V1NetworkPolicyList :: Maybe Text
v1NetworkPolicyListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1NetworkPolicy]
$sel:v1NetworkPolicyListItems:V1NetworkPolicyList :: [V1NetworkPolicy]
v1NetworkPolicyListItems :: [V1NetworkPolicy]
v1NetworkPolicyListItems
  , $sel:v1NetworkPolicyListKind:V1NetworkPolicyList :: Maybe Text
v1NetworkPolicyListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1NetworkPolicyListMetadata:V1NetworkPolicyList :: Maybe V1ListMeta
v1NetworkPolicyListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1NetworkPolicyPeer
-- | V1NetworkPolicyPeer
-- NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of fields are allowed
data V1NetworkPolicyPeer = V1NetworkPolicyPeer
  { V1NetworkPolicyPeer -> Maybe V1IPBlock
v1NetworkPolicyPeerIpBlock :: !(Maybe V1IPBlock) -- ^ "ipBlock"
  , V1NetworkPolicyPeer -> Maybe V1LabelSelector
v1NetworkPolicyPeerNamespaceSelector :: !(Maybe V1LabelSelector) -- ^ "namespaceSelector"
  , V1NetworkPolicyPeer -> Maybe V1LabelSelector
v1NetworkPolicyPeerPodSelector :: !(Maybe V1LabelSelector) -- ^ "podSelector"
  } deriving (Int -> V1NetworkPolicyPeer -> ShowS
[V1NetworkPolicyPeer] -> ShowS
V1NetworkPolicyPeer -> String
(Int -> V1NetworkPolicyPeer -> ShowS)
-> (V1NetworkPolicyPeer -> String)
-> ([V1NetworkPolicyPeer] -> ShowS)
-> Show V1NetworkPolicyPeer
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1NetworkPolicyPeer -> ShowS
showsPrec :: Int -> V1NetworkPolicyPeer -> ShowS
$cshow :: V1NetworkPolicyPeer -> String
show :: V1NetworkPolicyPeer -> String
$cshowList :: [V1NetworkPolicyPeer] -> ShowS
showList :: [V1NetworkPolicyPeer] -> ShowS
P.Show, V1NetworkPolicyPeer -> V1NetworkPolicyPeer -> Bool
(V1NetworkPolicyPeer -> V1NetworkPolicyPeer -> Bool)
-> (V1NetworkPolicyPeer -> V1NetworkPolicyPeer -> Bool)
-> Eq V1NetworkPolicyPeer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1NetworkPolicyPeer -> V1NetworkPolicyPeer -> Bool
== :: V1NetworkPolicyPeer -> V1NetworkPolicyPeer -> Bool
$c/= :: V1NetworkPolicyPeer -> V1NetworkPolicyPeer -> Bool
/= :: V1NetworkPolicyPeer -> V1NetworkPolicyPeer -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1NetworkPolicyPeer
instance A.FromJSON V1NetworkPolicyPeer where
  parseJSON :: Value -> Parser V1NetworkPolicyPeer
parseJSON = String
-> (Object -> Parser V1NetworkPolicyPeer)
-> Value
-> Parser V1NetworkPolicyPeer
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1NetworkPolicyPeer" ((Object -> Parser V1NetworkPolicyPeer)
 -> Value -> Parser V1NetworkPolicyPeer)
-> (Object -> Parser V1NetworkPolicyPeer)
-> Value
-> Parser V1NetworkPolicyPeer
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1IPBlock
-> Maybe V1LabelSelector
-> Maybe V1LabelSelector
-> V1NetworkPolicyPeer
V1NetworkPolicyPeer
      (Maybe V1IPBlock
 -> Maybe V1LabelSelector
 -> Maybe V1LabelSelector
 -> V1NetworkPolicyPeer)
-> Parser (Maybe V1IPBlock)
-> Parser
     (Maybe V1LabelSelector
      -> Maybe V1LabelSelector -> V1NetworkPolicyPeer)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1IPBlock)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ipBlock")
      Parser
  (Maybe V1LabelSelector
   -> Maybe V1LabelSelector -> V1NetworkPolicyPeer)
-> Parser (Maybe V1LabelSelector)
-> Parser (Maybe V1LabelSelector -> V1NetworkPolicyPeer)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LabelSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"namespaceSelector")
      Parser (Maybe V1LabelSelector -> V1NetworkPolicyPeer)
-> Parser (Maybe V1LabelSelector) -> Parser V1NetworkPolicyPeer
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LabelSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"podSelector")

-- | ToJSON V1NetworkPolicyPeer
instance A.ToJSON V1NetworkPolicyPeer where
  toJSON :: V1NetworkPolicyPeer -> Value
toJSON V1NetworkPolicyPeer {Maybe V1LabelSelector
Maybe V1IPBlock
$sel:v1NetworkPolicyPeerIpBlock:V1NetworkPolicyPeer :: V1NetworkPolicyPeer -> Maybe V1IPBlock
$sel:v1NetworkPolicyPeerNamespaceSelector:V1NetworkPolicyPeer :: V1NetworkPolicyPeer -> Maybe V1LabelSelector
$sel:v1NetworkPolicyPeerPodSelector:V1NetworkPolicyPeer :: V1NetworkPolicyPeer -> Maybe V1LabelSelector
v1NetworkPolicyPeerIpBlock :: Maybe V1IPBlock
v1NetworkPolicyPeerNamespaceSelector :: Maybe V1LabelSelector
v1NetworkPolicyPeerPodSelector :: Maybe V1LabelSelector
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"ipBlock" Key -> Maybe V1IPBlock -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1IPBlock
v1NetworkPolicyPeerIpBlock
      , Key
"namespaceSelector" Key -> Maybe V1LabelSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LabelSelector
v1NetworkPolicyPeerNamespaceSelector
      , Key
"podSelector" Key -> Maybe V1LabelSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LabelSelector
v1NetworkPolicyPeerPodSelector
      ]


-- | Construct a value of type 'V1NetworkPolicyPeer' (by applying it's required fields, if any)
mkV1NetworkPolicyPeer
  :: V1NetworkPolicyPeer
mkV1NetworkPolicyPeer :: V1NetworkPolicyPeer
mkV1NetworkPolicyPeer =
  V1NetworkPolicyPeer
  { $sel:v1NetworkPolicyPeerIpBlock:V1NetworkPolicyPeer :: Maybe V1IPBlock
v1NetworkPolicyPeerIpBlock = Maybe V1IPBlock
forall a. Maybe a
Nothing
  , $sel:v1NetworkPolicyPeerNamespaceSelector:V1NetworkPolicyPeer :: Maybe V1LabelSelector
v1NetworkPolicyPeerNamespaceSelector = Maybe V1LabelSelector
forall a. Maybe a
Nothing
  , $sel:v1NetworkPolicyPeerPodSelector:V1NetworkPolicyPeer :: Maybe V1LabelSelector
v1NetworkPolicyPeerPodSelector = Maybe V1LabelSelector
forall a. Maybe a
Nothing
  }

-- ** V1NetworkPolicyPort
-- | V1NetworkPolicyPort
-- NetworkPolicyPort describes a port to allow traffic on
data V1NetworkPolicyPort = V1NetworkPolicyPort
  { V1NetworkPolicyPort -> Maybe Int
v1NetworkPolicyPortEndPort :: !(Maybe Int) -- ^ "endPort" - endPort indicates that the range of ports from port to endPort if set, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port.
  , V1NetworkPolicyPort -> Maybe IntOrString
v1NetworkPolicyPortPort :: !(Maybe IntOrString) -- ^ "port"
  , V1NetworkPolicyPort -> Maybe Text
v1NetworkPolicyPortProtocol :: !(Maybe Text) -- ^ "protocol" - protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP.
  } deriving (Int -> V1NetworkPolicyPort -> ShowS
[V1NetworkPolicyPort] -> ShowS
V1NetworkPolicyPort -> String
(Int -> V1NetworkPolicyPort -> ShowS)
-> (V1NetworkPolicyPort -> String)
-> ([V1NetworkPolicyPort] -> ShowS)
-> Show V1NetworkPolicyPort
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1NetworkPolicyPort -> ShowS
showsPrec :: Int -> V1NetworkPolicyPort -> ShowS
$cshow :: V1NetworkPolicyPort -> String
show :: V1NetworkPolicyPort -> String
$cshowList :: [V1NetworkPolicyPort] -> ShowS
showList :: [V1NetworkPolicyPort] -> ShowS
P.Show, V1NetworkPolicyPort -> V1NetworkPolicyPort -> Bool
(V1NetworkPolicyPort -> V1NetworkPolicyPort -> Bool)
-> (V1NetworkPolicyPort -> V1NetworkPolicyPort -> Bool)
-> Eq V1NetworkPolicyPort
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1NetworkPolicyPort -> V1NetworkPolicyPort -> Bool
== :: V1NetworkPolicyPort -> V1NetworkPolicyPort -> Bool
$c/= :: V1NetworkPolicyPort -> V1NetworkPolicyPort -> Bool
/= :: V1NetworkPolicyPort -> V1NetworkPolicyPort -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1NetworkPolicyPort
instance A.FromJSON V1NetworkPolicyPort where
  parseJSON :: Value -> Parser V1NetworkPolicyPort
parseJSON = String
-> (Object -> Parser V1NetworkPolicyPort)
-> Value
-> Parser V1NetworkPolicyPort
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1NetworkPolicyPort" ((Object -> Parser V1NetworkPolicyPort)
 -> Value -> Parser V1NetworkPolicyPort)
-> (Object -> Parser V1NetworkPolicyPort)
-> Value
-> Parser V1NetworkPolicyPort
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Int -> Maybe IntOrString -> Maybe Text -> V1NetworkPolicyPort
V1NetworkPolicyPort
      (Maybe Int
 -> Maybe IntOrString -> Maybe Text -> V1NetworkPolicyPort)
-> Parser (Maybe Int)
-> Parser (Maybe IntOrString -> Maybe Text -> V1NetworkPolicyPort)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"endPort")
      Parser (Maybe IntOrString -> Maybe Text -> V1NetworkPolicyPort)
-> Parser (Maybe IntOrString)
-> Parser (Maybe Text -> V1NetworkPolicyPort)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe IntOrString)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"port")
      Parser (Maybe Text -> V1NetworkPolicyPort)
-> Parser (Maybe Text) -> Parser V1NetworkPolicyPort
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"protocol")

-- | ToJSON V1NetworkPolicyPort
instance A.ToJSON V1NetworkPolicyPort where
  toJSON :: V1NetworkPolicyPort -> Value
toJSON V1NetworkPolicyPort {Maybe Int
Maybe Text
Maybe IntOrString
$sel:v1NetworkPolicyPortEndPort:V1NetworkPolicyPort :: V1NetworkPolicyPort -> Maybe Int
$sel:v1NetworkPolicyPortPort:V1NetworkPolicyPort :: V1NetworkPolicyPort -> Maybe IntOrString
$sel:v1NetworkPolicyPortProtocol:V1NetworkPolicyPort :: V1NetworkPolicyPort -> Maybe Text
v1NetworkPolicyPortEndPort :: Maybe Int
v1NetworkPolicyPortPort :: Maybe IntOrString
v1NetworkPolicyPortProtocol :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"endPort" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1NetworkPolicyPortEndPort
      , Key
"port" Key -> Maybe IntOrString -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe IntOrString
v1NetworkPolicyPortPort
      , Key
"protocol" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1NetworkPolicyPortProtocol
      ]


-- | Construct a value of type 'V1NetworkPolicyPort' (by applying it's required fields, if any)
mkV1NetworkPolicyPort
  :: V1NetworkPolicyPort
mkV1NetworkPolicyPort :: V1NetworkPolicyPort
mkV1NetworkPolicyPort =
  V1NetworkPolicyPort
  { $sel:v1NetworkPolicyPortEndPort:V1NetworkPolicyPort :: Maybe Int
v1NetworkPolicyPortEndPort = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1NetworkPolicyPortPort:V1NetworkPolicyPort :: Maybe IntOrString
v1NetworkPolicyPortPort = Maybe IntOrString
forall a. Maybe a
Nothing
  , $sel:v1NetworkPolicyPortProtocol:V1NetworkPolicyPort :: Maybe Text
v1NetworkPolicyPortProtocol = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1NetworkPolicySpec
-- | V1NetworkPolicySpec
-- NetworkPolicySpec provides the specification of a NetworkPolicy
data V1NetworkPolicySpec = V1NetworkPolicySpec
  { V1NetworkPolicySpec -> Maybe [V1NetworkPolicyEgressRule]
v1NetworkPolicySpecEgress :: !(Maybe [V1NetworkPolicyEgressRule]) -- ^ "egress" - egress is a list of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8
  , V1NetworkPolicySpec -> Maybe [V1NetworkPolicyIngressRule]
v1NetworkPolicySpecIngress :: !(Maybe [V1NetworkPolicyIngressRule]) -- ^ "ingress" - ingress is a list of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod&#39;s local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default)
  , V1NetworkPolicySpec -> V1LabelSelector
v1NetworkPolicySpecPodSelector :: !(V1LabelSelector) -- ^ /Required/ "podSelector"
  , V1NetworkPolicySpec -> Maybe [Text]
v1NetworkPolicySpecPolicyTypes :: !(Maybe [Text]) -- ^ "policyTypes" - policyTypes is a list of rule types that the NetworkPolicy relates to. Valid options are [\&quot;Ingress\&quot;], [\&quot;Egress\&quot;], or [\&quot;Ingress\&quot;, \&quot;Egress\&quot;]. If this field is not specified, it will default based on the existence of ingress or egress rules; policies that contain an egress section are assumed to affect egress, and all policies (whether or not they contain an ingress section) are assumed to affect ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ \&quot;Egress\&quot; ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include \&quot;Egress\&quot; (since such a policy would not include an egress section and would otherwise default to just [ \&quot;Ingress\&quot; ]). This field is beta-level in 1.8
  } deriving (Int -> V1NetworkPolicySpec -> ShowS
[V1NetworkPolicySpec] -> ShowS
V1NetworkPolicySpec -> String
(Int -> V1NetworkPolicySpec -> ShowS)
-> (V1NetworkPolicySpec -> String)
-> ([V1NetworkPolicySpec] -> ShowS)
-> Show V1NetworkPolicySpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1NetworkPolicySpec -> ShowS
showsPrec :: Int -> V1NetworkPolicySpec -> ShowS
$cshow :: V1NetworkPolicySpec -> String
show :: V1NetworkPolicySpec -> String
$cshowList :: [V1NetworkPolicySpec] -> ShowS
showList :: [V1NetworkPolicySpec] -> ShowS
P.Show, V1NetworkPolicySpec -> V1NetworkPolicySpec -> Bool
(V1NetworkPolicySpec -> V1NetworkPolicySpec -> Bool)
-> (V1NetworkPolicySpec -> V1NetworkPolicySpec -> Bool)
-> Eq V1NetworkPolicySpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1NetworkPolicySpec -> V1NetworkPolicySpec -> Bool
== :: V1NetworkPolicySpec -> V1NetworkPolicySpec -> Bool
$c/= :: V1NetworkPolicySpec -> V1NetworkPolicySpec -> Bool
/= :: V1NetworkPolicySpec -> V1NetworkPolicySpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1NetworkPolicySpec
instance A.FromJSON V1NetworkPolicySpec where
  parseJSON :: Value -> Parser V1NetworkPolicySpec
parseJSON = String
-> (Object -> Parser V1NetworkPolicySpec)
-> Value
-> Parser V1NetworkPolicySpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1NetworkPolicySpec" ((Object -> Parser V1NetworkPolicySpec)
 -> Value -> Parser V1NetworkPolicySpec)
-> (Object -> Parser V1NetworkPolicySpec)
-> Value
-> Parser V1NetworkPolicySpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1NetworkPolicyEgressRule]
-> Maybe [V1NetworkPolicyIngressRule]
-> V1LabelSelector
-> Maybe [Text]
-> V1NetworkPolicySpec
V1NetworkPolicySpec
      (Maybe [V1NetworkPolicyEgressRule]
 -> Maybe [V1NetworkPolicyIngressRule]
 -> V1LabelSelector
 -> Maybe [Text]
 -> V1NetworkPolicySpec)
-> Parser (Maybe [V1NetworkPolicyEgressRule])
-> Parser
     (Maybe [V1NetworkPolicyIngressRule]
      -> V1LabelSelector -> Maybe [Text] -> V1NetworkPolicySpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1NetworkPolicyEgressRule])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"egress")
      Parser
  (Maybe [V1NetworkPolicyIngressRule]
   -> V1LabelSelector -> Maybe [Text] -> V1NetworkPolicySpec)
-> Parser (Maybe [V1NetworkPolicyIngressRule])
-> Parser (V1LabelSelector -> Maybe [Text] -> V1NetworkPolicySpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1NetworkPolicyIngressRule])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ingress")
      Parser (V1LabelSelector -> Maybe [Text] -> V1NetworkPolicySpec)
-> Parser V1LabelSelector
-> Parser (Maybe [Text] -> V1NetworkPolicySpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1LabelSelector
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"podSelector")
      Parser (Maybe [Text] -> V1NetworkPolicySpec)
-> Parser (Maybe [Text]) -> Parser V1NetworkPolicySpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"policyTypes")

-- | ToJSON V1NetworkPolicySpec
instance A.ToJSON V1NetworkPolicySpec where
  toJSON :: V1NetworkPolicySpec -> Value
toJSON V1NetworkPolicySpec {Maybe [Text]
Maybe [V1NetworkPolicyIngressRule]
Maybe [V1NetworkPolicyEgressRule]
V1LabelSelector
$sel:v1NetworkPolicySpecEgress:V1NetworkPolicySpec :: V1NetworkPolicySpec -> Maybe [V1NetworkPolicyEgressRule]
$sel:v1NetworkPolicySpecIngress:V1NetworkPolicySpec :: V1NetworkPolicySpec -> Maybe [V1NetworkPolicyIngressRule]
$sel:v1NetworkPolicySpecPodSelector:V1NetworkPolicySpec :: V1NetworkPolicySpec -> V1LabelSelector
$sel:v1NetworkPolicySpecPolicyTypes:V1NetworkPolicySpec :: V1NetworkPolicySpec -> Maybe [Text]
v1NetworkPolicySpecEgress :: Maybe [V1NetworkPolicyEgressRule]
v1NetworkPolicySpecIngress :: Maybe [V1NetworkPolicyIngressRule]
v1NetworkPolicySpecPodSelector :: V1LabelSelector
v1NetworkPolicySpecPolicyTypes :: Maybe [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"egress" Key -> Maybe [V1NetworkPolicyEgressRule] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1NetworkPolicyEgressRule]
v1NetworkPolicySpecEgress
      , Key
"ingress" Key -> Maybe [V1NetworkPolicyIngressRule] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1NetworkPolicyIngressRule]
v1NetworkPolicySpecIngress
      , Key
"podSelector" Key -> V1LabelSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1LabelSelector
v1NetworkPolicySpecPodSelector
      , Key
"policyTypes" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1NetworkPolicySpecPolicyTypes
      ]


-- | Construct a value of type 'V1NetworkPolicySpec' (by applying it's required fields, if any)
mkV1NetworkPolicySpec
  :: V1LabelSelector -- ^ 'v1NetworkPolicySpecPodSelector' 
  -> V1NetworkPolicySpec
mkV1NetworkPolicySpec :: V1LabelSelector -> V1NetworkPolicySpec
mkV1NetworkPolicySpec V1LabelSelector
v1NetworkPolicySpecPodSelector =
  V1NetworkPolicySpec
  { $sel:v1NetworkPolicySpecEgress:V1NetworkPolicySpec :: Maybe [V1NetworkPolicyEgressRule]
v1NetworkPolicySpecEgress = Maybe [V1NetworkPolicyEgressRule]
forall a. Maybe a
Nothing
  , $sel:v1NetworkPolicySpecIngress:V1NetworkPolicySpec :: Maybe [V1NetworkPolicyIngressRule]
v1NetworkPolicySpecIngress = Maybe [V1NetworkPolicyIngressRule]
forall a. Maybe a
Nothing
  , V1LabelSelector
$sel:v1NetworkPolicySpecPodSelector:V1NetworkPolicySpec :: V1LabelSelector
v1NetworkPolicySpecPodSelector :: V1LabelSelector
v1NetworkPolicySpecPodSelector
  , $sel:v1NetworkPolicySpecPolicyTypes:V1NetworkPolicySpec :: Maybe [Text]
v1NetworkPolicySpecPolicyTypes = Maybe [Text]
forall a. Maybe a
Nothing
  }

-- ** V1Node
-- | V1Node
-- Node is a worker node in Kubernetes. Each node will have a unique identifier in the cache (i.e. in etcd).
data V1Node = V1Node
  { V1Node -> Maybe Text
v1NodeApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1Node -> Maybe Text
v1NodeKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1Node -> Maybe V1ObjectMeta
v1NodeMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1Node -> Maybe V1NodeSpec
v1NodeSpec :: !(Maybe V1NodeSpec) -- ^ "spec"
  , V1Node -> Maybe V1NodeStatus
v1NodeStatus :: !(Maybe V1NodeStatus) -- ^ "status"
  } deriving (Int -> V1Node -> ShowS
[V1Node] -> ShowS
V1Node -> String
(Int -> V1Node -> ShowS)
-> (V1Node -> String) -> ([V1Node] -> ShowS) -> Show V1Node
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1Node -> ShowS
showsPrec :: Int -> V1Node -> ShowS
$cshow :: V1Node -> String
show :: V1Node -> String
$cshowList :: [V1Node] -> ShowS
showList :: [V1Node] -> ShowS
P.Show, V1Node -> V1Node -> Bool
(V1Node -> V1Node -> Bool)
-> (V1Node -> V1Node -> Bool) -> Eq V1Node
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1Node -> V1Node -> Bool
== :: V1Node -> V1Node -> Bool
$c/= :: V1Node -> V1Node -> Bool
/= :: V1Node -> V1Node -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1Node
instance A.FromJSON V1Node where
  parseJSON :: Value -> Parser V1Node
parseJSON = String -> (Object -> Parser V1Node) -> Value -> Parser V1Node
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1Node" ((Object -> Parser V1Node) -> Value -> Parser V1Node)
-> (Object -> Parser V1Node) -> Value -> Parser V1Node
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1NodeSpec
-> Maybe V1NodeStatus
-> V1Node
V1Node
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1NodeSpec
 -> Maybe V1NodeStatus
 -> V1Node)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1NodeSpec
      -> Maybe V1NodeStatus
      -> V1Node)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1NodeSpec
   -> Maybe V1NodeStatus
   -> V1Node)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1NodeSpec -> Maybe V1NodeStatus -> V1Node)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1NodeSpec -> Maybe V1NodeStatus -> V1Node)
-> Parser (Maybe V1ObjectMeta)
-> Parser (Maybe V1NodeSpec -> Maybe V1NodeStatus -> V1Node)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (Maybe V1NodeSpec -> Maybe V1NodeStatus -> V1Node)
-> Parser (Maybe V1NodeSpec)
-> Parser (Maybe V1NodeStatus -> V1Node)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1NodeSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")
      Parser (Maybe V1NodeStatus -> V1Node)
-> Parser (Maybe V1NodeStatus) -> Parser V1Node
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1NodeStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1Node
instance A.ToJSON V1Node where
  toJSON :: V1Node -> Value
toJSON V1Node {Maybe Text
Maybe V1ObjectMeta
Maybe V1NodeStatus
Maybe V1NodeSpec
$sel:v1NodeApiVersion:V1Node :: V1Node -> Maybe Text
$sel:v1NodeKind:V1Node :: V1Node -> Maybe Text
$sel:v1NodeMetadata:V1Node :: V1Node -> Maybe V1ObjectMeta
$sel:v1NodeSpec:V1Node :: V1Node -> Maybe V1NodeSpec
$sel:v1NodeStatus:V1Node :: V1Node -> Maybe V1NodeStatus
v1NodeApiVersion :: Maybe Text
v1NodeKind :: Maybe Text
v1NodeMetadata :: Maybe V1ObjectMeta
v1NodeSpec :: Maybe V1NodeSpec
v1NodeStatus :: Maybe V1NodeStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1NodeApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1NodeKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1NodeMetadata
      , Key
"spec" Key -> Maybe V1NodeSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1NodeSpec
v1NodeSpec
      , Key
"status" Key -> Maybe V1NodeStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1NodeStatus
v1NodeStatus
      ]


-- | Construct a value of type 'V1Node' (by applying it's required fields, if any)
mkV1Node
  :: V1Node
mkV1Node :: V1Node
mkV1Node =
  V1Node
  { $sel:v1NodeApiVersion:V1Node :: Maybe Text
v1NodeApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1NodeKind:V1Node :: Maybe Text
v1NodeKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1NodeMetadata:V1Node :: Maybe V1ObjectMeta
v1NodeMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1NodeSpec:V1Node :: Maybe V1NodeSpec
v1NodeSpec = Maybe V1NodeSpec
forall a. Maybe a
Nothing
  , $sel:v1NodeStatus:V1Node :: Maybe V1NodeStatus
v1NodeStatus = Maybe V1NodeStatus
forall a. Maybe a
Nothing
  }

-- ** V1NodeAddress
-- | V1NodeAddress
-- NodeAddress contains information for the node's address.
data V1NodeAddress = V1NodeAddress
  { V1NodeAddress -> Text
v1NodeAddressAddress :: !(Text) -- ^ /Required/ "address" - The node address.
  , V1NodeAddress -> Text
v1NodeAddressType :: !(Text) -- ^ /Required/ "type" - Node address type, one of Hostname, ExternalIP or InternalIP.
  } deriving (Int -> V1NodeAddress -> ShowS
[V1NodeAddress] -> ShowS
V1NodeAddress -> String
(Int -> V1NodeAddress -> ShowS)
-> (V1NodeAddress -> String)
-> ([V1NodeAddress] -> ShowS)
-> Show V1NodeAddress
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1NodeAddress -> ShowS
showsPrec :: Int -> V1NodeAddress -> ShowS
$cshow :: V1NodeAddress -> String
show :: V1NodeAddress -> String
$cshowList :: [V1NodeAddress] -> ShowS
showList :: [V1NodeAddress] -> ShowS
P.Show, V1NodeAddress -> V1NodeAddress -> Bool
(V1NodeAddress -> V1NodeAddress -> Bool)
-> (V1NodeAddress -> V1NodeAddress -> Bool) -> Eq V1NodeAddress
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1NodeAddress -> V1NodeAddress -> Bool
== :: V1NodeAddress -> V1NodeAddress -> Bool
$c/= :: V1NodeAddress -> V1NodeAddress -> Bool
/= :: V1NodeAddress -> V1NodeAddress -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1NodeAddress
instance A.FromJSON V1NodeAddress where
  parseJSON :: Value -> Parser V1NodeAddress
parseJSON = String
-> (Object -> Parser V1NodeAddress)
-> Value
-> Parser V1NodeAddress
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1NodeAddress" ((Object -> Parser V1NodeAddress) -> Value -> Parser V1NodeAddress)
-> (Object -> Parser V1NodeAddress)
-> Value
-> Parser V1NodeAddress
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Text -> V1NodeAddress
V1NodeAddress
      (Text -> Text -> V1NodeAddress)
-> Parser Text -> Parser (Text -> V1NodeAddress)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"address")
      Parser (Text -> V1NodeAddress)
-> Parser Text -> Parser V1NodeAddress
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"type")

-- | ToJSON V1NodeAddress
instance A.ToJSON V1NodeAddress where
  toJSON :: V1NodeAddress -> Value
toJSON V1NodeAddress {Text
$sel:v1NodeAddressAddress:V1NodeAddress :: V1NodeAddress -> Text
$sel:v1NodeAddressType:V1NodeAddress :: V1NodeAddress -> Text
v1NodeAddressAddress :: Text
v1NodeAddressType :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"address" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1NodeAddressAddress
      , Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1NodeAddressType
      ]


-- | Construct a value of type 'V1NodeAddress' (by applying it's required fields, if any)
mkV1NodeAddress
  :: Text -- ^ 'v1NodeAddressAddress': The node address.
  -> Text -- ^ 'v1NodeAddressType': Node address type, one of Hostname, ExternalIP or InternalIP.
  -> V1NodeAddress
mkV1NodeAddress :: Text -> Text -> V1NodeAddress
mkV1NodeAddress Text
v1NodeAddressAddress Text
v1NodeAddressType =
  V1NodeAddress
  { Text
$sel:v1NodeAddressAddress:V1NodeAddress :: Text
v1NodeAddressAddress :: Text
v1NodeAddressAddress
  , Text
$sel:v1NodeAddressType:V1NodeAddress :: Text
v1NodeAddressType :: Text
v1NodeAddressType
  }

-- ** V1NodeAffinity
-- | V1NodeAffinity
-- Node affinity is a group of node affinity scheduling rules.
data V1NodeAffinity = V1NodeAffinity
  { V1NodeAffinity -> Maybe [V1PreferredSchedulingTerm]
v1NodeAffinityPreferredDuringSchedulingIgnoredDuringExecution :: !(Maybe [V1PreferredSchedulingTerm]) -- ^ "preferredDuringSchedulingIgnoredDuringExecution" - The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \&quot;weight\&quot; to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.
  , V1NodeAffinity -> Maybe V1NodeSelector
v1NodeAffinityRequiredDuringSchedulingIgnoredDuringExecution :: !(Maybe V1NodeSelector) -- ^ "requiredDuringSchedulingIgnoredDuringExecution"
  } deriving (Int -> V1NodeAffinity -> ShowS
[V1NodeAffinity] -> ShowS
V1NodeAffinity -> String
(Int -> V1NodeAffinity -> ShowS)
-> (V1NodeAffinity -> String)
-> ([V1NodeAffinity] -> ShowS)
-> Show V1NodeAffinity
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1NodeAffinity -> ShowS
showsPrec :: Int -> V1NodeAffinity -> ShowS
$cshow :: V1NodeAffinity -> String
show :: V1NodeAffinity -> String
$cshowList :: [V1NodeAffinity] -> ShowS
showList :: [V1NodeAffinity] -> ShowS
P.Show, V1NodeAffinity -> V1NodeAffinity -> Bool
(V1NodeAffinity -> V1NodeAffinity -> Bool)
-> (V1NodeAffinity -> V1NodeAffinity -> Bool) -> Eq V1NodeAffinity
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1NodeAffinity -> V1NodeAffinity -> Bool
== :: V1NodeAffinity -> V1NodeAffinity -> Bool
$c/= :: V1NodeAffinity -> V1NodeAffinity -> Bool
/= :: V1NodeAffinity -> V1NodeAffinity -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1NodeAffinity
instance A.FromJSON V1NodeAffinity where
  parseJSON :: Value -> Parser V1NodeAffinity
parseJSON = String
-> (Object -> Parser V1NodeAffinity)
-> Value
-> Parser V1NodeAffinity
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1NodeAffinity" ((Object -> Parser V1NodeAffinity)
 -> Value -> Parser V1NodeAffinity)
-> (Object -> Parser V1NodeAffinity)
-> Value
-> Parser V1NodeAffinity
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1PreferredSchedulingTerm]
-> Maybe V1NodeSelector -> V1NodeAffinity
V1NodeAffinity
      (Maybe [V1PreferredSchedulingTerm]
 -> Maybe V1NodeSelector -> V1NodeAffinity)
-> Parser (Maybe [V1PreferredSchedulingTerm])
-> Parser (Maybe V1NodeSelector -> V1NodeAffinity)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1PreferredSchedulingTerm])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"preferredDuringSchedulingIgnoredDuringExecution")
      Parser (Maybe V1NodeSelector -> V1NodeAffinity)
-> Parser (Maybe V1NodeSelector) -> Parser V1NodeAffinity
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1NodeSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"requiredDuringSchedulingIgnoredDuringExecution")

-- | ToJSON V1NodeAffinity
instance A.ToJSON V1NodeAffinity where
  toJSON :: V1NodeAffinity -> Value
toJSON V1NodeAffinity {Maybe [V1PreferredSchedulingTerm]
Maybe V1NodeSelector
$sel:v1NodeAffinityPreferredDuringSchedulingIgnoredDuringExecution:V1NodeAffinity :: V1NodeAffinity -> Maybe [V1PreferredSchedulingTerm]
$sel:v1NodeAffinityRequiredDuringSchedulingIgnoredDuringExecution:V1NodeAffinity :: V1NodeAffinity -> Maybe V1NodeSelector
v1NodeAffinityPreferredDuringSchedulingIgnoredDuringExecution :: Maybe [V1PreferredSchedulingTerm]
v1NodeAffinityRequiredDuringSchedulingIgnoredDuringExecution :: Maybe V1NodeSelector
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"preferredDuringSchedulingIgnoredDuringExecution" Key -> Maybe [V1PreferredSchedulingTerm] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1PreferredSchedulingTerm]
v1NodeAffinityPreferredDuringSchedulingIgnoredDuringExecution
      , Key
"requiredDuringSchedulingIgnoredDuringExecution" Key -> Maybe V1NodeSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1NodeSelector
v1NodeAffinityRequiredDuringSchedulingIgnoredDuringExecution
      ]


-- | Construct a value of type 'V1NodeAffinity' (by applying it's required fields, if any)
mkV1NodeAffinity
  :: V1NodeAffinity
mkV1NodeAffinity :: V1NodeAffinity
mkV1NodeAffinity =
  V1NodeAffinity
  { $sel:v1NodeAffinityPreferredDuringSchedulingIgnoredDuringExecution:V1NodeAffinity :: Maybe [V1PreferredSchedulingTerm]
v1NodeAffinityPreferredDuringSchedulingIgnoredDuringExecution = Maybe [V1PreferredSchedulingTerm]
forall a. Maybe a
Nothing
  , $sel:v1NodeAffinityRequiredDuringSchedulingIgnoredDuringExecution:V1NodeAffinity :: Maybe V1NodeSelector
v1NodeAffinityRequiredDuringSchedulingIgnoredDuringExecution = Maybe V1NodeSelector
forall a. Maybe a
Nothing
  }

-- ** V1NodeCondition
-- | V1NodeCondition
-- NodeCondition contains condition information for a node.
data V1NodeCondition = V1NodeCondition
  { V1NodeCondition -> Maybe DateTime
v1NodeConditionLastHeartbeatTime :: !(Maybe DateTime) -- ^ "lastHeartbeatTime" - Last time we got an update on a given condition.
  , V1NodeCondition -> Maybe DateTime
v1NodeConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - Last time the condition transit from one status to another.
  , V1NodeCondition -> Maybe Text
v1NodeConditionMessage :: !(Maybe Text) -- ^ "message" - Human readable message indicating details about last transition.
  , V1NodeCondition -> Maybe Text
v1NodeConditionReason :: !(Maybe Text) -- ^ "reason" - (brief) reason for the condition&#39;s last transition.
  , V1NodeCondition -> Text
v1NodeConditionStatus :: !(Text) -- ^ /Required/ "status" - Status of the condition, one of True, False, Unknown.
  , V1NodeCondition -> Text
v1NodeConditionType :: !(Text) -- ^ /Required/ "type" - Type of node condition.
  } deriving (Int -> V1NodeCondition -> ShowS
[V1NodeCondition] -> ShowS
V1NodeCondition -> String
(Int -> V1NodeCondition -> ShowS)
-> (V1NodeCondition -> String)
-> ([V1NodeCondition] -> ShowS)
-> Show V1NodeCondition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1NodeCondition -> ShowS
showsPrec :: Int -> V1NodeCondition -> ShowS
$cshow :: V1NodeCondition -> String
show :: V1NodeCondition -> String
$cshowList :: [V1NodeCondition] -> ShowS
showList :: [V1NodeCondition] -> ShowS
P.Show, V1NodeCondition -> V1NodeCondition -> Bool
(V1NodeCondition -> V1NodeCondition -> Bool)
-> (V1NodeCondition -> V1NodeCondition -> Bool)
-> Eq V1NodeCondition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1NodeCondition -> V1NodeCondition -> Bool
== :: V1NodeCondition -> V1NodeCondition -> Bool
$c/= :: V1NodeCondition -> V1NodeCondition -> Bool
/= :: V1NodeCondition -> V1NodeCondition -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1NodeCondition
instance A.FromJSON V1NodeCondition where
  parseJSON :: Value -> Parser V1NodeCondition
parseJSON = String
-> (Object -> Parser V1NodeCondition)
-> Value
-> Parser V1NodeCondition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1NodeCondition" ((Object -> Parser V1NodeCondition)
 -> Value -> Parser V1NodeCondition)
-> (Object -> Parser V1NodeCondition)
-> Value
-> Parser V1NodeCondition
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe DateTime
-> Maybe DateTime
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> V1NodeCondition
V1NodeCondition
      (Maybe DateTime
 -> Maybe DateTime
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> Text
 -> V1NodeCondition)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe DateTime
      -> Maybe Text -> Maybe Text -> Text -> Text -> V1NodeCondition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lastHeartbeatTime")
      Parser
  (Maybe DateTime
   -> Maybe Text -> Maybe Text -> Text -> Text -> V1NodeCondition)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe Text -> Maybe Text -> Text -> Text -> V1NodeCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lastTransitionTime")
      Parser
  (Maybe Text -> Maybe Text -> Text -> Text -> V1NodeCondition)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Text -> Text -> V1NodeCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"message")
      Parser (Maybe Text -> Text -> Text -> V1NodeCondition)
-> Parser (Maybe Text) -> Parser (Text -> Text -> V1NodeCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reason")
      Parser (Text -> Text -> V1NodeCondition)
-> Parser Text -> Parser (Text -> V1NodeCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"status")
      Parser (Text -> V1NodeCondition)
-> Parser Text -> Parser V1NodeCondition
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"type")

-- | ToJSON V1NodeCondition
instance A.ToJSON V1NodeCondition where
  toJSON :: V1NodeCondition -> Value
toJSON V1NodeCondition {Maybe Text
Maybe DateTime
Text
$sel:v1NodeConditionLastHeartbeatTime:V1NodeCondition :: V1NodeCondition -> Maybe DateTime
$sel:v1NodeConditionLastTransitionTime:V1NodeCondition :: V1NodeCondition -> Maybe DateTime
$sel:v1NodeConditionMessage:V1NodeCondition :: V1NodeCondition -> Maybe Text
$sel:v1NodeConditionReason:V1NodeCondition :: V1NodeCondition -> Maybe Text
$sel:v1NodeConditionStatus:V1NodeCondition :: V1NodeCondition -> Text
$sel:v1NodeConditionType:V1NodeCondition :: V1NodeCondition -> Text
v1NodeConditionLastHeartbeatTime :: Maybe DateTime
v1NodeConditionLastTransitionTime :: Maybe DateTime
v1NodeConditionMessage :: Maybe Text
v1NodeConditionReason :: Maybe Text
v1NodeConditionStatus :: Text
v1NodeConditionType :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"lastHeartbeatTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1NodeConditionLastHeartbeatTime
      , Key
"lastTransitionTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1NodeConditionLastTransitionTime
      , Key
"message" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1NodeConditionMessage
      , Key
"reason" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1NodeConditionReason
      , Key
"status" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1NodeConditionStatus
      , Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1NodeConditionType
      ]


-- | Construct a value of type 'V1NodeCondition' (by applying it's required fields, if any)
mkV1NodeCondition
  :: Text -- ^ 'v1NodeConditionStatus': Status of the condition, one of True, False, Unknown.
  -> Text -- ^ 'v1NodeConditionType': Type of node condition.
  -> V1NodeCondition
mkV1NodeCondition :: Text -> Text -> V1NodeCondition
mkV1NodeCondition Text
v1NodeConditionStatus Text
v1NodeConditionType =
  V1NodeCondition
  { $sel:v1NodeConditionLastHeartbeatTime:V1NodeCondition :: Maybe DateTime
v1NodeConditionLastHeartbeatTime = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1NodeConditionLastTransitionTime:V1NodeCondition :: Maybe DateTime
v1NodeConditionLastTransitionTime = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1NodeConditionMessage:V1NodeCondition :: Maybe Text
v1NodeConditionMessage = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1NodeConditionReason:V1NodeCondition :: Maybe Text
v1NodeConditionReason = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1NodeConditionStatus:V1NodeCondition :: Text
v1NodeConditionStatus :: Text
v1NodeConditionStatus
  , Text
$sel:v1NodeConditionType:V1NodeCondition :: Text
v1NodeConditionType :: Text
v1NodeConditionType
  }

-- ** V1NodeConfigSource
-- | V1NodeConfigSource
-- NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil. This API is deprecated since 1.22
data V1NodeConfigSource = V1NodeConfigSource
  { V1NodeConfigSource -> Maybe V1ConfigMapNodeConfigSource
v1NodeConfigSourceConfigMap :: !(Maybe V1ConfigMapNodeConfigSource) -- ^ "configMap"
  } deriving (Int -> V1NodeConfigSource -> ShowS
[V1NodeConfigSource] -> ShowS
V1NodeConfigSource -> String
(Int -> V1NodeConfigSource -> ShowS)
-> (V1NodeConfigSource -> String)
-> ([V1NodeConfigSource] -> ShowS)
-> Show V1NodeConfigSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1NodeConfigSource -> ShowS
showsPrec :: Int -> V1NodeConfigSource -> ShowS
$cshow :: V1NodeConfigSource -> String
show :: V1NodeConfigSource -> String
$cshowList :: [V1NodeConfigSource] -> ShowS
showList :: [V1NodeConfigSource] -> ShowS
P.Show, V1NodeConfigSource -> V1NodeConfigSource -> Bool
(V1NodeConfigSource -> V1NodeConfigSource -> Bool)
-> (V1NodeConfigSource -> V1NodeConfigSource -> Bool)
-> Eq V1NodeConfigSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1NodeConfigSource -> V1NodeConfigSource -> Bool
== :: V1NodeConfigSource -> V1NodeConfigSource -> Bool
$c/= :: V1NodeConfigSource -> V1NodeConfigSource -> Bool
/= :: V1NodeConfigSource -> V1NodeConfigSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1NodeConfigSource
instance A.FromJSON V1NodeConfigSource where
  parseJSON :: Value -> Parser V1NodeConfigSource
parseJSON = String
-> (Object -> Parser V1NodeConfigSource)
-> Value
-> Parser V1NodeConfigSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1NodeConfigSource" ((Object -> Parser V1NodeConfigSource)
 -> Value -> Parser V1NodeConfigSource)
-> (Object -> Parser V1NodeConfigSource)
-> Value
-> Parser V1NodeConfigSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1ConfigMapNodeConfigSource -> V1NodeConfigSource
V1NodeConfigSource
      (Maybe V1ConfigMapNodeConfigSource -> V1NodeConfigSource)
-> Parser (Maybe V1ConfigMapNodeConfigSource)
-> Parser V1NodeConfigSource
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1ConfigMapNodeConfigSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"configMap")

-- | ToJSON V1NodeConfigSource
instance A.ToJSON V1NodeConfigSource where
  toJSON :: V1NodeConfigSource -> Value
toJSON V1NodeConfigSource {Maybe V1ConfigMapNodeConfigSource
$sel:v1NodeConfigSourceConfigMap:V1NodeConfigSource :: V1NodeConfigSource -> Maybe V1ConfigMapNodeConfigSource
v1NodeConfigSourceConfigMap :: Maybe V1ConfigMapNodeConfigSource
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"configMap" Key -> Maybe V1ConfigMapNodeConfigSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ConfigMapNodeConfigSource
v1NodeConfigSourceConfigMap
      ]


-- | Construct a value of type 'V1NodeConfigSource' (by applying it's required fields, if any)
mkV1NodeConfigSource
  :: V1NodeConfigSource
mkV1NodeConfigSource :: V1NodeConfigSource
mkV1NodeConfigSource =
  V1NodeConfigSource
  { $sel:v1NodeConfigSourceConfigMap:V1NodeConfigSource :: Maybe V1ConfigMapNodeConfigSource
v1NodeConfigSourceConfigMap = Maybe V1ConfigMapNodeConfigSource
forall a. Maybe a
Nothing
  }

-- ** V1NodeConfigStatus
-- | V1NodeConfigStatus
-- NodeConfigStatus describes the status of the config assigned by Node.Spec.ConfigSource.
data V1NodeConfigStatus = V1NodeConfigStatus
  { V1NodeConfigStatus -> Maybe V1NodeConfigSource
v1NodeConfigStatusActive :: !(Maybe V1NodeConfigSource) -- ^ "active"
  , V1NodeConfigStatus -> Maybe V1NodeConfigSource
v1NodeConfigStatusAssigned :: !(Maybe V1NodeConfigSource) -- ^ "assigned"
  , V1NodeConfigStatus -> Maybe Text
v1NodeConfigStatusError :: !(Maybe Text) -- ^ "error" - Error describes any problems reconciling the Spec.ConfigSource to the Active config. Errors may occur, for example, attempting to checkpoint Spec.ConfigSource to the local Assigned record, attempting to checkpoint the payload associated with Spec.ConfigSource, attempting to load or validate the Assigned config, etc. Errors may occur at different points while syncing config. Earlier errors (e.g. download or checkpointing errors) will not result in a rollback to LastKnownGood, and may resolve across Kubelet retries. Later errors (e.g. loading or validating a checkpointed config) will result in a rollback to LastKnownGood. In the latter case, it is usually possible to resolve the error by fixing the config assigned in Spec.ConfigSource. You can find additional information for debugging by searching the error message in the Kubelet log. Error is a human-readable description of the error state; machines can check whether or not Error is empty, but should not rely on the stability of the Error text across Kubelet versions.
  , V1NodeConfigStatus -> Maybe V1NodeConfigSource
v1NodeConfigStatusLastKnownGood :: !(Maybe V1NodeConfigSource) -- ^ "lastKnownGood"
  } deriving (Int -> V1NodeConfigStatus -> ShowS
[V1NodeConfigStatus] -> ShowS
V1NodeConfigStatus -> String
(Int -> V1NodeConfigStatus -> ShowS)
-> (V1NodeConfigStatus -> String)
-> ([V1NodeConfigStatus] -> ShowS)
-> Show V1NodeConfigStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1NodeConfigStatus -> ShowS
showsPrec :: Int -> V1NodeConfigStatus -> ShowS
$cshow :: V1NodeConfigStatus -> String
show :: V1NodeConfigStatus -> String
$cshowList :: [V1NodeConfigStatus] -> ShowS
showList :: [V1NodeConfigStatus] -> ShowS
P.Show, V1NodeConfigStatus -> V1NodeConfigStatus -> Bool
(V1NodeConfigStatus -> V1NodeConfigStatus -> Bool)
-> (V1NodeConfigStatus -> V1NodeConfigStatus -> Bool)
-> Eq V1NodeConfigStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1NodeConfigStatus -> V1NodeConfigStatus -> Bool
== :: V1NodeConfigStatus -> V1NodeConfigStatus -> Bool
$c/= :: V1NodeConfigStatus -> V1NodeConfigStatus -> Bool
/= :: V1NodeConfigStatus -> V1NodeConfigStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1NodeConfigStatus
instance A.FromJSON V1NodeConfigStatus where
  parseJSON :: Value -> Parser V1NodeConfigStatus
parseJSON = String
-> (Object -> Parser V1NodeConfigStatus)
-> Value
-> Parser V1NodeConfigStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1NodeConfigStatus" ((Object -> Parser V1NodeConfigStatus)
 -> Value -> Parser V1NodeConfigStatus)
-> (Object -> Parser V1NodeConfigStatus)
-> Value
-> Parser V1NodeConfigStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1NodeConfigSource
-> Maybe V1NodeConfigSource
-> Maybe Text
-> Maybe V1NodeConfigSource
-> V1NodeConfigStatus
V1NodeConfigStatus
      (Maybe V1NodeConfigSource
 -> Maybe V1NodeConfigSource
 -> Maybe Text
 -> Maybe V1NodeConfigSource
 -> V1NodeConfigStatus)
-> Parser (Maybe V1NodeConfigSource)
-> Parser
     (Maybe V1NodeConfigSource
      -> Maybe Text -> Maybe V1NodeConfigSource -> V1NodeConfigStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1NodeConfigSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"active")
      Parser
  (Maybe V1NodeConfigSource
   -> Maybe Text -> Maybe V1NodeConfigSource -> V1NodeConfigStatus)
-> Parser (Maybe V1NodeConfigSource)
-> Parser
     (Maybe Text -> Maybe V1NodeConfigSource -> V1NodeConfigStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1NodeConfigSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"assigned")
      Parser
  (Maybe Text -> Maybe V1NodeConfigSource -> V1NodeConfigStatus)
-> Parser (Maybe Text)
-> Parser (Maybe V1NodeConfigSource -> V1NodeConfigStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"error")
      Parser (Maybe V1NodeConfigSource -> V1NodeConfigStatus)
-> Parser (Maybe V1NodeConfigSource) -> Parser V1NodeConfigStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1NodeConfigSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lastKnownGood")

-- | ToJSON V1NodeConfigStatus
instance A.ToJSON V1NodeConfigStatus where
  toJSON :: V1NodeConfigStatus -> Value
toJSON V1NodeConfigStatus {Maybe Text
Maybe V1NodeConfigSource
$sel:v1NodeConfigStatusActive:V1NodeConfigStatus :: V1NodeConfigStatus -> Maybe V1NodeConfigSource
$sel:v1NodeConfigStatusAssigned:V1NodeConfigStatus :: V1NodeConfigStatus -> Maybe V1NodeConfigSource
$sel:v1NodeConfigStatusError:V1NodeConfigStatus :: V1NodeConfigStatus -> Maybe Text
$sel:v1NodeConfigStatusLastKnownGood:V1NodeConfigStatus :: V1NodeConfigStatus -> Maybe V1NodeConfigSource
v1NodeConfigStatusActive :: Maybe V1NodeConfigSource
v1NodeConfigStatusAssigned :: Maybe V1NodeConfigSource
v1NodeConfigStatusError :: Maybe Text
v1NodeConfigStatusLastKnownGood :: Maybe V1NodeConfigSource
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"active" Key -> Maybe V1NodeConfigSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1NodeConfigSource
v1NodeConfigStatusActive
      , Key
"assigned" Key -> Maybe V1NodeConfigSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1NodeConfigSource
v1NodeConfigStatusAssigned
      , Key
"error" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1NodeConfigStatusError
      , Key
"lastKnownGood" Key -> Maybe V1NodeConfigSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1NodeConfigSource
v1NodeConfigStatusLastKnownGood
      ]


-- | Construct a value of type 'V1NodeConfigStatus' (by applying it's required fields, if any)
mkV1NodeConfigStatus
  :: V1NodeConfigStatus
mkV1NodeConfigStatus :: V1NodeConfigStatus
mkV1NodeConfigStatus =
  V1NodeConfigStatus
  { $sel:v1NodeConfigStatusActive:V1NodeConfigStatus :: Maybe V1NodeConfigSource
v1NodeConfigStatusActive = Maybe V1NodeConfigSource
forall a. Maybe a
Nothing
  , $sel:v1NodeConfigStatusAssigned:V1NodeConfigStatus :: Maybe V1NodeConfigSource
v1NodeConfigStatusAssigned = Maybe V1NodeConfigSource
forall a. Maybe a
Nothing
  , $sel:v1NodeConfigStatusError:V1NodeConfigStatus :: Maybe Text
v1NodeConfigStatusError = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1NodeConfigStatusLastKnownGood:V1NodeConfigStatus :: Maybe V1NodeConfigSource
v1NodeConfigStatusLastKnownGood = Maybe V1NodeConfigSource
forall a. Maybe a
Nothing
  }

-- ** V1NodeDaemonEndpoints
-- | V1NodeDaemonEndpoints
-- NodeDaemonEndpoints lists ports opened by daemons running on the Node.
data V1NodeDaemonEndpoints = V1NodeDaemonEndpoints
  { V1NodeDaemonEndpoints -> Maybe V1DaemonEndpoint
v1NodeDaemonEndpointsKubeletEndpoint :: !(Maybe V1DaemonEndpoint) -- ^ "kubeletEndpoint"
  } deriving (Int -> V1NodeDaemonEndpoints -> ShowS
[V1NodeDaemonEndpoints] -> ShowS
V1NodeDaemonEndpoints -> String
(Int -> V1NodeDaemonEndpoints -> ShowS)
-> (V1NodeDaemonEndpoints -> String)
-> ([V1NodeDaemonEndpoints] -> ShowS)
-> Show V1NodeDaemonEndpoints
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1NodeDaemonEndpoints -> ShowS
showsPrec :: Int -> V1NodeDaemonEndpoints -> ShowS
$cshow :: V1NodeDaemonEndpoints -> String
show :: V1NodeDaemonEndpoints -> String
$cshowList :: [V1NodeDaemonEndpoints] -> ShowS
showList :: [V1NodeDaemonEndpoints] -> ShowS
P.Show, V1NodeDaemonEndpoints -> V1NodeDaemonEndpoints -> Bool
(V1NodeDaemonEndpoints -> V1NodeDaemonEndpoints -> Bool)
-> (V1NodeDaemonEndpoints -> V1NodeDaemonEndpoints -> Bool)
-> Eq V1NodeDaemonEndpoints
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1NodeDaemonEndpoints -> V1NodeDaemonEndpoints -> Bool
== :: V1NodeDaemonEndpoints -> V1NodeDaemonEndpoints -> Bool
$c/= :: V1NodeDaemonEndpoints -> V1NodeDaemonEndpoints -> Bool
/= :: V1NodeDaemonEndpoints -> V1NodeDaemonEndpoints -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1NodeDaemonEndpoints
instance A.FromJSON V1NodeDaemonEndpoints where
  parseJSON :: Value -> Parser V1NodeDaemonEndpoints
parseJSON = String
-> (Object -> Parser V1NodeDaemonEndpoints)
-> Value
-> Parser V1NodeDaemonEndpoints
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1NodeDaemonEndpoints" ((Object -> Parser V1NodeDaemonEndpoints)
 -> Value -> Parser V1NodeDaemonEndpoints)
-> (Object -> Parser V1NodeDaemonEndpoints)
-> Value
-> Parser V1NodeDaemonEndpoints
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1DaemonEndpoint -> V1NodeDaemonEndpoints
V1NodeDaemonEndpoints
      (Maybe V1DaemonEndpoint -> V1NodeDaemonEndpoints)
-> Parser (Maybe V1DaemonEndpoint) -> Parser V1NodeDaemonEndpoints
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1DaemonEndpoint)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kubeletEndpoint")

-- | ToJSON V1NodeDaemonEndpoints
instance A.ToJSON V1NodeDaemonEndpoints where
  toJSON :: V1NodeDaemonEndpoints -> Value
toJSON V1NodeDaemonEndpoints {Maybe V1DaemonEndpoint
$sel:v1NodeDaemonEndpointsKubeletEndpoint:V1NodeDaemonEndpoints :: V1NodeDaemonEndpoints -> Maybe V1DaemonEndpoint
v1NodeDaemonEndpointsKubeletEndpoint :: Maybe V1DaemonEndpoint
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"kubeletEndpoint" Key -> Maybe V1DaemonEndpoint -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1DaemonEndpoint
v1NodeDaemonEndpointsKubeletEndpoint
      ]


-- | Construct a value of type 'V1NodeDaemonEndpoints' (by applying it's required fields, if any)
mkV1NodeDaemonEndpoints
  :: V1NodeDaemonEndpoints
mkV1NodeDaemonEndpoints :: V1NodeDaemonEndpoints
mkV1NodeDaemonEndpoints =
  V1NodeDaemonEndpoints
  { $sel:v1NodeDaemonEndpointsKubeletEndpoint:V1NodeDaemonEndpoints :: Maybe V1DaemonEndpoint
v1NodeDaemonEndpointsKubeletEndpoint = Maybe V1DaemonEndpoint
forall a. Maybe a
Nothing
  }

-- ** V1NodeFeatures
-- | V1NodeFeatures
-- NodeFeatures describes the set of features implemented by the CRI implementation. The features contained in the NodeFeatures should depend only on the cri implementation independent of runtime handlers.
data V1NodeFeatures = V1NodeFeatures
  { V1NodeFeatures -> Maybe Bool
v1NodeFeaturesSupplementalGroupsPolicy :: !(Maybe Bool) -- ^ "supplementalGroupsPolicy" - SupplementalGroupsPolicy is set to true if the runtime supports SupplementalGroupsPolicy and ContainerUser.
  } deriving (Int -> V1NodeFeatures -> ShowS
[V1NodeFeatures] -> ShowS
V1NodeFeatures -> String
(Int -> V1NodeFeatures -> ShowS)
-> (V1NodeFeatures -> String)
-> ([V1NodeFeatures] -> ShowS)
-> Show V1NodeFeatures
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1NodeFeatures -> ShowS
showsPrec :: Int -> V1NodeFeatures -> ShowS
$cshow :: V1NodeFeatures -> String
show :: V1NodeFeatures -> String
$cshowList :: [V1NodeFeatures] -> ShowS
showList :: [V1NodeFeatures] -> ShowS
P.Show, V1NodeFeatures -> V1NodeFeatures -> Bool
(V1NodeFeatures -> V1NodeFeatures -> Bool)
-> (V1NodeFeatures -> V1NodeFeatures -> Bool) -> Eq V1NodeFeatures
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1NodeFeatures -> V1NodeFeatures -> Bool
== :: V1NodeFeatures -> V1NodeFeatures -> Bool
$c/= :: V1NodeFeatures -> V1NodeFeatures -> Bool
/= :: V1NodeFeatures -> V1NodeFeatures -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1NodeFeatures
instance A.FromJSON V1NodeFeatures where
  parseJSON :: Value -> Parser V1NodeFeatures
parseJSON = String
-> (Object -> Parser V1NodeFeatures)
-> Value
-> Parser V1NodeFeatures
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1NodeFeatures" ((Object -> Parser V1NodeFeatures)
 -> Value -> Parser V1NodeFeatures)
-> (Object -> Parser V1NodeFeatures)
-> Value
-> Parser V1NodeFeatures
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Bool -> V1NodeFeatures
V1NodeFeatures
      (Maybe Bool -> V1NodeFeatures)
-> Parser (Maybe Bool) -> Parser V1NodeFeatures
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"supplementalGroupsPolicy")

-- | ToJSON V1NodeFeatures
instance A.ToJSON V1NodeFeatures where
  toJSON :: V1NodeFeatures -> Value
toJSON V1NodeFeatures {Maybe Bool
$sel:v1NodeFeaturesSupplementalGroupsPolicy:V1NodeFeatures :: V1NodeFeatures -> Maybe Bool
v1NodeFeaturesSupplementalGroupsPolicy :: Maybe Bool
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"supplementalGroupsPolicy" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1NodeFeaturesSupplementalGroupsPolicy
      ]


-- | Construct a value of type 'V1NodeFeatures' (by applying it's required fields, if any)
mkV1NodeFeatures
  :: V1NodeFeatures
mkV1NodeFeatures :: V1NodeFeatures
mkV1NodeFeatures =
  V1NodeFeatures
  { $sel:v1NodeFeaturesSupplementalGroupsPolicy:V1NodeFeatures :: Maybe Bool
v1NodeFeaturesSupplementalGroupsPolicy = Maybe Bool
forall a. Maybe a
Nothing
  }

-- ** V1NodeList
-- | V1NodeList
-- NodeList is the whole list of all Nodes which have been registered with master.
data V1NodeList = V1NodeList
  { V1NodeList -> Maybe Text
v1NodeListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1NodeList -> [V1Node]
v1NodeListItems :: !([V1Node]) -- ^ /Required/ "items" - List of nodes
  , V1NodeList -> Maybe Text
v1NodeListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1NodeList -> Maybe V1ListMeta
v1NodeListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1NodeList -> ShowS
[V1NodeList] -> ShowS
V1NodeList -> String
(Int -> V1NodeList -> ShowS)
-> (V1NodeList -> String)
-> ([V1NodeList] -> ShowS)
-> Show V1NodeList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1NodeList -> ShowS
showsPrec :: Int -> V1NodeList -> ShowS
$cshow :: V1NodeList -> String
show :: V1NodeList -> String
$cshowList :: [V1NodeList] -> ShowS
showList :: [V1NodeList] -> ShowS
P.Show, V1NodeList -> V1NodeList -> Bool
(V1NodeList -> V1NodeList -> Bool)
-> (V1NodeList -> V1NodeList -> Bool) -> Eq V1NodeList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1NodeList -> V1NodeList -> Bool
== :: V1NodeList -> V1NodeList -> Bool
$c/= :: V1NodeList -> V1NodeList -> Bool
/= :: V1NodeList -> V1NodeList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1NodeList
instance A.FromJSON V1NodeList where
  parseJSON :: Value -> Parser V1NodeList
parseJSON = String
-> (Object -> Parser V1NodeList) -> Value -> Parser V1NodeList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1NodeList" ((Object -> Parser V1NodeList) -> Value -> Parser V1NodeList)
-> (Object -> Parser V1NodeList) -> Value -> Parser V1NodeList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1Node] -> Maybe Text -> Maybe V1ListMeta -> V1NodeList
V1NodeList
      (Maybe Text
 -> [V1Node] -> Maybe Text -> Maybe V1ListMeta -> V1NodeList)
-> Parser (Maybe Text)
-> Parser
     ([V1Node] -> Maybe Text -> Maybe V1ListMeta -> V1NodeList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser ([V1Node] -> Maybe Text -> Maybe V1ListMeta -> V1NodeList)
-> Parser [V1Node]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1NodeList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1Node]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1NodeList)
-> Parser (Maybe Text) -> Parser (Maybe V1ListMeta -> V1NodeList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1NodeList)
-> Parser (Maybe V1ListMeta) -> Parser V1NodeList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1NodeList
instance A.ToJSON V1NodeList where
  toJSON :: V1NodeList -> Value
toJSON V1NodeList {[V1Node]
Maybe Text
Maybe V1ListMeta
$sel:v1NodeListApiVersion:V1NodeList :: V1NodeList -> Maybe Text
$sel:v1NodeListItems:V1NodeList :: V1NodeList -> [V1Node]
$sel:v1NodeListKind:V1NodeList :: V1NodeList -> Maybe Text
$sel:v1NodeListMetadata:V1NodeList :: V1NodeList -> Maybe V1ListMeta
v1NodeListApiVersion :: Maybe Text
v1NodeListItems :: [V1Node]
v1NodeListKind :: Maybe Text
v1NodeListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1NodeListApiVersion
      , Key
"items" Key -> [V1Node] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1Node]
v1NodeListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1NodeListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1NodeListMetadata
      ]


-- | Construct a value of type 'V1NodeList' (by applying it's required fields, if any)
mkV1NodeList
  :: [V1Node] -- ^ 'v1NodeListItems': List of nodes
  -> V1NodeList
mkV1NodeList :: [V1Node] -> V1NodeList
mkV1NodeList [V1Node]
v1NodeListItems =
  V1NodeList
  { $sel:v1NodeListApiVersion:V1NodeList :: Maybe Text
v1NodeListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1Node]
$sel:v1NodeListItems:V1NodeList :: [V1Node]
v1NodeListItems :: [V1Node]
v1NodeListItems
  , $sel:v1NodeListKind:V1NodeList :: Maybe Text
v1NodeListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1NodeListMetadata:V1NodeList :: Maybe V1ListMeta
v1NodeListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1NodeRuntimeHandler
-- | V1NodeRuntimeHandler
-- NodeRuntimeHandler is a set of runtime handler information.
data V1NodeRuntimeHandler = V1NodeRuntimeHandler
  { V1NodeRuntimeHandler -> Maybe V1NodeRuntimeHandlerFeatures
v1NodeRuntimeHandlerFeatures :: !(Maybe V1NodeRuntimeHandlerFeatures) -- ^ "features"
  , V1NodeRuntimeHandler -> Maybe Text
v1NodeRuntimeHandlerName :: !(Maybe Text) -- ^ "name" - Runtime handler name. Empty for the default runtime handler.
  } deriving (Int -> V1NodeRuntimeHandler -> ShowS
[V1NodeRuntimeHandler] -> ShowS
V1NodeRuntimeHandler -> String
(Int -> V1NodeRuntimeHandler -> ShowS)
-> (V1NodeRuntimeHandler -> String)
-> ([V1NodeRuntimeHandler] -> ShowS)
-> Show V1NodeRuntimeHandler
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1NodeRuntimeHandler -> ShowS
showsPrec :: Int -> V1NodeRuntimeHandler -> ShowS
$cshow :: V1NodeRuntimeHandler -> String
show :: V1NodeRuntimeHandler -> String
$cshowList :: [V1NodeRuntimeHandler] -> ShowS
showList :: [V1NodeRuntimeHandler] -> ShowS
P.Show, V1NodeRuntimeHandler -> V1NodeRuntimeHandler -> Bool
(V1NodeRuntimeHandler -> V1NodeRuntimeHandler -> Bool)
-> (V1NodeRuntimeHandler -> V1NodeRuntimeHandler -> Bool)
-> Eq V1NodeRuntimeHandler
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1NodeRuntimeHandler -> V1NodeRuntimeHandler -> Bool
== :: V1NodeRuntimeHandler -> V1NodeRuntimeHandler -> Bool
$c/= :: V1NodeRuntimeHandler -> V1NodeRuntimeHandler -> Bool
/= :: V1NodeRuntimeHandler -> V1NodeRuntimeHandler -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1NodeRuntimeHandler
instance A.FromJSON V1NodeRuntimeHandler where
  parseJSON :: Value -> Parser V1NodeRuntimeHandler
parseJSON = String
-> (Object -> Parser V1NodeRuntimeHandler)
-> Value
-> Parser V1NodeRuntimeHandler
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1NodeRuntimeHandler" ((Object -> Parser V1NodeRuntimeHandler)
 -> Value -> Parser V1NodeRuntimeHandler)
-> (Object -> Parser V1NodeRuntimeHandler)
-> Value
-> Parser V1NodeRuntimeHandler
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1NodeRuntimeHandlerFeatures
-> Maybe Text -> V1NodeRuntimeHandler
V1NodeRuntimeHandler
      (Maybe V1NodeRuntimeHandlerFeatures
 -> Maybe Text -> V1NodeRuntimeHandler)
-> Parser (Maybe V1NodeRuntimeHandlerFeatures)
-> Parser (Maybe Text -> V1NodeRuntimeHandler)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1NodeRuntimeHandlerFeatures)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"features")
      Parser (Maybe Text -> V1NodeRuntimeHandler)
-> Parser (Maybe Text) -> Parser V1NodeRuntimeHandler
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"name")

-- | ToJSON V1NodeRuntimeHandler
instance A.ToJSON V1NodeRuntimeHandler where
  toJSON :: V1NodeRuntimeHandler -> Value
toJSON V1NodeRuntimeHandler {Maybe Text
Maybe V1NodeRuntimeHandlerFeatures
$sel:v1NodeRuntimeHandlerFeatures:V1NodeRuntimeHandler :: V1NodeRuntimeHandler -> Maybe V1NodeRuntimeHandlerFeatures
$sel:v1NodeRuntimeHandlerName:V1NodeRuntimeHandler :: V1NodeRuntimeHandler -> Maybe Text
v1NodeRuntimeHandlerFeatures :: Maybe V1NodeRuntimeHandlerFeatures
v1NodeRuntimeHandlerName :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"features" Key -> Maybe V1NodeRuntimeHandlerFeatures -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1NodeRuntimeHandlerFeatures
v1NodeRuntimeHandlerFeatures
      , Key
"name" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1NodeRuntimeHandlerName
      ]


-- | Construct a value of type 'V1NodeRuntimeHandler' (by applying it's required fields, if any)
mkV1NodeRuntimeHandler
  :: V1NodeRuntimeHandler
mkV1NodeRuntimeHandler :: V1NodeRuntimeHandler
mkV1NodeRuntimeHandler =
  V1NodeRuntimeHandler
  { $sel:v1NodeRuntimeHandlerFeatures:V1NodeRuntimeHandler :: Maybe V1NodeRuntimeHandlerFeatures
v1NodeRuntimeHandlerFeatures = Maybe V1NodeRuntimeHandlerFeatures
forall a. Maybe a
Nothing
  , $sel:v1NodeRuntimeHandlerName:V1NodeRuntimeHandler :: Maybe Text
v1NodeRuntimeHandlerName = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1NodeRuntimeHandlerFeatures
-- | V1NodeRuntimeHandlerFeatures
-- NodeRuntimeHandlerFeatures is a set of features implemented by the runtime handler.
data V1NodeRuntimeHandlerFeatures = V1NodeRuntimeHandlerFeatures
  { V1NodeRuntimeHandlerFeatures -> Maybe Bool
v1NodeRuntimeHandlerFeaturesRecursiveReadOnlyMounts :: !(Maybe Bool) -- ^ "recursiveReadOnlyMounts" - RecursiveReadOnlyMounts is set to true if the runtime handler supports RecursiveReadOnlyMounts.
  , V1NodeRuntimeHandlerFeatures -> Maybe Bool
v1NodeRuntimeHandlerFeaturesUserNamespaces :: !(Maybe Bool) -- ^ "userNamespaces" - UserNamespaces is set to true if the runtime handler supports UserNamespaces, including for volumes.
  } deriving (Int -> V1NodeRuntimeHandlerFeatures -> ShowS
[V1NodeRuntimeHandlerFeatures] -> ShowS
V1NodeRuntimeHandlerFeatures -> String
(Int -> V1NodeRuntimeHandlerFeatures -> ShowS)
-> (V1NodeRuntimeHandlerFeatures -> String)
-> ([V1NodeRuntimeHandlerFeatures] -> ShowS)
-> Show V1NodeRuntimeHandlerFeatures
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1NodeRuntimeHandlerFeatures -> ShowS
showsPrec :: Int -> V1NodeRuntimeHandlerFeatures -> ShowS
$cshow :: V1NodeRuntimeHandlerFeatures -> String
show :: V1NodeRuntimeHandlerFeatures -> String
$cshowList :: [V1NodeRuntimeHandlerFeatures] -> ShowS
showList :: [V1NodeRuntimeHandlerFeatures] -> ShowS
P.Show, V1NodeRuntimeHandlerFeatures
-> V1NodeRuntimeHandlerFeatures -> Bool
(V1NodeRuntimeHandlerFeatures
 -> V1NodeRuntimeHandlerFeatures -> Bool)
-> (V1NodeRuntimeHandlerFeatures
    -> V1NodeRuntimeHandlerFeatures -> Bool)
-> Eq V1NodeRuntimeHandlerFeatures
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1NodeRuntimeHandlerFeatures
-> V1NodeRuntimeHandlerFeatures -> Bool
== :: V1NodeRuntimeHandlerFeatures
-> V1NodeRuntimeHandlerFeatures -> Bool
$c/= :: V1NodeRuntimeHandlerFeatures
-> V1NodeRuntimeHandlerFeatures -> Bool
/= :: V1NodeRuntimeHandlerFeatures
-> V1NodeRuntimeHandlerFeatures -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1NodeRuntimeHandlerFeatures
instance A.FromJSON V1NodeRuntimeHandlerFeatures where
  parseJSON :: Value -> Parser V1NodeRuntimeHandlerFeatures
parseJSON = String
-> (Object -> Parser V1NodeRuntimeHandlerFeatures)
-> Value
-> Parser V1NodeRuntimeHandlerFeatures
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1NodeRuntimeHandlerFeatures" ((Object -> Parser V1NodeRuntimeHandlerFeatures)
 -> Value -> Parser V1NodeRuntimeHandlerFeatures)
-> (Object -> Parser V1NodeRuntimeHandlerFeatures)
-> Value
-> Parser V1NodeRuntimeHandlerFeatures
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Bool -> Maybe Bool -> V1NodeRuntimeHandlerFeatures
V1NodeRuntimeHandlerFeatures
      (Maybe Bool -> Maybe Bool -> V1NodeRuntimeHandlerFeatures)
-> Parser (Maybe Bool)
-> Parser (Maybe Bool -> V1NodeRuntimeHandlerFeatures)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"recursiveReadOnlyMounts")
      Parser (Maybe Bool -> V1NodeRuntimeHandlerFeatures)
-> Parser (Maybe Bool) -> Parser V1NodeRuntimeHandlerFeatures
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"userNamespaces")

-- | ToJSON V1NodeRuntimeHandlerFeatures
instance A.ToJSON V1NodeRuntimeHandlerFeatures where
  toJSON :: V1NodeRuntimeHandlerFeatures -> Value
toJSON V1NodeRuntimeHandlerFeatures {Maybe Bool
$sel:v1NodeRuntimeHandlerFeaturesRecursiveReadOnlyMounts:V1NodeRuntimeHandlerFeatures :: V1NodeRuntimeHandlerFeatures -> Maybe Bool
$sel:v1NodeRuntimeHandlerFeaturesUserNamespaces:V1NodeRuntimeHandlerFeatures :: V1NodeRuntimeHandlerFeatures -> Maybe Bool
v1NodeRuntimeHandlerFeaturesRecursiveReadOnlyMounts :: Maybe Bool
v1NodeRuntimeHandlerFeaturesUserNamespaces :: Maybe Bool
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"recursiveReadOnlyMounts" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1NodeRuntimeHandlerFeaturesRecursiveReadOnlyMounts
      , Key
"userNamespaces" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1NodeRuntimeHandlerFeaturesUserNamespaces
      ]


-- | Construct a value of type 'V1NodeRuntimeHandlerFeatures' (by applying it's required fields, if any)
mkV1NodeRuntimeHandlerFeatures
  :: V1NodeRuntimeHandlerFeatures
mkV1NodeRuntimeHandlerFeatures :: V1NodeRuntimeHandlerFeatures
mkV1NodeRuntimeHandlerFeatures =
  V1NodeRuntimeHandlerFeatures
  { $sel:v1NodeRuntimeHandlerFeaturesRecursiveReadOnlyMounts:V1NodeRuntimeHandlerFeatures :: Maybe Bool
v1NodeRuntimeHandlerFeaturesRecursiveReadOnlyMounts = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1NodeRuntimeHandlerFeaturesUserNamespaces:V1NodeRuntimeHandlerFeatures :: Maybe Bool
v1NodeRuntimeHandlerFeaturesUserNamespaces = Maybe Bool
forall a. Maybe a
Nothing
  }

-- ** V1NodeSelector
-- | V1NodeSelector
-- A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.
data V1NodeSelector = V1NodeSelector
  { V1NodeSelector -> [V1NodeSelectorTerm]
v1NodeSelectorNodeSelectorTerms :: !([V1NodeSelectorTerm]) -- ^ /Required/ "nodeSelectorTerms" - Required. A list of node selector terms. The terms are ORed.
  } deriving (Int -> V1NodeSelector -> ShowS
[V1NodeSelector] -> ShowS
V1NodeSelector -> String
(Int -> V1NodeSelector -> ShowS)
-> (V1NodeSelector -> String)
-> ([V1NodeSelector] -> ShowS)
-> Show V1NodeSelector
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1NodeSelector -> ShowS
showsPrec :: Int -> V1NodeSelector -> ShowS
$cshow :: V1NodeSelector -> String
show :: V1NodeSelector -> String
$cshowList :: [V1NodeSelector] -> ShowS
showList :: [V1NodeSelector] -> ShowS
P.Show, V1NodeSelector -> V1NodeSelector -> Bool
(V1NodeSelector -> V1NodeSelector -> Bool)
-> (V1NodeSelector -> V1NodeSelector -> Bool) -> Eq V1NodeSelector
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1NodeSelector -> V1NodeSelector -> Bool
== :: V1NodeSelector -> V1NodeSelector -> Bool
$c/= :: V1NodeSelector -> V1NodeSelector -> Bool
/= :: V1NodeSelector -> V1NodeSelector -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1NodeSelector
instance A.FromJSON V1NodeSelector where
  parseJSON :: Value -> Parser V1NodeSelector
parseJSON = String
-> (Object -> Parser V1NodeSelector)
-> Value
-> Parser V1NodeSelector
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1NodeSelector" ((Object -> Parser V1NodeSelector)
 -> Value -> Parser V1NodeSelector)
-> (Object -> Parser V1NodeSelector)
-> Value
-> Parser V1NodeSelector
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    [V1NodeSelectorTerm] -> V1NodeSelector
V1NodeSelector
      ([V1NodeSelectorTerm] -> V1NodeSelector)
-> Parser [V1NodeSelectorTerm] -> Parser V1NodeSelector
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser [V1NodeSelectorTerm]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"nodeSelectorTerms")

-- | ToJSON V1NodeSelector
instance A.ToJSON V1NodeSelector where
  toJSON :: V1NodeSelector -> Value
toJSON V1NodeSelector {[V1NodeSelectorTerm]
$sel:v1NodeSelectorNodeSelectorTerms:V1NodeSelector :: V1NodeSelector -> [V1NodeSelectorTerm]
v1NodeSelectorNodeSelectorTerms :: [V1NodeSelectorTerm]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"nodeSelectorTerms" Key -> [V1NodeSelectorTerm] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1NodeSelectorTerm]
v1NodeSelectorNodeSelectorTerms
      ]


-- | Construct a value of type 'V1NodeSelector' (by applying it's required fields, if any)
mkV1NodeSelector
  :: [V1NodeSelectorTerm] -- ^ 'v1NodeSelectorNodeSelectorTerms': Required. A list of node selector terms. The terms are ORed.
  -> V1NodeSelector
mkV1NodeSelector :: [V1NodeSelectorTerm] -> V1NodeSelector
mkV1NodeSelector [V1NodeSelectorTerm]
v1NodeSelectorNodeSelectorTerms =
  V1NodeSelector
  { [V1NodeSelectorTerm]
$sel:v1NodeSelectorNodeSelectorTerms:V1NodeSelector :: [V1NodeSelectorTerm]
v1NodeSelectorNodeSelectorTerms :: [V1NodeSelectorTerm]
v1NodeSelectorNodeSelectorTerms
  }

-- ** V1NodeSelectorRequirement
-- | V1NodeSelectorRequirement
-- A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
data V1NodeSelectorRequirement = V1NodeSelectorRequirement
  { V1NodeSelectorRequirement -> Text
v1NodeSelectorRequirementKey :: !(Text) -- ^ /Required/ "key" - The label key that the selector applies to.
  , V1NodeSelectorRequirement -> Text
v1NodeSelectorRequirementOperator :: !(Text) -- ^ /Required/ "operator" - Represents a key&#39;s relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
  , V1NodeSelectorRequirement -> Maybe [Text]
v1NodeSelectorRequirementValues :: !(Maybe [Text]) -- ^ "values" - An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.
  } deriving (Int -> V1NodeSelectorRequirement -> ShowS
[V1NodeSelectorRequirement] -> ShowS
V1NodeSelectorRequirement -> String
(Int -> V1NodeSelectorRequirement -> ShowS)
-> (V1NodeSelectorRequirement -> String)
-> ([V1NodeSelectorRequirement] -> ShowS)
-> Show V1NodeSelectorRequirement
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1NodeSelectorRequirement -> ShowS
showsPrec :: Int -> V1NodeSelectorRequirement -> ShowS
$cshow :: V1NodeSelectorRequirement -> String
show :: V1NodeSelectorRequirement -> String
$cshowList :: [V1NodeSelectorRequirement] -> ShowS
showList :: [V1NodeSelectorRequirement] -> ShowS
P.Show, V1NodeSelectorRequirement -> V1NodeSelectorRequirement -> Bool
(V1NodeSelectorRequirement -> V1NodeSelectorRequirement -> Bool)
-> (V1NodeSelectorRequirement -> V1NodeSelectorRequirement -> Bool)
-> Eq V1NodeSelectorRequirement
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1NodeSelectorRequirement -> V1NodeSelectorRequirement -> Bool
== :: V1NodeSelectorRequirement -> V1NodeSelectorRequirement -> Bool
$c/= :: V1NodeSelectorRequirement -> V1NodeSelectorRequirement -> Bool
/= :: V1NodeSelectorRequirement -> V1NodeSelectorRequirement -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1NodeSelectorRequirement
instance A.FromJSON V1NodeSelectorRequirement where
  parseJSON :: Value -> Parser V1NodeSelectorRequirement
parseJSON = String
-> (Object -> Parser V1NodeSelectorRequirement)
-> Value
-> Parser V1NodeSelectorRequirement
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1NodeSelectorRequirement" ((Object -> Parser V1NodeSelectorRequirement)
 -> Value -> Parser V1NodeSelectorRequirement)
-> (Object -> Parser V1NodeSelectorRequirement)
-> Value
-> Parser V1NodeSelectorRequirement
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Text -> Maybe [Text] -> V1NodeSelectorRequirement
V1NodeSelectorRequirement
      (Text -> Text -> Maybe [Text] -> V1NodeSelectorRequirement)
-> Parser Text
-> Parser (Text -> Maybe [Text] -> V1NodeSelectorRequirement)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"key")
      Parser (Text -> Maybe [Text] -> V1NodeSelectorRequirement)
-> Parser Text
-> Parser (Maybe [Text] -> V1NodeSelectorRequirement)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"operator")
      Parser (Maybe [Text] -> V1NodeSelectorRequirement)
-> Parser (Maybe [Text]) -> Parser V1NodeSelectorRequirement
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"values")

-- | ToJSON V1NodeSelectorRequirement
instance A.ToJSON V1NodeSelectorRequirement where
  toJSON :: V1NodeSelectorRequirement -> Value
toJSON V1NodeSelectorRequirement {Maybe [Text]
Text
$sel:v1NodeSelectorRequirementKey:V1NodeSelectorRequirement :: V1NodeSelectorRequirement -> Text
$sel:v1NodeSelectorRequirementOperator:V1NodeSelectorRequirement :: V1NodeSelectorRequirement -> Text
$sel:v1NodeSelectorRequirementValues:V1NodeSelectorRequirement :: V1NodeSelectorRequirement -> Maybe [Text]
v1NodeSelectorRequirementKey :: Text
v1NodeSelectorRequirementOperator :: Text
v1NodeSelectorRequirementValues :: Maybe [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"key" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1NodeSelectorRequirementKey
      , Key
"operator" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1NodeSelectorRequirementOperator
      , Key
"values" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1NodeSelectorRequirementValues
      ]


-- | Construct a value of type 'V1NodeSelectorRequirement' (by applying it's required fields, if any)
mkV1NodeSelectorRequirement
  :: Text -- ^ 'v1NodeSelectorRequirementKey': The label key that the selector applies to.
  -> Text -- ^ 'v1NodeSelectorRequirementOperator': Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
  -> V1NodeSelectorRequirement
mkV1NodeSelectorRequirement :: Text -> Text -> V1NodeSelectorRequirement
mkV1NodeSelectorRequirement Text
v1NodeSelectorRequirementKey Text
v1NodeSelectorRequirementOperator =
  V1NodeSelectorRequirement
  { Text
$sel:v1NodeSelectorRequirementKey:V1NodeSelectorRequirement :: Text
v1NodeSelectorRequirementKey :: Text
v1NodeSelectorRequirementKey
  , Text
$sel:v1NodeSelectorRequirementOperator:V1NodeSelectorRequirement :: Text
v1NodeSelectorRequirementOperator :: Text
v1NodeSelectorRequirementOperator
  , $sel:v1NodeSelectorRequirementValues:V1NodeSelectorRequirement :: Maybe [Text]
v1NodeSelectorRequirementValues = Maybe [Text]
forall a. Maybe a
Nothing
  }

-- ** V1NodeSelectorTerm
-- | V1NodeSelectorTerm
-- A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.
data V1NodeSelectorTerm = V1NodeSelectorTerm
  { V1NodeSelectorTerm -> Maybe [V1NodeSelectorRequirement]
v1NodeSelectorTermMatchExpressions :: !(Maybe [V1NodeSelectorRequirement]) -- ^ "matchExpressions" - A list of node selector requirements by node&#39;s labels.
  , V1NodeSelectorTerm -> Maybe [V1NodeSelectorRequirement]
v1NodeSelectorTermMatchFields :: !(Maybe [V1NodeSelectorRequirement]) -- ^ "matchFields" - A list of node selector requirements by node&#39;s fields.
  } deriving (Int -> V1NodeSelectorTerm -> ShowS
[V1NodeSelectorTerm] -> ShowS
V1NodeSelectorTerm -> String
(Int -> V1NodeSelectorTerm -> ShowS)
-> (V1NodeSelectorTerm -> String)
-> ([V1NodeSelectorTerm] -> ShowS)
-> Show V1NodeSelectorTerm
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1NodeSelectorTerm -> ShowS
showsPrec :: Int -> V1NodeSelectorTerm -> ShowS
$cshow :: V1NodeSelectorTerm -> String
show :: V1NodeSelectorTerm -> String
$cshowList :: [V1NodeSelectorTerm] -> ShowS
showList :: [V1NodeSelectorTerm] -> ShowS
P.Show, V1NodeSelectorTerm -> V1NodeSelectorTerm -> Bool
(V1NodeSelectorTerm -> V1NodeSelectorTerm -> Bool)
-> (V1NodeSelectorTerm -> V1NodeSelectorTerm -> Bool)
-> Eq V1NodeSelectorTerm
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1NodeSelectorTerm -> V1NodeSelectorTerm -> Bool
== :: V1NodeSelectorTerm -> V1NodeSelectorTerm -> Bool
$c/= :: V1NodeSelectorTerm -> V1NodeSelectorTerm -> Bool
/= :: V1NodeSelectorTerm -> V1NodeSelectorTerm -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1NodeSelectorTerm
instance A.FromJSON V1NodeSelectorTerm where
  parseJSON :: Value -> Parser V1NodeSelectorTerm
parseJSON = String
-> (Object -> Parser V1NodeSelectorTerm)
-> Value
-> Parser V1NodeSelectorTerm
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1NodeSelectorTerm" ((Object -> Parser V1NodeSelectorTerm)
 -> Value -> Parser V1NodeSelectorTerm)
-> (Object -> Parser V1NodeSelectorTerm)
-> Value
-> Parser V1NodeSelectorTerm
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1NodeSelectorRequirement]
-> Maybe [V1NodeSelectorRequirement] -> V1NodeSelectorTerm
V1NodeSelectorTerm
      (Maybe [V1NodeSelectorRequirement]
 -> Maybe [V1NodeSelectorRequirement] -> V1NodeSelectorTerm)
-> Parser (Maybe [V1NodeSelectorRequirement])
-> Parser (Maybe [V1NodeSelectorRequirement] -> V1NodeSelectorTerm)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1NodeSelectorRequirement])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"matchExpressions")
      Parser (Maybe [V1NodeSelectorRequirement] -> V1NodeSelectorTerm)
-> Parser (Maybe [V1NodeSelectorRequirement])
-> Parser V1NodeSelectorTerm
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1NodeSelectorRequirement])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"matchFields")

-- | ToJSON V1NodeSelectorTerm
instance A.ToJSON V1NodeSelectorTerm where
  toJSON :: V1NodeSelectorTerm -> Value
toJSON V1NodeSelectorTerm {Maybe [V1NodeSelectorRequirement]
$sel:v1NodeSelectorTermMatchExpressions:V1NodeSelectorTerm :: V1NodeSelectorTerm -> Maybe [V1NodeSelectorRequirement]
$sel:v1NodeSelectorTermMatchFields:V1NodeSelectorTerm :: V1NodeSelectorTerm -> Maybe [V1NodeSelectorRequirement]
v1NodeSelectorTermMatchExpressions :: Maybe [V1NodeSelectorRequirement]
v1NodeSelectorTermMatchFields :: Maybe [V1NodeSelectorRequirement]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"matchExpressions" Key -> Maybe [V1NodeSelectorRequirement] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1NodeSelectorRequirement]
v1NodeSelectorTermMatchExpressions
      , Key
"matchFields" Key -> Maybe [V1NodeSelectorRequirement] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1NodeSelectorRequirement]
v1NodeSelectorTermMatchFields
      ]


-- | Construct a value of type 'V1NodeSelectorTerm' (by applying it's required fields, if any)
mkV1NodeSelectorTerm
  :: V1NodeSelectorTerm
mkV1NodeSelectorTerm :: V1NodeSelectorTerm
mkV1NodeSelectorTerm =
  V1NodeSelectorTerm
  { $sel:v1NodeSelectorTermMatchExpressions:V1NodeSelectorTerm :: Maybe [V1NodeSelectorRequirement]
v1NodeSelectorTermMatchExpressions = Maybe [V1NodeSelectorRequirement]
forall a. Maybe a
Nothing
  , $sel:v1NodeSelectorTermMatchFields:V1NodeSelectorTerm :: Maybe [V1NodeSelectorRequirement]
v1NodeSelectorTermMatchFields = Maybe [V1NodeSelectorRequirement]
forall a. Maybe a
Nothing
  }

-- ** V1NodeSpec
-- | V1NodeSpec
-- NodeSpec describes the attributes that a node is created with.
data V1NodeSpec = V1NodeSpec
  { V1NodeSpec -> Maybe V1NodeConfigSource
v1NodeSpecConfigSource :: !(Maybe V1NodeConfigSource) -- ^ "configSource"
  , V1NodeSpec -> Maybe Text
v1NodeSpecExternalId :: !(Maybe Text) -- ^ "externalID" - Deprecated. Not all kubelets will set this field. Remove field after 1.13. see: https://issues.k8s.io/61966
  , V1NodeSpec -> Maybe Text
v1NodeSpecPodCidr :: !(Maybe Text) -- ^ "podCIDR" - PodCIDR represents the pod IP range assigned to the node.
  , V1NodeSpec -> Maybe [Text]
v1NodeSpecPodCidrs :: !(Maybe [Text]) -- ^ "podCIDRs" - podCIDRs represents the IP ranges assigned to the node for usage by Pods on that node. If this field is specified, the 0th entry must match the podCIDR field. It may contain at most 1 value for each of IPv4 and IPv6.
  , V1NodeSpec -> Maybe Text
v1NodeSpecProviderId :: !(Maybe Text) -- ^ "providerID" - ID of the node assigned by the cloud provider in the format: &lt;ProviderName&gt;://&lt;ProviderSpecificNodeID&gt;
  , V1NodeSpec -> Maybe [V1Taint]
v1NodeSpecTaints :: !(Maybe [V1Taint]) -- ^ "taints" - If specified, the node&#39;s taints.
  , V1NodeSpec -> Maybe Bool
v1NodeSpecUnschedulable :: !(Maybe Bool) -- ^ "unschedulable" - Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration
  } deriving (Int -> V1NodeSpec -> ShowS
[V1NodeSpec] -> ShowS
V1NodeSpec -> String
(Int -> V1NodeSpec -> ShowS)
-> (V1NodeSpec -> String)
-> ([V1NodeSpec] -> ShowS)
-> Show V1NodeSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1NodeSpec -> ShowS
showsPrec :: Int -> V1NodeSpec -> ShowS
$cshow :: V1NodeSpec -> String
show :: V1NodeSpec -> String
$cshowList :: [V1NodeSpec] -> ShowS
showList :: [V1NodeSpec] -> ShowS
P.Show, V1NodeSpec -> V1NodeSpec -> Bool
(V1NodeSpec -> V1NodeSpec -> Bool)
-> (V1NodeSpec -> V1NodeSpec -> Bool) -> Eq V1NodeSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1NodeSpec -> V1NodeSpec -> Bool
== :: V1NodeSpec -> V1NodeSpec -> Bool
$c/= :: V1NodeSpec -> V1NodeSpec -> Bool
/= :: V1NodeSpec -> V1NodeSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1NodeSpec
instance A.FromJSON V1NodeSpec where
  parseJSON :: Value -> Parser V1NodeSpec
parseJSON = String
-> (Object -> Parser V1NodeSpec) -> Value -> Parser V1NodeSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1NodeSpec" ((Object -> Parser V1NodeSpec) -> Value -> Parser V1NodeSpec)
-> (Object -> Parser V1NodeSpec) -> Value -> Parser V1NodeSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1NodeConfigSource
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [V1Taint]
-> Maybe Bool
-> V1NodeSpec
V1NodeSpec
      (Maybe V1NodeConfigSource
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe [V1Taint]
 -> Maybe Bool
 -> V1NodeSpec)
-> Parser (Maybe V1NodeConfigSource)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe [V1Taint]
      -> Maybe Bool
      -> V1NodeSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1NodeConfigSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"configSource")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe [V1Taint]
   -> Maybe Bool
   -> V1NodeSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe [V1Taint]
      -> Maybe Bool
      -> V1NodeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"externalID")
      Parser
  (Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe [V1Taint]
   -> Maybe Bool
   -> V1NodeSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe Text -> Maybe [V1Taint] -> Maybe Bool -> V1NodeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"podCIDR")
      Parser
  (Maybe [Text]
   -> Maybe Text -> Maybe [V1Taint] -> Maybe Bool -> V1NodeSpec)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Text -> Maybe [V1Taint] -> Maybe Bool -> V1NodeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"podCIDRs")
      Parser (Maybe Text -> Maybe [V1Taint] -> Maybe Bool -> V1NodeSpec)
-> Parser (Maybe Text)
-> Parser (Maybe [V1Taint] -> Maybe Bool -> V1NodeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"providerID")
      Parser (Maybe [V1Taint] -> Maybe Bool -> V1NodeSpec)
-> Parser (Maybe [V1Taint]) -> Parser (Maybe Bool -> V1NodeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1Taint])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"taints")
      Parser (Maybe Bool -> V1NodeSpec)
-> Parser (Maybe Bool) -> Parser V1NodeSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"unschedulable")

-- | ToJSON V1NodeSpec
instance A.ToJSON V1NodeSpec where
  toJSON :: V1NodeSpec -> Value
toJSON V1NodeSpec {Maybe Bool
Maybe [Text]
Maybe [V1Taint]
Maybe Text
Maybe V1NodeConfigSource
$sel:v1NodeSpecConfigSource:V1NodeSpec :: V1NodeSpec -> Maybe V1NodeConfigSource
$sel:v1NodeSpecExternalId:V1NodeSpec :: V1NodeSpec -> Maybe Text
$sel:v1NodeSpecPodCidr:V1NodeSpec :: V1NodeSpec -> Maybe Text
$sel:v1NodeSpecPodCidrs:V1NodeSpec :: V1NodeSpec -> Maybe [Text]
$sel:v1NodeSpecProviderId:V1NodeSpec :: V1NodeSpec -> Maybe Text
$sel:v1NodeSpecTaints:V1NodeSpec :: V1NodeSpec -> Maybe [V1Taint]
$sel:v1NodeSpecUnschedulable:V1NodeSpec :: V1NodeSpec -> Maybe Bool
v1NodeSpecConfigSource :: Maybe V1NodeConfigSource
v1NodeSpecExternalId :: Maybe Text
v1NodeSpecPodCidr :: Maybe Text
v1NodeSpecPodCidrs :: Maybe [Text]
v1NodeSpecProviderId :: Maybe Text
v1NodeSpecTaints :: Maybe [V1Taint]
v1NodeSpecUnschedulable :: Maybe Bool
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"configSource" Key -> Maybe V1NodeConfigSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1NodeConfigSource
v1NodeSpecConfigSource
      , Key
"externalID" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1NodeSpecExternalId
      , Key
"podCIDR" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1NodeSpecPodCidr
      , Key
"podCIDRs" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1NodeSpecPodCidrs
      , Key
"providerID" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1NodeSpecProviderId
      , Key
"taints" Key -> Maybe [V1Taint] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1Taint]
v1NodeSpecTaints
      , Key
"unschedulable" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1NodeSpecUnschedulable
      ]


-- | Construct a value of type 'V1NodeSpec' (by applying it's required fields, if any)
mkV1NodeSpec
  :: V1NodeSpec
mkV1NodeSpec :: V1NodeSpec
mkV1NodeSpec =
  V1NodeSpec
  { $sel:v1NodeSpecConfigSource:V1NodeSpec :: Maybe V1NodeConfigSource
v1NodeSpecConfigSource = Maybe V1NodeConfigSource
forall a. Maybe a
Nothing
  , $sel:v1NodeSpecExternalId:V1NodeSpec :: Maybe Text
v1NodeSpecExternalId = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1NodeSpecPodCidr:V1NodeSpec :: Maybe Text
v1NodeSpecPodCidr = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1NodeSpecPodCidrs:V1NodeSpec :: Maybe [Text]
v1NodeSpecPodCidrs = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1NodeSpecProviderId:V1NodeSpec :: Maybe Text
v1NodeSpecProviderId = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1NodeSpecTaints:V1NodeSpec :: Maybe [V1Taint]
v1NodeSpecTaints = Maybe [V1Taint]
forall a. Maybe a
Nothing
  , $sel:v1NodeSpecUnschedulable:V1NodeSpec :: Maybe Bool
v1NodeSpecUnschedulable = Maybe Bool
forall a. Maybe a
Nothing
  }

-- ** V1NodeStatus
-- | V1NodeStatus
-- NodeStatus is information about the current status of a node.
data V1NodeStatus = V1NodeStatus
  { V1NodeStatus -> Maybe [V1NodeAddress]
v1NodeStatusAddresses :: !(Maybe [V1NodeAddress]) -- ^ "addresses" - List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/reference/node/node-status/#addresses Note: This field is declared as mergeable, but the merge key is not sufficiently unique, which can cause data corruption when it is merged. Callers should instead use a full-replacement patch. See https://pr.k8s.io/79391 for an example. Consumers should assume that addresses can change during the lifetime of a Node. However, there are some exceptions where this may not be possible, such as Pods that inherit a Node&#39;s address in its own status or consumers of the downward API (status.hostIP).
  , V1NodeStatus -> Maybe (Map String Quantity)
v1NodeStatusAllocatable :: !(Maybe (Map.Map String Quantity)) -- ^ "allocatable" - Allocatable represents the resources of a node that are available for scheduling. Defaults to Capacity.
  , V1NodeStatus -> Maybe (Map String Quantity)
v1NodeStatusCapacity :: !(Maybe (Map.Map String Quantity)) -- ^ "capacity" - Capacity represents the total resources of a node. More info: https://kubernetes.io/docs/reference/node/node-status/#capacity
  , V1NodeStatus -> Maybe [V1NodeCondition]
v1NodeStatusConditions :: !(Maybe [V1NodeCondition]) -- ^ "conditions" - Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/reference/node/node-status/#condition
  , V1NodeStatus -> Maybe V1NodeConfigStatus
v1NodeStatusConfig :: !(Maybe V1NodeConfigStatus) -- ^ "config"
  , V1NodeStatus -> Maybe V1NodeDaemonEndpoints
v1NodeStatusDaemonEndpoints :: !(Maybe V1NodeDaemonEndpoints) -- ^ "daemonEndpoints"
  , V1NodeStatus -> Maybe V1NodeFeatures
v1NodeStatusFeatures :: !(Maybe V1NodeFeatures) -- ^ "features"
  , V1NodeStatus -> Maybe [V1ContainerImage]
v1NodeStatusImages :: !(Maybe [V1ContainerImage]) -- ^ "images" - List of container images on this node
  , V1NodeStatus -> Maybe V1NodeSystemInfo
v1NodeStatusNodeInfo :: !(Maybe V1NodeSystemInfo) -- ^ "nodeInfo"
  , V1NodeStatus -> Maybe Text
v1NodeStatusPhase :: !(Maybe Text) -- ^ "phase" - NodePhase is the recently observed lifecycle phase of the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#phase The field is never populated, and now is deprecated.
  , V1NodeStatus -> Maybe [V1NodeRuntimeHandler]
v1NodeStatusRuntimeHandlers :: !(Maybe [V1NodeRuntimeHandler]) -- ^ "runtimeHandlers" - The available runtime handlers.
  , V1NodeStatus -> Maybe [V1AttachedVolume]
v1NodeStatusVolumesAttached :: !(Maybe [V1AttachedVolume]) -- ^ "volumesAttached" - List of volumes that are attached to the node.
  , V1NodeStatus -> Maybe [Text]
v1NodeStatusVolumesInUse :: !(Maybe [Text]) -- ^ "volumesInUse" - List of attachable volumes in use (mounted) by the node.
  } deriving (Int -> V1NodeStatus -> ShowS
[V1NodeStatus] -> ShowS
V1NodeStatus -> String
(Int -> V1NodeStatus -> ShowS)
-> (V1NodeStatus -> String)
-> ([V1NodeStatus] -> ShowS)
-> Show V1NodeStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1NodeStatus -> ShowS
showsPrec :: Int -> V1NodeStatus -> ShowS
$cshow :: V1NodeStatus -> String
show :: V1NodeStatus -> String
$cshowList :: [V1NodeStatus] -> ShowS
showList :: [V1NodeStatus] -> ShowS
P.Show, V1NodeStatus -> V1NodeStatus -> Bool
(V1NodeStatus -> V1NodeStatus -> Bool)
-> (V1NodeStatus -> V1NodeStatus -> Bool) -> Eq V1NodeStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1NodeStatus -> V1NodeStatus -> Bool
== :: V1NodeStatus -> V1NodeStatus -> Bool
$c/= :: V1NodeStatus -> V1NodeStatus -> Bool
/= :: V1NodeStatus -> V1NodeStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1NodeStatus
instance A.FromJSON V1NodeStatus where
  parseJSON :: Value -> Parser V1NodeStatus
parseJSON = String
-> (Object -> Parser V1NodeStatus) -> Value -> Parser V1NodeStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1NodeStatus" ((Object -> Parser V1NodeStatus) -> Value -> Parser V1NodeStatus)
-> (Object -> Parser V1NodeStatus) -> Value -> Parser V1NodeStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1NodeAddress]
-> Maybe (Map String Quantity)
-> Maybe (Map String Quantity)
-> Maybe [V1NodeCondition]
-> Maybe V1NodeConfigStatus
-> Maybe V1NodeDaemonEndpoints
-> Maybe V1NodeFeatures
-> Maybe [V1ContainerImage]
-> Maybe V1NodeSystemInfo
-> Maybe Text
-> Maybe [V1NodeRuntimeHandler]
-> Maybe [V1AttachedVolume]
-> Maybe [Text]
-> V1NodeStatus
V1NodeStatus
      (Maybe [V1NodeAddress]
 -> Maybe (Map String Quantity)
 -> Maybe (Map String Quantity)
 -> Maybe [V1NodeCondition]
 -> Maybe V1NodeConfigStatus
 -> Maybe V1NodeDaemonEndpoints
 -> Maybe V1NodeFeatures
 -> Maybe [V1ContainerImage]
 -> Maybe V1NodeSystemInfo
 -> Maybe Text
 -> Maybe [V1NodeRuntimeHandler]
 -> Maybe [V1AttachedVolume]
 -> Maybe [Text]
 -> V1NodeStatus)
-> Parser (Maybe [V1NodeAddress])
-> Parser
     (Maybe (Map String Quantity)
      -> Maybe (Map String Quantity)
      -> Maybe [V1NodeCondition]
      -> Maybe V1NodeConfigStatus
      -> Maybe V1NodeDaemonEndpoints
      -> Maybe V1NodeFeatures
      -> Maybe [V1ContainerImage]
      -> Maybe V1NodeSystemInfo
      -> Maybe Text
      -> Maybe [V1NodeRuntimeHandler]
      -> Maybe [V1AttachedVolume]
      -> Maybe [Text]
      -> V1NodeStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1NodeAddress])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"addresses")
      Parser
  (Maybe (Map String Quantity)
   -> Maybe (Map String Quantity)
   -> Maybe [V1NodeCondition]
   -> Maybe V1NodeConfigStatus
   -> Maybe V1NodeDaemonEndpoints
   -> Maybe V1NodeFeatures
   -> Maybe [V1ContainerImage]
   -> Maybe V1NodeSystemInfo
   -> Maybe Text
   -> Maybe [V1NodeRuntimeHandler]
   -> Maybe [V1AttachedVolume]
   -> Maybe [Text]
   -> V1NodeStatus)
-> Parser (Maybe (Map String Quantity))
-> Parser
     (Maybe (Map String Quantity)
      -> Maybe [V1NodeCondition]
      -> Maybe V1NodeConfigStatus
      -> Maybe V1NodeDaemonEndpoints
      -> Maybe V1NodeFeatures
      -> Maybe [V1ContainerImage]
      -> Maybe V1NodeSystemInfo
      -> Maybe Text
      -> Maybe [V1NodeRuntimeHandler]
      -> Maybe [V1AttachedVolume]
      -> Maybe [Text]
      -> V1NodeStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String Quantity))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"allocatable")
      Parser
  (Maybe (Map String Quantity)
   -> Maybe [V1NodeCondition]
   -> Maybe V1NodeConfigStatus
   -> Maybe V1NodeDaemonEndpoints
   -> Maybe V1NodeFeatures
   -> Maybe [V1ContainerImage]
   -> Maybe V1NodeSystemInfo
   -> Maybe Text
   -> Maybe [V1NodeRuntimeHandler]
   -> Maybe [V1AttachedVolume]
   -> Maybe [Text]
   -> V1NodeStatus)
-> Parser (Maybe (Map String Quantity))
-> Parser
     (Maybe [V1NodeCondition]
      -> Maybe V1NodeConfigStatus
      -> Maybe V1NodeDaemonEndpoints
      -> Maybe V1NodeFeatures
      -> Maybe [V1ContainerImage]
      -> Maybe V1NodeSystemInfo
      -> Maybe Text
      -> Maybe [V1NodeRuntimeHandler]
      -> Maybe [V1AttachedVolume]
      -> Maybe [Text]
      -> V1NodeStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String Quantity))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"capacity")
      Parser
  (Maybe [V1NodeCondition]
   -> Maybe V1NodeConfigStatus
   -> Maybe V1NodeDaemonEndpoints
   -> Maybe V1NodeFeatures
   -> Maybe [V1ContainerImage]
   -> Maybe V1NodeSystemInfo
   -> Maybe Text
   -> Maybe [V1NodeRuntimeHandler]
   -> Maybe [V1AttachedVolume]
   -> Maybe [Text]
   -> V1NodeStatus)
-> Parser (Maybe [V1NodeCondition])
-> Parser
     (Maybe V1NodeConfigStatus
      -> Maybe V1NodeDaemonEndpoints
      -> Maybe V1NodeFeatures
      -> Maybe [V1ContainerImage]
      -> Maybe V1NodeSystemInfo
      -> Maybe Text
      -> Maybe [V1NodeRuntimeHandler]
      -> Maybe [V1AttachedVolume]
      -> Maybe [Text]
      -> V1NodeStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1NodeCondition])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"conditions")
      Parser
  (Maybe V1NodeConfigStatus
   -> Maybe V1NodeDaemonEndpoints
   -> Maybe V1NodeFeatures
   -> Maybe [V1ContainerImage]
   -> Maybe V1NodeSystemInfo
   -> Maybe Text
   -> Maybe [V1NodeRuntimeHandler]
   -> Maybe [V1AttachedVolume]
   -> Maybe [Text]
   -> V1NodeStatus)
-> Parser (Maybe V1NodeConfigStatus)
-> Parser
     (Maybe V1NodeDaemonEndpoints
      -> Maybe V1NodeFeatures
      -> Maybe [V1ContainerImage]
      -> Maybe V1NodeSystemInfo
      -> Maybe Text
      -> Maybe [V1NodeRuntimeHandler]
      -> Maybe [V1AttachedVolume]
      -> Maybe [Text]
      -> V1NodeStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1NodeConfigStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"config")
      Parser
  (Maybe V1NodeDaemonEndpoints
   -> Maybe V1NodeFeatures
   -> Maybe [V1ContainerImage]
   -> Maybe V1NodeSystemInfo
   -> Maybe Text
   -> Maybe [V1NodeRuntimeHandler]
   -> Maybe [V1AttachedVolume]
   -> Maybe [Text]
   -> V1NodeStatus)
-> Parser (Maybe V1NodeDaemonEndpoints)
-> Parser
     (Maybe V1NodeFeatures
      -> Maybe [V1ContainerImage]
      -> Maybe V1NodeSystemInfo
      -> Maybe Text
      -> Maybe [V1NodeRuntimeHandler]
      -> Maybe [V1AttachedVolume]
      -> Maybe [Text]
      -> V1NodeStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1NodeDaemonEndpoints)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"daemonEndpoints")
      Parser
  (Maybe V1NodeFeatures
   -> Maybe [V1ContainerImage]
   -> Maybe V1NodeSystemInfo
   -> Maybe Text
   -> Maybe [V1NodeRuntimeHandler]
   -> Maybe [V1AttachedVolume]
   -> Maybe [Text]
   -> V1NodeStatus)
-> Parser (Maybe V1NodeFeatures)
-> Parser
     (Maybe [V1ContainerImage]
      -> Maybe V1NodeSystemInfo
      -> Maybe Text
      -> Maybe [V1NodeRuntimeHandler]
      -> Maybe [V1AttachedVolume]
      -> Maybe [Text]
      -> V1NodeStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1NodeFeatures)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"features")
      Parser
  (Maybe [V1ContainerImage]
   -> Maybe V1NodeSystemInfo
   -> Maybe Text
   -> Maybe [V1NodeRuntimeHandler]
   -> Maybe [V1AttachedVolume]
   -> Maybe [Text]
   -> V1NodeStatus)
-> Parser (Maybe [V1ContainerImage])
-> Parser
     (Maybe V1NodeSystemInfo
      -> Maybe Text
      -> Maybe [V1NodeRuntimeHandler]
      -> Maybe [V1AttachedVolume]
      -> Maybe [Text]
      -> V1NodeStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1ContainerImage])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"images")
      Parser
  (Maybe V1NodeSystemInfo
   -> Maybe Text
   -> Maybe [V1NodeRuntimeHandler]
   -> Maybe [V1AttachedVolume]
   -> Maybe [Text]
   -> V1NodeStatus)
-> Parser (Maybe V1NodeSystemInfo)
-> Parser
     (Maybe Text
      -> Maybe [V1NodeRuntimeHandler]
      -> Maybe [V1AttachedVolume]
      -> Maybe [Text]
      -> V1NodeStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1NodeSystemInfo)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nodeInfo")
      Parser
  (Maybe Text
   -> Maybe [V1NodeRuntimeHandler]
   -> Maybe [V1AttachedVolume]
   -> Maybe [Text]
   -> V1NodeStatus)
-> Parser (Maybe Text)
-> Parser
     (Maybe [V1NodeRuntimeHandler]
      -> Maybe [V1AttachedVolume] -> Maybe [Text] -> V1NodeStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"phase")
      Parser
  (Maybe [V1NodeRuntimeHandler]
   -> Maybe [V1AttachedVolume] -> Maybe [Text] -> V1NodeStatus)
-> Parser (Maybe [V1NodeRuntimeHandler])
-> Parser
     (Maybe [V1AttachedVolume] -> Maybe [Text] -> V1NodeStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1NodeRuntimeHandler])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"runtimeHandlers")
      Parser (Maybe [V1AttachedVolume] -> Maybe [Text] -> V1NodeStatus)
-> Parser (Maybe [V1AttachedVolume])
-> Parser (Maybe [Text] -> V1NodeStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1AttachedVolume])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"volumesAttached")
      Parser (Maybe [Text] -> V1NodeStatus)
-> Parser (Maybe [Text]) -> Parser V1NodeStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"volumesInUse")

-- | ToJSON V1NodeStatus
instance A.ToJSON V1NodeStatus where
  toJSON :: V1NodeStatus -> Value
toJSON V1NodeStatus {Maybe [Text]
Maybe [V1NodeRuntimeHandler]
Maybe [V1NodeCondition]
Maybe [V1NodeAddress]
Maybe [V1ContainerImage]
Maybe [V1AttachedVolume]
Maybe (Map String Quantity)
Maybe Text
Maybe V1NodeSystemInfo
Maybe V1NodeFeatures
Maybe V1NodeDaemonEndpoints
Maybe V1NodeConfigStatus
$sel:v1NodeStatusAddresses:V1NodeStatus :: V1NodeStatus -> Maybe [V1NodeAddress]
$sel:v1NodeStatusAllocatable:V1NodeStatus :: V1NodeStatus -> Maybe (Map String Quantity)
$sel:v1NodeStatusCapacity:V1NodeStatus :: V1NodeStatus -> Maybe (Map String Quantity)
$sel:v1NodeStatusConditions:V1NodeStatus :: V1NodeStatus -> Maybe [V1NodeCondition]
$sel:v1NodeStatusConfig:V1NodeStatus :: V1NodeStatus -> Maybe V1NodeConfigStatus
$sel:v1NodeStatusDaemonEndpoints:V1NodeStatus :: V1NodeStatus -> Maybe V1NodeDaemonEndpoints
$sel:v1NodeStatusFeatures:V1NodeStatus :: V1NodeStatus -> Maybe V1NodeFeatures
$sel:v1NodeStatusImages:V1NodeStatus :: V1NodeStatus -> Maybe [V1ContainerImage]
$sel:v1NodeStatusNodeInfo:V1NodeStatus :: V1NodeStatus -> Maybe V1NodeSystemInfo
$sel:v1NodeStatusPhase:V1NodeStatus :: V1NodeStatus -> Maybe Text
$sel:v1NodeStatusRuntimeHandlers:V1NodeStatus :: V1NodeStatus -> Maybe [V1NodeRuntimeHandler]
$sel:v1NodeStatusVolumesAttached:V1NodeStatus :: V1NodeStatus -> Maybe [V1AttachedVolume]
$sel:v1NodeStatusVolumesInUse:V1NodeStatus :: V1NodeStatus -> Maybe [Text]
v1NodeStatusAddresses :: Maybe [V1NodeAddress]
v1NodeStatusAllocatable :: Maybe (Map String Quantity)
v1NodeStatusCapacity :: Maybe (Map String Quantity)
v1NodeStatusConditions :: Maybe [V1NodeCondition]
v1NodeStatusConfig :: Maybe V1NodeConfigStatus
v1NodeStatusDaemonEndpoints :: Maybe V1NodeDaemonEndpoints
v1NodeStatusFeatures :: Maybe V1NodeFeatures
v1NodeStatusImages :: Maybe [V1ContainerImage]
v1NodeStatusNodeInfo :: Maybe V1NodeSystemInfo
v1NodeStatusPhase :: Maybe Text
v1NodeStatusRuntimeHandlers :: Maybe [V1NodeRuntimeHandler]
v1NodeStatusVolumesAttached :: Maybe [V1AttachedVolume]
v1NodeStatusVolumesInUse :: Maybe [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"addresses" Key -> Maybe [V1NodeAddress] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1NodeAddress]
v1NodeStatusAddresses
      , Key
"allocatable" Key -> Maybe (Map String Quantity) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Quantity)
v1NodeStatusAllocatable
      , Key
"capacity" Key -> Maybe (Map String Quantity) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Quantity)
v1NodeStatusCapacity
      , Key
"conditions" Key -> Maybe [V1NodeCondition] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1NodeCondition]
v1NodeStatusConditions
      , Key
"config" Key -> Maybe V1NodeConfigStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1NodeConfigStatus
v1NodeStatusConfig
      , Key
"daemonEndpoints" Key -> Maybe V1NodeDaemonEndpoints -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1NodeDaemonEndpoints
v1NodeStatusDaemonEndpoints
      , Key
"features" Key -> Maybe V1NodeFeatures -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1NodeFeatures
v1NodeStatusFeatures
      , Key
"images" Key -> Maybe [V1ContainerImage] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1ContainerImage]
v1NodeStatusImages
      , Key
"nodeInfo" Key -> Maybe V1NodeSystemInfo -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1NodeSystemInfo
v1NodeStatusNodeInfo
      , Key
"phase" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1NodeStatusPhase
      , Key
"runtimeHandlers" Key -> Maybe [V1NodeRuntimeHandler] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1NodeRuntimeHandler]
v1NodeStatusRuntimeHandlers
      , Key
"volumesAttached" Key -> Maybe [V1AttachedVolume] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1AttachedVolume]
v1NodeStatusVolumesAttached
      , Key
"volumesInUse" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1NodeStatusVolumesInUse
      ]


-- | Construct a value of type 'V1NodeStatus' (by applying it's required fields, if any)
mkV1NodeStatus
  :: V1NodeStatus
mkV1NodeStatus :: V1NodeStatus
mkV1NodeStatus =
  V1NodeStatus
  { $sel:v1NodeStatusAddresses:V1NodeStatus :: Maybe [V1NodeAddress]
v1NodeStatusAddresses = Maybe [V1NodeAddress]
forall a. Maybe a
Nothing
  , $sel:v1NodeStatusAllocatable:V1NodeStatus :: Maybe (Map String Quantity)
v1NodeStatusAllocatable = Maybe (Map String Quantity)
forall a. Maybe a
Nothing
  , $sel:v1NodeStatusCapacity:V1NodeStatus :: Maybe (Map String Quantity)
v1NodeStatusCapacity = Maybe (Map String Quantity)
forall a. Maybe a
Nothing
  , $sel:v1NodeStatusConditions:V1NodeStatus :: Maybe [V1NodeCondition]
v1NodeStatusConditions = Maybe [V1NodeCondition]
forall a. Maybe a
Nothing
  , $sel:v1NodeStatusConfig:V1NodeStatus :: Maybe V1NodeConfigStatus
v1NodeStatusConfig = Maybe V1NodeConfigStatus
forall a. Maybe a
Nothing
  , $sel:v1NodeStatusDaemonEndpoints:V1NodeStatus :: Maybe V1NodeDaemonEndpoints
v1NodeStatusDaemonEndpoints = Maybe V1NodeDaemonEndpoints
forall a. Maybe a
Nothing
  , $sel:v1NodeStatusFeatures:V1NodeStatus :: Maybe V1NodeFeatures
v1NodeStatusFeatures = Maybe V1NodeFeatures
forall a. Maybe a
Nothing
  , $sel:v1NodeStatusImages:V1NodeStatus :: Maybe [V1ContainerImage]
v1NodeStatusImages = Maybe [V1ContainerImage]
forall a. Maybe a
Nothing
  , $sel:v1NodeStatusNodeInfo:V1NodeStatus :: Maybe V1NodeSystemInfo
v1NodeStatusNodeInfo = Maybe V1NodeSystemInfo
forall a. Maybe a
Nothing
  , $sel:v1NodeStatusPhase:V1NodeStatus :: Maybe Text
v1NodeStatusPhase = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1NodeStatusRuntimeHandlers:V1NodeStatus :: Maybe [V1NodeRuntimeHandler]
v1NodeStatusRuntimeHandlers = Maybe [V1NodeRuntimeHandler]
forall a. Maybe a
Nothing
  , $sel:v1NodeStatusVolumesAttached:V1NodeStatus :: Maybe [V1AttachedVolume]
v1NodeStatusVolumesAttached = Maybe [V1AttachedVolume]
forall a. Maybe a
Nothing
  , $sel:v1NodeStatusVolumesInUse:V1NodeStatus :: Maybe [Text]
v1NodeStatusVolumesInUse = Maybe [Text]
forall a. Maybe a
Nothing
  }

-- ** V1NodeSystemInfo
-- | V1NodeSystemInfo
-- NodeSystemInfo is a set of ids/uuids to uniquely identify the node.
data V1NodeSystemInfo = V1NodeSystemInfo
  { V1NodeSystemInfo -> Text
v1NodeSystemInfoArchitecture :: !(Text) -- ^ /Required/ "architecture" - The Architecture reported by the node
  , V1NodeSystemInfo -> Text
v1NodeSystemInfoBootId :: !(Text) -- ^ /Required/ "bootID" - Boot ID reported by the node.
  , V1NodeSystemInfo -> Text
v1NodeSystemInfoContainerRuntimeVersion :: !(Text) -- ^ /Required/ "containerRuntimeVersion" - ContainerRuntime Version reported by the node through runtime remote API (e.g. containerd://1.4.2).
  , V1NodeSystemInfo -> Text
v1NodeSystemInfoKernelVersion :: !(Text) -- ^ /Required/ "kernelVersion" - Kernel Version reported by the node from &#39;uname -r&#39; (e.g. 3.16.0-0.bpo.4-amd64).
  , V1NodeSystemInfo -> Text
v1NodeSystemInfoKubeProxyVersion :: !(Text) -- ^ /Required/ "kubeProxyVersion" - Deprecated: KubeProxy Version reported by the node.
  , V1NodeSystemInfo -> Text
v1NodeSystemInfoKubeletVersion :: !(Text) -- ^ /Required/ "kubeletVersion" - Kubelet Version reported by the node.
  , V1NodeSystemInfo -> Text
v1NodeSystemInfoMachineId :: !(Text) -- ^ /Required/ "machineID" - MachineID reported by the node. For unique machine identification in the cluster this field is preferred. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html
  , V1NodeSystemInfo -> Text
v1NodeSystemInfoOperatingSystem :: !(Text) -- ^ /Required/ "operatingSystem" - The Operating System reported by the node
  , V1NodeSystemInfo -> Text
v1NodeSystemInfoOsImage :: !(Text) -- ^ /Required/ "osImage" - OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).
  , V1NodeSystemInfo -> Text
v1NodeSystemInfoSystemUuid :: !(Text) -- ^ /Required/ "systemUUID" - SystemUUID reported by the node. For unique machine identification MachineID is preferred. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/uuid
  } deriving (Int -> V1NodeSystemInfo -> ShowS
[V1NodeSystemInfo] -> ShowS
V1NodeSystemInfo -> String
(Int -> V1NodeSystemInfo -> ShowS)
-> (V1NodeSystemInfo -> String)
-> ([V1NodeSystemInfo] -> ShowS)
-> Show V1NodeSystemInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1NodeSystemInfo -> ShowS
showsPrec :: Int -> V1NodeSystemInfo -> ShowS
$cshow :: V1NodeSystemInfo -> String
show :: V1NodeSystemInfo -> String
$cshowList :: [V1NodeSystemInfo] -> ShowS
showList :: [V1NodeSystemInfo] -> ShowS
P.Show, V1NodeSystemInfo -> V1NodeSystemInfo -> Bool
(V1NodeSystemInfo -> V1NodeSystemInfo -> Bool)
-> (V1NodeSystemInfo -> V1NodeSystemInfo -> Bool)
-> Eq V1NodeSystemInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1NodeSystemInfo -> V1NodeSystemInfo -> Bool
== :: V1NodeSystemInfo -> V1NodeSystemInfo -> Bool
$c/= :: V1NodeSystemInfo -> V1NodeSystemInfo -> Bool
/= :: V1NodeSystemInfo -> V1NodeSystemInfo -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1NodeSystemInfo
instance A.FromJSON V1NodeSystemInfo where
  parseJSON :: Value -> Parser V1NodeSystemInfo
parseJSON = String
-> (Object -> Parser V1NodeSystemInfo)
-> Value
-> Parser V1NodeSystemInfo
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1NodeSystemInfo" ((Object -> Parser V1NodeSystemInfo)
 -> Value -> Parser V1NodeSystemInfo)
-> (Object -> Parser V1NodeSystemInfo)
-> Value
-> Parser V1NodeSystemInfo
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> V1NodeSystemInfo
V1NodeSystemInfo
      (Text
 -> Text
 -> Text
 -> Text
 -> Text
 -> Text
 -> Text
 -> Text
 -> Text
 -> Text
 -> V1NodeSystemInfo)
-> Parser Text
-> Parser
     (Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> V1NodeSystemInfo)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"architecture")
      Parser
  (Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> V1NodeSystemInfo)
-> Parser Text
-> Parser
     (Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> V1NodeSystemInfo)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"bootID")
      Parser
  (Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> V1NodeSystemInfo)
-> Parser Text
-> Parser
     (Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> V1NodeSystemInfo)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"containerRuntimeVersion")
      Parser
  (Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> V1NodeSystemInfo)
-> Parser Text
-> Parser
     (Text -> Text -> Text -> Text -> Text -> Text -> V1NodeSystemInfo)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"kernelVersion")
      Parser
  (Text -> Text -> Text -> Text -> Text -> Text -> V1NodeSystemInfo)
-> Parser Text
-> Parser
     (Text -> Text -> Text -> Text -> Text -> V1NodeSystemInfo)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"kubeProxyVersion")
      Parser (Text -> Text -> Text -> Text -> Text -> V1NodeSystemInfo)
-> Parser Text
-> Parser (Text -> Text -> Text -> Text -> V1NodeSystemInfo)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"kubeletVersion")
      Parser (Text -> Text -> Text -> Text -> V1NodeSystemInfo)
-> Parser Text -> Parser (Text -> Text -> Text -> V1NodeSystemInfo)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"machineID")
      Parser (Text -> Text -> Text -> V1NodeSystemInfo)
-> Parser Text -> Parser (Text -> Text -> V1NodeSystemInfo)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"operatingSystem")
      Parser (Text -> Text -> V1NodeSystemInfo)
-> Parser Text -> Parser (Text -> V1NodeSystemInfo)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"osImage")
      Parser (Text -> V1NodeSystemInfo)
-> Parser Text -> Parser V1NodeSystemInfo
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"systemUUID")

-- | ToJSON V1NodeSystemInfo
instance A.ToJSON V1NodeSystemInfo where
  toJSON :: V1NodeSystemInfo -> Value
toJSON V1NodeSystemInfo {Text
$sel:v1NodeSystemInfoArchitecture:V1NodeSystemInfo :: V1NodeSystemInfo -> Text
$sel:v1NodeSystemInfoBootId:V1NodeSystemInfo :: V1NodeSystemInfo -> Text
$sel:v1NodeSystemInfoContainerRuntimeVersion:V1NodeSystemInfo :: V1NodeSystemInfo -> Text
$sel:v1NodeSystemInfoKernelVersion:V1NodeSystemInfo :: V1NodeSystemInfo -> Text
$sel:v1NodeSystemInfoKubeProxyVersion:V1NodeSystemInfo :: V1NodeSystemInfo -> Text
$sel:v1NodeSystemInfoKubeletVersion:V1NodeSystemInfo :: V1NodeSystemInfo -> Text
$sel:v1NodeSystemInfoMachineId:V1NodeSystemInfo :: V1NodeSystemInfo -> Text
$sel:v1NodeSystemInfoOperatingSystem:V1NodeSystemInfo :: V1NodeSystemInfo -> Text
$sel:v1NodeSystemInfoOsImage:V1NodeSystemInfo :: V1NodeSystemInfo -> Text
$sel:v1NodeSystemInfoSystemUuid:V1NodeSystemInfo :: V1NodeSystemInfo -> Text
v1NodeSystemInfoArchitecture :: Text
v1NodeSystemInfoBootId :: Text
v1NodeSystemInfoContainerRuntimeVersion :: Text
v1NodeSystemInfoKernelVersion :: Text
v1NodeSystemInfoKubeProxyVersion :: Text
v1NodeSystemInfoKubeletVersion :: Text
v1NodeSystemInfoMachineId :: Text
v1NodeSystemInfoOperatingSystem :: Text
v1NodeSystemInfoOsImage :: Text
v1NodeSystemInfoSystemUuid :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"architecture" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1NodeSystemInfoArchitecture
      , Key
"bootID" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1NodeSystemInfoBootId
      , Key
"containerRuntimeVersion" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1NodeSystemInfoContainerRuntimeVersion
      , Key
"kernelVersion" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1NodeSystemInfoKernelVersion
      , Key
"kubeProxyVersion" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1NodeSystemInfoKubeProxyVersion
      , Key
"kubeletVersion" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1NodeSystemInfoKubeletVersion
      , Key
"machineID" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1NodeSystemInfoMachineId
      , Key
"operatingSystem" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1NodeSystemInfoOperatingSystem
      , Key
"osImage" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1NodeSystemInfoOsImage
      , Key
"systemUUID" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1NodeSystemInfoSystemUuid
      ]


-- | Construct a value of type 'V1NodeSystemInfo' (by applying it's required fields, if any)
mkV1NodeSystemInfo
  :: Text -- ^ 'v1NodeSystemInfoArchitecture': The Architecture reported by the node
  -> Text -- ^ 'v1NodeSystemInfoBootId': Boot ID reported by the node.
  -> Text -- ^ 'v1NodeSystemInfoContainerRuntimeVersion': ContainerRuntime Version reported by the node through runtime remote API (e.g. containerd://1.4.2).
  -> Text -- ^ 'v1NodeSystemInfoKernelVersion': Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).
  -> Text -- ^ 'v1NodeSystemInfoKubeProxyVersion': Deprecated: KubeProxy Version reported by the node.
  -> Text -- ^ 'v1NodeSystemInfoKubeletVersion': Kubelet Version reported by the node.
  -> Text -- ^ 'v1NodeSystemInfoMachineId': MachineID reported by the node. For unique machine identification in the cluster this field is preferred. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html
  -> Text -- ^ 'v1NodeSystemInfoOperatingSystem': The Operating System reported by the node
  -> Text -- ^ 'v1NodeSystemInfoOsImage': OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).
  -> Text -- ^ 'v1NodeSystemInfoSystemUuid': SystemUUID reported by the node. For unique machine identification MachineID is preferred. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/uuid
  -> V1NodeSystemInfo
mkV1NodeSystemInfo :: Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> V1NodeSystemInfo
mkV1NodeSystemInfo Text
v1NodeSystemInfoArchitecture Text
v1NodeSystemInfoBootId Text
v1NodeSystemInfoContainerRuntimeVersion Text
v1NodeSystemInfoKernelVersion Text
v1NodeSystemInfoKubeProxyVersion Text
v1NodeSystemInfoKubeletVersion Text
v1NodeSystemInfoMachineId Text
v1NodeSystemInfoOperatingSystem Text
v1NodeSystemInfoOsImage Text
v1NodeSystemInfoSystemUuid =
  V1NodeSystemInfo
  { Text
$sel:v1NodeSystemInfoArchitecture:V1NodeSystemInfo :: Text
v1NodeSystemInfoArchitecture :: Text
v1NodeSystemInfoArchitecture
  , Text
$sel:v1NodeSystemInfoBootId:V1NodeSystemInfo :: Text
v1NodeSystemInfoBootId :: Text
v1NodeSystemInfoBootId
  , Text
$sel:v1NodeSystemInfoContainerRuntimeVersion:V1NodeSystemInfo :: Text
v1NodeSystemInfoContainerRuntimeVersion :: Text
v1NodeSystemInfoContainerRuntimeVersion
  , Text
$sel:v1NodeSystemInfoKernelVersion:V1NodeSystemInfo :: Text
v1NodeSystemInfoKernelVersion :: Text
v1NodeSystemInfoKernelVersion
  , Text
$sel:v1NodeSystemInfoKubeProxyVersion:V1NodeSystemInfo :: Text
v1NodeSystemInfoKubeProxyVersion :: Text
v1NodeSystemInfoKubeProxyVersion
  , Text
$sel:v1NodeSystemInfoKubeletVersion:V1NodeSystemInfo :: Text
v1NodeSystemInfoKubeletVersion :: Text
v1NodeSystemInfoKubeletVersion
  , Text
$sel:v1NodeSystemInfoMachineId:V1NodeSystemInfo :: Text
v1NodeSystemInfoMachineId :: Text
v1NodeSystemInfoMachineId
  , Text
$sel:v1NodeSystemInfoOperatingSystem:V1NodeSystemInfo :: Text
v1NodeSystemInfoOperatingSystem :: Text
v1NodeSystemInfoOperatingSystem
  , Text
$sel:v1NodeSystemInfoOsImage:V1NodeSystemInfo :: Text
v1NodeSystemInfoOsImage :: Text
v1NodeSystemInfoOsImage
  , Text
$sel:v1NodeSystemInfoSystemUuid:V1NodeSystemInfo :: Text
v1NodeSystemInfoSystemUuid :: Text
v1NodeSystemInfoSystemUuid
  }

-- ** V1NonResourceAttributes
-- | V1NonResourceAttributes
-- NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface
data V1NonResourceAttributes = V1NonResourceAttributes
  { V1NonResourceAttributes -> Maybe Text
v1NonResourceAttributesPath :: !(Maybe Text) -- ^ "path" - Path is the URL path of the request
  , V1NonResourceAttributes -> Maybe Text
v1NonResourceAttributesVerb :: !(Maybe Text) -- ^ "verb" - Verb is the standard HTTP verb
  } deriving (Int -> V1NonResourceAttributes -> ShowS
[V1NonResourceAttributes] -> ShowS
V1NonResourceAttributes -> String
(Int -> V1NonResourceAttributes -> ShowS)
-> (V1NonResourceAttributes -> String)
-> ([V1NonResourceAttributes] -> ShowS)
-> Show V1NonResourceAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1NonResourceAttributes -> ShowS
showsPrec :: Int -> V1NonResourceAttributes -> ShowS
$cshow :: V1NonResourceAttributes -> String
show :: V1NonResourceAttributes -> String
$cshowList :: [V1NonResourceAttributes] -> ShowS
showList :: [V1NonResourceAttributes] -> ShowS
P.Show, V1NonResourceAttributes -> V1NonResourceAttributes -> Bool
(V1NonResourceAttributes -> V1NonResourceAttributes -> Bool)
-> (V1NonResourceAttributes -> V1NonResourceAttributes -> Bool)
-> Eq V1NonResourceAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1NonResourceAttributes -> V1NonResourceAttributes -> Bool
== :: V1NonResourceAttributes -> V1NonResourceAttributes -> Bool
$c/= :: V1NonResourceAttributes -> V1NonResourceAttributes -> Bool
/= :: V1NonResourceAttributes -> V1NonResourceAttributes -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1NonResourceAttributes
instance A.FromJSON V1NonResourceAttributes where
  parseJSON :: Value -> Parser V1NonResourceAttributes
parseJSON = String
-> (Object -> Parser V1NonResourceAttributes)
-> Value
-> Parser V1NonResourceAttributes
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1NonResourceAttributes" ((Object -> Parser V1NonResourceAttributes)
 -> Value -> Parser V1NonResourceAttributes)
-> (Object -> Parser V1NonResourceAttributes)
-> Value
-> Parser V1NonResourceAttributes
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Maybe Text -> V1NonResourceAttributes
V1NonResourceAttributes
      (Maybe Text -> Maybe Text -> V1NonResourceAttributes)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> V1NonResourceAttributes)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"path")
      Parser (Maybe Text -> V1NonResourceAttributes)
-> Parser (Maybe Text) -> Parser V1NonResourceAttributes
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"verb")

-- | ToJSON V1NonResourceAttributes
instance A.ToJSON V1NonResourceAttributes where
  toJSON :: V1NonResourceAttributes -> Value
toJSON V1NonResourceAttributes {Maybe Text
$sel:v1NonResourceAttributesPath:V1NonResourceAttributes :: V1NonResourceAttributes -> Maybe Text
$sel:v1NonResourceAttributesVerb:V1NonResourceAttributes :: V1NonResourceAttributes -> Maybe Text
v1NonResourceAttributesPath :: Maybe Text
v1NonResourceAttributesVerb :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"path" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1NonResourceAttributesPath
      , Key
"verb" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1NonResourceAttributesVerb
      ]


-- | Construct a value of type 'V1NonResourceAttributes' (by applying it's required fields, if any)
mkV1NonResourceAttributes
  :: V1NonResourceAttributes
mkV1NonResourceAttributes :: V1NonResourceAttributes
mkV1NonResourceAttributes =
  V1NonResourceAttributes
  { $sel:v1NonResourceAttributesPath:V1NonResourceAttributes :: Maybe Text
v1NonResourceAttributesPath = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1NonResourceAttributesVerb:V1NonResourceAttributes :: Maybe Text
v1NonResourceAttributesVerb = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1NonResourcePolicyRule
-- | V1NonResourcePolicyRule
-- NonResourcePolicyRule is a predicate that matches non-resource requests according to their verb and the target non-resource URL. A NonResourcePolicyRule matches a request if and only if both (a) at least one member of verbs matches the request and (b) at least one member of nonResourceURLs matches the request.
data V1NonResourcePolicyRule = V1NonResourcePolicyRule
  { V1NonResourcePolicyRule -> [Text]
v1NonResourcePolicyRuleNonResourceUrls :: !([Text]) -- ^ /Required/ "nonResourceURLs" - &#x60;nonResourceURLs&#x60; is a set of url prefixes that a user should have access to and may not be empty. For example:   - \&quot;/healthz\&quot; is legal   - \&quot;/hea*\&quot; is illegal   - \&quot;/hea\&quot; is legal but matches nothing   - \&quot;/hea/*\&quot; also matches nothing   - \&quot;/healthz/*\&quot; matches all per-component health checks. \&quot;*\&quot; matches all non-resource urls. if it is present, it must be the only entry. Required.
  , V1NonResourcePolicyRule -> [Text]
v1NonResourcePolicyRuleVerbs :: !([Text]) -- ^ /Required/ "verbs" - &#x60;verbs&#x60; is a list of matching verbs and may not be empty. \&quot;*\&quot; matches all verbs. If it is present, it must be the only entry. Required.
  } deriving (Int -> V1NonResourcePolicyRule -> ShowS
[V1NonResourcePolicyRule] -> ShowS
V1NonResourcePolicyRule -> String
(Int -> V1NonResourcePolicyRule -> ShowS)
-> (V1NonResourcePolicyRule -> String)
-> ([V1NonResourcePolicyRule] -> ShowS)
-> Show V1NonResourcePolicyRule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1NonResourcePolicyRule -> ShowS
showsPrec :: Int -> V1NonResourcePolicyRule -> ShowS
$cshow :: V1NonResourcePolicyRule -> String
show :: V1NonResourcePolicyRule -> String
$cshowList :: [V1NonResourcePolicyRule] -> ShowS
showList :: [V1NonResourcePolicyRule] -> ShowS
P.Show, V1NonResourcePolicyRule -> V1NonResourcePolicyRule -> Bool
(V1NonResourcePolicyRule -> V1NonResourcePolicyRule -> Bool)
-> (V1NonResourcePolicyRule -> V1NonResourcePolicyRule -> Bool)
-> Eq V1NonResourcePolicyRule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1NonResourcePolicyRule -> V1NonResourcePolicyRule -> Bool
== :: V1NonResourcePolicyRule -> V1NonResourcePolicyRule -> Bool
$c/= :: V1NonResourcePolicyRule -> V1NonResourcePolicyRule -> Bool
/= :: V1NonResourcePolicyRule -> V1NonResourcePolicyRule -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1NonResourcePolicyRule
instance A.FromJSON V1NonResourcePolicyRule where
  parseJSON :: Value -> Parser V1NonResourcePolicyRule
parseJSON = String
-> (Object -> Parser V1NonResourcePolicyRule)
-> Value
-> Parser V1NonResourcePolicyRule
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1NonResourcePolicyRule" ((Object -> Parser V1NonResourcePolicyRule)
 -> Value -> Parser V1NonResourcePolicyRule)
-> (Object -> Parser V1NonResourcePolicyRule)
-> Value
-> Parser V1NonResourcePolicyRule
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    [Text] -> [Text] -> V1NonResourcePolicyRule
V1NonResourcePolicyRule
      ([Text] -> [Text] -> V1NonResourcePolicyRule)
-> Parser [Text] -> Parser ([Text] -> V1NonResourcePolicyRule)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"nonResourceURLs")
      Parser ([Text] -> V1NonResourcePolicyRule)
-> Parser [Text] -> Parser V1NonResourcePolicyRule
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"verbs")

-- | ToJSON V1NonResourcePolicyRule
instance A.ToJSON V1NonResourcePolicyRule where
  toJSON :: V1NonResourcePolicyRule -> Value
toJSON V1NonResourcePolicyRule {[Text]
$sel:v1NonResourcePolicyRuleNonResourceUrls:V1NonResourcePolicyRule :: V1NonResourcePolicyRule -> [Text]
$sel:v1NonResourcePolicyRuleVerbs:V1NonResourcePolicyRule :: V1NonResourcePolicyRule -> [Text]
v1NonResourcePolicyRuleNonResourceUrls :: [Text]
v1NonResourcePolicyRuleVerbs :: [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"nonResourceURLs" Key -> [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [Text]
v1NonResourcePolicyRuleNonResourceUrls
      , Key
"verbs" Key -> [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [Text]
v1NonResourcePolicyRuleVerbs
      ]


-- | Construct a value of type 'V1NonResourcePolicyRule' (by applying it's required fields, if any)
mkV1NonResourcePolicyRule
  :: [Text] -- ^ 'v1NonResourcePolicyRuleNonResourceUrls': `nonResourceURLs` is a set of url prefixes that a user should have access to and may not be empty. For example:   - \"/healthz\" is legal   - \"/hea*\" is illegal   - \"/hea\" is legal but matches nothing   - \"/hea/*\" also matches nothing   - \"/healthz/*\" matches all per-component health checks. \"*\" matches all non-resource urls. if it is present, it must be the only entry. Required.
  -> [Text] -- ^ 'v1NonResourcePolicyRuleVerbs': `verbs` is a list of matching verbs and may not be empty. \"*\" matches all verbs. If it is present, it must be the only entry. Required.
  -> V1NonResourcePolicyRule
mkV1NonResourcePolicyRule :: [Text] -> [Text] -> V1NonResourcePolicyRule
mkV1NonResourcePolicyRule [Text]
v1NonResourcePolicyRuleNonResourceUrls [Text]
v1NonResourcePolicyRuleVerbs =
  V1NonResourcePolicyRule
  { [Text]
$sel:v1NonResourcePolicyRuleNonResourceUrls:V1NonResourcePolicyRule :: [Text]
v1NonResourcePolicyRuleNonResourceUrls :: [Text]
v1NonResourcePolicyRuleNonResourceUrls
  , [Text]
$sel:v1NonResourcePolicyRuleVerbs:V1NonResourcePolicyRule :: [Text]
v1NonResourcePolicyRuleVerbs :: [Text]
v1NonResourcePolicyRuleVerbs
  }

-- ** V1NonResourceRule
-- | V1NonResourceRule
-- NonResourceRule holds information that describes a rule for the non-resource
data V1NonResourceRule = V1NonResourceRule
  { V1NonResourceRule -> Maybe [Text]
v1NonResourceRuleNonResourceUrls :: !(Maybe [Text]) -- ^ "nonResourceURLs" - NonResourceURLs is a set of partial urls that a user should have access to.  *s are allowed, but only as the full, final step in the path.  \&quot;*\&quot; means all.
  , V1NonResourceRule -> [Text]
v1NonResourceRuleVerbs :: !([Text]) -- ^ /Required/ "verbs" - Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options.  \&quot;*\&quot; means all.
  } deriving (Int -> V1NonResourceRule -> ShowS
[V1NonResourceRule] -> ShowS
V1NonResourceRule -> String
(Int -> V1NonResourceRule -> ShowS)
-> (V1NonResourceRule -> String)
-> ([V1NonResourceRule] -> ShowS)
-> Show V1NonResourceRule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1NonResourceRule -> ShowS
showsPrec :: Int -> V1NonResourceRule -> ShowS
$cshow :: V1NonResourceRule -> String
show :: V1NonResourceRule -> String
$cshowList :: [V1NonResourceRule] -> ShowS
showList :: [V1NonResourceRule] -> ShowS
P.Show, V1NonResourceRule -> V1NonResourceRule -> Bool
(V1NonResourceRule -> V1NonResourceRule -> Bool)
-> (V1NonResourceRule -> V1NonResourceRule -> Bool)
-> Eq V1NonResourceRule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1NonResourceRule -> V1NonResourceRule -> Bool
== :: V1NonResourceRule -> V1NonResourceRule -> Bool
$c/= :: V1NonResourceRule -> V1NonResourceRule -> Bool
/= :: V1NonResourceRule -> V1NonResourceRule -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1NonResourceRule
instance A.FromJSON V1NonResourceRule where
  parseJSON :: Value -> Parser V1NonResourceRule
parseJSON = String
-> (Object -> Parser V1NonResourceRule)
-> Value
-> Parser V1NonResourceRule
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1NonResourceRule" ((Object -> Parser V1NonResourceRule)
 -> Value -> Parser V1NonResourceRule)
-> (Object -> Parser V1NonResourceRule)
-> Value
-> Parser V1NonResourceRule
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [Text] -> [Text] -> V1NonResourceRule
V1NonResourceRule
      (Maybe [Text] -> [Text] -> V1NonResourceRule)
-> Parser (Maybe [Text]) -> Parser ([Text] -> V1NonResourceRule)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nonResourceURLs")
      Parser ([Text] -> V1NonResourceRule)
-> Parser [Text] -> Parser V1NonResourceRule
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"verbs")

-- | ToJSON V1NonResourceRule
instance A.ToJSON V1NonResourceRule where
  toJSON :: V1NonResourceRule -> Value
toJSON V1NonResourceRule {[Text]
Maybe [Text]
$sel:v1NonResourceRuleNonResourceUrls:V1NonResourceRule :: V1NonResourceRule -> Maybe [Text]
$sel:v1NonResourceRuleVerbs:V1NonResourceRule :: V1NonResourceRule -> [Text]
v1NonResourceRuleNonResourceUrls :: Maybe [Text]
v1NonResourceRuleVerbs :: [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"nonResourceURLs" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1NonResourceRuleNonResourceUrls
      , Key
"verbs" Key -> [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [Text]
v1NonResourceRuleVerbs
      ]


-- | Construct a value of type 'V1NonResourceRule' (by applying it's required fields, if any)
mkV1NonResourceRule
  :: [Text] -- ^ 'v1NonResourceRuleVerbs': Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options.  \"*\" means all.
  -> V1NonResourceRule
mkV1NonResourceRule :: [Text] -> V1NonResourceRule
mkV1NonResourceRule [Text]
v1NonResourceRuleVerbs =
  V1NonResourceRule
  { $sel:v1NonResourceRuleNonResourceUrls:V1NonResourceRule :: Maybe [Text]
v1NonResourceRuleNonResourceUrls = Maybe [Text]
forall a. Maybe a
Nothing
  , [Text]
$sel:v1NonResourceRuleVerbs:V1NonResourceRule :: [Text]
v1NonResourceRuleVerbs :: [Text]
v1NonResourceRuleVerbs
  }

-- ** V1ObjectFieldSelector
-- | V1ObjectFieldSelector
-- ObjectFieldSelector selects an APIVersioned field of an object.
data V1ObjectFieldSelector = V1ObjectFieldSelector
  { V1ObjectFieldSelector -> Maybe Text
v1ObjectFieldSelectorApiVersion :: !(Maybe Text) -- ^ "apiVersion" - Version of the schema the FieldPath is written in terms of, defaults to \&quot;v1\&quot;.
  , V1ObjectFieldSelector -> Text
v1ObjectFieldSelectorFieldPath :: !(Text) -- ^ /Required/ "fieldPath" - Path of the field to select in the specified API version.
  } deriving (Int -> V1ObjectFieldSelector -> ShowS
[V1ObjectFieldSelector] -> ShowS
V1ObjectFieldSelector -> String
(Int -> V1ObjectFieldSelector -> ShowS)
-> (V1ObjectFieldSelector -> String)
-> ([V1ObjectFieldSelector] -> ShowS)
-> Show V1ObjectFieldSelector
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ObjectFieldSelector -> ShowS
showsPrec :: Int -> V1ObjectFieldSelector -> ShowS
$cshow :: V1ObjectFieldSelector -> String
show :: V1ObjectFieldSelector -> String
$cshowList :: [V1ObjectFieldSelector] -> ShowS
showList :: [V1ObjectFieldSelector] -> ShowS
P.Show, V1ObjectFieldSelector -> V1ObjectFieldSelector -> Bool
(V1ObjectFieldSelector -> V1ObjectFieldSelector -> Bool)
-> (V1ObjectFieldSelector -> V1ObjectFieldSelector -> Bool)
-> Eq V1ObjectFieldSelector
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ObjectFieldSelector -> V1ObjectFieldSelector -> Bool
== :: V1ObjectFieldSelector -> V1ObjectFieldSelector -> Bool
$c/= :: V1ObjectFieldSelector -> V1ObjectFieldSelector -> Bool
/= :: V1ObjectFieldSelector -> V1ObjectFieldSelector -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ObjectFieldSelector
instance A.FromJSON V1ObjectFieldSelector where
  parseJSON :: Value -> Parser V1ObjectFieldSelector
parseJSON = String
-> (Object -> Parser V1ObjectFieldSelector)
-> Value
-> Parser V1ObjectFieldSelector
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ObjectFieldSelector" ((Object -> Parser V1ObjectFieldSelector)
 -> Value -> Parser V1ObjectFieldSelector)
-> (Object -> Parser V1ObjectFieldSelector)
-> Value
-> Parser V1ObjectFieldSelector
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Text -> V1ObjectFieldSelector
V1ObjectFieldSelector
      (Maybe Text -> Text -> V1ObjectFieldSelector)
-> Parser (Maybe Text) -> Parser (Text -> V1ObjectFieldSelector)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser (Text -> V1ObjectFieldSelector)
-> Parser Text -> Parser V1ObjectFieldSelector
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"fieldPath")

-- | ToJSON V1ObjectFieldSelector
instance A.ToJSON V1ObjectFieldSelector where
  toJSON :: V1ObjectFieldSelector -> Value
toJSON V1ObjectFieldSelector {Maybe Text
Text
$sel:v1ObjectFieldSelectorApiVersion:V1ObjectFieldSelector :: V1ObjectFieldSelector -> Maybe Text
$sel:v1ObjectFieldSelectorFieldPath:V1ObjectFieldSelector :: V1ObjectFieldSelector -> Text
v1ObjectFieldSelectorApiVersion :: Maybe Text
v1ObjectFieldSelectorFieldPath :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ObjectFieldSelectorApiVersion
      , Key
"fieldPath" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ObjectFieldSelectorFieldPath
      ]


-- | Construct a value of type 'V1ObjectFieldSelector' (by applying it's required fields, if any)
mkV1ObjectFieldSelector
  :: Text -- ^ 'v1ObjectFieldSelectorFieldPath': Path of the field to select in the specified API version.
  -> V1ObjectFieldSelector
mkV1ObjectFieldSelector :: Text -> V1ObjectFieldSelector
mkV1ObjectFieldSelector Text
v1ObjectFieldSelectorFieldPath =
  V1ObjectFieldSelector
  { $sel:v1ObjectFieldSelectorApiVersion:V1ObjectFieldSelector :: Maybe Text
v1ObjectFieldSelectorApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1ObjectFieldSelectorFieldPath:V1ObjectFieldSelector :: Text
v1ObjectFieldSelectorFieldPath :: Text
v1ObjectFieldSelectorFieldPath
  }

-- ** V1ObjectMeta
-- | V1ObjectMeta
-- ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.
data V1ObjectMeta = V1ObjectMeta
  { V1ObjectMeta -> Maybe (Map String Text)
v1ObjectMetaAnnotations :: !(Maybe (Map.Map String Text)) -- ^ "annotations" - Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations
  , V1ObjectMeta -> Maybe DateTime
v1ObjectMetaCreationTimestamp :: !(Maybe DateTime) -- ^ "creationTimestamp" - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.  Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  , V1ObjectMeta -> Maybe Integer
v1ObjectMetaDeletionGracePeriodSeconds :: !(Maybe Integer) -- ^ "deletionGracePeriodSeconds" - Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.
  , V1ObjectMeta -> Maybe DateTime
v1ObjectMetaDeletionTimestamp :: !(Maybe DateTime) -- ^ "deletionTimestamp" - DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.  Populated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  , V1ObjectMeta -> Maybe [Text]
v1ObjectMetaFinalizers :: !(Maybe [Text]) -- ^ "finalizers" - Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order.  Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list.
  , V1ObjectMeta -> Maybe Text
v1ObjectMetaGenerateName :: !(Maybe Text) -- ^ "generateName" - GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.  If this field is specified and the generated name exists, the server will return a 409.  Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency
  , V1ObjectMeta -> Maybe Integer
v1ObjectMetaGeneration :: !(Maybe Integer) -- ^ "generation" - A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.
  , V1ObjectMeta -> Maybe (Map String Text)
v1ObjectMetaLabels :: !(Maybe (Map.Map String Text)) -- ^ "labels" - Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels
  , V1ObjectMeta -> Maybe [V1ManagedFieldsEntry]
v1ObjectMetaManagedFields :: !(Maybe [V1ManagedFieldsEntry]) -- ^ "managedFields" - ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn&#39;t need to set or understand this field. A workflow can be the user&#39;s name, a controller&#39;s name, or the name of a specific apply path like \&quot;ci-cd\&quot;. The set of fields is always in the version that the workflow used when modifying the object.
  , V1ObjectMeta -> Maybe Text
v1ObjectMetaName :: !(Maybe Text) -- ^ "name" - Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names
  , V1ObjectMeta -> Maybe Text
v1ObjectMetaNamespace :: !(Maybe Text) -- ^ "namespace" - Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \&quot;default\&quot; namespace, but \&quot;default\&quot; is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.  Must be a DNS_LABEL. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces
  , V1ObjectMeta -> Maybe [V1OwnerReference]
v1ObjectMetaOwnerReferences :: !(Maybe [V1OwnerReference]) -- ^ "ownerReferences" - List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.
  , V1ObjectMeta -> Maybe Text
v1ObjectMetaResourceVersion :: !(Maybe Text) -- ^ "resourceVersion" - An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.  Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
  , V1ObjectMeta -> Maybe Text
v1ObjectMetaSelfLink :: !(Maybe Text) -- ^ "selfLink" - Deprecated: selfLink is a legacy read-only field that is no longer populated by the system.
  , V1ObjectMeta -> Maybe Text
v1ObjectMetaUid :: !(Maybe Text) -- ^ "uid" - UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.  Populated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids
  } deriving (Int -> V1ObjectMeta -> ShowS
[V1ObjectMeta] -> ShowS
V1ObjectMeta -> String
(Int -> V1ObjectMeta -> ShowS)
-> (V1ObjectMeta -> String)
-> ([V1ObjectMeta] -> ShowS)
-> Show V1ObjectMeta
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ObjectMeta -> ShowS
showsPrec :: Int -> V1ObjectMeta -> ShowS
$cshow :: V1ObjectMeta -> String
show :: V1ObjectMeta -> String
$cshowList :: [V1ObjectMeta] -> ShowS
showList :: [V1ObjectMeta] -> ShowS
P.Show, V1ObjectMeta -> V1ObjectMeta -> Bool
(V1ObjectMeta -> V1ObjectMeta -> Bool)
-> (V1ObjectMeta -> V1ObjectMeta -> Bool) -> Eq V1ObjectMeta
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ObjectMeta -> V1ObjectMeta -> Bool
== :: V1ObjectMeta -> V1ObjectMeta -> Bool
$c/= :: V1ObjectMeta -> V1ObjectMeta -> Bool
/= :: V1ObjectMeta -> V1ObjectMeta -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ObjectMeta
instance A.FromJSON V1ObjectMeta where
  parseJSON :: Value -> Parser V1ObjectMeta
parseJSON = String
-> (Object -> Parser V1ObjectMeta) -> Value -> Parser V1ObjectMeta
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ObjectMeta" ((Object -> Parser V1ObjectMeta) -> Value -> Parser V1ObjectMeta)
-> (Object -> Parser V1ObjectMeta) -> Value -> Parser V1ObjectMeta
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe (Map String Text)
-> Maybe DateTime
-> Maybe Integer
-> Maybe DateTime
-> Maybe [Text]
-> Maybe Text
-> Maybe Integer
-> Maybe (Map String Text)
-> Maybe [V1ManagedFieldsEntry]
-> Maybe Text
-> Maybe Text
-> Maybe [V1OwnerReference]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> V1ObjectMeta
V1ObjectMeta
      (Maybe (Map String Text)
 -> Maybe DateTime
 -> Maybe Integer
 -> Maybe DateTime
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe Integer
 -> Maybe (Map String Text)
 -> Maybe [V1ManagedFieldsEntry]
 -> Maybe Text
 -> Maybe Text
 -> Maybe [V1OwnerReference]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> V1ObjectMeta)
-> Parser (Maybe (Map String Text))
-> Parser
     (Maybe DateTime
      -> Maybe Integer
      -> Maybe DateTime
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Integer
      -> Maybe (Map String Text)
      -> Maybe [V1ManagedFieldsEntry]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1OwnerReference]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> V1ObjectMeta)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe (Map String Text))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"annotations")
      Parser
  (Maybe DateTime
   -> Maybe Integer
   -> Maybe DateTime
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Integer
   -> Maybe (Map String Text)
   -> Maybe [V1ManagedFieldsEntry]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1OwnerReference]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> V1ObjectMeta)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe Integer
      -> Maybe DateTime
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Integer
      -> Maybe (Map String Text)
      -> Maybe [V1ManagedFieldsEntry]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1OwnerReference]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> V1ObjectMeta)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"creationTimestamp")
      Parser
  (Maybe Integer
   -> Maybe DateTime
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Integer
   -> Maybe (Map String Text)
   -> Maybe [V1ManagedFieldsEntry]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1OwnerReference]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> V1ObjectMeta)
-> Parser (Maybe Integer)
-> Parser
     (Maybe DateTime
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Integer
      -> Maybe (Map String Text)
      -> Maybe [V1ManagedFieldsEntry]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1OwnerReference]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> V1ObjectMeta)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"deletionGracePeriodSeconds")
      Parser
  (Maybe DateTime
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Integer
   -> Maybe (Map String Text)
   -> Maybe [V1ManagedFieldsEntry]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1OwnerReference]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> V1ObjectMeta)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe [Text]
      -> Maybe Text
      -> Maybe Integer
      -> Maybe (Map String Text)
      -> Maybe [V1ManagedFieldsEntry]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1OwnerReference]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> V1ObjectMeta)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"deletionTimestamp")
      Parser
  (Maybe [Text]
   -> Maybe Text
   -> Maybe Integer
   -> Maybe (Map String Text)
   -> Maybe [V1ManagedFieldsEntry]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1OwnerReference]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> V1ObjectMeta)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Text
      -> Maybe Integer
      -> Maybe (Map String Text)
      -> Maybe [V1ManagedFieldsEntry]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1OwnerReference]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> V1ObjectMeta)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"finalizers")
      Parser
  (Maybe Text
   -> Maybe Integer
   -> Maybe (Map String Text)
   -> Maybe [V1ManagedFieldsEntry]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1OwnerReference]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> V1ObjectMeta)
-> Parser (Maybe Text)
-> Parser
     (Maybe Integer
      -> Maybe (Map String Text)
      -> Maybe [V1ManagedFieldsEntry]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1OwnerReference]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> V1ObjectMeta)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"generateName")
      Parser
  (Maybe Integer
   -> Maybe (Map String Text)
   -> Maybe [V1ManagedFieldsEntry]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1OwnerReference]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> V1ObjectMeta)
-> Parser (Maybe Integer)
-> Parser
     (Maybe (Map String Text)
      -> Maybe [V1ManagedFieldsEntry]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1OwnerReference]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> V1ObjectMeta)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"generation")
      Parser
  (Maybe (Map String Text)
   -> Maybe [V1ManagedFieldsEntry]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1OwnerReference]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> V1ObjectMeta)
-> Parser (Maybe (Map String Text))
-> Parser
     (Maybe [V1ManagedFieldsEntry]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1OwnerReference]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> V1ObjectMeta)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String Text))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"labels")
      Parser
  (Maybe [V1ManagedFieldsEntry]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1OwnerReference]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> V1ObjectMeta)
-> Parser (Maybe [V1ManagedFieldsEntry])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [V1OwnerReference]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> V1ObjectMeta)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1ManagedFieldsEntry])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"managedFields")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [V1OwnerReference]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> V1ObjectMeta)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [V1OwnerReference]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> V1ObjectMeta)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"name")
      Parser
  (Maybe Text
   -> Maybe [V1OwnerReference]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> V1ObjectMeta)
-> Parser (Maybe Text)
-> Parser
     (Maybe [V1OwnerReference]
      -> Maybe Text -> Maybe Text -> Maybe Text -> V1ObjectMeta)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"namespace")
      Parser
  (Maybe [V1OwnerReference]
   -> Maybe Text -> Maybe Text -> Maybe Text -> V1ObjectMeta)
-> Parser (Maybe [V1OwnerReference])
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> V1ObjectMeta)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1OwnerReference])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ownerReferences")
      Parser (Maybe Text -> Maybe Text -> Maybe Text -> V1ObjectMeta)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> V1ObjectMeta)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resourceVersion")
      Parser (Maybe Text -> Maybe Text -> V1ObjectMeta)
-> Parser (Maybe Text) -> Parser (Maybe Text -> V1ObjectMeta)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"selfLink")
      Parser (Maybe Text -> V1ObjectMeta)
-> Parser (Maybe Text) -> Parser V1ObjectMeta
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"uid")

-- | ToJSON V1ObjectMeta
instance A.ToJSON V1ObjectMeta where
  toJSON :: V1ObjectMeta -> Value
toJSON V1ObjectMeta {Maybe Integer
Maybe [Text]
Maybe [V1OwnerReference]
Maybe [V1ManagedFieldsEntry]
Maybe (Map String Text)
Maybe Text
Maybe DateTime
$sel:v1ObjectMetaAnnotations:V1ObjectMeta :: V1ObjectMeta -> Maybe (Map String Text)
$sel:v1ObjectMetaCreationTimestamp:V1ObjectMeta :: V1ObjectMeta -> Maybe DateTime
$sel:v1ObjectMetaDeletionGracePeriodSeconds:V1ObjectMeta :: V1ObjectMeta -> Maybe Integer
$sel:v1ObjectMetaDeletionTimestamp:V1ObjectMeta :: V1ObjectMeta -> Maybe DateTime
$sel:v1ObjectMetaFinalizers:V1ObjectMeta :: V1ObjectMeta -> Maybe [Text]
$sel:v1ObjectMetaGenerateName:V1ObjectMeta :: V1ObjectMeta -> Maybe Text
$sel:v1ObjectMetaGeneration:V1ObjectMeta :: V1ObjectMeta -> Maybe Integer
$sel:v1ObjectMetaLabels:V1ObjectMeta :: V1ObjectMeta -> Maybe (Map String Text)
$sel:v1ObjectMetaManagedFields:V1ObjectMeta :: V1ObjectMeta -> Maybe [V1ManagedFieldsEntry]
$sel:v1ObjectMetaName:V1ObjectMeta :: V1ObjectMeta -> Maybe Text
$sel:v1ObjectMetaNamespace:V1ObjectMeta :: V1ObjectMeta -> Maybe Text
$sel:v1ObjectMetaOwnerReferences:V1ObjectMeta :: V1ObjectMeta -> Maybe [V1OwnerReference]
$sel:v1ObjectMetaResourceVersion:V1ObjectMeta :: V1ObjectMeta -> Maybe Text
$sel:v1ObjectMetaSelfLink:V1ObjectMeta :: V1ObjectMeta -> Maybe Text
$sel:v1ObjectMetaUid:V1ObjectMeta :: V1ObjectMeta -> Maybe Text
v1ObjectMetaAnnotations :: Maybe (Map String Text)
v1ObjectMetaCreationTimestamp :: Maybe DateTime
v1ObjectMetaDeletionGracePeriodSeconds :: Maybe Integer
v1ObjectMetaDeletionTimestamp :: Maybe DateTime
v1ObjectMetaFinalizers :: Maybe [Text]
v1ObjectMetaGenerateName :: Maybe Text
v1ObjectMetaGeneration :: Maybe Integer
v1ObjectMetaLabels :: Maybe (Map String Text)
v1ObjectMetaManagedFields :: Maybe [V1ManagedFieldsEntry]
v1ObjectMetaName :: Maybe Text
v1ObjectMetaNamespace :: Maybe Text
v1ObjectMetaOwnerReferences :: Maybe [V1OwnerReference]
v1ObjectMetaResourceVersion :: Maybe Text
v1ObjectMetaSelfLink :: Maybe Text
v1ObjectMetaUid :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"annotations" Key -> Maybe (Map String Text) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Text)
v1ObjectMetaAnnotations
      , Key
"creationTimestamp" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1ObjectMetaCreationTimestamp
      , Key
"deletionGracePeriodSeconds" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1ObjectMetaDeletionGracePeriodSeconds
      , Key
"deletionTimestamp" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1ObjectMetaDeletionTimestamp
      , Key
"finalizers" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1ObjectMetaFinalizers
      , Key
"generateName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ObjectMetaGenerateName
      , Key
"generation" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1ObjectMetaGeneration
      , Key
"labels" Key -> Maybe (Map String Text) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Text)
v1ObjectMetaLabels
      , Key
"managedFields" Key -> Maybe [V1ManagedFieldsEntry] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1ManagedFieldsEntry]
v1ObjectMetaManagedFields
      , Key
"name" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ObjectMetaName
      , Key
"namespace" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ObjectMetaNamespace
      , Key
"ownerReferences" Key -> Maybe [V1OwnerReference] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1OwnerReference]
v1ObjectMetaOwnerReferences
      , Key
"resourceVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ObjectMetaResourceVersion
      , Key
"selfLink" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ObjectMetaSelfLink
      , Key
"uid" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ObjectMetaUid
      ]


-- | Construct a value of type 'V1ObjectMeta' (by applying it's required fields, if any)
mkV1ObjectMeta
  :: V1ObjectMeta
mkV1ObjectMeta :: V1ObjectMeta
mkV1ObjectMeta =
  V1ObjectMeta
  { $sel:v1ObjectMetaAnnotations:V1ObjectMeta :: Maybe (Map String Text)
v1ObjectMetaAnnotations = Maybe (Map String Text)
forall a. Maybe a
Nothing
  , $sel:v1ObjectMetaCreationTimestamp:V1ObjectMeta :: Maybe DateTime
v1ObjectMetaCreationTimestamp = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1ObjectMetaDeletionGracePeriodSeconds:V1ObjectMeta :: Maybe Integer
v1ObjectMetaDeletionGracePeriodSeconds = Maybe Integer
forall a. Maybe a
Nothing
  , $sel:v1ObjectMetaDeletionTimestamp:V1ObjectMeta :: Maybe DateTime
v1ObjectMetaDeletionTimestamp = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1ObjectMetaFinalizers:V1ObjectMeta :: Maybe [Text]
v1ObjectMetaFinalizers = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1ObjectMetaGenerateName:V1ObjectMeta :: Maybe Text
v1ObjectMetaGenerateName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ObjectMetaGeneration:V1ObjectMeta :: Maybe Integer
v1ObjectMetaGeneration = Maybe Integer
forall a. Maybe a
Nothing
  , $sel:v1ObjectMetaLabels:V1ObjectMeta :: Maybe (Map String Text)
v1ObjectMetaLabels = Maybe (Map String Text)
forall a. Maybe a
Nothing
  , $sel:v1ObjectMetaManagedFields:V1ObjectMeta :: Maybe [V1ManagedFieldsEntry]
v1ObjectMetaManagedFields = Maybe [V1ManagedFieldsEntry]
forall a. Maybe a
Nothing
  , $sel:v1ObjectMetaName:V1ObjectMeta :: Maybe Text
v1ObjectMetaName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ObjectMetaNamespace:V1ObjectMeta :: Maybe Text
v1ObjectMetaNamespace = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ObjectMetaOwnerReferences:V1ObjectMeta :: Maybe [V1OwnerReference]
v1ObjectMetaOwnerReferences = Maybe [V1OwnerReference]
forall a. Maybe a
Nothing
  , $sel:v1ObjectMetaResourceVersion:V1ObjectMeta :: Maybe Text
v1ObjectMetaResourceVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ObjectMetaSelfLink:V1ObjectMeta :: Maybe Text
v1ObjectMetaSelfLink = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ObjectMetaUid:V1ObjectMeta :: Maybe Text
v1ObjectMetaUid = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1ObjectReference
-- | V1ObjectReference
-- ObjectReference contains enough information to let you inspect or modify the referred object.
data V1ObjectReference = V1ObjectReference
  { V1ObjectReference -> Maybe Text
v1ObjectReferenceApiVersion :: !(Maybe Text) -- ^ "apiVersion" - API version of the referent.
  , V1ObjectReference -> Maybe Text
v1ObjectReferenceFieldPath :: !(Maybe Text) -- ^ "fieldPath" - If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: \&quot;spec.containers{name}\&quot; (where \&quot;name\&quot; refers to the name of the container that triggered the event) or if no container name is specified \&quot;spec.containers[2]\&quot; (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object.
  , V1ObjectReference -> Maybe Text
v1ObjectReferenceKind :: !(Maybe Text) -- ^ "kind" - Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1ObjectReference -> Maybe Text
v1ObjectReferenceName :: !(Maybe Text) -- ^ "name" - Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  , V1ObjectReference -> Maybe Text
v1ObjectReferenceNamespace :: !(Maybe Text) -- ^ "namespace" - Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
  , V1ObjectReference -> Maybe Text
v1ObjectReferenceResourceVersion :: !(Maybe Text) -- ^ "resourceVersion" - Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
  , V1ObjectReference -> Maybe Text
v1ObjectReferenceUid :: !(Maybe Text) -- ^ "uid" - UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
  } deriving (Int -> V1ObjectReference -> ShowS
[V1ObjectReference] -> ShowS
V1ObjectReference -> String
(Int -> V1ObjectReference -> ShowS)
-> (V1ObjectReference -> String)
-> ([V1ObjectReference] -> ShowS)
-> Show V1ObjectReference
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ObjectReference -> ShowS
showsPrec :: Int -> V1ObjectReference -> ShowS
$cshow :: V1ObjectReference -> String
show :: V1ObjectReference -> String
$cshowList :: [V1ObjectReference] -> ShowS
showList :: [V1ObjectReference] -> ShowS
P.Show, V1ObjectReference -> V1ObjectReference -> Bool
(V1ObjectReference -> V1ObjectReference -> Bool)
-> (V1ObjectReference -> V1ObjectReference -> Bool)
-> Eq V1ObjectReference
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ObjectReference -> V1ObjectReference -> Bool
== :: V1ObjectReference -> V1ObjectReference -> Bool
$c/= :: V1ObjectReference -> V1ObjectReference -> Bool
/= :: V1ObjectReference -> V1ObjectReference -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ObjectReference
instance A.FromJSON V1ObjectReference where
  parseJSON :: Value -> Parser V1ObjectReference
parseJSON = String
-> (Object -> Parser V1ObjectReference)
-> Value
-> Parser V1ObjectReference
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ObjectReference" ((Object -> Parser V1ObjectReference)
 -> Value -> Parser V1ObjectReference)
-> (Object -> Parser V1ObjectReference)
-> Value
-> Parser V1ObjectReference
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> V1ObjectReference
V1ObjectReference
      (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> V1ObjectReference)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> V1ObjectReference)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> V1ObjectReference)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> V1ObjectReference)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fieldPath")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> V1ObjectReference)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Maybe Text -> V1ObjectReference)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe Text
   -> Maybe Text -> Maybe Text -> Maybe Text -> V1ObjectReference)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> Maybe Text -> V1ObjectReference)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"name")
      Parser
  (Maybe Text -> Maybe Text -> Maybe Text -> V1ObjectReference)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> V1ObjectReference)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"namespace")
      Parser (Maybe Text -> Maybe Text -> V1ObjectReference)
-> Parser (Maybe Text) -> Parser (Maybe Text -> V1ObjectReference)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resourceVersion")
      Parser (Maybe Text -> V1ObjectReference)
-> Parser (Maybe Text) -> Parser V1ObjectReference
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"uid")

-- | ToJSON V1ObjectReference
instance A.ToJSON V1ObjectReference where
  toJSON :: V1ObjectReference -> Value
toJSON V1ObjectReference {Maybe Text
$sel:v1ObjectReferenceApiVersion:V1ObjectReference :: V1ObjectReference -> Maybe Text
$sel:v1ObjectReferenceFieldPath:V1ObjectReference :: V1ObjectReference -> Maybe Text
$sel:v1ObjectReferenceKind:V1ObjectReference :: V1ObjectReference -> Maybe Text
$sel:v1ObjectReferenceName:V1ObjectReference :: V1ObjectReference -> Maybe Text
$sel:v1ObjectReferenceNamespace:V1ObjectReference :: V1ObjectReference -> Maybe Text
$sel:v1ObjectReferenceResourceVersion:V1ObjectReference :: V1ObjectReference -> Maybe Text
$sel:v1ObjectReferenceUid:V1ObjectReference :: V1ObjectReference -> Maybe Text
v1ObjectReferenceApiVersion :: Maybe Text
v1ObjectReferenceFieldPath :: Maybe Text
v1ObjectReferenceKind :: Maybe Text
v1ObjectReferenceName :: Maybe Text
v1ObjectReferenceNamespace :: Maybe Text
v1ObjectReferenceResourceVersion :: Maybe Text
v1ObjectReferenceUid :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ObjectReferenceApiVersion
      , Key
"fieldPath" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ObjectReferenceFieldPath
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ObjectReferenceKind
      , Key
"name" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ObjectReferenceName
      , Key
"namespace" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ObjectReferenceNamespace
      , Key
"resourceVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ObjectReferenceResourceVersion
      , Key
"uid" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ObjectReferenceUid
      ]


-- | Construct a value of type 'V1ObjectReference' (by applying it's required fields, if any)
mkV1ObjectReference
  :: V1ObjectReference
mkV1ObjectReference :: V1ObjectReference
mkV1ObjectReference =
  V1ObjectReference
  { $sel:v1ObjectReferenceApiVersion:V1ObjectReference :: Maybe Text
v1ObjectReferenceApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ObjectReferenceFieldPath:V1ObjectReference :: Maybe Text
v1ObjectReferenceFieldPath = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ObjectReferenceKind:V1ObjectReference :: Maybe Text
v1ObjectReferenceKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ObjectReferenceName:V1ObjectReference :: Maybe Text
v1ObjectReferenceName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ObjectReferenceNamespace:V1ObjectReference :: Maybe Text
v1ObjectReferenceNamespace = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ObjectReferenceResourceVersion:V1ObjectReference :: Maybe Text
v1ObjectReferenceResourceVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ObjectReferenceUid:V1ObjectReference :: Maybe Text
v1ObjectReferenceUid = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1Overhead
-- | V1Overhead
-- Overhead structure represents the resource overhead associated with running a pod.
data V1Overhead = V1Overhead
  { V1Overhead -> Maybe (Map String Quantity)
v1OverheadPodFixed :: !(Maybe (Map.Map String Quantity)) -- ^ "podFixed" - podFixed represents the fixed resource overhead associated with running a pod.
  } deriving (Int -> V1Overhead -> ShowS
[V1Overhead] -> ShowS
V1Overhead -> String
(Int -> V1Overhead -> ShowS)
-> (V1Overhead -> String)
-> ([V1Overhead] -> ShowS)
-> Show V1Overhead
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1Overhead -> ShowS
showsPrec :: Int -> V1Overhead -> ShowS
$cshow :: V1Overhead -> String
show :: V1Overhead -> String
$cshowList :: [V1Overhead] -> ShowS
showList :: [V1Overhead] -> ShowS
P.Show, V1Overhead -> V1Overhead -> Bool
(V1Overhead -> V1Overhead -> Bool)
-> (V1Overhead -> V1Overhead -> Bool) -> Eq V1Overhead
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1Overhead -> V1Overhead -> Bool
== :: V1Overhead -> V1Overhead -> Bool
$c/= :: V1Overhead -> V1Overhead -> Bool
/= :: V1Overhead -> V1Overhead -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1Overhead
instance A.FromJSON V1Overhead where
  parseJSON :: Value -> Parser V1Overhead
parseJSON = String
-> (Object -> Parser V1Overhead) -> Value -> Parser V1Overhead
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1Overhead" ((Object -> Parser V1Overhead) -> Value -> Parser V1Overhead)
-> (Object -> Parser V1Overhead) -> Value -> Parser V1Overhead
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe (Map String Quantity) -> V1Overhead
V1Overhead
      (Maybe (Map String Quantity) -> V1Overhead)
-> Parser (Maybe (Map String Quantity)) -> Parser V1Overhead
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe (Map String Quantity))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"podFixed")

-- | ToJSON V1Overhead
instance A.ToJSON V1Overhead where
  toJSON :: V1Overhead -> Value
toJSON V1Overhead {Maybe (Map String Quantity)
$sel:v1OverheadPodFixed:V1Overhead :: V1Overhead -> Maybe (Map String Quantity)
v1OverheadPodFixed :: Maybe (Map String Quantity)
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"podFixed" Key -> Maybe (Map String Quantity) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Quantity)
v1OverheadPodFixed
      ]


-- | Construct a value of type 'V1Overhead' (by applying it's required fields, if any)
mkV1Overhead
  :: V1Overhead
mkV1Overhead :: V1Overhead
mkV1Overhead =
  V1Overhead
  { $sel:v1OverheadPodFixed:V1Overhead :: Maybe (Map String Quantity)
v1OverheadPodFixed = Maybe (Map String Quantity)
forall a. Maybe a
Nothing
  }

-- ** V1OwnerReference
-- | V1OwnerReference
-- OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.
data V1OwnerReference = V1OwnerReference
  { V1OwnerReference -> Text
v1OwnerReferenceApiVersion :: !(Text) -- ^ /Required/ "apiVersion" - API version of the referent.
  , V1OwnerReference -> Maybe Bool
v1OwnerReferenceBlockOwnerDeletion :: !(Maybe Bool) -- ^ "blockOwnerDeletion" - If true, AND if the owner has the \&quot;foregroundDeletion\&quot; finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion for how the garbage collector interacts with this field and enforces the foreground deletion. Defaults to false. To set this field, a user needs \&quot;delete\&quot; permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.
  , V1OwnerReference -> Maybe Bool
v1OwnerReferenceController :: !(Maybe Bool) -- ^ "controller" - If true, this reference points to the managing controller.
  , V1OwnerReference -> Text
v1OwnerReferenceKind :: !(Text) -- ^ /Required/ "kind" - Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1OwnerReference -> Text
v1OwnerReferenceName :: !(Text) -- ^ /Required/ "name" - Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names
  , V1OwnerReference -> Text
v1OwnerReferenceUid :: !(Text) -- ^ /Required/ "uid" - UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids
  } deriving (Int -> V1OwnerReference -> ShowS
[V1OwnerReference] -> ShowS
V1OwnerReference -> String
(Int -> V1OwnerReference -> ShowS)
-> (V1OwnerReference -> String)
-> ([V1OwnerReference] -> ShowS)
-> Show V1OwnerReference
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1OwnerReference -> ShowS
showsPrec :: Int -> V1OwnerReference -> ShowS
$cshow :: V1OwnerReference -> String
show :: V1OwnerReference -> String
$cshowList :: [V1OwnerReference] -> ShowS
showList :: [V1OwnerReference] -> ShowS
P.Show, V1OwnerReference -> V1OwnerReference -> Bool
(V1OwnerReference -> V1OwnerReference -> Bool)
-> (V1OwnerReference -> V1OwnerReference -> Bool)
-> Eq V1OwnerReference
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1OwnerReference -> V1OwnerReference -> Bool
== :: V1OwnerReference -> V1OwnerReference -> Bool
$c/= :: V1OwnerReference -> V1OwnerReference -> Bool
/= :: V1OwnerReference -> V1OwnerReference -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1OwnerReference
instance A.FromJSON V1OwnerReference where
  parseJSON :: Value -> Parser V1OwnerReference
parseJSON = String
-> (Object -> Parser V1OwnerReference)
-> Value
-> Parser V1OwnerReference
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1OwnerReference" ((Object -> Parser V1OwnerReference)
 -> Value -> Parser V1OwnerReference)
-> (Object -> Parser V1OwnerReference)
-> Value
-> Parser V1OwnerReference
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text
-> Maybe Bool
-> Maybe Bool
-> Text
-> Text
-> Text
-> V1OwnerReference
V1OwnerReference
      (Text
 -> Maybe Bool
 -> Maybe Bool
 -> Text
 -> Text
 -> Text
 -> V1OwnerReference)
-> Parser Text
-> Parser
     (Maybe Bool
      -> Maybe Bool -> Text -> Text -> Text -> V1OwnerReference)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"apiVersion")
      Parser
  (Maybe Bool
   -> Maybe Bool -> Text -> Text -> Text -> V1OwnerReference)
-> Parser (Maybe Bool)
-> Parser (Maybe Bool -> Text -> Text -> Text -> V1OwnerReference)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"blockOwnerDeletion")
      Parser (Maybe Bool -> Text -> Text -> Text -> V1OwnerReference)
-> Parser (Maybe Bool)
-> Parser (Text -> Text -> Text -> V1OwnerReference)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"controller")
      Parser (Text -> Text -> Text -> V1OwnerReference)
-> Parser Text -> Parser (Text -> Text -> V1OwnerReference)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"kind")
      Parser (Text -> Text -> V1OwnerReference)
-> Parser Text -> Parser (Text -> V1OwnerReference)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser (Text -> V1OwnerReference)
-> Parser Text -> Parser V1OwnerReference
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"uid")

-- | ToJSON V1OwnerReference
instance A.ToJSON V1OwnerReference where
  toJSON :: V1OwnerReference -> Value
toJSON V1OwnerReference {Maybe Bool
Text
$sel:v1OwnerReferenceApiVersion:V1OwnerReference :: V1OwnerReference -> Text
$sel:v1OwnerReferenceBlockOwnerDeletion:V1OwnerReference :: V1OwnerReference -> Maybe Bool
$sel:v1OwnerReferenceController:V1OwnerReference :: V1OwnerReference -> Maybe Bool
$sel:v1OwnerReferenceKind:V1OwnerReference :: V1OwnerReference -> Text
$sel:v1OwnerReferenceName:V1OwnerReference :: V1OwnerReference -> Text
$sel:v1OwnerReferenceUid:V1OwnerReference :: V1OwnerReference -> Text
v1OwnerReferenceApiVersion :: Text
v1OwnerReferenceBlockOwnerDeletion :: Maybe Bool
v1OwnerReferenceController :: Maybe Bool
v1OwnerReferenceKind :: Text
v1OwnerReferenceName :: Text
v1OwnerReferenceUid :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1OwnerReferenceApiVersion
      , Key
"blockOwnerDeletion" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1OwnerReferenceBlockOwnerDeletion
      , Key
"controller" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1OwnerReferenceController
      , Key
"kind" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1OwnerReferenceKind
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1OwnerReferenceName
      , Key
"uid" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1OwnerReferenceUid
      ]


-- | Construct a value of type 'V1OwnerReference' (by applying it's required fields, if any)
mkV1OwnerReference
  :: Text -- ^ 'v1OwnerReferenceApiVersion': API version of the referent.
  -> Text -- ^ 'v1OwnerReferenceKind': Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  -> Text -- ^ 'v1OwnerReferenceName': Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names
  -> Text -- ^ 'v1OwnerReferenceUid': UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids
  -> V1OwnerReference
mkV1OwnerReference :: Text -> Text -> Text -> Text -> V1OwnerReference
mkV1OwnerReference Text
v1OwnerReferenceApiVersion Text
v1OwnerReferenceKind Text
v1OwnerReferenceName Text
v1OwnerReferenceUid =
  V1OwnerReference
  { Text
$sel:v1OwnerReferenceApiVersion:V1OwnerReference :: Text
v1OwnerReferenceApiVersion :: Text
v1OwnerReferenceApiVersion
  , $sel:v1OwnerReferenceBlockOwnerDeletion:V1OwnerReference :: Maybe Bool
v1OwnerReferenceBlockOwnerDeletion = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1OwnerReferenceController:V1OwnerReference :: Maybe Bool
v1OwnerReferenceController = Maybe Bool
forall a. Maybe a
Nothing
  , Text
$sel:v1OwnerReferenceKind:V1OwnerReference :: Text
v1OwnerReferenceKind :: Text
v1OwnerReferenceKind
  , Text
$sel:v1OwnerReferenceName:V1OwnerReference :: Text
v1OwnerReferenceName :: Text
v1OwnerReferenceName
  , Text
$sel:v1OwnerReferenceUid:V1OwnerReference :: Text
v1OwnerReferenceUid :: Text
v1OwnerReferenceUid
  }

-- ** V1ParamKind
-- | V1ParamKind
-- ParamKind is a tuple of Group Kind and Version.
data V1ParamKind = V1ParamKind
  { V1ParamKind -> Maybe Text
v1ParamKindApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion is the API group version the resources belong to. In format of \&quot;group/version\&quot;. Required.
  , V1ParamKind -> Maybe Text
v1ParamKindKind :: !(Maybe Text) -- ^ "kind" - Kind is the API kind the resources belong to. Required.
  } deriving (Int -> V1ParamKind -> ShowS
[V1ParamKind] -> ShowS
V1ParamKind -> String
(Int -> V1ParamKind -> ShowS)
-> (V1ParamKind -> String)
-> ([V1ParamKind] -> ShowS)
-> Show V1ParamKind
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ParamKind -> ShowS
showsPrec :: Int -> V1ParamKind -> ShowS
$cshow :: V1ParamKind -> String
show :: V1ParamKind -> String
$cshowList :: [V1ParamKind] -> ShowS
showList :: [V1ParamKind] -> ShowS
P.Show, V1ParamKind -> V1ParamKind -> Bool
(V1ParamKind -> V1ParamKind -> Bool)
-> (V1ParamKind -> V1ParamKind -> Bool) -> Eq V1ParamKind
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ParamKind -> V1ParamKind -> Bool
== :: V1ParamKind -> V1ParamKind -> Bool
$c/= :: V1ParamKind -> V1ParamKind -> Bool
/= :: V1ParamKind -> V1ParamKind -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ParamKind
instance A.FromJSON V1ParamKind where
  parseJSON :: Value -> Parser V1ParamKind
parseJSON = String
-> (Object -> Parser V1ParamKind) -> Value -> Parser V1ParamKind
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ParamKind" ((Object -> Parser V1ParamKind) -> Value -> Parser V1ParamKind)
-> (Object -> Parser V1ParamKind) -> Value -> Parser V1ParamKind
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Maybe Text -> V1ParamKind
V1ParamKind
      (Maybe Text -> Maybe Text -> V1ParamKind)
-> Parser (Maybe Text) -> Parser (Maybe Text -> V1ParamKind)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser (Maybe Text -> V1ParamKind)
-> Parser (Maybe Text) -> Parser V1ParamKind
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")

-- | ToJSON V1ParamKind
instance A.ToJSON V1ParamKind where
  toJSON :: V1ParamKind -> Value
toJSON V1ParamKind {Maybe Text
$sel:v1ParamKindApiVersion:V1ParamKind :: V1ParamKind -> Maybe Text
$sel:v1ParamKindKind:V1ParamKind :: V1ParamKind -> Maybe Text
v1ParamKindApiVersion :: Maybe Text
v1ParamKindKind :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ParamKindApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ParamKindKind
      ]


-- | Construct a value of type 'V1ParamKind' (by applying it's required fields, if any)
mkV1ParamKind
  :: V1ParamKind
mkV1ParamKind :: V1ParamKind
mkV1ParamKind =
  V1ParamKind
  { $sel:v1ParamKindApiVersion:V1ParamKind :: Maybe Text
v1ParamKindApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ParamKindKind:V1ParamKind :: Maybe Text
v1ParamKindKind = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1ParamRef
-- | V1ParamRef
-- ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding.
data V1ParamRef = V1ParamRef
  { V1ParamRef -> Maybe Text
v1ParamRefName :: !(Maybe Text) -- ^ "name" - name is the name of the resource being referenced.  One of &#x60;name&#x60; or &#x60;selector&#x60; must be set, but &#x60;name&#x60; and &#x60;selector&#x60; are mutually exclusive properties. If one is set, the other must be unset.  A single parameter used for all admission requests can be configured by setting the &#x60;name&#x60; field, leaving &#x60;selector&#x60; blank, and setting namespace if &#x60;paramKind&#x60; is namespace-scoped.
  , V1ParamRef -> Maybe Text
v1ParamRefNamespace :: !(Maybe Text) -- ^ "namespace" - namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both &#x60;name&#x60; and &#x60;selector&#x60; fields.  A per-namespace parameter may be used by specifying a namespace-scoped &#x60;paramKind&#x60; in the policy and leaving this field empty.  - If &#x60;paramKind&#x60; is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error.  - If &#x60;paramKind&#x60; is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error.
  , V1ParamRef -> Maybe Text
v1ParamRefParameterNotFoundAction :: !(Maybe Text) -- ^ "parameterNotFoundAction" - &#x60;parameterNotFoundAction&#x60; controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to &#x60;Allow&#x60;, then no matched parameters will be treated as successful validation by the binding. If set to &#x60;Deny&#x60;, then no matched parameters will be subject to the &#x60;failurePolicy&#x60; of the policy.  Allowed values are &#x60;Allow&#x60; or &#x60;Deny&#x60;  Required
  , V1ParamRef -> Maybe V1LabelSelector
v1ParamRefSelector :: !(Maybe V1LabelSelector) -- ^ "selector"
  } deriving (Int -> V1ParamRef -> ShowS
[V1ParamRef] -> ShowS
V1ParamRef -> String
(Int -> V1ParamRef -> ShowS)
-> (V1ParamRef -> String)
-> ([V1ParamRef] -> ShowS)
-> Show V1ParamRef
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ParamRef -> ShowS
showsPrec :: Int -> V1ParamRef -> ShowS
$cshow :: V1ParamRef -> String
show :: V1ParamRef -> String
$cshowList :: [V1ParamRef] -> ShowS
showList :: [V1ParamRef] -> ShowS
P.Show, V1ParamRef -> V1ParamRef -> Bool
(V1ParamRef -> V1ParamRef -> Bool)
-> (V1ParamRef -> V1ParamRef -> Bool) -> Eq V1ParamRef
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ParamRef -> V1ParamRef -> Bool
== :: V1ParamRef -> V1ParamRef -> Bool
$c/= :: V1ParamRef -> V1ParamRef -> Bool
/= :: V1ParamRef -> V1ParamRef -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ParamRef
instance A.FromJSON V1ParamRef where
  parseJSON :: Value -> Parser V1ParamRef
parseJSON = String
-> (Object -> Parser V1ParamRef) -> Value -> Parser V1ParamRef
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ParamRef" ((Object -> Parser V1ParamRef) -> Value -> Parser V1ParamRef)
-> (Object -> Parser V1ParamRef) -> Value -> Parser V1ParamRef
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text -> Maybe Text -> Maybe V1LabelSelector -> V1ParamRef
V1ParamRef
      (Maybe Text
 -> Maybe Text -> Maybe Text -> Maybe V1LabelSelector -> V1ParamRef)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> Maybe V1LabelSelector -> V1ParamRef)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"name")
      Parser
  (Maybe Text -> Maybe Text -> Maybe V1LabelSelector -> V1ParamRef)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe V1LabelSelector -> V1ParamRef)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"namespace")
      Parser (Maybe Text -> Maybe V1LabelSelector -> V1ParamRef)
-> Parser (Maybe Text)
-> Parser (Maybe V1LabelSelector -> V1ParamRef)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"parameterNotFoundAction")
      Parser (Maybe V1LabelSelector -> V1ParamRef)
-> Parser (Maybe V1LabelSelector) -> Parser V1ParamRef
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LabelSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"selector")

-- | ToJSON V1ParamRef
instance A.ToJSON V1ParamRef where
  toJSON :: V1ParamRef -> Value
toJSON V1ParamRef {Maybe Text
Maybe V1LabelSelector
$sel:v1ParamRefName:V1ParamRef :: V1ParamRef -> Maybe Text
$sel:v1ParamRefNamespace:V1ParamRef :: V1ParamRef -> Maybe Text
$sel:v1ParamRefParameterNotFoundAction:V1ParamRef :: V1ParamRef -> Maybe Text
$sel:v1ParamRefSelector:V1ParamRef :: V1ParamRef -> Maybe V1LabelSelector
v1ParamRefName :: Maybe Text
v1ParamRefNamespace :: Maybe Text
v1ParamRefParameterNotFoundAction :: Maybe Text
v1ParamRefSelector :: Maybe V1LabelSelector
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"name" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ParamRefName
      , Key
"namespace" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ParamRefNamespace
      , Key
"parameterNotFoundAction" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ParamRefParameterNotFoundAction
      , Key
"selector" Key -> Maybe V1LabelSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LabelSelector
v1ParamRefSelector
      ]


-- | Construct a value of type 'V1ParamRef' (by applying it's required fields, if any)
mkV1ParamRef
  :: V1ParamRef
mkV1ParamRef :: V1ParamRef
mkV1ParamRef =
  V1ParamRef
  { $sel:v1ParamRefName:V1ParamRef :: Maybe Text
v1ParamRefName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ParamRefNamespace:V1ParamRef :: Maybe Text
v1ParamRefNamespace = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ParamRefParameterNotFoundAction:V1ParamRef :: Maybe Text
v1ParamRefParameterNotFoundAction = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ParamRefSelector:V1ParamRef :: Maybe V1LabelSelector
v1ParamRefSelector = Maybe V1LabelSelector
forall a. Maybe a
Nothing
  }

-- ** V1PersistentVolume
-- | V1PersistentVolume
-- PersistentVolume (PV) is a storage resource provisioned by an administrator. It is analogous to a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes
data V1PersistentVolume = V1PersistentVolume
  { V1PersistentVolume -> Maybe Text
v1PersistentVolumeApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1PersistentVolume -> Maybe Text
v1PersistentVolumeKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1PersistentVolume -> Maybe V1ObjectMeta
v1PersistentVolumeMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1PersistentVolume -> Maybe V1PersistentVolumeSpec
v1PersistentVolumeSpec :: !(Maybe V1PersistentVolumeSpec) -- ^ "spec"
  , V1PersistentVolume -> Maybe V1PersistentVolumeStatus
v1PersistentVolumeStatus :: !(Maybe V1PersistentVolumeStatus) -- ^ "status"
  } deriving (Int -> V1PersistentVolume -> ShowS
[V1PersistentVolume] -> ShowS
V1PersistentVolume -> String
(Int -> V1PersistentVolume -> ShowS)
-> (V1PersistentVolume -> String)
-> ([V1PersistentVolume] -> ShowS)
-> Show V1PersistentVolume
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PersistentVolume -> ShowS
showsPrec :: Int -> V1PersistentVolume -> ShowS
$cshow :: V1PersistentVolume -> String
show :: V1PersistentVolume -> String
$cshowList :: [V1PersistentVolume] -> ShowS
showList :: [V1PersistentVolume] -> ShowS
P.Show, V1PersistentVolume -> V1PersistentVolume -> Bool
(V1PersistentVolume -> V1PersistentVolume -> Bool)
-> (V1PersistentVolume -> V1PersistentVolume -> Bool)
-> Eq V1PersistentVolume
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PersistentVolume -> V1PersistentVolume -> Bool
== :: V1PersistentVolume -> V1PersistentVolume -> Bool
$c/= :: V1PersistentVolume -> V1PersistentVolume -> Bool
/= :: V1PersistentVolume -> V1PersistentVolume -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PersistentVolume
instance A.FromJSON V1PersistentVolume where
  parseJSON :: Value -> Parser V1PersistentVolume
parseJSON = String
-> (Object -> Parser V1PersistentVolume)
-> Value
-> Parser V1PersistentVolume
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PersistentVolume" ((Object -> Parser V1PersistentVolume)
 -> Value -> Parser V1PersistentVolume)
-> (Object -> Parser V1PersistentVolume)
-> Value
-> Parser V1PersistentVolume
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1PersistentVolumeSpec
-> Maybe V1PersistentVolumeStatus
-> V1PersistentVolume
V1PersistentVolume
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1PersistentVolumeSpec
 -> Maybe V1PersistentVolumeStatus
 -> V1PersistentVolume)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1PersistentVolumeSpec
      -> Maybe V1PersistentVolumeStatus
      -> V1PersistentVolume)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1PersistentVolumeSpec
   -> Maybe V1PersistentVolumeStatus
   -> V1PersistentVolume)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1PersistentVolumeSpec
      -> Maybe V1PersistentVolumeStatus
      -> V1PersistentVolume)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1PersistentVolumeSpec
   -> Maybe V1PersistentVolumeStatus
   -> V1PersistentVolume)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe V1PersistentVolumeSpec
      -> Maybe V1PersistentVolumeStatus -> V1PersistentVolume)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (Maybe V1PersistentVolumeSpec
   -> Maybe V1PersistentVolumeStatus -> V1PersistentVolume)
-> Parser (Maybe V1PersistentVolumeSpec)
-> Parser (Maybe V1PersistentVolumeStatus -> V1PersistentVolume)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1PersistentVolumeSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")
      Parser (Maybe V1PersistentVolumeStatus -> V1PersistentVolume)
-> Parser (Maybe V1PersistentVolumeStatus)
-> Parser V1PersistentVolume
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1PersistentVolumeStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1PersistentVolume
instance A.ToJSON V1PersistentVolume where
  toJSON :: V1PersistentVolume -> Value
toJSON V1PersistentVolume {Maybe Text
Maybe V1PersistentVolumeStatus
Maybe V1PersistentVolumeSpec
Maybe V1ObjectMeta
$sel:v1PersistentVolumeApiVersion:V1PersistentVolume :: V1PersistentVolume -> Maybe Text
$sel:v1PersistentVolumeKind:V1PersistentVolume :: V1PersistentVolume -> Maybe Text
$sel:v1PersistentVolumeMetadata:V1PersistentVolume :: V1PersistentVolume -> Maybe V1ObjectMeta
$sel:v1PersistentVolumeSpec:V1PersistentVolume :: V1PersistentVolume -> Maybe V1PersistentVolumeSpec
$sel:v1PersistentVolumeStatus:V1PersistentVolume :: V1PersistentVolume -> Maybe V1PersistentVolumeStatus
v1PersistentVolumeApiVersion :: Maybe Text
v1PersistentVolumeKind :: Maybe Text
v1PersistentVolumeMetadata :: Maybe V1ObjectMeta
v1PersistentVolumeSpec :: Maybe V1PersistentVolumeSpec
v1PersistentVolumeStatus :: Maybe V1PersistentVolumeStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PersistentVolumeApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PersistentVolumeKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1PersistentVolumeMetadata
      , Key
"spec" Key -> Maybe V1PersistentVolumeSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1PersistentVolumeSpec
v1PersistentVolumeSpec
      , Key
"status" Key -> Maybe V1PersistentVolumeStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1PersistentVolumeStatus
v1PersistentVolumeStatus
      ]


-- | Construct a value of type 'V1PersistentVolume' (by applying it's required fields, if any)
mkV1PersistentVolume
  :: V1PersistentVolume
mkV1PersistentVolume :: V1PersistentVolume
mkV1PersistentVolume =
  V1PersistentVolume
  { $sel:v1PersistentVolumeApiVersion:V1PersistentVolume :: Maybe Text
v1PersistentVolumeApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeKind:V1PersistentVolume :: Maybe Text
v1PersistentVolumeKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeMetadata:V1PersistentVolume :: Maybe V1ObjectMeta
v1PersistentVolumeMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeSpec:V1PersistentVolume :: Maybe V1PersistentVolumeSpec
v1PersistentVolumeSpec = Maybe V1PersistentVolumeSpec
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeStatus:V1PersistentVolume :: Maybe V1PersistentVolumeStatus
v1PersistentVolumeStatus = Maybe V1PersistentVolumeStatus
forall a. Maybe a
Nothing
  }

-- ** V1PersistentVolumeClaim
-- | V1PersistentVolumeClaim
-- PersistentVolumeClaim is a user's request for and claim to a persistent volume
data V1PersistentVolumeClaim = V1PersistentVolumeClaim
  { V1PersistentVolumeClaim -> Maybe Text
v1PersistentVolumeClaimApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1PersistentVolumeClaim -> Maybe Text
v1PersistentVolumeClaimKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1PersistentVolumeClaim -> Maybe V1ObjectMeta
v1PersistentVolumeClaimMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1PersistentVolumeClaim -> Maybe V1PersistentVolumeClaimSpec
v1PersistentVolumeClaimSpec :: !(Maybe V1PersistentVolumeClaimSpec) -- ^ "spec"
  , V1PersistentVolumeClaim -> Maybe V1PersistentVolumeClaimStatus
v1PersistentVolumeClaimStatus :: !(Maybe V1PersistentVolumeClaimStatus) -- ^ "status"
  } deriving (Int -> V1PersistentVolumeClaim -> ShowS
[V1PersistentVolumeClaim] -> ShowS
V1PersistentVolumeClaim -> String
(Int -> V1PersistentVolumeClaim -> ShowS)
-> (V1PersistentVolumeClaim -> String)
-> ([V1PersistentVolumeClaim] -> ShowS)
-> Show V1PersistentVolumeClaim
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PersistentVolumeClaim -> ShowS
showsPrec :: Int -> V1PersistentVolumeClaim -> ShowS
$cshow :: V1PersistentVolumeClaim -> String
show :: V1PersistentVolumeClaim -> String
$cshowList :: [V1PersistentVolumeClaim] -> ShowS
showList :: [V1PersistentVolumeClaim] -> ShowS
P.Show, V1PersistentVolumeClaim -> V1PersistentVolumeClaim -> Bool
(V1PersistentVolumeClaim -> V1PersistentVolumeClaim -> Bool)
-> (V1PersistentVolumeClaim -> V1PersistentVolumeClaim -> Bool)
-> Eq V1PersistentVolumeClaim
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PersistentVolumeClaim -> V1PersistentVolumeClaim -> Bool
== :: V1PersistentVolumeClaim -> V1PersistentVolumeClaim -> Bool
$c/= :: V1PersistentVolumeClaim -> V1PersistentVolumeClaim -> Bool
/= :: V1PersistentVolumeClaim -> V1PersistentVolumeClaim -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PersistentVolumeClaim
instance A.FromJSON V1PersistentVolumeClaim where
  parseJSON :: Value -> Parser V1PersistentVolumeClaim
parseJSON = String
-> (Object -> Parser V1PersistentVolumeClaim)
-> Value
-> Parser V1PersistentVolumeClaim
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PersistentVolumeClaim" ((Object -> Parser V1PersistentVolumeClaim)
 -> Value -> Parser V1PersistentVolumeClaim)
-> (Object -> Parser V1PersistentVolumeClaim)
-> Value
-> Parser V1PersistentVolumeClaim
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1PersistentVolumeClaimSpec
-> Maybe V1PersistentVolumeClaimStatus
-> V1PersistentVolumeClaim
V1PersistentVolumeClaim
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1PersistentVolumeClaimSpec
 -> Maybe V1PersistentVolumeClaimStatus
 -> V1PersistentVolumeClaim)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1PersistentVolumeClaimSpec
      -> Maybe V1PersistentVolumeClaimStatus
      -> V1PersistentVolumeClaim)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1PersistentVolumeClaimSpec
   -> Maybe V1PersistentVolumeClaimStatus
   -> V1PersistentVolumeClaim)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1PersistentVolumeClaimSpec
      -> Maybe V1PersistentVolumeClaimStatus
      -> V1PersistentVolumeClaim)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1PersistentVolumeClaimSpec
   -> Maybe V1PersistentVolumeClaimStatus
   -> V1PersistentVolumeClaim)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe V1PersistentVolumeClaimSpec
      -> Maybe V1PersistentVolumeClaimStatus -> V1PersistentVolumeClaim)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (Maybe V1PersistentVolumeClaimSpec
   -> Maybe V1PersistentVolumeClaimStatus -> V1PersistentVolumeClaim)
-> Parser (Maybe V1PersistentVolumeClaimSpec)
-> Parser
     (Maybe V1PersistentVolumeClaimStatus -> V1PersistentVolumeClaim)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1PersistentVolumeClaimSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")
      Parser
  (Maybe V1PersistentVolumeClaimStatus -> V1PersistentVolumeClaim)
-> Parser (Maybe V1PersistentVolumeClaimStatus)
-> Parser V1PersistentVolumeClaim
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1PersistentVolumeClaimStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1PersistentVolumeClaim
instance A.ToJSON V1PersistentVolumeClaim where
  toJSON :: V1PersistentVolumeClaim -> Value
toJSON V1PersistentVolumeClaim {Maybe Text
Maybe V1PersistentVolumeClaimStatus
Maybe V1PersistentVolumeClaimSpec
Maybe V1ObjectMeta
$sel:v1PersistentVolumeClaimApiVersion:V1PersistentVolumeClaim :: V1PersistentVolumeClaim -> Maybe Text
$sel:v1PersistentVolumeClaimKind:V1PersistentVolumeClaim :: V1PersistentVolumeClaim -> Maybe Text
$sel:v1PersistentVolumeClaimMetadata:V1PersistentVolumeClaim :: V1PersistentVolumeClaim -> Maybe V1ObjectMeta
$sel:v1PersistentVolumeClaimSpec:V1PersistentVolumeClaim :: V1PersistentVolumeClaim -> Maybe V1PersistentVolumeClaimSpec
$sel:v1PersistentVolumeClaimStatus:V1PersistentVolumeClaim :: V1PersistentVolumeClaim -> Maybe V1PersistentVolumeClaimStatus
v1PersistentVolumeClaimApiVersion :: Maybe Text
v1PersistentVolumeClaimKind :: Maybe Text
v1PersistentVolumeClaimMetadata :: Maybe V1ObjectMeta
v1PersistentVolumeClaimSpec :: Maybe V1PersistentVolumeClaimSpec
v1PersistentVolumeClaimStatus :: Maybe V1PersistentVolumeClaimStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PersistentVolumeClaimApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PersistentVolumeClaimKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1PersistentVolumeClaimMetadata
      , Key
"spec" Key -> Maybe V1PersistentVolumeClaimSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1PersistentVolumeClaimSpec
v1PersistentVolumeClaimSpec
      , Key
"status" Key -> Maybe V1PersistentVolumeClaimStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1PersistentVolumeClaimStatus
v1PersistentVolumeClaimStatus
      ]


-- | Construct a value of type 'V1PersistentVolumeClaim' (by applying it's required fields, if any)
mkV1PersistentVolumeClaim
  :: V1PersistentVolumeClaim
mkV1PersistentVolumeClaim :: V1PersistentVolumeClaim
mkV1PersistentVolumeClaim =
  V1PersistentVolumeClaim
  { $sel:v1PersistentVolumeClaimApiVersion:V1PersistentVolumeClaim :: Maybe Text
v1PersistentVolumeClaimApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeClaimKind:V1PersistentVolumeClaim :: Maybe Text
v1PersistentVolumeClaimKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeClaimMetadata:V1PersistentVolumeClaim :: Maybe V1ObjectMeta
v1PersistentVolumeClaimMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeClaimSpec:V1PersistentVolumeClaim :: Maybe V1PersistentVolumeClaimSpec
v1PersistentVolumeClaimSpec = Maybe V1PersistentVolumeClaimSpec
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeClaimStatus:V1PersistentVolumeClaim :: Maybe V1PersistentVolumeClaimStatus
v1PersistentVolumeClaimStatus = Maybe V1PersistentVolumeClaimStatus
forall a. Maybe a
Nothing
  }

-- ** V1PersistentVolumeClaimCondition
-- | V1PersistentVolumeClaimCondition
-- PersistentVolumeClaimCondition contains details about state of pvc
data V1PersistentVolumeClaimCondition = V1PersistentVolumeClaimCondition
  { V1PersistentVolumeClaimCondition -> Maybe DateTime
v1PersistentVolumeClaimConditionLastProbeTime :: !(Maybe DateTime) -- ^ "lastProbeTime" - lastProbeTime is the time we probed the condition.
  , V1PersistentVolumeClaimCondition -> Maybe DateTime
v1PersistentVolumeClaimConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - lastTransitionTime is the time the condition transitioned from one status to another.
  , V1PersistentVolumeClaimCondition -> Maybe Text
v1PersistentVolumeClaimConditionMessage :: !(Maybe Text) -- ^ "message" - message is the human-readable message indicating details about last transition.
  , V1PersistentVolumeClaimCondition -> Maybe Text
v1PersistentVolumeClaimConditionReason :: !(Maybe Text) -- ^ "reason" - reason is a unique, this should be a short, machine understandable string that gives the reason for condition&#39;s last transition. If it reports \&quot;Resizing\&quot; that means the underlying persistent volume is being resized.
  , V1PersistentVolumeClaimCondition -> Text
v1PersistentVolumeClaimConditionStatus :: !(Text) -- ^ /Required/ "status" - Status is the status of the condition. Can be True, False, Unknown. More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text&#x3D;state%20of%20pvc-,conditions.status,-(string)%2C%20required
  , V1PersistentVolumeClaimCondition -> Text
v1PersistentVolumeClaimConditionType :: !(Text) -- ^ /Required/ "type" - Type is the type of the condition. More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text&#x3D;set%20to%20%27ResizeStarted%27.-,PersistentVolumeClaimCondition,-contains%20details%20about
  } deriving (Int -> V1PersistentVolumeClaimCondition -> ShowS
[V1PersistentVolumeClaimCondition] -> ShowS
V1PersistentVolumeClaimCondition -> String
(Int -> V1PersistentVolumeClaimCondition -> ShowS)
-> (V1PersistentVolumeClaimCondition -> String)
-> ([V1PersistentVolumeClaimCondition] -> ShowS)
-> Show V1PersistentVolumeClaimCondition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PersistentVolumeClaimCondition -> ShowS
showsPrec :: Int -> V1PersistentVolumeClaimCondition -> ShowS
$cshow :: V1PersistentVolumeClaimCondition -> String
show :: V1PersistentVolumeClaimCondition -> String
$cshowList :: [V1PersistentVolumeClaimCondition] -> ShowS
showList :: [V1PersistentVolumeClaimCondition] -> ShowS
P.Show, V1PersistentVolumeClaimCondition
-> V1PersistentVolumeClaimCondition -> Bool
(V1PersistentVolumeClaimCondition
 -> V1PersistentVolumeClaimCondition -> Bool)
-> (V1PersistentVolumeClaimCondition
    -> V1PersistentVolumeClaimCondition -> Bool)
-> Eq V1PersistentVolumeClaimCondition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PersistentVolumeClaimCondition
-> V1PersistentVolumeClaimCondition -> Bool
== :: V1PersistentVolumeClaimCondition
-> V1PersistentVolumeClaimCondition -> Bool
$c/= :: V1PersistentVolumeClaimCondition
-> V1PersistentVolumeClaimCondition -> Bool
/= :: V1PersistentVolumeClaimCondition
-> V1PersistentVolumeClaimCondition -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PersistentVolumeClaimCondition
instance A.FromJSON V1PersistentVolumeClaimCondition where
  parseJSON :: Value -> Parser V1PersistentVolumeClaimCondition
parseJSON = String
-> (Object -> Parser V1PersistentVolumeClaimCondition)
-> Value
-> Parser V1PersistentVolumeClaimCondition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PersistentVolumeClaimCondition" ((Object -> Parser V1PersistentVolumeClaimCondition)
 -> Value -> Parser V1PersistentVolumeClaimCondition)
-> (Object -> Parser V1PersistentVolumeClaimCondition)
-> Value
-> Parser V1PersistentVolumeClaimCondition
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe DateTime
-> Maybe DateTime
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> V1PersistentVolumeClaimCondition
V1PersistentVolumeClaimCondition
      (Maybe DateTime
 -> Maybe DateTime
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> Text
 -> V1PersistentVolumeClaimCondition)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe DateTime
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> V1PersistentVolumeClaimCondition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lastProbeTime")
      Parser
  (Maybe DateTime
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> V1PersistentVolumeClaimCondition)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe Text
      -> Maybe Text -> Text -> Text -> V1PersistentVolumeClaimCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lastTransitionTime")
      Parser
  (Maybe Text
   -> Maybe Text -> Text -> Text -> V1PersistentVolumeClaimCondition)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Text -> Text -> V1PersistentVolumeClaimCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"message")
      Parser
  (Maybe Text -> Text -> Text -> V1PersistentVolumeClaimCondition)
-> Parser (Maybe Text)
-> Parser (Text -> Text -> V1PersistentVolumeClaimCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reason")
      Parser (Text -> Text -> V1PersistentVolumeClaimCondition)
-> Parser Text -> Parser (Text -> V1PersistentVolumeClaimCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"status")
      Parser (Text -> V1PersistentVolumeClaimCondition)
-> Parser Text -> Parser V1PersistentVolumeClaimCondition
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"type")

-- | ToJSON V1PersistentVolumeClaimCondition
instance A.ToJSON V1PersistentVolumeClaimCondition where
  toJSON :: V1PersistentVolumeClaimCondition -> Value
toJSON V1PersistentVolumeClaimCondition {Maybe Text
Maybe DateTime
Text
$sel:v1PersistentVolumeClaimConditionLastProbeTime:V1PersistentVolumeClaimCondition :: V1PersistentVolumeClaimCondition -> Maybe DateTime
$sel:v1PersistentVolumeClaimConditionLastTransitionTime:V1PersistentVolumeClaimCondition :: V1PersistentVolumeClaimCondition -> Maybe DateTime
$sel:v1PersistentVolumeClaimConditionMessage:V1PersistentVolumeClaimCondition :: V1PersistentVolumeClaimCondition -> Maybe Text
$sel:v1PersistentVolumeClaimConditionReason:V1PersistentVolumeClaimCondition :: V1PersistentVolumeClaimCondition -> Maybe Text
$sel:v1PersistentVolumeClaimConditionStatus:V1PersistentVolumeClaimCondition :: V1PersistentVolumeClaimCondition -> Text
$sel:v1PersistentVolumeClaimConditionType:V1PersistentVolumeClaimCondition :: V1PersistentVolumeClaimCondition -> Text
v1PersistentVolumeClaimConditionLastProbeTime :: Maybe DateTime
v1PersistentVolumeClaimConditionLastTransitionTime :: Maybe DateTime
v1PersistentVolumeClaimConditionMessage :: Maybe Text
v1PersistentVolumeClaimConditionReason :: Maybe Text
v1PersistentVolumeClaimConditionStatus :: Text
v1PersistentVolumeClaimConditionType :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"lastProbeTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1PersistentVolumeClaimConditionLastProbeTime
      , Key
"lastTransitionTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1PersistentVolumeClaimConditionLastTransitionTime
      , Key
"message" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PersistentVolumeClaimConditionMessage
      , Key
"reason" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PersistentVolumeClaimConditionReason
      , Key
"status" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1PersistentVolumeClaimConditionStatus
      , Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1PersistentVolumeClaimConditionType
      ]


-- | Construct a value of type 'V1PersistentVolumeClaimCondition' (by applying it's required fields, if any)
mkV1PersistentVolumeClaimCondition
  :: Text -- ^ 'v1PersistentVolumeClaimConditionStatus': Status is the status of the condition. Can be True, False, Unknown. More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=state%20of%20pvc-,conditions.status,-(string)%2C%20required
  -> Text -- ^ 'v1PersistentVolumeClaimConditionType': Type is the type of the condition. More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=set%20to%20%27ResizeStarted%27.-,PersistentVolumeClaimCondition,-contains%20details%20about
  -> V1PersistentVolumeClaimCondition
mkV1PersistentVolumeClaimCondition :: Text -> Text -> V1PersistentVolumeClaimCondition
mkV1PersistentVolumeClaimCondition Text
v1PersistentVolumeClaimConditionStatus Text
v1PersistentVolumeClaimConditionType =
  V1PersistentVolumeClaimCondition
  { $sel:v1PersistentVolumeClaimConditionLastProbeTime:V1PersistentVolumeClaimCondition :: Maybe DateTime
v1PersistentVolumeClaimConditionLastProbeTime = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeClaimConditionLastTransitionTime:V1PersistentVolumeClaimCondition :: Maybe DateTime
v1PersistentVolumeClaimConditionLastTransitionTime = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeClaimConditionMessage:V1PersistentVolumeClaimCondition :: Maybe Text
v1PersistentVolumeClaimConditionMessage = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeClaimConditionReason:V1PersistentVolumeClaimCondition :: Maybe Text
v1PersistentVolumeClaimConditionReason = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1PersistentVolumeClaimConditionStatus:V1PersistentVolumeClaimCondition :: Text
v1PersistentVolumeClaimConditionStatus :: Text
v1PersistentVolumeClaimConditionStatus
  , Text
$sel:v1PersistentVolumeClaimConditionType:V1PersistentVolumeClaimCondition :: Text
v1PersistentVolumeClaimConditionType :: Text
v1PersistentVolumeClaimConditionType
  }

-- ** V1PersistentVolumeClaimList
-- | V1PersistentVolumeClaimList
-- PersistentVolumeClaimList is a list of PersistentVolumeClaim items.
data V1PersistentVolumeClaimList = V1PersistentVolumeClaimList
  { V1PersistentVolumeClaimList -> Maybe Text
v1PersistentVolumeClaimListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1PersistentVolumeClaimList -> [V1PersistentVolumeClaim]
v1PersistentVolumeClaimListItems :: !([V1PersistentVolumeClaim]) -- ^ /Required/ "items" - items is a list of persistent volume claims. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
  , V1PersistentVolumeClaimList -> Maybe Text
v1PersistentVolumeClaimListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1PersistentVolumeClaimList -> Maybe V1ListMeta
v1PersistentVolumeClaimListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1PersistentVolumeClaimList -> ShowS
[V1PersistentVolumeClaimList] -> ShowS
V1PersistentVolumeClaimList -> String
(Int -> V1PersistentVolumeClaimList -> ShowS)
-> (V1PersistentVolumeClaimList -> String)
-> ([V1PersistentVolumeClaimList] -> ShowS)
-> Show V1PersistentVolumeClaimList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PersistentVolumeClaimList -> ShowS
showsPrec :: Int -> V1PersistentVolumeClaimList -> ShowS
$cshow :: V1PersistentVolumeClaimList -> String
show :: V1PersistentVolumeClaimList -> String
$cshowList :: [V1PersistentVolumeClaimList] -> ShowS
showList :: [V1PersistentVolumeClaimList] -> ShowS
P.Show, V1PersistentVolumeClaimList -> V1PersistentVolumeClaimList -> Bool
(V1PersistentVolumeClaimList
 -> V1PersistentVolumeClaimList -> Bool)
-> (V1PersistentVolumeClaimList
    -> V1PersistentVolumeClaimList -> Bool)
-> Eq V1PersistentVolumeClaimList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PersistentVolumeClaimList -> V1PersistentVolumeClaimList -> Bool
== :: V1PersistentVolumeClaimList -> V1PersistentVolumeClaimList -> Bool
$c/= :: V1PersistentVolumeClaimList -> V1PersistentVolumeClaimList -> Bool
/= :: V1PersistentVolumeClaimList -> V1PersistentVolumeClaimList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PersistentVolumeClaimList
instance A.FromJSON V1PersistentVolumeClaimList where
  parseJSON :: Value -> Parser V1PersistentVolumeClaimList
parseJSON = String
-> (Object -> Parser V1PersistentVolumeClaimList)
-> Value
-> Parser V1PersistentVolumeClaimList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PersistentVolumeClaimList" ((Object -> Parser V1PersistentVolumeClaimList)
 -> Value -> Parser V1PersistentVolumeClaimList)
-> (Object -> Parser V1PersistentVolumeClaimList)
-> Value
-> Parser V1PersistentVolumeClaimList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1PersistentVolumeClaim]
-> Maybe Text
-> Maybe V1ListMeta
-> V1PersistentVolumeClaimList
V1PersistentVolumeClaimList
      (Maybe Text
 -> [V1PersistentVolumeClaim]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1PersistentVolumeClaimList)
-> Parser (Maybe Text)
-> Parser
     ([V1PersistentVolumeClaim]
      -> Maybe Text -> Maybe V1ListMeta -> V1PersistentVolumeClaimList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1PersistentVolumeClaim]
   -> Maybe Text -> Maybe V1ListMeta -> V1PersistentVolumeClaimList)
-> Parser [V1PersistentVolumeClaim]
-> Parser
     (Maybe Text -> Maybe V1ListMeta -> V1PersistentVolumeClaimList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1PersistentVolumeClaim]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser
  (Maybe Text -> Maybe V1ListMeta -> V1PersistentVolumeClaimList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1PersistentVolumeClaimList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1PersistentVolumeClaimList)
-> Parser (Maybe V1ListMeta) -> Parser V1PersistentVolumeClaimList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1PersistentVolumeClaimList
instance A.ToJSON V1PersistentVolumeClaimList where
  toJSON :: V1PersistentVolumeClaimList -> Value
toJSON V1PersistentVolumeClaimList {[V1PersistentVolumeClaim]
Maybe Text
Maybe V1ListMeta
$sel:v1PersistentVolumeClaimListApiVersion:V1PersistentVolumeClaimList :: V1PersistentVolumeClaimList -> Maybe Text
$sel:v1PersistentVolumeClaimListItems:V1PersistentVolumeClaimList :: V1PersistentVolumeClaimList -> [V1PersistentVolumeClaim]
$sel:v1PersistentVolumeClaimListKind:V1PersistentVolumeClaimList :: V1PersistentVolumeClaimList -> Maybe Text
$sel:v1PersistentVolumeClaimListMetadata:V1PersistentVolumeClaimList :: V1PersistentVolumeClaimList -> Maybe V1ListMeta
v1PersistentVolumeClaimListApiVersion :: Maybe Text
v1PersistentVolumeClaimListItems :: [V1PersistentVolumeClaim]
v1PersistentVolumeClaimListKind :: Maybe Text
v1PersistentVolumeClaimListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PersistentVolumeClaimListApiVersion
      , Key
"items" Key -> [V1PersistentVolumeClaim] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1PersistentVolumeClaim]
v1PersistentVolumeClaimListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PersistentVolumeClaimListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1PersistentVolumeClaimListMetadata
      ]


-- | Construct a value of type 'V1PersistentVolumeClaimList' (by applying it's required fields, if any)
mkV1PersistentVolumeClaimList
  :: [V1PersistentVolumeClaim] -- ^ 'v1PersistentVolumeClaimListItems': items is a list of persistent volume claims. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
  -> V1PersistentVolumeClaimList
mkV1PersistentVolumeClaimList :: [V1PersistentVolumeClaim] -> V1PersistentVolumeClaimList
mkV1PersistentVolumeClaimList [V1PersistentVolumeClaim]
v1PersistentVolumeClaimListItems =
  V1PersistentVolumeClaimList
  { $sel:v1PersistentVolumeClaimListApiVersion:V1PersistentVolumeClaimList :: Maybe Text
v1PersistentVolumeClaimListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1PersistentVolumeClaim]
$sel:v1PersistentVolumeClaimListItems:V1PersistentVolumeClaimList :: [V1PersistentVolumeClaim]
v1PersistentVolumeClaimListItems :: [V1PersistentVolumeClaim]
v1PersistentVolumeClaimListItems
  , $sel:v1PersistentVolumeClaimListKind:V1PersistentVolumeClaimList :: Maybe Text
v1PersistentVolumeClaimListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeClaimListMetadata:V1PersistentVolumeClaimList :: Maybe V1ListMeta
v1PersistentVolumeClaimListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1PersistentVolumeClaimSpec
-- | V1PersistentVolumeClaimSpec
-- PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes
data V1PersistentVolumeClaimSpec = V1PersistentVolumeClaimSpec
  { V1PersistentVolumeClaimSpec -> Maybe [Text]
v1PersistentVolumeClaimSpecAccessModes :: !(Maybe [Text]) -- ^ "accessModes" - accessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
  , V1PersistentVolumeClaimSpec -> Maybe V1TypedLocalObjectReference
v1PersistentVolumeClaimSpecDataSource :: !(Maybe V1TypedLocalObjectReference) -- ^ "dataSource"
  , V1PersistentVolumeClaimSpec -> Maybe V1TypedObjectReference
v1PersistentVolumeClaimSpecDataSourceRef :: !(Maybe V1TypedObjectReference) -- ^ "dataSourceRef"
  , V1PersistentVolumeClaimSpec -> Maybe V1VolumeResourceRequirements
v1PersistentVolumeClaimSpecResources :: !(Maybe V1VolumeResourceRequirements) -- ^ "resources"
  , V1PersistentVolumeClaimSpec -> Maybe V1LabelSelector
v1PersistentVolumeClaimSpecSelector :: !(Maybe V1LabelSelector) -- ^ "selector"
  , V1PersistentVolumeClaimSpec -> Maybe Text
v1PersistentVolumeClaimSpecStorageClassName :: !(Maybe Text) -- ^ "storageClassName" - storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
  , V1PersistentVolumeClaimSpec -> Maybe Text
v1PersistentVolumeClaimSpecVolumeAttributesClassName :: !(Maybe Text) -- ^ "volumeAttributesClassName" - volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. If specified, the CSI driver will create or update the volume with the attributes defined in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, it can be changed after the claim is created. An empty string value means that no VolumeAttributesClass will be applied to the claim but it&#39;s not allowed to reset this field to empty string once it is set. If unspecified and the PersistentVolumeClaim is unbound, the default VolumeAttributesClass will be set by the persistentvolume controller if it exists. If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource exists. More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ (Beta) Using this field requires the VolumeAttributesClass feature gate to be enabled (off by default).
  , V1PersistentVolumeClaimSpec -> Maybe Text
v1PersistentVolumeClaimSpecVolumeMode :: !(Maybe Text) -- ^ "volumeMode" - volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.
  , V1PersistentVolumeClaimSpec -> Maybe Text
v1PersistentVolumeClaimSpecVolumeName :: !(Maybe Text) -- ^ "volumeName" - volumeName is the binding reference to the PersistentVolume backing this claim.
  } deriving (Int -> V1PersistentVolumeClaimSpec -> ShowS
[V1PersistentVolumeClaimSpec] -> ShowS
V1PersistentVolumeClaimSpec -> String
(Int -> V1PersistentVolumeClaimSpec -> ShowS)
-> (V1PersistentVolumeClaimSpec -> String)
-> ([V1PersistentVolumeClaimSpec] -> ShowS)
-> Show V1PersistentVolumeClaimSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PersistentVolumeClaimSpec -> ShowS
showsPrec :: Int -> V1PersistentVolumeClaimSpec -> ShowS
$cshow :: V1PersistentVolumeClaimSpec -> String
show :: V1PersistentVolumeClaimSpec -> String
$cshowList :: [V1PersistentVolumeClaimSpec] -> ShowS
showList :: [V1PersistentVolumeClaimSpec] -> ShowS
P.Show, V1PersistentVolumeClaimSpec -> V1PersistentVolumeClaimSpec -> Bool
(V1PersistentVolumeClaimSpec
 -> V1PersistentVolumeClaimSpec -> Bool)
-> (V1PersistentVolumeClaimSpec
    -> V1PersistentVolumeClaimSpec -> Bool)
-> Eq V1PersistentVolumeClaimSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PersistentVolumeClaimSpec -> V1PersistentVolumeClaimSpec -> Bool
== :: V1PersistentVolumeClaimSpec -> V1PersistentVolumeClaimSpec -> Bool
$c/= :: V1PersistentVolumeClaimSpec -> V1PersistentVolumeClaimSpec -> Bool
/= :: V1PersistentVolumeClaimSpec -> V1PersistentVolumeClaimSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PersistentVolumeClaimSpec
instance A.FromJSON V1PersistentVolumeClaimSpec where
  parseJSON :: Value -> Parser V1PersistentVolumeClaimSpec
parseJSON = String
-> (Object -> Parser V1PersistentVolumeClaimSpec)
-> Value
-> Parser V1PersistentVolumeClaimSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PersistentVolumeClaimSpec" ((Object -> Parser V1PersistentVolumeClaimSpec)
 -> Value -> Parser V1PersistentVolumeClaimSpec)
-> (Object -> Parser V1PersistentVolumeClaimSpec)
-> Value
-> Parser V1PersistentVolumeClaimSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [Text]
-> Maybe V1TypedLocalObjectReference
-> Maybe V1TypedObjectReference
-> Maybe V1VolumeResourceRequirements
-> Maybe V1LabelSelector
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> V1PersistentVolumeClaimSpec
V1PersistentVolumeClaimSpec
      (Maybe [Text]
 -> Maybe V1TypedLocalObjectReference
 -> Maybe V1TypedObjectReference
 -> Maybe V1VolumeResourceRequirements
 -> Maybe V1LabelSelector
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> V1PersistentVolumeClaimSpec)
-> Parser (Maybe [Text])
-> Parser
     (Maybe V1TypedLocalObjectReference
      -> Maybe V1TypedObjectReference
      -> Maybe V1VolumeResourceRequirements
      -> Maybe V1LabelSelector
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> V1PersistentVolumeClaimSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"accessModes")
      Parser
  (Maybe V1TypedLocalObjectReference
   -> Maybe V1TypedObjectReference
   -> Maybe V1VolumeResourceRequirements
   -> Maybe V1LabelSelector
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> V1PersistentVolumeClaimSpec)
-> Parser (Maybe V1TypedLocalObjectReference)
-> Parser
     (Maybe V1TypedObjectReference
      -> Maybe V1VolumeResourceRequirements
      -> Maybe V1LabelSelector
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> V1PersistentVolumeClaimSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1TypedLocalObjectReference)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"dataSource")
      Parser
  (Maybe V1TypedObjectReference
   -> Maybe V1VolumeResourceRequirements
   -> Maybe V1LabelSelector
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> V1PersistentVolumeClaimSpec)
-> Parser (Maybe V1TypedObjectReference)
-> Parser
     (Maybe V1VolumeResourceRequirements
      -> Maybe V1LabelSelector
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> V1PersistentVolumeClaimSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1TypedObjectReference)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"dataSourceRef")
      Parser
  (Maybe V1VolumeResourceRequirements
   -> Maybe V1LabelSelector
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> V1PersistentVolumeClaimSpec)
-> Parser (Maybe V1VolumeResourceRequirements)
-> Parser
     (Maybe V1LabelSelector
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> V1PersistentVolumeClaimSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1VolumeResourceRequirements)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resources")
      Parser
  (Maybe V1LabelSelector
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> V1PersistentVolumeClaimSpec)
-> Parser (Maybe V1LabelSelector)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> V1PersistentVolumeClaimSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LabelSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"selector")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> V1PersistentVolumeClaimSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> V1PersistentVolumeClaimSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"storageClassName")
      Parser
  (Maybe Text
   -> Maybe Text -> Maybe Text -> V1PersistentVolumeClaimSpec)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> V1PersistentVolumeClaimSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"volumeAttributesClassName")
      Parser (Maybe Text -> Maybe Text -> V1PersistentVolumeClaimSpec)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> V1PersistentVolumeClaimSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"volumeMode")
      Parser (Maybe Text -> V1PersistentVolumeClaimSpec)
-> Parser (Maybe Text) -> Parser V1PersistentVolumeClaimSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"volumeName")

-- | ToJSON V1PersistentVolumeClaimSpec
instance A.ToJSON V1PersistentVolumeClaimSpec where
  toJSON :: V1PersistentVolumeClaimSpec -> Value
toJSON V1PersistentVolumeClaimSpec {Maybe [Text]
Maybe Text
Maybe V1VolumeResourceRequirements
Maybe V1TypedObjectReference
Maybe V1TypedLocalObjectReference
Maybe V1LabelSelector
$sel:v1PersistentVolumeClaimSpecAccessModes:V1PersistentVolumeClaimSpec :: V1PersistentVolumeClaimSpec -> Maybe [Text]
$sel:v1PersistentVolumeClaimSpecDataSource:V1PersistentVolumeClaimSpec :: V1PersistentVolumeClaimSpec -> Maybe V1TypedLocalObjectReference
$sel:v1PersistentVolumeClaimSpecDataSourceRef:V1PersistentVolumeClaimSpec :: V1PersistentVolumeClaimSpec -> Maybe V1TypedObjectReference
$sel:v1PersistentVolumeClaimSpecResources:V1PersistentVolumeClaimSpec :: V1PersistentVolumeClaimSpec -> Maybe V1VolumeResourceRequirements
$sel:v1PersistentVolumeClaimSpecSelector:V1PersistentVolumeClaimSpec :: V1PersistentVolumeClaimSpec -> Maybe V1LabelSelector
$sel:v1PersistentVolumeClaimSpecStorageClassName:V1PersistentVolumeClaimSpec :: V1PersistentVolumeClaimSpec -> Maybe Text
$sel:v1PersistentVolumeClaimSpecVolumeAttributesClassName:V1PersistentVolumeClaimSpec :: V1PersistentVolumeClaimSpec -> Maybe Text
$sel:v1PersistentVolumeClaimSpecVolumeMode:V1PersistentVolumeClaimSpec :: V1PersistentVolumeClaimSpec -> Maybe Text
$sel:v1PersistentVolumeClaimSpecVolumeName:V1PersistentVolumeClaimSpec :: V1PersistentVolumeClaimSpec -> Maybe Text
v1PersistentVolumeClaimSpecAccessModes :: Maybe [Text]
v1PersistentVolumeClaimSpecDataSource :: Maybe V1TypedLocalObjectReference
v1PersistentVolumeClaimSpecDataSourceRef :: Maybe V1TypedObjectReference
v1PersistentVolumeClaimSpecResources :: Maybe V1VolumeResourceRequirements
v1PersistentVolumeClaimSpecSelector :: Maybe V1LabelSelector
v1PersistentVolumeClaimSpecStorageClassName :: Maybe Text
v1PersistentVolumeClaimSpecVolumeAttributesClassName :: Maybe Text
v1PersistentVolumeClaimSpecVolumeMode :: Maybe Text
v1PersistentVolumeClaimSpecVolumeName :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"accessModes" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1PersistentVolumeClaimSpecAccessModes
      , Key
"dataSource" Key -> Maybe V1TypedLocalObjectReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1TypedLocalObjectReference
v1PersistentVolumeClaimSpecDataSource
      , Key
"dataSourceRef" Key -> Maybe V1TypedObjectReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1TypedObjectReference
v1PersistentVolumeClaimSpecDataSourceRef
      , Key
"resources" Key -> Maybe V1VolumeResourceRequirements -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1VolumeResourceRequirements
v1PersistentVolumeClaimSpecResources
      , Key
"selector" Key -> Maybe V1LabelSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LabelSelector
v1PersistentVolumeClaimSpecSelector
      , Key
"storageClassName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PersistentVolumeClaimSpecStorageClassName
      , Key
"volumeAttributesClassName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PersistentVolumeClaimSpecVolumeAttributesClassName
      , Key
"volumeMode" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PersistentVolumeClaimSpecVolumeMode
      , Key
"volumeName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PersistentVolumeClaimSpecVolumeName
      ]


-- | Construct a value of type 'V1PersistentVolumeClaimSpec' (by applying it's required fields, if any)
mkV1PersistentVolumeClaimSpec
  :: V1PersistentVolumeClaimSpec
mkV1PersistentVolumeClaimSpec :: V1PersistentVolumeClaimSpec
mkV1PersistentVolumeClaimSpec =
  V1PersistentVolumeClaimSpec
  { $sel:v1PersistentVolumeClaimSpecAccessModes:V1PersistentVolumeClaimSpec :: Maybe [Text]
v1PersistentVolumeClaimSpecAccessModes = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeClaimSpecDataSource:V1PersistentVolumeClaimSpec :: Maybe V1TypedLocalObjectReference
v1PersistentVolumeClaimSpecDataSource = Maybe V1TypedLocalObjectReference
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeClaimSpecDataSourceRef:V1PersistentVolumeClaimSpec :: Maybe V1TypedObjectReference
v1PersistentVolumeClaimSpecDataSourceRef = Maybe V1TypedObjectReference
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeClaimSpecResources:V1PersistentVolumeClaimSpec :: Maybe V1VolumeResourceRequirements
v1PersistentVolumeClaimSpecResources = Maybe V1VolumeResourceRequirements
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeClaimSpecSelector:V1PersistentVolumeClaimSpec :: Maybe V1LabelSelector
v1PersistentVolumeClaimSpecSelector = Maybe V1LabelSelector
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeClaimSpecStorageClassName:V1PersistentVolumeClaimSpec :: Maybe Text
v1PersistentVolumeClaimSpecStorageClassName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeClaimSpecVolumeAttributesClassName:V1PersistentVolumeClaimSpec :: Maybe Text
v1PersistentVolumeClaimSpecVolumeAttributesClassName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeClaimSpecVolumeMode:V1PersistentVolumeClaimSpec :: Maybe Text
v1PersistentVolumeClaimSpecVolumeMode = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeClaimSpecVolumeName:V1PersistentVolumeClaimSpec :: Maybe Text
v1PersistentVolumeClaimSpecVolumeName = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1PersistentVolumeClaimStatus
-- | V1PersistentVolumeClaimStatus
-- PersistentVolumeClaimStatus is the current status of a persistent volume claim.
data V1PersistentVolumeClaimStatus = V1PersistentVolumeClaimStatus
  { V1PersistentVolumeClaimStatus -> Maybe [Text]
v1PersistentVolumeClaimStatusAccessModes :: !(Maybe [Text]) -- ^ "accessModes" - accessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
  , V1PersistentVolumeClaimStatus -> Maybe (Map String Text)
v1PersistentVolumeClaimStatusAllocatedResourceStatuses :: !(Maybe (Map.Map String Text)) -- ^ "allocatedResourceStatuses" - allocatedResourceStatuses stores status of resource being resized for the given PVC. Key names follow standard Kubernetes label syntax. Valid values are either:  * Un-prefixed keys:   - storage - the capacity of the volume.  * Custom resources must use implementation-defined prefixed names such as \&quot;example.com/my-custom-resource\&quot; Apart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.  ClaimResourceStatus can be in any of following states:  - ControllerResizeInProgress:   State set when resize controller starts resizing the volume in control-plane.  - ControllerResizeFailed:   State set when resize has failed in resize controller with a terminal error.  - NodeResizePending:   State set when resize controller has finished resizing the volume but further resizing of   volume is needed on the node.  - NodeResizeInProgress:   State set when kubelet starts resizing the volume.  - NodeResizeFailed:   State set when resizing has failed in kubelet with a terminal error. Transient errors don&#39;t set   NodeResizeFailed. For example: if expanding a PVC for more capacity - this field can be one of the following states:  - pvc.status.allocatedResourceStatus[&#39;storage&#39;] &#x3D; \&quot;ControllerResizeInProgress\&quot;      - pvc.status.allocatedResourceStatus[&#39;storage&#39;] &#x3D; \&quot;ControllerResizeFailed\&quot;      - pvc.status.allocatedResourceStatus[&#39;storage&#39;] &#x3D; \&quot;NodeResizePending\&quot;      - pvc.status.allocatedResourceStatus[&#39;storage&#39;] &#x3D; \&quot;NodeResizeInProgress\&quot;      - pvc.status.allocatedResourceStatus[&#39;storage&#39;] &#x3D; \&quot;NodeResizeFailed\&quot; When this field is not set, it means that no resize operation is in progress for the given PVC.  A controller that receives PVC update with previously unknown resourceName or ClaimResourceStatus should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.  This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.
  , V1PersistentVolumeClaimStatus -> Maybe (Map String Quantity)
v1PersistentVolumeClaimStatusAllocatedResources :: !(Maybe (Map.Map String Quantity)) -- ^ "allocatedResources" - allocatedResources tracks the resources allocated to a PVC including its capacity. Key names follow standard Kubernetes label syntax. Valid values are either:  * Un-prefixed keys:   - storage - the capacity of the volume.  * Custom resources must use implementation-defined prefixed names such as \&quot;example.com/my-custom-resource\&quot; Apart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.  Capacity reported here may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity.  A controller that receives PVC update with previously unknown resourceName should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.  This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.
  , V1PersistentVolumeClaimStatus -> Maybe (Map String Quantity)
v1PersistentVolumeClaimStatusCapacity :: !(Maybe (Map.Map String Quantity)) -- ^ "capacity" - capacity represents the actual resources of the underlying volume.
  , V1PersistentVolumeClaimStatus
-> Maybe [V1PersistentVolumeClaimCondition]
v1PersistentVolumeClaimStatusConditions :: !(Maybe [V1PersistentVolumeClaimCondition]) -- ^ "conditions" - conditions is the current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to &#39;Resizing&#39;.
  , V1PersistentVolumeClaimStatus -> Maybe Text
v1PersistentVolumeClaimStatusCurrentVolumeAttributesClassName :: !(Maybe Text) -- ^ "currentVolumeAttributesClassName" - currentVolumeAttributesClassName is the current name of the VolumeAttributesClass the PVC is using. When unset, there is no VolumeAttributeClass applied to this PersistentVolumeClaim This is a beta field and requires enabling VolumeAttributesClass feature (off by default).
  , V1PersistentVolumeClaimStatus -> Maybe V1ModifyVolumeStatus
v1PersistentVolumeClaimStatusModifyVolumeStatus :: !(Maybe V1ModifyVolumeStatus) -- ^ "modifyVolumeStatus"
  , V1PersistentVolumeClaimStatus -> Maybe Text
v1PersistentVolumeClaimStatusPhase :: !(Maybe Text) -- ^ "phase" - phase represents the current phase of PersistentVolumeClaim.
  } deriving (Int -> V1PersistentVolumeClaimStatus -> ShowS
[V1PersistentVolumeClaimStatus] -> ShowS
V1PersistentVolumeClaimStatus -> String
(Int -> V1PersistentVolumeClaimStatus -> ShowS)
-> (V1PersistentVolumeClaimStatus -> String)
-> ([V1PersistentVolumeClaimStatus] -> ShowS)
-> Show V1PersistentVolumeClaimStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PersistentVolumeClaimStatus -> ShowS
showsPrec :: Int -> V1PersistentVolumeClaimStatus -> ShowS
$cshow :: V1PersistentVolumeClaimStatus -> String
show :: V1PersistentVolumeClaimStatus -> String
$cshowList :: [V1PersistentVolumeClaimStatus] -> ShowS
showList :: [V1PersistentVolumeClaimStatus] -> ShowS
P.Show, V1PersistentVolumeClaimStatus
-> V1PersistentVolumeClaimStatus -> Bool
(V1PersistentVolumeClaimStatus
 -> V1PersistentVolumeClaimStatus -> Bool)
-> (V1PersistentVolumeClaimStatus
    -> V1PersistentVolumeClaimStatus -> Bool)
-> Eq V1PersistentVolumeClaimStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PersistentVolumeClaimStatus
-> V1PersistentVolumeClaimStatus -> Bool
== :: V1PersistentVolumeClaimStatus
-> V1PersistentVolumeClaimStatus -> Bool
$c/= :: V1PersistentVolumeClaimStatus
-> V1PersistentVolumeClaimStatus -> Bool
/= :: V1PersistentVolumeClaimStatus
-> V1PersistentVolumeClaimStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PersistentVolumeClaimStatus
instance A.FromJSON V1PersistentVolumeClaimStatus where
  parseJSON :: Value -> Parser V1PersistentVolumeClaimStatus
parseJSON = String
-> (Object -> Parser V1PersistentVolumeClaimStatus)
-> Value
-> Parser V1PersistentVolumeClaimStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PersistentVolumeClaimStatus" ((Object -> Parser V1PersistentVolumeClaimStatus)
 -> Value -> Parser V1PersistentVolumeClaimStatus)
-> (Object -> Parser V1PersistentVolumeClaimStatus)
-> Value
-> Parser V1PersistentVolumeClaimStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [Text]
-> Maybe (Map String Text)
-> Maybe (Map String Quantity)
-> Maybe (Map String Quantity)
-> Maybe [V1PersistentVolumeClaimCondition]
-> Maybe Text
-> Maybe V1ModifyVolumeStatus
-> Maybe Text
-> V1PersistentVolumeClaimStatus
V1PersistentVolumeClaimStatus
      (Maybe [Text]
 -> Maybe (Map String Text)
 -> Maybe (Map String Quantity)
 -> Maybe (Map String Quantity)
 -> Maybe [V1PersistentVolumeClaimCondition]
 -> Maybe Text
 -> Maybe V1ModifyVolumeStatus
 -> Maybe Text
 -> V1PersistentVolumeClaimStatus)
-> Parser (Maybe [Text])
-> Parser
     (Maybe (Map String Text)
      -> Maybe (Map String Quantity)
      -> Maybe (Map String Quantity)
      -> Maybe [V1PersistentVolumeClaimCondition]
      -> Maybe Text
      -> Maybe V1ModifyVolumeStatus
      -> Maybe Text
      -> V1PersistentVolumeClaimStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"accessModes")
      Parser
  (Maybe (Map String Text)
   -> Maybe (Map String Quantity)
   -> Maybe (Map String Quantity)
   -> Maybe [V1PersistentVolumeClaimCondition]
   -> Maybe Text
   -> Maybe V1ModifyVolumeStatus
   -> Maybe Text
   -> V1PersistentVolumeClaimStatus)
-> Parser (Maybe (Map String Text))
-> Parser
     (Maybe (Map String Quantity)
      -> Maybe (Map String Quantity)
      -> Maybe [V1PersistentVolumeClaimCondition]
      -> Maybe Text
      -> Maybe V1ModifyVolumeStatus
      -> Maybe Text
      -> V1PersistentVolumeClaimStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String Text))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"allocatedResourceStatuses")
      Parser
  (Maybe (Map String Quantity)
   -> Maybe (Map String Quantity)
   -> Maybe [V1PersistentVolumeClaimCondition]
   -> Maybe Text
   -> Maybe V1ModifyVolumeStatus
   -> Maybe Text
   -> V1PersistentVolumeClaimStatus)
-> Parser (Maybe (Map String Quantity))
-> Parser
     (Maybe (Map String Quantity)
      -> Maybe [V1PersistentVolumeClaimCondition]
      -> Maybe Text
      -> Maybe V1ModifyVolumeStatus
      -> Maybe Text
      -> V1PersistentVolumeClaimStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String Quantity))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"allocatedResources")
      Parser
  (Maybe (Map String Quantity)
   -> Maybe [V1PersistentVolumeClaimCondition]
   -> Maybe Text
   -> Maybe V1ModifyVolumeStatus
   -> Maybe Text
   -> V1PersistentVolumeClaimStatus)
-> Parser (Maybe (Map String Quantity))
-> Parser
     (Maybe [V1PersistentVolumeClaimCondition]
      -> Maybe Text
      -> Maybe V1ModifyVolumeStatus
      -> Maybe Text
      -> V1PersistentVolumeClaimStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String Quantity))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"capacity")
      Parser
  (Maybe [V1PersistentVolumeClaimCondition]
   -> Maybe Text
   -> Maybe V1ModifyVolumeStatus
   -> Maybe Text
   -> V1PersistentVolumeClaimStatus)
-> Parser (Maybe [V1PersistentVolumeClaimCondition])
-> Parser
     (Maybe Text
      -> Maybe V1ModifyVolumeStatus
      -> Maybe Text
      -> V1PersistentVolumeClaimStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1PersistentVolumeClaimCondition])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"conditions")
      Parser
  (Maybe Text
   -> Maybe V1ModifyVolumeStatus
   -> Maybe Text
   -> V1PersistentVolumeClaimStatus)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ModifyVolumeStatus
      -> Maybe Text -> V1PersistentVolumeClaimStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"currentVolumeAttributesClassName")
      Parser
  (Maybe V1ModifyVolumeStatus
   -> Maybe Text -> V1PersistentVolumeClaimStatus)
-> Parser (Maybe V1ModifyVolumeStatus)
-> Parser (Maybe Text -> V1PersistentVolumeClaimStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ModifyVolumeStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"modifyVolumeStatus")
      Parser (Maybe Text -> V1PersistentVolumeClaimStatus)
-> Parser (Maybe Text) -> Parser V1PersistentVolumeClaimStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"phase")

-- | ToJSON V1PersistentVolumeClaimStatus
instance A.ToJSON V1PersistentVolumeClaimStatus where
  toJSON :: V1PersistentVolumeClaimStatus -> Value
toJSON V1PersistentVolumeClaimStatus {Maybe [Text]
Maybe [V1PersistentVolumeClaimCondition]
Maybe (Map String Text)
Maybe (Map String Quantity)
Maybe Text
Maybe V1ModifyVolumeStatus
$sel:v1PersistentVolumeClaimStatusAccessModes:V1PersistentVolumeClaimStatus :: V1PersistentVolumeClaimStatus -> Maybe [Text]
$sel:v1PersistentVolumeClaimStatusAllocatedResourceStatuses:V1PersistentVolumeClaimStatus :: V1PersistentVolumeClaimStatus -> Maybe (Map String Text)
$sel:v1PersistentVolumeClaimStatusAllocatedResources:V1PersistentVolumeClaimStatus :: V1PersistentVolumeClaimStatus -> Maybe (Map String Quantity)
$sel:v1PersistentVolumeClaimStatusCapacity:V1PersistentVolumeClaimStatus :: V1PersistentVolumeClaimStatus -> Maybe (Map String Quantity)
$sel:v1PersistentVolumeClaimStatusConditions:V1PersistentVolumeClaimStatus :: V1PersistentVolumeClaimStatus
-> Maybe [V1PersistentVolumeClaimCondition]
$sel:v1PersistentVolumeClaimStatusCurrentVolumeAttributesClassName:V1PersistentVolumeClaimStatus :: V1PersistentVolumeClaimStatus -> Maybe Text
$sel:v1PersistentVolumeClaimStatusModifyVolumeStatus:V1PersistentVolumeClaimStatus :: V1PersistentVolumeClaimStatus -> Maybe V1ModifyVolumeStatus
$sel:v1PersistentVolumeClaimStatusPhase:V1PersistentVolumeClaimStatus :: V1PersistentVolumeClaimStatus -> Maybe Text
v1PersistentVolumeClaimStatusAccessModes :: Maybe [Text]
v1PersistentVolumeClaimStatusAllocatedResourceStatuses :: Maybe (Map String Text)
v1PersistentVolumeClaimStatusAllocatedResources :: Maybe (Map String Quantity)
v1PersistentVolumeClaimStatusCapacity :: Maybe (Map String Quantity)
v1PersistentVolumeClaimStatusConditions :: Maybe [V1PersistentVolumeClaimCondition]
v1PersistentVolumeClaimStatusCurrentVolumeAttributesClassName :: Maybe Text
v1PersistentVolumeClaimStatusModifyVolumeStatus :: Maybe V1ModifyVolumeStatus
v1PersistentVolumeClaimStatusPhase :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"accessModes" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1PersistentVolumeClaimStatusAccessModes
      , Key
"allocatedResourceStatuses" Key -> Maybe (Map String Text) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Text)
v1PersistentVolumeClaimStatusAllocatedResourceStatuses
      , Key
"allocatedResources" Key -> Maybe (Map String Quantity) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Quantity)
v1PersistentVolumeClaimStatusAllocatedResources
      , Key
"capacity" Key -> Maybe (Map String Quantity) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Quantity)
v1PersistentVolumeClaimStatusCapacity
      , Key
"conditions" Key -> Maybe [V1PersistentVolumeClaimCondition] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1PersistentVolumeClaimCondition]
v1PersistentVolumeClaimStatusConditions
      , Key
"currentVolumeAttributesClassName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PersistentVolumeClaimStatusCurrentVolumeAttributesClassName
      , Key
"modifyVolumeStatus" Key -> Maybe V1ModifyVolumeStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ModifyVolumeStatus
v1PersistentVolumeClaimStatusModifyVolumeStatus
      , Key
"phase" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PersistentVolumeClaimStatusPhase
      ]


-- | Construct a value of type 'V1PersistentVolumeClaimStatus' (by applying it's required fields, if any)
mkV1PersistentVolumeClaimStatus
  :: V1PersistentVolumeClaimStatus
mkV1PersistentVolumeClaimStatus :: V1PersistentVolumeClaimStatus
mkV1PersistentVolumeClaimStatus =
  V1PersistentVolumeClaimStatus
  { $sel:v1PersistentVolumeClaimStatusAccessModes:V1PersistentVolumeClaimStatus :: Maybe [Text]
v1PersistentVolumeClaimStatusAccessModes = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeClaimStatusAllocatedResourceStatuses:V1PersistentVolumeClaimStatus :: Maybe (Map String Text)
v1PersistentVolumeClaimStatusAllocatedResourceStatuses = Maybe (Map String Text)
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeClaimStatusAllocatedResources:V1PersistentVolumeClaimStatus :: Maybe (Map String Quantity)
v1PersistentVolumeClaimStatusAllocatedResources = Maybe (Map String Quantity)
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeClaimStatusCapacity:V1PersistentVolumeClaimStatus :: Maybe (Map String Quantity)
v1PersistentVolumeClaimStatusCapacity = Maybe (Map String Quantity)
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeClaimStatusConditions:V1PersistentVolumeClaimStatus :: Maybe [V1PersistentVolumeClaimCondition]
v1PersistentVolumeClaimStatusConditions = Maybe [V1PersistentVolumeClaimCondition]
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeClaimStatusCurrentVolumeAttributesClassName:V1PersistentVolumeClaimStatus :: Maybe Text
v1PersistentVolumeClaimStatusCurrentVolumeAttributesClassName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeClaimStatusModifyVolumeStatus:V1PersistentVolumeClaimStatus :: Maybe V1ModifyVolumeStatus
v1PersistentVolumeClaimStatusModifyVolumeStatus = Maybe V1ModifyVolumeStatus
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeClaimStatusPhase:V1PersistentVolumeClaimStatus :: Maybe Text
v1PersistentVolumeClaimStatusPhase = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1PersistentVolumeClaimTemplate
-- | V1PersistentVolumeClaimTemplate
-- PersistentVolumeClaimTemplate is used to produce PersistentVolumeClaim objects as part of an EphemeralVolumeSource.
data V1PersistentVolumeClaimTemplate = V1PersistentVolumeClaimTemplate
  { V1PersistentVolumeClaimTemplate -> Maybe V1ObjectMeta
v1PersistentVolumeClaimTemplateMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1PersistentVolumeClaimTemplate -> V1PersistentVolumeClaimSpec
v1PersistentVolumeClaimTemplateSpec :: !(V1PersistentVolumeClaimSpec) -- ^ /Required/ "spec"
  } deriving (Int -> V1PersistentVolumeClaimTemplate -> ShowS
[V1PersistentVolumeClaimTemplate] -> ShowS
V1PersistentVolumeClaimTemplate -> String
(Int -> V1PersistentVolumeClaimTemplate -> ShowS)
-> (V1PersistentVolumeClaimTemplate -> String)
-> ([V1PersistentVolumeClaimTemplate] -> ShowS)
-> Show V1PersistentVolumeClaimTemplate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PersistentVolumeClaimTemplate -> ShowS
showsPrec :: Int -> V1PersistentVolumeClaimTemplate -> ShowS
$cshow :: V1PersistentVolumeClaimTemplate -> String
show :: V1PersistentVolumeClaimTemplate -> String
$cshowList :: [V1PersistentVolumeClaimTemplate] -> ShowS
showList :: [V1PersistentVolumeClaimTemplate] -> ShowS
P.Show, V1PersistentVolumeClaimTemplate
-> V1PersistentVolumeClaimTemplate -> Bool
(V1PersistentVolumeClaimTemplate
 -> V1PersistentVolumeClaimTemplate -> Bool)
-> (V1PersistentVolumeClaimTemplate
    -> V1PersistentVolumeClaimTemplate -> Bool)
-> Eq V1PersistentVolumeClaimTemplate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PersistentVolumeClaimTemplate
-> V1PersistentVolumeClaimTemplate -> Bool
== :: V1PersistentVolumeClaimTemplate
-> V1PersistentVolumeClaimTemplate -> Bool
$c/= :: V1PersistentVolumeClaimTemplate
-> V1PersistentVolumeClaimTemplate -> Bool
/= :: V1PersistentVolumeClaimTemplate
-> V1PersistentVolumeClaimTemplate -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PersistentVolumeClaimTemplate
instance A.FromJSON V1PersistentVolumeClaimTemplate where
  parseJSON :: Value -> Parser V1PersistentVolumeClaimTemplate
parseJSON = String
-> (Object -> Parser V1PersistentVolumeClaimTemplate)
-> Value
-> Parser V1PersistentVolumeClaimTemplate
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PersistentVolumeClaimTemplate" ((Object -> Parser V1PersistentVolumeClaimTemplate)
 -> Value -> Parser V1PersistentVolumeClaimTemplate)
-> (Object -> Parser V1PersistentVolumeClaimTemplate)
-> Value
-> Parser V1PersistentVolumeClaimTemplate
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1ObjectMeta
-> V1PersistentVolumeClaimSpec -> V1PersistentVolumeClaimTemplate
V1PersistentVolumeClaimTemplate
      (Maybe V1ObjectMeta
 -> V1PersistentVolumeClaimSpec -> V1PersistentVolumeClaimTemplate)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (V1PersistentVolumeClaimSpec -> V1PersistentVolumeClaimTemplate)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (V1PersistentVolumeClaimSpec -> V1PersistentVolumeClaimTemplate)
-> Parser V1PersistentVolumeClaimSpec
-> Parser V1PersistentVolumeClaimTemplate
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1PersistentVolumeClaimSpec
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"spec")

-- | ToJSON V1PersistentVolumeClaimTemplate
instance A.ToJSON V1PersistentVolumeClaimTemplate where
  toJSON :: V1PersistentVolumeClaimTemplate -> Value
toJSON V1PersistentVolumeClaimTemplate {Maybe V1ObjectMeta
V1PersistentVolumeClaimSpec
$sel:v1PersistentVolumeClaimTemplateMetadata:V1PersistentVolumeClaimTemplate :: V1PersistentVolumeClaimTemplate -> Maybe V1ObjectMeta
$sel:v1PersistentVolumeClaimTemplateSpec:V1PersistentVolumeClaimTemplate :: V1PersistentVolumeClaimTemplate -> V1PersistentVolumeClaimSpec
v1PersistentVolumeClaimTemplateMetadata :: Maybe V1ObjectMeta
v1PersistentVolumeClaimTemplateSpec :: V1PersistentVolumeClaimSpec
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1PersistentVolumeClaimTemplateMetadata
      , Key
"spec" Key -> V1PersistentVolumeClaimSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1PersistentVolumeClaimSpec
v1PersistentVolumeClaimTemplateSpec
      ]


-- | Construct a value of type 'V1PersistentVolumeClaimTemplate' (by applying it's required fields, if any)
mkV1PersistentVolumeClaimTemplate
  :: V1PersistentVolumeClaimSpec -- ^ 'v1PersistentVolumeClaimTemplateSpec' 
  -> V1PersistentVolumeClaimTemplate
mkV1PersistentVolumeClaimTemplate :: V1PersistentVolumeClaimSpec -> V1PersistentVolumeClaimTemplate
mkV1PersistentVolumeClaimTemplate V1PersistentVolumeClaimSpec
v1PersistentVolumeClaimTemplateSpec =
  V1PersistentVolumeClaimTemplate
  { $sel:v1PersistentVolumeClaimTemplateMetadata:V1PersistentVolumeClaimTemplate :: Maybe V1ObjectMeta
v1PersistentVolumeClaimTemplateMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , V1PersistentVolumeClaimSpec
$sel:v1PersistentVolumeClaimTemplateSpec:V1PersistentVolumeClaimTemplate :: V1PersistentVolumeClaimSpec
v1PersistentVolumeClaimTemplateSpec :: V1PersistentVolumeClaimSpec
v1PersistentVolumeClaimTemplateSpec
  }

-- ** V1PersistentVolumeClaimVolumeSource
-- | V1PersistentVolumeClaimVolumeSource
-- PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. This volume finds the bound PV and mounts that volume for the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another type of volume that is owned by someone else (the system).
data V1PersistentVolumeClaimVolumeSource = V1PersistentVolumeClaimVolumeSource
  { V1PersistentVolumeClaimVolumeSource -> Text
v1PersistentVolumeClaimVolumeSourceClaimName :: !(Text) -- ^ /Required/ "claimName" - claimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
  , V1PersistentVolumeClaimVolumeSource -> Maybe Bool
v1PersistentVolumeClaimVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - readOnly Will force the ReadOnly setting in VolumeMounts. Default false.
  } deriving (Int -> V1PersistentVolumeClaimVolumeSource -> ShowS
[V1PersistentVolumeClaimVolumeSource] -> ShowS
V1PersistentVolumeClaimVolumeSource -> String
(Int -> V1PersistentVolumeClaimVolumeSource -> ShowS)
-> (V1PersistentVolumeClaimVolumeSource -> String)
-> ([V1PersistentVolumeClaimVolumeSource] -> ShowS)
-> Show V1PersistentVolumeClaimVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PersistentVolumeClaimVolumeSource -> ShowS
showsPrec :: Int -> V1PersistentVolumeClaimVolumeSource -> ShowS
$cshow :: V1PersistentVolumeClaimVolumeSource -> String
show :: V1PersistentVolumeClaimVolumeSource -> String
$cshowList :: [V1PersistentVolumeClaimVolumeSource] -> ShowS
showList :: [V1PersistentVolumeClaimVolumeSource] -> ShowS
P.Show, V1PersistentVolumeClaimVolumeSource
-> V1PersistentVolumeClaimVolumeSource -> Bool
(V1PersistentVolumeClaimVolumeSource
 -> V1PersistentVolumeClaimVolumeSource -> Bool)
-> (V1PersistentVolumeClaimVolumeSource
    -> V1PersistentVolumeClaimVolumeSource -> Bool)
-> Eq V1PersistentVolumeClaimVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PersistentVolumeClaimVolumeSource
-> V1PersistentVolumeClaimVolumeSource -> Bool
== :: V1PersistentVolumeClaimVolumeSource
-> V1PersistentVolumeClaimVolumeSource -> Bool
$c/= :: V1PersistentVolumeClaimVolumeSource
-> V1PersistentVolumeClaimVolumeSource -> Bool
/= :: V1PersistentVolumeClaimVolumeSource
-> V1PersistentVolumeClaimVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PersistentVolumeClaimVolumeSource
instance A.FromJSON V1PersistentVolumeClaimVolumeSource where
  parseJSON :: Value -> Parser V1PersistentVolumeClaimVolumeSource
parseJSON = String
-> (Object -> Parser V1PersistentVolumeClaimVolumeSource)
-> Value
-> Parser V1PersistentVolumeClaimVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PersistentVolumeClaimVolumeSource" ((Object -> Parser V1PersistentVolumeClaimVolumeSource)
 -> Value -> Parser V1PersistentVolumeClaimVolumeSource)
-> (Object -> Parser V1PersistentVolumeClaimVolumeSource)
-> Value
-> Parser V1PersistentVolumeClaimVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Maybe Bool -> V1PersistentVolumeClaimVolumeSource
V1PersistentVolumeClaimVolumeSource
      (Text -> Maybe Bool -> V1PersistentVolumeClaimVolumeSource)
-> Parser Text
-> Parser (Maybe Bool -> V1PersistentVolumeClaimVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"claimName")
      Parser (Maybe Bool -> V1PersistentVolumeClaimVolumeSource)
-> Parser (Maybe Bool)
-> Parser V1PersistentVolumeClaimVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readOnly")

-- | ToJSON V1PersistentVolumeClaimVolumeSource
instance A.ToJSON V1PersistentVolumeClaimVolumeSource where
  toJSON :: V1PersistentVolumeClaimVolumeSource -> Value
toJSON V1PersistentVolumeClaimVolumeSource {Maybe Bool
Text
$sel:v1PersistentVolumeClaimVolumeSourceClaimName:V1PersistentVolumeClaimVolumeSource :: V1PersistentVolumeClaimVolumeSource -> Text
$sel:v1PersistentVolumeClaimVolumeSourceReadOnly:V1PersistentVolumeClaimVolumeSource :: V1PersistentVolumeClaimVolumeSource -> Maybe Bool
v1PersistentVolumeClaimVolumeSourceClaimName :: Text
v1PersistentVolumeClaimVolumeSourceReadOnly :: Maybe Bool
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"claimName" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1PersistentVolumeClaimVolumeSourceClaimName
      , Key
"readOnly" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1PersistentVolumeClaimVolumeSourceReadOnly
      ]


-- | Construct a value of type 'V1PersistentVolumeClaimVolumeSource' (by applying it's required fields, if any)
mkV1PersistentVolumeClaimVolumeSource
  :: Text -- ^ 'v1PersistentVolumeClaimVolumeSourceClaimName': claimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
  -> V1PersistentVolumeClaimVolumeSource
mkV1PersistentVolumeClaimVolumeSource :: Text -> V1PersistentVolumeClaimVolumeSource
mkV1PersistentVolumeClaimVolumeSource Text
v1PersistentVolumeClaimVolumeSourceClaimName =
  V1PersistentVolumeClaimVolumeSource
  { Text
$sel:v1PersistentVolumeClaimVolumeSourceClaimName:V1PersistentVolumeClaimVolumeSource :: Text
v1PersistentVolumeClaimVolumeSourceClaimName :: Text
v1PersistentVolumeClaimVolumeSourceClaimName
  , $sel:v1PersistentVolumeClaimVolumeSourceReadOnly:V1PersistentVolumeClaimVolumeSource :: Maybe Bool
v1PersistentVolumeClaimVolumeSourceReadOnly = Maybe Bool
forall a. Maybe a
Nothing
  }

-- ** V1PersistentVolumeList
-- | V1PersistentVolumeList
-- PersistentVolumeList is a list of PersistentVolume items.
data V1PersistentVolumeList = V1PersistentVolumeList
  { V1PersistentVolumeList -> Maybe Text
v1PersistentVolumeListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1PersistentVolumeList -> [V1PersistentVolume]
v1PersistentVolumeListItems :: !([V1PersistentVolume]) -- ^ /Required/ "items" - items is a list of persistent volumes. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes
  , V1PersistentVolumeList -> Maybe Text
v1PersistentVolumeListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1PersistentVolumeList -> Maybe V1ListMeta
v1PersistentVolumeListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1PersistentVolumeList -> ShowS
[V1PersistentVolumeList] -> ShowS
V1PersistentVolumeList -> String
(Int -> V1PersistentVolumeList -> ShowS)
-> (V1PersistentVolumeList -> String)
-> ([V1PersistentVolumeList] -> ShowS)
-> Show V1PersistentVolumeList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PersistentVolumeList -> ShowS
showsPrec :: Int -> V1PersistentVolumeList -> ShowS
$cshow :: V1PersistentVolumeList -> String
show :: V1PersistentVolumeList -> String
$cshowList :: [V1PersistentVolumeList] -> ShowS
showList :: [V1PersistentVolumeList] -> ShowS
P.Show, V1PersistentVolumeList -> V1PersistentVolumeList -> Bool
(V1PersistentVolumeList -> V1PersistentVolumeList -> Bool)
-> (V1PersistentVolumeList -> V1PersistentVolumeList -> Bool)
-> Eq V1PersistentVolumeList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PersistentVolumeList -> V1PersistentVolumeList -> Bool
== :: V1PersistentVolumeList -> V1PersistentVolumeList -> Bool
$c/= :: V1PersistentVolumeList -> V1PersistentVolumeList -> Bool
/= :: V1PersistentVolumeList -> V1PersistentVolumeList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PersistentVolumeList
instance A.FromJSON V1PersistentVolumeList where
  parseJSON :: Value -> Parser V1PersistentVolumeList
parseJSON = String
-> (Object -> Parser V1PersistentVolumeList)
-> Value
-> Parser V1PersistentVolumeList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PersistentVolumeList" ((Object -> Parser V1PersistentVolumeList)
 -> Value -> Parser V1PersistentVolumeList)
-> (Object -> Parser V1PersistentVolumeList)
-> Value
-> Parser V1PersistentVolumeList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1PersistentVolume]
-> Maybe Text
-> Maybe V1ListMeta
-> V1PersistentVolumeList
V1PersistentVolumeList
      (Maybe Text
 -> [V1PersistentVolume]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1PersistentVolumeList)
-> Parser (Maybe Text)
-> Parser
     ([V1PersistentVolume]
      -> Maybe Text -> Maybe V1ListMeta -> V1PersistentVolumeList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1PersistentVolume]
   -> Maybe Text -> Maybe V1ListMeta -> V1PersistentVolumeList)
-> Parser [V1PersistentVolume]
-> Parser
     (Maybe Text -> Maybe V1ListMeta -> V1PersistentVolumeList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1PersistentVolume]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1PersistentVolumeList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1PersistentVolumeList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1PersistentVolumeList)
-> Parser (Maybe V1ListMeta) -> Parser V1PersistentVolumeList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1PersistentVolumeList
instance A.ToJSON V1PersistentVolumeList where
  toJSON :: V1PersistentVolumeList -> Value
toJSON V1PersistentVolumeList {[V1PersistentVolume]
Maybe Text
Maybe V1ListMeta
$sel:v1PersistentVolumeListApiVersion:V1PersistentVolumeList :: V1PersistentVolumeList -> Maybe Text
$sel:v1PersistentVolumeListItems:V1PersistentVolumeList :: V1PersistentVolumeList -> [V1PersistentVolume]
$sel:v1PersistentVolumeListKind:V1PersistentVolumeList :: V1PersistentVolumeList -> Maybe Text
$sel:v1PersistentVolumeListMetadata:V1PersistentVolumeList :: V1PersistentVolumeList -> Maybe V1ListMeta
v1PersistentVolumeListApiVersion :: Maybe Text
v1PersistentVolumeListItems :: [V1PersistentVolume]
v1PersistentVolumeListKind :: Maybe Text
v1PersistentVolumeListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PersistentVolumeListApiVersion
      , Key
"items" Key -> [V1PersistentVolume] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1PersistentVolume]
v1PersistentVolumeListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PersistentVolumeListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1PersistentVolumeListMetadata
      ]


-- | Construct a value of type 'V1PersistentVolumeList' (by applying it's required fields, if any)
mkV1PersistentVolumeList
  :: [V1PersistentVolume] -- ^ 'v1PersistentVolumeListItems': items is a list of persistent volumes. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes
  -> V1PersistentVolumeList
mkV1PersistentVolumeList :: [V1PersistentVolume] -> V1PersistentVolumeList
mkV1PersistentVolumeList [V1PersistentVolume]
v1PersistentVolumeListItems =
  V1PersistentVolumeList
  { $sel:v1PersistentVolumeListApiVersion:V1PersistentVolumeList :: Maybe Text
v1PersistentVolumeListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1PersistentVolume]
$sel:v1PersistentVolumeListItems:V1PersistentVolumeList :: [V1PersistentVolume]
v1PersistentVolumeListItems :: [V1PersistentVolume]
v1PersistentVolumeListItems
  , $sel:v1PersistentVolumeListKind:V1PersistentVolumeList :: Maybe Text
v1PersistentVolumeListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeListMetadata:V1PersistentVolumeList :: Maybe V1ListMeta
v1PersistentVolumeListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1PersistentVolumeSpec
-- | V1PersistentVolumeSpec
-- PersistentVolumeSpec is the specification of a persistent volume.
data V1PersistentVolumeSpec = V1PersistentVolumeSpec
  { V1PersistentVolumeSpec -> Maybe [Text]
v1PersistentVolumeSpecAccessModes :: !(Maybe [Text]) -- ^ "accessModes" - accessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes
  , V1PersistentVolumeSpec -> Maybe V1AWSElasticBlockStoreVolumeSource
v1PersistentVolumeSpecAwsElasticBlockStore :: !(Maybe V1AWSElasticBlockStoreVolumeSource) -- ^ "awsElasticBlockStore"
  , V1PersistentVolumeSpec -> Maybe V1AzureDiskVolumeSource
v1PersistentVolumeSpecAzureDisk :: !(Maybe V1AzureDiskVolumeSource) -- ^ "azureDisk"
  , V1PersistentVolumeSpec -> Maybe V1AzureFilePersistentVolumeSource
v1PersistentVolumeSpecAzureFile :: !(Maybe V1AzureFilePersistentVolumeSource) -- ^ "azureFile"
  , V1PersistentVolumeSpec -> Maybe (Map String Quantity)
v1PersistentVolumeSpecCapacity :: !(Maybe (Map.Map String Quantity)) -- ^ "capacity" - capacity is the description of the persistent volume&#39;s resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity
  , V1PersistentVolumeSpec -> Maybe V1CephFSPersistentVolumeSource
v1PersistentVolumeSpecCephfs :: !(Maybe V1CephFSPersistentVolumeSource) -- ^ "cephfs"
  , V1PersistentVolumeSpec -> Maybe V1CinderPersistentVolumeSource
v1PersistentVolumeSpecCinder :: !(Maybe V1CinderPersistentVolumeSource) -- ^ "cinder"
  , V1PersistentVolumeSpec -> Maybe V1ObjectReference
v1PersistentVolumeSpecClaimRef :: !(Maybe V1ObjectReference) -- ^ "claimRef"
  , V1PersistentVolumeSpec -> Maybe V1CSIPersistentVolumeSource
v1PersistentVolumeSpecCsi :: !(Maybe V1CSIPersistentVolumeSource) -- ^ "csi"
  , V1PersistentVolumeSpec -> Maybe V1FCVolumeSource
v1PersistentVolumeSpecFc :: !(Maybe V1FCVolumeSource) -- ^ "fc"
  , V1PersistentVolumeSpec -> Maybe V1FlexPersistentVolumeSource
v1PersistentVolumeSpecFlexVolume :: !(Maybe V1FlexPersistentVolumeSource) -- ^ "flexVolume"
  , V1PersistentVolumeSpec -> Maybe V1FlockerVolumeSource
v1PersistentVolumeSpecFlocker :: !(Maybe V1FlockerVolumeSource) -- ^ "flocker"
  , V1PersistentVolumeSpec -> Maybe V1GCEPersistentDiskVolumeSource
v1PersistentVolumeSpecGcePersistentDisk :: !(Maybe V1GCEPersistentDiskVolumeSource) -- ^ "gcePersistentDisk"
  , V1PersistentVolumeSpec -> Maybe V1GlusterfsPersistentVolumeSource
v1PersistentVolumeSpecGlusterfs :: !(Maybe V1GlusterfsPersistentVolumeSource) -- ^ "glusterfs"
  , V1PersistentVolumeSpec -> Maybe V1HostPathVolumeSource
v1PersistentVolumeSpecHostPath :: !(Maybe V1HostPathVolumeSource) -- ^ "hostPath"
  , V1PersistentVolumeSpec -> Maybe V1ISCSIPersistentVolumeSource
v1PersistentVolumeSpecIscsi :: !(Maybe V1ISCSIPersistentVolumeSource) -- ^ "iscsi"
  , V1PersistentVolumeSpec -> Maybe V1LocalVolumeSource
v1PersistentVolumeSpecLocal :: !(Maybe V1LocalVolumeSource) -- ^ "local"
  , V1PersistentVolumeSpec -> Maybe [Text]
v1PersistentVolumeSpecMountOptions :: !(Maybe [Text]) -- ^ "mountOptions" - mountOptions is the list of mount options, e.g. [\&quot;ro\&quot;, \&quot;soft\&quot;]. Not validated - mount will simply fail if one is invalid. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options
  , V1PersistentVolumeSpec -> Maybe V1NFSVolumeSource
v1PersistentVolumeSpecNfs :: !(Maybe V1NFSVolumeSource) -- ^ "nfs"
  , V1PersistentVolumeSpec -> Maybe V1VolumeNodeAffinity
v1PersistentVolumeSpecNodeAffinity :: !(Maybe V1VolumeNodeAffinity) -- ^ "nodeAffinity"
  , V1PersistentVolumeSpec -> Maybe Text
v1PersistentVolumeSpecPersistentVolumeReclaimPolicy :: !(Maybe Text) -- ^ "persistentVolumeReclaimPolicy" - persistentVolumeReclaimPolicy defines what happens to a persistent volume when released from its claim. Valid options are Retain (default for manually created PersistentVolumes), Delete (default for dynamically provisioned PersistentVolumes), and Recycle (deprecated). Recycle must be supported by the volume plugin underlying this PersistentVolume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming
  , V1PersistentVolumeSpec -> Maybe V1PhotonPersistentDiskVolumeSource
v1PersistentVolumeSpecPhotonPersistentDisk :: !(Maybe V1PhotonPersistentDiskVolumeSource) -- ^ "photonPersistentDisk"
  , V1PersistentVolumeSpec -> Maybe V1PortworxVolumeSource
v1PersistentVolumeSpecPortworxVolume :: !(Maybe V1PortworxVolumeSource) -- ^ "portworxVolume"
  , V1PersistentVolumeSpec -> Maybe V1QuobyteVolumeSource
v1PersistentVolumeSpecQuobyte :: !(Maybe V1QuobyteVolumeSource) -- ^ "quobyte"
  , V1PersistentVolumeSpec -> Maybe V1RBDPersistentVolumeSource
v1PersistentVolumeSpecRbd :: !(Maybe V1RBDPersistentVolumeSource) -- ^ "rbd"
  , V1PersistentVolumeSpec -> Maybe V1ScaleIOPersistentVolumeSource
v1PersistentVolumeSpecScaleIo :: !(Maybe V1ScaleIOPersistentVolumeSource) -- ^ "scaleIO"
  , V1PersistentVolumeSpec -> Maybe Text
v1PersistentVolumeSpecStorageClassName :: !(Maybe Text) -- ^ "storageClassName" - storageClassName is the name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.
  , V1PersistentVolumeSpec -> Maybe V1StorageOSPersistentVolumeSource
v1PersistentVolumeSpecStorageos :: !(Maybe V1StorageOSPersistentVolumeSource) -- ^ "storageos"
  , V1PersistentVolumeSpec -> Maybe Text
v1PersistentVolumeSpecVolumeAttributesClassName :: !(Maybe Text) -- ^ "volumeAttributesClassName" - Name of VolumeAttributesClass to which this persistent volume belongs. Empty value is not allowed. When this field is not set, it indicates that this volume does not belong to any VolumeAttributesClass. This field is mutable and can be changed by the CSI driver after a volume has been updated successfully to a new class. For an unbound PersistentVolume, the volumeAttributesClassName will be matched with unbound PersistentVolumeClaims during the binding process. This is a beta field and requires enabling VolumeAttributesClass feature (off by default).
  , V1PersistentVolumeSpec -> Maybe Text
v1PersistentVolumeSpecVolumeMode :: !(Maybe Text) -- ^ "volumeMode" - volumeMode defines if a volume is intended to be used with a formatted filesystem or to remain in raw block state. Value of Filesystem is implied when not included in spec.
  , V1PersistentVolumeSpec -> Maybe V1VsphereVirtualDiskVolumeSource
v1PersistentVolumeSpecVsphereVolume :: !(Maybe V1VsphereVirtualDiskVolumeSource) -- ^ "vsphereVolume"
  } deriving (Int -> V1PersistentVolumeSpec -> ShowS
[V1PersistentVolumeSpec] -> ShowS
V1PersistentVolumeSpec -> String
(Int -> V1PersistentVolumeSpec -> ShowS)
-> (V1PersistentVolumeSpec -> String)
-> ([V1PersistentVolumeSpec] -> ShowS)
-> Show V1PersistentVolumeSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PersistentVolumeSpec -> ShowS
showsPrec :: Int -> V1PersistentVolumeSpec -> ShowS
$cshow :: V1PersistentVolumeSpec -> String
show :: V1PersistentVolumeSpec -> String
$cshowList :: [V1PersistentVolumeSpec] -> ShowS
showList :: [V1PersistentVolumeSpec] -> ShowS
P.Show, V1PersistentVolumeSpec -> V1PersistentVolumeSpec -> Bool
(V1PersistentVolumeSpec -> V1PersistentVolumeSpec -> Bool)
-> (V1PersistentVolumeSpec -> V1PersistentVolumeSpec -> Bool)
-> Eq V1PersistentVolumeSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PersistentVolumeSpec -> V1PersistentVolumeSpec -> Bool
== :: V1PersistentVolumeSpec -> V1PersistentVolumeSpec -> Bool
$c/= :: V1PersistentVolumeSpec -> V1PersistentVolumeSpec -> Bool
/= :: V1PersistentVolumeSpec -> V1PersistentVolumeSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PersistentVolumeSpec
instance A.FromJSON V1PersistentVolumeSpec where
  parseJSON :: Value -> Parser V1PersistentVolumeSpec
parseJSON = String
-> (Object -> Parser V1PersistentVolumeSpec)
-> Value
-> Parser V1PersistentVolumeSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PersistentVolumeSpec" ((Object -> Parser V1PersistentVolumeSpec)
 -> Value -> Parser V1PersistentVolumeSpec)
-> (Object -> Parser V1PersistentVolumeSpec)
-> Value
-> Parser V1PersistentVolumeSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [Text]
-> Maybe V1AWSElasticBlockStoreVolumeSource
-> Maybe V1AzureDiskVolumeSource
-> Maybe V1AzureFilePersistentVolumeSource
-> Maybe (Map String Quantity)
-> Maybe V1CephFSPersistentVolumeSource
-> Maybe V1CinderPersistentVolumeSource
-> Maybe V1ObjectReference
-> Maybe V1CSIPersistentVolumeSource
-> Maybe V1FCVolumeSource
-> Maybe V1FlexPersistentVolumeSource
-> Maybe V1FlockerVolumeSource
-> Maybe V1GCEPersistentDiskVolumeSource
-> Maybe V1GlusterfsPersistentVolumeSource
-> Maybe V1HostPathVolumeSource
-> Maybe V1ISCSIPersistentVolumeSource
-> Maybe V1LocalVolumeSource
-> Maybe [Text]
-> Maybe V1NFSVolumeSource
-> Maybe V1VolumeNodeAffinity
-> Maybe Text
-> Maybe V1PhotonPersistentDiskVolumeSource
-> Maybe V1PortworxVolumeSource
-> Maybe V1QuobyteVolumeSource
-> Maybe V1RBDPersistentVolumeSource
-> Maybe V1ScaleIOPersistentVolumeSource
-> Maybe Text
-> Maybe V1StorageOSPersistentVolumeSource
-> Maybe Text
-> Maybe Text
-> Maybe V1VsphereVirtualDiskVolumeSource
-> V1PersistentVolumeSpec
V1PersistentVolumeSpec
      (Maybe [Text]
 -> Maybe V1AWSElasticBlockStoreVolumeSource
 -> Maybe V1AzureDiskVolumeSource
 -> Maybe V1AzureFilePersistentVolumeSource
 -> Maybe (Map String Quantity)
 -> Maybe V1CephFSPersistentVolumeSource
 -> Maybe V1CinderPersistentVolumeSource
 -> Maybe V1ObjectReference
 -> Maybe V1CSIPersistentVolumeSource
 -> Maybe V1FCVolumeSource
 -> Maybe V1FlexPersistentVolumeSource
 -> Maybe V1FlockerVolumeSource
 -> Maybe V1GCEPersistentDiskVolumeSource
 -> Maybe V1GlusterfsPersistentVolumeSource
 -> Maybe V1HostPathVolumeSource
 -> Maybe V1ISCSIPersistentVolumeSource
 -> Maybe V1LocalVolumeSource
 -> Maybe [Text]
 -> Maybe V1NFSVolumeSource
 -> Maybe V1VolumeNodeAffinity
 -> Maybe Text
 -> Maybe V1PhotonPersistentDiskVolumeSource
 -> Maybe V1PortworxVolumeSource
 -> Maybe V1QuobyteVolumeSource
 -> Maybe V1RBDPersistentVolumeSource
 -> Maybe V1ScaleIOPersistentVolumeSource
 -> Maybe Text
 -> Maybe V1StorageOSPersistentVolumeSource
 -> Maybe Text
 -> Maybe Text
 -> Maybe V1VsphereVirtualDiskVolumeSource
 -> V1PersistentVolumeSpec)
-> Parser (Maybe [Text])
-> Parser
     (Maybe V1AWSElasticBlockStoreVolumeSource
      -> Maybe V1AzureDiskVolumeSource
      -> Maybe V1AzureFilePersistentVolumeSource
      -> Maybe (Map String Quantity)
      -> Maybe V1CephFSPersistentVolumeSource
      -> Maybe V1CinderPersistentVolumeSource
      -> Maybe V1ObjectReference
      -> Maybe V1CSIPersistentVolumeSource
      -> Maybe V1FCVolumeSource
      -> Maybe V1FlexPersistentVolumeSource
      -> Maybe V1FlockerVolumeSource
      -> Maybe V1GCEPersistentDiskVolumeSource
      -> Maybe V1GlusterfsPersistentVolumeSource
      -> Maybe V1HostPathVolumeSource
      -> Maybe V1ISCSIPersistentVolumeSource
      -> Maybe V1LocalVolumeSource
      -> Maybe [Text]
      -> Maybe V1NFSVolumeSource
      -> Maybe V1VolumeNodeAffinity
      -> Maybe Text
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDPersistentVolumeSource
      -> Maybe V1ScaleIOPersistentVolumeSource
      -> Maybe Text
      -> Maybe V1StorageOSPersistentVolumeSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1PersistentVolumeSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"accessModes")
      Parser
  (Maybe V1AWSElasticBlockStoreVolumeSource
   -> Maybe V1AzureDiskVolumeSource
   -> Maybe V1AzureFilePersistentVolumeSource
   -> Maybe (Map String Quantity)
   -> Maybe V1CephFSPersistentVolumeSource
   -> Maybe V1CinderPersistentVolumeSource
   -> Maybe V1ObjectReference
   -> Maybe V1CSIPersistentVolumeSource
   -> Maybe V1FCVolumeSource
   -> Maybe V1FlexPersistentVolumeSource
   -> Maybe V1FlockerVolumeSource
   -> Maybe V1GCEPersistentDiskVolumeSource
   -> Maybe V1GlusterfsPersistentVolumeSource
   -> Maybe V1HostPathVolumeSource
   -> Maybe V1ISCSIPersistentVolumeSource
   -> Maybe V1LocalVolumeSource
   -> Maybe [Text]
   -> Maybe V1NFSVolumeSource
   -> Maybe V1VolumeNodeAffinity
   -> Maybe Text
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDPersistentVolumeSource
   -> Maybe V1ScaleIOPersistentVolumeSource
   -> Maybe Text
   -> Maybe V1StorageOSPersistentVolumeSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1PersistentVolumeSpec)
-> Parser (Maybe V1AWSElasticBlockStoreVolumeSource)
-> Parser
     (Maybe V1AzureDiskVolumeSource
      -> Maybe V1AzureFilePersistentVolumeSource
      -> Maybe (Map String Quantity)
      -> Maybe V1CephFSPersistentVolumeSource
      -> Maybe V1CinderPersistentVolumeSource
      -> Maybe V1ObjectReference
      -> Maybe V1CSIPersistentVolumeSource
      -> Maybe V1FCVolumeSource
      -> Maybe V1FlexPersistentVolumeSource
      -> Maybe V1FlockerVolumeSource
      -> Maybe V1GCEPersistentDiskVolumeSource
      -> Maybe V1GlusterfsPersistentVolumeSource
      -> Maybe V1HostPathVolumeSource
      -> Maybe V1ISCSIPersistentVolumeSource
      -> Maybe V1LocalVolumeSource
      -> Maybe [Text]
      -> Maybe V1NFSVolumeSource
      -> Maybe V1VolumeNodeAffinity
      -> Maybe Text
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDPersistentVolumeSource
      -> Maybe V1ScaleIOPersistentVolumeSource
      -> Maybe Text
      -> Maybe V1StorageOSPersistentVolumeSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1PersistentVolumeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1AWSElasticBlockStoreVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"awsElasticBlockStore")
      Parser
  (Maybe V1AzureDiskVolumeSource
   -> Maybe V1AzureFilePersistentVolumeSource
   -> Maybe (Map String Quantity)
   -> Maybe V1CephFSPersistentVolumeSource
   -> Maybe V1CinderPersistentVolumeSource
   -> Maybe V1ObjectReference
   -> Maybe V1CSIPersistentVolumeSource
   -> Maybe V1FCVolumeSource
   -> Maybe V1FlexPersistentVolumeSource
   -> Maybe V1FlockerVolumeSource
   -> Maybe V1GCEPersistentDiskVolumeSource
   -> Maybe V1GlusterfsPersistentVolumeSource
   -> Maybe V1HostPathVolumeSource
   -> Maybe V1ISCSIPersistentVolumeSource
   -> Maybe V1LocalVolumeSource
   -> Maybe [Text]
   -> Maybe V1NFSVolumeSource
   -> Maybe V1VolumeNodeAffinity
   -> Maybe Text
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDPersistentVolumeSource
   -> Maybe V1ScaleIOPersistentVolumeSource
   -> Maybe Text
   -> Maybe V1StorageOSPersistentVolumeSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1PersistentVolumeSpec)
-> Parser (Maybe V1AzureDiskVolumeSource)
-> Parser
     (Maybe V1AzureFilePersistentVolumeSource
      -> Maybe (Map String Quantity)
      -> Maybe V1CephFSPersistentVolumeSource
      -> Maybe V1CinderPersistentVolumeSource
      -> Maybe V1ObjectReference
      -> Maybe V1CSIPersistentVolumeSource
      -> Maybe V1FCVolumeSource
      -> Maybe V1FlexPersistentVolumeSource
      -> Maybe V1FlockerVolumeSource
      -> Maybe V1GCEPersistentDiskVolumeSource
      -> Maybe V1GlusterfsPersistentVolumeSource
      -> Maybe V1HostPathVolumeSource
      -> Maybe V1ISCSIPersistentVolumeSource
      -> Maybe V1LocalVolumeSource
      -> Maybe [Text]
      -> Maybe V1NFSVolumeSource
      -> Maybe V1VolumeNodeAffinity
      -> Maybe Text
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDPersistentVolumeSource
      -> Maybe V1ScaleIOPersistentVolumeSource
      -> Maybe Text
      -> Maybe V1StorageOSPersistentVolumeSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1PersistentVolumeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1AzureDiskVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"azureDisk")
      Parser
  (Maybe V1AzureFilePersistentVolumeSource
   -> Maybe (Map String Quantity)
   -> Maybe V1CephFSPersistentVolumeSource
   -> Maybe V1CinderPersistentVolumeSource
   -> Maybe V1ObjectReference
   -> Maybe V1CSIPersistentVolumeSource
   -> Maybe V1FCVolumeSource
   -> Maybe V1FlexPersistentVolumeSource
   -> Maybe V1FlockerVolumeSource
   -> Maybe V1GCEPersistentDiskVolumeSource
   -> Maybe V1GlusterfsPersistentVolumeSource
   -> Maybe V1HostPathVolumeSource
   -> Maybe V1ISCSIPersistentVolumeSource
   -> Maybe V1LocalVolumeSource
   -> Maybe [Text]
   -> Maybe V1NFSVolumeSource
   -> Maybe V1VolumeNodeAffinity
   -> Maybe Text
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDPersistentVolumeSource
   -> Maybe V1ScaleIOPersistentVolumeSource
   -> Maybe Text
   -> Maybe V1StorageOSPersistentVolumeSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1PersistentVolumeSpec)
-> Parser (Maybe V1AzureFilePersistentVolumeSource)
-> Parser
     (Maybe (Map String Quantity)
      -> Maybe V1CephFSPersistentVolumeSource
      -> Maybe V1CinderPersistentVolumeSource
      -> Maybe V1ObjectReference
      -> Maybe V1CSIPersistentVolumeSource
      -> Maybe V1FCVolumeSource
      -> Maybe V1FlexPersistentVolumeSource
      -> Maybe V1FlockerVolumeSource
      -> Maybe V1GCEPersistentDiskVolumeSource
      -> Maybe V1GlusterfsPersistentVolumeSource
      -> Maybe V1HostPathVolumeSource
      -> Maybe V1ISCSIPersistentVolumeSource
      -> Maybe V1LocalVolumeSource
      -> Maybe [Text]
      -> Maybe V1NFSVolumeSource
      -> Maybe V1VolumeNodeAffinity
      -> Maybe Text
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDPersistentVolumeSource
      -> Maybe V1ScaleIOPersistentVolumeSource
      -> Maybe Text
      -> Maybe V1StorageOSPersistentVolumeSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1PersistentVolumeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1AzureFilePersistentVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"azureFile")
      Parser
  (Maybe (Map String Quantity)
   -> Maybe V1CephFSPersistentVolumeSource
   -> Maybe V1CinderPersistentVolumeSource
   -> Maybe V1ObjectReference
   -> Maybe V1CSIPersistentVolumeSource
   -> Maybe V1FCVolumeSource
   -> Maybe V1FlexPersistentVolumeSource
   -> Maybe V1FlockerVolumeSource
   -> Maybe V1GCEPersistentDiskVolumeSource
   -> Maybe V1GlusterfsPersistentVolumeSource
   -> Maybe V1HostPathVolumeSource
   -> Maybe V1ISCSIPersistentVolumeSource
   -> Maybe V1LocalVolumeSource
   -> Maybe [Text]
   -> Maybe V1NFSVolumeSource
   -> Maybe V1VolumeNodeAffinity
   -> Maybe Text
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDPersistentVolumeSource
   -> Maybe V1ScaleIOPersistentVolumeSource
   -> Maybe Text
   -> Maybe V1StorageOSPersistentVolumeSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1PersistentVolumeSpec)
-> Parser (Maybe (Map String Quantity))
-> Parser
     (Maybe V1CephFSPersistentVolumeSource
      -> Maybe V1CinderPersistentVolumeSource
      -> Maybe V1ObjectReference
      -> Maybe V1CSIPersistentVolumeSource
      -> Maybe V1FCVolumeSource
      -> Maybe V1FlexPersistentVolumeSource
      -> Maybe V1FlockerVolumeSource
      -> Maybe V1GCEPersistentDiskVolumeSource
      -> Maybe V1GlusterfsPersistentVolumeSource
      -> Maybe V1HostPathVolumeSource
      -> Maybe V1ISCSIPersistentVolumeSource
      -> Maybe V1LocalVolumeSource
      -> Maybe [Text]
      -> Maybe V1NFSVolumeSource
      -> Maybe V1VolumeNodeAffinity
      -> Maybe Text
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDPersistentVolumeSource
      -> Maybe V1ScaleIOPersistentVolumeSource
      -> Maybe Text
      -> Maybe V1StorageOSPersistentVolumeSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1PersistentVolumeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String Quantity))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"capacity")
      Parser
  (Maybe V1CephFSPersistentVolumeSource
   -> Maybe V1CinderPersistentVolumeSource
   -> Maybe V1ObjectReference
   -> Maybe V1CSIPersistentVolumeSource
   -> Maybe V1FCVolumeSource
   -> Maybe V1FlexPersistentVolumeSource
   -> Maybe V1FlockerVolumeSource
   -> Maybe V1GCEPersistentDiskVolumeSource
   -> Maybe V1GlusterfsPersistentVolumeSource
   -> Maybe V1HostPathVolumeSource
   -> Maybe V1ISCSIPersistentVolumeSource
   -> Maybe V1LocalVolumeSource
   -> Maybe [Text]
   -> Maybe V1NFSVolumeSource
   -> Maybe V1VolumeNodeAffinity
   -> Maybe Text
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDPersistentVolumeSource
   -> Maybe V1ScaleIOPersistentVolumeSource
   -> Maybe Text
   -> Maybe V1StorageOSPersistentVolumeSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1PersistentVolumeSpec)
-> Parser (Maybe V1CephFSPersistentVolumeSource)
-> Parser
     (Maybe V1CinderPersistentVolumeSource
      -> Maybe V1ObjectReference
      -> Maybe V1CSIPersistentVolumeSource
      -> Maybe V1FCVolumeSource
      -> Maybe V1FlexPersistentVolumeSource
      -> Maybe V1FlockerVolumeSource
      -> Maybe V1GCEPersistentDiskVolumeSource
      -> Maybe V1GlusterfsPersistentVolumeSource
      -> Maybe V1HostPathVolumeSource
      -> Maybe V1ISCSIPersistentVolumeSource
      -> Maybe V1LocalVolumeSource
      -> Maybe [Text]
      -> Maybe V1NFSVolumeSource
      -> Maybe V1VolumeNodeAffinity
      -> Maybe Text
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDPersistentVolumeSource
      -> Maybe V1ScaleIOPersistentVolumeSource
      -> Maybe Text
      -> Maybe V1StorageOSPersistentVolumeSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1PersistentVolumeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1CephFSPersistentVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"cephfs")
      Parser
  (Maybe V1CinderPersistentVolumeSource
   -> Maybe V1ObjectReference
   -> Maybe V1CSIPersistentVolumeSource
   -> Maybe V1FCVolumeSource
   -> Maybe V1FlexPersistentVolumeSource
   -> Maybe V1FlockerVolumeSource
   -> Maybe V1GCEPersistentDiskVolumeSource
   -> Maybe V1GlusterfsPersistentVolumeSource
   -> Maybe V1HostPathVolumeSource
   -> Maybe V1ISCSIPersistentVolumeSource
   -> Maybe V1LocalVolumeSource
   -> Maybe [Text]
   -> Maybe V1NFSVolumeSource
   -> Maybe V1VolumeNodeAffinity
   -> Maybe Text
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDPersistentVolumeSource
   -> Maybe V1ScaleIOPersistentVolumeSource
   -> Maybe Text
   -> Maybe V1StorageOSPersistentVolumeSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1PersistentVolumeSpec)
-> Parser (Maybe V1CinderPersistentVolumeSource)
-> Parser
     (Maybe V1ObjectReference
      -> Maybe V1CSIPersistentVolumeSource
      -> Maybe V1FCVolumeSource
      -> Maybe V1FlexPersistentVolumeSource
      -> Maybe V1FlockerVolumeSource
      -> Maybe V1GCEPersistentDiskVolumeSource
      -> Maybe V1GlusterfsPersistentVolumeSource
      -> Maybe V1HostPathVolumeSource
      -> Maybe V1ISCSIPersistentVolumeSource
      -> Maybe V1LocalVolumeSource
      -> Maybe [Text]
      -> Maybe V1NFSVolumeSource
      -> Maybe V1VolumeNodeAffinity
      -> Maybe Text
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDPersistentVolumeSource
      -> Maybe V1ScaleIOPersistentVolumeSource
      -> Maybe Text
      -> Maybe V1StorageOSPersistentVolumeSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1PersistentVolumeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1CinderPersistentVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"cinder")
      Parser
  (Maybe V1ObjectReference
   -> Maybe V1CSIPersistentVolumeSource
   -> Maybe V1FCVolumeSource
   -> Maybe V1FlexPersistentVolumeSource
   -> Maybe V1FlockerVolumeSource
   -> Maybe V1GCEPersistentDiskVolumeSource
   -> Maybe V1GlusterfsPersistentVolumeSource
   -> Maybe V1HostPathVolumeSource
   -> Maybe V1ISCSIPersistentVolumeSource
   -> Maybe V1LocalVolumeSource
   -> Maybe [Text]
   -> Maybe V1NFSVolumeSource
   -> Maybe V1VolumeNodeAffinity
   -> Maybe Text
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDPersistentVolumeSource
   -> Maybe V1ScaleIOPersistentVolumeSource
   -> Maybe Text
   -> Maybe V1StorageOSPersistentVolumeSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1PersistentVolumeSpec)
-> Parser (Maybe V1ObjectReference)
-> Parser
     (Maybe V1CSIPersistentVolumeSource
      -> Maybe V1FCVolumeSource
      -> Maybe V1FlexPersistentVolumeSource
      -> Maybe V1FlockerVolumeSource
      -> Maybe V1GCEPersistentDiskVolumeSource
      -> Maybe V1GlusterfsPersistentVolumeSource
      -> Maybe V1HostPathVolumeSource
      -> Maybe V1ISCSIPersistentVolumeSource
      -> Maybe V1LocalVolumeSource
      -> Maybe [Text]
      -> Maybe V1NFSVolumeSource
      -> Maybe V1VolumeNodeAffinity
      -> Maybe Text
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDPersistentVolumeSource
      -> Maybe V1ScaleIOPersistentVolumeSource
      -> Maybe Text
      -> Maybe V1StorageOSPersistentVolumeSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1PersistentVolumeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectReference)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"claimRef")
      Parser
  (Maybe V1CSIPersistentVolumeSource
   -> Maybe V1FCVolumeSource
   -> Maybe V1FlexPersistentVolumeSource
   -> Maybe V1FlockerVolumeSource
   -> Maybe V1GCEPersistentDiskVolumeSource
   -> Maybe V1GlusterfsPersistentVolumeSource
   -> Maybe V1HostPathVolumeSource
   -> Maybe V1ISCSIPersistentVolumeSource
   -> Maybe V1LocalVolumeSource
   -> Maybe [Text]
   -> Maybe V1NFSVolumeSource
   -> Maybe V1VolumeNodeAffinity
   -> Maybe Text
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDPersistentVolumeSource
   -> Maybe V1ScaleIOPersistentVolumeSource
   -> Maybe Text
   -> Maybe V1StorageOSPersistentVolumeSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1PersistentVolumeSpec)
-> Parser (Maybe V1CSIPersistentVolumeSource)
-> Parser
     (Maybe V1FCVolumeSource
      -> Maybe V1FlexPersistentVolumeSource
      -> Maybe V1FlockerVolumeSource
      -> Maybe V1GCEPersistentDiskVolumeSource
      -> Maybe V1GlusterfsPersistentVolumeSource
      -> Maybe V1HostPathVolumeSource
      -> Maybe V1ISCSIPersistentVolumeSource
      -> Maybe V1LocalVolumeSource
      -> Maybe [Text]
      -> Maybe V1NFSVolumeSource
      -> Maybe V1VolumeNodeAffinity
      -> Maybe Text
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDPersistentVolumeSource
      -> Maybe V1ScaleIOPersistentVolumeSource
      -> Maybe Text
      -> Maybe V1StorageOSPersistentVolumeSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1PersistentVolumeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1CSIPersistentVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"csi")
      Parser
  (Maybe V1FCVolumeSource
   -> Maybe V1FlexPersistentVolumeSource
   -> Maybe V1FlockerVolumeSource
   -> Maybe V1GCEPersistentDiskVolumeSource
   -> Maybe V1GlusterfsPersistentVolumeSource
   -> Maybe V1HostPathVolumeSource
   -> Maybe V1ISCSIPersistentVolumeSource
   -> Maybe V1LocalVolumeSource
   -> Maybe [Text]
   -> Maybe V1NFSVolumeSource
   -> Maybe V1VolumeNodeAffinity
   -> Maybe Text
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDPersistentVolumeSource
   -> Maybe V1ScaleIOPersistentVolumeSource
   -> Maybe Text
   -> Maybe V1StorageOSPersistentVolumeSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1PersistentVolumeSpec)
-> Parser (Maybe V1FCVolumeSource)
-> Parser
     (Maybe V1FlexPersistentVolumeSource
      -> Maybe V1FlockerVolumeSource
      -> Maybe V1GCEPersistentDiskVolumeSource
      -> Maybe V1GlusterfsPersistentVolumeSource
      -> Maybe V1HostPathVolumeSource
      -> Maybe V1ISCSIPersistentVolumeSource
      -> Maybe V1LocalVolumeSource
      -> Maybe [Text]
      -> Maybe V1NFSVolumeSource
      -> Maybe V1VolumeNodeAffinity
      -> Maybe Text
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDPersistentVolumeSource
      -> Maybe V1ScaleIOPersistentVolumeSource
      -> Maybe Text
      -> Maybe V1StorageOSPersistentVolumeSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1PersistentVolumeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1FCVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fc")
      Parser
  (Maybe V1FlexPersistentVolumeSource
   -> Maybe V1FlockerVolumeSource
   -> Maybe V1GCEPersistentDiskVolumeSource
   -> Maybe V1GlusterfsPersistentVolumeSource
   -> Maybe V1HostPathVolumeSource
   -> Maybe V1ISCSIPersistentVolumeSource
   -> Maybe V1LocalVolumeSource
   -> Maybe [Text]
   -> Maybe V1NFSVolumeSource
   -> Maybe V1VolumeNodeAffinity
   -> Maybe Text
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDPersistentVolumeSource
   -> Maybe V1ScaleIOPersistentVolumeSource
   -> Maybe Text
   -> Maybe V1StorageOSPersistentVolumeSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1PersistentVolumeSpec)
-> Parser (Maybe V1FlexPersistentVolumeSource)
-> Parser
     (Maybe V1FlockerVolumeSource
      -> Maybe V1GCEPersistentDiskVolumeSource
      -> Maybe V1GlusterfsPersistentVolumeSource
      -> Maybe V1HostPathVolumeSource
      -> Maybe V1ISCSIPersistentVolumeSource
      -> Maybe V1LocalVolumeSource
      -> Maybe [Text]
      -> Maybe V1NFSVolumeSource
      -> Maybe V1VolumeNodeAffinity
      -> Maybe Text
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDPersistentVolumeSource
      -> Maybe V1ScaleIOPersistentVolumeSource
      -> Maybe Text
      -> Maybe V1StorageOSPersistentVolumeSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1PersistentVolumeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1FlexPersistentVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"flexVolume")
      Parser
  (Maybe V1FlockerVolumeSource
   -> Maybe V1GCEPersistentDiskVolumeSource
   -> Maybe V1GlusterfsPersistentVolumeSource
   -> Maybe V1HostPathVolumeSource
   -> Maybe V1ISCSIPersistentVolumeSource
   -> Maybe V1LocalVolumeSource
   -> Maybe [Text]
   -> Maybe V1NFSVolumeSource
   -> Maybe V1VolumeNodeAffinity
   -> Maybe Text
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDPersistentVolumeSource
   -> Maybe V1ScaleIOPersistentVolumeSource
   -> Maybe Text
   -> Maybe V1StorageOSPersistentVolumeSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1PersistentVolumeSpec)
-> Parser (Maybe V1FlockerVolumeSource)
-> Parser
     (Maybe V1GCEPersistentDiskVolumeSource
      -> Maybe V1GlusterfsPersistentVolumeSource
      -> Maybe V1HostPathVolumeSource
      -> Maybe V1ISCSIPersistentVolumeSource
      -> Maybe V1LocalVolumeSource
      -> Maybe [Text]
      -> Maybe V1NFSVolumeSource
      -> Maybe V1VolumeNodeAffinity
      -> Maybe Text
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDPersistentVolumeSource
      -> Maybe V1ScaleIOPersistentVolumeSource
      -> Maybe Text
      -> Maybe V1StorageOSPersistentVolumeSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1PersistentVolumeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1FlockerVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"flocker")
      Parser
  (Maybe V1GCEPersistentDiskVolumeSource
   -> Maybe V1GlusterfsPersistentVolumeSource
   -> Maybe V1HostPathVolumeSource
   -> Maybe V1ISCSIPersistentVolumeSource
   -> Maybe V1LocalVolumeSource
   -> Maybe [Text]
   -> Maybe V1NFSVolumeSource
   -> Maybe V1VolumeNodeAffinity
   -> Maybe Text
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDPersistentVolumeSource
   -> Maybe V1ScaleIOPersistentVolumeSource
   -> Maybe Text
   -> Maybe V1StorageOSPersistentVolumeSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1PersistentVolumeSpec)
-> Parser (Maybe V1GCEPersistentDiskVolumeSource)
-> Parser
     (Maybe V1GlusterfsPersistentVolumeSource
      -> Maybe V1HostPathVolumeSource
      -> Maybe V1ISCSIPersistentVolumeSource
      -> Maybe V1LocalVolumeSource
      -> Maybe [Text]
      -> Maybe V1NFSVolumeSource
      -> Maybe V1VolumeNodeAffinity
      -> Maybe Text
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDPersistentVolumeSource
      -> Maybe V1ScaleIOPersistentVolumeSource
      -> Maybe Text
      -> Maybe V1StorageOSPersistentVolumeSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1PersistentVolumeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1GCEPersistentDiskVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"gcePersistentDisk")
      Parser
  (Maybe V1GlusterfsPersistentVolumeSource
   -> Maybe V1HostPathVolumeSource
   -> Maybe V1ISCSIPersistentVolumeSource
   -> Maybe V1LocalVolumeSource
   -> Maybe [Text]
   -> Maybe V1NFSVolumeSource
   -> Maybe V1VolumeNodeAffinity
   -> Maybe Text
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDPersistentVolumeSource
   -> Maybe V1ScaleIOPersistentVolumeSource
   -> Maybe Text
   -> Maybe V1StorageOSPersistentVolumeSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1PersistentVolumeSpec)
-> Parser (Maybe V1GlusterfsPersistentVolumeSource)
-> Parser
     (Maybe V1HostPathVolumeSource
      -> Maybe V1ISCSIPersistentVolumeSource
      -> Maybe V1LocalVolumeSource
      -> Maybe [Text]
      -> Maybe V1NFSVolumeSource
      -> Maybe V1VolumeNodeAffinity
      -> Maybe Text
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDPersistentVolumeSource
      -> Maybe V1ScaleIOPersistentVolumeSource
      -> Maybe Text
      -> Maybe V1StorageOSPersistentVolumeSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1PersistentVolumeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1GlusterfsPersistentVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"glusterfs")
      Parser
  (Maybe V1HostPathVolumeSource
   -> Maybe V1ISCSIPersistentVolumeSource
   -> Maybe V1LocalVolumeSource
   -> Maybe [Text]
   -> Maybe V1NFSVolumeSource
   -> Maybe V1VolumeNodeAffinity
   -> Maybe Text
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDPersistentVolumeSource
   -> Maybe V1ScaleIOPersistentVolumeSource
   -> Maybe Text
   -> Maybe V1StorageOSPersistentVolumeSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1PersistentVolumeSpec)
-> Parser (Maybe V1HostPathVolumeSource)
-> Parser
     (Maybe V1ISCSIPersistentVolumeSource
      -> Maybe V1LocalVolumeSource
      -> Maybe [Text]
      -> Maybe V1NFSVolumeSource
      -> Maybe V1VolumeNodeAffinity
      -> Maybe Text
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDPersistentVolumeSource
      -> Maybe V1ScaleIOPersistentVolumeSource
      -> Maybe Text
      -> Maybe V1StorageOSPersistentVolumeSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1PersistentVolumeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1HostPathVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"hostPath")
      Parser
  (Maybe V1ISCSIPersistentVolumeSource
   -> Maybe V1LocalVolumeSource
   -> Maybe [Text]
   -> Maybe V1NFSVolumeSource
   -> Maybe V1VolumeNodeAffinity
   -> Maybe Text
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDPersistentVolumeSource
   -> Maybe V1ScaleIOPersistentVolumeSource
   -> Maybe Text
   -> Maybe V1StorageOSPersistentVolumeSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1PersistentVolumeSpec)
-> Parser (Maybe V1ISCSIPersistentVolumeSource)
-> Parser
     (Maybe V1LocalVolumeSource
      -> Maybe [Text]
      -> Maybe V1NFSVolumeSource
      -> Maybe V1VolumeNodeAffinity
      -> Maybe Text
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDPersistentVolumeSource
      -> Maybe V1ScaleIOPersistentVolumeSource
      -> Maybe Text
      -> Maybe V1StorageOSPersistentVolumeSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1PersistentVolumeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ISCSIPersistentVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"iscsi")
      Parser
  (Maybe V1LocalVolumeSource
   -> Maybe [Text]
   -> Maybe V1NFSVolumeSource
   -> Maybe V1VolumeNodeAffinity
   -> Maybe Text
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDPersistentVolumeSource
   -> Maybe V1ScaleIOPersistentVolumeSource
   -> Maybe Text
   -> Maybe V1StorageOSPersistentVolumeSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1PersistentVolumeSpec)
-> Parser (Maybe V1LocalVolumeSource)
-> Parser
     (Maybe [Text]
      -> Maybe V1NFSVolumeSource
      -> Maybe V1VolumeNodeAffinity
      -> Maybe Text
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDPersistentVolumeSource
      -> Maybe V1ScaleIOPersistentVolumeSource
      -> Maybe Text
      -> Maybe V1StorageOSPersistentVolumeSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1PersistentVolumeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LocalVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"local")
      Parser
  (Maybe [Text]
   -> Maybe V1NFSVolumeSource
   -> Maybe V1VolumeNodeAffinity
   -> Maybe Text
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDPersistentVolumeSource
   -> Maybe V1ScaleIOPersistentVolumeSource
   -> Maybe Text
   -> Maybe V1StorageOSPersistentVolumeSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1PersistentVolumeSpec)
-> Parser (Maybe [Text])
-> Parser
     (Maybe V1NFSVolumeSource
      -> Maybe V1VolumeNodeAffinity
      -> Maybe Text
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDPersistentVolumeSource
      -> Maybe V1ScaleIOPersistentVolumeSource
      -> Maybe Text
      -> Maybe V1StorageOSPersistentVolumeSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1PersistentVolumeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"mountOptions")
      Parser
  (Maybe V1NFSVolumeSource
   -> Maybe V1VolumeNodeAffinity
   -> Maybe Text
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDPersistentVolumeSource
   -> Maybe V1ScaleIOPersistentVolumeSource
   -> Maybe Text
   -> Maybe V1StorageOSPersistentVolumeSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1PersistentVolumeSpec)
-> Parser (Maybe V1NFSVolumeSource)
-> Parser
     (Maybe V1VolumeNodeAffinity
      -> Maybe Text
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDPersistentVolumeSource
      -> Maybe V1ScaleIOPersistentVolumeSource
      -> Maybe Text
      -> Maybe V1StorageOSPersistentVolumeSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1PersistentVolumeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1NFSVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nfs")
      Parser
  (Maybe V1VolumeNodeAffinity
   -> Maybe Text
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDPersistentVolumeSource
   -> Maybe V1ScaleIOPersistentVolumeSource
   -> Maybe Text
   -> Maybe V1StorageOSPersistentVolumeSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1PersistentVolumeSpec)
-> Parser (Maybe V1VolumeNodeAffinity)
-> Parser
     (Maybe Text
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDPersistentVolumeSource
      -> Maybe V1ScaleIOPersistentVolumeSource
      -> Maybe Text
      -> Maybe V1StorageOSPersistentVolumeSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1PersistentVolumeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1VolumeNodeAffinity)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nodeAffinity")
      Parser
  (Maybe Text
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDPersistentVolumeSource
   -> Maybe V1ScaleIOPersistentVolumeSource
   -> Maybe Text
   -> Maybe V1StorageOSPersistentVolumeSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1PersistentVolumeSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDPersistentVolumeSource
      -> Maybe V1ScaleIOPersistentVolumeSource
      -> Maybe Text
      -> Maybe V1StorageOSPersistentVolumeSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1PersistentVolumeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"persistentVolumeReclaimPolicy")
      Parser
  (Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDPersistentVolumeSource
   -> Maybe V1ScaleIOPersistentVolumeSource
   -> Maybe Text
   -> Maybe V1StorageOSPersistentVolumeSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1PersistentVolumeSpec)
-> Parser (Maybe V1PhotonPersistentDiskVolumeSource)
-> Parser
     (Maybe V1PortworxVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDPersistentVolumeSource
      -> Maybe V1ScaleIOPersistentVolumeSource
      -> Maybe Text
      -> Maybe V1StorageOSPersistentVolumeSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1PersistentVolumeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1PhotonPersistentDiskVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"photonPersistentDisk")
      Parser
  (Maybe V1PortworxVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDPersistentVolumeSource
   -> Maybe V1ScaleIOPersistentVolumeSource
   -> Maybe Text
   -> Maybe V1StorageOSPersistentVolumeSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1PersistentVolumeSpec)
-> Parser (Maybe V1PortworxVolumeSource)
-> Parser
     (Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDPersistentVolumeSource
      -> Maybe V1ScaleIOPersistentVolumeSource
      -> Maybe Text
      -> Maybe V1StorageOSPersistentVolumeSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1PersistentVolumeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1PortworxVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"portworxVolume")
      Parser
  (Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDPersistentVolumeSource
   -> Maybe V1ScaleIOPersistentVolumeSource
   -> Maybe Text
   -> Maybe V1StorageOSPersistentVolumeSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1PersistentVolumeSpec)
-> Parser (Maybe V1QuobyteVolumeSource)
-> Parser
     (Maybe V1RBDPersistentVolumeSource
      -> Maybe V1ScaleIOPersistentVolumeSource
      -> Maybe Text
      -> Maybe V1StorageOSPersistentVolumeSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1PersistentVolumeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1QuobyteVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"quobyte")
      Parser
  (Maybe V1RBDPersistentVolumeSource
   -> Maybe V1ScaleIOPersistentVolumeSource
   -> Maybe Text
   -> Maybe V1StorageOSPersistentVolumeSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1PersistentVolumeSpec)
-> Parser (Maybe V1RBDPersistentVolumeSource)
-> Parser
     (Maybe V1ScaleIOPersistentVolumeSource
      -> Maybe Text
      -> Maybe V1StorageOSPersistentVolumeSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1PersistentVolumeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1RBDPersistentVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"rbd")
      Parser
  (Maybe V1ScaleIOPersistentVolumeSource
   -> Maybe Text
   -> Maybe V1StorageOSPersistentVolumeSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1PersistentVolumeSpec)
-> Parser (Maybe V1ScaleIOPersistentVolumeSource)
-> Parser
     (Maybe Text
      -> Maybe V1StorageOSPersistentVolumeSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1PersistentVolumeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ScaleIOPersistentVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"scaleIO")
      Parser
  (Maybe Text
   -> Maybe V1StorageOSPersistentVolumeSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1PersistentVolumeSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1StorageOSPersistentVolumeSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1PersistentVolumeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"storageClassName")
      Parser
  (Maybe V1StorageOSPersistentVolumeSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1PersistentVolumeSpec)
-> Parser (Maybe V1StorageOSPersistentVolumeSource)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1PersistentVolumeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1StorageOSPersistentVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"storageos")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1PersistentVolumeSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1PersistentVolumeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"volumeAttributesClassName")
      Parser
  (Maybe Text
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1PersistentVolumeSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1VsphereVirtualDiskVolumeSource -> V1PersistentVolumeSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"volumeMode")
      Parser
  (Maybe V1VsphereVirtualDiskVolumeSource -> V1PersistentVolumeSpec)
-> Parser (Maybe V1VsphereVirtualDiskVolumeSource)
-> Parser V1PersistentVolumeSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1VsphereVirtualDiskVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"vsphereVolume")

-- | ToJSON V1PersistentVolumeSpec
instance A.ToJSON V1PersistentVolumeSpec where
  toJSON :: V1PersistentVolumeSpec -> Value
toJSON V1PersistentVolumeSpec {Maybe [Text]
Maybe (Map String Quantity)
Maybe Text
Maybe V1VsphereVirtualDiskVolumeSource
Maybe V1VolumeNodeAffinity
Maybe V1StorageOSPersistentVolumeSource
Maybe V1ScaleIOPersistentVolumeSource
Maybe V1RBDPersistentVolumeSource
Maybe V1QuobyteVolumeSource
Maybe V1PortworxVolumeSource
Maybe V1PhotonPersistentDiskVolumeSource
Maybe V1ObjectReference
Maybe V1NFSVolumeSource
Maybe V1LocalVolumeSource
Maybe V1ISCSIPersistentVolumeSource
Maybe V1HostPathVolumeSource
Maybe V1GlusterfsPersistentVolumeSource
Maybe V1GCEPersistentDiskVolumeSource
Maybe V1FlockerVolumeSource
Maybe V1FlexPersistentVolumeSource
Maybe V1FCVolumeSource
Maybe V1CinderPersistentVolumeSource
Maybe V1CephFSPersistentVolumeSource
Maybe V1CSIPersistentVolumeSource
Maybe V1AzureFilePersistentVolumeSource
Maybe V1AzureDiskVolumeSource
Maybe V1AWSElasticBlockStoreVolumeSource
$sel:v1PersistentVolumeSpecAccessModes:V1PersistentVolumeSpec :: V1PersistentVolumeSpec -> Maybe [Text]
$sel:v1PersistentVolumeSpecAwsElasticBlockStore:V1PersistentVolumeSpec :: V1PersistentVolumeSpec -> Maybe V1AWSElasticBlockStoreVolumeSource
$sel:v1PersistentVolumeSpecAzureDisk:V1PersistentVolumeSpec :: V1PersistentVolumeSpec -> Maybe V1AzureDiskVolumeSource
$sel:v1PersistentVolumeSpecAzureFile:V1PersistentVolumeSpec :: V1PersistentVolumeSpec -> Maybe V1AzureFilePersistentVolumeSource
$sel:v1PersistentVolumeSpecCapacity:V1PersistentVolumeSpec :: V1PersistentVolumeSpec -> Maybe (Map String Quantity)
$sel:v1PersistentVolumeSpecCephfs:V1PersistentVolumeSpec :: V1PersistentVolumeSpec -> Maybe V1CephFSPersistentVolumeSource
$sel:v1PersistentVolumeSpecCinder:V1PersistentVolumeSpec :: V1PersistentVolumeSpec -> Maybe V1CinderPersistentVolumeSource
$sel:v1PersistentVolumeSpecClaimRef:V1PersistentVolumeSpec :: V1PersistentVolumeSpec -> Maybe V1ObjectReference
$sel:v1PersistentVolumeSpecCsi:V1PersistentVolumeSpec :: V1PersistentVolumeSpec -> Maybe V1CSIPersistentVolumeSource
$sel:v1PersistentVolumeSpecFc:V1PersistentVolumeSpec :: V1PersistentVolumeSpec -> Maybe V1FCVolumeSource
$sel:v1PersistentVolumeSpecFlexVolume:V1PersistentVolumeSpec :: V1PersistentVolumeSpec -> Maybe V1FlexPersistentVolumeSource
$sel:v1PersistentVolumeSpecFlocker:V1PersistentVolumeSpec :: V1PersistentVolumeSpec -> Maybe V1FlockerVolumeSource
$sel:v1PersistentVolumeSpecGcePersistentDisk:V1PersistentVolumeSpec :: V1PersistentVolumeSpec -> Maybe V1GCEPersistentDiskVolumeSource
$sel:v1PersistentVolumeSpecGlusterfs:V1PersistentVolumeSpec :: V1PersistentVolumeSpec -> Maybe V1GlusterfsPersistentVolumeSource
$sel:v1PersistentVolumeSpecHostPath:V1PersistentVolumeSpec :: V1PersistentVolumeSpec -> Maybe V1HostPathVolumeSource
$sel:v1PersistentVolumeSpecIscsi:V1PersistentVolumeSpec :: V1PersistentVolumeSpec -> Maybe V1ISCSIPersistentVolumeSource
$sel:v1PersistentVolumeSpecLocal:V1PersistentVolumeSpec :: V1PersistentVolumeSpec -> Maybe V1LocalVolumeSource
$sel:v1PersistentVolumeSpecMountOptions:V1PersistentVolumeSpec :: V1PersistentVolumeSpec -> Maybe [Text]
$sel:v1PersistentVolumeSpecNfs:V1PersistentVolumeSpec :: V1PersistentVolumeSpec -> Maybe V1NFSVolumeSource
$sel:v1PersistentVolumeSpecNodeAffinity:V1PersistentVolumeSpec :: V1PersistentVolumeSpec -> Maybe V1VolumeNodeAffinity
$sel:v1PersistentVolumeSpecPersistentVolumeReclaimPolicy:V1PersistentVolumeSpec :: V1PersistentVolumeSpec -> Maybe Text
$sel:v1PersistentVolumeSpecPhotonPersistentDisk:V1PersistentVolumeSpec :: V1PersistentVolumeSpec -> Maybe V1PhotonPersistentDiskVolumeSource
$sel:v1PersistentVolumeSpecPortworxVolume:V1PersistentVolumeSpec :: V1PersistentVolumeSpec -> Maybe V1PortworxVolumeSource
$sel:v1PersistentVolumeSpecQuobyte:V1PersistentVolumeSpec :: V1PersistentVolumeSpec -> Maybe V1QuobyteVolumeSource
$sel:v1PersistentVolumeSpecRbd:V1PersistentVolumeSpec :: V1PersistentVolumeSpec -> Maybe V1RBDPersistentVolumeSource
$sel:v1PersistentVolumeSpecScaleIo:V1PersistentVolumeSpec :: V1PersistentVolumeSpec -> Maybe V1ScaleIOPersistentVolumeSource
$sel:v1PersistentVolumeSpecStorageClassName:V1PersistentVolumeSpec :: V1PersistentVolumeSpec -> Maybe Text
$sel:v1PersistentVolumeSpecStorageos:V1PersistentVolumeSpec :: V1PersistentVolumeSpec -> Maybe V1StorageOSPersistentVolumeSource
$sel:v1PersistentVolumeSpecVolumeAttributesClassName:V1PersistentVolumeSpec :: V1PersistentVolumeSpec -> Maybe Text
$sel:v1PersistentVolumeSpecVolumeMode:V1PersistentVolumeSpec :: V1PersistentVolumeSpec -> Maybe Text
$sel:v1PersistentVolumeSpecVsphereVolume:V1PersistentVolumeSpec :: V1PersistentVolumeSpec -> Maybe V1VsphereVirtualDiskVolumeSource
v1PersistentVolumeSpecAccessModes :: Maybe [Text]
v1PersistentVolumeSpecAwsElasticBlockStore :: Maybe V1AWSElasticBlockStoreVolumeSource
v1PersistentVolumeSpecAzureDisk :: Maybe V1AzureDiskVolumeSource
v1PersistentVolumeSpecAzureFile :: Maybe V1AzureFilePersistentVolumeSource
v1PersistentVolumeSpecCapacity :: Maybe (Map String Quantity)
v1PersistentVolumeSpecCephfs :: Maybe V1CephFSPersistentVolumeSource
v1PersistentVolumeSpecCinder :: Maybe V1CinderPersistentVolumeSource
v1PersistentVolumeSpecClaimRef :: Maybe V1ObjectReference
v1PersistentVolumeSpecCsi :: Maybe V1CSIPersistentVolumeSource
v1PersistentVolumeSpecFc :: Maybe V1FCVolumeSource
v1PersistentVolumeSpecFlexVolume :: Maybe V1FlexPersistentVolumeSource
v1PersistentVolumeSpecFlocker :: Maybe V1FlockerVolumeSource
v1PersistentVolumeSpecGcePersistentDisk :: Maybe V1GCEPersistentDiskVolumeSource
v1PersistentVolumeSpecGlusterfs :: Maybe V1GlusterfsPersistentVolumeSource
v1PersistentVolumeSpecHostPath :: Maybe V1HostPathVolumeSource
v1PersistentVolumeSpecIscsi :: Maybe V1ISCSIPersistentVolumeSource
v1PersistentVolumeSpecLocal :: Maybe V1LocalVolumeSource
v1PersistentVolumeSpecMountOptions :: Maybe [Text]
v1PersistentVolumeSpecNfs :: Maybe V1NFSVolumeSource
v1PersistentVolumeSpecNodeAffinity :: Maybe V1VolumeNodeAffinity
v1PersistentVolumeSpecPersistentVolumeReclaimPolicy :: Maybe Text
v1PersistentVolumeSpecPhotonPersistentDisk :: Maybe V1PhotonPersistentDiskVolumeSource
v1PersistentVolumeSpecPortworxVolume :: Maybe V1PortworxVolumeSource
v1PersistentVolumeSpecQuobyte :: Maybe V1QuobyteVolumeSource
v1PersistentVolumeSpecRbd :: Maybe V1RBDPersistentVolumeSource
v1PersistentVolumeSpecScaleIo :: Maybe V1ScaleIOPersistentVolumeSource
v1PersistentVolumeSpecStorageClassName :: Maybe Text
v1PersistentVolumeSpecStorageos :: Maybe V1StorageOSPersistentVolumeSource
v1PersistentVolumeSpecVolumeAttributesClassName :: Maybe Text
v1PersistentVolumeSpecVolumeMode :: Maybe Text
v1PersistentVolumeSpecVsphereVolume :: Maybe V1VsphereVirtualDiskVolumeSource
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"accessModes" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1PersistentVolumeSpecAccessModes
      , Key
"awsElasticBlockStore" Key -> Maybe V1AWSElasticBlockStoreVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1AWSElasticBlockStoreVolumeSource
v1PersistentVolumeSpecAwsElasticBlockStore
      , Key
"azureDisk" Key -> Maybe V1AzureDiskVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1AzureDiskVolumeSource
v1PersistentVolumeSpecAzureDisk
      , Key
"azureFile" Key -> Maybe V1AzureFilePersistentVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1AzureFilePersistentVolumeSource
v1PersistentVolumeSpecAzureFile
      , Key
"capacity" Key -> Maybe (Map String Quantity) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Quantity)
v1PersistentVolumeSpecCapacity
      , Key
"cephfs" Key -> Maybe V1CephFSPersistentVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1CephFSPersistentVolumeSource
v1PersistentVolumeSpecCephfs
      , Key
"cinder" Key -> Maybe V1CinderPersistentVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1CinderPersistentVolumeSource
v1PersistentVolumeSpecCinder
      , Key
"claimRef" Key -> Maybe V1ObjectReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectReference
v1PersistentVolumeSpecClaimRef
      , Key
"csi" Key -> Maybe V1CSIPersistentVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1CSIPersistentVolumeSource
v1PersistentVolumeSpecCsi
      , Key
"fc" Key -> Maybe V1FCVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1FCVolumeSource
v1PersistentVolumeSpecFc
      , Key
"flexVolume" Key -> Maybe V1FlexPersistentVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1FlexPersistentVolumeSource
v1PersistentVolumeSpecFlexVolume
      , Key
"flocker" Key -> Maybe V1FlockerVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1FlockerVolumeSource
v1PersistentVolumeSpecFlocker
      , Key
"gcePersistentDisk" Key -> Maybe V1GCEPersistentDiskVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1GCEPersistentDiskVolumeSource
v1PersistentVolumeSpecGcePersistentDisk
      , Key
"glusterfs" Key -> Maybe V1GlusterfsPersistentVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1GlusterfsPersistentVolumeSource
v1PersistentVolumeSpecGlusterfs
      , Key
"hostPath" Key -> Maybe V1HostPathVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1HostPathVolumeSource
v1PersistentVolumeSpecHostPath
      , Key
"iscsi" Key -> Maybe V1ISCSIPersistentVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ISCSIPersistentVolumeSource
v1PersistentVolumeSpecIscsi
      , Key
"local" Key -> Maybe V1LocalVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LocalVolumeSource
v1PersistentVolumeSpecLocal
      , Key
"mountOptions" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1PersistentVolumeSpecMountOptions
      , Key
"nfs" Key -> Maybe V1NFSVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1NFSVolumeSource
v1PersistentVolumeSpecNfs
      , Key
"nodeAffinity" Key -> Maybe V1VolumeNodeAffinity -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1VolumeNodeAffinity
v1PersistentVolumeSpecNodeAffinity
      , Key
"persistentVolumeReclaimPolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PersistentVolumeSpecPersistentVolumeReclaimPolicy
      , Key
"photonPersistentDisk" Key -> Maybe V1PhotonPersistentDiskVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1PhotonPersistentDiskVolumeSource
v1PersistentVolumeSpecPhotonPersistentDisk
      , Key
"portworxVolume" Key -> Maybe V1PortworxVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1PortworxVolumeSource
v1PersistentVolumeSpecPortworxVolume
      , Key
"quobyte" Key -> Maybe V1QuobyteVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1QuobyteVolumeSource
v1PersistentVolumeSpecQuobyte
      , Key
"rbd" Key -> Maybe V1RBDPersistentVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1RBDPersistentVolumeSource
v1PersistentVolumeSpecRbd
      , Key
"scaleIO" Key -> Maybe V1ScaleIOPersistentVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ScaleIOPersistentVolumeSource
v1PersistentVolumeSpecScaleIo
      , Key
"storageClassName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PersistentVolumeSpecStorageClassName
      , Key
"storageos" Key -> Maybe V1StorageOSPersistentVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1StorageOSPersistentVolumeSource
v1PersistentVolumeSpecStorageos
      , Key
"volumeAttributesClassName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PersistentVolumeSpecVolumeAttributesClassName
      , Key
"volumeMode" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PersistentVolumeSpecVolumeMode
      , Key
"vsphereVolume" Key -> Maybe V1VsphereVirtualDiskVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1VsphereVirtualDiskVolumeSource
v1PersistentVolumeSpecVsphereVolume
      ]


-- | Construct a value of type 'V1PersistentVolumeSpec' (by applying it's required fields, if any)
mkV1PersistentVolumeSpec
  :: V1PersistentVolumeSpec
mkV1PersistentVolumeSpec :: V1PersistentVolumeSpec
mkV1PersistentVolumeSpec =
  V1PersistentVolumeSpec
  { $sel:v1PersistentVolumeSpecAccessModes:V1PersistentVolumeSpec :: Maybe [Text]
v1PersistentVolumeSpecAccessModes = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeSpecAwsElasticBlockStore:V1PersistentVolumeSpec :: Maybe V1AWSElasticBlockStoreVolumeSource
v1PersistentVolumeSpecAwsElasticBlockStore = Maybe V1AWSElasticBlockStoreVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeSpecAzureDisk:V1PersistentVolumeSpec :: Maybe V1AzureDiskVolumeSource
v1PersistentVolumeSpecAzureDisk = Maybe V1AzureDiskVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeSpecAzureFile:V1PersistentVolumeSpec :: Maybe V1AzureFilePersistentVolumeSource
v1PersistentVolumeSpecAzureFile = Maybe V1AzureFilePersistentVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeSpecCapacity:V1PersistentVolumeSpec :: Maybe (Map String Quantity)
v1PersistentVolumeSpecCapacity = Maybe (Map String Quantity)
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeSpecCephfs:V1PersistentVolumeSpec :: Maybe V1CephFSPersistentVolumeSource
v1PersistentVolumeSpecCephfs = Maybe V1CephFSPersistentVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeSpecCinder:V1PersistentVolumeSpec :: Maybe V1CinderPersistentVolumeSource
v1PersistentVolumeSpecCinder = Maybe V1CinderPersistentVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeSpecClaimRef:V1PersistentVolumeSpec :: Maybe V1ObjectReference
v1PersistentVolumeSpecClaimRef = Maybe V1ObjectReference
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeSpecCsi:V1PersistentVolumeSpec :: Maybe V1CSIPersistentVolumeSource
v1PersistentVolumeSpecCsi = Maybe V1CSIPersistentVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeSpecFc:V1PersistentVolumeSpec :: Maybe V1FCVolumeSource
v1PersistentVolumeSpecFc = Maybe V1FCVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeSpecFlexVolume:V1PersistentVolumeSpec :: Maybe V1FlexPersistentVolumeSource
v1PersistentVolumeSpecFlexVolume = Maybe V1FlexPersistentVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeSpecFlocker:V1PersistentVolumeSpec :: Maybe V1FlockerVolumeSource
v1PersistentVolumeSpecFlocker = Maybe V1FlockerVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeSpecGcePersistentDisk:V1PersistentVolumeSpec :: Maybe V1GCEPersistentDiskVolumeSource
v1PersistentVolumeSpecGcePersistentDisk = Maybe V1GCEPersistentDiskVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeSpecGlusterfs:V1PersistentVolumeSpec :: Maybe V1GlusterfsPersistentVolumeSource
v1PersistentVolumeSpecGlusterfs = Maybe V1GlusterfsPersistentVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeSpecHostPath:V1PersistentVolumeSpec :: Maybe V1HostPathVolumeSource
v1PersistentVolumeSpecHostPath = Maybe V1HostPathVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeSpecIscsi:V1PersistentVolumeSpec :: Maybe V1ISCSIPersistentVolumeSource
v1PersistentVolumeSpecIscsi = Maybe V1ISCSIPersistentVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeSpecLocal:V1PersistentVolumeSpec :: Maybe V1LocalVolumeSource
v1PersistentVolumeSpecLocal = Maybe V1LocalVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeSpecMountOptions:V1PersistentVolumeSpec :: Maybe [Text]
v1PersistentVolumeSpecMountOptions = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeSpecNfs:V1PersistentVolumeSpec :: Maybe V1NFSVolumeSource
v1PersistentVolumeSpecNfs = Maybe V1NFSVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeSpecNodeAffinity:V1PersistentVolumeSpec :: Maybe V1VolumeNodeAffinity
v1PersistentVolumeSpecNodeAffinity = Maybe V1VolumeNodeAffinity
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeSpecPersistentVolumeReclaimPolicy:V1PersistentVolumeSpec :: Maybe Text
v1PersistentVolumeSpecPersistentVolumeReclaimPolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeSpecPhotonPersistentDisk:V1PersistentVolumeSpec :: Maybe V1PhotonPersistentDiskVolumeSource
v1PersistentVolumeSpecPhotonPersistentDisk = Maybe V1PhotonPersistentDiskVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeSpecPortworxVolume:V1PersistentVolumeSpec :: Maybe V1PortworxVolumeSource
v1PersistentVolumeSpecPortworxVolume = Maybe V1PortworxVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeSpecQuobyte:V1PersistentVolumeSpec :: Maybe V1QuobyteVolumeSource
v1PersistentVolumeSpecQuobyte = Maybe V1QuobyteVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeSpecRbd:V1PersistentVolumeSpec :: Maybe V1RBDPersistentVolumeSource
v1PersistentVolumeSpecRbd = Maybe V1RBDPersistentVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeSpecScaleIo:V1PersistentVolumeSpec :: Maybe V1ScaleIOPersistentVolumeSource
v1PersistentVolumeSpecScaleIo = Maybe V1ScaleIOPersistentVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeSpecStorageClassName:V1PersistentVolumeSpec :: Maybe Text
v1PersistentVolumeSpecStorageClassName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeSpecStorageos:V1PersistentVolumeSpec :: Maybe V1StorageOSPersistentVolumeSource
v1PersistentVolumeSpecStorageos = Maybe V1StorageOSPersistentVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeSpecVolumeAttributesClassName:V1PersistentVolumeSpec :: Maybe Text
v1PersistentVolumeSpecVolumeAttributesClassName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeSpecVolumeMode:V1PersistentVolumeSpec :: Maybe Text
v1PersistentVolumeSpecVolumeMode = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeSpecVsphereVolume:V1PersistentVolumeSpec :: Maybe V1VsphereVirtualDiskVolumeSource
v1PersistentVolumeSpecVsphereVolume = Maybe V1VsphereVirtualDiskVolumeSource
forall a. Maybe a
Nothing
  }

-- ** V1PersistentVolumeStatus
-- | V1PersistentVolumeStatus
-- PersistentVolumeStatus is the current status of a persistent volume.
data V1PersistentVolumeStatus = V1PersistentVolumeStatus
  { V1PersistentVolumeStatus -> Maybe DateTime
v1PersistentVolumeStatusLastPhaseTransitionTime :: !(Maybe DateTime) -- ^ "lastPhaseTransitionTime" - lastPhaseTransitionTime is the time the phase transitioned from one to another and automatically resets to current time everytime a volume phase transitions.
  , V1PersistentVolumeStatus -> Maybe Text
v1PersistentVolumeStatusMessage :: !(Maybe Text) -- ^ "message" - message is a human-readable message indicating details about why the volume is in this state.
  , V1PersistentVolumeStatus -> Maybe Text
v1PersistentVolumeStatusPhase :: !(Maybe Text) -- ^ "phase" - phase indicates if a volume is available, bound to a claim, or released by a claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase
  , V1PersistentVolumeStatus -> Maybe Text
v1PersistentVolumeStatusReason :: !(Maybe Text) -- ^ "reason" - reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI.
  } deriving (Int -> V1PersistentVolumeStatus -> ShowS
[V1PersistentVolumeStatus] -> ShowS
V1PersistentVolumeStatus -> String
(Int -> V1PersistentVolumeStatus -> ShowS)
-> (V1PersistentVolumeStatus -> String)
-> ([V1PersistentVolumeStatus] -> ShowS)
-> Show V1PersistentVolumeStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PersistentVolumeStatus -> ShowS
showsPrec :: Int -> V1PersistentVolumeStatus -> ShowS
$cshow :: V1PersistentVolumeStatus -> String
show :: V1PersistentVolumeStatus -> String
$cshowList :: [V1PersistentVolumeStatus] -> ShowS
showList :: [V1PersistentVolumeStatus] -> ShowS
P.Show, V1PersistentVolumeStatus -> V1PersistentVolumeStatus -> Bool
(V1PersistentVolumeStatus -> V1PersistentVolumeStatus -> Bool)
-> (V1PersistentVolumeStatus -> V1PersistentVolumeStatus -> Bool)
-> Eq V1PersistentVolumeStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PersistentVolumeStatus -> V1PersistentVolumeStatus -> Bool
== :: V1PersistentVolumeStatus -> V1PersistentVolumeStatus -> Bool
$c/= :: V1PersistentVolumeStatus -> V1PersistentVolumeStatus -> Bool
/= :: V1PersistentVolumeStatus -> V1PersistentVolumeStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PersistentVolumeStatus
instance A.FromJSON V1PersistentVolumeStatus where
  parseJSON :: Value -> Parser V1PersistentVolumeStatus
parseJSON = String
-> (Object -> Parser V1PersistentVolumeStatus)
-> Value
-> Parser V1PersistentVolumeStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PersistentVolumeStatus" ((Object -> Parser V1PersistentVolumeStatus)
 -> Value -> Parser V1PersistentVolumeStatus)
-> (Object -> Parser V1PersistentVolumeStatus)
-> Value
-> Parser V1PersistentVolumeStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe DateTime
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> V1PersistentVolumeStatus
V1PersistentVolumeStatus
      (Maybe DateTime
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> V1PersistentVolumeStatus)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> V1PersistentVolumeStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lastPhaseTransitionTime")
      Parser
  (Maybe Text
   -> Maybe Text -> Maybe Text -> V1PersistentVolumeStatus)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> V1PersistentVolumeStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"message")
      Parser (Maybe Text -> Maybe Text -> V1PersistentVolumeStatus)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> V1PersistentVolumeStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"phase")
      Parser (Maybe Text -> V1PersistentVolumeStatus)
-> Parser (Maybe Text) -> Parser V1PersistentVolumeStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reason")

-- | ToJSON V1PersistentVolumeStatus
instance A.ToJSON V1PersistentVolumeStatus where
  toJSON :: V1PersistentVolumeStatus -> Value
toJSON V1PersistentVolumeStatus {Maybe Text
Maybe DateTime
$sel:v1PersistentVolumeStatusLastPhaseTransitionTime:V1PersistentVolumeStatus :: V1PersistentVolumeStatus -> Maybe DateTime
$sel:v1PersistentVolumeStatusMessage:V1PersistentVolumeStatus :: V1PersistentVolumeStatus -> Maybe Text
$sel:v1PersistentVolumeStatusPhase:V1PersistentVolumeStatus :: V1PersistentVolumeStatus -> Maybe Text
$sel:v1PersistentVolumeStatusReason:V1PersistentVolumeStatus :: V1PersistentVolumeStatus -> Maybe Text
v1PersistentVolumeStatusLastPhaseTransitionTime :: Maybe DateTime
v1PersistentVolumeStatusMessage :: Maybe Text
v1PersistentVolumeStatusPhase :: Maybe Text
v1PersistentVolumeStatusReason :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"lastPhaseTransitionTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1PersistentVolumeStatusLastPhaseTransitionTime
      , Key
"message" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PersistentVolumeStatusMessage
      , Key
"phase" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PersistentVolumeStatusPhase
      , Key
"reason" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PersistentVolumeStatusReason
      ]


-- | Construct a value of type 'V1PersistentVolumeStatus' (by applying it's required fields, if any)
mkV1PersistentVolumeStatus
  :: V1PersistentVolumeStatus
mkV1PersistentVolumeStatus :: V1PersistentVolumeStatus
mkV1PersistentVolumeStatus =
  V1PersistentVolumeStatus
  { $sel:v1PersistentVolumeStatusLastPhaseTransitionTime:V1PersistentVolumeStatus :: Maybe DateTime
v1PersistentVolumeStatusLastPhaseTransitionTime = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeStatusMessage:V1PersistentVolumeStatus :: Maybe Text
v1PersistentVolumeStatusMessage = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeStatusPhase:V1PersistentVolumeStatus :: Maybe Text
v1PersistentVolumeStatusPhase = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PersistentVolumeStatusReason:V1PersistentVolumeStatus :: Maybe Text
v1PersistentVolumeStatusReason = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1PhotonPersistentDiskVolumeSource
-- | V1PhotonPersistentDiskVolumeSource
-- Represents a Photon Controller persistent disk resource.
data V1PhotonPersistentDiskVolumeSource = V1PhotonPersistentDiskVolumeSource
  { V1PhotonPersistentDiskVolumeSource -> Maybe Text
v1PhotonPersistentDiskVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \&quot;ext4\&quot;, \&quot;xfs\&quot;, \&quot;ntfs\&quot;. Implicitly inferred to be \&quot;ext4\&quot; if unspecified.
  , V1PhotonPersistentDiskVolumeSource -> Text
v1PhotonPersistentDiskVolumeSourcePdId :: !(Text) -- ^ /Required/ "pdID" - pdID is the ID that identifies Photon Controller persistent disk
  } deriving (Int -> V1PhotonPersistentDiskVolumeSource -> ShowS
[V1PhotonPersistentDiskVolumeSource] -> ShowS
V1PhotonPersistentDiskVolumeSource -> String
(Int -> V1PhotonPersistentDiskVolumeSource -> ShowS)
-> (V1PhotonPersistentDiskVolumeSource -> String)
-> ([V1PhotonPersistentDiskVolumeSource] -> ShowS)
-> Show V1PhotonPersistentDiskVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PhotonPersistentDiskVolumeSource -> ShowS
showsPrec :: Int -> V1PhotonPersistentDiskVolumeSource -> ShowS
$cshow :: V1PhotonPersistentDiskVolumeSource -> String
show :: V1PhotonPersistentDiskVolumeSource -> String
$cshowList :: [V1PhotonPersistentDiskVolumeSource] -> ShowS
showList :: [V1PhotonPersistentDiskVolumeSource] -> ShowS
P.Show, V1PhotonPersistentDiskVolumeSource
-> V1PhotonPersistentDiskVolumeSource -> Bool
(V1PhotonPersistentDiskVolumeSource
 -> V1PhotonPersistentDiskVolumeSource -> Bool)
-> (V1PhotonPersistentDiskVolumeSource
    -> V1PhotonPersistentDiskVolumeSource -> Bool)
-> Eq V1PhotonPersistentDiskVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PhotonPersistentDiskVolumeSource
-> V1PhotonPersistentDiskVolumeSource -> Bool
== :: V1PhotonPersistentDiskVolumeSource
-> V1PhotonPersistentDiskVolumeSource -> Bool
$c/= :: V1PhotonPersistentDiskVolumeSource
-> V1PhotonPersistentDiskVolumeSource -> Bool
/= :: V1PhotonPersistentDiskVolumeSource
-> V1PhotonPersistentDiskVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PhotonPersistentDiskVolumeSource
instance A.FromJSON V1PhotonPersistentDiskVolumeSource where
  parseJSON :: Value -> Parser V1PhotonPersistentDiskVolumeSource
parseJSON = String
-> (Object -> Parser V1PhotonPersistentDiskVolumeSource)
-> Value
-> Parser V1PhotonPersistentDiskVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PhotonPersistentDiskVolumeSource" ((Object -> Parser V1PhotonPersistentDiskVolumeSource)
 -> Value -> Parser V1PhotonPersistentDiskVolumeSource)
-> (Object -> Parser V1PhotonPersistentDiskVolumeSource)
-> Value
-> Parser V1PhotonPersistentDiskVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Text -> V1PhotonPersistentDiskVolumeSource
V1PhotonPersistentDiskVolumeSource
      (Maybe Text -> Text -> V1PhotonPersistentDiskVolumeSource)
-> Parser (Maybe Text)
-> Parser (Text -> V1PhotonPersistentDiskVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fsType")
      Parser (Text -> V1PhotonPersistentDiskVolumeSource)
-> Parser Text -> Parser V1PhotonPersistentDiskVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"pdID")

-- | ToJSON V1PhotonPersistentDiskVolumeSource
instance A.ToJSON V1PhotonPersistentDiskVolumeSource where
  toJSON :: V1PhotonPersistentDiskVolumeSource -> Value
toJSON V1PhotonPersistentDiskVolumeSource {Maybe Text
Text
$sel:v1PhotonPersistentDiskVolumeSourceFsType:V1PhotonPersistentDiskVolumeSource :: V1PhotonPersistentDiskVolumeSource -> Maybe Text
$sel:v1PhotonPersistentDiskVolumeSourcePdId:V1PhotonPersistentDiskVolumeSource :: V1PhotonPersistentDiskVolumeSource -> Text
v1PhotonPersistentDiskVolumeSourceFsType :: Maybe Text
v1PhotonPersistentDiskVolumeSourcePdId :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"fsType" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PhotonPersistentDiskVolumeSourceFsType
      , Key
"pdID" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1PhotonPersistentDiskVolumeSourcePdId
      ]


-- | Construct a value of type 'V1PhotonPersistentDiskVolumeSource' (by applying it's required fields, if any)
mkV1PhotonPersistentDiskVolumeSource
  :: Text -- ^ 'v1PhotonPersistentDiskVolumeSourcePdId': pdID is the ID that identifies Photon Controller persistent disk
  -> V1PhotonPersistentDiskVolumeSource
mkV1PhotonPersistentDiskVolumeSource :: Text -> V1PhotonPersistentDiskVolumeSource
mkV1PhotonPersistentDiskVolumeSource Text
v1PhotonPersistentDiskVolumeSourcePdId =
  V1PhotonPersistentDiskVolumeSource
  { $sel:v1PhotonPersistentDiskVolumeSourceFsType:V1PhotonPersistentDiskVolumeSource :: Maybe Text
v1PhotonPersistentDiskVolumeSourceFsType = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1PhotonPersistentDiskVolumeSourcePdId:V1PhotonPersistentDiskVolumeSource :: Text
v1PhotonPersistentDiskVolumeSourcePdId :: Text
v1PhotonPersistentDiskVolumeSourcePdId
  }

-- ** V1Pod
-- | V1Pod
-- Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts.
data V1Pod = V1Pod
  { V1Pod -> Maybe Text
v1PodApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1Pod -> Maybe Text
v1PodKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1Pod -> Maybe V1ObjectMeta
v1PodMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1Pod -> Maybe V1PodSpec
v1PodSpec :: !(Maybe V1PodSpec) -- ^ "spec"
  , V1Pod -> Maybe V1PodStatus
v1PodStatus :: !(Maybe V1PodStatus) -- ^ "status"
  } deriving (Int -> V1Pod -> ShowS
[V1Pod] -> ShowS
V1Pod -> String
(Int -> V1Pod -> ShowS)
-> (V1Pod -> String) -> ([V1Pod] -> ShowS) -> Show V1Pod
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1Pod -> ShowS
showsPrec :: Int -> V1Pod -> ShowS
$cshow :: V1Pod -> String
show :: V1Pod -> String
$cshowList :: [V1Pod] -> ShowS
showList :: [V1Pod] -> ShowS
P.Show, V1Pod -> V1Pod -> Bool
(V1Pod -> V1Pod -> Bool) -> (V1Pod -> V1Pod -> Bool) -> Eq V1Pod
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1Pod -> V1Pod -> Bool
== :: V1Pod -> V1Pod -> Bool
$c/= :: V1Pod -> V1Pod -> Bool
/= :: V1Pod -> V1Pod -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1Pod
instance A.FromJSON V1Pod where
  parseJSON :: Value -> Parser V1Pod
parseJSON = String -> (Object -> Parser V1Pod) -> Value -> Parser V1Pod
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1Pod" ((Object -> Parser V1Pod) -> Value -> Parser V1Pod)
-> (Object -> Parser V1Pod) -> Value -> Parser V1Pod
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1PodSpec
-> Maybe V1PodStatus
-> V1Pod
V1Pod
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1PodSpec
 -> Maybe V1PodStatus
 -> V1Pod)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1PodSpec
      -> Maybe V1PodStatus
      -> V1Pod)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1PodSpec
   -> Maybe V1PodStatus
   -> V1Pod)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1PodSpec -> Maybe V1PodStatus -> V1Pod)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1PodSpec -> Maybe V1PodStatus -> V1Pod)
-> Parser (Maybe V1ObjectMeta)
-> Parser (Maybe V1PodSpec -> Maybe V1PodStatus -> V1Pod)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (Maybe V1PodSpec -> Maybe V1PodStatus -> V1Pod)
-> Parser (Maybe V1PodSpec) -> Parser (Maybe V1PodStatus -> V1Pod)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1PodSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")
      Parser (Maybe V1PodStatus -> V1Pod)
-> Parser (Maybe V1PodStatus) -> Parser V1Pod
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1PodStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1Pod
instance A.ToJSON V1Pod where
  toJSON :: V1Pod -> Value
toJSON V1Pod {Maybe Text
Maybe V1PodStatus
Maybe V1PodSpec
Maybe V1ObjectMeta
$sel:v1PodApiVersion:V1Pod :: V1Pod -> Maybe Text
$sel:v1PodKind:V1Pod :: V1Pod -> Maybe Text
$sel:v1PodMetadata:V1Pod :: V1Pod -> Maybe V1ObjectMeta
$sel:v1PodSpec:V1Pod :: V1Pod -> Maybe V1PodSpec
$sel:v1PodStatus:V1Pod :: V1Pod -> Maybe V1PodStatus
v1PodApiVersion :: Maybe Text
v1PodKind :: Maybe Text
v1PodMetadata :: Maybe V1ObjectMeta
v1PodSpec :: Maybe V1PodSpec
v1PodStatus :: Maybe V1PodStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1PodMetadata
      , Key
"spec" Key -> Maybe V1PodSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1PodSpec
v1PodSpec
      , Key
"status" Key -> Maybe V1PodStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1PodStatus
v1PodStatus
      ]


-- | Construct a value of type 'V1Pod' (by applying it's required fields, if any)
mkV1Pod
  :: V1Pod
mkV1Pod :: V1Pod
mkV1Pod =
  V1Pod
  { $sel:v1PodApiVersion:V1Pod :: Maybe Text
v1PodApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodKind:V1Pod :: Maybe Text
v1PodKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodMetadata:V1Pod :: Maybe V1ObjectMeta
v1PodMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1PodSpec:V1Pod :: Maybe V1PodSpec
v1PodSpec = Maybe V1PodSpec
forall a. Maybe a
Nothing
  , $sel:v1PodStatus:V1Pod :: Maybe V1PodStatus
v1PodStatus = Maybe V1PodStatus
forall a. Maybe a
Nothing
  }

-- ** V1PodAffinity
-- | V1PodAffinity
-- Pod affinity is a group of inter pod affinity scheduling rules.
data V1PodAffinity = V1PodAffinity
  { V1PodAffinity -> Maybe [V1WeightedPodAffinityTerm]
v1PodAffinityPreferredDuringSchedulingIgnoredDuringExecution :: !(Maybe [V1WeightedPodAffinityTerm]) -- ^ "preferredDuringSchedulingIgnoredDuringExecution" - The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \&quot;weight\&quot; to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.
  , V1PodAffinity -> Maybe [V1PodAffinityTerm]
v1PodAffinityRequiredDuringSchedulingIgnoredDuringExecution :: !(Maybe [V1PodAffinityTerm]) -- ^ "requiredDuringSchedulingIgnoredDuringExecution" - If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.
  } deriving (Int -> V1PodAffinity -> ShowS
[V1PodAffinity] -> ShowS
V1PodAffinity -> String
(Int -> V1PodAffinity -> ShowS)
-> (V1PodAffinity -> String)
-> ([V1PodAffinity] -> ShowS)
-> Show V1PodAffinity
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PodAffinity -> ShowS
showsPrec :: Int -> V1PodAffinity -> ShowS
$cshow :: V1PodAffinity -> String
show :: V1PodAffinity -> String
$cshowList :: [V1PodAffinity] -> ShowS
showList :: [V1PodAffinity] -> ShowS
P.Show, V1PodAffinity -> V1PodAffinity -> Bool
(V1PodAffinity -> V1PodAffinity -> Bool)
-> (V1PodAffinity -> V1PodAffinity -> Bool) -> Eq V1PodAffinity
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PodAffinity -> V1PodAffinity -> Bool
== :: V1PodAffinity -> V1PodAffinity -> Bool
$c/= :: V1PodAffinity -> V1PodAffinity -> Bool
/= :: V1PodAffinity -> V1PodAffinity -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PodAffinity
instance A.FromJSON V1PodAffinity where
  parseJSON :: Value -> Parser V1PodAffinity
parseJSON = String
-> (Object -> Parser V1PodAffinity)
-> Value
-> Parser V1PodAffinity
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PodAffinity" ((Object -> Parser V1PodAffinity) -> Value -> Parser V1PodAffinity)
-> (Object -> Parser V1PodAffinity)
-> Value
-> Parser V1PodAffinity
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1WeightedPodAffinityTerm]
-> Maybe [V1PodAffinityTerm] -> V1PodAffinity
V1PodAffinity
      (Maybe [V1WeightedPodAffinityTerm]
 -> Maybe [V1PodAffinityTerm] -> V1PodAffinity)
-> Parser (Maybe [V1WeightedPodAffinityTerm])
-> Parser (Maybe [V1PodAffinityTerm] -> V1PodAffinity)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1WeightedPodAffinityTerm])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"preferredDuringSchedulingIgnoredDuringExecution")
      Parser (Maybe [V1PodAffinityTerm] -> V1PodAffinity)
-> Parser (Maybe [V1PodAffinityTerm]) -> Parser V1PodAffinity
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1PodAffinityTerm])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"requiredDuringSchedulingIgnoredDuringExecution")

-- | ToJSON V1PodAffinity
instance A.ToJSON V1PodAffinity where
  toJSON :: V1PodAffinity -> Value
toJSON V1PodAffinity {Maybe [V1WeightedPodAffinityTerm]
Maybe [V1PodAffinityTerm]
$sel:v1PodAffinityPreferredDuringSchedulingIgnoredDuringExecution:V1PodAffinity :: V1PodAffinity -> Maybe [V1WeightedPodAffinityTerm]
$sel:v1PodAffinityRequiredDuringSchedulingIgnoredDuringExecution:V1PodAffinity :: V1PodAffinity -> Maybe [V1PodAffinityTerm]
v1PodAffinityPreferredDuringSchedulingIgnoredDuringExecution :: Maybe [V1WeightedPodAffinityTerm]
v1PodAffinityRequiredDuringSchedulingIgnoredDuringExecution :: Maybe [V1PodAffinityTerm]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"preferredDuringSchedulingIgnoredDuringExecution" Key -> Maybe [V1WeightedPodAffinityTerm] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1WeightedPodAffinityTerm]
v1PodAffinityPreferredDuringSchedulingIgnoredDuringExecution
      , Key
"requiredDuringSchedulingIgnoredDuringExecution" Key -> Maybe [V1PodAffinityTerm] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1PodAffinityTerm]
v1PodAffinityRequiredDuringSchedulingIgnoredDuringExecution
      ]


-- | Construct a value of type 'V1PodAffinity' (by applying it's required fields, if any)
mkV1PodAffinity
  :: V1PodAffinity
mkV1PodAffinity :: V1PodAffinity
mkV1PodAffinity =
  V1PodAffinity
  { $sel:v1PodAffinityPreferredDuringSchedulingIgnoredDuringExecution:V1PodAffinity :: Maybe [V1WeightedPodAffinityTerm]
v1PodAffinityPreferredDuringSchedulingIgnoredDuringExecution = Maybe [V1WeightedPodAffinityTerm]
forall a. Maybe a
Nothing
  , $sel:v1PodAffinityRequiredDuringSchedulingIgnoredDuringExecution:V1PodAffinity :: Maybe [V1PodAffinityTerm]
v1PodAffinityRequiredDuringSchedulingIgnoredDuringExecution = Maybe [V1PodAffinityTerm]
forall a. Maybe a
Nothing
  }

-- ** V1PodAffinityTerm
-- | V1PodAffinityTerm
-- Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key <topologyKey> matches that of any node on which a pod of the set of pods is running
data V1PodAffinityTerm = V1PodAffinityTerm
  { V1PodAffinityTerm -> Maybe V1LabelSelector
v1PodAffinityTermLabelSelector :: !(Maybe V1LabelSelector) -- ^ "labelSelector"
  , V1PodAffinityTerm -> Maybe [Text]
v1PodAffinityTermMatchLabelKeys :: !(Maybe [Text]) -- ^ "matchLabelKeys" - MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with &#x60;labelSelector&#x60; as &#x60;key in (value)&#x60; to select the group of existing pods which pods will be taken into consideration for the incoming pod&#39;s pod (anti) affinity. Keys that don&#39;t exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn&#39;t set. This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
  , V1PodAffinityTerm -> Maybe [Text]
v1PodAffinityTermMismatchLabelKeys :: !(Maybe [Text]) -- ^ "mismatchLabelKeys" - MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with &#x60;labelSelector&#x60; as &#x60;key notin (value)&#x60; to select the group of existing pods which pods will be taken into consideration for the incoming pod&#39;s pod (anti) affinity. Keys that don&#39;t exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn&#39;t set. This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
  , V1PodAffinityTerm -> Maybe V1LabelSelector
v1PodAffinityTermNamespaceSelector :: !(Maybe V1LabelSelector) -- ^ "namespaceSelector"
  , V1PodAffinityTerm -> Maybe [Text]
v1PodAffinityTermNamespaces :: !(Maybe [Text]) -- ^ "namespaces" - namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means \&quot;this pod&#39;s namespace\&quot;.
  , V1PodAffinityTerm -> Text
v1PodAffinityTermTopologyKey :: !(Text) -- ^ /Required/ "topologyKey" - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.
  } deriving (Int -> V1PodAffinityTerm -> ShowS
[V1PodAffinityTerm] -> ShowS
V1PodAffinityTerm -> String
(Int -> V1PodAffinityTerm -> ShowS)
-> (V1PodAffinityTerm -> String)
-> ([V1PodAffinityTerm] -> ShowS)
-> Show V1PodAffinityTerm
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PodAffinityTerm -> ShowS
showsPrec :: Int -> V1PodAffinityTerm -> ShowS
$cshow :: V1PodAffinityTerm -> String
show :: V1PodAffinityTerm -> String
$cshowList :: [V1PodAffinityTerm] -> ShowS
showList :: [V1PodAffinityTerm] -> ShowS
P.Show, V1PodAffinityTerm -> V1PodAffinityTerm -> Bool
(V1PodAffinityTerm -> V1PodAffinityTerm -> Bool)
-> (V1PodAffinityTerm -> V1PodAffinityTerm -> Bool)
-> Eq V1PodAffinityTerm
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PodAffinityTerm -> V1PodAffinityTerm -> Bool
== :: V1PodAffinityTerm -> V1PodAffinityTerm -> Bool
$c/= :: V1PodAffinityTerm -> V1PodAffinityTerm -> Bool
/= :: V1PodAffinityTerm -> V1PodAffinityTerm -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PodAffinityTerm
instance A.FromJSON V1PodAffinityTerm where
  parseJSON :: Value -> Parser V1PodAffinityTerm
parseJSON = String
-> (Object -> Parser V1PodAffinityTerm)
-> Value
-> Parser V1PodAffinityTerm
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PodAffinityTerm" ((Object -> Parser V1PodAffinityTerm)
 -> Value -> Parser V1PodAffinityTerm)
-> (Object -> Parser V1PodAffinityTerm)
-> Value
-> Parser V1PodAffinityTerm
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1LabelSelector
-> Maybe [Text]
-> Maybe [Text]
-> Maybe V1LabelSelector
-> Maybe [Text]
-> Text
-> V1PodAffinityTerm
V1PodAffinityTerm
      (Maybe V1LabelSelector
 -> Maybe [Text]
 -> Maybe [Text]
 -> Maybe V1LabelSelector
 -> Maybe [Text]
 -> Text
 -> V1PodAffinityTerm)
-> Parser (Maybe V1LabelSelector)
-> Parser
     (Maybe [Text]
      -> Maybe [Text]
      -> Maybe V1LabelSelector
      -> Maybe [Text]
      -> Text
      -> V1PodAffinityTerm)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1LabelSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"labelSelector")
      Parser
  (Maybe [Text]
   -> Maybe [Text]
   -> Maybe V1LabelSelector
   -> Maybe [Text]
   -> Text
   -> V1PodAffinityTerm)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [Text]
      -> Maybe V1LabelSelector
      -> Maybe [Text]
      -> Text
      -> V1PodAffinityTerm)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"matchLabelKeys")
      Parser
  (Maybe [Text]
   -> Maybe V1LabelSelector
   -> Maybe [Text]
   -> Text
   -> V1PodAffinityTerm)
-> Parser (Maybe [Text])
-> Parser
     (Maybe V1LabelSelector
      -> Maybe [Text] -> Text -> V1PodAffinityTerm)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"mismatchLabelKeys")
      Parser
  (Maybe V1LabelSelector
   -> Maybe [Text] -> Text -> V1PodAffinityTerm)
-> Parser (Maybe V1LabelSelector)
-> Parser (Maybe [Text] -> Text -> V1PodAffinityTerm)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LabelSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"namespaceSelector")
      Parser (Maybe [Text] -> Text -> V1PodAffinityTerm)
-> Parser (Maybe [Text]) -> Parser (Text -> V1PodAffinityTerm)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"namespaces")
      Parser (Text -> V1PodAffinityTerm)
-> Parser Text -> Parser V1PodAffinityTerm
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"topologyKey")

-- | ToJSON V1PodAffinityTerm
instance A.ToJSON V1PodAffinityTerm where
  toJSON :: V1PodAffinityTerm -> Value
toJSON V1PodAffinityTerm {Maybe [Text]
Maybe V1LabelSelector
Text
$sel:v1PodAffinityTermLabelSelector:V1PodAffinityTerm :: V1PodAffinityTerm -> Maybe V1LabelSelector
$sel:v1PodAffinityTermMatchLabelKeys:V1PodAffinityTerm :: V1PodAffinityTerm -> Maybe [Text]
$sel:v1PodAffinityTermMismatchLabelKeys:V1PodAffinityTerm :: V1PodAffinityTerm -> Maybe [Text]
$sel:v1PodAffinityTermNamespaceSelector:V1PodAffinityTerm :: V1PodAffinityTerm -> Maybe V1LabelSelector
$sel:v1PodAffinityTermNamespaces:V1PodAffinityTerm :: V1PodAffinityTerm -> Maybe [Text]
$sel:v1PodAffinityTermTopologyKey:V1PodAffinityTerm :: V1PodAffinityTerm -> Text
v1PodAffinityTermLabelSelector :: Maybe V1LabelSelector
v1PodAffinityTermMatchLabelKeys :: Maybe [Text]
v1PodAffinityTermMismatchLabelKeys :: Maybe [Text]
v1PodAffinityTermNamespaceSelector :: Maybe V1LabelSelector
v1PodAffinityTermNamespaces :: Maybe [Text]
v1PodAffinityTermTopologyKey :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"labelSelector" Key -> Maybe V1LabelSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LabelSelector
v1PodAffinityTermLabelSelector
      , Key
"matchLabelKeys" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1PodAffinityTermMatchLabelKeys
      , Key
"mismatchLabelKeys" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1PodAffinityTermMismatchLabelKeys
      , Key
"namespaceSelector" Key -> Maybe V1LabelSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LabelSelector
v1PodAffinityTermNamespaceSelector
      , Key
"namespaces" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1PodAffinityTermNamespaces
      , Key
"topologyKey" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1PodAffinityTermTopologyKey
      ]


-- | Construct a value of type 'V1PodAffinityTerm' (by applying it's required fields, if any)
mkV1PodAffinityTerm
  :: Text -- ^ 'v1PodAffinityTermTopologyKey': This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.
  -> V1PodAffinityTerm
mkV1PodAffinityTerm :: Text -> V1PodAffinityTerm
mkV1PodAffinityTerm Text
v1PodAffinityTermTopologyKey =
  V1PodAffinityTerm
  { $sel:v1PodAffinityTermLabelSelector:V1PodAffinityTerm :: Maybe V1LabelSelector
v1PodAffinityTermLabelSelector = Maybe V1LabelSelector
forall a. Maybe a
Nothing
  , $sel:v1PodAffinityTermMatchLabelKeys:V1PodAffinityTerm :: Maybe [Text]
v1PodAffinityTermMatchLabelKeys = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1PodAffinityTermMismatchLabelKeys:V1PodAffinityTerm :: Maybe [Text]
v1PodAffinityTermMismatchLabelKeys = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1PodAffinityTermNamespaceSelector:V1PodAffinityTerm :: Maybe V1LabelSelector
v1PodAffinityTermNamespaceSelector = Maybe V1LabelSelector
forall a. Maybe a
Nothing
  , $sel:v1PodAffinityTermNamespaces:V1PodAffinityTerm :: Maybe [Text]
v1PodAffinityTermNamespaces = Maybe [Text]
forall a. Maybe a
Nothing
  , Text
$sel:v1PodAffinityTermTopologyKey:V1PodAffinityTerm :: Text
v1PodAffinityTermTopologyKey :: Text
v1PodAffinityTermTopologyKey
  }

-- ** V1PodAntiAffinity
-- | V1PodAntiAffinity
-- Pod anti affinity is a group of inter pod anti affinity scheduling rules.
data V1PodAntiAffinity = V1PodAntiAffinity
  { V1PodAntiAffinity -> Maybe [V1WeightedPodAffinityTerm]
v1PodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecution :: !(Maybe [V1WeightedPodAffinityTerm]) -- ^ "preferredDuringSchedulingIgnoredDuringExecution" - The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \&quot;weight\&quot; to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.
  , V1PodAntiAffinity -> Maybe [V1PodAffinityTerm]
v1PodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecution :: !(Maybe [V1PodAffinityTerm]) -- ^ "requiredDuringSchedulingIgnoredDuringExecution" - If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.
  } deriving (Int -> V1PodAntiAffinity -> ShowS
[V1PodAntiAffinity] -> ShowS
V1PodAntiAffinity -> String
(Int -> V1PodAntiAffinity -> ShowS)
-> (V1PodAntiAffinity -> String)
-> ([V1PodAntiAffinity] -> ShowS)
-> Show V1PodAntiAffinity
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PodAntiAffinity -> ShowS
showsPrec :: Int -> V1PodAntiAffinity -> ShowS
$cshow :: V1PodAntiAffinity -> String
show :: V1PodAntiAffinity -> String
$cshowList :: [V1PodAntiAffinity] -> ShowS
showList :: [V1PodAntiAffinity] -> ShowS
P.Show, V1PodAntiAffinity -> V1PodAntiAffinity -> Bool
(V1PodAntiAffinity -> V1PodAntiAffinity -> Bool)
-> (V1PodAntiAffinity -> V1PodAntiAffinity -> Bool)
-> Eq V1PodAntiAffinity
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PodAntiAffinity -> V1PodAntiAffinity -> Bool
== :: V1PodAntiAffinity -> V1PodAntiAffinity -> Bool
$c/= :: V1PodAntiAffinity -> V1PodAntiAffinity -> Bool
/= :: V1PodAntiAffinity -> V1PodAntiAffinity -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PodAntiAffinity
instance A.FromJSON V1PodAntiAffinity where
  parseJSON :: Value -> Parser V1PodAntiAffinity
parseJSON = String
-> (Object -> Parser V1PodAntiAffinity)
-> Value
-> Parser V1PodAntiAffinity
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PodAntiAffinity" ((Object -> Parser V1PodAntiAffinity)
 -> Value -> Parser V1PodAntiAffinity)
-> (Object -> Parser V1PodAntiAffinity)
-> Value
-> Parser V1PodAntiAffinity
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1WeightedPodAffinityTerm]
-> Maybe [V1PodAffinityTerm] -> V1PodAntiAffinity
V1PodAntiAffinity
      (Maybe [V1WeightedPodAffinityTerm]
 -> Maybe [V1PodAffinityTerm] -> V1PodAntiAffinity)
-> Parser (Maybe [V1WeightedPodAffinityTerm])
-> Parser (Maybe [V1PodAffinityTerm] -> V1PodAntiAffinity)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1WeightedPodAffinityTerm])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"preferredDuringSchedulingIgnoredDuringExecution")
      Parser (Maybe [V1PodAffinityTerm] -> V1PodAntiAffinity)
-> Parser (Maybe [V1PodAffinityTerm]) -> Parser V1PodAntiAffinity
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1PodAffinityTerm])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"requiredDuringSchedulingIgnoredDuringExecution")

-- | ToJSON V1PodAntiAffinity
instance A.ToJSON V1PodAntiAffinity where
  toJSON :: V1PodAntiAffinity -> Value
toJSON V1PodAntiAffinity {Maybe [V1WeightedPodAffinityTerm]
Maybe [V1PodAffinityTerm]
$sel:v1PodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecution:V1PodAntiAffinity :: V1PodAntiAffinity -> Maybe [V1WeightedPodAffinityTerm]
$sel:v1PodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecution:V1PodAntiAffinity :: V1PodAntiAffinity -> Maybe [V1PodAffinityTerm]
v1PodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecution :: Maybe [V1WeightedPodAffinityTerm]
v1PodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecution :: Maybe [V1PodAffinityTerm]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"preferredDuringSchedulingIgnoredDuringExecution" Key -> Maybe [V1WeightedPodAffinityTerm] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1WeightedPodAffinityTerm]
v1PodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecution
      , Key
"requiredDuringSchedulingIgnoredDuringExecution" Key -> Maybe [V1PodAffinityTerm] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1PodAffinityTerm]
v1PodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecution
      ]


-- | Construct a value of type 'V1PodAntiAffinity' (by applying it's required fields, if any)
mkV1PodAntiAffinity
  :: V1PodAntiAffinity
mkV1PodAntiAffinity :: V1PodAntiAffinity
mkV1PodAntiAffinity =
  V1PodAntiAffinity
  { $sel:v1PodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecution:V1PodAntiAffinity :: Maybe [V1WeightedPodAffinityTerm]
v1PodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecution = Maybe [V1WeightedPodAffinityTerm]
forall a. Maybe a
Nothing
  , $sel:v1PodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecution:V1PodAntiAffinity :: Maybe [V1PodAffinityTerm]
v1PodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecution = Maybe [V1PodAffinityTerm]
forall a. Maybe a
Nothing
  }

-- ** V1PodCondition
-- | V1PodCondition
-- PodCondition contains details for the current condition of this pod.
data V1PodCondition = V1PodCondition
  { V1PodCondition -> Maybe DateTime
v1PodConditionLastProbeTime :: !(Maybe DateTime) -- ^ "lastProbeTime" - Last time we probed the condition.
  , V1PodCondition -> Maybe DateTime
v1PodConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - Last time the condition transitioned from one status to another.
  , V1PodCondition -> Maybe Text
v1PodConditionMessage :: !(Maybe Text) -- ^ "message" - Human-readable message indicating details about last transition.
  , V1PodCondition -> Maybe Text
v1PodConditionReason :: !(Maybe Text) -- ^ "reason" - Unique, one-word, CamelCase reason for the condition&#39;s last transition.
  , V1PodCondition -> Text
v1PodConditionStatus :: !(Text) -- ^ /Required/ "status" - Status is the status of the condition. Can be True, False, Unknown. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions
  , V1PodCondition -> Text
v1PodConditionType :: !(Text) -- ^ /Required/ "type" - Type is the type of the condition. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions
  } deriving (Int -> V1PodCondition -> ShowS
[V1PodCondition] -> ShowS
V1PodCondition -> String
(Int -> V1PodCondition -> ShowS)
-> (V1PodCondition -> String)
-> ([V1PodCondition] -> ShowS)
-> Show V1PodCondition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PodCondition -> ShowS
showsPrec :: Int -> V1PodCondition -> ShowS
$cshow :: V1PodCondition -> String
show :: V1PodCondition -> String
$cshowList :: [V1PodCondition] -> ShowS
showList :: [V1PodCondition] -> ShowS
P.Show, V1PodCondition -> V1PodCondition -> Bool
(V1PodCondition -> V1PodCondition -> Bool)
-> (V1PodCondition -> V1PodCondition -> Bool) -> Eq V1PodCondition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PodCondition -> V1PodCondition -> Bool
== :: V1PodCondition -> V1PodCondition -> Bool
$c/= :: V1PodCondition -> V1PodCondition -> Bool
/= :: V1PodCondition -> V1PodCondition -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PodCondition
instance A.FromJSON V1PodCondition where
  parseJSON :: Value -> Parser V1PodCondition
parseJSON = String
-> (Object -> Parser V1PodCondition)
-> Value
-> Parser V1PodCondition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PodCondition" ((Object -> Parser V1PodCondition)
 -> Value -> Parser V1PodCondition)
-> (Object -> Parser V1PodCondition)
-> Value
-> Parser V1PodCondition
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe DateTime
-> Maybe DateTime
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> V1PodCondition
V1PodCondition
      (Maybe DateTime
 -> Maybe DateTime
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> Text
 -> V1PodCondition)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe DateTime
      -> Maybe Text -> Maybe Text -> Text -> Text -> V1PodCondition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lastProbeTime")
      Parser
  (Maybe DateTime
   -> Maybe Text -> Maybe Text -> Text -> Text -> V1PodCondition)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe Text -> Maybe Text -> Text -> Text -> V1PodCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lastTransitionTime")
      Parser (Maybe Text -> Maybe Text -> Text -> Text -> V1PodCondition)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Text -> Text -> V1PodCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"message")
      Parser (Maybe Text -> Text -> Text -> V1PodCondition)
-> Parser (Maybe Text) -> Parser (Text -> Text -> V1PodCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reason")
      Parser (Text -> Text -> V1PodCondition)
-> Parser Text -> Parser (Text -> V1PodCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"status")
      Parser (Text -> V1PodCondition)
-> Parser Text -> Parser V1PodCondition
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"type")

-- | ToJSON V1PodCondition
instance A.ToJSON V1PodCondition where
  toJSON :: V1PodCondition -> Value
toJSON V1PodCondition {Maybe Text
Maybe DateTime
Text
$sel:v1PodConditionLastProbeTime:V1PodCondition :: V1PodCondition -> Maybe DateTime
$sel:v1PodConditionLastTransitionTime:V1PodCondition :: V1PodCondition -> Maybe DateTime
$sel:v1PodConditionMessage:V1PodCondition :: V1PodCondition -> Maybe Text
$sel:v1PodConditionReason:V1PodCondition :: V1PodCondition -> Maybe Text
$sel:v1PodConditionStatus:V1PodCondition :: V1PodCondition -> Text
$sel:v1PodConditionType:V1PodCondition :: V1PodCondition -> Text
v1PodConditionLastProbeTime :: Maybe DateTime
v1PodConditionLastTransitionTime :: Maybe DateTime
v1PodConditionMessage :: Maybe Text
v1PodConditionReason :: Maybe Text
v1PodConditionStatus :: Text
v1PodConditionType :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"lastProbeTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1PodConditionLastProbeTime
      , Key
"lastTransitionTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1PodConditionLastTransitionTime
      , Key
"message" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodConditionMessage
      , Key
"reason" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodConditionReason
      , Key
"status" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1PodConditionStatus
      , Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1PodConditionType
      ]


-- | Construct a value of type 'V1PodCondition' (by applying it's required fields, if any)
mkV1PodCondition
  :: Text -- ^ 'v1PodConditionStatus': Status is the status of the condition. Can be True, False, Unknown. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions
  -> Text -- ^ 'v1PodConditionType': Type is the type of the condition. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions
  -> V1PodCondition
mkV1PodCondition :: Text -> Text -> V1PodCondition
mkV1PodCondition Text
v1PodConditionStatus Text
v1PodConditionType =
  V1PodCondition
  { $sel:v1PodConditionLastProbeTime:V1PodCondition :: Maybe DateTime
v1PodConditionLastProbeTime = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1PodConditionLastTransitionTime:V1PodCondition :: Maybe DateTime
v1PodConditionLastTransitionTime = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1PodConditionMessage:V1PodCondition :: Maybe Text
v1PodConditionMessage = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodConditionReason:V1PodCondition :: Maybe Text
v1PodConditionReason = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1PodConditionStatus:V1PodCondition :: Text
v1PodConditionStatus :: Text
v1PodConditionStatus
  , Text
$sel:v1PodConditionType:V1PodCondition :: Text
v1PodConditionType :: Text
v1PodConditionType
  }

-- ** V1PodDNSConfig
-- | V1PodDNSConfig
-- PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy.
data V1PodDNSConfig = V1PodDNSConfig
  { V1PodDNSConfig -> Maybe [Text]
v1PodDNSConfigNameservers :: !(Maybe [Text]) -- ^ "nameservers" - A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed.
  , V1PodDNSConfig -> Maybe [V1PodDNSConfigOption]
v1PodDNSConfigOptions :: !(Maybe [V1PodDNSConfigOption]) -- ^ "options" - A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy.
  , V1PodDNSConfig -> Maybe [Text]
v1PodDNSConfigSearches :: !(Maybe [Text]) -- ^ "searches" - A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed.
  } deriving (Int -> V1PodDNSConfig -> ShowS
[V1PodDNSConfig] -> ShowS
V1PodDNSConfig -> String
(Int -> V1PodDNSConfig -> ShowS)
-> (V1PodDNSConfig -> String)
-> ([V1PodDNSConfig] -> ShowS)
-> Show V1PodDNSConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PodDNSConfig -> ShowS
showsPrec :: Int -> V1PodDNSConfig -> ShowS
$cshow :: V1PodDNSConfig -> String
show :: V1PodDNSConfig -> String
$cshowList :: [V1PodDNSConfig] -> ShowS
showList :: [V1PodDNSConfig] -> ShowS
P.Show, V1PodDNSConfig -> V1PodDNSConfig -> Bool
(V1PodDNSConfig -> V1PodDNSConfig -> Bool)
-> (V1PodDNSConfig -> V1PodDNSConfig -> Bool) -> Eq V1PodDNSConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PodDNSConfig -> V1PodDNSConfig -> Bool
== :: V1PodDNSConfig -> V1PodDNSConfig -> Bool
$c/= :: V1PodDNSConfig -> V1PodDNSConfig -> Bool
/= :: V1PodDNSConfig -> V1PodDNSConfig -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PodDNSConfig
instance A.FromJSON V1PodDNSConfig where
  parseJSON :: Value -> Parser V1PodDNSConfig
parseJSON = String
-> (Object -> Parser V1PodDNSConfig)
-> Value
-> Parser V1PodDNSConfig
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PodDNSConfig" ((Object -> Parser V1PodDNSConfig)
 -> Value -> Parser V1PodDNSConfig)
-> (Object -> Parser V1PodDNSConfig)
-> Value
-> Parser V1PodDNSConfig
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [Text]
-> Maybe [V1PodDNSConfigOption] -> Maybe [Text] -> V1PodDNSConfig
V1PodDNSConfig
      (Maybe [Text]
 -> Maybe [V1PodDNSConfigOption] -> Maybe [Text] -> V1PodDNSConfig)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [V1PodDNSConfigOption] -> Maybe [Text] -> V1PodDNSConfig)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nameservers")
      Parser
  (Maybe [V1PodDNSConfigOption] -> Maybe [Text] -> V1PodDNSConfig)
-> Parser (Maybe [V1PodDNSConfigOption])
-> Parser (Maybe [Text] -> V1PodDNSConfig)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1PodDNSConfigOption])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"options")
      Parser (Maybe [Text] -> V1PodDNSConfig)
-> Parser (Maybe [Text]) -> Parser V1PodDNSConfig
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"searches")

-- | ToJSON V1PodDNSConfig
instance A.ToJSON V1PodDNSConfig where
  toJSON :: V1PodDNSConfig -> Value
toJSON V1PodDNSConfig {Maybe [Text]
Maybe [V1PodDNSConfigOption]
$sel:v1PodDNSConfigNameservers:V1PodDNSConfig :: V1PodDNSConfig -> Maybe [Text]
$sel:v1PodDNSConfigOptions:V1PodDNSConfig :: V1PodDNSConfig -> Maybe [V1PodDNSConfigOption]
$sel:v1PodDNSConfigSearches:V1PodDNSConfig :: V1PodDNSConfig -> Maybe [Text]
v1PodDNSConfigNameservers :: Maybe [Text]
v1PodDNSConfigOptions :: Maybe [V1PodDNSConfigOption]
v1PodDNSConfigSearches :: Maybe [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"nameservers" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1PodDNSConfigNameservers
      , Key
"options" Key -> Maybe [V1PodDNSConfigOption] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1PodDNSConfigOption]
v1PodDNSConfigOptions
      , Key
"searches" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1PodDNSConfigSearches
      ]


-- | Construct a value of type 'V1PodDNSConfig' (by applying it's required fields, if any)
mkV1PodDNSConfig
  :: V1PodDNSConfig
mkV1PodDNSConfig :: V1PodDNSConfig
mkV1PodDNSConfig =
  V1PodDNSConfig
  { $sel:v1PodDNSConfigNameservers:V1PodDNSConfig :: Maybe [Text]
v1PodDNSConfigNameservers = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1PodDNSConfigOptions:V1PodDNSConfig :: Maybe [V1PodDNSConfigOption]
v1PodDNSConfigOptions = Maybe [V1PodDNSConfigOption]
forall a. Maybe a
Nothing
  , $sel:v1PodDNSConfigSearches:V1PodDNSConfig :: Maybe [Text]
v1PodDNSConfigSearches = Maybe [Text]
forall a. Maybe a
Nothing
  }

-- ** V1PodDNSConfigOption
-- | V1PodDNSConfigOption
-- PodDNSConfigOption defines DNS resolver options of a pod.
data V1PodDNSConfigOption = V1PodDNSConfigOption
  { V1PodDNSConfigOption -> Maybe Text
v1PodDNSConfigOptionName :: !(Maybe Text) -- ^ "name" - Name is this DNS resolver option&#39;s name. Required.
  , V1PodDNSConfigOption -> Maybe Text
v1PodDNSConfigOptionValue :: !(Maybe Text) -- ^ "value" - Value is this DNS resolver option&#39;s value.
  } deriving (Int -> V1PodDNSConfigOption -> ShowS
[V1PodDNSConfigOption] -> ShowS
V1PodDNSConfigOption -> String
(Int -> V1PodDNSConfigOption -> ShowS)
-> (V1PodDNSConfigOption -> String)
-> ([V1PodDNSConfigOption] -> ShowS)
-> Show V1PodDNSConfigOption
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PodDNSConfigOption -> ShowS
showsPrec :: Int -> V1PodDNSConfigOption -> ShowS
$cshow :: V1PodDNSConfigOption -> String
show :: V1PodDNSConfigOption -> String
$cshowList :: [V1PodDNSConfigOption] -> ShowS
showList :: [V1PodDNSConfigOption] -> ShowS
P.Show, V1PodDNSConfigOption -> V1PodDNSConfigOption -> Bool
(V1PodDNSConfigOption -> V1PodDNSConfigOption -> Bool)
-> (V1PodDNSConfigOption -> V1PodDNSConfigOption -> Bool)
-> Eq V1PodDNSConfigOption
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PodDNSConfigOption -> V1PodDNSConfigOption -> Bool
== :: V1PodDNSConfigOption -> V1PodDNSConfigOption -> Bool
$c/= :: V1PodDNSConfigOption -> V1PodDNSConfigOption -> Bool
/= :: V1PodDNSConfigOption -> V1PodDNSConfigOption -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PodDNSConfigOption
instance A.FromJSON V1PodDNSConfigOption where
  parseJSON :: Value -> Parser V1PodDNSConfigOption
parseJSON = String
-> (Object -> Parser V1PodDNSConfigOption)
-> Value
-> Parser V1PodDNSConfigOption
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PodDNSConfigOption" ((Object -> Parser V1PodDNSConfigOption)
 -> Value -> Parser V1PodDNSConfigOption)
-> (Object -> Parser V1PodDNSConfigOption)
-> Value
-> Parser V1PodDNSConfigOption
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Maybe Text -> V1PodDNSConfigOption
V1PodDNSConfigOption
      (Maybe Text -> Maybe Text -> V1PodDNSConfigOption)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> V1PodDNSConfigOption)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"name")
      Parser (Maybe Text -> V1PodDNSConfigOption)
-> Parser (Maybe Text) -> Parser V1PodDNSConfigOption
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"value")

-- | ToJSON V1PodDNSConfigOption
instance A.ToJSON V1PodDNSConfigOption where
  toJSON :: V1PodDNSConfigOption -> Value
toJSON V1PodDNSConfigOption {Maybe Text
$sel:v1PodDNSConfigOptionName:V1PodDNSConfigOption :: V1PodDNSConfigOption -> Maybe Text
$sel:v1PodDNSConfigOptionValue:V1PodDNSConfigOption :: V1PodDNSConfigOption -> Maybe Text
v1PodDNSConfigOptionName :: Maybe Text
v1PodDNSConfigOptionValue :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"name" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodDNSConfigOptionName
      , Key
"value" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodDNSConfigOptionValue
      ]


-- | Construct a value of type 'V1PodDNSConfigOption' (by applying it's required fields, if any)
mkV1PodDNSConfigOption
  :: V1PodDNSConfigOption
mkV1PodDNSConfigOption :: V1PodDNSConfigOption
mkV1PodDNSConfigOption =
  V1PodDNSConfigOption
  { $sel:v1PodDNSConfigOptionName:V1PodDNSConfigOption :: Maybe Text
v1PodDNSConfigOptionName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodDNSConfigOptionValue:V1PodDNSConfigOption :: Maybe Text
v1PodDNSConfigOptionValue = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1PodDisruptionBudget
-- | V1PodDisruptionBudget
-- PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods
data V1PodDisruptionBudget = V1PodDisruptionBudget
  { V1PodDisruptionBudget -> Maybe Text
v1PodDisruptionBudgetApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1PodDisruptionBudget -> Maybe Text
v1PodDisruptionBudgetKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1PodDisruptionBudget -> Maybe V1ObjectMeta
v1PodDisruptionBudgetMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1PodDisruptionBudget -> Maybe V1PodDisruptionBudgetSpec
v1PodDisruptionBudgetSpec :: !(Maybe V1PodDisruptionBudgetSpec) -- ^ "spec"
  , V1PodDisruptionBudget -> Maybe V1PodDisruptionBudgetStatus
v1PodDisruptionBudgetStatus :: !(Maybe V1PodDisruptionBudgetStatus) -- ^ "status"
  } deriving (Int -> V1PodDisruptionBudget -> ShowS
[V1PodDisruptionBudget] -> ShowS
V1PodDisruptionBudget -> String
(Int -> V1PodDisruptionBudget -> ShowS)
-> (V1PodDisruptionBudget -> String)
-> ([V1PodDisruptionBudget] -> ShowS)
-> Show V1PodDisruptionBudget
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PodDisruptionBudget -> ShowS
showsPrec :: Int -> V1PodDisruptionBudget -> ShowS
$cshow :: V1PodDisruptionBudget -> String
show :: V1PodDisruptionBudget -> String
$cshowList :: [V1PodDisruptionBudget] -> ShowS
showList :: [V1PodDisruptionBudget] -> ShowS
P.Show, V1PodDisruptionBudget -> V1PodDisruptionBudget -> Bool
(V1PodDisruptionBudget -> V1PodDisruptionBudget -> Bool)
-> (V1PodDisruptionBudget -> V1PodDisruptionBudget -> Bool)
-> Eq V1PodDisruptionBudget
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PodDisruptionBudget -> V1PodDisruptionBudget -> Bool
== :: V1PodDisruptionBudget -> V1PodDisruptionBudget -> Bool
$c/= :: V1PodDisruptionBudget -> V1PodDisruptionBudget -> Bool
/= :: V1PodDisruptionBudget -> V1PodDisruptionBudget -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PodDisruptionBudget
instance A.FromJSON V1PodDisruptionBudget where
  parseJSON :: Value -> Parser V1PodDisruptionBudget
parseJSON = String
-> (Object -> Parser V1PodDisruptionBudget)
-> Value
-> Parser V1PodDisruptionBudget
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PodDisruptionBudget" ((Object -> Parser V1PodDisruptionBudget)
 -> Value -> Parser V1PodDisruptionBudget)
-> (Object -> Parser V1PodDisruptionBudget)
-> Value
-> Parser V1PodDisruptionBudget
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1PodDisruptionBudgetSpec
-> Maybe V1PodDisruptionBudgetStatus
-> V1PodDisruptionBudget
V1PodDisruptionBudget
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1PodDisruptionBudgetSpec
 -> Maybe V1PodDisruptionBudgetStatus
 -> V1PodDisruptionBudget)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1PodDisruptionBudgetSpec
      -> Maybe V1PodDisruptionBudgetStatus
      -> V1PodDisruptionBudget)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1PodDisruptionBudgetSpec
   -> Maybe V1PodDisruptionBudgetStatus
   -> V1PodDisruptionBudget)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1PodDisruptionBudgetSpec
      -> Maybe V1PodDisruptionBudgetStatus
      -> V1PodDisruptionBudget)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1PodDisruptionBudgetSpec
   -> Maybe V1PodDisruptionBudgetStatus
   -> V1PodDisruptionBudget)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe V1PodDisruptionBudgetSpec
      -> Maybe V1PodDisruptionBudgetStatus -> V1PodDisruptionBudget)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (Maybe V1PodDisruptionBudgetSpec
   -> Maybe V1PodDisruptionBudgetStatus -> V1PodDisruptionBudget)
-> Parser (Maybe V1PodDisruptionBudgetSpec)
-> Parser
     (Maybe V1PodDisruptionBudgetStatus -> V1PodDisruptionBudget)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1PodDisruptionBudgetSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")
      Parser (Maybe V1PodDisruptionBudgetStatus -> V1PodDisruptionBudget)
-> Parser (Maybe V1PodDisruptionBudgetStatus)
-> Parser V1PodDisruptionBudget
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1PodDisruptionBudgetStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1PodDisruptionBudget
instance A.ToJSON V1PodDisruptionBudget where
  toJSON :: V1PodDisruptionBudget -> Value
toJSON V1PodDisruptionBudget {Maybe Text
Maybe V1PodDisruptionBudgetStatus
Maybe V1PodDisruptionBudgetSpec
Maybe V1ObjectMeta
$sel:v1PodDisruptionBudgetApiVersion:V1PodDisruptionBudget :: V1PodDisruptionBudget -> Maybe Text
$sel:v1PodDisruptionBudgetKind:V1PodDisruptionBudget :: V1PodDisruptionBudget -> Maybe Text
$sel:v1PodDisruptionBudgetMetadata:V1PodDisruptionBudget :: V1PodDisruptionBudget -> Maybe V1ObjectMeta
$sel:v1PodDisruptionBudgetSpec:V1PodDisruptionBudget :: V1PodDisruptionBudget -> Maybe V1PodDisruptionBudgetSpec
$sel:v1PodDisruptionBudgetStatus:V1PodDisruptionBudget :: V1PodDisruptionBudget -> Maybe V1PodDisruptionBudgetStatus
v1PodDisruptionBudgetApiVersion :: Maybe Text
v1PodDisruptionBudgetKind :: Maybe Text
v1PodDisruptionBudgetMetadata :: Maybe V1ObjectMeta
v1PodDisruptionBudgetSpec :: Maybe V1PodDisruptionBudgetSpec
v1PodDisruptionBudgetStatus :: Maybe V1PodDisruptionBudgetStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodDisruptionBudgetApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodDisruptionBudgetKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1PodDisruptionBudgetMetadata
      , Key
"spec" Key -> Maybe V1PodDisruptionBudgetSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1PodDisruptionBudgetSpec
v1PodDisruptionBudgetSpec
      , Key
"status" Key -> Maybe V1PodDisruptionBudgetStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1PodDisruptionBudgetStatus
v1PodDisruptionBudgetStatus
      ]


-- | Construct a value of type 'V1PodDisruptionBudget' (by applying it's required fields, if any)
mkV1PodDisruptionBudget
  :: V1PodDisruptionBudget
mkV1PodDisruptionBudget :: V1PodDisruptionBudget
mkV1PodDisruptionBudget =
  V1PodDisruptionBudget
  { $sel:v1PodDisruptionBudgetApiVersion:V1PodDisruptionBudget :: Maybe Text
v1PodDisruptionBudgetApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodDisruptionBudgetKind:V1PodDisruptionBudget :: Maybe Text
v1PodDisruptionBudgetKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodDisruptionBudgetMetadata:V1PodDisruptionBudget :: Maybe V1ObjectMeta
v1PodDisruptionBudgetMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1PodDisruptionBudgetSpec:V1PodDisruptionBudget :: Maybe V1PodDisruptionBudgetSpec
v1PodDisruptionBudgetSpec = Maybe V1PodDisruptionBudgetSpec
forall a. Maybe a
Nothing
  , $sel:v1PodDisruptionBudgetStatus:V1PodDisruptionBudget :: Maybe V1PodDisruptionBudgetStatus
v1PodDisruptionBudgetStatus = Maybe V1PodDisruptionBudgetStatus
forall a. Maybe a
Nothing
  }

-- ** V1PodDisruptionBudgetList
-- | V1PodDisruptionBudgetList
-- PodDisruptionBudgetList is a collection of PodDisruptionBudgets.
data V1PodDisruptionBudgetList = V1PodDisruptionBudgetList
  { V1PodDisruptionBudgetList -> Maybe Text
v1PodDisruptionBudgetListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1PodDisruptionBudgetList -> [V1PodDisruptionBudget]
v1PodDisruptionBudgetListItems :: !([V1PodDisruptionBudget]) -- ^ /Required/ "items" - Items is a list of PodDisruptionBudgets
  , V1PodDisruptionBudgetList -> Maybe Text
v1PodDisruptionBudgetListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1PodDisruptionBudgetList -> Maybe V1ListMeta
v1PodDisruptionBudgetListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1PodDisruptionBudgetList -> ShowS
[V1PodDisruptionBudgetList] -> ShowS
V1PodDisruptionBudgetList -> String
(Int -> V1PodDisruptionBudgetList -> ShowS)
-> (V1PodDisruptionBudgetList -> String)
-> ([V1PodDisruptionBudgetList] -> ShowS)
-> Show V1PodDisruptionBudgetList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PodDisruptionBudgetList -> ShowS
showsPrec :: Int -> V1PodDisruptionBudgetList -> ShowS
$cshow :: V1PodDisruptionBudgetList -> String
show :: V1PodDisruptionBudgetList -> String
$cshowList :: [V1PodDisruptionBudgetList] -> ShowS
showList :: [V1PodDisruptionBudgetList] -> ShowS
P.Show, V1PodDisruptionBudgetList -> V1PodDisruptionBudgetList -> Bool
(V1PodDisruptionBudgetList -> V1PodDisruptionBudgetList -> Bool)
-> (V1PodDisruptionBudgetList -> V1PodDisruptionBudgetList -> Bool)
-> Eq V1PodDisruptionBudgetList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PodDisruptionBudgetList -> V1PodDisruptionBudgetList -> Bool
== :: V1PodDisruptionBudgetList -> V1PodDisruptionBudgetList -> Bool
$c/= :: V1PodDisruptionBudgetList -> V1PodDisruptionBudgetList -> Bool
/= :: V1PodDisruptionBudgetList -> V1PodDisruptionBudgetList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PodDisruptionBudgetList
instance A.FromJSON V1PodDisruptionBudgetList where
  parseJSON :: Value -> Parser V1PodDisruptionBudgetList
parseJSON = String
-> (Object -> Parser V1PodDisruptionBudgetList)
-> Value
-> Parser V1PodDisruptionBudgetList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PodDisruptionBudgetList" ((Object -> Parser V1PodDisruptionBudgetList)
 -> Value -> Parser V1PodDisruptionBudgetList)
-> (Object -> Parser V1PodDisruptionBudgetList)
-> Value
-> Parser V1PodDisruptionBudgetList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1PodDisruptionBudget]
-> Maybe Text
-> Maybe V1ListMeta
-> V1PodDisruptionBudgetList
V1PodDisruptionBudgetList
      (Maybe Text
 -> [V1PodDisruptionBudget]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1PodDisruptionBudgetList)
-> Parser (Maybe Text)
-> Parser
     ([V1PodDisruptionBudget]
      -> Maybe Text -> Maybe V1ListMeta -> V1PodDisruptionBudgetList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1PodDisruptionBudget]
   -> Maybe Text -> Maybe V1ListMeta -> V1PodDisruptionBudgetList)
-> Parser [V1PodDisruptionBudget]
-> Parser
     (Maybe Text -> Maybe V1ListMeta -> V1PodDisruptionBudgetList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1PodDisruptionBudget]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser
  (Maybe Text -> Maybe V1ListMeta -> V1PodDisruptionBudgetList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1PodDisruptionBudgetList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1PodDisruptionBudgetList)
-> Parser (Maybe V1ListMeta) -> Parser V1PodDisruptionBudgetList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1PodDisruptionBudgetList
instance A.ToJSON V1PodDisruptionBudgetList where
  toJSON :: V1PodDisruptionBudgetList -> Value
toJSON V1PodDisruptionBudgetList {[V1PodDisruptionBudget]
Maybe Text
Maybe V1ListMeta
$sel:v1PodDisruptionBudgetListApiVersion:V1PodDisruptionBudgetList :: V1PodDisruptionBudgetList -> Maybe Text
$sel:v1PodDisruptionBudgetListItems:V1PodDisruptionBudgetList :: V1PodDisruptionBudgetList -> [V1PodDisruptionBudget]
$sel:v1PodDisruptionBudgetListKind:V1PodDisruptionBudgetList :: V1PodDisruptionBudgetList -> Maybe Text
$sel:v1PodDisruptionBudgetListMetadata:V1PodDisruptionBudgetList :: V1PodDisruptionBudgetList -> Maybe V1ListMeta
v1PodDisruptionBudgetListApiVersion :: Maybe Text
v1PodDisruptionBudgetListItems :: [V1PodDisruptionBudget]
v1PodDisruptionBudgetListKind :: Maybe Text
v1PodDisruptionBudgetListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodDisruptionBudgetListApiVersion
      , Key
"items" Key -> [V1PodDisruptionBudget] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1PodDisruptionBudget]
v1PodDisruptionBudgetListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodDisruptionBudgetListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1PodDisruptionBudgetListMetadata
      ]


-- | Construct a value of type 'V1PodDisruptionBudgetList' (by applying it's required fields, if any)
mkV1PodDisruptionBudgetList
  :: [V1PodDisruptionBudget] -- ^ 'v1PodDisruptionBudgetListItems': Items is a list of PodDisruptionBudgets
  -> V1PodDisruptionBudgetList
mkV1PodDisruptionBudgetList :: [V1PodDisruptionBudget] -> V1PodDisruptionBudgetList
mkV1PodDisruptionBudgetList [V1PodDisruptionBudget]
v1PodDisruptionBudgetListItems =
  V1PodDisruptionBudgetList
  { $sel:v1PodDisruptionBudgetListApiVersion:V1PodDisruptionBudgetList :: Maybe Text
v1PodDisruptionBudgetListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1PodDisruptionBudget]
$sel:v1PodDisruptionBudgetListItems:V1PodDisruptionBudgetList :: [V1PodDisruptionBudget]
v1PodDisruptionBudgetListItems :: [V1PodDisruptionBudget]
v1PodDisruptionBudgetListItems
  , $sel:v1PodDisruptionBudgetListKind:V1PodDisruptionBudgetList :: Maybe Text
v1PodDisruptionBudgetListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodDisruptionBudgetListMetadata:V1PodDisruptionBudgetList :: Maybe V1ListMeta
v1PodDisruptionBudgetListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1PodDisruptionBudgetSpec
-- | V1PodDisruptionBudgetSpec
-- PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.
data V1PodDisruptionBudgetSpec = V1PodDisruptionBudgetSpec
  { V1PodDisruptionBudgetSpec -> Maybe IntOrString
v1PodDisruptionBudgetSpecMaxUnavailable :: !(Maybe IntOrString) -- ^ "maxUnavailable"
  , V1PodDisruptionBudgetSpec -> Maybe IntOrString
v1PodDisruptionBudgetSpecMinAvailable :: !(Maybe IntOrString) -- ^ "minAvailable"
  , V1PodDisruptionBudgetSpec -> Maybe V1LabelSelector
v1PodDisruptionBudgetSpecSelector :: !(Maybe V1LabelSelector) -- ^ "selector"
  , V1PodDisruptionBudgetSpec -> Maybe Text
v1PodDisruptionBudgetSpecUnhealthyPodEvictionPolicy :: !(Maybe Text) -- ^ "unhealthyPodEvictionPolicy" - UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods should be considered for eviction. Current implementation considers healthy pods, as pods that have status.conditions item with type&#x3D;\&quot;Ready\&quot;,status&#x3D;\&quot;True\&quot;.  Valid policies are IfHealthyBudget and AlwaysAllow. If no policy is specified, the default behavior will be used, which corresponds to the IfHealthyBudget policy.  IfHealthyBudget policy means that running pods (status.phase&#x3D;\&quot;Running\&quot;), but not yet healthy can be evicted only if the guarded application is not disrupted (status.currentHealthy is at least equal to status.desiredHealthy). Healthy pods will be subject to the PDB for eviction.  AlwaysAllow policy means that all running pods (status.phase&#x3D;\&quot;Running\&quot;), but not yet healthy are considered disrupted and can be evicted regardless of whether the criteria in a PDB is met. This means perspective running pods of a disrupted application might not get a chance to become healthy. Healthy pods will be subject to the PDB for eviction.  Additional policies may be added in the future. Clients making eviction decisions should disallow eviction of unhealthy pods if they encounter an unrecognized policy in this field.  This field is beta-level. The eviction API uses this field when the feature gate PDBUnhealthyPodEvictionPolicy is enabled (enabled by default).
  } deriving (Int -> V1PodDisruptionBudgetSpec -> ShowS
[V1PodDisruptionBudgetSpec] -> ShowS
V1PodDisruptionBudgetSpec -> String
(Int -> V1PodDisruptionBudgetSpec -> ShowS)
-> (V1PodDisruptionBudgetSpec -> String)
-> ([V1PodDisruptionBudgetSpec] -> ShowS)
-> Show V1PodDisruptionBudgetSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PodDisruptionBudgetSpec -> ShowS
showsPrec :: Int -> V1PodDisruptionBudgetSpec -> ShowS
$cshow :: V1PodDisruptionBudgetSpec -> String
show :: V1PodDisruptionBudgetSpec -> String
$cshowList :: [V1PodDisruptionBudgetSpec] -> ShowS
showList :: [V1PodDisruptionBudgetSpec] -> ShowS
P.Show, V1PodDisruptionBudgetSpec -> V1PodDisruptionBudgetSpec -> Bool
(V1PodDisruptionBudgetSpec -> V1PodDisruptionBudgetSpec -> Bool)
-> (V1PodDisruptionBudgetSpec -> V1PodDisruptionBudgetSpec -> Bool)
-> Eq V1PodDisruptionBudgetSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PodDisruptionBudgetSpec -> V1PodDisruptionBudgetSpec -> Bool
== :: V1PodDisruptionBudgetSpec -> V1PodDisruptionBudgetSpec -> Bool
$c/= :: V1PodDisruptionBudgetSpec -> V1PodDisruptionBudgetSpec -> Bool
/= :: V1PodDisruptionBudgetSpec -> V1PodDisruptionBudgetSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PodDisruptionBudgetSpec
instance A.FromJSON V1PodDisruptionBudgetSpec where
  parseJSON :: Value -> Parser V1PodDisruptionBudgetSpec
parseJSON = String
-> (Object -> Parser V1PodDisruptionBudgetSpec)
-> Value
-> Parser V1PodDisruptionBudgetSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PodDisruptionBudgetSpec" ((Object -> Parser V1PodDisruptionBudgetSpec)
 -> Value -> Parser V1PodDisruptionBudgetSpec)
-> (Object -> Parser V1PodDisruptionBudgetSpec)
-> Value
-> Parser V1PodDisruptionBudgetSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe IntOrString
-> Maybe IntOrString
-> Maybe V1LabelSelector
-> Maybe Text
-> V1PodDisruptionBudgetSpec
V1PodDisruptionBudgetSpec
      (Maybe IntOrString
 -> Maybe IntOrString
 -> Maybe V1LabelSelector
 -> Maybe Text
 -> V1PodDisruptionBudgetSpec)
-> Parser (Maybe IntOrString)
-> Parser
     (Maybe IntOrString
      -> Maybe V1LabelSelector
      -> Maybe Text
      -> V1PodDisruptionBudgetSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe IntOrString)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"maxUnavailable")
      Parser
  (Maybe IntOrString
   -> Maybe V1LabelSelector
   -> Maybe Text
   -> V1PodDisruptionBudgetSpec)
-> Parser (Maybe IntOrString)
-> Parser
     (Maybe V1LabelSelector -> Maybe Text -> V1PodDisruptionBudgetSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe IntOrString)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"minAvailable")
      Parser
  (Maybe V1LabelSelector -> Maybe Text -> V1PodDisruptionBudgetSpec)
-> Parser (Maybe V1LabelSelector)
-> Parser (Maybe Text -> V1PodDisruptionBudgetSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LabelSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"selector")
      Parser (Maybe Text -> V1PodDisruptionBudgetSpec)
-> Parser (Maybe Text) -> Parser V1PodDisruptionBudgetSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"unhealthyPodEvictionPolicy")

-- | ToJSON V1PodDisruptionBudgetSpec
instance A.ToJSON V1PodDisruptionBudgetSpec where
  toJSON :: V1PodDisruptionBudgetSpec -> Value
toJSON V1PodDisruptionBudgetSpec {Maybe Text
Maybe IntOrString
Maybe V1LabelSelector
$sel:v1PodDisruptionBudgetSpecMaxUnavailable:V1PodDisruptionBudgetSpec :: V1PodDisruptionBudgetSpec -> Maybe IntOrString
$sel:v1PodDisruptionBudgetSpecMinAvailable:V1PodDisruptionBudgetSpec :: V1PodDisruptionBudgetSpec -> Maybe IntOrString
$sel:v1PodDisruptionBudgetSpecSelector:V1PodDisruptionBudgetSpec :: V1PodDisruptionBudgetSpec -> Maybe V1LabelSelector
$sel:v1PodDisruptionBudgetSpecUnhealthyPodEvictionPolicy:V1PodDisruptionBudgetSpec :: V1PodDisruptionBudgetSpec -> Maybe Text
v1PodDisruptionBudgetSpecMaxUnavailable :: Maybe IntOrString
v1PodDisruptionBudgetSpecMinAvailable :: Maybe IntOrString
v1PodDisruptionBudgetSpecSelector :: Maybe V1LabelSelector
v1PodDisruptionBudgetSpecUnhealthyPodEvictionPolicy :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"maxUnavailable" Key -> Maybe IntOrString -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe IntOrString
v1PodDisruptionBudgetSpecMaxUnavailable
      , Key
"minAvailable" Key -> Maybe IntOrString -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe IntOrString
v1PodDisruptionBudgetSpecMinAvailable
      , Key
"selector" Key -> Maybe V1LabelSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LabelSelector
v1PodDisruptionBudgetSpecSelector
      , Key
"unhealthyPodEvictionPolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodDisruptionBudgetSpecUnhealthyPodEvictionPolicy
      ]


-- | Construct a value of type 'V1PodDisruptionBudgetSpec' (by applying it's required fields, if any)
mkV1PodDisruptionBudgetSpec
  :: V1PodDisruptionBudgetSpec
mkV1PodDisruptionBudgetSpec :: V1PodDisruptionBudgetSpec
mkV1PodDisruptionBudgetSpec =
  V1PodDisruptionBudgetSpec
  { $sel:v1PodDisruptionBudgetSpecMaxUnavailable:V1PodDisruptionBudgetSpec :: Maybe IntOrString
v1PodDisruptionBudgetSpecMaxUnavailable = Maybe IntOrString
forall a. Maybe a
Nothing
  , $sel:v1PodDisruptionBudgetSpecMinAvailable:V1PodDisruptionBudgetSpec :: Maybe IntOrString
v1PodDisruptionBudgetSpecMinAvailable = Maybe IntOrString
forall a. Maybe a
Nothing
  , $sel:v1PodDisruptionBudgetSpecSelector:V1PodDisruptionBudgetSpec :: Maybe V1LabelSelector
v1PodDisruptionBudgetSpecSelector = Maybe V1LabelSelector
forall a. Maybe a
Nothing
  , $sel:v1PodDisruptionBudgetSpecUnhealthyPodEvictionPolicy:V1PodDisruptionBudgetSpec :: Maybe Text
v1PodDisruptionBudgetSpecUnhealthyPodEvictionPolicy = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1PodDisruptionBudgetStatus
-- | V1PodDisruptionBudgetStatus
-- PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.
data V1PodDisruptionBudgetStatus = V1PodDisruptionBudgetStatus
  { V1PodDisruptionBudgetStatus -> Maybe [V1Condition]
v1PodDisruptionBudgetStatusConditions :: !(Maybe [V1Condition]) -- ^ "conditions" - Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn&#39;t able to compute               the number of allowed disruptions. Therefore no disruptions are               allowed and the status of the condition will be False. - InsufficientPods: The number of pods are either at or below the number                     required by the PodDisruptionBudget. No disruptions are                     allowed and the status of the condition will be False. - SufficientPods: There are more pods than required by the PodDisruptionBudget.                   The condition will be True, and the number of allowed                   disruptions are provided by the disruptionsAllowed property.
  , V1PodDisruptionBudgetStatus -> Int
v1PodDisruptionBudgetStatusCurrentHealthy :: !(Int) -- ^ /Required/ "currentHealthy" - current number of healthy pods
  , V1PodDisruptionBudgetStatus -> Int
v1PodDisruptionBudgetStatusDesiredHealthy :: !(Int) -- ^ /Required/ "desiredHealthy" - minimum desired number of healthy pods
  , V1PodDisruptionBudgetStatus -> Maybe (Map String DateTime)
v1PodDisruptionBudgetStatusDisruptedPods :: !(Maybe (Map.Map String DateTime)) -- ^ "disruptedPods" - DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn&#39;t occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.
  , V1PodDisruptionBudgetStatus -> Int
v1PodDisruptionBudgetStatusDisruptionsAllowed :: !(Int) -- ^ /Required/ "disruptionsAllowed" - Number of pod disruptions that are currently allowed.
  , V1PodDisruptionBudgetStatus -> Int
v1PodDisruptionBudgetStatusExpectedPods :: !(Int) -- ^ /Required/ "expectedPods" - total number of pods counted by this disruption budget
  , V1PodDisruptionBudgetStatus -> Maybe Integer
v1PodDisruptionBudgetStatusObservedGeneration :: !(Maybe Integer) -- ^ "observedGeneration" - Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB&#39;s object generation.
  } deriving (Int -> V1PodDisruptionBudgetStatus -> ShowS
[V1PodDisruptionBudgetStatus] -> ShowS
V1PodDisruptionBudgetStatus -> String
(Int -> V1PodDisruptionBudgetStatus -> ShowS)
-> (V1PodDisruptionBudgetStatus -> String)
-> ([V1PodDisruptionBudgetStatus] -> ShowS)
-> Show V1PodDisruptionBudgetStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PodDisruptionBudgetStatus -> ShowS
showsPrec :: Int -> V1PodDisruptionBudgetStatus -> ShowS
$cshow :: V1PodDisruptionBudgetStatus -> String
show :: V1PodDisruptionBudgetStatus -> String
$cshowList :: [V1PodDisruptionBudgetStatus] -> ShowS
showList :: [V1PodDisruptionBudgetStatus] -> ShowS
P.Show, V1PodDisruptionBudgetStatus -> V1PodDisruptionBudgetStatus -> Bool
(V1PodDisruptionBudgetStatus
 -> V1PodDisruptionBudgetStatus -> Bool)
-> (V1PodDisruptionBudgetStatus
    -> V1PodDisruptionBudgetStatus -> Bool)
-> Eq V1PodDisruptionBudgetStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PodDisruptionBudgetStatus -> V1PodDisruptionBudgetStatus -> Bool
== :: V1PodDisruptionBudgetStatus -> V1PodDisruptionBudgetStatus -> Bool
$c/= :: V1PodDisruptionBudgetStatus -> V1PodDisruptionBudgetStatus -> Bool
/= :: V1PodDisruptionBudgetStatus -> V1PodDisruptionBudgetStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PodDisruptionBudgetStatus
instance A.FromJSON V1PodDisruptionBudgetStatus where
  parseJSON :: Value -> Parser V1PodDisruptionBudgetStatus
parseJSON = String
-> (Object -> Parser V1PodDisruptionBudgetStatus)
-> Value
-> Parser V1PodDisruptionBudgetStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PodDisruptionBudgetStatus" ((Object -> Parser V1PodDisruptionBudgetStatus)
 -> Value -> Parser V1PodDisruptionBudgetStatus)
-> (Object -> Parser V1PodDisruptionBudgetStatus)
-> Value
-> Parser V1PodDisruptionBudgetStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1Condition]
-> Int
-> Int
-> Maybe (Map String DateTime)
-> Int
-> Int
-> Maybe Integer
-> V1PodDisruptionBudgetStatus
V1PodDisruptionBudgetStatus
      (Maybe [V1Condition]
 -> Int
 -> Int
 -> Maybe (Map String DateTime)
 -> Int
 -> Int
 -> Maybe Integer
 -> V1PodDisruptionBudgetStatus)
-> Parser (Maybe [V1Condition])
-> Parser
     (Int
      -> Int
      -> Maybe (Map String DateTime)
      -> Int
      -> Int
      -> Maybe Integer
      -> V1PodDisruptionBudgetStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1Condition])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"conditions")
      Parser
  (Int
   -> Int
   -> Maybe (Map String DateTime)
   -> Int
   -> Int
   -> Maybe Integer
   -> V1PodDisruptionBudgetStatus)
-> Parser Int
-> Parser
     (Int
      -> Maybe (Map String DateTime)
      -> Int
      -> Int
      -> Maybe Integer
      -> V1PodDisruptionBudgetStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"currentHealthy")
      Parser
  (Int
   -> Maybe (Map String DateTime)
   -> Int
   -> Int
   -> Maybe Integer
   -> V1PodDisruptionBudgetStatus)
-> Parser Int
-> Parser
     (Maybe (Map String DateTime)
      -> Int -> Int -> Maybe Integer -> V1PodDisruptionBudgetStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"desiredHealthy")
      Parser
  (Maybe (Map String DateTime)
   -> Int -> Int -> Maybe Integer -> V1PodDisruptionBudgetStatus)
-> Parser (Maybe (Map String DateTime))
-> Parser
     (Int -> Int -> Maybe Integer -> V1PodDisruptionBudgetStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String DateTime))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"disruptedPods")
      Parser (Int -> Int -> Maybe Integer -> V1PodDisruptionBudgetStatus)
-> Parser Int
-> Parser (Int -> Maybe Integer -> V1PodDisruptionBudgetStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"disruptionsAllowed")
      Parser (Int -> Maybe Integer -> V1PodDisruptionBudgetStatus)
-> Parser Int
-> Parser (Maybe Integer -> V1PodDisruptionBudgetStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"expectedPods")
      Parser (Maybe Integer -> V1PodDisruptionBudgetStatus)
-> Parser (Maybe Integer) -> Parser V1PodDisruptionBudgetStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"observedGeneration")

-- | ToJSON V1PodDisruptionBudgetStatus
instance A.ToJSON V1PodDisruptionBudgetStatus where
  toJSON :: V1PodDisruptionBudgetStatus -> Value
toJSON V1PodDisruptionBudgetStatus {Int
Maybe Integer
Maybe [V1Condition]
Maybe (Map String DateTime)
$sel:v1PodDisruptionBudgetStatusConditions:V1PodDisruptionBudgetStatus :: V1PodDisruptionBudgetStatus -> Maybe [V1Condition]
$sel:v1PodDisruptionBudgetStatusCurrentHealthy:V1PodDisruptionBudgetStatus :: V1PodDisruptionBudgetStatus -> Int
$sel:v1PodDisruptionBudgetStatusDesiredHealthy:V1PodDisruptionBudgetStatus :: V1PodDisruptionBudgetStatus -> Int
$sel:v1PodDisruptionBudgetStatusDisruptedPods:V1PodDisruptionBudgetStatus :: V1PodDisruptionBudgetStatus -> Maybe (Map String DateTime)
$sel:v1PodDisruptionBudgetStatusDisruptionsAllowed:V1PodDisruptionBudgetStatus :: V1PodDisruptionBudgetStatus -> Int
$sel:v1PodDisruptionBudgetStatusExpectedPods:V1PodDisruptionBudgetStatus :: V1PodDisruptionBudgetStatus -> Int
$sel:v1PodDisruptionBudgetStatusObservedGeneration:V1PodDisruptionBudgetStatus :: V1PodDisruptionBudgetStatus -> Maybe Integer
v1PodDisruptionBudgetStatusConditions :: Maybe [V1Condition]
v1PodDisruptionBudgetStatusCurrentHealthy :: Int
v1PodDisruptionBudgetStatusDesiredHealthy :: Int
v1PodDisruptionBudgetStatusDisruptedPods :: Maybe (Map String DateTime)
v1PodDisruptionBudgetStatusDisruptionsAllowed :: Int
v1PodDisruptionBudgetStatusExpectedPods :: Int
v1PodDisruptionBudgetStatusObservedGeneration :: Maybe Integer
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"conditions" Key -> Maybe [V1Condition] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1Condition]
v1PodDisruptionBudgetStatusConditions
      , Key
"currentHealthy" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v1PodDisruptionBudgetStatusCurrentHealthy
      , Key
"desiredHealthy" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v1PodDisruptionBudgetStatusDesiredHealthy
      , Key
"disruptedPods" Key -> Maybe (Map String DateTime) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String DateTime)
v1PodDisruptionBudgetStatusDisruptedPods
      , Key
"disruptionsAllowed" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v1PodDisruptionBudgetStatusDisruptionsAllowed
      , Key
"expectedPods" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v1PodDisruptionBudgetStatusExpectedPods
      , Key
"observedGeneration" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1PodDisruptionBudgetStatusObservedGeneration
      ]


-- | Construct a value of type 'V1PodDisruptionBudgetStatus' (by applying it's required fields, if any)
mkV1PodDisruptionBudgetStatus
  :: Int -- ^ 'v1PodDisruptionBudgetStatusCurrentHealthy': current number of healthy pods
  -> Int -- ^ 'v1PodDisruptionBudgetStatusDesiredHealthy': minimum desired number of healthy pods
  -> Int -- ^ 'v1PodDisruptionBudgetStatusDisruptionsAllowed': Number of pod disruptions that are currently allowed.
  -> Int -- ^ 'v1PodDisruptionBudgetStatusExpectedPods': total number of pods counted by this disruption budget
  -> V1PodDisruptionBudgetStatus
mkV1PodDisruptionBudgetStatus :: Int -> Int -> Int -> Int -> V1PodDisruptionBudgetStatus
mkV1PodDisruptionBudgetStatus Int
v1PodDisruptionBudgetStatusCurrentHealthy Int
v1PodDisruptionBudgetStatusDesiredHealthy Int
v1PodDisruptionBudgetStatusDisruptionsAllowed Int
v1PodDisruptionBudgetStatusExpectedPods =
  V1PodDisruptionBudgetStatus
  { $sel:v1PodDisruptionBudgetStatusConditions:V1PodDisruptionBudgetStatus :: Maybe [V1Condition]
v1PodDisruptionBudgetStatusConditions = Maybe [V1Condition]
forall a. Maybe a
Nothing
  , Int
$sel:v1PodDisruptionBudgetStatusCurrentHealthy:V1PodDisruptionBudgetStatus :: Int
v1PodDisruptionBudgetStatusCurrentHealthy :: Int
v1PodDisruptionBudgetStatusCurrentHealthy
  , Int
$sel:v1PodDisruptionBudgetStatusDesiredHealthy:V1PodDisruptionBudgetStatus :: Int
v1PodDisruptionBudgetStatusDesiredHealthy :: Int
v1PodDisruptionBudgetStatusDesiredHealthy
  , $sel:v1PodDisruptionBudgetStatusDisruptedPods:V1PodDisruptionBudgetStatus :: Maybe (Map String DateTime)
v1PodDisruptionBudgetStatusDisruptedPods = Maybe (Map String DateTime)
forall a. Maybe a
Nothing
  , Int
$sel:v1PodDisruptionBudgetStatusDisruptionsAllowed:V1PodDisruptionBudgetStatus :: Int
v1PodDisruptionBudgetStatusDisruptionsAllowed :: Int
v1PodDisruptionBudgetStatusDisruptionsAllowed
  , Int
$sel:v1PodDisruptionBudgetStatusExpectedPods:V1PodDisruptionBudgetStatus :: Int
v1PodDisruptionBudgetStatusExpectedPods :: Int
v1PodDisruptionBudgetStatusExpectedPods
  , $sel:v1PodDisruptionBudgetStatusObservedGeneration:V1PodDisruptionBudgetStatus :: Maybe Integer
v1PodDisruptionBudgetStatusObservedGeneration = Maybe Integer
forall a. Maybe a
Nothing
  }

-- ** V1PodFailurePolicy
-- | V1PodFailurePolicy
-- PodFailurePolicy describes how failed pods influence the backoffLimit.
data V1PodFailurePolicy = V1PodFailurePolicy
  { V1PodFailurePolicy -> [V1PodFailurePolicyRule]
v1PodFailurePolicyRules :: !([V1PodFailurePolicyRule]) -- ^ /Required/ "rules" - A list of pod failure policy rules. The rules are evaluated in order. Once a rule matches a Pod failure, the remaining of the rules are ignored. When no rule matches the Pod failure, the default handling applies - the counter of pod failures is incremented and it is checked against the backoffLimit. At most 20 elements are allowed.
  } deriving (Int -> V1PodFailurePolicy -> ShowS
[V1PodFailurePolicy] -> ShowS
V1PodFailurePolicy -> String
(Int -> V1PodFailurePolicy -> ShowS)
-> (V1PodFailurePolicy -> String)
-> ([V1PodFailurePolicy] -> ShowS)
-> Show V1PodFailurePolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PodFailurePolicy -> ShowS
showsPrec :: Int -> V1PodFailurePolicy -> ShowS
$cshow :: V1PodFailurePolicy -> String
show :: V1PodFailurePolicy -> String
$cshowList :: [V1PodFailurePolicy] -> ShowS
showList :: [V1PodFailurePolicy] -> ShowS
P.Show, V1PodFailurePolicy -> V1PodFailurePolicy -> Bool
(V1PodFailurePolicy -> V1PodFailurePolicy -> Bool)
-> (V1PodFailurePolicy -> V1PodFailurePolicy -> Bool)
-> Eq V1PodFailurePolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PodFailurePolicy -> V1PodFailurePolicy -> Bool
== :: V1PodFailurePolicy -> V1PodFailurePolicy -> Bool
$c/= :: V1PodFailurePolicy -> V1PodFailurePolicy -> Bool
/= :: V1PodFailurePolicy -> V1PodFailurePolicy -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PodFailurePolicy
instance A.FromJSON V1PodFailurePolicy where
  parseJSON :: Value -> Parser V1PodFailurePolicy
parseJSON = String
-> (Object -> Parser V1PodFailurePolicy)
-> Value
-> Parser V1PodFailurePolicy
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PodFailurePolicy" ((Object -> Parser V1PodFailurePolicy)
 -> Value -> Parser V1PodFailurePolicy)
-> (Object -> Parser V1PodFailurePolicy)
-> Value
-> Parser V1PodFailurePolicy
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    [V1PodFailurePolicyRule] -> V1PodFailurePolicy
V1PodFailurePolicy
      ([V1PodFailurePolicyRule] -> V1PodFailurePolicy)
-> Parser [V1PodFailurePolicyRule] -> Parser V1PodFailurePolicy
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser [V1PodFailurePolicyRule]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"rules")

-- | ToJSON V1PodFailurePolicy
instance A.ToJSON V1PodFailurePolicy where
  toJSON :: V1PodFailurePolicy -> Value
toJSON V1PodFailurePolicy {[V1PodFailurePolicyRule]
$sel:v1PodFailurePolicyRules:V1PodFailurePolicy :: V1PodFailurePolicy -> [V1PodFailurePolicyRule]
v1PodFailurePolicyRules :: [V1PodFailurePolicyRule]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"rules" Key -> [V1PodFailurePolicyRule] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1PodFailurePolicyRule]
v1PodFailurePolicyRules
      ]


-- | Construct a value of type 'V1PodFailurePolicy' (by applying it's required fields, if any)
mkV1PodFailurePolicy
  :: [V1PodFailurePolicyRule] -- ^ 'v1PodFailurePolicyRules': A list of pod failure policy rules. The rules are evaluated in order. Once a rule matches a Pod failure, the remaining of the rules are ignored. When no rule matches the Pod failure, the default handling applies - the counter of pod failures is incremented and it is checked against the backoffLimit. At most 20 elements are allowed.
  -> V1PodFailurePolicy
mkV1PodFailurePolicy :: [V1PodFailurePolicyRule] -> V1PodFailurePolicy
mkV1PodFailurePolicy [V1PodFailurePolicyRule]
v1PodFailurePolicyRules =
  V1PodFailurePolicy
  { [V1PodFailurePolicyRule]
$sel:v1PodFailurePolicyRules:V1PodFailurePolicy :: [V1PodFailurePolicyRule]
v1PodFailurePolicyRules :: [V1PodFailurePolicyRule]
v1PodFailurePolicyRules
  }

-- ** V1PodFailurePolicyOnExitCodesRequirement
-- | V1PodFailurePolicyOnExitCodesRequirement
-- PodFailurePolicyOnExitCodesRequirement describes the requirement for handling a failed pod based on its container exit codes. In particular, it lookups the .state.terminated.exitCode for each app container and init container status, represented by the .status.containerStatuses and .status.initContainerStatuses fields in the Pod status, respectively. Containers completed with success (exit code 0) are excluded from the requirement check.
data V1PodFailurePolicyOnExitCodesRequirement = V1PodFailurePolicyOnExitCodesRequirement
  { V1PodFailurePolicyOnExitCodesRequirement -> Maybe Text
v1PodFailurePolicyOnExitCodesRequirementContainerName :: !(Maybe Text) -- ^ "containerName" - Restricts the check for exit codes to the container with the specified name. When null, the rule applies to all containers. When specified, it should match one the container or initContainer names in the pod template.
  , V1PodFailurePolicyOnExitCodesRequirement -> Text
v1PodFailurePolicyOnExitCodesRequirementOperator :: !(Text) -- ^ /Required/ "operator" - Represents the relationship between the container exit code(s) and the specified values. Containers completed with success (exit code 0) are excluded from the requirement check. Possible values are:  - In: the requirement is satisfied if at least one container exit code   (might be multiple if there are multiple containers not restricted   by the &#39;containerName&#39; field) is in the set of specified values. - NotIn: the requirement is satisfied if at least one container exit code   (might be multiple if there are multiple containers not restricted   by the &#39;containerName&#39; field) is not in the set of specified values. Additional values are considered to be added in the future. Clients should react to an unknown operator by assuming the requirement is not satisfied.
  , V1PodFailurePolicyOnExitCodesRequirement -> [Int]
v1PodFailurePolicyOnExitCodesRequirementValues :: !([Int]) -- ^ /Required/ "values" - Specifies the set of values. Each returned container exit code (might be multiple in case of multiple containers) is checked against this set of values with respect to the operator. The list of values must be ordered and must not contain duplicates. Value &#39;0&#39; cannot be used for the In operator. At least one element is required. At most 255 elements are allowed.
  } deriving (Int -> V1PodFailurePolicyOnExitCodesRequirement -> ShowS
[V1PodFailurePolicyOnExitCodesRequirement] -> ShowS
V1PodFailurePolicyOnExitCodesRequirement -> String
(Int -> V1PodFailurePolicyOnExitCodesRequirement -> ShowS)
-> (V1PodFailurePolicyOnExitCodesRequirement -> String)
-> ([V1PodFailurePolicyOnExitCodesRequirement] -> ShowS)
-> Show V1PodFailurePolicyOnExitCodesRequirement
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PodFailurePolicyOnExitCodesRequirement -> ShowS
showsPrec :: Int -> V1PodFailurePolicyOnExitCodesRequirement -> ShowS
$cshow :: V1PodFailurePolicyOnExitCodesRequirement -> String
show :: V1PodFailurePolicyOnExitCodesRequirement -> String
$cshowList :: [V1PodFailurePolicyOnExitCodesRequirement] -> ShowS
showList :: [V1PodFailurePolicyOnExitCodesRequirement] -> ShowS
P.Show, V1PodFailurePolicyOnExitCodesRequirement
-> V1PodFailurePolicyOnExitCodesRequirement -> Bool
(V1PodFailurePolicyOnExitCodesRequirement
 -> V1PodFailurePolicyOnExitCodesRequirement -> Bool)
-> (V1PodFailurePolicyOnExitCodesRequirement
    -> V1PodFailurePolicyOnExitCodesRequirement -> Bool)
-> Eq V1PodFailurePolicyOnExitCodesRequirement
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PodFailurePolicyOnExitCodesRequirement
-> V1PodFailurePolicyOnExitCodesRequirement -> Bool
== :: V1PodFailurePolicyOnExitCodesRequirement
-> V1PodFailurePolicyOnExitCodesRequirement -> Bool
$c/= :: V1PodFailurePolicyOnExitCodesRequirement
-> V1PodFailurePolicyOnExitCodesRequirement -> Bool
/= :: V1PodFailurePolicyOnExitCodesRequirement
-> V1PodFailurePolicyOnExitCodesRequirement -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PodFailurePolicyOnExitCodesRequirement
instance A.FromJSON V1PodFailurePolicyOnExitCodesRequirement where
  parseJSON :: Value -> Parser V1PodFailurePolicyOnExitCodesRequirement
parseJSON = String
-> (Object -> Parser V1PodFailurePolicyOnExitCodesRequirement)
-> Value
-> Parser V1PodFailurePolicyOnExitCodesRequirement
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PodFailurePolicyOnExitCodesRequirement" ((Object -> Parser V1PodFailurePolicyOnExitCodesRequirement)
 -> Value -> Parser V1PodFailurePolicyOnExitCodesRequirement)
-> (Object -> Parser V1PodFailurePolicyOnExitCodesRequirement)
-> Value
-> Parser V1PodFailurePolicyOnExitCodesRequirement
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Text -> [Int] -> V1PodFailurePolicyOnExitCodesRequirement
V1PodFailurePolicyOnExitCodesRequirement
      (Maybe Text
 -> Text -> [Int] -> V1PodFailurePolicyOnExitCodesRequirement)
-> Parser (Maybe Text)
-> Parser
     (Text -> [Int] -> V1PodFailurePolicyOnExitCodesRequirement)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"containerName")
      Parser (Text -> [Int] -> V1PodFailurePolicyOnExitCodesRequirement)
-> Parser Text
-> Parser ([Int] -> V1PodFailurePolicyOnExitCodesRequirement)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"operator")
      Parser ([Int] -> V1PodFailurePolicyOnExitCodesRequirement)
-> Parser [Int] -> Parser V1PodFailurePolicyOnExitCodesRequirement
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [Int]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"values")

-- | ToJSON V1PodFailurePolicyOnExitCodesRequirement
instance A.ToJSON V1PodFailurePolicyOnExitCodesRequirement where
  toJSON :: V1PodFailurePolicyOnExitCodesRequirement -> Value
toJSON V1PodFailurePolicyOnExitCodesRequirement {[Int]
Maybe Text
Text
$sel:v1PodFailurePolicyOnExitCodesRequirementContainerName:V1PodFailurePolicyOnExitCodesRequirement :: V1PodFailurePolicyOnExitCodesRequirement -> Maybe Text
$sel:v1PodFailurePolicyOnExitCodesRequirementOperator:V1PodFailurePolicyOnExitCodesRequirement :: V1PodFailurePolicyOnExitCodesRequirement -> Text
$sel:v1PodFailurePolicyOnExitCodesRequirementValues:V1PodFailurePolicyOnExitCodesRequirement :: V1PodFailurePolicyOnExitCodesRequirement -> [Int]
v1PodFailurePolicyOnExitCodesRequirementContainerName :: Maybe Text
v1PodFailurePolicyOnExitCodesRequirementOperator :: Text
v1PodFailurePolicyOnExitCodesRequirementValues :: [Int]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"containerName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodFailurePolicyOnExitCodesRequirementContainerName
      , Key
"operator" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1PodFailurePolicyOnExitCodesRequirementOperator
      , Key
"values" Key -> [Int] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [Int]
v1PodFailurePolicyOnExitCodesRequirementValues
      ]


-- | Construct a value of type 'V1PodFailurePolicyOnExitCodesRequirement' (by applying it's required fields, if any)
mkV1PodFailurePolicyOnExitCodesRequirement
  :: Text -- ^ 'v1PodFailurePolicyOnExitCodesRequirementOperator': Represents the relationship between the container exit code(s) and the specified values. Containers completed with success (exit code 0) are excluded from the requirement check. Possible values are:  - In: the requirement is satisfied if at least one container exit code   (might be multiple if there are multiple containers not restricted   by the 'containerName' field) is in the set of specified values. - NotIn: the requirement is satisfied if at least one container exit code   (might be multiple if there are multiple containers not restricted   by the 'containerName' field) is not in the set of specified values. Additional values are considered to be added in the future. Clients should react to an unknown operator by assuming the requirement is not satisfied.
  -> [Int] -- ^ 'v1PodFailurePolicyOnExitCodesRequirementValues': Specifies the set of values. Each returned container exit code (might be multiple in case of multiple containers) is checked against this set of values with respect to the operator. The list of values must be ordered and must not contain duplicates. Value '0' cannot be used for the In operator. At least one element is required. At most 255 elements are allowed.
  -> V1PodFailurePolicyOnExitCodesRequirement
mkV1PodFailurePolicyOnExitCodesRequirement :: Text -> [Int] -> V1PodFailurePolicyOnExitCodesRequirement
mkV1PodFailurePolicyOnExitCodesRequirement Text
v1PodFailurePolicyOnExitCodesRequirementOperator [Int]
v1PodFailurePolicyOnExitCodesRequirementValues =
  V1PodFailurePolicyOnExitCodesRequirement
  { $sel:v1PodFailurePolicyOnExitCodesRequirementContainerName:V1PodFailurePolicyOnExitCodesRequirement :: Maybe Text
v1PodFailurePolicyOnExitCodesRequirementContainerName = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1PodFailurePolicyOnExitCodesRequirementOperator:V1PodFailurePolicyOnExitCodesRequirement :: Text
v1PodFailurePolicyOnExitCodesRequirementOperator :: Text
v1PodFailurePolicyOnExitCodesRequirementOperator
  , [Int]
$sel:v1PodFailurePolicyOnExitCodesRequirementValues:V1PodFailurePolicyOnExitCodesRequirement :: [Int]
v1PodFailurePolicyOnExitCodesRequirementValues :: [Int]
v1PodFailurePolicyOnExitCodesRequirementValues
  }

-- ** V1PodFailurePolicyOnPodConditionsPattern
-- | V1PodFailurePolicyOnPodConditionsPattern
-- PodFailurePolicyOnPodConditionsPattern describes a pattern for matching an actual pod condition type.
data V1PodFailurePolicyOnPodConditionsPattern = V1PodFailurePolicyOnPodConditionsPattern
  { V1PodFailurePolicyOnPodConditionsPattern -> Text
v1PodFailurePolicyOnPodConditionsPatternStatus :: !(Text) -- ^ /Required/ "status" - Specifies the required Pod condition status. To match a pod condition it is required that the specified status equals the pod condition status. Defaults to True.
  , V1PodFailurePolicyOnPodConditionsPattern -> Text
v1PodFailurePolicyOnPodConditionsPatternType :: !(Text) -- ^ /Required/ "type" - Specifies the required Pod condition type. To match a pod condition it is required that specified type equals the pod condition type.
  } deriving (Int -> V1PodFailurePolicyOnPodConditionsPattern -> ShowS
[V1PodFailurePolicyOnPodConditionsPattern] -> ShowS
V1PodFailurePolicyOnPodConditionsPattern -> String
(Int -> V1PodFailurePolicyOnPodConditionsPattern -> ShowS)
-> (V1PodFailurePolicyOnPodConditionsPattern -> String)
-> ([V1PodFailurePolicyOnPodConditionsPattern] -> ShowS)
-> Show V1PodFailurePolicyOnPodConditionsPattern
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PodFailurePolicyOnPodConditionsPattern -> ShowS
showsPrec :: Int -> V1PodFailurePolicyOnPodConditionsPattern -> ShowS
$cshow :: V1PodFailurePolicyOnPodConditionsPattern -> String
show :: V1PodFailurePolicyOnPodConditionsPattern -> String
$cshowList :: [V1PodFailurePolicyOnPodConditionsPattern] -> ShowS
showList :: [V1PodFailurePolicyOnPodConditionsPattern] -> ShowS
P.Show, V1PodFailurePolicyOnPodConditionsPattern
-> V1PodFailurePolicyOnPodConditionsPattern -> Bool
(V1PodFailurePolicyOnPodConditionsPattern
 -> V1PodFailurePolicyOnPodConditionsPattern -> Bool)
-> (V1PodFailurePolicyOnPodConditionsPattern
    -> V1PodFailurePolicyOnPodConditionsPattern -> Bool)
-> Eq V1PodFailurePolicyOnPodConditionsPattern
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PodFailurePolicyOnPodConditionsPattern
-> V1PodFailurePolicyOnPodConditionsPattern -> Bool
== :: V1PodFailurePolicyOnPodConditionsPattern
-> V1PodFailurePolicyOnPodConditionsPattern -> Bool
$c/= :: V1PodFailurePolicyOnPodConditionsPattern
-> V1PodFailurePolicyOnPodConditionsPattern -> Bool
/= :: V1PodFailurePolicyOnPodConditionsPattern
-> V1PodFailurePolicyOnPodConditionsPattern -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PodFailurePolicyOnPodConditionsPattern
instance A.FromJSON V1PodFailurePolicyOnPodConditionsPattern where
  parseJSON :: Value -> Parser V1PodFailurePolicyOnPodConditionsPattern
parseJSON = String
-> (Object -> Parser V1PodFailurePolicyOnPodConditionsPattern)
-> Value
-> Parser V1PodFailurePolicyOnPodConditionsPattern
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PodFailurePolicyOnPodConditionsPattern" ((Object -> Parser V1PodFailurePolicyOnPodConditionsPattern)
 -> Value -> Parser V1PodFailurePolicyOnPodConditionsPattern)
-> (Object -> Parser V1PodFailurePolicyOnPodConditionsPattern)
-> Value
-> Parser V1PodFailurePolicyOnPodConditionsPattern
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Text -> V1PodFailurePolicyOnPodConditionsPattern
V1PodFailurePolicyOnPodConditionsPattern
      (Text -> Text -> V1PodFailurePolicyOnPodConditionsPattern)
-> Parser Text
-> Parser (Text -> V1PodFailurePolicyOnPodConditionsPattern)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"status")
      Parser (Text -> V1PodFailurePolicyOnPodConditionsPattern)
-> Parser Text -> Parser V1PodFailurePolicyOnPodConditionsPattern
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"type")

-- | ToJSON V1PodFailurePolicyOnPodConditionsPattern
instance A.ToJSON V1PodFailurePolicyOnPodConditionsPattern where
  toJSON :: V1PodFailurePolicyOnPodConditionsPattern -> Value
toJSON V1PodFailurePolicyOnPodConditionsPattern {Text
$sel:v1PodFailurePolicyOnPodConditionsPatternStatus:V1PodFailurePolicyOnPodConditionsPattern :: V1PodFailurePolicyOnPodConditionsPattern -> Text
$sel:v1PodFailurePolicyOnPodConditionsPatternType:V1PodFailurePolicyOnPodConditionsPattern :: V1PodFailurePolicyOnPodConditionsPattern -> Text
v1PodFailurePolicyOnPodConditionsPatternStatus :: Text
v1PodFailurePolicyOnPodConditionsPatternType :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"status" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1PodFailurePolicyOnPodConditionsPatternStatus
      , Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1PodFailurePolicyOnPodConditionsPatternType
      ]


-- | Construct a value of type 'V1PodFailurePolicyOnPodConditionsPattern' (by applying it's required fields, if any)
mkV1PodFailurePolicyOnPodConditionsPattern
  :: Text -- ^ 'v1PodFailurePolicyOnPodConditionsPatternStatus': Specifies the required Pod condition status. To match a pod condition it is required that the specified status equals the pod condition status. Defaults to True.
  -> Text -- ^ 'v1PodFailurePolicyOnPodConditionsPatternType': Specifies the required Pod condition type. To match a pod condition it is required that specified type equals the pod condition type.
  -> V1PodFailurePolicyOnPodConditionsPattern
mkV1PodFailurePolicyOnPodConditionsPattern :: Text -> Text -> V1PodFailurePolicyOnPodConditionsPattern
mkV1PodFailurePolicyOnPodConditionsPattern Text
v1PodFailurePolicyOnPodConditionsPatternStatus Text
v1PodFailurePolicyOnPodConditionsPatternType =
  V1PodFailurePolicyOnPodConditionsPattern
  { Text
$sel:v1PodFailurePolicyOnPodConditionsPatternStatus:V1PodFailurePolicyOnPodConditionsPattern :: Text
v1PodFailurePolicyOnPodConditionsPatternStatus :: Text
v1PodFailurePolicyOnPodConditionsPatternStatus
  , Text
$sel:v1PodFailurePolicyOnPodConditionsPatternType:V1PodFailurePolicyOnPodConditionsPattern :: Text
v1PodFailurePolicyOnPodConditionsPatternType :: Text
v1PodFailurePolicyOnPodConditionsPatternType
  }

-- ** V1PodFailurePolicyRule
-- | V1PodFailurePolicyRule
-- PodFailurePolicyRule describes how a pod failure is handled when the requirements are met. One of onExitCodes and onPodConditions, but not both, can be used in each rule.
data V1PodFailurePolicyRule = V1PodFailurePolicyRule
  { V1PodFailurePolicyRule -> Text
v1PodFailurePolicyRuleAction :: !(Text) -- ^ /Required/ "action" - Specifies the action taken on a pod failure when the requirements are satisfied. Possible values are:  - FailJob: indicates that the pod&#39;s job is marked as Failed and all   running pods are terminated. - FailIndex: indicates that the pod&#39;s index is marked as Failed and will   not be restarted.   This value is beta-level. It can be used when the   &#x60;JobBackoffLimitPerIndex&#x60; feature gate is enabled (enabled by default). - Ignore: indicates that the counter towards the .backoffLimit is not   incremented and a replacement pod is created. - Count: indicates that the pod is handled in the default way - the   counter towards the .backoffLimit is incremented. Additional values are considered to be added in the future. Clients should react to an unknown action by skipping the rule.
  , V1PodFailurePolicyRule
-> Maybe V1PodFailurePolicyOnExitCodesRequirement
v1PodFailurePolicyRuleOnExitCodes :: !(Maybe V1PodFailurePolicyOnExitCodesRequirement) -- ^ "onExitCodes"
  , V1PodFailurePolicyRule
-> Maybe [V1PodFailurePolicyOnPodConditionsPattern]
v1PodFailurePolicyRuleOnPodConditions :: !(Maybe [V1PodFailurePolicyOnPodConditionsPattern]) -- ^ "onPodConditions" - Represents the requirement on the pod conditions. The requirement is represented as a list of pod condition patterns. The requirement is satisfied if at least one pattern matches an actual pod condition. At most 20 elements are allowed.
  } deriving (Int -> V1PodFailurePolicyRule -> ShowS
[V1PodFailurePolicyRule] -> ShowS
V1PodFailurePolicyRule -> String
(Int -> V1PodFailurePolicyRule -> ShowS)
-> (V1PodFailurePolicyRule -> String)
-> ([V1PodFailurePolicyRule] -> ShowS)
-> Show V1PodFailurePolicyRule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PodFailurePolicyRule -> ShowS
showsPrec :: Int -> V1PodFailurePolicyRule -> ShowS
$cshow :: V1PodFailurePolicyRule -> String
show :: V1PodFailurePolicyRule -> String
$cshowList :: [V1PodFailurePolicyRule] -> ShowS
showList :: [V1PodFailurePolicyRule] -> ShowS
P.Show, V1PodFailurePolicyRule -> V1PodFailurePolicyRule -> Bool
(V1PodFailurePolicyRule -> V1PodFailurePolicyRule -> Bool)
-> (V1PodFailurePolicyRule -> V1PodFailurePolicyRule -> Bool)
-> Eq V1PodFailurePolicyRule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PodFailurePolicyRule -> V1PodFailurePolicyRule -> Bool
== :: V1PodFailurePolicyRule -> V1PodFailurePolicyRule -> Bool
$c/= :: V1PodFailurePolicyRule -> V1PodFailurePolicyRule -> Bool
/= :: V1PodFailurePolicyRule -> V1PodFailurePolicyRule -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PodFailurePolicyRule
instance A.FromJSON V1PodFailurePolicyRule where
  parseJSON :: Value -> Parser V1PodFailurePolicyRule
parseJSON = String
-> (Object -> Parser V1PodFailurePolicyRule)
-> Value
-> Parser V1PodFailurePolicyRule
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PodFailurePolicyRule" ((Object -> Parser V1PodFailurePolicyRule)
 -> Value -> Parser V1PodFailurePolicyRule)
-> (Object -> Parser V1PodFailurePolicyRule)
-> Value
-> Parser V1PodFailurePolicyRule
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text
-> Maybe V1PodFailurePolicyOnExitCodesRequirement
-> Maybe [V1PodFailurePolicyOnPodConditionsPattern]
-> V1PodFailurePolicyRule
V1PodFailurePolicyRule
      (Text
 -> Maybe V1PodFailurePolicyOnExitCodesRequirement
 -> Maybe [V1PodFailurePolicyOnPodConditionsPattern]
 -> V1PodFailurePolicyRule)
-> Parser Text
-> Parser
     (Maybe V1PodFailurePolicyOnExitCodesRequirement
      -> Maybe [V1PodFailurePolicyOnPodConditionsPattern]
      -> V1PodFailurePolicyRule)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"action")
      Parser
  (Maybe V1PodFailurePolicyOnExitCodesRequirement
   -> Maybe [V1PodFailurePolicyOnPodConditionsPattern]
   -> V1PodFailurePolicyRule)
-> Parser (Maybe V1PodFailurePolicyOnExitCodesRequirement)
-> Parser
     (Maybe [V1PodFailurePolicyOnPodConditionsPattern]
      -> V1PodFailurePolicyRule)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object
-> Key -> Parser (Maybe V1PodFailurePolicyOnExitCodesRequirement)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"onExitCodes")
      Parser
  (Maybe [V1PodFailurePolicyOnPodConditionsPattern]
   -> V1PodFailurePolicyRule)
-> Parser (Maybe [V1PodFailurePolicyOnPodConditionsPattern])
-> Parser V1PodFailurePolicyRule
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object
-> Key -> Parser (Maybe [V1PodFailurePolicyOnPodConditionsPattern])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"onPodConditions")

-- | ToJSON V1PodFailurePolicyRule
instance A.ToJSON V1PodFailurePolicyRule where
  toJSON :: V1PodFailurePolicyRule -> Value
toJSON V1PodFailurePolicyRule {Maybe [V1PodFailurePolicyOnPodConditionsPattern]
Maybe V1PodFailurePolicyOnExitCodesRequirement
Text
$sel:v1PodFailurePolicyRuleAction:V1PodFailurePolicyRule :: V1PodFailurePolicyRule -> Text
$sel:v1PodFailurePolicyRuleOnExitCodes:V1PodFailurePolicyRule :: V1PodFailurePolicyRule
-> Maybe V1PodFailurePolicyOnExitCodesRequirement
$sel:v1PodFailurePolicyRuleOnPodConditions:V1PodFailurePolicyRule :: V1PodFailurePolicyRule
-> Maybe [V1PodFailurePolicyOnPodConditionsPattern]
v1PodFailurePolicyRuleAction :: Text
v1PodFailurePolicyRuleOnExitCodes :: Maybe V1PodFailurePolicyOnExitCodesRequirement
v1PodFailurePolicyRuleOnPodConditions :: Maybe [V1PodFailurePolicyOnPodConditionsPattern]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"action" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1PodFailurePolicyRuleAction
      , Key
"onExitCodes" Key
-> Maybe V1PodFailurePolicyOnExitCodesRequirement -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1PodFailurePolicyOnExitCodesRequirement
v1PodFailurePolicyRuleOnExitCodes
      , Key
"onPodConditions" Key
-> Maybe [V1PodFailurePolicyOnPodConditionsPattern] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1PodFailurePolicyOnPodConditionsPattern]
v1PodFailurePolicyRuleOnPodConditions
      ]


-- | Construct a value of type 'V1PodFailurePolicyRule' (by applying it's required fields, if any)
mkV1PodFailurePolicyRule
  :: Text -- ^ 'v1PodFailurePolicyRuleAction': Specifies the action taken on a pod failure when the requirements are satisfied. Possible values are:  - FailJob: indicates that the pod's job is marked as Failed and all   running pods are terminated. - FailIndex: indicates that the pod's index is marked as Failed and will   not be restarted.   This value is beta-level. It can be used when the   `JobBackoffLimitPerIndex` feature gate is enabled (enabled by default). - Ignore: indicates that the counter towards the .backoffLimit is not   incremented and a replacement pod is created. - Count: indicates that the pod is handled in the default way - the   counter towards the .backoffLimit is incremented. Additional values are considered to be added in the future. Clients should react to an unknown action by skipping the rule.
  -> V1PodFailurePolicyRule
mkV1PodFailurePolicyRule :: Text -> V1PodFailurePolicyRule
mkV1PodFailurePolicyRule Text
v1PodFailurePolicyRuleAction =
  V1PodFailurePolicyRule
  { Text
$sel:v1PodFailurePolicyRuleAction:V1PodFailurePolicyRule :: Text
v1PodFailurePolicyRuleAction :: Text
v1PodFailurePolicyRuleAction
  , $sel:v1PodFailurePolicyRuleOnExitCodes:V1PodFailurePolicyRule :: Maybe V1PodFailurePolicyOnExitCodesRequirement
v1PodFailurePolicyRuleOnExitCodes = Maybe V1PodFailurePolicyOnExitCodesRequirement
forall a. Maybe a
Nothing
  , $sel:v1PodFailurePolicyRuleOnPodConditions:V1PodFailurePolicyRule :: Maybe [V1PodFailurePolicyOnPodConditionsPattern]
v1PodFailurePolicyRuleOnPodConditions = Maybe [V1PodFailurePolicyOnPodConditionsPattern]
forall a. Maybe a
Nothing
  }

-- ** V1PodIP
-- | V1PodIP
-- PodIP represents a single IP address allocated to the pod.
data V1PodIP = V1PodIP
  { V1PodIP -> Text
v1PodIPIp :: !(Text) -- ^ /Required/ "ip" - IP is the IP address assigned to the pod
  } deriving (Int -> V1PodIP -> ShowS
[V1PodIP] -> ShowS
V1PodIP -> String
(Int -> V1PodIP -> ShowS)
-> (V1PodIP -> String) -> ([V1PodIP] -> ShowS) -> Show V1PodIP
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PodIP -> ShowS
showsPrec :: Int -> V1PodIP -> ShowS
$cshow :: V1PodIP -> String
show :: V1PodIP -> String
$cshowList :: [V1PodIP] -> ShowS
showList :: [V1PodIP] -> ShowS
P.Show, V1PodIP -> V1PodIP -> Bool
(V1PodIP -> V1PodIP -> Bool)
-> (V1PodIP -> V1PodIP -> Bool) -> Eq V1PodIP
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PodIP -> V1PodIP -> Bool
== :: V1PodIP -> V1PodIP -> Bool
$c/= :: V1PodIP -> V1PodIP -> Bool
/= :: V1PodIP -> V1PodIP -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PodIP
instance A.FromJSON V1PodIP where
  parseJSON :: Value -> Parser V1PodIP
parseJSON = String -> (Object -> Parser V1PodIP) -> Value -> Parser V1PodIP
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PodIP" ((Object -> Parser V1PodIP) -> Value -> Parser V1PodIP)
-> (Object -> Parser V1PodIP) -> Value -> Parser V1PodIP
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> V1PodIP
V1PodIP
      (Text -> V1PodIP) -> Parser Text -> Parser V1PodIP
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"ip")

-- | ToJSON V1PodIP
instance A.ToJSON V1PodIP where
  toJSON :: V1PodIP -> Value
toJSON V1PodIP {Text
$sel:v1PodIPIp:V1PodIP :: V1PodIP -> Text
v1PodIPIp :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"ip" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1PodIPIp
      ]


-- | Construct a value of type 'V1PodIP' (by applying it's required fields, if any)
mkV1PodIP
  :: Text -- ^ 'v1PodIPIp': IP is the IP address assigned to the pod
  -> V1PodIP
mkV1PodIP :: Text -> V1PodIP
mkV1PodIP Text
v1PodIPIp =
  V1PodIP
  { Text
$sel:v1PodIPIp:V1PodIP :: Text
v1PodIPIp :: Text
v1PodIPIp
  }

-- ** V1PodList
-- | V1PodList
-- PodList is a list of Pods.
data V1PodList = V1PodList
  { V1PodList -> Maybe Text
v1PodListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1PodList -> [V1Pod]
v1PodListItems :: !([V1Pod]) -- ^ /Required/ "items" - List of pods. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md
  , V1PodList -> Maybe Text
v1PodListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1PodList -> Maybe V1ListMeta
v1PodListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1PodList -> ShowS
[V1PodList] -> ShowS
V1PodList -> String
(Int -> V1PodList -> ShowS)
-> (V1PodList -> String)
-> ([V1PodList] -> ShowS)
-> Show V1PodList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PodList -> ShowS
showsPrec :: Int -> V1PodList -> ShowS
$cshow :: V1PodList -> String
show :: V1PodList -> String
$cshowList :: [V1PodList] -> ShowS
showList :: [V1PodList] -> ShowS
P.Show, V1PodList -> V1PodList -> Bool
(V1PodList -> V1PodList -> Bool)
-> (V1PodList -> V1PodList -> Bool) -> Eq V1PodList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PodList -> V1PodList -> Bool
== :: V1PodList -> V1PodList -> Bool
$c/= :: V1PodList -> V1PodList -> Bool
/= :: V1PodList -> V1PodList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PodList
instance A.FromJSON V1PodList where
  parseJSON :: Value -> Parser V1PodList
parseJSON = String -> (Object -> Parser V1PodList) -> Value -> Parser V1PodList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PodList" ((Object -> Parser V1PodList) -> Value -> Parser V1PodList)
-> (Object -> Parser V1PodList) -> Value -> Parser V1PodList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1Pod] -> Maybe Text -> Maybe V1ListMeta -> V1PodList
V1PodList
      (Maybe Text
 -> [V1Pod] -> Maybe Text -> Maybe V1ListMeta -> V1PodList)
-> Parser (Maybe Text)
-> Parser ([V1Pod] -> Maybe Text -> Maybe V1ListMeta -> V1PodList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser ([V1Pod] -> Maybe Text -> Maybe V1ListMeta -> V1PodList)
-> Parser [V1Pod]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1PodList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1Pod]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1PodList)
-> Parser (Maybe Text) -> Parser (Maybe V1ListMeta -> V1PodList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1PodList)
-> Parser (Maybe V1ListMeta) -> Parser V1PodList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1PodList
instance A.ToJSON V1PodList where
  toJSON :: V1PodList -> Value
toJSON V1PodList {[V1Pod]
Maybe Text
Maybe V1ListMeta
$sel:v1PodListApiVersion:V1PodList :: V1PodList -> Maybe Text
$sel:v1PodListItems:V1PodList :: V1PodList -> [V1Pod]
$sel:v1PodListKind:V1PodList :: V1PodList -> Maybe Text
$sel:v1PodListMetadata:V1PodList :: V1PodList -> Maybe V1ListMeta
v1PodListApiVersion :: Maybe Text
v1PodListItems :: [V1Pod]
v1PodListKind :: Maybe Text
v1PodListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodListApiVersion
      , Key
"items" Key -> [V1Pod] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1Pod]
v1PodListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1PodListMetadata
      ]


-- | Construct a value of type 'V1PodList' (by applying it's required fields, if any)
mkV1PodList
  :: [V1Pod] -- ^ 'v1PodListItems': List of pods. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md
  -> V1PodList
mkV1PodList :: [V1Pod] -> V1PodList
mkV1PodList [V1Pod]
v1PodListItems =
  V1PodList
  { $sel:v1PodListApiVersion:V1PodList :: Maybe Text
v1PodListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1Pod]
$sel:v1PodListItems:V1PodList :: [V1Pod]
v1PodListItems :: [V1Pod]
v1PodListItems
  , $sel:v1PodListKind:V1PodList :: Maybe Text
v1PodListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodListMetadata:V1PodList :: Maybe V1ListMeta
v1PodListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1PodOS
-- | V1PodOS
-- PodOS defines the OS parameters of a pod.
data V1PodOS = V1PodOS
  { V1PodOS -> Text
v1PodOSName :: !(Text) -- ^ /Required/ "name" - Name is the name of the operating system. The currently supported values are linux and windows. Additional value may be defined in future and can be one of: https://github.com/opencontainers/runtime-spec/blob/master/config.md#platform-specific-configuration Clients should expect to handle additional values and treat unrecognized values in this field as os: null
  } deriving (Int -> V1PodOS -> ShowS
[V1PodOS] -> ShowS
V1PodOS -> String
(Int -> V1PodOS -> ShowS)
-> (V1PodOS -> String) -> ([V1PodOS] -> ShowS) -> Show V1PodOS
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PodOS -> ShowS
showsPrec :: Int -> V1PodOS -> ShowS
$cshow :: V1PodOS -> String
show :: V1PodOS -> String
$cshowList :: [V1PodOS] -> ShowS
showList :: [V1PodOS] -> ShowS
P.Show, V1PodOS -> V1PodOS -> Bool
(V1PodOS -> V1PodOS -> Bool)
-> (V1PodOS -> V1PodOS -> Bool) -> Eq V1PodOS
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PodOS -> V1PodOS -> Bool
== :: V1PodOS -> V1PodOS -> Bool
$c/= :: V1PodOS -> V1PodOS -> Bool
/= :: V1PodOS -> V1PodOS -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PodOS
instance A.FromJSON V1PodOS where
  parseJSON :: Value -> Parser V1PodOS
parseJSON = String -> (Object -> Parser V1PodOS) -> Value -> Parser V1PodOS
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PodOS" ((Object -> Parser V1PodOS) -> Value -> Parser V1PodOS)
-> (Object -> Parser V1PodOS) -> Value -> Parser V1PodOS
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> V1PodOS
V1PodOS
      (Text -> V1PodOS) -> Parser Text -> Parser V1PodOS
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")

-- | ToJSON V1PodOS
instance A.ToJSON V1PodOS where
  toJSON :: V1PodOS -> Value
toJSON V1PodOS {Text
$sel:v1PodOSName:V1PodOS :: V1PodOS -> Text
v1PodOSName :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1PodOSName
      ]


-- | Construct a value of type 'V1PodOS' (by applying it's required fields, if any)
mkV1PodOS
  :: Text -- ^ 'v1PodOSName': Name is the name of the operating system. The currently supported values are linux and windows. Additional value may be defined in future and can be one of: https://github.com/opencontainers/runtime-spec/blob/master/config.md#platform-specific-configuration Clients should expect to handle additional values and treat unrecognized values in this field as os: null
  -> V1PodOS
mkV1PodOS :: Text -> V1PodOS
mkV1PodOS Text
v1PodOSName =
  V1PodOS
  { Text
$sel:v1PodOSName:V1PodOS :: Text
v1PodOSName :: Text
v1PodOSName
  }

-- ** V1PodReadinessGate
-- | V1PodReadinessGate
-- PodReadinessGate contains the reference to a pod condition
data V1PodReadinessGate = V1PodReadinessGate
  { V1PodReadinessGate -> Text
v1PodReadinessGateConditionType :: !(Text) -- ^ /Required/ "conditionType" - ConditionType refers to a condition in the pod&#39;s condition list with matching type.
  } deriving (Int -> V1PodReadinessGate -> ShowS
[V1PodReadinessGate] -> ShowS
V1PodReadinessGate -> String
(Int -> V1PodReadinessGate -> ShowS)
-> (V1PodReadinessGate -> String)
-> ([V1PodReadinessGate] -> ShowS)
-> Show V1PodReadinessGate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PodReadinessGate -> ShowS
showsPrec :: Int -> V1PodReadinessGate -> ShowS
$cshow :: V1PodReadinessGate -> String
show :: V1PodReadinessGate -> String
$cshowList :: [V1PodReadinessGate] -> ShowS
showList :: [V1PodReadinessGate] -> ShowS
P.Show, V1PodReadinessGate -> V1PodReadinessGate -> Bool
(V1PodReadinessGate -> V1PodReadinessGate -> Bool)
-> (V1PodReadinessGate -> V1PodReadinessGate -> Bool)
-> Eq V1PodReadinessGate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PodReadinessGate -> V1PodReadinessGate -> Bool
== :: V1PodReadinessGate -> V1PodReadinessGate -> Bool
$c/= :: V1PodReadinessGate -> V1PodReadinessGate -> Bool
/= :: V1PodReadinessGate -> V1PodReadinessGate -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PodReadinessGate
instance A.FromJSON V1PodReadinessGate where
  parseJSON :: Value -> Parser V1PodReadinessGate
parseJSON = String
-> (Object -> Parser V1PodReadinessGate)
-> Value
-> Parser V1PodReadinessGate
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PodReadinessGate" ((Object -> Parser V1PodReadinessGate)
 -> Value -> Parser V1PodReadinessGate)
-> (Object -> Parser V1PodReadinessGate)
-> Value
-> Parser V1PodReadinessGate
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> V1PodReadinessGate
V1PodReadinessGate
      (Text -> V1PodReadinessGate)
-> Parser Text -> Parser V1PodReadinessGate
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"conditionType")

-- | ToJSON V1PodReadinessGate
instance A.ToJSON V1PodReadinessGate where
  toJSON :: V1PodReadinessGate -> Value
toJSON V1PodReadinessGate {Text
$sel:v1PodReadinessGateConditionType:V1PodReadinessGate :: V1PodReadinessGate -> Text
v1PodReadinessGateConditionType :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"conditionType" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1PodReadinessGateConditionType
      ]


-- | Construct a value of type 'V1PodReadinessGate' (by applying it's required fields, if any)
mkV1PodReadinessGate
  :: Text -- ^ 'v1PodReadinessGateConditionType': ConditionType refers to a condition in the pod's condition list with matching type.
  -> V1PodReadinessGate
mkV1PodReadinessGate :: Text -> V1PodReadinessGate
mkV1PodReadinessGate Text
v1PodReadinessGateConditionType =
  V1PodReadinessGate
  { Text
$sel:v1PodReadinessGateConditionType:V1PodReadinessGate :: Text
v1PodReadinessGateConditionType :: Text
v1PodReadinessGateConditionType
  }

-- ** V1PodResourceClaim
-- | V1PodResourceClaim
-- PodResourceClaim references exactly one ResourceClaim, either directly or by naming a ResourceClaimTemplate which is then turned into a ResourceClaim for the pod.  It adds a name to it that uniquely identifies the ResourceClaim inside the Pod. Containers that need access to the ResourceClaim reference it with this name.
data V1PodResourceClaim = V1PodResourceClaim
  { V1PodResourceClaim -> Text
v1PodResourceClaimName :: !(Text) -- ^ /Required/ "name" - Name uniquely identifies this resource claim inside the pod. This must be a DNS_LABEL.
  , V1PodResourceClaim -> Maybe Text
v1PodResourceClaimResourceClaimName :: !(Maybe Text) -- ^ "resourceClaimName" - ResourceClaimName is the name of a ResourceClaim object in the same namespace as this pod.  Exactly one of ResourceClaimName and ResourceClaimTemplateName must be set.
  , V1PodResourceClaim -> Maybe Text
v1PodResourceClaimResourceClaimTemplateName :: !(Maybe Text) -- ^ "resourceClaimTemplateName" - ResourceClaimTemplateName is the name of a ResourceClaimTemplate object in the same namespace as this pod.  The template will be used to create a new ResourceClaim, which will be bound to this pod. When this pod is deleted, the ResourceClaim will also be deleted. The pod name and resource name, along with a generated component, will be used to form a unique name for the ResourceClaim, which will be recorded in pod.status.resourceClaimStatuses.  This field is immutable and no changes will be made to the corresponding ResourceClaim by the control plane after creating the ResourceClaim.  Exactly one of ResourceClaimName and ResourceClaimTemplateName must be set.
  } deriving (Int -> V1PodResourceClaim -> ShowS
[V1PodResourceClaim] -> ShowS
V1PodResourceClaim -> String
(Int -> V1PodResourceClaim -> ShowS)
-> (V1PodResourceClaim -> String)
-> ([V1PodResourceClaim] -> ShowS)
-> Show V1PodResourceClaim
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PodResourceClaim -> ShowS
showsPrec :: Int -> V1PodResourceClaim -> ShowS
$cshow :: V1PodResourceClaim -> String
show :: V1PodResourceClaim -> String
$cshowList :: [V1PodResourceClaim] -> ShowS
showList :: [V1PodResourceClaim] -> ShowS
P.Show, V1PodResourceClaim -> V1PodResourceClaim -> Bool
(V1PodResourceClaim -> V1PodResourceClaim -> Bool)
-> (V1PodResourceClaim -> V1PodResourceClaim -> Bool)
-> Eq V1PodResourceClaim
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PodResourceClaim -> V1PodResourceClaim -> Bool
== :: V1PodResourceClaim -> V1PodResourceClaim -> Bool
$c/= :: V1PodResourceClaim -> V1PodResourceClaim -> Bool
/= :: V1PodResourceClaim -> V1PodResourceClaim -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PodResourceClaim
instance A.FromJSON V1PodResourceClaim where
  parseJSON :: Value -> Parser V1PodResourceClaim
parseJSON = String
-> (Object -> Parser V1PodResourceClaim)
-> Value
-> Parser V1PodResourceClaim
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PodResourceClaim" ((Object -> Parser V1PodResourceClaim)
 -> Value -> Parser V1PodResourceClaim)
-> (Object -> Parser V1PodResourceClaim)
-> Value
-> Parser V1PodResourceClaim
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Maybe Text -> Maybe Text -> V1PodResourceClaim
V1PodResourceClaim
      (Text -> Maybe Text -> Maybe Text -> V1PodResourceClaim)
-> Parser Text
-> Parser (Maybe Text -> Maybe Text -> V1PodResourceClaim)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser (Maybe Text -> Maybe Text -> V1PodResourceClaim)
-> Parser (Maybe Text) -> Parser (Maybe Text -> V1PodResourceClaim)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resourceClaimName")
      Parser (Maybe Text -> V1PodResourceClaim)
-> Parser (Maybe Text) -> Parser V1PodResourceClaim
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resourceClaimTemplateName")

-- | ToJSON V1PodResourceClaim
instance A.ToJSON V1PodResourceClaim where
  toJSON :: V1PodResourceClaim -> Value
toJSON V1PodResourceClaim {Maybe Text
Text
$sel:v1PodResourceClaimName:V1PodResourceClaim :: V1PodResourceClaim -> Text
$sel:v1PodResourceClaimResourceClaimName:V1PodResourceClaim :: V1PodResourceClaim -> Maybe Text
$sel:v1PodResourceClaimResourceClaimTemplateName:V1PodResourceClaim :: V1PodResourceClaim -> Maybe Text
v1PodResourceClaimName :: Text
v1PodResourceClaimResourceClaimName :: Maybe Text
v1PodResourceClaimResourceClaimTemplateName :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1PodResourceClaimName
      , Key
"resourceClaimName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodResourceClaimResourceClaimName
      , Key
"resourceClaimTemplateName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodResourceClaimResourceClaimTemplateName
      ]


-- | Construct a value of type 'V1PodResourceClaim' (by applying it's required fields, if any)
mkV1PodResourceClaim
  :: Text -- ^ 'v1PodResourceClaimName': Name uniquely identifies this resource claim inside the pod. This must be a DNS_LABEL.
  -> V1PodResourceClaim
mkV1PodResourceClaim :: Text -> V1PodResourceClaim
mkV1PodResourceClaim Text
v1PodResourceClaimName =
  V1PodResourceClaim
  { Text
$sel:v1PodResourceClaimName:V1PodResourceClaim :: Text
v1PodResourceClaimName :: Text
v1PodResourceClaimName
  , $sel:v1PodResourceClaimResourceClaimName:V1PodResourceClaim :: Maybe Text
v1PodResourceClaimResourceClaimName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodResourceClaimResourceClaimTemplateName:V1PodResourceClaim :: Maybe Text
v1PodResourceClaimResourceClaimTemplateName = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1PodResourceClaimStatus
-- | V1PodResourceClaimStatus
-- PodResourceClaimStatus is stored in the PodStatus for each PodResourceClaim which references a ResourceClaimTemplate. It stores the generated name for the corresponding ResourceClaim.
data V1PodResourceClaimStatus = V1PodResourceClaimStatus
  { V1PodResourceClaimStatus -> Text
v1PodResourceClaimStatusName :: !(Text) -- ^ /Required/ "name" - Name uniquely identifies this resource claim inside the pod. This must match the name of an entry in pod.spec.resourceClaims, which implies that the string must be a DNS_LABEL.
  , V1PodResourceClaimStatus -> Maybe Text
v1PodResourceClaimStatusResourceClaimName :: !(Maybe Text) -- ^ "resourceClaimName" - ResourceClaimName is the name of the ResourceClaim that was generated for the Pod in the namespace of the Pod. If this is unset, then generating a ResourceClaim was not necessary. The pod.spec.resourceClaims entry can be ignored in this case.
  } deriving (Int -> V1PodResourceClaimStatus -> ShowS
[V1PodResourceClaimStatus] -> ShowS
V1PodResourceClaimStatus -> String
(Int -> V1PodResourceClaimStatus -> ShowS)
-> (V1PodResourceClaimStatus -> String)
-> ([V1PodResourceClaimStatus] -> ShowS)
-> Show V1PodResourceClaimStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PodResourceClaimStatus -> ShowS
showsPrec :: Int -> V1PodResourceClaimStatus -> ShowS
$cshow :: V1PodResourceClaimStatus -> String
show :: V1PodResourceClaimStatus -> String
$cshowList :: [V1PodResourceClaimStatus] -> ShowS
showList :: [V1PodResourceClaimStatus] -> ShowS
P.Show, V1PodResourceClaimStatus -> V1PodResourceClaimStatus -> Bool
(V1PodResourceClaimStatus -> V1PodResourceClaimStatus -> Bool)
-> (V1PodResourceClaimStatus -> V1PodResourceClaimStatus -> Bool)
-> Eq V1PodResourceClaimStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PodResourceClaimStatus -> V1PodResourceClaimStatus -> Bool
== :: V1PodResourceClaimStatus -> V1PodResourceClaimStatus -> Bool
$c/= :: V1PodResourceClaimStatus -> V1PodResourceClaimStatus -> Bool
/= :: V1PodResourceClaimStatus -> V1PodResourceClaimStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PodResourceClaimStatus
instance A.FromJSON V1PodResourceClaimStatus where
  parseJSON :: Value -> Parser V1PodResourceClaimStatus
parseJSON = String
-> (Object -> Parser V1PodResourceClaimStatus)
-> Value
-> Parser V1PodResourceClaimStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PodResourceClaimStatus" ((Object -> Parser V1PodResourceClaimStatus)
 -> Value -> Parser V1PodResourceClaimStatus)
-> (Object -> Parser V1PodResourceClaimStatus)
-> Value
-> Parser V1PodResourceClaimStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Maybe Text -> V1PodResourceClaimStatus
V1PodResourceClaimStatus
      (Text -> Maybe Text -> V1PodResourceClaimStatus)
-> Parser Text -> Parser (Maybe Text -> V1PodResourceClaimStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser (Maybe Text -> V1PodResourceClaimStatus)
-> Parser (Maybe Text) -> Parser V1PodResourceClaimStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resourceClaimName")

-- | ToJSON V1PodResourceClaimStatus
instance A.ToJSON V1PodResourceClaimStatus where
  toJSON :: V1PodResourceClaimStatus -> Value
toJSON V1PodResourceClaimStatus {Maybe Text
Text
$sel:v1PodResourceClaimStatusName:V1PodResourceClaimStatus :: V1PodResourceClaimStatus -> Text
$sel:v1PodResourceClaimStatusResourceClaimName:V1PodResourceClaimStatus :: V1PodResourceClaimStatus -> Maybe Text
v1PodResourceClaimStatusName :: Text
v1PodResourceClaimStatusResourceClaimName :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1PodResourceClaimStatusName
      , Key
"resourceClaimName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodResourceClaimStatusResourceClaimName
      ]


-- | Construct a value of type 'V1PodResourceClaimStatus' (by applying it's required fields, if any)
mkV1PodResourceClaimStatus
  :: Text -- ^ 'v1PodResourceClaimStatusName': Name uniquely identifies this resource claim inside the pod. This must match the name of an entry in pod.spec.resourceClaims, which implies that the string must be a DNS_LABEL.
  -> V1PodResourceClaimStatus
mkV1PodResourceClaimStatus :: Text -> V1PodResourceClaimStatus
mkV1PodResourceClaimStatus Text
v1PodResourceClaimStatusName =
  V1PodResourceClaimStatus
  { Text
$sel:v1PodResourceClaimStatusName:V1PodResourceClaimStatus :: Text
v1PodResourceClaimStatusName :: Text
v1PodResourceClaimStatusName
  , $sel:v1PodResourceClaimStatusResourceClaimName:V1PodResourceClaimStatus :: Maybe Text
v1PodResourceClaimStatusResourceClaimName = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1PodSchedulingGate
-- | V1PodSchedulingGate
-- PodSchedulingGate is associated to a Pod to guard its scheduling.
data V1PodSchedulingGate = V1PodSchedulingGate
  { V1PodSchedulingGate -> Text
v1PodSchedulingGateName :: !(Text) -- ^ /Required/ "name" - Name of the scheduling gate. Each scheduling gate must have a unique name field.
  } deriving (Int -> V1PodSchedulingGate -> ShowS
[V1PodSchedulingGate] -> ShowS
V1PodSchedulingGate -> String
(Int -> V1PodSchedulingGate -> ShowS)
-> (V1PodSchedulingGate -> String)
-> ([V1PodSchedulingGate] -> ShowS)
-> Show V1PodSchedulingGate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PodSchedulingGate -> ShowS
showsPrec :: Int -> V1PodSchedulingGate -> ShowS
$cshow :: V1PodSchedulingGate -> String
show :: V1PodSchedulingGate -> String
$cshowList :: [V1PodSchedulingGate] -> ShowS
showList :: [V1PodSchedulingGate] -> ShowS
P.Show, V1PodSchedulingGate -> V1PodSchedulingGate -> Bool
(V1PodSchedulingGate -> V1PodSchedulingGate -> Bool)
-> (V1PodSchedulingGate -> V1PodSchedulingGate -> Bool)
-> Eq V1PodSchedulingGate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PodSchedulingGate -> V1PodSchedulingGate -> Bool
== :: V1PodSchedulingGate -> V1PodSchedulingGate -> Bool
$c/= :: V1PodSchedulingGate -> V1PodSchedulingGate -> Bool
/= :: V1PodSchedulingGate -> V1PodSchedulingGate -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PodSchedulingGate
instance A.FromJSON V1PodSchedulingGate where
  parseJSON :: Value -> Parser V1PodSchedulingGate
parseJSON = String
-> (Object -> Parser V1PodSchedulingGate)
-> Value
-> Parser V1PodSchedulingGate
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PodSchedulingGate" ((Object -> Parser V1PodSchedulingGate)
 -> Value -> Parser V1PodSchedulingGate)
-> (Object -> Parser V1PodSchedulingGate)
-> Value
-> Parser V1PodSchedulingGate
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> V1PodSchedulingGate
V1PodSchedulingGate
      (Text -> V1PodSchedulingGate)
-> Parser Text -> Parser V1PodSchedulingGate
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")

-- | ToJSON V1PodSchedulingGate
instance A.ToJSON V1PodSchedulingGate where
  toJSON :: V1PodSchedulingGate -> Value
toJSON V1PodSchedulingGate {Text
$sel:v1PodSchedulingGateName:V1PodSchedulingGate :: V1PodSchedulingGate -> Text
v1PodSchedulingGateName :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1PodSchedulingGateName
      ]


-- | Construct a value of type 'V1PodSchedulingGate' (by applying it's required fields, if any)
mkV1PodSchedulingGate
  :: Text -- ^ 'v1PodSchedulingGateName': Name of the scheduling gate. Each scheduling gate must have a unique name field.
  -> V1PodSchedulingGate
mkV1PodSchedulingGate :: Text -> V1PodSchedulingGate
mkV1PodSchedulingGate Text
v1PodSchedulingGateName =
  V1PodSchedulingGate
  { Text
$sel:v1PodSchedulingGateName:V1PodSchedulingGate :: Text
v1PodSchedulingGateName :: Text
v1PodSchedulingGateName
  }

-- ** V1PodSecurityContext
-- | V1PodSecurityContext
-- PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext.  Field values of container.securityContext take precedence over field values of PodSecurityContext.
data V1PodSecurityContext = V1PodSecurityContext
  { V1PodSecurityContext -> Maybe V1AppArmorProfile
v1PodSecurityContextAppArmorProfile :: !(Maybe V1AppArmorProfile) -- ^ "appArmorProfile"
  , V1PodSecurityContext -> Maybe Integer
v1PodSecurityContextFsGroup :: !(Maybe Integer) -- ^ "fsGroup" - A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:  1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR&#39;d with rw-rw----  If unset, the Kubelet will not modify the ownership and permissions of any volume. Note that this field cannot be set when spec.os.name is windows.
  , V1PodSecurityContext -> Maybe Text
v1PodSecurityContextFsGroupChangePolicy :: !(Maybe Text) -- ^ "fsGroupChangePolicy" - fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod. This field will only apply to volume types which support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are \&quot;OnRootMismatch\&quot; and \&quot;Always\&quot;. If not specified, \&quot;Always\&quot; is used. Note that this field cannot be set when spec.os.name is windows.
  , V1PodSecurityContext -> Maybe Integer
v1PodSecurityContextRunAsGroup :: !(Maybe Integer) -- ^ "runAsGroup" - The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext.  If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.
  , V1PodSecurityContext -> Maybe Bool
v1PodSecurityContextRunAsNonRoot :: !(Maybe Bool) -- ^ "runAsNonRoot" - Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext.  If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
  , V1PodSecurityContext -> Maybe Integer
v1PodSecurityContextRunAsUser :: !(Maybe Integer) -- ^ "runAsUser" - The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext.  If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.
  , V1PodSecurityContext -> Maybe Text
v1PodSecurityContextSeLinuxChangePolicy :: !(Maybe Text) -- ^ "seLinuxChangePolicy" - seLinuxChangePolicy defines how the container&#39;s SELinux label is applied to all volumes used by the Pod. It has no effect on nodes that do not support SELinux or to volumes does not support SELinux. Valid values are \&quot;MountOption\&quot; and \&quot;Recursive\&quot;.  \&quot;Recursive\&quot; means relabeling of all files on all Pod volumes by the container runtime. This may be slow for large volumes, but allows mixing privileged and unprivileged Pods sharing the same volume on the same node.  \&quot;MountOption\&quot; mounts all eligible Pod volumes with &#x60;-o context&#x60; mount option. This requires all Pods that share the same volume to use the same SELinux label. It is not possible to share the same volume among privileged and unprivileged Pods. Eligible volumes are in-tree FibreChannel and iSCSI volumes, and all CSI volumes whose CSI driver announces SELinux support by setting spec.seLinuxMount: true in their CSIDriver instance. Other volumes are always re-labelled recursively. \&quot;MountOption\&quot; value is allowed only when SELinuxMount feature gate is enabled.  If not specified and SELinuxMount feature gate is enabled, \&quot;MountOption\&quot; is used. If not specified and SELinuxMount feature gate is disabled, \&quot;MountOption\&quot; is used for ReadWriteOncePod volumes and \&quot;Recursive\&quot; for all other volumes.  This field affects only Pods that have SELinux label set, either in PodSecurityContext or in SecurityContext of all containers.  All Pods that use the same volume should use the same seLinuxChangePolicy, otherwise some pods can get stuck in ContainerCreating state. Note that this field cannot be set when spec.os.name is windows.
  , V1PodSecurityContext -> Maybe V1SELinuxOptions
v1PodSecurityContextSeLinuxOptions :: !(Maybe V1SELinuxOptions) -- ^ "seLinuxOptions"
  , V1PodSecurityContext -> Maybe V1SeccompProfile
v1PodSecurityContextSeccompProfile :: !(Maybe V1SeccompProfile) -- ^ "seccompProfile"
  , V1PodSecurityContext -> Maybe [Integer]
v1PodSecurityContextSupplementalGroups :: !(Maybe [Integer]) -- ^ "supplementalGroups" - A list of groups applied to the first process run in each container, in addition to the container&#39;s primary GID and fsGroup (if specified).  If the SupplementalGroupsPolicy feature is enabled, the supplementalGroupsPolicy field determines whether these are in addition to or instead of any group memberships defined in the container image. If unspecified, no additional groups are added, though group memberships defined in the container image may still be used, depending on the supplementalGroupsPolicy field. Note that this field cannot be set when spec.os.name is windows.
  , V1PodSecurityContext -> Maybe Text
v1PodSecurityContextSupplementalGroupsPolicy :: !(Maybe Text) -- ^ "supplementalGroupsPolicy" - Defines how supplemental groups of the first container processes are calculated. Valid values are \&quot;Merge\&quot; and \&quot;Strict\&quot;. If not specified, \&quot;Merge\&quot; is used. (Alpha) Using the field requires the SupplementalGroupsPolicy feature gate to be enabled and the container runtime must implement support for this feature. Note that this field cannot be set when spec.os.name is windows.
  , V1PodSecurityContext -> Maybe [V1Sysctl]
v1PodSecurityContextSysctls :: !(Maybe [V1Sysctl]) -- ^ "sysctls" - Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. Note that this field cannot be set when spec.os.name is windows.
  , V1PodSecurityContext -> Maybe V1WindowsSecurityContextOptions
v1PodSecurityContextWindowsOptions :: !(Maybe V1WindowsSecurityContextOptions) -- ^ "windowsOptions"
  } deriving (Int -> V1PodSecurityContext -> ShowS
[V1PodSecurityContext] -> ShowS
V1PodSecurityContext -> String
(Int -> V1PodSecurityContext -> ShowS)
-> (V1PodSecurityContext -> String)
-> ([V1PodSecurityContext] -> ShowS)
-> Show V1PodSecurityContext
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PodSecurityContext -> ShowS
showsPrec :: Int -> V1PodSecurityContext -> ShowS
$cshow :: V1PodSecurityContext -> String
show :: V1PodSecurityContext -> String
$cshowList :: [V1PodSecurityContext] -> ShowS
showList :: [V1PodSecurityContext] -> ShowS
P.Show, V1PodSecurityContext -> V1PodSecurityContext -> Bool
(V1PodSecurityContext -> V1PodSecurityContext -> Bool)
-> (V1PodSecurityContext -> V1PodSecurityContext -> Bool)
-> Eq V1PodSecurityContext
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PodSecurityContext -> V1PodSecurityContext -> Bool
== :: V1PodSecurityContext -> V1PodSecurityContext -> Bool
$c/= :: V1PodSecurityContext -> V1PodSecurityContext -> Bool
/= :: V1PodSecurityContext -> V1PodSecurityContext -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PodSecurityContext
instance A.FromJSON V1PodSecurityContext where
  parseJSON :: Value -> Parser V1PodSecurityContext
parseJSON = String
-> (Object -> Parser V1PodSecurityContext)
-> Value
-> Parser V1PodSecurityContext
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PodSecurityContext" ((Object -> Parser V1PodSecurityContext)
 -> Value -> Parser V1PodSecurityContext)
-> (Object -> Parser V1PodSecurityContext)
-> Value
-> Parser V1PodSecurityContext
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1AppArmorProfile
-> Maybe Integer
-> Maybe Text
-> Maybe Integer
-> Maybe Bool
-> Maybe Integer
-> Maybe Text
-> Maybe V1SELinuxOptions
-> Maybe V1SeccompProfile
-> Maybe [Integer]
-> Maybe Text
-> Maybe [V1Sysctl]
-> Maybe V1WindowsSecurityContextOptions
-> V1PodSecurityContext
V1PodSecurityContext
      (Maybe V1AppArmorProfile
 -> Maybe Integer
 -> Maybe Text
 -> Maybe Integer
 -> Maybe Bool
 -> Maybe Integer
 -> Maybe Text
 -> Maybe V1SELinuxOptions
 -> Maybe V1SeccompProfile
 -> Maybe [Integer]
 -> Maybe Text
 -> Maybe [V1Sysctl]
 -> Maybe V1WindowsSecurityContextOptions
 -> V1PodSecurityContext)
-> Parser (Maybe V1AppArmorProfile)
-> Parser
     (Maybe Integer
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Bool
      -> Maybe Integer
      -> Maybe Text
      -> Maybe V1SELinuxOptions
      -> Maybe V1SeccompProfile
      -> Maybe [Integer]
      -> Maybe Text
      -> Maybe [V1Sysctl]
      -> Maybe V1WindowsSecurityContextOptions
      -> V1PodSecurityContext)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1AppArmorProfile)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"appArmorProfile")
      Parser
  (Maybe Integer
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Bool
   -> Maybe Integer
   -> Maybe Text
   -> Maybe V1SELinuxOptions
   -> Maybe V1SeccompProfile
   -> Maybe [Integer]
   -> Maybe Text
   -> Maybe [V1Sysctl]
   -> Maybe V1WindowsSecurityContextOptions
   -> V1PodSecurityContext)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Text
      -> Maybe Integer
      -> Maybe Bool
      -> Maybe Integer
      -> Maybe Text
      -> Maybe V1SELinuxOptions
      -> Maybe V1SeccompProfile
      -> Maybe [Integer]
      -> Maybe Text
      -> Maybe [V1Sysctl]
      -> Maybe V1WindowsSecurityContextOptions
      -> V1PodSecurityContext)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fsGroup")
      Parser
  (Maybe Text
   -> Maybe Integer
   -> Maybe Bool
   -> Maybe Integer
   -> Maybe Text
   -> Maybe V1SELinuxOptions
   -> Maybe V1SeccompProfile
   -> Maybe [Integer]
   -> Maybe Text
   -> Maybe [V1Sysctl]
   -> Maybe V1WindowsSecurityContextOptions
   -> V1PodSecurityContext)
-> Parser (Maybe Text)
-> Parser
     (Maybe Integer
      -> Maybe Bool
      -> Maybe Integer
      -> Maybe Text
      -> Maybe V1SELinuxOptions
      -> Maybe V1SeccompProfile
      -> Maybe [Integer]
      -> Maybe Text
      -> Maybe [V1Sysctl]
      -> Maybe V1WindowsSecurityContextOptions
      -> V1PodSecurityContext)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fsGroupChangePolicy")
      Parser
  (Maybe Integer
   -> Maybe Bool
   -> Maybe Integer
   -> Maybe Text
   -> Maybe V1SELinuxOptions
   -> Maybe V1SeccompProfile
   -> Maybe [Integer]
   -> Maybe Text
   -> Maybe [V1Sysctl]
   -> Maybe V1WindowsSecurityContextOptions
   -> V1PodSecurityContext)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Bool
      -> Maybe Integer
      -> Maybe Text
      -> Maybe V1SELinuxOptions
      -> Maybe V1SeccompProfile
      -> Maybe [Integer]
      -> Maybe Text
      -> Maybe [V1Sysctl]
      -> Maybe V1WindowsSecurityContextOptions
      -> V1PodSecurityContext)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"runAsGroup")
      Parser
  (Maybe Bool
   -> Maybe Integer
   -> Maybe Text
   -> Maybe V1SELinuxOptions
   -> Maybe V1SeccompProfile
   -> Maybe [Integer]
   -> Maybe Text
   -> Maybe [V1Sysctl]
   -> Maybe V1WindowsSecurityContextOptions
   -> V1PodSecurityContext)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Integer
      -> Maybe Text
      -> Maybe V1SELinuxOptions
      -> Maybe V1SeccompProfile
      -> Maybe [Integer]
      -> Maybe Text
      -> Maybe [V1Sysctl]
      -> Maybe V1WindowsSecurityContextOptions
      -> V1PodSecurityContext)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"runAsNonRoot")
      Parser
  (Maybe Integer
   -> Maybe Text
   -> Maybe V1SELinuxOptions
   -> Maybe V1SeccompProfile
   -> Maybe [Integer]
   -> Maybe Text
   -> Maybe [V1Sysctl]
   -> Maybe V1WindowsSecurityContextOptions
   -> V1PodSecurityContext)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Text
      -> Maybe V1SELinuxOptions
      -> Maybe V1SeccompProfile
      -> Maybe [Integer]
      -> Maybe Text
      -> Maybe [V1Sysctl]
      -> Maybe V1WindowsSecurityContextOptions
      -> V1PodSecurityContext)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"runAsUser")
      Parser
  (Maybe Text
   -> Maybe V1SELinuxOptions
   -> Maybe V1SeccompProfile
   -> Maybe [Integer]
   -> Maybe Text
   -> Maybe [V1Sysctl]
   -> Maybe V1WindowsSecurityContextOptions
   -> V1PodSecurityContext)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1SELinuxOptions
      -> Maybe V1SeccompProfile
      -> Maybe [Integer]
      -> Maybe Text
      -> Maybe [V1Sysctl]
      -> Maybe V1WindowsSecurityContextOptions
      -> V1PodSecurityContext)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"seLinuxChangePolicy")
      Parser
  (Maybe V1SELinuxOptions
   -> Maybe V1SeccompProfile
   -> Maybe [Integer]
   -> Maybe Text
   -> Maybe [V1Sysctl]
   -> Maybe V1WindowsSecurityContextOptions
   -> V1PodSecurityContext)
-> Parser (Maybe V1SELinuxOptions)
-> Parser
     (Maybe V1SeccompProfile
      -> Maybe [Integer]
      -> Maybe Text
      -> Maybe [V1Sysctl]
      -> Maybe V1WindowsSecurityContextOptions
      -> V1PodSecurityContext)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1SELinuxOptions)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"seLinuxOptions")
      Parser
  (Maybe V1SeccompProfile
   -> Maybe [Integer]
   -> Maybe Text
   -> Maybe [V1Sysctl]
   -> Maybe V1WindowsSecurityContextOptions
   -> V1PodSecurityContext)
-> Parser (Maybe V1SeccompProfile)
-> Parser
     (Maybe [Integer]
      -> Maybe Text
      -> Maybe [V1Sysctl]
      -> Maybe V1WindowsSecurityContextOptions
      -> V1PodSecurityContext)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1SeccompProfile)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"seccompProfile")
      Parser
  (Maybe [Integer]
   -> Maybe Text
   -> Maybe [V1Sysctl]
   -> Maybe V1WindowsSecurityContextOptions
   -> V1PodSecurityContext)
-> Parser (Maybe [Integer])
-> Parser
     (Maybe Text
      -> Maybe [V1Sysctl]
      -> Maybe V1WindowsSecurityContextOptions
      -> V1PodSecurityContext)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Integer])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"supplementalGroups")
      Parser
  (Maybe Text
   -> Maybe [V1Sysctl]
   -> Maybe V1WindowsSecurityContextOptions
   -> V1PodSecurityContext)
-> Parser (Maybe Text)
-> Parser
     (Maybe [V1Sysctl]
      -> Maybe V1WindowsSecurityContextOptions -> V1PodSecurityContext)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"supplementalGroupsPolicy")
      Parser
  (Maybe [V1Sysctl]
   -> Maybe V1WindowsSecurityContextOptions -> V1PodSecurityContext)
-> Parser (Maybe [V1Sysctl])
-> Parser
     (Maybe V1WindowsSecurityContextOptions -> V1PodSecurityContext)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1Sysctl])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"sysctls")
      Parser
  (Maybe V1WindowsSecurityContextOptions -> V1PodSecurityContext)
-> Parser (Maybe V1WindowsSecurityContextOptions)
-> Parser V1PodSecurityContext
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1WindowsSecurityContextOptions)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"windowsOptions")

-- | ToJSON V1PodSecurityContext
instance A.ToJSON V1PodSecurityContext where
  toJSON :: V1PodSecurityContext -> Value
toJSON V1PodSecurityContext {Maybe Bool
Maybe Integer
Maybe [Integer]
Maybe [V1Sysctl]
Maybe Text
Maybe V1WindowsSecurityContextOptions
Maybe V1SeccompProfile
Maybe V1SELinuxOptions
Maybe V1AppArmorProfile
$sel:v1PodSecurityContextAppArmorProfile:V1PodSecurityContext :: V1PodSecurityContext -> Maybe V1AppArmorProfile
$sel:v1PodSecurityContextFsGroup:V1PodSecurityContext :: V1PodSecurityContext -> Maybe Integer
$sel:v1PodSecurityContextFsGroupChangePolicy:V1PodSecurityContext :: V1PodSecurityContext -> Maybe Text
$sel:v1PodSecurityContextRunAsGroup:V1PodSecurityContext :: V1PodSecurityContext -> Maybe Integer
$sel:v1PodSecurityContextRunAsNonRoot:V1PodSecurityContext :: V1PodSecurityContext -> Maybe Bool
$sel:v1PodSecurityContextRunAsUser:V1PodSecurityContext :: V1PodSecurityContext -> Maybe Integer
$sel:v1PodSecurityContextSeLinuxChangePolicy:V1PodSecurityContext :: V1PodSecurityContext -> Maybe Text
$sel:v1PodSecurityContextSeLinuxOptions:V1PodSecurityContext :: V1PodSecurityContext -> Maybe V1SELinuxOptions
$sel:v1PodSecurityContextSeccompProfile:V1PodSecurityContext :: V1PodSecurityContext -> Maybe V1SeccompProfile
$sel:v1PodSecurityContextSupplementalGroups:V1PodSecurityContext :: V1PodSecurityContext -> Maybe [Integer]
$sel:v1PodSecurityContextSupplementalGroupsPolicy:V1PodSecurityContext :: V1PodSecurityContext -> Maybe Text
$sel:v1PodSecurityContextSysctls:V1PodSecurityContext :: V1PodSecurityContext -> Maybe [V1Sysctl]
$sel:v1PodSecurityContextWindowsOptions:V1PodSecurityContext :: V1PodSecurityContext -> Maybe V1WindowsSecurityContextOptions
v1PodSecurityContextAppArmorProfile :: Maybe V1AppArmorProfile
v1PodSecurityContextFsGroup :: Maybe Integer
v1PodSecurityContextFsGroupChangePolicy :: Maybe Text
v1PodSecurityContextRunAsGroup :: Maybe Integer
v1PodSecurityContextRunAsNonRoot :: Maybe Bool
v1PodSecurityContextRunAsUser :: Maybe Integer
v1PodSecurityContextSeLinuxChangePolicy :: Maybe Text
v1PodSecurityContextSeLinuxOptions :: Maybe V1SELinuxOptions
v1PodSecurityContextSeccompProfile :: Maybe V1SeccompProfile
v1PodSecurityContextSupplementalGroups :: Maybe [Integer]
v1PodSecurityContextSupplementalGroupsPolicy :: Maybe Text
v1PodSecurityContextSysctls :: Maybe [V1Sysctl]
v1PodSecurityContextWindowsOptions :: Maybe V1WindowsSecurityContextOptions
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"appArmorProfile" Key -> Maybe V1AppArmorProfile -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1AppArmorProfile
v1PodSecurityContextAppArmorProfile
      , Key
"fsGroup" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1PodSecurityContextFsGroup
      , Key
"fsGroupChangePolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodSecurityContextFsGroupChangePolicy
      , Key
"runAsGroup" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1PodSecurityContextRunAsGroup
      , Key
"runAsNonRoot" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1PodSecurityContextRunAsNonRoot
      , Key
"runAsUser" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1PodSecurityContextRunAsUser
      , Key
"seLinuxChangePolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodSecurityContextSeLinuxChangePolicy
      , Key
"seLinuxOptions" Key -> Maybe V1SELinuxOptions -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1SELinuxOptions
v1PodSecurityContextSeLinuxOptions
      , Key
"seccompProfile" Key -> Maybe V1SeccompProfile -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1SeccompProfile
v1PodSecurityContextSeccompProfile
      , Key
"supplementalGroups" Key -> Maybe [Integer] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Integer]
v1PodSecurityContextSupplementalGroups
      , Key
"supplementalGroupsPolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodSecurityContextSupplementalGroupsPolicy
      , Key
"sysctls" Key -> Maybe [V1Sysctl] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1Sysctl]
v1PodSecurityContextSysctls
      , Key
"windowsOptions" Key -> Maybe V1WindowsSecurityContextOptions -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1WindowsSecurityContextOptions
v1PodSecurityContextWindowsOptions
      ]


-- | Construct a value of type 'V1PodSecurityContext' (by applying it's required fields, if any)
mkV1PodSecurityContext
  :: V1PodSecurityContext
mkV1PodSecurityContext :: V1PodSecurityContext
mkV1PodSecurityContext =
  V1PodSecurityContext
  { $sel:v1PodSecurityContextAppArmorProfile:V1PodSecurityContext :: Maybe V1AppArmorProfile
v1PodSecurityContextAppArmorProfile = Maybe V1AppArmorProfile
forall a. Maybe a
Nothing
  , $sel:v1PodSecurityContextFsGroup:V1PodSecurityContext :: Maybe Integer
v1PodSecurityContextFsGroup = Maybe Integer
forall a. Maybe a
Nothing
  , $sel:v1PodSecurityContextFsGroupChangePolicy:V1PodSecurityContext :: Maybe Text
v1PodSecurityContextFsGroupChangePolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodSecurityContextRunAsGroup:V1PodSecurityContext :: Maybe Integer
v1PodSecurityContextRunAsGroup = Maybe Integer
forall a. Maybe a
Nothing
  , $sel:v1PodSecurityContextRunAsNonRoot:V1PodSecurityContext :: Maybe Bool
v1PodSecurityContextRunAsNonRoot = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1PodSecurityContextRunAsUser:V1PodSecurityContext :: Maybe Integer
v1PodSecurityContextRunAsUser = Maybe Integer
forall a. Maybe a
Nothing
  , $sel:v1PodSecurityContextSeLinuxChangePolicy:V1PodSecurityContext :: Maybe Text
v1PodSecurityContextSeLinuxChangePolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodSecurityContextSeLinuxOptions:V1PodSecurityContext :: Maybe V1SELinuxOptions
v1PodSecurityContextSeLinuxOptions = Maybe V1SELinuxOptions
forall a. Maybe a
Nothing
  , $sel:v1PodSecurityContextSeccompProfile:V1PodSecurityContext :: Maybe V1SeccompProfile
v1PodSecurityContextSeccompProfile = Maybe V1SeccompProfile
forall a. Maybe a
Nothing
  , $sel:v1PodSecurityContextSupplementalGroups:V1PodSecurityContext :: Maybe [Integer]
v1PodSecurityContextSupplementalGroups = Maybe [Integer]
forall a. Maybe a
Nothing
  , $sel:v1PodSecurityContextSupplementalGroupsPolicy:V1PodSecurityContext :: Maybe Text
v1PodSecurityContextSupplementalGroupsPolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodSecurityContextSysctls:V1PodSecurityContext :: Maybe [V1Sysctl]
v1PodSecurityContextSysctls = Maybe [V1Sysctl]
forall a. Maybe a
Nothing
  , $sel:v1PodSecurityContextWindowsOptions:V1PodSecurityContext :: Maybe V1WindowsSecurityContextOptions
v1PodSecurityContextWindowsOptions = Maybe V1WindowsSecurityContextOptions
forall a. Maybe a
Nothing
  }

-- ** V1PodSpec
-- | V1PodSpec
-- PodSpec is a description of a pod.
data V1PodSpec = V1PodSpec
  { V1PodSpec -> Maybe Integer
v1PodSpecActiveDeadlineSeconds :: !(Maybe Integer) -- ^ "activeDeadlineSeconds" - Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer.
  , V1PodSpec -> Maybe V1Affinity
v1PodSpecAffinity :: !(Maybe V1Affinity) -- ^ "affinity"
  , V1PodSpec -> Maybe Bool
v1PodSpecAutomountServiceAccountToken :: !(Maybe Bool) -- ^ "automountServiceAccountToken" - AutomountServiceAccountToken indicates whether a service account token should be automatically mounted.
  , V1PodSpec -> [V1Container]
v1PodSpecContainers :: !([V1Container]) -- ^ /Required/ "containers" - List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated.
  , V1PodSpec -> Maybe V1PodDNSConfig
v1PodSpecDnsConfig :: !(Maybe V1PodDNSConfig) -- ^ "dnsConfig"
  , V1PodSpec -> Maybe Text
v1PodSpecDnsPolicy :: !(Maybe Text) -- ^ "dnsPolicy" - Set DNS policy for the pod. Defaults to \&quot;ClusterFirst\&quot;. Valid values are &#39;ClusterFirstWithHostNet&#39;, &#39;ClusterFirst&#39;, &#39;Default&#39; or &#39;None&#39;. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to &#39;ClusterFirstWithHostNet&#39;.
  , V1PodSpec -> Maybe Bool
v1PodSpecEnableServiceLinks :: !(Maybe Bool) -- ^ "enableServiceLinks" - EnableServiceLinks indicates whether information about services should be injected into pod&#39;s environment variables, matching the syntax of Docker links. Optional: Defaults to true.
  , V1PodSpec -> Maybe [V1EphemeralContainer]
v1PodSpecEphemeralContainers :: !(Maybe [V1EphemeralContainer]) -- ^ "ephemeralContainers" - List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing pod to perform user-initiated actions such as debugging. This list cannot be specified when creating a pod, and it cannot be modified by updating the pod spec. In order to add an ephemeral container to an existing pod, use the pod&#39;s ephemeralcontainers subresource.
  , V1PodSpec -> Maybe [V1HostAlias]
v1PodSpecHostAliases :: !(Maybe [V1HostAlias]) -- ^ "hostAliases" - HostAliases is an optional list of hosts and IPs that will be injected into the pod&#39;s hosts file if specified.
  , V1PodSpec -> Maybe Bool
v1PodSpecHostIpc :: !(Maybe Bool) -- ^ "hostIPC" - Use the host&#39;s ipc namespace. Optional: Default to false.
  , V1PodSpec -> Maybe Bool
v1PodSpecHostNetwork :: !(Maybe Bool) -- ^ "hostNetwork" - Host networking requested for this pod. Use the host&#39;s network namespace. If this option is set, the ports that will be used must be specified. Default to false.
  , V1PodSpec -> Maybe Bool
v1PodSpecHostPid :: !(Maybe Bool) -- ^ "hostPID" - Use the host&#39;s pid namespace. Optional: Default to false.
  , V1PodSpec -> Maybe Bool
v1PodSpecHostUsers :: !(Maybe Bool) -- ^ "hostUsers" - Use the host&#39;s user namespace. Optional: Default to true. If set to true or not present, the pod will be run in the host user namespace, useful for when the pod needs a feature only available to the host user namespace, such as loading a kernel module with CAP_SYS_MODULE. When set to false, a new userns is created for the pod. Setting false is useful for mitigating container breakout vulnerabilities even allowing users to run their containers as root without actually having root privileges on the host. This field is alpha-level and is only honored by servers that enable the UserNamespacesSupport feature.
  , V1PodSpec -> Maybe Text
v1PodSpecHostname :: !(Maybe Text) -- ^ "hostname" - Specifies the hostname of the Pod If not specified, the pod&#39;s hostname will be set to a system-defined value.
  , V1PodSpec -> Maybe [V1LocalObjectReference]
v1PodSpecImagePullSecrets :: !(Maybe [V1LocalObjectReference]) -- ^ "imagePullSecrets" - ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod
  , V1PodSpec -> Maybe [V1Container]
v1PodSpecInitContainers :: !(Maybe [V1Container]) -- ^ "initContainers" - List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
  , V1PodSpec -> Maybe Text
v1PodSpecNodeName :: !(Maybe Text) -- ^ "nodeName" - NodeName indicates in which node this pod is scheduled. If empty, this pod is a candidate for scheduling by the scheduler defined in schedulerName. Once this field is set, the kubelet for this node becomes responsible for the lifecycle of this pod. This field should not be used to express a desire for the pod to be scheduled on a specific node. https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodename
  , V1PodSpec -> Maybe (Map String Text)
v1PodSpecNodeSelector :: !(Maybe (Map.Map String Text)) -- ^ "nodeSelector" - NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node&#39;s labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
  , V1PodSpec -> Maybe V1PodOS
v1PodSpecOs :: !(Maybe V1PodOS) -- ^ "os"
  , V1PodSpec -> Maybe (Map String Quantity)
v1PodSpecOverhead :: !(Maybe (Map.Map String Quantity)) -- ^ "overhead" - Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. This field will be autopopulated at admission time by the RuntimeClass admission controller. If the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. The RuntimeClass admission controller will reject Pod create requests which have the overhead already set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. More info: https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md
  , V1PodSpec -> Maybe Text
v1PodSpecPreemptionPolicy :: !(Maybe Text) -- ^ "preemptionPolicy" - PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset.
  , V1PodSpec -> Maybe Int
v1PodSpecPriority :: !(Maybe Int) -- ^ "priority" - The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority.
  , V1PodSpec -> Maybe Text
v1PodSpecPriorityClassName :: !(Maybe Text) -- ^ "priorityClassName" - If specified, indicates the pod&#39;s priority. \&quot;system-node-critical\&quot; and \&quot;system-cluster-critical\&quot; are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default.
  , V1PodSpec -> Maybe [V1PodReadinessGate]
v1PodSpecReadinessGates :: !(Maybe [V1PodReadinessGate]) -- ^ "readinessGates" - If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to \&quot;True\&quot; More info: https://git.k8s.io/enhancements/keps/sig-network/580-pod-readiness-gates
  , V1PodSpec -> Maybe [V1PodResourceClaim]
v1PodSpecResourceClaims :: !(Maybe [V1PodResourceClaim]) -- ^ "resourceClaims" - ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. The resources will be made available to those containers which consume them by name.  This is an alpha field and requires enabling the DynamicResourceAllocation feature gate.  This field is immutable.
  , V1PodSpec -> Maybe V1ResourceRequirements
v1PodSpecResources :: !(Maybe V1ResourceRequirements) -- ^ "resources"
  , V1PodSpec -> Maybe Text
v1PodSpecRestartPolicy :: !(Maybe Text) -- ^ "restartPolicy" - Restart policy for all containers within the pod. One of Always, OnFailure, Never. In some contexts, only a subset of those values may be permitted. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy
  , V1PodSpec -> Maybe Text
v1PodSpecRuntimeClassName :: !(Maybe Text) -- ^ "runtimeClassName" - RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used to run this pod.  If no RuntimeClass resource matches the named class, the pod will not be run. If unset or empty, the \&quot;legacy\&quot; RuntimeClass will be used, which is an implicit class with an empty definition that uses the default runtime handler. More info: https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class
  , V1PodSpec -> Maybe Text
v1PodSpecSchedulerName :: !(Maybe Text) -- ^ "schedulerName" - If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.
  , V1PodSpec -> Maybe [V1PodSchedulingGate]
v1PodSpecSchedulingGates :: !(Maybe [V1PodSchedulingGate]) -- ^ "schedulingGates" - SchedulingGates is an opaque list of values that if specified will block scheduling the pod. If schedulingGates is not empty, the pod will stay in the SchedulingGated state and the scheduler will not attempt to schedule the pod.  SchedulingGates can only be set at pod creation time, and be removed only afterwards.
  , V1PodSpec -> Maybe V1PodSecurityContext
v1PodSpecSecurityContext :: !(Maybe V1PodSecurityContext) -- ^ "securityContext"
  , V1PodSpec -> Maybe Text
v1PodSpecServiceAccount :: !(Maybe Text) -- ^ "serviceAccount" - DeprecatedServiceAccount is a deprecated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.
  , V1PodSpec -> Maybe Text
v1PodSpecServiceAccountName :: !(Maybe Text) -- ^ "serviceAccountName" - ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
  , V1PodSpec -> Maybe Bool
v1PodSpecSetHostnameAsFqdn :: !(Maybe Bool) -- ^ "setHostnameAsFQDN" - If true the pod&#39;s hostname will be configured as the pod&#39;s FQDN, rather than the leaf name (the default). In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\\\SYSTEM\\\\CurrentControlSet\\\\Services\\\\Tcpip\\\\Parameters to FQDN. If a pod does not have FQDN, this has no effect. Default to false.
  , V1PodSpec -> Maybe Bool
v1PodSpecShareProcessNamespace :: !(Maybe Bool) -- ^ "shareProcessNamespace" - Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Default to false.
  , V1PodSpec -> Maybe Text
v1PodSpecSubdomain :: !(Maybe Text) -- ^ "subdomain" - If specified, the fully qualified Pod hostname will be \&quot;&lt;hostname&gt;.&lt;subdomain&gt;.&lt;pod namespace&gt;.svc.&lt;cluster domain&gt;\&quot;. If not specified, the pod will not have a domainname at all.
  , V1PodSpec -> Maybe Integer
v1PodSpecTerminationGracePeriodSeconds :: !(Maybe Integer) -- ^ "terminationGracePeriodSeconds" - Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds.
  , V1PodSpec -> Maybe [V1Toleration]
v1PodSpecTolerations :: !(Maybe [V1Toleration]) -- ^ "tolerations" - If specified, the pod&#39;s tolerations.
  , V1PodSpec -> Maybe [V1TopologySpreadConstraint]
v1PodSpecTopologySpreadConstraints :: !(Maybe [V1TopologySpreadConstraint]) -- ^ "topologySpreadConstraints" - TopologySpreadConstraints describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. All topologySpreadConstraints are ANDed.
  , V1PodSpec -> Maybe [V1Volume]
v1PodSpecVolumes :: !(Maybe [V1Volume]) -- ^ "volumes" - List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes
  } deriving (Int -> V1PodSpec -> ShowS
[V1PodSpec] -> ShowS
V1PodSpec -> String
(Int -> V1PodSpec -> ShowS)
-> (V1PodSpec -> String)
-> ([V1PodSpec] -> ShowS)
-> Show V1PodSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PodSpec -> ShowS
showsPrec :: Int -> V1PodSpec -> ShowS
$cshow :: V1PodSpec -> String
show :: V1PodSpec -> String
$cshowList :: [V1PodSpec] -> ShowS
showList :: [V1PodSpec] -> ShowS
P.Show, V1PodSpec -> V1PodSpec -> Bool
(V1PodSpec -> V1PodSpec -> Bool)
-> (V1PodSpec -> V1PodSpec -> Bool) -> Eq V1PodSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PodSpec -> V1PodSpec -> Bool
== :: V1PodSpec -> V1PodSpec -> Bool
$c/= :: V1PodSpec -> V1PodSpec -> Bool
/= :: V1PodSpec -> V1PodSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PodSpec
instance A.FromJSON V1PodSpec where
  parseJSON :: Value -> Parser V1PodSpec
parseJSON = String -> (Object -> Parser V1PodSpec) -> Value -> Parser V1PodSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PodSpec" ((Object -> Parser V1PodSpec) -> Value -> Parser V1PodSpec)
-> (Object -> Parser V1PodSpec) -> Value -> Parser V1PodSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Integer
-> Maybe V1Affinity
-> Maybe Bool
-> [V1Container]
-> Maybe V1PodDNSConfig
-> Maybe Text
-> Maybe Bool
-> Maybe [V1EphemeralContainer]
-> Maybe [V1HostAlias]
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [V1LocalObjectReference]
-> Maybe [V1Container]
-> Maybe Text
-> Maybe (Map String Text)
-> Maybe V1PodOS
-> Maybe (Map String Quantity)
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe [V1PodReadinessGate]
-> Maybe [V1PodResourceClaim]
-> Maybe V1ResourceRequirements
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [V1PodSchedulingGate]
-> Maybe V1PodSecurityContext
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Integer
-> Maybe [V1Toleration]
-> Maybe [V1TopologySpreadConstraint]
-> Maybe [V1Volume]
-> V1PodSpec
V1PodSpec
      (Maybe Integer
 -> Maybe V1Affinity
 -> Maybe Bool
 -> [V1Container]
 -> Maybe V1PodDNSConfig
 -> Maybe Text
 -> Maybe Bool
 -> Maybe [V1EphemeralContainer]
 -> Maybe [V1HostAlias]
 -> Maybe Bool
 -> Maybe Bool
 -> Maybe Bool
 -> Maybe Bool
 -> Maybe Text
 -> Maybe [V1LocalObjectReference]
 -> Maybe [V1Container]
 -> Maybe Text
 -> Maybe (Map String Text)
 -> Maybe V1PodOS
 -> Maybe (Map String Quantity)
 -> Maybe Text
 -> Maybe Int
 -> Maybe Text
 -> Maybe [V1PodReadinessGate]
 -> Maybe [V1PodResourceClaim]
 -> Maybe V1ResourceRequirements
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [V1PodSchedulingGate]
 -> Maybe V1PodSecurityContext
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Integer
 -> Maybe [V1Toleration]
 -> Maybe [V1TopologySpreadConstraint]
 -> Maybe [V1Volume]
 -> V1PodSpec)
-> Parser (Maybe Integer)
-> Parser
     (Maybe V1Affinity
      -> Maybe Bool
      -> [V1Container]
      -> Maybe V1PodDNSConfig
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1EphemeralContainer]
      -> Maybe [V1HostAlias]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [V1LocalObjectReference]
      -> Maybe [V1Container]
      -> Maybe Text
      -> Maybe (Map String Text)
      -> Maybe V1PodOS
      -> Maybe (Map String Quantity)
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe [V1PodReadinessGate]
      -> Maybe [V1PodResourceClaim]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodSchedulingGate]
      -> Maybe V1PodSecurityContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"activeDeadlineSeconds")
      Parser
  (Maybe V1Affinity
   -> Maybe Bool
   -> [V1Container]
   -> Maybe V1PodDNSConfig
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1EphemeralContainer]
   -> Maybe [V1HostAlias]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [V1LocalObjectReference]
   -> Maybe [V1Container]
   -> Maybe Text
   -> Maybe (Map String Text)
   -> Maybe V1PodOS
   -> Maybe (Map String Quantity)
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe [V1PodReadinessGate]
   -> Maybe [V1PodResourceClaim]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodSchedulingGate]
   -> Maybe V1PodSecurityContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe V1Affinity)
-> Parser
     (Maybe Bool
      -> [V1Container]
      -> Maybe V1PodDNSConfig
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1EphemeralContainer]
      -> Maybe [V1HostAlias]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [V1LocalObjectReference]
      -> Maybe [V1Container]
      -> Maybe Text
      -> Maybe (Map String Text)
      -> Maybe V1PodOS
      -> Maybe (Map String Quantity)
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe [V1PodReadinessGate]
      -> Maybe [V1PodResourceClaim]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodSchedulingGate]
      -> Maybe V1PodSecurityContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1Affinity)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"affinity")
      Parser
  (Maybe Bool
   -> [V1Container]
   -> Maybe V1PodDNSConfig
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1EphemeralContainer]
   -> Maybe [V1HostAlias]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [V1LocalObjectReference]
   -> Maybe [V1Container]
   -> Maybe Text
   -> Maybe (Map String Text)
   -> Maybe V1PodOS
   -> Maybe (Map String Quantity)
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe [V1PodReadinessGate]
   -> Maybe [V1PodResourceClaim]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodSchedulingGate]
   -> Maybe V1PodSecurityContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe Bool)
-> Parser
     ([V1Container]
      -> Maybe V1PodDNSConfig
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1EphemeralContainer]
      -> Maybe [V1HostAlias]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [V1LocalObjectReference]
      -> Maybe [V1Container]
      -> Maybe Text
      -> Maybe (Map String Text)
      -> Maybe V1PodOS
      -> Maybe (Map String Quantity)
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe [V1PodReadinessGate]
      -> Maybe [V1PodResourceClaim]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodSchedulingGate]
      -> Maybe V1PodSecurityContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"automountServiceAccountToken")
      Parser
  ([V1Container]
   -> Maybe V1PodDNSConfig
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1EphemeralContainer]
   -> Maybe [V1HostAlias]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [V1LocalObjectReference]
   -> Maybe [V1Container]
   -> Maybe Text
   -> Maybe (Map String Text)
   -> Maybe V1PodOS
   -> Maybe (Map String Quantity)
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe [V1PodReadinessGate]
   -> Maybe [V1PodResourceClaim]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodSchedulingGate]
   -> Maybe V1PodSecurityContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser [V1Container]
-> Parser
     (Maybe V1PodDNSConfig
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [V1EphemeralContainer]
      -> Maybe [V1HostAlias]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [V1LocalObjectReference]
      -> Maybe [V1Container]
      -> Maybe Text
      -> Maybe (Map String Text)
      -> Maybe V1PodOS
      -> Maybe (Map String Quantity)
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe [V1PodReadinessGate]
      -> Maybe [V1PodResourceClaim]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodSchedulingGate]
      -> Maybe V1PodSecurityContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1Container]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"containers")
      Parser
  (Maybe V1PodDNSConfig
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [V1EphemeralContainer]
   -> Maybe [V1HostAlias]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [V1LocalObjectReference]
   -> Maybe [V1Container]
   -> Maybe Text
   -> Maybe (Map String Text)
   -> Maybe V1PodOS
   -> Maybe (Map String Quantity)
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe [V1PodReadinessGate]
   -> Maybe [V1PodResourceClaim]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodSchedulingGate]
   -> Maybe V1PodSecurityContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe V1PodDNSConfig)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe [V1EphemeralContainer]
      -> Maybe [V1HostAlias]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [V1LocalObjectReference]
      -> Maybe [V1Container]
      -> Maybe Text
      -> Maybe (Map String Text)
      -> Maybe V1PodOS
      -> Maybe (Map String Quantity)
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe [V1PodReadinessGate]
      -> Maybe [V1PodResourceClaim]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodSchedulingGate]
      -> Maybe V1PodSecurityContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1PodDNSConfig)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"dnsConfig")
      Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe [V1EphemeralContainer]
   -> Maybe [V1HostAlias]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [V1LocalObjectReference]
   -> Maybe [V1Container]
   -> Maybe Text
   -> Maybe (Map String Text)
   -> Maybe V1PodOS
   -> Maybe (Map String Quantity)
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe [V1PodReadinessGate]
   -> Maybe [V1PodResourceClaim]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodSchedulingGate]
   -> Maybe V1PodSecurityContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe [V1EphemeralContainer]
      -> Maybe [V1HostAlias]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [V1LocalObjectReference]
      -> Maybe [V1Container]
      -> Maybe Text
      -> Maybe (Map String Text)
      -> Maybe V1PodOS
      -> Maybe (Map String Quantity)
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe [V1PodReadinessGate]
      -> Maybe [V1PodResourceClaim]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodSchedulingGate]
      -> Maybe V1PodSecurityContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"dnsPolicy")
      Parser
  (Maybe Bool
   -> Maybe [V1EphemeralContainer]
   -> Maybe [V1HostAlias]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [V1LocalObjectReference]
   -> Maybe [V1Container]
   -> Maybe Text
   -> Maybe (Map String Text)
   -> Maybe V1PodOS
   -> Maybe (Map String Quantity)
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe [V1PodReadinessGate]
   -> Maybe [V1PodResourceClaim]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodSchedulingGate]
   -> Maybe V1PodSecurityContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe Bool)
-> Parser
     (Maybe [V1EphemeralContainer]
      -> Maybe [V1HostAlias]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [V1LocalObjectReference]
      -> Maybe [V1Container]
      -> Maybe Text
      -> Maybe (Map String Text)
      -> Maybe V1PodOS
      -> Maybe (Map String Quantity)
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe [V1PodReadinessGate]
      -> Maybe [V1PodResourceClaim]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodSchedulingGate]
      -> Maybe V1PodSecurityContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"enableServiceLinks")
      Parser
  (Maybe [V1EphemeralContainer]
   -> Maybe [V1HostAlias]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [V1LocalObjectReference]
   -> Maybe [V1Container]
   -> Maybe Text
   -> Maybe (Map String Text)
   -> Maybe V1PodOS
   -> Maybe (Map String Quantity)
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe [V1PodReadinessGate]
   -> Maybe [V1PodResourceClaim]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodSchedulingGate]
   -> Maybe V1PodSecurityContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe [V1EphemeralContainer])
-> Parser
     (Maybe [V1HostAlias]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [V1LocalObjectReference]
      -> Maybe [V1Container]
      -> Maybe Text
      -> Maybe (Map String Text)
      -> Maybe V1PodOS
      -> Maybe (Map String Quantity)
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe [V1PodReadinessGate]
      -> Maybe [V1PodResourceClaim]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodSchedulingGate]
      -> Maybe V1PodSecurityContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1EphemeralContainer])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ephemeralContainers")
      Parser
  (Maybe [V1HostAlias]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [V1LocalObjectReference]
   -> Maybe [V1Container]
   -> Maybe Text
   -> Maybe (Map String Text)
   -> Maybe V1PodOS
   -> Maybe (Map String Quantity)
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe [V1PodReadinessGate]
   -> Maybe [V1PodResourceClaim]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodSchedulingGate]
   -> Maybe V1PodSecurityContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe [V1HostAlias])
-> Parser
     (Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [V1LocalObjectReference]
      -> Maybe [V1Container]
      -> Maybe Text
      -> Maybe (Map String Text)
      -> Maybe V1PodOS
      -> Maybe (Map String Quantity)
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe [V1PodReadinessGate]
      -> Maybe [V1PodResourceClaim]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodSchedulingGate]
      -> Maybe V1PodSecurityContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1HostAlias])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"hostAliases")
      Parser
  (Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [V1LocalObjectReference]
   -> Maybe [V1Container]
   -> Maybe Text
   -> Maybe (Map String Text)
   -> Maybe V1PodOS
   -> Maybe (Map String Quantity)
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe [V1PodReadinessGate]
   -> Maybe [V1PodResourceClaim]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodSchedulingGate]
   -> Maybe V1PodSecurityContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [V1LocalObjectReference]
      -> Maybe [V1Container]
      -> Maybe Text
      -> Maybe (Map String Text)
      -> Maybe V1PodOS
      -> Maybe (Map String Quantity)
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe [V1PodReadinessGate]
      -> Maybe [V1PodResourceClaim]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodSchedulingGate]
      -> Maybe V1PodSecurityContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"hostIPC")
      Parser
  (Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [V1LocalObjectReference]
   -> Maybe [V1Container]
   -> Maybe Text
   -> Maybe (Map String Text)
   -> Maybe V1PodOS
   -> Maybe (Map String Quantity)
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe [V1PodReadinessGate]
   -> Maybe [V1PodResourceClaim]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodSchedulingGate]
   -> Maybe V1PodSecurityContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [V1LocalObjectReference]
      -> Maybe [V1Container]
      -> Maybe Text
      -> Maybe (Map String Text)
      -> Maybe V1PodOS
      -> Maybe (Map String Quantity)
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe [V1PodReadinessGate]
      -> Maybe [V1PodResourceClaim]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodSchedulingGate]
      -> Maybe V1PodSecurityContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"hostNetwork")
      Parser
  (Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [V1LocalObjectReference]
   -> Maybe [V1Container]
   -> Maybe Text
   -> Maybe (Map String Text)
   -> Maybe V1PodOS
   -> Maybe (Map String Quantity)
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe [V1PodReadinessGate]
   -> Maybe [V1PodResourceClaim]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodSchedulingGate]
   -> Maybe V1PodSecurityContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe [V1LocalObjectReference]
      -> Maybe [V1Container]
      -> Maybe Text
      -> Maybe (Map String Text)
      -> Maybe V1PodOS
      -> Maybe (Map String Quantity)
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe [V1PodReadinessGate]
      -> Maybe [V1PodResourceClaim]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodSchedulingGate]
      -> Maybe V1PodSecurityContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"hostPID")
      Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe [V1LocalObjectReference]
   -> Maybe [V1Container]
   -> Maybe Text
   -> Maybe (Map String Text)
   -> Maybe V1PodOS
   -> Maybe (Map String Quantity)
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe [V1PodReadinessGate]
   -> Maybe [V1PodResourceClaim]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodSchedulingGate]
   -> Maybe V1PodSecurityContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe [V1LocalObjectReference]
      -> Maybe [V1Container]
      -> Maybe Text
      -> Maybe (Map String Text)
      -> Maybe V1PodOS
      -> Maybe (Map String Quantity)
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe [V1PodReadinessGate]
      -> Maybe [V1PodResourceClaim]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodSchedulingGate]
      -> Maybe V1PodSecurityContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"hostUsers")
      Parser
  (Maybe Text
   -> Maybe [V1LocalObjectReference]
   -> Maybe [V1Container]
   -> Maybe Text
   -> Maybe (Map String Text)
   -> Maybe V1PodOS
   -> Maybe (Map String Quantity)
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe [V1PodReadinessGate]
   -> Maybe [V1PodResourceClaim]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodSchedulingGate]
   -> Maybe V1PodSecurityContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe [V1LocalObjectReference]
      -> Maybe [V1Container]
      -> Maybe Text
      -> Maybe (Map String Text)
      -> Maybe V1PodOS
      -> Maybe (Map String Quantity)
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe [V1PodReadinessGate]
      -> Maybe [V1PodResourceClaim]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodSchedulingGate]
      -> Maybe V1PodSecurityContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"hostname")
      Parser
  (Maybe [V1LocalObjectReference]
   -> Maybe [V1Container]
   -> Maybe Text
   -> Maybe (Map String Text)
   -> Maybe V1PodOS
   -> Maybe (Map String Quantity)
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe [V1PodReadinessGate]
   -> Maybe [V1PodResourceClaim]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodSchedulingGate]
   -> Maybe V1PodSecurityContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe [V1LocalObjectReference])
-> Parser
     (Maybe [V1Container]
      -> Maybe Text
      -> Maybe (Map String Text)
      -> Maybe V1PodOS
      -> Maybe (Map String Quantity)
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe [V1PodReadinessGate]
      -> Maybe [V1PodResourceClaim]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodSchedulingGate]
      -> Maybe V1PodSecurityContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1LocalObjectReference])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"imagePullSecrets")
      Parser
  (Maybe [V1Container]
   -> Maybe Text
   -> Maybe (Map String Text)
   -> Maybe V1PodOS
   -> Maybe (Map String Quantity)
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe [V1PodReadinessGate]
   -> Maybe [V1PodResourceClaim]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodSchedulingGate]
   -> Maybe V1PodSecurityContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe [V1Container])
-> Parser
     (Maybe Text
      -> Maybe (Map String Text)
      -> Maybe V1PodOS
      -> Maybe (Map String Quantity)
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe [V1PodReadinessGate]
      -> Maybe [V1PodResourceClaim]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodSchedulingGate]
      -> Maybe V1PodSecurityContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1Container])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"initContainers")
      Parser
  (Maybe Text
   -> Maybe (Map String Text)
   -> Maybe V1PodOS
   -> Maybe (Map String Quantity)
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe [V1PodReadinessGate]
   -> Maybe [V1PodResourceClaim]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodSchedulingGate]
   -> Maybe V1PodSecurityContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe (Map String Text)
      -> Maybe V1PodOS
      -> Maybe (Map String Quantity)
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe [V1PodReadinessGate]
      -> Maybe [V1PodResourceClaim]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodSchedulingGate]
      -> Maybe V1PodSecurityContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nodeName")
      Parser
  (Maybe (Map String Text)
   -> Maybe V1PodOS
   -> Maybe (Map String Quantity)
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe [V1PodReadinessGate]
   -> Maybe [V1PodResourceClaim]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodSchedulingGate]
   -> Maybe V1PodSecurityContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe (Map String Text))
-> Parser
     (Maybe V1PodOS
      -> Maybe (Map String Quantity)
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe [V1PodReadinessGate]
      -> Maybe [V1PodResourceClaim]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodSchedulingGate]
      -> Maybe V1PodSecurityContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String Text))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nodeSelector")
      Parser
  (Maybe V1PodOS
   -> Maybe (Map String Quantity)
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe [V1PodReadinessGate]
   -> Maybe [V1PodResourceClaim]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodSchedulingGate]
   -> Maybe V1PodSecurityContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe V1PodOS)
-> Parser
     (Maybe (Map String Quantity)
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe [V1PodReadinessGate]
      -> Maybe [V1PodResourceClaim]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodSchedulingGate]
      -> Maybe V1PodSecurityContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1PodOS)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"os")
      Parser
  (Maybe (Map String Quantity)
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe [V1PodReadinessGate]
   -> Maybe [V1PodResourceClaim]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodSchedulingGate]
   -> Maybe V1PodSecurityContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe (Map String Quantity))
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe [V1PodReadinessGate]
      -> Maybe [V1PodResourceClaim]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodSchedulingGate]
      -> Maybe V1PodSecurityContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String Quantity))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"overhead")
      Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe [V1PodReadinessGate]
   -> Maybe [V1PodResourceClaim]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodSchedulingGate]
   -> Maybe V1PodSecurityContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe [V1PodReadinessGate]
      -> Maybe [V1PodResourceClaim]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodSchedulingGate]
      -> Maybe V1PodSecurityContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"preemptionPolicy")
      Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe [V1PodReadinessGate]
   -> Maybe [V1PodResourceClaim]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodSchedulingGate]
   -> Maybe V1PodSecurityContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe [V1PodReadinessGate]
      -> Maybe [V1PodResourceClaim]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodSchedulingGate]
      -> Maybe V1PodSecurityContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"priority")
      Parser
  (Maybe Text
   -> Maybe [V1PodReadinessGate]
   -> Maybe [V1PodResourceClaim]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodSchedulingGate]
   -> Maybe V1PodSecurityContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe [V1PodReadinessGate]
      -> Maybe [V1PodResourceClaim]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodSchedulingGate]
      -> Maybe V1PodSecurityContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"priorityClassName")
      Parser
  (Maybe [V1PodReadinessGate]
   -> Maybe [V1PodResourceClaim]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodSchedulingGate]
   -> Maybe V1PodSecurityContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe [V1PodReadinessGate])
-> Parser
     (Maybe [V1PodResourceClaim]
      -> Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodSchedulingGate]
      -> Maybe V1PodSecurityContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1PodReadinessGate])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readinessGates")
      Parser
  (Maybe [V1PodResourceClaim]
   -> Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodSchedulingGate]
   -> Maybe V1PodSecurityContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe [V1PodResourceClaim])
-> Parser
     (Maybe V1ResourceRequirements
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodSchedulingGate]
      -> Maybe V1PodSecurityContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1PodResourceClaim])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resourceClaims")
      Parser
  (Maybe V1ResourceRequirements
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodSchedulingGate]
   -> Maybe V1PodSecurityContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe V1ResourceRequirements)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodSchedulingGate]
      -> Maybe V1PodSecurityContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ResourceRequirements)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resources")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodSchedulingGate]
   -> Maybe V1PodSecurityContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [V1PodSchedulingGate]
      -> Maybe V1PodSecurityContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"restartPolicy")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [V1PodSchedulingGate]
   -> Maybe V1PodSecurityContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [V1PodSchedulingGate]
      -> Maybe V1PodSecurityContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"runtimeClassName")
      Parser
  (Maybe Text
   -> Maybe [V1PodSchedulingGate]
   -> Maybe V1PodSecurityContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe [V1PodSchedulingGate]
      -> Maybe V1PodSecurityContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"schedulerName")
      Parser
  (Maybe [V1PodSchedulingGate]
   -> Maybe V1PodSecurityContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe [V1PodSchedulingGate])
-> Parser
     (Maybe V1PodSecurityContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1PodSchedulingGate])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"schedulingGates")
      Parser
  (Maybe V1PodSecurityContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe V1PodSecurityContext)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1PodSecurityContext)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"securityContext")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"serviceAccount")
      Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"serviceAccountName")
      Parser
  (Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"setHostnameAsFQDN")
      Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"shareProcessNamespace")
      Parser
  (Maybe Text
   -> Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe Integer
      -> Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"subdomain")
      Parser
  (Maybe Integer
   -> Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe Integer)
-> Parser
     (Maybe [V1Toleration]
      -> Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume]
      -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"terminationGracePeriodSeconds")
      Parser
  (Maybe [V1Toleration]
   -> Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume]
   -> V1PodSpec)
-> Parser (Maybe [V1Toleration])
-> Parser
     (Maybe [V1TopologySpreadConstraint]
      -> Maybe [V1Volume] -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1Toleration])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"tolerations")
      Parser
  (Maybe [V1TopologySpreadConstraint]
   -> Maybe [V1Volume] -> V1PodSpec)
-> Parser (Maybe [V1TopologySpreadConstraint])
-> Parser (Maybe [V1Volume] -> V1PodSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1TopologySpreadConstraint])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"topologySpreadConstraints")
      Parser (Maybe [V1Volume] -> V1PodSpec)
-> Parser (Maybe [V1Volume]) -> Parser V1PodSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1Volume])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"volumes")

-- | ToJSON V1PodSpec
instance A.ToJSON V1PodSpec where
  toJSON :: V1PodSpec -> Value
toJSON V1PodSpec {[V1Container]
Maybe Bool
Maybe Int
Maybe Integer
Maybe [V1Volume]
Maybe [V1TopologySpreadConstraint]
Maybe [V1Toleration]
Maybe [V1PodSchedulingGate]
Maybe [V1PodResourceClaim]
Maybe [V1PodReadinessGate]
Maybe [V1LocalObjectReference]
Maybe [V1HostAlias]
Maybe [V1EphemeralContainer]
Maybe [V1Container]
Maybe (Map String Text)
Maybe (Map String Quantity)
Maybe Text
Maybe V1ResourceRequirements
Maybe V1PodSecurityContext
Maybe V1PodOS
Maybe V1PodDNSConfig
Maybe V1Affinity
$sel:v1PodSpecActiveDeadlineSeconds:V1PodSpec :: V1PodSpec -> Maybe Integer
$sel:v1PodSpecAffinity:V1PodSpec :: V1PodSpec -> Maybe V1Affinity
$sel:v1PodSpecAutomountServiceAccountToken:V1PodSpec :: V1PodSpec -> Maybe Bool
$sel:v1PodSpecContainers:V1PodSpec :: V1PodSpec -> [V1Container]
$sel:v1PodSpecDnsConfig:V1PodSpec :: V1PodSpec -> Maybe V1PodDNSConfig
$sel:v1PodSpecDnsPolicy:V1PodSpec :: V1PodSpec -> Maybe Text
$sel:v1PodSpecEnableServiceLinks:V1PodSpec :: V1PodSpec -> Maybe Bool
$sel:v1PodSpecEphemeralContainers:V1PodSpec :: V1PodSpec -> Maybe [V1EphemeralContainer]
$sel:v1PodSpecHostAliases:V1PodSpec :: V1PodSpec -> Maybe [V1HostAlias]
$sel:v1PodSpecHostIpc:V1PodSpec :: V1PodSpec -> Maybe Bool
$sel:v1PodSpecHostNetwork:V1PodSpec :: V1PodSpec -> Maybe Bool
$sel:v1PodSpecHostPid:V1PodSpec :: V1PodSpec -> Maybe Bool
$sel:v1PodSpecHostUsers:V1PodSpec :: V1PodSpec -> Maybe Bool
$sel:v1PodSpecHostname:V1PodSpec :: V1PodSpec -> Maybe Text
$sel:v1PodSpecImagePullSecrets:V1PodSpec :: V1PodSpec -> Maybe [V1LocalObjectReference]
$sel:v1PodSpecInitContainers:V1PodSpec :: V1PodSpec -> Maybe [V1Container]
$sel:v1PodSpecNodeName:V1PodSpec :: V1PodSpec -> Maybe Text
$sel:v1PodSpecNodeSelector:V1PodSpec :: V1PodSpec -> Maybe (Map String Text)
$sel:v1PodSpecOs:V1PodSpec :: V1PodSpec -> Maybe V1PodOS
$sel:v1PodSpecOverhead:V1PodSpec :: V1PodSpec -> Maybe (Map String Quantity)
$sel:v1PodSpecPreemptionPolicy:V1PodSpec :: V1PodSpec -> Maybe Text
$sel:v1PodSpecPriority:V1PodSpec :: V1PodSpec -> Maybe Int
$sel:v1PodSpecPriorityClassName:V1PodSpec :: V1PodSpec -> Maybe Text
$sel:v1PodSpecReadinessGates:V1PodSpec :: V1PodSpec -> Maybe [V1PodReadinessGate]
$sel:v1PodSpecResourceClaims:V1PodSpec :: V1PodSpec -> Maybe [V1PodResourceClaim]
$sel:v1PodSpecResources:V1PodSpec :: V1PodSpec -> Maybe V1ResourceRequirements
$sel:v1PodSpecRestartPolicy:V1PodSpec :: V1PodSpec -> Maybe Text
$sel:v1PodSpecRuntimeClassName:V1PodSpec :: V1PodSpec -> Maybe Text
$sel:v1PodSpecSchedulerName:V1PodSpec :: V1PodSpec -> Maybe Text
$sel:v1PodSpecSchedulingGates:V1PodSpec :: V1PodSpec -> Maybe [V1PodSchedulingGate]
$sel:v1PodSpecSecurityContext:V1PodSpec :: V1PodSpec -> Maybe V1PodSecurityContext
$sel:v1PodSpecServiceAccount:V1PodSpec :: V1PodSpec -> Maybe Text
$sel:v1PodSpecServiceAccountName:V1PodSpec :: V1PodSpec -> Maybe Text
$sel:v1PodSpecSetHostnameAsFqdn:V1PodSpec :: V1PodSpec -> Maybe Bool
$sel:v1PodSpecShareProcessNamespace:V1PodSpec :: V1PodSpec -> Maybe Bool
$sel:v1PodSpecSubdomain:V1PodSpec :: V1PodSpec -> Maybe Text
$sel:v1PodSpecTerminationGracePeriodSeconds:V1PodSpec :: V1PodSpec -> Maybe Integer
$sel:v1PodSpecTolerations:V1PodSpec :: V1PodSpec -> Maybe [V1Toleration]
$sel:v1PodSpecTopologySpreadConstraints:V1PodSpec :: V1PodSpec -> Maybe [V1TopologySpreadConstraint]
$sel:v1PodSpecVolumes:V1PodSpec :: V1PodSpec -> Maybe [V1Volume]
v1PodSpecActiveDeadlineSeconds :: Maybe Integer
v1PodSpecAffinity :: Maybe V1Affinity
v1PodSpecAutomountServiceAccountToken :: Maybe Bool
v1PodSpecContainers :: [V1Container]
v1PodSpecDnsConfig :: Maybe V1PodDNSConfig
v1PodSpecDnsPolicy :: Maybe Text
v1PodSpecEnableServiceLinks :: Maybe Bool
v1PodSpecEphemeralContainers :: Maybe [V1EphemeralContainer]
v1PodSpecHostAliases :: Maybe [V1HostAlias]
v1PodSpecHostIpc :: Maybe Bool
v1PodSpecHostNetwork :: Maybe Bool
v1PodSpecHostPid :: Maybe Bool
v1PodSpecHostUsers :: Maybe Bool
v1PodSpecHostname :: Maybe Text
v1PodSpecImagePullSecrets :: Maybe [V1LocalObjectReference]
v1PodSpecInitContainers :: Maybe [V1Container]
v1PodSpecNodeName :: Maybe Text
v1PodSpecNodeSelector :: Maybe (Map String Text)
v1PodSpecOs :: Maybe V1PodOS
v1PodSpecOverhead :: Maybe (Map String Quantity)
v1PodSpecPreemptionPolicy :: Maybe Text
v1PodSpecPriority :: Maybe Int
v1PodSpecPriorityClassName :: Maybe Text
v1PodSpecReadinessGates :: Maybe [V1PodReadinessGate]
v1PodSpecResourceClaims :: Maybe [V1PodResourceClaim]
v1PodSpecResources :: Maybe V1ResourceRequirements
v1PodSpecRestartPolicy :: Maybe Text
v1PodSpecRuntimeClassName :: Maybe Text
v1PodSpecSchedulerName :: Maybe Text
v1PodSpecSchedulingGates :: Maybe [V1PodSchedulingGate]
v1PodSpecSecurityContext :: Maybe V1PodSecurityContext
v1PodSpecServiceAccount :: Maybe Text
v1PodSpecServiceAccountName :: Maybe Text
v1PodSpecSetHostnameAsFqdn :: Maybe Bool
v1PodSpecShareProcessNamespace :: Maybe Bool
v1PodSpecSubdomain :: Maybe Text
v1PodSpecTerminationGracePeriodSeconds :: Maybe Integer
v1PodSpecTolerations :: Maybe [V1Toleration]
v1PodSpecTopologySpreadConstraints :: Maybe [V1TopologySpreadConstraint]
v1PodSpecVolumes :: Maybe [V1Volume]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"activeDeadlineSeconds" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1PodSpecActiveDeadlineSeconds
      , Key
"affinity" Key -> Maybe V1Affinity -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1Affinity
v1PodSpecAffinity
      , Key
"automountServiceAccountToken" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1PodSpecAutomountServiceAccountToken
      , Key
"containers" Key -> [V1Container] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1Container]
v1PodSpecContainers
      , Key
"dnsConfig" Key -> Maybe V1PodDNSConfig -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1PodDNSConfig
v1PodSpecDnsConfig
      , Key
"dnsPolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodSpecDnsPolicy
      , Key
"enableServiceLinks" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1PodSpecEnableServiceLinks
      , Key
"ephemeralContainers" Key -> Maybe [V1EphemeralContainer] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1EphemeralContainer]
v1PodSpecEphemeralContainers
      , Key
"hostAliases" Key -> Maybe [V1HostAlias] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1HostAlias]
v1PodSpecHostAliases
      , Key
"hostIPC" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1PodSpecHostIpc
      , Key
"hostNetwork" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1PodSpecHostNetwork
      , Key
"hostPID" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1PodSpecHostPid
      , Key
"hostUsers" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1PodSpecHostUsers
      , Key
"hostname" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodSpecHostname
      , Key
"imagePullSecrets" Key -> Maybe [V1LocalObjectReference] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1LocalObjectReference]
v1PodSpecImagePullSecrets
      , Key
"initContainers" Key -> Maybe [V1Container] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1Container]
v1PodSpecInitContainers
      , Key
"nodeName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodSpecNodeName
      , Key
"nodeSelector" Key -> Maybe (Map String Text) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Text)
v1PodSpecNodeSelector
      , Key
"os" Key -> Maybe V1PodOS -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1PodOS
v1PodSpecOs
      , Key
"overhead" Key -> Maybe (Map String Quantity) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Quantity)
v1PodSpecOverhead
      , Key
"preemptionPolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodSpecPreemptionPolicy
      , Key
"priority" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1PodSpecPriority
      , Key
"priorityClassName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodSpecPriorityClassName
      , Key
"readinessGates" Key -> Maybe [V1PodReadinessGate] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1PodReadinessGate]
v1PodSpecReadinessGates
      , Key
"resourceClaims" Key -> Maybe [V1PodResourceClaim] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1PodResourceClaim]
v1PodSpecResourceClaims
      , Key
"resources" Key -> Maybe V1ResourceRequirements -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ResourceRequirements
v1PodSpecResources
      , Key
"restartPolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodSpecRestartPolicy
      , Key
"runtimeClassName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodSpecRuntimeClassName
      , Key
"schedulerName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodSpecSchedulerName
      , Key
"schedulingGates" Key -> Maybe [V1PodSchedulingGate] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1PodSchedulingGate]
v1PodSpecSchedulingGates
      , Key
"securityContext" Key -> Maybe V1PodSecurityContext -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1PodSecurityContext
v1PodSpecSecurityContext
      , Key
"serviceAccount" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodSpecServiceAccount
      , Key
"serviceAccountName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodSpecServiceAccountName
      , Key
"setHostnameAsFQDN" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1PodSpecSetHostnameAsFqdn
      , Key
"shareProcessNamespace" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1PodSpecShareProcessNamespace
      , Key
"subdomain" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodSpecSubdomain
      , Key
"terminationGracePeriodSeconds" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1PodSpecTerminationGracePeriodSeconds
      , Key
"tolerations" Key -> Maybe [V1Toleration] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1Toleration]
v1PodSpecTolerations
      , Key
"topologySpreadConstraints" Key -> Maybe [V1TopologySpreadConstraint] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1TopologySpreadConstraint]
v1PodSpecTopologySpreadConstraints
      , Key
"volumes" Key -> Maybe [V1Volume] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1Volume]
v1PodSpecVolumes
      ]


-- | Construct a value of type 'V1PodSpec' (by applying it's required fields, if any)
mkV1PodSpec
  :: [V1Container] -- ^ 'v1PodSpecContainers': List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated.
  -> V1PodSpec
mkV1PodSpec :: [V1Container] -> V1PodSpec
mkV1PodSpec [V1Container]
v1PodSpecContainers =
  V1PodSpec
  { $sel:v1PodSpecActiveDeadlineSeconds:V1PodSpec :: Maybe Integer
v1PodSpecActiveDeadlineSeconds = Maybe Integer
forall a. Maybe a
Nothing
  , $sel:v1PodSpecAffinity:V1PodSpec :: Maybe V1Affinity
v1PodSpecAffinity = Maybe V1Affinity
forall a. Maybe a
Nothing
  , $sel:v1PodSpecAutomountServiceAccountToken:V1PodSpec :: Maybe Bool
v1PodSpecAutomountServiceAccountToken = Maybe Bool
forall a. Maybe a
Nothing
  , [V1Container]
$sel:v1PodSpecContainers:V1PodSpec :: [V1Container]
v1PodSpecContainers :: [V1Container]
v1PodSpecContainers
  , $sel:v1PodSpecDnsConfig:V1PodSpec :: Maybe V1PodDNSConfig
v1PodSpecDnsConfig = Maybe V1PodDNSConfig
forall a. Maybe a
Nothing
  , $sel:v1PodSpecDnsPolicy:V1PodSpec :: Maybe Text
v1PodSpecDnsPolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodSpecEnableServiceLinks:V1PodSpec :: Maybe Bool
v1PodSpecEnableServiceLinks = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1PodSpecEphemeralContainers:V1PodSpec :: Maybe [V1EphemeralContainer]
v1PodSpecEphemeralContainers = Maybe [V1EphemeralContainer]
forall a. Maybe a
Nothing
  , $sel:v1PodSpecHostAliases:V1PodSpec :: Maybe [V1HostAlias]
v1PodSpecHostAliases = Maybe [V1HostAlias]
forall a. Maybe a
Nothing
  , $sel:v1PodSpecHostIpc:V1PodSpec :: Maybe Bool
v1PodSpecHostIpc = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1PodSpecHostNetwork:V1PodSpec :: Maybe Bool
v1PodSpecHostNetwork = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1PodSpecHostPid:V1PodSpec :: Maybe Bool
v1PodSpecHostPid = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1PodSpecHostUsers:V1PodSpec :: Maybe Bool
v1PodSpecHostUsers = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1PodSpecHostname:V1PodSpec :: Maybe Text
v1PodSpecHostname = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodSpecImagePullSecrets:V1PodSpec :: Maybe [V1LocalObjectReference]
v1PodSpecImagePullSecrets = Maybe [V1LocalObjectReference]
forall a. Maybe a
Nothing
  , $sel:v1PodSpecInitContainers:V1PodSpec :: Maybe [V1Container]
v1PodSpecInitContainers = Maybe [V1Container]
forall a. Maybe a
Nothing
  , $sel:v1PodSpecNodeName:V1PodSpec :: Maybe Text
v1PodSpecNodeName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodSpecNodeSelector:V1PodSpec :: Maybe (Map String Text)
v1PodSpecNodeSelector = Maybe (Map String Text)
forall a. Maybe a
Nothing
  , $sel:v1PodSpecOs:V1PodSpec :: Maybe V1PodOS
v1PodSpecOs = Maybe V1PodOS
forall a. Maybe a
Nothing
  , $sel:v1PodSpecOverhead:V1PodSpec :: Maybe (Map String Quantity)
v1PodSpecOverhead = Maybe (Map String Quantity)
forall a. Maybe a
Nothing
  , $sel:v1PodSpecPreemptionPolicy:V1PodSpec :: Maybe Text
v1PodSpecPreemptionPolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodSpecPriority:V1PodSpec :: Maybe Int
v1PodSpecPriority = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1PodSpecPriorityClassName:V1PodSpec :: Maybe Text
v1PodSpecPriorityClassName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodSpecReadinessGates:V1PodSpec :: Maybe [V1PodReadinessGate]
v1PodSpecReadinessGates = Maybe [V1PodReadinessGate]
forall a. Maybe a
Nothing
  , $sel:v1PodSpecResourceClaims:V1PodSpec :: Maybe [V1PodResourceClaim]
v1PodSpecResourceClaims = Maybe [V1PodResourceClaim]
forall a. Maybe a
Nothing
  , $sel:v1PodSpecResources:V1PodSpec :: Maybe V1ResourceRequirements
v1PodSpecResources = Maybe V1ResourceRequirements
forall a. Maybe a
Nothing
  , $sel:v1PodSpecRestartPolicy:V1PodSpec :: Maybe Text
v1PodSpecRestartPolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodSpecRuntimeClassName:V1PodSpec :: Maybe Text
v1PodSpecRuntimeClassName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodSpecSchedulerName:V1PodSpec :: Maybe Text
v1PodSpecSchedulerName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodSpecSchedulingGates:V1PodSpec :: Maybe [V1PodSchedulingGate]
v1PodSpecSchedulingGates = Maybe [V1PodSchedulingGate]
forall a. Maybe a
Nothing
  , $sel:v1PodSpecSecurityContext:V1PodSpec :: Maybe V1PodSecurityContext
v1PodSpecSecurityContext = Maybe V1PodSecurityContext
forall a. Maybe a
Nothing
  , $sel:v1PodSpecServiceAccount:V1PodSpec :: Maybe Text
v1PodSpecServiceAccount = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodSpecServiceAccountName:V1PodSpec :: Maybe Text
v1PodSpecServiceAccountName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodSpecSetHostnameAsFqdn:V1PodSpec :: Maybe Bool
v1PodSpecSetHostnameAsFqdn = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1PodSpecShareProcessNamespace:V1PodSpec :: Maybe Bool
v1PodSpecShareProcessNamespace = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1PodSpecSubdomain:V1PodSpec :: Maybe Text
v1PodSpecSubdomain = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodSpecTerminationGracePeriodSeconds:V1PodSpec :: Maybe Integer
v1PodSpecTerminationGracePeriodSeconds = Maybe Integer
forall a. Maybe a
Nothing
  , $sel:v1PodSpecTolerations:V1PodSpec :: Maybe [V1Toleration]
v1PodSpecTolerations = Maybe [V1Toleration]
forall a. Maybe a
Nothing
  , $sel:v1PodSpecTopologySpreadConstraints:V1PodSpec :: Maybe [V1TopologySpreadConstraint]
v1PodSpecTopologySpreadConstraints = Maybe [V1TopologySpreadConstraint]
forall a. Maybe a
Nothing
  , $sel:v1PodSpecVolumes:V1PodSpec :: Maybe [V1Volume]
v1PodSpecVolumes = Maybe [V1Volume]
forall a. Maybe a
Nothing
  }

-- ** V1PodStatus
-- | V1PodStatus
-- PodStatus represents information about the status of a pod. Status may trail the actual state of a system, especially if the node that hosts the pod cannot contact the control plane.
data V1PodStatus = V1PodStatus
  { V1PodStatus -> Maybe [V1PodCondition]
v1PodStatusConditions :: !(Maybe [V1PodCondition]) -- ^ "conditions" - Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions
  , V1PodStatus -> Maybe [V1ContainerStatus]
v1PodStatusContainerStatuses :: !(Maybe [V1ContainerStatus]) -- ^ "containerStatuses" - Statuses of containers in this pod. Each container in the pod should have at most one status in this list, and all statuses should be for containers in the pod. However this is not enforced. If a status for a non-existent container is present in the list, or the list has duplicate names, the behavior of various Kubernetes components is not defined and those statuses might be ignored. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status
  , V1PodStatus -> Maybe [V1ContainerStatus]
v1PodStatusEphemeralContainerStatuses :: !(Maybe [V1ContainerStatus]) -- ^ "ephemeralContainerStatuses" - Statuses for any ephemeral containers that have run in this pod. Each ephemeral container in the pod should have at most one status in this list, and all statuses should be for containers in the pod. However this is not enforced. If a status for a non-existent container is present in the list, or the list has duplicate names, the behavior of various Kubernetes components is not defined and those statuses might be ignored. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status
  , V1PodStatus -> Maybe Text
v1PodStatusHostIp :: !(Maybe Text) -- ^ "hostIP" - hostIP holds the IP address of the host to which the pod is assigned. Empty if the pod has not started yet. A pod can be assigned to a node that has a problem in kubelet which in turns mean that HostIP will not be updated even if there is a node is assigned to pod
  , V1PodStatus -> Maybe [V1HostIP]
v1PodStatusHostIps :: !(Maybe [V1HostIP]) -- ^ "hostIPs" - hostIPs holds the IP addresses allocated to the host. If this field is specified, the first entry must match the hostIP field. This list is empty if the pod has not started yet. A pod can be assigned to a node that has a problem in kubelet which in turns means that HostIPs will not be updated even if there is a node is assigned to this pod.
  , V1PodStatus -> Maybe [V1ContainerStatus]
v1PodStatusInitContainerStatuses :: !(Maybe [V1ContainerStatus]) -- ^ "initContainerStatuses" - Statuses of init containers in this pod. The most recent successful non-restartable init container will have ready &#x3D; true, the most recently started container will have startTime set. Each init container in the pod should have at most one status in this list, and all statuses should be for containers in the pod. However this is not enforced. If a status for a non-existent container is present in the list, or the list has duplicate names, the behavior of various Kubernetes components is not defined and those statuses might be ignored. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-and-container-status
  , V1PodStatus -> Maybe Text
v1PodStatusMessage :: !(Maybe Text) -- ^ "message" - A human readable message indicating details about why the pod is in this condition.
  , V1PodStatus -> Maybe Text
v1PodStatusNominatedNodeName :: !(Maybe Text) -- ^ "nominatedNodeName" - nominatedNodeName is set only when this pod preempts other pods on the node, but it cannot be scheduled right away as preemption victims receive their graceful termination periods. This field does not guarantee that the pod will be scheduled on this node. Scheduler may decide to place the pod elsewhere if other nodes become available sooner. Scheduler may also decide to give the resources on this node to a higher priority pod that is created after preemption. As a result, this field may be different than PodSpec.nodeName when the pod is scheduled.
  , V1PodStatus -> Maybe Text
v1PodStatusPhase :: !(Maybe Text) -- ^ "phase" - The phase of a Pod is a simple, high-level summary of where the Pod is in its lifecycle. The conditions array, the reason and message fields, and the individual container status arrays contain more detail about the pod&#39;s status. There are five possible phase values:  Pending: The pod has been accepted by the Kubernetes system, but one or more of the container images has not been created. This includes time before being scheduled as well as time spent downloading images over the network, which could take a while. Running: The pod has been bound to a node, and all of the containers have been created. At least one container is still running, or is in the process of starting or restarting. Succeeded: All containers in the pod have terminated in success, and will not be restarted. Failed: All containers in the pod have terminated, and at least one container has terminated in failure. The container either exited with non-zero status or was terminated by the system. Unknown: For some reason the state of the pod could not be obtained, typically due to an error in communicating with the host of the pod.  More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase
  , V1PodStatus -> Maybe Text
v1PodStatusPodIp :: !(Maybe Text) -- ^ "podIP" - podIP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated.
  , V1PodStatus -> Maybe [V1PodIP]
v1PodStatusPodIps :: !(Maybe [V1PodIP]) -- ^ "podIPs" - podIPs holds the IP addresses allocated to the pod. If this field is specified, the 0th entry must match the podIP field. Pods may be allocated at most 1 value for each of IPv4 and IPv6. This list is empty if no IPs have been allocated yet.
  , V1PodStatus -> Maybe Text
v1PodStatusQosClass :: !(Maybe Text) -- ^ "qosClass" - The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-qos/#quality-of-service-classes
  , V1PodStatus -> Maybe Text
v1PodStatusReason :: !(Maybe Text) -- ^ "reason" - A brief CamelCase message indicating details about why the pod is in this state. e.g. &#39;Evicted&#39;
  , V1PodStatus -> Maybe Text
v1PodStatusResize :: !(Maybe Text) -- ^ "resize" - Status of resources resize desired for pod&#39;s containers. It is empty if no resources resize is pending. Any changes to container resources will automatically set this to \&quot;Proposed\&quot;
  , V1PodStatus -> Maybe [V1PodResourceClaimStatus]
v1PodStatusResourceClaimStatuses :: !(Maybe [V1PodResourceClaimStatus]) -- ^ "resourceClaimStatuses" - Status of resource claims.
  , V1PodStatus -> Maybe DateTime
v1PodStatusStartTime :: !(Maybe DateTime) -- ^ "startTime" - RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod.
  } deriving (Int -> V1PodStatus -> ShowS
[V1PodStatus] -> ShowS
V1PodStatus -> String
(Int -> V1PodStatus -> ShowS)
-> (V1PodStatus -> String)
-> ([V1PodStatus] -> ShowS)
-> Show V1PodStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PodStatus -> ShowS
showsPrec :: Int -> V1PodStatus -> ShowS
$cshow :: V1PodStatus -> String
show :: V1PodStatus -> String
$cshowList :: [V1PodStatus] -> ShowS
showList :: [V1PodStatus] -> ShowS
P.Show, V1PodStatus -> V1PodStatus -> Bool
(V1PodStatus -> V1PodStatus -> Bool)
-> (V1PodStatus -> V1PodStatus -> Bool) -> Eq V1PodStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PodStatus -> V1PodStatus -> Bool
== :: V1PodStatus -> V1PodStatus -> Bool
$c/= :: V1PodStatus -> V1PodStatus -> Bool
/= :: V1PodStatus -> V1PodStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PodStatus
instance A.FromJSON V1PodStatus where
  parseJSON :: Value -> Parser V1PodStatus
parseJSON = String
-> (Object -> Parser V1PodStatus) -> Value -> Parser V1PodStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PodStatus" ((Object -> Parser V1PodStatus) -> Value -> Parser V1PodStatus)
-> (Object -> Parser V1PodStatus) -> Value -> Parser V1PodStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1PodCondition]
-> Maybe [V1ContainerStatus]
-> Maybe [V1ContainerStatus]
-> Maybe Text
-> Maybe [V1HostIP]
-> Maybe [V1ContainerStatus]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [V1PodIP]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [V1PodResourceClaimStatus]
-> Maybe DateTime
-> V1PodStatus
V1PodStatus
      (Maybe [V1PodCondition]
 -> Maybe [V1ContainerStatus]
 -> Maybe [V1ContainerStatus]
 -> Maybe Text
 -> Maybe [V1HostIP]
 -> Maybe [V1ContainerStatus]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [V1PodIP]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [V1PodResourceClaimStatus]
 -> Maybe DateTime
 -> V1PodStatus)
-> Parser (Maybe [V1PodCondition])
-> Parser
     (Maybe [V1ContainerStatus]
      -> Maybe [V1ContainerStatus]
      -> Maybe Text
      -> Maybe [V1HostIP]
      -> Maybe [V1ContainerStatus]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodIP]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodResourceClaimStatus]
      -> Maybe DateTime
      -> V1PodStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1PodCondition])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"conditions")
      Parser
  (Maybe [V1ContainerStatus]
   -> Maybe [V1ContainerStatus]
   -> Maybe Text
   -> Maybe [V1HostIP]
   -> Maybe [V1ContainerStatus]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodIP]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodResourceClaimStatus]
   -> Maybe DateTime
   -> V1PodStatus)
-> Parser (Maybe [V1ContainerStatus])
-> Parser
     (Maybe [V1ContainerStatus]
      -> Maybe Text
      -> Maybe [V1HostIP]
      -> Maybe [V1ContainerStatus]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodIP]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodResourceClaimStatus]
      -> Maybe DateTime
      -> V1PodStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1ContainerStatus])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"containerStatuses")
      Parser
  (Maybe [V1ContainerStatus]
   -> Maybe Text
   -> Maybe [V1HostIP]
   -> Maybe [V1ContainerStatus]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodIP]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodResourceClaimStatus]
   -> Maybe DateTime
   -> V1PodStatus)
-> Parser (Maybe [V1ContainerStatus])
-> Parser
     (Maybe Text
      -> Maybe [V1HostIP]
      -> Maybe [V1ContainerStatus]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodIP]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodResourceClaimStatus]
      -> Maybe DateTime
      -> V1PodStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1ContainerStatus])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ephemeralContainerStatuses")
      Parser
  (Maybe Text
   -> Maybe [V1HostIP]
   -> Maybe [V1ContainerStatus]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodIP]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodResourceClaimStatus]
   -> Maybe DateTime
   -> V1PodStatus)
-> Parser (Maybe Text)
-> Parser
     (Maybe [V1HostIP]
      -> Maybe [V1ContainerStatus]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodIP]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodResourceClaimStatus]
      -> Maybe DateTime
      -> V1PodStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"hostIP")
      Parser
  (Maybe [V1HostIP]
   -> Maybe [V1ContainerStatus]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodIP]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodResourceClaimStatus]
   -> Maybe DateTime
   -> V1PodStatus)
-> Parser (Maybe [V1HostIP])
-> Parser
     (Maybe [V1ContainerStatus]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodIP]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodResourceClaimStatus]
      -> Maybe DateTime
      -> V1PodStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1HostIP])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"hostIPs")
      Parser
  (Maybe [V1ContainerStatus]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodIP]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodResourceClaimStatus]
   -> Maybe DateTime
   -> V1PodStatus)
-> Parser (Maybe [V1ContainerStatus])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodIP]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodResourceClaimStatus]
      -> Maybe DateTime
      -> V1PodStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1ContainerStatus])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"initContainerStatuses")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodIP]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodResourceClaimStatus]
   -> Maybe DateTime
   -> V1PodStatus)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodIP]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodResourceClaimStatus]
      -> Maybe DateTime
      -> V1PodStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"message")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodIP]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodResourceClaimStatus]
   -> Maybe DateTime
   -> V1PodStatus)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [V1PodIP]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodResourceClaimStatus]
      -> Maybe DateTime
      -> V1PodStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nominatedNodeName")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [V1PodIP]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodResourceClaimStatus]
   -> Maybe DateTime
   -> V1PodStatus)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [V1PodIP]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodResourceClaimStatus]
      -> Maybe DateTime
      -> V1PodStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"phase")
      Parser
  (Maybe Text
   -> Maybe [V1PodIP]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodResourceClaimStatus]
   -> Maybe DateTime
   -> V1PodStatus)
-> Parser (Maybe Text)
-> Parser
     (Maybe [V1PodIP]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodResourceClaimStatus]
      -> Maybe DateTime
      -> V1PodStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"podIP")
      Parser
  (Maybe [V1PodIP]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodResourceClaimStatus]
   -> Maybe DateTime
   -> V1PodStatus)
-> Parser (Maybe [V1PodIP])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [V1PodResourceClaimStatus]
      -> Maybe DateTime
      -> V1PodStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1PodIP])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"podIPs")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [V1PodResourceClaimStatus]
   -> Maybe DateTime
   -> V1PodStatus)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [V1PodResourceClaimStatus]
      -> Maybe DateTime
      -> V1PodStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"qosClass")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [V1PodResourceClaimStatus]
   -> Maybe DateTime
   -> V1PodStatus)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [V1PodResourceClaimStatus]
      -> Maybe DateTime
      -> V1PodStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reason")
      Parser
  (Maybe Text
   -> Maybe [V1PodResourceClaimStatus]
   -> Maybe DateTime
   -> V1PodStatus)
-> Parser (Maybe Text)
-> Parser
     (Maybe [V1PodResourceClaimStatus] -> Maybe DateTime -> V1PodStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resize")
      Parser
  (Maybe [V1PodResourceClaimStatus] -> Maybe DateTime -> V1PodStatus)
-> Parser (Maybe [V1PodResourceClaimStatus])
-> Parser (Maybe DateTime -> V1PodStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1PodResourceClaimStatus])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resourceClaimStatuses")
      Parser (Maybe DateTime -> V1PodStatus)
-> Parser (Maybe DateTime) -> Parser V1PodStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"startTime")

-- | ToJSON V1PodStatus
instance A.ToJSON V1PodStatus where
  toJSON :: V1PodStatus -> Value
toJSON V1PodStatus {Maybe [V1PodResourceClaimStatus]
Maybe [V1PodIP]
Maybe [V1PodCondition]
Maybe [V1HostIP]
Maybe [V1ContainerStatus]
Maybe Text
Maybe DateTime
$sel:v1PodStatusConditions:V1PodStatus :: V1PodStatus -> Maybe [V1PodCondition]
$sel:v1PodStatusContainerStatuses:V1PodStatus :: V1PodStatus -> Maybe [V1ContainerStatus]
$sel:v1PodStatusEphemeralContainerStatuses:V1PodStatus :: V1PodStatus -> Maybe [V1ContainerStatus]
$sel:v1PodStatusHostIp:V1PodStatus :: V1PodStatus -> Maybe Text
$sel:v1PodStatusHostIps:V1PodStatus :: V1PodStatus -> Maybe [V1HostIP]
$sel:v1PodStatusInitContainerStatuses:V1PodStatus :: V1PodStatus -> Maybe [V1ContainerStatus]
$sel:v1PodStatusMessage:V1PodStatus :: V1PodStatus -> Maybe Text
$sel:v1PodStatusNominatedNodeName:V1PodStatus :: V1PodStatus -> Maybe Text
$sel:v1PodStatusPhase:V1PodStatus :: V1PodStatus -> Maybe Text
$sel:v1PodStatusPodIp:V1PodStatus :: V1PodStatus -> Maybe Text
$sel:v1PodStatusPodIps:V1PodStatus :: V1PodStatus -> Maybe [V1PodIP]
$sel:v1PodStatusQosClass:V1PodStatus :: V1PodStatus -> Maybe Text
$sel:v1PodStatusReason:V1PodStatus :: V1PodStatus -> Maybe Text
$sel:v1PodStatusResize:V1PodStatus :: V1PodStatus -> Maybe Text
$sel:v1PodStatusResourceClaimStatuses:V1PodStatus :: V1PodStatus -> Maybe [V1PodResourceClaimStatus]
$sel:v1PodStatusStartTime:V1PodStatus :: V1PodStatus -> Maybe DateTime
v1PodStatusConditions :: Maybe [V1PodCondition]
v1PodStatusContainerStatuses :: Maybe [V1ContainerStatus]
v1PodStatusEphemeralContainerStatuses :: Maybe [V1ContainerStatus]
v1PodStatusHostIp :: Maybe Text
v1PodStatusHostIps :: Maybe [V1HostIP]
v1PodStatusInitContainerStatuses :: Maybe [V1ContainerStatus]
v1PodStatusMessage :: Maybe Text
v1PodStatusNominatedNodeName :: Maybe Text
v1PodStatusPhase :: Maybe Text
v1PodStatusPodIp :: Maybe Text
v1PodStatusPodIps :: Maybe [V1PodIP]
v1PodStatusQosClass :: Maybe Text
v1PodStatusReason :: Maybe Text
v1PodStatusResize :: Maybe Text
v1PodStatusResourceClaimStatuses :: Maybe [V1PodResourceClaimStatus]
v1PodStatusStartTime :: Maybe DateTime
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"conditions" Key -> Maybe [V1PodCondition] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1PodCondition]
v1PodStatusConditions
      , Key
"containerStatuses" Key -> Maybe [V1ContainerStatus] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1ContainerStatus]
v1PodStatusContainerStatuses
      , Key
"ephemeralContainerStatuses" Key -> Maybe [V1ContainerStatus] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1ContainerStatus]
v1PodStatusEphemeralContainerStatuses
      , Key
"hostIP" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodStatusHostIp
      , Key
"hostIPs" Key -> Maybe [V1HostIP] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1HostIP]
v1PodStatusHostIps
      , Key
"initContainerStatuses" Key -> Maybe [V1ContainerStatus] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1ContainerStatus]
v1PodStatusInitContainerStatuses
      , Key
"message" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodStatusMessage
      , Key
"nominatedNodeName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodStatusNominatedNodeName
      , Key
"phase" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodStatusPhase
      , Key
"podIP" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodStatusPodIp
      , Key
"podIPs" Key -> Maybe [V1PodIP] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1PodIP]
v1PodStatusPodIps
      , Key
"qosClass" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodStatusQosClass
      , Key
"reason" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodStatusReason
      , Key
"resize" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodStatusResize
      , Key
"resourceClaimStatuses" Key -> Maybe [V1PodResourceClaimStatus] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1PodResourceClaimStatus]
v1PodStatusResourceClaimStatuses
      , Key
"startTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1PodStatusStartTime
      ]


-- | Construct a value of type 'V1PodStatus' (by applying it's required fields, if any)
mkV1PodStatus
  :: V1PodStatus
mkV1PodStatus :: V1PodStatus
mkV1PodStatus =
  V1PodStatus
  { $sel:v1PodStatusConditions:V1PodStatus :: Maybe [V1PodCondition]
v1PodStatusConditions = Maybe [V1PodCondition]
forall a. Maybe a
Nothing
  , $sel:v1PodStatusContainerStatuses:V1PodStatus :: Maybe [V1ContainerStatus]
v1PodStatusContainerStatuses = Maybe [V1ContainerStatus]
forall a. Maybe a
Nothing
  , $sel:v1PodStatusEphemeralContainerStatuses:V1PodStatus :: Maybe [V1ContainerStatus]
v1PodStatusEphemeralContainerStatuses = Maybe [V1ContainerStatus]
forall a. Maybe a
Nothing
  , $sel:v1PodStatusHostIp:V1PodStatus :: Maybe Text
v1PodStatusHostIp = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodStatusHostIps:V1PodStatus :: Maybe [V1HostIP]
v1PodStatusHostIps = Maybe [V1HostIP]
forall a. Maybe a
Nothing
  , $sel:v1PodStatusInitContainerStatuses:V1PodStatus :: Maybe [V1ContainerStatus]
v1PodStatusInitContainerStatuses = Maybe [V1ContainerStatus]
forall a. Maybe a
Nothing
  , $sel:v1PodStatusMessage:V1PodStatus :: Maybe Text
v1PodStatusMessage = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodStatusNominatedNodeName:V1PodStatus :: Maybe Text
v1PodStatusNominatedNodeName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodStatusPhase:V1PodStatus :: Maybe Text
v1PodStatusPhase = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodStatusPodIp:V1PodStatus :: Maybe Text
v1PodStatusPodIp = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodStatusPodIps:V1PodStatus :: Maybe [V1PodIP]
v1PodStatusPodIps = Maybe [V1PodIP]
forall a. Maybe a
Nothing
  , $sel:v1PodStatusQosClass:V1PodStatus :: Maybe Text
v1PodStatusQosClass = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodStatusReason:V1PodStatus :: Maybe Text
v1PodStatusReason = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodStatusResize:V1PodStatus :: Maybe Text
v1PodStatusResize = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodStatusResourceClaimStatuses:V1PodStatus :: Maybe [V1PodResourceClaimStatus]
v1PodStatusResourceClaimStatuses = Maybe [V1PodResourceClaimStatus]
forall a. Maybe a
Nothing
  , $sel:v1PodStatusStartTime:V1PodStatus :: Maybe DateTime
v1PodStatusStartTime = Maybe DateTime
forall a. Maybe a
Nothing
  }

-- ** V1PodTemplate
-- | V1PodTemplate
-- PodTemplate describes a template for creating copies of a predefined pod.
data V1PodTemplate = V1PodTemplate
  { V1PodTemplate -> Maybe Text
v1PodTemplateApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1PodTemplate -> Maybe Text
v1PodTemplateKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1PodTemplate -> Maybe V1ObjectMeta
v1PodTemplateMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1PodTemplate -> Maybe V1PodTemplateSpec
v1PodTemplateTemplate :: !(Maybe V1PodTemplateSpec) -- ^ "template"
  } deriving (Int -> V1PodTemplate -> ShowS
[V1PodTemplate] -> ShowS
V1PodTemplate -> String
(Int -> V1PodTemplate -> ShowS)
-> (V1PodTemplate -> String)
-> ([V1PodTemplate] -> ShowS)
-> Show V1PodTemplate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PodTemplate -> ShowS
showsPrec :: Int -> V1PodTemplate -> ShowS
$cshow :: V1PodTemplate -> String
show :: V1PodTemplate -> String
$cshowList :: [V1PodTemplate] -> ShowS
showList :: [V1PodTemplate] -> ShowS
P.Show, V1PodTemplate -> V1PodTemplate -> Bool
(V1PodTemplate -> V1PodTemplate -> Bool)
-> (V1PodTemplate -> V1PodTemplate -> Bool) -> Eq V1PodTemplate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PodTemplate -> V1PodTemplate -> Bool
== :: V1PodTemplate -> V1PodTemplate -> Bool
$c/= :: V1PodTemplate -> V1PodTemplate -> Bool
/= :: V1PodTemplate -> V1PodTemplate -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PodTemplate
instance A.FromJSON V1PodTemplate where
  parseJSON :: Value -> Parser V1PodTemplate
parseJSON = String
-> (Object -> Parser V1PodTemplate)
-> Value
-> Parser V1PodTemplate
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PodTemplate" ((Object -> Parser V1PodTemplate) -> Value -> Parser V1PodTemplate)
-> (Object -> Parser V1PodTemplate)
-> Value
-> Parser V1PodTemplate
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1PodTemplateSpec
-> V1PodTemplate
V1PodTemplate
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1PodTemplateSpec
 -> V1PodTemplate)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta -> Maybe V1PodTemplateSpec -> V1PodTemplate)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta -> Maybe V1PodTemplateSpec -> V1PodTemplate)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta -> Maybe V1PodTemplateSpec -> V1PodTemplate)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta -> Maybe V1PodTemplateSpec -> V1PodTemplate)
-> Parser (Maybe V1ObjectMeta)
-> Parser (Maybe V1PodTemplateSpec -> V1PodTemplate)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (Maybe V1PodTemplateSpec -> V1PodTemplate)
-> Parser (Maybe V1PodTemplateSpec) -> Parser V1PodTemplate
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1PodTemplateSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"template")

-- | ToJSON V1PodTemplate
instance A.ToJSON V1PodTemplate where
  toJSON :: V1PodTemplate -> Value
toJSON V1PodTemplate {Maybe Text
Maybe V1PodTemplateSpec
Maybe V1ObjectMeta
$sel:v1PodTemplateApiVersion:V1PodTemplate :: V1PodTemplate -> Maybe Text
$sel:v1PodTemplateKind:V1PodTemplate :: V1PodTemplate -> Maybe Text
$sel:v1PodTemplateMetadata:V1PodTemplate :: V1PodTemplate -> Maybe V1ObjectMeta
$sel:v1PodTemplateTemplate:V1PodTemplate :: V1PodTemplate -> Maybe V1PodTemplateSpec
v1PodTemplateApiVersion :: Maybe Text
v1PodTemplateKind :: Maybe Text
v1PodTemplateMetadata :: Maybe V1ObjectMeta
v1PodTemplateTemplate :: Maybe V1PodTemplateSpec
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodTemplateApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodTemplateKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1PodTemplateMetadata
      , Key
"template" Key -> Maybe V1PodTemplateSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1PodTemplateSpec
v1PodTemplateTemplate
      ]


-- | Construct a value of type 'V1PodTemplate' (by applying it's required fields, if any)
mkV1PodTemplate
  :: V1PodTemplate
mkV1PodTemplate :: V1PodTemplate
mkV1PodTemplate =
  V1PodTemplate
  { $sel:v1PodTemplateApiVersion:V1PodTemplate :: Maybe Text
v1PodTemplateApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodTemplateKind:V1PodTemplate :: Maybe Text
v1PodTemplateKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodTemplateMetadata:V1PodTemplate :: Maybe V1ObjectMeta
v1PodTemplateMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1PodTemplateTemplate:V1PodTemplate :: Maybe V1PodTemplateSpec
v1PodTemplateTemplate = Maybe V1PodTemplateSpec
forall a. Maybe a
Nothing
  }

-- ** V1PodTemplateList
-- | V1PodTemplateList
-- PodTemplateList is a list of PodTemplates.
data V1PodTemplateList = V1PodTemplateList
  { V1PodTemplateList -> Maybe Text
v1PodTemplateListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1PodTemplateList -> [V1PodTemplate]
v1PodTemplateListItems :: !([V1PodTemplate]) -- ^ /Required/ "items" - List of pod templates
  , V1PodTemplateList -> Maybe Text
v1PodTemplateListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1PodTemplateList -> Maybe V1ListMeta
v1PodTemplateListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1PodTemplateList -> ShowS
[V1PodTemplateList] -> ShowS
V1PodTemplateList -> String
(Int -> V1PodTemplateList -> ShowS)
-> (V1PodTemplateList -> String)
-> ([V1PodTemplateList] -> ShowS)
-> Show V1PodTemplateList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PodTemplateList -> ShowS
showsPrec :: Int -> V1PodTemplateList -> ShowS
$cshow :: V1PodTemplateList -> String
show :: V1PodTemplateList -> String
$cshowList :: [V1PodTemplateList] -> ShowS
showList :: [V1PodTemplateList] -> ShowS
P.Show, V1PodTemplateList -> V1PodTemplateList -> Bool
(V1PodTemplateList -> V1PodTemplateList -> Bool)
-> (V1PodTemplateList -> V1PodTemplateList -> Bool)
-> Eq V1PodTemplateList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PodTemplateList -> V1PodTemplateList -> Bool
== :: V1PodTemplateList -> V1PodTemplateList -> Bool
$c/= :: V1PodTemplateList -> V1PodTemplateList -> Bool
/= :: V1PodTemplateList -> V1PodTemplateList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PodTemplateList
instance A.FromJSON V1PodTemplateList where
  parseJSON :: Value -> Parser V1PodTemplateList
parseJSON = String
-> (Object -> Parser V1PodTemplateList)
-> Value
-> Parser V1PodTemplateList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PodTemplateList" ((Object -> Parser V1PodTemplateList)
 -> Value -> Parser V1PodTemplateList)
-> (Object -> Parser V1PodTemplateList)
-> Value
-> Parser V1PodTemplateList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1PodTemplate]
-> Maybe Text
-> Maybe V1ListMeta
-> V1PodTemplateList
V1PodTemplateList
      (Maybe Text
 -> [V1PodTemplate]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1PodTemplateList)
-> Parser (Maybe Text)
-> Parser
     ([V1PodTemplate]
      -> Maybe Text -> Maybe V1ListMeta -> V1PodTemplateList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1PodTemplate]
   -> Maybe Text -> Maybe V1ListMeta -> V1PodTemplateList)
-> Parser [V1PodTemplate]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1PodTemplateList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1PodTemplate]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1PodTemplateList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1PodTemplateList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1PodTemplateList)
-> Parser (Maybe V1ListMeta) -> Parser V1PodTemplateList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1PodTemplateList
instance A.ToJSON V1PodTemplateList where
  toJSON :: V1PodTemplateList -> Value
toJSON V1PodTemplateList {[V1PodTemplate]
Maybe Text
Maybe V1ListMeta
$sel:v1PodTemplateListApiVersion:V1PodTemplateList :: V1PodTemplateList -> Maybe Text
$sel:v1PodTemplateListItems:V1PodTemplateList :: V1PodTemplateList -> [V1PodTemplate]
$sel:v1PodTemplateListKind:V1PodTemplateList :: V1PodTemplateList -> Maybe Text
$sel:v1PodTemplateListMetadata:V1PodTemplateList :: V1PodTemplateList -> Maybe V1ListMeta
v1PodTemplateListApiVersion :: Maybe Text
v1PodTemplateListItems :: [V1PodTemplate]
v1PodTemplateListKind :: Maybe Text
v1PodTemplateListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodTemplateListApiVersion
      , Key
"items" Key -> [V1PodTemplate] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1PodTemplate]
v1PodTemplateListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PodTemplateListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1PodTemplateListMetadata
      ]


-- | Construct a value of type 'V1PodTemplateList' (by applying it's required fields, if any)
mkV1PodTemplateList
  :: [V1PodTemplate] -- ^ 'v1PodTemplateListItems': List of pod templates
  -> V1PodTemplateList
mkV1PodTemplateList :: [V1PodTemplate] -> V1PodTemplateList
mkV1PodTemplateList [V1PodTemplate]
v1PodTemplateListItems =
  V1PodTemplateList
  { $sel:v1PodTemplateListApiVersion:V1PodTemplateList :: Maybe Text
v1PodTemplateListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1PodTemplate]
$sel:v1PodTemplateListItems:V1PodTemplateList :: [V1PodTemplate]
v1PodTemplateListItems :: [V1PodTemplate]
v1PodTemplateListItems
  , $sel:v1PodTemplateListKind:V1PodTemplateList :: Maybe Text
v1PodTemplateListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PodTemplateListMetadata:V1PodTemplateList :: Maybe V1ListMeta
v1PodTemplateListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1PodTemplateSpec
-- | V1PodTemplateSpec
-- PodTemplateSpec describes the data a pod should have when created from a template
data V1PodTemplateSpec = V1PodTemplateSpec
  { V1PodTemplateSpec -> Maybe V1ObjectMeta
v1PodTemplateSpecMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1PodTemplateSpec -> Maybe V1PodSpec
v1PodTemplateSpecSpec :: !(Maybe V1PodSpec) -- ^ "spec"
  } deriving (Int -> V1PodTemplateSpec -> ShowS
[V1PodTemplateSpec] -> ShowS
V1PodTemplateSpec -> String
(Int -> V1PodTemplateSpec -> ShowS)
-> (V1PodTemplateSpec -> String)
-> ([V1PodTemplateSpec] -> ShowS)
-> Show V1PodTemplateSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PodTemplateSpec -> ShowS
showsPrec :: Int -> V1PodTemplateSpec -> ShowS
$cshow :: V1PodTemplateSpec -> String
show :: V1PodTemplateSpec -> String
$cshowList :: [V1PodTemplateSpec] -> ShowS
showList :: [V1PodTemplateSpec] -> ShowS
P.Show, V1PodTemplateSpec -> V1PodTemplateSpec -> Bool
(V1PodTemplateSpec -> V1PodTemplateSpec -> Bool)
-> (V1PodTemplateSpec -> V1PodTemplateSpec -> Bool)
-> Eq V1PodTemplateSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PodTemplateSpec -> V1PodTemplateSpec -> Bool
== :: V1PodTemplateSpec -> V1PodTemplateSpec -> Bool
$c/= :: V1PodTemplateSpec -> V1PodTemplateSpec -> Bool
/= :: V1PodTemplateSpec -> V1PodTemplateSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PodTemplateSpec
instance A.FromJSON V1PodTemplateSpec where
  parseJSON :: Value -> Parser V1PodTemplateSpec
parseJSON = String
-> (Object -> Parser V1PodTemplateSpec)
-> Value
-> Parser V1PodTemplateSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PodTemplateSpec" ((Object -> Parser V1PodTemplateSpec)
 -> Value -> Parser V1PodTemplateSpec)
-> (Object -> Parser V1PodTemplateSpec)
-> Value
-> Parser V1PodTemplateSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1ObjectMeta -> Maybe V1PodSpec -> V1PodTemplateSpec
V1PodTemplateSpec
      (Maybe V1ObjectMeta -> Maybe V1PodSpec -> V1PodTemplateSpec)
-> Parser (Maybe V1ObjectMeta)
-> Parser (Maybe V1PodSpec -> V1PodTemplateSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (Maybe V1PodSpec -> V1PodTemplateSpec)
-> Parser (Maybe V1PodSpec) -> Parser V1PodTemplateSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1PodSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")

-- | ToJSON V1PodTemplateSpec
instance A.ToJSON V1PodTemplateSpec where
  toJSON :: V1PodTemplateSpec -> Value
toJSON V1PodTemplateSpec {Maybe V1PodSpec
Maybe V1ObjectMeta
$sel:v1PodTemplateSpecMetadata:V1PodTemplateSpec :: V1PodTemplateSpec -> Maybe V1ObjectMeta
$sel:v1PodTemplateSpecSpec:V1PodTemplateSpec :: V1PodTemplateSpec -> Maybe V1PodSpec
v1PodTemplateSpecMetadata :: Maybe V1ObjectMeta
v1PodTemplateSpecSpec :: Maybe V1PodSpec
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1PodTemplateSpecMetadata
      , Key
"spec" Key -> Maybe V1PodSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1PodSpec
v1PodTemplateSpecSpec
      ]


-- | Construct a value of type 'V1PodTemplateSpec' (by applying it's required fields, if any)
mkV1PodTemplateSpec
  :: V1PodTemplateSpec
mkV1PodTemplateSpec :: V1PodTemplateSpec
mkV1PodTemplateSpec =
  V1PodTemplateSpec
  { $sel:v1PodTemplateSpecMetadata:V1PodTemplateSpec :: Maybe V1ObjectMeta
v1PodTemplateSpecMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1PodTemplateSpecSpec:V1PodTemplateSpec :: Maybe V1PodSpec
v1PodTemplateSpecSpec = Maybe V1PodSpec
forall a. Maybe a
Nothing
  }

-- ** V1PolicyRule
-- | V1PolicyRule
-- PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.
data V1PolicyRule = V1PolicyRule
  { V1PolicyRule -> Maybe [Text]
v1PolicyRuleApiGroups :: !(Maybe [Text]) -- ^ "apiGroups" - APIGroups is the name of the APIGroup that contains the resources.  If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. \&quot;\&quot; represents the core API group and \&quot;*\&quot; represents all API groups.
  , V1PolicyRule -> Maybe [Text]
v1PolicyRuleNonResourceUrls :: !(Maybe [Text]) -- ^ "nonResourceURLs" - NonResourceURLs is a set of partial urls that a user should have access to.  *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \&quot;pods\&quot; or \&quot;secrets\&quot;) or non-resource URL paths (such as \&quot;/api\&quot;),  but not both.
  , V1PolicyRule -> Maybe [Text]
v1PolicyRuleResourceNames :: !(Maybe [Text]) -- ^ "resourceNames" - ResourceNames is an optional white list of names that the rule applies to.  An empty set means that everything is allowed.
  , V1PolicyRule -> Maybe [Text]
v1PolicyRuleResources :: !(Maybe [Text]) -- ^ "resources" - Resources is a list of resources this rule applies to. &#39;*&#39; represents all resources.
  , V1PolicyRule -> [Text]
v1PolicyRuleVerbs :: !([Text]) -- ^ /Required/ "verbs" - Verbs is a list of Verbs that apply to ALL the ResourceKinds contained in this rule. &#39;*&#39; represents all verbs.
  } deriving (Int -> V1PolicyRule -> ShowS
[V1PolicyRule] -> ShowS
V1PolicyRule -> String
(Int -> V1PolicyRule -> ShowS)
-> (V1PolicyRule -> String)
-> ([V1PolicyRule] -> ShowS)
-> Show V1PolicyRule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PolicyRule -> ShowS
showsPrec :: Int -> V1PolicyRule -> ShowS
$cshow :: V1PolicyRule -> String
show :: V1PolicyRule -> String
$cshowList :: [V1PolicyRule] -> ShowS
showList :: [V1PolicyRule] -> ShowS
P.Show, V1PolicyRule -> V1PolicyRule -> Bool
(V1PolicyRule -> V1PolicyRule -> Bool)
-> (V1PolicyRule -> V1PolicyRule -> Bool) -> Eq V1PolicyRule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PolicyRule -> V1PolicyRule -> Bool
== :: V1PolicyRule -> V1PolicyRule -> Bool
$c/= :: V1PolicyRule -> V1PolicyRule -> Bool
/= :: V1PolicyRule -> V1PolicyRule -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PolicyRule
instance A.FromJSON V1PolicyRule where
  parseJSON :: Value -> Parser V1PolicyRule
parseJSON = String
-> (Object -> Parser V1PolicyRule) -> Value -> Parser V1PolicyRule
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PolicyRule" ((Object -> Parser V1PolicyRule) -> Value -> Parser V1PolicyRule)
-> (Object -> Parser V1PolicyRule) -> Value -> Parser V1PolicyRule
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> [Text]
-> V1PolicyRule
V1PolicyRule
      (Maybe [Text]
 -> Maybe [Text]
 -> Maybe [Text]
 -> Maybe [Text]
 -> [Text]
 -> V1PolicyRule)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [Text]
      -> Maybe [Text] -> Maybe [Text] -> [Text] -> V1PolicyRule)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiGroups")
      Parser
  (Maybe [Text]
   -> Maybe [Text] -> Maybe [Text] -> [Text] -> V1PolicyRule)
-> Parser (Maybe [Text])
-> Parser (Maybe [Text] -> Maybe [Text] -> [Text] -> V1PolicyRule)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nonResourceURLs")
      Parser (Maybe [Text] -> Maybe [Text] -> [Text] -> V1PolicyRule)
-> Parser (Maybe [Text])
-> Parser (Maybe [Text] -> [Text] -> V1PolicyRule)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resourceNames")
      Parser (Maybe [Text] -> [Text] -> V1PolicyRule)
-> Parser (Maybe [Text]) -> Parser ([Text] -> V1PolicyRule)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resources")
      Parser ([Text] -> V1PolicyRule)
-> Parser [Text] -> Parser V1PolicyRule
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"verbs")

-- | ToJSON V1PolicyRule
instance A.ToJSON V1PolicyRule where
  toJSON :: V1PolicyRule -> Value
toJSON V1PolicyRule {[Text]
Maybe [Text]
$sel:v1PolicyRuleApiGroups:V1PolicyRule :: V1PolicyRule -> Maybe [Text]
$sel:v1PolicyRuleNonResourceUrls:V1PolicyRule :: V1PolicyRule -> Maybe [Text]
$sel:v1PolicyRuleResourceNames:V1PolicyRule :: V1PolicyRule -> Maybe [Text]
$sel:v1PolicyRuleResources:V1PolicyRule :: V1PolicyRule -> Maybe [Text]
$sel:v1PolicyRuleVerbs:V1PolicyRule :: V1PolicyRule -> [Text]
v1PolicyRuleApiGroups :: Maybe [Text]
v1PolicyRuleNonResourceUrls :: Maybe [Text]
v1PolicyRuleResourceNames :: Maybe [Text]
v1PolicyRuleResources :: Maybe [Text]
v1PolicyRuleVerbs :: [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiGroups" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1PolicyRuleApiGroups
      , Key
"nonResourceURLs" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1PolicyRuleNonResourceUrls
      , Key
"resourceNames" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1PolicyRuleResourceNames
      , Key
"resources" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1PolicyRuleResources
      , Key
"verbs" Key -> [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [Text]
v1PolicyRuleVerbs
      ]


-- | Construct a value of type 'V1PolicyRule' (by applying it's required fields, if any)
mkV1PolicyRule
  :: [Text] -- ^ 'v1PolicyRuleVerbs': Verbs is a list of Verbs that apply to ALL the ResourceKinds contained in this rule. '*' represents all verbs.
  -> V1PolicyRule
mkV1PolicyRule :: [Text] -> V1PolicyRule
mkV1PolicyRule [Text]
v1PolicyRuleVerbs =
  V1PolicyRule
  { $sel:v1PolicyRuleApiGroups:V1PolicyRule :: Maybe [Text]
v1PolicyRuleApiGroups = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1PolicyRuleNonResourceUrls:V1PolicyRule :: Maybe [Text]
v1PolicyRuleNonResourceUrls = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1PolicyRuleResourceNames:V1PolicyRule :: Maybe [Text]
v1PolicyRuleResourceNames = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1PolicyRuleResources:V1PolicyRule :: Maybe [Text]
v1PolicyRuleResources = Maybe [Text]
forall a. Maybe a
Nothing
  , [Text]
$sel:v1PolicyRuleVerbs:V1PolicyRule :: [Text]
v1PolicyRuleVerbs :: [Text]
v1PolicyRuleVerbs
  }

-- ** V1PolicyRulesWithSubjects
-- | V1PolicyRulesWithSubjects
-- PolicyRulesWithSubjects prescribes a test that applies to a request to an apiserver. The test considers the subject making the request, the verb being requested, and the resource to be acted upon. This PolicyRulesWithSubjects matches a request if and only if both (a) at least one member of subjects matches the request and (b) at least one member of resourceRules or nonResourceRules matches the request.
data V1PolicyRulesWithSubjects = V1PolicyRulesWithSubjects
  { V1PolicyRulesWithSubjects -> Maybe [V1NonResourcePolicyRule]
v1PolicyRulesWithSubjectsNonResourceRules :: !(Maybe [V1NonResourcePolicyRule]) -- ^ "nonResourceRules" - &#x60;nonResourceRules&#x60; is a list of NonResourcePolicyRules that identify matching requests according to their verb and the target non-resource URL.
  , V1PolicyRulesWithSubjects -> Maybe [V1ResourcePolicyRule]
v1PolicyRulesWithSubjectsResourceRules :: !(Maybe [V1ResourcePolicyRule]) -- ^ "resourceRules" - &#x60;resourceRules&#x60; is a slice of ResourcePolicyRules that identify matching requests according to their verb and the target resource. At least one of &#x60;resourceRules&#x60; and &#x60;nonResourceRules&#x60; has to be non-empty.
  , V1PolicyRulesWithSubjects -> [FlowcontrolV1Subject]
v1PolicyRulesWithSubjectsSubjects :: !([FlowcontrolV1Subject]) -- ^ /Required/ "subjects" - subjects is the list of normal user, serviceaccount, or group that this rule cares about. There must be at least one member in this slice. A slice that includes both the system:authenticated and system:unauthenticated user groups matches every request. Required.
  } deriving (Int -> V1PolicyRulesWithSubjects -> ShowS
[V1PolicyRulesWithSubjects] -> ShowS
V1PolicyRulesWithSubjects -> String
(Int -> V1PolicyRulesWithSubjects -> ShowS)
-> (V1PolicyRulesWithSubjects -> String)
-> ([V1PolicyRulesWithSubjects] -> ShowS)
-> Show V1PolicyRulesWithSubjects
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PolicyRulesWithSubjects -> ShowS
showsPrec :: Int -> V1PolicyRulesWithSubjects -> ShowS
$cshow :: V1PolicyRulesWithSubjects -> String
show :: V1PolicyRulesWithSubjects -> String
$cshowList :: [V1PolicyRulesWithSubjects] -> ShowS
showList :: [V1PolicyRulesWithSubjects] -> ShowS
P.Show, V1PolicyRulesWithSubjects -> V1PolicyRulesWithSubjects -> Bool
(V1PolicyRulesWithSubjects -> V1PolicyRulesWithSubjects -> Bool)
-> (V1PolicyRulesWithSubjects -> V1PolicyRulesWithSubjects -> Bool)
-> Eq V1PolicyRulesWithSubjects
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PolicyRulesWithSubjects -> V1PolicyRulesWithSubjects -> Bool
== :: V1PolicyRulesWithSubjects -> V1PolicyRulesWithSubjects -> Bool
$c/= :: V1PolicyRulesWithSubjects -> V1PolicyRulesWithSubjects -> Bool
/= :: V1PolicyRulesWithSubjects -> V1PolicyRulesWithSubjects -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PolicyRulesWithSubjects
instance A.FromJSON V1PolicyRulesWithSubjects where
  parseJSON :: Value -> Parser V1PolicyRulesWithSubjects
parseJSON = String
-> (Object -> Parser V1PolicyRulesWithSubjects)
-> Value
-> Parser V1PolicyRulesWithSubjects
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PolicyRulesWithSubjects" ((Object -> Parser V1PolicyRulesWithSubjects)
 -> Value -> Parser V1PolicyRulesWithSubjects)
-> (Object -> Parser V1PolicyRulesWithSubjects)
-> Value
-> Parser V1PolicyRulesWithSubjects
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1NonResourcePolicyRule]
-> Maybe [V1ResourcePolicyRule]
-> [FlowcontrolV1Subject]
-> V1PolicyRulesWithSubjects
V1PolicyRulesWithSubjects
      (Maybe [V1NonResourcePolicyRule]
 -> Maybe [V1ResourcePolicyRule]
 -> [FlowcontrolV1Subject]
 -> V1PolicyRulesWithSubjects)
-> Parser (Maybe [V1NonResourcePolicyRule])
-> Parser
     (Maybe [V1ResourcePolicyRule]
      -> [FlowcontrolV1Subject] -> V1PolicyRulesWithSubjects)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1NonResourcePolicyRule])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nonResourceRules")
      Parser
  (Maybe [V1ResourcePolicyRule]
   -> [FlowcontrolV1Subject] -> V1PolicyRulesWithSubjects)
-> Parser (Maybe [V1ResourcePolicyRule])
-> Parser ([FlowcontrolV1Subject] -> V1PolicyRulesWithSubjects)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1ResourcePolicyRule])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resourceRules")
      Parser ([FlowcontrolV1Subject] -> V1PolicyRulesWithSubjects)
-> Parser [FlowcontrolV1Subject]
-> Parser V1PolicyRulesWithSubjects
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [FlowcontrolV1Subject]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"subjects")

-- | ToJSON V1PolicyRulesWithSubjects
instance A.ToJSON V1PolicyRulesWithSubjects where
  toJSON :: V1PolicyRulesWithSubjects -> Value
toJSON V1PolicyRulesWithSubjects {[FlowcontrolV1Subject]
Maybe [V1ResourcePolicyRule]
Maybe [V1NonResourcePolicyRule]
$sel:v1PolicyRulesWithSubjectsNonResourceRules:V1PolicyRulesWithSubjects :: V1PolicyRulesWithSubjects -> Maybe [V1NonResourcePolicyRule]
$sel:v1PolicyRulesWithSubjectsResourceRules:V1PolicyRulesWithSubjects :: V1PolicyRulesWithSubjects -> Maybe [V1ResourcePolicyRule]
$sel:v1PolicyRulesWithSubjectsSubjects:V1PolicyRulesWithSubjects :: V1PolicyRulesWithSubjects -> [FlowcontrolV1Subject]
v1PolicyRulesWithSubjectsNonResourceRules :: Maybe [V1NonResourcePolicyRule]
v1PolicyRulesWithSubjectsResourceRules :: Maybe [V1ResourcePolicyRule]
v1PolicyRulesWithSubjectsSubjects :: [FlowcontrolV1Subject]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"nonResourceRules" Key -> Maybe [V1NonResourcePolicyRule] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1NonResourcePolicyRule]
v1PolicyRulesWithSubjectsNonResourceRules
      , Key
"resourceRules" Key -> Maybe [V1ResourcePolicyRule] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1ResourcePolicyRule]
v1PolicyRulesWithSubjectsResourceRules
      , Key
"subjects" Key -> [FlowcontrolV1Subject] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [FlowcontrolV1Subject]
v1PolicyRulesWithSubjectsSubjects
      ]


-- | Construct a value of type 'V1PolicyRulesWithSubjects' (by applying it's required fields, if any)
mkV1PolicyRulesWithSubjects
  :: [FlowcontrolV1Subject] -- ^ 'v1PolicyRulesWithSubjectsSubjects': subjects is the list of normal user, serviceaccount, or group that this rule cares about. There must be at least one member in this slice. A slice that includes both the system:authenticated and system:unauthenticated user groups matches every request. Required.
  -> V1PolicyRulesWithSubjects
mkV1PolicyRulesWithSubjects :: [FlowcontrolV1Subject] -> V1PolicyRulesWithSubjects
mkV1PolicyRulesWithSubjects [FlowcontrolV1Subject]
v1PolicyRulesWithSubjectsSubjects =
  V1PolicyRulesWithSubjects
  { $sel:v1PolicyRulesWithSubjectsNonResourceRules:V1PolicyRulesWithSubjects :: Maybe [V1NonResourcePolicyRule]
v1PolicyRulesWithSubjectsNonResourceRules = Maybe [V1NonResourcePolicyRule]
forall a. Maybe a
Nothing
  , $sel:v1PolicyRulesWithSubjectsResourceRules:V1PolicyRulesWithSubjects :: Maybe [V1ResourcePolicyRule]
v1PolicyRulesWithSubjectsResourceRules = Maybe [V1ResourcePolicyRule]
forall a. Maybe a
Nothing
  , [FlowcontrolV1Subject]
$sel:v1PolicyRulesWithSubjectsSubjects:V1PolicyRulesWithSubjects :: [FlowcontrolV1Subject]
v1PolicyRulesWithSubjectsSubjects :: [FlowcontrolV1Subject]
v1PolicyRulesWithSubjectsSubjects
  }

-- ** V1PortStatus
-- | V1PortStatus
-- PortStatus represents the error condition of a service port
data V1PortStatus = V1PortStatus
  { V1PortStatus -> Maybe Text
v1PortStatusError :: !(Maybe Text) -- ^ "error" - Error is to record the problem with the service port The format of the error shall comply with the following rules: - built-in error values shall be specified in this file and those shall use   CamelCase names - cloud provider specific error values must have names that comply with the   format foo.example.com/CamelCase.
  , V1PortStatus -> Int
v1PortStatusPort :: !(Int) -- ^ /Required/ "port" - Port is the port number of the service port of which status is recorded here
  , V1PortStatus -> Text
v1PortStatusProtocol :: !(Text) -- ^ /Required/ "protocol" - Protocol is the protocol of the service port of which status is recorded here The supported values are: \&quot;TCP\&quot;, \&quot;UDP\&quot;, \&quot;SCTP\&quot;
  } deriving (Int -> V1PortStatus -> ShowS
[V1PortStatus] -> ShowS
V1PortStatus -> String
(Int -> V1PortStatus -> ShowS)
-> (V1PortStatus -> String)
-> ([V1PortStatus] -> ShowS)
-> Show V1PortStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PortStatus -> ShowS
showsPrec :: Int -> V1PortStatus -> ShowS
$cshow :: V1PortStatus -> String
show :: V1PortStatus -> String
$cshowList :: [V1PortStatus] -> ShowS
showList :: [V1PortStatus] -> ShowS
P.Show, V1PortStatus -> V1PortStatus -> Bool
(V1PortStatus -> V1PortStatus -> Bool)
-> (V1PortStatus -> V1PortStatus -> Bool) -> Eq V1PortStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PortStatus -> V1PortStatus -> Bool
== :: V1PortStatus -> V1PortStatus -> Bool
$c/= :: V1PortStatus -> V1PortStatus -> Bool
/= :: V1PortStatus -> V1PortStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PortStatus
instance A.FromJSON V1PortStatus where
  parseJSON :: Value -> Parser V1PortStatus
parseJSON = String
-> (Object -> Parser V1PortStatus) -> Value -> Parser V1PortStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PortStatus" ((Object -> Parser V1PortStatus) -> Value -> Parser V1PortStatus)
-> (Object -> Parser V1PortStatus) -> Value -> Parser V1PortStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Int -> Text -> V1PortStatus
V1PortStatus
      (Maybe Text -> Int -> Text -> V1PortStatus)
-> Parser (Maybe Text) -> Parser (Int -> Text -> V1PortStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"error")
      Parser (Int -> Text -> V1PortStatus)
-> Parser Int -> Parser (Text -> V1PortStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"port")
      Parser (Text -> V1PortStatus) -> Parser Text -> Parser V1PortStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"protocol")

-- | ToJSON V1PortStatus
instance A.ToJSON V1PortStatus where
  toJSON :: V1PortStatus -> Value
toJSON V1PortStatus {Int
Maybe Text
Text
$sel:v1PortStatusError:V1PortStatus :: V1PortStatus -> Maybe Text
$sel:v1PortStatusPort:V1PortStatus :: V1PortStatus -> Int
$sel:v1PortStatusProtocol:V1PortStatus :: V1PortStatus -> Text
v1PortStatusError :: Maybe Text
v1PortStatusPort :: Int
v1PortStatusProtocol :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"error" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PortStatusError
      , Key
"port" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v1PortStatusPort
      , Key
"protocol" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1PortStatusProtocol
      ]


-- | Construct a value of type 'V1PortStatus' (by applying it's required fields, if any)
mkV1PortStatus
  :: Int -- ^ 'v1PortStatusPort': Port is the port number of the service port of which status is recorded here
  -> Text -- ^ 'v1PortStatusProtocol': Protocol is the protocol of the service port of which status is recorded here The supported values are: \"TCP\", \"UDP\", \"SCTP\"
  -> V1PortStatus
mkV1PortStatus :: Int -> Text -> V1PortStatus
mkV1PortStatus Int
v1PortStatusPort Text
v1PortStatusProtocol =
  V1PortStatus
  { $sel:v1PortStatusError:V1PortStatus :: Maybe Text
v1PortStatusError = Maybe Text
forall a. Maybe a
Nothing
  , Int
$sel:v1PortStatusPort:V1PortStatus :: Int
v1PortStatusPort :: Int
v1PortStatusPort
  , Text
$sel:v1PortStatusProtocol:V1PortStatus :: Text
v1PortStatusProtocol :: Text
v1PortStatusProtocol
  }

-- ** V1PortworxVolumeSource
-- | V1PortworxVolumeSource
-- PortworxVolumeSource represents a Portworx volume resource.
data V1PortworxVolumeSource = V1PortworxVolumeSource
  { V1PortworxVolumeSource -> Maybe Text
v1PortworxVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - fSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. \&quot;ext4\&quot;, \&quot;xfs\&quot;. Implicitly inferred to be \&quot;ext4\&quot; if unspecified.
  , V1PortworxVolumeSource -> Maybe Bool
v1PortworxVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
  , V1PortworxVolumeSource -> Text
v1PortworxVolumeSourceVolumeId :: !(Text) -- ^ /Required/ "volumeID" - volumeID uniquely identifies a Portworx volume
  } deriving (Int -> V1PortworxVolumeSource -> ShowS
[V1PortworxVolumeSource] -> ShowS
V1PortworxVolumeSource -> String
(Int -> V1PortworxVolumeSource -> ShowS)
-> (V1PortworxVolumeSource -> String)
-> ([V1PortworxVolumeSource] -> ShowS)
-> Show V1PortworxVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PortworxVolumeSource -> ShowS
showsPrec :: Int -> V1PortworxVolumeSource -> ShowS
$cshow :: V1PortworxVolumeSource -> String
show :: V1PortworxVolumeSource -> String
$cshowList :: [V1PortworxVolumeSource] -> ShowS
showList :: [V1PortworxVolumeSource] -> ShowS
P.Show, V1PortworxVolumeSource -> V1PortworxVolumeSource -> Bool
(V1PortworxVolumeSource -> V1PortworxVolumeSource -> Bool)
-> (V1PortworxVolumeSource -> V1PortworxVolumeSource -> Bool)
-> Eq V1PortworxVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PortworxVolumeSource -> V1PortworxVolumeSource -> Bool
== :: V1PortworxVolumeSource -> V1PortworxVolumeSource -> Bool
$c/= :: V1PortworxVolumeSource -> V1PortworxVolumeSource -> Bool
/= :: V1PortworxVolumeSource -> V1PortworxVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PortworxVolumeSource
instance A.FromJSON V1PortworxVolumeSource where
  parseJSON :: Value -> Parser V1PortworxVolumeSource
parseJSON = String
-> (Object -> Parser V1PortworxVolumeSource)
-> Value
-> Parser V1PortworxVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PortworxVolumeSource" ((Object -> Parser V1PortworxVolumeSource)
 -> Value -> Parser V1PortworxVolumeSource)
-> (Object -> Parser V1PortworxVolumeSource)
-> Value
-> Parser V1PortworxVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Maybe Bool -> Text -> V1PortworxVolumeSource
V1PortworxVolumeSource
      (Maybe Text -> Maybe Bool -> Text -> V1PortworxVolumeSource)
-> Parser (Maybe Text)
-> Parser (Maybe Bool -> Text -> V1PortworxVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fsType")
      Parser (Maybe Bool -> Text -> V1PortworxVolumeSource)
-> Parser (Maybe Bool) -> Parser (Text -> V1PortworxVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readOnly")
      Parser (Text -> V1PortworxVolumeSource)
-> Parser Text -> Parser V1PortworxVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"volumeID")

-- | ToJSON V1PortworxVolumeSource
instance A.ToJSON V1PortworxVolumeSource where
  toJSON :: V1PortworxVolumeSource -> Value
toJSON V1PortworxVolumeSource {Maybe Bool
Maybe Text
Text
$sel:v1PortworxVolumeSourceFsType:V1PortworxVolumeSource :: V1PortworxVolumeSource -> Maybe Text
$sel:v1PortworxVolumeSourceReadOnly:V1PortworxVolumeSource :: V1PortworxVolumeSource -> Maybe Bool
$sel:v1PortworxVolumeSourceVolumeId:V1PortworxVolumeSource :: V1PortworxVolumeSource -> Text
v1PortworxVolumeSourceFsType :: Maybe Text
v1PortworxVolumeSourceReadOnly :: Maybe Bool
v1PortworxVolumeSourceVolumeId :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"fsType" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PortworxVolumeSourceFsType
      , Key
"readOnly" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1PortworxVolumeSourceReadOnly
      , Key
"volumeID" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1PortworxVolumeSourceVolumeId
      ]


-- | Construct a value of type 'V1PortworxVolumeSource' (by applying it's required fields, if any)
mkV1PortworxVolumeSource
  :: Text -- ^ 'v1PortworxVolumeSourceVolumeId': volumeID uniquely identifies a Portworx volume
  -> V1PortworxVolumeSource
mkV1PortworxVolumeSource :: Text -> V1PortworxVolumeSource
mkV1PortworxVolumeSource Text
v1PortworxVolumeSourceVolumeId =
  V1PortworxVolumeSource
  { $sel:v1PortworxVolumeSourceFsType:V1PortworxVolumeSource :: Maybe Text
v1PortworxVolumeSourceFsType = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PortworxVolumeSourceReadOnly:V1PortworxVolumeSource :: Maybe Bool
v1PortworxVolumeSourceReadOnly = Maybe Bool
forall a. Maybe a
Nothing
  , Text
$sel:v1PortworxVolumeSourceVolumeId:V1PortworxVolumeSource :: Text
v1PortworxVolumeSourceVolumeId :: Text
v1PortworxVolumeSourceVolumeId
  }

-- ** V1Preconditions
-- | V1Preconditions
-- Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.
data V1Preconditions = V1Preconditions
  { V1Preconditions -> Maybe Text
v1PreconditionsResourceVersion :: !(Maybe Text) -- ^ "resourceVersion" - Specifies the target ResourceVersion
  , V1Preconditions -> Maybe Text
v1PreconditionsUid :: !(Maybe Text) -- ^ "uid" - Specifies the target UID.
  } deriving (Int -> V1Preconditions -> ShowS
[V1Preconditions] -> ShowS
V1Preconditions -> String
(Int -> V1Preconditions -> ShowS)
-> (V1Preconditions -> String)
-> ([V1Preconditions] -> ShowS)
-> Show V1Preconditions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1Preconditions -> ShowS
showsPrec :: Int -> V1Preconditions -> ShowS
$cshow :: V1Preconditions -> String
show :: V1Preconditions -> String
$cshowList :: [V1Preconditions] -> ShowS
showList :: [V1Preconditions] -> ShowS
P.Show, V1Preconditions -> V1Preconditions -> Bool
(V1Preconditions -> V1Preconditions -> Bool)
-> (V1Preconditions -> V1Preconditions -> Bool)
-> Eq V1Preconditions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1Preconditions -> V1Preconditions -> Bool
== :: V1Preconditions -> V1Preconditions -> Bool
$c/= :: V1Preconditions -> V1Preconditions -> Bool
/= :: V1Preconditions -> V1Preconditions -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1Preconditions
instance A.FromJSON V1Preconditions where
  parseJSON :: Value -> Parser V1Preconditions
parseJSON = String
-> (Object -> Parser V1Preconditions)
-> Value
-> Parser V1Preconditions
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1Preconditions" ((Object -> Parser V1Preconditions)
 -> Value -> Parser V1Preconditions)
-> (Object -> Parser V1Preconditions)
-> Value
-> Parser V1Preconditions
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Maybe Text -> V1Preconditions
V1Preconditions
      (Maybe Text -> Maybe Text -> V1Preconditions)
-> Parser (Maybe Text) -> Parser (Maybe Text -> V1Preconditions)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resourceVersion")
      Parser (Maybe Text -> V1Preconditions)
-> Parser (Maybe Text) -> Parser V1Preconditions
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"uid")

-- | ToJSON V1Preconditions
instance A.ToJSON V1Preconditions where
  toJSON :: V1Preconditions -> Value
toJSON V1Preconditions {Maybe Text
$sel:v1PreconditionsResourceVersion:V1Preconditions :: V1Preconditions -> Maybe Text
$sel:v1PreconditionsUid:V1Preconditions :: V1Preconditions -> Maybe Text
v1PreconditionsResourceVersion :: Maybe Text
v1PreconditionsUid :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"resourceVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PreconditionsResourceVersion
      , Key
"uid" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PreconditionsUid
      ]


-- | Construct a value of type 'V1Preconditions' (by applying it's required fields, if any)
mkV1Preconditions
  :: V1Preconditions
mkV1Preconditions :: V1Preconditions
mkV1Preconditions =
  V1Preconditions
  { $sel:v1PreconditionsResourceVersion:V1Preconditions :: Maybe Text
v1PreconditionsResourceVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PreconditionsUid:V1Preconditions :: Maybe Text
v1PreconditionsUid = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1PreferredSchedulingTerm
-- | V1PreferredSchedulingTerm
-- An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).
data V1PreferredSchedulingTerm = V1PreferredSchedulingTerm
  { V1PreferredSchedulingTerm -> V1NodeSelectorTerm
v1PreferredSchedulingTermPreference :: !(V1NodeSelectorTerm) -- ^ /Required/ "preference"
  , V1PreferredSchedulingTerm -> Int
v1PreferredSchedulingTermWeight :: !(Int) -- ^ /Required/ "weight" - Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.
  } deriving (Int -> V1PreferredSchedulingTerm -> ShowS
[V1PreferredSchedulingTerm] -> ShowS
V1PreferredSchedulingTerm -> String
(Int -> V1PreferredSchedulingTerm -> ShowS)
-> (V1PreferredSchedulingTerm -> String)
-> ([V1PreferredSchedulingTerm] -> ShowS)
-> Show V1PreferredSchedulingTerm
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PreferredSchedulingTerm -> ShowS
showsPrec :: Int -> V1PreferredSchedulingTerm -> ShowS
$cshow :: V1PreferredSchedulingTerm -> String
show :: V1PreferredSchedulingTerm -> String
$cshowList :: [V1PreferredSchedulingTerm] -> ShowS
showList :: [V1PreferredSchedulingTerm] -> ShowS
P.Show, V1PreferredSchedulingTerm -> V1PreferredSchedulingTerm -> Bool
(V1PreferredSchedulingTerm -> V1PreferredSchedulingTerm -> Bool)
-> (V1PreferredSchedulingTerm -> V1PreferredSchedulingTerm -> Bool)
-> Eq V1PreferredSchedulingTerm
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PreferredSchedulingTerm -> V1PreferredSchedulingTerm -> Bool
== :: V1PreferredSchedulingTerm -> V1PreferredSchedulingTerm -> Bool
$c/= :: V1PreferredSchedulingTerm -> V1PreferredSchedulingTerm -> Bool
/= :: V1PreferredSchedulingTerm -> V1PreferredSchedulingTerm -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PreferredSchedulingTerm
instance A.FromJSON V1PreferredSchedulingTerm where
  parseJSON :: Value -> Parser V1PreferredSchedulingTerm
parseJSON = String
-> (Object -> Parser V1PreferredSchedulingTerm)
-> Value
-> Parser V1PreferredSchedulingTerm
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PreferredSchedulingTerm" ((Object -> Parser V1PreferredSchedulingTerm)
 -> Value -> Parser V1PreferredSchedulingTerm)
-> (Object -> Parser V1PreferredSchedulingTerm)
-> Value
-> Parser V1PreferredSchedulingTerm
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    V1NodeSelectorTerm -> Int -> V1PreferredSchedulingTerm
V1PreferredSchedulingTerm
      (V1NodeSelectorTerm -> Int -> V1PreferredSchedulingTerm)
-> Parser V1NodeSelectorTerm
-> Parser (Int -> V1PreferredSchedulingTerm)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser V1NodeSelectorTerm
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"preference")
      Parser (Int -> V1PreferredSchedulingTerm)
-> Parser Int -> Parser V1PreferredSchedulingTerm
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"weight")

-- | ToJSON V1PreferredSchedulingTerm
instance A.ToJSON V1PreferredSchedulingTerm where
  toJSON :: V1PreferredSchedulingTerm -> Value
toJSON V1PreferredSchedulingTerm {Int
V1NodeSelectorTerm
$sel:v1PreferredSchedulingTermPreference:V1PreferredSchedulingTerm :: V1PreferredSchedulingTerm -> V1NodeSelectorTerm
$sel:v1PreferredSchedulingTermWeight:V1PreferredSchedulingTerm :: V1PreferredSchedulingTerm -> Int
v1PreferredSchedulingTermPreference :: V1NodeSelectorTerm
v1PreferredSchedulingTermWeight :: Int
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"preference" Key -> V1NodeSelectorTerm -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1NodeSelectorTerm
v1PreferredSchedulingTermPreference
      , Key
"weight" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v1PreferredSchedulingTermWeight
      ]


-- | Construct a value of type 'V1PreferredSchedulingTerm' (by applying it's required fields, if any)
mkV1PreferredSchedulingTerm
  :: V1NodeSelectorTerm -- ^ 'v1PreferredSchedulingTermPreference' 
  -> Int -- ^ 'v1PreferredSchedulingTermWeight': Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.
  -> V1PreferredSchedulingTerm
mkV1PreferredSchedulingTerm :: V1NodeSelectorTerm -> Int -> V1PreferredSchedulingTerm
mkV1PreferredSchedulingTerm V1NodeSelectorTerm
v1PreferredSchedulingTermPreference Int
v1PreferredSchedulingTermWeight =
  V1PreferredSchedulingTerm
  { V1NodeSelectorTerm
$sel:v1PreferredSchedulingTermPreference:V1PreferredSchedulingTerm :: V1NodeSelectorTerm
v1PreferredSchedulingTermPreference :: V1NodeSelectorTerm
v1PreferredSchedulingTermPreference
  , Int
$sel:v1PreferredSchedulingTermWeight:V1PreferredSchedulingTerm :: Int
v1PreferredSchedulingTermWeight :: Int
v1PreferredSchedulingTermWeight
  }

-- ** V1PriorityClass
-- | V1PriorityClass
-- PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.
data V1PriorityClass = V1PriorityClass
  { V1PriorityClass -> Maybe Text
v1PriorityClassApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1PriorityClass -> Maybe Text
v1PriorityClassDescription :: !(Maybe Text) -- ^ "description" - description is an arbitrary string that usually provides guidelines on when this priority class should be used.
  , V1PriorityClass -> Maybe Bool
v1PriorityClassGlobalDefault :: !(Maybe Bool) -- ^ "globalDefault" - globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as &#x60;globalDefault&#x60;. However, if more than one PriorityClasses exists with their &#x60;globalDefault&#x60; field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.
  , V1PriorityClass -> Maybe Text
v1PriorityClassKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1PriorityClass -> Maybe V1ObjectMeta
v1PriorityClassMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1PriorityClass -> Maybe Text
v1PriorityClassPreemptionPolicy :: !(Maybe Text) -- ^ "preemptionPolicy" - preemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset.
  , V1PriorityClass -> Int
v1PriorityClassValue :: !(Int) -- ^ /Required/ "value" - value represents the integer value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.
  } deriving (Int -> V1PriorityClass -> ShowS
[V1PriorityClass] -> ShowS
V1PriorityClass -> String
(Int -> V1PriorityClass -> ShowS)
-> (V1PriorityClass -> String)
-> ([V1PriorityClass] -> ShowS)
-> Show V1PriorityClass
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PriorityClass -> ShowS
showsPrec :: Int -> V1PriorityClass -> ShowS
$cshow :: V1PriorityClass -> String
show :: V1PriorityClass -> String
$cshowList :: [V1PriorityClass] -> ShowS
showList :: [V1PriorityClass] -> ShowS
P.Show, V1PriorityClass -> V1PriorityClass -> Bool
(V1PriorityClass -> V1PriorityClass -> Bool)
-> (V1PriorityClass -> V1PriorityClass -> Bool)
-> Eq V1PriorityClass
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PriorityClass -> V1PriorityClass -> Bool
== :: V1PriorityClass -> V1PriorityClass -> Bool
$c/= :: V1PriorityClass -> V1PriorityClass -> Bool
/= :: V1PriorityClass -> V1PriorityClass -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PriorityClass
instance A.FromJSON V1PriorityClass where
  parseJSON :: Value -> Parser V1PriorityClass
parseJSON = String
-> (Object -> Parser V1PriorityClass)
-> Value
-> Parser V1PriorityClass
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PriorityClass" ((Object -> Parser V1PriorityClass)
 -> Value -> Parser V1PriorityClass)
-> (Object -> Parser V1PriorityClass)
-> Value
-> Parser V1PriorityClass
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe Text
-> Int
-> V1PriorityClass
V1PriorityClass
      (Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe Text
 -> Int
 -> V1PriorityClass)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe Text
      -> Int
      -> V1PriorityClass)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe Text
   -> Int
   -> V1PriorityClass)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe Text
      -> Int
      -> V1PriorityClass)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"description")
      Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe Text
   -> Int
   -> V1PriorityClass)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta -> Maybe Text -> Int -> V1PriorityClass)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"globalDefault")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta -> Maybe Text -> Int -> V1PriorityClass)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta -> Maybe Text -> Int -> V1PriorityClass)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ObjectMeta -> Maybe Text -> Int -> V1PriorityClass)
-> Parser (Maybe V1ObjectMeta)
-> Parser (Maybe Text -> Int -> V1PriorityClass)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (Maybe Text -> Int -> V1PriorityClass)
-> Parser (Maybe Text) -> Parser (Int -> V1PriorityClass)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"preemptionPolicy")
      Parser (Int -> V1PriorityClass)
-> Parser Int -> Parser V1PriorityClass
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"value")

-- | ToJSON V1PriorityClass
instance A.ToJSON V1PriorityClass where
  toJSON :: V1PriorityClass -> Value
toJSON V1PriorityClass {Int
Maybe Bool
Maybe Text
Maybe V1ObjectMeta
$sel:v1PriorityClassApiVersion:V1PriorityClass :: V1PriorityClass -> Maybe Text
$sel:v1PriorityClassDescription:V1PriorityClass :: V1PriorityClass -> Maybe Text
$sel:v1PriorityClassGlobalDefault:V1PriorityClass :: V1PriorityClass -> Maybe Bool
$sel:v1PriorityClassKind:V1PriorityClass :: V1PriorityClass -> Maybe Text
$sel:v1PriorityClassMetadata:V1PriorityClass :: V1PriorityClass -> Maybe V1ObjectMeta
$sel:v1PriorityClassPreemptionPolicy:V1PriorityClass :: V1PriorityClass -> Maybe Text
$sel:v1PriorityClassValue:V1PriorityClass :: V1PriorityClass -> Int
v1PriorityClassApiVersion :: Maybe Text
v1PriorityClassDescription :: Maybe Text
v1PriorityClassGlobalDefault :: Maybe Bool
v1PriorityClassKind :: Maybe Text
v1PriorityClassMetadata :: Maybe V1ObjectMeta
v1PriorityClassPreemptionPolicy :: Maybe Text
v1PriorityClassValue :: Int
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PriorityClassApiVersion
      , Key
"description" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PriorityClassDescription
      , Key
"globalDefault" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1PriorityClassGlobalDefault
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PriorityClassKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1PriorityClassMetadata
      , Key
"preemptionPolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PriorityClassPreemptionPolicy
      , Key
"value" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v1PriorityClassValue
      ]


-- | Construct a value of type 'V1PriorityClass' (by applying it's required fields, if any)
mkV1PriorityClass
  :: Int -- ^ 'v1PriorityClassValue': value represents the integer value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.
  -> V1PriorityClass
mkV1PriorityClass :: Int -> V1PriorityClass
mkV1PriorityClass Int
v1PriorityClassValue =
  V1PriorityClass
  { $sel:v1PriorityClassApiVersion:V1PriorityClass :: Maybe Text
v1PriorityClassApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PriorityClassDescription:V1PriorityClass :: Maybe Text
v1PriorityClassDescription = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PriorityClassGlobalDefault:V1PriorityClass :: Maybe Bool
v1PriorityClassGlobalDefault = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1PriorityClassKind:V1PriorityClass :: Maybe Text
v1PriorityClassKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PriorityClassMetadata:V1PriorityClass :: Maybe V1ObjectMeta
v1PriorityClassMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1PriorityClassPreemptionPolicy:V1PriorityClass :: Maybe Text
v1PriorityClassPreemptionPolicy = Maybe Text
forall a. Maybe a
Nothing
  , Int
$sel:v1PriorityClassValue:V1PriorityClass :: Int
v1PriorityClassValue :: Int
v1PriorityClassValue
  }

-- ** V1PriorityClassList
-- | V1PriorityClassList
-- PriorityClassList is a collection of priority classes.
data V1PriorityClassList = V1PriorityClassList
  { V1PriorityClassList -> Maybe Text
v1PriorityClassListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1PriorityClassList -> [V1PriorityClass]
v1PriorityClassListItems :: !([V1PriorityClass]) -- ^ /Required/ "items" - items is the list of PriorityClasses
  , V1PriorityClassList -> Maybe Text
v1PriorityClassListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1PriorityClassList -> Maybe V1ListMeta
v1PriorityClassListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1PriorityClassList -> ShowS
[V1PriorityClassList] -> ShowS
V1PriorityClassList -> String
(Int -> V1PriorityClassList -> ShowS)
-> (V1PriorityClassList -> String)
-> ([V1PriorityClassList] -> ShowS)
-> Show V1PriorityClassList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PriorityClassList -> ShowS
showsPrec :: Int -> V1PriorityClassList -> ShowS
$cshow :: V1PriorityClassList -> String
show :: V1PriorityClassList -> String
$cshowList :: [V1PriorityClassList] -> ShowS
showList :: [V1PriorityClassList] -> ShowS
P.Show, V1PriorityClassList -> V1PriorityClassList -> Bool
(V1PriorityClassList -> V1PriorityClassList -> Bool)
-> (V1PriorityClassList -> V1PriorityClassList -> Bool)
-> Eq V1PriorityClassList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PriorityClassList -> V1PriorityClassList -> Bool
== :: V1PriorityClassList -> V1PriorityClassList -> Bool
$c/= :: V1PriorityClassList -> V1PriorityClassList -> Bool
/= :: V1PriorityClassList -> V1PriorityClassList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PriorityClassList
instance A.FromJSON V1PriorityClassList where
  parseJSON :: Value -> Parser V1PriorityClassList
parseJSON = String
-> (Object -> Parser V1PriorityClassList)
-> Value
-> Parser V1PriorityClassList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PriorityClassList" ((Object -> Parser V1PriorityClassList)
 -> Value -> Parser V1PriorityClassList)
-> (Object -> Parser V1PriorityClassList)
-> Value
-> Parser V1PriorityClassList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1PriorityClass]
-> Maybe Text
-> Maybe V1ListMeta
-> V1PriorityClassList
V1PriorityClassList
      (Maybe Text
 -> [V1PriorityClass]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1PriorityClassList)
-> Parser (Maybe Text)
-> Parser
     ([V1PriorityClass]
      -> Maybe Text -> Maybe V1ListMeta -> V1PriorityClassList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1PriorityClass]
   -> Maybe Text -> Maybe V1ListMeta -> V1PriorityClassList)
-> Parser [V1PriorityClass]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1PriorityClassList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1PriorityClass]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1PriorityClassList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1PriorityClassList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1PriorityClassList)
-> Parser (Maybe V1ListMeta) -> Parser V1PriorityClassList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1PriorityClassList
instance A.ToJSON V1PriorityClassList where
  toJSON :: V1PriorityClassList -> Value
toJSON V1PriorityClassList {[V1PriorityClass]
Maybe Text
Maybe V1ListMeta
$sel:v1PriorityClassListApiVersion:V1PriorityClassList :: V1PriorityClassList -> Maybe Text
$sel:v1PriorityClassListItems:V1PriorityClassList :: V1PriorityClassList -> [V1PriorityClass]
$sel:v1PriorityClassListKind:V1PriorityClassList :: V1PriorityClassList -> Maybe Text
$sel:v1PriorityClassListMetadata:V1PriorityClassList :: V1PriorityClassList -> Maybe V1ListMeta
v1PriorityClassListApiVersion :: Maybe Text
v1PriorityClassListItems :: [V1PriorityClass]
v1PriorityClassListKind :: Maybe Text
v1PriorityClassListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PriorityClassListApiVersion
      , Key
"items" Key -> [V1PriorityClass] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1PriorityClass]
v1PriorityClassListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PriorityClassListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1PriorityClassListMetadata
      ]


-- | Construct a value of type 'V1PriorityClassList' (by applying it's required fields, if any)
mkV1PriorityClassList
  :: [V1PriorityClass] -- ^ 'v1PriorityClassListItems': items is the list of PriorityClasses
  -> V1PriorityClassList
mkV1PriorityClassList :: [V1PriorityClass] -> V1PriorityClassList
mkV1PriorityClassList [V1PriorityClass]
v1PriorityClassListItems =
  V1PriorityClassList
  { $sel:v1PriorityClassListApiVersion:V1PriorityClassList :: Maybe Text
v1PriorityClassListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1PriorityClass]
$sel:v1PriorityClassListItems:V1PriorityClassList :: [V1PriorityClass]
v1PriorityClassListItems :: [V1PriorityClass]
v1PriorityClassListItems
  , $sel:v1PriorityClassListKind:V1PriorityClassList :: Maybe Text
v1PriorityClassListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PriorityClassListMetadata:V1PriorityClassList :: Maybe V1ListMeta
v1PriorityClassListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1PriorityLevelConfiguration
-- | V1PriorityLevelConfiguration
-- PriorityLevelConfiguration represents the configuration of a priority level.
data V1PriorityLevelConfiguration = V1PriorityLevelConfiguration
  { V1PriorityLevelConfiguration -> Maybe Text
v1PriorityLevelConfigurationApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1PriorityLevelConfiguration -> Maybe Text
v1PriorityLevelConfigurationKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1PriorityLevelConfiguration -> Maybe V1ObjectMeta
v1PriorityLevelConfigurationMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1PriorityLevelConfiguration
-> Maybe V1PriorityLevelConfigurationSpec
v1PriorityLevelConfigurationSpec :: !(Maybe V1PriorityLevelConfigurationSpec) -- ^ "spec"
  , V1PriorityLevelConfiguration
-> Maybe V1PriorityLevelConfigurationStatus
v1PriorityLevelConfigurationStatus :: !(Maybe V1PriorityLevelConfigurationStatus) -- ^ "status"
  } deriving (Int -> V1PriorityLevelConfiguration -> ShowS
[V1PriorityLevelConfiguration] -> ShowS
V1PriorityLevelConfiguration -> String
(Int -> V1PriorityLevelConfiguration -> ShowS)
-> (V1PriorityLevelConfiguration -> String)
-> ([V1PriorityLevelConfiguration] -> ShowS)
-> Show V1PriorityLevelConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PriorityLevelConfiguration -> ShowS
showsPrec :: Int -> V1PriorityLevelConfiguration -> ShowS
$cshow :: V1PriorityLevelConfiguration -> String
show :: V1PriorityLevelConfiguration -> String
$cshowList :: [V1PriorityLevelConfiguration] -> ShowS
showList :: [V1PriorityLevelConfiguration] -> ShowS
P.Show, V1PriorityLevelConfiguration
-> V1PriorityLevelConfiguration -> Bool
(V1PriorityLevelConfiguration
 -> V1PriorityLevelConfiguration -> Bool)
-> (V1PriorityLevelConfiguration
    -> V1PriorityLevelConfiguration -> Bool)
-> Eq V1PriorityLevelConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PriorityLevelConfiguration
-> V1PriorityLevelConfiguration -> Bool
== :: V1PriorityLevelConfiguration
-> V1PriorityLevelConfiguration -> Bool
$c/= :: V1PriorityLevelConfiguration
-> V1PriorityLevelConfiguration -> Bool
/= :: V1PriorityLevelConfiguration
-> V1PriorityLevelConfiguration -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PriorityLevelConfiguration
instance A.FromJSON V1PriorityLevelConfiguration where
  parseJSON :: Value -> Parser V1PriorityLevelConfiguration
parseJSON = String
-> (Object -> Parser V1PriorityLevelConfiguration)
-> Value
-> Parser V1PriorityLevelConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PriorityLevelConfiguration" ((Object -> Parser V1PriorityLevelConfiguration)
 -> Value -> Parser V1PriorityLevelConfiguration)
-> (Object -> Parser V1PriorityLevelConfiguration)
-> Value
-> Parser V1PriorityLevelConfiguration
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1PriorityLevelConfigurationSpec
-> Maybe V1PriorityLevelConfigurationStatus
-> V1PriorityLevelConfiguration
V1PriorityLevelConfiguration
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1PriorityLevelConfigurationSpec
 -> Maybe V1PriorityLevelConfigurationStatus
 -> V1PriorityLevelConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1PriorityLevelConfigurationSpec
      -> Maybe V1PriorityLevelConfigurationStatus
      -> V1PriorityLevelConfiguration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1PriorityLevelConfigurationSpec
   -> Maybe V1PriorityLevelConfigurationStatus
   -> V1PriorityLevelConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1PriorityLevelConfigurationSpec
      -> Maybe V1PriorityLevelConfigurationStatus
      -> V1PriorityLevelConfiguration)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1PriorityLevelConfigurationSpec
   -> Maybe V1PriorityLevelConfigurationStatus
   -> V1PriorityLevelConfiguration)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe V1PriorityLevelConfigurationSpec
      -> Maybe V1PriorityLevelConfigurationStatus
      -> V1PriorityLevelConfiguration)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (Maybe V1PriorityLevelConfigurationSpec
   -> Maybe V1PriorityLevelConfigurationStatus
   -> V1PriorityLevelConfiguration)
-> Parser (Maybe V1PriorityLevelConfigurationSpec)
-> Parser
     (Maybe V1PriorityLevelConfigurationStatus
      -> V1PriorityLevelConfiguration)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1PriorityLevelConfigurationSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")
      Parser
  (Maybe V1PriorityLevelConfigurationStatus
   -> V1PriorityLevelConfiguration)
-> Parser (Maybe V1PriorityLevelConfigurationStatus)
-> Parser V1PriorityLevelConfiguration
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1PriorityLevelConfigurationStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1PriorityLevelConfiguration
instance A.ToJSON V1PriorityLevelConfiguration where
  toJSON :: V1PriorityLevelConfiguration -> Value
toJSON V1PriorityLevelConfiguration {Maybe Text
Maybe V1PriorityLevelConfigurationStatus
Maybe V1PriorityLevelConfigurationSpec
Maybe V1ObjectMeta
$sel:v1PriorityLevelConfigurationApiVersion:V1PriorityLevelConfiguration :: V1PriorityLevelConfiguration -> Maybe Text
$sel:v1PriorityLevelConfigurationKind:V1PriorityLevelConfiguration :: V1PriorityLevelConfiguration -> Maybe Text
$sel:v1PriorityLevelConfigurationMetadata:V1PriorityLevelConfiguration :: V1PriorityLevelConfiguration -> Maybe V1ObjectMeta
$sel:v1PriorityLevelConfigurationSpec:V1PriorityLevelConfiguration :: V1PriorityLevelConfiguration
-> Maybe V1PriorityLevelConfigurationSpec
$sel:v1PriorityLevelConfigurationStatus:V1PriorityLevelConfiguration :: V1PriorityLevelConfiguration
-> Maybe V1PriorityLevelConfigurationStatus
v1PriorityLevelConfigurationApiVersion :: Maybe Text
v1PriorityLevelConfigurationKind :: Maybe Text
v1PriorityLevelConfigurationMetadata :: Maybe V1ObjectMeta
v1PriorityLevelConfigurationSpec :: Maybe V1PriorityLevelConfigurationSpec
v1PriorityLevelConfigurationStatus :: Maybe V1PriorityLevelConfigurationStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PriorityLevelConfigurationApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PriorityLevelConfigurationKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1PriorityLevelConfigurationMetadata
      , Key
"spec" Key -> Maybe V1PriorityLevelConfigurationSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1PriorityLevelConfigurationSpec
v1PriorityLevelConfigurationSpec
      , Key
"status" Key -> Maybe V1PriorityLevelConfigurationStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1PriorityLevelConfigurationStatus
v1PriorityLevelConfigurationStatus
      ]


-- | Construct a value of type 'V1PriorityLevelConfiguration' (by applying it's required fields, if any)
mkV1PriorityLevelConfiguration
  :: V1PriorityLevelConfiguration
mkV1PriorityLevelConfiguration :: V1PriorityLevelConfiguration
mkV1PriorityLevelConfiguration =
  V1PriorityLevelConfiguration
  { $sel:v1PriorityLevelConfigurationApiVersion:V1PriorityLevelConfiguration :: Maybe Text
v1PriorityLevelConfigurationApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PriorityLevelConfigurationKind:V1PriorityLevelConfiguration :: Maybe Text
v1PriorityLevelConfigurationKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PriorityLevelConfigurationMetadata:V1PriorityLevelConfiguration :: Maybe V1ObjectMeta
v1PriorityLevelConfigurationMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1PriorityLevelConfigurationSpec:V1PriorityLevelConfiguration :: Maybe V1PriorityLevelConfigurationSpec
v1PriorityLevelConfigurationSpec = Maybe V1PriorityLevelConfigurationSpec
forall a. Maybe a
Nothing
  , $sel:v1PriorityLevelConfigurationStatus:V1PriorityLevelConfiguration :: Maybe V1PriorityLevelConfigurationStatus
v1PriorityLevelConfigurationStatus = Maybe V1PriorityLevelConfigurationStatus
forall a. Maybe a
Nothing
  }

-- ** V1PriorityLevelConfigurationCondition
-- | V1PriorityLevelConfigurationCondition
-- PriorityLevelConfigurationCondition defines the condition of priority level.
data V1PriorityLevelConfigurationCondition = V1PriorityLevelConfigurationCondition
  { V1PriorityLevelConfigurationCondition -> Maybe DateTime
v1PriorityLevelConfigurationConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - &#x60;lastTransitionTime&#x60; is the last time the condition transitioned from one status to another.
  , V1PriorityLevelConfigurationCondition -> Maybe Text
v1PriorityLevelConfigurationConditionMessage :: !(Maybe Text) -- ^ "message" - &#x60;message&#x60; is a human-readable message indicating details about last transition.
  , V1PriorityLevelConfigurationCondition -> Maybe Text
v1PriorityLevelConfigurationConditionReason :: !(Maybe Text) -- ^ "reason" - &#x60;reason&#x60; is a unique, one-word, CamelCase reason for the condition&#39;s last transition.
  , V1PriorityLevelConfigurationCondition -> Maybe Text
v1PriorityLevelConfigurationConditionStatus :: !(Maybe Text) -- ^ "status" - &#x60;status&#x60; is the status of the condition. Can be True, False, Unknown. Required.
  , V1PriorityLevelConfigurationCondition -> Maybe Text
v1PriorityLevelConfigurationConditionType :: !(Maybe Text) -- ^ "type" - &#x60;type&#x60; is the type of the condition. Required.
  } deriving (Int -> V1PriorityLevelConfigurationCondition -> ShowS
[V1PriorityLevelConfigurationCondition] -> ShowS
V1PriorityLevelConfigurationCondition -> String
(Int -> V1PriorityLevelConfigurationCondition -> ShowS)
-> (V1PriorityLevelConfigurationCondition -> String)
-> ([V1PriorityLevelConfigurationCondition] -> ShowS)
-> Show V1PriorityLevelConfigurationCondition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PriorityLevelConfigurationCondition -> ShowS
showsPrec :: Int -> V1PriorityLevelConfigurationCondition -> ShowS
$cshow :: V1PriorityLevelConfigurationCondition -> String
show :: V1PriorityLevelConfigurationCondition -> String
$cshowList :: [V1PriorityLevelConfigurationCondition] -> ShowS
showList :: [V1PriorityLevelConfigurationCondition] -> ShowS
P.Show, V1PriorityLevelConfigurationCondition
-> V1PriorityLevelConfigurationCondition -> Bool
(V1PriorityLevelConfigurationCondition
 -> V1PriorityLevelConfigurationCondition -> Bool)
-> (V1PriorityLevelConfigurationCondition
    -> V1PriorityLevelConfigurationCondition -> Bool)
-> Eq V1PriorityLevelConfigurationCondition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PriorityLevelConfigurationCondition
-> V1PriorityLevelConfigurationCondition -> Bool
== :: V1PriorityLevelConfigurationCondition
-> V1PriorityLevelConfigurationCondition -> Bool
$c/= :: V1PriorityLevelConfigurationCondition
-> V1PriorityLevelConfigurationCondition -> Bool
/= :: V1PriorityLevelConfigurationCondition
-> V1PriorityLevelConfigurationCondition -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PriorityLevelConfigurationCondition
instance A.FromJSON V1PriorityLevelConfigurationCondition where
  parseJSON :: Value -> Parser V1PriorityLevelConfigurationCondition
parseJSON = String
-> (Object -> Parser V1PriorityLevelConfigurationCondition)
-> Value
-> Parser V1PriorityLevelConfigurationCondition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PriorityLevelConfigurationCondition" ((Object -> Parser V1PriorityLevelConfigurationCondition)
 -> Value -> Parser V1PriorityLevelConfigurationCondition)
-> (Object -> Parser V1PriorityLevelConfigurationCondition)
-> Value
-> Parser V1PriorityLevelConfigurationCondition
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe DateTime
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> V1PriorityLevelConfigurationCondition
V1PriorityLevelConfigurationCondition
      (Maybe DateTime
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> V1PriorityLevelConfigurationCondition)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> V1PriorityLevelConfigurationCondition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lastTransitionTime")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> V1PriorityLevelConfigurationCondition)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> V1PriorityLevelConfigurationCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"message")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> V1PriorityLevelConfigurationCondition)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> V1PriorityLevelConfigurationCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reason")
      Parser
  (Maybe Text -> Maybe Text -> V1PriorityLevelConfigurationCondition)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> V1PriorityLevelConfigurationCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")
      Parser (Maybe Text -> V1PriorityLevelConfigurationCondition)
-> Parser (Maybe Text)
-> Parser V1PriorityLevelConfigurationCondition
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"type")

-- | ToJSON V1PriorityLevelConfigurationCondition
instance A.ToJSON V1PriorityLevelConfigurationCondition where
  toJSON :: V1PriorityLevelConfigurationCondition -> Value
toJSON V1PriorityLevelConfigurationCondition {Maybe Text
Maybe DateTime
$sel:v1PriorityLevelConfigurationConditionLastTransitionTime:V1PriorityLevelConfigurationCondition :: V1PriorityLevelConfigurationCondition -> Maybe DateTime
$sel:v1PriorityLevelConfigurationConditionMessage:V1PriorityLevelConfigurationCondition :: V1PriorityLevelConfigurationCondition -> Maybe Text
$sel:v1PriorityLevelConfigurationConditionReason:V1PriorityLevelConfigurationCondition :: V1PriorityLevelConfigurationCondition -> Maybe Text
$sel:v1PriorityLevelConfigurationConditionStatus:V1PriorityLevelConfigurationCondition :: V1PriorityLevelConfigurationCondition -> Maybe Text
$sel:v1PriorityLevelConfigurationConditionType:V1PriorityLevelConfigurationCondition :: V1PriorityLevelConfigurationCondition -> Maybe Text
v1PriorityLevelConfigurationConditionLastTransitionTime :: Maybe DateTime
v1PriorityLevelConfigurationConditionMessage :: Maybe Text
v1PriorityLevelConfigurationConditionReason :: Maybe Text
v1PriorityLevelConfigurationConditionStatus :: Maybe Text
v1PriorityLevelConfigurationConditionType :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"lastTransitionTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1PriorityLevelConfigurationConditionLastTransitionTime
      , Key
"message" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PriorityLevelConfigurationConditionMessage
      , Key
"reason" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PriorityLevelConfigurationConditionReason
      , Key
"status" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PriorityLevelConfigurationConditionStatus
      , Key
"type" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PriorityLevelConfigurationConditionType
      ]


-- | Construct a value of type 'V1PriorityLevelConfigurationCondition' (by applying it's required fields, if any)
mkV1PriorityLevelConfigurationCondition
  :: V1PriorityLevelConfigurationCondition
mkV1PriorityLevelConfigurationCondition :: V1PriorityLevelConfigurationCondition
mkV1PriorityLevelConfigurationCondition =
  V1PriorityLevelConfigurationCondition
  { $sel:v1PriorityLevelConfigurationConditionLastTransitionTime:V1PriorityLevelConfigurationCondition :: Maybe DateTime
v1PriorityLevelConfigurationConditionLastTransitionTime = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1PriorityLevelConfigurationConditionMessage:V1PriorityLevelConfigurationCondition :: Maybe Text
v1PriorityLevelConfigurationConditionMessage = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PriorityLevelConfigurationConditionReason:V1PriorityLevelConfigurationCondition :: Maybe Text
v1PriorityLevelConfigurationConditionReason = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PriorityLevelConfigurationConditionStatus:V1PriorityLevelConfigurationCondition :: Maybe Text
v1PriorityLevelConfigurationConditionStatus = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PriorityLevelConfigurationConditionType:V1PriorityLevelConfigurationCondition :: Maybe Text
v1PriorityLevelConfigurationConditionType = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1PriorityLevelConfigurationList
-- | V1PriorityLevelConfigurationList
-- PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects.
data V1PriorityLevelConfigurationList = V1PriorityLevelConfigurationList
  { V1PriorityLevelConfigurationList -> Maybe Text
v1PriorityLevelConfigurationListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1PriorityLevelConfigurationList -> [V1PriorityLevelConfiguration]
v1PriorityLevelConfigurationListItems :: !([V1PriorityLevelConfiguration]) -- ^ /Required/ "items" - &#x60;items&#x60; is a list of request-priorities.
  , V1PriorityLevelConfigurationList -> Maybe Text
v1PriorityLevelConfigurationListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1PriorityLevelConfigurationList -> Maybe V1ListMeta
v1PriorityLevelConfigurationListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1PriorityLevelConfigurationList -> ShowS
[V1PriorityLevelConfigurationList] -> ShowS
V1PriorityLevelConfigurationList -> String
(Int -> V1PriorityLevelConfigurationList -> ShowS)
-> (V1PriorityLevelConfigurationList -> String)
-> ([V1PriorityLevelConfigurationList] -> ShowS)
-> Show V1PriorityLevelConfigurationList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PriorityLevelConfigurationList -> ShowS
showsPrec :: Int -> V1PriorityLevelConfigurationList -> ShowS
$cshow :: V1PriorityLevelConfigurationList -> String
show :: V1PriorityLevelConfigurationList -> String
$cshowList :: [V1PriorityLevelConfigurationList] -> ShowS
showList :: [V1PriorityLevelConfigurationList] -> ShowS
P.Show, V1PriorityLevelConfigurationList
-> V1PriorityLevelConfigurationList -> Bool
(V1PriorityLevelConfigurationList
 -> V1PriorityLevelConfigurationList -> Bool)
-> (V1PriorityLevelConfigurationList
    -> V1PriorityLevelConfigurationList -> Bool)
-> Eq V1PriorityLevelConfigurationList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PriorityLevelConfigurationList
-> V1PriorityLevelConfigurationList -> Bool
== :: V1PriorityLevelConfigurationList
-> V1PriorityLevelConfigurationList -> Bool
$c/= :: V1PriorityLevelConfigurationList
-> V1PriorityLevelConfigurationList -> Bool
/= :: V1PriorityLevelConfigurationList
-> V1PriorityLevelConfigurationList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PriorityLevelConfigurationList
instance A.FromJSON V1PriorityLevelConfigurationList where
  parseJSON :: Value -> Parser V1PriorityLevelConfigurationList
parseJSON = String
-> (Object -> Parser V1PriorityLevelConfigurationList)
-> Value
-> Parser V1PriorityLevelConfigurationList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PriorityLevelConfigurationList" ((Object -> Parser V1PriorityLevelConfigurationList)
 -> Value -> Parser V1PriorityLevelConfigurationList)
-> (Object -> Parser V1PriorityLevelConfigurationList)
-> Value
-> Parser V1PriorityLevelConfigurationList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1PriorityLevelConfiguration]
-> Maybe Text
-> Maybe V1ListMeta
-> V1PriorityLevelConfigurationList
V1PriorityLevelConfigurationList
      (Maybe Text
 -> [V1PriorityLevelConfiguration]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1PriorityLevelConfigurationList)
-> Parser (Maybe Text)
-> Parser
     ([V1PriorityLevelConfiguration]
      -> Maybe Text
      -> Maybe V1ListMeta
      -> V1PriorityLevelConfigurationList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1PriorityLevelConfiguration]
   -> Maybe Text
   -> Maybe V1ListMeta
   -> V1PriorityLevelConfigurationList)
-> Parser [V1PriorityLevelConfiguration]
-> Parser
     (Maybe Text
      -> Maybe V1ListMeta -> V1PriorityLevelConfigurationList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1PriorityLevelConfiguration]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser
  (Maybe Text
   -> Maybe V1ListMeta -> V1PriorityLevelConfigurationList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1PriorityLevelConfigurationList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1PriorityLevelConfigurationList)
-> Parser (Maybe V1ListMeta)
-> Parser V1PriorityLevelConfigurationList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1PriorityLevelConfigurationList
instance A.ToJSON V1PriorityLevelConfigurationList where
  toJSON :: V1PriorityLevelConfigurationList -> Value
toJSON V1PriorityLevelConfigurationList {[V1PriorityLevelConfiguration]
Maybe Text
Maybe V1ListMeta
$sel:v1PriorityLevelConfigurationListApiVersion:V1PriorityLevelConfigurationList :: V1PriorityLevelConfigurationList -> Maybe Text
$sel:v1PriorityLevelConfigurationListItems:V1PriorityLevelConfigurationList :: V1PriorityLevelConfigurationList -> [V1PriorityLevelConfiguration]
$sel:v1PriorityLevelConfigurationListKind:V1PriorityLevelConfigurationList :: V1PriorityLevelConfigurationList -> Maybe Text
$sel:v1PriorityLevelConfigurationListMetadata:V1PriorityLevelConfigurationList :: V1PriorityLevelConfigurationList -> Maybe V1ListMeta
v1PriorityLevelConfigurationListApiVersion :: Maybe Text
v1PriorityLevelConfigurationListItems :: [V1PriorityLevelConfiguration]
v1PriorityLevelConfigurationListKind :: Maybe Text
v1PriorityLevelConfigurationListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PriorityLevelConfigurationListApiVersion
      , Key
"items" Key -> [V1PriorityLevelConfiguration] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1PriorityLevelConfiguration]
v1PriorityLevelConfigurationListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1PriorityLevelConfigurationListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1PriorityLevelConfigurationListMetadata
      ]


-- | Construct a value of type 'V1PriorityLevelConfigurationList' (by applying it's required fields, if any)
mkV1PriorityLevelConfigurationList
  :: [V1PriorityLevelConfiguration] -- ^ 'v1PriorityLevelConfigurationListItems': `items` is a list of request-priorities.
  -> V1PriorityLevelConfigurationList
mkV1PriorityLevelConfigurationList :: [V1PriorityLevelConfiguration] -> V1PriorityLevelConfigurationList
mkV1PriorityLevelConfigurationList [V1PriorityLevelConfiguration]
v1PriorityLevelConfigurationListItems =
  V1PriorityLevelConfigurationList
  { $sel:v1PriorityLevelConfigurationListApiVersion:V1PriorityLevelConfigurationList :: Maybe Text
v1PriorityLevelConfigurationListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1PriorityLevelConfiguration]
$sel:v1PriorityLevelConfigurationListItems:V1PriorityLevelConfigurationList :: [V1PriorityLevelConfiguration]
v1PriorityLevelConfigurationListItems :: [V1PriorityLevelConfiguration]
v1PriorityLevelConfigurationListItems
  , $sel:v1PriorityLevelConfigurationListKind:V1PriorityLevelConfigurationList :: Maybe Text
v1PriorityLevelConfigurationListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1PriorityLevelConfigurationListMetadata:V1PriorityLevelConfigurationList :: Maybe V1ListMeta
v1PriorityLevelConfigurationListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1PriorityLevelConfigurationReference
-- | V1PriorityLevelConfigurationReference
-- PriorityLevelConfigurationReference contains information that points to the \"request-priority\" being used.
data V1PriorityLevelConfigurationReference = V1PriorityLevelConfigurationReference
  { V1PriorityLevelConfigurationReference -> Text
v1PriorityLevelConfigurationReferenceName :: !(Text) -- ^ /Required/ "name" - &#x60;name&#x60; is the name of the priority level configuration being referenced Required.
  } deriving (Int -> V1PriorityLevelConfigurationReference -> ShowS
[V1PriorityLevelConfigurationReference] -> ShowS
V1PriorityLevelConfigurationReference -> String
(Int -> V1PriorityLevelConfigurationReference -> ShowS)
-> (V1PriorityLevelConfigurationReference -> String)
-> ([V1PriorityLevelConfigurationReference] -> ShowS)
-> Show V1PriorityLevelConfigurationReference
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PriorityLevelConfigurationReference -> ShowS
showsPrec :: Int -> V1PriorityLevelConfigurationReference -> ShowS
$cshow :: V1PriorityLevelConfigurationReference -> String
show :: V1PriorityLevelConfigurationReference -> String
$cshowList :: [V1PriorityLevelConfigurationReference] -> ShowS
showList :: [V1PriorityLevelConfigurationReference] -> ShowS
P.Show, V1PriorityLevelConfigurationReference
-> V1PriorityLevelConfigurationReference -> Bool
(V1PriorityLevelConfigurationReference
 -> V1PriorityLevelConfigurationReference -> Bool)
-> (V1PriorityLevelConfigurationReference
    -> V1PriorityLevelConfigurationReference -> Bool)
-> Eq V1PriorityLevelConfigurationReference
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PriorityLevelConfigurationReference
-> V1PriorityLevelConfigurationReference -> Bool
== :: V1PriorityLevelConfigurationReference
-> V1PriorityLevelConfigurationReference -> Bool
$c/= :: V1PriorityLevelConfigurationReference
-> V1PriorityLevelConfigurationReference -> Bool
/= :: V1PriorityLevelConfigurationReference
-> V1PriorityLevelConfigurationReference -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PriorityLevelConfigurationReference
instance A.FromJSON V1PriorityLevelConfigurationReference where
  parseJSON :: Value -> Parser V1PriorityLevelConfigurationReference
parseJSON = String
-> (Object -> Parser V1PriorityLevelConfigurationReference)
-> Value
-> Parser V1PriorityLevelConfigurationReference
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PriorityLevelConfigurationReference" ((Object -> Parser V1PriorityLevelConfigurationReference)
 -> Value -> Parser V1PriorityLevelConfigurationReference)
-> (Object -> Parser V1PriorityLevelConfigurationReference)
-> Value
-> Parser V1PriorityLevelConfigurationReference
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> V1PriorityLevelConfigurationReference
V1PriorityLevelConfigurationReference
      (Text -> V1PriorityLevelConfigurationReference)
-> Parser Text -> Parser V1PriorityLevelConfigurationReference
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")

-- | ToJSON V1PriorityLevelConfigurationReference
instance A.ToJSON V1PriorityLevelConfigurationReference where
  toJSON :: V1PriorityLevelConfigurationReference -> Value
toJSON V1PriorityLevelConfigurationReference {Text
$sel:v1PriorityLevelConfigurationReferenceName:V1PriorityLevelConfigurationReference :: V1PriorityLevelConfigurationReference -> Text
v1PriorityLevelConfigurationReferenceName :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1PriorityLevelConfigurationReferenceName
      ]


-- | Construct a value of type 'V1PriorityLevelConfigurationReference' (by applying it's required fields, if any)
mkV1PriorityLevelConfigurationReference
  :: Text -- ^ 'v1PriorityLevelConfigurationReferenceName': `name` is the name of the priority level configuration being referenced Required.
  -> V1PriorityLevelConfigurationReference
mkV1PriorityLevelConfigurationReference :: Text -> V1PriorityLevelConfigurationReference
mkV1PriorityLevelConfigurationReference Text
v1PriorityLevelConfigurationReferenceName =
  V1PriorityLevelConfigurationReference
  { Text
$sel:v1PriorityLevelConfigurationReferenceName:V1PriorityLevelConfigurationReference :: Text
v1PriorityLevelConfigurationReferenceName :: Text
v1PriorityLevelConfigurationReferenceName
  }

-- ** V1PriorityLevelConfigurationSpec
-- | V1PriorityLevelConfigurationSpec
-- PriorityLevelConfigurationSpec specifies the configuration of a priority level.
data V1PriorityLevelConfigurationSpec = V1PriorityLevelConfigurationSpec
  { V1PriorityLevelConfigurationSpec
-> Maybe V1ExemptPriorityLevelConfiguration
v1PriorityLevelConfigurationSpecExempt :: !(Maybe V1ExemptPriorityLevelConfiguration) -- ^ "exempt"
  , V1PriorityLevelConfigurationSpec
-> Maybe V1LimitedPriorityLevelConfiguration
v1PriorityLevelConfigurationSpecLimited :: !(Maybe V1LimitedPriorityLevelConfiguration) -- ^ "limited"
  , V1PriorityLevelConfigurationSpec -> Text
v1PriorityLevelConfigurationSpecType :: !(Text) -- ^ /Required/ "type" - &#x60;type&#x60; indicates whether this priority level is subject to limitation on request execution.  A value of &#x60;\&quot;Exempt\&quot;&#x60; means that requests of this priority level are not subject to a limit (and thus are never queued) and do not detract from the capacity made available to other priority levels.  A value of &#x60;\&quot;Limited\&quot;&#x60; means that (a) requests of this priority level _are_ subject to limits and (b) some of the server&#39;s limited capacity is made available exclusively to this priority level. Required.
  } deriving (Int -> V1PriorityLevelConfigurationSpec -> ShowS
[V1PriorityLevelConfigurationSpec] -> ShowS
V1PriorityLevelConfigurationSpec -> String
(Int -> V1PriorityLevelConfigurationSpec -> ShowS)
-> (V1PriorityLevelConfigurationSpec -> String)
-> ([V1PriorityLevelConfigurationSpec] -> ShowS)
-> Show V1PriorityLevelConfigurationSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PriorityLevelConfigurationSpec -> ShowS
showsPrec :: Int -> V1PriorityLevelConfigurationSpec -> ShowS
$cshow :: V1PriorityLevelConfigurationSpec -> String
show :: V1PriorityLevelConfigurationSpec -> String
$cshowList :: [V1PriorityLevelConfigurationSpec] -> ShowS
showList :: [V1PriorityLevelConfigurationSpec] -> ShowS
P.Show, V1PriorityLevelConfigurationSpec
-> V1PriorityLevelConfigurationSpec -> Bool
(V1PriorityLevelConfigurationSpec
 -> V1PriorityLevelConfigurationSpec -> Bool)
-> (V1PriorityLevelConfigurationSpec
    -> V1PriorityLevelConfigurationSpec -> Bool)
-> Eq V1PriorityLevelConfigurationSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PriorityLevelConfigurationSpec
-> V1PriorityLevelConfigurationSpec -> Bool
== :: V1PriorityLevelConfigurationSpec
-> V1PriorityLevelConfigurationSpec -> Bool
$c/= :: V1PriorityLevelConfigurationSpec
-> V1PriorityLevelConfigurationSpec -> Bool
/= :: V1PriorityLevelConfigurationSpec
-> V1PriorityLevelConfigurationSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PriorityLevelConfigurationSpec
instance A.FromJSON V1PriorityLevelConfigurationSpec where
  parseJSON :: Value -> Parser V1PriorityLevelConfigurationSpec
parseJSON = String
-> (Object -> Parser V1PriorityLevelConfigurationSpec)
-> Value
-> Parser V1PriorityLevelConfigurationSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PriorityLevelConfigurationSpec" ((Object -> Parser V1PriorityLevelConfigurationSpec)
 -> Value -> Parser V1PriorityLevelConfigurationSpec)
-> (Object -> Parser V1PriorityLevelConfigurationSpec)
-> Value
-> Parser V1PriorityLevelConfigurationSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1ExemptPriorityLevelConfiguration
-> Maybe V1LimitedPriorityLevelConfiguration
-> Text
-> V1PriorityLevelConfigurationSpec
V1PriorityLevelConfigurationSpec
      (Maybe V1ExemptPriorityLevelConfiguration
 -> Maybe V1LimitedPriorityLevelConfiguration
 -> Text
 -> V1PriorityLevelConfigurationSpec)
-> Parser (Maybe V1ExemptPriorityLevelConfiguration)
-> Parser
     (Maybe V1LimitedPriorityLevelConfiguration
      -> Text -> V1PriorityLevelConfigurationSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1ExemptPriorityLevelConfiguration)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"exempt")
      Parser
  (Maybe V1LimitedPriorityLevelConfiguration
   -> Text -> V1PriorityLevelConfigurationSpec)
-> Parser (Maybe V1LimitedPriorityLevelConfiguration)
-> Parser (Text -> V1PriorityLevelConfigurationSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LimitedPriorityLevelConfiguration)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"limited")
      Parser (Text -> V1PriorityLevelConfigurationSpec)
-> Parser Text -> Parser V1PriorityLevelConfigurationSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"type")

-- | ToJSON V1PriorityLevelConfigurationSpec
instance A.ToJSON V1PriorityLevelConfigurationSpec where
  toJSON :: V1PriorityLevelConfigurationSpec -> Value
toJSON V1PriorityLevelConfigurationSpec {Maybe V1LimitedPriorityLevelConfiguration
Maybe V1ExemptPriorityLevelConfiguration
Text
$sel:v1PriorityLevelConfigurationSpecExempt:V1PriorityLevelConfigurationSpec :: V1PriorityLevelConfigurationSpec
-> Maybe V1ExemptPriorityLevelConfiguration
$sel:v1PriorityLevelConfigurationSpecLimited:V1PriorityLevelConfigurationSpec :: V1PriorityLevelConfigurationSpec
-> Maybe V1LimitedPriorityLevelConfiguration
$sel:v1PriorityLevelConfigurationSpecType:V1PriorityLevelConfigurationSpec :: V1PriorityLevelConfigurationSpec -> Text
v1PriorityLevelConfigurationSpecExempt :: Maybe V1ExemptPriorityLevelConfiguration
v1PriorityLevelConfigurationSpecLimited :: Maybe V1LimitedPriorityLevelConfiguration
v1PriorityLevelConfigurationSpecType :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"exempt" Key -> Maybe V1ExemptPriorityLevelConfiguration -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ExemptPriorityLevelConfiguration
v1PriorityLevelConfigurationSpecExempt
      , Key
"limited" Key -> Maybe V1LimitedPriorityLevelConfiguration -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LimitedPriorityLevelConfiguration
v1PriorityLevelConfigurationSpecLimited
      , Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1PriorityLevelConfigurationSpecType
      ]


-- | Construct a value of type 'V1PriorityLevelConfigurationSpec' (by applying it's required fields, if any)
mkV1PriorityLevelConfigurationSpec
  :: Text -- ^ 'v1PriorityLevelConfigurationSpecType': `type` indicates whether this priority level is subject to limitation on request execution.  A value of `\"Exempt\"` means that requests of this priority level are not subject to a limit (and thus are never queued) and do not detract from the capacity made available to other priority levels.  A value of `\"Limited\"` means that (a) requests of this priority level _are_ subject to limits and (b) some of the server's limited capacity is made available exclusively to this priority level. Required.
  -> V1PriorityLevelConfigurationSpec
mkV1PriorityLevelConfigurationSpec :: Text -> V1PriorityLevelConfigurationSpec
mkV1PriorityLevelConfigurationSpec Text
v1PriorityLevelConfigurationSpecType =
  V1PriorityLevelConfigurationSpec
  { $sel:v1PriorityLevelConfigurationSpecExempt:V1PriorityLevelConfigurationSpec :: Maybe V1ExemptPriorityLevelConfiguration
v1PriorityLevelConfigurationSpecExempt = Maybe V1ExemptPriorityLevelConfiguration
forall a. Maybe a
Nothing
  , $sel:v1PriorityLevelConfigurationSpecLimited:V1PriorityLevelConfigurationSpec :: Maybe V1LimitedPriorityLevelConfiguration
v1PriorityLevelConfigurationSpecLimited = Maybe V1LimitedPriorityLevelConfiguration
forall a. Maybe a
Nothing
  , Text
$sel:v1PriorityLevelConfigurationSpecType:V1PriorityLevelConfigurationSpec :: Text
v1PriorityLevelConfigurationSpecType :: Text
v1PriorityLevelConfigurationSpecType
  }

-- ** V1PriorityLevelConfigurationStatus
-- | V1PriorityLevelConfigurationStatus
-- PriorityLevelConfigurationStatus represents the current state of a \"request-priority\".
data V1PriorityLevelConfigurationStatus = V1PriorityLevelConfigurationStatus
  { V1PriorityLevelConfigurationStatus
-> Maybe [V1PriorityLevelConfigurationCondition]
v1PriorityLevelConfigurationStatusConditions :: !(Maybe [V1PriorityLevelConfigurationCondition]) -- ^ "conditions" - &#x60;conditions&#x60; is the current state of \&quot;request-priority\&quot;.
  } deriving (Int -> V1PriorityLevelConfigurationStatus -> ShowS
[V1PriorityLevelConfigurationStatus] -> ShowS
V1PriorityLevelConfigurationStatus -> String
(Int -> V1PriorityLevelConfigurationStatus -> ShowS)
-> (V1PriorityLevelConfigurationStatus -> String)
-> ([V1PriorityLevelConfigurationStatus] -> ShowS)
-> Show V1PriorityLevelConfigurationStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1PriorityLevelConfigurationStatus -> ShowS
showsPrec :: Int -> V1PriorityLevelConfigurationStatus -> ShowS
$cshow :: V1PriorityLevelConfigurationStatus -> String
show :: V1PriorityLevelConfigurationStatus -> String
$cshowList :: [V1PriorityLevelConfigurationStatus] -> ShowS
showList :: [V1PriorityLevelConfigurationStatus] -> ShowS
P.Show, V1PriorityLevelConfigurationStatus
-> V1PriorityLevelConfigurationStatus -> Bool
(V1PriorityLevelConfigurationStatus
 -> V1PriorityLevelConfigurationStatus -> Bool)
-> (V1PriorityLevelConfigurationStatus
    -> V1PriorityLevelConfigurationStatus -> Bool)
-> Eq V1PriorityLevelConfigurationStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1PriorityLevelConfigurationStatus
-> V1PriorityLevelConfigurationStatus -> Bool
== :: V1PriorityLevelConfigurationStatus
-> V1PriorityLevelConfigurationStatus -> Bool
$c/= :: V1PriorityLevelConfigurationStatus
-> V1PriorityLevelConfigurationStatus -> Bool
/= :: V1PriorityLevelConfigurationStatus
-> V1PriorityLevelConfigurationStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1PriorityLevelConfigurationStatus
instance A.FromJSON V1PriorityLevelConfigurationStatus where
  parseJSON :: Value -> Parser V1PriorityLevelConfigurationStatus
parseJSON = String
-> (Object -> Parser V1PriorityLevelConfigurationStatus)
-> Value
-> Parser V1PriorityLevelConfigurationStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1PriorityLevelConfigurationStatus" ((Object -> Parser V1PriorityLevelConfigurationStatus)
 -> Value -> Parser V1PriorityLevelConfigurationStatus)
-> (Object -> Parser V1PriorityLevelConfigurationStatus)
-> Value
-> Parser V1PriorityLevelConfigurationStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1PriorityLevelConfigurationCondition]
-> V1PriorityLevelConfigurationStatus
V1PriorityLevelConfigurationStatus
      (Maybe [V1PriorityLevelConfigurationCondition]
 -> V1PriorityLevelConfigurationStatus)
-> Parser (Maybe [V1PriorityLevelConfigurationCondition])
-> Parser V1PriorityLevelConfigurationStatus
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object
-> Key -> Parser (Maybe [V1PriorityLevelConfigurationCondition])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"conditions")

-- | ToJSON V1PriorityLevelConfigurationStatus
instance A.ToJSON V1PriorityLevelConfigurationStatus where
  toJSON :: V1PriorityLevelConfigurationStatus -> Value
toJSON V1PriorityLevelConfigurationStatus {Maybe [V1PriorityLevelConfigurationCondition]
$sel:v1PriorityLevelConfigurationStatusConditions:V1PriorityLevelConfigurationStatus :: V1PriorityLevelConfigurationStatus
-> Maybe [V1PriorityLevelConfigurationCondition]
v1PriorityLevelConfigurationStatusConditions :: Maybe [V1PriorityLevelConfigurationCondition]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"conditions" Key
-> Maybe [V1PriorityLevelConfigurationCondition] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1PriorityLevelConfigurationCondition]
v1PriorityLevelConfigurationStatusConditions
      ]


-- | Construct a value of type 'V1PriorityLevelConfigurationStatus' (by applying it's required fields, if any)
mkV1PriorityLevelConfigurationStatus
  :: V1PriorityLevelConfigurationStatus
mkV1PriorityLevelConfigurationStatus :: V1PriorityLevelConfigurationStatus
mkV1PriorityLevelConfigurationStatus =
  V1PriorityLevelConfigurationStatus
  { $sel:v1PriorityLevelConfigurationStatusConditions:V1PriorityLevelConfigurationStatus :: Maybe [V1PriorityLevelConfigurationCondition]
v1PriorityLevelConfigurationStatusConditions = Maybe [V1PriorityLevelConfigurationCondition]
forall a. Maybe a
Nothing
  }

-- ** V1Probe
-- | V1Probe
-- Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.
data V1Probe = V1Probe
  { V1Probe -> Maybe V1ExecAction
v1ProbeExec :: !(Maybe V1ExecAction) -- ^ "exec"
  , V1Probe -> Maybe Int
v1ProbeFailureThreshold :: !(Maybe Int) -- ^ "failureThreshold" - Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.
  , V1Probe -> Maybe V1GRPCAction
v1ProbeGrpc :: !(Maybe V1GRPCAction) -- ^ "grpc"
  , V1Probe -> Maybe V1HTTPGetAction
v1ProbeHttpGet :: !(Maybe V1HTTPGetAction) -- ^ "httpGet"
  , V1Probe -> Maybe Int
v1ProbeInitialDelaySeconds :: !(Maybe Int) -- ^ "initialDelaySeconds" - Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
  , V1Probe -> Maybe Int
v1ProbePeriodSeconds :: !(Maybe Int) -- ^ "periodSeconds" - How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.
  , V1Probe -> Maybe Int
v1ProbeSuccessThreshold :: !(Maybe Int) -- ^ "successThreshold" - Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.
  , V1Probe -> Maybe V1TCPSocketAction
v1ProbeTcpSocket :: !(Maybe V1TCPSocketAction) -- ^ "tcpSocket"
  , V1Probe -> Maybe Integer
v1ProbeTerminationGracePeriodSeconds :: !(Maybe Integer) -- ^ "terminationGracePeriodSeconds" - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod&#39;s terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.
  , V1Probe -> Maybe Int
v1ProbeTimeoutSeconds :: !(Maybe Int) -- ^ "timeoutSeconds" - Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
  } deriving (Int -> V1Probe -> ShowS
[V1Probe] -> ShowS
V1Probe -> String
(Int -> V1Probe -> ShowS)
-> (V1Probe -> String) -> ([V1Probe] -> ShowS) -> Show V1Probe
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1Probe -> ShowS
showsPrec :: Int -> V1Probe -> ShowS
$cshow :: V1Probe -> String
show :: V1Probe -> String
$cshowList :: [V1Probe] -> ShowS
showList :: [V1Probe] -> ShowS
P.Show, V1Probe -> V1Probe -> Bool
(V1Probe -> V1Probe -> Bool)
-> (V1Probe -> V1Probe -> Bool) -> Eq V1Probe
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1Probe -> V1Probe -> Bool
== :: V1Probe -> V1Probe -> Bool
$c/= :: V1Probe -> V1Probe -> Bool
/= :: V1Probe -> V1Probe -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1Probe
instance A.FromJSON V1Probe where
  parseJSON :: Value -> Parser V1Probe
parseJSON = String -> (Object -> Parser V1Probe) -> Value -> Parser V1Probe
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1Probe" ((Object -> Parser V1Probe) -> Value -> Parser V1Probe)
-> (Object -> Parser V1Probe) -> Value -> Parser V1Probe
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1ExecAction
-> Maybe Int
-> Maybe V1GRPCAction
-> Maybe V1HTTPGetAction
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe V1TCPSocketAction
-> Maybe Integer
-> Maybe Int
-> V1Probe
V1Probe
      (Maybe V1ExecAction
 -> Maybe Int
 -> Maybe V1GRPCAction
 -> Maybe V1HTTPGetAction
 -> Maybe Int
 -> Maybe Int
 -> Maybe Int
 -> Maybe V1TCPSocketAction
 -> Maybe Integer
 -> Maybe Int
 -> V1Probe)
-> Parser (Maybe V1ExecAction)
-> Parser
     (Maybe Int
      -> Maybe V1GRPCAction
      -> Maybe V1HTTPGetAction
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe V1TCPSocketAction
      -> Maybe Integer
      -> Maybe Int
      -> V1Probe)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1ExecAction)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"exec")
      Parser
  (Maybe Int
   -> Maybe V1GRPCAction
   -> Maybe V1HTTPGetAction
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe V1TCPSocketAction
   -> Maybe Integer
   -> Maybe Int
   -> V1Probe)
-> Parser (Maybe Int)
-> Parser
     (Maybe V1GRPCAction
      -> Maybe V1HTTPGetAction
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe V1TCPSocketAction
      -> Maybe Integer
      -> Maybe Int
      -> V1Probe)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"failureThreshold")
      Parser
  (Maybe V1GRPCAction
   -> Maybe V1HTTPGetAction
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe V1TCPSocketAction
   -> Maybe Integer
   -> Maybe Int
   -> V1Probe)
-> Parser (Maybe V1GRPCAction)
-> Parser
     (Maybe V1HTTPGetAction
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe V1TCPSocketAction
      -> Maybe Integer
      -> Maybe Int
      -> V1Probe)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1GRPCAction)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"grpc")
      Parser
  (Maybe V1HTTPGetAction
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe V1TCPSocketAction
   -> Maybe Integer
   -> Maybe Int
   -> V1Probe)
-> Parser (Maybe V1HTTPGetAction)
-> Parser
     (Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe V1TCPSocketAction
      -> Maybe Integer
      -> Maybe Int
      -> V1Probe)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1HTTPGetAction)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"httpGet")
      Parser
  (Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe V1TCPSocketAction
   -> Maybe Integer
   -> Maybe Int
   -> V1Probe)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe Int
      -> Maybe V1TCPSocketAction
      -> Maybe Integer
      -> Maybe Int
      -> V1Probe)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"initialDelaySeconds")
      Parser
  (Maybe Int
   -> Maybe Int
   -> Maybe V1TCPSocketAction
   -> Maybe Integer
   -> Maybe Int
   -> V1Probe)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe V1TCPSocketAction
      -> Maybe Integer
      -> Maybe Int
      -> V1Probe)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"periodSeconds")
      Parser
  (Maybe Int
   -> Maybe V1TCPSocketAction
   -> Maybe Integer
   -> Maybe Int
   -> V1Probe)
-> Parser (Maybe Int)
-> Parser
     (Maybe V1TCPSocketAction -> Maybe Integer -> Maybe Int -> V1Probe)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"successThreshold")
      Parser
  (Maybe V1TCPSocketAction -> Maybe Integer -> Maybe Int -> V1Probe)
-> Parser (Maybe V1TCPSocketAction)
-> Parser (Maybe Integer -> Maybe Int -> V1Probe)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1TCPSocketAction)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"tcpSocket")
      Parser (Maybe Integer -> Maybe Int -> V1Probe)
-> Parser (Maybe Integer) -> Parser (Maybe Int -> V1Probe)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"terminationGracePeriodSeconds")
      Parser (Maybe Int -> V1Probe)
-> Parser (Maybe Int) -> Parser V1Probe
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"timeoutSeconds")

-- | ToJSON V1Probe
instance A.ToJSON V1Probe where
  toJSON :: V1Probe -> Value
toJSON V1Probe {Maybe Int
Maybe Integer
Maybe V1TCPSocketAction
Maybe V1HTTPGetAction
Maybe V1GRPCAction
Maybe V1ExecAction
$sel:v1ProbeExec:V1Probe :: V1Probe -> Maybe V1ExecAction
$sel:v1ProbeFailureThreshold:V1Probe :: V1Probe -> Maybe Int
$sel:v1ProbeGrpc:V1Probe :: V1Probe -> Maybe V1GRPCAction
$sel:v1ProbeHttpGet:V1Probe :: V1Probe -> Maybe V1HTTPGetAction
$sel:v1ProbeInitialDelaySeconds:V1Probe :: V1Probe -> Maybe Int
$sel:v1ProbePeriodSeconds:V1Probe :: V1Probe -> Maybe Int
$sel:v1ProbeSuccessThreshold:V1Probe :: V1Probe -> Maybe Int
$sel:v1ProbeTcpSocket:V1Probe :: V1Probe -> Maybe V1TCPSocketAction
$sel:v1ProbeTerminationGracePeriodSeconds:V1Probe :: V1Probe -> Maybe Integer
$sel:v1ProbeTimeoutSeconds:V1Probe :: V1Probe -> Maybe Int
v1ProbeExec :: Maybe V1ExecAction
v1ProbeFailureThreshold :: Maybe Int
v1ProbeGrpc :: Maybe V1GRPCAction
v1ProbeHttpGet :: Maybe V1HTTPGetAction
v1ProbeInitialDelaySeconds :: Maybe Int
v1ProbePeriodSeconds :: Maybe Int
v1ProbeSuccessThreshold :: Maybe Int
v1ProbeTcpSocket :: Maybe V1TCPSocketAction
v1ProbeTerminationGracePeriodSeconds :: Maybe Integer
v1ProbeTimeoutSeconds :: Maybe Int
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"exec" Key -> Maybe V1ExecAction -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ExecAction
v1ProbeExec
      , Key
"failureThreshold" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1ProbeFailureThreshold
      , Key
"grpc" Key -> Maybe V1GRPCAction -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1GRPCAction
v1ProbeGrpc
      , Key
"httpGet" Key -> Maybe V1HTTPGetAction -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1HTTPGetAction
v1ProbeHttpGet
      , Key
"initialDelaySeconds" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1ProbeInitialDelaySeconds
      , Key
"periodSeconds" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1ProbePeriodSeconds
      , Key
"successThreshold" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1ProbeSuccessThreshold
      , Key
"tcpSocket" Key -> Maybe V1TCPSocketAction -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1TCPSocketAction
v1ProbeTcpSocket
      , Key
"terminationGracePeriodSeconds" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1ProbeTerminationGracePeriodSeconds
      , Key
"timeoutSeconds" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1ProbeTimeoutSeconds
      ]


-- | Construct a value of type 'V1Probe' (by applying it's required fields, if any)
mkV1Probe
  :: V1Probe
mkV1Probe :: V1Probe
mkV1Probe =
  V1Probe
  { $sel:v1ProbeExec:V1Probe :: Maybe V1ExecAction
v1ProbeExec = Maybe V1ExecAction
forall a. Maybe a
Nothing
  , $sel:v1ProbeFailureThreshold:V1Probe :: Maybe Int
v1ProbeFailureThreshold = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1ProbeGrpc:V1Probe :: Maybe V1GRPCAction
v1ProbeGrpc = Maybe V1GRPCAction
forall a. Maybe a
Nothing
  , $sel:v1ProbeHttpGet:V1Probe :: Maybe V1HTTPGetAction
v1ProbeHttpGet = Maybe V1HTTPGetAction
forall a. Maybe a
Nothing
  , $sel:v1ProbeInitialDelaySeconds:V1Probe :: Maybe Int
v1ProbeInitialDelaySeconds = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1ProbePeriodSeconds:V1Probe :: Maybe Int
v1ProbePeriodSeconds = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1ProbeSuccessThreshold:V1Probe :: Maybe Int
v1ProbeSuccessThreshold = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1ProbeTcpSocket:V1Probe :: Maybe V1TCPSocketAction
v1ProbeTcpSocket = Maybe V1TCPSocketAction
forall a. Maybe a
Nothing
  , $sel:v1ProbeTerminationGracePeriodSeconds:V1Probe :: Maybe Integer
v1ProbeTerminationGracePeriodSeconds = Maybe Integer
forall a. Maybe a
Nothing
  , $sel:v1ProbeTimeoutSeconds:V1Probe :: Maybe Int
v1ProbeTimeoutSeconds = Maybe Int
forall a. Maybe a
Nothing
  }

-- ** V1ProjectedVolumeSource
-- | V1ProjectedVolumeSource
-- Represents a projected volume source
data V1ProjectedVolumeSource = V1ProjectedVolumeSource
  { V1ProjectedVolumeSource -> Maybe Int
v1ProjectedVolumeSourceDefaultMode :: !(Maybe Int) -- ^ "defaultMode" - defaultMode are the mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
  , V1ProjectedVolumeSource -> Maybe [V1VolumeProjection]
v1ProjectedVolumeSourceSources :: !(Maybe [V1VolumeProjection]) -- ^ "sources" - sources is the list of volume projections. Each entry in this list handles one source.
  } deriving (Int -> V1ProjectedVolumeSource -> ShowS
[V1ProjectedVolumeSource] -> ShowS
V1ProjectedVolumeSource -> String
(Int -> V1ProjectedVolumeSource -> ShowS)
-> (V1ProjectedVolumeSource -> String)
-> ([V1ProjectedVolumeSource] -> ShowS)
-> Show V1ProjectedVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ProjectedVolumeSource -> ShowS
showsPrec :: Int -> V1ProjectedVolumeSource -> ShowS
$cshow :: V1ProjectedVolumeSource -> String
show :: V1ProjectedVolumeSource -> String
$cshowList :: [V1ProjectedVolumeSource] -> ShowS
showList :: [V1ProjectedVolumeSource] -> ShowS
P.Show, V1ProjectedVolumeSource -> V1ProjectedVolumeSource -> Bool
(V1ProjectedVolumeSource -> V1ProjectedVolumeSource -> Bool)
-> (V1ProjectedVolumeSource -> V1ProjectedVolumeSource -> Bool)
-> Eq V1ProjectedVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ProjectedVolumeSource -> V1ProjectedVolumeSource -> Bool
== :: V1ProjectedVolumeSource -> V1ProjectedVolumeSource -> Bool
$c/= :: V1ProjectedVolumeSource -> V1ProjectedVolumeSource -> Bool
/= :: V1ProjectedVolumeSource -> V1ProjectedVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ProjectedVolumeSource
instance A.FromJSON V1ProjectedVolumeSource where
  parseJSON :: Value -> Parser V1ProjectedVolumeSource
parseJSON = String
-> (Object -> Parser V1ProjectedVolumeSource)
-> Value
-> Parser V1ProjectedVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ProjectedVolumeSource" ((Object -> Parser V1ProjectedVolumeSource)
 -> Value -> Parser V1ProjectedVolumeSource)
-> (Object -> Parser V1ProjectedVolumeSource)
-> Value
-> Parser V1ProjectedVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Int -> Maybe [V1VolumeProjection] -> V1ProjectedVolumeSource
V1ProjectedVolumeSource
      (Maybe Int
 -> Maybe [V1VolumeProjection] -> V1ProjectedVolumeSource)
-> Parser (Maybe Int)
-> Parser (Maybe [V1VolumeProjection] -> V1ProjectedVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"defaultMode")
      Parser (Maybe [V1VolumeProjection] -> V1ProjectedVolumeSource)
-> Parser (Maybe [V1VolumeProjection])
-> Parser V1ProjectedVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1VolumeProjection])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"sources")

-- | ToJSON V1ProjectedVolumeSource
instance A.ToJSON V1ProjectedVolumeSource where
  toJSON :: V1ProjectedVolumeSource -> Value
toJSON V1ProjectedVolumeSource {Maybe Int
Maybe [V1VolumeProjection]
$sel:v1ProjectedVolumeSourceDefaultMode:V1ProjectedVolumeSource :: V1ProjectedVolumeSource -> Maybe Int
$sel:v1ProjectedVolumeSourceSources:V1ProjectedVolumeSource :: V1ProjectedVolumeSource -> Maybe [V1VolumeProjection]
v1ProjectedVolumeSourceDefaultMode :: Maybe Int
v1ProjectedVolumeSourceSources :: Maybe [V1VolumeProjection]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"defaultMode" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1ProjectedVolumeSourceDefaultMode
      , Key
"sources" Key -> Maybe [V1VolumeProjection] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1VolumeProjection]
v1ProjectedVolumeSourceSources
      ]


-- | Construct a value of type 'V1ProjectedVolumeSource' (by applying it's required fields, if any)
mkV1ProjectedVolumeSource
  :: V1ProjectedVolumeSource
mkV1ProjectedVolumeSource :: V1ProjectedVolumeSource
mkV1ProjectedVolumeSource =
  V1ProjectedVolumeSource
  { $sel:v1ProjectedVolumeSourceDefaultMode:V1ProjectedVolumeSource :: Maybe Int
v1ProjectedVolumeSourceDefaultMode = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1ProjectedVolumeSourceSources:V1ProjectedVolumeSource :: Maybe [V1VolumeProjection]
v1ProjectedVolumeSourceSources = Maybe [V1VolumeProjection]
forall a. Maybe a
Nothing
  }

-- ** V1QueuingConfiguration
-- | V1QueuingConfiguration
-- QueuingConfiguration holds the configuration parameters for queuing
data V1QueuingConfiguration = V1QueuingConfiguration
  { V1QueuingConfiguration -> Maybe Int
v1QueuingConfigurationHandSize :: !(Maybe Int) -- ^ "handSize" - &#x60;handSize&#x60; is a small positive number that configures the shuffle sharding of requests into queues.  When enqueuing a request at this priority level the request&#39;s flow identifier (a string pair) is hashed and the hash value is used to shuffle the list of queues and deal a hand of the size specified here.  The request is put into one of the shortest queues in that hand. &#x60;handSize&#x60; must be no larger than &#x60;queues&#x60;, and should be significantly smaller (so that a few heavy flows do not saturate most of the queues).  See the user-facing documentation for more extensive guidance on setting this field.  This field has a default value of 8.
  , V1QueuingConfiguration -> Maybe Int
v1QueuingConfigurationQueueLengthLimit :: !(Maybe Int) -- ^ "queueLengthLimit" - &#x60;queueLengthLimit&#x60; is the maximum number of requests allowed to be waiting in a given queue of this priority level at a time; excess requests are rejected.  This value must be positive.  If not specified, it will be defaulted to 50.
  , V1QueuingConfiguration -> Maybe Int
v1QueuingConfigurationQueues :: !(Maybe Int) -- ^ "queues" - &#x60;queues&#x60; is the number of queues for this priority level. The queues exist independently at each apiserver. The value must be positive.  Setting it to 1 effectively precludes shufflesharding and thus makes the distinguisher method of associated flow schemas irrelevant.  This field has a default value of 64.
  } deriving (Int -> V1QueuingConfiguration -> ShowS
[V1QueuingConfiguration] -> ShowS
V1QueuingConfiguration -> String
(Int -> V1QueuingConfiguration -> ShowS)
-> (V1QueuingConfiguration -> String)
-> ([V1QueuingConfiguration] -> ShowS)
-> Show V1QueuingConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1QueuingConfiguration -> ShowS
showsPrec :: Int -> V1QueuingConfiguration -> ShowS
$cshow :: V1QueuingConfiguration -> String
show :: V1QueuingConfiguration -> String
$cshowList :: [V1QueuingConfiguration] -> ShowS
showList :: [V1QueuingConfiguration] -> ShowS
P.Show, V1QueuingConfiguration -> V1QueuingConfiguration -> Bool
(V1QueuingConfiguration -> V1QueuingConfiguration -> Bool)
-> (V1QueuingConfiguration -> V1QueuingConfiguration -> Bool)
-> Eq V1QueuingConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1QueuingConfiguration -> V1QueuingConfiguration -> Bool
== :: V1QueuingConfiguration -> V1QueuingConfiguration -> Bool
$c/= :: V1QueuingConfiguration -> V1QueuingConfiguration -> Bool
/= :: V1QueuingConfiguration -> V1QueuingConfiguration -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1QueuingConfiguration
instance A.FromJSON V1QueuingConfiguration where
  parseJSON :: Value -> Parser V1QueuingConfiguration
parseJSON = String
-> (Object -> Parser V1QueuingConfiguration)
-> Value
-> Parser V1QueuingConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1QueuingConfiguration" ((Object -> Parser V1QueuingConfiguration)
 -> Value -> Parser V1QueuingConfiguration)
-> (Object -> Parser V1QueuingConfiguration)
-> Value
-> Parser V1QueuingConfiguration
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Int -> Maybe Int -> Maybe Int -> V1QueuingConfiguration
V1QueuingConfiguration
      (Maybe Int -> Maybe Int -> Maybe Int -> V1QueuingConfiguration)
-> Parser (Maybe Int)
-> Parser (Maybe Int -> Maybe Int -> V1QueuingConfiguration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"handSize")
      Parser (Maybe Int -> Maybe Int -> V1QueuingConfiguration)
-> Parser (Maybe Int)
-> Parser (Maybe Int -> V1QueuingConfiguration)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"queueLengthLimit")
      Parser (Maybe Int -> V1QueuingConfiguration)
-> Parser (Maybe Int) -> Parser V1QueuingConfiguration
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"queues")

-- | ToJSON V1QueuingConfiguration
instance A.ToJSON V1QueuingConfiguration where
  toJSON :: V1QueuingConfiguration -> Value
toJSON V1QueuingConfiguration {Maybe Int
$sel:v1QueuingConfigurationHandSize:V1QueuingConfiguration :: V1QueuingConfiguration -> Maybe Int
$sel:v1QueuingConfigurationQueueLengthLimit:V1QueuingConfiguration :: V1QueuingConfiguration -> Maybe Int
$sel:v1QueuingConfigurationQueues:V1QueuingConfiguration :: V1QueuingConfiguration -> Maybe Int
v1QueuingConfigurationHandSize :: Maybe Int
v1QueuingConfigurationQueueLengthLimit :: Maybe Int
v1QueuingConfigurationQueues :: Maybe Int
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"handSize" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1QueuingConfigurationHandSize
      , Key
"queueLengthLimit" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1QueuingConfigurationQueueLengthLimit
      , Key
"queues" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1QueuingConfigurationQueues
      ]


-- | Construct a value of type 'V1QueuingConfiguration' (by applying it's required fields, if any)
mkV1QueuingConfiguration
  :: V1QueuingConfiguration
mkV1QueuingConfiguration :: V1QueuingConfiguration
mkV1QueuingConfiguration =
  V1QueuingConfiguration
  { $sel:v1QueuingConfigurationHandSize:V1QueuingConfiguration :: Maybe Int
v1QueuingConfigurationHandSize = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1QueuingConfigurationQueueLengthLimit:V1QueuingConfiguration :: Maybe Int
v1QueuingConfigurationQueueLengthLimit = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1QueuingConfigurationQueues:V1QueuingConfiguration :: Maybe Int
v1QueuingConfigurationQueues = Maybe Int
forall a. Maybe a
Nothing
  }

-- ** V1QuobyteVolumeSource
-- | V1QuobyteVolumeSource
-- Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling.
data V1QuobyteVolumeSource = V1QuobyteVolumeSource
  { V1QuobyteVolumeSource -> Maybe Text
v1QuobyteVolumeSourceGroup :: !(Maybe Text) -- ^ "group" - group to map volume access to Default is no group
  , V1QuobyteVolumeSource -> Maybe Bool
v1QuobyteVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - readOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false.
  , V1QuobyteVolumeSource -> Text
v1QuobyteVolumeSourceRegistry :: !(Text) -- ^ /Required/ "registry" - registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes
  , V1QuobyteVolumeSource -> Maybe Text
v1QuobyteVolumeSourceTenant :: !(Maybe Text) -- ^ "tenant" - tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin
  , V1QuobyteVolumeSource -> Maybe Text
v1QuobyteVolumeSourceUser :: !(Maybe Text) -- ^ "user" - user to map volume access to Defaults to serivceaccount user
  , V1QuobyteVolumeSource -> Text
v1QuobyteVolumeSourceVolume :: !(Text) -- ^ /Required/ "volume" - volume is a string that references an already created Quobyte volume by name.
  } deriving (Int -> V1QuobyteVolumeSource -> ShowS
[V1QuobyteVolumeSource] -> ShowS
V1QuobyteVolumeSource -> String
(Int -> V1QuobyteVolumeSource -> ShowS)
-> (V1QuobyteVolumeSource -> String)
-> ([V1QuobyteVolumeSource] -> ShowS)
-> Show V1QuobyteVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1QuobyteVolumeSource -> ShowS
showsPrec :: Int -> V1QuobyteVolumeSource -> ShowS
$cshow :: V1QuobyteVolumeSource -> String
show :: V1QuobyteVolumeSource -> String
$cshowList :: [V1QuobyteVolumeSource] -> ShowS
showList :: [V1QuobyteVolumeSource] -> ShowS
P.Show, V1QuobyteVolumeSource -> V1QuobyteVolumeSource -> Bool
(V1QuobyteVolumeSource -> V1QuobyteVolumeSource -> Bool)
-> (V1QuobyteVolumeSource -> V1QuobyteVolumeSource -> Bool)
-> Eq V1QuobyteVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1QuobyteVolumeSource -> V1QuobyteVolumeSource -> Bool
== :: V1QuobyteVolumeSource -> V1QuobyteVolumeSource -> Bool
$c/= :: V1QuobyteVolumeSource -> V1QuobyteVolumeSource -> Bool
/= :: V1QuobyteVolumeSource -> V1QuobyteVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1QuobyteVolumeSource
instance A.FromJSON V1QuobyteVolumeSource where
  parseJSON :: Value -> Parser V1QuobyteVolumeSource
parseJSON = String
-> (Object -> Parser V1QuobyteVolumeSource)
-> Value
-> Parser V1QuobyteVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1QuobyteVolumeSource" ((Object -> Parser V1QuobyteVolumeSource)
 -> Value -> Parser V1QuobyteVolumeSource)
-> (Object -> Parser V1QuobyteVolumeSource)
-> Value
-> Parser V1QuobyteVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Bool
-> Text
-> Maybe Text
-> Maybe Text
-> Text
-> V1QuobyteVolumeSource
V1QuobyteVolumeSource
      (Maybe Text
 -> Maybe Bool
 -> Text
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> V1QuobyteVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Text
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> V1QuobyteVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"group")
      Parser
  (Maybe Bool
   -> Text
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> V1QuobyteVolumeSource)
-> Parser (Maybe Bool)
-> Parser
     (Text -> Maybe Text -> Maybe Text -> Text -> V1QuobyteVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readOnly")
      Parser
  (Text -> Maybe Text -> Maybe Text -> Text -> V1QuobyteVolumeSource)
-> Parser Text
-> Parser
     (Maybe Text -> Maybe Text -> Text -> V1QuobyteVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"registry")
      Parser (Maybe Text -> Maybe Text -> Text -> V1QuobyteVolumeSource)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Text -> V1QuobyteVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"tenant")
      Parser (Maybe Text -> Text -> V1QuobyteVolumeSource)
-> Parser (Maybe Text) -> Parser (Text -> V1QuobyteVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"user")
      Parser (Text -> V1QuobyteVolumeSource)
-> Parser Text -> Parser V1QuobyteVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"volume")

-- | ToJSON V1QuobyteVolumeSource
instance A.ToJSON V1QuobyteVolumeSource where
  toJSON :: V1QuobyteVolumeSource -> Value
toJSON V1QuobyteVolumeSource {Maybe Bool
Maybe Text
Text
$sel:v1QuobyteVolumeSourceGroup:V1QuobyteVolumeSource :: V1QuobyteVolumeSource -> Maybe Text
$sel:v1QuobyteVolumeSourceReadOnly:V1QuobyteVolumeSource :: V1QuobyteVolumeSource -> Maybe Bool
$sel:v1QuobyteVolumeSourceRegistry:V1QuobyteVolumeSource :: V1QuobyteVolumeSource -> Text
$sel:v1QuobyteVolumeSourceTenant:V1QuobyteVolumeSource :: V1QuobyteVolumeSource -> Maybe Text
$sel:v1QuobyteVolumeSourceUser:V1QuobyteVolumeSource :: V1QuobyteVolumeSource -> Maybe Text
$sel:v1QuobyteVolumeSourceVolume:V1QuobyteVolumeSource :: V1QuobyteVolumeSource -> Text
v1QuobyteVolumeSourceGroup :: Maybe Text
v1QuobyteVolumeSourceReadOnly :: Maybe Bool
v1QuobyteVolumeSourceRegistry :: Text
v1QuobyteVolumeSourceTenant :: Maybe Text
v1QuobyteVolumeSourceUser :: Maybe Text
v1QuobyteVolumeSourceVolume :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"group" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1QuobyteVolumeSourceGroup
      , Key
"readOnly" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1QuobyteVolumeSourceReadOnly
      , Key
"registry" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1QuobyteVolumeSourceRegistry
      , Key
"tenant" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1QuobyteVolumeSourceTenant
      , Key
"user" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1QuobyteVolumeSourceUser
      , Key
"volume" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1QuobyteVolumeSourceVolume
      ]


-- | Construct a value of type 'V1QuobyteVolumeSource' (by applying it's required fields, if any)
mkV1QuobyteVolumeSource
  :: Text -- ^ 'v1QuobyteVolumeSourceRegistry': registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes
  -> Text -- ^ 'v1QuobyteVolumeSourceVolume': volume is a string that references an already created Quobyte volume by name.
  -> V1QuobyteVolumeSource
mkV1QuobyteVolumeSource :: Text -> Text -> V1QuobyteVolumeSource
mkV1QuobyteVolumeSource Text
v1QuobyteVolumeSourceRegistry Text
v1QuobyteVolumeSourceVolume =
  V1QuobyteVolumeSource
  { $sel:v1QuobyteVolumeSourceGroup:V1QuobyteVolumeSource :: Maybe Text
v1QuobyteVolumeSourceGroup = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1QuobyteVolumeSourceReadOnly:V1QuobyteVolumeSource :: Maybe Bool
v1QuobyteVolumeSourceReadOnly = Maybe Bool
forall a. Maybe a
Nothing
  , Text
$sel:v1QuobyteVolumeSourceRegistry:V1QuobyteVolumeSource :: Text
v1QuobyteVolumeSourceRegistry :: Text
v1QuobyteVolumeSourceRegistry
  , $sel:v1QuobyteVolumeSourceTenant:V1QuobyteVolumeSource :: Maybe Text
v1QuobyteVolumeSourceTenant = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1QuobyteVolumeSourceUser:V1QuobyteVolumeSource :: Maybe Text
v1QuobyteVolumeSourceUser = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1QuobyteVolumeSourceVolume:V1QuobyteVolumeSource :: Text
v1QuobyteVolumeSourceVolume :: Text
v1QuobyteVolumeSourceVolume
  }

-- ** V1RBDPersistentVolumeSource
-- | V1RBDPersistentVolumeSource
-- Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.
data V1RBDPersistentVolumeSource = V1RBDPersistentVolumeSource
  { V1RBDPersistentVolumeSource -> Maybe Text
v1RBDPersistentVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \&quot;ext4\&quot;, \&quot;xfs\&quot;, \&quot;ntfs\&quot;. Implicitly inferred to be \&quot;ext4\&quot; if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd
  , V1RBDPersistentVolumeSource -> Text
v1RBDPersistentVolumeSourceImage :: !(Text) -- ^ /Required/ "image" - image is the rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
  , V1RBDPersistentVolumeSource -> Maybe Text
v1RBDPersistentVolumeSourceKeyring :: !(Maybe Text) -- ^ "keyring" - keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
  , V1RBDPersistentVolumeSource -> [Text]
v1RBDPersistentVolumeSourceMonitors :: !([Text]) -- ^ /Required/ "monitors" - monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
  , V1RBDPersistentVolumeSource -> Maybe Text
v1RBDPersistentVolumeSourcePool :: !(Maybe Text) -- ^ "pool" - pool is the rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
  , V1RBDPersistentVolumeSource -> Maybe Bool
v1RBDPersistentVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
  , V1RBDPersistentVolumeSource -> Maybe V1SecretReference
v1RBDPersistentVolumeSourceSecretRef :: !(Maybe V1SecretReference) -- ^ "secretRef"
  , V1RBDPersistentVolumeSource -> Maybe Text
v1RBDPersistentVolumeSourceUser :: !(Maybe Text) -- ^ "user" - user is the rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
  } deriving (Int -> V1RBDPersistentVolumeSource -> ShowS
[V1RBDPersistentVolumeSource] -> ShowS
V1RBDPersistentVolumeSource -> String
(Int -> V1RBDPersistentVolumeSource -> ShowS)
-> (V1RBDPersistentVolumeSource -> String)
-> ([V1RBDPersistentVolumeSource] -> ShowS)
-> Show V1RBDPersistentVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1RBDPersistentVolumeSource -> ShowS
showsPrec :: Int -> V1RBDPersistentVolumeSource -> ShowS
$cshow :: V1RBDPersistentVolumeSource -> String
show :: V1RBDPersistentVolumeSource -> String
$cshowList :: [V1RBDPersistentVolumeSource] -> ShowS
showList :: [V1RBDPersistentVolumeSource] -> ShowS
P.Show, V1RBDPersistentVolumeSource -> V1RBDPersistentVolumeSource -> Bool
(V1RBDPersistentVolumeSource
 -> V1RBDPersistentVolumeSource -> Bool)
-> (V1RBDPersistentVolumeSource
    -> V1RBDPersistentVolumeSource -> Bool)
-> Eq V1RBDPersistentVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1RBDPersistentVolumeSource -> V1RBDPersistentVolumeSource -> Bool
== :: V1RBDPersistentVolumeSource -> V1RBDPersistentVolumeSource -> Bool
$c/= :: V1RBDPersistentVolumeSource -> V1RBDPersistentVolumeSource -> Bool
/= :: V1RBDPersistentVolumeSource -> V1RBDPersistentVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1RBDPersistentVolumeSource
instance A.FromJSON V1RBDPersistentVolumeSource where
  parseJSON :: Value -> Parser V1RBDPersistentVolumeSource
parseJSON = String
-> (Object -> Parser V1RBDPersistentVolumeSource)
-> Value
-> Parser V1RBDPersistentVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1RBDPersistentVolumeSource" ((Object -> Parser V1RBDPersistentVolumeSource)
 -> Value -> Parser V1RBDPersistentVolumeSource)
-> (Object -> Parser V1RBDPersistentVolumeSource)
-> Value
-> Parser V1RBDPersistentVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Text
-> Maybe Text
-> [Text]
-> Maybe Text
-> Maybe Bool
-> Maybe V1SecretReference
-> Maybe Text
-> V1RBDPersistentVolumeSource
V1RBDPersistentVolumeSource
      (Maybe Text
 -> Text
 -> Maybe Text
 -> [Text]
 -> Maybe Text
 -> Maybe Bool
 -> Maybe V1SecretReference
 -> Maybe Text
 -> V1RBDPersistentVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Text
      -> Maybe Text
      -> [Text]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe V1SecretReference
      -> Maybe Text
      -> V1RBDPersistentVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fsType")
      Parser
  (Text
   -> Maybe Text
   -> [Text]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe V1SecretReference
   -> Maybe Text
   -> V1RBDPersistentVolumeSource)
-> Parser Text
-> Parser
     (Maybe Text
      -> [Text]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe V1SecretReference
      -> Maybe Text
      -> V1RBDPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"image")
      Parser
  (Maybe Text
   -> [Text]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe V1SecretReference
   -> Maybe Text
   -> V1RBDPersistentVolumeSource)
-> Parser (Maybe Text)
-> Parser
     ([Text]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe V1SecretReference
      -> Maybe Text
      -> V1RBDPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"keyring")
      Parser
  ([Text]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe V1SecretReference
   -> Maybe Text
   -> V1RBDPersistentVolumeSource)
-> Parser [Text]
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe V1SecretReference
      -> Maybe Text
      -> V1RBDPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"monitors")
      Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe V1SecretReference
   -> Maybe Text
   -> V1RBDPersistentVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe V1SecretReference
      -> Maybe Text
      -> V1RBDPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"pool")
      Parser
  (Maybe Bool
   -> Maybe V1SecretReference
   -> Maybe Text
   -> V1RBDPersistentVolumeSource)
-> Parser (Maybe Bool)
-> Parser
     (Maybe V1SecretReference
      -> Maybe Text -> V1RBDPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readOnly")
      Parser
  (Maybe V1SecretReference
   -> Maybe Text -> V1RBDPersistentVolumeSource)
-> Parser (Maybe V1SecretReference)
-> Parser (Maybe Text -> V1RBDPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1SecretReference)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"secretRef")
      Parser (Maybe Text -> V1RBDPersistentVolumeSource)
-> Parser (Maybe Text) -> Parser V1RBDPersistentVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"user")

-- | ToJSON V1RBDPersistentVolumeSource
instance A.ToJSON V1RBDPersistentVolumeSource where
  toJSON :: V1RBDPersistentVolumeSource -> Value
toJSON V1RBDPersistentVolumeSource {[Text]
Maybe Bool
Maybe Text
Maybe V1SecretReference
Text
$sel:v1RBDPersistentVolumeSourceFsType:V1RBDPersistentVolumeSource :: V1RBDPersistentVolumeSource -> Maybe Text
$sel:v1RBDPersistentVolumeSourceImage:V1RBDPersistentVolumeSource :: V1RBDPersistentVolumeSource -> Text
$sel:v1RBDPersistentVolumeSourceKeyring:V1RBDPersistentVolumeSource :: V1RBDPersistentVolumeSource -> Maybe Text
$sel:v1RBDPersistentVolumeSourceMonitors:V1RBDPersistentVolumeSource :: V1RBDPersistentVolumeSource -> [Text]
$sel:v1RBDPersistentVolumeSourcePool:V1RBDPersistentVolumeSource :: V1RBDPersistentVolumeSource -> Maybe Text
$sel:v1RBDPersistentVolumeSourceReadOnly:V1RBDPersistentVolumeSource :: V1RBDPersistentVolumeSource -> Maybe Bool
$sel:v1RBDPersistentVolumeSourceSecretRef:V1RBDPersistentVolumeSource :: V1RBDPersistentVolumeSource -> Maybe V1SecretReference
$sel:v1RBDPersistentVolumeSourceUser:V1RBDPersistentVolumeSource :: V1RBDPersistentVolumeSource -> Maybe Text
v1RBDPersistentVolumeSourceFsType :: Maybe Text
v1RBDPersistentVolumeSourceImage :: Text
v1RBDPersistentVolumeSourceKeyring :: Maybe Text
v1RBDPersistentVolumeSourceMonitors :: [Text]
v1RBDPersistentVolumeSourcePool :: Maybe Text
v1RBDPersistentVolumeSourceReadOnly :: Maybe Bool
v1RBDPersistentVolumeSourceSecretRef :: Maybe V1SecretReference
v1RBDPersistentVolumeSourceUser :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"fsType" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1RBDPersistentVolumeSourceFsType
      , Key
"image" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1RBDPersistentVolumeSourceImage
      , Key
"keyring" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1RBDPersistentVolumeSourceKeyring
      , Key
"monitors" Key -> [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [Text]
v1RBDPersistentVolumeSourceMonitors
      , Key
"pool" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1RBDPersistentVolumeSourcePool
      , Key
"readOnly" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1RBDPersistentVolumeSourceReadOnly
      , Key
"secretRef" Key -> Maybe V1SecretReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1SecretReference
v1RBDPersistentVolumeSourceSecretRef
      , Key
"user" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1RBDPersistentVolumeSourceUser
      ]


-- | Construct a value of type 'V1RBDPersistentVolumeSource' (by applying it's required fields, if any)
mkV1RBDPersistentVolumeSource
  :: Text -- ^ 'v1RBDPersistentVolumeSourceImage': image is the rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
  -> [Text] -- ^ 'v1RBDPersistentVolumeSourceMonitors': monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
  -> V1RBDPersistentVolumeSource
mkV1RBDPersistentVolumeSource :: Text -> [Text] -> V1RBDPersistentVolumeSource
mkV1RBDPersistentVolumeSource Text
v1RBDPersistentVolumeSourceImage [Text]
v1RBDPersistentVolumeSourceMonitors =
  V1RBDPersistentVolumeSource
  { $sel:v1RBDPersistentVolumeSourceFsType:V1RBDPersistentVolumeSource :: Maybe Text
v1RBDPersistentVolumeSourceFsType = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1RBDPersistentVolumeSourceImage:V1RBDPersistentVolumeSource :: Text
v1RBDPersistentVolumeSourceImage :: Text
v1RBDPersistentVolumeSourceImage
  , $sel:v1RBDPersistentVolumeSourceKeyring:V1RBDPersistentVolumeSource :: Maybe Text
v1RBDPersistentVolumeSourceKeyring = Maybe Text
forall a. Maybe a
Nothing
  , [Text]
$sel:v1RBDPersistentVolumeSourceMonitors:V1RBDPersistentVolumeSource :: [Text]
v1RBDPersistentVolumeSourceMonitors :: [Text]
v1RBDPersistentVolumeSourceMonitors
  , $sel:v1RBDPersistentVolumeSourcePool:V1RBDPersistentVolumeSource :: Maybe Text
v1RBDPersistentVolumeSourcePool = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1RBDPersistentVolumeSourceReadOnly:V1RBDPersistentVolumeSource :: Maybe Bool
v1RBDPersistentVolumeSourceReadOnly = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1RBDPersistentVolumeSourceSecretRef:V1RBDPersistentVolumeSource :: Maybe V1SecretReference
v1RBDPersistentVolumeSourceSecretRef = Maybe V1SecretReference
forall a. Maybe a
Nothing
  , $sel:v1RBDPersistentVolumeSourceUser:V1RBDPersistentVolumeSource :: Maybe Text
v1RBDPersistentVolumeSourceUser = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1RBDVolumeSource
-- | V1RBDVolumeSource
-- Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.
data V1RBDVolumeSource = V1RBDVolumeSource
  { V1RBDVolumeSource -> Maybe Text
v1RBDVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \&quot;ext4\&quot;, \&quot;xfs\&quot;, \&quot;ntfs\&quot;. Implicitly inferred to be \&quot;ext4\&quot; if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd
  , V1RBDVolumeSource -> Text
v1RBDVolumeSourceImage :: !(Text) -- ^ /Required/ "image" - image is the rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
  , V1RBDVolumeSource -> Maybe Text
v1RBDVolumeSourceKeyring :: !(Maybe Text) -- ^ "keyring" - keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
  , V1RBDVolumeSource -> [Text]
v1RBDVolumeSourceMonitors :: !([Text]) -- ^ /Required/ "monitors" - monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
  , V1RBDVolumeSource -> Maybe Text
v1RBDVolumeSourcePool :: !(Maybe Text) -- ^ "pool" - pool is the rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
  , V1RBDVolumeSource -> Maybe Bool
v1RBDVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
  , V1RBDVolumeSource -> Maybe V1LocalObjectReference
v1RBDVolumeSourceSecretRef :: !(Maybe V1LocalObjectReference) -- ^ "secretRef"
  , V1RBDVolumeSource -> Maybe Text
v1RBDVolumeSourceUser :: !(Maybe Text) -- ^ "user" - user is the rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
  } deriving (Int -> V1RBDVolumeSource -> ShowS
[V1RBDVolumeSource] -> ShowS
V1RBDVolumeSource -> String
(Int -> V1RBDVolumeSource -> ShowS)
-> (V1RBDVolumeSource -> String)
-> ([V1RBDVolumeSource] -> ShowS)
-> Show V1RBDVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1RBDVolumeSource -> ShowS
showsPrec :: Int -> V1RBDVolumeSource -> ShowS
$cshow :: V1RBDVolumeSource -> String
show :: V1RBDVolumeSource -> String
$cshowList :: [V1RBDVolumeSource] -> ShowS
showList :: [V1RBDVolumeSource] -> ShowS
P.Show, V1RBDVolumeSource -> V1RBDVolumeSource -> Bool
(V1RBDVolumeSource -> V1RBDVolumeSource -> Bool)
-> (V1RBDVolumeSource -> V1RBDVolumeSource -> Bool)
-> Eq V1RBDVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1RBDVolumeSource -> V1RBDVolumeSource -> Bool
== :: V1RBDVolumeSource -> V1RBDVolumeSource -> Bool
$c/= :: V1RBDVolumeSource -> V1RBDVolumeSource -> Bool
/= :: V1RBDVolumeSource -> V1RBDVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1RBDVolumeSource
instance A.FromJSON V1RBDVolumeSource where
  parseJSON :: Value -> Parser V1RBDVolumeSource
parseJSON = String
-> (Object -> Parser V1RBDVolumeSource)
-> Value
-> Parser V1RBDVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1RBDVolumeSource" ((Object -> Parser V1RBDVolumeSource)
 -> Value -> Parser V1RBDVolumeSource)
-> (Object -> Parser V1RBDVolumeSource)
-> Value
-> Parser V1RBDVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Text
-> Maybe Text
-> [Text]
-> Maybe Text
-> Maybe Bool
-> Maybe V1LocalObjectReference
-> Maybe Text
-> V1RBDVolumeSource
V1RBDVolumeSource
      (Maybe Text
 -> Text
 -> Maybe Text
 -> [Text]
 -> Maybe Text
 -> Maybe Bool
 -> Maybe V1LocalObjectReference
 -> Maybe Text
 -> V1RBDVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Text
      -> Maybe Text
      -> [Text]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe V1LocalObjectReference
      -> Maybe Text
      -> V1RBDVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fsType")
      Parser
  (Text
   -> Maybe Text
   -> [Text]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe V1LocalObjectReference
   -> Maybe Text
   -> V1RBDVolumeSource)
-> Parser Text
-> Parser
     (Maybe Text
      -> [Text]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe V1LocalObjectReference
      -> Maybe Text
      -> V1RBDVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"image")
      Parser
  (Maybe Text
   -> [Text]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe V1LocalObjectReference
   -> Maybe Text
   -> V1RBDVolumeSource)
-> Parser (Maybe Text)
-> Parser
     ([Text]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe V1LocalObjectReference
      -> Maybe Text
      -> V1RBDVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"keyring")
      Parser
  ([Text]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe V1LocalObjectReference
   -> Maybe Text
   -> V1RBDVolumeSource)
-> Parser [Text]
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe V1LocalObjectReference
      -> Maybe Text
      -> V1RBDVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"monitors")
      Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe V1LocalObjectReference
   -> Maybe Text
   -> V1RBDVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe V1LocalObjectReference -> Maybe Text -> V1RBDVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"pool")
      Parser
  (Maybe Bool
   -> Maybe V1LocalObjectReference -> Maybe Text -> V1RBDVolumeSource)
-> Parser (Maybe Bool)
-> Parser
     (Maybe V1LocalObjectReference -> Maybe Text -> V1RBDVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readOnly")
      Parser
  (Maybe V1LocalObjectReference -> Maybe Text -> V1RBDVolumeSource)
-> Parser (Maybe V1LocalObjectReference)
-> Parser (Maybe Text -> V1RBDVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LocalObjectReference)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"secretRef")
      Parser (Maybe Text -> V1RBDVolumeSource)
-> Parser (Maybe Text) -> Parser V1RBDVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"user")

-- | ToJSON V1RBDVolumeSource
instance A.ToJSON V1RBDVolumeSource where
  toJSON :: V1RBDVolumeSource -> Value
toJSON V1RBDVolumeSource {[Text]
Maybe Bool
Maybe Text
Maybe V1LocalObjectReference
Text
$sel:v1RBDVolumeSourceFsType:V1RBDVolumeSource :: V1RBDVolumeSource -> Maybe Text
$sel:v1RBDVolumeSourceImage:V1RBDVolumeSource :: V1RBDVolumeSource -> Text
$sel:v1RBDVolumeSourceKeyring:V1RBDVolumeSource :: V1RBDVolumeSource -> Maybe Text
$sel:v1RBDVolumeSourceMonitors:V1RBDVolumeSource :: V1RBDVolumeSource -> [Text]
$sel:v1RBDVolumeSourcePool:V1RBDVolumeSource :: V1RBDVolumeSource -> Maybe Text
$sel:v1RBDVolumeSourceReadOnly:V1RBDVolumeSource :: V1RBDVolumeSource -> Maybe Bool
$sel:v1RBDVolumeSourceSecretRef:V1RBDVolumeSource :: V1RBDVolumeSource -> Maybe V1LocalObjectReference
$sel:v1RBDVolumeSourceUser:V1RBDVolumeSource :: V1RBDVolumeSource -> Maybe Text
v1RBDVolumeSourceFsType :: Maybe Text
v1RBDVolumeSourceImage :: Text
v1RBDVolumeSourceKeyring :: Maybe Text
v1RBDVolumeSourceMonitors :: [Text]
v1RBDVolumeSourcePool :: Maybe Text
v1RBDVolumeSourceReadOnly :: Maybe Bool
v1RBDVolumeSourceSecretRef :: Maybe V1LocalObjectReference
v1RBDVolumeSourceUser :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"fsType" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1RBDVolumeSourceFsType
      , Key
"image" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1RBDVolumeSourceImage
      , Key
"keyring" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1RBDVolumeSourceKeyring
      , Key
"monitors" Key -> [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [Text]
v1RBDVolumeSourceMonitors
      , Key
"pool" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1RBDVolumeSourcePool
      , Key
"readOnly" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1RBDVolumeSourceReadOnly
      , Key
"secretRef" Key -> Maybe V1LocalObjectReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LocalObjectReference
v1RBDVolumeSourceSecretRef
      , Key
"user" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1RBDVolumeSourceUser
      ]


-- | Construct a value of type 'V1RBDVolumeSource' (by applying it's required fields, if any)
mkV1RBDVolumeSource
  :: Text -- ^ 'v1RBDVolumeSourceImage': image is the rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
  -> [Text] -- ^ 'v1RBDVolumeSourceMonitors': monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
  -> V1RBDVolumeSource
mkV1RBDVolumeSource :: Text -> [Text] -> V1RBDVolumeSource
mkV1RBDVolumeSource Text
v1RBDVolumeSourceImage [Text]
v1RBDVolumeSourceMonitors =
  V1RBDVolumeSource
  { $sel:v1RBDVolumeSourceFsType:V1RBDVolumeSource :: Maybe Text
v1RBDVolumeSourceFsType = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1RBDVolumeSourceImage:V1RBDVolumeSource :: Text
v1RBDVolumeSourceImage :: Text
v1RBDVolumeSourceImage
  , $sel:v1RBDVolumeSourceKeyring:V1RBDVolumeSource :: Maybe Text
v1RBDVolumeSourceKeyring = Maybe Text
forall a. Maybe a
Nothing
  , [Text]
$sel:v1RBDVolumeSourceMonitors:V1RBDVolumeSource :: [Text]
v1RBDVolumeSourceMonitors :: [Text]
v1RBDVolumeSourceMonitors
  , $sel:v1RBDVolumeSourcePool:V1RBDVolumeSource :: Maybe Text
v1RBDVolumeSourcePool = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1RBDVolumeSourceReadOnly:V1RBDVolumeSource :: Maybe Bool
v1RBDVolumeSourceReadOnly = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1RBDVolumeSourceSecretRef:V1RBDVolumeSource :: Maybe V1LocalObjectReference
v1RBDVolumeSourceSecretRef = Maybe V1LocalObjectReference
forall a. Maybe a
Nothing
  , $sel:v1RBDVolumeSourceUser:V1RBDVolumeSource :: Maybe Text
v1RBDVolumeSourceUser = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1ReplicaSet
-- | V1ReplicaSet
-- ReplicaSet ensures that a specified number of pod replicas are running at any given time.
data V1ReplicaSet = V1ReplicaSet
  { V1ReplicaSet -> Maybe Text
v1ReplicaSetApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1ReplicaSet -> Maybe Text
v1ReplicaSetKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1ReplicaSet -> Maybe V1ObjectMeta
v1ReplicaSetMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1ReplicaSet -> Maybe V1ReplicaSetSpec
v1ReplicaSetSpec :: !(Maybe V1ReplicaSetSpec) -- ^ "spec"
  , V1ReplicaSet -> Maybe V1ReplicaSetStatus
v1ReplicaSetStatus :: !(Maybe V1ReplicaSetStatus) -- ^ "status"
  } deriving (Int -> V1ReplicaSet -> ShowS
[V1ReplicaSet] -> ShowS
V1ReplicaSet -> String
(Int -> V1ReplicaSet -> ShowS)
-> (V1ReplicaSet -> String)
-> ([V1ReplicaSet] -> ShowS)
-> Show V1ReplicaSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ReplicaSet -> ShowS
showsPrec :: Int -> V1ReplicaSet -> ShowS
$cshow :: V1ReplicaSet -> String
show :: V1ReplicaSet -> String
$cshowList :: [V1ReplicaSet] -> ShowS
showList :: [V1ReplicaSet] -> ShowS
P.Show, V1ReplicaSet -> V1ReplicaSet -> Bool
(V1ReplicaSet -> V1ReplicaSet -> Bool)
-> (V1ReplicaSet -> V1ReplicaSet -> Bool) -> Eq V1ReplicaSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ReplicaSet -> V1ReplicaSet -> Bool
== :: V1ReplicaSet -> V1ReplicaSet -> Bool
$c/= :: V1ReplicaSet -> V1ReplicaSet -> Bool
/= :: V1ReplicaSet -> V1ReplicaSet -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ReplicaSet
instance A.FromJSON V1ReplicaSet where
  parseJSON :: Value -> Parser V1ReplicaSet
parseJSON = String
-> (Object -> Parser V1ReplicaSet) -> Value -> Parser V1ReplicaSet
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ReplicaSet" ((Object -> Parser V1ReplicaSet) -> Value -> Parser V1ReplicaSet)
-> (Object -> Parser V1ReplicaSet) -> Value -> Parser V1ReplicaSet
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1ReplicaSetSpec
-> Maybe V1ReplicaSetStatus
-> V1ReplicaSet
V1ReplicaSet
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1ReplicaSetSpec
 -> Maybe V1ReplicaSetStatus
 -> V1ReplicaSet)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1ReplicaSetSpec
      -> Maybe V1ReplicaSetStatus
      -> V1ReplicaSet)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1ReplicaSetSpec
   -> Maybe V1ReplicaSetStatus
   -> V1ReplicaSet)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1ReplicaSetSpec
      -> Maybe V1ReplicaSetStatus
      -> V1ReplicaSet)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1ReplicaSetSpec
   -> Maybe V1ReplicaSetStatus
   -> V1ReplicaSet)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe V1ReplicaSetSpec
      -> Maybe V1ReplicaSetStatus -> V1ReplicaSet)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (Maybe V1ReplicaSetSpec
   -> Maybe V1ReplicaSetStatus -> V1ReplicaSet)
-> Parser (Maybe V1ReplicaSetSpec)
-> Parser (Maybe V1ReplicaSetStatus -> V1ReplicaSet)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ReplicaSetSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")
      Parser (Maybe V1ReplicaSetStatus -> V1ReplicaSet)
-> Parser (Maybe V1ReplicaSetStatus) -> Parser V1ReplicaSet
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ReplicaSetStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1ReplicaSet
instance A.ToJSON V1ReplicaSet where
  toJSON :: V1ReplicaSet -> Value
toJSON V1ReplicaSet {Maybe Text
Maybe V1ReplicaSetStatus
Maybe V1ReplicaSetSpec
Maybe V1ObjectMeta
$sel:v1ReplicaSetApiVersion:V1ReplicaSet :: V1ReplicaSet -> Maybe Text
$sel:v1ReplicaSetKind:V1ReplicaSet :: V1ReplicaSet -> Maybe Text
$sel:v1ReplicaSetMetadata:V1ReplicaSet :: V1ReplicaSet -> Maybe V1ObjectMeta
$sel:v1ReplicaSetSpec:V1ReplicaSet :: V1ReplicaSet -> Maybe V1ReplicaSetSpec
$sel:v1ReplicaSetStatus:V1ReplicaSet :: V1ReplicaSet -> Maybe V1ReplicaSetStatus
v1ReplicaSetApiVersion :: Maybe Text
v1ReplicaSetKind :: Maybe Text
v1ReplicaSetMetadata :: Maybe V1ObjectMeta
v1ReplicaSetSpec :: Maybe V1ReplicaSetSpec
v1ReplicaSetStatus :: Maybe V1ReplicaSetStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ReplicaSetApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ReplicaSetKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1ReplicaSetMetadata
      , Key
"spec" Key -> Maybe V1ReplicaSetSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ReplicaSetSpec
v1ReplicaSetSpec
      , Key
"status" Key -> Maybe V1ReplicaSetStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ReplicaSetStatus
v1ReplicaSetStatus
      ]


-- | Construct a value of type 'V1ReplicaSet' (by applying it's required fields, if any)
mkV1ReplicaSet
  :: V1ReplicaSet
mkV1ReplicaSet :: V1ReplicaSet
mkV1ReplicaSet =
  V1ReplicaSet
  { $sel:v1ReplicaSetApiVersion:V1ReplicaSet :: Maybe Text
v1ReplicaSetApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ReplicaSetKind:V1ReplicaSet :: Maybe Text
v1ReplicaSetKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ReplicaSetMetadata:V1ReplicaSet :: Maybe V1ObjectMeta
v1ReplicaSetMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1ReplicaSetSpec:V1ReplicaSet :: Maybe V1ReplicaSetSpec
v1ReplicaSetSpec = Maybe V1ReplicaSetSpec
forall a. Maybe a
Nothing
  , $sel:v1ReplicaSetStatus:V1ReplicaSet :: Maybe V1ReplicaSetStatus
v1ReplicaSetStatus = Maybe V1ReplicaSetStatus
forall a. Maybe a
Nothing
  }

-- ** V1ReplicaSetCondition
-- | V1ReplicaSetCondition
-- ReplicaSetCondition describes the state of a replica set at a certain point.
data V1ReplicaSetCondition = V1ReplicaSetCondition
  { V1ReplicaSetCondition -> Maybe DateTime
v1ReplicaSetConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - The last time the condition transitioned from one status to another.
  , V1ReplicaSetCondition -> Maybe Text
v1ReplicaSetConditionMessage :: !(Maybe Text) -- ^ "message" - A human readable message indicating details about the transition.
  , V1ReplicaSetCondition -> Maybe Text
v1ReplicaSetConditionReason :: !(Maybe Text) -- ^ "reason" - The reason for the condition&#39;s last transition.
  , V1ReplicaSetCondition -> Text
v1ReplicaSetConditionStatus :: !(Text) -- ^ /Required/ "status" - Status of the condition, one of True, False, Unknown.
  , V1ReplicaSetCondition -> Text
v1ReplicaSetConditionType :: !(Text) -- ^ /Required/ "type" - Type of replica set condition.
  } deriving (Int -> V1ReplicaSetCondition -> ShowS
[V1ReplicaSetCondition] -> ShowS
V1ReplicaSetCondition -> String
(Int -> V1ReplicaSetCondition -> ShowS)
-> (V1ReplicaSetCondition -> String)
-> ([V1ReplicaSetCondition] -> ShowS)
-> Show V1ReplicaSetCondition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ReplicaSetCondition -> ShowS
showsPrec :: Int -> V1ReplicaSetCondition -> ShowS
$cshow :: V1ReplicaSetCondition -> String
show :: V1ReplicaSetCondition -> String
$cshowList :: [V1ReplicaSetCondition] -> ShowS
showList :: [V1ReplicaSetCondition] -> ShowS
P.Show, V1ReplicaSetCondition -> V1ReplicaSetCondition -> Bool
(V1ReplicaSetCondition -> V1ReplicaSetCondition -> Bool)
-> (V1ReplicaSetCondition -> V1ReplicaSetCondition -> Bool)
-> Eq V1ReplicaSetCondition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ReplicaSetCondition -> V1ReplicaSetCondition -> Bool
== :: V1ReplicaSetCondition -> V1ReplicaSetCondition -> Bool
$c/= :: V1ReplicaSetCondition -> V1ReplicaSetCondition -> Bool
/= :: V1ReplicaSetCondition -> V1ReplicaSetCondition -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ReplicaSetCondition
instance A.FromJSON V1ReplicaSetCondition where
  parseJSON :: Value -> Parser V1ReplicaSetCondition
parseJSON = String
-> (Object -> Parser V1ReplicaSetCondition)
-> Value
-> Parser V1ReplicaSetCondition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ReplicaSetCondition" ((Object -> Parser V1ReplicaSetCondition)
 -> Value -> Parser V1ReplicaSetCondition)
-> (Object -> Parser V1ReplicaSetCondition)
-> Value
-> Parser V1ReplicaSetCondition
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe DateTime
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> V1ReplicaSetCondition
V1ReplicaSetCondition
      (Maybe DateTime
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> Text
 -> V1ReplicaSetCondition)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe Text -> Maybe Text -> Text -> Text -> V1ReplicaSetCondition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lastTransitionTime")
      Parser
  (Maybe Text -> Maybe Text -> Text -> Text -> V1ReplicaSetCondition)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Text -> Text -> V1ReplicaSetCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"message")
      Parser (Maybe Text -> Text -> Text -> V1ReplicaSetCondition)
-> Parser (Maybe Text)
-> Parser (Text -> Text -> V1ReplicaSetCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reason")
      Parser (Text -> Text -> V1ReplicaSetCondition)
-> Parser Text -> Parser (Text -> V1ReplicaSetCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"status")
      Parser (Text -> V1ReplicaSetCondition)
-> Parser Text -> Parser V1ReplicaSetCondition
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"type")

-- | ToJSON V1ReplicaSetCondition
instance A.ToJSON V1ReplicaSetCondition where
  toJSON :: V1ReplicaSetCondition -> Value
toJSON V1ReplicaSetCondition {Maybe Text
Maybe DateTime
Text
$sel:v1ReplicaSetConditionLastTransitionTime:V1ReplicaSetCondition :: V1ReplicaSetCondition -> Maybe DateTime
$sel:v1ReplicaSetConditionMessage:V1ReplicaSetCondition :: V1ReplicaSetCondition -> Maybe Text
$sel:v1ReplicaSetConditionReason:V1ReplicaSetCondition :: V1ReplicaSetCondition -> Maybe Text
$sel:v1ReplicaSetConditionStatus:V1ReplicaSetCondition :: V1ReplicaSetCondition -> Text
$sel:v1ReplicaSetConditionType:V1ReplicaSetCondition :: V1ReplicaSetCondition -> Text
v1ReplicaSetConditionLastTransitionTime :: Maybe DateTime
v1ReplicaSetConditionMessage :: Maybe Text
v1ReplicaSetConditionReason :: Maybe Text
v1ReplicaSetConditionStatus :: Text
v1ReplicaSetConditionType :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"lastTransitionTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1ReplicaSetConditionLastTransitionTime
      , Key
"message" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ReplicaSetConditionMessage
      , Key
"reason" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ReplicaSetConditionReason
      , Key
"status" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ReplicaSetConditionStatus
      , Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ReplicaSetConditionType
      ]


-- | Construct a value of type 'V1ReplicaSetCondition' (by applying it's required fields, if any)
mkV1ReplicaSetCondition
  :: Text -- ^ 'v1ReplicaSetConditionStatus': Status of the condition, one of True, False, Unknown.
  -> Text -- ^ 'v1ReplicaSetConditionType': Type of replica set condition.
  -> V1ReplicaSetCondition
mkV1ReplicaSetCondition :: Text -> Text -> V1ReplicaSetCondition
mkV1ReplicaSetCondition Text
v1ReplicaSetConditionStatus Text
v1ReplicaSetConditionType =
  V1ReplicaSetCondition
  { $sel:v1ReplicaSetConditionLastTransitionTime:V1ReplicaSetCondition :: Maybe DateTime
v1ReplicaSetConditionLastTransitionTime = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1ReplicaSetConditionMessage:V1ReplicaSetCondition :: Maybe Text
v1ReplicaSetConditionMessage = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ReplicaSetConditionReason:V1ReplicaSetCondition :: Maybe Text
v1ReplicaSetConditionReason = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1ReplicaSetConditionStatus:V1ReplicaSetCondition :: Text
v1ReplicaSetConditionStatus :: Text
v1ReplicaSetConditionStatus
  , Text
$sel:v1ReplicaSetConditionType:V1ReplicaSetCondition :: Text
v1ReplicaSetConditionType :: Text
v1ReplicaSetConditionType
  }

-- ** V1ReplicaSetList
-- | V1ReplicaSetList
-- ReplicaSetList is a collection of ReplicaSets.
data V1ReplicaSetList = V1ReplicaSetList
  { V1ReplicaSetList -> Maybe Text
v1ReplicaSetListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1ReplicaSetList -> [V1ReplicaSet]
v1ReplicaSetListItems :: !([V1ReplicaSet]) -- ^ /Required/ "items" - List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
  , V1ReplicaSetList -> Maybe Text
v1ReplicaSetListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1ReplicaSetList -> Maybe V1ListMeta
v1ReplicaSetListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1ReplicaSetList -> ShowS
[V1ReplicaSetList] -> ShowS
V1ReplicaSetList -> String
(Int -> V1ReplicaSetList -> ShowS)
-> (V1ReplicaSetList -> String)
-> ([V1ReplicaSetList] -> ShowS)
-> Show V1ReplicaSetList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ReplicaSetList -> ShowS
showsPrec :: Int -> V1ReplicaSetList -> ShowS
$cshow :: V1ReplicaSetList -> String
show :: V1ReplicaSetList -> String
$cshowList :: [V1ReplicaSetList] -> ShowS
showList :: [V1ReplicaSetList] -> ShowS
P.Show, V1ReplicaSetList -> V1ReplicaSetList -> Bool
(V1ReplicaSetList -> V1ReplicaSetList -> Bool)
-> (V1ReplicaSetList -> V1ReplicaSetList -> Bool)
-> Eq V1ReplicaSetList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ReplicaSetList -> V1ReplicaSetList -> Bool
== :: V1ReplicaSetList -> V1ReplicaSetList -> Bool
$c/= :: V1ReplicaSetList -> V1ReplicaSetList -> Bool
/= :: V1ReplicaSetList -> V1ReplicaSetList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ReplicaSetList
instance A.FromJSON V1ReplicaSetList where
  parseJSON :: Value -> Parser V1ReplicaSetList
parseJSON = String
-> (Object -> Parser V1ReplicaSetList)
-> Value
-> Parser V1ReplicaSetList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ReplicaSetList" ((Object -> Parser V1ReplicaSetList)
 -> Value -> Parser V1ReplicaSetList)
-> (Object -> Parser V1ReplicaSetList)
-> Value
-> Parser V1ReplicaSetList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1ReplicaSet]
-> Maybe Text
-> Maybe V1ListMeta
-> V1ReplicaSetList
V1ReplicaSetList
      (Maybe Text
 -> [V1ReplicaSet]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1ReplicaSetList)
-> Parser (Maybe Text)
-> Parser
     ([V1ReplicaSet]
      -> Maybe Text -> Maybe V1ListMeta -> V1ReplicaSetList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1ReplicaSet]
   -> Maybe Text -> Maybe V1ListMeta -> V1ReplicaSetList)
-> Parser [V1ReplicaSet]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1ReplicaSetList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1ReplicaSet]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1ReplicaSetList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1ReplicaSetList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1ReplicaSetList)
-> Parser (Maybe V1ListMeta) -> Parser V1ReplicaSetList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1ReplicaSetList
instance A.ToJSON V1ReplicaSetList where
  toJSON :: V1ReplicaSetList -> Value
toJSON V1ReplicaSetList {[V1ReplicaSet]
Maybe Text
Maybe V1ListMeta
$sel:v1ReplicaSetListApiVersion:V1ReplicaSetList :: V1ReplicaSetList -> Maybe Text
$sel:v1ReplicaSetListItems:V1ReplicaSetList :: V1ReplicaSetList -> [V1ReplicaSet]
$sel:v1ReplicaSetListKind:V1ReplicaSetList :: V1ReplicaSetList -> Maybe Text
$sel:v1ReplicaSetListMetadata:V1ReplicaSetList :: V1ReplicaSetList -> Maybe V1ListMeta
v1ReplicaSetListApiVersion :: Maybe Text
v1ReplicaSetListItems :: [V1ReplicaSet]
v1ReplicaSetListKind :: Maybe Text
v1ReplicaSetListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ReplicaSetListApiVersion
      , Key
"items" Key -> [V1ReplicaSet] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1ReplicaSet]
v1ReplicaSetListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ReplicaSetListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1ReplicaSetListMetadata
      ]


-- | Construct a value of type 'V1ReplicaSetList' (by applying it's required fields, if any)
mkV1ReplicaSetList
  :: [V1ReplicaSet] -- ^ 'v1ReplicaSetListItems': List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
  -> V1ReplicaSetList
mkV1ReplicaSetList :: [V1ReplicaSet] -> V1ReplicaSetList
mkV1ReplicaSetList [V1ReplicaSet]
v1ReplicaSetListItems =
  V1ReplicaSetList
  { $sel:v1ReplicaSetListApiVersion:V1ReplicaSetList :: Maybe Text
v1ReplicaSetListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1ReplicaSet]
$sel:v1ReplicaSetListItems:V1ReplicaSetList :: [V1ReplicaSet]
v1ReplicaSetListItems :: [V1ReplicaSet]
v1ReplicaSetListItems
  , $sel:v1ReplicaSetListKind:V1ReplicaSetList :: Maybe Text
v1ReplicaSetListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ReplicaSetListMetadata:V1ReplicaSetList :: Maybe V1ListMeta
v1ReplicaSetListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1ReplicaSetSpec
-- | V1ReplicaSetSpec
-- ReplicaSetSpec is the specification of a ReplicaSet.
data V1ReplicaSetSpec = V1ReplicaSetSpec
  { V1ReplicaSetSpec -> Maybe Int
v1ReplicaSetSpecMinReadySeconds :: !(Maybe Int) -- ^ "minReadySeconds" - Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)
  , V1ReplicaSetSpec -> Maybe Int
v1ReplicaSetSpecReplicas :: !(Maybe Int) -- ^ "replicas" - Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
  , V1ReplicaSetSpec -> V1LabelSelector
v1ReplicaSetSpecSelector :: !(V1LabelSelector) -- ^ /Required/ "selector"
  , V1ReplicaSetSpec -> Maybe V1PodTemplateSpec
v1ReplicaSetSpecTemplate :: !(Maybe V1PodTemplateSpec) -- ^ "template"
  } deriving (Int -> V1ReplicaSetSpec -> ShowS
[V1ReplicaSetSpec] -> ShowS
V1ReplicaSetSpec -> String
(Int -> V1ReplicaSetSpec -> ShowS)
-> (V1ReplicaSetSpec -> String)
-> ([V1ReplicaSetSpec] -> ShowS)
-> Show V1ReplicaSetSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ReplicaSetSpec -> ShowS
showsPrec :: Int -> V1ReplicaSetSpec -> ShowS
$cshow :: V1ReplicaSetSpec -> String
show :: V1ReplicaSetSpec -> String
$cshowList :: [V1ReplicaSetSpec] -> ShowS
showList :: [V1ReplicaSetSpec] -> ShowS
P.Show, V1ReplicaSetSpec -> V1ReplicaSetSpec -> Bool
(V1ReplicaSetSpec -> V1ReplicaSetSpec -> Bool)
-> (V1ReplicaSetSpec -> V1ReplicaSetSpec -> Bool)
-> Eq V1ReplicaSetSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ReplicaSetSpec -> V1ReplicaSetSpec -> Bool
== :: V1ReplicaSetSpec -> V1ReplicaSetSpec -> Bool
$c/= :: V1ReplicaSetSpec -> V1ReplicaSetSpec -> Bool
/= :: V1ReplicaSetSpec -> V1ReplicaSetSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ReplicaSetSpec
instance A.FromJSON V1ReplicaSetSpec where
  parseJSON :: Value -> Parser V1ReplicaSetSpec
parseJSON = String
-> (Object -> Parser V1ReplicaSetSpec)
-> Value
-> Parser V1ReplicaSetSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ReplicaSetSpec" ((Object -> Parser V1ReplicaSetSpec)
 -> Value -> Parser V1ReplicaSetSpec)
-> (Object -> Parser V1ReplicaSetSpec)
-> Value
-> Parser V1ReplicaSetSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Int
-> Maybe Int
-> V1LabelSelector
-> Maybe V1PodTemplateSpec
-> V1ReplicaSetSpec
V1ReplicaSetSpec
      (Maybe Int
 -> Maybe Int
 -> V1LabelSelector
 -> Maybe V1PodTemplateSpec
 -> V1ReplicaSetSpec)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> V1LabelSelector -> Maybe V1PodTemplateSpec -> V1ReplicaSetSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"minReadySeconds")
      Parser
  (Maybe Int
   -> V1LabelSelector -> Maybe V1PodTemplateSpec -> V1ReplicaSetSpec)
-> Parser (Maybe Int)
-> Parser
     (V1LabelSelector -> Maybe V1PodTemplateSpec -> V1ReplicaSetSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"replicas")
      Parser
  (V1LabelSelector -> Maybe V1PodTemplateSpec -> V1ReplicaSetSpec)
-> Parser V1LabelSelector
-> Parser (Maybe V1PodTemplateSpec -> V1ReplicaSetSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1LabelSelector
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"selector")
      Parser (Maybe V1PodTemplateSpec -> V1ReplicaSetSpec)
-> Parser (Maybe V1PodTemplateSpec) -> Parser V1ReplicaSetSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1PodTemplateSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"template")

-- | ToJSON V1ReplicaSetSpec
instance A.ToJSON V1ReplicaSetSpec where
  toJSON :: V1ReplicaSetSpec -> Value
toJSON V1ReplicaSetSpec {Maybe Int
Maybe V1PodTemplateSpec
V1LabelSelector
$sel:v1ReplicaSetSpecMinReadySeconds:V1ReplicaSetSpec :: V1ReplicaSetSpec -> Maybe Int
$sel:v1ReplicaSetSpecReplicas:V1ReplicaSetSpec :: V1ReplicaSetSpec -> Maybe Int
$sel:v1ReplicaSetSpecSelector:V1ReplicaSetSpec :: V1ReplicaSetSpec -> V1LabelSelector
$sel:v1ReplicaSetSpecTemplate:V1ReplicaSetSpec :: V1ReplicaSetSpec -> Maybe V1PodTemplateSpec
v1ReplicaSetSpecMinReadySeconds :: Maybe Int
v1ReplicaSetSpecReplicas :: Maybe Int
v1ReplicaSetSpecSelector :: V1LabelSelector
v1ReplicaSetSpecTemplate :: Maybe V1PodTemplateSpec
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"minReadySeconds" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1ReplicaSetSpecMinReadySeconds
      , Key
"replicas" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1ReplicaSetSpecReplicas
      , Key
"selector" Key -> V1LabelSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1LabelSelector
v1ReplicaSetSpecSelector
      , Key
"template" Key -> Maybe V1PodTemplateSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1PodTemplateSpec
v1ReplicaSetSpecTemplate
      ]


-- | Construct a value of type 'V1ReplicaSetSpec' (by applying it's required fields, if any)
mkV1ReplicaSetSpec
  :: V1LabelSelector -- ^ 'v1ReplicaSetSpecSelector' 
  -> V1ReplicaSetSpec
mkV1ReplicaSetSpec :: V1LabelSelector -> V1ReplicaSetSpec
mkV1ReplicaSetSpec V1LabelSelector
v1ReplicaSetSpecSelector =
  V1ReplicaSetSpec
  { $sel:v1ReplicaSetSpecMinReadySeconds:V1ReplicaSetSpec :: Maybe Int
v1ReplicaSetSpecMinReadySeconds = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1ReplicaSetSpecReplicas:V1ReplicaSetSpec :: Maybe Int
v1ReplicaSetSpecReplicas = Maybe Int
forall a. Maybe a
Nothing
  , V1LabelSelector
$sel:v1ReplicaSetSpecSelector:V1ReplicaSetSpec :: V1LabelSelector
v1ReplicaSetSpecSelector :: V1LabelSelector
v1ReplicaSetSpecSelector
  , $sel:v1ReplicaSetSpecTemplate:V1ReplicaSetSpec :: Maybe V1PodTemplateSpec
v1ReplicaSetSpecTemplate = Maybe V1PodTemplateSpec
forall a. Maybe a
Nothing
  }

-- ** V1ReplicaSetStatus
-- | V1ReplicaSetStatus
-- ReplicaSetStatus represents the current status of a ReplicaSet.
data V1ReplicaSetStatus = V1ReplicaSetStatus
  { V1ReplicaSetStatus -> Maybe Int
v1ReplicaSetStatusAvailableReplicas :: !(Maybe Int) -- ^ "availableReplicas" - The number of available replicas (ready for at least minReadySeconds) for this replica set.
  , V1ReplicaSetStatus -> Maybe [V1ReplicaSetCondition]
v1ReplicaSetStatusConditions :: !(Maybe [V1ReplicaSetCondition]) -- ^ "conditions" - Represents the latest available observations of a replica set&#39;s current state.
  , V1ReplicaSetStatus -> Maybe Int
v1ReplicaSetStatusFullyLabeledReplicas :: !(Maybe Int) -- ^ "fullyLabeledReplicas" - The number of pods that have labels matching the labels of the pod template of the replicaset.
  , V1ReplicaSetStatus -> Maybe Integer
v1ReplicaSetStatusObservedGeneration :: !(Maybe Integer) -- ^ "observedGeneration" - ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
  , V1ReplicaSetStatus -> Maybe Int
v1ReplicaSetStatusReadyReplicas :: !(Maybe Int) -- ^ "readyReplicas" - readyReplicas is the number of pods targeted by this ReplicaSet with a Ready Condition.
  , V1ReplicaSetStatus -> Int
v1ReplicaSetStatusReplicas :: !(Int) -- ^ /Required/ "replicas" - Replicas is the most recently observed number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
  } deriving (Int -> V1ReplicaSetStatus -> ShowS
[V1ReplicaSetStatus] -> ShowS
V1ReplicaSetStatus -> String
(Int -> V1ReplicaSetStatus -> ShowS)
-> (V1ReplicaSetStatus -> String)
-> ([V1ReplicaSetStatus] -> ShowS)
-> Show V1ReplicaSetStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ReplicaSetStatus -> ShowS
showsPrec :: Int -> V1ReplicaSetStatus -> ShowS
$cshow :: V1ReplicaSetStatus -> String
show :: V1ReplicaSetStatus -> String
$cshowList :: [V1ReplicaSetStatus] -> ShowS
showList :: [V1ReplicaSetStatus] -> ShowS
P.Show, V1ReplicaSetStatus -> V1ReplicaSetStatus -> Bool
(V1ReplicaSetStatus -> V1ReplicaSetStatus -> Bool)
-> (V1ReplicaSetStatus -> V1ReplicaSetStatus -> Bool)
-> Eq V1ReplicaSetStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ReplicaSetStatus -> V1ReplicaSetStatus -> Bool
== :: V1ReplicaSetStatus -> V1ReplicaSetStatus -> Bool
$c/= :: V1ReplicaSetStatus -> V1ReplicaSetStatus -> Bool
/= :: V1ReplicaSetStatus -> V1ReplicaSetStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ReplicaSetStatus
instance A.FromJSON V1ReplicaSetStatus where
  parseJSON :: Value -> Parser V1ReplicaSetStatus
parseJSON = String
-> (Object -> Parser V1ReplicaSetStatus)
-> Value
-> Parser V1ReplicaSetStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ReplicaSetStatus" ((Object -> Parser V1ReplicaSetStatus)
 -> Value -> Parser V1ReplicaSetStatus)
-> (Object -> Parser V1ReplicaSetStatus)
-> Value
-> Parser V1ReplicaSetStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Int
-> Maybe [V1ReplicaSetCondition]
-> Maybe Int
-> Maybe Integer
-> Maybe Int
-> Int
-> V1ReplicaSetStatus
V1ReplicaSetStatus
      (Maybe Int
 -> Maybe [V1ReplicaSetCondition]
 -> Maybe Int
 -> Maybe Integer
 -> Maybe Int
 -> Int
 -> V1ReplicaSetStatus)
-> Parser (Maybe Int)
-> Parser
     (Maybe [V1ReplicaSetCondition]
      -> Maybe Int
      -> Maybe Integer
      -> Maybe Int
      -> Int
      -> V1ReplicaSetStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"availableReplicas")
      Parser
  (Maybe [V1ReplicaSetCondition]
   -> Maybe Int
   -> Maybe Integer
   -> Maybe Int
   -> Int
   -> V1ReplicaSetStatus)
-> Parser (Maybe [V1ReplicaSetCondition])
-> Parser
     (Maybe Int
      -> Maybe Integer -> Maybe Int -> Int -> V1ReplicaSetStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1ReplicaSetCondition])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"conditions")
      Parser
  (Maybe Int
   -> Maybe Integer -> Maybe Int -> Int -> V1ReplicaSetStatus)
-> Parser (Maybe Int)
-> Parser (Maybe Integer -> Maybe Int -> Int -> V1ReplicaSetStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fullyLabeledReplicas")
      Parser (Maybe Integer -> Maybe Int -> Int -> V1ReplicaSetStatus)
-> Parser (Maybe Integer)
-> Parser (Maybe Int -> Int -> V1ReplicaSetStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"observedGeneration")
      Parser (Maybe Int -> Int -> V1ReplicaSetStatus)
-> Parser (Maybe Int) -> Parser (Int -> V1ReplicaSetStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readyReplicas")
      Parser (Int -> V1ReplicaSetStatus)
-> Parser Int -> Parser V1ReplicaSetStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"replicas")

-- | ToJSON V1ReplicaSetStatus
instance A.ToJSON V1ReplicaSetStatus where
  toJSON :: V1ReplicaSetStatus -> Value
toJSON V1ReplicaSetStatus {Int
Maybe Int
Maybe Integer
Maybe [V1ReplicaSetCondition]
$sel:v1ReplicaSetStatusAvailableReplicas:V1ReplicaSetStatus :: V1ReplicaSetStatus -> Maybe Int
$sel:v1ReplicaSetStatusConditions:V1ReplicaSetStatus :: V1ReplicaSetStatus -> Maybe [V1ReplicaSetCondition]
$sel:v1ReplicaSetStatusFullyLabeledReplicas:V1ReplicaSetStatus :: V1ReplicaSetStatus -> Maybe Int
$sel:v1ReplicaSetStatusObservedGeneration:V1ReplicaSetStatus :: V1ReplicaSetStatus -> Maybe Integer
$sel:v1ReplicaSetStatusReadyReplicas:V1ReplicaSetStatus :: V1ReplicaSetStatus -> Maybe Int
$sel:v1ReplicaSetStatusReplicas:V1ReplicaSetStatus :: V1ReplicaSetStatus -> Int
v1ReplicaSetStatusAvailableReplicas :: Maybe Int
v1ReplicaSetStatusConditions :: Maybe [V1ReplicaSetCondition]
v1ReplicaSetStatusFullyLabeledReplicas :: Maybe Int
v1ReplicaSetStatusObservedGeneration :: Maybe Integer
v1ReplicaSetStatusReadyReplicas :: Maybe Int
v1ReplicaSetStatusReplicas :: Int
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"availableReplicas" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1ReplicaSetStatusAvailableReplicas
      , Key
"conditions" Key -> Maybe [V1ReplicaSetCondition] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1ReplicaSetCondition]
v1ReplicaSetStatusConditions
      , Key
"fullyLabeledReplicas" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1ReplicaSetStatusFullyLabeledReplicas
      , Key
"observedGeneration" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1ReplicaSetStatusObservedGeneration
      , Key
"readyReplicas" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1ReplicaSetStatusReadyReplicas
      , Key
"replicas" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v1ReplicaSetStatusReplicas
      ]


-- | Construct a value of type 'V1ReplicaSetStatus' (by applying it's required fields, if any)
mkV1ReplicaSetStatus
  :: Int -- ^ 'v1ReplicaSetStatusReplicas': Replicas is the most recently observed number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
  -> V1ReplicaSetStatus
mkV1ReplicaSetStatus :: Int -> V1ReplicaSetStatus
mkV1ReplicaSetStatus Int
v1ReplicaSetStatusReplicas =
  V1ReplicaSetStatus
  { $sel:v1ReplicaSetStatusAvailableReplicas:V1ReplicaSetStatus :: Maybe Int
v1ReplicaSetStatusAvailableReplicas = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1ReplicaSetStatusConditions:V1ReplicaSetStatus :: Maybe [V1ReplicaSetCondition]
v1ReplicaSetStatusConditions = Maybe [V1ReplicaSetCondition]
forall a. Maybe a
Nothing
  , $sel:v1ReplicaSetStatusFullyLabeledReplicas:V1ReplicaSetStatus :: Maybe Int
v1ReplicaSetStatusFullyLabeledReplicas = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1ReplicaSetStatusObservedGeneration:V1ReplicaSetStatus :: Maybe Integer
v1ReplicaSetStatusObservedGeneration = Maybe Integer
forall a. Maybe a
Nothing
  , $sel:v1ReplicaSetStatusReadyReplicas:V1ReplicaSetStatus :: Maybe Int
v1ReplicaSetStatusReadyReplicas = Maybe Int
forall a. Maybe a
Nothing
  , Int
$sel:v1ReplicaSetStatusReplicas:V1ReplicaSetStatus :: Int
v1ReplicaSetStatusReplicas :: Int
v1ReplicaSetStatusReplicas
  }

-- ** V1ReplicationController
-- | V1ReplicationController
-- ReplicationController represents the configuration of a replication controller.
data V1ReplicationController = V1ReplicationController
  { V1ReplicationController -> Maybe Text
v1ReplicationControllerApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1ReplicationController -> Maybe Text
v1ReplicationControllerKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1ReplicationController -> Maybe V1ObjectMeta
v1ReplicationControllerMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1ReplicationController -> Maybe V1ReplicationControllerSpec
v1ReplicationControllerSpec :: !(Maybe V1ReplicationControllerSpec) -- ^ "spec"
  , V1ReplicationController -> Maybe V1ReplicationControllerStatus
v1ReplicationControllerStatus :: !(Maybe V1ReplicationControllerStatus) -- ^ "status"
  } deriving (Int -> V1ReplicationController -> ShowS
[V1ReplicationController] -> ShowS
V1ReplicationController -> String
(Int -> V1ReplicationController -> ShowS)
-> (V1ReplicationController -> String)
-> ([V1ReplicationController] -> ShowS)
-> Show V1ReplicationController
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ReplicationController -> ShowS
showsPrec :: Int -> V1ReplicationController -> ShowS
$cshow :: V1ReplicationController -> String
show :: V1ReplicationController -> String
$cshowList :: [V1ReplicationController] -> ShowS
showList :: [V1ReplicationController] -> ShowS
P.Show, V1ReplicationController -> V1ReplicationController -> Bool
(V1ReplicationController -> V1ReplicationController -> Bool)
-> (V1ReplicationController -> V1ReplicationController -> Bool)
-> Eq V1ReplicationController
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ReplicationController -> V1ReplicationController -> Bool
== :: V1ReplicationController -> V1ReplicationController -> Bool
$c/= :: V1ReplicationController -> V1ReplicationController -> Bool
/= :: V1ReplicationController -> V1ReplicationController -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ReplicationController
instance A.FromJSON V1ReplicationController where
  parseJSON :: Value -> Parser V1ReplicationController
parseJSON = String
-> (Object -> Parser V1ReplicationController)
-> Value
-> Parser V1ReplicationController
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ReplicationController" ((Object -> Parser V1ReplicationController)
 -> Value -> Parser V1ReplicationController)
-> (Object -> Parser V1ReplicationController)
-> Value
-> Parser V1ReplicationController
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1ReplicationControllerSpec
-> Maybe V1ReplicationControllerStatus
-> V1ReplicationController
V1ReplicationController
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1ReplicationControllerSpec
 -> Maybe V1ReplicationControllerStatus
 -> V1ReplicationController)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1ReplicationControllerSpec
      -> Maybe V1ReplicationControllerStatus
      -> V1ReplicationController)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1ReplicationControllerSpec
   -> Maybe V1ReplicationControllerStatus
   -> V1ReplicationController)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1ReplicationControllerSpec
      -> Maybe V1ReplicationControllerStatus
      -> V1ReplicationController)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1ReplicationControllerSpec
   -> Maybe V1ReplicationControllerStatus
   -> V1ReplicationController)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe V1ReplicationControllerSpec
      -> Maybe V1ReplicationControllerStatus -> V1ReplicationController)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (Maybe V1ReplicationControllerSpec
   -> Maybe V1ReplicationControllerStatus -> V1ReplicationController)
-> Parser (Maybe V1ReplicationControllerSpec)
-> Parser
     (Maybe V1ReplicationControllerStatus -> V1ReplicationController)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ReplicationControllerSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")
      Parser
  (Maybe V1ReplicationControllerStatus -> V1ReplicationController)
-> Parser (Maybe V1ReplicationControllerStatus)
-> Parser V1ReplicationController
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ReplicationControllerStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1ReplicationController
instance A.ToJSON V1ReplicationController where
  toJSON :: V1ReplicationController -> Value
toJSON V1ReplicationController {Maybe Text
Maybe V1ReplicationControllerStatus
Maybe V1ReplicationControllerSpec
Maybe V1ObjectMeta
$sel:v1ReplicationControllerApiVersion:V1ReplicationController :: V1ReplicationController -> Maybe Text
$sel:v1ReplicationControllerKind:V1ReplicationController :: V1ReplicationController -> Maybe Text
$sel:v1ReplicationControllerMetadata:V1ReplicationController :: V1ReplicationController -> Maybe V1ObjectMeta
$sel:v1ReplicationControllerSpec:V1ReplicationController :: V1ReplicationController -> Maybe V1ReplicationControllerSpec
$sel:v1ReplicationControllerStatus:V1ReplicationController :: V1ReplicationController -> Maybe V1ReplicationControllerStatus
v1ReplicationControllerApiVersion :: Maybe Text
v1ReplicationControllerKind :: Maybe Text
v1ReplicationControllerMetadata :: Maybe V1ObjectMeta
v1ReplicationControllerSpec :: Maybe V1ReplicationControllerSpec
v1ReplicationControllerStatus :: Maybe V1ReplicationControllerStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ReplicationControllerApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ReplicationControllerKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1ReplicationControllerMetadata
      , Key
"spec" Key -> Maybe V1ReplicationControllerSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ReplicationControllerSpec
v1ReplicationControllerSpec
      , Key
"status" Key -> Maybe V1ReplicationControllerStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ReplicationControllerStatus
v1ReplicationControllerStatus
      ]


-- | Construct a value of type 'V1ReplicationController' (by applying it's required fields, if any)
mkV1ReplicationController
  :: V1ReplicationController
mkV1ReplicationController :: V1ReplicationController
mkV1ReplicationController =
  V1ReplicationController
  { $sel:v1ReplicationControllerApiVersion:V1ReplicationController :: Maybe Text
v1ReplicationControllerApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ReplicationControllerKind:V1ReplicationController :: Maybe Text
v1ReplicationControllerKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ReplicationControllerMetadata:V1ReplicationController :: Maybe V1ObjectMeta
v1ReplicationControllerMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1ReplicationControllerSpec:V1ReplicationController :: Maybe V1ReplicationControllerSpec
v1ReplicationControllerSpec = Maybe V1ReplicationControllerSpec
forall a. Maybe a
Nothing
  , $sel:v1ReplicationControllerStatus:V1ReplicationController :: Maybe V1ReplicationControllerStatus
v1ReplicationControllerStatus = Maybe V1ReplicationControllerStatus
forall a. Maybe a
Nothing
  }

-- ** V1ReplicationControllerCondition
-- | V1ReplicationControllerCondition
-- ReplicationControllerCondition describes the state of a replication controller at a certain point.
data V1ReplicationControllerCondition = V1ReplicationControllerCondition
  { V1ReplicationControllerCondition -> Maybe DateTime
v1ReplicationControllerConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - The last time the condition transitioned from one status to another.
  , V1ReplicationControllerCondition -> Maybe Text
v1ReplicationControllerConditionMessage :: !(Maybe Text) -- ^ "message" - A human readable message indicating details about the transition.
  , V1ReplicationControllerCondition -> Maybe Text
v1ReplicationControllerConditionReason :: !(Maybe Text) -- ^ "reason" - The reason for the condition&#39;s last transition.
  , V1ReplicationControllerCondition -> Text
v1ReplicationControllerConditionStatus :: !(Text) -- ^ /Required/ "status" - Status of the condition, one of True, False, Unknown.
  , V1ReplicationControllerCondition -> Text
v1ReplicationControllerConditionType :: !(Text) -- ^ /Required/ "type" - Type of replication controller condition.
  } deriving (Int -> V1ReplicationControllerCondition -> ShowS
[V1ReplicationControllerCondition] -> ShowS
V1ReplicationControllerCondition -> String
(Int -> V1ReplicationControllerCondition -> ShowS)
-> (V1ReplicationControllerCondition -> String)
-> ([V1ReplicationControllerCondition] -> ShowS)
-> Show V1ReplicationControllerCondition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ReplicationControllerCondition -> ShowS
showsPrec :: Int -> V1ReplicationControllerCondition -> ShowS
$cshow :: V1ReplicationControllerCondition -> String
show :: V1ReplicationControllerCondition -> String
$cshowList :: [V1ReplicationControllerCondition] -> ShowS
showList :: [V1ReplicationControllerCondition] -> ShowS
P.Show, V1ReplicationControllerCondition
-> V1ReplicationControllerCondition -> Bool
(V1ReplicationControllerCondition
 -> V1ReplicationControllerCondition -> Bool)
-> (V1ReplicationControllerCondition
    -> V1ReplicationControllerCondition -> Bool)
-> Eq V1ReplicationControllerCondition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ReplicationControllerCondition
-> V1ReplicationControllerCondition -> Bool
== :: V1ReplicationControllerCondition
-> V1ReplicationControllerCondition -> Bool
$c/= :: V1ReplicationControllerCondition
-> V1ReplicationControllerCondition -> Bool
/= :: V1ReplicationControllerCondition
-> V1ReplicationControllerCondition -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ReplicationControllerCondition
instance A.FromJSON V1ReplicationControllerCondition where
  parseJSON :: Value -> Parser V1ReplicationControllerCondition
parseJSON = String
-> (Object -> Parser V1ReplicationControllerCondition)
-> Value
-> Parser V1ReplicationControllerCondition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ReplicationControllerCondition" ((Object -> Parser V1ReplicationControllerCondition)
 -> Value -> Parser V1ReplicationControllerCondition)
-> (Object -> Parser V1ReplicationControllerCondition)
-> Value
-> Parser V1ReplicationControllerCondition
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe DateTime
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> V1ReplicationControllerCondition
V1ReplicationControllerCondition
      (Maybe DateTime
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> Text
 -> V1ReplicationControllerCondition)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe Text
      -> Maybe Text -> Text -> Text -> V1ReplicationControllerCondition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lastTransitionTime")
      Parser
  (Maybe Text
   -> Maybe Text -> Text -> Text -> V1ReplicationControllerCondition)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Text -> Text -> V1ReplicationControllerCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"message")
      Parser
  (Maybe Text -> Text -> Text -> V1ReplicationControllerCondition)
-> Parser (Maybe Text)
-> Parser (Text -> Text -> V1ReplicationControllerCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reason")
      Parser (Text -> Text -> V1ReplicationControllerCondition)
-> Parser Text -> Parser (Text -> V1ReplicationControllerCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"status")
      Parser (Text -> V1ReplicationControllerCondition)
-> Parser Text -> Parser V1ReplicationControllerCondition
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"type")

-- | ToJSON V1ReplicationControllerCondition
instance A.ToJSON V1ReplicationControllerCondition where
  toJSON :: V1ReplicationControllerCondition -> Value
toJSON V1ReplicationControllerCondition {Maybe Text
Maybe DateTime
Text
$sel:v1ReplicationControllerConditionLastTransitionTime:V1ReplicationControllerCondition :: V1ReplicationControllerCondition -> Maybe DateTime
$sel:v1ReplicationControllerConditionMessage:V1ReplicationControllerCondition :: V1ReplicationControllerCondition -> Maybe Text
$sel:v1ReplicationControllerConditionReason:V1ReplicationControllerCondition :: V1ReplicationControllerCondition -> Maybe Text
$sel:v1ReplicationControllerConditionStatus:V1ReplicationControllerCondition :: V1ReplicationControllerCondition -> Text
$sel:v1ReplicationControllerConditionType:V1ReplicationControllerCondition :: V1ReplicationControllerCondition -> Text
v1ReplicationControllerConditionLastTransitionTime :: Maybe DateTime
v1ReplicationControllerConditionMessage :: Maybe Text
v1ReplicationControllerConditionReason :: Maybe Text
v1ReplicationControllerConditionStatus :: Text
v1ReplicationControllerConditionType :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"lastTransitionTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1ReplicationControllerConditionLastTransitionTime
      , Key
"message" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ReplicationControllerConditionMessage
      , Key
"reason" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ReplicationControllerConditionReason
      , Key
"status" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ReplicationControllerConditionStatus
      , Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ReplicationControllerConditionType
      ]


-- | Construct a value of type 'V1ReplicationControllerCondition' (by applying it's required fields, if any)
mkV1ReplicationControllerCondition
  :: Text -- ^ 'v1ReplicationControllerConditionStatus': Status of the condition, one of True, False, Unknown.
  -> Text -- ^ 'v1ReplicationControllerConditionType': Type of replication controller condition.
  -> V1ReplicationControllerCondition
mkV1ReplicationControllerCondition :: Text -> Text -> V1ReplicationControllerCondition
mkV1ReplicationControllerCondition Text
v1ReplicationControllerConditionStatus Text
v1ReplicationControllerConditionType =
  V1ReplicationControllerCondition
  { $sel:v1ReplicationControllerConditionLastTransitionTime:V1ReplicationControllerCondition :: Maybe DateTime
v1ReplicationControllerConditionLastTransitionTime = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1ReplicationControllerConditionMessage:V1ReplicationControllerCondition :: Maybe Text
v1ReplicationControllerConditionMessage = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ReplicationControllerConditionReason:V1ReplicationControllerCondition :: Maybe Text
v1ReplicationControllerConditionReason = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1ReplicationControllerConditionStatus:V1ReplicationControllerCondition :: Text
v1ReplicationControllerConditionStatus :: Text
v1ReplicationControllerConditionStatus
  , Text
$sel:v1ReplicationControllerConditionType:V1ReplicationControllerCondition :: Text
v1ReplicationControllerConditionType :: Text
v1ReplicationControllerConditionType
  }

-- ** V1ReplicationControllerList
-- | V1ReplicationControllerList
-- ReplicationControllerList is a collection of replication controllers.
data V1ReplicationControllerList = V1ReplicationControllerList
  { V1ReplicationControllerList -> Maybe Text
v1ReplicationControllerListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1ReplicationControllerList -> [V1ReplicationController]
v1ReplicationControllerListItems :: !([V1ReplicationController]) -- ^ /Required/ "items" - List of replication controllers. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
  , V1ReplicationControllerList -> Maybe Text
v1ReplicationControllerListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1ReplicationControllerList -> Maybe V1ListMeta
v1ReplicationControllerListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1ReplicationControllerList -> ShowS
[V1ReplicationControllerList] -> ShowS
V1ReplicationControllerList -> String
(Int -> V1ReplicationControllerList -> ShowS)
-> (V1ReplicationControllerList -> String)
-> ([V1ReplicationControllerList] -> ShowS)
-> Show V1ReplicationControllerList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ReplicationControllerList -> ShowS
showsPrec :: Int -> V1ReplicationControllerList -> ShowS
$cshow :: V1ReplicationControllerList -> String
show :: V1ReplicationControllerList -> String
$cshowList :: [V1ReplicationControllerList] -> ShowS
showList :: [V1ReplicationControllerList] -> ShowS
P.Show, V1ReplicationControllerList -> V1ReplicationControllerList -> Bool
(V1ReplicationControllerList
 -> V1ReplicationControllerList -> Bool)
-> (V1ReplicationControllerList
    -> V1ReplicationControllerList -> Bool)
-> Eq V1ReplicationControllerList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ReplicationControllerList -> V1ReplicationControllerList -> Bool
== :: V1ReplicationControllerList -> V1ReplicationControllerList -> Bool
$c/= :: V1ReplicationControllerList -> V1ReplicationControllerList -> Bool
/= :: V1ReplicationControllerList -> V1ReplicationControllerList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ReplicationControllerList
instance A.FromJSON V1ReplicationControllerList where
  parseJSON :: Value -> Parser V1ReplicationControllerList
parseJSON = String
-> (Object -> Parser V1ReplicationControllerList)
-> Value
-> Parser V1ReplicationControllerList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ReplicationControllerList" ((Object -> Parser V1ReplicationControllerList)
 -> Value -> Parser V1ReplicationControllerList)
-> (Object -> Parser V1ReplicationControllerList)
-> Value
-> Parser V1ReplicationControllerList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1ReplicationController]
-> Maybe Text
-> Maybe V1ListMeta
-> V1ReplicationControllerList
V1ReplicationControllerList
      (Maybe Text
 -> [V1ReplicationController]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1ReplicationControllerList)
-> Parser (Maybe Text)
-> Parser
     ([V1ReplicationController]
      -> Maybe Text -> Maybe V1ListMeta -> V1ReplicationControllerList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1ReplicationController]
   -> Maybe Text -> Maybe V1ListMeta -> V1ReplicationControllerList)
-> Parser [V1ReplicationController]
-> Parser
     (Maybe Text -> Maybe V1ListMeta -> V1ReplicationControllerList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1ReplicationController]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser
  (Maybe Text -> Maybe V1ListMeta -> V1ReplicationControllerList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1ReplicationControllerList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1ReplicationControllerList)
-> Parser (Maybe V1ListMeta) -> Parser V1ReplicationControllerList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1ReplicationControllerList
instance A.ToJSON V1ReplicationControllerList where
  toJSON :: V1ReplicationControllerList -> Value
toJSON V1ReplicationControllerList {[V1ReplicationController]
Maybe Text
Maybe V1ListMeta
$sel:v1ReplicationControllerListApiVersion:V1ReplicationControllerList :: V1ReplicationControllerList -> Maybe Text
$sel:v1ReplicationControllerListItems:V1ReplicationControllerList :: V1ReplicationControllerList -> [V1ReplicationController]
$sel:v1ReplicationControllerListKind:V1ReplicationControllerList :: V1ReplicationControllerList -> Maybe Text
$sel:v1ReplicationControllerListMetadata:V1ReplicationControllerList :: V1ReplicationControllerList -> Maybe V1ListMeta
v1ReplicationControllerListApiVersion :: Maybe Text
v1ReplicationControllerListItems :: [V1ReplicationController]
v1ReplicationControllerListKind :: Maybe Text
v1ReplicationControllerListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ReplicationControllerListApiVersion
      , Key
"items" Key -> [V1ReplicationController] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1ReplicationController]
v1ReplicationControllerListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ReplicationControllerListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1ReplicationControllerListMetadata
      ]


-- | Construct a value of type 'V1ReplicationControllerList' (by applying it's required fields, if any)
mkV1ReplicationControllerList
  :: [V1ReplicationController] -- ^ 'v1ReplicationControllerListItems': List of replication controllers. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
  -> V1ReplicationControllerList
mkV1ReplicationControllerList :: [V1ReplicationController] -> V1ReplicationControllerList
mkV1ReplicationControllerList [V1ReplicationController]
v1ReplicationControllerListItems =
  V1ReplicationControllerList
  { $sel:v1ReplicationControllerListApiVersion:V1ReplicationControllerList :: Maybe Text
v1ReplicationControllerListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1ReplicationController]
$sel:v1ReplicationControllerListItems:V1ReplicationControllerList :: [V1ReplicationController]
v1ReplicationControllerListItems :: [V1ReplicationController]
v1ReplicationControllerListItems
  , $sel:v1ReplicationControllerListKind:V1ReplicationControllerList :: Maybe Text
v1ReplicationControllerListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ReplicationControllerListMetadata:V1ReplicationControllerList :: Maybe V1ListMeta
v1ReplicationControllerListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1ReplicationControllerSpec
-- | V1ReplicationControllerSpec
-- ReplicationControllerSpec is the specification of a replication controller.
data V1ReplicationControllerSpec = V1ReplicationControllerSpec
  { V1ReplicationControllerSpec -> Maybe Int
v1ReplicationControllerSpecMinReadySeconds :: !(Maybe Int) -- ^ "minReadySeconds" - Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)
  , V1ReplicationControllerSpec -> Maybe Int
v1ReplicationControllerSpecReplicas :: !(Maybe Int) -- ^ "replicas" - Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller
  , V1ReplicationControllerSpec -> Maybe (Map String Text)
v1ReplicationControllerSpecSelector :: !(Maybe (Map.Map String Text)) -- ^ "selector" - Selector is a label query over pods that should match the Replicas count. If Selector is empty, it is defaulted to the labels present on the Pod template. Label keys and values that must match in order to be controlled by this replication controller, if empty defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
  , V1ReplicationControllerSpec -> Maybe V1PodTemplateSpec
v1ReplicationControllerSpecTemplate :: !(Maybe V1PodTemplateSpec) -- ^ "template"
  } deriving (Int -> V1ReplicationControllerSpec -> ShowS
[V1ReplicationControllerSpec] -> ShowS
V1ReplicationControllerSpec -> String
(Int -> V1ReplicationControllerSpec -> ShowS)
-> (V1ReplicationControllerSpec -> String)
-> ([V1ReplicationControllerSpec] -> ShowS)
-> Show V1ReplicationControllerSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ReplicationControllerSpec -> ShowS
showsPrec :: Int -> V1ReplicationControllerSpec -> ShowS
$cshow :: V1ReplicationControllerSpec -> String
show :: V1ReplicationControllerSpec -> String
$cshowList :: [V1ReplicationControllerSpec] -> ShowS
showList :: [V1ReplicationControllerSpec] -> ShowS
P.Show, V1ReplicationControllerSpec -> V1ReplicationControllerSpec -> Bool
(V1ReplicationControllerSpec
 -> V1ReplicationControllerSpec -> Bool)
-> (V1ReplicationControllerSpec
    -> V1ReplicationControllerSpec -> Bool)
-> Eq V1ReplicationControllerSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ReplicationControllerSpec -> V1ReplicationControllerSpec -> Bool
== :: V1ReplicationControllerSpec -> V1ReplicationControllerSpec -> Bool
$c/= :: V1ReplicationControllerSpec -> V1ReplicationControllerSpec -> Bool
/= :: V1ReplicationControllerSpec -> V1ReplicationControllerSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ReplicationControllerSpec
instance A.FromJSON V1ReplicationControllerSpec where
  parseJSON :: Value -> Parser V1ReplicationControllerSpec
parseJSON = String
-> (Object -> Parser V1ReplicationControllerSpec)
-> Value
-> Parser V1ReplicationControllerSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ReplicationControllerSpec" ((Object -> Parser V1ReplicationControllerSpec)
 -> Value -> Parser V1ReplicationControllerSpec)
-> (Object -> Parser V1ReplicationControllerSpec)
-> Value
-> Parser V1ReplicationControllerSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Int
-> Maybe Int
-> Maybe (Map String Text)
-> Maybe V1PodTemplateSpec
-> V1ReplicationControllerSpec
V1ReplicationControllerSpec
      (Maybe Int
 -> Maybe Int
 -> Maybe (Map String Text)
 -> Maybe V1PodTemplateSpec
 -> V1ReplicationControllerSpec)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe (Map String Text)
      -> Maybe V1PodTemplateSpec
      -> V1ReplicationControllerSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"minReadySeconds")
      Parser
  (Maybe Int
   -> Maybe (Map String Text)
   -> Maybe V1PodTemplateSpec
   -> V1ReplicationControllerSpec)
-> Parser (Maybe Int)
-> Parser
     (Maybe (Map String Text)
      -> Maybe V1PodTemplateSpec -> V1ReplicationControllerSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"replicas")
      Parser
  (Maybe (Map String Text)
   -> Maybe V1PodTemplateSpec -> V1ReplicationControllerSpec)
-> Parser (Maybe (Map String Text))
-> Parser (Maybe V1PodTemplateSpec -> V1ReplicationControllerSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String Text))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"selector")
      Parser (Maybe V1PodTemplateSpec -> V1ReplicationControllerSpec)
-> Parser (Maybe V1PodTemplateSpec)
-> Parser V1ReplicationControllerSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1PodTemplateSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"template")

-- | ToJSON V1ReplicationControllerSpec
instance A.ToJSON V1ReplicationControllerSpec where
  toJSON :: V1ReplicationControllerSpec -> Value
toJSON V1ReplicationControllerSpec {Maybe Int
Maybe (Map String Text)
Maybe V1PodTemplateSpec
$sel:v1ReplicationControllerSpecMinReadySeconds:V1ReplicationControllerSpec :: V1ReplicationControllerSpec -> Maybe Int
$sel:v1ReplicationControllerSpecReplicas:V1ReplicationControllerSpec :: V1ReplicationControllerSpec -> Maybe Int
$sel:v1ReplicationControllerSpecSelector:V1ReplicationControllerSpec :: V1ReplicationControllerSpec -> Maybe (Map String Text)
$sel:v1ReplicationControllerSpecTemplate:V1ReplicationControllerSpec :: V1ReplicationControllerSpec -> Maybe V1PodTemplateSpec
v1ReplicationControllerSpecMinReadySeconds :: Maybe Int
v1ReplicationControllerSpecReplicas :: Maybe Int
v1ReplicationControllerSpecSelector :: Maybe (Map String Text)
v1ReplicationControllerSpecTemplate :: Maybe V1PodTemplateSpec
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"minReadySeconds" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1ReplicationControllerSpecMinReadySeconds
      , Key
"replicas" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1ReplicationControllerSpecReplicas
      , Key
"selector" Key -> Maybe (Map String Text) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Text)
v1ReplicationControllerSpecSelector
      , Key
"template" Key -> Maybe V1PodTemplateSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1PodTemplateSpec
v1ReplicationControllerSpecTemplate
      ]


-- | Construct a value of type 'V1ReplicationControllerSpec' (by applying it's required fields, if any)
mkV1ReplicationControllerSpec
  :: V1ReplicationControllerSpec
mkV1ReplicationControllerSpec :: V1ReplicationControllerSpec
mkV1ReplicationControllerSpec =
  V1ReplicationControllerSpec
  { $sel:v1ReplicationControllerSpecMinReadySeconds:V1ReplicationControllerSpec :: Maybe Int
v1ReplicationControllerSpecMinReadySeconds = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1ReplicationControllerSpecReplicas:V1ReplicationControllerSpec :: Maybe Int
v1ReplicationControllerSpecReplicas = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1ReplicationControllerSpecSelector:V1ReplicationControllerSpec :: Maybe (Map String Text)
v1ReplicationControllerSpecSelector = Maybe (Map String Text)
forall a. Maybe a
Nothing
  , $sel:v1ReplicationControllerSpecTemplate:V1ReplicationControllerSpec :: Maybe V1PodTemplateSpec
v1ReplicationControllerSpecTemplate = Maybe V1PodTemplateSpec
forall a. Maybe a
Nothing
  }

-- ** V1ReplicationControllerStatus
-- | V1ReplicationControllerStatus
-- ReplicationControllerStatus represents the current status of a replication controller.
data V1ReplicationControllerStatus = V1ReplicationControllerStatus
  { V1ReplicationControllerStatus -> Maybe Int
v1ReplicationControllerStatusAvailableReplicas :: !(Maybe Int) -- ^ "availableReplicas" - The number of available replicas (ready for at least minReadySeconds) for this replication controller.
  , V1ReplicationControllerStatus
-> Maybe [V1ReplicationControllerCondition]
v1ReplicationControllerStatusConditions :: !(Maybe [V1ReplicationControllerCondition]) -- ^ "conditions" - Represents the latest available observations of a replication controller&#39;s current state.
  , V1ReplicationControllerStatus -> Maybe Int
v1ReplicationControllerStatusFullyLabeledReplicas :: !(Maybe Int) -- ^ "fullyLabeledReplicas" - The number of pods that have labels matching the labels of the pod template of the replication controller.
  , V1ReplicationControllerStatus -> Maybe Integer
v1ReplicationControllerStatusObservedGeneration :: !(Maybe Integer) -- ^ "observedGeneration" - ObservedGeneration reflects the generation of the most recently observed replication controller.
  , V1ReplicationControllerStatus -> Maybe Int
v1ReplicationControllerStatusReadyReplicas :: !(Maybe Int) -- ^ "readyReplicas" - The number of ready replicas for this replication controller.
  , V1ReplicationControllerStatus -> Int
v1ReplicationControllerStatusReplicas :: !(Int) -- ^ /Required/ "replicas" - Replicas is the most recently observed number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller
  } deriving (Int -> V1ReplicationControllerStatus -> ShowS
[V1ReplicationControllerStatus] -> ShowS
V1ReplicationControllerStatus -> String
(Int -> V1ReplicationControllerStatus -> ShowS)
-> (V1ReplicationControllerStatus -> String)
-> ([V1ReplicationControllerStatus] -> ShowS)
-> Show V1ReplicationControllerStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ReplicationControllerStatus -> ShowS
showsPrec :: Int -> V1ReplicationControllerStatus -> ShowS
$cshow :: V1ReplicationControllerStatus -> String
show :: V1ReplicationControllerStatus -> String
$cshowList :: [V1ReplicationControllerStatus] -> ShowS
showList :: [V1ReplicationControllerStatus] -> ShowS
P.Show, V1ReplicationControllerStatus
-> V1ReplicationControllerStatus -> Bool
(V1ReplicationControllerStatus
 -> V1ReplicationControllerStatus -> Bool)
-> (V1ReplicationControllerStatus
    -> V1ReplicationControllerStatus -> Bool)
-> Eq V1ReplicationControllerStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ReplicationControllerStatus
-> V1ReplicationControllerStatus -> Bool
== :: V1ReplicationControllerStatus
-> V1ReplicationControllerStatus -> Bool
$c/= :: V1ReplicationControllerStatus
-> V1ReplicationControllerStatus -> Bool
/= :: V1ReplicationControllerStatus
-> V1ReplicationControllerStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ReplicationControllerStatus
instance A.FromJSON V1ReplicationControllerStatus where
  parseJSON :: Value -> Parser V1ReplicationControllerStatus
parseJSON = String
-> (Object -> Parser V1ReplicationControllerStatus)
-> Value
-> Parser V1ReplicationControllerStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ReplicationControllerStatus" ((Object -> Parser V1ReplicationControllerStatus)
 -> Value -> Parser V1ReplicationControllerStatus)
-> (Object -> Parser V1ReplicationControllerStatus)
-> Value
-> Parser V1ReplicationControllerStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Int
-> Maybe [V1ReplicationControllerCondition]
-> Maybe Int
-> Maybe Integer
-> Maybe Int
-> Int
-> V1ReplicationControllerStatus
V1ReplicationControllerStatus
      (Maybe Int
 -> Maybe [V1ReplicationControllerCondition]
 -> Maybe Int
 -> Maybe Integer
 -> Maybe Int
 -> Int
 -> V1ReplicationControllerStatus)
-> Parser (Maybe Int)
-> Parser
     (Maybe [V1ReplicationControllerCondition]
      -> Maybe Int
      -> Maybe Integer
      -> Maybe Int
      -> Int
      -> V1ReplicationControllerStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"availableReplicas")
      Parser
  (Maybe [V1ReplicationControllerCondition]
   -> Maybe Int
   -> Maybe Integer
   -> Maybe Int
   -> Int
   -> V1ReplicationControllerStatus)
-> Parser (Maybe [V1ReplicationControllerCondition])
-> Parser
     (Maybe Int
      -> Maybe Integer
      -> Maybe Int
      -> Int
      -> V1ReplicationControllerStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1ReplicationControllerCondition])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"conditions")
      Parser
  (Maybe Int
   -> Maybe Integer
   -> Maybe Int
   -> Int
   -> V1ReplicationControllerStatus)
-> Parser (Maybe Int)
-> Parser
     (Maybe Integer
      -> Maybe Int -> Int -> V1ReplicationControllerStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fullyLabeledReplicas")
      Parser
  (Maybe Integer
   -> Maybe Int -> Int -> V1ReplicationControllerStatus)
-> Parser (Maybe Integer)
-> Parser (Maybe Int -> Int -> V1ReplicationControllerStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"observedGeneration")
      Parser (Maybe Int -> Int -> V1ReplicationControllerStatus)
-> Parser (Maybe Int)
-> Parser (Int -> V1ReplicationControllerStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readyReplicas")
      Parser (Int -> V1ReplicationControllerStatus)
-> Parser Int -> Parser V1ReplicationControllerStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"replicas")

-- | ToJSON V1ReplicationControllerStatus
instance A.ToJSON V1ReplicationControllerStatus where
  toJSON :: V1ReplicationControllerStatus -> Value
toJSON V1ReplicationControllerStatus {Int
Maybe Int
Maybe Integer
Maybe [V1ReplicationControllerCondition]
$sel:v1ReplicationControllerStatusAvailableReplicas:V1ReplicationControllerStatus :: V1ReplicationControllerStatus -> Maybe Int
$sel:v1ReplicationControllerStatusConditions:V1ReplicationControllerStatus :: V1ReplicationControllerStatus
-> Maybe [V1ReplicationControllerCondition]
$sel:v1ReplicationControllerStatusFullyLabeledReplicas:V1ReplicationControllerStatus :: V1ReplicationControllerStatus -> Maybe Int
$sel:v1ReplicationControllerStatusObservedGeneration:V1ReplicationControllerStatus :: V1ReplicationControllerStatus -> Maybe Integer
$sel:v1ReplicationControllerStatusReadyReplicas:V1ReplicationControllerStatus :: V1ReplicationControllerStatus -> Maybe Int
$sel:v1ReplicationControllerStatusReplicas:V1ReplicationControllerStatus :: V1ReplicationControllerStatus -> Int
v1ReplicationControllerStatusAvailableReplicas :: Maybe Int
v1ReplicationControllerStatusConditions :: Maybe [V1ReplicationControllerCondition]
v1ReplicationControllerStatusFullyLabeledReplicas :: Maybe Int
v1ReplicationControllerStatusObservedGeneration :: Maybe Integer
v1ReplicationControllerStatusReadyReplicas :: Maybe Int
v1ReplicationControllerStatusReplicas :: Int
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"availableReplicas" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1ReplicationControllerStatusAvailableReplicas
      , Key
"conditions" Key -> Maybe [V1ReplicationControllerCondition] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1ReplicationControllerCondition]
v1ReplicationControllerStatusConditions
      , Key
"fullyLabeledReplicas" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1ReplicationControllerStatusFullyLabeledReplicas
      , Key
"observedGeneration" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1ReplicationControllerStatusObservedGeneration
      , Key
"readyReplicas" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1ReplicationControllerStatusReadyReplicas
      , Key
"replicas" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v1ReplicationControllerStatusReplicas
      ]


-- | Construct a value of type 'V1ReplicationControllerStatus' (by applying it's required fields, if any)
mkV1ReplicationControllerStatus
  :: Int -- ^ 'v1ReplicationControllerStatusReplicas': Replicas is the most recently observed number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller
  -> V1ReplicationControllerStatus
mkV1ReplicationControllerStatus :: Int -> V1ReplicationControllerStatus
mkV1ReplicationControllerStatus Int
v1ReplicationControllerStatusReplicas =
  V1ReplicationControllerStatus
  { $sel:v1ReplicationControllerStatusAvailableReplicas:V1ReplicationControllerStatus :: Maybe Int
v1ReplicationControllerStatusAvailableReplicas = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1ReplicationControllerStatusConditions:V1ReplicationControllerStatus :: Maybe [V1ReplicationControllerCondition]
v1ReplicationControllerStatusConditions = Maybe [V1ReplicationControllerCondition]
forall a. Maybe a
Nothing
  , $sel:v1ReplicationControllerStatusFullyLabeledReplicas:V1ReplicationControllerStatus :: Maybe Int
v1ReplicationControllerStatusFullyLabeledReplicas = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1ReplicationControllerStatusObservedGeneration:V1ReplicationControllerStatus :: Maybe Integer
v1ReplicationControllerStatusObservedGeneration = Maybe Integer
forall a. Maybe a
Nothing
  , $sel:v1ReplicationControllerStatusReadyReplicas:V1ReplicationControllerStatus :: Maybe Int
v1ReplicationControllerStatusReadyReplicas = Maybe Int
forall a. Maybe a
Nothing
  , Int
$sel:v1ReplicationControllerStatusReplicas:V1ReplicationControllerStatus :: Int
v1ReplicationControllerStatusReplicas :: Int
v1ReplicationControllerStatusReplicas
  }

-- ** V1ResourceAttributes
-- | V1ResourceAttributes
-- ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface
data V1ResourceAttributes = V1ResourceAttributes
  { V1ResourceAttributes -> Maybe V1FieldSelectorAttributes
v1ResourceAttributesFieldSelector :: !(Maybe V1FieldSelectorAttributes) -- ^ "fieldSelector"
  , V1ResourceAttributes -> Maybe Text
v1ResourceAttributesGroup :: !(Maybe Text) -- ^ "group" - Group is the API Group of the Resource.  \&quot;*\&quot; means all.
  , V1ResourceAttributes -> Maybe V1LabelSelectorAttributes
v1ResourceAttributesLabelSelector :: !(Maybe V1LabelSelectorAttributes) -- ^ "labelSelector"
  , V1ResourceAttributes -> Maybe Text
v1ResourceAttributesName :: !(Maybe Text) -- ^ "name" - Name is the name of the resource being requested for a \&quot;get\&quot; or deleted for a \&quot;delete\&quot;. \&quot;\&quot; (empty) means all.
  , V1ResourceAttributes -> Maybe Text
v1ResourceAttributesNamespace :: !(Maybe Text) -- ^ "namespace" - Namespace is the namespace of the action being requested.  Currently, there is no distinction between no namespace and all namespaces \&quot;\&quot; (empty) is defaulted for LocalSubjectAccessReviews \&quot;\&quot; (empty) is empty for cluster-scoped resources \&quot;\&quot; (empty) means \&quot;all\&quot; for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview
  , V1ResourceAttributes -> Maybe Text
v1ResourceAttributesResource :: !(Maybe Text) -- ^ "resource" - Resource is one of the existing resource types.  \&quot;*\&quot; means all.
  , V1ResourceAttributes -> Maybe Text
v1ResourceAttributesSubresource :: !(Maybe Text) -- ^ "subresource" - Subresource is one of the existing resource types.  \&quot;\&quot; means none.
  , V1ResourceAttributes -> Maybe Text
v1ResourceAttributesVerb :: !(Maybe Text) -- ^ "verb" - Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy.  \&quot;*\&quot; means all.
  , V1ResourceAttributes -> Maybe Text
v1ResourceAttributesVersion :: !(Maybe Text) -- ^ "version" - Version is the API Version of the Resource.  \&quot;*\&quot; means all.
  } deriving (Int -> V1ResourceAttributes -> ShowS
[V1ResourceAttributes] -> ShowS
V1ResourceAttributes -> String
(Int -> V1ResourceAttributes -> ShowS)
-> (V1ResourceAttributes -> String)
-> ([V1ResourceAttributes] -> ShowS)
-> Show V1ResourceAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ResourceAttributes -> ShowS
showsPrec :: Int -> V1ResourceAttributes -> ShowS
$cshow :: V1ResourceAttributes -> String
show :: V1ResourceAttributes -> String
$cshowList :: [V1ResourceAttributes] -> ShowS
showList :: [V1ResourceAttributes] -> ShowS
P.Show, V1ResourceAttributes -> V1ResourceAttributes -> Bool
(V1ResourceAttributes -> V1ResourceAttributes -> Bool)
-> (V1ResourceAttributes -> V1ResourceAttributes -> Bool)
-> Eq V1ResourceAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ResourceAttributes -> V1ResourceAttributes -> Bool
== :: V1ResourceAttributes -> V1ResourceAttributes -> Bool
$c/= :: V1ResourceAttributes -> V1ResourceAttributes -> Bool
/= :: V1ResourceAttributes -> V1ResourceAttributes -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ResourceAttributes
instance A.FromJSON V1ResourceAttributes where
  parseJSON :: Value -> Parser V1ResourceAttributes
parseJSON = String
-> (Object -> Parser V1ResourceAttributes)
-> Value
-> Parser V1ResourceAttributes
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ResourceAttributes" ((Object -> Parser V1ResourceAttributes)
 -> Value -> Parser V1ResourceAttributes)
-> (Object -> Parser V1ResourceAttributes)
-> Value
-> Parser V1ResourceAttributes
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1FieldSelectorAttributes
-> Maybe Text
-> Maybe V1LabelSelectorAttributes
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> V1ResourceAttributes
V1ResourceAttributes
      (Maybe V1FieldSelectorAttributes
 -> Maybe Text
 -> Maybe V1LabelSelectorAttributes
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> V1ResourceAttributes)
-> Parser (Maybe V1FieldSelectorAttributes)
-> Parser
     (Maybe Text
      -> Maybe V1LabelSelectorAttributes
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> V1ResourceAttributes)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1FieldSelectorAttributes)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fieldSelector")
      Parser
  (Maybe Text
   -> Maybe V1LabelSelectorAttributes
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> V1ResourceAttributes)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1LabelSelectorAttributes
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> V1ResourceAttributes)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"group")
      Parser
  (Maybe V1LabelSelectorAttributes
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> V1ResourceAttributes)
-> Parser (Maybe V1LabelSelectorAttributes)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> V1ResourceAttributes)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LabelSelectorAttributes)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"labelSelector")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> V1ResourceAttributes)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> V1ResourceAttributes)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"name")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> V1ResourceAttributes)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Maybe Text -> V1ResourceAttributes)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"namespace")
      Parser
  (Maybe Text
   -> Maybe Text -> Maybe Text -> Maybe Text -> V1ResourceAttributes)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> Maybe Text -> V1ResourceAttributes)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resource")
      Parser
  (Maybe Text -> Maybe Text -> Maybe Text -> V1ResourceAttributes)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> V1ResourceAttributes)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"subresource")
      Parser (Maybe Text -> Maybe Text -> V1ResourceAttributes)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> V1ResourceAttributes)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"verb")
      Parser (Maybe Text -> V1ResourceAttributes)
-> Parser (Maybe Text) -> Parser V1ResourceAttributes
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"version")

-- | ToJSON V1ResourceAttributes
instance A.ToJSON V1ResourceAttributes where
  toJSON :: V1ResourceAttributes -> Value
toJSON V1ResourceAttributes {Maybe Text
Maybe V1LabelSelectorAttributes
Maybe V1FieldSelectorAttributes
$sel:v1ResourceAttributesFieldSelector:V1ResourceAttributes :: V1ResourceAttributes -> Maybe V1FieldSelectorAttributes
$sel:v1ResourceAttributesGroup:V1ResourceAttributes :: V1ResourceAttributes -> Maybe Text
$sel:v1ResourceAttributesLabelSelector:V1ResourceAttributes :: V1ResourceAttributes -> Maybe V1LabelSelectorAttributes
$sel:v1ResourceAttributesName:V1ResourceAttributes :: V1ResourceAttributes -> Maybe Text
$sel:v1ResourceAttributesNamespace:V1ResourceAttributes :: V1ResourceAttributes -> Maybe Text
$sel:v1ResourceAttributesResource:V1ResourceAttributes :: V1ResourceAttributes -> Maybe Text
$sel:v1ResourceAttributesSubresource:V1ResourceAttributes :: V1ResourceAttributes -> Maybe Text
$sel:v1ResourceAttributesVerb:V1ResourceAttributes :: V1ResourceAttributes -> Maybe Text
$sel:v1ResourceAttributesVersion:V1ResourceAttributes :: V1ResourceAttributes -> Maybe Text
v1ResourceAttributesFieldSelector :: Maybe V1FieldSelectorAttributes
v1ResourceAttributesGroup :: Maybe Text
v1ResourceAttributesLabelSelector :: Maybe V1LabelSelectorAttributes
v1ResourceAttributesName :: Maybe Text
v1ResourceAttributesNamespace :: Maybe Text
v1ResourceAttributesResource :: Maybe Text
v1ResourceAttributesSubresource :: Maybe Text
v1ResourceAttributesVerb :: Maybe Text
v1ResourceAttributesVersion :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"fieldSelector" Key -> Maybe V1FieldSelectorAttributes -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1FieldSelectorAttributes
v1ResourceAttributesFieldSelector
      , Key
"group" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ResourceAttributesGroup
      , Key
"labelSelector" Key -> Maybe V1LabelSelectorAttributes -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LabelSelectorAttributes
v1ResourceAttributesLabelSelector
      , Key
"name" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ResourceAttributesName
      , Key
"namespace" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ResourceAttributesNamespace
      , Key
"resource" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ResourceAttributesResource
      , Key
"subresource" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ResourceAttributesSubresource
      , Key
"verb" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ResourceAttributesVerb
      , Key
"version" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ResourceAttributesVersion
      ]


-- | Construct a value of type 'V1ResourceAttributes' (by applying it's required fields, if any)
mkV1ResourceAttributes
  :: V1ResourceAttributes
mkV1ResourceAttributes :: V1ResourceAttributes
mkV1ResourceAttributes =
  V1ResourceAttributes
  { $sel:v1ResourceAttributesFieldSelector:V1ResourceAttributes :: Maybe V1FieldSelectorAttributes
v1ResourceAttributesFieldSelector = Maybe V1FieldSelectorAttributes
forall a. Maybe a
Nothing
  , $sel:v1ResourceAttributesGroup:V1ResourceAttributes :: Maybe Text
v1ResourceAttributesGroup = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ResourceAttributesLabelSelector:V1ResourceAttributes :: Maybe V1LabelSelectorAttributes
v1ResourceAttributesLabelSelector = Maybe V1LabelSelectorAttributes
forall a. Maybe a
Nothing
  , $sel:v1ResourceAttributesName:V1ResourceAttributes :: Maybe Text
v1ResourceAttributesName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ResourceAttributesNamespace:V1ResourceAttributes :: Maybe Text
v1ResourceAttributesNamespace = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ResourceAttributesResource:V1ResourceAttributes :: Maybe Text
v1ResourceAttributesResource = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ResourceAttributesSubresource:V1ResourceAttributes :: Maybe Text
v1ResourceAttributesSubresource = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ResourceAttributesVerb:V1ResourceAttributes :: Maybe Text
v1ResourceAttributesVerb = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ResourceAttributesVersion:V1ResourceAttributes :: Maybe Text
v1ResourceAttributesVersion = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1ResourceClaim
-- | V1ResourceClaim
-- ResourceClaim references one entry in PodSpec.ResourceClaims.
data V1ResourceClaim = V1ResourceClaim
  { V1ResourceClaim -> Text
v1ResourceClaimName :: !(Text) -- ^ /Required/ "name" - Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
  , V1ResourceClaim -> Maybe Text
v1ResourceClaimRequest :: !(Maybe Text) -- ^ "request" - Request is the name chosen for a request in the referenced claim. If empty, everything from the claim is made available, otherwise only the result of this request.
  } deriving (Int -> V1ResourceClaim -> ShowS
[V1ResourceClaim] -> ShowS
V1ResourceClaim -> String
(Int -> V1ResourceClaim -> ShowS)
-> (V1ResourceClaim -> String)
-> ([V1ResourceClaim] -> ShowS)
-> Show V1ResourceClaim
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ResourceClaim -> ShowS
showsPrec :: Int -> V1ResourceClaim -> ShowS
$cshow :: V1ResourceClaim -> String
show :: V1ResourceClaim -> String
$cshowList :: [V1ResourceClaim] -> ShowS
showList :: [V1ResourceClaim] -> ShowS
P.Show, V1ResourceClaim -> V1ResourceClaim -> Bool
(V1ResourceClaim -> V1ResourceClaim -> Bool)
-> (V1ResourceClaim -> V1ResourceClaim -> Bool)
-> Eq V1ResourceClaim
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ResourceClaim -> V1ResourceClaim -> Bool
== :: V1ResourceClaim -> V1ResourceClaim -> Bool
$c/= :: V1ResourceClaim -> V1ResourceClaim -> Bool
/= :: V1ResourceClaim -> V1ResourceClaim -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ResourceClaim
instance A.FromJSON V1ResourceClaim where
  parseJSON :: Value -> Parser V1ResourceClaim
parseJSON = String
-> (Object -> Parser V1ResourceClaim)
-> Value
-> Parser V1ResourceClaim
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ResourceClaim" ((Object -> Parser V1ResourceClaim)
 -> Value -> Parser V1ResourceClaim)
-> (Object -> Parser V1ResourceClaim)
-> Value
-> Parser V1ResourceClaim
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Maybe Text -> V1ResourceClaim
V1ResourceClaim
      (Text -> Maybe Text -> V1ResourceClaim)
-> Parser Text -> Parser (Maybe Text -> V1ResourceClaim)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser (Maybe Text -> V1ResourceClaim)
-> Parser (Maybe Text) -> Parser V1ResourceClaim
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"request")

-- | ToJSON V1ResourceClaim
instance A.ToJSON V1ResourceClaim where
  toJSON :: V1ResourceClaim -> Value
toJSON V1ResourceClaim {Maybe Text
Text
$sel:v1ResourceClaimName:V1ResourceClaim :: V1ResourceClaim -> Text
$sel:v1ResourceClaimRequest:V1ResourceClaim :: V1ResourceClaim -> Maybe Text
v1ResourceClaimName :: Text
v1ResourceClaimRequest :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ResourceClaimName
      , Key
"request" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ResourceClaimRequest
      ]


-- | Construct a value of type 'V1ResourceClaim' (by applying it's required fields, if any)
mkV1ResourceClaim
  :: Text -- ^ 'v1ResourceClaimName': Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
  -> V1ResourceClaim
mkV1ResourceClaim :: Text -> V1ResourceClaim
mkV1ResourceClaim Text
v1ResourceClaimName =
  V1ResourceClaim
  { Text
$sel:v1ResourceClaimName:V1ResourceClaim :: Text
v1ResourceClaimName :: Text
v1ResourceClaimName
  , $sel:v1ResourceClaimRequest:V1ResourceClaim :: Maybe Text
v1ResourceClaimRequest = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1ResourceFieldSelector
-- | V1ResourceFieldSelector
-- ResourceFieldSelector represents container resources (cpu, memory) and their output format
data V1ResourceFieldSelector = V1ResourceFieldSelector
  { V1ResourceFieldSelector -> Maybe Text
v1ResourceFieldSelectorContainerName :: !(Maybe Text) -- ^ "containerName" - Container name: required for volumes, optional for env vars
  , V1ResourceFieldSelector -> Maybe Quantity
v1ResourceFieldSelectorDivisor :: !(Maybe Quantity) -- ^ "divisor"
  , V1ResourceFieldSelector -> Text
v1ResourceFieldSelectorResource :: !(Text) -- ^ /Required/ "resource" - Required: resource to select
  } deriving (Int -> V1ResourceFieldSelector -> ShowS
[V1ResourceFieldSelector] -> ShowS
V1ResourceFieldSelector -> String
(Int -> V1ResourceFieldSelector -> ShowS)
-> (V1ResourceFieldSelector -> String)
-> ([V1ResourceFieldSelector] -> ShowS)
-> Show V1ResourceFieldSelector
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ResourceFieldSelector -> ShowS
showsPrec :: Int -> V1ResourceFieldSelector -> ShowS
$cshow :: V1ResourceFieldSelector -> String
show :: V1ResourceFieldSelector -> String
$cshowList :: [V1ResourceFieldSelector] -> ShowS
showList :: [V1ResourceFieldSelector] -> ShowS
P.Show, V1ResourceFieldSelector -> V1ResourceFieldSelector -> Bool
(V1ResourceFieldSelector -> V1ResourceFieldSelector -> Bool)
-> (V1ResourceFieldSelector -> V1ResourceFieldSelector -> Bool)
-> Eq V1ResourceFieldSelector
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ResourceFieldSelector -> V1ResourceFieldSelector -> Bool
== :: V1ResourceFieldSelector -> V1ResourceFieldSelector -> Bool
$c/= :: V1ResourceFieldSelector -> V1ResourceFieldSelector -> Bool
/= :: V1ResourceFieldSelector -> V1ResourceFieldSelector -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ResourceFieldSelector
instance A.FromJSON V1ResourceFieldSelector where
  parseJSON :: Value -> Parser V1ResourceFieldSelector
parseJSON = String
-> (Object -> Parser V1ResourceFieldSelector)
-> Value
-> Parser V1ResourceFieldSelector
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ResourceFieldSelector" ((Object -> Parser V1ResourceFieldSelector)
 -> Value -> Parser V1ResourceFieldSelector)
-> (Object -> Parser V1ResourceFieldSelector)
-> Value
-> Parser V1ResourceFieldSelector
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Maybe Quantity -> Text -> V1ResourceFieldSelector
V1ResourceFieldSelector
      (Maybe Text -> Maybe Quantity -> Text -> V1ResourceFieldSelector)
-> Parser (Maybe Text)
-> Parser (Maybe Quantity -> Text -> V1ResourceFieldSelector)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"containerName")
      Parser (Maybe Quantity -> Text -> V1ResourceFieldSelector)
-> Parser (Maybe Quantity)
-> Parser (Text -> V1ResourceFieldSelector)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Quantity)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"divisor")
      Parser (Text -> V1ResourceFieldSelector)
-> Parser Text -> Parser V1ResourceFieldSelector
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"resource")

-- | ToJSON V1ResourceFieldSelector
instance A.ToJSON V1ResourceFieldSelector where
  toJSON :: V1ResourceFieldSelector -> Value
toJSON V1ResourceFieldSelector {Maybe Text
Maybe Quantity
Text
$sel:v1ResourceFieldSelectorContainerName:V1ResourceFieldSelector :: V1ResourceFieldSelector -> Maybe Text
$sel:v1ResourceFieldSelectorDivisor:V1ResourceFieldSelector :: V1ResourceFieldSelector -> Maybe Quantity
$sel:v1ResourceFieldSelectorResource:V1ResourceFieldSelector :: V1ResourceFieldSelector -> Text
v1ResourceFieldSelectorContainerName :: Maybe Text
v1ResourceFieldSelectorDivisor :: Maybe Quantity
v1ResourceFieldSelectorResource :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"containerName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ResourceFieldSelectorContainerName
      , Key
"divisor" Key -> Maybe Quantity -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Quantity
v1ResourceFieldSelectorDivisor
      , Key
"resource" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ResourceFieldSelectorResource
      ]


-- | Construct a value of type 'V1ResourceFieldSelector' (by applying it's required fields, if any)
mkV1ResourceFieldSelector
  :: Text -- ^ 'v1ResourceFieldSelectorResource': Required: resource to select
  -> V1ResourceFieldSelector
mkV1ResourceFieldSelector :: Text -> V1ResourceFieldSelector
mkV1ResourceFieldSelector Text
v1ResourceFieldSelectorResource =
  V1ResourceFieldSelector
  { $sel:v1ResourceFieldSelectorContainerName:V1ResourceFieldSelector :: Maybe Text
v1ResourceFieldSelectorContainerName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ResourceFieldSelectorDivisor:V1ResourceFieldSelector :: Maybe Quantity
v1ResourceFieldSelectorDivisor = Maybe Quantity
forall a. Maybe a
Nothing
  , Text
$sel:v1ResourceFieldSelectorResource:V1ResourceFieldSelector :: Text
v1ResourceFieldSelectorResource :: Text
v1ResourceFieldSelectorResource
  }

-- ** V1ResourceHealth
-- | V1ResourceHealth
-- ResourceHealth represents the health of a resource. It has the latest device health information. This is a part of KEP https://kep.k8s.io/4680.
data V1ResourceHealth = V1ResourceHealth
  { V1ResourceHealth -> Maybe Text
v1ResourceHealthHealth :: !(Maybe Text) -- ^ "health" - Health of the resource. can be one of:  - Healthy: operates as normal  - Unhealthy: reported unhealthy. We consider this a temporary health issue               since we do not have a mechanism today to distinguish               temporary and permanent issues.  - Unknown: The status cannot be determined.             For example, Device Plugin got unregistered and hasn&#39;t been re-registered since.  In future we may want to introduce the PermanentlyUnhealthy Status.
  , V1ResourceHealth -> Text
v1ResourceHealthResourceId :: !(Text) -- ^ /Required/ "resourceID" - ResourceID is the unique identifier of the resource. See the ResourceID type for more information.
  } deriving (Int -> V1ResourceHealth -> ShowS
[V1ResourceHealth] -> ShowS
V1ResourceHealth -> String
(Int -> V1ResourceHealth -> ShowS)
-> (V1ResourceHealth -> String)
-> ([V1ResourceHealth] -> ShowS)
-> Show V1ResourceHealth
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ResourceHealth -> ShowS
showsPrec :: Int -> V1ResourceHealth -> ShowS
$cshow :: V1ResourceHealth -> String
show :: V1ResourceHealth -> String
$cshowList :: [V1ResourceHealth] -> ShowS
showList :: [V1ResourceHealth] -> ShowS
P.Show, V1ResourceHealth -> V1ResourceHealth -> Bool
(V1ResourceHealth -> V1ResourceHealth -> Bool)
-> (V1ResourceHealth -> V1ResourceHealth -> Bool)
-> Eq V1ResourceHealth
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ResourceHealth -> V1ResourceHealth -> Bool
== :: V1ResourceHealth -> V1ResourceHealth -> Bool
$c/= :: V1ResourceHealth -> V1ResourceHealth -> Bool
/= :: V1ResourceHealth -> V1ResourceHealth -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ResourceHealth
instance A.FromJSON V1ResourceHealth where
  parseJSON :: Value -> Parser V1ResourceHealth
parseJSON = String
-> (Object -> Parser V1ResourceHealth)
-> Value
-> Parser V1ResourceHealth
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ResourceHealth" ((Object -> Parser V1ResourceHealth)
 -> Value -> Parser V1ResourceHealth)
-> (Object -> Parser V1ResourceHealth)
-> Value
-> Parser V1ResourceHealth
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Text -> V1ResourceHealth
V1ResourceHealth
      (Maybe Text -> Text -> V1ResourceHealth)
-> Parser (Maybe Text) -> Parser (Text -> V1ResourceHealth)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"health")
      Parser (Text -> V1ResourceHealth)
-> Parser Text -> Parser V1ResourceHealth
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"resourceID")

-- | ToJSON V1ResourceHealth
instance A.ToJSON V1ResourceHealth where
  toJSON :: V1ResourceHealth -> Value
toJSON V1ResourceHealth {Maybe Text
Text
$sel:v1ResourceHealthHealth:V1ResourceHealth :: V1ResourceHealth -> Maybe Text
$sel:v1ResourceHealthResourceId:V1ResourceHealth :: V1ResourceHealth -> Text
v1ResourceHealthHealth :: Maybe Text
v1ResourceHealthResourceId :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"health" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ResourceHealthHealth
      , Key
"resourceID" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ResourceHealthResourceId
      ]


-- | Construct a value of type 'V1ResourceHealth' (by applying it's required fields, if any)
mkV1ResourceHealth
  :: Text -- ^ 'v1ResourceHealthResourceId': ResourceID is the unique identifier of the resource. See the ResourceID type for more information.
  -> V1ResourceHealth
mkV1ResourceHealth :: Text -> V1ResourceHealth
mkV1ResourceHealth Text
v1ResourceHealthResourceId =
  V1ResourceHealth
  { $sel:v1ResourceHealthHealth:V1ResourceHealth :: Maybe Text
v1ResourceHealthHealth = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1ResourceHealthResourceId:V1ResourceHealth :: Text
v1ResourceHealthResourceId :: Text
v1ResourceHealthResourceId
  }

-- ** V1ResourcePolicyRule
-- | V1ResourcePolicyRule
-- ResourcePolicyRule is a predicate that matches some resource requests, testing the request's verb and the target resource. A ResourcePolicyRule matches a resource request if and only if: (a) at least one member of verbs matches the request, (b) at least one member of apiGroups matches the request, (c) at least one member of resources matches the request, and (d) either (d1) the request does not specify a namespace (i.e., `Namespace==\"\"`) and clusterScope is true or (d2) the request specifies a namespace and least one member of namespaces matches the request's namespace.
data V1ResourcePolicyRule = V1ResourcePolicyRule
  { V1ResourcePolicyRule -> [Text]
v1ResourcePolicyRuleApiGroups :: !([Text]) -- ^ /Required/ "apiGroups" - &#x60;apiGroups&#x60; is a list of matching API groups and may not be empty. \&quot;*\&quot; matches all API groups and, if present, must be the only entry. Required.
  , V1ResourcePolicyRule -> Maybe Bool
v1ResourcePolicyRuleClusterScope :: !(Maybe Bool) -- ^ "clusterScope" - &#x60;clusterScope&#x60; indicates whether to match requests that do not specify a namespace (which happens either because the resource is not namespaced or the request targets all namespaces). If this field is omitted or false then the &#x60;namespaces&#x60; field must contain a non-empty list.
  , V1ResourcePolicyRule -> Maybe [Text]
v1ResourcePolicyRuleNamespaces :: !(Maybe [Text]) -- ^ "namespaces" - &#x60;namespaces&#x60; is a list of target namespaces that restricts matches.  A request that specifies a target namespace matches only if either (a) this list contains that target namespace or (b) this list contains \&quot;*\&quot;.  Note that \&quot;*\&quot; matches any specified namespace but does not match a request that _does not specify_ a namespace (see the &#x60;clusterScope&#x60; field for that). This list may be empty, but only if &#x60;clusterScope&#x60; is true.
  , V1ResourcePolicyRule -> [Text]
v1ResourcePolicyRuleResources :: !([Text]) -- ^ /Required/ "resources" - &#x60;resources&#x60; is a list of matching resources (i.e., lowercase and plural) with, if desired, subresource.  For example, [ \&quot;services\&quot;, \&quot;nodes/status\&quot; ].  This list may not be empty. \&quot;*\&quot; matches all resources and, if present, must be the only entry. Required.
  , V1ResourcePolicyRule -> [Text]
v1ResourcePolicyRuleVerbs :: !([Text]) -- ^ /Required/ "verbs" - &#x60;verbs&#x60; is a list of matching verbs and may not be empty. \&quot;*\&quot; matches all verbs and, if present, must be the only entry. Required.
  } deriving (Int -> V1ResourcePolicyRule -> ShowS
[V1ResourcePolicyRule] -> ShowS
V1ResourcePolicyRule -> String
(Int -> V1ResourcePolicyRule -> ShowS)
-> (V1ResourcePolicyRule -> String)
-> ([V1ResourcePolicyRule] -> ShowS)
-> Show V1ResourcePolicyRule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ResourcePolicyRule -> ShowS
showsPrec :: Int -> V1ResourcePolicyRule -> ShowS
$cshow :: V1ResourcePolicyRule -> String
show :: V1ResourcePolicyRule -> String
$cshowList :: [V1ResourcePolicyRule] -> ShowS
showList :: [V1ResourcePolicyRule] -> ShowS
P.Show, V1ResourcePolicyRule -> V1ResourcePolicyRule -> Bool
(V1ResourcePolicyRule -> V1ResourcePolicyRule -> Bool)
-> (V1ResourcePolicyRule -> V1ResourcePolicyRule -> Bool)
-> Eq V1ResourcePolicyRule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ResourcePolicyRule -> V1ResourcePolicyRule -> Bool
== :: V1ResourcePolicyRule -> V1ResourcePolicyRule -> Bool
$c/= :: V1ResourcePolicyRule -> V1ResourcePolicyRule -> Bool
/= :: V1ResourcePolicyRule -> V1ResourcePolicyRule -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ResourcePolicyRule
instance A.FromJSON V1ResourcePolicyRule where
  parseJSON :: Value -> Parser V1ResourcePolicyRule
parseJSON = String
-> (Object -> Parser V1ResourcePolicyRule)
-> Value
-> Parser V1ResourcePolicyRule
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ResourcePolicyRule" ((Object -> Parser V1ResourcePolicyRule)
 -> Value -> Parser V1ResourcePolicyRule)
-> (Object -> Parser V1ResourcePolicyRule)
-> Value
-> Parser V1ResourcePolicyRule
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    [Text]
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> [Text]
-> V1ResourcePolicyRule
V1ResourcePolicyRule
      ([Text]
 -> Maybe Bool
 -> Maybe [Text]
 -> [Text]
 -> [Text]
 -> V1ResourcePolicyRule)
-> Parser [Text]
-> Parser
     (Maybe Bool
      -> Maybe [Text] -> [Text] -> [Text] -> V1ResourcePolicyRule)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"apiGroups")
      Parser
  (Maybe Bool
   -> Maybe [Text] -> [Text] -> [Text] -> V1ResourcePolicyRule)
-> Parser (Maybe Bool)
-> Parser
     (Maybe [Text] -> [Text] -> [Text] -> V1ResourcePolicyRule)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"clusterScope")
      Parser (Maybe [Text] -> [Text] -> [Text] -> V1ResourcePolicyRule)
-> Parser (Maybe [Text])
-> Parser ([Text] -> [Text] -> V1ResourcePolicyRule)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"namespaces")
      Parser ([Text] -> [Text] -> V1ResourcePolicyRule)
-> Parser [Text] -> Parser ([Text] -> V1ResourcePolicyRule)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"resources")
      Parser ([Text] -> V1ResourcePolicyRule)
-> Parser [Text] -> Parser V1ResourcePolicyRule
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"verbs")

-- | ToJSON V1ResourcePolicyRule
instance A.ToJSON V1ResourcePolicyRule where
  toJSON :: V1ResourcePolicyRule -> Value
toJSON V1ResourcePolicyRule {[Text]
Maybe Bool
Maybe [Text]
$sel:v1ResourcePolicyRuleApiGroups:V1ResourcePolicyRule :: V1ResourcePolicyRule -> [Text]
$sel:v1ResourcePolicyRuleClusterScope:V1ResourcePolicyRule :: V1ResourcePolicyRule -> Maybe Bool
$sel:v1ResourcePolicyRuleNamespaces:V1ResourcePolicyRule :: V1ResourcePolicyRule -> Maybe [Text]
$sel:v1ResourcePolicyRuleResources:V1ResourcePolicyRule :: V1ResourcePolicyRule -> [Text]
$sel:v1ResourcePolicyRuleVerbs:V1ResourcePolicyRule :: V1ResourcePolicyRule -> [Text]
v1ResourcePolicyRuleApiGroups :: [Text]
v1ResourcePolicyRuleClusterScope :: Maybe Bool
v1ResourcePolicyRuleNamespaces :: Maybe [Text]
v1ResourcePolicyRuleResources :: [Text]
v1ResourcePolicyRuleVerbs :: [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiGroups" Key -> [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [Text]
v1ResourcePolicyRuleApiGroups
      , Key
"clusterScope" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1ResourcePolicyRuleClusterScope
      , Key
"namespaces" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1ResourcePolicyRuleNamespaces
      , Key
"resources" Key -> [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [Text]
v1ResourcePolicyRuleResources
      , Key
"verbs" Key -> [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [Text]
v1ResourcePolicyRuleVerbs
      ]


-- | Construct a value of type 'V1ResourcePolicyRule' (by applying it's required fields, if any)
mkV1ResourcePolicyRule
  :: [Text] -- ^ 'v1ResourcePolicyRuleApiGroups': `apiGroups` is a list of matching API groups and may not be empty. \"*\" matches all API groups and, if present, must be the only entry. Required.
  -> [Text] -- ^ 'v1ResourcePolicyRuleResources': `resources` is a list of matching resources (i.e., lowercase and plural) with, if desired, subresource.  For example, [ \"services\", \"nodes/status\" ].  This list may not be empty. \"*\" matches all resources and, if present, must be the only entry. Required.
  -> [Text] -- ^ 'v1ResourcePolicyRuleVerbs': `verbs` is a list of matching verbs and may not be empty. \"*\" matches all verbs and, if present, must be the only entry. Required.
  -> V1ResourcePolicyRule
mkV1ResourcePolicyRule :: [Text] -> [Text] -> [Text] -> V1ResourcePolicyRule
mkV1ResourcePolicyRule [Text]
v1ResourcePolicyRuleApiGroups [Text]
v1ResourcePolicyRuleResources [Text]
v1ResourcePolicyRuleVerbs =
  V1ResourcePolicyRule
  { [Text]
$sel:v1ResourcePolicyRuleApiGroups:V1ResourcePolicyRule :: [Text]
v1ResourcePolicyRuleApiGroups :: [Text]
v1ResourcePolicyRuleApiGroups
  , $sel:v1ResourcePolicyRuleClusterScope:V1ResourcePolicyRule :: Maybe Bool
v1ResourcePolicyRuleClusterScope = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1ResourcePolicyRuleNamespaces:V1ResourcePolicyRule :: Maybe [Text]
v1ResourcePolicyRuleNamespaces = Maybe [Text]
forall a. Maybe a
Nothing
  , [Text]
$sel:v1ResourcePolicyRuleResources:V1ResourcePolicyRule :: [Text]
v1ResourcePolicyRuleResources :: [Text]
v1ResourcePolicyRuleResources
  , [Text]
$sel:v1ResourcePolicyRuleVerbs:V1ResourcePolicyRule :: [Text]
v1ResourcePolicyRuleVerbs :: [Text]
v1ResourcePolicyRuleVerbs
  }

-- ** V1ResourceQuota
-- | V1ResourceQuota
-- ResourceQuota sets aggregate quota restrictions enforced per namespace
data V1ResourceQuota = V1ResourceQuota
  { V1ResourceQuota -> Maybe Text
v1ResourceQuotaApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1ResourceQuota -> Maybe Text
v1ResourceQuotaKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1ResourceQuota -> Maybe V1ObjectMeta
v1ResourceQuotaMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1ResourceQuota -> Maybe V1ResourceQuotaSpec
v1ResourceQuotaSpec :: !(Maybe V1ResourceQuotaSpec) -- ^ "spec"
  , V1ResourceQuota -> Maybe V1ResourceQuotaStatus
v1ResourceQuotaStatus :: !(Maybe V1ResourceQuotaStatus) -- ^ "status"
  } deriving (Int -> V1ResourceQuota -> ShowS
[V1ResourceQuota] -> ShowS
V1ResourceQuota -> String
(Int -> V1ResourceQuota -> ShowS)
-> (V1ResourceQuota -> String)
-> ([V1ResourceQuota] -> ShowS)
-> Show V1ResourceQuota
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ResourceQuota -> ShowS
showsPrec :: Int -> V1ResourceQuota -> ShowS
$cshow :: V1ResourceQuota -> String
show :: V1ResourceQuota -> String
$cshowList :: [V1ResourceQuota] -> ShowS
showList :: [V1ResourceQuota] -> ShowS
P.Show, V1ResourceQuota -> V1ResourceQuota -> Bool
(V1ResourceQuota -> V1ResourceQuota -> Bool)
-> (V1ResourceQuota -> V1ResourceQuota -> Bool)
-> Eq V1ResourceQuota
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ResourceQuota -> V1ResourceQuota -> Bool
== :: V1ResourceQuota -> V1ResourceQuota -> Bool
$c/= :: V1ResourceQuota -> V1ResourceQuota -> Bool
/= :: V1ResourceQuota -> V1ResourceQuota -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ResourceQuota
instance A.FromJSON V1ResourceQuota where
  parseJSON :: Value -> Parser V1ResourceQuota
parseJSON = String
-> (Object -> Parser V1ResourceQuota)
-> Value
-> Parser V1ResourceQuota
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ResourceQuota" ((Object -> Parser V1ResourceQuota)
 -> Value -> Parser V1ResourceQuota)
-> (Object -> Parser V1ResourceQuota)
-> Value
-> Parser V1ResourceQuota
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1ResourceQuotaSpec
-> Maybe V1ResourceQuotaStatus
-> V1ResourceQuota
V1ResourceQuota
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1ResourceQuotaSpec
 -> Maybe V1ResourceQuotaStatus
 -> V1ResourceQuota)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1ResourceQuotaSpec
      -> Maybe V1ResourceQuotaStatus
      -> V1ResourceQuota)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1ResourceQuotaSpec
   -> Maybe V1ResourceQuotaStatus
   -> V1ResourceQuota)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1ResourceQuotaSpec
      -> Maybe V1ResourceQuotaStatus
      -> V1ResourceQuota)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1ResourceQuotaSpec
   -> Maybe V1ResourceQuotaStatus
   -> V1ResourceQuota)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe V1ResourceQuotaSpec
      -> Maybe V1ResourceQuotaStatus -> V1ResourceQuota)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (Maybe V1ResourceQuotaSpec
   -> Maybe V1ResourceQuotaStatus -> V1ResourceQuota)
-> Parser (Maybe V1ResourceQuotaSpec)
-> Parser (Maybe V1ResourceQuotaStatus -> V1ResourceQuota)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ResourceQuotaSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")
      Parser (Maybe V1ResourceQuotaStatus -> V1ResourceQuota)
-> Parser (Maybe V1ResourceQuotaStatus) -> Parser V1ResourceQuota
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ResourceQuotaStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1ResourceQuota
instance A.ToJSON V1ResourceQuota where
  toJSON :: V1ResourceQuota -> Value
toJSON V1ResourceQuota {Maybe Text
Maybe V1ResourceQuotaStatus
Maybe V1ResourceQuotaSpec
Maybe V1ObjectMeta
$sel:v1ResourceQuotaApiVersion:V1ResourceQuota :: V1ResourceQuota -> Maybe Text
$sel:v1ResourceQuotaKind:V1ResourceQuota :: V1ResourceQuota -> Maybe Text
$sel:v1ResourceQuotaMetadata:V1ResourceQuota :: V1ResourceQuota -> Maybe V1ObjectMeta
$sel:v1ResourceQuotaSpec:V1ResourceQuota :: V1ResourceQuota -> Maybe V1ResourceQuotaSpec
$sel:v1ResourceQuotaStatus:V1ResourceQuota :: V1ResourceQuota -> Maybe V1ResourceQuotaStatus
v1ResourceQuotaApiVersion :: Maybe Text
v1ResourceQuotaKind :: Maybe Text
v1ResourceQuotaMetadata :: Maybe V1ObjectMeta
v1ResourceQuotaSpec :: Maybe V1ResourceQuotaSpec
v1ResourceQuotaStatus :: Maybe V1ResourceQuotaStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ResourceQuotaApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ResourceQuotaKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1ResourceQuotaMetadata
      , Key
"spec" Key -> Maybe V1ResourceQuotaSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ResourceQuotaSpec
v1ResourceQuotaSpec
      , Key
"status" Key -> Maybe V1ResourceQuotaStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ResourceQuotaStatus
v1ResourceQuotaStatus
      ]


-- | Construct a value of type 'V1ResourceQuota' (by applying it's required fields, if any)
mkV1ResourceQuota
  :: V1ResourceQuota
mkV1ResourceQuota :: V1ResourceQuota
mkV1ResourceQuota =
  V1ResourceQuota
  { $sel:v1ResourceQuotaApiVersion:V1ResourceQuota :: Maybe Text
v1ResourceQuotaApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ResourceQuotaKind:V1ResourceQuota :: Maybe Text
v1ResourceQuotaKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ResourceQuotaMetadata:V1ResourceQuota :: Maybe V1ObjectMeta
v1ResourceQuotaMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1ResourceQuotaSpec:V1ResourceQuota :: Maybe V1ResourceQuotaSpec
v1ResourceQuotaSpec = Maybe V1ResourceQuotaSpec
forall a. Maybe a
Nothing
  , $sel:v1ResourceQuotaStatus:V1ResourceQuota :: Maybe V1ResourceQuotaStatus
v1ResourceQuotaStatus = Maybe V1ResourceQuotaStatus
forall a. Maybe a
Nothing
  }

-- ** V1ResourceQuotaList
-- | V1ResourceQuotaList
-- ResourceQuotaList is a list of ResourceQuota items.
data V1ResourceQuotaList = V1ResourceQuotaList
  { V1ResourceQuotaList -> Maybe Text
v1ResourceQuotaListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1ResourceQuotaList -> [V1ResourceQuota]
v1ResourceQuotaListItems :: !([V1ResourceQuota]) -- ^ /Required/ "items" - Items is a list of ResourceQuota objects. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/
  , V1ResourceQuotaList -> Maybe Text
v1ResourceQuotaListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1ResourceQuotaList -> Maybe V1ListMeta
v1ResourceQuotaListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1ResourceQuotaList -> ShowS
[V1ResourceQuotaList] -> ShowS
V1ResourceQuotaList -> String
(Int -> V1ResourceQuotaList -> ShowS)
-> (V1ResourceQuotaList -> String)
-> ([V1ResourceQuotaList] -> ShowS)
-> Show V1ResourceQuotaList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ResourceQuotaList -> ShowS
showsPrec :: Int -> V1ResourceQuotaList -> ShowS
$cshow :: V1ResourceQuotaList -> String
show :: V1ResourceQuotaList -> String
$cshowList :: [V1ResourceQuotaList] -> ShowS
showList :: [V1ResourceQuotaList] -> ShowS
P.Show, V1ResourceQuotaList -> V1ResourceQuotaList -> Bool
(V1ResourceQuotaList -> V1ResourceQuotaList -> Bool)
-> (V1ResourceQuotaList -> V1ResourceQuotaList -> Bool)
-> Eq V1ResourceQuotaList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ResourceQuotaList -> V1ResourceQuotaList -> Bool
== :: V1ResourceQuotaList -> V1ResourceQuotaList -> Bool
$c/= :: V1ResourceQuotaList -> V1ResourceQuotaList -> Bool
/= :: V1ResourceQuotaList -> V1ResourceQuotaList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ResourceQuotaList
instance A.FromJSON V1ResourceQuotaList where
  parseJSON :: Value -> Parser V1ResourceQuotaList
parseJSON = String
-> (Object -> Parser V1ResourceQuotaList)
-> Value
-> Parser V1ResourceQuotaList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ResourceQuotaList" ((Object -> Parser V1ResourceQuotaList)
 -> Value -> Parser V1ResourceQuotaList)
-> (Object -> Parser V1ResourceQuotaList)
-> Value
-> Parser V1ResourceQuotaList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1ResourceQuota]
-> Maybe Text
-> Maybe V1ListMeta
-> V1ResourceQuotaList
V1ResourceQuotaList
      (Maybe Text
 -> [V1ResourceQuota]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1ResourceQuotaList)
-> Parser (Maybe Text)
-> Parser
     ([V1ResourceQuota]
      -> Maybe Text -> Maybe V1ListMeta -> V1ResourceQuotaList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1ResourceQuota]
   -> Maybe Text -> Maybe V1ListMeta -> V1ResourceQuotaList)
-> Parser [V1ResourceQuota]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1ResourceQuotaList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1ResourceQuota]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1ResourceQuotaList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1ResourceQuotaList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1ResourceQuotaList)
-> Parser (Maybe V1ListMeta) -> Parser V1ResourceQuotaList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1ResourceQuotaList
instance A.ToJSON V1ResourceQuotaList where
  toJSON :: V1ResourceQuotaList -> Value
toJSON V1ResourceQuotaList {[V1ResourceQuota]
Maybe Text
Maybe V1ListMeta
$sel:v1ResourceQuotaListApiVersion:V1ResourceQuotaList :: V1ResourceQuotaList -> Maybe Text
$sel:v1ResourceQuotaListItems:V1ResourceQuotaList :: V1ResourceQuotaList -> [V1ResourceQuota]
$sel:v1ResourceQuotaListKind:V1ResourceQuotaList :: V1ResourceQuotaList -> Maybe Text
$sel:v1ResourceQuotaListMetadata:V1ResourceQuotaList :: V1ResourceQuotaList -> Maybe V1ListMeta
v1ResourceQuotaListApiVersion :: Maybe Text
v1ResourceQuotaListItems :: [V1ResourceQuota]
v1ResourceQuotaListKind :: Maybe Text
v1ResourceQuotaListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ResourceQuotaListApiVersion
      , Key
"items" Key -> [V1ResourceQuota] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1ResourceQuota]
v1ResourceQuotaListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ResourceQuotaListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1ResourceQuotaListMetadata
      ]


-- | Construct a value of type 'V1ResourceQuotaList' (by applying it's required fields, if any)
mkV1ResourceQuotaList
  :: [V1ResourceQuota] -- ^ 'v1ResourceQuotaListItems': Items is a list of ResourceQuota objects. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/
  -> V1ResourceQuotaList
mkV1ResourceQuotaList :: [V1ResourceQuota] -> V1ResourceQuotaList
mkV1ResourceQuotaList [V1ResourceQuota]
v1ResourceQuotaListItems =
  V1ResourceQuotaList
  { $sel:v1ResourceQuotaListApiVersion:V1ResourceQuotaList :: Maybe Text
v1ResourceQuotaListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1ResourceQuota]
$sel:v1ResourceQuotaListItems:V1ResourceQuotaList :: [V1ResourceQuota]
v1ResourceQuotaListItems :: [V1ResourceQuota]
v1ResourceQuotaListItems
  , $sel:v1ResourceQuotaListKind:V1ResourceQuotaList :: Maybe Text
v1ResourceQuotaListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ResourceQuotaListMetadata:V1ResourceQuotaList :: Maybe V1ListMeta
v1ResourceQuotaListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1ResourceQuotaSpec
-- | V1ResourceQuotaSpec
-- ResourceQuotaSpec defines the desired hard limits to enforce for Quota.
data V1ResourceQuotaSpec = V1ResourceQuotaSpec
  { V1ResourceQuotaSpec -> Maybe (Map String Quantity)
v1ResourceQuotaSpecHard :: !(Maybe (Map.Map String Quantity)) -- ^ "hard" - hard is the set of desired hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/
  , V1ResourceQuotaSpec -> Maybe V1ScopeSelector
v1ResourceQuotaSpecScopeSelector :: !(Maybe V1ScopeSelector) -- ^ "scopeSelector"
  , V1ResourceQuotaSpec -> Maybe [Text]
v1ResourceQuotaSpecScopes :: !(Maybe [Text]) -- ^ "scopes" - A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects.
  } deriving (Int -> V1ResourceQuotaSpec -> ShowS
[V1ResourceQuotaSpec] -> ShowS
V1ResourceQuotaSpec -> String
(Int -> V1ResourceQuotaSpec -> ShowS)
-> (V1ResourceQuotaSpec -> String)
-> ([V1ResourceQuotaSpec] -> ShowS)
-> Show V1ResourceQuotaSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ResourceQuotaSpec -> ShowS
showsPrec :: Int -> V1ResourceQuotaSpec -> ShowS
$cshow :: V1ResourceQuotaSpec -> String
show :: V1ResourceQuotaSpec -> String
$cshowList :: [V1ResourceQuotaSpec] -> ShowS
showList :: [V1ResourceQuotaSpec] -> ShowS
P.Show, V1ResourceQuotaSpec -> V1ResourceQuotaSpec -> Bool
(V1ResourceQuotaSpec -> V1ResourceQuotaSpec -> Bool)
-> (V1ResourceQuotaSpec -> V1ResourceQuotaSpec -> Bool)
-> Eq V1ResourceQuotaSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ResourceQuotaSpec -> V1ResourceQuotaSpec -> Bool
== :: V1ResourceQuotaSpec -> V1ResourceQuotaSpec -> Bool
$c/= :: V1ResourceQuotaSpec -> V1ResourceQuotaSpec -> Bool
/= :: V1ResourceQuotaSpec -> V1ResourceQuotaSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ResourceQuotaSpec
instance A.FromJSON V1ResourceQuotaSpec where
  parseJSON :: Value -> Parser V1ResourceQuotaSpec
parseJSON = String
-> (Object -> Parser V1ResourceQuotaSpec)
-> Value
-> Parser V1ResourceQuotaSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ResourceQuotaSpec" ((Object -> Parser V1ResourceQuotaSpec)
 -> Value -> Parser V1ResourceQuotaSpec)
-> (Object -> Parser V1ResourceQuotaSpec)
-> Value
-> Parser V1ResourceQuotaSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe (Map String Quantity)
-> Maybe V1ScopeSelector -> Maybe [Text] -> V1ResourceQuotaSpec
V1ResourceQuotaSpec
      (Maybe (Map String Quantity)
 -> Maybe V1ScopeSelector -> Maybe [Text] -> V1ResourceQuotaSpec)
-> Parser (Maybe (Map String Quantity))
-> Parser
     (Maybe V1ScopeSelector -> Maybe [Text] -> V1ResourceQuotaSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe (Map String Quantity))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"hard")
      Parser
  (Maybe V1ScopeSelector -> Maybe [Text] -> V1ResourceQuotaSpec)
-> Parser (Maybe V1ScopeSelector)
-> Parser (Maybe [Text] -> V1ResourceQuotaSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ScopeSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"scopeSelector")
      Parser (Maybe [Text] -> V1ResourceQuotaSpec)
-> Parser (Maybe [Text]) -> Parser V1ResourceQuotaSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"scopes")

-- | ToJSON V1ResourceQuotaSpec
instance A.ToJSON V1ResourceQuotaSpec where
  toJSON :: V1ResourceQuotaSpec -> Value
toJSON V1ResourceQuotaSpec {Maybe [Text]
Maybe (Map String Quantity)
Maybe V1ScopeSelector
$sel:v1ResourceQuotaSpecHard:V1ResourceQuotaSpec :: V1ResourceQuotaSpec -> Maybe (Map String Quantity)
$sel:v1ResourceQuotaSpecScopeSelector:V1ResourceQuotaSpec :: V1ResourceQuotaSpec -> Maybe V1ScopeSelector
$sel:v1ResourceQuotaSpecScopes:V1ResourceQuotaSpec :: V1ResourceQuotaSpec -> Maybe [Text]
v1ResourceQuotaSpecHard :: Maybe (Map String Quantity)
v1ResourceQuotaSpecScopeSelector :: Maybe V1ScopeSelector
v1ResourceQuotaSpecScopes :: Maybe [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"hard" Key -> Maybe (Map String Quantity) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Quantity)
v1ResourceQuotaSpecHard
      , Key
"scopeSelector" Key -> Maybe V1ScopeSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ScopeSelector
v1ResourceQuotaSpecScopeSelector
      , Key
"scopes" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1ResourceQuotaSpecScopes
      ]


-- | Construct a value of type 'V1ResourceQuotaSpec' (by applying it's required fields, if any)
mkV1ResourceQuotaSpec
  :: V1ResourceQuotaSpec
mkV1ResourceQuotaSpec :: V1ResourceQuotaSpec
mkV1ResourceQuotaSpec =
  V1ResourceQuotaSpec
  { $sel:v1ResourceQuotaSpecHard:V1ResourceQuotaSpec :: Maybe (Map String Quantity)
v1ResourceQuotaSpecHard = Maybe (Map String Quantity)
forall a. Maybe a
Nothing
  , $sel:v1ResourceQuotaSpecScopeSelector:V1ResourceQuotaSpec :: Maybe V1ScopeSelector
v1ResourceQuotaSpecScopeSelector = Maybe V1ScopeSelector
forall a. Maybe a
Nothing
  , $sel:v1ResourceQuotaSpecScopes:V1ResourceQuotaSpec :: Maybe [Text]
v1ResourceQuotaSpecScopes = Maybe [Text]
forall a. Maybe a
Nothing
  }

-- ** V1ResourceQuotaStatus
-- | V1ResourceQuotaStatus
-- ResourceQuotaStatus defines the enforced hard limits and observed use.
data V1ResourceQuotaStatus = V1ResourceQuotaStatus
  { V1ResourceQuotaStatus -> Maybe (Map String Quantity)
v1ResourceQuotaStatusHard :: !(Maybe (Map.Map String Quantity)) -- ^ "hard" - Hard is the set of enforced hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/
  , V1ResourceQuotaStatus -> Maybe (Map String Quantity)
v1ResourceQuotaStatusUsed :: !(Maybe (Map.Map String Quantity)) -- ^ "used" - Used is the current observed total usage of the resource in the namespace.
  } deriving (Int -> V1ResourceQuotaStatus -> ShowS
[V1ResourceQuotaStatus] -> ShowS
V1ResourceQuotaStatus -> String
(Int -> V1ResourceQuotaStatus -> ShowS)
-> (V1ResourceQuotaStatus -> String)
-> ([V1ResourceQuotaStatus] -> ShowS)
-> Show V1ResourceQuotaStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ResourceQuotaStatus -> ShowS
showsPrec :: Int -> V1ResourceQuotaStatus -> ShowS
$cshow :: V1ResourceQuotaStatus -> String
show :: V1ResourceQuotaStatus -> String
$cshowList :: [V1ResourceQuotaStatus] -> ShowS
showList :: [V1ResourceQuotaStatus] -> ShowS
P.Show, V1ResourceQuotaStatus -> V1ResourceQuotaStatus -> Bool
(V1ResourceQuotaStatus -> V1ResourceQuotaStatus -> Bool)
-> (V1ResourceQuotaStatus -> V1ResourceQuotaStatus -> Bool)
-> Eq V1ResourceQuotaStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ResourceQuotaStatus -> V1ResourceQuotaStatus -> Bool
== :: V1ResourceQuotaStatus -> V1ResourceQuotaStatus -> Bool
$c/= :: V1ResourceQuotaStatus -> V1ResourceQuotaStatus -> Bool
/= :: V1ResourceQuotaStatus -> V1ResourceQuotaStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ResourceQuotaStatus
instance A.FromJSON V1ResourceQuotaStatus where
  parseJSON :: Value -> Parser V1ResourceQuotaStatus
parseJSON = String
-> (Object -> Parser V1ResourceQuotaStatus)
-> Value
-> Parser V1ResourceQuotaStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ResourceQuotaStatus" ((Object -> Parser V1ResourceQuotaStatus)
 -> Value -> Parser V1ResourceQuotaStatus)
-> (Object -> Parser V1ResourceQuotaStatus)
-> Value
-> Parser V1ResourceQuotaStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe (Map String Quantity)
-> Maybe (Map String Quantity) -> V1ResourceQuotaStatus
V1ResourceQuotaStatus
      (Maybe (Map String Quantity)
 -> Maybe (Map String Quantity) -> V1ResourceQuotaStatus)
-> Parser (Maybe (Map String Quantity))
-> Parser (Maybe (Map String Quantity) -> V1ResourceQuotaStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe (Map String Quantity))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"hard")
      Parser (Maybe (Map String Quantity) -> V1ResourceQuotaStatus)
-> Parser (Maybe (Map String Quantity))
-> Parser V1ResourceQuotaStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String Quantity))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"used")

-- | ToJSON V1ResourceQuotaStatus
instance A.ToJSON V1ResourceQuotaStatus where
  toJSON :: V1ResourceQuotaStatus -> Value
toJSON V1ResourceQuotaStatus {Maybe (Map String Quantity)
$sel:v1ResourceQuotaStatusHard:V1ResourceQuotaStatus :: V1ResourceQuotaStatus -> Maybe (Map String Quantity)
$sel:v1ResourceQuotaStatusUsed:V1ResourceQuotaStatus :: V1ResourceQuotaStatus -> Maybe (Map String Quantity)
v1ResourceQuotaStatusHard :: Maybe (Map String Quantity)
v1ResourceQuotaStatusUsed :: Maybe (Map String Quantity)
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"hard" Key -> Maybe (Map String Quantity) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Quantity)
v1ResourceQuotaStatusHard
      , Key
"used" Key -> Maybe (Map String Quantity) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Quantity)
v1ResourceQuotaStatusUsed
      ]


-- | Construct a value of type 'V1ResourceQuotaStatus' (by applying it's required fields, if any)
mkV1ResourceQuotaStatus
  :: V1ResourceQuotaStatus
mkV1ResourceQuotaStatus :: V1ResourceQuotaStatus
mkV1ResourceQuotaStatus =
  V1ResourceQuotaStatus
  { $sel:v1ResourceQuotaStatusHard:V1ResourceQuotaStatus :: Maybe (Map String Quantity)
v1ResourceQuotaStatusHard = Maybe (Map String Quantity)
forall a. Maybe a
Nothing
  , $sel:v1ResourceQuotaStatusUsed:V1ResourceQuotaStatus :: Maybe (Map String Quantity)
v1ResourceQuotaStatusUsed = Maybe (Map String Quantity)
forall a. Maybe a
Nothing
  }

-- ** V1ResourceRequirements
-- | V1ResourceRequirements
-- ResourceRequirements describes the compute resource requirements.
data V1ResourceRequirements = V1ResourceRequirements
  { V1ResourceRequirements -> Maybe [V1ResourceClaim]
v1ResourceRequirementsClaims :: !(Maybe [V1ResourceClaim]) -- ^ "claims" - Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container.  This is an alpha field and requires enabling the DynamicResourceAllocation feature gate.  This field is immutable. It can only be set for containers.
  , V1ResourceRequirements -> Maybe (Map String Quantity)
v1ResourceRequirementsLimits :: !(Maybe (Map.Map String Quantity)) -- ^ "limits" - Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
  , V1ResourceRequirements -> Maybe (Map String Quantity)
v1ResourceRequirementsRequests :: !(Maybe (Map.Map String Quantity)) -- ^ "requests" - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
  } deriving (Int -> V1ResourceRequirements -> ShowS
[V1ResourceRequirements] -> ShowS
V1ResourceRequirements -> String
(Int -> V1ResourceRequirements -> ShowS)
-> (V1ResourceRequirements -> String)
-> ([V1ResourceRequirements] -> ShowS)
-> Show V1ResourceRequirements
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ResourceRequirements -> ShowS
showsPrec :: Int -> V1ResourceRequirements -> ShowS
$cshow :: V1ResourceRequirements -> String
show :: V1ResourceRequirements -> String
$cshowList :: [V1ResourceRequirements] -> ShowS
showList :: [V1ResourceRequirements] -> ShowS
P.Show, V1ResourceRequirements -> V1ResourceRequirements -> Bool
(V1ResourceRequirements -> V1ResourceRequirements -> Bool)
-> (V1ResourceRequirements -> V1ResourceRequirements -> Bool)
-> Eq V1ResourceRequirements
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ResourceRequirements -> V1ResourceRequirements -> Bool
== :: V1ResourceRequirements -> V1ResourceRequirements -> Bool
$c/= :: V1ResourceRequirements -> V1ResourceRequirements -> Bool
/= :: V1ResourceRequirements -> V1ResourceRequirements -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ResourceRequirements
instance A.FromJSON V1ResourceRequirements where
  parseJSON :: Value -> Parser V1ResourceRequirements
parseJSON = String
-> (Object -> Parser V1ResourceRequirements)
-> Value
-> Parser V1ResourceRequirements
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ResourceRequirements" ((Object -> Parser V1ResourceRequirements)
 -> Value -> Parser V1ResourceRequirements)
-> (Object -> Parser V1ResourceRequirements)
-> Value
-> Parser V1ResourceRequirements
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1ResourceClaim]
-> Maybe (Map String Quantity)
-> Maybe (Map String Quantity)
-> V1ResourceRequirements
V1ResourceRequirements
      (Maybe [V1ResourceClaim]
 -> Maybe (Map String Quantity)
 -> Maybe (Map String Quantity)
 -> V1ResourceRequirements)
-> Parser (Maybe [V1ResourceClaim])
-> Parser
     (Maybe (Map String Quantity)
      -> Maybe (Map String Quantity) -> V1ResourceRequirements)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1ResourceClaim])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"claims")
      Parser
  (Maybe (Map String Quantity)
   -> Maybe (Map String Quantity) -> V1ResourceRequirements)
-> Parser (Maybe (Map String Quantity))
-> Parser (Maybe (Map String Quantity) -> V1ResourceRequirements)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String Quantity))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"limits")
      Parser (Maybe (Map String Quantity) -> V1ResourceRequirements)
-> Parser (Maybe (Map String Quantity))
-> Parser V1ResourceRequirements
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String Quantity))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"requests")

-- | ToJSON V1ResourceRequirements
instance A.ToJSON V1ResourceRequirements where
  toJSON :: V1ResourceRequirements -> Value
toJSON V1ResourceRequirements {Maybe [V1ResourceClaim]
Maybe (Map String Quantity)
$sel:v1ResourceRequirementsClaims:V1ResourceRequirements :: V1ResourceRequirements -> Maybe [V1ResourceClaim]
$sel:v1ResourceRequirementsLimits:V1ResourceRequirements :: V1ResourceRequirements -> Maybe (Map String Quantity)
$sel:v1ResourceRequirementsRequests:V1ResourceRequirements :: V1ResourceRequirements -> Maybe (Map String Quantity)
v1ResourceRequirementsClaims :: Maybe [V1ResourceClaim]
v1ResourceRequirementsLimits :: Maybe (Map String Quantity)
v1ResourceRequirementsRequests :: Maybe (Map String Quantity)
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"claims" Key -> Maybe [V1ResourceClaim] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1ResourceClaim]
v1ResourceRequirementsClaims
      , Key
"limits" Key -> Maybe (Map String Quantity) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Quantity)
v1ResourceRequirementsLimits
      , Key
"requests" Key -> Maybe (Map String Quantity) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Quantity)
v1ResourceRequirementsRequests
      ]


-- | Construct a value of type 'V1ResourceRequirements' (by applying it's required fields, if any)
mkV1ResourceRequirements
  :: V1ResourceRequirements
mkV1ResourceRequirements :: V1ResourceRequirements
mkV1ResourceRequirements =
  V1ResourceRequirements
  { $sel:v1ResourceRequirementsClaims:V1ResourceRequirements :: Maybe [V1ResourceClaim]
v1ResourceRequirementsClaims = Maybe [V1ResourceClaim]
forall a. Maybe a
Nothing
  , $sel:v1ResourceRequirementsLimits:V1ResourceRequirements :: Maybe (Map String Quantity)
v1ResourceRequirementsLimits = Maybe (Map String Quantity)
forall a. Maybe a
Nothing
  , $sel:v1ResourceRequirementsRequests:V1ResourceRequirements :: Maybe (Map String Quantity)
v1ResourceRequirementsRequests = Maybe (Map String Quantity)
forall a. Maybe a
Nothing
  }

-- ** V1ResourceRule
-- | V1ResourceRule
-- ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.
data V1ResourceRule = V1ResourceRule
  { V1ResourceRule -> Maybe [Text]
v1ResourceRuleApiGroups :: !(Maybe [Text]) -- ^ "apiGroups" - APIGroups is the name of the APIGroup that contains the resources.  If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.  \&quot;*\&quot; means all.
  , V1ResourceRule -> Maybe [Text]
v1ResourceRuleResourceNames :: !(Maybe [Text]) -- ^ "resourceNames" - ResourceNames is an optional white list of names that the rule applies to.  An empty set means that everything is allowed.  \&quot;*\&quot; means all.
  , V1ResourceRule -> Maybe [Text]
v1ResourceRuleResources :: !(Maybe [Text]) -- ^ "resources" - Resources is a list of resources this rule applies to.  \&quot;*\&quot; means all in the specified apiGroups.  \&quot;*/foo\&quot; represents the subresource &#39;foo&#39; for all resources in the specified apiGroups.
  , V1ResourceRule -> [Text]
v1ResourceRuleVerbs :: !([Text]) -- ^ /Required/ "verbs" - Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy.  \&quot;*\&quot; means all.
  } deriving (Int -> V1ResourceRule -> ShowS
[V1ResourceRule] -> ShowS
V1ResourceRule -> String
(Int -> V1ResourceRule -> ShowS)
-> (V1ResourceRule -> String)
-> ([V1ResourceRule] -> ShowS)
-> Show V1ResourceRule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ResourceRule -> ShowS
showsPrec :: Int -> V1ResourceRule -> ShowS
$cshow :: V1ResourceRule -> String
show :: V1ResourceRule -> String
$cshowList :: [V1ResourceRule] -> ShowS
showList :: [V1ResourceRule] -> ShowS
P.Show, V1ResourceRule -> V1ResourceRule -> Bool
(V1ResourceRule -> V1ResourceRule -> Bool)
-> (V1ResourceRule -> V1ResourceRule -> Bool) -> Eq V1ResourceRule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ResourceRule -> V1ResourceRule -> Bool
== :: V1ResourceRule -> V1ResourceRule -> Bool
$c/= :: V1ResourceRule -> V1ResourceRule -> Bool
/= :: V1ResourceRule -> V1ResourceRule -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ResourceRule
instance A.FromJSON V1ResourceRule where
  parseJSON :: Value -> Parser V1ResourceRule
parseJSON = String
-> (Object -> Parser V1ResourceRule)
-> Value
-> Parser V1ResourceRule
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ResourceRule" ((Object -> Parser V1ResourceRule)
 -> Value -> Parser V1ResourceRule)
-> (Object -> Parser V1ResourceRule)
-> Value
-> Parser V1ResourceRule
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [Text]
-> Maybe [Text] -> Maybe [Text] -> [Text] -> V1ResourceRule
V1ResourceRule
      (Maybe [Text]
 -> Maybe [Text] -> Maybe [Text] -> [Text] -> V1ResourceRule)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [Text] -> Maybe [Text] -> [Text] -> V1ResourceRule)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiGroups")
      Parser (Maybe [Text] -> Maybe [Text] -> [Text] -> V1ResourceRule)
-> Parser (Maybe [Text])
-> Parser (Maybe [Text] -> [Text] -> V1ResourceRule)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resourceNames")
      Parser (Maybe [Text] -> [Text] -> V1ResourceRule)
-> Parser (Maybe [Text]) -> Parser ([Text] -> V1ResourceRule)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resources")
      Parser ([Text] -> V1ResourceRule)
-> Parser [Text] -> Parser V1ResourceRule
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"verbs")

-- | ToJSON V1ResourceRule
instance A.ToJSON V1ResourceRule where
  toJSON :: V1ResourceRule -> Value
toJSON V1ResourceRule {[Text]
Maybe [Text]
$sel:v1ResourceRuleApiGroups:V1ResourceRule :: V1ResourceRule -> Maybe [Text]
$sel:v1ResourceRuleResourceNames:V1ResourceRule :: V1ResourceRule -> Maybe [Text]
$sel:v1ResourceRuleResources:V1ResourceRule :: V1ResourceRule -> Maybe [Text]
$sel:v1ResourceRuleVerbs:V1ResourceRule :: V1ResourceRule -> [Text]
v1ResourceRuleApiGroups :: Maybe [Text]
v1ResourceRuleResourceNames :: Maybe [Text]
v1ResourceRuleResources :: Maybe [Text]
v1ResourceRuleVerbs :: [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiGroups" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1ResourceRuleApiGroups
      , Key
"resourceNames" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1ResourceRuleResourceNames
      , Key
"resources" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1ResourceRuleResources
      , Key
"verbs" Key -> [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [Text]
v1ResourceRuleVerbs
      ]


-- | Construct a value of type 'V1ResourceRule' (by applying it's required fields, if any)
mkV1ResourceRule
  :: [Text] -- ^ 'v1ResourceRuleVerbs': Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy.  \"*\" means all.
  -> V1ResourceRule
mkV1ResourceRule :: [Text] -> V1ResourceRule
mkV1ResourceRule [Text]
v1ResourceRuleVerbs =
  V1ResourceRule
  { $sel:v1ResourceRuleApiGroups:V1ResourceRule :: Maybe [Text]
v1ResourceRuleApiGroups = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1ResourceRuleResourceNames:V1ResourceRule :: Maybe [Text]
v1ResourceRuleResourceNames = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1ResourceRuleResources:V1ResourceRule :: Maybe [Text]
v1ResourceRuleResources = Maybe [Text]
forall a. Maybe a
Nothing
  , [Text]
$sel:v1ResourceRuleVerbs:V1ResourceRule :: [Text]
v1ResourceRuleVerbs :: [Text]
v1ResourceRuleVerbs
  }

-- ** V1ResourceStatus
-- | V1ResourceStatus
-- ResourceStatus represents the status of a single resource allocated to a Pod.
data V1ResourceStatus = V1ResourceStatus
  { V1ResourceStatus -> Text
v1ResourceStatusName :: !(Text) -- ^ /Required/ "name" - Name of the resource. Must be unique within the pod and in case of non-DRA resource, match one of the resources from the pod spec. For DRA resources, the value must be \&quot;claim:&lt;claim_name&gt;/&lt;request&gt;\&quot;. When this status is reported about a container, the \&quot;claim_name\&quot; and \&quot;request\&quot; must match one of the claims of this container.
  , V1ResourceStatus -> Maybe [V1ResourceHealth]
v1ResourceStatusResources :: !(Maybe [V1ResourceHealth]) -- ^ "resources" - List of unique resources health. Each element in the list contains an unique resource ID and its health. At a minimum, for the lifetime of a Pod, resource ID must uniquely identify the resource allocated to the Pod on the Node. If other Pod on the same Node reports the status with the same resource ID, it must be the same resource they share. See ResourceID type definition for a specific format it has in various use cases.
  } deriving (Int -> V1ResourceStatus -> ShowS
[V1ResourceStatus] -> ShowS
V1ResourceStatus -> String
(Int -> V1ResourceStatus -> ShowS)
-> (V1ResourceStatus -> String)
-> ([V1ResourceStatus] -> ShowS)
-> Show V1ResourceStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ResourceStatus -> ShowS
showsPrec :: Int -> V1ResourceStatus -> ShowS
$cshow :: V1ResourceStatus -> String
show :: V1ResourceStatus -> String
$cshowList :: [V1ResourceStatus] -> ShowS
showList :: [V1ResourceStatus] -> ShowS
P.Show, V1ResourceStatus -> V1ResourceStatus -> Bool
(V1ResourceStatus -> V1ResourceStatus -> Bool)
-> (V1ResourceStatus -> V1ResourceStatus -> Bool)
-> Eq V1ResourceStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ResourceStatus -> V1ResourceStatus -> Bool
== :: V1ResourceStatus -> V1ResourceStatus -> Bool
$c/= :: V1ResourceStatus -> V1ResourceStatus -> Bool
/= :: V1ResourceStatus -> V1ResourceStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ResourceStatus
instance A.FromJSON V1ResourceStatus where
  parseJSON :: Value -> Parser V1ResourceStatus
parseJSON = String
-> (Object -> Parser V1ResourceStatus)
-> Value
-> Parser V1ResourceStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ResourceStatus" ((Object -> Parser V1ResourceStatus)
 -> Value -> Parser V1ResourceStatus)
-> (Object -> Parser V1ResourceStatus)
-> Value
-> Parser V1ResourceStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Maybe [V1ResourceHealth] -> V1ResourceStatus
V1ResourceStatus
      (Text -> Maybe [V1ResourceHealth] -> V1ResourceStatus)
-> Parser Text
-> Parser (Maybe [V1ResourceHealth] -> V1ResourceStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser (Maybe [V1ResourceHealth] -> V1ResourceStatus)
-> Parser (Maybe [V1ResourceHealth]) -> Parser V1ResourceStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1ResourceHealth])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resources")

-- | ToJSON V1ResourceStatus
instance A.ToJSON V1ResourceStatus where
  toJSON :: V1ResourceStatus -> Value
toJSON V1ResourceStatus {Maybe [V1ResourceHealth]
Text
$sel:v1ResourceStatusName:V1ResourceStatus :: V1ResourceStatus -> Text
$sel:v1ResourceStatusResources:V1ResourceStatus :: V1ResourceStatus -> Maybe [V1ResourceHealth]
v1ResourceStatusName :: Text
v1ResourceStatusResources :: Maybe [V1ResourceHealth]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ResourceStatusName
      , Key
"resources" Key -> Maybe [V1ResourceHealth] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1ResourceHealth]
v1ResourceStatusResources
      ]


-- | Construct a value of type 'V1ResourceStatus' (by applying it's required fields, if any)
mkV1ResourceStatus
  :: Text -- ^ 'v1ResourceStatusName': Name of the resource. Must be unique within the pod and in case of non-DRA resource, match one of the resources from the pod spec. For DRA resources, the value must be \"claim:<claim_name>/<request>\". When this status is reported about a container, the \"claim_name\" and \"request\" must match one of the claims of this container.
  -> V1ResourceStatus
mkV1ResourceStatus :: Text -> V1ResourceStatus
mkV1ResourceStatus Text
v1ResourceStatusName =
  V1ResourceStatus
  { Text
$sel:v1ResourceStatusName:V1ResourceStatus :: Text
v1ResourceStatusName :: Text
v1ResourceStatusName
  , $sel:v1ResourceStatusResources:V1ResourceStatus :: Maybe [V1ResourceHealth]
v1ResourceStatusResources = Maybe [V1ResourceHealth]
forall a. Maybe a
Nothing
  }

-- ** V1Role
-- | V1Role
-- Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
data V1Role = V1Role
  { V1Role -> Maybe Text
v1RoleApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1Role -> Maybe Text
v1RoleKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1Role -> Maybe V1ObjectMeta
v1RoleMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1Role -> Maybe [V1PolicyRule]
v1RoleRules :: !(Maybe [V1PolicyRule]) -- ^ "rules" - Rules holds all the PolicyRules for this Role
  } deriving (Int -> V1Role -> ShowS
[V1Role] -> ShowS
V1Role -> String
(Int -> V1Role -> ShowS)
-> (V1Role -> String) -> ([V1Role] -> ShowS) -> Show V1Role
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1Role -> ShowS
showsPrec :: Int -> V1Role -> ShowS
$cshow :: V1Role -> String
show :: V1Role -> String
$cshowList :: [V1Role] -> ShowS
showList :: [V1Role] -> ShowS
P.Show, V1Role -> V1Role -> Bool
(V1Role -> V1Role -> Bool)
-> (V1Role -> V1Role -> Bool) -> Eq V1Role
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1Role -> V1Role -> Bool
== :: V1Role -> V1Role -> Bool
$c/= :: V1Role -> V1Role -> Bool
/= :: V1Role -> V1Role -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1Role
instance A.FromJSON V1Role where
  parseJSON :: Value -> Parser V1Role
parseJSON = String -> (Object -> Parser V1Role) -> Value -> Parser V1Role
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1Role" ((Object -> Parser V1Role) -> Value -> Parser V1Role)
-> (Object -> Parser V1Role) -> Value -> Parser V1Role
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe [V1PolicyRule]
-> V1Role
V1Role
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe [V1PolicyRule]
 -> V1Role)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta -> Maybe [V1PolicyRule] -> V1Role)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta -> Maybe [V1PolicyRule] -> V1Role)
-> Parser (Maybe Text)
-> Parser (Maybe V1ObjectMeta -> Maybe [V1PolicyRule] -> V1Role)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ObjectMeta -> Maybe [V1PolicyRule] -> V1Role)
-> Parser (Maybe V1ObjectMeta)
-> Parser (Maybe [V1PolicyRule] -> V1Role)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (Maybe [V1PolicyRule] -> V1Role)
-> Parser (Maybe [V1PolicyRule]) -> Parser V1Role
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1PolicyRule])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"rules")

-- | ToJSON V1Role
instance A.ToJSON V1Role where
  toJSON :: V1Role -> Value
toJSON V1Role {Maybe [V1PolicyRule]
Maybe Text
Maybe V1ObjectMeta
$sel:v1RoleApiVersion:V1Role :: V1Role -> Maybe Text
$sel:v1RoleKind:V1Role :: V1Role -> Maybe Text
$sel:v1RoleMetadata:V1Role :: V1Role -> Maybe V1ObjectMeta
$sel:v1RoleRules:V1Role :: V1Role -> Maybe [V1PolicyRule]
v1RoleApiVersion :: Maybe Text
v1RoleKind :: Maybe Text
v1RoleMetadata :: Maybe V1ObjectMeta
v1RoleRules :: Maybe [V1PolicyRule]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1RoleApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1RoleKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1RoleMetadata
      , Key
"rules" Key -> Maybe [V1PolicyRule] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1PolicyRule]
v1RoleRules
      ]


-- | Construct a value of type 'V1Role' (by applying it's required fields, if any)
mkV1Role
  :: V1Role
mkV1Role :: V1Role
mkV1Role =
  V1Role
  { $sel:v1RoleApiVersion:V1Role :: Maybe Text
v1RoleApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1RoleKind:V1Role :: Maybe Text
v1RoleKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1RoleMetadata:V1Role :: Maybe V1ObjectMeta
v1RoleMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1RoleRules:V1Role :: Maybe [V1PolicyRule]
v1RoleRules = Maybe [V1PolicyRule]
forall a. Maybe a
Nothing
  }

-- ** V1RoleBinding
-- | V1RoleBinding
-- RoleBinding references a role, but does not contain it.  It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in.  RoleBindings in a given namespace only have effect in that namespace.
data V1RoleBinding = V1RoleBinding
  { V1RoleBinding -> Maybe Text
v1RoleBindingApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1RoleBinding -> Maybe Text
v1RoleBindingKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1RoleBinding -> Maybe V1ObjectMeta
v1RoleBindingMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1RoleBinding -> V1RoleRef
v1RoleBindingRoleRef :: !(V1RoleRef) -- ^ /Required/ "roleRef"
  , V1RoleBinding -> Maybe [RbacV1Subject]
v1RoleBindingSubjects :: !(Maybe [RbacV1Subject]) -- ^ "subjects" - Subjects holds references to the objects the role applies to.
  } deriving (Int -> V1RoleBinding -> ShowS
[V1RoleBinding] -> ShowS
V1RoleBinding -> String
(Int -> V1RoleBinding -> ShowS)
-> (V1RoleBinding -> String)
-> ([V1RoleBinding] -> ShowS)
-> Show V1RoleBinding
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1RoleBinding -> ShowS
showsPrec :: Int -> V1RoleBinding -> ShowS
$cshow :: V1RoleBinding -> String
show :: V1RoleBinding -> String
$cshowList :: [V1RoleBinding] -> ShowS
showList :: [V1RoleBinding] -> ShowS
P.Show, V1RoleBinding -> V1RoleBinding -> Bool
(V1RoleBinding -> V1RoleBinding -> Bool)
-> (V1RoleBinding -> V1RoleBinding -> Bool) -> Eq V1RoleBinding
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1RoleBinding -> V1RoleBinding -> Bool
== :: V1RoleBinding -> V1RoleBinding -> Bool
$c/= :: V1RoleBinding -> V1RoleBinding -> Bool
/= :: V1RoleBinding -> V1RoleBinding -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1RoleBinding
instance A.FromJSON V1RoleBinding where
  parseJSON :: Value -> Parser V1RoleBinding
parseJSON = String
-> (Object -> Parser V1RoleBinding)
-> Value
-> Parser V1RoleBinding
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1RoleBinding" ((Object -> Parser V1RoleBinding) -> Value -> Parser V1RoleBinding)
-> (Object -> Parser V1RoleBinding)
-> Value
-> Parser V1RoleBinding
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> V1RoleRef
-> Maybe [RbacV1Subject]
-> V1RoleBinding
V1RoleBinding
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> V1RoleRef
 -> Maybe [RbacV1Subject]
 -> V1RoleBinding)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> V1RoleRef
      -> Maybe [RbacV1Subject]
      -> V1RoleBinding)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> V1RoleRef
   -> Maybe [RbacV1Subject]
   -> V1RoleBinding)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> V1RoleRef -> Maybe [RbacV1Subject] -> V1RoleBinding)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> V1RoleRef -> Maybe [RbacV1Subject] -> V1RoleBinding)
-> Parser (Maybe V1ObjectMeta)
-> Parser (V1RoleRef -> Maybe [RbacV1Subject] -> V1RoleBinding)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (V1RoleRef -> Maybe [RbacV1Subject] -> V1RoleBinding)
-> Parser V1RoleRef
-> Parser (Maybe [RbacV1Subject] -> V1RoleBinding)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1RoleRef
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"roleRef")
      Parser (Maybe [RbacV1Subject] -> V1RoleBinding)
-> Parser (Maybe [RbacV1Subject]) -> Parser V1RoleBinding
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [RbacV1Subject])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"subjects")

-- | ToJSON V1RoleBinding
instance A.ToJSON V1RoleBinding where
  toJSON :: V1RoleBinding -> Value
toJSON V1RoleBinding {Maybe [RbacV1Subject]
Maybe Text
Maybe V1ObjectMeta
V1RoleRef
$sel:v1RoleBindingApiVersion:V1RoleBinding :: V1RoleBinding -> Maybe Text
$sel:v1RoleBindingKind:V1RoleBinding :: V1RoleBinding -> Maybe Text
$sel:v1RoleBindingMetadata:V1RoleBinding :: V1RoleBinding -> Maybe V1ObjectMeta
$sel:v1RoleBindingRoleRef:V1RoleBinding :: V1RoleBinding -> V1RoleRef
$sel:v1RoleBindingSubjects:V1RoleBinding :: V1RoleBinding -> Maybe [RbacV1Subject]
v1RoleBindingApiVersion :: Maybe Text
v1RoleBindingKind :: Maybe Text
v1RoleBindingMetadata :: Maybe V1ObjectMeta
v1RoleBindingRoleRef :: V1RoleRef
v1RoleBindingSubjects :: Maybe [RbacV1Subject]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1RoleBindingApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1RoleBindingKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1RoleBindingMetadata
      , Key
"roleRef" Key -> V1RoleRef -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1RoleRef
v1RoleBindingRoleRef
      , Key
"subjects" Key -> Maybe [RbacV1Subject] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [RbacV1Subject]
v1RoleBindingSubjects
      ]


-- | Construct a value of type 'V1RoleBinding' (by applying it's required fields, if any)
mkV1RoleBinding
  :: V1RoleRef -- ^ 'v1RoleBindingRoleRef' 
  -> V1RoleBinding
mkV1RoleBinding :: V1RoleRef -> V1RoleBinding
mkV1RoleBinding V1RoleRef
v1RoleBindingRoleRef =
  V1RoleBinding
  { $sel:v1RoleBindingApiVersion:V1RoleBinding :: Maybe Text
v1RoleBindingApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1RoleBindingKind:V1RoleBinding :: Maybe Text
v1RoleBindingKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1RoleBindingMetadata:V1RoleBinding :: Maybe V1ObjectMeta
v1RoleBindingMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , V1RoleRef
$sel:v1RoleBindingRoleRef:V1RoleBinding :: V1RoleRef
v1RoleBindingRoleRef :: V1RoleRef
v1RoleBindingRoleRef
  , $sel:v1RoleBindingSubjects:V1RoleBinding :: Maybe [RbacV1Subject]
v1RoleBindingSubjects = Maybe [RbacV1Subject]
forall a. Maybe a
Nothing
  }

-- ** V1RoleBindingList
-- | V1RoleBindingList
-- RoleBindingList is a collection of RoleBindings
data V1RoleBindingList = V1RoleBindingList
  { V1RoleBindingList -> Maybe Text
v1RoleBindingListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1RoleBindingList -> [V1RoleBinding]
v1RoleBindingListItems :: !([V1RoleBinding]) -- ^ /Required/ "items" - Items is a list of RoleBindings
  , V1RoleBindingList -> Maybe Text
v1RoleBindingListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1RoleBindingList -> Maybe V1ListMeta
v1RoleBindingListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1RoleBindingList -> ShowS
[V1RoleBindingList] -> ShowS
V1RoleBindingList -> String
(Int -> V1RoleBindingList -> ShowS)
-> (V1RoleBindingList -> String)
-> ([V1RoleBindingList] -> ShowS)
-> Show V1RoleBindingList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1RoleBindingList -> ShowS
showsPrec :: Int -> V1RoleBindingList -> ShowS
$cshow :: V1RoleBindingList -> String
show :: V1RoleBindingList -> String
$cshowList :: [V1RoleBindingList] -> ShowS
showList :: [V1RoleBindingList] -> ShowS
P.Show, V1RoleBindingList -> V1RoleBindingList -> Bool
(V1RoleBindingList -> V1RoleBindingList -> Bool)
-> (V1RoleBindingList -> V1RoleBindingList -> Bool)
-> Eq V1RoleBindingList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1RoleBindingList -> V1RoleBindingList -> Bool
== :: V1RoleBindingList -> V1RoleBindingList -> Bool
$c/= :: V1RoleBindingList -> V1RoleBindingList -> Bool
/= :: V1RoleBindingList -> V1RoleBindingList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1RoleBindingList
instance A.FromJSON V1RoleBindingList where
  parseJSON :: Value -> Parser V1RoleBindingList
parseJSON = String
-> (Object -> Parser V1RoleBindingList)
-> Value
-> Parser V1RoleBindingList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1RoleBindingList" ((Object -> Parser V1RoleBindingList)
 -> Value -> Parser V1RoleBindingList)
-> (Object -> Parser V1RoleBindingList)
-> Value
-> Parser V1RoleBindingList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1RoleBinding]
-> Maybe Text
-> Maybe V1ListMeta
-> V1RoleBindingList
V1RoleBindingList
      (Maybe Text
 -> [V1RoleBinding]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1RoleBindingList)
-> Parser (Maybe Text)
-> Parser
     ([V1RoleBinding]
      -> Maybe Text -> Maybe V1ListMeta -> V1RoleBindingList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1RoleBinding]
   -> Maybe Text -> Maybe V1ListMeta -> V1RoleBindingList)
-> Parser [V1RoleBinding]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1RoleBindingList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1RoleBinding]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1RoleBindingList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1RoleBindingList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1RoleBindingList)
-> Parser (Maybe V1ListMeta) -> Parser V1RoleBindingList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1RoleBindingList
instance A.ToJSON V1RoleBindingList where
  toJSON :: V1RoleBindingList -> Value
toJSON V1RoleBindingList {[V1RoleBinding]
Maybe Text
Maybe V1ListMeta
$sel:v1RoleBindingListApiVersion:V1RoleBindingList :: V1RoleBindingList -> Maybe Text
$sel:v1RoleBindingListItems:V1RoleBindingList :: V1RoleBindingList -> [V1RoleBinding]
$sel:v1RoleBindingListKind:V1RoleBindingList :: V1RoleBindingList -> Maybe Text
$sel:v1RoleBindingListMetadata:V1RoleBindingList :: V1RoleBindingList -> Maybe V1ListMeta
v1RoleBindingListApiVersion :: Maybe Text
v1RoleBindingListItems :: [V1RoleBinding]
v1RoleBindingListKind :: Maybe Text
v1RoleBindingListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1RoleBindingListApiVersion
      , Key
"items" Key -> [V1RoleBinding] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1RoleBinding]
v1RoleBindingListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1RoleBindingListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1RoleBindingListMetadata
      ]


-- | Construct a value of type 'V1RoleBindingList' (by applying it's required fields, if any)
mkV1RoleBindingList
  :: [V1RoleBinding] -- ^ 'v1RoleBindingListItems': Items is a list of RoleBindings
  -> V1RoleBindingList
mkV1RoleBindingList :: [V1RoleBinding] -> V1RoleBindingList
mkV1RoleBindingList [V1RoleBinding]
v1RoleBindingListItems =
  V1RoleBindingList
  { $sel:v1RoleBindingListApiVersion:V1RoleBindingList :: Maybe Text
v1RoleBindingListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1RoleBinding]
$sel:v1RoleBindingListItems:V1RoleBindingList :: [V1RoleBinding]
v1RoleBindingListItems :: [V1RoleBinding]
v1RoleBindingListItems
  , $sel:v1RoleBindingListKind:V1RoleBindingList :: Maybe Text
v1RoleBindingListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1RoleBindingListMetadata:V1RoleBindingList :: Maybe V1ListMeta
v1RoleBindingListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1RoleList
-- | V1RoleList
-- RoleList is a collection of Roles
data V1RoleList = V1RoleList
  { V1RoleList -> Maybe Text
v1RoleListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1RoleList -> [V1Role]
v1RoleListItems :: !([V1Role]) -- ^ /Required/ "items" - Items is a list of Roles
  , V1RoleList -> Maybe Text
v1RoleListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1RoleList -> Maybe V1ListMeta
v1RoleListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1RoleList -> ShowS
[V1RoleList] -> ShowS
V1RoleList -> String
(Int -> V1RoleList -> ShowS)
-> (V1RoleList -> String)
-> ([V1RoleList] -> ShowS)
-> Show V1RoleList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1RoleList -> ShowS
showsPrec :: Int -> V1RoleList -> ShowS
$cshow :: V1RoleList -> String
show :: V1RoleList -> String
$cshowList :: [V1RoleList] -> ShowS
showList :: [V1RoleList] -> ShowS
P.Show, V1RoleList -> V1RoleList -> Bool
(V1RoleList -> V1RoleList -> Bool)
-> (V1RoleList -> V1RoleList -> Bool) -> Eq V1RoleList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1RoleList -> V1RoleList -> Bool
== :: V1RoleList -> V1RoleList -> Bool
$c/= :: V1RoleList -> V1RoleList -> Bool
/= :: V1RoleList -> V1RoleList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1RoleList
instance A.FromJSON V1RoleList where
  parseJSON :: Value -> Parser V1RoleList
parseJSON = String
-> (Object -> Parser V1RoleList) -> Value -> Parser V1RoleList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1RoleList" ((Object -> Parser V1RoleList) -> Value -> Parser V1RoleList)
-> (Object -> Parser V1RoleList) -> Value -> Parser V1RoleList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1Role] -> Maybe Text -> Maybe V1ListMeta -> V1RoleList
V1RoleList
      (Maybe Text
 -> [V1Role] -> Maybe Text -> Maybe V1ListMeta -> V1RoleList)
-> Parser (Maybe Text)
-> Parser
     ([V1Role] -> Maybe Text -> Maybe V1ListMeta -> V1RoleList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser ([V1Role] -> Maybe Text -> Maybe V1ListMeta -> V1RoleList)
-> Parser [V1Role]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1RoleList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1Role]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1RoleList)
-> Parser (Maybe Text) -> Parser (Maybe V1ListMeta -> V1RoleList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1RoleList)
-> Parser (Maybe V1ListMeta) -> Parser V1RoleList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1RoleList
instance A.ToJSON V1RoleList where
  toJSON :: V1RoleList -> Value
toJSON V1RoleList {[V1Role]
Maybe Text
Maybe V1ListMeta
$sel:v1RoleListApiVersion:V1RoleList :: V1RoleList -> Maybe Text
$sel:v1RoleListItems:V1RoleList :: V1RoleList -> [V1Role]
$sel:v1RoleListKind:V1RoleList :: V1RoleList -> Maybe Text
$sel:v1RoleListMetadata:V1RoleList :: V1RoleList -> Maybe V1ListMeta
v1RoleListApiVersion :: Maybe Text
v1RoleListItems :: [V1Role]
v1RoleListKind :: Maybe Text
v1RoleListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1RoleListApiVersion
      , Key
"items" Key -> [V1Role] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1Role]
v1RoleListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1RoleListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1RoleListMetadata
      ]


-- | Construct a value of type 'V1RoleList' (by applying it's required fields, if any)
mkV1RoleList
  :: [V1Role] -- ^ 'v1RoleListItems': Items is a list of Roles
  -> V1RoleList
mkV1RoleList :: [V1Role] -> V1RoleList
mkV1RoleList [V1Role]
v1RoleListItems =
  V1RoleList
  { $sel:v1RoleListApiVersion:V1RoleList :: Maybe Text
v1RoleListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1Role]
$sel:v1RoleListItems:V1RoleList :: [V1Role]
v1RoleListItems :: [V1Role]
v1RoleListItems
  , $sel:v1RoleListKind:V1RoleList :: Maybe Text
v1RoleListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1RoleListMetadata:V1RoleList :: Maybe V1ListMeta
v1RoleListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1RoleRef
-- | V1RoleRef
-- RoleRef contains information that points to the role being used
data V1RoleRef = V1RoleRef
  { V1RoleRef -> Text
v1RoleRefApiGroup :: !(Text) -- ^ /Required/ "apiGroup" - APIGroup is the group for the resource being referenced
  , V1RoleRef -> Text
v1RoleRefKind :: !(Text) -- ^ /Required/ "kind" - Kind is the type of resource being referenced
  , V1RoleRef -> Text
v1RoleRefName :: !(Text) -- ^ /Required/ "name" - Name is the name of resource being referenced
  } deriving (Int -> V1RoleRef -> ShowS
[V1RoleRef] -> ShowS
V1RoleRef -> String
(Int -> V1RoleRef -> ShowS)
-> (V1RoleRef -> String)
-> ([V1RoleRef] -> ShowS)
-> Show V1RoleRef
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1RoleRef -> ShowS
showsPrec :: Int -> V1RoleRef -> ShowS
$cshow :: V1RoleRef -> String
show :: V1RoleRef -> String
$cshowList :: [V1RoleRef] -> ShowS
showList :: [V1RoleRef] -> ShowS
P.Show, V1RoleRef -> V1RoleRef -> Bool
(V1RoleRef -> V1RoleRef -> Bool)
-> (V1RoleRef -> V1RoleRef -> Bool) -> Eq V1RoleRef
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1RoleRef -> V1RoleRef -> Bool
== :: V1RoleRef -> V1RoleRef -> Bool
$c/= :: V1RoleRef -> V1RoleRef -> Bool
/= :: V1RoleRef -> V1RoleRef -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1RoleRef
instance A.FromJSON V1RoleRef where
  parseJSON :: Value -> Parser V1RoleRef
parseJSON = String -> (Object -> Parser V1RoleRef) -> Value -> Parser V1RoleRef
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1RoleRef" ((Object -> Parser V1RoleRef) -> Value -> Parser V1RoleRef)
-> (Object -> Parser V1RoleRef) -> Value -> Parser V1RoleRef
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Text -> Text -> V1RoleRef
V1RoleRef
      (Text -> Text -> Text -> V1RoleRef)
-> Parser Text -> Parser (Text -> Text -> V1RoleRef)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"apiGroup")
      Parser (Text -> Text -> V1RoleRef)
-> Parser Text -> Parser (Text -> V1RoleRef)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"kind")
      Parser (Text -> V1RoleRef) -> Parser Text -> Parser V1RoleRef
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")

-- | ToJSON V1RoleRef
instance A.ToJSON V1RoleRef where
  toJSON :: V1RoleRef -> Value
toJSON V1RoleRef {Text
$sel:v1RoleRefApiGroup:V1RoleRef :: V1RoleRef -> Text
$sel:v1RoleRefKind:V1RoleRef :: V1RoleRef -> Text
$sel:v1RoleRefName:V1RoleRef :: V1RoleRef -> Text
v1RoleRefApiGroup :: Text
v1RoleRefKind :: Text
v1RoleRefName :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiGroup" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1RoleRefApiGroup
      , Key
"kind" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1RoleRefKind
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1RoleRefName
      ]


-- | Construct a value of type 'V1RoleRef' (by applying it's required fields, if any)
mkV1RoleRef
  :: Text -- ^ 'v1RoleRefApiGroup': APIGroup is the group for the resource being referenced
  -> Text -- ^ 'v1RoleRefKind': Kind is the type of resource being referenced
  -> Text -- ^ 'v1RoleRefName': Name is the name of resource being referenced
  -> V1RoleRef
mkV1RoleRef :: Text -> Text -> Text -> V1RoleRef
mkV1RoleRef Text
v1RoleRefApiGroup Text
v1RoleRefKind Text
v1RoleRefName =
  V1RoleRef
  { Text
$sel:v1RoleRefApiGroup:V1RoleRef :: Text
v1RoleRefApiGroup :: Text
v1RoleRefApiGroup
  , Text
$sel:v1RoleRefKind:V1RoleRef :: Text
v1RoleRefKind :: Text
v1RoleRefKind
  , Text
$sel:v1RoleRefName:V1RoleRef :: Text
v1RoleRefName :: Text
v1RoleRefName
  }

-- ** V1RollingUpdateDaemonSet
-- | V1RollingUpdateDaemonSet
-- Spec to control the desired behavior of daemon set rolling update.
data V1RollingUpdateDaemonSet = V1RollingUpdateDaemonSet
  { V1RollingUpdateDaemonSet -> Maybe IntOrString
v1RollingUpdateDaemonSetMaxSurge :: !(Maybe IntOrString) -- ^ "maxSurge"
  , V1RollingUpdateDaemonSet -> Maybe IntOrString
v1RollingUpdateDaemonSetMaxUnavailable :: !(Maybe IntOrString) -- ^ "maxUnavailable"
  } deriving (Int -> V1RollingUpdateDaemonSet -> ShowS
[V1RollingUpdateDaemonSet] -> ShowS
V1RollingUpdateDaemonSet -> String
(Int -> V1RollingUpdateDaemonSet -> ShowS)
-> (V1RollingUpdateDaemonSet -> String)
-> ([V1RollingUpdateDaemonSet] -> ShowS)
-> Show V1RollingUpdateDaemonSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1RollingUpdateDaemonSet -> ShowS
showsPrec :: Int -> V1RollingUpdateDaemonSet -> ShowS
$cshow :: V1RollingUpdateDaemonSet -> String
show :: V1RollingUpdateDaemonSet -> String
$cshowList :: [V1RollingUpdateDaemonSet] -> ShowS
showList :: [V1RollingUpdateDaemonSet] -> ShowS
P.Show, V1RollingUpdateDaemonSet -> V1RollingUpdateDaemonSet -> Bool
(V1RollingUpdateDaemonSet -> V1RollingUpdateDaemonSet -> Bool)
-> (V1RollingUpdateDaemonSet -> V1RollingUpdateDaemonSet -> Bool)
-> Eq V1RollingUpdateDaemonSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1RollingUpdateDaemonSet -> V1RollingUpdateDaemonSet -> Bool
== :: V1RollingUpdateDaemonSet -> V1RollingUpdateDaemonSet -> Bool
$c/= :: V1RollingUpdateDaemonSet -> V1RollingUpdateDaemonSet -> Bool
/= :: V1RollingUpdateDaemonSet -> V1RollingUpdateDaemonSet -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1RollingUpdateDaemonSet
instance A.FromJSON V1RollingUpdateDaemonSet where
  parseJSON :: Value -> Parser V1RollingUpdateDaemonSet
parseJSON = String
-> (Object -> Parser V1RollingUpdateDaemonSet)
-> Value
-> Parser V1RollingUpdateDaemonSet
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1RollingUpdateDaemonSet" ((Object -> Parser V1RollingUpdateDaemonSet)
 -> Value -> Parser V1RollingUpdateDaemonSet)
-> (Object -> Parser V1RollingUpdateDaemonSet)
-> Value
-> Parser V1RollingUpdateDaemonSet
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe IntOrString -> Maybe IntOrString -> V1RollingUpdateDaemonSet
V1RollingUpdateDaemonSet
      (Maybe IntOrString
 -> Maybe IntOrString -> V1RollingUpdateDaemonSet)
-> Parser (Maybe IntOrString)
-> Parser (Maybe IntOrString -> V1RollingUpdateDaemonSet)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe IntOrString)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"maxSurge")
      Parser (Maybe IntOrString -> V1RollingUpdateDaemonSet)
-> Parser (Maybe IntOrString) -> Parser V1RollingUpdateDaemonSet
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe IntOrString)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"maxUnavailable")

-- | ToJSON V1RollingUpdateDaemonSet
instance A.ToJSON V1RollingUpdateDaemonSet where
  toJSON :: V1RollingUpdateDaemonSet -> Value
toJSON V1RollingUpdateDaemonSet {Maybe IntOrString
$sel:v1RollingUpdateDaemonSetMaxSurge:V1RollingUpdateDaemonSet :: V1RollingUpdateDaemonSet -> Maybe IntOrString
$sel:v1RollingUpdateDaemonSetMaxUnavailable:V1RollingUpdateDaemonSet :: V1RollingUpdateDaemonSet -> Maybe IntOrString
v1RollingUpdateDaemonSetMaxSurge :: Maybe IntOrString
v1RollingUpdateDaemonSetMaxUnavailable :: Maybe IntOrString
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"maxSurge" Key -> Maybe IntOrString -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe IntOrString
v1RollingUpdateDaemonSetMaxSurge
      , Key
"maxUnavailable" Key -> Maybe IntOrString -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe IntOrString
v1RollingUpdateDaemonSetMaxUnavailable
      ]


-- | Construct a value of type 'V1RollingUpdateDaemonSet' (by applying it's required fields, if any)
mkV1RollingUpdateDaemonSet
  :: V1RollingUpdateDaemonSet
mkV1RollingUpdateDaemonSet :: V1RollingUpdateDaemonSet
mkV1RollingUpdateDaemonSet =
  V1RollingUpdateDaemonSet
  { $sel:v1RollingUpdateDaemonSetMaxSurge:V1RollingUpdateDaemonSet :: Maybe IntOrString
v1RollingUpdateDaemonSetMaxSurge = Maybe IntOrString
forall a. Maybe a
Nothing
  , $sel:v1RollingUpdateDaemonSetMaxUnavailable:V1RollingUpdateDaemonSet :: Maybe IntOrString
v1RollingUpdateDaemonSetMaxUnavailable = Maybe IntOrString
forall a. Maybe a
Nothing
  }

-- ** V1RollingUpdateDeployment
-- | V1RollingUpdateDeployment
-- Spec to control the desired behavior of rolling update.
data V1RollingUpdateDeployment = V1RollingUpdateDeployment
  { V1RollingUpdateDeployment -> Maybe IntOrString
v1RollingUpdateDeploymentMaxSurge :: !(Maybe IntOrString) -- ^ "maxSurge"
  , V1RollingUpdateDeployment -> Maybe IntOrString
v1RollingUpdateDeploymentMaxUnavailable :: !(Maybe IntOrString) -- ^ "maxUnavailable"
  } deriving (Int -> V1RollingUpdateDeployment -> ShowS
[V1RollingUpdateDeployment] -> ShowS
V1RollingUpdateDeployment -> String
(Int -> V1RollingUpdateDeployment -> ShowS)
-> (V1RollingUpdateDeployment -> String)
-> ([V1RollingUpdateDeployment] -> ShowS)
-> Show V1RollingUpdateDeployment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1RollingUpdateDeployment -> ShowS
showsPrec :: Int -> V1RollingUpdateDeployment -> ShowS
$cshow :: V1RollingUpdateDeployment -> String
show :: V1RollingUpdateDeployment -> String
$cshowList :: [V1RollingUpdateDeployment] -> ShowS
showList :: [V1RollingUpdateDeployment] -> ShowS
P.Show, V1RollingUpdateDeployment -> V1RollingUpdateDeployment -> Bool
(V1RollingUpdateDeployment -> V1RollingUpdateDeployment -> Bool)
-> (V1RollingUpdateDeployment -> V1RollingUpdateDeployment -> Bool)
-> Eq V1RollingUpdateDeployment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1RollingUpdateDeployment -> V1RollingUpdateDeployment -> Bool
== :: V1RollingUpdateDeployment -> V1RollingUpdateDeployment -> Bool
$c/= :: V1RollingUpdateDeployment -> V1RollingUpdateDeployment -> Bool
/= :: V1RollingUpdateDeployment -> V1RollingUpdateDeployment -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1RollingUpdateDeployment
instance A.FromJSON V1RollingUpdateDeployment where
  parseJSON :: Value -> Parser V1RollingUpdateDeployment
parseJSON = String
-> (Object -> Parser V1RollingUpdateDeployment)
-> Value
-> Parser V1RollingUpdateDeployment
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1RollingUpdateDeployment" ((Object -> Parser V1RollingUpdateDeployment)
 -> Value -> Parser V1RollingUpdateDeployment)
-> (Object -> Parser V1RollingUpdateDeployment)
-> Value
-> Parser V1RollingUpdateDeployment
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe IntOrString -> Maybe IntOrString -> V1RollingUpdateDeployment
V1RollingUpdateDeployment
      (Maybe IntOrString
 -> Maybe IntOrString -> V1RollingUpdateDeployment)
-> Parser (Maybe IntOrString)
-> Parser (Maybe IntOrString -> V1RollingUpdateDeployment)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe IntOrString)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"maxSurge")
      Parser (Maybe IntOrString -> V1RollingUpdateDeployment)
-> Parser (Maybe IntOrString) -> Parser V1RollingUpdateDeployment
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe IntOrString)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"maxUnavailable")

-- | ToJSON V1RollingUpdateDeployment
instance A.ToJSON V1RollingUpdateDeployment where
  toJSON :: V1RollingUpdateDeployment -> Value
toJSON V1RollingUpdateDeployment {Maybe IntOrString
$sel:v1RollingUpdateDeploymentMaxSurge:V1RollingUpdateDeployment :: V1RollingUpdateDeployment -> Maybe IntOrString
$sel:v1RollingUpdateDeploymentMaxUnavailable:V1RollingUpdateDeployment :: V1RollingUpdateDeployment -> Maybe IntOrString
v1RollingUpdateDeploymentMaxSurge :: Maybe IntOrString
v1RollingUpdateDeploymentMaxUnavailable :: Maybe IntOrString
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"maxSurge" Key -> Maybe IntOrString -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe IntOrString
v1RollingUpdateDeploymentMaxSurge
      , Key
"maxUnavailable" Key -> Maybe IntOrString -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe IntOrString
v1RollingUpdateDeploymentMaxUnavailable
      ]


-- | Construct a value of type 'V1RollingUpdateDeployment' (by applying it's required fields, if any)
mkV1RollingUpdateDeployment
  :: V1RollingUpdateDeployment
mkV1RollingUpdateDeployment :: V1RollingUpdateDeployment
mkV1RollingUpdateDeployment =
  V1RollingUpdateDeployment
  { $sel:v1RollingUpdateDeploymentMaxSurge:V1RollingUpdateDeployment :: Maybe IntOrString
v1RollingUpdateDeploymentMaxSurge = Maybe IntOrString
forall a. Maybe a
Nothing
  , $sel:v1RollingUpdateDeploymentMaxUnavailable:V1RollingUpdateDeployment :: Maybe IntOrString
v1RollingUpdateDeploymentMaxUnavailable = Maybe IntOrString
forall a. Maybe a
Nothing
  }

-- ** V1RollingUpdateStatefulSetStrategy
-- | V1RollingUpdateStatefulSetStrategy
-- RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.
data V1RollingUpdateStatefulSetStrategy = V1RollingUpdateStatefulSetStrategy
  { V1RollingUpdateStatefulSetStrategy -> Maybe IntOrString
v1RollingUpdateStatefulSetStrategyMaxUnavailable :: !(Maybe IntOrString) -- ^ "maxUnavailable"
  , V1RollingUpdateStatefulSetStrategy -> Maybe Int
v1RollingUpdateStatefulSetStrategyPartition :: !(Maybe Int) -- ^ "partition" - Partition indicates the ordinal at which the StatefulSet should be partitioned for updates. During a rolling update, all pods from ordinal Replicas-1 to Partition are updated. All pods from ordinal Partition-1 to 0 remain untouched. This is helpful in being able to do a canary based deployment. The default value is 0.
  } deriving (Int -> V1RollingUpdateStatefulSetStrategy -> ShowS
[V1RollingUpdateStatefulSetStrategy] -> ShowS
V1RollingUpdateStatefulSetStrategy -> String
(Int -> V1RollingUpdateStatefulSetStrategy -> ShowS)
-> (V1RollingUpdateStatefulSetStrategy -> String)
-> ([V1RollingUpdateStatefulSetStrategy] -> ShowS)
-> Show V1RollingUpdateStatefulSetStrategy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1RollingUpdateStatefulSetStrategy -> ShowS
showsPrec :: Int -> V1RollingUpdateStatefulSetStrategy -> ShowS
$cshow :: V1RollingUpdateStatefulSetStrategy -> String
show :: V1RollingUpdateStatefulSetStrategy -> String
$cshowList :: [V1RollingUpdateStatefulSetStrategy] -> ShowS
showList :: [V1RollingUpdateStatefulSetStrategy] -> ShowS
P.Show, V1RollingUpdateStatefulSetStrategy
-> V1RollingUpdateStatefulSetStrategy -> Bool
(V1RollingUpdateStatefulSetStrategy
 -> V1RollingUpdateStatefulSetStrategy -> Bool)
-> (V1RollingUpdateStatefulSetStrategy
    -> V1RollingUpdateStatefulSetStrategy -> Bool)
-> Eq V1RollingUpdateStatefulSetStrategy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1RollingUpdateStatefulSetStrategy
-> V1RollingUpdateStatefulSetStrategy -> Bool
== :: V1RollingUpdateStatefulSetStrategy
-> V1RollingUpdateStatefulSetStrategy -> Bool
$c/= :: V1RollingUpdateStatefulSetStrategy
-> V1RollingUpdateStatefulSetStrategy -> Bool
/= :: V1RollingUpdateStatefulSetStrategy
-> V1RollingUpdateStatefulSetStrategy -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1RollingUpdateStatefulSetStrategy
instance A.FromJSON V1RollingUpdateStatefulSetStrategy where
  parseJSON :: Value -> Parser V1RollingUpdateStatefulSetStrategy
parseJSON = String
-> (Object -> Parser V1RollingUpdateStatefulSetStrategy)
-> Value
-> Parser V1RollingUpdateStatefulSetStrategy
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1RollingUpdateStatefulSetStrategy" ((Object -> Parser V1RollingUpdateStatefulSetStrategy)
 -> Value -> Parser V1RollingUpdateStatefulSetStrategy)
-> (Object -> Parser V1RollingUpdateStatefulSetStrategy)
-> Value
-> Parser V1RollingUpdateStatefulSetStrategy
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe IntOrString
-> Maybe Int -> V1RollingUpdateStatefulSetStrategy
V1RollingUpdateStatefulSetStrategy
      (Maybe IntOrString
 -> Maybe Int -> V1RollingUpdateStatefulSetStrategy)
-> Parser (Maybe IntOrString)
-> Parser (Maybe Int -> V1RollingUpdateStatefulSetStrategy)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe IntOrString)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"maxUnavailable")
      Parser (Maybe Int -> V1RollingUpdateStatefulSetStrategy)
-> Parser (Maybe Int) -> Parser V1RollingUpdateStatefulSetStrategy
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"partition")

-- | ToJSON V1RollingUpdateStatefulSetStrategy
instance A.ToJSON V1RollingUpdateStatefulSetStrategy where
  toJSON :: V1RollingUpdateStatefulSetStrategy -> Value
toJSON V1RollingUpdateStatefulSetStrategy {Maybe Int
Maybe IntOrString
$sel:v1RollingUpdateStatefulSetStrategyMaxUnavailable:V1RollingUpdateStatefulSetStrategy :: V1RollingUpdateStatefulSetStrategy -> Maybe IntOrString
$sel:v1RollingUpdateStatefulSetStrategyPartition:V1RollingUpdateStatefulSetStrategy :: V1RollingUpdateStatefulSetStrategy -> Maybe Int
v1RollingUpdateStatefulSetStrategyMaxUnavailable :: Maybe IntOrString
v1RollingUpdateStatefulSetStrategyPartition :: Maybe Int
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"maxUnavailable" Key -> Maybe IntOrString -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe IntOrString
v1RollingUpdateStatefulSetStrategyMaxUnavailable
      , Key
"partition" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1RollingUpdateStatefulSetStrategyPartition
      ]


-- | Construct a value of type 'V1RollingUpdateStatefulSetStrategy' (by applying it's required fields, if any)
mkV1RollingUpdateStatefulSetStrategy
  :: V1RollingUpdateStatefulSetStrategy
mkV1RollingUpdateStatefulSetStrategy :: V1RollingUpdateStatefulSetStrategy
mkV1RollingUpdateStatefulSetStrategy =
  V1RollingUpdateStatefulSetStrategy
  { $sel:v1RollingUpdateStatefulSetStrategyMaxUnavailable:V1RollingUpdateStatefulSetStrategy :: Maybe IntOrString
v1RollingUpdateStatefulSetStrategyMaxUnavailable = Maybe IntOrString
forall a. Maybe a
Nothing
  , $sel:v1RollingUpdateStatefulSetStrategyPartition:V1RollingUpdateStatefulSetStrategy :: Maybe Int
v1RollingUpdateStatefulSetStrategyPartition = Maybe Int
forall a. Maybe a
Nothing
  }

-- ** V1RuleWithOperations
-- | V1RuleWithOperations
-- RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.
data V1RuleWithOperations = V1RuleWithOperations
  { V1RuleWithOperations -> Maybe [Text]
v1RuleWithOperationsApiGroups :: !(Maybe [Text]) -- ^ "apiGroups" - APIGroups is the API groups the resources belong to. &#39;*&#39; is all groups. If &#39;*&#39; is present, the length of the slice must be one. Required.
  , V1RuleWithOperations -> Maybe [Text]
v1RuleWithOperationsApiVersions :: !(Maybe [Text]) -- ^ "apiVersions" - APIVersions is the API versions the resources belong to. &#39;*&#39; is all versions. If &#39;*&#39; is present, the length of the slice must be one. Required.
  , V1RuleWithOperations -> Maybe [Text]
v1RuleWithOperationsOperations :: !(Maybe [Text]) -- ^ "operations" - Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If &#39;*&#39; is present, the length of the slice must be one. Required.
  , V1RuleWithOperations -> Maybe [Text]
v1RuleWithOperationsResources :: !(Maybe [Text]) -- ^ "resources" - Resources is a list of resources this rule applies to.  For example: &#39;pods&#39; means pods. &#39;pods/log&#39; means the log subresource of pods. &#39;*&#39; means all resources, but not subresources. &#39;pods/*&#39; means all subresources of pods. &#39;*/scale&#39; means all scale subresources. &#39;*/*&#39; means all resources and their subresources.  If wildcard is present, the validation rule will ensure resources do not overlap with each other.  Depending on the enclosing object, subresources might not be allowed. Required.
  , V1RuleWithOperations -> Maybe Text
v1RuleWithOperationsScope :: !(Maybe Text) -- ^ "scope" - scope specifies the scope of this rule. Valid values are \&quot;Cluster\&quot;, \&quot;Namespaced\&quot;, and \&quot;*\&quot; \&quot;Cluster\&quot; means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \&quot;Namespaced\&quot; means that only namespaced resources will match this rule. \&quot;*\&quot; means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \&quot;*\&quot;.
  } deriving (Int -> V1RuleWithOperations -> ShowS
[V1RuleWithOperations] -> ShowS
V1RuleWithOperations -> String
(Int -> V1RuleWithOperations -> ShowS)
-> (V1RuleWithOperations -> String)
-> ([V1RuleWithOperations] -> ShowS)
-> Show V1RuleWithOperations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1RuleWithOperations -> ShowS
showsPrec :: Int -> V1RuleWithOperations -> ShowS
$cshow :: V1RuleWithOperations -> String
show :: V1RuleWithOperations -> String
$cshowList :: [V1RuleWithOperations] -> ShowS
showList :: [V1RuleWithOperations] -> ShowS
P.Show, V1RuleWithOperations -> V1RuleWithOperations -> Bool
(V1RuleWithOperations -> V1RuleWithOperations -> Bool)
-> (V1RuleWithOperations -> V1RuleWithOperations -> Bool)
-> Eq V1RuleWithOperations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1RuleWithOperations -> V1RuleWithOperations -> Bool
== :: V1RuleWithOperations -> V1RuleWithOperations -> Bool
$c/= :: V1RuleWithOperations -> V1RuleWithOperations -> Bool
/= :: V1RuleWithOperations -> V1RuleWithOperations -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1RuleWithOperations
instance A.FromJSON V1RuleWithOperations where
  parseJSON :: Value -> Parser V1RuleWithOperations
parseJSON = String
-> (Object -> Parser V1RuleWithOperations)
-> Value
-> Parser V1RuleWithOperations
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1RuleWithOperations" ((Object -> Parser V1RuleWithOperations)
 -> Value -> Parser V1RuleWithOperations)
-> (Object -> Parser V1RuleWithOperations)
-> Value
-> Parser V1RuleWithOperations
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> V1RuleWithOperations
V1RuleWithOperations
      (Maybe [Text]
 -> Maybe [Text]
 -> Maybe [Text]
 -> Maybe [Text]
 -> Maybe Text
 -> V1RuleWithOperations)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [Text]
      -> Maybe [Text]
      -> Maybe [Text]
      -> Maybe Text
      -> V1RuleWithOperations)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiGroups")
      Parser
  (Maybe [Text]
   -> Maybe [Text]
   -> Maybe [Text]
   -> Maybe Text
   -> V1RuleWithOperations)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [Text]
      -> Maybe [Text] -> Maybe Text -> V1RuleWithOperations)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersions")
      Parser
  (Maybe [Text]
   -> Maybe [Text] -> Maybe Text -> V1RuleWithOperations)
-> Parser (Maybe [Text])
-> Parser (Maybe [Text] -> Maybe Text -> V1RuleWithOperations)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"operations")
      Parser (Maybe [Text] -> Maybe Text -> V1RuleWithOperations)
-> Parser (Maybe [Text])
-> Parser (Maybe Text -> V1RuleWithOperations)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resources")
      Parser (Maybe Text -> V1RuleWithOperations)
-> Parser (Maybe Text) -> Parser V1RuleWithOperations
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"scope")

-- | ToJSON V1RuleWithOperations
instance A.ToJSON V1RuleWithOperations where
  toJSON :: V1RuleWithOperations -> Value
toJSON V1RuleWithOperations {Maybe [Text]
Maybe Text
$sel:v1RuleWithOperationsApiGroups:V1RuleWithOperations :: V1RuleWithOperations -> Maybe [Text]
$sel:v1RuleWithOperationsApiVersions:V1RuleWithOperations :: V1RuleWithOperations -> Maybe [Text]
$sel:v1RuleWithOperationsOperations:V1RuleWithOperations :: V1RuleWithOperations -> Maybe [Text]
$sel:v1RuleWithOperationsResources:V1RuleWithOperations :: V1RuleWithOperations -> Maybe [Text]
$sel:v1RuleWithOperationsScope:V1RuleWithOperations :: V1RuleWithOperations -> Maybe Text
v1RuleWithOperationsApiGroups :: Maybe [Text]
v1RuleWithOperationsApiVersions :: Maybe [Text]
v1RuleWithOperationsOperations :: Maybe [Text]
v1RuleWithOperationsResources :: Maybe [Text]
v1RuleWithOperationsScope :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiGroups" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1RuleWithOperationsApiGroups
      , Key
"apiVersions" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1RuleWithOperationsApiVersions
      , Key
"operations" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1RuleWithOperationsOperations
      , Key
"resources" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1RuleWithOperationsResources
      , Key
"scope" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1RuleWithOperationsScope
      ]


-- | Construct a value of type 'V1RuleWithOperations' (by applying it's required fields, if any)
mkV1RuleWithOperations
  :: V1RuleWithOperations
mkV1RuleWithOperations :: V1RuleWithOperations
mkV1RuleWithOperations =
  V1RuleWithOperations
  { $sel:v1RuleWithOperationsApiGroups:V1RuleWithOperations :: Maybe [Text]
v1RuleWithOperationsApiGroups = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1RuleWithOperationsApiVersions:V1RuleWithOperations :: Maybe [Text]
v1RuleWithOperationsApiVersions = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1RuleWithOperationsOperations:V1RuleWithOperations :: Maybe [Text]
v1RuleWithOperationsOperations = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1RuleWithOperationsResources:V1RuleWithOperations :: Maybe [Text]
v1RuleWithOperationsResources = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1RuleWithOperationsScope:V1RuleWithOperations :: Maybe Text
v1RuleWithOperationsScope = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1RuntimeClass
-- | V1RuntimeClass
-- RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod.  For more details, see https://kubernetes.io/docs/concepts/containers/runtime-class/
data V1RuntimeClass = V1RuntimeClass
  { V1RuntimeClass -> Maybe Text
v1RuntimeClassApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1RuntimeClass -> Text
v1RuntimeClassHandler :: !(Text) -- ^ /Required/ "handler" - handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node &amp; CRI configuration.  It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \&quot;runc\&quot; might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable.
  , V1RuntimeClass -> Maybe Text
v1RuntimeClassKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1RuntimeClass -> Maybe V1ObjectMeta
v1RuntimeClassMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1RuntimeClass -> Maybe V1Overhead
v1RuntimeClassOverhead :: !(Maybe V1Overhead) -- ^ "overhead"
  , V1RuntimeClass -> Maybe V1Scheduling
v1RuntimeClassScheduling :: !(Maybe V1Scheduling) -- ^ "scheduling"
  } deriving (Int -> V1RuntimeClass -> ShowS
[V1RuntimeClass] -> ShowS
V1RuntimeClass -> String
(Int -> V1RuntimeClass -> ShowS)
-> (V1RuntimeClass -> String)
-> ([V1RuntimeClass] -> ShowS)
-> Show V1RuntimeClass
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1RuntimeClass -> ShowS
showsPrec :: Int -> V1RuntimeClass -> ShowS
$cshow :: V1RuntimeClass -> String
show :: V1RuntimeClass -> String
$cshowList :: [V1RuntimeClass] -> ShowS
showList :: [V1RuntimeClass] -> ShowS
P.Show, V1RuntimeClass -> V1RuntimeClass -> Bool
(V1RuntimeClass -> V1RuntimeClass -> Bool)
-> (V1RuntimeClass -> V1RuntimeClass -> Bool) -> Eq V1RuntimeClass
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1RuntimeClass -> V1RuntimeClass -> Bool
== :: V1RuntimeClass -> V1RuntimeClass -> Bool
$c/= :: V1RuntimeClass -> V1RuntimeClass -> Bool
/= :: V1RuntimeClass -> V1RuntimeClass -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1RuntimeClass
instance A.FromJSON V1RuntimeClass where
  parseJSON :: Value -> Parser V1RuntimeClass
parseJSON = String
-> (Object -> Parser V1RuntimeClass)
-> Value
-> Parser V1RuntimeClass
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1RuntimeClass" ((Object -> Parser V1RuntimeClass)
 -> Value -> Parser V1RuntimeClass)
-> (Object -> Parser V1RuntimeClass)
-> Value
-> Parser V1RuntimeClass
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1Overhead
-> Maybe V1Scheduling
-> V1RuntimeClass
V1RuntimeClass
      (Maybe Text
 -> Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1Overhead
 -> Maybe V1Scheduling
 -> V1RuntimeClass)
-> Parser (Maybe Text)
-> Parser
     (Text
      -> Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1Overhead
      -> Maybe V1Scheduling
      -> V1RuntimeClass)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Text
   -> Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1Overhead
   -> Maybe V1Scheduling
   -> V1RuntimeClass)
-> Parser Text
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1Overhead
      -> Maybe V1Scheduling
      -> V1RuntimeClass)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"handler")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1Overhead
   -> Maybe V1Scheduling
   -> V1RuntimeClass)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1Overhead -> Maybe V1Scheduling -> V1RuntimeClass)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1Overhead -> Maybe V1Scheduling -> V1RuntimeClass)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe V1Overhead -> Maybe V1Scheduling -> V1RuntimeClass)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (Maybe V1Overhead -> Maybe V1Scheduling -> V1RuntimeClass)
-> Parser (Maybe V1Overhead)
-> Parser (Maybe V1Scheduling -> V1RuntimeClass)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1Overhead)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"overhead")
      Parser (Maybe V1Scheduling -> V1RuntimeClass)
-> Parser (Maybe V1Scheduling) -> Parser V1RuntimeClass
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1Scheduling)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"scheduling")

-- | ToJSON V1RuntimeClass
instance A.ToJSON V1RuntimeClass where
  toJSON :: V1RuntimeClass -> Value
toJSON V1RuntimeClass {Maybe Text
Maybe V1Scheduling
Maybe V1Overhead
Maybe V1ObjectMeta
Text
$sel:v1RuntimeClassApiVersion:V1RuntimeClass :: V1RuntimeClass -> Maybe Text
$sel:v1RuntimeClassHandler:V1RuntimeClass :: V1RuntimeClass -> Text
$sel:v1RuntimeClassKind:V1RuntimeClass :: V1RuntimeClass -> Maybe Text
$sel:v1RuntimeClassMetadata:V1RuntimeClass :: V1RuntimeClass -> Maybe V1ObjectMeta
$sel:v1RuntimeClassOverhead:V1RuntimeClass :: V1RuntimeClass -> Maybe V1Overhead
$sel:v1RuntimeClassScheduling:V1RuntimeClass :: V1RuntimeClass -> Maybe V1Scheduling
v1RuntimeClassApiVersion :: Maybe Text
v1RuntimeClassHandler :: Text
v1RuntimeClassKind :: Maybe Text
v1RuntimeClassMetadata :: Maybe V1ObjectMeta
v1RuntimeClassOverhead :: Maybe V1Overhead
v1RuntimeClassScheduling :: Maybe V1Scheduling
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1RuntimeClassApiVersion
      , Key
"handler" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1RuntimeClassHandler
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1RuntimeClassKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1RuntimeClassMetadata
      , Key
"overhead" Key -> Maybe V1Overhead -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1Overhead
v1RuntimeClassOverhead
      , Key
"scheduling" Key -> Maybe V1Scheduling -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1Scheduling
v1RuntimeClassScheduling
      ]


-- | Construct a value of type 'V1RuntimeClass' (by applying it's required fields, if any)
mkV1RuntimeClass
  :: Text -- ^ 'v1RuntimeClassHandler': handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration.  It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable.
  -> V1RuntimeClass
mkV1RuntimeClass :: Text -> V1RuntimeClass
mkV1RuntimeClass Text
v1RuntimeClassHandler =
  V1RuntimeClass
  { $sel:v1RuntimeClassApiVersion:V1RuntimeClass :: Maybe Text
v1RuntimeClassApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1RuntimeClassHandler:V1RuntimeClass :: Text
v1RuntimeClassHandler :: Text
v1RuntimeClassHandler
  , $sel:v1RuntimeClassKind:V1RuntimeClass :: Maybe Text
v1RuntimeClassKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1RuntimeClassMetadata:V1RuntimeClass :: Maybe V1ObjectMeta
v1RuntimeClassMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1RuntimeClassOverhead:V1RuntimeClass :: Maybe V1Overhead
v1RuntimeClassOverhead = Maybe V1Overhead
forall a. Maybe a
Nothing
  , $sel:v1RuntimeClassScheduling:V1RuntimeClass :: Maybe V1Scheduling
v1RuntimeClassScheduling = Maybe V1Scheduling
forall a. Maybe a
Nothing
  }

-- ** V1RuntimeClassList
-- | V1RuntimeClassList
-- RuntimeClassList is a list of RuntimeClass objects.
data V1RuntimeClassList = V1RuntimeClassList
  { V1RuntimeClassList -> Maybe Text
v1RuntimeClassListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1RuntimeClassList -> [V1RuntimeClass]
v1RuntimeClassListItems :: !([V1RuntimeClass]) -- ^ /Required/ "items" - items is a list of schema objects.
  , V1RuntimeClassList -> Maybe Text
v1RuntimeClassListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1RuntimeClassList -> Maybe V1ListMeta
v1RuntimeClassListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1RuntimeClassList -> ShowS
[V1RuntimeClassList] -> ShowS
V1RuntimeClassList -> String
(Int -> V1RuntimeClassList -> ShowS)
-> (V1RuntimeClassList -> String)
-> ([V1RuntimeClassList] -> ShowS)
-> Show V1RuntimeClassList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1RuntimeClassList -> ShowS
showsPrec :: Int -> V1RuntimeClassList -> ShowS
$cshow :: V1RuntimeClassList -> String
show :: V1RuntimeClassList -> String
$cshowList :: [V1RuntimeClassList] -> ShowS
showList :: [V1RuntimeClassList] -> ShowS
P.Show, V1RuntimeClassList -> V1RuntimeClassList -> Bool
(V1RuntimeClassList -> V1RuntimeClassList -> Bool)
-> (V1RuntimeClassList -> V1RuntimeClassList -> Bool)
-> Eq V1RuntimeClassList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1RuntimeClassList -> V1RuntimeClassList -> Bool
== :: V1RuntimeClassList -> V1RuntimeClassList -> Bool
$c/= :: V1RuntimeClassList -> V1RuntimeClassList -> Bool
/= :: V1RuntimeClassList -> V1RuntimeClassList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1RuntimeClassList
instance A.FromJSON V1RuntimeClassList where
  parseJSON :: Value -> Parser V1RuntimeClassList
parseJSON = String
-> (Object -> Parser V1RuntimeClassList)
-> Value
-> Parser V1RuntimeClassList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1RuntimeClassList" ((Object -> Parser V1RuntimeClassList)
 -> Value -> Parser V1RuntimeClassList)
-> (Object -> Parser V1RuntimeClassList)
-> Value
-> Parser V1RuntimeClassList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1RuntimeClass]
-> Maybe Text
-> Maybe V1ListMeta
-> V1RuntimeClassList
V1RuntimeClassList
      (Maybe Text
 -> [V1RuntimeClass]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1RuntimeClassList)
-> Parser (Maybe Text)
-> Parser
     ([V1RuntimeClass]
      -> Maybe Text -> Maybe V1ListMeta -> V1RuntimeClassList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1RuntimeClass]
   -> Maybe Text -> Maybe V1ListMeta -> V1RuntimeClassList)
-> Parser [V1RuntimeClass]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1RuntimeClassList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1RuntimeClass]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1RuntimeClassList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1RuntimeClassList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1RuntimeClassList)
-> Parser (Maybe V1ListMeta) -> Parser V1RuntimeClassList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1RuntimeClassList
instance A.ToJSON V1RuntimeClassList where
  toJSON :: V1RuntimeClassList -> Value
toJSON V1RuntimeClassList {[V1RuntimeClass]
Maybe Text
Maybe V1ListMeta
$sel:v1RuntimeClassListApiVersion:V1RuntimeClassList :: V1RuntimeClassList -> Maybe Text
$sel:v1RuntimeClassListItems:V1RuntimeClassList :: V1RuntimeClassList -> [V1RuntimeClass]
$sel:v1RuntimeClassListKind:V1RuntimeClassList :: V1RuntimeClassList -> Maybe Text
$sel:v1RuntimeClassListMetadata:V1RuntimeClassList :: V1RuntimeClassList -> Maybe V1ListMeta
v1RuntimeClassListApiVersion :: Maybe Text
v1RuntimeClassListItems :: [V1RuntimeClass]
v1RuntimeClassListKind :: Maybe Text
v1RuntimeClassListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1RuntimeClassListApiVersion
      , Key
"items" Key -> [V1RuntimeClass] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1RuntimeClass]
v1RuntimeClassListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1RuntimeClassListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1RuntimeClassListMetadata
      ]


-- | Construct a value of type 'V1RuntimeClassList' (by applying it's required fields, if any)
mkV1RuntimeClassList
  :: [V1RuntimeClass] -- ^ 'v1RuntimeClassListItems': items is a list of schema objects.
  -> V1RuntimeClassList
mkV1RuntimeClassList :: [V1RuntimeClass] -> V1RuntimeClassList
mkV1RuntimeClassList [V1RuntimeClass]
v1RuntimeClassListItems =
  V1RuntimeClassList
  { $sel:v1RuntimeClassListApiVersion:V1RuntimeClassList :: Maybe Text
v1RuntimeClassListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1RuntimeClass]
$sel:v1RuntimeClassListItems:V1RuntimeClassList :: [V1RuntimeClass]
v1RuntimeClassListItems :: [V1RuntimeClass]
v1RuntimeClassListItems
  , $sel:v1RuntimeClassListKind:V1RuntimeClassList :: Maybe Text
v1RuntimeClassListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1RuntimeClassListMetadata:V1RuntimeClassList :: Maybe V1ListMeta
v1RuntimeClassListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1SELinuxOptions
-- | V1SELinuxOptions
-- SELinuxOptions are the labels to be applied to the container
data V1SELinuxOptions = V1SELinuxOptions
  { V1SELinuxOptions -> Maybe Text
v1SELinuxOptionsLevel :: !(Maybe Text) -- ^ "level" - Level is SELinux level label that applies to the container.
  , V1SELinuxOptions -> Maybe Text
v1SELinuxOptionsRole :: !(Maybe Text) -- ^ "role" - Role is a SELinux role label that applies to the container.
  , V1SELinuxOptions -> Maybe Text
v1SELinuxOptionsType :: !(Maybe Text) -- ^ "type" - Type is a SELinux type label that applies to the container.
  , V1SELinuxOptions -> Maybe Text
v1SELinuxOptionsUser :: !(Maybe Text) -- ^ "user" - User is a SELinux user label that applies to the container.
  } deriving (Int -> V1SELinuxOptions -> ShowS
[V1SELinuxOptions] -> ShowS
V1SELinuxOptions -> String
(Int -> V1SELinuxOptions -> ShowS)
-> (V1SELinuxOptions -> String)
-> ([V1SELinuxOptions] -> ShowS)
-> Show V1SELinuxOptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1SELinuxOptions -> ShowS
showsPrec :: Int -> V1SELinuxOptions -> ShowS
$cshow :: V1SELinuxOptions -> String
show :: V1SELinuxOptions -> String
$cshowList :: [V1SELinuxOptions] -> ShowS
showList :: [V1SELinuxOptions] -> ShowS
P.Show, V1SELinuxOptions -> V1SELinuxOptions -> Bool
(V1SELinuxOptions -> V1SELinuxOptions -> Bool)
-> (V1SELinuxOptions -> V1SELinuxOptions -> Bool)
-> Eq V1SELinuxOptions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1SELinuxOptions -> V1SELinuxOptions -> Bool
== :: V1SELinuxOptions -> V1SELinuxOptions -> Bool
$c/= :: V1SELinuxOptions -> V1SELinuxOptions -> Bool
/= :: V1SELinuxOptions -> V1SELinuxOptions -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1SELinuxOptions
instance A.FromJSON V1SELinuxOptions where
  parseJSON :: Value -> Parser V1SELinuxOptions
parseJSON = String
-> (Object -> Parser V1SELinuxOptions)
-> Value
-> Parser V1SELinuxOptions
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1SELinuxOptions" ((Object -> Parser V1SELinuxOptions)
 -> Value -> Parser V1SELinuxOptions)
-> (Object -> Parser V1SELinuxOptions)
-> Value
-> Parser V1SELinuxOptions
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> V1SELinuxOptions
V1SELinuxOptions
      (Maybe Text
 -> Maybe Text -> Maybe Text -> Maybe Text -> V1SELinuxOptions)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> Maybe Text -> V1SELinuxOptions)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"level")
      Parser (Maybe Text -> Maybe Text -> Maybe Text -> V1SELinuxOptions)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> V1SELinuxOptions)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"role")
      Parser (Maybe Text -> Maybe Text -> V1SELinuxOptions)
-> Parser (Maybe Text) -> Parser (Maybe Text -> V1SELinuxOptions)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"type")
      Parser (Maybe Text -> V1SELinuxOptions)
-> Parser (Maybe Text) -> Parser V1SELinuxOptions
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"user")

-- | ToJSON V1SELinuxOptions
instance A.ToJSON V1SELinuxOptions where
  toJSON :: V1SELinuxOptions -> Value
toJSON V1SELinuxOptions {Maybe Text
$sel:v1SELinuxOptionsLevel:V1SELinuxOptions :: V1SELinuxOptions -> Maybe Text
$sel:v1SELinuxOptionsRole:V1SELinuxOptions :: V1SELinuxOptions -> Maybe Text
$sel:v1SELinuxOptionsType:V1SELinuxOptions :: V1SELinuxOptions -> Maybe Text
$sel:v1SELinuxOptionsUser:V1SELinuxOptions :: V1SELinuxOptions -> Maybe Text
v1SELinuxOptionsLevel :: Maybe Text
v1SELinuxOptionsRole :: Maybe Text
v1SELinuxOptionsType :: Maybe Text
v1SELinuxOptionsUser :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"level" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1SELinuxOptionsLevel
      , Key
"role" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1SELinuxOptionsRole
      , Key
"type" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1SELinuxOptionsType
      , Key
"user" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1SELinuxOptionsUser
      ]


-- | Construct a value of type 'V1SELinuxOptions' (by applying it's required fields, if any)
mkV1SELinuxOptions
  :: V1SELinuxOptions
mkV1SELinuxOptions :: V1SELinuxOptions
mkV1SELinuxOptions =
  V1SELinuxOptions
  { $sel:v1SELinuxOptionsLevel:V1SELinuxOptions :: Maybe Text
v1SELinuxOptionsLevel = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1SELinuxOptionsRole:V1SELinuxOptions :: Maybe Text
v1SELinuxOptionsRole = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1SELinuxOptionsType:V1SELinuxOptions :: Maybe Text
v1SELinuxOptionsType = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1SELinuxOptionsUser:V1SELinuxOptions :: Maybe Text
v1SELinuxOptionsUser = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1Scale
-- | V1Scale
-- Scale represents a scaling request for a resource.
data V1Scale = V1Scale
  { V1Scale -> Maybe Text
v1ScaleApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1Scale -> Maybe Text
v1ScaleKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1Scale -> Maybe V1ObjectMeta
v1ScaleMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1Scale -> Maybe V1ScaleSpec
v1ScaleSpec :: !(Maybe V1ScaleSpec) -- ^ "spec"
  , V1Scale -> Maybe V1ScaleStatus
v1ScaleStatus :: !(Maybe V1ScaleStatus) -- ^ "status"
  } deriving (Int -> V1Scale -> ShowS
[V1Scale] -> ShowS
V1Scale -> String
(Int -> V1Scale -> ShowS)
-> (V1Scale -> String) -> ([V1Scale] -> ShowS) -> Show V1Scale
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1Scale -> ShowS
showsPrec :: Int -> V1Scale -> ShowS
$cshow :: V1Scale -> String
show :: V1Scale -> String
$cshowList :: [V1Scale] -> ShowS
showList :: [V1Scale] -> ShowS
P.Show, V1Scale -> V1Scale -> Bool
(V1Scale -> V1Scale -> Bool)
-> (V1Scale -> V1Scale -> Bool) -> Eq V1Scale
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1Scale -> V1Scale -> Bool
== :: V1Scale -> V1Scale -> Bool
$c/= :: V1Scale -> V1Scale -> Bool
/= :: V1Scale -> V1Scale -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1Scale
instance A.FromJSON V1Scale where
  parseJSON :: Value -> Parser V1Scale
parseJSON = String -> (Object -> Parser V1Scale) -> Value -> Parser V1Scale
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1Scale" ((Object -> Parser V1Scale) -> Value -> Parser V1Scale)
-> (Object -> Parser V1Scale) -> Value -> Parser V1Scale
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1ScaleSpec
-> Maybe V1ScaleStatus
-> V1Scale
V1Scale
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1ScaleSpec
 -> Maybe V1ScaleStatus
 -> V1Scale)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1ScaleSpec
      -> Maybe V1ScaleStatus
      -> V1Scale)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1ScaleSpec
   -> Maybe V1ScaleStatus
   -> V1Scale)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1ScaleSpec -> Maybe V1ScaleStatus -> V1Scale)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1ScaleSpec -> Maybe V1ScaleStatus -> V1Scale)
-> Parser (Maybe V1ObjectMeta)
-> Parser (Maybe V1ScaleSpec -> Maybe V1ScaleStatus -> V1Scale)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (Maybe V1ScaleSpec -> Maybe V1ScaleStatus -> V1Scale)
-> Parser (Maybe V1ScaleSpec)
-> Parser (Maybe V1ScaleStatus -> V1Scale)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ScaleSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")
      Parser (Maybe V1ScaleStatus -> V1Scale)
-> Parser (Maybe V1ScaleStatus) -> Parser V1Scale
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ScaleStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1Scale
instance A.ToJSON V1Scale where
  toJSON :: V1Scale -> Value
toJSON V1Scale {Maybe Text
Maybe V1ScaleStatus
Maybe V1ScaleSpec
Maybe V1ObjectMeta
$sel:v1ScaleApiVersion:V1Scale :: V1Scale -> Maybe Text
$sel:v1ScaleKind:V1Scale :: V1Scale -> Maybe Text
$sel:v1ScaleMetadata:V1Scale :: V1Scale -> Maybe V1ObjectMeta
$sel:v1ScaleSpec:V1Scale :: V1Scale -> Maybe V1ScaleSpec
$sel:v1ScaleStatus:V1Scale :: V1Scale -> Maybe V1ScaleStatus
v1ScaleApiVersion :: Maybe Text
v1ScaleKind :: Maybe Text
v1ScaleMetadata :: Maybe V1ObjectMeta
v1ScaleSpec :: Maybe V1ScaleSpec
v1ScaleStatus :: Maybe V1ScaleStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ScaleApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ScaleKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1ScaleMetadata
      , Key
"spec" Key -> Maybe V1ScaleSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ScaleSpec
v1ScaleSpec
      , Key
"status" Key -> Maybe V1ScaleStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ScaleStatus
v1ScaleStatus
      ]


-- | Construct a value of type 'V1Scale' (by applying it's required fields, if any)
mkV1Scale
  :: V1Scale
mkV1Scale :: V1Scale
mkV1Scale =
  V1Scale
  { $sel:v1ScaleApiVersion:V1Scale :: Maybe Text
v1ScaleApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ScaleKind:V1Scale :: Maybe Text
v1ScaleKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ScaleMetadata:V1Scale :: Maybe V1ObjectMeta
v1ScaleMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1ScaleSpec:V1Scale :: Maybe V1ScaleSpec
v1ScaleSpec = Maybe V1ScaleSpec
forall a. Maybe a
Nothing
  , $sel:v1ScaleStatus:V1Scale :: Maybe V1ScaleStatus
v1ScaleStatus = Maybe V1ScaleStatus
forall a. Maybe a
Nothing
  }

-- ** V1ScaleIOPersistentVolumeSource
-- | V1ScaleIOPersistentVolumeSource
-- ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume
data V1ScaleIOPersistentVolumeSource = V1ScaleIOPersistentVolumeSource
  { V1ScaleIOPersistentVolumeSource -> Maybe Text
v1ScaleIOPersistentVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \&quot;ext4\&quot;, \&quot;xfs\&quot;, \&quot;ntfs\&quot;. Default is \&quot;xfs\&quot;
  , V1ScaleIOPersistentVolumeSource -> Text
v1ScaleIOPersistentVolumeSourceGateway :: !(Text) -- ^ /Required/ "gateway" - gateway is the host address of the ScaleIO API Gateway.
  , V1ScaleIOPersistentVolumeSource -> Maybe Text
v1ScaleIOPersistentVolumeSourceProtectionDomain :: !(Maybe Text) -- ^ "protectionDomain" - protectionDomain is the name of the ScaleIO Protection Domain for the configured storage.
  , V1ScaleIOPersistentVolumeSource -> Maybe Bool
v1ScaleIOPersistentVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
  , V1ScaleIOPersistentVolumeSource -> V1SecretReference
v1ScaleIOPersistentVolumeSourceSecretRef :: !(V1SecretReference) -- ^ /Required/ "secretRef"
  , V1ScaleIOPersistentVolumeSource -> Maybe Bool
v1ScaleIOPersistentVolumeSourceSslEnabled :: !(Maybe Bool) -- ^ "sslEnabled" - sslEnabled is the flag to enable/disable SSL communication with Gateway, default false
  , V1ScaleIOPersistentVolumeSource -> Maybe Text
v1ScaleIOPersistentVolumeSourceStorageMode :: !(Maybe Text) -- ^ "storageMode" - storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.
  , V1ScaleIOPersistentVolumeSource -> Maybe Text
v1ScaleIOPersistentVolumeSourceStoragePool :: !(Maybe Text) -- ^ "storagePool" - storagePool is the ScaleIO Storage Pool associated with the protection domain.
  , V1ScaleIOPersistentVolumeSource -> Text
v1ScaleIOPersistentVolumeSourceSystem :: !(Text) -- ^ /Required/ "system" - system is the name of the storage system as configured in ScaleIO.
  , V1ScaleIOPersistentVolumeSource -> Maybe Text
v1ScaleIOPersistentVolumeSourceVolumeName :: !(Maybe Text) -- ^ "volumeName" - volumeName is the name of a volume already created in the ScaleIO system that is associated with this volume source.
  } deriving (Int -> V1ScaleIOPersistentVolumeSource -> ShowS
[V1ScaleIOPersistentVolumeSource] -> ShowS
V1ScaleIOPersistentVolumeSource -> String
(Int -> V1ScaleIOPersistentVolumeSource -> ShowS)
-> (V1ScaleIOPersistentVolumeSource -> String)
-> ([V1ScaleIOPersistentVolumeSource] -> ShowS)
-> Show V1ScaleIOPersistentVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ScaleIOPersistentVolumeSource -> ShowS
showsPrec :: Int -> V1ScaleIOPersistentVolumeSource -> ShowS
$cshow :: V1ScaleIOPersistentVolumeSource -> String
show :: V1ScaleIOPersistentVolumeSource -> String
$cshowList :: [V1ScaleIOPersistentVolumeSource] -> ShowS
showList :: [V1ScaleIOPersistentVolumeSource] -> ShowS
P.Show, V1ScaleIOPersistentVolumeSource
-> V1ScaleIOPersistentVolumeSource -> Bool
(V1ScaleIOPersistentVolumeSource
 -> V1ScaleIOPersistentVolumeSource -> Bool)
-> (V1ScaleIOPersistentVolumeSource
    -> V1ScaleIOPersistentVolumeSource -> Bool)
-> Eq V1ScaleIOPersistentVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ScaleIOPersistentVolumeSource
-> V1ScaleIOPersistentVolumeSource -> Bool
== :: V1ScaleIOPersistentVolumeSource
-> V1ScaleIOPersistentVolumeSource -> Bool
$c/= :: V1ScaleIOPersistentVolumeSource
-> V1ScaleIOPersistentVolumeSource -> Bool
/= :: V1ScaleIOPersistentVolumeSource
-> V1ScaleIOPersistentVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ScaleIOPersistentVolumeSource
instance A.FromJSON V1ScaleIOPersistentVolumeSource where
  parseJSON :: Value -> Parser V1ScaleIOPersistentVolumeSource
parseJSON = String
-> (Object -> Parser V1ScaleIOPersistentVolumeSource)
-> Value
-> Parser V1ScaleIOPersistentVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ScaleIOPersistentVolumeSource" ((Object -> Parser V1ScaleIOPersistentVolumeSource)
 -> Value -> Parser V1ScaleIOPersistentVolumeSource)
-> (Object -> Parser V1ScaleIOPersistentVolumeSource)
-> Value
-> Parser V1ScaleIOPersistentVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Text
-> Maybe Text
-> Maybe Bool
-> V1SecretReference
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Text
-> Maybe Text
-> V1ScaleIOPersistentVolumeSource
V1ScaleIOPersistentVolumeSource
      (Maybe Text
 -> Text
 -> Maybe Text
 -> Maybe Bool
 -> V1SecretReference
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> Maybe Text
 -> V1ScaleIOPersistentVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Text
      -> Maybe Text
      -> Maybe Bool
      -> V1SecretReference
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Maybe Text
      -> V1ScaleIOPersistentVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fsType")
      Parser
  (Text
   -> Maybe Text
   -> Maybe Bool
   -> V1SecretReference
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Maybe Text
   -> V1ScaleIOPersistentVolumeSource)
-> Parser Text
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> V1SecretReference
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Maybe Text
      -> V1ScaleIOPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"gateway")
      Parser
  (Maybe Text
   -> Maybe Bool
   -> V1SecretReference
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Maybe Text
   -> V1ScaleIOPersistentVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> V1SecretReference
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Maybe Text
      -> V1ScaleIOPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"protectionDomain")
      Parser
  (Maybe Bool
   -> V1SecretReference
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Maybe Text
   -> V1ScaleIOPersistentVolumeSource)
-> Parser (Maybe Bool)
-> Parser
     (V1SecretReference
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Maybe Text
      -> V1ScaleIOPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readOnly")
      Parser
  (V1SecretReference
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Maybe Text
   -> V1ScaleIOPersistentVolumeSource)
-> Parser V1SecretReference
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Maybe Text
      -> V1ScaleIOPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1SecretReference
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"secretRef")
      Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Maybe Text
   -> V1ScaleIOPersistentVolumeSource)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Text
      -> Maybe Text
      -> V1ScaleIOPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"sslEnabled")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Text
   -> Maybe Text
   -> V1ScaleIOPersistentVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Text -> Maybe Text -> V1ScaleIOPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"storageMode")
      Parser
  (Maybe Text
   -> Text -> Maybe Text -> V1ScaleIOPersistentVolumeSource)
-> Parser (Maybe Text)
-> Parser (Text -> Maybe Text -> V1ScaleIOPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"storagePool")
      Parser (Text -> Maybe Text -> V1ScaleIOPersistentVolumeSource)
-> Parser Text
-> Parser (Maybe Text -> V1ScaleIOPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"system")
      Parser (Maybe Text -> V1ScaleIOPersistentVolumeSource)
-> Parser (Maybe Text) -> Parser V1ScaleIOPersistentVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"volumeName")

-- | ToJSON V1ScaleIOPersistentVolumeSource
instance A.ToJSON V1ScaleIOPersistentVolumeSource where
  toJSON :: V1ScaleIOPersistentVolumeSource -> Value
toJSON V1ScaleIOPersistentVolumeSource {Maybe Bool
Maybe Text
Text
V1SecretReference
$sel:v1ScaleIOPersistentVolumeSourceFsType:V1ScaleIOPersistentVolumeSource :: V1ScaleIOPersistentVolumeSource -> Maybe Text
$sel:v1ScaleIOPersistentVolumeSourceGateway:V1ScaleIOPersistentVolumeSource :: V1ScaleIOPersistentVolumeSource -> Text
$sel:v1ScaleIOPersistentVolumeSourceProtectionDomain:V1ScaleIOPersistentVolumeSource :: V1ScaleIOPersistentVolumeSource -> Maybe Text
$sel:v1ScaleIOPersistentVolumeSourceReadOnly:V1ScaleIOPersistentVolumeSource :: V1ScaleIOPersistentVolumeSource -> Maybe Bool
$sel:v1ScaleIOPersistentVolumeSourceSecretRef:V1ScaleIOPersistentVolumeSource :: V1ScaleIOPersistentVolumeSource -> V1SecretReference
$sel:v1ScaleIOPersistentVolumeSourceSslEnabled:V1ScaleIOPersistentVolumeSource :: V1ScaleIOPersistentVolumeSource -> Maybe Bool
$sel:v1ScaleIOPersistentVolumeSourceStorageMode:V1ScaleIOPersistentVolumeSource :: V1ScaleIOPersistentVolumeSource -> Maybe Text
$sel:v1ScaleIOPersistentVolumeSourceStoragePool:V1ScaleIOPersistentVolumeSource :: V1ScaleIOPersistentVolumeSource -> Maybe Text
$sel:v1ScaleIOPersistentVolumeSourceSystem:V1ScaleIOPersistentVolumeSource :: V1ScaleIOPersistentVolumeSource -> Text
$sel:v1ScaleIOPersistentVolumeSourceVolumeName:V1ScaleIOPersistentVolumeSource :: V1ScaleIOPersistentVolumeSource -> Maybe Text
v1ScaleIOPersistentVolumeSourceFsType :: Maybe Text
v1ScaleIOPersistentVolumeSourceGateway :: Text
v1ScaleIOPersistentVolumeSourceProtectionDomain :: Maybe Text
v1ScaleIOPersistentVolumeSourceReadOnly :: Maybe Bool
v1ScaleIOPersistentVolumeSourceSecretRef :: V1SecretReference
v1ScaleIOPersistentVolumeSourceSslEnabled :: Maybe Bool
v1ScaleIOPersistentVolumeSourceStorageMode :: Maybe Text
v1ScaleIOPersistentVolumeSourceStoragePool :: Maybe Text
v1ScaleIOPersistentVolumeSourceSystem :: Text
v1ScaleIOPersistentVolumeSourceVolumeName :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"fsType" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ScaleIOPersistentVolumeSourceFsType
      , Key
"gateway" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ScaleIOPersistentVolumeSourceGateway
      , Key
"protectionDomain" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ScaleIOPersistentVolumeSourceProtectionDomain
      , Key
"readOnly" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1ScaleIOPersistentVolumeSourceReadOnly
      , Key
"secretRef" Key -> V1SecretReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1SecretReference
v1ScaleIOPersistentVolumeSourceSecretRef
      , Key
"sslEnabled" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1ScaleIOPersistentVolumeSourceSslEnabled
      , Key
"storageMode" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ScaleIOPersistentVolumeSourceStorageMode
      , Key
"storagePool" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ScaleIOPersistentVolumeSourceStoragePool
      , Key
"system" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ScaleIOPersistentVolumeSourceSystem
      , Key
"volumeName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ScaleIOPersistentVolumeSourceVolumeName
      ]


-- | Construct a value of type 'V1ScaleIOPersistentVolumeSource' (by applying it's required fields, if any)
mkV1ScaleIOPersistentVolumeSource
  :: Text -- ^ 'v1ScaleIOPersistentVolumeSourceGateway': gateway is the host address of the ScaleIO API Gateway.
  -> V1SecretReference -- ^ 'v1ScaleIOPersistentVolumeSourceSecretRef' 
  -> Text -- ^ 'v1ScaleIOPersistentVolumeSourceSystem': system is the name of the storage system as configured in ScaleIO.
  -> V1ScaleIOPersistentVolumeSource
mkV1ScaleIOPersistentVolumeSource :: Text
-> V1SecretReference -> Text -> V1ScaleIOPersistentVolumeSource
mkV1ScaleIOPersistentVolumeSource Text
v1ScaleIOPersistentVolumeSourceGateway V1SecretReference
v1ScaleIOPersistentVolumeSourceSecretRef Text
v1ScaleIOPersistentVolumeSourceSystem =
  V1ScaleIOPersistentVolumeSource
  { $sel:v1ScaleIOPersistentVolumeSourceFsType:V1ScaleIOPersistentVolumeSource :: Maybe Text
v1ScaleIOPersistentVolumeSourceFsType = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1ScaleIOPersistentVolumeSourceGateway:V1ScaleIOPersistentVolumeSource :: Text
v1ScaleIOPersistentVolumeSourceGateway :: Text
v1ScaleIOPersistentVolumeSourceGateway
  , $sel:v1ScaleIOPersistentVolumeSourceProtectionDomain:V1ScaleIOPersistentVolumeSource :: Maybe Text
v1ScaleIOPersistentVolumeSourceProtectionDomain = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ScaleIOPersistentVolumeSourceReadOnly:V1ScaleIOPersistentVolumeSource :: Maybe Bool
v1ScaleIOPersistentVolumeSourceReadOnly = Maybe Bool
forall a. Maybe a
Nothing
  , V1SecretReference
$sel:v1ScaleIOPersistentVolumeSourceSecretRef:V1ScaleIOPersistentVolumeSource :: V1SecretReference
v1ScaleIOPersistentVolumeSourceSecretRef :: V1SecretReference
v1ScaleIOPersistentVolumeSourceSecretRef
  , $sel:v1ScaleIOPersistentVolumeSourceSslEnabled:V1ScaleIOPersistentVolumeSource :: Maybe Bool
v1ScaleIOPersistentVolumeSourceSslEnabled = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1ScaleIOPersistentVolumeSourceStorageMode:V1ScaleIOPersistentVolumeSource :: Maybe Text
v1ScaleIOPersistentVolumeSourceStorageMode = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ScaleIOPersistentVolumeSourceStoragePool:V1ScaleIOPersistentVolumeSource :: Maybe Text
v1ScaleIOPersistentVolumeSourceStoragePool = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1ScaleIOPersistentVolumeSourceSystem:V1ScaleIOPersistentVolumeSource :: Text
v1ScaleIOPersistentVolumeSourceSystem :: Text
v1ScaleIOPersistentVolumeSourceSystem
  , $sel:v1ScaleIOPersistentVolumeSourceVolumeName:V1ScaleIOPersistentVolumeSource :: Maybe Text
v1ScaleIOPersistentVolumeSourceVolumeName = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1ScaleIOVolumeSource
-- | V1ScaleIOVolumeSource
-- ScaleIOVolumeSource represents a persistent ScaleIO volume
data V1ScaleIOVolumeSource = V1ScaleIOVolumeSource
  { V1ScaleIOVolumeSource -> Maybe Text
v1ScaleIOVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \&quot;ext4\&quot;, \&quot;xfs\&quot;, \&quot;ntfs\&quot;. Default is \&quot;xfs\&quot;.
  , V1ScaleIOVolumeSource -> Text
v1ScaleIOVolumeSourceGateway :: !(Text) -- ^ /Required/ "gateway" - gateway is the host address of the ScaleIO API Gateway.
  , V1ScaleIOVolumeSource -> Maybe Text
v1ScaleIOVolumeSourceProtectionDomain :: !(Maybe Text) -- ^ "protectionDomain" - protectionDomain is the name of the ScaleIO Protection Domain for the configured storage.
  , V1ScaleIOVolumeSource -> Maybe Bool
v1ScaleIOVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
  , V1ScaleIOVolumeSource -> V1LocalObjectReference
v1ScaleIOVolumeSourceSecretRef :: !(V1LocalObjectReference) -- ^ /Required/ "secretRef"
  , V1ScaleIOVolumeSource -> Maybe Bool
v1ScaleIOVolumeSourceSslEnabled :: !(Maybe Bool) -- ^ "sslEnabled" - sslEnabled Flag enable/disable SSL communication with Gateway, default false
  , V1ScaleIOVolumeSource -> Maybe Text
v1ScaleIOVolumeSourceStorageMode :: !(Maybe Text) -- ^ "storageMode" - storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.
  , V1ScaleIOVolumeSource -> Maybe Text
v1ScaleIOVolumeSourceStoragePool :: !(Maybe Text) -- ^ "storagePool" - storagePool is the ScaleIO Storage Pool associated with the protection domain.
  , V1ScaleIOVolumeSource -> Text
v1ScaleIOVolumeSourceSystem :: !(Text) -- ^ /Required/ "system" - system is the name of the storage system as configured in ScaleIO.
  , V1ScaleIOVolumeSource -> Maybe Text
v1ScaleIOVolumeSourceVolumeName :: !(Maybe Text) -- ^ "volumeName" - volumeName is the name of a volume already created in the ScaleIO system that is associated with this volume source.
  } deriving (Int -> V1ScaleIOVolumeSource -> ShowS
[V1ScaleIOVolumeSource] -> ShowS
V1ScaleIOVolumeSource -> String
(Int -> V1ScaleIOVolumeSource -> ShowS)
-> (V1ScaleIOVolumeSource -> String)
-> ([V1ScaleIOVolumeSource] -> ShowS)
-> Show V1ScaleIOVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ScaleIOVolumeSource -> ShowS
showsPrec :: Int -> V1ScaleIOVolumeSource -> ShowS
$cshow :: V1ScaleIOVolumeSource -> String
show :: V1ScaleIOVolumeSource -> String
$cshowList :: [V1ScaleIOVolumeSource] -> ShowS
showList :: [V1ScaleIOVolumeSource] -> ShowS
P.Show, V1ScaleIOVolumeSource -> V1ScaleIOVolumeSource -> Bool
(V1ScaleIOVolumeSource -> V1ScaleIOVolumeSource -> Bool)
-> (V1ScaleIOVolumeSource -> V1ScaleIOVolumeSource -> Bool)
-> Eq V1ScaleIOVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ScaleIOVolumeSource -> V1ScaleIOVolumeSource -> Bool
== :: V1ScaleIOVolumeSource -> V1ScaleIOVolumeSource -> Bool
$c/= :: V1ScaleIOVolumeSource -> V1ScaleIOVolumeSource -> Bool
/= :: V1ScaleIOVolumeSource -> V1ScaleIOVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ScaleIOVolumeSource
instance A.FromJSON V1ScaleIOVolumeSource where
  parseJSON :: Value -> Parser V1ScaleIOVolumeSource
parseJSON = String
-> (Object -> Parser V1ScaleIOVolumeSource)
-> Value
-> Parser V1ScaleIOVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ScaleIOVolumeSource" ((Object -> Parser V1ScaleIOVolumeSource)
 -> Value -> Parser V1ScaleIOVolumeSource)
-> (Object -> Parser V1ScaleIOVolumeSource)
-> Value
-> Parser V1ScaleIOVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Text
-> Maybe Text
-> Maybe Bool
-> V1LocalObjectReference
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Text
-> Maybe Text
-> V1ScaleIOVolumeSource
V1ScaleIOVolumeSource
      (Maybe Text
 -> Text
 -> Maybe Text
 -> Maybe Bool
 -> V1LocalObjectReference
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> Maybe Text
 -> V1ScaleIOVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Text
      -> Maybe Text
      -> Maybe Bool
      -> V1LocalObjectReference
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Maybe Text
      -> V1ScaleIOVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fsType")
      Parser
  (Text
   -> Maybe Text
   -> Maybe Bool
   -> V1LocalObjectReference
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Maybe Text
   -> V1ScaleIOVolumeSource)
-> Parser Text
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> V1LocalObjectReference
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Maybe Text
      -> V1ScaleIOVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"gateway")
      Parser
  (Maybe Text
   -> Maybe Bool
   -> V1LocalObjectReference
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Maybe Text
   -> V1ScaleIOVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> V1LocalObjectReference
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Maybe Text
      -> V1ScaleIOVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"protectionDomain")
      Parser
  (Maybe Bool
   -> V1LocalObjectReference
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Maybe Text
   -> V1ScaleIOVolumeSource)
-> Parser (Maybe Bool)
-> Parser
     (V1LocalObjectReference
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Maybe Text
      -> V1ScaleIOVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readOnly")
      Parser
  (V1LocalObjectReference
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Maybe Text
   -> V1ScaleIOVolumeSource)
-> Parser V1LocalObjectReference
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Maybe Text
      -> V1ScaleIOVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1LocalObjectReference
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"secretRef")
      Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Maybe Text
   -> V1ScaleIOVolumeSource)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Text -> Text -> Maybe Text -> V1ScaleIOVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"sslEnabled")
      Parser
  (Maybe Text
   -> Maybe Text -> Text -> Maybe Text -> V1ScaleIOVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Text -> Maybe Text -> V1ScaleIOVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"storageMode")
      Parser (Maybe Text -> Text -> Maybe Text -> V1ScaleIOVolumeSource)
-> Parser (Maybe Text)
-> Parser (Text -> Maybe Text -> V1ScaleIOVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"storagePool")
      Parser (Text -> Maybe Text -> V1ScaleIOVolumeSource)
-> Parser Text -> Parser (Maybe Text -> V1ScaleIOVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"system")
      Parser (Maybe Text -> V1ScaleIOVolumeSource)
-> Parser (Maybe Text) -> Parser V1ScaleIOVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"volumeName")

-- | ToJSON V1ScaleIOVolumeSource
instance A.ToJSON V1ScaleIOVolumeSource where
  toJSON :: V1ScaleIOVolumeSource -> Value
toJSON V1ScaleIOVolumeSource {Maybe Bool
Maybe Text
Text
V1LocalObjectReference
$sel:v1ScaleIOVolumeSourceFsType:V1ScaleIOVolumeSource :: V1ScaleIOVolumeSource -> Maybe Text
$sel:v1ScaleIOVolumeSourceGateway:V1ScaleIOVolumeSource :: V1ScaleIOVolumeSource -> Text
$sel:v1ScaleIOVolumeSourceProtectionDomain:V1ScaleIOVolumeSource :: V1ScaleIOVolumeSource -> Maybe Text
$sel:v1ScaleIOVolumeSourceReadOnly:V1ScaleIOVolumeSource :: V1ScaleIOVolumeSource -> Maybe Bool
$sel:v1ScaleIOVolumeSourceSecretRef:V1ScaleIOVolumeSource :: V1ScaleIOVolumeSource -> V1LocalObjectReference
$sel:v1ScaleIOVolumeSourceSslEnabled:V1ScaleIOVolumeSource :: V1ScaleIOVolumeSource -> Maybe Bool
$sel:v1ScaleIOVolumeSourceStorageMode:V1ScaleIOVolumeSource :: V1ScaleIOVolumeSource -> Maybe Text
$sel:v1ScaleIOVolumeSourceStoragePool:V1ScaleIOVolumeSource :: V1ScaleIOVolumeSource -> Maybe Text
$sel:v1ScaleIOVolumeSourceSystem:V1ScaleIOVolumeSource :: V1ScaleIOVolumeSource -> Text
$sel:v1ScaleIOVolumeSourceVolumeName:V1ScaleIOVolumeSource :: V1ScaleIOVolumeSource -> Maybe Text
v1ScaleIOVolumeSourceFsType :: Maybe Text
v1ScaleIOVolumeSourceGateway :: Text
v1ScaleIOVolumeSourceProtectionDomain :: Maybe Text
v1ScaleIOVolumeSourceReadOnly :: Maybe Bool
v1ScaleIOVolumeSourceSecretRef :: V1LocalObjectReference
v1ScaleIOVolumeSourceSslEnabled :: Maybe Bool
v1ScaleIOVolumeSourceStorageMode :: Maybe Text
v1ScaleIOVolumeSourceStoragePool :: Maybe Text
v1ScaleIOVolumeSourceSystem :: Text
v1ScaleIOVolumeSourceVolumeName :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"fsType" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ScaleIOVolumeSourceFsType
      , Key
"gateway" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ScaleIOVolumeSourceGateway
      , Key
"protectionDomain" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ScaleIOVolumeSourceProtectionDomain
      , Key
"readOnly" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1ScaleIOVolumeSourceReadOnly
      , Key
"secretRef" Key -> V1LocalObjectReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1LocalObjectReference
v1ScaleIOVolumeSourceSecretRef
      , Key
"sslEnabled" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1ScaleIOVolumeSourceSslEnabled
      , Key
"storageMode" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ScaleIOVolumeSourceStorageMode
      , Key
"storagePool" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ScaleIOVolumeSourceStoragePool
      , Key
"system" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ScaleIOVolumeSourceSystem
      , Key
"volumeName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ScaleIOVolumeSourceVolumeName
      ]


-- | Construct a value of type 'V1ScaleIOVolumeSource' (by applying it's required fields, if any)
mkV1ScaleIOVolumeSource
  :: Text -- ^ 'v1ScaleIOVolumeSourceGateway': gateway is the host address of the ScaleIO API Gateway.
  -> V1LocalObjectReference -- ^ 'v1ScaleIOVolumeSourceSecretRef' 
  -> Text -- ^ 'v1ScaleIOVolumeSourceSystem': system is the name of the storage system as configured in ScaleIO.
  -> V1ScaleIOVolumeSource
mkV1ScaleIOVolumeSource :: Text -> V1LocalObjectReference -> Text -> V1ScaleIOVolumeSource
mkV1ScaleIOVolumeSource Text
v1ScaleIOVolumeSourceGateway V1LocalObjectReference
v1ScaleIOVolumeSourceSecretRef Text
v1ScaleIOVolumeSourceSystem =
  V1ScaleIOVolumeSource
  { $sel:v1ScaleIOVolumeSourceFsType:V1ScaleIOVolumeSource :: Maybe Text
v1ScaleIOVolumeSourceFsType = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1ScaleIOVolumeSourceGateway:V1ScaleIOVolumeSource :: Text
v1ScaleIOVolumeSourceGateway :: Text
v1ScaleIOVolumeSourceGateway
  , $sel:v1ScaleIOVolumeSourceProtectionDomain:V1ScaleIOVolumeSource :: Maybe Text
v1ScaleIOVolumeSourceProtectionDomain = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ScaleIOVolumeSourceReadOnly:V1ScaleIOVolumeSource :: Maybe Bool
v1ScaleIOVolumeSourceReadOnly = Maybe Bool
forall a. Maybe a
Nothing
  , V1LocalObjectReference
$sel:v1ScaleIOVolumeSourceSecretRef:V1ScaleIOVolumeSource :: V1LocalObjectReference
v1ScaleIOVolumeSourceSecretRef :: V1LocalObjectReference
v1ScaleIOVolumeSourceSecretRef
  , $sel:v1ScaleIOVolumeSourceSslEnabled:V1ScaleIOVolumeSource :: Maybe Bool
v1ScaleIOVolumeSourceSslEnabled = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1ScaleIOVolumeSourceStorageMode:V1ScaleIOVolumeSource :: Maybe Text
v1ScaleIOVolumeSourceStorageMode = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ScaleIOVolumeSourceStoragePool:V1ScaleIOVolumeSource :: Maybe Text
v1ScaleIOVolumeSourceStoragePool = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1ScaleIOVolumeSourceSystem:V1ScaleIOVolumeSource :: Text
v1ScaleIOVolumeSourceSystem :: Text
v1ScaleIOVolumeSourceSystem
  , $sel:v1ScaleIOVolumeSourceVolumeName:V1ScaleIOVolumeSource :: Maybe Text
v1ScaleIOVolumeSourceVolumeName = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1ScaleSpec
-- | V1ScaleSpec
-- ScaleSpec describes the attributes of a scale subresource.
data V1ScaleSpec = V1ScaleSpec
  { V1ScaleSpec -> Maybe Int
v1ScaleSpecReplicas :: !(Maybe Int) -- ^ "replicas" - replicas is the desired number of instances for the scaled object.
  } deriving (Int -> V1ScaleSpec -> ShowS
[V1ScaleSpec] -> ShowS
V1ScaleSpec -> String
(Int -> V1ScaleSpec -> ShowS)
-> (V1ScaleSpec -> String)
-> ([V1ScaleSpec] -> ShowS)
-> Show V1ScaleSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ScaleSpec -> ShowS
showsPrec :: Int -> V1ScaleSpec -> ShowS
$cshow :: V1ScaleSpec -> String
show :: V1ScaleSpec -> String
$cshowList :: [V1ScaleSpec] -> ShowS
showList :: [V1ScaleSpec] -> ShowS
P.Show, V1ScaleSpec -> V1ScaleSpec -> Bool
(V1ScaleSpec -> V1ScaleSpec -> Bool)
-> (V1ScaleSpec -> V1ScaleSpec -> Bool) -> Eq V1ScaleSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ScaleSpec -> V1ScaleSpec -> Bool
== :: V1ScaleSpec -> V1ScaleSpec -> Bool
$c/= :: V1ScaleSpec -> V1ScaleSpec -> Bool
/= :: V1ScaleSpec -> V1ScaleSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ScaleSpec
instance A.FromJSON V1ScaleSpec where
  parseJSON :: Value -> Parser V1ScaleSpec
parseJSON = String
-> (Object -> Parser V1ScaleSpec) -> Value -> Parser V1ScaleSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ScaleSpec" ((Object -> Parser V1ScaleSpec) -> Value -> Parser V1ScaleSpec)
-> (Object -> Parser V1ScaleSpec) -> Value -> Parser V1ScaleSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Int -> V1ScaleSpec
V1ScaleSpec
      (Maybe Int -> V1ScaleSpec)
-> Parser (Maybe Int) -> Parser V1ScaleSpec
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"replicas")

-- | ToJSON V1ScaleSpec
instance A.ToJSON V1ScaleSpec where
  toJSON :: V1ScaleSpec -> Value
toJSON V1ScaleSpec {Maybe Int
$sel:v1ScaleSpecReplicas:V1ScaleSpec :: V1ScaleSpec -> Maybe Int
v1ScaleSpecReplicas :: Maybe Int
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"replicas" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1ScaleSpecReplicas
      ]


-- | Construct a value of type 'V1ScaleSpec' (by applying it's required fields, if any)
mkV1ScaleSpec
  :: V1ScaleSpec
mkV1ScaleSpec :: V1ScaleSpec
mkV1ScaleSpec =
  V1ScaleSpec
  { $sel:v1ScaleSpecReplicas:V1ScaleSpec :: Maybe Int
v1ScaleSpecReplicas = Maybe Int
forall a. Maybe a
Nothing
  }

-- ** V1ScaleStatus
-- | V1ScaleStatus
-- ScaleStatus represents the current status of a scale subresource.
data V1ScaleStatus = V1ScaleStatus
  { V1ScaleStatus -> Int
v1ScaleStatusReplicas :: !(Int) -- ^ /Required/ "replicas" - replicas is the actual number of observed instances of the scaled object.
  , V1ScaleStatus -> Maybe Text
v1ScaleStatusSelector :: !(Maybe Text) -- ^ "selector" - selector is the label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
  } deriving (Int -> V1ScaleStatus -> ShowS
[V1ScaleStatus] -> ShowS
V1ScaleStatus -> String
(Int -> V1ScaleStatus -> ShowS)
-> (V1ScaleStatus -> String)
-> ([V1ScaleStatus] -> ShowS)
-> Show V1ScaleStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ScaleStatus -> ShowS
showsPrec :: Int -> V1ScaleStatus -> ShowS
$cshow :: V1ScaleStatus -> String
show :: V1ScaleStatus -> String
$cshowList :: [V1ScaleStatus] -> ShowS
showList :: [V1ScaleStatus] -> ShowS
P.Show, V1ScaleStatus -> V1ScaleStatus -> Bool
(V1ScaleStatus -> V1ScaleStatus -> Bool)
-> (V1ScaleStatus -> V1ScaleStatus -> Bool) -> Eq V1ScaleStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ScaleStatus -> V1ScaleStatus -> Bool
== :: V1ScaleStatus -> V1ScaleStatus -> Bool
$c/= :: V1ScaleStatus -> V1ScaleStatus -> Bool
/= :: V1ScaleStatus -> V1ScaleStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ScaleStatus
instance A.FromJSON V1ScaleStatus where
  parseJSON :: Value -> Parser V1ScaleStatus
parseJSON = String
-> (Object -> Parser V1ScaleStatus)
-> Value
-> Parser V1ScaleStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ScaleStatus" ((Object -> Parser V1ScaleStatus) -> Value -> Parser V1ScaleStatus)
-> (Object -> Parser V1ScaleStatus)
-> Value
-> Parser V1ScaleStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Int -> Maybe Text -> V1ScaleStatus
V1ScaleStatus
      (Int -> Maybe Text -> V1ScaleStatus)
-> Parser Int -> Parser (Maybe Text -> V1ScaleStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"replicas")
      Parser (Maybe Text -> V1ScaleStatus)
-> Parser (Maybe Text) -> Parser V1ScaleStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"selector")

-- | ToJSON V1ScaleStatus
instance A.ToJSON V1ScaleStatus where
  toJSON :: V1ScaleStatus -> Value
toJSON V1ScaleStatus {Int
Maybe Text
$sel:v1ScaleStatusReplicas:V1ScaleStatus :: V1ScaleStatus -> Int
$sel:v1ScaleStatusSelector:V1ScaleStatus :: V1ScaleStatus -> Maybe Text
v1ScaleStatusReplicas :: Int
v1ScaleStatusSelector :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"replicas" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v1ScaleStatusReplicas
      , Key
"selector" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ScaleStatusSelector
      ]


-- | Construct a value of type 'V1ScaleStatus' (by applying it's required fields, if any)
mkV1ScaleStatus
  :: Int -- ^ 'v1ScaleStatusReplicas': replicas is the actual number of observed instances of the scaled object.
  -> V1ScaleStatus
mkV1ScaleStatus :: Int -> V1ScaleStatus
mkV1ScaleStatus Int
v1ScaleStatusReplicas =
  V1ScaleStatus
  { Int
$sel:v1ScaleStatusReplicas:V1ScaleStatus :: Int
v1ScaleStatusReplicas :: Int
v1ScaleStatusReplicas
  , $sel:v1ScaleStatusSelector:V1ScaleStatus :: Maybe Text
v1ScaleStatusSelector = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1Scheduling
-- | V1Scheduling
-- Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass.
data V1Scheduling = V1Scheduling
  { V1Scheduling -> Maybe (Map String Text)
v1SchedulingNodeSelector :: !(Maybe (Map.Map String Text)) -- ^ "nodeSelector" - nodeSelector lists labels that must be present on nodes that support this RuntimeClass. Pods using this RuntimeClass can only be scheduled to a node matched by this selector. The RuntimeClass nodeSelector is merged with a pod&#39;s existing nodeSelector. Any conflicts will cause the pod to be rejected in admission.
  , V1Scheduling -> Maybe [V1Toleration]
v1SchedulingTolerations :: !(Maybe [V1Toleration]) -- ^ "tolerations" - tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass.
  } deriving (Int -> V1Scheduling -> ShowS
[V1Scheduling] -> ShowS
V1Scheduling -> String
(Int -> V1Scheduling -> ShowS)
-> (V1Scheduling -> String)
-> ([V1Scheduling] -> ShowS)
-> Show V1Scheduling
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1Scheduling -> ShowS
showsPrec :: Int -> V1Scheduling -> ShowS
$cshow :: V1Scheduling -> String
show :: V1Scheduling -> String
$cshowList :: [V1Scheduling] -> ShowS
showList :: [V1Scheduling] -> ShowS
P.Show, V1Scheduling -> V1Scheduling -> Bool
(V1Scheduling -> V1Scheduling -> Bool)
-> (V1Scheduling -> V1Scheduling -> Bool) -> Eq V1Scheduling
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1Scheduling -> V1Scheduling -> Bool
== :: V1Scheduling -> V1Scheduling -> Bool
$c/= :: V1Scheduling -> V1Scheduling -> Bool
/= :: V1Scheduling -> V1Scheduling -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1Scheduling
instance A.FromJSON V1Scheduling where
  parseJSON :: Value -> Parser V1Scheduling
parseJSON = String
-> (Object -> Parser V1Scheduling) -> Value -> Parser V1Scheduling
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1Scheduling" ((Object -> Parser V1Scheduling) -> Value -> Parser V1Scheduling)
-> (Object -> Parser V1Scheduling) -> Value -> Parser V1Scheduling
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe (Map String Text) -> Maybe [V1Toleration] -> V1Scheduling
V1Scheduling
      (Maybe (Map String Text) -> Maybe [V1Toleration] -> V1Scheduling)
-> Parser (Maybe (Map String Text))
-> Parser (Maybe [V1Toleration] -> V1Scheduling)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe (Map String Text))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nodeSelector")
      Parser (Maybe [V1Toleration] -> V1Scheduling)
-> Parser (Maybe [V1Toleration]) -> Parser V1Scheduling
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1Toleration])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"tolerations")

-- | ToJSON V1Scheduling
instance A.ToJSON V1Scheduling where
  toJSON :: V1Scheduling -> Value
toJSON V1Scheduling {Maybe [V1Toleration]
Maybe (Map String Text)
$sel:v1SchedulingNodeSelector:V1Scheduling :: V1Scheduling -> Maybe (Map String Text)
$sel:v1SchedulingTolerations:V1Scheduling :: V1Scheduling -> Maybe [V1Toleration]
v1SchedulingNodeSelector :: Maybe (Map String Text)
v1SchedulingTolerations :: Maybe [V1Toleration]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"nodeSelector" Key -> Maybe (Map String Text) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Text)
v1SchedulingNodeSelector
      , Key
"tolerations" Key -> Maybe [V1Toleration] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1Toleration]
v1SchedulingTolerations
      ]


-- | Construct a value of type 'V1Scheduling' (by applying it's required fields, if any)
mkV1Scheduling
  :: V1Scheduling
mkV1Scheduling :: V1Scheduling
mkV1Scheduling =
  V1Scheduling
  { $sel:v1SchedulingNodeSelector:V1Scheduling :: Maybe (Map String Text)
v1SchedulingNodeSelector = Maybe (Map String Text)
forall a. Maybe a
Nothing
  , $sel:v1SchedulingTolerations:V1Scheduling :: Maybe [V1Toleration]
v1SchedulingTolerations = Maybe [V1Toleration]
forall a. Maybe a
Nothing
  }

-- ** V1ScopeSelector
-- | V1ScopeSelector
-- A scope selector represents the AND of the selectors represented by the scoped-resource selector requirements.
data V1ScopeSelector = V1ScopeSelector
  { V1ScopeSelector -> Maybe [V1ScopedResourceSelectorRequirement]
v1ScopeSelectorMatchExpressions :: !(Maybe [V1ScopedResourceSelectorRequirement]) -- ^ "matchExpressions" - A list of scope selector requirements by scope of the resources.
  } deriving (Int -> V1ScopeSelector -> ShowS
[V1ScopeSelector] -> ShowS
V1ScopeSelector -> String
(Int -> V1ScopeSelector -> ShowS)
-> (V1ScopeSelector -> String)
-> ([V1ScopeSelector] -> ShowS)
-> Show V1ScopeSelector
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ScopeSelector -> ShowS
showsPrec :: Int -> V1ScopeSelector -> ShowS
$cshow :: V1ScopeSelector -> String
show :: V1ScopeSelector -> String
$cshowList :: [V1ScopeSelector] -> ShowS
showList :: [V1ScopeSelector] -> ShowS
P.Show, V1ScopeSelector -> V1ScopeSelector -> Bool
(V1ScopeSelector -> V1ScopeSelector -> Bool)
-> (V1ScopeSelector -> V1ScopeSelector -> Bool)
-> Eq V1ScopeSelector
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ScopeSelector -> V1ScopeSelector -> Bool
== :: V1ScopeSelector -> V1ScopeSelector -> Bool
$c/= :: V1ScopeSelector -> V1ScopeSelector -> Bool
/= :: V1ScopeSelector -> V1ScopeSelector -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ScopeSelector
instance A.FromJSON V1ScopeSelector where
  parseJSON :: Value -> Parser V1ScopeSelector
parseJSON = String
-> (Object -> Parser V1ScopeSelector)
-> Value
-> Parser V1ScopeSelector
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ScopeSelector" ((Object -> Parser V1ScopeSelector)
 -> Value -> Parser V1ScopeSelector)
-> (Object -> Parser V1ScopeSelector)
-> Value
-> Parser V1ScopeSelector
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1ScopedResourceSelectorRequirement] -> V1ScopeSelector
V1ScopeSelector
      (Maybe [V1ScopedResourceSelectorRequirement] -> V1ScopeSelector)
-> Parser (Maybe [V1ScopedResourceSelectorRequirement])
-> Parser V1ScopeSelector
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object
-> Key -> Parser (Maybe [V1ScopedResourceSelectorRequirement])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"matchExpressions")

-- | ToJSON V1ScopeSelector
instance A.ToJSON V1ScopeSelector where
  toJSON :: V1ScopeSelector -> Value
toJSON V1ScopeSelector {Maybe [V1ScopedResourceSelectorRequirement]
$sel:v1ScopeSelectorMatchExpressions:V1ScopeSelector :: V1ScopeSelector -> Maybe [V1ScopedResourceSelectorRequirement]
v1ScopeSelectorMatchExpressions :: Maybe [V1ScopedResourceSelectorRequirement]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"matchExpressions" Key -> Maybe [V1ScopedResourceSelectorRequirement] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1ScopedResourceSelectorRequirement]
v1ScopeSelectorMatchExpressions
      ]


-- | Construct a value of type 'V1ScopeSelector' (by applying it's required fields, if any)
mkV1ScopeSelector
  :: V1ScopeSelector
mkV1ScopeSelector :: V1ScopeSelector
mkV1ScopeSelector =
  V1ScopeSelector
  { $sel:v1ScopeSelectorMatchExpressions:V1ScopeSelector :: Maybe [V1ScopedResourceSelectorRequirement]
v1ScopeSelectorMatchExpressions = Maybe [V1ScopedResourceSelectorRequirement]
forall a. Maybe a
Nothing
  }

-- ** V1ScopedResourceSelectorRequirement
-- | V1ScopedResourceSelectorRequirement
-- A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator that relates the scope name and values.
data V1ScopedResourceSelectorRequirement = V1ScopedResourceSelectorRequirement
  { V1ScopedResourceSelectorRequirement -> Text
v1ScopedResourceSelectorRequirementOperator :: !(Text) -- ^ /Required/ "operator" - Represents a scope&#39;s relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist.
  , V1ScopedResourceSelectorRequirement -> Text
v1ScopedResourceSelectorRequirementScopeName :: !(Text) -- ^ /Required/ "scopeName" - The name of the scope that the selector applies to.
  , V1ScopedResourceSelectorRequirement -> Maybe [Text]
v1ScopedResourceSelectorRequirementValues :: !(Maybe [Text]) -- ^ "values" - An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
  } deriving (Int -> V1ScopedResourceSelectorRequirement -> ShowS
[V1ScopedResourceSelectorRequirement] -> ShowS
V1ScopedResourceSelectorRequirement -> String
(Int -> V1ScopedResourceSelectorRequirement -> ShowS)
-> (V1ScopedResourceSelectorRequirement -> String)
-> ([V1ScopedResourceSelectorRequirement] -> ShowS)
-> Show V1ScopedResourceSelectorRequirement
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ScopedResourceSelectorRequirement -> ShowS
showsPrec :: Int -> V1ScopedResourceSelectorRequirement -> ShowS
$cshow :: V1ScopedResourceSelectorRequirement -> String
show :: V1ScopedResourceSelectorRequirement -> String
$cshowList :: [V1ScopedResourceSelectorRequirement] -> ShowS
showList :: [V1ScopedResourceSelectorRequirement] -> ShowS
P.Show, V1ScopedResourceSelectorRequirement
-> V1ScopedResourceSelectorRequirement -> Bool
(V1ScopedResourceSelectorRequirement
 -> V1ScopedResourceSelectorRequirement -> Bool)
-> (V1ScopedResourceSelectorRequirement
    -> V1ScopedResourceSelectorRequirement -> Bool)
-> Eq V1ScopedResourceSelectorRequirement
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ScopedResourceSelectorRequirement
-> V1ScopedResourceSelectorRequirement -> Bool
== :: V1ScopedResourceSelectorRequirement
-> V1ScopedResourceSelectorRequirement -> Bool
$c/= :: V1ScopedResourceSelectorRequirement
-> V1ScopedResourceSelectorRequirement -> Bool
/= :: V1ScopedResourceSelectorRequirement
-> V1ScopedResourceSelectorRequirement -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ScopedResourceSelectorRequirement
instance A.FromJSON V1ScopedResourceSelectorRequirement where
  parseJSON :: Value -> Parser V1ScopedResourceSelectorRequirement
parseJSON = String
-> (Object -> Parser V1ScopedResourceSelectorRequirement)
-> Value
-> Parser V1ScopedResourceSelectorRequirement
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ScopedResourceSelectorRequirement" ((Object -> Parser V1ScopedResourceSelectorRequirement)
 -> Value -> Parser V1ScopedResourceSelectorRequirement)
-> (Object -> Parser V1ScopedResourceSelectorRequirement)
-> Value
-> Parser V1ScopedResourceSelectorRequirement
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Text -> Maybe [Text] -> V1ScopedResourceSelectorRequirement
V1ScopedResourceSelectorRequirement
      (Text
 -> Text -> Maybe [Text] -> V1ScopedResourceSelectorRequirement)
-> Parser Text
-> Parser
     (Text -> Maybe [Text] -> V1ScopedResourceSelectorRequirement)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"operator")
      Parser
  (Text -> Maybe [Text] -> V1ScopedResourceSelectorRequirement)
-> Parser Text
-> Parser (Maybe [Text] -> V1ScopedResourceSelectorRequirement)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"scopeName")
      Parser (Maybe [Text] -> V1ScopedResourceSelectorRequirement)
-> Parser (Maybe [Text])
-> Parser V1ScopedResourceSelectorRequirement
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"values")

-- | ToJSON V1ScopedResourceSelectorRequirement
instance A.ToJSON V1ScopedResourceSelectorRequirement where
  toJSON :: V1ScopedResourceSelectorRequirement -> Value
toJSON V1ScopedResourceSelectorRequirement {Maybe [Text]
Text
$sel:v1ScopedResourceSelectorRequirementOperator:V1ScopedResourceSelectorRequirement :: V1ScopedResourceSelectorRequirement -> Text
$sel:v1ScopedResourceSelectorRequirementScopeName:V1ScopedResourceSelectorRequirement :: V1ScopedResourceSelectorRequirement -> Text
$sel:v1ScopedResourceSelectorRequirementValues:V1ScopedResourceSelectorRequirement :: V1ScopedResourceSelectorRequirement -> Maybe [Text]
v1ScopedResourceSelectorRequirementOperator :: Text
v1ScopedResourceSelectorRequirementScopeName :: Text
v1ScopedResourceSelectorRequirementValues :: Maybe [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"operator" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ScopedResourceSelectorRequirementOperator
      , Key
"scopeName" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ScopedResourceSelectorRequirementScopeName
      , Key
"values" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1ScopedResourceSelectorRequirementValues
      ]


-- | Construct a value of type 'V1ScopedResourceSelectorRequirement' (by applying it's required fields, if any)
mkV1ScopedResourceSelectorRequirement
  :: Text -- ^ 'v1ScopedResourceSelectorRequirementOperator': Represents a scope's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist.
  -> Text -- ^ 'v1ScopedResourceSelectorRequirementScopeName': The name of the scope that the selector applies to.
  -> V1ScopedResourceSelectorRequirement
mkV1ScopedResourceSelectorRequirement :: Text -> Text -> V1ScopedResourceSelectorRequirement
mkV1ScopedResourceSelectorRequirement Text
v1ScopedResourceSelectorRequirementOperator Text
v1ScopedResourceSelectorRequirementScopeName =
  V1ScopedResourceSelectorRequirement
  { Text
$sel:v1ScopedResourceSelectorRequirementOperator:V1ScopedResourceSelectorRequirement :: Text
v1ScopedResourceSelectorRequirementOperator :: Text
v1ScopedResourceSelectorRequirementOperator
  , Text
$sel:v1ScopedResourceSelectorRequirementScopeName:V1ScopedResourceSelectorRequirement :: Text
v1ScopedResourceSelectorRequirementScopeName :: Text
v1ScopedResourceSelectorRequirementScopeName
  , $sel:v1ScopedResourceSelectorRequirementValues:V1ScopedResourceSelectorRequirement :: Maybe [Text]
v1ScopedResourceSelectorRequirementValues = Maybe [Text]
forall a. Maybe a
Nothing
  }

-- ** V1SeccompProfile
-- | V1SeccompProfile
-- SeccompProfile defines a pod/container's seccomp profile settings. Only one profile source may be set.
data V1SeccompProfile = V1SeccompProfile
  { V1SeccompProfile -> Maybe Text
v1SeccompProfileLocalhostProfile :: !(Maybe Text) -- ^ "localhostProfile" - localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet&#39;s configured seccomp profile location. Must be set if type is \&quot;Localhost\&quot;. Must NOT be set for any other type.
  , V1SeccompProfile -> Text
v1SeccompProfileType :: !(Text) -- ^ /Required/ "type" - type indicates which kind of seccomp profile will be applied. Valid options are:  Localhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied.
  } deriving (Int -> V1SeccompProfile -> ShowS
[V1SeccompProfile] -> ShowS
V1SeccompProfile -> String
(Int -> V1SeccompProfile -> ShowS)
-> (V1SeccompProfile -> String)
-> ([V1SeccompProfile] -> ShowS)
-> Show V1SeccompProfile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1SeccompProfile -> ShowS
showsPrec :: Int -> V1SeccompProfile -> ShowS
$cshow :: V1SeccompProfile -> String
show :: V1SeccompProfile -> String
$cshowList :: [V1SeccompProfile] -> ShowS
showList :: [V1SeccompProfile] -> ShowS
P.Show, V1SeccompProfile -> V1SeccompProfile -> Bool
(V1SeccompProfile -> V1SeccompProfile -> Bool)
-> (V1SeccompProfile -> V1SeccompProfile -> Bool)
-> Eq V1SeccompProfile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1SeccompProfile -> V1SeccompProfile -> Bool
== :: V1SeccompProfile -> V1SeccompProfile -> Bool
$c/= :: V1SeccompProfile -> V1SeccompProfile -> Bool
/= :: V1SeccompProfile -> V1SeccompProfile -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1SeccompProfile
instance A.FromJSON V1SeccompProfile where
  parseJSON :: Value -> Parser V1SeccompProfile
parseJSON = String
-> (Object -> Parser V1SeccompProfile)
-> Value
-> Parser V1SeccompProfile
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1SeccompProfile" ((Object -> Parser V1SeccompProfile)
 -> Value -> Parser V1SeccompProfile)
-> (Object -> Parser V1SeccompProfile)
-> Value
-> Parser V1SeccompProfile
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Text -> V1SeccompProfile
V1SeccompProfile
      (Maybe Text -> Text -> V1SeccompProfile)
-> Parser (Maybe Text) -> Parser (Text -> V1SeccompProfile)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"localhostProfile")
      Parser (Text -> V1SeccompProfile)
-> Parser Text -> Parser V1SeccompProfile
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"type")

-- | ToJSON V1SeccompProfile
instance A.ToJSON V1SeccompProfile where
  toJSON :: V1SeccompProfile -> Value
toJSON V1SeccompProfile {Maybe Text
Text
$sel:v1SeccompProfileLocalhostProfile:V1SeccompProfile :: V1SeccompProfile -> Maybe Text
$sel:v1SeccompProfileType:V1SeccompProfile :: V1SeccompProfile -> Text
v1SeccompProfileLocalhostProfile :: Maybe Text
v1SeccompProfileType :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"localhostProfile" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1SeccompProfileLocalhostProfile
      , Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1SeccompProfileType
      ]


-- | Construct a value of type 'V1SeccompProfile' (by applying it's required fields, if any)
mkV1SeccompProfile
  :: Text -- ^ 'v1SeccompProfileType': type indicates which kind of seccomp profile will be applied. Valid options are:  Localhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied.
  -> V1SeccompProfile
mkV1SeccompProfile :: Text -> V1SeccompProfile
mkV1SeccompProfile Text
v1SeccompProfileType =
  V1SeccompProfile
  { $sel:v1SeccompProfileLocalhostProfile:V1SeccompProfile :: Maybe Text
v1SeccompProfileLocalhostProfile = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1SeccompProfileType:V1SeccompProfile :: Text
v1SeccompProfileType :: Text
v1SeccompProfileType
  }

-- ** V1Secret
-- | V1Secret
-- Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.
data V1Secret = V1Secret
  { V1Secret -> Maybe Text
v1SecretApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1Secret -> Maybe (Map String ByteArray)
v1SecretData :: !(Maybe (Map.Map String ByteArray)) -- ^ "data" - Data contains the secret data. Each key must consist of alphanumeric characters, &#39;-&#39;, &#39;_&#39; or &#39;.&#39;. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4
  , V1Secret -> Maybe Bool
v1SecretImmutable :: !(Maybe Bool) -- ^ "immutable" - Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil.
  , V1Secret -> Maybe Text
v1SecretKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1Secret -> Maybe V1ObjectMeta
v1SecretMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1Secret -> Maybe (Map String Text)
v1SecretStringData :: !(Maybe (Map.Map String Text)) -- ^ "stringData" - stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API.
  , V1Secret -> Maybe Text
v1SecretType :: !(Maybe Text) -- ^ "type" - Used to facilitate programmatic handling of secret data. More info: https://kubernetes.io/docs/concepts/configuration/secret/#secret-types
  } deriving (Int -> V1Secret -> ShowS
[V1Secret] -> ShowS
V1Secret -> String
(Int -> V1Secret -> ShowS)
-> (V1Secret -> String) -> ([V1Secret] -> ShowS) -> Show V1Secret
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1Secret -> ShowS
showsPrec :: Int -> V1Secret -> ShowS
$cshow :: V1Secret -> String
show :: V1Secret -> String
$cshowList :: [V1Secret] -> ShowS
showList :: [V1Secret] -> ShowS
P.Show, V1Secret -> V1Secret -> Bool
(V1Secret -> V1Secret -> Bool)
-> (V1Secret -> V1Secret -> Bool) -> Eq V1Secret
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1Secret -> V1Secret -> Bool
== :: V1Secret -> V1Secret -> Bool
$c/= :: V1Secret -> V1Secret -> Bool
/= :: V1Secret -> V1Secret -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1Secret
instance A.FromJSON V1Secret where
  parseJSON :: Value -> Parser V1Secret
parseJSON = String -> (Object -> Parser V1Secret) -> Value -> Parser V1Secret
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1Secret" ((Object -> Parser V1Secret) -> Value -> Parser V1Secret)
-> (Object -> Parser V1Secret) -> Value -> Parser V1Secret
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe (Map String ByteArray)
-> Maybe Bool
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe (Map String Text)
-> Maybe Text
-> V1Secret
V1Secret
      (Maybe Text
 -> Maybe (Map String ByteArray)
 -> Maybe Bool
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe (Map String Text)
 -> Maybe Text
 -> V1Secret)
-> Parser (Maybe Text)
-> Parser
     (Maybe (Map String ByteArray)
      -> Maybe Bool
      -> Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe (Map String Text)
      -> Maybe Text
      -> V1Secret)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe (Map String ByteArray)
   -> Maybe Bool
   -> Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe (Map String Text)
   -> Maybe Text
   -> V1Secret)
-> Parser (Maybe (Map String ByteArray))
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe (Map String Text)
      -> Maybe Text
      -> V1Secret)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String ByteArray))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"data")
      Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe (Map String Text)
   -> Maybe Text
   -> V1Secret)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe (Map String Text)
      -> Maybe Text
      -> V1Secret)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"immutable")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe (Map String Text)
   -> Maybe Text
   -> V1Secret)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe (Map String Text) -> Maybe Text -> V1Secret)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe (Map String Text) -> Maybe Text -> V1Secret)
-> Parser (Maybe V1ObjectMeta)
-> Parser (Maybe (Map String Text) -> Maybe Text -> V1Secret)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (Maybe (Map String Text) -> Maybe Text -> V1Secret)
-> Parser (Maybe (Map String Text))
-> Parser (Maybe Text -> V1Secret)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String Text))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"stringData")
      Parser (Maybe Text -> V1Secret)
-> Parser (Maybe Text) -> Parser V1Secret
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"type")

-- | ToJSON V1Secret
instance A.ToJSON V1Secret where
  toJSON :: V1Secret -> Value
toJSON V1Secret {Maybe Bool
Maybe (Map String Text)
Maybe (Map String ByteArray)
Maybe Text
Maybe V1ObjectMeta
$sel:v1SecretApiVersion:V1Secret :: V1Secret -> Maybe Text
$sel:v1SecretData:V1Secret :: V1Secret -> Maybe (Map String ByteArray)
$sel:v1SecretImmutable:V1Secret :: V1Secret -> Maybe Bool
$sel:v1SecretKind:V1Secret :: V1Secret -> Maybe Text
$sel:v1SecretMetadata:V1Secret :: V1Secret -> Maybe V1ObjectMeta
$sel:v1SecretStringData:V1Secret :: V1Secret -> Maybe (Map String Text)
$sel:v1SecretType:V1Secret :: V1Secret -> Maybe Text
v1SecretApiVersion :: Maybe Text
v1SecretData :: Maybe (Map String ByteArray)
v1SecretImmutable :: Maybe Bool
v1SecretKind :: Maybe Text
v1SecretMetadata :: Maybe V1ObjectMeta
v1SecretStringData :: Maybe (Map String Text)
v1SecretType :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1SecretApiVersion
      , Key
"data" Key -> Maybe (Map String ByteArray) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String ByteArray)
v1SecretData
      , Key
"immutable" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1SecretImmutable
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1SecretKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1SecretMetadata
      , Key
"stringData" Key -> Maybe (Map String Text) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Text)
v1SecretStringData
      , Key
"type" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1SecretType
      ]


-- | Construct a value of type 'V1Secret' (by applying it's required fields, if any)
mkV1Secret
  :: V1Secret
mkV1Secret :: V1Secret
mkV1Secret =
  V1Secret
  { $sel:v1SecretApiVersion:V1Secret :: Maybe Text
v1SecretApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1SecretData:V1Secret :: Maybe (Map String ByteArray)
v1SecretData = Maybe (Map String ByteArray)
forall a. Maybe a
Nothing
  , $sel:v1SecretImmutable:V1Secret :: Maybe Bool
v1SecretImmutable = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1SecretKind:V1Secret :: Maybe Text
v1SecretKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1SecretMetadata:V1Secret :: Maybe V1ObjectMeta
v1SecretMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1SecretStringData:V1Secret :: Maybe (Map String Text)
v1SecretStringData = Maybe (Map String Text)
forall a. Maybe a
Nothing
  , $sel:v1SecretType:V1Secret :: Maybe Text
v1SecretType = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1SecretEnvSource
-- | V1SecretEnvSource
-- SecretEnvSource selects a Secret to populate the environment variables with.  The contents of the target Secret's Data field will represent the key-value pairs as environment variables.
data V1SecretEnvSource = V1SecretEnvSource
  { V1SecretEnvSource -> Maybe Text
v1SecretEnvSourceName :: !(Maybe Text) -- ^ "name" - Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  , V1SecretEnvSource -> Maybe Bool
v1SecretEnvSourceOptional :: !(Maybe Bool) -- ^ "optional" - Specify whether the Secret must be defined
  } deriving (Int -> V1SecretEnvSource -> ShowS
[V1SecretEnvSource] -> ShowS
V1SecretEnvSource -> String
(Int -> V1SecretEnvSource -> ShowS)
-> (V1SecretEnvSource -> String)
-> ([V1SecretEnvSource] -> ShowS)
-> Show V1SecretEnvSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1SecretEnvSource -> ShowS
showsPrec :: Int -> V1SecretEnvSource -> ShowS
$cshow :: V1SecretEnvSource -> String
show :: V1SecretEnvSource -> String
$cshowList :: [V1SecretEnvSource] -> ShowS
showList :: [V1SecretEnvSource] -> ShowS
P.Show, V1SecretEnvSource -> V1SecretEnvSource -> Bool
(V1SecretEnvSource -> V1SecretEnvSource -> Bool)
-> (V1SecretEnvSource -> V1SecretEnvSource -> Bool)
-> Eq V1SecretEnvSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1SecretEnvSource -> V1SecretEnvSource -> Bool
== :: V1SecretEnvSource -> V1SecretEnvSource -> Bool
$c/= :: V1SecretEnvSource -> V1SecretEnvSource -> Bool
/= :: V1SecretEnvSource -> V1SecretEnvSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1SecretEnvSource
instance A.FromJSON V1SecretEnvSource where
  parseJSON :: Value -> Parser V1SecretEnvSource
parseJSON = String
-> (Object -> Parser V1SecretEnvSource)
-> Value
-> Parser V1SecretEnvSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1SecretEnvSource" ((Object -> Parser V1SecretEnvSource)
 -> Value -> Parser V1SecretEnvSource)
-> (Object -> Parser V1SecretEnvSource)
-> Value
-> Parser V1SecretEnvSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Maybe Bool -> V1SecretEnvSource
V1SecretEnvSource
      (Maybe Text -> Maybe Bool -> V1SecretEnvSource)
-> Parser (Maybe Text) -> Parser (Maybe Bool -> V1SecretEnvSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"name")
      Parser (Maybe Bool -> V1SecretEnvSource)
-> Parser (Maybe Bool) -> Parser V1SecretEnvSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"optional")

-- | ToJSON V1SecretEnvSource
instance A.ToJSON V1SecretEnvSource where
  toJSON :: V1SecretEnvSource -> Value
toJSON V1SecretEnvSource {Maybe Bool
Maybe Text
$sel:v1SecretEnvSourceName:V1SecretEnvSource :: V1SecretEnvSource -> Maybe Text
$sel:v1SecretEnvSourceOptional:V1SecretEnvSource :: V1SecretEnvSource -> Maybe Bool
v1SecretEnvSourceName :: Maybe Text
v1SecretEnvSourceOptional :: Maybe Bool
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"name" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1SecretEnvSourceName
      , Key
"optional" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1SecretEnvSourceOptional
      ]


-- | Construct a value of type 'V1SecretEnvSource' (by applying it's required fields, if any)
mkV1SecretEnvSource
  :: V1SecretEnvSource
mkV1SecretEnvSource :: V1SecretEnvSource
mkV1SecretEnvSource =
  V1SecretEnvSource
  { $sel:v1SecretEnvSourceName:V1SecretEnvSource :: Maybe Text
v1SecretEnvSourceName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1SecretEnvSourceOptional:V1SecretEnvSource :: Maybe Bool
v1SecretEnvSourceOptional = Maybe Bool
forall a. Maybe a
Nothing
  }

-- ** V1SecretKeySelector
-- | V1SecretKeySelector
-- SecretKeySelector selects a key of a Secret.
data V1SecretKeySelector = V1SecretKeySelector
  { V1SecretKeySelector -> Text
v1SecretKeySelectorKey :: !(Text) -- ^ /Required/ "key" - The key of the secret to select from.  Must be a valid secret key.
  , V1SecretKeySelector -> Maybe Text
v1SecretKeySelectorName :: !(Maybe Text) -- ^ "name" - Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  , V1SecretKeySelector -> Maybe Bool
v1SecretKeySelectorOptional :: !(Maybe Bool) -- ^ "optional" - Specify whether the Secret or its key must be defined
  } deriving (Int -> V1SecretKeySelector -> ShowS
[V1SecretKeySelector] -> ShowS
V1SecretKeySelector -> String
(Int -> V1SecretKeySelector -> ShowS)
-> (V1SecretKeySelector -> String)
-> ([V1SecretKeySelector] -> ShowS)
-> Show V1SecretKeySelector
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1SecretKeySelector -> ShowS
showsPrec :: Int -> V1SecretKeySelector -> ShowS
$cshow :: V1SecretKeySelector -> String
show :: V1SecretKeySelector -> String
$cshowList :: [V1SecretKeySelector] -> ShowS
showList :: [V1SecretKeySelector] -> ShowS
P.Show, V1SecretKeySelector -> V1SecretKeySelector -> Bool
(V1SecretKeySelector -> V1SecretKeySelector -> Bool)
-> (V1SecretKeySelector -> V1SecretKeySelector -> Bool)
-> Eq V1SecretKeySelector
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1SecretKeySelector -> V1SecretKeySelector -> Bool
== :: V1SecretKeySelector -> V1SecretKeySelector -> Bool
$c/= :: V1SecretKeySelector -> V1SecretKeySelector -> Bool
/= :: V1SecretKeySelector -> V1SecretKeySelector -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1SecretKeySelector
instance A.FromJSON V1SecretKeySelector where
  parseJSON :: Value -> Parser V1SecretKeySelector
parseJSON = String
-> (Object -> Parser V1SecretKeySelector)
-> Value
-> Parser V1SecretKeySelector
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1SecretKeySelector" ((Object -> Parser V1SecretKeySelector)
 -> Value -> Parser V1SecretKeySelector)
-> (Object -> Parser V1SecretKeySelector)
-> Value
-> Parser V1SecretKeySelector
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Maybe Text -> Maybe Bool -> V1SecretKeySelector
V1SecretKeySelector
      (Text -> Maybe Text -> Maybe Bool -> V1SecretKeySelector)
-> Parser Text
-> Parser (Maybe Text -> Maybe Bool -> V1SecretKeySelector)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"key")
      Parser (Maybe Text -> Maybe Bool -> V1SecretKeySelector)
-> Parser (Maybe Text)
-> Parser (Maybe Bool -> V1SecretKeySelector)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"name")
      Parser (Maybe Bool -> V1SecretKeySelector)
-> Parser (Maybe Bool) -> Parser V1SecretKeySelector
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"optional")

-- | ToJSON V1SecretKeySelector
instance A.ToJSON V1SecretKeySelector where
  toJSON :: V1SecretKeySelector -> Value
toJSON V1SecretKeySelector {Maybe Bool
Maybe Text
Text
$sel:v1SecretKeySelectorKey:V1SecretKeySelector :: V1SecretKeySelector -> Text
$sel:v1SecretKeySelectorName:V1SecretKeySelector :: V1SecretKeySelector -> Maybe Text
$sel:v1SecretKeySelectorOptional:V1SecretKeySelector :: V1SecretKeySelector -> Maybe Bool
v1SecretKeySelectorKey :: Text
v1SecretKeySelectorName :: Maybe Text
v1SecretKeySelectorOptional :: Maybe Bool
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"key" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1SecretKeySelectorKey
      , Key
"name" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1SecretKeySelectorName
      , Key
"optional" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1SecretKeySelectorOptional
      ]


-- | Construct a value of type 'V1SecretKeySelector' (by applying it's required fields, if any)
mkV1SecretKeySelector
  :: Text -- ^ 'v1SecretKeySelectorKey': The key of the secret to select from.  Must be a valid secret key.
  -> V1SecretKeySelector
mkV1SecretKeySelector :: Text -> V1SecretKeySelector
mkV1SecretKeySelector Text
v1SecretKeySelectorKey =
  V1SecretKeySelector
  { Text
$sel:v1SecretKeySelectorKey:V1SecretKeySelector :: Text
v1SecretKeySelectorKey :: Text
v1SecretKeySelectorKey
  , $sel:v1SecretKeySelectorName:V1SecretKeySelector :: Maybe Text
v1SecretKeySelectorName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1SecretKeySelectorOptional:V1SecretKeySelector :: Maybe Bool
v1SecretKeySelectorOptional = Maybe Bool
forall a. Maybe a
Nothing
  }

-- ** V1SecretList
-- | V1SecretList
-- SecretList is a list of Secret.
data V1SecretList = V1SecretList
  { V1SecretList -> Maybe Text
v1SecretListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1SecretList -> [V1Secret]
v1SecretListItems :: !([V1Secret]) -- ^ /Required/ "items" - Items is a list of secret objects. More info: https://kubernetes.io/docs/concepts/configuration/secret
  , V1SecretList -> Maybe Text
v1SecretListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1SecretList -> Maybe V1ListMeta
v1SecretListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1SecretList -> ShowS
[V1SecretList] -> ShowS
V1SecretList -> String
(Int -> V1SecretList -> ShowS)
-> (V1SecretList -> String)
-> ([V1SecretList] -> ShowS)
-> Show V1SecretList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1SecretList -> ShowS
showsPrec :: Int -> V1SecretList -> ShowS
$cshow :: V1SecretList -> String
show :: V1SecretList -> String
$cshowList :: [V1SecretList] -> ShowS
showList :: [V1SecretList] -> ShowS
P.Show, V1SecretList -> V1SecretList -> Bool
(V1SecretList -> V1SecretList -> Bool)
-> (V1SecretList -> V1SecretList -> Bool) -> Eq V1SecretList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1SecretList -> V1SecretList -> Bool
== :: V1SecretList -> V1SecretList -> Bool
$c/= :: V1SecretList -> V1SecretList -> Bool
/= :: V1SecretList -> V1SecretList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1SecretList
instance A.FromJSON V1SecretList where
  parseJSON :: Value -> Parser V1SecretList
parseJSON = String
-> (Object -> Parser V1SecretList) -> Value -> Parser V1SecretList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1SecretList" ((Object -> Parser V1SecretList) -> Value -> Parser V1SecretList)
-> (Object -> Parser V1SecretList) -> Value -> Parser V1SecretList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1Secret] -> Maybe Text -> Maybe V1ListMeta -> V1SecretList
V1SecretList
      (Maybe Text
 -> [V1Secret] -> Maybe Text -> Maybe V1ListMeta -> V1SecretList)
-> Parser (Maybe Text)
-> Parser
     ([V1Secret] -> Maybe Text -> Maybe V1ListMeta -> V1SecretList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1Secret] -> Maybe Text -> Maybe V1ListMeta -> V1SecretList)
-> Parser [V1Secret]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1SecretList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1Secret]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1SecretList)
-> Parser (Maybe Text) -> Parser (Maybe V1ListMeta -> V1SecretList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1SecretList)
-> Parser (Maybe V1ListMeta) -> Parser V1SecretList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1SecretList
instance A.ToJSON V1SecretList where
  toJSON :: V1SecretList -> Value
toJSON V1SecretList {[V1Secret]
Maybe Text
Maybe V1ListMeta
$sel:v1SecretListApiVersion:V1SecretList :: V1SecretList -> Maybe Text
$sel:v1SecretListItems:V1SecretList :: V1SecretList -> [V1Secret]
$sel:v1SecretListKind:V1SecretList :: V1SecretList -> Maybe Text
$sel:v1SecretListMetadata:V1SecretList :: V1SecretList -> Maybe V1ListMeta
v1SecretListApiVersion :: Maybe Text
v1SecretListItems :: [V1Secret]
v1SecretListKind :: Maybe Text
v1SecretListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1SecretListApiVersion
      , Key
"items" Key -> [V1Secret] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1Secret]
v1SecretListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1SecretListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1SecretListMetadata
      ]


-- | Construct a value of type 'V1SecretList' (by applying it's required fields, if any)
mkV1SecretList
  :: [V1Secret] -- ^ 'v1SecretListItems': Items is a list of secret objects. More info: https://kubernetes.io/docs/concepts/configuration/secret
  -> V1SecretList
mkV1SecretList :: [V1Secret] -> V1SecretList
mkV1SecretList [V1Secret]
v1SecretListItems =
  V1SecretList
  { $sel:v1SecretListApiVersion:V1SecretList :: Maybe Text
v1SecretListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1Secret]
$sel:v1SecretListItems:V1SecretList :: [V1Secret]
v1SecretListItems :: [V1Secret]
v1SecretListItems
  , $sel:v1SecretListKind:V1SecretList :: Maybe Text
v1SecretListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1SecretListMetadata:V1SecretList :: Maybe V1ListMeta
v1SecretListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1SecretProjection
-- | V1SecretProjection
-- Adapts a secret into a projected volume.  The contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode.
data V1SecretProjection = V1SecretProjection
  { V1SecretProjection -> Maybe [V1KeyToPath]
v1SecretProjectionItems :: !(Maybe [V1KeyToPath]) -- ^ "items" - items if unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the &#39;..&#39; path or start with &#39;..&#39;.
  , V1SecretProjection -> Maybe Text
v1SecretProjectionName :: !(Maybe Text) -- ^ "name" - Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  , V1SecretProjection -> Maybe Bool
v1SecretProjectionOptional :: !(Maybe Bool) -- ^ "optional" - optional field specify whether the Secret or its key must be defined
  } deriving (Int -> V1SecretProjection -> ShowS
[V1SecretProjection] -> ShowS
V1SecretProjection -> String
(Int -> V1SecretProjection -> ShowS)
-> (V1SecretProjection -> String)
-> ([V1SecretProjection] -> ShowS)
-> Show V1SecretProjection
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1SecretProjection -> ShowS
showsPrec :: Int -> V1SecretProjection -> ShowS
$cshow :: V1SecretProjection -> String
show :: V1SecretProjection -> String
$cshowList :: [V1SecretProjection] -> ShowS
showList :: [V1SecretProjection] -> ShowS
P.Show, V1SecretProjection -> V1SecretProjection -> Bool
(V1SecretProjection -> V1SecretProjection -> Bool)
-> (V1SecretProjection -> V1SecretProjection -> Bool)
-> Eq V1SecretProjection
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1SecretProjection -> V1SecretProjection -> Bool
== :: V1SecretProjection -> V1SecretProjection -> Bool
$c/= :: V1SecretProjection -> V1SecretProjection -> Bool
/= :: V1SecretProjection -> V1SecretProjection -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1SecretProjection
instance A.FromJSON V1SecretProjection where
  parseJSON :: Value -> Parser V1SecretProjection
parseJSON = String
-> (Object -> Parser V1SecretProjection)
-> Value
-> Parser V1SecretProjection
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1SecretProjection" ((Object -> Parser V1SecretProjection)
 -> Value -> Parser V1SecretProjection)
-> (Object -> Parser V1SecretProjection)
-> Value
-> Parser V1SecretProjection
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1KeyToPath]
-> Maybe Text -> Maybe Bool -> V1SecretProjection
V1SecretProjection
      (Maybe [V1KeyToPath]
 -> Maybe Text -> Maybe Bool -> V1SecretProjection)
-> Parser (Maybe [V1KeyToPath])
-> Parser (Maybe Text -> Maybe Bool -> V1SecretProjection)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1KeyToPath])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"items")
      Parser (Maybe Text -> Maybe Bool -> V1SecretProjection)
-> Parser (Maybe Text) -> Parser (Maybe Bool -> V1SecretProjection)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"name")
      Parser (Maybe Bool -> V1SecretProjection)
-> Parser (Maybe Bool) -> Parser V1SecretProjection
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"optional")

-- | ToJSON V1SecretProjection
instance A.ToJSON V1SecretProjection where
  toJSON :: V1SecretProjection -> Value
toJSON V1SecretProjection {Maybe Bool
Maybe [V1KeyToPath]
Maybe Text
$sel:v1SecretProjectionItems:V1SecretProjection :: V1SecretProjection -> Maybe [V1KeyToPath]
$sel:v1SecretProjectionName:V1SecretProjection :: V1SecretProjection -> Maybe Text
$sel:v1SecretProjectionOptional:V1SecretProjection :: V1SecretProjection -> Maybe Bool
v1SecretProjectionItems :: Maybe [V1KeyToPath]
v1SecretProjectionName :: Maybe Text
v1SecretProjectionOptional :: Maybe Bool
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"items" Key -> Maybe [V1KeyToPath] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1KeyToPath]
v1SecretProjectionItems
      , Key
"name" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1SecretProjectionName
      , Key
"optional" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1SecretProjectionOptional
      ]


-- | Construct a value of type 'V1SecretProjection' (by applying it's required fields, if any)
mkV1SecretProjection
  :: V1SecretProjection
mkV1SecretProjection :: V1SecretProjection
mkV1SecretProjection =
  V1SecretProjection
  { $sel:v1SecretProjectionItems:V1SecretProjection :: Maybe [V1KeyToPath]
v1SecretProjectionItems = Maybe [V1KeyToPath]
forall a. Maybe a
Nothing
  , $sel:v1SecretProjectionName:V1SecretProjection :: Maybe Text
v1SecretProjectionName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1SecretProjectionOptional:V1SecretProjection :: Maybe Bool
v1SecretProjectionOptional = Maybe Bool
forall a. Maybe a
Nothing
  }

-- ** V1SecretReference
-- | V1SecretReference
-- SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace
data V1SecretReference = V1SecretReference
  { V1SecretReference -> Maybe Text
v1SecretReferenceName :: !(Maybe Text) -- ^ "name" - name is unique within a namespace to reference a secret resource.
  , V1SecretReference -> Maybe Text
v1SecretReferenceNamespace :: !(Maybe Text) -- ^ "namespace" - namespace defines the space within which the secret name must be unique.
  } deriving (Int -> V1SecretReference -> ShowS
[V1SecretReference] -> ShowS
V1SecretReference -> String
(Int -> V1SecretReference -> ShowS)
-> (V1SecretReference -> String)
-> ([V1SecretReference] -> ShowS)
-> Show V1SecretReference
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1SecretReference -> ShowS
showsPrec :: Int -> V1SecretReference -> ShowS
$cshow :: V1SecretReference -> String
show :: V1SecretReference -> String
$cshowList :: [V1SecretReference] -> ShowS
showList :: [V1SecretReference] -> ShowS
P.Show, V1SecretReference -> V1SecretReference -> Bool
(V1SecretReference -> V1SecretReference -> Bool)
-> (V1SecretReference -> V1SecretReference -> Bool)
-> Eq V1SecretReference
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1SecretReference -> V1SecretReference -> Bool
== :: V1SecretReference -> V1SecretReference -> Bool
$c/= :: V1SecretReference -> V1SecretReference -> Bool
/= :: V1SecretReference -> V1SecretReference -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1SecretReference
instance A.FromJSON V1SecretReference where
  parseJSON :: Value -> Parser V1SecretReference
parseJSON = String
-> (Object -> Parser V1SecretReference)
-> Value
-> Parser V1SecretReference
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1SecretReference" ((Object -> Parser V1SecretReference)
 -> Value -> Parser V1SecretReference)
-> (Object -> Parser V1SecretReference)
-> Value
-> Parser V1SecretReference
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Maybe Text -> V1SecretReference
V1SecretReference
      (Maybe Text -> Maybe Text -> V1SecretReference)
-> Parser (Maybe Text) -> Parser (Maybe Text -> V1SecretReference)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"name")
      Parser (Maybe Text -> V1SecretReference)
-> Parser (Maybe Text) -> Parser V1SecretReference
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"namespace")

-- | ToJSON V1SecretReference
instance A.ToJSON V1SecretReference where
  toJSON :: V1SecretReference -> Value
toJSON V1SecretReference {Maybe Text
$sel:v1SecretReferenceName:V1SecretReference :: V1SecretReference -> Maybe Text
$sel:v1SecretReferenceNamespace:V1SecretReference :: V1SecretReference -> Maybe Text
v1SecretReferenceName :: Maybe Text
v1SecretReferenceNamespace :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"name" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1SecretReferenceName
      , Key
"namespace" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1SecretReferenceNamespace
      ]


-- | Construct a value of type 'V1SecretReference' (by applying it's required fields, if any)
mkV1SecretReference
  :: V1SecretReference
mkV1SecretReference :: V1SecretReference
mkV1SecretReference =
  V1SecretReference
  { $sel:v1SecretReferenceName:V1SecretReference :: Maybe Text
v1SecretReferenceName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1SecretReferenceNamespace:V1SecretReference :: Maybe Text
v1SecretReferenceNamespace = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1SecretVolumeSource
-- | V1SecretVolumeSource
-- Adapts a Secret into a volume.  The contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling.
data V1SecretVolumeSource = V1SecretVolumeSource
  { V1SecretVolumeSource -> Maybe Int
v1SecretVolumeSourceDefaultMode :: !(Maybe Int) -- ^ "defaultMode" - defaultMode is Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
  , V1SecretVolumeSource -> Maybe [V1KeyToPath]
v1SecretVolumeSourceItems :: !(Maybe [V1KeyToPath]) -- ^ "items" - items If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the &#39;..&#39; path or start with &#39;..&#39;.
  , V1SecretVolumeSource -> Maybe Bool
v1SecretVolumeSourceOptional :: !(Maybe Bool) -- ^ "optional" - optional field specify whether the Secret or its keys must be defined
  , V1SecretVolumeSource -> Maybe Text
v1SecretVolumeSourceSecretName :: !(Maybe Text) -- ^ "secretName" - secretName is the name of the secret in the pod&#39;s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
  } deriving (Int -> V1SecretVolumeSource -> ShowS
[V1SecretVolumeSource] -> ShowS
V1SecretVolumeSource -> String
(Int -> V1SecretVolumeSource -> ShowS)
-> (V1SecretVolumeSource -> String)
-> ([V1SecretVolumeSource] -> ShowS)
-> Show V1SecretVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1SecretVolumeSource -> ShowS
showsPrec :: Int -> V1SecretVolumeSource -> ShowS
$cshow :: V1SecretVolumeSource -> String
show :: V1SecretVolumeSource -> String
$cshowList :: [V1SecretVolumeSource] -> ShowS
showList :: [V1SecretVolumeSource] -> ShowS
P.Show, V1SecretVolumeSource -> V1SecretVolumeSource -> Bool
(V1SecretVolumeSource -> V1SecretVolumeSource -> Bool)
-> (V1SecretVolumeSource -> V1SecretVolumeSource -> Bool)
-> Eq V1SecretVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1SecretVolumeSource -> V1SecretVolumeSource -> Bool
== :: V1SecretVolumeSource -> V1SecretVolumeSource -> Bool
$c/= :: V1SecretVolumeSource -> V1SecretVolumeSource -> Bool
/= :: V1SecretVolumeSource -> V1SecretVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1SecretVolumeSource
instance A.FromJSON V1SecretVolumeSource where
  parseJSON :: Value -> Parser V1SecretVolumeSource
parseJSON = String
-> (Object -> Parser V1SecretVolumeSource)
-> Value
-> Parser V1SecretVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1SecretVolumeSource" ((Object -> Parser V1SecretVolumeSource)
 -> Value -> Parser V1SecretVolumeSource)
-> (Object -> Parser V1SecretVolumeSource)
-> Value
-> Parser V1SecretVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Int
-> Maybe [V1KeyToPath]
-> Maybe Bool
-> Maybe Text
-> V1SecretVolumeSource
V1SecretVolumeSource
      (Maybe Int
 -> Maybe [V1KeyToPath]
 -> Maybe Bool
 -> Maybe Text
 -> V1SecretVolumeSource)
-> Parser (Maybe Int)
-> Parser
     (Maybe [V1KeyToPath]
      -> Maybe Bool -> Maybe Text -> V1SecretVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"defaultMode")
      Parser
  (Maybe [V1KeyToPath]
   -> Maybe Bool -> Maybe Text -> V1SecretVolumeSource)
-> Parser (Maybe [V1KeyToPath])
-> Parser (Maybe Bool -> Maybe Text -> V1SecretVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1KeyToPath])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"items")
      Parser (Maybe Bool -> Maybe Text -> V1SecretVolumeSource)
-> Parser (Maybe Bool)
-> Parser (Maybe Text -> V1SecretVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"optional")
      Parser (Maybe Text -> V1SecretVolumeSource)
-> Parser (Maybe Text) -> Parser V1SecretVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"secretName")

-- | ToJSON V1SecretVolumeSource
instance A.ToJSON V1SecretVolumeSource where
  toJSON :: V1SecretVolumeSource -> Value
toJSON V1SecretVolumeSource {Maybe Bool
Maybe Int
Maybe [V1KeyToPath]
Maybe Text
$sel:v1SecretVolumeSourceDefaultMode:V1SecretVolumeSource :: V1SecretVolumeSource -> Maybe Int
$sel:v1SecretVolumeSourceItems:V1SecretVolumeSource :: V1SecretVolumeSource -> Maybe [V1KeyToPath]
$sel:v1SecretVolumeSourceOptional:V1SecretVolumeSource :: V1SecretVolumeSource -> Maybe Bool
$sel:v1SecretVolumeSourceSecretName:V1SecretVolumeSource :: V1SecretVolumeSource -> Maybe Text
v1SecretVolumeSourceDefaultMode :: Maybe Int
v1SecretVolumeSourceItems :: Maybe [V1KeyToPath]
v1SecretVolumeSourceOptional :: Maybe Bool
v1SecretVolumeSourceSecretName :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"defaultMode" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1SecretVolumeSourceDefaultMode
      , Key
"items" Key -> Maybe [V1KeyToPath] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1KeyToPath]
v1SecretVolumeSourceItems
      , Key
"optional" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1SecretVolumeSourceOptional
      , Key
"secretName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1SecretVolumeSourceSecretName
      ]


-- | Construct a value of type 'V1SecretVolumeSource' (by applying it's required fields, if any)
mkV1SecretVolumeSource
  :: V1SecretVolumeSource
mkV1SecretVolumeSource :: V1SecretVolumeSource
mkV1SecretVolumeSource =
  V1SecretVolumeSource
  { $sel:v1SecretVolumeSourceDefaultMode:V1SecretVolumeSource :: Maybe Int
v1SecretVolumeSourceDefaultMode = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1SecretVolumeSourceItems:V1SecretVolumeSource :: Maybe [V1KeyToPath]
v1SecretVolumeSourceItems = Maybe [V1KeyToPath]
forall a. Maybe a
Nothing
  , $sel:v1SecretVolumeSourceOptional:V1SecretVolumeSource :: Maybe Bool
v1SecretVolumeSourceOptional = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1SecretVolumeSourceSecretName:V1SecretVolumeSource :: Maybe Text
v1SecretVolumeSourceSecretName = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1SecurityContext
-- | V1SecurityContext
-- SecurityContext holds security configuration that will be applied to a container. Some fields are present in both SecurityContext and PodSecurityContext.  When both are set, the values in SecurityContext take precedence.
data V1SecurityContext = V1SecurityContext
  { V1SecurityContext -> Maybe Bool
v1SecurityContextAllowPrivilegeEscalation :: !(Maybe Bool) -- ^ "allowPrivilegeEscalation" - AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN Note that this field cannot be set when spec.os.name is windows.
  , V1SecurityContext -> Maybe V1AppArmorProfile
v1SecurityContextAppArmorProfile :: !(Maybe V1AppArmorProfile) -- ^ "appArmorProfile"
  , V1SecurityContext -> Maybe V1Capabilities
v1SecurityContextCapabilities :: !(Maybe V1Capabilities) -- ^ "capabilities"
  , V1SecurityContext -> Maybe Bool
v1SecurityContextPrivileged :: !(Maybe Bool) -- ^ "privileged" - Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. Note that this field cannot be set when spec.os.name is windows.
  , V1SecurityContext -> Maybe Text
v1SecurityContextProcMount :: !(Maybe Text) -- ^ "procMount" - procMount denotes the type of proc mount to use for the containers. The default value is Default which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. Note that this field cannot be set when spec.os.name is windows.
  , V1SecurityContext -> Maybe Bool
v1SecurityContextReadOnlyRootFilesystem :: !(Maybe Bool) -- ^ "readOnlyRootFilesystem" - Whether this container has a read-only root filesystem. Default is false. Note that this field cannot be set when spec.os.name is windows.
  , V1SecurityContext -> Maybe Integer
v1SecurityContextRunAsGroup :: !(Maybe Integer) -- ^ "runAsGroup" - The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext.  If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.
  , V1SecurityContext -> Maybe Bool
v1SecurityContextRunAsNonRoot :: !(Maybe Bool) -- ^ "runAsNonRoot" - Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext.  If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
  , V1SecurityContext -> Maybe Integer
v1SecurityContextRunAsUser :: !(Maybe Integer) -- ^ "runAsUser" - The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext.  If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.
  , V1SecurityContext -> Maybe V1SELinuxOptions
v1SecurityContextSeLinuxOptions :: !(Maybe V1SELinuxOptions) -- ^ "seLinuxOptions"
  , V1SecurityContext -> Maybe V1SeccompProfile
v1SecurityContextSeccompProfile :: !(Maybe V1SeccompProfile) -- ^ "seccompProfile"
  , V1SecurityContext -> Maybe V1WindowsSecurityContextOptions
v1SecurityContextWindowsOptions :: !(Maybe V1WindowsSecurityContextOptions) -- ^ "windowsOptions"
  } deriving (Int -> V1SecurityContext -> ShowS
[V1SecurityContext] -> ShowS
V1SecurityContext -> String
(Int -> V1SecurityContext -> ShowS)
-> (V1SecurityContext -> String)
-> ([V1SecurityContext] -> ShowS)
-> Show V1SecurityContext
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1SecurityContext -> ShowS
showsPrec :: Int -> V1SecurityContext -> ShowS
$cshow :: V1SecurityContext -> String
show :: V1SecurityContext -> String
$cshowList :: [V1SecurityContext] -> ShowS
showList :: [V1SecurityContext] -> ShowS
P.Show, V1SecurityContext -> V1SecurityContext -> Bool
(V1SecurityContext -> V1SecurityContext -> Bool)
-> (V1SecurityContext -> V1SecurityContext -> Bool)
-> Eq V1SecurityContext
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1SecurityContext -> V1SecurityContext -> Bool
== :: V1SecurityContext -> V1SecurityContext -> Bool
$c/= :: V1SecurityContext -> V1SecurityContext -> Bool
/= :: V1SecurityContext -> V1SecurityContext -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1SecurityContext
instance A.FromJSON V1SecurityContext where
  parseJSON :: Value -> Parser V1SecurityContext
parseJSON = String
-> (Object -> Parser V1SecurityContext)
-> Value
-> Parser V1SecurityContext
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1SecurityContext" ((Object -> Parser V1SecurityContext)
 -> Value -> Parser V1SecurityContext)
-> (Object -> Parser V1SecurityContext)
-> Value
-> Parser V1SecurityContext
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Bool
-> Maybe V1AppArmorProfile
-> Maybe V1Capabilities
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Integer
-> Maybe Bool
-> Maybe Integer
-> Maybe V1SELinuxOptions
-> Maybe V1SeccompProfile
-> Maybe V1WindowsSecurityContextOptions
-> V1SecurityContext
V1SecurityContext
      (Maybe Bool
 -> Maybe V1AppArmorProfile
 -> Maybe V1Capabilities
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Integer
 -> Maybe Bool
 -> Maybe Integer
 -> Maybe V1SELinuxOptions
 -> Maybe V1SeccompProfile
 -> Maybe V1WindowsSecurityContextOptions
 -> V1SecurityContext)
-> Parser (Maybe Bool)
-> Parser
     (Maybe V1AppArmorProfile
      -> Maybe V1Capabilities
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Integer
      -> Maybe Bool
      -> Maybe Integer
      -> Maybe V1SELinuxOptions
      -> Maybe V1SeccompProfile
      -> Maybe V1WindowsSecurityContextOptions
      -> V1SecurityContext)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"allowPrivilegeEscalation")
      Parser
  (Maybe V1AppArmorProfile
   -> Maybe V1Capabilities
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Integer
   -> Maybe Bool
   -> Maybe Integer
   -> Maybe V1SELinuxOptions
   -> Maybe V1SeccompProfile
   -> Maybe V1WindowsSecurityContextOptions
   -> V1SecurityContext)
-> Parser (Maybe V1AppArmorProfile)
-> Parser
     (Maybe V1Capabilities
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Integer
      -> Maybe Bool
      -> Maybe Integer
      -> Maybe V1SELinuxOptions
      -> Maybe V1SeccompProfile
      -> Maybe V1WindowsSecurityContextOptions
      -> V1SecurityContext)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1AppArmorProfile)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"appArmorProfile")
      Parser
  (Maybe V1Capabilities
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Integer
   -> Maybe Bool
   -> Maybe Integer
   -> Maybe V1SELinuxOptions
   -> Maybe V1SeccompProfile
   -> Maybe V1WindowsSecurityContextOptions
   -> V1SecurityContext)
-> Parser (Maybe V1Capabilities)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Integer
      -> Maybe Bool
      -> Maybe Integer
      -> Maybe V1SELinuxOptions
      -> Maybe V1SeccompProfile
      -> Maybe V1WindowsSecurityContextOptions
      -> V1SecurityContext)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1Capabilities)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"capabilities")
      Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Integer
   -> Maybe Bool
   -> Maybe Integer
   -> Maybe V1SELinuxOptions
   -> Maybe V1SeccompProfile
   -> Maybe V1WindowsSecurityContextOptions
   -> V1SecurityContext)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Integer
      -> Maybe Bool
      -> Maybe Integer
      -> Maybe V1SELinuxOptions
      -> Maybe V1SeccompProfile
      -> Maybe V1WindowsSecurityContextOptions
      -> V1SecurityContext)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"privileged")
      Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Integer
   -> Maybe Bool
   -> Maybe Integer
   -> Maybe V1SELinuxOptions
   -> Maybe V1SeccompProfile
   -> Maybe V1WindowsSecurityContextOptions
   -> V1SecurityContext)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Integer
      -> Maybe Bool
      -> Maybe Integer
      -> Maybe V1SELinuxOptions
      -> Maybe V1SeccompProfile
      -> Maybe V1WindowsSecurityContextOptions
      -> V1SecurityContext)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"procMount")
      Parser
  (Maybe Bool
   -> Maybe Integer
   -> Maybe Bool
   -> Maybe Integer
   -> Maybe V1SELinuxOptions
   -> Maybe V1SeccompProfile
   -> Maybe V1WindowsSecurityContextOptions
   -> V1SecurityContext)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Integer
      -> Maybe Bool
      -> Maybe Integer
      -> Maybe V1SELinuxOptions
      -> Maybe V1SeccompProfile
      -> Maybe V1WindowsSecurityContextOptions
      -> V1SecurityContext)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readOnlyRootFilesystem")
      Parser
  (Maybe Integer
   -> Maybe Bool
   -> Maybe Integer
   -> Maybe V1SELinuxOptions
   -> Maybe V1SeccompProfile
   -> Maybe V1WindowsSecurityContextOptions
   -> V1SecurityContext)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Bool
      -> Maybe Integer
      -> Maybe V1SELinuxOptions
      -> Maybe V1SeccompProfile
      -> Maybe V1WindowsSecurityContextOptions
      -> V1SecurityContext)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"runAsGroup")
      Parser
  (Maybe Bool
   -> Maybe Integer
   -> Maybe V1SELinuxOptions
   -> Maybe V1SeccompProfile
   -> Maybe V1WindowsSecurityContextOptions
   -> V1SecurityContext)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Integer
      -> Maybe V1SELinuxOptions
      -> Maybe V1SeccompProfile
      -> Maybe V1WindowsSecurityContextOptions
      -> V1SecurityContext)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"runAsNonRoot")
      Parser
  (Maybe Integer
   -> Maybe V1SELinuxOptions
   -> Maybe V1SeccompProfile
   -> Maybe V1WindowsSecurityContextOptions
   -> V1SecurityContext)
-> Parser (Maybe Integer)
-> Parser
     (Maybe V1SELinuxOptions
      -> Maybe V1SeccompProfile
      -> Maybe V1WindowsSecurityContextOptions
      -> V1SecurityContext)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"runAsUser")
      Parser
  (Maybe V1SELinuxOptions
   -> Maybe V1SeccompProfile
   -> Maybe V1WindowsSecurityContextOptions
   -> V1SecurityContext)
-> Parser (Maybe V1SELinuxOptions)
-> Parser
     (Maybe V1SeccompProfile
      -> Maybe V1WindowsSecurityContextOptions -> V1SecurityContext)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1SELinuxOptions)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"seLinuxOptions")
      Parser
  (Maybe V1SeccompProfile
   -> Maybe V1WindowsSecurityContextOptions -> V1SecurityContext)
-> Parser (Maybe V1SeccompProfile)
-> Parser
     (Maybe V1WindowsSecurityContextOptions -> V1SecurityContext)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1SeccompProfile)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"seccompProfile")
      Parser (Maybe V1WindowsSecurityContextOptions -> V1SecurityContext)
-> Parser (Maybe V1WindowsSecurityContextOptions)
-> Parser V1SecurityContext
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1WindowsSecurityContextOptions)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"windowsOptions")

-- | ToJSON V1SecurityContext
instance A.ToJSON V1SecurityContext where
  toJSON :: V1SecurityContext -> Value
toJSON V1SecurityContext {Maybe Bool
Maybe Integer
Maybe Text
Maybe V1WindowsSecurityContextOptions
Maybe V1SeccompProfile
Maybe V1SELinuxOptions
Maybe V1Capabilities
Maybe V1AppArmorProfile
$sel:v1SecurityContextAllowPrivilegeEscalation:V1SecurityContext :: V1SecurityContext -> Maybe Bool
$sel:v1SecurityContextAppArmorProfile:V1SecurityContext :: V1SecurityContext -> Maybe V1AppArmorProfile
$sel:v1SecurityContextCapabilities:V1SecurityContext :: V1SecurityContext -> Maybe V1Capabilities
$sel:v1SecurityContextPrivileged:V1SecurityContext :: V1SecurityContext -> Maybe Bool
$sel:v1SecurityContextProcMount:V1SecurityContext :: V1SecurityContext -> Maybe Text
$sel:v1SecurityContextReadOnlyRootFilesystem:V1SecurityContext :: V1SecurityContext -> Maybe Bool
$sel:v1SecurityContextRunAsGroup:V1SecurityContext :: V1SecurityContext -> Maybe Integer
$sel:v1SecurityContextRunAsNonRoot:V1SecurityContext :: V1SecurityContext -> Maybe Bool
$sel:v1SecurityContextRunAsUser:V1SecurityContext :: V1SecurityContext -> Maybe Integer
$sel:v1SecurityContextSeLinuxOptions:V1SecurityContext :: V1SecurityContext -> Maybe V1SELinuxOptions
$sel:v1SecurityContextSeccompProfile:V1SecurityContext :: V1SecurityContext -> Maybe V1SeccompProfile
$sel:v1SecurityContextWindowsOptions:V1SecurityContext :: V1SecurityContext -> Maybe V1WindowsSecurityContextOptions
v1SecurityContextAllowPrivilegeEscalation :: Maybe Bool
v1SecurityContextAppArmorProfile :: Maybe V1AppArmorProfile
v1SecurityContextCapabilities :: Maybe V1Capabilities
v1SecurityContextPrivileged :: Maybe Bool
v1SecurityContextProcMount :: Maybe Text
v1SecurityContextReadOnlyRootFilesystem :: Maybe Bool
v1SecurityContextRunAsGroup :: Maybe Integer
v1SecurityContextRunAsNonRoot :: Maybe Bool
v1SecurityContextRunAsUser :: Maybe Integer
v1SecurityContextSeLinuxOptions :: Maybe V1SELinuxOptions
v1SecurityContextSeccompProfile :: Maybe V1SeccompProfile
v1SecurityContextWindowsOptions :: Maybe V1WindowsSecurityContextOptions
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"allowPrivilegeEscalation" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1SecurityContextAllowPrivilegeEscalation
      , Key
"appArmorProfile" Key -> Maybe V1AppArmorProfile -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1AppArmorProfile
v1SecurityContextAppArmorProfile
      , Key
"capabilities" Key -> Maybe V1Capabilities -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1Capabilities
v1SecurityContextCapabilities
      , Key
"privileged" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1SecurityContextPrivileged
      , Key
"procMount" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1SecurityContextProcMount
      , Key
"readOnlyRootFilesystem" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1SecurityContextReadOnlyRootFilesystem
      , Key
"runAsGroup" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1SecurityContextRunAsGroup
      , Key
"runAsNonRoot" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1SecurityContextRunAsNonRoot
      , Key
"runAsUser" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1SecurityContextRunAsUser
      , Key
"seLinuxOptions" Key -> Maybe V1SELinuxOptions -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1SELinuxOptions
v1SecurityContextSeLinuxOptions
      , Key
"seccompProfile" Key -> Maybe V1SeccompProfile -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1SeccompProfile
v1SecurityContextSeccompProfile
      , Key
"windowsOptions" Key -> Maybe V1WindowsSecurityContextOptions -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1WindowsSecurityContextOptions
v1SecurityContextWindowsOptions
      ]


-- | Construct a value of type 'V1SecurityContext' (by applying it's required fields, if any)
mkV1SecurityContext
  :: V1SecurityContext
mkV1SecurityContext :: V1SecurityContext
mkV1SecurityContext =
  V1SecurityContext
  { $sel:v1SecurityContextAllowPrivilegeEscalation:V1SecurityContext :: Maybe Bool
v1SecurityContextAllowPrivilegeEscalation = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1SecurityContextAppArmorProfile:V1SecurityContext :: Maybe V1AppArmorProfile
v1SecurityContextAppArmorProfile = Maybe V1AppArmorProfile
forall a. Maybe a
Nothing
  , $sel:v1SecurityContextCapabilities:V1SecurityContext :: Maybe V1Capabilities
v1SecurityContextCapabilities = Maybe V1Capabilities
forall a. Maybe a
Nothing
  , $sel:v1SecurityContextPrivileged:V1SecurityContext :: Maybe Bool
v1SecurityContextPrivileged = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1SecurityContextProcMount:V1SecurityContext :: Maybe Text
v1SecurityContextProcMount = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1SecurityContextReadOnlyRootFilesystem:V1SecurityContext :: Maybe Bool
v1SecurityContextReadOnlyRootFilesystem = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1SecurityContextRunAsGroup:V1SecurityContext :: Maybe Integer
v1SecurityContextRunAsGroup = Maybe Integer
forall a. Maybe a
Nothing
  , $sel:v1SecurityContextRunAsNonRoot:V1SecurityContext :: Maybe Bool
v1SecurityContextRunAsNonRoot = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1SecurityContextRunAsUser:V1SecurityContext :: Maybe Integer
v1SecurityContextRunAsUser = Maybe Integer
forall a. Maybe a
Nothing
  , $sel:v1SecurityContextSeLinuxOptions:V1SecurityContext :: Maybe V1SELinuxOptions
v1SecurityContextSeLinuxOptions = Maybe V1SELinuxOptions
forall a. Maybe a
Nothing
  , $sel:v1SecurityContextSeccompProfile:V1SecurityContext :: Maybe V1SeccompProfile
v1SecurityContextSeccompProfile = Maybe V1SeccompProfile
forall a. Maybe a
Nothing
  , $sel:v1SecurityContextWindowsOptions:V1SecurityContext :: Maybe V1WindowsSecurityContextOptions
v1SecurityContextWindowsOptions = Maybe V1WindowsSecurityContextOptions
forall a. Maybe a
Nothing
  }

-- ** V1SelectableField
-- | V1SelectableField
-- SelectableField specifies the JSON path of a field that may be used with field selectors.
data V1SelectableField = V1SelectableField
  { V1SelectableField -> Text
v1SelectableFieldJsonPath :: !(Text) -- ^ /Required/ "jsonPath" - jsonPath is a simple JSON path which is evaluated against each custom resource to produce a field selector value. Only JSON paths without the array notation are allowed. Must point to a field of type string, boolean or integer. Types with enum values and strings with formats are allowed. If jsonPath refers to absent field in a resource, the jsonPath evaluates to an empty string. Must not point to metdata fields. Required.
  } deriving (Int -> V1SelectableField -> ShowS
[V1SelectableField] -> ShowS
V1SelectableField -> String
(Int -> V1SelectableField -> ShowS)
-> (V1SelectableField -> String)
-> ([V1SelectableField] -> ShowS)
-> Show V1SelectableField
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1SelectableField -> ShowS
showsPrec :: Int -> V1SelectableField -> ShowS
$cshow :: V1SelectableField -> String
show :: V1SelectableField -> String
$cshowList :: [V1SelectableField] -> ShowS
showList :: [V1SelectableField] -> ShowS
P.Show, V1SelectableField -> V1SelectableField -> Bool
(V1SelectableField -> V1SelectableField -> Bool)
-> (V1SelectableField -> V1SelectableField -> Bool)
-> Eq V1SelectableField
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1SelectableField -> V1SelectableField -> Bool
== :: V1SelectableField -> V1SelectableField -> Bool
$c/= :: V1SelectableField -> V1SelectableField -> Bool
/= :: V1SelectableField -> V1SelectableField -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1SelectableField
instance A.FromJSON V1SelectableField where
  parseJSON :: Value -> Parser V1SelectableField
parseJSON = String
-> (Object -> Parser V1SelectableField)
-> Value
-> Parser V1SelectableField
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1SelectableField" ((Object -> Parser V1SelectableField)
 -> Value -> Parser V1SelectableField)
-> (Object -> Parser V1SelectableField)
-> Value
-> Parser V1SelectableField
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> V1SelectableField
V1SelectableField
      (Text -> V1SelectableField)
-> Parser Text -> Parser V1SelectableField
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"jsonPath")

-- | ToJSON V1SelectableField
instance A.ToJSON V1SelectableField where
  toJSON :: V1SelectableField -> Value
toJSON V1SelectableField {Text
$sel:v1SelectableFieldJsonPath:V1SelectableField :: V1SelectableField -> Text
v1SelectableFieldJsonPath :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"jsonPath" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1SelectableFieldJsonPath
      ]


-- | Construct a value of type 'V1SelectableField' (by applying it's required fields, if any)
mkV1SelectableField
  :: Text -- ^ 'v1SelectableFieldJsonPath': jsonPath is a simple JSON path which is evaluated against each custom resource to produce a field selector value. Only JSON paths without the array notation are allowed. Must point to a field of type string, boolean or integer. Types with enum values and strings with formats are allowed. If jsonPath refers to absent field in a resource, the jsonPath evaluates to an empty string. Must not point to metdata fields. Required.
  -> V1SelectableField
mkV1SelectableField :: Text -> V1SelectableField
mkV1SelectableField Text
v1SelectableFieldJsonPath =
  V1SelectableField
  { Text
$sel:v1SelectableFieldJsonPath:V1SelectableField :: Text
v1SelectableFieldJsonPath :: Text
v1SelectableFieldJsonPath
  }

-- ** V1SelfSubjectAccessReview
-- | V1SelfSubjectAccessReview
-- SelfSubjectAccessReview checks whether or the current user can perform an action.  Not filling in a spec.namespace means \"in all namespaces\".  Self is a special case, because users should always be able to check whether they can perform an action
data V1SelfSubjectAccessReview = V1SelfSubjectAccessReview
  { V1SelfSubjectAccessReview -> Maybe Text
v1SelfSubjectAccessReviewApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1SelfSubjectAccessReview -> Maybe Text
v1SelfSubjectAccessReviewKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1SelfSubjectAccessReview -> Maybe V1ObjectMeta
v1SelfSubjectAccessReviewMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1SelfSubjectAccessReview -> V1SelfSubjectAccessReviewSpec
v1SelfSubjectAccessReviewSpec :: !(V1SelfSubjectAccessReviewSpec) -- ^ /Required/ "spec"
  , V1SelfSubjectAccessReview -> Maybe V1SubjectAccessReviewStatus
v1SelfSubjectAccessReviewStatus :: !(Maybe V1SubjectAccessReviewStatus) -- ^ "status"
  } deriving (Int -> V1SelfSubjectAccessReview -> ShowS
[V1SelfSubjectAccessReview] -> ShowS
V1SelfSubjectAccessReview -> String
(Int -> V1SelfSubjectAccessReview -> ShowS)
-> (V1SelfSubjectAccessReview -> String)
-> ([V1SelfSubjectAccessReview] -> ShowS)
-> Show V1SelfSubjectAccessReview
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1SelfSubjectAccessReview -> ShowS
showsPrec :: Int -> V1SelfSubjectAccessReview -> ShowS
$cshow :: V1SelfSubjectAccessReview -> String
show :: V1SelfSubjectAccessReview -> String
$cshowList :: [V1SelfSubjectAccessReview] -> ShowS
showList :: [V1SelfSubjectAccessReview] -> ShowS
P.Show, V1SelfSubjectAccessReview -> V1SelfSubjectAccessReview -> Bool
(V1SelfSubjectAccessReview -> V1SelfSubjectAccessReview -> Bool)
-> (V1SelfSubjectAccessReview -> V1SelfSubjectAccessReview -> Bool)
-> Eq V1SelfSubjectAccessReview
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1SelfSubjectAccessReview -> V1SelfSubjectAccessReview -> Bool
== :: V1SelfSubjectAccessReview -> V1SelfSubjectAccessReview -> Bool
$c/= :: V1SelfSubjectAccessReview -> V1SelfSubjectAccessReview -> Bool
/= :: V1SelfSubjectAccessReview -> V1SelfSubjectAccessReview -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1SelfSubjectAccessReview
instance A.FromJSON V1SelfSubjectAccessReview where
  parseJSON :: Value -> Parser V1SelfSubjectAccessReview
parseJSON = String
-> (Object -> Parser V1SelfSubjectAccessReview)
-> Value
-> Parser V1SelfSubjectAccessReview
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1SelfSubjectAccessReview" ((Object -> Parser V1SelfSubjectAccessReview)
 -> Value -> Parser V1SelfSubjectAccessReview)
-> (Object -> Parser V1SelfSubjectAccessReview)
-> Value
-> Parser V1SelfSubjectAccessReview
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> V1SelfSubjectAccessReviewSpec
-> Maybe V1SubjectAccessReviewStatus
-> V1SelfSubjectAccessReview
V1SelfSubjectAccessReview
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> V1SelfSubjectAccessReviewSpec
 -> Maybe V1SubjectAccessReviewStatus
 -> V1SelfSubjectAccessReview)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> V1SelfSubjectAccessReviewSpec
      -> Maybe V1SubjectAccessReviewStatus
      -> V1SelfSubjectAccessReview)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> V1SelfSubjectAccessReviewSpec
   -> Maybe V1SubjectAccessReviewStatus
   -> V1SelfSubjectAccessReview)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> V1SelfSubjectAccessReviewSpec
      -> Maybe V1SubjectAccessReviewStatus
      -> V1SelfSubjectAccessReview)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> V1SelfSubjectAccessReviewSpec
   -> Maybe V1SubjectAccessReviewStatus
   -> V1SelfSubjectAccessReview)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (V1SelfSubjectAccessReviewSpec
      -> Maybe V1SubjectAccessReviewStatus -> V1SelfSubjectAccessReview)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (V1SelfSubjectAccessReviewSpec
   -> Maybe V1SubjectAccessReviewStatus -> V1SelfSubjectAccessReview)
-> Parser V1SelfSubjectAccessReviewSpec
-> Parser
     (Maybe V1SubjectAccessReviewStatus -> V1SelfSubjectAccessReview)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1SelfSubjectAccessReviewSpec
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"spec")
      Parser
  (Maybe V1SubjectAccessReviewStatus -> V1SelfSubjectAccessReview)
-> Parser (Maybe V1SubjectAccessReviewStatus)
-> Parser V1SelfSubjectAccessReview
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1SubjectAccessReviewStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1SelfSubjectAccessReview
instance A.ToJSON V1SelfSubjectAccessReview where
  toJSON :: V1SelfSubjectAccessReview -> Value
toJSON V1SelfSubjectAccessReview {Maybe Text
Maybe V1SubjectAccessReviewStatus
Maybe V1ObjectMeta
V1SelfSubjectAccessReviewSpec
$sel:v1SelfSubjectAccessReviewApiVersion:V1SelfSubjectAccessReview :: V1SelfSubjectAccessReview -> Maybe Text
$sel:v1SelfSubjectAccessReviewKind:V1SelfSubjectAccessReview :: V1SelfSubjectAccessReview -> Maybe Text
$sel:v1SelfSubjectAccessReviewMetadata:V1SelfSubjectAccessReview :: V1SelfSubjectAccessReview -> Maybe V1ObjectMeta
$sel:v1SelfSubjectAccessReviewSpec:V1SelfSubjectAccessReview :: V1SelfSubjectAccessReview -> V1SelfSubjectAccessReviewSpec
$sel:v1SelfSubjectAccessReviewStatus:V1SelfSubjectAccessReview :: V1SelfSubjectAccessReview -> Maybe V1SubjectAccessReviewStatus
v1SelfSubjectAccessReviewApiVersion :: Maybe Text
v1SelfSubjectAccessReviewKind :: Maybe Text
v1SelfSubjectAccessReviewMetadata :: Maybe V1ObjectMeta
v1SelfSubjectAccessReviewSpec :: V1SelfSubjectAccessReviewSpec
v1SelfSubjectAccessReviewStatus :: Maybe V1SubjectAccessReviewStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1SelfSubjectAccessReviewApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1SelfSubjectAccessReviewKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1SelfSubjectAccessReviewMetadata
      , Key
"spec" Key -> V1SelfSubjectAccessReviewSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1SelfSubjectAccessReviewSpec
v1SelfSubjectAccessReviewSpec
      , Key
"status" Key -> Maybe V1SubjectAccessReviewStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1SubjectAccessReviewStatus
v1SelfSubjectAccessReviewStatus
      ]


-- | Construct a value of type 'V1SelfSubjectAccessReview' (by applying it's required fields, if any)
mkV1SelfSubjectAccessReview
  :: V1SelfSubjectAccessReviewSpec -- ^ 'v1SelfSubjectAccessReviewSpec' 
  -> V1SelfSubjectAccessReview
mkV1SelfSubjectAccessReview :: V1SelfSubjectAccessReviewSpec -> V1SelfSubjectAccessReview
mkV1SelfSubjectAccessReview V1SelfSubjectAccessReviewSpec
v1SelfSubjectAccessReviewSpec =
  V1SelfSubjectAccessReview
  { $sel:v1SelfSubjectAccessReviewApiVersion:V1SelfSubjectAccessReview :: Maybe Text
v1SelfSubjectAccessReviewApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1SelfSubjectAccessReviewKind:V1SelfSubjectAccessReview :: Maybe Text
v1SelfSubjectAccessReviewKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1SelfSubjectAccessReviewMetadata:V1SelfSubjectAccessReview :: Maybe V1ObjectMeta
v1SelfSubjectAccessReviewMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , V1SelfSubjectAccessReviewSpec
$sel:v1SelfSubjectAccessReviewSpec:V1SelfSubjectAccessReview :: V1SelfSubjectAccessReviewSpec
v1SelfSubjectAccessReviewSpec :: V1SelfSubjectAccessReviewSpec
v1SelfSubjectAccessReviewSpec
  , $sel:v1SelfSubjectAccessReviewStatus:V1SelfSubjectAccessReview :: Maybe V1SubjectAccessReviewStatus
v1SelfSubjectAccessReviewStatus = Maybe V1SubjectAccessReviewStatus
forall a. Maybe a
Nothing
  }

-- ** V1SelfSubjectAccessReviewSpec
-- | V1SelfSubjectAccessReviewSpec
-- SelfSubjectAccessReviewSpec is a description of the access request.  Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set
data V1SelfSubjectAccessReviewSpec = V1SelfSubjectAccessReviewSpec
  { V1SelfSubjectAccessReviewSpec -> Maybe V1NonResourceAttributes
v1SelfSubjectAccessReviewSpecNonResourceAttributes :: !(Maybe V1NonResourceAttributes) -- ^ "nonResourceAttributes"
  , V1SelfSubjectAccessReviewSpec -> Maybe V1ResourceAttributes
v1SelfSubjectAccessReviewSpecResourceAttributes :: !(Maybe V1ResourceAttributes) -- ^ "resourceAttributes"
  } deriving (Int -> V1SelfSubjectAccessReviewSpec -> ShowS
[V1SelfSubjectAccessReviewSpec] -> ShowS
V1SelfSubjectAccessReviewSpec -> String
(Int -> V1SelfSubjectAccessReviewSpec -> ShowS)
-> (V1SelfSubjectAccessReviewSpec -> String)
-> ([V1SelfSubjectAccessReviewSpec] -> ShowS)
-> Show V1SelfSubjectAccessReviewSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1SelfSubjectAccessReviewSpec -> ShowS
showsPrec :: Int -> V1SelfSubjectAccessReviewSpec -> ShowS
$cshow :: V1SelfSubjectAccessReviewSpec -> String
show :: V1SelfSubjectAccessReviewSpec -> String
$cshowList :: [V1SelfSubjectAccessReviewSpec] -> ShowS
showList :: [V1SelfSubjectAccessReviewSpec] -> ShowS
P.Show, V1SelfSubjectAccessReviewSpec
-> V1SelfSubjectAccessReviewSpec -> Bool
(V1SelfSubjectAccessReviewSpec
 -> V1SelfSubjectAccessReviewSpec -> Bool)
-> (V1SelfSubjectAccessReviewSpec
    -> V1SelfSubjectAccessReviewSpec -> Bool)
-> Eq V1SelfSubjectAccessReviewSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1SelfSubjectAccessReviewSpec
-> V1SelfSubjectAccessReviewSpec -> Bool
== :: V1SelfSubjectAccessReviewSpec
-> V1SelfSubjectAccessReviewSpec -> Bool
$c/= :: V1SelfSubjectAccessReviewSpec
-> V1SelfSubjectAccessReviewSpec -> Bool
/= :: V1SelfSubjectAccessReviewSpec
-> V1SelfSubjectAccessReviewSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1SelfSubjectAccessReviewSpec
instance A.FromJSON V1SelfSubjectAccessReviewSpec where
  parseJSON :: Value -> Parser V1SelfSubjectAccessReviewSpec
parseJSON = String
-> (Object -> Parser V1SelfSubjectAccessReviewSpec)
-> Value
-> Parser V1SelfSubjectAccessReviewSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1SelfSubjectAccessReviewSpec" ((Object -> Parser V1SelfSubjectAccessReviewSpec)
 -> Value -> Parser V1SelfSubjectAccessReviewSpec)
-> (Object -> Parser V1SelfSubjectAccessReviewSpec)
-> Value
-> Parser V1SelfSubjectAccessReviewSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1NonResourceAttributes
-> Maybe V1ResourceAttributes -> V1SelfSubjectAccessReviewSpec
V1SelfSubjectAccessReviewSpec
      (Maybe V1NonResourceAttributes
 -> Maybe V1ResourceAttributes -> V1SelfSubjectAccessReviewSpec)
-> Parser (Maybe V1NonResourceAttributes)
-> Parser
     (Maybe V1ResourceAttributes -> V1SelfSubjectAccessReviewSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1NonResourceAttributes)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nonResourceAttributes")
      Parser
  (Maybe V1ResourceAttributes -> V1SelfSubjectAccessReviewSpec)
-> Parser (Maybe V1ResourceAttributes)
-> Parser V1SelfSubjectAccessReviewSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ResourceAttributes)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resourceAttributes")

-- | ToJSON V1SelfSubjectAccessReviewSpec
instance A.ToJSON V1SelfSubjectAccessReviewSpec where
  toJSON :: V1SelfSubjectAccessReviewSpec -> Value
toJSON V1SelfSubjectAccessReviewSpec {Maybe V1ResourceAttributes
Maybe V1NonResourceAttributes
$sel:v1SelfSubjectAccessReviewSpecNonResourceAttributes:V1SelfSubjectAccessReviewSpec :: V1SelfSubjectAccessReviewSpec -> Maybe V1NonResourceAttributes
$sel:v1SelfSubjectAccessReviewSpecResourceAttributes:V1SelfSubjectAccessReviewSpec :: V1SelfSubjectAccessReviewSpec -> Maybe V1ResourceAttributes
v1SelfSubjectAccessReviewSpecNonResourceAttributes :: Maybe V1NonResourceAttributes
v1SelfSubjectAccessReviewSpecResourceAttributes :: Maybe V1ResourceAttributes
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"nonResourceAttributes" Key -> Maybe V1NonResourceAttributes -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1NonResourceAttributes
v1SelfSubjectAccessReviewSpecNonResourceAttributes
      , Key
"resourceAttributes" Key -> Maybe V1ResourceAttributes -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ResourceAttributes
v1SelfSubjectAccessReviewSpecResourceAttributes
      ]


-- | Construct a value of type 'V1SelfSubjectAccessReviewSpec' (by applying it's required fields, if any)
mkV1SelfSubjectAccessReviewSpec
  :: V1SelfSubjectAccessReviewSpec
mkV1SelfSubjectAccessReviewSpec :: V1SelfSubjectAccessReviewSpec
mkV1SelfSubjectAccessReviewSpec =
  V1SelfSubjectAccessReviewSpec
  { $sel:v1SelfSubjectAccessReviewSpecNonResourceAttributes:V1SelfSubjectAccessReviewSpec :: Maybe V1NonResourceAttributes
v1SelfSubjectAccessReviewSpecNonResourceAttributes = Maybe V1NonResourceAttributes
forall a. Maybe a
Nothing
  , $sel:v1SelfSubjectAccessReviewSpecResourceAttributes:V1SelfSubjectAccessReviewSpec :: Maybe V1ResourceAttributes
v1SelfSubjectAccessReviewSpecResourceAttributes = Maybe V1ResourceAttributes
forall a. Maybe a
Nothing
  }

-- ** V1SelfSubjectReview
-- | V1SelfSubjectReview
-- SelfSubjectReview contains the user information that the kube-apiserver has about the user making this request. When using impersonation, users will receive the user info of the user being impersonated.  If impersonation or request header authentication is used, any extra keys will have their case ignored and returned as lowercase.
data V1SelfSubjectReview = V1SelfSubjectReview
  { V1SelfSubjectReview -> Maybe Text
v1SelfSubjectReviewApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1SelfSubjectReview -> Maybe Text
v1SelfSubjectReviewKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1SelfSubjectReview -> Maybe V1ObjectMeta
v1SelfSubjectReviewMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1SelfSubjectReview -> Maybe V1SelfSubjectReviewStatus
v1SelfSubjectReviewStatus :: !(Maybe V1SelfSubjectReviewStatus) -- ^ "status"
  } deriving (Int -> V1SelfSubjectReview -> ShowS
[V1SelfSubjectReview] -> ShowS
V1SelfSubjectReview -> String
(Int -> V1SelfSubjectReview -> ShowS)
-> (V1SelfSubjectReview -> String)
-> ([V1SelfSubjectReview] -> ShowS)
-> Show V1SelfSubjectReview
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1SelfSubjectReview -> ShowS
showsPrec :: Int -> V1SelfSubjectReview -> ShowS
$cshow :: V1SelfSubjectReview -> String
show :: V1SelfSubjectReview -> String
$cshowList :: [V1SelfSubjectReview] -> ShowS
showList :: [V1SelfSubjectReview] -> ShowS
P.Show, V1SelfSubjectReview -> V1SelfSubjectReview -> Bool
(V1SelfSubjectReview -> V1SelfSubjectReview -> Bool)
-> (V1SelfSubjectReview -> V1SelfSubjectReview -> Bool)
-> Eq V1SelfSubjectReview
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1SelfSubjectReview -> V1SelfSubjectReview -> Bool
== :: V1SelfSubjectReview -> V1SelfSubjectReview -> Bool
$c/= :: V1SelfSubjectReview -> V1SelfSubjectReview -> Bool
/= :: V1SelfSubjectReview -> V1SelfSubjectReview -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1SelfSubjectReview
instance A.FromJSON V1SelfSubjectReview where
  parseJSON :: Value -> Parser V1SelfSubjectReview
parseJSON = String
-> (Object -> Parser V1SelfSubjectReview)
-> Value
-> Parser V1SelfSubjectReview
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1SelfSubjectReview" ((Object -> Parser V1SelfSubjectReview)
 -> Value -> Parser V1SelfSubjectReview)
-> (Object -> Parser V1SelfSubjectReview)
-> Value
-> Parser V1SelfSubjectReview
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1SelfSubjectReviewStatus
-> V1SelfSubjectReview
V1SelfSubjectReview
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1SelfSubjectReviewStatus
 -> V1SelfSubjectReview)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1SelfSubjectReviewStatus
      -> V1SelfSubjectReview)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1SelfSubjectReviewStatus
   -> V1SelfSubjectReview)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1SelfSubjectReviewStatus -> V1SelfSubjectReview)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1SelfSubjectReviewStatus -> V1SelfSubjectReview)
-> Parser (Maybe V1ObjectMeta)
-> Parser (Maybe V1SelfSubjectReviewStatus -> V1SelfSubjectReview)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (Maybe V1SelfSubjectReviewStatus -> V1SelfSubjectReview)
-> Parser (Maybe V1SelfSubjectReviewStatus)
-> Parser V1SelfSubjectReview
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1SelfSubjectReviewStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1SelfSubjectReview
instance A.ToJSON V1SelfSubjectReview where
  toJSON :: V1SelfSubjectReview -> Value
toJSON V1SelfSubjectReview {Maybe Text
Maybe V1SelfSubjectReviewStatus
Maybe V1ObjectMeta
$sel:v1SelfSubjectReviewApiVersion:V1SelfSubjectReview :: V1SelfSubjectReview -> Maybe Text
$sel:v1SelfSubjectReviewKind:V1SelfSubjectReview :: V1SelfSubjectReview -> Maybe Text
$sel:v1SelfSubjectReviewMetadata:V1SelfSubjectReview :: V1SelfSubjectReview -> Maybe V1ObjectMeta
$sel:v1SelfSubjectReviewStatus:V1SelfSubjectReview :: V1SelfSubjectReview -> Maybe V1SelfSubjectReviewStatus
v1SelfSubjectReviewApiVersion :: Maybe Text
v1SelfSubjectReviewKind :: Maybe Text
v1SelfSubjectReviewMetadata :: Maybe V1ObjectMeta
v1SelfSubjectReviewStatus :: Maybe V1SelfSubjectReviewStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1SelfSubjectReviewApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1SelfSubjectReviewKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1SelfSubjectReviewMetadata
      , Key
"status" Key -> Maybe V1SelfSubjectReviewStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1SelfSubjectReviewStatus
v1SelfSubjectReviewStatus
      ]


-- | Construct a value of type 'V1SelfSubjectReview' (by applying it's required fields, if any)
mkV1SelfSubjectReview
  :: V1SelfSubjectReview
mkV1SelfSubjectReview :: V1SelfSubjectReview
mkV1SelfSubjectReview =
  V1SelfSubjectReview
  { $sel:v1SelfSubjectReviewApiVersion:V1SelfSubjectReview :: Maybe Text
v1SelfSubjectReviewApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1SelfSubjectReviewKind:V1SelfSubjectReview :: Maybe Text
v1SelfSubjectReviewKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1SelfSubjectReviewMetadata:V1SelfSubjectReview :: Maybe V1ObjectMeta
v1SelfSubjectReviewMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1SelfSubjectReviewStatus:V1SelfSubjectReview :: Maybe V1SelfSubjectReviewStatus
v1SelfSubjectReviewStatus = Maybe V1SelfSubjectReviewStatus
forall a. Maybe a
Nothing
  }

-- ** V1SelfSubjectReviewStatus
-- | V1SelfSubjectReviewStatus
-- SelfSubjectReviewStatus is filled by the kube-apiserver and sent back to a user.
data V1SelfSubjectReviewStatus = V1SelfSubjectReviewStatus
  { V1SelfSubjectReviewStatus -> Maybe V1UserInfo
v1SelfSubjectReviewStatusUserInfo :: !(Maybe V1UserInfo) -- ^ "userInfo"
  } deriving (Int -> V1SelfSubjectReviewStatus -> ShowS
[V1SelfSubjectReviewStatus] -> ShowS
V1SelfSubjectReviewStatus -> String
(Int -> V1SelfSubjectReviewStatus -> ShowS)
-> (V1SelfSubjectReviewStatus -> String)
-> ([V1SelfSubjectReviewStatus] -> ShowS)
-> Show V1SelfSubjectReviewStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1SelfSubjectReviewStatus -> ShowS
showsPrec :: Int -> V1SelfSubjectReviewStatus -> ShowS
$cshow :: V1SelfSubjectReviewStatus -> String
show :: V1SelfSubjectReviewStatus -> String
$cshowList :: [V1SelfSubjectReviewStatus] -> ShowS
showList :: [V1SelfSubjectReviewStatus] -> ShowS
P.Show, V1SelfSubjectReviewStatus -> V1SelfSubjectReviewStatus -> Bool
(V1SelfSubjectReviewStatus -> V1SelfSubjectReviewStatus -> Bool)
-> (V1SelfSubjectReviewStatus -> V1SelfSubjectReviewStatus -> Bool)
-> Eq V1SelfSubjectReviewStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1SelfSubjectReviewStatus -> V1SelfSubjectReviewStatus -> Bool
== :: V1SelfSubjectReviewStatus -> V1SelfSubjectReviewStatus -> Bool
$c/= :: V1SelfSubjectReviewStatus -> V1SelfSubjectReviewStatus -> Bool
/= :: V1SelfSubjectReviewStatus -> V1SelfSubjectReviewStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1SelfSubjectReviewStatus
instance A.FromJSON V1SelfSubjectReviewStatus where
  parseJSON :: Value -> Parser V1SelfSubjectReviewStatus
parseJSON = String
-> (Object -> Parser V1SelfSubjectReviewStatus)
-> Value
-> Parser V1SelfSubjectReviewStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1SelfSubjectReviewStatus" ((Object -> Parser V1SelfSubjectReviewStatus)
 -> Value -> Parser V1SelfSubjectReviewStatus)
-> (Object -> Parser V1SelfSubjectReviewStatus)
-> Value
-> Parser V1SelfSubjectReviewStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1UserInfo -> V1SelfSubjectReviewStatus
V1SelfSubjectReviewStatus
      (Maybe V1UserInfo -> V1SelfSubjectReviewStatus)
-> Parser (Maybe V1UserInfo) -> Parser V1SelfSubjectReviewStatus
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1UserInfo)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"userInfo")

-- | ToJSON V1SelfSubjectReviewStatus
instance A.ToJSON V1SelfSubjectReviewStatus where
  toJSON :: V1SelfSubjectReviewStatus -> Value
toJSON V1SelfSubjectReviewStatus {Maybe V1UserInfo
$sel:v1SelfSubjectReviewStatusUserInfo:V1SelfSubjectReviewStatus :: V1SelfSubjectReviewStatus -> Maybe V1UserInfo
v1SelfSubjectReviewStatusUserInfo :: Maybe V1UserInfo
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"userInfo" Key -> Maybe V1UserInfo -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1UserInfo
v1SelfSubjectReviewStatusUserInfo
      ]


-- | Construct a value of type 'V1SelfSubjectReviewStatus' (by applying it's required fields, if any)
mkV1SelfSubjectReviewStatus
  :: V1SelfSubjectReviewStatus
mkV1SelfSubjectReviewStatus :: V1SelfSubjectReviewStatus
mkV1SelfSubjectReviewStatus =
  V1SelfSubjectReviewStatus
  { $sel:v1SelfSubjectReviewStatusUserInfo:V1SelfSubjectReviewStatus :: Maybe V1UserInfo
v1SelfSubjectReviewStatusUserInfo = Maybe V1UserInfo
forall a. Maybe a
Nothing
  }

-- ** V1SelfSubjectRulesReview
-- | V1SelfSubjectRulesReview
-- SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace. The returned list of actions may be incomplete depending on the server's authorization mode, and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions, or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns. SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server.
data V1SelfSubjectRulesReview = V1SelfSubjectRulesReview
  { V1SelfSubjectRulesReview -> Maybe Text
v1SelfSubjectRulesReviewApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1SelfSubjectRulesReview -> Maybe Text
v1SelfSubjectRulesReviewKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1SelfSubjectRulesReview -> Maybe V1ObjectMeta
v1SelfSubjectRulesReviewMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1SelfSubjectRulesReview -> V1SelfSubjectRulesReviewSpec
v1SelfSubjectRulesReviewSpec :: !(V1SelfSubjectRulesReviewSpec) -- ^ /Required/ "spec"
  , V1SelfSubjectRulesReview -> Maybe V1SubjectRulesReviewStatus
v1SelfSubjectRulesReviewStatus :: !(Maybe V1SubjectRulesReviewStatus) -- ^ "status"
  } deriving (Int -> V1SelfSubjectRulesReview -> ShowS
[V1SelfSubjectRulesReview] -> ShowS
V1SelfSubjectRulesReview -> String
(Int -> V1SelfSubjectRulesReview -> ShowS)
-> (V1SelfSubjectRulesReview -> String)
-> ([V1SelfSubjectRulesReview] -> ShowS)
-> Show V1SelfSubjectRulesReview
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1SelfSubjectRulesReview -> ShowS
showsPrec :: Int -> V1SelfSubjectRulesReview -> ShowS
$cshow :: V1SelfSubjectRulesReview -> String
show :: V1SelfSubjectRulesReview -> String
$cshowList :: [V1SelfSubjectRulesReview] -> ShowS
showList :: [V1SelfSubjectRulesReview] -> ShowS
P.Show, V1SelfSubjectRulesReview -> V1SelfSubjectRulesReview -> Bool
(V1SelfSubjectRulesReview -> V1SelfSubjectRulesReview -> Bool)
-> (V1SelfSubjectRulesReview -> V1SelfSubjectRulesReview -> Bool)
-> Eq V1SelfSubjectRulesReview
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1SelfSubjectRulesReview -> V1SelfSubjectRulesReview -> Bool
== :: V1SelfSubjectRulesReview -> V1SelfSubjectRulesReview -> Bool
$c/= :: V1SelfSubjectRulesReview -> V1SelfSubjectRulesReview -> Bool
/= :: V1SelfSubjectRulesReview -> V1SelfSubjectRulesReview -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1SelfSubjectRulesReview
instance A.FromJSON V1SelfSubjectRulesReview where
  parseJSON :: Value -> Parser V1SelfSubjectRulesReview
parseJSON = String
-> (Object -> Parser V1SelfSubjectRulesReview)
-> Value
-> Parser V1SelfSubjectRulesReview
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1SelfSubjectRulesReview" ((Object -> Parser V1SelfSubjectRulesReview)
 -> Value -> Parser V1SelfSubjectRulesReview)
-> (Object -> Parser V1SelfSubjectRulesReview)
-> Value
-> Parser V1SelfSubjectRulesReview
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> V1SelfSubjectRulesReviewSpec
-> Maybe V1SubjectRulesReviewStatus
-> V1SelfSubjectRulesReview
V1SelfSubjectRulesReview
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> V1SelfSubjectRulesReviewSpec
 -> Maybe V1SubjectRulesReviewStatus
 -> V1SelfSubjectRulesReview)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> V1SelfSubjectRulesReviewSpec
      -> Maybe V1SubjectRulesReviewStatus
      -> V1SelfSubjectRulesReview)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> V1SelfSubjectRulesReviewSpec
   -> Maybe V1SubjectRulesReviewStatus
   -> V1SelfSubjectRulesReview)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> V1SelfSubjectRulesReviewSpec
      -> Maybe V1SubjectRulesReviewStatus
      -> V1SelfSubjectRulesReview)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> V1SelfSubjectRulesReviewSpec
   -> Maybe V1SubjectRulesReviewStatus
   -> V1SelfSubjectRulesReview)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (V1SelfSubjectRulesReviewSpec
      -> Maybe V1SubjectRulesReviewStatus -> V1SelfSubjectRulesReview)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (V1SelfSubjectRulesReviewSpec
   -> Maybe V1SubjectRulesReviewStatus -> V1SelfSubjectRulesReview)
-> Parser V1SelfSubjectRulesReviewSpec
-> Parser
     (Maybe V1SubjectRulesReviewStatus -> V1SelfSubjectRulesReview)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1SelfSubjectRulesReviewSpec
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"spec")
      Parser
  (Maybe V1SubjectRulesReviewStatus -> V1SelfSubjectRulesReview)
-> Parser (Maybe V1SubjectRulesReviewStatus)
-> Parser V1SelfSubjectRulesReview
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1SubjectRulesReviewStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1SelfSubjectRulesReview
instance A.ToJSON V1SelfSubjectRulesReview where
  toJSON :: V1SelfSubjectRulesReview -> Value
toJSON V1SelfSubjectRulesReview {Maybe Text
Maybe V1SubjectRulesReviewStatus
Maybe V1ObjectMeta
V1SelfSubjectRulesReviewSpec
$sel:v1SelfSubjectRulesReviewApiVersion:V1SelfSubjectRulesReview :: V1SelfSubjectRulesReview -> Maybe Text
$sel:v1SelfSubjectRulesReviewKind:V1SelfSubjectRulesReview :: V1SelfSubjectRulesReview -> Maybe Text
$sel:v1SelfSubjectRulesReviewMetadata:V1SelfSubjectRulesReview :: V1SelfSubjectRulesReview -> Maybe V1ObjectMeta
$sel:v1SelfSubjectRulesReviewSpec:V1SelfSubjectRulesReview :: V1SelfSubjectRulesReview -> V1SelfSubjectRulesReviewSpec
$sel:v1SelfSubjectRulesReviewStatus:V1SelfSubjectRulesReview :: V1SelfSubjectRulesReview -> Maybe V1SubjectRulesReviewStatus
v1SelfSubjectRulesReviewApiVersion :: Maybe Text
v1SelfSubjectRulesReviewKind :: Maybe Text
v1SelfSubjectRulesReviewMetadata :: Maybe V1ObjectMeta
v1SelfSubjectRulesReviewSpec :: V1SelfSubjectRulesReviewSpec
v1SelfSubjectRulesReviewStatus :: Maybe V1SubjectRulesReviewStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1SelfSubjectRulesReviewApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1SelfSubjectRulesReviewKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1SelfSubjectRulesReviewMetadata
      , Key
"spec" Key -> V1SelfSubjectRulesReviewSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1SelfSubjectRulesReviewSpec
v1SelfSubjectRulesReviewSpec
      , Key
"status" Key -> Maybe V1SubjectRulesReviewStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1SubjectRulesReviewStatus
v1SelfSubjectRulesReviewStatus
      ]


-- | Construct a value of type 'V1SelfSubjectRulesReview' (by applying it's required fields, if any)
mkV1SelfSubjectRulesReview
  :: V1SelfSubjectRulesReviewSpec -- ^ 'v1SelfSubjectRulesReviewSpec' 
  -> V1SelfSubjectRulesReview
mkV1SelfSubjectRulesReview :: V1SelfSubjectRulesReviewSpec -> V1SelfSubjectRulesReview
mkV1SelfSubjectRulesReview V1SelfSubjectRulesReviewSpec
v1SelfSubjectRulesReviewSpec =
  V1SelfSubjectRulesReview
  { $sel:v1SelfSubjectRulesReviewApiVersion:V1SelfSubjectRulesReview :: Maybe Text
v1SelfSubjectRulesReviewApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1SelfSubjectRulesReviewKind:V1SelfSubjectRulesReview :: Maybe Text
v1SelfSubjectRulesReviewKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1SelfSubjectRulesReviewMetadata:V1SelfSubjectRulesReview :: Maybe V1ObjectMeta
v1SelfSubjectRulesReviewMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , V1SelfSubjectRulesReviewSpec
$sel:v1SelfSubjectRulesReviewSpec:V1SelfSubjectRulesReview :: V1SelfSubjectRulesReviewSpec
v1SelfSubjectRulesReviewSpec :: V1SelfSubjectRulesReviewSpec
v1SelfSubjectRulesReviewSpec
  , $sel:v1SelfSubjectRulesReviewStatus:V1SelfSubjectRulesReview :: Maybe V1SubjectRulesReviewStatus
v1SelfSubjectRulesReviewStatus = Maybe V1SubjectRulesReviewStatus
forall a. Maybe a
Nothing
  }

-- ** V1SelfSubjectRulesReviewSpec
-- | V1SelfSubjectRulesReviewSpec
-- SelfSubjectRulesReviewSpec defines the specification for SelfSubjectRulesReview.
data V1SelfSubjectRulesReviewSpec = V1SelfSubjectRulesReviewSpec
  { V1SelfSubjectRulesReviewSpec -> Maybe Text
v1SelfSubjectRulesReviewSpecNamespace :: !(Maybe Text) -- ^ "namespace" - Namespace to evaluate rules for. Required.
  } deriving (Int -> V1SelfSubjectRulesReviewSpec -> ShowS
[V1SelfSubjectRulesReviewSpec] -> ShowS
V1SelfSubjectRulesReviewSpec -> String
(Int -> V1SelfSubjectRulesReviewSpec -> ShowS)
-> (V1SelfSubjectRulesReviewSpec -> String)
-> ([V1SelfSubjectRulesReviewSpec] -> ShowS)
-> Show V1SelfSubjectRulesReviewSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1SelfSubjectRulesReviewSpec -> ShowS
showsPrec :: Int -> V1SelfSubjectRulesReviewSpec -> ShowS
$cshow :: V1SelfSubjectRulesReviewSpec -> String
show :: V1SelfSubjectRulesReviewSpec -> String
$cshowList :: [V1SelfSubjectRulesReviewSpec] -> ShowS
showList :: [V1SelfSubjectRulesReviewSpec] -> ShowS
P.Show, V1SelfSubjectRulesReviewSpec
-> V1SelfSubjectRulesReviewSpec -> Bool
(V1SelfSubjectRulesReviewSpec
 -> V1SelfSubjectRulesReviewSpec -> Bool)
-> (V1SelfSubjectRulesReviewSpec
    -> V1SelfSubjectRulesReviewSpec -> Bool)
-> Eq V1SelfSubjectRulesReviewSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1SelfSubjectRulesReviewSpec
-> V1SelfSubjectRulesReviewSpec -> Bool
== :: V1SelfSubjectRulesReviewSpec
-> V1SelfSubjectRulesReviewSpec -> Bool
$c/= :: V1SelfSubjectRulesReviewSpec
-> V1SelfSubjectRulesReviewSpec -> Bool
/= :: V1SelfSubjectRulesReviewSpec
-> V1SelfSubjectRulesReviewSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1SelfSubjectRulesReviewSpec
instance A.FromJSON V1SelfSubjectRulesReviewSpec where
  parseJSON :: Value -> Parser V1SelfSubjectRulesReviewSpec
parseJSON = String
-> (Object -> Parser V1SelfSubjectRulesReviewSpec)
-> Value
-> Parser V1SelfSubjectRulesReviewSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1SelfSubjectRulesReviewSpec" ((Object -> Parser V1SelfSubjectRulesReviewSpec)
 -> Value -> Parser V1SelfSubjectRulesReviewSpec)
-> (Object -> Parser V1SelfSubjectRulesReviewSpec)
-> Value
-> Parser V1SelfSubjectRulesReviewSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> V1SelfSubjectRulesReviewSpec
V1SelfSubjectRulesReviewSpec
      (Maybe Text -> V1SelfSubjectRulesReviewSpec)
-> Parser (Maybe Text) -> Parser V1SelfSubjectRulesReviewSpec
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"namespace")

-- | ToJSON V1SelfSubjectRulesReviewSpec
instance A.ToJSON V1SelfSubjectRulesReviewSpec where
  toJSON :: V1SelfSubjectRulesReviewSpec -> Value
toJSON V1SelfSubjectRulesReviewSpec {Maybe Text
$sel:v1SelfSubjectRulesReviewSpecNamespace:V1SelfSubjectRulesReviewSpec :: V1SelfSubjectRulesReviewSpec -> Maybe Text
v1SelfSubjectRulesReviewSpecNamespace :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"namespace" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1SelfSubjectRulesReviewSpecNamespace
      ]


-- | Construct a value of type 'V1SelfSubjectRulesReviewSpec' (by applying it's required fields, if any)
mkV1SelfSubjectRulesReviewSpec
  :: V1SelfSubjectRulesReviewSpec
mkV1SelfSubjectRulesReviewSpec :: V1SelfSubjectRulesReviewSpec
mkV1SelfSubjectRulesReviewSpec =
  V1SelfSubjectRulesReviewSpec
  { $sel:v1SelfSubjectRulesReviewSpecNamespace:V1SelfSubjectRulesReviewSpec :: Maybe Text
v1SelfSubjectRulesReviewSpecNamespace = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1ServerAddressByClientCIDR
-- | V1ServerAddressByClientCIDR
-- ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.
data V1ServerAddressByClientCIDR = V1ServerAddressByClientCIDR
  { V1ServerAddressByClientCIDR -> Text
v1ServerAddressByClientCIDRClientCidr :: !(Text) -- ^ /Required/ "clientCIDR" - The CIDR with which clients can match their IP to figure out the server address that they should use.
  , V1ServerAddressByClientCIDR -> Text
v1ServerAddressByClientCIDRServerAddress :: !(Text) -- ^ /Required/ "serverAddress" - Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port.
  } deriving (Int -> V1ServerAddressByClientCIDR -> ShowS
[V1ServerAddressByClientCIDR] -> ShowS
V1ServerAddressByClientCIDR -> String
(Int -> V1ServerAddressByClientCIDR -> ShowS)
-> (V1ServerAddressByClientCIDR -> String)
-> ([V1ServerAddressByClientCIDR] -> ShowS)
-> Show V1ServerAddressByClientCIDR
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ServerAddressByClientCIDR -> ShowS
showsPrec :: Int -> V1ServerAddressByClientCIDR -> ShowS
$cshow :: V1ServerAddressByClientCIDR -> String
show :: V1ServerAddressByClientCIDR -> String
$cshowList :: [V1ServerAddressByClientCIDR] -> ShowS
showList :: [V1ServerAddressByClientCIDR] -> ShowS
P.Show, V1ServerAddressByClientCIDR -> V1ServerAddressByClientCIDR -> Bool
(V1ServerAddressByClientCIDR
 -> V1ServerAddressByClientCIDR -> Bool)
-> (V1ServerAddressByClientCIDR
    -> V1ServerAddressByClientCIDR -> Bool)
-> Eq V1ServerAddressByClientCIDR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ServerAddressByClientCIDR -> V1ServerAddressByClientCIDR -> Bool
== :: V1ServerAddressByClientCIDR -> V1ServerAddressByClientCIDR -> Bool
$c/= :: V1ServerAddressByClientCIDR -> V1ServerAddressByClientCIDR -> Bool
/= :: V1ServerAddressByClientCIDR -> V1ServerAddressByClientCIDR -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ServerAddressByClientCIDR
instance A.FromJSON V1ServerAddressByClientCIDR where
  parseJSON :: Value -> Parser V1ServerAddressByClientCIDR
parseJSON = String
-> (Object -> Parser V1ServerAddressByClientCIDR)
-> Value
-> Parser V1ServerAddressByClientCIDR
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ServerAddressByClientCIDR" ((Object -> Parser V1ServerAddressByClientCIDR)
 -> Value -> Parser V1ServerAddressByClientCIDR)
-> (Object -> Parser V1ServerAddressByClientCIDR)
-> Value
-> Parser V1ServerAddressByClientCIDR
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Text -> V1ServerAddressByClientCIDR
V1ServerAddressByClientCIDR
      (Text -> Text -> V1ServerAddressByClientCIDR)
-> Parser Text -> Parser (Text -> V1ServerAddressByClientCIDR)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"clientCIDR")
      Parser (Text -> V1ServerAddressByClientCIDR)
-> Parser Text -> Parser V1ServerAddressByClientCIDR
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"serverAddress")

-- | ToJSON V1ServerAddressByClientCIDR
instance A.ToJSON V1ServerAddressByClientCIDR where
  toJSON :: V1ServerAddressByClientCIDR -> Value
toJSON V1ServerAddressByClientCIDR {Text
$sel:v1ServerAddressByClientCIDRClientCidr:V1ServerAddressByClientCIDR :: V1ServerAddressByClientCIDR -> Text
$sel:v1ServerAddressByClientCIDRServerAddress:V1ServerAddressByClientCIDR :: V1ServerAddressByClientCIDR -> Text
v1ServerAddressByClientCIDRClientCidr :: Text
v1ServerAddressByClientCIDRServerAddress :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"clientCIDR" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ServerAddressByClientCIDRClientCidr
      , Key
"serverAddress" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ServerAddressByClientCIDRServerAddress
      ]


-- | Construct a value of type 'V1ServerAddressByClientCIDR' (by applying it's required fields, if any)
mkV1ServerAddressByClientCIDR
  :: Text -- ^ 'v1ServerAddressByClientCIDRClientCidr': The CIDR with which clients can match their IP to figure out the server address that they should use.
  -> Text -- ^ 'v1ServerAddressByClientCIDRServerAddress': Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port.
  -> V1ServerAddressByClientCIDR
mkV1ServerAddressByClientCIDR :: Text -> Text -> V1ServerAddressByClientCIDR
mkV1ServerAddressByClientCIDR Text
v1ServerAddressByClientCIDRClientCidr Text
v1ServerAddressByClientCIDRServerAddress =
  V1ServerAddressByClientCIDR
  { Text
$sel:v1ServerAddressByClientCIDRClientCidr:V1ServerAddressByClientCIDR :: Text
v1ServerAddressByClientCIDRClientCidr :: Text
v1ServerAddressByClientCIDRClientCidr
  , Text
$sel:v1ServerAddressByClientCIDRServerAddress:V1ServerAddressByClientCIDR :: Text
v1ServerAddressByClientCIDRServerAddress :: Text
v1ServerAddressByClientCIDRServerAddress
  }

-- ** V1Service
-- | V1Service
-- Service is a named abstraction of software service (for example, mysql) consisting of local port (for example 3306) that the proxy listens on, and the selector that determines which pods will answer requests sent through the proxy.
data V1Service = V1Service
  { V1Service -> Maybe Text
v1ServiceApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1Service -> Maybe Text
v1ServiceKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1Service -> Maybe V1ObjectMeta
v1ServiceMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1Service -> Maybe V1ServiceSpec
v1ServiceSpec :: !(Maybe V1ServiceSpec) -- ^ "spec"
  , V1Service -> Maybe V1ServiceStatus
v1ServiceStatus :: !(Maybe V1ServiceStatus) -- ^ "status"
  } deriving (Int -> V1Service -> ShowS
[V1Service] -> ShowS
V1Service -> String
(Int -> V1Service -> ShowS)
-> (V1Service -> String)
-> ([V1Service] -> ShowS)
-> Show V1Service
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1Service -> ShowS
showsPrec :: Int -> V1Service -> ShowS
$cshow :: V1Service -> String
show :: V1Service -> String
$cshowList :: [V1Service] -> ShowS
showList :: [V1Service] -> ShowS
P.Show, V1Service -> V1Service -> Bool
(V1Service -> V1Service -> Bool)
-> (V1Service -> V1Service -> Bool) -> Eq V1Service
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1Service -> V1Service -> Bool
== :: V1Service -> V1Service -> Bool
$c/= :: V1Service -> V1Service -> Bool
/= :: V1Service -> V1Service -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1Service
instance A.FromJSON V1Service where
  parseJSON :: Value -> Parser V1Service
parseJSON = String -> (Object -> Parser V1Service) -> Value -> Parser V1Service
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1Service" ((Object -> Parser V1Service) -> Value -> Parser V1Service)
-> (Object -> Parser V1Service) -> Value -> Parser V1Service
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1ServiceSpec
-> Maybe V1ServiceStatus
-> V1Service
V1Service
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1ServiceSpec
 -> Maybe V1ServiceStatus
 -> V1Service)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1ServiceSpec
      -> Maybe V1ServiceStatus
      -> V1Service)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1ServiceSpec
   -> Maybe V1ServiceStatus
   -> V1Service)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1ServiceSpec -> Maybe V1ServiceStatus -> V1Service)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1ServiceSpec -> Maybe V1ServiceStatus -> V1Service)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe V1ServiceSpec -> Maybe V1ServiceStatus -> V1Service)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (Maybe V1ServiceSpec -> Maybe V1ServiceStatus -> V1Service)
-> Parser (Maybe V1ServiceSpec)
-> Parser (Maybe V1ServiceStatus -> V1Service)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ServiceSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")
      Parser (Maybe V1ServiceStatus -> V1Service)
-> Parser (Maybe V1ServiceStatus) -> Parser V1Service
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ServiceStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1Service
instance A.ToJSON V1Service where
  toJSON :: V1Service -> Value
toJSON V1Service {Maybe Text
Maybe V1ServiceStatus
Maybe V1ServiceSpec
Maybe V1ObjectMeta
$sel:v1ServiceApiVersion:V1Service :: V1Service -> Maybe Text
$sel:v1ServiceKind:V1Service :: V1Service -> Maybe Text
$sel:v1ServiceMetadata:V1Service :: V1Service -> Maybe V1ObjectMeta
$sel:v1ServiceSpec:V1Service :: V1Service -> Maybe V1ServiceSpec
$sel:v1ServiceStatus:V1Service :: V1Service -> Maybe V1ServiceStatus
v1ServiceApiVersion :: Maybe Text
v1ServiceKind :: Maybe Text
v1ServiceMetadata :: Maybe V1ObjectMeta
v1ServiceSpec :: Maybe V1ServiceSpec
v1ServiceStatus :: Maybe V1ServiceStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ServiceApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ServiceKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1ServiceMetadata
      , Key
"spec" Key -> Maybe V1ServiceSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ServiceSpec
v1ServiceSpec
      , Key
"status" Key -> Maybe V1ServiceStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ServiceStatus
v1ServiceStatus
      ]


-- | Construct a value of type 'V1Service' (by applying it's required fields, if any)
mkV1Service
  :: V1Service
mkV1Service :: V1Service
mkV1Service =
  V1Service
  { $sel:v1ServiceApiVersion:V1Service :: Maybe Text
v1ServiceApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ServiceKind:V1Service :: Maybe Text
v1ServiceKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ServiceMetadata:V1Service :: Maybe V1ObjectMeta
v1ServiceMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1ServiceSpec:V1Service :: Maybe V1ServiceSpec
v1ServiceSpec = Maybe V1ServiceSpec
forall a. Maybe a
Nothing
  , $sel:v1ServiceStatus:V1Service :: Maybe V1ServiceStatus
v1ServiceStatus = Maybe V1ServiceStatus
forall a. Maybe a
Nothing
  }

-- ** V1ServiceAccount
-- | V1ServiceAccount
-- ServiceAccount binds together: * a name, understood by users, and perhaps by peripheral systems, for an identity * a principal that can be authenticated and authorized * a set of secrets
data V1ServiceAccount = V1ServiceAccount
  { V1ServiceAccount -> Maybe Text
v1ServiceAccountApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1ServiceAccount -> Maybe Bool
v1ServiceAccountAutomountServiceAccountToken :: !(Maybe Bool) -- ^ "automountServiceAccountToken" - AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. Can be overridden at the pod level.
  , V1ServiceAccount -> Maybe [V1LocalObjectReference]
v1ServiceAccountImagePullSecrets :: !(Maybe [V1LocalObjectReference]) -- ^ "imagePullSecrets" - ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
  , V1ServiceAccount -> Maybe Text
v1ServiceAccountKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1ServiceAccount -> Maybe V1ObjectMeta
v1ServiceAccountMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1ServiceAccount -> Maybe [V1ObjectReference]
v1ServiceAccountSecrets :: !(Maybe [V1ObjectReference]) -- ^ "secrets" - Secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use. Pods are only limited to this list if this service account has a \&quot;kubernetes.io/enforce-mountable-secrets\&quot; annotation set to \&quot;true\&quot;. The \&quot;kubernetes.io/enforce-mountable-secrets\&quot; annotation is deprecated since v1.32. Prefer separate namespaces to isolate access to mounted secrets. This field should not be used to find auto-generated service account token secrets for use outside of pods. Instead, tokens can be requested directly using the TokenRequest API, or service account token secrets can be manually created. More info: https://kubernetes.io/docs/concepts/configuration/secret
  } deriving (Int -> V1ServiceAccount -> ShowS
[V1ServiceAccount] -> ShowS
V1ServiceAccount -> String
(Int -> V1ServiceAccount -> ShowS)
-> (V1ServiceAccount -> String)
-> ([V1ServiceAccount] -> ShowS)
-> Show V1ServiceAccount
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ServiceAccount -> ShowS
showsPrec :: Int -> V1ServiceAccount -> ShowS
$cshow :: V1ServiceAccount -> String
show :: V1ServiceAccount -> String
$cshowList :: [V1ServiceAccount] -> ShowS
showList :: [V1ServiceAccount] -> ShowS
P.Show, V1ServiceAccount -> V1ServiceAccount -> Bool
(V1ServiceAccount -> V1ServiceAccount -> Bool)
-> (V1ServiceAccount -> V1ServiceAccount -> Bool)
-> Eq V1ServiceAccount
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ServiceAccount -> V1ServiceAccount -> Bool
== :: V1ServiceAccount -> V1ServiceAccount -> Bool
$c/= :: V1ServiceAccount -> V1ServiceAccount -> Bool
/= :: V1ServiceAccount -> V1ServiceAccount -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ServiceAccount
instance A.FromJSON V1ServiceAccount where
  parseJSON :: Value -> Parser V1ServiceAccount
parseJSON = String
-> (Object -> Parser V1ServiceAccount)
-> Value
-> Parser V1ServiceAccount
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ServiceAccount" ((Object -> Parser V1ServiceAccount)
 -> Value -> Parser V1ServiceAccount)
-> (Object -> Parser V1ServiceAccount)
-> Value
-> Parser V1ServiceAccount
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Bool
-> Maybe [V1LocalObjectReference]
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe [V1ObjectReference]
-> V1ServiceAccount
V1ServiceAccount
      (Maybe Text
 -> Maybe Bool
 -> Maybe [V1LocalObjectReference]
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe [V1ObjectReference]
 -> V1ServiceAccount)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe [V1LocalObjectReference]
      -> Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe [V1ObjectReference]
      -> V1ServiceAccount)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Bool
   -> Maybe [V1LocalObjectReference]
   -> Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe [V1ObjectReference]
   -> V1ServiceAccount)
-> Parser (Maybe Bool)
-> Parser
     (Maybe [V1LocalObjectReference]
      -> Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe [V1ObjectReference]
      -> V1ServiceAccount)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"automountServiceAccountToken")
      Parser
  (Maybe [V1LocalObjectReference]
   -> Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe [V1ObjectReference]
   -> V1ServiceAccount)
-> Parser (Maybe [V1LocalObjectReference])
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe [V1ObjectReference]
      -> V1ServiceAccount)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1LocalObjectReference])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"imagePullSecrets")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe [V1ObjectReference]
   -> V1ServiceAccount)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe [V1ObjectReference] -> V1ServiceAccount)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe [V1ObjectReference] -> V1ServiceAccount)
-> Parser (Maybe V1ObjectMeta)
-> Parser (Maybe [V1ObjectReference] -> V1ServiceAccount)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (Maybe [V1ObjectReference] -> V1ServiceAccount)
-> Parser (Maybe [V1ObjectReference]) -> Parser V1ServiceAccount
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1ObjectReference])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"secrets")

-- | ToJSON V1ServiceAccount
instance A.ToJSON V1ServiceAccount where
  toJSON :: V1ServiceAccount -> Value
toJSON V1ServiceAccount {Maybe Bool
Maybe [V1ObjectReference]
Maybe [V1LocalObjectReference]
Maybe Text
Maybe V1ObjectMeta
$sel:v1ServiceAccountApiVersion:V1ServiceAccount :: V1ServiceAccount -> Maybe Text
$sel:v1ServiceAccountAutomountServiceAccountToken:V1ServiceAccount :: V1ServiceAccount -> Maybe Bool
$sel:v1ServiceAccountImagePullSecrets:V1ServiceAccount :: V1ServiceAccount -> Maybe [V1LocalObjectReference]
$sel:v1ServiceAccountKind:V1ServiceAccount :: V1ServiceAccount -> Maybe Text
$sel:v1ServiceAccountMetadata:V1ServiceAccount :: V1ServiceAccount -> Maybe V1ObjectMeta
$sel:v1ServiceAccountSecrets:V1ServiceAccount :: V1ServiceAccount -> Maybe [V1ObjectReference]
v1ServiceAccountApiVersion :: Maybe Text
v1ServiceAccountAutomountServiceAccountToken :: Maybe Bool
v1ServiceAccountImagePullSecrets :: Maybe [V1LocalObjectReference]
v1ServiceAccountKind :: Maybe Text
v1ServiceAccountMetadata :: Maybe V1ObjectMeta
v1ServiceAccountSecrets :: Maybe [V1ObjectReference]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ServiceAccountApiVersion
      , Key
"automountServiceAccountToken" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1ServiceAccountAutomountServiceAccountToken
      , Key
"imagePullSecrets" Key -> Maybe [V1LocalObjectReference] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1LocalObjectReference]
v1ServiceAccountImagePullSecrets
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ServiceAccountKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1ServiceAccountMetadata
      , Key
"secrets" Key -> Maybe [V1ObjectReference] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1ObjectReference]
v1ServiceAccountSecrets
      ]


-- | Construct a value of type 'V1ServiceAccount' (by applying it's required fields, if any)
mkV1ServiceAccount
  :: V1ServiceAccount
mkV1ServiceAccount :: V1ServiceAccount
mkV1ServiceAccount =
  V1ServiceAccount
  { $sel:v1ServiceAccountApiVersion:V1ServiceAccount :: Maybe Text
v1ServiceAccountApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ServiceAccountAutomountServiceAccountToken:V1ServiceAccount :: Maybe Bool
v1ServiceAccountAutomountServiceAccountToken = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1ServiceAccountImagePullSecrets:V1ServiceAccount :: Maybe [V1LocalObjectReference]
v1ServiceAccountImagePullSecrets = Maybe [V1LocalObjectReference]
forall a. Maybe a
Nothing
  , $sel:v1ServiceAccountKind:V1ServiceAccount :: Maybe Text
v1ServiceAccountKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ServiceAccountMetadata:V1ServiceAccount :: Maybe V1ObjectMeta
v1ServiceAccountMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1ServiceAccountSecrets:V1ServiceAccount :: Maybe [V1ObjectReference]
v1ServiceAccountSecrets = Maybe [V1ObjectReference]
forall a. Maybe a
Nothing
  }

-- ** V1ServiceAccountList
-- | V1ServiceAccountList
-- ServiceAccountList is a list of ServiceAccount objects
data V1ServiceAccountList = V1ServiceAccountList
  { V1ServiceAccountList -> Maybe Text
v1ServiceAccountListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1ServiceAccountList -> [V1ServiceAccount]
v1ServiceAccountListItems :: !([V1ServiceAccount]) -- ^ /Required/ "items" - List of ServiceAccounts. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
  , V1ServiceAccountList -> Maybe Text
v1ServiceAccountListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1ServiceAccountList -> Maybe V1ListMeta
v1ServiceAccountListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1ServiceAccountList -> ShowS
[V1ServiceAccountList] -> ShowS
V1ServiceAccountList -> String
(Int -> V1ServiceAccountList -> ShowS)
-> (V1ServiceAccountList -> String)
-> ([V1ServiceAccountList] -> ShowS)
-> Show V1ServiceAccountList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ServiceAccountList -> ShowS
showsPrec :: Int -> V1ServiceAccountList -> ShowS
$cshow :: V1ServiceAccountList -> String
show :: V1ServiceAccountList -> String
$cshowList :: [V1ServiceAccountList] -> ShowS
showList :: [V1ServiceAccountList] -> ShowS
P.Show, V1ServiceAccountList -> V1ServiceAccountList -> Bool
(V1ServiceAccountList -> V1ServiceAccountList -> Bool)
-> (V1ServiceAccountList -> V1ServiceAccountList -> Bool)
-> Eq V1ServiceAccountList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ServiceAccountList -> V1ServiceAccountList -> Bool
== :: V1ServiceAccountList -> V1ServiceAccountList -> Bool
$c/= :: V1ServiceAccountList -> V1ServiceAccountList -> Bool
/= :: V1ServiceAccountList -> V1ServiceAccountList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ServiceAccountList
instance A.FromJSON V1ServiceAccountList where
  parseJSON :: Value -> Parser V1ServiceAccountList
parseJSON = String
-> (Object -> Parser V1ServiceAccountList)
-> Value
-> Parser V1ServiceAccountList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ServiceAccountList" ((Object -> Parser V1ServiceAccountList)
 -> Value -> Parser V1ServiceAccountList)
-> (Object -> Parser V1ServiceAccountList)
-> Value
-> Parser V1ServiceAccountList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1ServiceAccount]
-> Maybe Text
-> Maybe V1ListMeta
-> V1ServiceAccountList
V1ServiceAccountList
      (Maybe Text
 -> [V1ServiceAccount]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1ServiceAccountList)
-> Parser (Maybe Text)
-> Parser
     ([V1ServiceAccount]
      -> Maybe Text -> Maybe V1ListMeta -> V1ServiceAccountList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1ServiceAccount]
   -> Maybe Text -> Maybe V1ListMeta -> V1ServiceAccountList)
-> Parser [V1ServiceAccount]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1ServiceAccountList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1ServiceAccount]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1ServiceAccountList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1ServiceAccountList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1ServiceAccountList)
-> Parser (Maybe V1ListMeta) -> Parser V1ServiceAccountList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1ServiceAccountList
instance A.ToJSON V1ServiceAccountList where
  toJSON :: V1ServiceAccountList -> Value
toJSON V1ServiceAccountList {[V1ServiceAccount]
Maybe Text
Maybe V1ListMeta
$sel:v1ServiceAccountListApiVersion:V1ServiceAccountList :: V1ServiceAccountList -> Maybe Text
$sel:v1ServiceAccountListItems:V1ServiceAccountList :: V1ServiceAccountList -> [V1ServiceAccount]
$sel:v1ServiceAccountListKind:V1ServiceAccountList :: V1ServiceAccountList -> Maybe Text
$sel:v1ServiceAccountListMetadata:V1ServiceAccountList :: V1ServiceAccountList -> Maybe V1ListMeta
v1ServiceAccountListApiVersion :: Maybe Text
v1ServiceAccountListItems :: [V1ServiceAccount]
v1ServiceAccountListKind :: Maybe Text
v1ServiceAccountListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ServiceAccountListApiVersion
      , Key
"items" Key -> [V1ServiceAccount] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1ServiceAccount]
v1ServiceAccountListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ServiceAccountListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1ServiceAccountListMetadata
      ]


-- | Construct a value of type 'V1ServiceAccountList' (by applying it's required fields, if any)
mkV1ServiceAccountList
  :: [V1ServiceAccount] -- ^ 'v1ServiceAccountListItems': List of ServiceAccounts. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
  -> V1ServiceAccountList
mkV1ServiceAccountList :: [V1ServiceAccount] -> V1ServiceAccountList
mkV1ServiceAccountList [V1ServiceAccount]
v1ServiceAccountListItems =
  V1ServiceAccountList
  { $sel:v1ServiceAccountListApiVersion:V1ServiceAccountList :: Maybe Text
v1ServiceAccountListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1ServiceAccount]
$sel:v1ServiceAccountListItems:V1ServiceAccountList :: [V1ServiceAccount]
v1ServiceAccountListItems :: [V1ServiceAccount]
v1ServiceAccountListItems
  , $sel:v1ServiceAccountListKind:V1ServiceAccountList :: Maybe Text
v1ServiceAccountListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ServiceAccountListMetadata:V1ServiceAccountList :: Maybe V1ListMeta
v1ServiceAccountListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1ServiceAccountSubject
-- | V1ServiceAccountSubject
-- ServiceAccountSubject holds detailed information for service-account-kind subject.
data V1ServiceAccountSubject = V1ServiceAccountSubject
  { V1ServiceAccountSubject -> Text
v1ServiceAccountSubjectName :: !(Text) -- ^ /Required/ "name" - &#x60;name&#x60; is the name of matching ServiceAccount objects, or \&quot;*\&quot; to match regardless of name. Required.
  , V1ServiceAccountSubject -> Text
v1ServiceAccountSubjectNamespace :: !(Text) -- ^ /Required/ "namespace" - &#x60;namespace&#x60; is the namespace of matching ServiceAccount objects. Required.
  } deriving (Int -> V1ServiceAccountSubject -> ShowS
[V1ServiceAccountSubject] -> ShowS
V1ServiceAccountSubject -> String
(Int -> V1ServiceAccountSubject -> ShowS)
-> (V1ServiceAccountSubject -> String)
-> ([V1ServiceAccountSubject] -> ShowS)
-> Show V1ServiceAccountSubject
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ServiceAccountSubject -> ShowS
showsPrec :: Int -> V1ServiceAccountSubject -> ShowS
$cshow :: V1ServiceAccountSubject -> String
show :: V1ServiceAccountSubject -> String
$cshowList :: [V1ServiceAccountSubject] -> ShowS
showList :: [V1ServiceAccountSubject] -> ShowS
P.Show, V1ServiceAccountSubject -> V1ServiceAccountSubject -> Bool
(V1ServiceAccountSubject -> V1ServiceAccountSubject -> Bool)
-> (V1ServiceAccountSubject -> V1ServiceAccountSubject -> Bool)
-> Eq V1ServiceAccountSubject
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ServiceAccountSubject -> V1ServiceAccountSubject -> Bool
== :: V1ServiceAccountSubject -> V1ServiceAccountSubject -> Bool
$c/= :: V1ServiceAccountSubject -> V1ServiceAccountSubject -> Bool
/= :: V1ServiceAccountSubject -> V1ServiceAccountSubject -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ServiceAccountSubject
instance A.FromJSON V1ServiceAccountSubject where
  parseJSON :: Value -> Parser V1ServiceAccountSubject
parseJSON = String
-> (Object -> Parser V1ServiceAccountSubject)
-> Value
-> Parser V1ServiceAccountSubject
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ServiceAccountSubject" ((Object -> Parser V1ServiceAccountSubject)
 -> Value -> Parser V1ServiceAccountSubject)
-> (Object -> Parser V1ServiceAccountSubject)
-> Value
-> Parser V1ServiceAccountSubject
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Text -> V1ServiceAccountSubject
V1ServiceAccountSubject
      (Text -> Text -> V1ServiceAccountSubject)
-> Parser Text -> Parser (Text -> V1ServiceAccountSubject)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser (Text -> V1ServiceAccountSubject)
-> Parser Text -> Parser V1ServiceAccountSubject
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"namespace")

-- | ToJSON V1ServiceAccountSubject
instance A.ToJSON V1ServiceAccountSubject where
  toJSON :: V1ServiceAccountSubject -> Value
toJSON V1ServiceAccountSubject {Text
$sel:v1ServiceAccountSubjectName:V1ServiceAccountSubject :: V1ServiceAccountSubject -> Text
$sel:v1ServiceAccountSubjectNamespace:V1ServiceAccountSubject :: V1ServiceAccountSubject -> Text
v1ServiceAccountSubjectName :: Text
v1ServiceAccountSubjectNamespace :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ServiceAccountSubjectName
      , Key
"namespace" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ServiceAccountSubjectNamespace
      ]


-- | Construct a value of type 'V1ServiceAccountSubject' (by applying it's required fields, if any)
mkV1ServiceAccountSubject
  :: Text -- ^ 'v1ServiceAccountSubjectName': `name` is the name of matching ServiceAccount objects, or \"*\" to match regardless of name. Required.
  -> Text -- ^ 'v1ServiceAccountSubjectNamespace': `namespace` is the namespace of matching ServiceAccount objects. Required.
  -> V1ServiceAccountSubject
mkV1ServiceAccountSubject :: Text -> Text -> V1ServiceAccountSubject
mkV1ServiceAccountSubject Text
v1ServiceAccountSubjectName Text
v1ServiceAccountSubjectNamespace =
  V1ServiceAccountSubject
  { Text
$sel:v1ServiceAccountSubjectName:V1ServiceAccountSubject :: Text
v1ServiceAccountSubjectName :: Text
v1ServiceAccountSubjectName
  , Text
$sel:v1ServiceAccountSubjectNamespace:V1ServiceAccountSubject :: Text
v1ServiceAccountSubjectNamespace :: Text
v1ServiceAccountSubjectNamespace
  }

-- ** V1ServiceAccountTokenProjection
-- | V1ServiceAccountTokenProjection
-- ServiceAccountTokenProjection represents a projected service account token volume. This projection can be used to insert a service account token into the pods runtime filesystem for use against APIs (Kubernetes API Server or otherwise).
data V1ServiceAccountTokenProjection = V1ServiceAccountTokenProjection
  { V1ServiceAccountTokenProjection -> Maybe Text
v1ServiceAccountTokenProjectionAudience :: !(Maybe Text) -- ^ "audience" - audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver.
  , V1ServiceAccountTokenProjection -> Maybe Integer
v1ServiceAccountTokenProjectionExpirationSeconds :: !(Maybe Integer) -- ^ "expirationSeconds" - expirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes.
  , V1ServiceAccountTokenProjection -> Text
v1ServiceAccountTokenProjectionPath :: !(Text) -- ^ /Required/ "path" - path is the path relative to the mount point of the file to project the token into.
  } deriving (Int -> V1ServiceAccountTokenProjection -> ShowS
[V1ServiceAccountTokenProjection] -> ShowS
V1ServiceAccountTokenProjection -> String
(Int -> V1ServiceAccountTokenProjection -> ShowS)
-> (V1ServiceAccountTokenProjection -> String)
-> ([V1ServiceAccountTokenProjection] -> ShowS)
-> Show V1ServiceAccountTokenProjection
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ServiceAccountTokenProjection -> ShowS
showsPrec :: Int -> V1ServiceAccountTokenProjection -> ShowS
$cshow :: V1ServiceAccountTokenProjection -> String
show :: V1ServiceAccountTokenProjection -> String
$cshowList :: [V1ServiceAccountTokenProjection] -> ShowS
showList :: [V1ServiceAccountTokenProjection] -> ShowS
P.Show, V1ServiceAccountTokenProjection
-> V1ServiceAccountTokenProjection -> Bool
(V1ServiceAccountTokenProjection
 -> V1ServiceAccountTokenProjection -> Bool)
-> (V1ServiceAccountTokenProjection
    -> V1ServiceAccountTokenProjection -> Bool)
-> Eq V1ServiceAccountTokenProjection
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ServiceAccountTokenProjection
-> V1ServiceAccountTokenProjection -> Bool
== :: V1ServiceAccountTokenProjection
-> V1ServiceAccountTokenProjection -> Bool
$c/= :: V1ServiceAccountTokenProjection
-> V1ServiceAccountTokenProjection -> Bool
/= :: V1ServiceAccountTokenProjection
-> V1ServiceAccountTokenProjection -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ServiceAccountTokenProjection
instance A.FromJSON V1ServiceAccountTokenProjection where
  parseJSON :: Value -> Parser V1ServiceAccountTokenProjection
parseJSON = String
-> (Object -> Parser V1ServiceAccountTokenProjection)
-> Value
-> Parser V1ServiceAccountTokenProjection
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ServiceAccountTokenProjection" ((Object -> Parser V1ServiceAccountTokenProjection)
 -> Value -> Parser V1ServiceAccountTokenProjection)
-> (Object -> Parser V1ServiceAccountTokenProjection)
-> Value
-> Parser V1ServiceAccountTokenProjection
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Integer -> Text -> V1ServiceAccountTokenProjection
V1ServiceAccountTokenProjection
      (Maybe Text
 -> Maybe Integer -> Text -> V1ServiceAccountTokenProjection)
-> Parser (Maybe Text)
-> Parser
     (Maybe Integer -> Text -> V1ServiceAccountTokenProjection)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"audience")
      Parser (Maybe Integer -> Text -> V1ServiceAccountTokenProjection)
-> Parser (Maybe Integer)
-> Parser (Text -> V1ServiceAccountTokenProjection)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"expirationSeconds")
      Parser (Text -> V1ServiceAccountTokenProjection)
-> Parser Text -> Parser V1ServiceAccountTokenProjection
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"path")

-- | ToJSON V1ServiceAccountTokenProjection
instance A.ToJSON V1ServiceAccountTokenProjection where
  toJSON :: V1ServiceAccountTokenProjection -> Value
toJSON V1ServiceAccountTokenProjection {Maybe Integer
Maybe Text
Text
$sel:v1ServiceAccountTokenProjectionAudience:V1ServiceAccountTokenProjection :: V1ServiceAccountTokenProjection -> Maybe Text
$sel:v1ServiceAccountTokenProjectionExpirationSeconds:V1ServiceAccountTokenProjection :: V1ServiceAccountTokenProjection -> Maybe Integer
$sel:v1ServiceAccountTokenProjectionPath:V1ServiceAccountTokenProjection :: V1ServiceAccountTokenProjection -> Text
v1ServiceAccountTokenProjectionAudience :: Maybe Text
v1ServiceAccountTokenProjectionExpirationSeconds :: Maybe Integer
v1ServiceAccountTokenProjectionPath :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"audience" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ServiceAccountTokenProjectionAudience
      , Key
"expirationSeconds" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1ServiceAccountTokenProjectionExpirationSeconds
      , Key
"path" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ServiceAccountTokenProjectionPath
      ]


-- | Construct a value of type 'V1ServiceAccountTokenProjection' (by applying it's required fields, if any)
mkV1ServiceAccountTokenProjection
  :: Text -- ^ 'v1ServiceAccountTokenProjectionPath': path is the path relative to the mount point of the file to project the token into.
  -> V1ServiceAccountTokenProjection
mkV1ServiceAccountTokenProjection :: Text -> V1ServiceAccountTokenProjection
mkV1ServiceAccountTokenProjection Text
v1ServiceAccountTokenProjectionPath =
  V1ServiceAccountTokenProjection
  { $sel:v1ServiceAccountTokenProjectionAudience:V1ServiceAccountTokenProjection :: Maybe Text
v1ServiceAccountTokenProjectionAudience = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ServiceAccountTokenProjectionExpirationSeconds:V1ServiceAccountTokenProjection :: Maybe Integer
v1ServiceAccountTokenProjectionExpirationSeconds = Maybe Integer
forall a. Maybe a
Nothing
  , Text
$sel:v1ServiceAccountTokenProjectionPath:V1ServiceAccountTokenProjection :: Text
v1ServiceAccountTokenProjectionPath :: Text
v1ServiceAccountTokenProjectionPath
  }

-- ** V1ServiceBackendPort
-- | V1ServiceBackendPort
-- ServiceBackendPort is the service port being referenced.
data V1ServiceBackendPort = V1ServiceBackendPort
  { V1ServiceBackendPort -> Maybe Text
v1ServiceBackendPortName :: !(Maybe Text) -- ^ "name" - name is the name of the port on the Service. This is a mutually exclusive setting with \&quot;Number\&quot;.
  , V1ServiceBackendPort -> Maybe Int
v1ServiceBackendPortNumber :: !(Maybe Int) -- ^ "number" - number is the numerical port number (e.g. 80) on the Service. This is a mutually exclusive setting with \&quot;Name\&quot;.
  } deriving (Int -> V1ServiceBackendPort -> ShowS
[V1ServiceBackendPort] -> ShowS
V1ServiceBackendPort -> String
(Int -> V1ServiceBackendPort -> ShowS)
-> (V1ServiceBackendPort -> String)
-> ([V1ServiceBackendPort] -> ShowS)
-> Show V1ServiceBackendPort
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ServiceBackendPort -> ShowS
showsPrec :: Int -> V1ServiceBackendPort -> ShowS
$cshow :: V1ServiceBackendPort -> String
show :: V1ServiceBackendPort -> String
$cshowList :: [V1ServiceBackendPort] -> ShowS
showList :: [V1ServiceBackendPort] -> ShowS
P.Show, V1ServiceBackendPort -> V1ServiceBackendPort -> Bool
(V1ServiceBackendPort -> V1ServiceBackendPort -> Bool)
-> (V1ServiceBackendPort -> V1ServiceBackendPort -> Bool)
-> Eq V1ServiceBackendPort
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ServiceBackendPort -> V1ServiceBackendPort -> Bool
== :: V1ServiceBackendPort -> V1ServiceBackendPort -> Bool
$c/= :: V1ServiceBackendPort -> V1ServiceBackendPort -> Bool
/= :: V1ServiceBackendPort -> V1ServiceBackendPort -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ServiceBackendPort
instance A.FromJSON V1ServiceBackendPort where
  parseJSON :: Value -> Parser V1ServiceBackendPort
parseJSON = String
-> (Object -> Parser V1ServiceBackendPort)
-> Value
-> Parser V1ServiceBackendPort
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ServiceBackendPort" ((Object -> Parser V1ServiceBackendPort)
 -> Value -> Parser V1ServiceBackendPort)
-> (Object -> Parser V1ServiceBackendPort)
-> Value
-> Parser V1ServiceBackendPort
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Maybe Int -> V1ServiceBackendPort
V1ServiceBackendPort
      (Maybe Text -> Maybe Int -> V1ServiceBackendPort)
-> Parser (Maybe Text)
-> Parser (Maybe Int -> V1ServiceBackendPort)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"name")
      Parser (Maybe Int -> V1ServiceBackendPort)
-> Parser (Maybe Int) -> Parser V1ServiceBackendPort
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"number")

-- | ToJSON V1ServiceBackendPort
instance A.ToJSON V1ServiceBackendPort where
  toJSON :: V1ServiceBackendPort -> Value
toJSON V1ServiceBackendPort {Maybe Int
Maybe Text
$sel:v1ServiceBackendPortName:V1ServiceBackendPort :: V1ServiceBackendPort -> Maybe Text
$sel:v1ServiceBackendPortNumber:V1ServiceBackendPort :: V1ServiceBackendPort -> Maybe Int
v1ServiceBackendPortName :: Maybe Text
v1ServiceBackendPortNumber :: Maybe Int
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"name" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ServiceBackendPortName
      , Key
"number" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1ServiceBackendPortNumber
      ]


-- | Construct a value of type 'V1ServiceBackendPort' (by applying it's required fields, if any)
mkV1ServiceBackendPort
  :: V1ServiceBackendPort
mkV1ServiceBackendPort :: V1ServiceBackendPort
mkV1ServiceBackendPort =
  V1ServiceBackendPort
  { $sel:v1ServiceBackendPortName:V1ServiceBackendPort :: Maybe Text
v1ServiceBackendPortName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ServiceBackendPortNumber:V1ServiceBackendPort :: Maybe Int
v1ServiceBackendPortNumber = Maybe Int
forall a. Maybe a
Nothing
  }

-- ** V1ServiceList
-- | V1ServiceList
-- ServiceList holds a list of services.
data V1ServiceList = V1ServiceList
  { V1ServiceList -> Maybe Text
v1ServiceListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1ServiceList -> [V1Service]
v1ServiceListItems :: !([V1Service]) -- ^ /Required/ "items" - List of services
  , V1ServiceList -> Maybe Text
v1ServiceListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1ServiceList -> Maybe V1ListMeta
v1ServiceListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1ServiceList -> ShowS
[V1ServiceList] -> ShowS
V1ServiceList -> String
(Int -> V1ServiceList -> ShowS)
-> (V1ServiceList -> String)
-> ([V1ServiceList] -> ShowS)
-> Show V1ServiceList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ServiceList -> ShowS
showsPrec :: Int -> V1ServiceList -> ShowS
$cshow :: V1ServiceList -> String
show :: V1ServiceList -> String
$cshowList :: [V1ServiceList] -> ShowS
showList :: [V1ServiceList] -> ShowS
P.Show, V1ServiceList -> V1ServiceList -> Bool
(V1ServiceList -> V1ServiceList -> Bool)
-> (V1ServiceList -> V1ServiceList -> Bool) -> Eq V1ServiceList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ServiceList -> V1ServiceList -> Bool
== :: V1ServiceList -> V1ServiceList -> Bool
$c/= :: V1ServiceList -> V1ServiceList -> Bool
/= :: V1ServiceList -> V1ServiceList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ServiceList
instance A.FromJSON V1ServiceList where
  parseJSON :: Value -> Parser V1ServiceList
parseJSON = String
-> (Object -> Parser V1ServiceList)
-> Value
-> Parser V1ServiceList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ServiceList" ((Object -> Parser V1ServiceList) -> Value -> Parser V1ServiceList)
-> (Object -> Parser V1ServiceList)
-> Value
-> Parser V1ServiceList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1Service] -> Maybe Text -> Maybe V1ListMeta -> V1ServiceList
V1ServiceList
      (Maybe Text
 -> [V1Service] -> Maybe Text -> Maybe V1ListMeta -> V1ServiceList)
-> Parser (Maybe Text)
-> Parser
     ([V1Service] -> Maybe Text -> Maybe V1ListMeta -> V1ServiceList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1Service] -> Maybe Text -> Maybe V1ListMeta -> V1ServiceList)
-> Parser [V1Service]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1ServiceList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1Service]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1ServiceList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1ServiceList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1ServiceList)
-> Parser (Maybe V1ListMeta) -> Parser V1ServiceList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1ServiceList
instance A.ToJSON V1ServiceList where
  toJSON :: V1ServiceList -> Value
toJSON V1ServiceList {[V1Service]
Maybe Text
Maybe V1ListMeta
$sel:v1ServiceListApiVersion:V1ServiceList :: V1ServiceList -> Maybe Text
$sel:v1ServiceListItems:V1ServiceList :: V1ServiceList -> [V1Service]
$sel:v1ServiceListKind:V1ServiceList :: V1ServiceList -> Maybe Text
$sel:v1ServiceListMetadata:V1ServiceList :: V1ServiceList -> Maybe V1ListMeta
v1ServiceListApiVersion :: Maybe Text
v1ServiceListItems :: [V1Service]
v1ServiceListKind :: Maybe Text
v1ServiceListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ServiceListApiVersion
      , Key
"items" Key -> [V1Service] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1Service]
v1ServiceListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ServiceListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1ServiceListMetadata
      ]


-- | Construct a value of type 'V1ServiceList' (by applying it's required fields, if any)
mkV1ServiceList
  :: [V1Service] -- ^ 'v1ServiceListItems': List of services
  -> V1ServiceList
mkV1ServiceList :: [V1Service] -> V1ServiceList
mkV1ServiceList [V1Service]
v1ServiceListItems =
  V1ServiceList
  { $sel:v1ServiceListApiVersion:V1ServiceList :: Maybe Text
v1ServiceListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1Service]
$sel:v1ServiceListItems:V1ServiceList :: [V1Service]
v1ServiceListItems :: [V1Service]
v1ServiceListItems
  , $sel:v1ServiceListKind:V1ServiceList :: Maybe Text
v1ServiceListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ServiceListMetadata:V1ServiceList :: Maybe V1ListMeta
v1ServiceListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1ServicePort
-- | V1ServicePort
-- ServicePort contains information on service's port.
data V1ServicePort = V1ServicePort
  { V1ServicePort -> Maybe Text
v1ServicePortAppProtocol :: !(Maybe Text) -- ^ "appProtocol" - The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either:  * Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names).  * Kubernetes-defined prefixed names:   * &#39;kubernetes.io/h2c&#39; - HTTP/2 prior knowledge over cleartext as described in https://www.rfc-editor.org/rfc/rfc9113.html#name-starting-http-2-with-prior-   * &#39;kubernetes.io/ws&#39;  - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455   * &#39;kubernetes.io/wss&#39; - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455  * Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol.
  , V1ServicePort -> Maybe Text
v1ServicePortName :: !(Maybe Text) -- ^ "name" - The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. When considering the endpoints for a Service, this must match the &#39;name&#39; field in the EndpointPort. Optional if only one ServicePort is defined on this service.
  , V1ServicePort -> Maybe Int
v1ServicePortNodePort :: !(Maybe Int) -- ^ "nodePort" - The port on each node on which this service is exposed when type is NodePort or LoadBalancer.  Usually assigned by the system. If a value is specified, in-range, and not in use it will be used, otherwise the operation will fail.  If not specified, a port will be allocated if this Service requires one.  If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
  , V1ServicePort -> Int
v1ServicePortPort :: !(Int) -- ^ /Required/ "port" - The port that will be exposed by this service.
  , V1ServicePort -> Maybe Text
v1ServicePortProtocol :: !(Maybe Text) -- ^ "protocol" - The IP protocol for this port. Supports \&quot;TCP\&quot;, \&quot;UDP\&quot;, and \&quot;SCTP\&quot;. Default is TCP.
  , V1ServicePort -> Maybe IntOrString
v1ServicePortTargetPort :: !(Maybe IntOrString) -- ^ "targetPort"
  } deriving (Int -> V1ServicePort -> ShowS
[V1ServicePort] -> ShowS
V1ServicePort -> String
(Int -> V1ServicePort -> ShowS)
-> (V1ServicePort -> String)
-> ([V1ServicePort] -> ShowS)
-> Show V1ServicePort
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ServicePort -> ShowS
showsPrec :: Int -> V1ServicePort -> ShowS
$cshow :: V1ServicePort -> String
show :: V1ServicePort -> String
$cshowList :: [V1ServicePort] -> ShowS
showList :: [V1ServicePort] -> ShowS
P.Show, V1ServicePort -> V1ServicePort -> Bool
(V1ServicePort -> V1ServicePort -> Bool)
-> (V1ServicePort -> V1ServicePort -> Bool) -> Eq V1ServicePort
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ServicePort -> V1ServicePort -> Bool
== :: V1ServicePort -> V1ServicePort -> Bool
$c/= :: V1ServicePort -> V1ServicePort -> Bool
/= :: V1ServicePort -> V1ServicePort -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ServicePort
instance A.FromJSON V1ServicePort where
  parseJSON :: Value -> Parser V1ServicePort
parseJSON = String
-> (Object -> Parser V1ServicePort)
-> Value
-> Parser V1ServicePort
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ServicePort" ((Object -> Parser V1ServicePort) -> Value -> Parser V1ServicePort)
-> (Object -> Parser V1ServicePort)
-> Value
-> Parser V1ServicePort
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe Int
-> Int
-> Maybe Text
-> Maybe IntOrString
-> V1ServicePort
V1ServicePort
      (Maybe Text
 -> Maybe Text
 -> Maybe Int
 -> Int
 -> Maybe Text
 -> Maybe IntOrString
 -> V1ServicePort)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Int
      -> Maybe Text
      -> Maybe IntOrString
      -> V1ServicePort)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"appProtocol")
      Parser
  (Maybe Text
   -> Maybe Int
   -> Int
   -> Maybe Text
   -> Maybe IntOrString
   -> V1ServicePort)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Int -> Maybe Text -> Maybe IntOrString -> V1ServicePort)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"name")
      Parser
  (Maybe Int
   -> Int -> Maybe Text -> Maybe IntOrString -> V1ServicePort)
-> Parser (Maybe Int)
-> Parser (Int -> Maybe Text -> Maybe IntOrString -> V1ServicePort)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nodePort")
      Parser (Int -> Maybe Text -> Maybe IntOrString -> V1ServicePort)
-> Parser Int
-> Parser (Maybe Text -> Maybe IntOrString -> V1ServicePort)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"port")
      Parser (Maybe Text -> Maybe IntOrString -> V1ServicePort)
-> Parser (Maybe Text)
-> Parser (Maybe IntOrString -> V1ServicePort)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"protocol")
      Parser (Maybe IntOrString -> V1ServicePort)
-> Parser (Maybe IntOrString) -> Parser V1ServicePort
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe IntOrString)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"targetPort")

-- | ToJSON V1ServicePort
instance A.ToJSON V1ServicePort where
  toJSON :: V1ServicePort -> Value
toJSON V1ServicePort {Int
Maybe Int
Maybe Text
Maybe IntOrString
$sel:v1ServicePortAppProtocol:V1ServicePort :: V1ServicePort -> Maybe Text
$sel:v1ServicePortName:V1ServicePort :: V1ServicePort -> Maybe Text
$sel:v1ServicePortNodePort:V1ServicePort :: V1ServicePort -> Maybe Int
$sel:v1ServicePortPort:V1ServicePort :: V1ServicePort -> Int
$sel:v1ServicePortProtocol:V1ServicePort :: V1ServicePort -> Maybe Text
$sel:v1ServicePortTargetPort:V1ServicePort :: V1ServicePort -> Maybe IntOrString
v1ServicePortAppProtocol :: Maybe Text
v1ServicePortName :: Maybe Text
v1ServicePortNodePort :: Maybe Int
v1ServicePortPort :: Int
v1ServicePortProtocol :: Maybe Text
v1ServicePortTargetPort :: Maybe IntOrString
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"appProtocol" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ServicePortAppProtocol
      , Key
"name" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ServicePortName
      , Key
"nodePort" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1ServicePortNodePort
      , Key
"port" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v1ServicePortPort
      , Key
"protocol" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ServicePortProtocol
      , Key
"targetPort" Key -> Maybe IntOrString -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe IntOrString
v1ServicePortTargetPort
      ]


-- | Construct a value of type 'V1ServicePort' (by applying it's required fields, if any)
mkV1ServicePort
  :: Int -- ^ 'v1ServicePortPort': The port that will be exposed by this service.
  -> V1ServicePort
mkV1ServicePort :: Int -> V1ServicePort
mkV1ServicePort Int
v1ServicePortPort =
  V1ServicePort
  { $sel:v1ServicePortAppProtocol:V1ServicePort :: Maybe Text
v1ServicePortAppProtocol = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ServicePortName:V1ServicePort :: Maybe Text
v1ServicePortName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ServicePortNodePort:V1ServicePort :: Maybe Int
v1ServicePortNodePort = Maybe Int
forall a. Maybe a
Nothing
  , Int
$sel:v1ServicePortPort:V1ServicePort :: Int
v1ServicePortPort :: Int
v1ServicePortPort
  , $sel:v1ServicePortProtocol:V1ServicePort :: Maybe Text
v1ServicePortProtocol = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ServicePortTargetPort:V1ServicePort :: Maybe IntOrString
v1ServicePortTargetPort = Maybe IntOrString
forall a. Maybe a
Nothing
  }

-- ** V1ServiceSpec
-- | V1ServiceSpec
-- ServiceSpec describes the attributes that a user creates on a service.
data V1ServiceSpec = V1ServiceSpec
  { V1ServiceSpec -> Maybe Bool
v1ServiceSpecAllocateLoadBalancerNodePorts :: !(Maybe Bool) -- ^ "allocateLoadBalancerNodePorts" - allocateLoadBalancerNodePorts defines if NodePorts will be automatically allocated for services with type LoadBalancer.  Default is \&quot;true\&quot;. It may be set to \&quot;false\&quot; if the cluster load-balancer does not rely on NodePorts.  If the caller requests specific NodePorts (by specifying a value), those requests will be respected, regardless of this field. This field may only be set for services with type LoadBalancer and will be cleared if the type is changed to any other type.
  , V1ServiceSpec -> Maybe Text
v1ServiceSpecClusterIp :: !(Maybe Text) -- ^ "clusterIP" - clusterIP is the IP address of the service and is usually assigned randomly. If an address is specified manually, is in-range (as per system configuration), and is not in use, it will be allocated to the service; otherwise creation of the service will fail. This field may not be changed through updates unless the type field is also being changed to ExternalName (which requires this field to be blank) or the type field is being changed from ExternalName (in which case this field may optionally be specified, as describe above).  Valid values are \&quot;None\&quot;, empty string (\&quot;\&quot;), or a valid IP address. Setting this to \&quot;None\&quot; makes a \&quot;headless service\&quot; (no virtual IP), which is useful when direct endpoint connections are preferred and proxying is not required.  Only applies to types ClusterIP, NodePort, and LoadBalancer. If this field is specified when creating a Service of type ExternalName, creation will fail. This field will be wiped when updating a Service to type ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
  , V1ServiceSpec -> Maybe [Text]
v1ServiceSpecClusterIps :: !(Maybe [Text]) -- ^ "clusterIPs" - ClusterIPs is a list of IP addresses assigned to this service, and are usually assigned randomly.  If an address is specified manually, is in-range (as per system configuration), and is not in use, it will be allocated to the service; otherwise creation of the service will fail. This field may not be changed through updates unless the type field is also being changed to ExternalName (which requires this field to be empty) or the type field is being changed from ExternalName (in which case this field may optionally be specified, as describe above).  Valid values are \&quot;None\&quot;, empty string (\&quot;\&quot;), or a valid IP address.  Setting this to \&quot;None\&quot; makes a \&quot;headless service\&quot; (no virtual IP), which is useful when direct endpoint connections are preferred and proxying is not required.  Only applies to types ClusterIP, NodePort, and LoadBalancer. If this field is specified when creating a Service of type ExternalName, creation will fail. This field will be wiped when updating a Service to type ExternalName.  If this field is not specified, it will be initialized from the clusterIP field.  If this field is specified, clients must ensure that clusterIPs[0] and clusterIP have the same value.  This field may hold a maximum of two entries (dual-stack IPs, in either order). These IPs must correspond to the values of the ipFamilies field. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
  , V1ServiceSpec -> Maybe [Text]
v1ServiceSpecExternalIps :: !(Maybe [Text]) -- ^ "externalIPs" - externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service.  These IPs are not managed by Kubernetes.  The user is responsible for ensuring that traffic arrives at a node with this IP.  A common example is external load-balancers that are not part of the Kubernetes system.
  , V1ServiceSpec -> Maybe Text
v1ServiceSpecExternalName :: !(Maybe Text) -- ^ "externalName" - externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved.  Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires &#x60;type&#x60; to be \&quot;ExternalName\&quot;.
  , V1ServiceSpec -> Maybe Text
v1ServiceSpecExternalTrafficPolicy :: !(Maybe Text) -- ^ "externalTrafficPolicy" - externalTrafficPolicy describes how nodes distribute service traffic they receive on one of the Service&#39;s \&quot;externally-facing\&quot; addresses (NodePorts, ExternalIPs, and LoadBalancer IPs). If set to \&quot;Local\&quot;, the proxy will configure the service in a way that assumes that external load balancers will take care of balancing the service traffic between nodes, and so each node will deliver traffic only to the node-local endpoints of the service, without masquerading the client source IP. (Traffic mistakenly sent to a node with no endpoints will be dropped.) The default value, \&quot;Cluster\&quot;, uses the standard behavior of routing to all endpoints evenly (possibly modified by topology and other features). Note that traffic sent to an External IP or LoadBalancer IP from within the cluster will always get \&quot;Cluster\&quot; semantics, but clients sending to a NodePort from within the cluster may need to take traffic policy into account when picking a node.
  , V1ServiceSpec -> Maybe Int
v1ServiceSpecHealthCheckNodePort :: !(Maybe Int) -- ^ "healthCheckNodePort" - healthCheckNodePort specifies the healthcheck nodePort for the service. This only applies when type is set to LoadBalancer and externalTrafficPolicy is set to Local. If a value is specified, is in-range, and is not in use, it will be used.  If not specified, a value will be automatically allocated.  External systems (e.g. load-balancers) can use this port to determine if a given node holds endpoints for this service or not.  If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type). This field cannot be updated once set.
  , V1ServiceSpec -> Maybe Text
v1ServiceSpecInternalTrafficPolicy :: !(Maybe Text) -- ^ "internalTrafficPolicy" - InternalTrafficPolicy describes how nodes distribute service traffic they receive on the ClusterIP. If set to \&quot;Local\&quot;, the proxy will assume that pods only want to talk to endpoints of the service on the same node as the pod, dropping the traffic if there are no local endpoints. The default value, \&quot;Cluster\&quot;, uses the standard behavior of routing to all endpoints evenly (possibly modified by topology and other features).
  , V1ServiceSpec -> Maybe [Text]
v1ServiceSpecIpFamilies :: !(Maybe [Text]) -- ^ "ipFamilies" - IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this service. This field is usually assigned automatically based on cluster configuration and the ipFamilyPolicy field. If this field is specified manually, the requested family is available in the cluster, and ipFamilyPolicy allows it, it will be used; otherwise creation of the service will fail. This field is conditionally mutable: it allows for adding or removing a secondary IP family, but it does not allow changing the primary IP family of the Service. Valid values are \&quot;IPv4\&quot; and \&quot;IPv6\&quot;.  This field only applies to Services of types ClusterIP, NodePort, and LoadBalancer, and does apply to \&quot;headless\&quot; services. This field will be wiped when updating a Service to type ExternalName.  This field may hold a maximum of two entries (dual-stack families, in either order).  These families must correspond to the values of the clusterIPs field, if specified. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field.
  , V1ServiceSpec -> Maybe Text
v1ServiceSpecIpFamilyPolicy :: !(Maybe Text) -- ^ "ipFamilyPolicy" - IPFamilyPolicy represents the dual-stack-ness requested or required by this Service. If there is no value provided, then this field will be set to SingleStack. Services can be \&quot;SingleStack\&quot; (a single IP family), \&quot;PreferDualStack\&quot; (two IP families on dual-stack configured clusters or a single IP family on single-stack clusters), or \&quot;RequireDualStack\&quot; (two IP families on dual-stack configured clusters, otherwise fail). The ipFamilies and clusterIPs fields depend on the value of this field. This field will be wiped when updating a service to type ExternalName.
  , V1ServiceSpec -> Maybe Text
v1ServiceSpecLoadBalancerClass :: !(Maybe Text) -- ^ "loadBalancerClass" - loadBalancerClass is the class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix, e.g. \&quot;internal-vip\&quot; or \&quot;example.com/internal-vip\&quot;. Unprefixed names are reserved for end-users. This field can only be set when the Service type is &#39;LoadBalancer&#39;. If not set, the default load balancer implementation is used, today this is typically done through the cloud provider integration, but should apply for any default implementation. If set, it is assumed that a load balancer implementation is watching for Services with a matching class. Any default load balancer implementation (e.g. cloud providers) should ignore Services that set this field. This field can only be set when creating or updating a Service to type &#39;LoadBalancer&#39;. Once set, it can not be changed. This field will be wiped when a service is updated to a non &#39;LoadBalancer&#39; type.
  , V1ServiceSpec -> Maybe Text
v1ServiceSpecLoadBalancerIp :: !(Maybe Text) -- ^ "loadBalancerIP" - Only applies to Service Type: LoadBalancer. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. Deprecated: This field was under-specified and its meaning varies across implementations. Using it is non-portable and it may not support dual-stack. Users are encouraged to use implementation-specific annotations when available.
  , V1ServiceSpec -> Maybe [Text]
v1ServiceSpecLoadBalancerSourceRanges :: !(Maybe [Text]) -- ^ "loadBalancerSourceRanges" - If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature.\&quot; More info: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/
  , V1ServiceSpec -> Maybe [V1ServicePort]
v1ServiceSpecPorts :: !(Maybe [V1ServicePort]) -- ^ "ports" - The list of ports that are exposed by this service. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
  , V1ServiceSpec -> Maybe Bool
v1ServiceSpecPublishNotReadyAddresses :: !(Maybe Bool) -- ^ "publishNotReadyAddresses" - publishNotReadyAddresses indicates that any agent which deals with endpoints for this Service should disregard any indications of ready/not-ready. The primary use case for setting this field is for a StatefulSet&#39;s Headless Service to propagate SRV DNS records for its Pods for the purpose of peer discovery. The Kubernetes controllers that generate Endpoints and EndpointSlice resources for Services interpret this to mean that all endpoints are considered \&quot;ready\&quot; even if the Pods themselves are not. Agents which consume only Kubernetes generated endpoints through the Endpoints or EndpointSlice resources can safely assume this behavior.
  , V1ServiceSpec -> Maybe (Map String Text)
v1ServiceSpecSelector :: !(Maybe (Map.Map String Text)) -- ^ "selector" - Route service traffic to pods with label keys and values matching this selector. If empty or not present, the service is assumed to have an external process managing its endpoints, which Kubernetes will not modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/
  , V1ServiceSpec -> Maybe Text
v1ServiceSpecSessionAffinity :: !(Maybe Text) -- ^ "sessionAffinity" - Supports \&quot;ClientIP\&quot; and \&quot;None\&quot;. Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
  , V1ServiceSpec -> Maybe V1SessionAffinityConfig
v1ServiceSpecSessionAffinityConfig :: !(Maybe V1SessionAffinityConfig) -- ^ "sessionAffinityConfig"
  , V1ServiceSpec -> Maybe Text
v1ServiceSpecTrafficDistribution :: !(Maybe Text) -- ^ "trafficDistribution" - TrafficDistribution offers a way to express preferences for how traffic is distributed to Service endpoints. Implementations can use this field as a hint, but are not required to guarantee strict adherence. If the field is not set, the implementation will apply its default routing strategy. If set to \&quot;PreferClose\&quot;, implementations should prioritize endpoints that are topologically close (e.g., same zone). This is a beta field and requires enabling ServiceTrafficDistribution feature.
  , V1ServiceSpec -> Maybe Text
v1ServiceSpecType :: !(Maybe Text) -- ^ "type" - type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. \&quot;ClusterIP\&quot; allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object or EndpointSlice objects. If clusterIP is \&quot;None\&quot;, no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a virtual IP. \&quot;NodePort\&quot; builds on ClusterIP and allocates a port on every node which routes to the same endpoints as the clusterIP. \&quot;LoadBalancer\&quot; builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the same endpoints as the clusterIP. \&quot;ExternalName\&quot; aliases this service to the specified externalName. Several other fields do not apply to ExternalName services. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
  } deriving (Int -> V1ServiceSpec -> ShowS
[V1ServiceSpec] -> ShowS
V1ServiceSpec -> String
(Int -> V1ServiceSpec -> ShowS)
-> (V1ServiceSpec -> String)
-> ([V1ServiceSpec] -> ShowS)
-> Show V1ServiceSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ServiceSpec -> ShowS
showsPrec :: Int -> V1ServiceSpec -> ShowS
$cshow :: V1ServiceSpec -> String
show :: V1ServiceSpec -> String
$cshowList :: [V1ServiceSpec] -> ShowS
showList :: [V1ServiceSpec] -> ShowS
P.Show, V1ServiceSpec -> V1ServiceSpec -> Bool
(V1ServiceSpec -> V1ServiceSpec -> Bool)
-> (V1ServiceSpec -> V1ServiceSpec -> Bool) -> Eq V1ServiceSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ServiceSpec -> V1ServiceSpec -> Bool
== :: V1ServiceSpec -> V1ServiceSpec -> Bool
$c/= :: V1ServiceSpec -> V1ServiceSpec -> Bool
/= :: V1ServiceSpec -> V1ServiceSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ServiceSpec
instance A.FromJSON V1ServiceSpec where
  parseJSON :: Value -> Parser V1ServiceSpec
parseJSON = String
-> (Object -> Parser V1ServiceSpec)
-> Value
-> Parser V1ServiceSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ServiceSpec" ((Object -> Parser V1ServiceSpec) -> Value -> Parser V1ServiceSpec)
-> (Object -> Parser V1ServiceSpec)
-> Value
-> Parser V1ServiceSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [V1ServicePort]
-> Maybe Bool
-> Maybe (Map String Text)
-> Maybe Text
-> Maybe V1SessionAffinityConfig
-> Maybe Text
-> Maybe Text
-> V1ServiceSpec
V1ServiceSpec
      (Maybe Bool
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Int
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe [V1ServicePort]
 -> Maybe Bool
 -> Maybe (Map String Text)
 -> Maybe Text
 -> Maybe V1SessionAffinityConfig
 -> Maybe Text
 -> Maybe Text
 -> V1ServiceSpec)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe [Text]
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [V1ServicePort]
      -> Maybe Bool
      -> Maybe (Map String Text)
      -> Maybe Text
      -> Maybe V1SessionAffinityConfig
      -> Maybe Text
      -> Maybe Text
      -> V1ServiceSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"allocateLoadBalancerNodePorts")
      Parser
  (Maybe Text
   -> Maybe [Text]
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [V1ServicePort]
   -> Maybe Bool
   -> Maybe (Map String Text)
   -> Maybe Text
   -> Maybe V1SessionAffinityConfig
   -> Maybe Text
   -> Maybe Text
   -> V1ServiceSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [V1ServicePort]
      -> Maybe Bool
      -> Maybe (Map String Text)
      -> Maybe Text
      -> Maybe V1SessionAffinityConfig
      -> Maybe Text
      -> Maybe Text
      -> V1ServiceSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"clusterIP")
      Parser
  (Maybe [Text]
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [V1ServicePort]
   -> Maybe Bool
   -> Maybe (Map String Text)
   -> Maybe Text
   -> Maybe V1SessionAffinityConfig
   -> Maybe Text
   -> Maybe Text
   -> V1ServiceSpec)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [V1ServicePort]
      -> Maybe Bool
      -> Maybe (Map String Text)
      -> Maybe Text
      -> Maybe V1SessionAffinityConfig
      -> Maybe Text
      -> Maybe Text
      -> V1ServiceSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"clusterIPs")
      Parser
  (Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [V1ServicePort]
   -> Maybe Bool
   -> Maybe (Map String Text)
   -> Maybe Text
   -> Maybe V1SessionAffinityConfig
   -> Maybe Text
   -> Maybe Text
   -> V1ServiceSpec)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [V1ServicePort]
      -> Maybe Bool
      -> Maybe (Map String Text)
      -> Maybe Text
      -> Maybe V1SessionAffinityConfig
      -> Maybe Text
      -> Maybe Text
      -> V1ServiceSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"externalIPs")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [V1ServicePort]
   -> Maybe Bool
   -> Maybe (Map String Text)
   -> Maybe Text
   -> Maybe V1SessionAffinityConfig
   -> Maybe Text
   -> Maybe Text
   -> V1ServiceSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [V1ServicePort]
      -> Maybe Bool
      -> Maybe (Map String Text)
      -> Maybe Text
      -> Maybe V1SessionAffinityConfig
      -> Maybe Text
      -> Maybe Text
      -> V1ServiceSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"externalName")
      Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [V1ServicePort]
   -> Maybe Bool
   -> Maybe (Map String Text)
   -> Maybe Text
   -> Maybe V1SessionAffinityConfig
   -> Maybe Text
   -> Maybe Text
   -> V1ServiceSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [V1ServicePort]
      -> Maybe Bool
      -> Maybe (Map String Text)
      -> Maybe Text
      -> Maybe V1SessionAffinityConfig
      -> Maybe Text
      -> Maybe Text
      -> V1ServiceSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"externalTrafficPolicy")
      Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [V1ServicePort]
   -> Maybe Bool
   -> Maybe (Map String Text)
   -> Maybe Text
   -> Maybe V1SessionAffinityConfig
   -> Maybe Text
   -> Maybe Text
   -> V1ServiceSpec)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [V1ServicePort]
      -> Maybe Bool
      -> Maybe (Map String Text)
      -> Maybe Text
      -> Maybe V1SessionAffinityConfig
      -> Maybe Text
      -> Maybe Text
      -> V1ServiceSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"healthCheckNodePort")
      Parser
  (Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [V1ServicePort]
   -> Maybe Bool
   -> Maybe (Map String Text)
   -> Maybe Text
   -> Maybe V1SessionAffinityConfig
   -> Maybe Text
   -> Maybe Text
   -> V1ServiceSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [V1ServicePort]
      -> Maybe Bool
      -> Maybe (Map String Text)
      -> Maybe Text
      -> Maybe V1SessionAffinityConfig
      -> Maybe Text
      -> Maybe Text
      -> V1ServiceSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"internalTrafficPolicy")
      Parser
  (Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [V1ServicePort]
   -> Maybe Bool
   -> Maybe (Map String Text)
   -> Maybe Text
   -> Maybe V1SessionAffinityConfig
   -> Maybe Text
   -> Maybe Text
   -> V1ServiceSpec)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [V1ServicePort]
      -> Maybe Bool
      -> Maybe (Map String Text)
      -> Maybe Text
      -> Maybe V1SessionAffinityConfig
      -> Maybe Text
      -> Maybe Text
      -> V1ServiceSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ipFamilies")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [V1ServicePort]
   -> Maybe Bool
   -> Maybe (Map String Text)
   -> Maybe Text
   -> Maybe V1SessionAffinityConfig
   -> Maybe Text
   -> Maybe Text
   -> V1ServiceSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [V1ServicePort]
      -> Maybe Bool
      -> Maybe (Map String Text)
      -> Maybe Text
      -> Maybe V1SessionAffinityConfig
      -> Maybe Text
      -> Maybe Text
      -> V1ServiceSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ipFamilyPolicy")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [V1ServicePort]
   -> Maybe Bool
   -> Maybe (Map String Text)
   -> Maybe Text
   -> Maybe V1SessionAffinityConfig
   -> Maybe Text
   -> Maybe Text
   -> V1ServiceSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [Text]
      -> Maybe [V1ServicePort]
      -> Maybe Bool
      -> Maybe (Map String Text)
      -> Maybe Text
      -> Maybe V1SessionAffinityConfig
      -> Maybe Text
      -> Maybe Text
      -> V1ServiceSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"loadBalancerClass")
      Parser
  (Maybe Text
   -> Maybe [Text]
   -> Maybe [V1ServicePort]
   -> Maybe Bool
   -> Maybe (Map String Text)
   -> Maybe Text
   -> Maybe V1SessionAffinityConfig
   -> Maybe Text
   -> Maybe Text
   -> V1ServiceSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe [V1ServicePort]
      -> Maybe Bool
      -> Maybe (Map String Text)
      -> Maybe Text
      -> Maybe V1SessionAffinityConfig
      -> Maybe Text
      -> Maybe Text
      -> V1ServiceSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"loadBalancerIP")
      Parser
  (Maybe [Text]
   -> Maybe [V1ServicePort]
   -> Maybe Bool
   -> Maybe (Map String Text)
   -> Maybe Text
   -> Maybe V1SessionAffinityConfig
   -> Maybe Text
   -> Maybe Text
   -> V1ServiceSpec)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [V1ServicePort]
      -> Maybe Bool
      -> Maybe (Map String Text)
      -> Maybe Text
      -> Maybe V1SessionAffinityConfig
      -> Maybe Text
      -> Maybe Text
      -> V1ServiceSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"loadBalancerSourceRanges")
      Parser
  (Maybe [V1ServicePort]
   -> Maybe Bool
   -> Maybe (Map String Text)
   -> Maybe Text
   -> Maybe V1SessionAffinityConfig
   -> Maybe Text
   -> Maybe Text
   -> V1ServiceSpec)
-> Parser (Maybe [V1ServicePort])
-> Parser
     (Maybe Bool
      -> Maybe (Map String Text)
      -> Maybe Text
      -> Maybe V1SessionAffinityConfig
      -> Maybe Text
      -> Maybe Text
      -> V1ServiceSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1ServicePort])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ports")
      Parser
  (Maybe Bool
   -> Maybe (Map String Text)
   -> Maybe Text
   -> Maybe V1SessionAffinityConfig
   -> Maybe Text
   -> Maybe Text
   -> V1ServiceSpec)
-> Parser (Maybe Bool)
-> Parser
     (Maybe (Map String Text)
      -> Maybe Text
      -> Maybe V1SessionAffinityConfig
      -> Maybe Text
      -> Maybe Text
      -> V1ServiceSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"publishNotReadyAddresses")
      Parser
  (Maybe (Map String Text)
   -> Maybe Text
   -> Maybe V1SessionAffinityConfig
   -> Maybe Text
   -> Maybe Text
   -> V1ServiceSpec)
-> Parser (Maybe (Map String Text))
-> Parser
     (Maybe Text
      -> Maybe V1SessionAffinityConfig
      -> Maybe Text
      -> Maybe Text
      -> V1ServiceSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String Text))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"selector")
      Parser
  (Maybe Text
   -> Maybe V1SessionAffinityConfig
   -> Maybe Text
   -> Maybe Text
   -> V1ServiceSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1SessionAffinityConfig
      -> Maybe Text -> Maybe Text -> V1ServiceSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"sessionAffinity")
      Parser
  (Maybe V1SessionAffinityConfig
   -> Maybe Text -> Maybe Text -> V1ServiceSpec)
-> Parser (Maybe V1SessionAffinityConfig)
-> Parser (Maybe Text -> Maybe Text -> V1ServiceSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1SessionAffinityConfig)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"sessionAffinityConfig")
      Parser (Maybe Text -> Maybe Text -> V1ServiceSpec)
-> Parser (Maybe Text) -> Parser (Maybe Text -> V1ServiceSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"trafficDistribution")
      Parser (Maybe Text -> V1ServiceSpec)
-> Parser (Maybe Text) -> Parser V1ServiceSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"type")

-- | ToJSON V1ServiceSpec
instance A.ToJSON V1ServiceSpec where
  toJSON :: V1ServiceSpec -> Value
toJSON V1ServiceSpec {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [V1ServicePort]
Maybe (Map String Text)
Maybe Text
Maybe V1SessionAffinityConfig
$sel:v1ServiceSpecAllocateLoadBalancerNodePorts:V1ServiceSpec :: V1ServiceSpec -> Maybe Bool
$sel:v1ServiceSpecClusterIp:V1ServiceSpec :: V1ServiceSpec -> Maybe Text
$sel:v1ServiceSpecClusterIps:V1ServiceSpec :: V1ServiceSpec -> Maybe [Text]
$sel:v1ServiceSpecExternalIps:V1ServiceSpec :: V1ServiceSpec -> Maybe [Text]
$sel:v1ServiceSpecExternalName:V1ServiceSpec :: V1ServiceSpec -> Maybe Text
$sel:v1ServiceSpecExternalTrafficPolicy:V1ServiceSpec :: V1ServiceSpec -> Maybe Text
$sel:v1ServiceSpecHealthCheckNodePort:V1ServiceSpec :: V1ServiceSpec -> Maybe Int
$sel:v1ServiceSpecInternalTrafficPolicy:V1ServiceSpec :: V1ServiceSpec -> Maybe Text
$sel:v1ServiceSpecIpFamilies:V1ServiceSpec :: V1ServiceSpec -> Maybe [Text]
$sel:v1ServiceSpecIpFamilyPolicy:V1ServiceSpec :: V1ServiceSpec -> Maybe Text
$sel:v1ServiceSpecLoadBalancerClass:V1ServiceSpec :: V1ServiceSpec -> Maybe Text
$sel:v1ServiceSpecLoadBalancerIp:V1ServiceSpec :: V1ServiceSpec -> Maybe Text
$sel:v1ServiceSpecLoadBalancerSourceRanges:V1ServiceSpec :: V1ServiceSpec -> Maybe [Text]
$sel:v1ServiceSpecPorts:V1ServiceSpec :: V1ServiceSpec -> Maybe [V1ServicePort]
$sel:v1ServiceSpecPublishNotReadyAddresses:V1ServiceSpec :: V1ServiceSpec -> Maybe Bool
$sel:v1ServiceSpecSelector:V1ServiceSpec :: V1ServiceSpec -> Maybe (Map String Text)
$sel:v1ServiceSpecSessionAffinity:V1ServiceSpec :: V1ServiceSpec -> Maybe Text
$sel:v1ServiceSpecSessionAffinityConfig:V1ServiceSpec :: V1ServiceSpec -> Maybe V1SessionAffinityConfig
$sel:v1ServiceSpecTrafficDistribution:V1ServiceSpec :: V1ServiceSpec -> Maybe Text
$sel:v1ServiceSpecType:V1ServiceSpec :: V1ServiceSpec -> Maybe Text
v1ServiceSpecAllocateLoadBalancerNodePorts :: Maybe Bool
v1ServiceSpecClusterIp :: Maybe Text
v1ServiceSpecClusterIps :: Maybe [Text]
v1ServiceSpecExternalIps :: Maybe [Text]
v1ServiceSpecExternalName :: Maybe Text
v1ServiceSpecExternalTrafficPolicy :: Maybe Text
v1ServiceSpecHealthCheckNodePort :: Maybe Int
v1ServiceSpecInternalTrafficPolicy :: Maybe Text
v1ServiceSpecIpFamilies :: Maybe [Text]
v1ServiceSpecIpFamilyPolicy :: Maybe Text
v1ServiceSpecLoadBalancerClass :: Maybe Text
v1ServiceSpecLoadBalancerIp :: Maybe Text
v1ServiceSpecLoadBalancerSourceRanges :: Maybe [Text]
v1ServiceSpecPorts :: Maybe [V1ServicePort]
v1ServiceSpecPublishNotReadyAddresses :: Maybe Bool
v1ServiceSpecSelector :: Maybe (Map String Text)
v1ServiceSpecSessionAffinity :: Maybe Text
v1ServiceSpecSessionAffinityConfig :: Maybe V1SessionAffinityConfig
v1ServiceSpecTrafficDistribution :: Maybe Text
v1ServiceSpecType :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"allocateLoadBalancerNodePorts" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1ServiceSpecAllocateLoadBalancerNodePorts
      , Key
"clusterIP" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ServiceSpecClusterIp
      , Key
"clusterIPs" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1ServiceSpecClusterIps
      , Key
"externalIPs" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1ServiceSpecExternalIps
      , Key
"externalName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ServiceSpecExternalName
      , Key
"externalTrafficPolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ServiceSpecExternalTrafficPolicy
      , Key
"healthCheckNodePort" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1ServiceSpecHealthCheckNodePort
      , Key
"internalTrafficPolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ServiceSpecInternalTrafficPolicy
      , Key
"ipFamilies" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1ServiceSpecIpFamilies
      , Key
"ipFamilyPolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ServiceSpecIpFamilyPolicy
      , Key
"loadBalancerClass" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ServiceSpecLoadBalancerClass
      , Key
"loadBalancerIP" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ServiceSpecLoadBalancerIp
      , Key
"loadBalancerSourceRanges" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1ServiceSpecLoadBalancerSourceRanges
      , Key
"ports" Key -> Maybe [V1ServicePort] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1ServicePort]
v1ServiceSpecPorts
      , Key
"publishNotReadyAddresses" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1ServiceSpecPublishNotReadyAddresses
      , Key
"selector" Key -> Maybe (Map String Text) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Text)
v1ServiceSpecSelector
      , Key
"sessionAffinity" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ServiceSpecSessionAffinity
      , Key
"sessionAffinityConfig" Key -> Maybe V1SessionAffinityConfig -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1SessionAffinityConfig
v1ServiceSpecSessionAffinityConfig
      , Key
"trafficDistribution" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ServiceSpecTrafficDistribution
      , Key
"type" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ServiceSpecType
      ]


-- | Construct a value of type 'V1ServiceSpec' (by applying it's required fields, if any)
mkV1ServiceSpec
  :: V1ServiceSpec
mkV1ServiceSpec :: V1ServiceSpec
mkV1ServiceSpec =
  V1ServiceSpec
  { $sel:v1ServiceSpecAllocateLoadBalancerNodePorts:V1ServiceSpec :: Maybe Bool
v1ServiceSpecAllocateLoadBalancerNodePorts = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1ServiceSpecClusterIp:V1ServiceSpec :: Maybe Text
v1ServiceSpecClusterIp = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ServiceSpecClusterIps:V1ServiceSpec :: Maybe [Text]
v1ServiceSpecClusterIps = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1ServiceSpecExternalIps:V1ServiceSpec :: Maybe [Text]
v1ServiceSpecExternalIps = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1ServiceSpecExternalName:V1ServiceSpec :: Maybe Text
v1ServiceSpecExternalName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ServiceSpecExternalTrafficPolicy:V1ServiceSpec :: Maybe Text
v1ServiceSpecExternalTrafficPolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ServiceSpecHealthCheckNodePort:V1ServiceSpec :: Maybe Int
v1ServiceSpecHealthCheckNodePort = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1ServiceSpecInternalTrafficPolicy:V1ServiceSpec :: Maybe Text
v1ServiceSpecInternalTrafficPolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ServiceSpecIpFamilies:V1ServiceSpec :: Maybe [Text]
v1ServiceSpecIpFamilies = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1ServiceSpecIpFamilyPolicy:V1ServiceSpec :: Maybe Text
v1ServiceSpecIpFamilyPolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ServiceSpecLoadBalancerClass:V1ServiceSpec :: Maybe Text
v1ServiceSpecLoadBalancerClass = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ServiceSpecLoadBalancerIp:V1ServiceSpec :: Maybe Text
v1ServiceSpecLoadBalancerIp = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ServiceSpecLoadBalancerSourceRanges:V1ServiceSpec :: Maybe [Text]
v1ServiceSpecLoadBalancerSourceRanges = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1ServiceSpecPorts:V1ServiceSpec :: Maybe [V1ServicePort]
v1ServiceSpecPorts = Maybe [V1ServicePort]
forall a. Maybe a
Nothing
  , $sel:v1ServiceSpecPublishNotReadyAddresses:V1ServiceSpec :: Maybe Bool
v1ServiceSpecPublishNotReadyAddresses = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1ServiceSpecSelector:V1ServiceSpec :: Maybe (Map String Text)
v1ServiceSpecSelector = Maybe (Map String Text)
forall a. Maybe a
Nothing
  , $sel:v1ServiceSpecSessionAffinity:V1ServiceSpec :: Maybe Text
v1ServiceSpecSessionAffinity = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ServiceSpecSessionAffinityConfig:V1ServiceSpec :: Maybe V1SessionAffinityConfig
v1ServiceSpecSessionAffinityConfig = Maybe V1SessionAffinityConfig
forall a. Maybe a
Nothing
  , $sel:v1ServiceSpecTrafficDistribution:V1ServiceSpec :: Maybe Text
v1ServiceSpecTrafficDistribution = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ServiceSpecType:V1ServiceSpec :: Maybe Text
v1ServiceSpecType = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1ServiceStatus
-- | V1ServiceStatus
-- ServiceStatus represents the current status of a service.
data V1ServiceStatus = V1ServiceStatus
  { V1ServiceStatus -> Maybe [V1Condition]
v1ServiceStatusConditions :: !(Maybe [V1Condition]) -- ^ "conditions" - Current service state
  , V1ServiceStatus -> Maybe V1LoadBalancerStatus
v1ServiceStatusLoadBalancer :: !(Maybe V1LoadBalancerStatus) -- ^ "loadBalancer"
  } deriving (Int -> V1ServiceStatus -> ShowS
[V1ServiceStatus] -> ShowS
V1ServiceStatus -> String
(Int -> V1ServiceStatus -> ShowS)
-> (V1ServiceStatus -> String)
-> ([V1ServiceStatus] -> ShowS)
-> Show V1ServiceStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ServiceStatus -> ShowS
showsPrec :: Int -> V1ServiceStatus -> ShowS
$cshow :: V1ServiceStatus -> String
show :: V1ServiceStatus -> String
$cshowList :: [V1ServiceStatus] -> ShowS
showList :: [V1ServiceStatus] -> ShowS
P.Show, V1ServiceStatus -> V1ServiceStatus -> Bool
(V1ServiceStatus -> V1ServiceStatus -> Bool)
-> (V1ServiceStatus -> V1ServiceStatus -> Bool)
-> Eq V1ServiceStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ServiceStatus -> V1ServiceStatus -> Bool
== :: V1ServiceStatus -> V1ServiceStatus -> Bool
$c/= :: V1ServiceStatus -> V1ServiceStatus -> Bool
/= :: V1ServiceStatus -> V1ServiceStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ServiceStatus
instance A.FromJSON V1ServiceStatus where
  parseJSON :: Value -> Parser V1ServiceStatus
parseJSON = String
-> (Object -> Parser V1ServiceStatus)
-> Value
-> Parser V1ServiceStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ServiceStatus" ((Object -> Parser V1ServiceStatus)
 -> Value -> Parser V1ServiceStatus)
-> (Object -> Parser V1ServiceStatus)
-> Value
-> Parser V1ServiceStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1Condition]
-> Maybe V1LoadBalancerStatus -> V1ServiceStatus
V1ServiceStatus
      (Maybe [V1Condition]
 -> Maybe V1LoadBalancerStatus -> V1ServiceStatus)
-> Parser (Maybe [V1Condition])
-> Parser (Maybe V1LoadBalancerStatus -> V1ServiceStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1Condition])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"conditions")
      Parser (Maybe V1LoadBalancerStatus -> V1ServiceStatus)
-> Parser (Maybe V1LoadBalancerStatus) -> Parser V1ServiceStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LoadBalancerStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"loadBalancer")

-- | ToJSON V1ServiceStatus
instance A.ToJSON V1ServiceStatus where
  toJSON :: V1ServiceStatus -> Value
toJSON V1ServiceStatus {Maybe [V1Condition]
Maybe V1LoadBalancerStatus
$sel:v1ServiceStatusConditions:V1ServiceStatus :: V1ServiceStatus -> Maybe [V1Condition]
$sel:v1ServiceStatusLoadBalancer:V1ServiceStatus :: V1ServiceStatus -> Maybe V1LoadBalancerStatus
v1ServiceStatusConditions :: Maybe [V1Condition]
v1ServiceStatusLoadBalancer :: Maybe V1LoadBalancerStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"conditions" Key -> Maybe [V1Condition] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1Condition]
v1ServiceStatusConditions
      , Key
"loadBalancer" Key -> Maybe V1LoadBalancerStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LoadBalancerStatus
v1ServiceStatusLoadBalancer
      ]


-- | Construct a value of type 'V1ServiceStatus' (by applying it's required fields, if any)
mkV1ServiceStatus
  :: V1ServiceStatus
mkV1ServiceStatus :: V1ServiceStatus
mkV1ServiceStatus =
  V1ServiceStatus
  { $sel:v1ServiceStatusConditions:V1ServiceStatus :: Maybe [V1Condition]
v1ServiceStatusConditions = Maybe [V1Condition]
forall a. Maybe a
Nothing
  , $sel:v1ServiceStatusLoadBalancer:V1ServiceStatus :: Maybe V1LoadBalancerStatus
v1ServiceStatusLoadBalancer = Maybe V1LoadBalancerStatus
forall a. Maybe a
Nothing
  }

-- ** V1SessionAffinityConfig
-- | V1SessionAffinityConfig
-- SessionAffinityConfig represents the configurations of session affinity.
data V1SessionAffinityConfig = V1SessionAffinityConfig
  { V1SessionAffinityConfig -> Maybe V1ClientIPConfig
v1SessionAffinityConfigClientIp :: !(Maybe V1ClientIPConfig) -- ^ "clientIP"
  } deriving (Int -> V1SessionAffinityConfig -> ShowS
[V1SessionAffinityConfig] -> ShowS
V1SessionAffinityConfig -> String
(Int -> V1SessionAffinityConfig -> ShowS)
-> (V1SessionAffinityConfig -> String)
-> ([V1SessionAffinityConfig] -> ShowS)
-> Show V1SessionAffinityConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1SessionAffinityConfig -> ShowS
showsPrec :: Int -> V1SessionAffinityConfig -> ShowS
$cshow :: V1SessionAffinityConfig -> String
show :: V1SessionAffinityConfig -> String
$cshowList :: [V1SessionAffinityConfig] -> ShowS
showList :: [V1SessionAffinityConfig] -> ShowS
P.Show, V1SessionAffinityConfig -> V1SessionAffinityConfig -> Bool
(V1SessionAffinityConfig -> V1SessionAffinityConfig -> Bool)
-> (V1SessionAffinityConfig -> V1SessionAffinityConfig -> Bool)
-> Eq V1SessionAffinityConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1SessionAffinityConfig -> V1SessionAffinityConfig -> Bool
== :: V1SessionAffinityConfig -> V1SessionAffinityConfig -> Bool
$c/= :: V1SessionAffinityConfig -> V1SessionAffinityConfig -> Bool
/= :: V1SessionAffinityConfig -> V1SessionAffinityConfig -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1SessionAffinityConfig
instance A.FromJSON V1SessionAffinityConfig where
  parseJSON :: Value -> Parser V1SessionAffinityConfig
parseJSON = String
-> (Object -> Parser V1SessionAffinityConfig)
-> Value
-> Parser V1SessionAffinityConfig
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1SessionAffinityConfig" ((Object -> Parser V1SessionAffinityConfig)
 -> Value -> Parser V1SessionAffinityConfig)
-> (Object -> Parser V1SessionAffinityConfig)
-> Value
-> Parser V1SessionAffinityConfig
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1ClientIPConfig -> V1SessionAffinityConfig
V1SessionAffinityConfig
      (Maybe V1ClientIPConfig -> V1SessionAffinityConfig)
-> Parser (Maybe V1ClientIPConfig)
-> Parser V1SessionAffinityConfig
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1ClientIPConfig)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"clientIP")

-- | ToJSON V1SessionAffinityConfig
instance A.ToJSON V1SessionAffinityConfig where
  toJSON :: V1SessionAffinityConfig -> Value
toJSON V1SessionAffinityConfig {Maybe V1ClientIPConfig
$sel:v1SessionAffinityConfigClientIp:V1SessionAffinityConfig :: V1SessionAffinityConfig -> Maybe V1ClientIPConfig
v1SessionAffinityConfigClientIp :: Maybe V1ClientIPConfig
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"clientIP" Key -> Maybe V1ClientIPConfig -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ClientIPConfig
v1SessionAffinityConfigClientIp
      ]


-- | Construct a value of type 'V1SessionAffinityConfig' (by applying it's required fields, if any)
mkV1SessionAffinityConfig
  :: V1SessionAffinityConfig
mkV1SessionAffinityConfig :: V1SessionAffinityConfig
mkV1SessionAffinityConfig =
  V1SessionAffinityConfig
  { $sel:v1SessionAffinityConfigClientIp:V1SessionAffinityConfig :: Maybe V1ClientIPConfig
v1SessionAffinityConfigClientIp = Maybe V1ClientIPConfig
forall a. Maybe a
Nothing
  }

-- ** V1SleepAction
-- | V1SleepAction
-- SleepAction describes a \"sleep\" action.
data V1SleepAction = V1SleepAction
  { V1SleepAction -> Integer
v1SleepActionSeconds :: !(Integer) -- ^ /Required/ "seconds" - Seconds is the number of seconds to sleep.
  } deriving (Int -> V1SleepAction -> ShowS
[V1SleepAction] -> ShowS
V1SleepAction -> String
(Int -> V1SleepAction -> ShowS)
-> (V1SleepAction -> String)
-> ([V1SleepAction] -> ShowS)
-> Show V1SleepAction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1SleepAction -> ShowS
showsPrec :: Int -> V1SleepAction -> ShowS
$cshow :: V1SleepAction -> String
show :: V1SleepAction -> String
$cshowList :: [V1SleepAction] -> ShowS
showList :: [V1SleepAction] -> ShowS
P.Show, V1SleepAction -> V1SleepAction -> Bool
(V1SleepAction -> V1SleepAction -> Bool)
-> (V1SleepAction -> V1SleepAction -> Bool) -> Eq V1SleepAction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1SleepAction -> V1SleepAction -> Bool
== :: V1SleepAction -> V1SleepAction -> Bool
$c/= :: V1SleepAction -> V1SleepAction -> Bool
/= :: V1SleepAction -> V1SleepAction -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1SleepAction
instance A.FromJSON V1SleepAction where
  parseJSON :: Value -> Parser V1SleepAction
parseJSON = String
-> (Object -> Parser V1SleepAction)
-> Value
-> Parser V1SleepAction
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1SleepAction" ((Object -> Parser V1SleepAction) -> Value -> Parser V1SleepAction)
-> (Object -> Parser V1SleepAction)
-> Value
-> Parser V1SleepAction
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Integer -> V1SleepAction
V1SleepAction
      (Integer -> V1SleepAction)
-> Parser Integer -> Parser V1SleepAction
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Integer
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"seconds")

-- | ToJSON V1SleepAction
instance A.ToJSON V1SleepAction where
  toJSON :: V1SleepAction -> Value
toJSON V1SleepAction {Integer
$sel:v1SleepActionSeconds:V1SleepAction :: V1SleepAction -> Integer
v1SleepActionSeconds :: Integer
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"seconds" Key -> Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Integer
v1SleepActionSeconds
      ]


-- | Construct a value of type 'V1SleepAction' (by applying it's required fields, if any)
mkV1SleepAction
  :: Integer -- ^ 'v1SleepActionSeconds': Seconds is the number of seconds to sleep.
  -> V1SleepAction
mkV1SleepAction :: Integer -> V1SleepAction
mkV1SleepAction Integer
v1SleepActionSeconds =
  V1SleepAction
  { Integer
$sel:v1SleepActionSeconds:V1SleepAction :: Integer
v1SleepActionSeconds :: Integer
v1SleepActionSeconds
  }

-- ** V1StatefulSet
-- | V1StatefulSet
-- StatefulSet represents a set of pods with consistent identities. Identities are defined as:   - Network: A single stable DNS and hostname.   - Storage: As many VolumeClaims as requested.  The StatefulSet guarantees that a given network identity will always map to the same storage identity.
data V1StatefulSet = V1StatefulSet
  { V1StatefulSet -> Maybe Text
v1StatefulSetApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1StatefulSet -> Maybe Text
v1StatefulSetKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1StatefulSet -> Maybe V1ObjectMeta
v1StatefulSetMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1StatefulSet -> Maybe V1StatefulSetSpec
v1StatefulSetSpec :: !(Maybe V1StatefulSetSpec) -- ^ "spec"
  , V1StatefulSet -> Maybe V1StatefulSetStatus
v1StatefulSetStatus :: !(Maybe V1StatefulSetStatus) -- ^ "status"
  } deriving (Int -> V1StatefulSet -> ShowS
[V1StatefulSet] -> ShowS
V1StatefulSet -> String
(Int -> V1StatefulSet -> ShowS)
-> (V1StatefulSet -> String)
-> ([V1StatefulSet] -> ShowS)
-> Show V1StatefulSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1StatefulSet -> ShowS
showsPrec :: Int -> V1StatefulSet -> ShowS
$cshow :: V1StatefulSet -> String
show :: V1StatefulSet -> String
$cshowList :: [V1StatefulSet] -> ShowS
showList :: [V1StatefulSet] -> ShowS
P.Show, V1StatefulSet -> V1StatefulSet -> Bool
(V1StatefulSet -> V1StatefulSet -> Bool)
-> (V1StatefulSet -> V1StatefulSet -> Bool) -> Eq V1StatefulSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1StatefulSet -> V1StatefulSet -> Bool
== :: V1StatefulSet -> V1StatefulSet -> Bool
$c/= :: V1StatefulSet -> V1StatefulSet -> Bool
/= :: V1StatefulSet -> V1StatefulSet -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1StatefulSet
instance A.FromJSON V1StatefulSet where
  parseJSON :: Value -> Parser V1StatefulSet
parseJSON = String
-> (Object -> Parser V1StatefulSet)
-> Value
-> Parser V1StatefulSet
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1StatefulSet" ((Object -> Parser V1StatefulSet) -> Value -> Parser V1StatefulSet)
-> (Object -> Parser V1StatefulSet)
-> Value
-> Parser V1StatefulSet
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1StatefulSetSpec
-> Maybe V1StatefulSetStatus
-> V1StatefulSet
V1StatefulSet
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1StatefulSetSpec
 -> Maybe V1StatefulSetStatus
 -> V1StatefulSet)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1StatefulSetSpec
      -> Maybe V1StatefulSetStatus
      -> V1StatefulSet)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1StatefulSetSpec
   -> Maybe V1StatefulSetStatus
   -> V1StatefulSet)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1StatefulSetSpec
      -> Maybe V1StatefulSetStatus
      -> V1StatefulSet)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1StatefulSetSpec
   -> Maybe V1StatefulSetStatus
   -> V1StatefulSet)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe V1StatefulSetSpec
      -> Maybe V1StatefulSetStatus -> V1StatefulSet)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (Maybe V1StatefulSetSpec
   -> Maybe V1StatefulSetStatus -> V1StatefulSet)
-> Parser (Maybe V1StatefulSetSpec)
-> Parser (Maybe V1StatefulSetStatus -> V1StatefulSet)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1StatefulSetSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")
      Parser (Maybe V1StatefulSetStatus -> V1StatefulSet)
-> Parser (Maybe V1StatefulSetStatus) -> Parser V1StatefulSet
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1StatefulSetStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1StatefulSet
instance A.ToJSON V1StatefulSet where
  toJSON :: V1StatefulSet -> Value
toJSON V1StatefulSet {Maybe Text
Maybe V1StatefulSetStatus
Maybe V1StatefulSetSpec
Maybe V1ObjectMeta
$sel:v1StatefulSetApiVersion:V1StatefulSet :: V1StatefulSet -> Maybe Text
$sel:v1StatefulSetKind:V1StatefulSet :: V1StatefulSet -> Maybe Text
$sel:v1StatefulSetMetadata:V1StatefulSet :: V1StatefulSet -> Maybe V1ObjectMeta
$sel:v1StatefulSetSpec:V1StatefulSet :: V1StatefulSet -> Maybe V1StatefulSetSpec
$sel:v1StatefulSetStatus:V1StatefulSet :: V1StatefulSet -> Maybe V1StatefulSetStatus
v1StatefulSetApiVersion :: Maybe Text
v1StatefulSetKind :: Maybe Text
v1StatefulSetMetadata :: Maybe V1ObjectMeta
v1StatefulSetSpec :: Maybe V1StatefulSetSpec
v1StatefulSetStatus :: Maybe V1StatefulSetStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StatefulSetApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StatefulSetKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1StatefulSetMetadata
      , Key
"spec" Key -> Maybe V1StatefulSetSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1StatefulSetSpec
v1StatefulSetSpec
      , Key
"status" Key -> Maybe V1StatefulSetStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1StatefulSetStatus
v1StatefulSetStatus
      ]


-- | Construct a value of type 'V1StatefulSet' (by applying it's required fields, if any)
mkV1StatefulSet
  :: V1StatefulSet
mkV1StatefulSet :: V1StatefulSet
mkV1StatefulSet =
  V1StatefulSet
  { $sel:v1StatefulSetApiVersion:V1StatefulSet :: Maybe Text
v1StatefulSetApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1StatefulSetKind:V1StatefulSet :: Maybe Text
v1StatefulSetKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1StatefulSetMetadata:V1StatefulSet :: Maybe V1ObjectMeta
v1StatefulSetMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1StatefulSetSpec:V1StatefulSet :: Maybe V1StatefulSetSpec
v1StatefulSetSpec = Maybe V1StatefulSetSpec
forall a. Maybe a
Nothing
  , $sel:v1StatefulSetStatus:V1StatefulSet :: Maybe V1StatefulSetStatus
v1StatefulSetStatus = Maybe V1StatefulSetStatus
forall a. Maybe a
Nothing
  }

-- ** V1StatefulSetCondition
-- | V1StatefulSetCondition
-- StatefulSetCondition describes the state of a statefulset at a certain point.
data V1StatefulSetCondition = V1StatefulSetCondition
  { V1StatefulSetCondition -> Maybe DateTime
v1StatefulSetConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - Last time the condition transitioned from one status to another.
  , V1StatefulSetCondition -> Maybe Text
v1StatefulSetConditionMessage :: !(Maybe Text) -- ^ "message" - A human readable message indicating details about the transition.
  , V1StatefulSetCondition -> Maybe Text
v1StatefulSetConditionReason :: !(Maybe Text) -- ^ "reason" - The reason for the condition&#39;s last transition.
  , V1StatefulSetCondition -> Text
v1StatefulSetConditionStatus :: !(Text) -- ^ /Required/ "status" - Status of the condition, one of True, False, Unknown.
  , V1StatefulSetCondition -> Text
v1StatefulSetConditionType :: !(Text) -- ^ /Required/ "type" - Type of statefulset condition.
  } deriving (Int -> V1StatefulSetCondition -> ShowS
[V1StatefulSetCondition] -> ShowS
V1StatefulSetCondition -> String
(Int -> V1StatefulSetCondition -> ShowS)
-> (V1StatefulSetCondition -> String)
-> ([V1StatefulSetCondition] -> ShowS)
-> Show V1StatefulSetCondition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1StatefulSetCondition -> ShowS
showsPrec :: Int -> V1StatefulSetCondition -> ShowS
$cshow :: V1StatefulSetCondition -> String
show :: V1StatefulSetCondition -> String
$cshowList :: [V1StatefulSetCondition] -> ShowS
showList :: [V1StatefulSetCondition] -> ShowS
P.Show, V1StatefulSetCondition -> V1StatefulSetCondition -> Bool
(V1StatefulSetCondition -> V1StatefulSetCondition -> Bool)
-> (V1StatefulSetCondition -> V1StatefulSetCondition -> Bool)
-> Eq V1StatefulSetCondition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1StatefulSetCondition -> V1StatefulSetCondition -> Bool
== :: V1StatefulSetCondition -> V1StatefulSetCondition -> Bool
$c/= :: V1StatefulSetCondition -> V1StatefulSetCondition -> Bool
/= :: V1StatefulSetCondition -> V1StatefulSetCondition -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1StatefulSetCondition
instance A.FromJSON V1StatefulSetCondition where
  parseJSON :: Value -> Parser V1StatefulSetCondition
parseJSON = String
-> (Object -> Parser V1StatefulSetCondition)
-> Value
-> Parser V1StatefulSetCondition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1StatefulSetCondition" ((Object -> Parser V1StatefulSetCondition)
 -> Value -> Parser V1StatefulSetCondition)
-> (Object -> Parser V1StatefulSetCondition)
-> Value
-> Parser V1StatefulSetCondition
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe DateTime
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> V1StatefulSetCondition
V1StatefulSetCondition
      (Maybe DateTime
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> Text
 -> V1StatefulSetCondition)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe Text
      -> Maybe Text -> Text -> Text -> V1StatefulSetCondition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lastTransitionTime")
      Parser
  (Maybe Text
   -> Maybe Text -> Text -> Text -> V1StatefulSetCondition)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Text -> Text -> V1StatefulSetCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"message")
      Parser (Maybe Text -> Text -> Text -> V1StatefulSetCondition)
-> Parser (Maybe Text)
-> Parser (Text -> Text -> V1StatefulSetCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reason")
      Parser (Text -> Text -> V1StatefulSetCondition)
-> Parser Text -> Parser (Text -> V1StatefulSetCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"status")
      Parser (Text -> V1StatefulSetCondition)
-> Parser Text -> Parser V1StatefulSetCondition
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"type")

-- | ToJSON V1StatefulSetCondition
instance A.ToJSON V1StatefulSetCondition where
  toJSON :: V1StatefulSetCondition -> Value
toJSON V1StatefulSetCondition {Maybe Text
Maybe DateTime
Text
$sel:v1StatefulSetConditionLastTransitionTime:V1StatefulSetCondition :: V1StatefulSetCondition -> Maybe DateTime
$sel:v1StatefulSetConditionMessage:V1StatefulSetCondition :: V1StatefulSetCondition -> Maybe Text
$sel:v1StatefulSetConditionReason:V1StatefulSetCondition :: V1StatefulSetCondition -> Maybe Text
$sel:v1StatefulSetConditionStatus:V1StatefulSetCondition :: V1StatefulSetCondition -> Text
$sel:v1StatefulSetConditionType:V1StatefulSetCondition :: V1StatefulSetCondition -> Text
v1StatefulSetConditionLastTransitionTime :: Maybe DateTime
v1StatefulSetConditionMessage :: Maybe Text
v1StatefulSetConditionReason :: Maybe Text
v1StatefulSetConditionStatus :: Text
v1StatefulSetConditionType :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"lastTransitionTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1StatefulSetConditionLastTransitionTime
      , Key
"message" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StatefulSetConditionMessage
      , Key
"reason" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StatefulSetConditionReason
      , Key
"status" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1StatefulSetConditionStatus
      , Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1StatefulSetConditionType
      ]


-- | Construct a value of type 'V1StatefulSetCondition' (by applying it's required fields, if any)
mkV1StatefulSetCondition
  :: Text -- ^ 'v1StatefulSetConditionStatus': Status of the condition, one of True, False, Unknown.
  -> Text -- ^ 'v1StatefulSetConditionType': Type of statefulset condition.
  -> V1StatefulSetCondition
mkV1StatefulSetCondition :: Text -> Text -> V1StatefulSetCondition
mkV1StatefulSetCondition Text
v1StatefulSetConditionStatus Text
v1StatefulSetConditionType =
  V1StatefulSetCondition
  { $sel:v1StatefulSetConditionLastTransitionTime:V1StatefulSetCondition :: Maybe DateTime
v1StatefulSetConditionLastTransitionTime = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1StatefulSetConditionMessage:V1StatefulSetCondition :: Maybe Text
v1StatefulSetConditionMessage = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1StatefulSetConditionReason:V1StatefulSetCondition :: Maybe Text
v1StatefulSetConditionReason = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1StatefulSetConditionStatus:V1StatefulSetCondition :: Text
v1StatefulSetConditionStatus :: Text
v1StatefulSetConditionStatus
  , Text
$sel:v1StatefulSetConditionType:V1StatefulSetCondition :: Text
v1StatefulSetConditionType :: Text
v1StatefulSetConditionType
  }

-- ** V1StatefulSetList
-- | V1StatefulSetList
-- StatefulSetList is a collection of StatefulSets.
data V1StatefulSetList = V1StatefulSetList
  { V1StatefulSetList -> Maybe Text
v1StatefulSetListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1StatefulSetList -> [V1StatefulSet]
v1StatefulSetListItems :: !([V1StatefulSet]) -- ^ /Required/ "items" - Items is the list of stateful sets.
  , V1StatefulSetList -> Maybe Text
v1StatefulSetListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1StatefulSetList -> Maybe V1ListMeta
v1StatefulSetListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1StatefulSetList -> ShowS
[V1StatefulSetList] -> ShowS
V1StatefulSetList -> String
(Int -> V1StatefulSetList -> ShowS)
-> (V1StatefulSetList -> String)
-> ([V1StatefulSetList] -> ShowS)
-> Show V1StatefulSetList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1StatefulSetList -> ShowS
showsPrec :: Int -> V1StatefulSetList -> ShowS
$cshow :: V1StatefulSetList -> String
show :: V1StatefulSetList -> String
$cshowList :: [V1StatefulSetList] -> ShowS
showList :: [V1StatefulSetList] -> ShowS
P.Show, V1StatefulSetList -> V1StatefulSetList -> Bool
(V1StatefulSetList -> V1StatefulSetList -> Bool)
-> (V1StatefulSetList -> V1StatefulSetList -> Bool)
-> Eq V1StatefulSetList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1StatefulSetList -> V1StatefulSetList -> Bool
== :: V1StatefulSetList -> V1StatefulSetList -> Bool
$c/= :: V1StatefulSetList -> V1StatefulSetList -> Bool
/= :: V1StatefulSetList -> V1StatefulSetList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1StatefulSetList
instance A.FromJSON V1StatefulSetList where
  parseJSON :: Value -> Parser V1StatefulSetList
parseJSON = String
-> (Object -> Parser V1StatefulSetList)
-> Value
-> Parser V1StatefulSetList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1StatefulSetList" ((Object -> Parser V1StatefulSetList)
 -> Value -> Parser V1StatefulSetList)
-> (Object -> Parser V1StatefulSetList)
-> Value
-> Parser V1StatefulSetList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1StatefulSet]
-> Maybe Text
-> Maybe V1ListMeta
-> V1StatefulSetList
V1StatefulSetList
      (Maybe Text
 -> [V1StatefulSet]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1StatefulSetList)
-> Parser (Maybe Text)
-> Parser
     ([V1StatefulSet]
      -> Maybe Text -> Maybe V1ListMeta -> V1StatefulSetList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1StatefulSet]
   -> Maybe Text -> Maybe V1ListMeta -> V1StatefulSetList)
-> Parser [V1StatefulSet]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1StatefulSetList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1StatefulSet]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1StatefulSetList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1StatefulSetList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1StatefulSetList)
-> Parser (Maybe V1ListMeta) -> Parser V1StatefulSetList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1StatefulSetList
instance A.ToJSON V1StatefulSetList where
  toJSON :: V1StatefulSetList -> Value
toJSON V1StatefulSetList {[V1StatefulSet]
Maybe Text
Maybe V1ListMeta
$sel:v1StatefulSetListApiVersion:V1StatefulSetList :: V1StatefulSetList -> Maybe Text
$sel:v1StatefulSetListItems:V1StatefulSetList :: V1StatefulSetList -> [V1StatefulSet]
$sel:v1StatefulSetListKind:V1StatefulSetList :: V1StatefulSetList -> Maybe Text
$sel:v1StatefulSetListMetadata:V1StatefulSetList :: V1StatefulSetList -> Maybe V1ListMeta
v1StatefulSetListApiVersion :: Maybe Text
v1StatefulSetListItems :: [V1StatefulSet]
v1StatefulSetListKind :: Maybe Text
v1StatefulSetListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StatefulSetListApiVersion
      , Key
"items" Key -> [V1StatefulSet] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1StatefulSet]
v1StatefulSetListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StatefulSetListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1StatefulSetListMetadata
      ]


-- | Construct a value of type 'V1StatefulSetList' (by applying it's required fields, if any)
mkV1StatefulSetList
  :: [V1StatefulSet] -- ^ 'v1StatefulSetListItems': Items is the list of stateful sets.
  -> V1StatefulSetList
mkV1StatefulSetList :: [V1StatefulSet] -> V1StatefulSetList
mkV1StatefulSetList [V1StatefulSet]
v1StatefulSetListItems =
  V1StatefulSetList
  { $sel:v1StatefulSetListApiVersion:V1StatefulSetList :: Maybe Text
v1StatefulSetListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1StatefulSet]
$sel:v1StatefulSetListItems:V1StatefulSetList :: [V1StatefulSet]
v1StatefulSetListItems :: [V1StatefulSet]
v1StatefulSetListItems
  , $sel:v1StatefulSetListKind:V1StatefulSetList :: Maybe Text
v1StatefulSetListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1StatefulSetListMetadata:V1StatefulSetList :: Maybe V1ListMeta
v1StatefulSetListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1StatefulSetOrdinals
-- | V1StatefulSetOrdinals
-- StatefulSetOrdinals describes the policy used for replica ordinal assignment in this StatefulSet.
data V1StatefulSetOrdinals = V1StatefulSetOrdinals
  { V1StatefulSetOrdinals -> Maybe Int
v1StatefulSetOrdinalsStart :: !(Maybe Int) -- ^ "start" - start is the number representing the first replica&#39;s index. It may be used to number replicas from an alternate index (eg: 1-indexed) over the default 0-indexed names, or to orchestrate progressive movement of replicas from one StatefulSet to another. If set, replica indices will be in the range:   [.spec.ordinals.start, .spec.ordinals.start + .spec.replicas). If unset, defaults to 0. Replica indices will be in the range:   [0, .spec.replicas).
  } deriving (Int -> V1StatefulSetOrdinals -> ShowS
[V1StatefulSetOrdinals] -> ShowS
V1StatefulSetOrdinals -> String
(Int -> V1StatefulSetOrdinals -> ShowS)
-> (V1StatefulSetOrdinals -> String)
-> ([V1StatefulSetOrdinals] -> ShowS)
-> Show V1StatefulSetOrdinals
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1StatefulSetOrdinals -> ShowS
showsPrec :: Int -> V1StatefulSetOrdinals -> ShowS
$cshow :: V1StatefulSetOrdinals -> String
show :: V1StatefulSetOrdinals -> String
$cshowList :: [V1StatefulSetOrdinals] -> ShowS
showList :: [V1StatefulSetOrdinals] -> ShowS
P.Show, V1StatefulSetOrdinals -> V1StatefulSetOrdinals -> Bool
(V1StatefulSetOrdinals -> V1StatefulSetOrdinals -> Bool)
-> (V1StatefulSetOrdinals -> V1StatefulSetOrdinals -> Bool)
-> Eq V1StatefulSetOrdinals
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1StatefulSetOrdinals -> V1StatefulSetOrdinals -> Bool
== :: V1StatefulSetOrdinals -> V1StatefulSetOrdinals -> Bool
$c/= :: V1StatefulSetOrdinals -> V1StatefulSetOrdinals -> Bool
/= :: V1StatefulSetOrdinals -> V1StatefulSetOrdinals -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1StatefulSetOrdinals
instance A.FromJSON V1StatefulSetOrdinals where
  parseJSON :: Value -> Parser V1StatefulSetOrdinals
parseJSON = String
-> (Object -> Parser V1StatefulSetOrdinals)
-> Value
-> Parser V1StatefulSetOrdinals
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1StatefulSetOrdinals" ((Object -> Parser V1StatefulSetOrdinals)
 -> Value -> Parser V1StatefulSetOrdinals)
-> (Object -> Parser V1StatefulSetOrdinals)
-> Value
-> Parser V1StatefulSetOrdinals
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Int -> V1StatefulSetOrdinals
V1StatefulSetOrdinals
      (Maybe Int -> V1StatefulSetOrdinals)
-> Parser (Maybe Int) -> Parser V1StatefulSetOrdinals
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"start")

-- | ToJSON V1StatefulSetOrdinals
instance A.ToJSON V1StatefulSetOrdinals where
  toJSON :: V1StatefulSetOrdinals -> Value
toJSON V1StatefulSetOrdinals {Maybe Int
$sel:v1StatefulSetOrdinalsStart:V1StatefulSetOrdinals :: V1StatefulSetOrdinals -> Maybe Int
v1StatefulSetOrdinalsStart :: Maybe Int
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"start" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1StatefulSetOrdinalsStart
      ]


-- | Construct a value of type 'V1StatefulSetOrdinals' (by applying it's required fields, if any)
mkV1StatefulSetOrdinals
  :: V1StatefulSetOrdinals
mkV1StatefulSetOrdinals :: V1StatefulSetOrdinals
mkV1StatefulSetOrdinals =
  V1StatefulSetOrdinals
  { $sel:v1StatefulSetOrdinalsStart:V1StatefulSetOrdinals :: Maybe Int
v1StatefulSetOrdinalsStart = Maybe Int
forall a. Maybe a
Nothing
  }

-- ** V1StatefulSetPersistentVolumeClaimRetentionPolicy
-- | V1StatefulSetPersistentVolumeClaimRetentionPolicy
-- StatefulSetPersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from the StatefulSet VolumeClaimTemplates.
data V1StatefulSetPersistentVolumeClaimRetentionPolicy = V1StatefulSetPersistentVolumeClaimRetentionPolicy
  { V1StatefulSetPersistentVolumeClaimRetentionPolicy -> Maybe Text
v1StatefulSetPersistentVolumeClaimRetentionPolicyWhenDeleted :: !(Maybe Text) -- ^ "whenDeleted" - WhenDeleted specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is deleted. The default policy of &#x60;Retain&#x60; causes PVCs to not be affected by StatefulSet deletion. The &#x60;Delete&#x60; policy causes those PVCs to be deleted.
  , V1StatefulSetPersistentVolumeClaimRetentionPolicy -> Maybe Text
v1StatefulSetPersistentVolumeClaimRetentionPolicyWhenScaled :: !(Maybe Text) -- ^ "whenScaled" - WhenScaled specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is scaled down. The default policy of &#x60;Retain&#x60; causes PVCs to not be affected by a scaledown. The &#x60;Delete&#x60; policy causes the associated PVCs for any excess pods above the replica count to be deleted.
  } deriving (Int -> V1StatefulSetPersistentVolumeClaimRetentionPolicy -> ShowS
[V1StatefulSetPersistentVolumeClaimRetentionPolicy] -> ShowS
V1StatefulSetPersistentVolumeClaimRetentionPolicy -> String
(Int -> V1StatefulSetPersistentVolumeClaimRetentionPolicy -> ShowS)
-> (V1StatefulSetPersistentVolumeClaimRetentionPolicy -> String)
-> ([V1StatefulSetPersistentVolumeClaimRetentionPolicy] -> ShowS)
-> Show V1StatefulSetPersistentVolumeClaimRetentionPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1StatefulSetPersistentVolumeClaimRetentionPolicy -> ShowS
showsPrec :: Int -> V1StatefulSetPersistentVolumeClaimRetentionPolicy -> ShowS
$cshow :: V1StatefulSetPersistentVolumeClaimRetentionPolicy -> String
show :: V1StatefulSetPersistentVolumeClaimRetentionPolicy -> String
$cshowList :: [V1StatefulSetPersistentVolumeClaimRetentionPolicy] -> ShowS
showList :: [V1StatefulSetPersistentVolumeClaimRetentionPolicy] -> ShowS
P.Show, V1StatefulSetPersistentVolumeClaimRetentionPolicy
-> V1StatefulSetPersistentVolumeClaimRetentionPolicy -> Bool
(V1StatefulSetPersistentVolumeClaimRetentionPolicy
 -> V1StatefulSetPersistentVolumeClaimRetentionPolicy -> Bool)
-> (V1StatefulSetPersistentVolumeClaimRetentionPolicy
    -> V1StatefulSetPersistentVolumeClaimRetentionPolicy -> Bool)
-> Eq V1StatefulSetPersistentVolumeClaimRetentionPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1StatefulSetPersistentVolumeClaimRetentionPolicy
-> V1StatefulSetPersistentVolumeClaimRetentionPolicy -> Bool
== :: V1StatefulSetPersistentVolumeClaimRetentionPolicy
-> V1StatefulSetPersistentVolumeClaimRetentionPolicy -> Bool
$c/= :: V1StatefulSetPersistentVolumeClaimRetentionPolicy
-> V1StatefulSetPersistentVolumeClaimRetentionPolicy -> Bool
/= :: V1StatefulSetPersistentVolumeClaimRetentionPolicy
-> V1StatefulSetPersistentVolumeClaimRetentionPolicy -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1StatefulSetPersistentVolumeClaimRetentionPolicy
instance A.FromJSON V1StatefulSetPersistentVolumeClaimRetentionPolicy where
  parseJSON :: Value -> Parser V1StatefulSetPersistentVolumeClaimRetentionPolicy
parseJSON = String
-> (Object
    -> Parser V1StatefulSetPersistentVolumeClaimRetentionPolicy)
-> Value
-> Parser V1StatefulSetPersistentVolumeClaimRetentionPolicy
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1StatefulSetPersistentVolumeClaimRetentionPolicy" ((Object
  -> Parser V1StatefulSetPersistentVolumeClaimRetentionPolicy)
 -> Value
 -> Parser V1StatefulSetPersistentVolumeClaimRetentionPolicy)
-> (Object
    -> Parser V1StatefulSetPersistentVolumeClaimRetentionPolicy)
-> Value
-> Parser V1StatefulSetPersistentVolumeClaimRetentionPolicy
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text -> V1StatefulSetPersistentVolumeClaimRetentionPolicy
V1StatefulSetPersistentVolumeClaimRetentionPolicy
      (Maybe Text
 -> Maybe Text -> V1StatefulSetPersistentVolumeClaimRetentionPolicy)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> V1StatefulSetPersistentVolumeClaimRetentionPolicy)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"whenDeleted")
      Parser
  (Maybe Text -> V1StatefulSetPersistentVolumeClaimRetentionPolicy)
-> Parser (Maybe Text)
-> Parser V1StatefulSetPersistentVolumeClaimRetentionPolicy
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"whenScaled")

-- | ToJSON V1StatefulSetPersistentVolumeClaimRetentionPolicy
instance A.ToJSON V1StatefulSetPersistentVolumeClaimRetentionPolicy where
  toJSON :: V1StatefulSetPersistentVolumeClaimRetentionPolicy -> Value
toJSON V1StatefulSetPersistentVolumeClaimRetentionPolicy {Maybe Text
$sel:v1StatefulSetPersistentVolumeClaimRetentionPolicyWhenDeleted:V1StatefulSetPersistentVolumeClaimRetentionPolicy :: V1StatefulSetPersistentVolumeClaimRetentionPolicy -> Maybe Text
$sel:v1StatefulSetPersistentVolumeClaimRetentionPolicyWhenScaled:V1StatefulSetPersistentVolumeClaimRetentionPolicy :: V1StatefulSetPersistentVolumeClaimRetentionPolicy -> Maybe Text
v1StatefulSetPersistentVolumeClaimRetentionPolicyWhenDeleted :: Maybe Text
v1StatefulSetPersistentVolumeClaimRetentionPolicyWhenScaled :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"whenDeleted" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StatefulSetPersistentVolumeClaimRetentionPolicyWhenDeleted
      , Key
"whenScaled" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StatefulSetPersistentVolumeClaimRetentionPolicyWhenScaled
      ]


-- | Construct a value of type 'V1StatefulSetPersistentVolumeClaimRetentionPolicy' (by applying it's required fields, if any)
mkV1StatefulSetPersistentVolumeClaimRetentionPolicy
  :: V1StatefulSetPersistentVolumeClaimRetentionPolicy
mkV1StatefulSetPersistentVolumeClaimRetentionPolicy :: V1StatefulSetPersistentVolumeClaimRetentionPolicy
mkV1StatefulSetPersistentVolumeClaimRetentionPolicy =
  V1StatefulSetPersistentVolumeClaimRetentionPolicy
  { $sel:v1StatefulSetPersistentVolumeClaimRetentionPolicyWhenDeleted:V1StatefulSetPersistentVolumeClaimRetentionPolicy :: Maybe Text
v1StatefulSetPersistentVolumeClaimRetentionPolicyWhenDeleted = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1StatefulSetPersistentVolumeClaimRetentionPolicyWhenScaled:V1StatefulSetPersistentVolumeClaimRetentionPolicy :: Maybe Text
v1StatefulSetPersistentVolumeClaimRetentionPolicyWhenScaled = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1StatefulSetSpec
-- | V1StatefulSetSpec
-- A StatefulSetSpec is the specification of a StatefulSet.
data V1StatefulSetSpec = V1StatefulSetSpec
  { V1StatefulSetSpec -> Maybe Int
v1StatefulSetSpecMinReadySeconds :: !(Maybe Int) -- ^ "minReadySeconds" - Minimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)
  , V1StatefulSetSpec -> Maybe V1StatefulSetOrdinals
v1StatefulSetSpecOrdinals :: !(Maybe V1StatefulSetOrdinals) -- ^ "ordinals"
  , V1StatefulSetSpec
-> Maybe V1StatefulSetPersistentVolumeClaimRetentionPolicy
v1StatefulSetSpecPersistentVolumeClaimRetentionPolicy :: !(Maybe V1StatefulSetPersistentVolumeClaimRetentionPolicy) -- ^ "persistentVolumeClaimRetentionPolicy"
  , V1StatefulSetSpec -> Maybe Text
v1StatefulSetSpecPodManagementPolicy :: !(Maybe Text) -- ^ "podManagementPolicy" - podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is &#x60;OrderedReady&#x60;, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is &#x60;Parallel&#x60; which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once.
  , V1StatefulSetSpec -> Maybe Int
v1StatefulSetSpecReplicas :: !(Maybe Int) -- ^ "replicas" - replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.
  , V1StatefulSetSpec -> Maybe Int
v1StatefulSetSpecRevisionHistoryLimit :: !(Maybe Int) -- ^ "revisionHistoryLimit" - revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet&#39;s revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10.
  , V1StatefulSetSpec -> V1LabelSelector
v1StatefulSetSpecSelector :: !(V1LabelSelector) -- ^ /Required/ "selector"
  , V1StatefulSetSpec -> Text
v1StatefulSetSpecServiceName :: !(Text) -- ^ /Required/ "serviceName" - serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \&quot;pod-specific-string\&quot; is managed by the StatefulSet controller.
  , V1StatefulSetSpec -> V1PodTemplateSpec
v1StatefulSetSpecTemplate :: !(V1PodTemplateSpec) -- ^ /Required/ "template"
  , V1StatefulSetSpec -> Maybe V1StatefulSetUpdateStrategy
v1StatefulSetSpecUpdateStrategy :: !(Maybe V1StatefulSetUpdateStrategy) -- ^ "updateStrategy"
  , V1StatefulSetSpec -> Maybe [V1PersistentVolumeClaim]
v1StatefulSetSpecVolumeClaimTemplates :: !(Maybe [V1PersistentVolumeClaim]) -- ^ "volumeClaimTemplates" - volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.
  } deriving (Int -> V1StatefulSetSpec -> ShowS
[V1StatefulSetSpec] -> ShowS
V1StatefulSetSpec -> String
(Int -> V1StatefulSetSpec -> ShowS)
-> (V1StatefulSetSpec -> String)
-> ([V1StatefulSetSpec] -> ShowS)
-> Show V1StatefulSetSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1StatefulSetSpec -> ShowS
showsPrec :: Int -> V1StatefulSetSpec -> ShowS
$cshow :: V1StatefulSetSpec -> String
show :: V1StatefulSetSpec -> String
$cshowList :: [V1StatefulSetSpec] -> ShowS
showList :: [V1StatefulSetSpec] -> ShowS
P.Show, V1StatefulSetSpec -> V1StatefulSetSpec -> Bool
(V1StatefulSetSpec -> V1StatefulSetSpec -> Bool)
-> (V1StatefulSetSpec -> V1StatefulSetSpec -> Bool)
-> Eq V1StatefulSetSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1StatefulSetSpec -> V1StatefulSetSpec -> Bool
== :: V1StatefulSetSpec -> V1StatefulSetSpec -> Bool
$c/= :: V1StatefulSetSpec -> V1StatefulSetSpec -> Bool
/= :: V1StatefulSetSpec -> V1StatefulSetSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1StatefulSetSpec
instance A.FromJSON V1StatefulSetSpec where
  parseJSON :: Value -> Parser V1StatefulSetSpec
parseJSON = String
-> (Object -> Parser V1StatefulSetSpec)
-> Value
-> Parser V1StatefulSetSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1StatefulSetSpec" ((Object -> Parser V1StatefulSetSpec)
 -> Value -> Parser V1StatefulSetSpec)
-> (Object -> Parser V1StatefulSetSpec)
-> Value
-> Parser V1StatefulSetSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Int
-> Maybe V1StatefulSetOrdinals
-> Maybe V1StatefulSetPersistentVolumeClaimRetentionPolicy
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> V1LabelSelector
-> Text
-> V1PodTemplateSpec
-> Maybe V1StatefulSetUpdateStrategy
-> Maybe [V1PersistentVolumeClaim]
-> V1StatefulSetSpec
V1StatefulSetSpec
      (Maybe Int
 -> Maybe V1StatefulSetOrdinals
 -> Maybe V1StatefulSetPersistentVolumeClaimRetentionPolicy
 -> Maybe Text
 -> Maybe Int
 -> Maybe Int
 -> V1LabelSelector
 -> Text
 -> V1PodTemplateSpec
 -> Maybe V1StatefulSetUpdateStrategy
 -> Maybe [V1PersistentVolumeClaim]
 -> V1StatefulSetSpec)
-> Parser (Maybe Int)
-> Parser
     (Maybe V1StatefulSetOrdinals
      -> Maybe V1StatefulSetPersistentVolumeClaimRetentionPolicy
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> V1LabelSelector
      -> Text
      -> V1PodTemplateSpec
      -> Maybe V1StatefulSetUpdateStrategy
      -> Maybe [V1PersistentVolumeClaim]
      -> V1StatefulSetSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"minReadySeconds")
      Parser
  (Maybe V1StatefulSetOrdinals
   -> Maybe V1StatefulSetPersistentVolumeClaimRetentionPolicy
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> V1LabelSelector
   -> Text
   -> V1PodTemplateSpec
   -> Maybe V1StatefulSetUpdateStrategy
   -> Maybe [V1PersistentVolumeClaim]
   -> V1StatefulSetSpec)
-> Parser (Maybe V1StatefulSetOrdinals)
-> Parser
     (Maybe V1StatefulSetPersistentVolumeClaimRetentionPolicy
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> V1LabelSelector
      -> Text
      -> V1PodTemplateSpec
      -> Maybe V1StatefulSetUpdateStrategy
      -> Maybe [V1PersistentVolumeClaim]
      -> V1StatefulSetSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1StatefulSetOrdinals)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ordinals")
      Parser
  (Maybe V1StatefulSetPersistentVolumeClaimRetentionPolicy
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> V1LabelSelector
   -> Text
   -> V1PodTemplateSpec
   -> Maybe V1StatefulSetUpdateStrategy
   -> Maybe [V1PersistentVolumeClaim]
   -> V1StatefulSetSpec)
-> Parser (Maybe V1StatefulSetPersistentVolumeClaimRetentionPolicy)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> V1LabelSelector
      -> Text
      -> V1PodTemplateSpec
      -> Maybe V1StatefulSetUpdateStrategy
      -> Maybe [V1PersistentVolumeClaim]
      -> V1StatefulSetSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object
-> Key
-> Parser (Maybe V1StatefulSetPersistentVolumeClaimRetentionPolicy)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"persistentVolumeClaimRetentionPolicy")
      Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> V1LabelSelector
   -> Text
   -> V1PodTemplateSpec
   -> Maybe V1StatefulSetUpdateStrategy
   -> Maybe [V1PersistentVolumeClaim]
   -> V1StatefulSetSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Int
      -> V1LabelSelector
      -> Text
      -> V1PodTemplateSpec
      -> Maybe V1StatefulSetUpdateStrategy
      -> Maybe [V1PersistentVolumeClaim]
      -> V1StatefulSetSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"podManagementPolicy")
      Parser
  (Maybe Int
   -> Maybe Int
   -> V1LabelSelector
   -> Text
   -> V1PodTemplateSpec
   -> Maybe V1StatefulSetUpdateStrategy
   -> Maybe [V1PersistentVolumeClaim]
   -> V1StatefulSetSpec)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> V1LabelSelector
      -> Text
      -> V1PodTemplateSpec
      -> Maybe V1StatefulSetUpdateStrategy
      -> Maybe [V1PersistentVolumeClaim]
      -> V1StatefulSetSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"replicas")
      Parser
  (Maybe Int
   -> V1LabelSelector
   -> Text
   -> V1PodTemplateSpec
   -> Maybe V1StatefulSetUpdateStrategy
   -> Maybe [V1PersistentVolumeClaim]
   -> V1StatefulSetSpec)
-> Parser (Maybe Int)
-> Parser
     (V1LabelSelector
      -> Text
      -> V1PodTemplateSpec
      -> Maybe V1StatefulSetUpdateStrategy
      -> Maybe [V1PersistentVolumeClaim]
      -> V1StatefulSetSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"revisionHistoryLimit")
      Parser
  (V1LabelSelector
   -> Text
   -> V1PodTemplateSpec
   -> Maybe V1StatefulSetUpdateStrategy
   -> Maybe [V1PersistentVolumeClaim]
   -> V1StatefulSetSpec)
-> Parser V1LabelSelector
-> Parser
     (Text
      -> V1PodTemplateSpec
      -> Maybe V1StatefulSetUpdateStrategy
      -> Maybe [V1PersistentVolumeClaim]
      -> V1StatefulSetSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1LabelSelector
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"selector")
      Parser
  (Text
   -> V1PodTemplateSpec
   -> Maybe V1StatefulSetUpdateStrategy
   -> Maybe [V1PersistentVolumeClaim]
   -> V1StatefulSetSpec)
-> Parser Text
-> Parser
     (V1PodTemplateSpec
      -> Maybe V1StatefulSetUpdateStrategy
      -> Maybe [V1PersistentVolumeClaim]
      -> V1StatefulSetSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"serviceName")
      Parser
  (V1PodTemplateSpec
   -> Maybe V1StatefulSetUpdateStrategy
   -> Maybe [V1PersistentVolumeClaim]
   -> V1StatefulSetSpec)
-> Parser V1PodTemplateSpec
-> Parser
     (Maybe V1StatefulSetUpdateStrategy
      -> Maybe [V1PersistentVolumeClaim] -> V1StatefulSetSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1PodTemplateSpec
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"template")
      Parser
  (Maybe V1StatefulSetUpdateStrategy
   -> Maybe [V1PersistentVolumeClaim] -> V1StatefulSetSpec)
-> Parser (Maybe V1StatefulSetUpdateStrategy)
-> Parser (Maybe [V1PersistentVolumeClaim] -> V1StatefulSetSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1StatefulSetUpdateStrategy)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"updateStrategy")
      Parser (Maybe [V1PersistentVolumeClaim] -> V1StatefulSetSpec)
-> Parser (Maybe [V1PersistentVolumeClaim])
-> Parser V1StatefulSetSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1PersistentVolumeClaim])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"volumeClaimTemplates")

-- | ToJSON V1StatefulSetSpec
instance A.ToJSON V1StatefulSetSpec where
  toJSON :: V1StatefulSetSpec -> Value
toJSON V1StatefulSetSpec {Maybe Int
Maybe [V1PersistentVolumeClaim]
Maybe Text
Maybe V1StatefulSetUpdateStrategy
Maybe V1StatefulSetPersistentVolumeClaimRetentionPolicy
Maybe V1StatefulSetOrdinals
Text
V1PodTemplateSpec
V1LabelSelector
$sel:v1StatefulSetSpecMinReadySeconds:V1StatefulSetSpec :: V1StatefulSetSpec -> Maybe Int
$sel:v1StatefulSetSpecOrdinals:V1StatefulSetSpec :: V1StatefulSetSpec -> Maybe V1StatefulSetOrdinals
$sel:v1StatefulSetSpecPersistentVolumeClaimRetentionPolicy:V1StatefulSetSpec :: V1StatefulSetSpec
-> Maybe V1StatefulSetPersistentVolumeClaimRetentionPolicy
$sel:v1StatefulSetSpecPodManagementPolicy:V1StatefulSetSpec :: V1StatefulSetSpec -> Maybe Text
$sel:v1StatefulSetSpecReplicas:V1StatefulSetSpec :: V1StatefulSetSpec -> Maybe Int
$sel:v1StatefulSetSpecRevisionHistoryLimit:V1StatefulSetSpec :: V1StatefulSetSpec -> Maybe Int
$sel:v1StatefulSetSpecSelector:V1StatefulSetSpec :: V1StatefulSetSpec -> V1LabelSelector
$sel:v1StatefulSetSpecServiceName:V1StatefulSetSpec :: V1StatefulSetSpec -> Text
$sel:v1StatefulSetSpecTemplate:V1StatefulSetSpec :: V1StatefulSetSpec -> V1PodTemplateSpec
$sel:v1StatefulSetSpecUpdateStrategy:V1StatefulSetSpec :: V1StatefulSetSpec -> Maybe V1StatefulSetUpdateStrategy
$sel:v1StatefulSetSpecVolumeClaimTemplates:V1StatefulSetSpec :: V1StatefulSetSpec -> Maybe [V1PersistentVolumeClaim]
v1StatefulSetSpecMinReadySeconds :: Maybe Int
v1StatefulSetSpecOrdinals :: Maybe V1StatefulSetOrdinals
v1StatefulSetSpecPersistentVolumeClaimRetentionPolicy :: Maybe V1StatefulSetPersistentVolumeClaimRetentionPolicy
v1StatefulSetSpecPodManagementPolicy :: Maybe Text
v1StatefulSetSpecReplicas :: Maybe Int
v1StatefulSetSpecRevisionHistoryLimit :: Maybe Int
v1StatefulSetSpecSelector :: V1LabelSelector
v1StatefulSetSpecServiceName :: Text
v1StatefulSetSpecTemplate :: V1PodTemplateSpec
v1StatefulSetSpecUpdateStrategy :: Maybe V1StatefulSetUpdateStrategy
v1StatefulSetSpecVolumeClaimTemplates :: Maybe [V1PersistentVolumeClaim]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"minReadySeconds" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1StatefulSetSpecMinReadySeconds
      , Key
"ordinals" Key -> Maybe V1StatefulSetOrdinals -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1StatefulSetOrdinals
v1StatefulSetSpecOrdinals
      , Key
"persistentVolumeClaimRetentionPolicy" Key
-> Maybe V1StatefulSetPersistentVolumeClaimRetentionPolicy
-> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1StatefulSetPersistentVolumeClaimRetentionPolicy
v1StatefulSetSpecPersistentVolumeClaimRetentionPolicy
      , Key
"podManagementPolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StatefulSetSpecPodManagementPolicy
      , Key
"replicas" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1StatefulSetSpecReplicas
      , Key
"revisionHistoryLimit" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1StatefulSetSpecRevisionHistoryLimit
      , Key
"selector" Key -> V1LabelSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1LabelSelector
v1StatefulSetSpecSelector
      , Key
"serviceName" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1StatefulSetSpecServiceName
      , Key
"template" Key -> V1PodTemplateSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1PodTemplateSpec
v1StatefulSetSpecTemplate
      , Key
"updateStrategy" Key -> Maybe V1StatefulSetUpdateStrategy -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1StatefulSetUpdateStrategy
v1StatefulSetSpecUpdateStrategy
      , Key
"volumeClaimTemplates" Key -> Maybe [V1PersistentVolumeClaim] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1PersistentVolumeClaim]
v1StatefulSetSpecVolumeClaimTemplates
      ]


-- | Construct a value of type 'V1StatefulSetSpec' (by applying it's required fields, if any)
mkV1StatefulSetSpec
  :: V1LabelSelector -- ^ 'v1StatefulSetSpecSelector' 
  -> Text -- ^ 'v1StatefulSetSpecServiceName': serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.
  -> V1PodTemplateSpec -- ^ 'v1StatefulSetSpecTemplate' 
  -> V1StatefulSetSpec
mkV1StatefulSetSpec :: V1LabelSelector -> Text -> V1PodTemplateSpec -> V1StatefulSetSpec
mkV1StatefulSetSpec V1LabelSelector
v1StatefulSetSpecSelector Text
v1StatefulSetSpecServiceName V1PodTemplateSpec
v1StatefulSetSpecTemplate =
  V1StatefulSetSpec
  { $sel:v1StatefulSetSpecMinReadySeconds:V1StatefulSetSpec :: Maybe Int
v1StatefulSetSpecMinReadySeconds = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1StatefulSetSpecOrdinals:V1StatefulSetSpec :: Maybe V1StatefulSetOrdinals
v1StatefulSetSpecOrdinals = Maybe V1StatefulSetOrdinals
forall a. Maybe a
Nothing
  , $sel:v1StatefulSetSpecPersistentVolumeClaimRetentionPolicy:V1StatefulSetSpec :: Maybe V1StatefulSetPersistentVolumeClaimRetentionPolicy
v1StatefulSetSpecPersistentVolumeClaimRetentionPolicy = Maybe V1StatefulSetPersistentVolumeClaimRetentionPolicy
forall a. Maybe a
Nothing
  , $sel:v1StatefulSetSpecPodManagementPolicy:V1StatefulSetSpec :: Maybe Text
v1StatefulSetSpecPodManagementPolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1StatefulSetSpecReplicas:V1StatefulSetSpec :: Maybe Int
v1StatefulSetSpecReplicas = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1StatefulSetSpecRevisionHistoryLimit:V1StatefulSetSpec :: Maybe Int
v1StatefulSetSpecRevisionHistoryLimit = Maybe Int
forall a. Maybe a
Nothing
  , V1LabelSelector
$sel:v1StatefulSetSpecSelector:V1StatefulSetSpec :: V1LabelSelector
v1StatefulSetSpecSelector :: V1LabelSelector
v1StatefulSetSpecSelector
  , Text
$sel:v1StatefulSetSpecServiceName:V1StatefulSetSpec :: Text
v1StatefulSetSpecServiceName :: Text
v1StatefulSetSpecServiceName
  , V1PodTemplateSpec
$sel:v1StatefulSetSpecTemplate:V1StatefulSetSpec :: V1PodTemplateSpec
v1StatefulSetSpecTemplate :: V1PodTemplateSpec
v1StatefulSetSpecTemplate
  , $sel:v1StatefulSetSpecUpdateStrategy:V1StatefulSetSpec :: Maybe V1StatefulSetUpdateStrategy
v1StatefulSetSpecUpdateStrategy = Maybe V1StatefulSetUpdateStrategy
forall a. Maybe a
Nothing
  , $sel:v1StatefulSetSpecVolumeClaimTemplates:V1StatefulSetSpec :: Maybe [V1PersistentVolumeClaim]
v1StatefulSetSpecVolumeClaimTemplates = Maybe [V1PersistentVolumeClaim]
forall a. Maybe a
Nothing
  }

-- ** V1StatefulSetStatus
-- | V1StatefulSetStatus
-- StatefulSetStatus represents the current state of a StatefulSet.
data V1StatefulSetStatus = V1StatefulSetStatus
  { V1StatefulSetStatus -> Maybe Int
v1StatefulSetStatusAvailableReplicas :: !(Maybe Int) -- ^ "availableReplicas" - Total number of available pods (ready for at least minReadySeconds) targeted by this statefulset.
  , V1StatefulSetStatus -> Maybe Int
v1StatefulSetStatusCollisionCount :: !(Maybe Int) -- ^ "collisionCount" - collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.
  , V1StatefulSetStatus -> Maybe [V1StatefulSetCondition]
v1StatefulSetStatusConditions :: !(Maybe [V1StatefulSetCondition]) -- ^ "conditions" - Represents the latest available observations of a statefulset&#39;s current state.
  , V1StatefulSetStatus -> Maybe Int
v1StatefulSetStatusCurrentReplicas :: !(Maybe Int) -- ^ "currentReplicas" - currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision.
  , V1StatefulSetStatus -> Maybe Text
v1StatefulSetStatusCurrentRevision :: !(Maybe Text) -- ^ "currentRevision" - currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas).
  , V1StatefulSetStatus -> Maybe Integer
v1StatefulSetStatusObservedGeneration :: !(Maybe Integer) -- ^ "observedGeneration" - observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the StatefulSet&#39;s generation, which is updated on mutation by the API Server.
  , V1StatefulSetStatus -> Maybe Int
v1StatefulSetStatusReadyReplicas :: !(Maybe Int) -- ^ "readyReplicas" - readyReplicas is the number of pods created for this StatefulSet with a Ready Condition.
  , V1StatefulSetStatus -> Int
v1StatefulSetStatusReplicas :: !(Int) -- ^ /Required/ "replicas" - replicas is the number of Pods created by the StatefulSet controller.
  , V1StatefulSetStatus -> Maybe Text
v1StatefulSetStatusUpdateRevision :: !(Maybe Text) -- ^ "updateRevision" - updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)
  , V1StatefulSetStatus -> Maybe Int
v1StatefulSetStatusUpdatedReplicas :: !(Maybe Int) -- ^ "updatedReplicas" - updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision.
  } deriving (Int -> V1StatefulSetStatus -> ShowS
[V1StatefulSetStatus] -> ShowS
V1StatefulSetStatus -> String
(Int -> V1StatefulSetStatus -> ShowS)
-> (V1StatefulSetStatus -> String)
-> ([V1StatefulSetStatus] -> ShowS)
-> Show V1StatefulSetStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1StatefulSetStatus -> ShowS
showsPrec :: Int -> V1StatefulSetStatus -> ShowS
$cshow :: V1StatefulSetStatus -> String
show :: V1StatefulSetStatus -> String
$cshowList :: [V1StatefulSetStatus] -> ShowS
showList :: [V1StatefulSetStatus] -> ShowS
P.Show, V1StatefulSetStatus -> V1StatefulSetStatus -> Bool
(V1StatefulSetStatus -> V1StatefulSetStatus -> Bool)
-> (V1StatefulSetStatus -> V1StatefulSetStatus -> Bool)
-> Eq V1StatefulSetStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1StatefulSetStatus -> V1StatefulSetStatus -> Bool
== :: V1StatefulSetStatus -> V1StatefulSetStatus -> Bool
$c/= :: V1StatefulSetStatus -> V1StatefulSetStatus -> Bool
/= :: V1StatefulSetStatus -> V1StatefulSetStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1StatefulSetStatus
instance A.FromJSON V1StatefulSetStatus where
  parseJSON :: Value -> Parser V1StatefulSetStatus
parseJSON = String
-> (Object -> Parser V1StatefulSetStatus)
-> Value
-> Parser V1StatefulSetStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1StatefulSetStatus" ((Object -> Parser V1StatefulSetStatus)
 -> Value -> Parser V1StatefulSetStatus)
-> (Object -> Parser V1StatefulSetStatus)
-> Value
-> Parser V1StatefulSetStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Int
-> Maybe Int
-> Maybe [V1StatefulSetCondition]
-> Maybe Int
-> Maybe Text
-> Maybe Integer
-> Maybe Int
-> Int
-> Maybe Text
-> Maybe Int
-> V1StatefulSetStatus
V1StatefulSetStatus
      (Maybe Int
 -> Maybe Int
 -> Maybe [V1StatefulSetCondition]
 -> Maybe Int
 -> Maybe Text
 -> Maybe Integer
 -> Maybe Int
 -> Int
 -> Maybe Text
 -> Maybe Int
 -> V1StatefulSetStatus)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe [V1StatefulSetCondition]
      -> Maybe Int
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Int
      -> Int
      -> Maybe Text
      -> Maybe Int
      -> V1StatefulSetStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"availableReplicas")
      Parser
  (Maybe Int
   -> Maybe [V1StatefulSetCondition]
   -> Maybe Int
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Int
   -> Int
   -> Maybe Text
   -> Maybe Int
   -> V1StatefulSetStatus)
-> Parser (Maybe Int)
-> Parser
     (Maybe [V1StatefulSetCondition]
      -> Maybe Int
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Int
      -> Int
      -> Maybe Text
      -> Maybe Int
      -> V1StatefulSetStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"collisionCount")
      Parser
  (Maybe [V1StatefulSetCondition]
   -> Maybe Int
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Int
   -> Int
   -> Maybe Text
   -> Maybe Int
   -> V1StatefulSetStatus)
-> Parser (Maybe [V1StatefulSetCondition])
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Int
      -> Int
      -> Maybe Text
      -> Maybe Int
      -> V1StatefulSetStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1StatefulSetCondition])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"conditions")
      Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Int
   -> Int
   -> Maybe Text
   -> Maybe Int
   -> V1StatefulSetStatus)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Integer
      -> Maybe Int
      -> Int
      -> Maybe Text
      -> Maybe Int
      -> V1StatefulSetStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"currentReplicas")
      Parser
  (Maybe Text
   -> Maybe Integer
   -> Maybe Int
   -> Int
   -> Maybe Text
   -> Maybe Int
   -> V1StatefulSetStatus)
-> Parser (Maybe Text)
-> Parser
     (Maybe Integer
      -> Maybe Int
      -> Int
      -> Maybe Text
      -> Maybe Int
      -> V1StatefulSetStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"currentRevision")
      Parser
  (Maybe Integer
   -> Maybe Int
   -> Int
   -> Maybe Text
   -> Maybe Int
   -> V1StatefulSetStatus)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Int
      -> Int -> Maybe Text -> Maybe Int -> V1StatefulSetStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"observedGeneration")
      Parser
  (Maybe Int
   -> Int -> Maybe Text -> Maybe Int -> V1StatefulSetStatus)
-> Parser (Maybe Int)
-> Parser (Int -> Maybe Text -> Maybe Int -> V1StatefulSetStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readyReplicas")
      Parser (Int -> Maybe Text -> Maybe Int -> V1StatefulSetStatus)
-> Parser Int
-> Parser (Maybe Text -> Maybe Int -> V1StatefulSetStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"replicas")
      Parser (Maybe Text -> Maybe Int -> V1StatefulSetStatus)
-> Parser (Maybe Text) -> Parser (Maybe Int -> V1StatefulSetStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"updateRevision")
      Parser (Maybe Int -> V1StatefulSetStatus)
-> Parser (Maybe Int) -> Parser V1StatefulSetStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"updatedReplicas")

-- | ToJSON V1StatefulSetStatus
instance A.ToJSON V1StatefulSetStatus where
  toJSON :: V1StatefulSetStatus -> Value
toJSON V1StatefulSetStatus {Int
Maybe Int
Maybe Integer
Maybe [V1StatefulSetCondition]
Maybe Text
$sel:v1StatefulSetStatusAvailableReplicas:V1StatefulSetStatus :: V1StatefulSetStatus -> Maybe Int
$sel:v1StatefulSetStatusCollisionCount:V1StatefulSetStatus :: V1StatefulSetStatus -> Maybe Int
$sel:v1StatefulSetStatusConditions:V1StatefulSetStatus :: V1StatefulSetStatus -> Maybe [V1StatefulSetCondition]
$sel:v1StatefulSetStatusCurrentReplicas:V1StatefulSetStatus :: V1StatefulSetStatus -> Maybe Int
$sel:v1StatefulSetStatusCurrentRevision:V1StatefulSetStatus :: V1StatefulSetStatus -> Maybe Text
$sel:v1StatefulSetStatusObservedGeneration:V1StatefulSetStatus :: V1StatefulSetStatus -> Maybe Integer
$sel:v1StatefulSetStatusReadyReplicas:V1StatefulSetStatus :: V1StatefulSetStatus -> Maybe Int
$sel:v1StatefulSetStatusReplicas:V1StatefulSetStatus :: V1StatefulSetStatus -> Int
$sel:v1StatefulSetStatusUpdateRevision:V1StatefulSetStatus :: V1StatefulSetStatus -> Maybe Text
$sel:v1StatefulSetStatusUpdatedReplicas:V1StatefulSetStatus :: V1StatefulSetStatus -> Maybe Int
v1StatefulSetStatusAvailableReplicas :: Maybe Int
v1StatefulSetStatusCollisionCount :: Maybe Int
v1StatefulSetStatusConditions :: Maybe [V1StatefulSetCondition]
v1StatefulSetStatusCurrentReplicas :: Maybe Int
v1StatefulSetStatusCurrentRevision :: Maybe Text
v1StatefulSetStatusObservedGeneration :: Maybe Integer
v1StatefulSetStatusReadyReplicas :: Maybe Int
v1StatefulSetStatusReplicas :: Int
v1StatefulSetStatusUpdateRevision :: Maybe Text
v1StatefulSetStatusUpdatedReplicas :: Maybe Int
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"availableReplicas" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1StatefulSetStatusAvailableReplicas
      , Key
"collisionCount" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1StatefulSetStatusCollisionCount
      , Key
"conditions" Key -> Maybe [V1StatefulSetCondition] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1StatefulSetCondition]
v1StatefulSetStatusConditions
      , Key
"currentReplicas" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1StatefulSetStatusCurrentReplicas
      , Key
"currentRevision" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StatefulSetStatusCurrentRevision
      , Key
"observedGeneration" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1StatefulSetStatusObservedGeneration
      , Key
"readyReplicas" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1StatefulSetStatusReadyReplicas
      , Key
"replicas" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v1StatefulSetStatusReplicas
      , Key
"updateRevision" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StatefulSetStatusUpdateRevision
      , Key
"updatedReplicas" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1StatefulSetStatusUpdatedReplicas
      ]


-- | Construct a value of type 'V1StatefulSetStatus' (by applying it's required fields, if any)
mkV1StatefulSetStatus
  :: Int -- ^ 'v1StatefulSetStatusReplicas': replicas is the number of Pods created by the StatefulSet controller.
  -> V1StatefulSetStatus
mkV1StatefulSetStatus :: Int -> V1StatefulSetStatus
mkV1StatefulSetStatus Int
v1StatefulSetStatusReplicas =
  V1StatefulSetStatus
  { $sel:v1StatefulSetStatusAvailableReplicas:V1StatefulSetStatus :: Maybe Int
v1StatefulSetStatusAvailableReplicas = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1StatefulSetStatusCollisionCount:V1StatefulSetStatus :: Maybe Int
v1StatefulSetStatusCollisionCount = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1StatefulSetStatusConditions:V1StatefulSetStatus :: Maybe [V1StatefulSetCondition]
v1StatefulSetStatusConditions = Maybe [V1StatefulSetCondition]
forall a. Maybe a
Nothing
  , $sel:v1StatefulSetStatusCurrentReplicas:V1StatefulSetStatus :: Maybe Int
v1StatefulSetStatusCurrentReplicas = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1StatefulSetStatusCurrentRevision:V1StatefulSetStatus :: Maybe Text
v1StatefulSetStatusCurrentRevision = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1StatefulSetStatusObservedGeneration:V1StatefulSetStatus :: Maybe Integer
v1StatefulSetStatusObservedGeneration = Maybe Integer
forall a. Maybe a
Nothing
  , $sel:v1StatefulSetStatusReadyReplicas:V1StatefulSetStatus :: Maybe Int
v1StatefulSetStatusReadyReplicas = Maybe Int
forall a. Maybe a
Nothing
  , Int
$sel:v1StatefulSetStatusReplicas:V1StatefulSetStatus :: Int
v1StatefulSetStatusReplicas :: Int
v1StatefulSetStatusReplicas
  , $sel:v1StatefulSetStatusUpdateRevision:V1StatefulSetStatus :: Maybe Text
v1StatefulSetStatusUpdateRevision = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1StatefulSetStatusUpdatedReplicas:V1StatefulSetStatus :: Maybe Int
v1StatefulSetStatusUpdatedReplicas = Maybe Int
forall a. Maybe a
Nothing
  }

-- ** V1StatefulSetUpdateStrategy
-- | V1StatefulSetUpdateStrategy
-- StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy.
data V1StatefulSetUpdateStrategy = V1StatefulSetUpdateStrategy
  { V1StatefulSetUpdateStrategy
-> Maybe V1RollingUpdateStatefulSetStrategy
v1StatefulSetUpdateStrategyRollingUpdate :: !(Maybe V1RollingUpdateStatefulSetStrategy) -- ^ "rollingUpdate"
  , V1StatefulSetUpdateStrategy -> Maybe Text
v1StatefulSetUpdateStrategyType :: !(Maybe Text) -- ^ "type" - Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate.
  } deriving (Int -> V1StatefulSetUpdateStrategy -> ShowS
[V1StatefulSetUpdateStrategy] -> ShowS
V1StatefulSetUpdateStrategy -> String
(Int -> V1StatefulSetUpdateStrategy -> ShowS)
-> (V1StatefulSetUpdateStrategy -> String)
-> ([V1StatefulSetUpdateStrategy] -> ShowS)
-> Show V1StatefulSetUpdateStrategy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1StatefulSetUpdateStrategy -> ShowS
showsPrec :: Int -> V1StatefulSetUpdateStrategy -> ShowS
$cshow :: V1StatefulSetUpdateStrategy -> String
show :: V1StatefulSetUpdateStrategy -> String
$cshowList :: [V1StatefulSetUpdateStrategy] -> ShowS
showList :: [V1StatefulSetUpdateStrategy] -> ShowS
P.Show, V1StatefulSetUpdateStrategy -> V1StatefulSetUpdateStrategy -> Bool
(V1StatefulSetUpdateStrategy
 -> V1StatefulSetUpdateStrategy -> Bool)
-> (V1StatefulSetUpdateStrategy
    -> V1StatefulSetUpdateStrategy -> Bool)
-> Eq V1StatefulSetUpdateStrategy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1StatefulSetUpdateStrategy -> V1StatefulSetUpdateStrategy -> Bool
== :: V1StatefulSetUpdateStrategy -> V1StatefulSetUpdateStrategy -> Bool
$c/= :: V1StatefulSetUpdateStrategy -> V1StatefulSetUpdateStrategy -> Bool
/= :: V1StatefulSetUpdateStrategy -> V1StatefulSetUpdateStrategy -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1StatefulSetUpdateStrategy
instance A.FromJSON V1StatefulSetUpdateStrategy where
  parseJSON :: Value -> Parser V1StatefulSetUpdateStrategy
parseJSON = String
-> (Object -> Parser V1StatefulSetUpdateStrategy)
-> Value
-> Parser V1StatefulSetUpdateStrategy
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1StatefulSetUpdateStrategy" ((Object -> Parser V1StatefulSetUpdateStrategy)
 -> Value -> Parser V1StatefulSetUpdateStrategy)
-> (Object -> Parser V1StatefulSetUpdateStrategy)
-> Value
-> Parser V1StatefulSetUpdateStrategy
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1RollingUpdateStatefulSetStrategy
-> Maybe Text -> V1StatefulSetUpdateStrategy
V1StatefulSetUpdateStrategy
      (Maybe V1RollingUpdateStatefulSetStrategy
 -> Maybe Text -> V1StatefulSetUpdateStrategy)
-> Parser (Maybe V1RollingUpdateStatefulSetStrategy)
-> Parser (Maybe Text -> V1StatefulSetUpdateStrategy)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1RollingUpdateStatefulSetStrategy)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"rollingUpdate")
      Parser (Maybe Text -> V1StatefulSetUpdateStrategy)
-> Parser (Maybe Text) -> Parser V1StatefulSetUpdateStrategy
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"type")

-- | ToJSON V1StatefulSetUpdateStrategy
instance A.ToJSON V1StatefulSetUpdateStrategy where
  toJSON :: V1StatefulSetUpdateStrategy -> Value
toJSON V1StatefulSetUpdateStrategy {Maybe Text
Maybe V1RollingUpdateStatefulSetStrategy
$sel:v1StatefulSetUpdateStrategyRollingUpdate:V1StatefulSetUpdateStrategy :: V1StatefulSetUpdateStrategy
-> Maybe V1RollingUpdateStatefulSetStrategy
$sel:v1StatefulSetUpdateStrategyType:V1StatefulSetUpdateStrategy :: V1StatefulSetUpdateStrategy -> Maybe Text
v1StatefulSetUpdateStrategyRollingUpdate :: Maybe V1RollingUpdateStatefulSetStrategy
v1StatefulSetUpdateStrategyType :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"rollingUpdate" Key -> Maybe V1RollingUpdateStatefulSetStrategy -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1RollingUpdateStatefulSetStrategy
v1StatefulSetUpdateStrategyRollingUpdate
      , Key
"type" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StatefulSetUpdateStrategyType
      ]


-- | Construct a value of type 'V1StatefulSetUpdateStrategy' (by applying it's required fields, if any)
mkV1StatefulSetUpdateStrategy
  :: V1StatefulSetUpdateStrategy
mkV1StatefulSetUpdateStrategy :: V1StatefulSetUpdateStrategy
mkV1StatefulSetUpdateStrategy =
  V1StatefulSetUpdateStrategy
  { $sel:v1StatefulSetUpdateStrategyRollingUpdate:V1StatefulSetUpdateStrategy :: Maybe V1RollingUpdateStatefulSetStrategy
v1StatefulSetUpdateStrategyRollingUpdate = Maybe V1RollingUpdateStatefulSetStrategy
forall a. Maybe a
Nothing
  , $sel:v1StatefulSetUpdateStrategyType:V1StatefulSetUpdateStrategy :: Maybe Text
v1StatefulSetUpdateStrategyType = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1Status
-- | V1Status
-- Status is a return value for calls that don't return other objects.
data V1Status = V1Status
  { V1Status -> Maybe Text
v1StatusApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1Status -> Maybe Int
v1StatusCode :: !(Maybe Int) -- ^ "code" - Suggested HTTP return code for this status, 0 if not set.
  , V1Status -> Maybe V1StatusDetails
v1StatusDetails :: !(Maybe V1StatusDetails) -- ^ "details"
  , V1Status -> Maybe Text
v1StatusKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1Status -> Maybe Text
v1StatusMessage :: !(Maybe Text) -- ^ "message" - A human-readable description of the status of this operation.
  , V1Status -> Maybe V1ListMeta
v1StatusMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  , V1Status -> Maybe Text
v1StatusReason :: !(Maybe Text) -- ^ "reason" - A machine-readable description of why this operation is in the \&quot;Failure\&quot; status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.
  , V1Status -> Maybe Text
v1StatusStatus :: !(Maybe Text) -- ^ "status" - Status of the operation. One of: \&quot;Success\&quot; or \&quot;Failure\&quot;. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  } deriving (Int -> V1Status -> ShowS
[V1Status] -> ShowS
V1Status -> String
(Int -> V1Status -> ShowS)
-> (V1Status -> String) -> ([V1Status] -> ShowS) -> Show V1Status
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1Status -> ShowS
showsPrec :: Int -> V1Status -> ShowS
$cshow :: V1Status -> String
show :: V1Status -> String
$cshowList :: [V1Status] -> ShowS
showList :: [V1Status] -> ShowS
P.Show, V1Status -> V1Status -> Bool
(V1Status -> V1Status -> Bool)
-> (V1Status -> V1Status -> Bool) -> Eq V1Status
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1Status -> V1Status -> Bool
== :: V1Status -> V1Status -> Bool
$c/= :: V1Status -> V1Status -> Bool
/= :: V1Status -> V1Status -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1Status
instance A.FromJSON V1Status where
  parseJSON :: Value -> Parser V1Status
parseJSON = String -> (Object -> Parser V1Status) -> Value -> Parser V1Status
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1Status" ((Object -> Parser V1Status) -> Value -> Parser V1Status)
-> (Object -> Parser V1Status) -> Value -> Parser V1Status
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Int
-> Maybe V1StatusDetails
-> Maybe Text
-> Maybe Text
-> Maybe V1ListMeta
-> Maybe Text
-> Maybe Text
-> V1Status
V1Status
      (Maybe Text
 -> Maybe Int
 -> Maybe V1StatusDetails
 -> Maybe Text
 -> Maybe Text
 -> Maybe V1ListMeta
 -> Maybe Text
 -> Maybe Text
 -> V1Status)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe V1StatusDetails
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1ListMeta
      -> Maybe Text
      -> Maybe Text
      -> V1Status)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Int
   -> Maybe V1StatusDetails
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1ListMeta
   -> Maybe Text
   -> Maybe Text
   -> V1Status)
-> Parser (Maybe Int)
-> Parser
     (Maybe V1StatusDetails
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1ListMeta
      -> Maybe Text
      -> Maybe Text
      -> V1Status)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"code")
      Parser
  (Maybe V1StatusDetails
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1ListMeta
   -> Maybe Text
   -> Maybe Text
   -> V1Status)
-> Parser (Maybe V1StatusDetails)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe V1ListMeta
      -> Maybe Text
      -> Maybe Text
      -> V1Status)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1StatusDetails)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"details")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe V1ListMeta
   -> Maybe Text
   -> Maybe Text
   -> V1Status)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ListMeta -> Maybe Text -> Maybe Text -> V1Status)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe Text
   -> Maybe V1ListMeta -> Maybe Text -> Maybe Text -> V1Status)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ListMeta -> Maybe Text -> Maybe Text -> V1Status)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"message")
      Parser (Maybe V1ListMeta -> Maybe Text -> Maybe Text -> V1Status)
-> Parser (Maybe V1ListMeta)
-> Parser (Maybe Text -> Maybe Text -> V1Status)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (Maybe Text -> Maybe Text -> V1Status)
-> Parser (Maybe Text) -> Parser (Maybe Text -> V1Status)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reason")
      Parser (Maybe Text -> V1Status)
-> Parser (Maybe Text) -> Parser V1Status
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1Status
instance A.ToJSON V1Status where
  toJSON :: V1Status -> Value
toJSON V1Status {Maybe Int
Maybe Text
Maybe V1StatusDetails
Maybe V1ListMeta
$sel:v1StatusApiVersion:V1Status :: V1Status -> Maybe Text
$sel:v1StatusCode:V1Status :: V1Status -> Maybe Int
$sel:v1StatusDetails:V1Status :: V1Status -> Maybe V1StatusDetails
$sel:v1StatusKind:V1Status :: V1Status -> Maybe Text
$sel:v1StatusMessage:V1Status :: V1Status -> Maybe Text
$sel:v1StatusMetadata:V1Status :: V1Status -> Maybe V1ListMeta
$sel:v1StatusReason:V1Status :: V1Status -> Maybe Text
$sel:v1StatusStatus:V1Status :: V1Status -> Maybe Text
v1StatusApiVersion :: Maybe Text
v1StatusCode :: Maybe Int
v1StatusDetails :: Maybe V1StatusDetails
v1StatusKind :: Maybe Text
v1StatusMessage :: Maybe Text
v1StatusMetadata :: Maybe V1ListMeta
v1StatusReason :: Maybe Text
v1StatusStatus :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StatusApiVersion
      , Key
"code" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1StatusCode
      , Key
"details" Key -> Maybe V1StatusDetails -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1StatusDetails
v1StatusDetails
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StatusKind
      , Key
"message" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StatusMessage
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1StatusMetadata
      , Key
"reason" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StatusReason
      , Key
"status" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StatusStatus
      ]


-- | Construct a value of type 'V1Status' (by applying it's required fields, if any)
mkV1Status
  :: V1Status
mkV1Status :: V1Status
mkV1Status =
  V1Status
  { $sel:v1StatusApiVersion:V1Status :: Maybe Text
v1StatusApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1StatusCode:V1Status :: Maybe Int
v1StatusCode = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1StatusDetails:V1Status :: Maybe V1StatusDetails
v1StatusDetails = Maybe V1StatusDetails
forall a. Maybe a
Nothing
  , $sel:v1StatusKind:V1Status :: Maybe Text
v1StatusKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1StatusMessage:V1Status :: Maybe Text
v1StatusMessage = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1StatusMetadata:V1Status :: Maybe V1ListMeta
v1StatusMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  , $sel:v1StatusReason:V1Status :: Maybe Text
v1StatusReason = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1StatusStatus:V1Status :: Maybe Text
v1StatusStatus = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1StatusCause
-- | V1StatusCause
-- StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.
data V1StatusCause = V1StatusCause
  { V1StatusCause -> Maybe Text
v1StatusCauseField :: !(Maybe Text) -- ^ "field" - The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed.  Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.  Examples:   \&quot;name\&quot; - the field \&quot;name\&quot; on the current resource   \&quot;items[0].name\&quot; - the field \&quot;name\&quot; on the first array entry in \&quot;items\&quot;
  , V1StatusCause -> Maybe Text
v1StatusCauseMessage :: !(Maybe Text) -- ^ "message" - A human-readable description of the cause of the error.  This field may be presented as-is to a reader.
  , V1StatusCause -> Maybe Text
v1StatusCauseReason :: !(Maybe Text) -- ^ "reason" - A machine-readable description of the cause of the error. If this value is empty there is no information available.
  } deriving (Int -> V1StatusCause -> ShowS
[V1StatusCause] -> ShowS
V1StatusCause -> String
(Int -> V1StatusCause -> ShowS)
-> (V1StatusCause -> String)
-> ([V1StatusCause] -> ShowS)
-> Show V1StatusCause
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1StatusCause -> ShowS
showsPrec :: Int -> V1StatusCause -> ShowS
$cshow :: V1StatusCause -> String
show :: V1StatusCause -> String
$cshowList :: [V1StatusCause] -> ShowS
showList :: [V1StatusCause] -> ShowS
P.Show, V1StatusCause -> V1StatusCause -> Bool
(V1StatusCause -> V1StatusCause -> Bool)
-> (V1StatusCause -> V1StatusCause -> Bool) -> Eq V1StatusCause
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1StatusCause -> V1StatusCause -> Bool
== :: V1StatusCause -> V1StatusCause -> Bool
$c/= :: V1StatusCause -> V1StatusCause -> Bool
/= :: V1StatusCause -> V1StatusCause -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1StatusCause
instance A.FromJSON V1StatusCause where
  parseJSON :: Value -> Parser V1StatusCause
parseJSON = String
-> (Object -> Parser V1StatusCause)
-> Value
-> Parser V1StatusCause
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1StatusCause" ((Object -> Parser V1StatusCause) -> Value -> Parser V1StatusCause)
-> (Object -> Parser V1StatusCause)
-> Value
-> Parser V1StatusCause
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Maybe Text -> Maybe Text -> V1StatusCause
V1StatusCause
      (Maybe Text -> Maybe Text -> Maybe Text -> V1StatusCause)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> V1StatusCause)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"field")
      Parser (Maybe Text -> Maybe Text -> V1StatusCause)
-> Parser (Maybe Text) -> Parser (Maybe Text -> V1StatusCause)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"message")
      Parser (Maybe Text -> V1StatusCause)
-> Parser (Maybe Text) -> Parser V1StatusCause
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reason")

-- | ToJSON V1StatusCause
instance A.ToJSON V1StatusCause where
  toJSON :: V1StatusCause -> Value
toJSON V1StatusCause {Maybe Text
$sel:v1StatusCauseField:V1StatusCause :: V1StatusCause -> Maybe Text
$sel:v1StatusCauseMessage:V1StatusCause :: V1StatusCause -> Maybe Text
$sel:v1StatusCauseReason:V1StatusCause :: V1StatusCause -> Maybe Text
v1StatusCauseField :: Maybe Text
v1StatusCauseMessage :: Maybe Text
v1StatusCauseReason :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"field" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StatusCauseField
      , Key
"message" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StatusCauseMessage
      , Key
"reason" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StatusCauseReason
      ]


-- | Construct a value of type 'V1StatusCause' (by applying it's required fields, if any)
mkV1StatusCause
  :: V1StatusCause
mkV1StatusCause :: V1StatusCause
mkV1StatusCause =
  V1StatusCause
  { $sel:v1StatusCauseField:V1StatusCause :: Maybe Text
v1StatusCauseField = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1StatusCauseMessage:V1StatusCause :: Maybe Text
v1StatusCauseMessage = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1StatusCauseReason:V1StatusCause :: Maybe Text
v1StatusCauseReason = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1StatusDetails
-- | V1StatusDetails
-- StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.
data V1StatusDetails = V1StatusDetails
  { V1StatusDetails -> Maybe [V1StatusCause]
v1StatusDetailsCauses :: !(Maybe [V1StatusCause]) -- ^ "causes" - The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.
  , V1StatusDetails -> Maybe Text
v1StatusDetailsGroup :: !(Maybe Text) -- ^ "group" - The group attribute of the resource associated with the status StatusReason.
  , V1StatusDetails -> Maybe Text
v1StatusDetailsKind :: !(Maybe Text) -- ^ "kind" - The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1StatusDetails -> Maybe Text
v1StatusDetailsName :: !(Maybe Text) -- ^ "name" - The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).
  , V1StatusDetails -> Maybe Int
v1StatusDetailsRetryAfterSeconds :: !(Maybe Int) -- ^ "retryAfterSeconds" - If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action.
  , V1StatusDetails -> Maybe Text
v1StatusDetailsUid :: !(Maybe Text) -- ^ "uid" - UID of the resource. (when there is a single resource which can be described). More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids
  } deriving (Int -> V1StatusDetails -> ShowS
[V1StatusDetails] -> ShowS
V1StatusDetails -> String
(Int -> V1StatusDetails -> ShowS)
-> (V1StatusDetails -> String)
-> ([V1StatusDetails] -> ShowS)
-> Show V1StatusDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1StatusDetails -> ShowS
showsPrec :: Int -> V1StatusDetails -> ShowS
$cshow :: V1StatusDetails -> String
show :: V1StatusDetails -> String
$cshowList :: [V1StatusDetails] -> ShowS
showList :: [V1StatusDetails] -> ShowS
P.Show, V1StatusDetails -> V1StatusDetails -> Bool
(V1StatusDetails -> V1StatusDetails -> Bool)
-> (V1StatusDetails -> V1StatusDetails -> Bool)
-> Eq V1StatusDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1StatusDetails -> V1StatusDetails -> Bool
== :: V1StatusDetails -> V1StatusDetails -> Bool
$c/= :: V1StatusDetails -> V1StatusDetails -> Bool
/= :: V1StatusDetails -> V1StatusDetails -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1StatusDetails
instance A.FromJSON V1StatusDetails where
  parseJSON :: Value -> Parser V1StatusDetails
parseJSON = String
-> (Object -> Parser V1StatusDetails)
-> Value
-> Parser V1StatusDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1StatusDetails" ((Object -> Parser V1StatusDetails)
 -> Value -> Parser V1StatusDetails)
-> (Object -> Parser V1StatusDetails)
-> Value
-> Parser V1StatusDetails
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1StatusCause]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> V1StatusDetails
V1StatusDetails
      (Maybe [V1StatusCause]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Int
 -> Maybe Text
 -> V1StatusDetails)
-> Parser (Maybe [V1StatusCause])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> V1StatusDetails)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1StatusCause])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"causes")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> V1StatusDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Int -> Maybe Text -> V1StatusDetails)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"group")
      Parser
  (Maybe Text
   -> Maybe Text -> Maybe Int -> Maybe Text -> V1StatusDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Int -> Maybe Text -> V1StatusDetails)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe Text -> Maybe Int -> Maybe Text -> V1StatusDetails)
-> Parser (Maybe Text)
-> Parser (Maybe Int -> Maybe Text -> V1StatusDetails)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"name")
      Parser (Maybe Int -> Maybe Text -> V1StatusDetails)
-> Parser (Maybe Int) -> Parser (Maybe Text -> V1StatusDetails)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"retryAfterSeconds")
      Parser (Maybe Text -> V1StatusDetails)
-> Parser (Maybe Text) -> Parser V1StatusDetails
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"uid")

-- | ToJSON V1StatusDetails
instance A.ToJSON V1StatusDetails where
  toJSON :: V1StatusDetails -> Value
toJSON V1StatusDetails {Maybe Int
Maybe [V1StatusCause]
Maybe Text
$sel:v1StatusDetailsCauses:V1StatusDetails :: V1StatusDetails -> Maybe [V1StatusCause]
$sel:v1StatusDetailsGroup:V1StatusDetails :: V1StatusDetails -> Maybe Text
$sel:v1StatusDetailsKind:V1StatusDetails :: V1StatusDetails -> Maybe Text
$sel:v1StatusDetailsName:V1StatusDetails :: V1StatusDetails -> Maybe Text
$sel:v1StatusDetailsRetryAfterSeconds:V1StatusDetails :: V1StatusDetails -> Maybe Int
$sel:v1StatusDetailsUid:V1StatusDetails :: V1StatusDetails -> Maybe Text
v1StatusDetailsCauses :: Maybe [V1StatusCause]
v1StatusDetailsGroup :: Maybe Text
v1StatusDetailsKind :: Maybe Text
v1StatusDetailsName :: Maybe Text
v1StatusDetailsRetryAfterSeconds :: Maybe Int
v1StatusDetailsUid :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"causes" Key -> Maybe [V1StatusCause] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1StatusCause]
v1StatusDetailsCauses
      , Key
"group" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StatusDetailsGroup
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StatusDetailsKind
      , Key
"name" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StatusDetailsName
      , Key
"retryAfterSeconds" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1StatusDetailsRetryAfterSeconds
      , Key
"uid" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StatusDetailsUid
      ]


-- | Construct a value of type 'V1StatusDetails' (by applying it's required fields, if any)
mkV1StatusDetails
  :: V1StatusDetails
mkV1StatusDetails :: V1StatusDetails
mkV1StatusDetails =
  V1StatusDetails
  { $sel:v1StatusDetailsCauses:V1StatusDetails :: Maybe [V1StatusCause]
v1StatusDetailsCauses = Maybe [V1StatusCause]
forall a. Maybe a
Nothing
  , $sel:v1StatusDetailsGroup:V1StatusDetails :: Maybe Text
v1StatusDetailsGroup = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1StatusDetailsKind:V1StatusDetails :: Maybe Text
v1StatusDetailsKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1StatusDetailsName:V1StatusDetails :: Maybe Text
v1StatusDetailsName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1StatusDetailsRetryAfterSeconds:V1StatusDetails :: Maybe Int
v1StatusDetailsRetryAfterSeconds = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1StatusDetailsUid:V1StatusDetails :: Maybe Text
v1StatusDetailsUid = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1StorageClass
-- | V1StorageClass
-- StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.  StorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.
data V1StorageClass = V1StorageClass
  { V1StorageClass -> Maybe Bool
v1StorageClassAllowVolumeExpansion :: !(Maybe Bool) -- ^ "allowVolumeExpansion" - allowVolumeExpansion shows whether the storage class allow volume expand.
  , V1StorageClass -> Maybe [V1TopologySelectorTerm]
v1StorageClassAllowedTopologies :: !(Maybe [V1TopologySelectorTerm]) -- ^ "allowedTopologies" - allowedTopologies restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature.
  , V1StorageClass -> Maybe Text
v1StorageClassApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1StorageClass -> Maybe Text
v1StorageClassKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1StorageClass -> Maybe V1ObjectMeta
v1StorageClassMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1StorageClass -> Maybe [Text]
v1StorageClassMountOptions :: !(Maybe [Text]) -- ^ "mountOptions" - mountOptions controls the mountOptions for dynamically provisioned PersistentVolumes of this storage class. e.g. [\&quot;ro\&quot;, \&quot;soft\&quot;]. Not validated - mount of the PVs will simply fail if one is invalid.
  , V1StorageClass -> Maybe (Map String Text)
v1StorageClassParameters :: !(Maybe (Map.Map String Text)) -- ^ "parameters" - parameters holds the parameters for the provisioner that should create volumes of this storage class.
  , V1StorageClass -> Text
v1StorageClassProvisioner :: !(Text) -- ^ /Required/ "provisioner" - provisioner indicates the type of the provisioner.
  , V1StorageClass -> Maybe Text
v1StorageClassReclaimPolicy :: !(Maybe Text) -- ^ "reclaimPolicy" - reclaimPolicy controls the reclaimPolicy for dynamically provisioned PersistentVolumes of this storage class. Defaults to Delete.
  , V1StorageClass -> Maybe Text
v1StorageClassVolumeBindingMode :: !(Maybe Text) -- ^ "volumeBindingMode" - volumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound.  When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature.
  } deriving (Int -> V1StorageClass -> ShowS
[V1StorageClass] -> ShowS
V1StorageClass -> String
(Int -> V1StorageClass -> ShowS)
-> (V1StorageClass -> String)
-> ([V1StorageClass] -> ShowS)
-> Show V1StorageClass
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1StorageClass -> ShowS
showsPrec :: Int -> V1StorageClass -> ShowS
$cshow :: V1StorageClass -> String
show :: V1StorageClass -> String
$cshowList :: [V1StorageClass] -> ShowS
showList :: [V1StorageClass] -> ShowS
P.Show, V1StorageClass -> V1StorageClass -> Bool
(V1StorageClass -> V1StorageClass -> Bool)
-> (V1StorageClass -> V1StorageClass -> Bool) -> Eq V1StorageClass
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1StorageClass -> V1StorageClass -> Bool
== :: V1StorageClass -> V1StorageClass -> Bool
$c/= :: V1StorageClass -> V1StorageClass -> Bool
/= :: V1StorageClass -> V1StorageClass -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1StorageClass
instance A.FromJSON V1StorageClass where
  parseJSON :: Value -> Parser V1StorageClass
parseJSON = String
-> (Object -> Parser V1StorageClass)
-> Value
-> Parser V1StorageClass
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1StorageClass" ((Object -> Parser V1StorageClass)
 -> Value -> Parser V1StorageClass)
-> (Object -> Parser V1StorageClass)
-> Value
-> Parser V1StorageClass
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Bool
-> Maybe [V1TopologySelectorTerm]
-> Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe [Text]
-> Maybe (Map String Text)
-> Text
-> Maybe Text
-> Maybe Text
-> V1StorageClass
V1StorageClass
      (Maybe Bool
 -> Maybe [V1TopologySelectorTerm]
 -> Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe [Text]
 -> Maybe (Map String Text)
 -> Text
 -> Maybe Text
 -> Maybe Text
 -> V1StorageClass)
-> Parser (Maybe Bool)
-> Parser
     (Maybe [V1TopologySelectorTerm]
      -> Maybe Text
      -> Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe [Text]
      -> Maybe (Map String Text)
      -> Text
      -> Maybe Text
      -> Maybe Text
      -> V1StorageClass)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"allowVolumeExpansion")
      Parser
  (Maybe [V1TopologySelectorTerm]
   -> Maybe Text
   -> Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe [Text]
   -> Maybe (Map String Text)
   -> Text
   -> Maybe Text
   -> Maybe Text
   -> V1StorageClass)
-> Parser (Maybe [V1TopologySelectorTerm])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe [Text]
      -> Maybe (Map String Text)
      -> Text
      -> Maybe Text
      -> Maybe Text
      -> V1StorageClass)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1TopologySelectorTerm])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"allowedTopologies")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe [Text]
   -> Maybe (Map String Text)
   -> Text
   -> Maybe Text
   -> Maybe Text
   -> V1StorageClass)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe [Text]
      -> Maybe (Map String Text)
      -> Text
      -> Maybe Text
      -> Maybe Text
      -> V1StorageClass)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe [Text]
   -> Maybe (Map String Text)
   -> Text
   -> Maybe Text
   -> Maybe Text
   -> V1StorageClass)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe [Text]
      -> Maybe (Map String Text)
      -> Text
      -> Maybe Text
      -> Maybe Text
      -> V1StorageClass)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe [Text]
   -> Maybe (Map String Text)
   -> Text
   -> Maybe Text
   -> Maybe Text
   -> V1StorageClass)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe [Text]
      -> Maybe (Map String Text)
      -> Text
      -> Maybe Text
      -> Maybe Text
      -> V1StorageClass)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (Maybe [Text]
   -> Maybe (Map String Text)
   -> Text
   -> Maybe Text
   -> Maybe Text
   -> V1StorageClass)
-> Parser (Maybe [Text])
-> Parser
     (Maybe (Map String Text)
      -> Text -> Maybe Text -> Maybe Text -> V1StorageClass)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"mountOptions")
      Parser
  (Maybe (Map String Text)
   -> Text -> Maybe Text -> Maybe Text -> V1StorageClass)
-> Parser (Maybe (Map String Text))
-> Parser (Text -> Maybe Text -> Maybe Text -> V1StorageClass)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String Text))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"parameters")
      Parser (Text -> Maybe Text -> Maybe Text -> V1StorageClass)
-> Parser Text
-> Parser (Maybe Text -> Maybe Text -> V1StorageClass)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"provisioner")
      Parser (Maybe Text -> Maybe Text -> V1StorageClass)
-> Parser (Maybe Text) -> Parser (Maybe Text -> V1StorageClass)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reclaimPolicy")
      Parser (Maybe Text -> V1StorageClass)
-> Parser (Maybe Text) -> Parser V1StorageClass
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"volumeBindingMode")

-- | ToJSON V1StorageClass
instance A.ToJSON V1StorageClass where
  toJSON :: V1StorageClass -> Value
toJSON V1StorageClass {Maybe Bool
Maybe [Text]
Maybe [V1TopologySelectorTerm]
Maybe (Map String Text)
Maybe Text
Maybe V1ObjectMeta
Text
$sel:v1StorageClassAllowVolumeExpansion:V1StorageClass :: V1StorageClass -> Maybe Bool
$sel:v1StorageClassAllowedTopologies:V1StorageClass :: V1StorageClass -> Maybe [V1TopologySelectorTerm]
$sel:v1StorageClassApiVersion:V1StorageClass :: V1StorageClass -> Maybe Text
$sel:v1StorageClassKind:V1StorageClass :: V1StorageClass -> Maybe Text
$sel:v1StorageClassMetadata:V1StorageClass :: V1StorageClass -> Maybe V1ObjectMeta
$sel:v1StorageClassMountOptions:V1StorageClass :: V1StorageClass -> Maybe [Text]
$sel:v1StorageClassParameters:V1StorageClass :: V1StorageClass -> Maybe (Map String Text)
$sel:v1StorageClassProvisioner:V1StorageClass :: V1StorageClass -> Text
$sel:v1StorageClassReclaimPolicy:V1StorageClass :: V1StorageClass -> Maybe Text
$sel:v1StorageClassVolumeBindingMode:V1StorageClass :: V1StorageClass -> Maybe Text
v1StorageClassAllowVolumeExpansion :: Maybe Bool
v1StorageClassAllowedTopologies :: Maybe [V1TopologySelectorTerm]
v1StorageClassApiVersion :: Maybe Text
v1StorageClassKind :: Maybe Text
v1StorageClassMetadata :: Maybe V1ObjectMeta
v1StorageClassMountOptions :: Maybe [Text]
v1StorageClassParameters :: Maybe (Map String Text)
v1StorageClassProvisioner :: Text
v1StorageClassReclaimPolicy :: Maybe Text
v1StorageClassVolumeBindingMode :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"allowVolumeExpansion" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1StorageClassAllowVolumeExpansion
      , Key
"allowedTopologies" Key -> Maybe [V1TopologySelectorTerm] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1TopologySelectorTerm]
v1StorageClassAllowedTopologies
      , Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StorageClassApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StorageClassKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1StorageClassMetadata
      , Key
"mountOptions" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1StorageClassMountOptions
      , Key
"parameters" Key -> Maybe (Map String Text) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Text)
v1StorageClassParameters
      , Key
"provisioner" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1StorageClassProvisioner
      , Key
"reclaimPolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StorageClassReclaimPolicy
      , Key
"volumeBindingMode" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StorageClassVolumeBindingMode
      ]


-- | Construct a value of type 'V1StorageClass' (by applying it's required fields, if any)
mkV1StorageClass
  :: Text -- ^ 'v1StorageClassProvisioner': provisioner indicates the type of the provisioner.
  -> V1StorageClass
mkV1StorageClass :: Text -> V1StorageClass
mkV1StorageClass Text
v1StorageClassProvisioner =
  V1StorageClass
  { $sel:v1StorageClassAllowVolumeExpansion:V1StorageClass :: Maybe Bool
v1StorageClassAllowVolumeExpansion = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1StorageClassAllowedTopologies:V1StorageClass :: Maybe [V1TopologySelectorTerm]
v1StorageClassAllowedTopologies = Maybe [V1TopologySelectorTerm]
forall a. Maybe a
Nothing
  , $sel:v1StorageClassApiVersion:V1StorageClass :: Maybe Text
v1StorageClassApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1StorageClassKind:V1StorageClass :: Maybe Text
v1StorageClassKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1StorageClassMetadata:V1StorageClass :: Maybe V1ObjectMeta
v1StorageClassMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1StorageClassMountOptions:V1StorageClass :: Maybe [Text]
v1StorageClassMountOptions = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1StorageClassParameters:V1StorageClass :: Maybe (Map String Text)
v1StorageClassParameters = Maybe (Map String Text)
forall a. Maybe a
Nothing
  , Text
$sel:v1StorageClassProvisioner:V1StorageClass :: Text
v1StorageClassProvisioner :: Text
v1StorageClassProvisioner
  , $sel:v1StorageClassReclaimPolicy:V1StorageClass :: Maybe Text
v1StorageClassReclaimPolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1StorageClassVolumeBindingMode:V1StorageClass :: Maybe Text
v1StorageClassVolumeBindingMode = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1StorageClassList
-- | V1StorageClassList
-- StorageClassList is a collection of storage classes.
data V1StorageClassList = V1StorageClassList
  { V1StorageClassList -> Maybe Text
v1StorageClassListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1StorageClassList -> [V1StorageClass]
v1StorageClassListItems :: !([V1StorageClass]) -- ^ /Required/ "items" - items is the list of StorageClasses
  , V1StorageClassList -> Maybe Text
v1StorageClassListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1StorageClassList -> Maybe V1ListMeta
v1StorageClassListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1StorageClassList -> ShowS
[V1StorageClassList] -> ShowS
V1StorageClassList -> String
(Int -> V1StorageClassList -> ShowS)
-> (V1StorageClassList -> String)
-> ([V1StorageClassList] -> ShowS)
-> Show V1StorageClassList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1StorageClassList -> ShowS
showsPrec :: Int -> V1StorageClassList -> ShowS
$cshow :: V1StorageClassList -> String
show :: V1StorageClassList -> String
$cshowList :: [V1StorageClassList] -> ShowS
showList :: [V1StorageClassList] -> ShowS
P.Show, V1StorageClassList -> V1StorageClassList -> Bool
(V1StorageClassList -> V1StorageClassList -> Bool)
-> (V1StorageClassList -> V1StorageClassList -> Bool)
-> Eq V1StorageClassList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1StorageClassList -> V1StorageClassList -> Bool
== :: V1StorageClassList -> V1StorageClassList -> Bool
$c/= :: V1StorageClassList -> V1StorageClassList -> Bool
/= :: V1StorageClassList -> V1StorageClassList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1StorageClassList
instance A.FromJSON V1StorageClassList where
  parseJSON :: Value -> Parser V1StorageClassList
parseJSON = String
-> (Object -> Parser V1StorageClassList)
-> Value
-> Parser V1StorageClassList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1StorageClassList" ((Object -> Parser V1StorageClassList)
 -> Value -> Parser V1StorageClassList)
-> (Object -> Parser V1StorageClassList)
-> Value
-> Parser V1StorageClassList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1StorageClass]
-> Maybe Text
-> Maybe V1ListMeta
-> V1StorageClassList
V1StorageClassList
      (Maybe Text
 -> [V1StorageClass]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1StorageClassList)
-> Parser (Maybe Text)
-> Parser
     ([V1StorageClass]
      -> Maybe Text -> Maybe V1ListMeta -> V1StorageClassList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1StorageClass]
   -> Maybe Text -> Maybe V1ListMeta -> V1StorageClassList)
-> Parser [V1StorageClass]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1StorageClassList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1StorageClass]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1StorageClassList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1StorageClassList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1StorageClassList)
-> Parser (Maybe V1ListMeta) -> Parser V1StorageClassList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1StorageClassList
instance A.ToJSON V1StorageClassList where
  toJSON :: V1StorageClassList -> Value
toJSON V1StorageClassList {[V1StorageClass]
Maybe Text
Maybe V1ListMeta
$sel:v1StorageClassListApiVersion:V1StorageClassList :: V1StorageClassList -> Maybe Text
$sel:v1StorageClassListItems:V1StorageClassList :: V1StorageClassList -> [V1StorageClass]
$sel:v1StorageClassListKind:V1StorageClassList :: V1StorageClassList -> Maybe Text
$sel:v1StorageClassListMetadata:V1StorageClassList :: V1StorageClassList -> Maybe V1ListMeta
v1StorageClassListApiVersion :: Maybe Text
v1StorageClassListItems :: [V1StorageClass]
v1StorageClassListKind :: Maybe Text
v1StorageClassListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StorageClassListApiVersion
      , Key
"items" Key -> [V1StorageClass] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1StorageClass]
v1StorageClassListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StorageClassListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1StorageClassListMetadata
      ]


-- | Construct a value of type 'V1StorageClassList' (by applying it's required fields, if any)
mkV1StorageClassList
  :: [V1StorageClass] -- ^ 'v1StorageClassListItems': items is the list of StorageClasses
  -> V1StorageClassList
mkV1StorageClassList :: [V1StorageClass] -> V1StorageClassList
mkV1StorageClassList [V1StorageClass]
v1StorageClassListItems =
  V1StorageClassList
  { $sel:v1StorageClassListApiVersion:V1StorageClassList :: Maybe Text
v1StorageClassListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1StorageClass]
$sel:v1StorageClassListItems:V1StorageClassList :: [V1StorageClass]
v1StorageClassListItems :: [V1StorageClass]
v1StorageClassListItems
  , $sel:v1StorageClassListKind:V1StorageClassList :: Maybe Text
v1StorageClassListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1StorageClassListMetadata:V1StorageClassList :: Maybe V1ListMeta
v1StorageClassListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1StorageOSPersistentVolumeSource
-- | V1StorageOSPersistentVolumeSource
-- Represents a StorageOS persistent volume resource.
data V1StorageOSPersistentVolumeSource = V1StorageOSPersistentVolumeSource
  { V1StorageOSPersistentVolumeSource -> Maybe Text
v1StorageOSPersistentVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \&quot;ext4\&quot;, \&quot;xfs\&quot;, \&quot;ntfs\&quot;. Implicitly inferred to be \&quot;ext4\&quot; if unspecified.
  , V1StorageOSPersistentVolumeSource -> Maybe Bool
v1StorageOSPersistentVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
  , V1StorageOSPersistentVolumeSource -> Maybe V1ObjectReference
v1StorageOSPersistentVolumeSourceSecretRef :: !(Maybe V1ObjectReference) -- ^ "secretRef"
  , V1StorageOSPersistentVolumeSource -> Maybe Text
v1StorageOSPersistentVolumeSourceVolumeName :: !(Maybe Text) -- ^ "volumeName" - volumeName is the human-readable name of the StorageOS volume.  Volume names are only unique within a namespace.
  , V1StorageOSPersistentVolumeSource -> Maybe Text
v1StorageOSPersistentVolumeSourceVolumeNamespace :: !(Maybe Text) -- ^ "volumeNamespace" - volumeNamespace specifies the scope of the volume within StorageOS.  If no namespace is specified then the Pod&#39;s namespace will be used.  This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to \&quot;default\&quot; if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.
  } deriving (Int -> V1StorageOSPersistentVolumeSource -> ShowS
[V1StorageOSPersistentVolumeSource] -> ShowS
V1StorageOSPersistentVolumeSource -> String
(Int -> V1StorageOSPersistentVolumeSource -> ShowS)
-> (V1StorageOSPersistentVolumeSource -> String)
-> ([V1StorageOSPersistentVolumeSource] -> ShowS)
-> Show V1StorageOSPersistentVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1StorageOSPersistentVolumeSource -> ShowS
showsPrec :: Int -> V1StorageOSPersistentVolumeSource -> ShowS
$cshow :: V1StorageOSPersistentVolumeSource -> String
show :: V1StorageOSPersistentVolumeSource -> String
$cshowList :: [V1StorageOSPersistentVolumeSource] -> ShowS
showList :: [V1StorageOSPersistentVolumeSource] -> ShowS
P.Show, V1StorageOSPersistentVolumeSource
-> V1StorageOSPersistentVolumeSource -> Bool
(V1StorageOSPersistentVolumeSource
 -> V1StorageOSPersistentVolumeSource -> Bool)
-> (V1StorageOSPersistentVolumeSource
    -> V1StorageOSPersistentVolumeSource -> Bool)
-> Eq V1StorageOSPersistentVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1StorageOSPersistentVolumeSource
-> V1StorageOSPersistentVolumeSource -> Bool
== :: V1StorageOSPersistentVolumeSource
-> V1StorageOSPersistentVolumeSource -> Bool
$c/= :: V1StorageOSPersistentVolumeSource
-> V1StorageOSPersistentVolumeSource -> Bool
/= :: V1StorageOSPersistentVolumeSource
-> V1StorageOSPersistentVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1StorageOSPersistentVolumeSource
instance A.FromJSON V1StorageOSPersistentVolumeSource where
  parseJSON :: Value -> Parser V1StorageOSPersistentVolumeSource
parseJSON = String
-> (Object -> Parser V1StorageOSPersistentVolumeSource)
-> Value
-> Parser V1StorageOSPersistentVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1StorageOSPersistentVolumeSource" ((Object -> Parser V1StorageOSPersistentVolumeSource)
 -> Value -> Parser V1StorageOSPersistentVolumeSource)
-> (Object -> Parser V1StorageOSPersistentVolumeSource)
-> Value
-> Parser V1StorageOSPersistentVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Bool
-> Maybe V1ObjectReference
-> Maybe Text
-> Maybe Text
-> V1StorageOSPersistentVolumeSource
V1StorageOSPersistentVolumeSource
      (Maybe Text
 -> Maybe Bool
 -> Maybe V1ObjectReference
 -> Maybe Text
 -> Maybe Text
 -> V1StorageOSPersistentVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe V1ObjectReference
      -> Maybe Text
      -> Maybe Text
      -> V1StorageOSPersistentVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fsType")
      Parser
  (Maybe Bool
   -> Maybe V1ObjectReference
   -> Maybe Text
   -> Maybe Text
   -> V1StorageOSPersistentVolumeSource)
-> Parser (Maybe Bool)
-> Parser
     (Maybe V1ObjectReference
      -> Maybe Text -> Maybe Text -> V1StorageOSPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readOnly")
      Parser
  (Maybe V1ObjectReference
   -> Maybe Text -> Maybe Text -> V1StorageOSPersistentVolumeSource)
-> Parser (Maybe V1ObjectReference)
-> Parser
     (Maybe Text -> Maybe Text -> V1StorageOSPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectReference)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"secretRef")
      Parser
  (Maybe Text -> Maybe Text -> V1StorageOSPersistentVolumeSource)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> V1StorageOSPersistentVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"volumeName")
      Parser (Maybe Text -> V1StorageOSPersistentVolumeSource)
-> Parser (Maybe Text) -> Parser V1StorageOSPersistentVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"volumeNamespace")

-- | ToJSON V1StorageOSPersistentVolumeSource
instance A.ToJSON V1StorageOSPersistentVolumeSource where
  toJSON :: V1StorageOSPersistentVolumeSource -> Value
toJSON V1StorageOSPersistentVolumeSource {Maybe Bool
Maybe Text
Maybe V1ObjectReference
$sel:v1StorageOSPersistentVolumeSourceFsType:V1StorageOSPersistentVolumeSource :: V1StorageOSPersistentVolumeSource -> Maybe Text
$sel:v1StorageOSPersistentVolumeSourceReadOnly:V1StorageOSPersistentVolumeSource :: V1StorageOSPersistentVolumeSource -> Maybe Bool
$sel:v1StorageOSPersistentVolumeSourceSecretRef:V1StorageOSPersistentVolumeSource :: V1StorageOSPersistentVolumeSource -> Maybe V1ObjectReference
$sel:v1StorageOSPersistentVolumeSourceVolumeName:V1StorageOSPersistentVolumeSource :: V1StorageOSPersistentVolumeSource -> Maybe Text
$sel:v1StorageOSPersistentVolumeSourceVolumeNamespace:V1StorageOSPersistentVolumeSource :: V1StorageOSPersistentVolumeSource -> Maybe Text
v1StorageOSPersistentVolumeSourceFsType :: Maybe Text
v1StorageOSPersistentVolumeSourceReadOnly :: Maybe Bool
v1StorageOSPersistentVolumeSourceSecretRef :: Maybe V1ObjectReference
v1StorageOSPersistentVolumeSourceVolumeName :: Maybe Text
v1StorageOSPersistentVolumeSourceVolumeNamespace :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"fsType" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StorageOSPersistentVolumeSourceFsType
      , Key
"readOnly" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1StorageOSPersistentVolumeSourceReadOnly
      , Key
"secretRef" Key -> Maybe V1ObjectReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectReference
v1StorageOSPersistentVolumeSourceSecretRef
      , Key
"volumeName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StorageOSPersistentVolumeSourceVolumeName
      , Key
"volumeNamespace" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StorageOSPersistentVolumeSourceVolumeNamespace
      ]


-- | Construct a value of type 'V1StorageOSPersistentVolumeSource' (by applying it's required fields, if any)
mkV1StorageOSPersistentVolumeSource
  :: V1StorageOSPersistentVolumeSource
mkV1StorageOSPersistentVolumeSource :: V1StorageOSPersistentVolumeSource
mkV1StorageOSPersistentVolumeSource =
  V1StorageOSPersistentVolumeSource
  { $sel:v1StorageOSPersistentVolumeSourceFsType:V1StorageOSPersistentVolumeSource :: Maybe Text
v1StorageOSPersistentVolumeSourceFsType = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1StorageOSPersistentVolumeSourceReadOnly:V1StorageOSPersistentVolumeSource :: Maybe Bool
v1StorageOSPersistentVolumeSourceReadOnly = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1StorageOSPersistentVolumeSourceSecretRef:V1StorageOSPersistentVolumeSource :: Maybe V1ObjectReference
v1StorageOSPersistentVolumeSourceSecretRef = Maybe V1ObjectReference
forall a. Maybe a
Nothing
  , $sel:v1StorageOSPersistentVolumeSourceVolumeName:V1StorageOSPersistentVolumeSource :: Maybe Text
v1StorageOSPersistentVolumeSourceVolumeName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1StorageOSPersistentVolumeSourceVolumeNamespace:V1StorageOSPersistentVolumeSource :: Maybe Text
v1StorageOSPersistentVolumeSourceVolumeNamespace = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1StorageOSVolumeSource
-- | V1StorageOSVolumeSource
-- Represents a StorageOS persistent volume resource.
data V1StorageOSVolumeSource = V1StorageOSVolumeSource
  { V1StorageOSVolumeSource -> Maybe Text
v1StorageOSVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \&quot;ext4\&quot;, \&quot;xfs\&quot;, \&quot;ntfs\&quot;. Implicitly inferred to be \&quot;ext4\&quot; if unspecified.
  , V1StorageOSVolumeSource -> Maybe Bool
v1StorageOSVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
  , V1StorageOSVolumeSource -> Maybe V1LocalObjectReference
v1StorageOSVolumeSourceSecretRef :: !(Maybe V1LocalObjectReference) -- ^ "secretRef"
  , V1StorageOSVolumeSource -> Maybe Text
v1StorageOSVolumeSourceVolumeName :: !(Maybe Text) -- ^ "volumeName" - volumeName is the human-readable name of the StorageOS volume.  Volume names are only unique within a namespace.
  , V1StorageOSVolumeSource -> Maybe Text
v1StorageOSVolumeSourceVolumeNamespace :: !(Maybe Text) -- ^ "volumeNamespace" - volumeNamespace specifies the scope of the volume within StorageOS.  If no namespace is specified then the Pod&#39;s namespace will be used.  This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to \&quot;default\&quot; if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.
  } deriving (Int -> V1StorageOSVolumeSource -> ShowS
[V1StorageOSVolumeSource] -> ShowS
V1StorageOSVolumeSource -> String
(Int -> V1StorageOSVolumeSource -> ShowS)
-> (V1StorageOSVolumeSource -> String)
-> ([V1StorageOSVolumeSource] -> ShowS)
-> Show V1StorageOSVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1StorageOSVolumeSource -> ShowS
showsPrec :: Int -> V1StorageOSVolumeSource -> ShowS
$cshow :: V1StorageOSVolumeSource -> String
show :: V1StorageOSVolumeSource -> String
$cshowList :: [V1StorageOSVolumeSource] -> ShowS
showList :: [V1StorageOSVolumeSource] -> ShowS
P.Show, V1StorageOSVolumeSource -> V1StorageOSVolumeSource -> Bool
(V1StorageOSVolumeSource -> V1StorageOSVolumeSource -> Bool)
-> (V1StorageOSVolumeSource -> V1StorageOSVolumeSource -> Bool)
-> Eq V1StorageOSVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1StorageOSVolumeSource -> V1StorageOSVolumeSource -> Bool
== :: V1StorageOSVolumeSource -> V1StorageOSVolumeSource -> Bool
$c/= :: V1StorageOSVolumeSource -> V1StorageOSVolumeSource -> Bool
/= :: V1StorageOSVolumeSource -> V1StorageOSVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1StorageOSVolumeSource
instance A.FromJSON V1StorageOSVolumeSource where
  parseJSON :: Value -> Parser V1StorageOSVolumeSource
parseJSON = String
-> (Object -> Parser V1StorageOSVolumeSource)
-> Value
-> Parser V1StorageOSVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1StorageOSVolumeSource" ((Object -> Parser V1StorageOSVolumeSource)
 -> Value -> Parser V1StorageOSVolumeSource)
-> (Object -> Parser V1StorageOSVolumeSource)
-> Value
-> Parser V1StorageOSVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Bool
-> Maybe V1LocalObjectReference
-> Maybe Text
-> Maybe Text
-> V1StorageOSVolumeSource
V1StorageOSVolumeSource
      (Maybe Text
 -> Maybe Bool
 -> Maybe V1LocalObjectReference
 -> Maybe Text
 -> Maybe Text
 -> V1StorageOSVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe V1LocalObjectReference
      -> Maybe Text
      -> Maybe Text
      -> V1StorageOSVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fsType")
      Parser
  (Maybe Bool
   -> Maybe V1LocalObjectReference
   -> Maybe Text
   -> Maybe Text
   -> V1StorageOSVolumeSource)
-> Parser (Maybe Bool)
-> Parser
     (Maybe V1LocalObjectReference
      -> Maybe Text -> Maybe Text -> V1StorageOSVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readOnly")
      Parser
  (Maybe V1LocalObjectReference
   -> Maybe Text -> Maybe Text -> V1StorageOSVolumeSource)
-> Parser (Maybe V1LocalObjectReference)
-> Parser (Maybe Text -> Maybe Text -> V1StorageOSVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LocalObjectReference)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"secretRef")
      Parser (Maybe Text -> Maybe Text -> V1StorageOSVolumeSource)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> V1StorageOSVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"volumeName")
      Parser (Maybe Text -> V1StorageOSVolumeSource)
-> Parser (Maybe Text) -> Parser V1StorageOSVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"volumeNamespace")

-- | ToJSON V1StorageOSVolumeSource
instance A.ToJSON V1StorageOSVolumeSource where
  toJSON :: V1StorageOSVolumeSource -> Value
toJSON V1StorageOSVolumeSource {Maybe Bool
Maybe Text
Maybe V1LocalObjectReference
$sel:v1StorageOSVolumeSourceFsType:V1StorageOSVolumeSource :: V1StorageOSVolumeSource -> Maybe Text
$sel:v1StorageOSVolumeSourceReadOnly:V1StorageOSVolumeSource :: V1StorageOSVolumeSource -> Maybe Bool
$sel:v1StorageOSVolumeSourceSecretRef:V1StorageOSVolumeSource :: V1StorageOSVolumeSource -> Maybe V1LocalObjectReference
$sel:v1StorageOSVolumeSourceVolumeName:V1StorageOSVolumeSource :: V1StorageOSVolumeSource -> Maybe Text
$sel:v1StorageOSVolumeSourceVolumeNamespace:V1StorageOSVolumeSource :: V1StorageOSVolumeSource -> Maybe Text
v1StorageOSVolumeSourceFsType :: Maybe Text
v1StorageOSVolumeSourceReadOnly :: Maybe Bool
v1StorageOSVolumeSourceSecretRef :: Maybe V1LocalObjectReference
v1StorageOSVolumeSourceVolumeName :: Maybe Text
v1StorageOSVolumeSourceVolumeNamespace :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"fsType" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StorageOSVolumeSourceFsType
      , Key
"readOnly" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1StorageOSVolumeSourceReadOnly
      , Key
"secretRef" Key -> Maybe V1LocalObjectReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LocalObjectReference
v1StorageOSVolumeSourceSecretRef
      , Key
"volumeName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StorageOSVolumeSourceVolumeName
      , Key
"volumeNamespace" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1StorageOSVolumeSourceVolumeNamespace
      ]


-- | Construct a value of type 'V1StorageOSVolumeSource' (by applying it's required fields, if any)
mkV1StorageOSVolumeSource
  :: V1StorageOSVolumeSource
mkV1StorageOSVolumeSource :: V1StorageOSVolumeSource
mkV1StorageOSVolumeSource =
  V1StorageOSVolumeSource
  { $sel:v1StorageOSVolumeSourceFsType:V1StorageOSVolumeSource :: Maybe Text
v1StorageOSVolumeSourceFsType = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1StorageOSVolumeSourceReadOnly:V1StorageOSVolumeSource :: Maybe Bool
v1StorageOSVolumeSourceReadOnly = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1StorageOSVolumeSourceSecretRef:V1StorageOSVolumeSource :: Maybe V1LocalObjectReference
v1StorageOSVolumeSourceSecretRef = Maybe V1LocalObjectReference
forall a. Maybe a
Nothing
  , $sel:v1StorageOSVolumeSourceVolumeName:V1StorageOSVolumeSource :: Maybe Text
v1StorageOSVolumeSourceVolumeName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1StorageOSVolumeSourceVolumeNamespace:V1StorageOSVolumeSource :: Maybe Text
v1StorageOSVolumeSourceVolumeNamespace = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1SubjectAccessReview
-- | V1SubjectAccessReview
-- SubjectAccessReview checks whether or not a user or group can perform an action.
data V1SubjectAccessReview = V1SubjectAccessReview
  { V1SubjectAccessReview -> Maybe Text
v1SubjectAccessReviewApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1SubjectAccessReview -> Maybe Text
v1SubjectAccessReviewKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1SubjectAccessReview -> Maybe V1ObjectMeta
v1SubjectAccessReviewMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1SubjectAccessReview -> V1SubjectAccessReviewSpec
v1SubjectAccessReviewSpec :: !(V1SubjectAccessReviewSpec) -- ^ /Required/ "spec"
  , V1SubjectAccessReview -> Maybe V1SubjectAccessReviewStatus
v1SubjectAccessReviewStatus :: !(Maybe V1SubjectAccessReviewStatus) -- ^ "status"
  } deriving (Int -> V1SubjectAccessReview -> ShowS
[V1SubjectAccessReview] -> ShowS
V1SubjectAccessReview -> String
(Int -> V1SubjectAccessReview -> ShowS)
-> (V1SubjectAccessReview -> String)
-> ([V1SubjectAccessReview] -> ShowS)
-> Show V1SubjectAccessReview
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1SubjectAccessReview -> ShowS
showsPrec :: Int -> V1SubjectAccessReview -> ShowS
$cshow :: V1SubjectAccessReview -> String
show :: V1SubjectAccessReview -> String
$cshowList :: [V1SubjectAccessReview] -> ShowS
showList :: [V1SubjectAccessReview] -> ShowS
P.Show, V1SubjectAccessReview -> V1SubjectAccessReview -> Bool
(V1SubjectAccessReview -> V1SubjectAccessReview -> Bool)
-> (V1SubjectAccessReview -> V1SubjectAccessReview -> Bool)
-> Eq V1SubjectAccessReview
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1SubjectAccessReview -> V1SubjectAccessReview -> Bool
== :: V1SubjectAccessReview -> V1SubjectAccessReview -> Bool
$c/= :: V1SubjectAccessReview -> V1SubjectAccessReview -> Bool
/= :: V1SubjectAccessReview -> V1SubjectAccessReview -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1SubjectAccessReview
instance A.FromJSON V1SubjectAccessReview where
  parseJSON :: Value -> Parser V1SubjectAccessReview
parseJSON = String
-> (Object -> Parser V1SubjectAccessReview)
-> Value
-> Parser V1SubjectAccessReview
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1SubjectAccessReview" ((Object -> Parser V1SubjectAccessReview)
 -> Value -> Parser V1SubjectAccessReview)
-> (Object -> Parser V1SubjectAccessReview)
-> Value
-> Parser V1SubjectAccessReview
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> V1SubjectAccessReviewSpec
-> Maybe V1SubjectAccessReviewStatus
-> V1SubjectAccessReview
V1SubjectAccessReview
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> V1SubjectAccessReviewSpec
 -> Maybe V1SubjectAccessReviewStatus
 -> V1SubjectAccessReview)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> V1SubjectAccessReviewSpec
      -> Maybe V1SubjectAccessReviewStatus
      -> V1SubjectAccessReview)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> V1SubjectAccessReviewSpec
   -> Maybe V1SubjectAccessReviewStatus
   -> V1SubjectAccessReview)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> V1SubjectAccessReviewSpec
      -> Maybe V1SubjectAccessReviewStatus
      -> V1SubjectAccessReview)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> V1SubjectAccessReviewSpec
   -> Maybe V1SubjectAccessReviewStatus
   -> V1SubjectAccessReview)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (V1SubjectAccessReviewSpec
      -> Maybe V1SubjectAccessReviewStatus -> V1SubjectAccessReview)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (V1SubjectAccessReviewSpec
   -> Maybe V1SubjectAccessReviewStatus -> V1SubjectAccessReview)
-> Parser V1SubjectAccessReviewSpec
-> Parser
     (Maybe V1SubjectAccessReviewStatus -> V1SubjectAccessReview)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1SubjectAccessReviewSpec
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"spec")
      Parser (Maybe V1SubjectAccessReviewStatus -> V1SubjectAccessReview)
-> Parser (Maybe V1SubjectAccessReviewStatus)
-> Parser V1SubjectAccessReview
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1SubjectAccessReviewStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1SubjectAccessReview
instance A.ToJSON V1SubjectAccessReview where
  toJSON :: V1SubjectAccessReview -> Value
toJSON V1SubjectAccessReview {Maybe Text
Maybe V1SubjectAccessReviewStatus
Maybe V1ObjectMeta
V1SubjectAccessReviewSpec
$sel:v1SubjectAccessReviewApiVersion:V1SubjectAccessReview :: V1SubjectAccessReview -> Maybe Text
$sel:v1SubjectAccessReviewKind:V1SubjectAccessReview :: V1SubjectAccessReview -> Maybe Text
$sel:v1SubjectAccessReviewMetadata:V1SubjectAccessReview :: V1SubjectAccessReview -> Maybe V1ObjectMeta
$sel:v1SubjectAccessReviewSpec:V1SubjectAccessReview :: V1SubjectAccessReview -> V1SubjectAccessReviewSpec
$sel:v1SubjectAccessReviewStatus:V1SubjectAccessReview :: V1SubjectAccessReview -> Maybe V1SubjectAccessReviewStatus
v1SubjectAccessReviewApiVersion :: Maybe Text
v1SubjectAccessReviewKind :: Maybe Text
v1SubjectAccessReviewMetadata :: Maybe V1ObjectMeta
v1SubjectAccessReviewSpec :: V1SubjectAccessReviewSpec
v1SubjectAccessReviewStatus :: Maybe V1SubjectAccessReviewStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1SubjectAccessReviewApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1SubjectAccessReviewKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1SubjectAccessReviewMetadata
      , Key
"spec" Key -> V1SubjectAccessReviewSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1SubjectAccessReviewSpec
v1SubjectAccessReviewSpec
      , Key
"status" Key -> Maybe V1SubjectAccessReviewStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1SubjectAccessReviewStatus
v1SubjectAccessReviewStatus
      ]


-- | Construct a value of type 'V1SubjectAccessReview' (by applying it's required fields, if any)
mkV1SubjectAccessReview
  :: V1SubjectAccessReviewSpec -- ^ 'v1SubjectAccessReviewSpec' 
  -> V1SubjectAccessReview
mkV1SubjectAccessReview :: V1SubjectAccessReviewSpec -> V1SubjectAccessReview
mkV1SubjectAccessReview V1SubjectAccessReviewSpec
v1SubjectAccessReviewSpec =
  V1SubjectAccessReview
  { $sel:v1SubjectAccessReviewApiVersion:V1SubjectAccessReview :: Maybe Text
v1SubjectAccessReviewApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1SubjectAccessReviewKind:V1SubjectAccessReview :: Maybe Text
v1SubjectAccessReviewKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1SubjectAccessReviewMetadata:V1SubjectAccessReview :: Maybe V1ObjectMeta
v1SubjectAccessReviewMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , V1SubjectAccessReviewSpec
$sel:v1SubjectAccessReviewSpec:V1SubjectAccessReview :: V1SubjectAccessReviewSpec
v1SubjectAccessReviewSpec :: V1SubjectAccessReviewSpec
v1SubjectAccessReviewSpec
  , $sel:v1SubjectAccessReviewStatus:V1SubjectAccessReview :: Maybe V1SubjectAccessReviewStatus
v1SubjectAccessReviewStatus = Maybe V1SubjectAccessReviewStatus
forall a. Maybe a
Nothing
  }

-- ** V1SubjectAccessReviewSpec
-- | V1SubjectAccessReviewSpec
-- SubjectAccessReviewSpec is a description of the access request.  Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set
data V1SubjectAccessReviewSpec = V1SubjectAccessReviewSpec
  { V1SubjectAccessReviewSpec -> Maybe (Map String [Text])
v1SubjectAccessReviewSpecExtra :: !(Maybe (Map.Map String [Text])) -- ^ "extra" - Extra corresponds to the user.Info.GetExtra() method from the authenticator.  Since that is input to the authorizer it needs a reflection here.
  , V1SubjectAccessReviewSpec -> Maybe [Text]
v1SubjectAccessReviewSpecGroups :: !(Maybe [Text]) -- ^ "groups" - Groups is the groups you&#39;re testing for.
  , V1SubjectAccessReviewSpec -> Maybe V1NonResourceAttributes
v1SubjectAccessReviewSpecNonResourceAttributes :: !(Maybe V1NonResourceAttributes) -- ^ "nonResourceAttributes"
  , V1SubjectAccessReviewSpec -> Maybe V1ResourceAttributes
v1SubjectAccessReviewSpecResourceAttributes :: !(Maybe V1ResourceAttributes) -- ^ "resourceAttributes"
  , V1SubjectAccessReviewSpec -> Maybe Text
v1SubjectAccessReviewSpecUid :: !(Maybe Text) -- ^ "uid" - UID information about the requesting user.
  , V1SubjectAccessReviewSpec -> Maybe Text
v1SubjectAccessReviewSpecUser :: !(Maybe Text) -- ^ "user" - User is the user you&#39;re testing for. If you specify \&quot;User\&quot; but not \&quot;Groups\&quot;, then is it interpreted as \&quot;What if User were not a member of any groups
  } deriving (Int -> V1SubjectAccessReviewSpec -> ShowS
[V1SubjectAccessReviewSpec] -> ShowS
V1SubjectAccessReviewSpec -> String
(Int -> V1SubjectAccessReviewSpec -> ShowS)
-> (V1SubjectAccessReviewSpec -> String)
-> ([V1SubjectAccessReviewSpec] -> ShowS)
-> Show V1SubjectAccessReviewSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1SubjectAccessReviewSpec -> ShowS
showsPrec :: Int -> V1SubjectAccessReviewSpec -> ShowS
$cshow :: V1SubjectAccessReviewSpec -> String
show :: V1SubjectAccessReviewSpec -> String
$cshowList :: [V1SubjectAccessReviewSpec] -> ShowS
showList :: [V1SubjectAccessReviewSpec] -> ShowS
P.Show, V1SubjectAccessReviewSpec -> V1SubjectAccessReviewSpec -> Bool
(V1SubjectAccessReviewSpec -> V1SubjectAccessReviewSpec -> Bool)
-> (V1SubjectAccessReviewSpec -> V1SubjectAccessReviewSpec -> Bool)
-> Eq V1SubjectAccessReviewSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1SubjectAccessReviewSpec -> V1SubjectAccessReviewSpec -> Bool
== :: V1SubjectAccessReviewSpec -> V1SubjectAccessReviewSpec -> Bool
$c/= :: V1SubjectAccessReviewSpec -> V1SubjectAccessReviewSpec -> Bool
/= :: V1SubjectAccessReviewSpec -> V1SubjectAccessReviewSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1SubjectAccessReviewSpec
instance A.FromJSON V1SubjectAccessReviewSpec where
  parseJSON :: Value -> Parser V1SubjectAccessReviewSpec
parseJSON = String
-> (Object -> Parser V1SubjectAccessReviewSpec)
-> Value
-> Parser V1SubjectAccessReviewSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1SubjectAccessReviewSpec" ((Object -> Parser V1SubjectAccessReviewSpec)
 -> Value -> Parser V1SubjectAccessReviewSpec)
-> (Object -> Parser V1SubjectAccessReviewSpec)
-> Value
-> Parser V1SubjectAccessReviewSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe (Map String [Text])
-> Maybe [Text]
-> Maybe V1NonResourceAttributes
-> Maybe V1ResourceAttributes
-> Maybe Text
-> Maybe Text
-> V1SubjectAccessReviewSpec
V1SubjectAccessReviewSpec
      (Maybe (Map String [Text])
 -> Maybe [Text]
 -> Maybe V1NonResourceAttributes
 -> Maybe V1ResourceAttributes
 -> Maybe Text
 -> Maybe Text
 -> V1SubjectAccessReviewSpec)
-> Parser (Maybe (Map String [Text]))
-> Parser
     (Maybe [Text]
      -> Maybe V1NonResourceAttributes
      -> Maybe V1ResourceAttributes
      -> Maybe Text
      -> Maybe Text
      -> V1SubjectAccessReviewSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe (Map String [Text]))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"extra")
      Parser
  (Maybe [Text]
   -> Maybe V1NonResourceAttributes
   -> Maybe V1ResourceAttributes
   -> Maybe Text
   -> Maybe Text
   -> V1SubjectAccessReviewSpec)
-> Parser (Maybe [Text])
-> Parser
     (Maybe V1NonResourceAttributes
      -> Maybe V1ResourceAttributes
      -> Maybe Text
      -> Maybe Text
      -> V1SubjectAccessReviewSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"groups")
      Parser
  (Maybe V1NonResourceAttributes
   -> Maybe V1ResourceAttributes
   -> Maybe Text
   -> Maybe Text
   -> V1SubjectAccessReviewSpec)
-> Parser (Maybe V1NonResourceAttributes)
-> Parser
     (Maybe V1ResourceAttributes
      -> Maybe Text -> Maybe Text -> V1SubjectAccessReviewSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1NonResourceAttributes)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nonResourceAttributes")
      Parser
  (Maybe V1ResourceAttributes
   -> Maybe Text -> Maybe Text -> V1SubjectAccessReviewSpec)
-> Parser (Maybe V1ResourceAttributes)
-> Parser (Maybe Text -> Maybe Text -> V1SubjectAccessReviewSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ResourceAttributes)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resourceAttributes")
      Parser (Maybe Text -> Maybe Text -> V1SubjectAccessReviewSpec)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> V1SubjectAccessReviewSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"uid")
      Parser (Maybe Text -> V1SubjectAccessReviewSpec)
-> Parser (Maybe Text) -> Parser V1SubjectAccessReviewSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"user")

-- | ToJSON V1SubjectAccessReviewSpec
instance A.ToJSON V1SubjectAccessReviewSpec where
  toJSON :: V1SubjectAccessReviewSpec -> Value
toJSON V1SubjectAccessReviewSpec {Maybe [Text]
Maybe (Map String [Text])
Maybe Text
Maybe V1ResourceAttributes
Maybe V1NonResourceAttributes
$sel:v1SubjectAccessReviewSpecExtra:V1SubjectAccessReviewSpec :: V1SubjectAccessReviewSpec -> Maybe (Map String [Text])
$sel:v1SubjectAccessReviewSpecGroups:V1SubjectAccessReviewSpec :: V1SubjectAccessReviewSpec -> Maybe [Text]
$sel:v1SubjectAccessReviewSpecNonResourceAttributes:V1SubjectAccessReviewSpec :: V1SubjectAccessReviewSpec -> Maybe V1NonResourceAttributes
$sel:v1SubjectAccessReviewSpecResourceAttributes:V1SubjectAccessReviewSpec :: V1SubjectAccessReviewSpec -> Maybe V1ResourceAttributes
$sel:v1SubjectAccessReviewSpecUid:V1SubjectAccessReviewSpec :: V1SubjectAccessReviewSpec -> Maybe Text
$sel:v1SubjectAccessReviewSpecUser:V1SubjectAccessReviewSpec :: V1SubjectAccessReviewSpec -> Maybe Text
v1SubjectAccessReviewSpecExtra :: Maybe (Map String [Text])
v1SubjectAccessReviewSpecGroups :: Maybe [Text]
v1SubjectAccessReviewSpecNonResourceAttributes :: Maybe V1NonResourceAttributes
v1SubjectAccessReviewSpecResourceAttributes :: Maybe V1ResourceAttributes
v1SubjectAccessReviewSpecUid :: Maybe Text
v1SubjectAccessReviewSpecUser :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"extra" Key -> Maybe (Map String [Text]) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String [Text])
v1SubjectAccessReviewSpecExtra
      , Key
"groups" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1SubjectAccessReviewSpecGroups
      , Key
"nonResourceAttributes" Key -> Maybe V1NonResourceAttributes -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1NonResourceAttributes
v1SubjectAccessReviewSpecNonResourceAttributes
      , Key
"resourceAttributes" Key -> Maybe V1ResourceAttributes -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ResourceAttributes
v1SubjectAccessReviewSpecResourceAttributes
      , Key
"uid" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1SubjectAccessReviewSpecUid
      , Key
"user" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1SubjectAccessReviewSpecUser
      ]


-- | Construct a value of type 'V1SubjectAccessReviewSpec' (by applying it's required fields, if any)
mkV1SubjectAccessReviewSpec
  :: V1SubjectAccessReviewSpec
mkV1SubjectAccessReviewSpec :: V1SubjectAccessReviewSpec
mkV1SubjectAccessReviewSpec =
  V1SubjectAccessReviewSpec
  { $sel:v1SubjectAccessReviewSpecExtra:V1SubjectAccessReviewSpec :: Maybe (Map String [Text])
v1SubjectAccessReviewSpecExtra = Maybe (Map String [Text])
forall a. Maybe a
Nothing
  , $sel:v1SubjectAccessReviewSpecGroups:V1SubjectAccessReviewSpec :: Maybe [Text]
v1SubjectAccessReviewSpecGroups = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1SubjectAccessReviewSpecNonResourceAttributes:V1SubjectAccessReviewSpec :: Maybe V1NonResourceAttributes
v1SubjectAccessReviewSpecNonResourceAttributes = Maybe V1NonResourceAttributes
forall a. Maybe a
Nothing
  , $sel:v1SubjectAccessReviewSpecResourceAttributes:V1SubjectAccessReviewSpec :: Maybe V1ResourceAttributes
v1SubjectAccessReviewSpecResourceAttributes = Maybe V1ResourceAttributes
forall a. Maybe a
Nothing
  , $sel:v1SubjectAccessReviewSpecUid:V1SubjectAccessReviewSpec :: Maybe Text
v1SubjectAccessReviewSpecUid = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1SubjectAccessReviewSpecUser:V1SubjectAccessReviewSpec :: Maybe Text
v1SubjectAccessReviewSpecUser = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1SubjectAccessReviewStatus
-- | V1SubjectAccessReviewStatus
-- SubjectAccessReviewStatus
data V1SubjectAccessReviewStatus = V1SubjectAccessReviewStatus
  { V1SubjectAccessReviewStatus -> Bool
v1SubjectAccessReviewStatusAllowed :: !(Bool) -- ^ /Required/ "allowed" - Allowed is required. True if the action would be allowed, false otherwise.
  , V1SubjectAccessReviewStatus -> Maybe Bool
v1SubjectAccessReviewStatusDenied :: !(Maybe Bool) -- ^ "denied" - Denied is optional. True if the action would be denied, otherwise false. If both allowed is false and denied is false, then the authorizer has no opinion on whether to authorize the action. Denied may not be true if Allowed is true.
  , V1SubjectAccessReviewStatus -> Maybe Text
v1SubjectAccessReviewStatusEvaluationError :: !(Maybe Text) -- ^ "evaluationError" - EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.
  , V1SubjectAccessReviewStatus -> Maybe Text
v1SubjectAccessReviewStatusReason :: !(Maybe Text) -- ^ "reason" - Reason is optional.  It indicates why a request was allowed or denied.
  } deriving (Int -> V1SubjectAccessReviewStatus -> ShowS
[V1SubjectAccessReviewStatus] -> ShowS
V1SubjectAccessReviewStatus -> String
(Int -> V1SubjectAccessReviewStatus -> ShowS)
-> (V1SubjectAccessReviewStatus -> String)
-> ([V1SubjectAccessReviewStatus] -> ShowS)
-> Show V1SubjectAccessReviewStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1SubjectAccessReviewStatus -> ShowS
showsPrec :: Int -> V1SubjectAccessReviewStatus -> ShowS
$cshow :: V1SubjectAccessReviewStatus -> String
show :: V1SubjectAccessReviewStatus -> String
$cshowList :: [V1SubjectAccessReviewStatus] -> ShowS
showList :: [V1SubjectAccessReviewStatus] -> ShowS
P.Show, V1SubjectAccessReviewStatus -> V1SubjectAccessReviewStatus -> Bool
(V1SubjectAccessReviewStatus
 -> V1SubjectAccessReviewStatus -> Bool)
-> (V1SubjectAccessReviewStatus
    -> V1SubjectAccessReviewStatus -> Bool)
-> Eq V1SubjectAccessReviewStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1SubjectAccessReviewStatus -> V1SubjectAccessReviewStatus -> Bool
== :: V1SubjectAccessReviewStatus -> V1SubjectAccessReviewStatus -> Bool
$c/= :: V1SubjectAccessReviewStatus -> V1SubjectAccessReviewStatus -> Bool
/= :: V1SubjectAccessReviewStatus -> V1SubjectAccessReviewStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1SubjectAccessReviewStatus
instance A.FromJSON V1SubjectAccessReviewStatus where
  parseJSON :: Value -> Parser V1SubjectAccessReviewStatus
parseJSON = String
-> (Object -> Parser V1SubjectAccessReviewStatus)
-> Value
-> Parser V1SubjectAccessReviewStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1SubjectAccessReviewStatus" ((Object -> Parser V1SubjectAccessReviewStatus)
 -> Value -> Parser V1SubjectAccessReviewStatus)
-> (Object -> Parser V1SubjectAccessReviewStatus)
-> Value
-> Parser V1SubjectAccessReviewStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> V1SubjectAccessReviewStatus
V1SubjectAccessReviewStatus
      (Bool
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> V1SubjectAccessReviewStatus)
-> Parser Bool
-> Parser
     (Maybe Bool
      -> Maybe Text -> Maybe Text -> V1SubjectAccessReviewStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Bool
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"allowed")
      Parser
  (Maybe Bool
   -> Maybe Text -> Maybe Text -> V1SubjectAccessReviewStatus)
-> Parser (Maybe Bool)
-> Parser (Maybe Text -> Maybe Text -> V1SubjectAccessReviewStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"denied")
      Parser (Maybe Text -> Maybe Text -> V1SubjectAccessReviewStatus)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> V1SubjectAccessReviewStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"evaluationError")
      Parser (Maybe Text -> V1SubjectAccessReviewStatus)
-> Parser (Maybe Text) -> Parser V1SubjectAccessReviewStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reason")

-- | ToJSON V1SubjectAccessReviewStatus
instance A.ToJSON V1SubjectAccessReviewStatus where
  toJSON :: V1SubjectAccessReviewStatus -> Value
toJSON V1SubjectAccessReviewStatus {Bool
Maybe Bool
Maybe Text
$sel:v1SubjectAccessReviewStatusAllowed:V1SubjectAccessReviewStatus :: V1SubjectAccessReviewStatus -> Bool
$sel:v1SubjectAccessReviewStatusDenied:V1SubjectAccessReviewStatus :: V1SubjectAccessReviewStatus -> Maybe Bool
$sel:v1SubjectAccessReviewStatusEvaluationError:V1SubjectAccessReviewStatus :: V1SubjectAccessReviewStatus -> Maybe Text
$sel:v1SubjectAccessReviewStatusReason:V1SubjectAccessReviewStatus :: V1SubjectAccessReviewStatus -> Maybe Text
v1SubjectAccessReviewStatusAllowed :: Bool
v1SubjectAccessReviewStatusDenied :: Maybe Bool
v1SubjectAccessReviewStatusEvaluationError :: Maybe Text
v1SubjectAccessReviewStatusReason :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"allowed" Key -> Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Bool
v1SubjectAccessReviewStatusAllowed
      , Key
"denied" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1SubjectAccessReviewStatusDenied
      , Key
"evaluationError" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1SubjectAccessReviewStatusEvaluationError
      , Key
"reason" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1SubjectAccessReviewStatusReason
      ]


-- | Construct a value of type 'V1SubjectAccessReviewStatus' (by applying it's required fields, if any)
mkV1SubjectAccessReviewStatus
  :: Bool -- ^ 'v1SubjectAccessReviewStatusAllowed': Allowed is required. True if the action would be allowed, false otherwise.
  -> V1SubjectAccessReviewStatus
mkV1SubjectAccessReviewStatus :: Bool -> V1SubjectAccessReviewStatus
mkV1SubjectAccessReviewStatus Bool
v1SubjectAccessReviewStatusAllowed =
  V1SubjectAccessReviewStatus
  { Bool
$sel:v1SubjectAccessReviewStatusAllowed:V1SubjectAccessReviewStatus :: Bool
v1SubjectAccessReviewStatusAllowed :: Bool
v1SubjectAccessReviewStatusAllowed
  , $sel:v1SubjectAccessReviewStatusDenied:V1SubjectAccessReviewStatus :: Maybe Bool
v1SubjectAccessReviewStatusDenied = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1SubjectAccessReviewStatusEvaluationError:V1SubjectAccessReviewStatus :: Maybe Text
v1SubjectAccessReviewStatusEvaluationError = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1SubjectAccessReviewStatusReason:V1SubjectAccessReviewStatus :: Maybe Text
v1SubjectAccessReviewStatusReason = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1SubjectRulesReviewStatus
-- | V1SubjectRulesReviewStatus
-- SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on the set of authorizers the server is configured with and any errors experienced during evaluation. Because authorization rules are additive, if a rule appears in a list it's safe to assume the subject has that permission, even if that list is incomplete.
data V1SubjectRulesReviewStatus = V1SubjectRulesReviewStatus
  { V1SubjectRulesReviewStatus -> Maybe Text
v1SubjectRulesReviewStatusEvaluationError :: !(Maybe Text) -- ^ "evaluationError" - EvaluationError can appear in combination with Rules. It indicates an error occurred during rule evaluation, such as an authorizer that doesn&#39;t support rule evaluation, and that ResourceRules and/or NonResourceRules may be incomplete.
  , V1SubjectRulesReviewStatus -> Bool
v1SubjectRulesReviewStatusIncomplete :: !(Bool) -- ^ /Required/ "incomplete" - Incomplete is true when the rules returned by this call are incomplete. This is most commonly encountered when an authorizer, such as an external authorizer, doesn&#39;t support rules evaluation.
  , V1SubjectRulesReviewStatus -> [V1NonResourceRule]
v1SubjectRulesReviewStatusNonResourceRules :: !([V1NonResourceRule]) -- ^ /Required/ "nonResourceRules" - NonResourceRules is the list of actions the subject is allowed to perform on non-resources. The list ordering isn&#39;t significant, may contain duplicates, and possibly be incomplete.
  , V1SubjectRulesReviewStatus -> [V1ResourceRule]
v1SubjectRulesReviewStatusResourceRules :: !([V1ResourceRule]) -- ^ /Required/ "resourceRules" - ResourceRules is the list of actions the subject is allowed to perform on resources. The list ordering isn&#39;t significant, may contain duplicates, and possibly be incomplete.
  } deriving (Int -> V1SubjectRulesReviewStatus -> ShowS
[V1SubjectRulesReviewStatus] -> ShowS
V1SubjectRulesReviewStatus -> String
(Int -> V1SubjectRulesReviewStatus -> ShowS)
-> (V1SubjectRulesReviewStatus -> String)
-> ([V1SubjectRulesReviewStatus] -> ShowS)
-> Show V1SubjectRulesReviewStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1SubjectRulesReviewStatus -> ShowS
showsPrec :: Int -> V1SubjectRulesReviewStatus -> ShowS
$cshow :: V1SubjectRulesReviewStatus -> String
show :: V1SubjectRulesReviewStatus -> String
$cshowList :: [V1SubjectRulesReviewStatus] -> ShowS
showList :: [V1SubjectRulesReviewStatus] -> ShowS
P.Show, V1SubjectRulesReviewStatus -> V1SubjectRulesReviewStatus -> Bool
(V1SubjectRulesReviewStatus -> V1SubjectRulesReviewStatus -> Bool)
-> (V1SubjectRulesReviewStatus
    -> V1SubjectRulesReviewStatus -> Bool)
-> Eq V1SubjectRulesReviewStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1SubjectRulesReviewStatus -> V1SubjectRulesReviewStatus -> Bool
== :: V1SubjectRulesReviewStatus -> V1SubjectRulesReviewStatus -> Bool
$c/= :: V1SubjectRulesReviewStatus -> V1SubjectRulesReviewStatus -> Bool
/= :: V1SubjectRulesReviewStatus -> V1SubjectRulesReviewStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1SubjectRulesReviewStatus
instance A.FromJSON V1SubjectRulesReviewStatus where
  parseJSON :: Value -> Parser V1SubjectRulesReviewStatus
parseJSON = String
-> (Object -> Parser V1SubjectRulesReviewStatus)
-> Value
-> Parser V1SubjectRulesReviewStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1SubjectRulesReviewStatus" ((Object -> Parser V1SubjectRulesReviewStatus)
 -> Value -> Parser V1SubjectRulesReviewStatus)
-> (Object -> Parser V1SubjectRulesReviewStatus)
-> Value
-> Parser V1SubjectRulesReviewStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Bool
-> [V1NonResourceRule]
-> [V1ResourceRule]
-> V1SubjectRulesReviewStatus
V1SubjectRulesReviewStatus
      (Maybe Text
 -> Bool
 -> [V1NonResourceRule]
 -> [V1ResourceRule]
 -> V1SubjectRulesReviewStatus)
-> Parser (Maybe Text)
-> Parser
     (Bool
      -> [V1NonResourceRule]
      -> [V1ResourceRule]
      -> V1SubjectRulesReviewStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"evaluationError")
      Parser
  (Bool
   -> [V1NonResourceRule]
   -> [V1ResourceRule]
   -> V1SubjectRulesReviewStatus)
-> Parser Bool
-> Parser
     ([V1NonResourceRule]
      -> [V1ResourceRule] -> V1SubjectRulesReviewStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Bool
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"incomplete")
      Parser
  ([V1NonResourceRule]
   -> [V1ResourceRule] -> V1SubjectRulesReviewStatus)
-> Parser [V1NonResourceRule]
-> Parser ([V1ResourceRule] -> V1SubjectRulesReviewStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1NonResourceRule]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"nonResourceRules")
      Parser ([V1ResourceRule] -> V1SubjectRulesReviewStatus)
-> Parser [V1ResourceRule] -> Parser V1SubjectRulesReviewStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1ResourceRule]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"resourceRules")

-- | ToJSON V1SubjectRulesReviewStatus
instance A.ToJSON V1SubjectRulesReviewStatus where
  toJSON :: V1SubjectRulesReviewStatus -> Value
toJSON V1SubjectRulesReviewStatus {Bool
[V1ResourceRule]
[V1NonResourceRule]
Maybe Text
$sel:v1SubjectRulesReviewStatusEvaluationError:V1SubjectRulesReviewStatus :: V1SubjectRulesReviewStatus -> Maybe Text
$sel:v1SubjectRulesReviewStatusIncomplete:V1SubjectRulesReviewStatus :: V1SubjectRulesReviewStatus -> Bool
$sel:v1SubjectRulesReviewStatusNonResourceRules:V1SubjectRulesReviewStatus :: V1SubjectRulesReviewStatus -> [V1NonResourceRule]
$sel:v1SubjectRulesReviewStatusResourceRules:V1SubjectRulesReviewStatus :: V1SubjectRulesReviewStatus -> [V1ResourceRule]
v1SubjectRulesReviewStatusEvaluationError :: Maybe Text
v1SubjectRulesReviewStatusIncomplete :: Bool
v1SubjectRulesReviewStatusNonResourceRules :: [V1NonResourceRule]
v1SubjectRulesReviewStatusResourceRules :: [V1ResourceRule]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"evaluationError" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1SubjectRulesReviewStatusEvaluationError
      , Key
"incomplete" Key -> Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Bool
v1SubjectRulesReviewStatusIncomplete
      , Key
"nonResourceRules" Key -> [V1NonResourceRule] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1NonResourceRule]
v1SubjectRulesReviewStatusNonResourceRules
      , Key
"resourceRules" Key -> [V1ResourceRule] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1ResourceRule]
v1SubjectRulesReviewStatusResourceRules
      ]


-- | Construct a value of type 'V1SubjectRulesReviewStatus' (by applying it's required fields, if any)
mkV1SubjectRulesReviewStatus
  :: Bool -- ^ 'v1SubjectRulesReviewStatusIncomplete': Incomplete is true when the rules returned by this call are incomplete. This is most commonly encountered when an authorizer, such as an external authorizer, doesn't support rules evaluation.
  -> [V1NonResourceRule] -- ^ 'v1SubjectRulesReviewStatusNonResourceRules': NonResourceRules is the list of actions the subject is allowed to perform on non-resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.
  -> [V1ResourceRule] -- ^ 'v1SubjectRulesReviewStatusResourceRules': ResourceRules is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.
  -> V1SubjectRulesReviewStatus
mkV1SubjectRulesReviewStatus :: Bool
-> [V1NonResourceRule]
-> [V1ResourceRule]
-> V1SubjectRulesReviewStatus
mkV1SubjectRulesReviewStatus Bool
v1SubjectRulesReviewStatusIncomplete [V1NonResourceRule]
v1SubjectRulesReviewStatusNonResourceRules [V1ResourceRule]
v1SubjectRulesReviewStatusResourceRules =
  V1SubjectRulesReviewStatus
  { $sel:v1SubjectRulesReviewStatusEvaluationError:V1SubjectRulesReviewStatus :: Maybe Text
v1SubjectRulesReviewStatusEvaluationError = Maybe Text
forall a. Maybe a
Nothing
  , Bool
$sel:v1SubjectRulesReviewStatusIncomplete:V1SubjectRulesReviewStatus :: Bool
v1SubjectRulesReviewStatusIncomplete :: Bool
v1SubjectRulesReviewStatusIncomplete
  , [V1NonResourceRule]
$sel:v1SubjectRulesReviewStatusNonResourceRules:V1SubjectRulesReviewStatus :: [V1NonResourceRule]
v1SubjectRulesReviewStatusNonResourceRules :: [V1NonResourceRule]
v1SubjectRulesReviewStatusNonResourceRules
  , [V1ResourceRule]
$sel:v1SubjectRulesReviewStatusResourceRules:V1SubjectRulesReviewStatus :: [V1ResourceRule]
v1SubjectRulesReviewStatusResourceRules :: [V1ResourceRule]
v1SubjectRulesReviewStatusResourceRules
  }

-- ** V1SuccessPolicy
-- | V1SuccessPolicy
-- SuccessPolicy describes when a Job can be declared as succeeded based on the success of some indexes.
data V1SuccessPolicy = V1SuccessPolicy
  { V1SuccessPolicy -> [V1SuccessPolicyRule]
v1SuccessPolicyRules :: !([V1SuccessPolicyRule]) -- ^ /Required/ "rules" - rules represents the list of alternative rules for the declaring the Jobs as successful before &#x60;.status.succeeded &gt;&#x3D; .spec.completions&#x60;. Once any of the rules are met, the \&quot;SucceededCriteriaMet\&quot; condition is added, and the lingering pods are removed. The terminal state for such a Job has the \&quot;Complete\&quot; condition. Additionally, these rules are evaluated in order; Once the Job meets one of the rules, other rules are ignored. At most 20 elements are allowed.
  } deriving (Int -> V1SuccessPolicy -> ShowS
[V1SuccessPolicy] -> ShowS
V1SuccessPolicy -> String
(Int -> V1SuccessPolicy -> ShowS)
-> (V1SuccessPolicy -> String)
-> ([V1SuccessPolicy] -> ShowS)
-> Show V1SuccessPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1SuccessPolicy -> ShowS
showsPrec :: Int -> V1SuccessPolicy -> ShowS
$cshow :: V1SuccessPolicy -> String
show :: V1SuccessPolicy -> String
$cshowList :: [V1SuccessPolicy] -> ShowS
showList :: [V1SuccessPolicy] -> ShowS
P.Show, V1SuccessPolicy -> V1SuccessPolicy -> Bool
(V1SuccessPolicy -> V1SuccessPolicy -> Bool)
-> (V1SuccessPolicy -> V1SuccessPolicy -> Bool)
-> Eq V1SuccessPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1SuccessPolicy -> V1SuccessPolicy -> Bool
== :: V1SuccessPolicy -> V1SuccessPolicy -> Bool
$c/= :: V1SuccessPolicy -> V1SuccessPolicy -> Bool
/= :: V1SuccessPolicy -> V1SuccessPolicy -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1SuccessPolicy
instance A.FromJSON V1SuccessPolicy where
  parseJSON :: Value -> Parser V1SuccessPolicy
parseJSON = String
-> (Object -> Parser V1SuccessPolicy)
-> Value
-> Parser V1SuccessPolicy
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1SuccessPolicy" ((Object -> Parser V1SuccessPolicy)
 -> Value -> Parser V1SuccessPolicy)
-> (Object -> Parser V1SuccessPolicy)
-> Value
-> Parser V1SuccessPolicy
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    [V1SuccessPolicyRule] -> V1SuccessPolicy
V1SuccessPolicy
      ([V1SuccessPolicyRule] -> V1SuccessPolicy)
-> Parser [V1SuccessPolicyRule] -> Parser V1SuccessPolicy
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser [V1SuccessPolicyRule]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"rules")

-- | ToJSON V1SuccessPolicy
instance A.ToJSON V1SuccessPolicy where
  toJSON :: V1SuccessPolicy -> Value
toJSON V1SuccessPolicy {[V1SuccessPolicyRule]
$sel:v1SuccessPolicyRules:V1SuccessPolicy :: V1SuccessPolicy -> [V1SuccessPolicyRule]
v1SuccessPolicyRules :: [V1SuccessPolicyRule]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"rules" Key -> [V1SuccessPolicyRule] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1SuccessPolicyRule]
v1SuccessPolicyRules
      ]


-- | Construct a value of type 'V1SuccessPolicy' (by applying it's required fields, if any)
mkV1SuccessPolicy
  :: [V1SuccessPolicyRule] -- ^ 'v1SuccessPolicyRules': rules represents the list of alternative rules for the declaring the Jobs as successful before `.status.succeeded >= .spec.completions`. Once any of the rules are met, the \"SucceededCriteriaMet\" condition is added, and the lingering pods are removed. The terminal state for such a Job has the \"Complete\" condition. Additionally, these rules are evaluated in order; Once the Job meets one of the rules, other rules are ignored. At most 20 elements are allowed.
  -> V1SuccessPolicy
mkV1SuccessPolicy :: [V1SuccessPolicyRule] -> V1SuccessPolicy
mkV1SuccessPolicy [V1SuccessPolicyRule]
v1SuccessPolicyRules =
  V1SuccessPolicy
  { [V1SuccessPolicyRule]
$sel:v1SuccessPolicyRules:V1SuccessPolicy :: [V1SuccessPolicyRule]
v1SuccessPolicyRules :: [V1SuccessPolicyRule]
v1SuccessPolicyRules
  }

-- ** V1SuccessPolicyRule
-- | V1SuccessPolicyRule
-- SuccessPolicyRule describes rule for declaring a Job as succeeded. Each rule must have at least one of the \"succeededIndexes\" or \"succeededCount\" specified.
data V1SuccessPolicyRule = V1SuccessPolicyRule
  { V1SuccessPolicyRule -> Maybe Int
v1SuccessPolicyRuleSucceededCount :: !(Maybe Int) -- ^ "succeededCount" - succeededCount specifies the minimal required size of the actual set of the succeeded indexes for the Job. When succeededCount is used along with succeededIndexes, the check is constrained only to the set of indexes specified by succeededIndexes. For example, given that succeededIndexes is \&quot;1-4\&quot;, succeededCount is \&quot;3\&quot;, and completed indexes are \&quot;1\&quot;, \&quot;3\&quot;, and \&quot;5\&quot;, the Job isn&#39;t declared as succeeded because only \&quot;1\&quot; and \&quot;3\&quot; indexes are considered in that rules. When this field is null, this doesn&#39;t default to any value and is never evaluated at any time. When specified it needs to be a positive integer.
  , V1SuccessPolicyRule -> Maybe Text
v1SuccessPolicyRuleSucceededIndexes :: !(Maybe Text) -- ^ "succeededIndexes" - succeededIndexes specifies the set of indexes which need to be contained in the actual set of the succeeded indexes for the Job. The list of indexes must be within 0 to \&quot;.spec.completions-1\&quot; and must not contain duplicates. At least one element is required. The indexes are represented as intervals separated by commas. The intervals can be a decimal integer or a pair of decimal integers separated by a hyphen. The number are listed in represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as \&quot;1,3-5,7\&quot;. When this field is null, this field doesn&#39;t default to any value and is never evaluated at any time.
  } deriving (Int -> V1SuccessPolicyRule -> ShowS
[V1SuccessPolicyRule] -> ShowS
V1SuccessPolicyRule -> String
(Int -> V1SuccessPolicyRule -> ShowS)
-> (V1SuccessPolicyRule -> String)
-> ([V1SuccessPolicyRule] -> ShowS)
-> Show V1SuccessPolicyRule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1SuccessPolicyRule -> ShowS
showsPrec :: Int -> V1SuccessPolicyRule -> ShowS
$cshow :: V1SuccessPolicyRule -> String
show :: V1SuccessPolicyRule -> String
$cshowList :: [V1SuccessPolicyRule] -> ShowS
showList :: [V1SuccessPolicyRule] -> ShowS
P.Show, V1SuccessPolicyRule -> V1SuccessPolicyRule -> Bool
(V1SuccessPolicyRule -> V1SuccessPolicyRule -> Bool)
-> (V1SuccessPolicyRule -> V1SuccessPolicyRule -> Bool)
-> Eq V1SuccessPolicyRule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1SuccessPolicyRule -> V1SuccessPolicyRule -> Bool
== :: V1SuccessPolicyRule -> V1SuccessPolicyRule -> Bool
$c/= :: V1SuccessPolicyRule -> V1SuccessPolicyRule -> Bool
/= :: V1SuccessPolicyRule -> V1SuccessPolicyRule -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1SuccessPolicyRule
instance A.FromJSON V1SuccessPolicyRule where
  parseJSON :: Value -> Parser V1SuccessPolicyRule
parseJSON = String
-> (Object -> Parser V1SuccessPolicyRule)
-> Value
-> Parser V1SuccessPolicyRule
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1SuccessPolicyRule" ((Object -> Parser V1SuccessPolicyRule)
 -> Value -> Parser V1SuccessPolicyRule)
-> (Object -> Parser V1SuccessPolicyRule)
-> Value
-> Parser V1SuccessPolicyRule
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Int -> Maybe Text -> V1SuccessPolicyRule
V1SuccessPolicyRule
      (Maybe Int -> Maybe Text -> V1SuccessPolicyRule)
-> Parser (Maybe Int) -> Parser (Maybe Text -> V1SuccessPolicyRule)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"succeededCount")
      Parser (Maybe Text -> V1SuccessPolicyRule)
-> Parser (Maybe Text) -> Parser V1SuccessPolicyRule
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"succeededIndexes")

-- | ToJSON V1SuccessPolicyRule
instance A.ToJSON V1SuccessPolicyRule where
  toJSON :: V1SuccessPolicyRule -> Value
toJSON V1SuccessPolicyRule {Maybe Int
Maybe Text
$sel:v1SuccessPolicyRuleSucceededCount:V1SuccessPolicyRule :: V1SuccessPolicyRule -> Maybe Int
$sel:v1SuccessPolicyRuleSucceededIndexes:V1SuccessPolicyRule :: V1SuccessPolicyRule -> Maybe Text
v1SuccessPolicyRuleSucceededCount :: Maybe Int
v1SuccessPolicyRuleSucceededIndexes :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"succeededCount" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1SuccessPolicyRuleSucceededCount
      , Key
"succeededIndexes" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1SuccessPolicyRuleSucceededIndexes
      ]


-- | Construct a value of type 'V1SuccessPolicyRule' (by applying it's required fields, if any)
mkV1SuccessPolicyRule
  :: V1SuccessPolicyRule
mkV1SuccessPolicyRule :: V1SuccessPolicyRule
mkV1SuccessPolicyRule =
  V1SuccessPolicyRule
  { $sel:v1SuccessPolicyRuleSucceededCount:V1SuccessPolicyRule :: Maybe Int
v1SuccessPolicyRuleSucceededCount = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1SuccessPolicyRuleSucceededIndexes:V1SuccessPolicyRule :: Maybe Text
v1SuccessPolicyRuleSucceededIndexes = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1Sysctl
-- | V1Sysctl
-- Sysctl defines a kernel parameter to be set
data V1Sysctl = V1Sysctl
  { V1Sysctl -> Text
v1SysctlName :: !(Text) -- ^ /Required/ "name" - Name of a property to set
  , V1Sysctl -> Text
v1SysctlValue :: !(Text) -- ^ /Required/ "value" - Value of a property to set
  } deriving (Int -> V1Sysctl -> ShowS
[V1Sysctl] -> ShowS
V1Sysctl -> String
(Int -> V1Sysctl -> ShowS)
-> (V1Sysctl -> String) -> ([V1Sysctl] -> ShowS) -> Show V1Sysctl
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1Sysctl -> ShowS
showsPrec :: Int -> V1Sysctl -> ShowS
$cshow :: V1Sysctl -> String
show :: V1Sysctl -> String
$cshowList :: [V1Sysctl] -> ShowS
showList :: [V1Sysctl] -> ShowS
P.Show, V1Sysctl -> V1Sysctl -> Bool
(V1Sysctl -> V1Sysctl -> Bool)
-> (V1Sysctl -> V1Sysctl -> Bool) -> Eq V1Sysctl
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1Sysctl -> V1Sysctl -> Bool
== :: V1Sysctl -> V1Sysctl -> Bool
$c/= :: V1Sysctl -> V1Sysctl -> Bool
/= :: V1Sysctl -> V1Sysctl -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1Sysctl
instance A.FromJSON V1Sysctl where
  parseJSON :: Value -> Parser V1Sysctl
parseJSON = String -> (Object -> Parser V1Sysctl) -> Value -> Parser V1Sysctl
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1Sysctl" ((Object -> Parser V1Sysctl) -> Value -> Parser V1Sysctl)
-> (Object -> Parser V1Sysctl) -> Value -> Parser V1Sysctl
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Text -> V1Sysctl
V1Sysctl
      (Text -> Text -> V1Sysctl)
-> Parser Text -> Parser (Text -> V1Sysctl)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser (Text -> V1Sysctl) -> Parser Text -> Parser V1Sysctl
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"value")

-- | ToJSON V1Sysctl
instance A.ToJSON V1Sysctl where
  toJSON :: V1Sysctl -> Value
toJSON V1Sysctl {Text
$sel:v1SysctlName:V1Sysctl :: V1Sysctl -> Text
$sel:v1SysctlValue:V1Sysctl :: V1Sysctl -> Text
v1SysctlName :: Text
v1SysctlValue :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1SysctlName
      , Key
"value" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1SysctlValue
      ]


-- | Construct a value of type 'V1Sysctl' (by applying it's required fields, if any)
mkV1Sysctl
  :: Text -- ^ 'v1SysctlName': Name of a property to set
  -> Text -- ^ 'v1SysctlValue': Value of a property to set
  -> V1Sysctl
mkV1Sysctl :: Text -> Text -> V1Sysctl
mkV1Sysctl Text
v1SysctlName Text
v1SysctlValue =
  V1Sysctl
  { Text
$sel:v1SysctlName:V1Sysctl :: Text
v1SysctlName :: Text
v1SysctlName
  , Text
$sel:v1SysctlValue:V1Sysctl :: Text
v1SysctlValue :: Text
v1SysctlValue
  }

-- ** V1TCPSocketAction
-- | V1TCPSocketAction
-- TCPSocketAction describes an action based on opening a socket
data V1TCPSocketAction = V1TCPSocketAction
  { V1TCPSocketAction -> Maybe Text
v1TCPSocketActionHost :: !(Maybe Text) -- ^ "host" - Optional: Host name to connect to, defaults to the pod IP.
  , V1TCPSocketAction -> IntOrString
v1TCPSocketActionPort :: !(IntOrString) -- ^ /Required/ "port"
  } deriving (Int -> V1TCPSocketAction -> ShowS
[V1TCPSocketAction] -> ShowS
V1TCPSocketAction -> String
(Int -> V1TCPSocketAction -> ShowS)
-> (V1TCPSocketAction -> String)
-> ([V1TCPSocketAction] -> ShowS)
-> Show V1TCPSocketAction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1TCPSocketAction -> ShowS
showsPrec :: Int -> V1TCPSocketAction -> ShowS
$cshow :: V1TCPSocketAction -> String
show :: V1TCPSocketAction -> String
$cshowList :: [V1TCPSocketAction] -> ShowS
showList :: [V1TCPSocketAction] -> ShowS
P.Show, V1TCPSocketAction -> V1TCPSocketAction -> Bool
(V1TCPSocketAction -> V1TCPSocketAction -> Bool)
-> (V1TCPSocketAction -> V1TCPSocketAction -> Bool)
-> Eq V1TCPSocketAction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1TCPSocketAction -> V1TCPSocketAction -> Bool
== :: V1TCPSocketAction -> V1TCPSocketAction -> Bool
$c/= :: V1TCPSocketAction -> V1TCPSocketAction -> Bool
/= :: V1TCPSocketAction -> V1TCPSocketAction -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1TCPSocketAction
instance A.FromJSON V1TCPSocketAction where
  parseJSON :: Value -> Parser V1TCPSocketAction
parseJSON = String
-> (Object -> Parser V1TCPSocketAction)
-> Value
-> Parser V1TCPSocketAction
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1TCPSocketAction" ((Object -> Parser V1TCPSocketAction)
 -> Value -> Parser V1TCPSocketAction)
-> (Object -> Parser V1TCPSocketAction)
-> Value
-> Parser V1TCPSocketAction
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> IntOrString -> V1TCPSocketAction
V1TCPSocketAction
      (Maybe Text -> IntOrString -> V1TCPSocketAction)
-> Parser (Maybe Text) -> Parser (IntOrString -> V1TCPSocketAction)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"host")
      Parser (IntOrString -> V1TCPSocketAction)
-> Parser IntOrString -> Parser V1TCPSocketAction
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser IntOrString
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"port")

-- | ToJSON V1TCPSocketAction
instance A.ToJSON V1TCPSocketAction where
  toJSON :: V1TCPSocketAction -> Value
toJSON V1TCPSocketAction {Maybe Text
IntOrString
$sel:v1TCPSocketActionHost:V1TCPSocketAction :: V1TCPSocketAction -> Maybe Text
$sel:v1TCPSocketActionPort:V1TCPSocketAction :: V1TCPSocketAction -> IntOrString
v1TCPSocketActionHost :: Maybe Text
v1TCPSocketActionPort :: IntOrString
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"host" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1TCPSocketActionHost
      , Key
"port" Key -> IntOrString -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= IntOrString
v1TCPSocketActionPort
      ]


-- | Construct a value of type 'V1TCPSocketAction' (by applying it's required fields, if any)
mkV1TCPSocketAction
  :: IntOrString -- ^ 'v1TCPSocketActionPort' 
  -> V1TCPSocketAction
mkV1TCPSocketAction :: IntOrString -> V1TCPSocketAction
mkV1TCPSocketAction IntOrString
v1TCPSocketActionPort =
  V1TCPSocketAction
  { $sel:v1TCPSocketActionHost:V1TCPSocketAction :: Maybe Text
v1TCPSocketActionHost = Maybe Text
forall a. Maybe a
Nothing
  , IntOrString
$sel:v1TCPSocketActionPort:V1TCPSocketAction :: IntOrString
v1TCPSocketActionPort :: IntOrString
v1TCPSocketActionPort
  }

-- ** V1Taint
-- | V1Taint
-- The node this Taint is attached to has the \"effect\" on any pod that does not tolerate the Taint.
data V1Taint = V1Taint
  { V1Taint -> Text
v1TaintEffect :: !(Text) -- ^ /Required/ "effect" - Required. The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute.
  , V1Taint -> Text
v1TaintKey :: !(Text) -- ^ /Required/ "key" - Required. The taint key to be applied to a node.
  , V1Taint -> Maybe DateTime
v1TaintTimeAdded :: !(Maybe DateTime) -- ^ "timeAdded" - TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints.
  , V1Taint -> Maybe Text
v1TaintValue :: !(Maybe Text) -- ^ "value" - The taint value corresponding to the taint key.
  } deriving (Int -> V1Taint -> ShowS
[V1Taint] -> ShowS
V1Taint -> String
(Int -> V1Taint -> ShowS)
-> (V1Taint -> String) -> ([V1Taint] -> ShowS) -> Show V1Taint
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1Taint -> ShowS
showsPrec :: Int -> V1Taint -> ShowS
$cshow :: V1Taint -> String
show :: V1Taint -> String
$cshowList :: [V1Taint] -> ShowS
showList :: [V1Taint] -> ShowS
P.Show, V1Taint -> V1Taint -> Bool
(V1Taint -> V1Taint -> Bool)
-> (V1Taint -> V1Taint -> Bool) -> Eq V1Taint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1Taint -> V1Taint -> Bool
== :: V1Taint -> V1Taint -> Bool
$c/= :: V1Taint -> V1Taint -> Bool
/= :: V1Taint -> V1Taint -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1Taint
instance A.FromJSON V1Taint where
  parseJSON :: Value -> Parser V1Taint
parseJSON = String -> (Object -> Parser V1Taint) -> Value -> Parser V1Taint
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1Taint" ((Object -> Parser V1Taint) -> Value -> Parser V1Taint)
-> (Object -> Parser V1Taint) -> Value -> Parser V1Taint
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Text -> Maybe DateTime -> Maybe Text -> V1Taint
V1Taint
      (Text -> Text -> Maybe DateTime -> Maybe Text -> V1Taint)
-> Parser Text
-> Parser (Text -> Maybe DateTime -> Maybe Text -> V1Taint)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"effect")
      Parser (Text -> Maybe DateTime -> Maybe Text -> V1Taint)
-> Parser Text -> Parser (Maybe DateTime -> Maybe Text -> V1Taint)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"key")
      Parser (Maybe DateTime -> Maybe Text -> V1Taint)
-> Parser (Maybe DateTime) -> Parser (Maybe Text -> V1Taint)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"timeAdded")
      Parser (Maybe Text -> V1Taint)
-> Parser (Maybe Text) -> Parser V1Taint
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"value")

-- | ToJSON V1Taint
instance A.ToJSON V1Taint where
  toJSON :: V1Taint -> Value
toJSON V1Taint {Maybe Text
Maybe DateTime
Text
$sel:v1TaintEffect:V1Taint :: V1Taint -> Text
$sel:v1TaintKey:V1Taint :: V1Taint -> Text
$sel:v1TaintTimeAdded:V1Taint :: V1Taint -> Maybe DateTime
$sel:v1TaintValue:V1Taint :: V1Taint -> Maybe Text
v1TaintEffect :: Text
v1TaintKey :: Text
v1TaintTimeAdded :: Maybe DateTime
v1TaintValue :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"effect" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1TaintEffect
      , Key
"key" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1TaintKey
      , Key
"timeAdded" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1TaintTimeAdded
      , Key
"value" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1TaintValue
      ]


-- | Construct a value of type 'V1Taint' (by applying it's required fields, if any)
mkV1Taint
  :: Text -- ^ 'v1TaintEffect': Required. The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute.
  -> Text -- ^ 'v1TaintKey': Required. The taint key to be applied to a node.
  -> V1Taint
mkV1Taint :: Text -> Text -> V1Taint
mkV1Taint Text
v1TaintEffect Text
v1TaintKey =
  V1Taint
  { Text
$sel:v1TaintEffect:V1Taint :: Text
v1TaintEffect :: Text
v1TaintEffect
  , Text
$sel:v1TaintKey:V1Taint :: Text
v1TaintKey :: Text
v1TaintKey
  , $sel:v1TaintTimeAdded:V1Taint :: Maybe DateTime
v1TaintTimeAdded = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1TaintValue:V1Taint :: Maybe Text
v1TaintValue = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1TokenRequestSpec
-- | V1TokenRequestSpec
-- TokenRequestSpec contains client provided parameters of a token request.
data V1TokenRequestSpec = V1TokenRequestSpec
  { V1TokenRequestSpec -> [Text]
v1TokenRequestSpecAudiences :: !([Text]) -- ^ /Required/ "audiences" - Audiences are the intendend audiences of the token. A recipient of a token must identify themself with an identifier in the list of audiences of the token, and otherwise should reject the token. A token issued for multiple audiences may be used to authenticate against any of the audiences listed but implies a high degree of trust between the target audiences.
  , V1TokenRequestSpec -> Maybe V1BoundObjectReference
v1TokenRequestSpecBoundObjectRef :: !(Maybe V1BoundObjectReference) -- ^ "boundObjectRef"
  , V1TokenRequestSpec -> Maybe Integer
v1TokenRequestSpecExpirationSeconds :: !(Maybe Integer) -- ^ "expirationSeconds" - ExpirationSeconds is the requested duration of validity of the request. The token issuer may return a token with a different validity duration so a client needs to check the &#39;expiration&#39; field in a response.
  } deriving (Int -> V1TokenRequestSpec -> ShowS
[V1TokenRequestSpec] -> ShowS
V1TokenRequestSpec -> String
(Int -> V1TokenRequestSpec -> ShowS)
-> (V1TokenRequestSpec -> String)
-> ([V1TokenRequestSpec] -> ShowS)
-> Show V1TokenRequestSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1TokenRequestSpec -> ShowS
showsPrec :: Int -> V1TokenRequestSpec -> ShowS
$cshow :: V1TokenRequestSpec -> String
show :: V1TokenRequestSpec -> String
$cshowList :: [V1TokenRequestSpec] -> ShowS
showList :: [V1TokenRequestSpec] -> ShowS
P.Show, V1TokenRequestSpec -> V1TokenRequestSpec -> Bool
(V1TokenRequestSpec -> V1TokenRequestSpec -> Bool)
-> (V1TokenRequestSpec -> V1TokenRequestSpec -> Bool)
-> Eq V1TokenRequestSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1TokenRequestSpec -> V1TokenRequestSpec -> Bool
== :: V1TokenRequestSpec -> V1TokenRequestSpec -> Bool
$c/= :: V1TokenRequestSpec -> V1TokenRequestSpec -> Bool
/= :: V1TokenRequestSpec -> V1TokenRequestSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1TokenRequestSpec
instance A.FromJSON V1TokenRequestSpec where
  parseJSON :: Value -> Parser V1TokenRequestSpec
parseJSON = String
-> (Object -> Parser V1TokenRequestSpec)
-> Value
-> Parser V1TokenRequestSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1TokenRequestSpec" ((Object -> Parser V1TokenRequestSpec)
 -> Value -> Parser V1TokenRequestSpec)
-> (Object -> Parser V1TokenRequestSpec)
-> Value
-> Parser V1TokenRequestSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    [Text]
-> Maybe V1BoundObjectReference
-> Maybe Integer
-> V1TokenRequestSpec
V1TokenRequestSpec
      ([Text]
 -> Maybe V1BoundObjectReference
 -> Maybe Integer
 -> V1TokenRequestSpec)
-> Parser [Text]
-> Parser
     (Maybe V1BoundObjectReference
      -> Maybe Integer -> V1TokenRequestSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"audiences")
      Parser
  (Maybe V1BoundObjectReference
   -> Maybe Integer -> V1TokenRequestSpec)
-> Parser (Maybe V1BoundObjectReference)
-> Parser (Maybe Integer -> V1TokenRequestSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1BoundObjectReference)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"boundObjectRef")
      Parser (Maybe Integer -> V1TokenRequestSpec)
-> Parser (Maybe Integer) -> Parser V1TokenRequestSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"expirationSeconds")

-- | ToJSON V1TokenRequestSpec
instance A.ToJSON V1TokenRequestSpec where
  toJSON :: V1TokenRequestSpec -> Value
toJSON V1TokenRequestSpec {[Text]
Maybe Integer
Maybe V1BoundObjectReference
$sel:v1TokenRequestSpecAudiences:V1TokenRequestSpec :: V1TokenRequestSpec -> [Text]
$sel:v1TokenRequestSpecBoundObjectRef:V1TokenRequestSpec :: V1TokenRequestSpec -> Maybe V1BoundObjectReference
$sel:v1TokenRequestSpecExpirationSeconds:V1TokenRequestSpec :: V1TokenRequestSpec -> Maybe Integer
v1TokenRequestSpecAudiences :: [Text]
v1TokenRequestSpecBoundObjectRef :: Maybe V1BoundObjectReference
v1TokenRequestSpecExpirationSeconds :: Maybe Integer
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"audiences" Key -> [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [Text]
v1TokenRequestSpecAudiences
      , Key
"boundObjectRef" Key -> Maybe V1BoundObjectReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1BoundObjectReference
v1TokenRequestSpecBoundObjectRef
      , Key
"expirationSeconds" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1TokenRequestSpecExpirationSeconds
      ]


-- | Construct a value of type 'V1TokenRequestSpec' (by applying it's required fields, if any)
mkV1TokenRequestSpec
  :: [Text] -- ^ 'v1TokenRequestSpecAudiences': Audiences are the intendend audiences of the token. A recipient of a token must identify themself with an identifier in the list of audiences of the token, and otherwise should reject the token. A token issued for multiple audiences may be used to authenticate against any of the audiences listed but implies a high degree of trust between the target audiences.
  -> V1TokenRequestSpec
mkV1TokenRequestSpec :: [Text] -> V1TokenRequestSpec
mkV1TokenRequestSpec [Text]
v1TokenRequestSpecAudiences =
  V1TokenRequestSpec
  { [Text]
$sel:v1TokenRequestSpecAudiences:V1TokenRequestSpec :: [Text]
v1TokenRequestSpecAudiences :: [Text]
v1TokenRequestSpecAudiences
  , $sel:v1TokenRequestSpecBoundObjectRef:V1TokenRequestSpec :: Maybe V1BoundObjectReference
v1TokenRequestSpecBoundObjectRef = Maybe V1BoundObjectReference
forall a. Maybe a
Nothing
  , $sel:v1TokenRequestSpecExpirationSeconds:V1TokenRequestSpec :: Maybe Integer
v1TokenRequestSpecExpirationSeconds = Maybe Integer
forall a. Maybe a
Nothing
  }

-- ** V1TokenRequestStatus
-- | V1TokenRequestStatus
-- TokenRequestStatus is the result of a token request.
data V1TokenRequestStatus = V1TokenRequestStatus
  { V1TokenRequestStatus -> DateTime
v1TokenRequestStatusExpirationTimestamp :: !(DateTime) -- ^ /Required/ "expirationTimestamp" - ExpirationTimestamp is the time of expiration of the returned token.
  , V1TokenRequestStatus -> Text
v1TokenRequestStatusToken :: !(Text) -- ^ /Required/ "token" - Token is the opaque bearer token.
  } deriving (Int -> V1TokenRequestStatus -> ShowS
[V1TokenRequestStatus] -> ShowS
V1TokenRequestStatus -> String
(Int -> V1TokenRequestStatus -> ShowS)
-> (V1TokenRequestStatus -> String)
-> ([V1TokenRequestStatus] -> ShowS)
-> Show V1TokenRequestStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1TokenRequestStatus -> ShowS
showsPrec :: Int -> V1TokenRequestStatus -> ShowS
$cshow :: V1TokenRequestStatus -> String
show :: V1TokenRequestStatus -> String
$cshowList :: [V1TokenRequestStatus] -> ShowS
showList :: [V1TokenRequestStatus] -> ShowS
P.Show, V1TokenRequestStatus -> V1TokenRequestStatus -> Bool
(V1TokenRequestStatus -> V1TokenRequestStatus -> Bool)
-> (V1TokenRequestStatus -> V1TokenRequestStatus -> Bool)
-> Eq V1TokenRequestStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1TokenRequestStatus -> V1TokenRequestStatus -> Bool
== :: V1TokenRequestStatus -> V1TokenRequestStatus -> Bool
$c/= :: V1TokenRequestStatus -> V1TokenRequestStatus -> Bool
/= :: V1TokenRequestStatus -> V1TokenRequestStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1TokenRequestStatus
instance A.FromJSON V1TokenRequestStatus where
  parseJSON :: Value -> Parser V1TokenRequestStatus
parseJSON = String
-> (Object -> Parser V1TokenRequestStatus)
-> Value
-> Parser V1TokenRequestStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1TokenRequestStatus" ((Object -> Parser V1TokenRequestStatus)
 -> Value -> Parser V1TokenRequestStatus)
-> (Object -> Parser V1TokenRequestStatus)
-> Value
-> Parser V1TokenRequestStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    DateTime -> Text -> V1TokenRequestStatus
V1TokenRequestStatus
      (DateTime -> Text -> V1TokenRequestStatus)
-> Parser DateTime -> Parser (Text -> V1TokenRequestStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser DateTime
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"expirationTimestamp")
      Parser (Text -> V1TokenRequestStatus)
-> Parser Text -> Parser V1TokenRequestStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"token")

-- | ToJSON V1TokenRequestStatus
instance A.ToJSON V1TokenRequestStatus where
  toJSON :: V1TokenRequestStatus -> Value
toJSON V1TokenRequestStatus {Text
DateTime
$sel:v1TokenRequestStatusExpirationTimestamp:V1TokenRequestStatus :: V1TokenRequestStatus -> DateTime
$sel:v1TokenRequestStatusToken:V1TokenRequestStatus :: V1TokenRequestStatus -> Text
v1TokenRequestStatusExpirationTimestamp :: DateTime
v1TokenRequestStatusToken :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"expirationTimestamp" Key -> DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= DateTime
v1TokenRequestStatusExpirationTimestamp
      , Key
"token" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1TokenRequestStatusToken
      ]


-- | Construct a value of type 'V1TokenRequestStatus' (by applying it's required fields, if any)
mkV1TokenRequestStatus
  :: DateTime -- ^ 'v1TokenRequestStatusExpirationTimestamp': ExpirationTimestamp is the time of expiration of the returned token.
  -> Text -- ^ 'v1TokenRequestStatusToken': Token is the opaque bearer token.
  -> V1TokenRequestStatus
mkV1TokenRequestStatus :: DateTime -> Text -> V1TokenRequestStatus
mkV1TokenRequestStatus DateTime
v1TokenRequestStatusExpirationTimestamp Text
v1TokenRequestStatusToken =
  V1TokenRequestStatus
  { DateTime
$sel:v1TokenRequestStatusExpirationTimestamp:V1TokenRequestStatus :: DateTime
v1TokenRequestStatusExpirationTimestamp :: DateTime
v1TokenRequestStatusExpirationTimestamp
  , Text
$sel:v1TokenRequestStatusToken:V1TokenRequestStatus :: Text
v1TokenRequestStatusToken :: Text
v1TokenRequestStatusToken
  }

-- ** V1TokenReview
-- | V1TokenReview
-- TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver.
data V1TokenReview = V1TokenReview
  { V1TokenReview -> Maybe Text
v1TokenReviewApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1TokenReview -> Maybe Text
v1TokenReviewKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1TokenReview -> Maybe V1ObjectMeta
v1TokenReviewMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1TokenReview -> V1TokenReviewSpec
v1TokenReviewSpec :: !(V1TokenReviewSpec) -- ^ /Required/ "spec"
  , V1TokenReview -> Maybe V1TokenReviewStatus
v1TokenReviewStatus :: !(Maybe V1TokenReviewStatus) -- ^ "status"
  } deriving (Int -> V1TokenReview -> ShowS
[V1TokenReview] -> ShowS
V1TokenReview -> String
(Int -> V1TokenReview -> ShowS)
-> (V1TokenReview -> String)
-> ([V1TokenReview] -> ShowS)
-> Show V1TokenReview
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1TokenReview -> ShowS
showsPrec :: Int -> V1TokenReview -> ShowS
$cshow :: V1TokenReview -> String
show :: V1TokenReview -> String
$cshowList :: [V1TokenReview] -> ShowS
showList :: [V1TokenReview] -> ShowS
P.Show, V1TokenReview -> V1TokenReview -> Bool
(V1TokenReview -> V1TokenReview -> Bool)
-> (V1TokenReview -> V1TokenReview -> Bool) -> Eq V1TokenReview
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1TokenReview -> V1TokenReview -> Bool
== :: V1TokenReview -> V1TokenReview -> Bool
$c/= :: V1TokenReview -> V1TokenReview -> Bool
/= :: V1TokenReview -> V1TokenReview -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1TokenReview
instance A.FromJSON V1TokenReview where
  parseJSON :: Value -> Parser V1TokenReview
parseJSON = String
-> (Object -> Parser V1TokenReview)
-> Value
-> Parser V1TokenReview
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1TokenReview" ((Object -> Parser V1TokenReview) -> Value -> Parser V1TokenReview)
-> (Object -> Parser V1TokenReview)
-> Value
-> Parser V1TokenReview
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> V1TokenReviewSpec
-> Maybe V1TokenReviewStatus
-> V1TokenReview
V1TokenReview
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> V1TokenReviewSpec
 -> Maybe V1TokenReviewStatus
 -> V1TokenReview)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> V1TokenReviewSpec
      -> Maybe V1TokenReviewStatus
      -> V1TokenReview)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> V1TokenReviewSpec
   -> Maybe V1TokenReviewStatus
   -> V1TokenReview)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> V1TokenReviewSpec -> Maybe V1TokenReviewStatus -> V1TokenReview)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> V1TokenReviewSpec -> Maybe V1TokenReviewStatus -> V1TokenReview)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (V1TokenReviewSpec -> Maybe V1TokenReviewStatus -> V1TokenReview)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (V1TokenReviewSpec -> Maybe V1TokenReviewStatus -> V1TokenReview)
-> Parser V1TokenReviewSpec
-> Parser (Maybe V1TokenReviewStatus -> V1TokenReview)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1TokenReviewSpec
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"spec")
      Parser (Maybe V1TokenReviewStatus -> V1TokenReview)
-> Parser (Maybe V1TokenReviewStatus) -> Parser V1TokenReview
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1TokenReviewStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1TokenReview
instance A.ToJSON V1TokenReview where
  toJSON :: V1TokenReview -> Value
toJSON V1TokenReview {Maybe Text
Maybe V1TokenReviewStatus
Maybe V1ObjectMeta
V1TokenReviewSpec
$sel:v1TokenReviewApiVersion:V1TokenReview :: V1TokenReview -> Maybe Text
$sel:v1TokenReviewKind:V1TokenReview :: V1TokenReview -> Maybe Text
$sel:v1TokenReviewMetadata:V1TokenReview :: V1TokenReview -> Maybe V1ObjectMeta
$sel:v1TokenReviewSpec:V1TokenReview :: V1TokenReview -> V1TokenReviewSpec
$sel:v1TokenReviewStatus:V1TokenReview :: V1TokenReview -> Maybe V1TokenReviewStatus
v1TokenReviewApiVersion :: Maybe Text
v1TokenReviewKind :: Maybe Text
v1TokenReviewMetadata :: Maybe V1ObjectMeta
v1TokenReviewSpec :: V1TokenReviewSpec
v1TokenReviewStatus :: Maybe V1TokenReviewStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1TokenReviewApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1TokenReviewKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1TokenReviewMetadata
      , Key
"spec" Key -> V1TokenReviewSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1TokenReviewSpec
v1TokenReviewSpec
      , Key
"status" Key -> Maybe V1TokenReviewStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1TokenReviewStatus
v1TokenReviewStatus
      ]


-- | Construct a value of type 'V1TokenReview' (by applying it's required fields, if any)
mkV1TokenReview
  :: V1TokenReviewSpec -- ^ 'v1TokenReviewSpec' 
  -> V1TokenReview
mkV1TokenReview :: V1TokenReviewSpec -> V1TokenReview
mkV1TokenReview V1TokenReviewSpec
v1TokenReviewSpec =
  V1TokenReview
  { $sel:v1TokenReviewApiVersion:V1TokenReview :: Maybe Text
v1TokenReviewApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1TokenReviewKind:V1TokenReview :: Maybe Text
v1TokenReviewKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1TokenReviewMetadata:V1TokenReview :: Maybe V1ObjectMeta
v1TokenReviewMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , V1TokenReviewSpec
$sel:v1TokenReviewSpec:V1TokenReview :: V1TokenReviewSpec
v1TokenReviewSpec :: V1TokenReviewSpec
v1TokenReviewSpec
  , $sel:v1TokenReviewStatus:V1TokenReview :: Maybe V1TokenReviewStatus
v1TokenReviewStatus = Maybe V1TokenReviewStatus
forall a. Maybe a
Nothing
  }

-- ** V1TokenReviewSpec
-- | V1TokenReviewSpec
-- TokenReviewSpec is a description of the token authentication request.
data V1TokenReviewSpec = V1TokenReviewSpec
  { V1TokenReviewSpec -> Maybe [Text]
v1TokenReviewSpecAudiences :: !(Maybe [Text]) -- ^ "audiences" - Audiences is a list of the identifiers that the resource server presented with the token identifies as. Audience-aware token authenticators will verify that the token was intended for at least one of the audiences in this list. If no audiences are provided, the audience will default to the audience of the Kubernetes apiserver.
  , V1TokenReviewSpec -> Maybe Text
v1TokenReviewSpecToken :: !(Maybe Text) -- ^ "token" - Token is the opaque bearer token.
  } deriving (Int -> V1TokenReviewSpec -> ShowS
[V1TokenReviewSpec] -> ShowS
V1TokenReviewSpec -> String
(Int -> V1TokenReviewSpec -> ShowS)
-> (V1TokenReviewSpec -> String)
-> ([V1TokenReviewSpec] -> ShowS)
-> Show V1TokenReviewSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1TokenReviewSpec -> ShowS
showsPrec :: Int -> V1TokenReviewSpec -> ShowS
$cshow :: V1TokenReviewSpec -> String
show :: V1TokenReviewSpec -> String
$cshowList :: [V1TokenReviewSpec] -> ShowS
showList :: [V1TokenReviewSpec] -> ShowS
P.Show, V1TokenReviewSpec -> V1TokenReviewSpec -> Bool
(V1TokenReviewSpec -> V1TokenReviewSpec -> Bool)
-> (V1TokenReviewSpec -> V1TokenReviewSpec -> Bool)
-> Eq V1TokenReviewSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1TokenReviewSpec -> V1TokenReviewSpec -> Bool
== :: V1TokenReviewSpec -> V1TokenReviewSpec -> Bool
$c/= :: V1TokenReviewSpec -> V1TokenReviewSpec -> Bool
/= :: V1TokenReviewSpec -> V1TokenReviewSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1TokenReviewSpec
instance A.FromJSON V1TokenReviewSpec where
  parseJSON :: Value -> Parser V1TokenReviewSpec
parseJSON = String
-> (Object -> Parser V1TokenReviewSpec)
-> Value
-> Parser V1TokenReviewSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1TokenReviewSpec" ((Object -> Parser V1TokenReviewSpec)
 -> Value -> Parser V1TokenReviewSpec)
-> (Object -> Parser V1TokenReviewSpec)
-> Value
-> Parser V1TokenReviewSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [Text] -> Maybe Text -> V1TokenReviewSpec
V1TokenReviewSpec
      (Maybe [Text] -> Maybe Text -> V1TokenReviewSpec)
-> Parser (Maybe [Text])
-> Parser (Maybe Text -> V1TokenReviewSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"audiences")
      Parser (Maybe Text -> V1TokenReviewSpec)
-> Parser (Maybe Text) -> Parser V1TokenReviewSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"token")

-- | ToJSON V1TokenReviewSpec
instance A.ToJSON V1TokenReviewSpec where
  toJSON :: V1TokenReviewSpec -> Value
toJSON V1TokenReviewSpec {Maybe [Text]
Maybe Text
$sel:v1TokenReviewSpecAudiences:V1TokenReviewSpec :: V1TokenReviewSpec -> Maybe [Text]
$sel:v1TokenReviewSpecToken:V1TokenReviewSpec :: V1TokenReviewSpec -> Maybe Text
v1TokenReviewSpecAudiences :: Maybe [Text]
v1TokenReviewSpecToken :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"audiences" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1TokenReviewSpecAudiences
      , Key
"token" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1TokenReviewSpecToken
      ]


-- | Construct a value of type 'V1TokenReviewSpec' (by applying it's required fields, if any)
mkV1TokenReviewSpec
  :: V1TokenReviewSpec
mkV1TokenReviewSpec :: V1TokenReviewSpec
mkV1TokenReviewSpec =
  V1TokenReviewSpec
  { $sel:v1TokenReviewSpecAudiences:V1TokenReviewSpec :: Maybe [Text]
v1TokenReviewSpecAudiences = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1TokenReviewSpecToken:V1TokenReviewSpec :: Maybe Text
v1TokenReviewSpecToken = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1TokenReviewStatus
-- | V1TokenReviewStatus
-- TokenReviewStatus is the result of the token authentication request.
data V1TokenReviewStatus = V1TokenReviewStatus
  { V1TokenReviewStatus -> Maybe [Text]
v1TokenReviewStatusAudiences :: !(Maybe [Text]) -- ^ "audiences" - Audiences are audience identifiers chosen by the authenticator that are compatible with both the TokenReview and token. An identifier is any identifier in the intersection of the TokenReviewSpec audiences and the token&#39;s audiences. A client of the TokenReview API that sets the spec.audiences field should validate that a compatible audience identifier is returned in the status.audiences field to ensure that the TokenReview server is audience aware. If a TokenReview returns an empty status.audience field where status.authenticated is \&quot;true\&quot;, the token is valid against the audience of the Kubernetes API server.
  , V1TokenReviewStatus -> Maybe Bool
v1TokenReviewStatusAuthenticated :: !(Maybe Bool) -- ^ "authenticated" - Authenticated indicates that the token was associated with a known user.
  , V1TokenReviewStatus -> Maybe Text
v1TokenReviewStatusError :: !(Maybe Text) -- ^ "error" - Error indicates that the token couldn&#39;t be checked
  , V1TokenReviewStatus -> Maybe V1UserInfo
v1TokenReviewStatusUser :: !(Maybe V1UserInfo) -- ^ "user"
  } deriving (Int -> V1TokenReviewStatus -> ShowS
[V1TokenReviewStatus] -> ShowS
V1TokenReviewStatus -> String
(Int -> V1TokenReviewStatus -> ShowS)
-> (V1TokenReviewStatus -> String)
-> ([V1TokenReviewStatus] -> ShowS)
-> Show V1TokenReviewStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1TokenReviewStatus -> ShowS
showsPrec :: Int -> V1TokenReviewStatus -> ShowS
$cshow :: V1TokenReviewStatus -> String
show :: V1TokenReviewStatus -> String
$cshowList :: [V1TokenReviewStatus] -> ShowS
showList :: [V1TokenReviewStatus] -> ShowS
P.Show, V1TokenReviewStatus -> V1TokenReviewStatus -> Bool
(V1TokenReviewStatus -> V1TokenReviewStatus -> Bool)
-> (V1TokenReviewStatus -> V1TokenReviewStatus -> Bool)
-> Eq V1TokenReviewStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1TokenReviewStatus -> V1TokenReviewStatus -> Bool
== :: V1TokenReviewStatus -> V1TokenReviewStatus -> Bool
$c/= :: V1TokenReviewStatus -> V1TokenReviewStatus -> Bool
/= :: V1TokenReviewStatus -> V1TokenReviewStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1TokenReviewStatus
instance A.FromJSON V1TokenReviewStatus where
  parseJSON :: Value -> Parser V1TokenReviewStatus
parseJSON = String
-> (Object -> Parser V1TokenReviewStatus)
-> Value
-> Parser V1TokenReviewStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1TokenReviewStatus" ((Object -> Parser V1TokenReviewStatus)
 -> Value -> Parser V1TokenReviewStatus)
-> (Object -> Parser V1TokenReviewStatus)
-> Value
-> Parser V1TokenReviewStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe V1UserInfo
-> V1TokenReviewStatus
V1TokenReviewStatus
      (Maybe [Text]
 -> Maybe Bool
 -> Maybe Text
 -> Maybe V1UserInfo
 -> V1TokenReviewStatus)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Bool
      -> Maybe Text -> Maybe V1UserInfo -> V1TokenReviewStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"audiences")
      Parser
  (Maybe Bool
   -> Maybe Text -> Maybe V1UserInfo -> V1TokenReviewStatus)
-> Parser (Maybe Bool)
-> Parser (Maybe Text -> Maybe V1UserInfo -> V1TokenReviewStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"authenticated")
      Parser (Maybe Text -> Maybe V1UserInfo -> V1TokenReviewStatus)
-> Parser (Maybe Text)
-> Parser (Maybe V1UserInfo -> V1TokenReviewStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"error")
      Parser (Maybe V1UserInfo -> V1TokenReviewStatus)
-> Parser (Maybe V1UserInfo) -> Parser V1TokenReviewStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1UserInfo)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"user")

-- | ToJSON V1TokenReviewStatus
instance A.ToJSON V1TokenReviewStatus where
  toJSON :: V1TokenReviewStatus -> Value
toJSON V1TokenReviewStatus {Maybe Bool
Maybe [Text]
Maybe Text
Maybe V1UserInfo
$sel:v1TokenReviewStatusAudiences:V1TokenReviewStatus :: V1TokenReviewStatus -> Maybe [Text]
$sel:v1TokenReviewStatusAuthenticated:V1TokenReviewStatus :: V1TokenReviewStatus -> Maybe Bool
$sel:v1TokenReviewStatusError:V1TokenReviewStatus :: V1TokenReviewStatus -> Maybe Text
$sel:v1TokenReviewStatusUser:V1TokenReviewStatus :: V1TokenReviewStatus -> Maybe V1UserInfo
v1TokenReviewStatusAudiences :: Maybe [Text]
v1TokenReviewStatusAuthenticated :: Maybe Bool
v1TokenReviewStatusError :: Maybe Text
v1TokenReviewStatusUser :: Maybe V1UserInfo
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"audiences" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1TokenReviewStatusAudiences
      , Key
"authenticated" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1TokenReviewStatusAuthenticated
      , Key
"error" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1TokenReviewStatusError
      , Key
"user" Key -> Maybe V1UserInfo -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1UserInfo
v1TokenReviewStatusUser
      ]


-- | Construct a value of type 'V1TokenReviewStatus' (by applying it's required fields, if any)
mkV1TokenReviewStatus
  :: V1TokenReviewStatus
mkV1TokenReviewStatus :: V1TokenReviewStatus
mkV1TokenReviewStatus =
  V1TokenReviewStatus
  { $sel:v1TokenReviewStatusAudiences:V1TokenReviewStatus :: Maybe [Text]
v1TokenReviewStatusAudiences = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1TokenReviewStatusAuthenticated:V1TokenReviewStatus :: Maybe Bool
v1TokenReviewStatusAuthenticated = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1TokenReviewStatusError:V1TokenReviewStatus :: Maybe Text
v1TokenReviewStatusError = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1TokenReviewStatusUser:V1TokenReviewStatus :: Maybe V1UserInfo
v1TokenReviewStatusUser = Maybe V1UserInfo
forall a. Maybe a
Nothing
  }

-- ** V1Toleration
-- | V1Toleration
-- The pod this Toleration is attached to tolerates any taint that matches the triple <key,value,effect> using the matching operator <operator>.
data V1Toleration = V1Toleration
  { V1Toleration -> Maybe Text
v1TolerationEffect :: !(Maybe Text) -- ^ "effect" - Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
  , V1Toleration -> Maybe Text
v1TolerationKey :: !(Maybe Text) -- ^ "key" - Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.
  , V1Toleration -> Maybe Text
v1TolerationOperator :: !(Maybe Text) -- ^ "operator" - Operator represents a key&#39;s relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.
  , V1Toleration -> Maybe Integer
v1TolerationTolerationSeconds :: !(Maybe Integer) -- ^ "tolerationSeconds" - TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.
  , V1Toleration -> Maybe Text
v1TolerationValue :: !(Maybe Text) -- ^ "value" - Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.
  } deriving (Int -> V1Toleration -> ShowS
[V1Toleration] -> ShowS
V1Toleration -> String
(Int -> V1Toleration -> ShowS)
-> (V1Toleration -> String)
-> ([V1Toleration] -> ShowS)
-> Show V1Toleration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1Toleration -> ShowS
showsPrec :: Int -> V1Toleration -> ShowS
$cshow :: V1Toleration -> String
show :: V1Toleration -> String
$cshowList :: [V1Toleration] -> ShowS
showList :: [V1Toleration] -> ShowS
P.Show, V1Toleration -> V1Toleration -> Bool
(V1Toleration -> V1Toleration -> Bool)
-> (V1Toleration -> V1Toleration -> Bool) -> Eq V1Toleration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1Toleration -> V1Toleration -> Bool
== :: V1Toleration -> V1Toleration -> Bool
$c/= :: V1Toleration -> V1Toleration -> Bool
/= :: V1Toleration -> V1Toleration -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1Toleration
instance A.FromJSON V1Toleration where
  parseJSON :: Value -> Parser V1Toleration
parseJSON = String
-> (Object -> Parser V1Toleration) -> Value -> Parser V1Toleration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1Toleration" ((Object -> Parser V1Toleration) -> Value -> Parser V1Toleration)
-> (Object -> Parser V1Toleration) -> Value -> Parser V1Toleration
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> V1Toleration
V1Toleration
      (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Integer
 -> Maybe Text
 -> V1Toleration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Integer -> Maybe Text -> V1Toleration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"effect")
      Parser
  (Maybe Text
   -> Maybe Text -> Maybe Integer -> Maybe Text -> V1Toleration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Integer -> Maybe Text -> V1Toleration)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"key")
      Parser (Maybe Text -> Maybe Integer -> Maybe Text -> V1Toleration)
-> Parser (Maybe Text)
-> Parser (Maybe Integer -> Maybe Text -> V1Toleration)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"operator")
      Parser (Maybe Integer -> Maybe Text -> V1Toleration)
-> Parser (Maybe Integer) -> Parser (Maybe Text -> V1Toleration)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"tolerationSeconds")
      Parser (Maybe Text -> V1Toleration)
-> Parser (Maybe Text) -> Parser V1Toleration
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"value")

-- | ToJSON V1Toleration
instance A.ToJSON V1Toleration where
  toJSON :: V1Toleration -> Value
toJSON V1Toleration {Maybe Integer
Maybe Text
$sel:v1TolerationEffect:V1Toleration :: V1Toleration -> Maybe Text
$sel:v1TolerationKey:V1Toleration :: V1Toleration -> Maybe Text
$sel:v1TolerationOperator:V1Toleration :: V1Toleration -> Maybe Text
$sel:v1TolerationTolerationSeconds:V1Toleration :: V1Toleration -> Maybe Integer
$sel:v1TolerationValue:V1Toleration :: V1Toleration -> Maybe Text
v1TolerationEffect :: Maybe Text
v1TolerationKey :: Maybe Text
v1TolerationOperator :: Maybe Text
v1TolerationTolerationSeconds :: Maybe Integer
v1TolerationValue :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"effect" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1TolerationEffect
      , Key
"key" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1TolerationKey
      , Key
"operator" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1TolerationOperator
      , Key
"tolerationSeconds" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1TolerationTolerationSeconds
      , Key
"value" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1TolerationValue
      ]


-- | Construct a value of type 'V1Toleration' (by applying it's required fields, if any)
mkV1Toleration
  :: V1Toleration
mkV1Toleration :: V1Toleration
mkV1Toleration =
  V1Toleration
  { $sel:v1TolerationEffect:V1Toleration :: Maybe Text
v1TolerationEffect = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1TolerationKey:V1Toleration :: Maybe Text
v1TolerationKey = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1TolerationOperator:V1Toleration :: Maybe Text
v1TolerationOperator = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1TolerationTolerationSeconds:V1Toleration :: Maybe Integer
v1TolerationTolerationSeconds = Maybe Integer
forall a. Maybe a
Nothing
  , $sel:v1TolerationValue:V1Toleration :: Maybe Text
v1TolerationValue = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1TopologySelectorLabelRequirement
-- | V1TopologySelectorLabelRequirement
-- A topology selector requirement is a selector that matches given label. This is an alpha feature and may change in the future.
data V1TopologySelectorLabelRequirement = V1TopologySelectorLabelRequirement
  { V1TopologySelectorLabelRequirement -> Text
v1TopologySelectorLabelRequirementKey :: !(Text) -- ^ /Required/ "key" - The label key that the selector applies to.
  , V1TopologySelectorLabelRequirement -> [Text]
v1TopologySelectorLabelRequirementValues :: !([Text]) -- ^ /Required/ "values" - An array of string values. One value must match the label to be selected. Each entry in Values is ORed.
  } deriving (Int -> V1TopologySelectorLabelRequirement -> ShowS
[V1TopologySelectorLabelRequirement] -> ShowS
V1TopologySelectorLabelRequirement -> String
(Int -> V1TopologySelectorLabelRequirement -> ShowS)
-> (V1TopologySelectorLabelRequirement -> String)
-> ([V1TopologySelectorLabelRequirement] -> ShowS)
-> Show V1TopologySelectorLabelRequirement
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1TopologySelectorLabelRequirement -> ShowS
showsPrec :: Int -> V1TopologySelectorLabelRequirement -> ShowS
$cshow :: V1TopologySelectorLabelRequirement -> String
show :: V1TopologySelectorLabelRequirement -> String
$cshowList :: [V1TopologySelectorLabelRequirement] -> ShowS
showList :: [V1TopologySelectorLabelRequirement] -> ShowS
P.Show, V1TopologySelectorLabelRequirement
-> V1TopologySelectorLabelRequirement -> Bool
(V1TopologySelectorLabelRequirement
 -> V1TopologySelectorLabelRequirement -> Bool)
-> (V1TopologySelectorLabelRequirement
    -> V1TopologySelectorLabelRequirement -> Bool)
-> Eq V1TopologySelectorLabelRequirement
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1TopologySelectorLabelRequirement
-> V1TopologySelectorLabelRequirement -> Bool
== :: V1TopologySelectorLabelRequirement
-> V1TopologySelectorLabelRequirement -> Bool
$c/= :: V1TopologySelectorLabelRequirement
-> V1TopologySelectorLabelRequirement -> Bool
/= :: V1TopologySelectorLabelRequirement
-> V1TopologySelectorLabelRequirement -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1TopologySelectorLabelRequirement
instance A.FromJSON V1TopologySelectorLabelRequirement where
  parseJSON :: Value -> Parser V1TopologySelectorLabelRequirement
parseJSON = String
-> (Object -> Parser V1TopologySelectorLabelRequirement)
-> Value
-> Parser V1TopologySelectorLabelRequirement
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1TopologySelectorLabelRequirement" ((Object -> Parser V1TopologySelectorLabelRequirement)
 -> Value -> Parser V1TopologySelectorLabelRequirement)
-> (Object -> Parser V1TopologySelectorLabelRequirement)
-> Value
-> Parser V1TopologySelectorLabelRequirement
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> [Text] -> V1TopologySelectorLabelRequirement
V1TopologySelectorLabelRequirement
      (Text -> [Text] -> V1TopologySelectorLabelRequirement)
-> Parser Text
-> Parser ([Text] -> V1TopologySelectorLabelRequirement)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"key")
      Parser ([Text] -> V1TopologySelectorLabelRequirement)
-> Parser [Text] -> Parser V1TopologySelectorLabelRequirement
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"values")

-- | ToJSON V1TopologySelectorLabelRequirement
instance A.ToJSON V1TopologySelectorLabelRequirement where
  toJSON :: V1TopologySelectorLabelRequirement -> Value
toJSON V1TopologySelectorLabelRequirement {[Text]
Text
$sel:v1TopologySelectorLabelRequirementKey:V1TopologySelectorLabelRequirement :: V1TopologySelectorLabelRequirement -> Text
$sel:v1TopologySelectorLabelRequirementValues:V1TopologySelectorLabelRequirement :: V1TopologySelectorLabelRequirement -> [Text]
v1TopologySelectorLabelRequirementKey :: Text
v1TopologySelectorLabelRequirementValues :: [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"key" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1TopologySelectorLabelRequirementKey
      , Key
"values" Key -> [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [Text]
v1TopologySelectorLabelRequirementValues
      ]


-- | Construct a value of type 'V1TopologySelectorLabelRequirement' (by applying it's required fields, if any)
mkV1TopologySelectorLabelRequirement
  :: Text -- ^ 'v1TopologySelectorLabelRequirementKey': The label key that the selector applies to.
  -> [Text] -- ^ 'v1TopologySelectorLabelRequirementValues': An array of string values. One value must match the label to be selected. Each entry in Values is ORed.
  -> V1TopologySelectorLabelRequirement
mkV1TopologySelectorLabelRequirement :: Text -> [Text] -> V1TopologySelectorLabelRequirement
mkV1TopologySelectorLabelRequirement Text
v1TopologySelectorLabelRequirementKey [Text]
v1TopologySelectorLabelRequirementValues =
  V1TopologySelectorLabelRequirement
  { Text
$sel:v1TopologySelectorLabelRequirementKey:V1TopologySelectorLabelRequirement :: Text
v1TopologySelectorLabelRequirementKey :: Text
v1TopologySelectorLabelRequirementKey
  , [Text]
$sel:v1TopologySelectorLabelRequirementValues:V1TopologySelectorLabelRequirement :: [Text]
v1TopologySelectorLabelRequirementValues :: [Text]
v1TopologySelectorLabelRequirementValues
  }

-- ** V1TopologySelectorTerm
-- | V1TopologySelectorTerm
-- A topology selector term represents the result of label queries. A null or empty topology selector term matches no objects. The requirements of them are ANDed. It provides a subset of functionality as NodeSelectorTerm. This is an alpha feature and may change in the future.
data V1TopologySelectorTerm = V1TopologySelectorTerm
  { V1TopologySelectorTerm
-> Maybe [V1TopologySelectorLabelRequirement]
v1TopologySelectorTermMatchLabelExpressions :: !(Maybe [V1TopologySelectorLabelRequirement]) -- ^ "matchLabelExpressions" - A list of topology selector requirements by labels.
  } deriving (Int -> V1TopologySelectorTerm -> ShowS
[V1TopologySelectorTerm] -> ShowS
V1TopologySelectorTerm -> String
(Int -> V1TopologySelectorTerm -> ShowS)
-> (V1TopologySelectorTerm -> String)
-> ([V1TopologySelectorTerm] -> ShowS)
-> Show V1TopologySelectorTerm
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1TopologySelectorTerm -> ShowS
showsPrec :: Int -> V1TopologySelectorTerm -> ShowS
$cshow :: V1TopologySelectorTerm -> String
show :: V1TopologySelectorTerm -> String
$cshowList :: [V1TopologySelectorTerm] -> ShowS
showList :: [V1TopologySelectorTerm] -> ShowS
P.Show, V1TopologySelectorTerm -> V1TopologySelectorTerm -> Bool
(V1TopologySelectorTerm -> V1TopologySelectorTerm -> Bool)
-> (V1TopologySelectorTerm -> V1TopologySelectorTerm -> Bool)
-> Eq V1TopologySelectorTerm
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1TopologySelectorTerm -> V1TopologySelectorTerm -> Bool
== :: V1TopologySelectorTerm -> V1TopologySelectorTerm -> Bool
$c/= :: V1TopologySelectorTerm -> V1TopologySelectorTerm -> Bool
/= :: V1TopologySelectorTerm -> V1TopologySelectorTerm -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1TopologySelectorTerm
instance A.FromJSON V1TopologySelectorTerm where
  parseJSON :: Value -> Parser V1TopologySelectorTerm
parseJSON = String
-> (Object -> Parser V1TopologySelectorTerm)
-> Value
-> Parser V1TopologySelectorTerm
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1TopologySelectorTerm" ((Object -> Parser V1TopologySelectorTerm)
 -> Value -> Parser V1TopologySelectorTerm)
-> (Object -> Parser V1TopologySelectorTerm)
-> Value
-> Parser V1TopologySelectorTerm
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1TopologySelectorLabelRequirement]
-> V1TopologySelectorTerm
V1TopologySelectorTerm
      (Maybe [V1TopologySelectorLabelRequirement]
 -> V1TopologySelectorTerm)
-> Parser (Maybe [V1TopologySelectorLabelRequirement])
-> Parser V1TopologySelectorTerm
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object
-> Key -> Parser (Maybe [V1TopologySelectorLabelRequirement])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"matchLabelExpressions")

-- | ToJSON V1TopologySelectorTerm
instance A.ToJSON V1TopologySelectorTerm where
  toJSON :: V1TopologySelectorTerm -> Value
toJSON V1TopologySelectorTerm {Maybe [V1TopologySelectorLabelRequirement]
$sel:v1TopologySelectorTermMatchLabelExpressions:V1TopologySelectorTerm :: V1TopologySelectorTerm
-> Maybe [V1TopologySelectorLabelRequirement]
v1TopologySelectorTermMatchLabelExpressions :: Maybe [V1TopologySelectorLabelRequirement]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"matchLabelExpressions" Key -> Maybe [V1TopologySelectorLabelRequirement] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1TopologySelectorLabelRequirement]
v1TopologySelectorTermMatchLabelExpressions
      ]


-- | Construct a value of type 'V1TopologySelectorTerm' (by applying it's required fields, if any)
mkV1TopologySelectorTerm
  :: V1TopologySelectorTerm
mkV1TopologySelectorTerm :: V1TopologySelectorTerm
mkV1TopologySelectorTerm =
  V1TopologySelectorTerm
  { $sel:v1TopologySelectorTermMatchLabelExpressions:V1TopologySelectorTerm :: Maybe [V1TopologySelectorLabelRequirement]
v1TopologySelectorTermMatchLabelExpressions = Maybe [V1TopologySelectorLabelRequirement]
forall a. Maybe a
Nothing
  }

-- ** V1TopologySpreadConstraint
-- | V1TopologySpreadConstraint
-- TopologySpreadConstraint specifies how to spread matching pods among the given topology.
data V1TopologySpreadConstraint = V1TopologySpreadConstraint
  { V1TopologySpreadConstraint -> Maybe V1LabelSelector
v1TopologySpreadConstraintLabelSelector :: !(Maybe V1LabelSelector) -- ^ "labelSelector"
  , V1TopologySpreadConstraint -> Maybe [Text]
v1TopologySpreadConstraintMatchLabelKeys :: !(Maybe [Text]) -- ^ "matchLabelKeys" - MatchLabelKeys is a set of pod label keys to select the pods over which spreading will be calculated. The keys are used to lookup values from the incoming pod labels, those key-value labels are ANDed with labelSelector to select the group of existing pods over which spreading will be calculated for the incoming pod. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. MatchLabelKeys cannot be set when LabelSelector isn&#39;t set. Keys that don&#39;t exist in the incoming pod labels will be ignored. A null or empty list means only match against labelSelector.  This is a beta field and requires the MatchLabelKeysInPodTopologySpread feature gate to be enabled (enabled by default).
  , V1TopologySpreadConstraint -> Int
v1TopologySpreadConstraintMaxSkew :: !(Int) -- ^ /Required/ "maxSkew" - MaxSkew describes the degree to which pods may be unevenly distributed. When &#x60;whenUnsatisfiable&#x3D;DoNotSchedule&#x60;, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. The global minimum is the minimum number of matching pods in an eligible domain or zero if the number of eligible domains is less than MinDomains. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 2/2/1: In this case, the global minimum is 1. | zone1 | zone2 | zone3 | |  P P  |  P P  |   P   | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 2/2/2; scheduling it onto zone1(zone2) would make the ActualSkew(3-1) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When &#x60;whenUnsatisfiable&#x3D;ScheduleAnyway&#x60;, it is used to give higher precedence to topologies that satisfy it. It&#39;s a required field. Default value is 1 and 0 is not allowed.
  , V1TopologySpreadConstraint -> Maybe Int
v1TopologySpreadConstraintMinDomains :: !(Maybe Int) -- ^ "minDomains" - MinDomains indicates a minimum number of eligible domains. When the number of eligible domains with matching topology keys is less than minDomains, Pod Topology Spread treats \&quot;global minimum\&quot; as 0, and then the calculation of Skew is performed. And when the number of eligible domains with matching topology keys equals or greater than minDomains, this value has no effect on scheduling. As a result, when the number of eligible domains is less than minDomains, scheduler won&#39;t schedule more than maxSkew Pods to those domains. If value is nil, the constraint behaves as if MinDomains is equal to 1. Valid values are integers greater than 0. When value is not nil, WhenUnsatisfiable must be DoNotSchedule.  For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same labelSelector spread as 2/2/2: | zone1 | zone2 | zone3 | |  P P  |  P P  |  P P  | The number of domains is less than 5(MinDomains), so \&quot;global minimum\&quot; is treated as 0. In this situation, new pod with the same labelSelector cannot be scheduled, because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, it will violate MaxSkew.
  , V1TopologySpreadConstraint -> Maybe Text
v1TopologySpreadConstraintNodeAffinityPolicy :: !(Maybe Text) -- ^ "nodeAffinityPolicy" - NodeAffinityPolicy indicates how we will treat Pod&#39;s nodeAffinity/nodeSelector when calculating pod topology spread skew. Options are: - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations.  If this value is nil, the behavior is equivalent to the Honor policy. This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag.
  , V1TopologySpreadConstraint -> Maybe Text
v1TopologySpreadConstraintNodeTaintsPolicy :: !(Maybe Text) -- ^ "nodeTaintsPolicy" - NodeTaintsPolicy indicates how we will treat node taints when calculating pod topology spread skew. Options are: - Honor: nodes without taints, along with tainted nodes for which the incoming pod has a toleration, are included. - Ignore: node taints are ignored. All nodes are included.  If this value is nil, the behavior is equivalent to the Ignore policy. This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag.
  , V1TopologySpreadConstraint -> Text
v1TopologySpreadConstraintTopologyKey :: !(Text) -- ^ /Required/ "topologyKey" - TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each &lt;key, value&gt; as a \&quot;bucket\&quot;, and try to put balanced number of pods into each bucket. We define a domain as a particular instance of a topology. Also, we define an eligible domain as a domain whose nodes meet the requirements of nodeAffinityPolicy and nodeTaintsPolicy. e.g. If TopologyKey is \&quot;kubernetes.io/hostname\&quot;, each Node is a domain of that topology. And, if TopologyKey is \&quot;topology.kubernetes.io/zone\&quot;, each zone is a domain of that topology. It&#39;s a required field.
  , V1TopologySpreadConstraint -> Text
v1TopologySpreadConstraintWhenUnsatisfiable :: !(Text) -- ^ /Required/ "whenUnsatisfiable" - WhenUnsatisfiable indicates how to deal with a pod if it doesn&#39;t satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location,   but giving higher precedence to topologies that would help reduce the   skew. A constraint is considered \&quot;Unsatisfiable\&quot; for an incoming pod if and only if every possible node assignment for that pod would violate \&quot;MaxSkew\&quot; on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P |   P   |   P   | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won&#39;t make it *more* imbalanced. It&#39;s a required field.
  } deriving (Int -> V1TopologySpreadConstraint -> ShowS
[V1TopologySpreadConstraint] -> ShowS
V1TopologySpreadConstraint -> String
(Int -> V1TopologySpreadConstraint -> ShowS)
-> (V1TopologySpreadConstraint -> String)
-> ([V1TopologySpreadConstraint] -> ShowS)
-> Show V1TopologySpreadConstraint
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1TopologySpreadConstraint -> ShowS
showsPrec :: Int -> V1TopologySpreadConstraint -> ShowS
$cshow :: V1TopologySpreadConstraint -> String
show :: V1TopologySpreadConstraint -> String
$cshowList :: [V1TopologySpreadConstraint] -> ShowS
showList :: [V1TopologySpreadConstraint] -> ShowS
P.Show, V1TopologySpreadConstraint -> V1TopologySpreadConstraint -> Bool
(V1TopologySpreadConstraint -> V1TopologySpreadConstraint -> Bool)
-> (V1TopologySpreadConstraint
    -> V1TopologySpreadConstraint -> Bool)
-> Eq V1TopologySpreadConstraint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1TopologySpreadConstraint -> V1TopologySpreadConstraint -> Bool
== :: V1TopologySpreadConstraint -> V1TopologySpreadConstraint -> Bool
$c/= :: V1TopologySpreadConstraint -> V1TopologySpreadConstraint -> Bool
/= :: V1TopologySpreadConstraint -> V1TopologySpreadConstraint -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1TopologySpreadConstraint
instance A.FromJSON V1TopologySpreadConstraint where
  parseJSON :: Value -> Parser V1TopologySpreadConstraint
parseJSON = String
-> (Object -> Parser V1TopologySpreadConstraint)
-> Value
-> Parser V1TopologySpreadConstraint
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1TopologySpreadConstraint" ((Object -> Parser V1TopologySpreadConstraint)
 -> Value -> Parser V1TopologySpreadConstraint)
-> (Object -> Parser V1TopologySpreadConstraint)
-> Value
-> Parser V1TopologySpreadConstraint
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1LabelSelector
-> Maybe [Text]
-> Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> V1TopologySpreadConstraint
V1TopologySpreadConstraint
      (Maybe V1LabelSelector
 -> Maybe [Text]
 -> Int
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> Text
 -> V1TopologySpreadConstraint)
-> Parser (Maybe V1LabelSelector)
-> Parser
     (Maybe [Text]
      -> Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> V1TopologySpreadConstraint)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1LabelSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"labelSelector")
      Parser
  (Maybe [Text]
   -> Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> V1TopologySpreadConstraint)
-> Parser (Maybe [Text])
-> Parser
     (Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> V1TopologySpreadConstraint)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"matchLabelKeys")
      Parser
  (Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> V1TopologySpreadConstraint)
-> Parser Int
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> V1TopologySpreadConstraint)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"maxSkew")
      Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> V1TopologySpreadConstraint)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Text -> Text -> Text -> V1TopologySpreadConstraint)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"minDomains")
      Parser
  (Maybe Text
   -> Maybe Text -> Text -> Text -> V1TopologySpreadConstraint)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Text -> Text -> V1TopologySpreadConstraint)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nodeAffinityPolicy")
      Parser (Maybe Text -> Text -> Text -> V1TopologySpreadConstraint)
-> Parser (Maybe Text)
-> Parser (Text -> Text -> V1TopologySpreadConstraint)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nodeTaintsPolicy")
      Parser (Text -> Text -> V1TopologySpreadConstraint)
-> Parser Text -> Parser (Text -> V1TopologySpreadConstraint)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"topologyKey")
      Parser (Text -> V1TopologySpreadConstraint)
-> Parser Text -> Parser V1TopologySpreadConstraint
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"whenUnsatisfiable")

-- | ToJSON V1TopologySpreadConstraint
instance A.ToJSON V1TopologySpreadConstraint where
  toJSON :: V1TopologySpreadConstraint -> Value
toJSON V1TopologySpreadConstraint {Int
Maybe Int
Maybe [Text]
Maybe Text
Maybe V1LabelSelector
Text
$sel:v1TopologySpreadConstraintLabelSelector:V1TopologySpreadConstraint :: V1TopologySpreadConstraint -> Maybe V1LabelSelector
$sel:v1TopologySpreadConstraintMatchLabelKeys:V1TopologySpreadConstraint :: V1TopologySpreadConstraint -> Maybe [Text]
$sel:v1TopologySpreadConstraintMaxSkew:V1TopologySpreadConstraint :: V1TopologySpreadConstraint -> Int
$sel:v1TopologySpreadConstraintMinDomains:V1TopologySpreadConstraint :: V1TopologySpreadConstraint -> Maybe Int
$sel:v1TopologySpreadConstraintNodeAffinityPolicy:V1TopologySpreadConstraint :: V1TopologySpreadConstraint -> Maybe Text
$sel:v1TopologySpreadConstraintNodeTaintsPolicy:V1TopologySpreadConstraint :: V1TopologySpreadConstraint -> Maybe Text
$sel:v1TopologySpreadConstraintTopologyKey:V1TopologySpreadConstraint :: V1TopologySpreadConstraint -> Text
$sel:v1TopologySpreadConstraintWhenUnsatisfiable:V1TopologySpreadConstraint :: V1TopologySpreadConstraint -> Text
v1TopologySpreadConstraintLabelSelector :: Maybe V1LabelSelector
v1TopologySpreadConstraintMatchLabelKeys :: Maybe [Text]
v1TopologySpreadConstraintMaxSkew :: Int
v1TopologySpreadConstraintMinDomains :: Maybe Int
v1TopologySpreadConstraintNodeAffinityPolicy :: Maybe Text
v1TopologySpreadConstraintNodeTaintsPolicy :: Maybe Text
v1TopologySpreadConstraintTopologyKey :: Text
v1TopologySpreadConstraintWhenUnsatisfiable :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"labelSelector" Key -> Maybe V1LabelSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LabelSelector
v1TopologySpreadConstraintLabelSelector
      , Key
"matchLabelKeys" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1TopologySpreadConstraintMatchLabelKeys
      , Key
"maxSkew" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v1TopologySpreadConstraintMaxSkew
      , Key
"minDomains" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1TopologySpreadConstraintMinDomains
      , Key
"nodeAffinityPolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1TopologySpreadConstraintNodeAffinityPolicy
      , Key
"nodeTaintsPolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1TopologySpreadConstraintNodeTaintsPolicy
      , Key
"topologyKey" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1TopologySpreadConstraintTopologyKey
      , Key
"whenUnsatisfiable" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1TopologySpreadConstraintWhenUnsatisfiable
      ]


-- | Construct a value of type 'V1TopologySpreadConstraint' (by applying it's required fields, if any)
mkV1TopologySpreadConstraint
  :: Int -- ^ 'v1TopologySpreadConstraintMaxSkew': MaxSkew describes the degree to which pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. The global minimum is the minimum number of matching pods in an eligible domain or zero if the number of eligible domains is less than MinDomains. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 2/2/1: In this case, the global minimum is 1. | zone1 | zone2 | zone3 | |  P P  |  P P  |   P   | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 2/2/2; scheduling it onto zone1(zone2) would make the ActualSkew(3-1) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence to topologies that satisfy it. It's a required field. Default value is 1 and 0 is not allowed.
  -> Text -- ^ 'v1TopologySpreadConstraintTopologyKey': TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each <key, value> as a \"bucket\", and try to put balanced number of pods into each bucket. We define a domain as a particular instance of a topology. Also, we define an eligible domain as a domain whose nodes meet the requirements of nodeAffinityPolicy and nodeTaintsPolicy. e.g. If TopologyKey is \"kubernetes.io/hostname\", each Node is a domain of that topology. And, if TopologyKey is \"topology.kubernetes.io/zone\", each zone is a domain of that topology. It's a required field.
  -> Text -- ^ 'v1TopologySpreadConstraintWhenUnsatisfiable': WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location,   but giving higher precedence to topologies that would help reduce the   skew. A constraint is considered \"Unsatisfiable\" for an incoming pod if and only if every possible node assignment for that pod would violate \"MaxSkew\" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P |   P   |   P   | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won't make it *more* imbalanced. It's a required field.
  -> V1TopologySpreadConstraint
mkV1TopologySpreadConstraint :: Int -> Text -> Text -> V1TopologySpreadConstraint
mkV1TopologySpreadConstraint Int
v1TopologySpreadConstraintMaxSkew Text
v1TopologySpreadConstraintTopologyKey Text
v1TopologySpreadConstraintWhenUnsatisfiable =
  V1TopologySpreadConstraint
  { $sel:v1TopologySpreadConstraintLabelSelector:V1TopologySpreadConstraint :: Maybe V1LabelSelector
v1TopologySpreadConstraintLabelSelector = Maybe V1LabelSelector
forall a. Maybe a
Nothing
  , $sel:v1TopologySpreadConstraintMatchLabelKeys:V1TopologySpreadConstraint :: Maybe [Text]
v1TopologySpreadConstraintMatchLabelKeys = Maybe [Text]
forall a. Maybe a
Nothing
  , Int
$sel:v1TopologySpreadConstraintMaxSkew:V1TopologySpreadConstraint :: Int
v1TopologySpreadConstraintMaxSkew :: Int
v1TopologySpreadConstraintMaxSkew
  , $sel:v1TopologySpreadConstraintMinDomains:V1TopologySpreadConstraint :: Maybe Int
v1TopologySpreadConstraintMinDomains = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v1TopologySpreadConstraintNodeAffinityPolicy:V1TopologySpreadConstraint :: Maybe Text
v1TopologySpreadConstraintNodeAffinityPolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1TopologySpreadConstraintNodeTaintsPolicy:V1TopologySpreadConstraint :: Maybe Text
v1TopologySpreadConstraintNodeTaintsPolicy = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1TopologySpreadConstraintTopologyKey:V1TopologySpreadConstraint :: Text
v1TopologySpreadConstraintTopologyKey :: Text
v1TopologySpreadConstraintTopologyKey
  , Text
$sel:v1TopologySpreadConstraintWhenUnsatisfiable:V1TopologySpreadConstraint :: Text
v1TopologySpreadConstraintWhenUnsatisfiable :: Text
v1TopologySpreadConstraintWhenUnsatisfiable
  }

-- ** V1TypeChecking
-- | V1TypeChecking
-- TypeChecking contains results of type checking the expressions in the ValidatingAdmissionPolicy
data V1TypeChecking = V1TypeChecking
  { V1TypeChecking -> Maybe [V1ExpressionWarning]
v1TypeCheckingExpressionWarnings :: !(Maybe [V1ExpressionWarning]) -- ^ "expressionWarnings" - The type checking warnings for each expression.
  } deriving (Int -> V1TypeChecking -> ShowS
[V1TypeChecking] -> ShowS
V1TypeChecking -> String
(Int -> V1TypeChecking -> ShowS)
-> (V1TypeChecking -> String)
-> ([V1TypeChecking] -> ShowS)
-> Show V1TypeChecking
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1TypeChecking -> ShowS
showsPrec :: Int -> V1TypeChecking -> ShowS
$cshow :: V1TypeChecking -> String
show :: V1TypeChecking -> String
$cshowList :: [V1TypeChecking] -> ShowS
showList :: [V1TypeChecking] -> ShowS
P.Show, V1TypeChecking -> V1TypeChecking -> Bool
(V1TypeChecking -> V1TypeChecking -> Bool)
-> (V1TypeChecking -> V1TypeChecking -> Bool) -> Eq V1TypeChecking
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1TypeChecking -> V1TypeChecking -> Bool
== :: V1TypeChecking -> V1TypeChecking -> Bool
$c/= :: V1TypeChecking -> V1TypeChecking -> Bool
/= :: V1TypeChecking -> V1TypeChecking -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1TypeChecking
instance A.FromJSON V1TypeChecking where
  parseJSON :: Value -> Parser V1TypeChecking
parseJSON = String
-> (Object -> Parser V1TypeChecking)
-> Value
-> Parser V1TypeChecking
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1TypeChecking" ((Object -> Parser V1TypeChecking)
 -> Value -> Parser V1TypeChecking)
-> (Object -> Parser V1TypeChecking)
-> Value
-> Parser V1TypeChecking
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1ExpressionWarning] -> V1TypeChecking
V1TypeChecking
      (Maybe [V1ExpressionWarning] -> V1TypeChecking)
-> Parser (Maybe [V1ExpressionWarning]) -> Parser V1TypeChecking
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1ExpressionWarning])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"expressionWarnings")

-- | ToJSON V1TypeChecking
instance A.ToJSON V1TypeChecking where
  toJSON :: V1TypeChecking -> Value
toJSON V1TypeChecking {Maybe [V1ExpressionWarning]
$sel:v1TypeCheckingExpressionWarnings:V1TypeChecking :: V1TypeChecking -> Maybe [V1ExpressionWarning]
v1TypeCheckingExpressionWarnings :: Maybe [V1ExpressionWarning]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"expressionWarnings" Key -> Maybe [V1ExpressionWarning] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1ExpressionWarning]
v1TypeCheckingExpressionWarnings
      ]


-- | Construct a value of type 'V1TypeChecking' (by applying it's required fields, if any)
mkV1TypeChecking
  :: V1TypeChecking
mkV1TypeChecking :: V1TypeChecking
mkV1TypeChecking =
  V1TypeChecking
  { $sel:v1TypeCheckingExpressionWarnings:V1TypeChecking :: Maybe [V1ExpressionWarning]
v1TypeCheckingExpressionWarnings = Maybe [V1ExpressionWarning]
forall a. Maybe a
Nothing
  }

-- ** V1TypedLocalObjectReference
-- | V1TypedLocalObjectReference
-- TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace.
data V1TypedLocalObjectReference = V1TypedLocalObjectReference
  { V1TypedLocalObjectReference -> Maybe Text
v1TypedLocalObjectReferenceApiGroup :: !(Maybe Text) -- ^ "apiGroup" - APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.
  , V1TypedLocalObjectReference -> Text
v1TypedLocalObjectReferenceKind :: !(Text) -- ^ /Required/ "kind" - Kind is the type of resource being referenced
  , V1TypedLocalObjectReference -> Text
v1TypedLocalObjectReferenceName :: !(Text) -- ^ /Required/ "name" - Name is the name of resource being referenced
  } deriving (Int -> V1TypedLocalObjectReference -> ShowS
[V1TypedLocalObjectReference] -> ShowS
V1TypedLocalObjectReference -> String
(Int -> V1TypedLocalObjectReference -> ShowS)
-> (V1TypedLocalObjectReference -> String)
-> ([V1TypedLocalObjectReference] -> ShowS)
-> Show V1TypedLocalObjectReference
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1TypedLocalObjectReference -> ShowS
showsPrec :: Int -> V1TypedLocalObjectReference -> ShowS
$cshow :: V1TypedLocalObjectReference -> String
show :: V1TypedLocalObjectReference -> String
$cshowList :: [V1TypedLocalObjectReference] -> ShowS
showList :: [V1TypedLocalObjectReference] -> ShowS
P.Show, V1TypedLocalObjectReference -> V1TypedLocalObjectReference -> Bool
(V1TypedLocalObjectReference
 -> V1TypedLocalObjectReference -> Bool)
-> (V1TypedLocalObjectReference
    -> V1TypedLocalObjectReference -> Bool)
-> Eq V1TypedLocalObjectReference
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1TypedLocalObjectReference -> V1TypedLocalObjectReference -> Bool
== :: V1TypedLocalObjectReference -> V1TypedLocalObjectReference -> Bool
$c/= :: V1TypedLocalObjectReference -> V1TypedLocalObjectReference -> Bool
/= :: V1TypedLocalObjectReference -> V1TypedLocalObjectReference -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1TypedLocalObjectReference
instance A.FromJSON V1TypedLocalObjectReference where
  parseJSON :: Value -> Parser V1TypedLocalObjectReference
parseJSON = String
-> (Object -> Parser V1TypedLocalObjectReference)
-> Value
-> Parser V1TypedLocalObjectReference
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1TypedLocalObjectReference" ((Object -> Parser V1TypedLocalObjectReference)
 -> Value -> Parser V1TypedLocalObjectReference)
-> (Object -> Parser V1TypedLocalObjectReference)
-> Value
-> Parser V1TypedLocalObjectReference
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Text -> Text -> V1TypedLocalObjectReference
V1TypedLocalObjectReference
      (Maybe Text -> Text -> Text -> V1TypedLocalObjectReference)
-> Parser (Maybe Text)
-> Parser (Text -> Text -> V1TypedLocalObjectReference)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiGroup")
      Parser (Text -> Text -> V1TypedLocalObjectReference)
-> Parser Text -> Parser (Text -> V1TypedLocalObjectReference)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"kind")
      Parser (Text -> V1TypedLocalObjectReference)
-> Parser Text -> Parser V1TypedLocalObjectReference
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")

-- | ToJSON V1TypedLocalObjectReference
instance A.ToJSON V1TypedLocalObjectReference where
  toJSON :: V1TypedLocalObjectReference -> Value
toJSON V1TypedLocalObjectReference {Maybe Text
Text
$sel:v1TypedLocalObjectReferenceApiGroup:V1TypedLocalObjectReference :: V1TypedLocalObjectReference -> Maybe Text
$sel:v1TypedLocalObjectReferenceKind:V1TypedLocalObjectReference :: V1TypedLocalObjectReference -> Text
$sel:v1TypedLocalObjectReferenceName:V1TypedLocalObjectReference :: V1TypedLocalObjectReference -> Text
v1TypedLocalObjectReferenceApiGroup :: Maybe Text
v1TypedLocalObjectReferenceKind :: Text
v1TypedLocalObjectReferenceName :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiGroup" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1TypedLocalObjectReferenceApiGroup
      , Key
"kind" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1TypedLocalObjectReferenceKind
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1TypedLocalObjectReferenceName
      ]


-- | Construct a value of type 'V1TypedLocalObjectReference' (by applying it's required fields, if any)
mkV1TypedLocalObjectReference
  :: Text -- ^ 'v1TypedLocalObjectReferenceKind': Kind is the type of resource being referenced
  -> Text -- ^ 'v1TypedLocalObjectReferenceName': Name is the name of resource being referenced
  -> V1TypedLocalObjectReference
mkV1TypedLocalObjectReference :: Text -> Text -> V1TypedLocalObjectReference
mkV1TypedLocalObjectReference Text
v1TypedLocalObjectReferenceKind Text
v1TypedLocalObjectReferenceName =
  V1TypedLocalObjectReference
  { $sel:v1TypedLocalObjectReferenceApiGroup:V1TypedLocalObjectReference :: Maybe Text
v1TypedLocalObjectReferenceApiGroup = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1TypedLocalObjectReferenceKind:V1TypedLocalObjectReference :: Text
v1TypedLocalObjectReferenceKind :: Text
v1TypedLocalObjectReferenceKind
  , Text
$sel:v1TypedLocalObjectReferenceName:V1TypedLocalObjectReference :: Text
v1TypedLocalObjectReferenceName :: Text
v1TypedLocalObjectReferenceName
  }

-- ** V1TypedObjectReference
-- | V1TypedObjectReference
-- TypedObjectReference contains enough information to let you locate the typed referenced object
data V1TypedObjectReference = V1TypedObjectReference
  { V1TypedObjectReference -> Maybe Text
v1TypedObjectReferenceApiGroup :: !(Maybe Text) -- ^ "apiGroup" - APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.
  , V1TypedObjectReference -> Text
v1TypedObjectReferenceKind :: !(Text) -- ^ /Required/ "kind" - Kind is the type of resource being referenced
  , V1TypedObjectReference -> Text
v1TypedObjectReferenceName :: !(Text) -- ^ /Required/ "name" - Name is the name of resource being referenced
  , V1TypedObjectReference -> Maybe Text
v1TypedObjectReferenceNamespace :: !(Maybe Text) -- ^ "namespace" - Namespace is the namespace of resource being referenced Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace&#39;s owner to accept the reference. See the ReferenceGrant documentation for details. (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled.
  } deriving (Int -> V1TypedObjectReference -> ShowS
[V1TypedObjectReference] -> ShowS
V1TypedObjectReference -> String
(Int -> V1TypedObjectReference -> ShowS)
-> (V1TypedObjectReference -> String)
-> ([V1TypedObjectReference] -> ShowS)
-> Show V1TypedObjectReference
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1TypedObjectReference -> ShowS
showsPrec :: Int -> V1TypedObjectReference -> ShowS
$cshow :: V1TypedObjectReference -> String
show :: V1TypedObjectReference -> String
$cshowList :: [V1TypedObjectReference] -> ShowS
showList :: [V1TypedObjectReference] -> ShowS
P.Show, V1TypedObjectReference -> V1TypedObjectReference -> Bool
(V1TypedObjectReference -> V1TypedObjectReference -> Bool)
-> (V1TypedObjectReference -> V1TypedObjectReference -> Bool)
-> Eq V1TypedObjectReference
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1TypedObjectReference -> V1TypedObjectReference -> Bool
== :: V1TypedObjectReference -> V1TypedObjectReference -> Bool
$c/= :: V1TypedObjectReference -> V1TypedObjectReference -> Bool
/= :: V1TypedObjectReference -> V1TypedObjectReference -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1TypedObjectReference
instance A.FromJSON V1TypedObjectReference where
  parseJSON :: Value -> Parser V1TypedObjectReference
parseJSON = String
-> (Object -> Parser V1TypedObjectReference)
-> Value
-> Parser V1TypedObjectReference
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1TypedObjectReference" ((Object -> Parser V1TypedObjectReference)
 -> Value -> Parser V1TypedObjectReference)
-> (Object -> Parser V1TypedObjectReference)
-> Value
-> Parser V1TypedObjectReference
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Text -> Text -> Maybe Text -> V1TypedObjectReference
V1TypedObjectReference
      (Maybe Text
 -> Text -> Text -> Maybe Text -> V1TypedObjectReference)
-> Parser (Maybe Text)
-> Parser (Text -> Text -> Maybe Text -> V1TypedObjectReference)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiGroup")
      Parser (Text -> Text -> Maybe Text -> V1TypedObjectReference)
-> Parser Text
-> Parser (Text -> Maybe Text -> V1TypedObjectReference)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"kind")
      Parser (Text -> Maybe Text -> V1TypedObjectReference)
-> Parser Text -> Parser (Maybe Text -> V1TypedObjectReference)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser (Maybe Text -> V1TypedObjectReference)
-> Parser (Maybe Text) -> Parser V1TypedObjectReference
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"namespace")

-- | ToJSON V1TypedObjectReference
instance A.ToJSON V1TypedObjectReference where
  toJSON :: V1TypedObjectReference -> Value
toJSON V1TypedObjectReference {Maybe Text
Text
$sel:v1TypedObjectReferenceApiGroup:V1TypedObjectReference :: V1TypedObjectReference -> Maybe Text
$sel:v1TypedObjectReferenceKind:V1TypedObjectReference :: V1TypedObjectReference -> Text
$sel:v1TypedObjectReferenceName:V1TypedObjectReference :: V1TypedObjectReference -> Text
$sel:v1TypedObjectReferenceNamespace:V1TypedObjectReference :: V1TypedObjectReference -> Maybe Text
v1TypedObjectReferenceApiGroup :: Maybe Text
v1TypedObjectReferenceKind :: Text
v1TypedObjectReferenceName :: Text
v1TypedObjectReferenceNamespace :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiGroup" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1TypedObjectReferenceApiGroup
      , Key
"kind" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1TypedObjectReferenceKind
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1TypedObjectReferenceName
      , Key
"namespace" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1TypedObjectReferenceNamespace
      ]


-- | Construct a value of type 'V1TypedObjectReference' (by applying it's required fields, if any)
mkV1TypedObjectReference
  :: Text -- ^ 'v1TypedObjectReferenceKind': Kind is the type of resource being referenced
  -> Text -- ^ 'v1TypedObjectReferenceName': Name is the name of resource being referenced
  -> V1TypedObjectReference
mkV1TypedObjectReference :: Text -> Text -> V1TypedObjectReference
mkV1TypedObjectReference Text
v1TypedObjectReferenceKind Text
v1TypedObjectReferenceName =
  V1TypedObjectReference
  { $sel:v1TypedObjectReferenceApiGroup:V1TypedObjectReference :: Maybe Text
v1TypedObjectReferenceApiGroup = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1TypedObjectReferenceKind:V1TypedObjectReference :: Text
v1TypedObjectReferenceKind :: Text
v1TypedObjectReferenceKind
  , Text
$sel:v1TypedObjectReferenceName:V1TypedObjectReference :: Text
v1TypedObjectReferenceName :: Text
v1TypedObjectReferenceName
  , $sel:v1TypedObjectReferenceNamespace:V1TypedObjectReference :: Maybe Text
v1TypedObjectReferenceNamespace = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1UncountedTerminatedPods
-- | V1UncountedTerminatedPods
-- UncountedTerminatedPods holds UIDs of Pods that have terminated but haven't been accounted in Job status counters.
data V1UncountedTerminatedPods = V1UncountedTerminatedPods
  { V1UncountedTerminatedPods -> Maybe [Text]
v1UncountedTerminatedPodsFailed :: !(Maybe [Text]) -- ^ "failed" - failed holds UIDs of failed Pods.
  , V1UncountedTerminatedPods -> Maybe [Text]
v1UncountedTerminatedPodsSucceeded :: !(Maybe [Text]) -- ^ "succeeded" - succeeded holds UIDs of succeeded Pods.
  } deriving (Int -> V1UncountedTerminatedPods -> ShowS
[V1UncountedTerminatedPods] -> ShowS
V1UncountedTerminatedPods -> String
(Int -> V1UncountedTerminatedPods -> ShowS)
-> (V1UncountedTerminatedPods -> String)
-> ([V1UncountedTerminatedPods] -> ShowS)
-> Show V1UncountedTerminatedPods
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1UncountedTerminatedPods -> ShowS
showsPrec :: Int -> V1UncountedTerminatedPods -> ShowS
$cshow :: V1UncountedTerminatedPods -> String
show :: V1UncountedTerminatedPods -> String
$cshowList :: [V1UncountedTerminatedPods] -> ShowS
showList :: [V1UncountedTerminatedPods] -> ShowS
P.Show, V1UncountedTerminatedPods -> V1UncountedTerminatedPods -> Bool
(V1UncountedTerminatedPods -> V1UncountedTerminatedPods -> Bool)
-> (V1UncountedTerminatedPods -> V1UncountedTerminatedPods -> Bool)
-> Eq V1UncountedTerminatedPods
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1UncountedTerminatedPods -> V1UncountedTerminatedPods -> Bool
== :: V1UncountedTerminatedPods -> V1UncountedTerminatedPods -> Bool
$c/= :: V1UncountedTerminatedPods -> V1UncountedTerminatedPods -> Bool
/= :: V1UncountedTerminatedPods -> V1UncountedTerminatedPods -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1UncountedTerminatedPods
instance A.FromJSON V1UncountedTerminatedPods where
  parseJSON :: Value -> Parser V1UncountedTerminatedPods
parseJSON = String
-> (Object -> Parser V1UncountedTerminatedPods)
-> Value
-> Parser V1UncountedTerminatedPods
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1UncountedTerminatedPods" ((Object -> Parser V1UncountedTerminatedPods)
 -> Value -> Parser V1UncountedTerminatedPods)
-> (Object -> Parser V1UncountedTerminatedPods)
-> Value
-> Parser V1UncountedTerminatedPods
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [Text] -> Maybe [Text] -> V1UncountedTerminatedPods
V1UncountedTerminatedPods
      (Maybe [Text] -> Maybe [Text] -> V1UncountedTerminatedPods)
-> Parser (Maybe [Text])
-> Parser (Maybe [Text] -> V1UncountedTerminatedPods)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"failed")
      Parser (Maybe [Text] -> V1UncountedTerminatedPods)
-> Parser (Maybe [Text]) -> Parser V1UncountedTerminatedPods
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"succeeded")

-- | ToJSON V1UncountedTerminatedPods
instance A.ToJSON V1UncountedTerminatedPods where
  toJSON :: V1UncountedTerminatedPods -> Value
toJSON V1UncountedTerminatedPods {Maybe [Text]
$sel:v1UncountedTerminatedPodsFailed:V1UncountedTerminatedPods :: V1UncountedTerminatedPods -> Maybe [Text]
$sel:v1UncountedTerminatedPodsSucceeded:V1UncountedTerminatedPods :: V1UncountedTerminatedPods -> Maybe [Text]
v1UncountedTerminatedPodsFailed :: Maybe [Text]
v1UncountedTerminatedPodsSucceeded :: Maybe [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"failed" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1UncountedTerminatedPodsFailed
      , Key
"succeeded" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1UncountedTerminatedPodsSucceeded
      ]


-- | Construct a value of type 'V1UncountedTerminatedPods' (by applying it's required fields, if any)
mkV1UncountedTerminatedPods
  :: V1UncountedTerminatedPods
mkV1UncountedTerminatedPods :: V1UncountedTerminatedPods
mkV1UncountedTerminatedPods =
  V1UncountedTerminatedPods
  { $sel:v1UncountedTerminatedPodsFailed:V1UncountedTerminatedPods :: Maybe [Text]
v1UncountedTerminatedPodsFailed = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1UncountedTerminatedPodsSucceeded:V1UncountedTerminatedPods :: Maybe [Text]
v1UncountedTerminatedPodsSucceeded = Maybe [Text]
forall a. Maybe a
Nothing
  }

-- ** V1UserInfo
-- | V1UserInfo
-- UserInfo holds the information about the user needed to implement the user.Info interface.
data V1UserInfo = V1UserInfo
  { V1UserInfo -> Maybe (Map String [Text])
v1UserInfoExtra :: !(Maybe (Map.Map String [Text])) -- ^ "extra" - Any additional information provided by the authenticator.
  , V1UserInfo -> Maybe [Text]
v1UserInfoGroups :: !(Maybe [Text]) -- ^ "groups" - The names of groups this user is a part of.
  , V1UserInfo -> Maybe Text
v1UserInfoUid :: !(Maybe Text) -- ^ "uid" - A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs.
  , V1UserInfo -> Maybe Text
v1UserInfoUsername :: !(Maybe Text) -- ^ "username" - The name that uniquely identifies this user among all active users.
  } deriving (Int -> V1UserInfo -> ShowS
[V1UserInfo] -> ShowS
V1UserInfo -> String
(Int -> V1UserInfo -> ShowS)
-> (V1UserInfo -> String)
-> ([V1UserInfo] -> ShowS)
-> Show V1UserInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1UserInfo -> ShowS
showsPrec :: Int -> V1UserInfo -> ShowS
$cshow :: V1UserInfo -> String
show :: V1UserInfo -> String
$cshowList :: [V1UserInfo] -> ShowS
showList :: [V1UserInfo] -> ShowS
P.Show, V1UserInfo -> V1UserInfo -> Bool
(V1UserInfo -> V1UserInfo -> Bool)
-> (V1UserInfo -> V1UserInfo -> Bool) -> Eq V1UserInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1UserInfo -> V1UserInfo -> Bool
== :: V1UserInfo -> V1UserInfo -> Bool
$c/= :: V1UserInfo -> V1UserInfo -> Bool
/= :: V1UserInfo -> V1UserInfo -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1UserInfo
instance A.FromJSON V1UserInfo where
  parseJSON :: Value -> Parser V1UserInfo
parseJSON = String
-> (Object -> Parser V1UserInfo) -> Value -> Parser V1UserInfo
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1UserInfo" ((Object -> Parser V1UserInfo) -> Value -> Parser V1UserInfo)
-> (Object -> Parser V1UserInfo) -> Value -> Parser V1UserInfo
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe (Map String [Text])
-> Maybe [Text] -> Maybe Text -> Maybe Text -> V1UserInfo
V1UserInfo
      (Maybe (Map String [Text])
 -> Maybe [Text] -> Maybe Text -> Maybe Text -> V1UserInfo)
-> Parser (Maybe (Map String [Text]))
-> Parser (Maybe [Text] -> Maybe Text -> Maybe Text -> V1UserInfo)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe (Map String [Text]))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"extra")
      Parser (Maybe [Text] -> Maybe Text -> Maybe Text -> V1UserInfo)
-> Parser (Maybe [Text])
-> Parser (Maybe Text -> Maybe Text -> V1UserInfo)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"groups")
      Parser (Maybe Text -> Maybe Text -> V1UserInfo)
-> Parser (Maybe Text) -> Parser (Maybe Text -> V1UserInfo)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"uid")
      Parser (Maybe Text -> V1UserInfo)
-> Parser (Maybe Text) -> Parser V1UserInfo
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"username")

-- | ToJSON V1UserInfo
instance A.ToJSON V1UserInfo where
  toJSON :: V1UserInfo -> Value
toJSON V1UserInfo {Maybe [Text]
Maybe (Map String [Text])
Maybe Text
$sel:v1UserInfoExtra:V1UserInfo :: V1UserInfo -> Maybe (Map String [Text])
$sel:v1UserInfoGroups:V1UserInfo :: V1UserInfo -> Maybe [Text]
$sel:v1UserInfoUid:V1UserInfo :: V1UserInfo -> Maybe Text
$sel:v1UserInfoUsername:V1UserInfo :: V1UserInfo -> Maybe Text
v1UserInfoExtra :: Maybe (Map String [Text])
v1UserInfoGroups :: Maybe [Text]
v1UserInfoUid :: Maybe Text
v1UserInfoUsername :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"extra" Key -> Maybe (Map String [Text]) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String [Text])
v1UserInfoExtra
      , Key
"groups" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1UserInfoGroups
      , Key
"uid" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1UserInfoUid
      , Key
"username" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1UserInfoUsername
      ]


-- | Construct a value of type 'V1UserInfo' (by applying it's required fields, if any)
mkV1UserInfo
  :: V1UserInfo
mkV1UserInfo :: V1UserInfo
mkV1UserInfo =
  V1UserInfo
  { $sel:v1UserInfoExtra:V1UserInfo :: Maybe (Map String [Text])
v1UserInfoExtra = Maybe (Map String [Text])
forall a. Maybe a
Nothing
  , $sel:v1UserInfoGroups:V1UserInfo :: Maybe [Text]
v1UserInfoGroups = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1UserInfoUid:V1UserInfo :: Maybe Text
v1UserInfoUid = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1UserInfoUsername:V1UserInfo :: Maybe Text
v1UserInfoUsername = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1UserSubject
-- | V1UserSubject
-- UserSubject holds detailed information for user-kind subject.
data V1UserSubject = V1UserSubject
  { V1UserSubject -> Text
v1UserSubjectName :: !(Text) -- ^ /Required/ "name" - &#x60;name&#x60; is the username that matches, or \&quot;*\&quot; to match all usernames. Required.
  } deriving (Int -> V1UserSubject -> ShowS
[V1UserSubject] -> ShowS
V1UserSubject -> String
(Int -> V1UserSubject -> ShowS)
-> (V1UserSubject -> String)
-> ([V1UserSubject] -> ShowS)
-> Show V1UserSubject
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1UserSubject -> ShowS
showsPrec :: Int -> V1UserSubject -> ShowS
$cshow :: V1UserSubject -> String
show :: V1UserSubject -> String
$cshowList :: [V1UserSubject] -> ShowS
showList :: [V1UserSubject] -> ShowS
P.Show, V1UserSubject -> V1UserSubject -> Bool
(V1UserSubject -> V1UserSubject -> Bool)
-> (V1UserSubject -> V1UserSubject -> Bool) -> Eq V1UserSubject
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1UserSubject -> V1UserSubject -> Bool
== :: V1UserSubject -> V1UserSubject -> Bool
$c/= :: V1UserSubject -> V1UserSubject -> Bool
/= :: V1UserSubject -> V1UserSubject -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1UserSubject
instance A.FromJSON V1UserSubject where
  parseJSON :: Value -> Parser V1UserSubject
parseJSON = String
-> (Object -> Parser V1UserSubject)
-> Value
-> Parser V1UserSubject
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1UserSubject" ((Object -> Parser V1UserSubject) -> Value -> Parser V1UserSubject)
-> (Object -> Parser V1UserSubject)
-> Value
-> Parser V1UserSubject
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> V1UserSubject
V1UserSubject
      (Text -> V1UserSubject) -> Parser Text -> Parser V1UserSubject
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")

-- | ToJSON V1UserSubject
instance A.ToJSON V1UserSubject where
  toJSON :: V1UserSubject -> Value
toJSON V1UserSubject {Text
$sel:v1UserSubjectName:V1UserSubject :: V1UserSubject -> Text
v1UserSubjectName :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1UserSubjectName
      ]


-- | Construct a value of type 'V1UserSubject' (by applying it's required fields, if any)
mkV1UserSubject
  :: Text -- ^ 'v1UserSubjectName': `name` is the username that matches, or \"*\" to match all usernames. Required.
  -> V1UserSubject
mkV1UserSubject :: Text -> V1UserSubject
mkV1UserSubject Text
v1UserSubjectName =
  V1UserSubject
  { Text
$sel:v1UserSubjectName:V1UserSubject :: Text
v1UserSubjectName :: Text
v1UserSubjectName
  }

-- ** V1ValidatingAdmissionPolicy
-- | V1ValidatingAdmissionPolicy
-- ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it.
data V1ValidatingAdmissionPolicy = V1ValidatingAdmissionPolicy
  { V1ValidatingAdmissionPolicy -> Maybe Text
v1ValidatingAdmissionPolicyApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1ValidatingAdmissionPolicy -> Maybe Text
v1ValidatingAdmissionPolicyKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1ValidatingAdmissionPolicy -> Maybe V1ObjectMeta
v1ValidatingAdmissionPolicyMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1ValidatingAdmissionPolicy
-> Maybe V1ValidatingAdmissionPolicySpec
v1ValidatingAdmissionPolicySpec :: !(Maybe V1ValidatingAdmissionPolicySpec) -- ^ "spec"
  , V1ValidatingAdmissionPolicy
-> Maybe V1ValidatingAdmissionPolicyStatus
v1ValidatingAdmissionPolicyStatus :: !(Maybe V1ValidatingAdmissionPolicyStatus) -- ^ "status"
  } deriving (Int -> V1ValidatingAdmissionPolicy -> ShowS
[V1ValidatingAdmissionPolicy] -> ShowS
V1ValidatingAdmissionPolicy -> String
(Int -> V1ValidatingAdmissionPolicy -> ShowS)
-> (V1ValidatingAdmissionPolicy -> String)
-> ([V1ValidatingAdmissionPolicy] -> ShowS)
-> Show V1ValidatingAdmissionPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ValidatingAdmissionPolicy -> ShowS
showsPrec :: Int -> V1ValidatingAdmissionPolicy -> ShowS
$cshow :: V1ValidatingAdmissionPolicy -> String
show :: V1ValidatingAdmissionPolicy -> String
$cshowList :: [V1ValidatingAdmissionPolicy] -> ShowS
showList :: [V1ValidatingAdmissionPolicy] -> ShowS
P.Show, V1ValidatingAdmissionPolicy -> V1ValidatingAdmissionPolicy -> Bool
(V1ValidatingAdmissionPolicy
 -> V1ValidatingAdmissionPolicy -> Bool)
-> (V1ValidatingAdmissionPolicy
    -> V1ValidatingAdmissionPolicy -> Bool)
-> Eq V1ValidatingAdmissionPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ValidatingAdmissionPolicy -> V1ValidatingAdmissionPolicy -> Bool
== :: V1ValidatingAdmissionPolicy -> V1ValidatingAdmissionPolicy -> Bool
$c/= :: V1ValidatingAdmissionPolicy -> V1ValidatingAdmissionPolicy -> Bool
/= :: V1ValidatingAdmissionPolicy -> V1ValidatingAdmissionPolicy -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ValidatingAdmissionPolicy
instance A.FromJSON V1ValidatingAdmissionPolicy where
  parseJSON :: Value -> Parser V1ValidatingAdmissionPolicy
parseJSON = String
-> (Object -> Parser V1ValidatingAdmissionPolicy)
-> Value
-> Parser V1ValidatingAdmissionPolicy
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ValidatingAdmissionPolicy" ((Object -> Parser V1ValidatingAdmissionPolicy)
 -> Value -> Parser V1ValidatingAdmissionPolicy)
-> (Object -> Parser V1ValidatingAdmissionPolicy)
-> Value
-> Parser V1ValidatingAdmissionPolicy
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1ValidatingAdmissionPolicySpec
-> Maybe V1ValidatingAdmissionPolicyStatus
-> V1ValidatingAdmissionPolicy
V1ValidatingAdmissionPolicy
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1ValidatingAdmissionPolicySpec
 -> Maybe V1ValidatingAdmissionPolicyStatus
 -> V1ValidatingAdmissionPolicy)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1ValidatingAdmissionPolicySpec
      -> Maybe V1ValidatingAdmissionPolicyStatus
      -> V1ValidatingAdmissionPolicy)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1ValidatingAdmissionPolicySpec
   -> Maybe V1ValidatingAdmissionPolicyStatus
   -> V1ValidatingAdmissionPolicy)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1ValidatingAdmissionPolicySpec
      -> Maybe V1ValidatingAdmissionPolicyStatus
      -> V1ValidatingAdmissionPolicy)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1ValidatingAdmissionPolicySpec
   -> Maybe V1ValidatingAdmissionPolicyStatus
   -> V1ValidatingAdmissionPolicy)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe V1ValidatingAdmissionPolicySpec
      -> Maybe V1ValidatingAdmissionPolicyStatus
      -> V1ValidatingAdmissionPolicy)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (Maybe V1ValidatingAdmissionPolicySpec
   -> Maybe V1ValidatingAdmissionPolicyStatus
   -> V1ValidatingAdmissionPolicy)
-> Parser (Maybe V1ValidatingAdmissionPolicySpec)
-> Parser
     (Maybe V1ValidatingAdmissionPolicyStatus
      -> V1ValidatingAdmissionPolicy)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ValidatingAdmissionPolicySpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")
      Parser
  (Maybe V1ValidatingAdmissionPolicyStatus
   -> V1ValidatingAdmissionPolicy)
-> Parser (Maybe V1ValidatingAdmissionPolicyStatus)
-> Parser V1ValidatingAdmissionPolicy
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ValidatingAdmissionPolicyStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1ValidatingAdmissionPolicy
instance A.ToJSON V1ValidatingAdmissionPolicy where
  toJSON :: V1ValidatingAdmissionPolicy -> Value
toJSON V1ValidatingAdmissionPolicy {Maybe Text
Maybe V1ValidatingAdmissionPolicyStatus
Maybe V1ValidatingAdmissionPolicySpec
Maybe V1ObjectMeta
$sel:v1ValidatingAdmissionPolicyApiVersion:V1ValidatingAdmissionPolicy :: V1ValidatingAdmissionPolicy -> Maybe Text
$sel:v1ValidatingAdmissionPolicyKind:V1ValidatingAdmissionPolicy :: V1ValidatingAdmissionPolicy -> Maybe Text
$sel:v1ValidatingAdmissionPolicyMetadata:V1ValidatingAdmissionPolicy :: V1ValidatingAdmissionPolicy -> Maybe V1ObjectMeta
$sel:v1ValidatingAdmissionPolicySpec:V1ValidatingAdmissionPolicy :: V1ValidatingAdmissionPolicy
-> Maybe V1ValidatingAdmissionPolicySpec
$sel:v1ValidatingAdmissionPolicyStatus:V1ValidatingAdmissionPolicy :: V1ValidatingAdmissionPolicy
-> Maybe V1ValidatingAdmissionPolicyStatus
v1ValidatingAdmissionPolicyApiVersion :: Maybe Text
v1ValidatingAdmissionPolicyKind :: Maybe Text
v1ValidatingAdmissionPolicyMetadata :: Maybe V1ObjectMeta
v1ValidatingAdmissionPolicySpec :: Maybe V1ValidatingAdmissionPolicySpec
v1ValidatingAdmissionPolicyStatus :: Maybe V1ValidatingAdmissionPolicyStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ValidatingAdmissionPolicyApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ValidatingAdmissionPolicyKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1ValidatingAdmissionPolicyMetadata
      , Key
"spec" Key -> Maybe V1ValidatingAdmissionPolicySpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ValidatingAdmissionPolicySpec
v1ValidatingAdmissionPolicySpec
      , Key
"status" Key -> Maybe V1ValidatingAdmissionPolicyStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ValidatingAdmissionPolicyStatus
v1ValidatingAdmissionPolicyStatus
      ]


-- | Construct a value of type 'V1ValidatingAdmissionPolicy' (by applying it's required fields, if any)
mkV1ValidatingAdmissionPolicy
  :: V1ValidatingAdmissionPolicy
mkV1ValidatingAdmissionPolicy :: V1ValidatingAdmissionPolicy
mkV1ValidatingAdmissionPolicy =
  V1ValidatingAdmissionPolicy
  { $sel:v1ValidatingAdmissionPolicyApiVersion:V1ValidatingAdmissionPolicy :: Maybe Text
v1ValidatingAdmissionPolicyApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ValidatingAdmissionPolicyKind:V1ValidatingAdmissionPolicy :: Maybe Text
v1ValidatingAdmissionPolicyKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ValidatingAdmissionPolicyMetadata:V1ValidatingAdmissionPolicy :: Maybe V1ObjectMeta
v1ValidatingAdmissionPolicyMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1ValidatingAdmissionPolicySpec:V1ValidatingAdmissionPolicy :: Maybe V1ValidatingAdmissionPolicySpec
v1ValidatingAdmissionPolicySpec = Maybe V1ValidatingAdmissionPolicySpec
forall a. Maybe a
Nothing
  , $sel:v1ValidatingAdmissionPolicyStatus:V1ValidatingAdmissionPolicy :: Maybe V1ValidatingAdmissionPolicyStatus
v1ValidatingAdmissionPolicyStatus = Maybe V1ValidatingAdmissionPolicyStatus
forall a. Maybe a
Nothing
  }

-- ** V1ValidatingAdmissionPolicyBinding
-- | V1ValidatingAdmissionPolicyBinding
-- ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters.  For a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don't use params, otherwise N is the number of parameters selected by the binding.  The CEL expressions of a policy must have a computed CEL cost below the maximum CEL budget. Each evaluation of the policy is given an independent CEL cost budget. Adding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget.
data V1ValidatingAdmissionPolicyBinding = V1ValidatingAdmissionPolicyBinding
  { V1ValidatingAdmissionPolicyBinding -> Maybe Text
v1ValidatingAdmissionPolicyBindingApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1ValidatingAdmissionPolicyBinding -> Maybe Text
v1ValidatingAdmissionPolicyBindingKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1ValidatingAdmissionPolicyBinding -> Maybe V1ObjectMeta
v1ValidatingAdmissionPolicyBindingMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1ValidatingAdmissionPolicyBinding
-> Maybe V1ValidatingAdmissionPolicyBindingSpec
v1ValidatingAdmissionPolicyBindingSpec :: !(Maybe V1ValidatingAdmissionPolicyBindingSpec) -- ^ "spec"
  } deriving (Int -> V1ValidatingAdmissionPolicyBinding -> ShowS
[V1ValidatingAdmissionPolicyBinding] -> ShowS
V1ValidatingAdmissionPolicyBinding -> String
(Int -> V1ValidatingAdmissionPolicyBinding -> ShowS)
-> (V1ValidatingAdmissionPolicyBinding -> String)
-> ([V1ValidatingAdmissionPolicyBinding] -> ShowS)
-> Show V1ValidatingAdmissionPolicyBinding
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ValidatingAdmissionPolicyBinding -> ShowS
showsPrec :: Int -> V1ValidatingAdmissionPolicyBinding -> ShowS
$cshow :: V1ValidatingAdmissionPolicyBinding -> String
show :: V1ValidatingAdmissionPolicyBinding -> String
$cshowList :: [V1ValidatingAdmissionPolicyBinding] -> ShowS
showList :: [V1ValidatingAdmissionPolicyBinding] -> ShowS
P.Show, V1ValidatingAdmissionPolicyBinding
-> V1ValidatingAdmissionPolicyBinding -> Bool
(V1ValidatingAdmissionPolicyBinding
 -> V1ValidatingAdmissionPolicyBinding -> Bool)
-> (V1ValidatingAdmissionPolicyBinding
    -> V1ValidatingAdmissionPolicyBinding -> Bool)
-> Eq V1ValidatingAdmissionPolicyBinding
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ValidatingAdmissionPolicyBinding
-> V1ValidatingAdmissionPolicyBinding -> Bool
== :: V1ValidatingAdmissionPolicyBinding
-> V1ValidatingAdmissionPolicyBinding -> Bool
$c/= :: V1ValidatingAdmissionPolicyBinding
-> V1ValidatingAdmissionPolicyBinding -> Bool
/= :: V1ValidatingAdmissionPolicyBinding
-> V1ValidatingAdmissionPolicyBinding -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ValidatingAdmissionPolicyBinding
instance A.FromJSON V1ValidatingAdmissionPolicyBinding where
  parseJSON :: Value -> Parser V1ValidatingAdmissionPolicyBinding
parseJSON = String
-> (Object -> Parser V1ValidatingAdmissionPolicyBinding)
-> Value
-> Parser V1ValidatingAdmissionPolicyBinding
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ValidatingAdmissionPolicyBinding" ((Object -> Parser V1ValidatingAdmissionPolicyBinding)
 -> Value -> Parser V1ValidatingAdmissionPolicyBinding)
-> (Object -> Parser V1ValidatingAdmissionPolicyBinding)
-> Value
-> Parser V1ValidatingAdmissionPolicyBinding
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1ValidatingAdmissionPolicyBindingSpec
-> V1ValidatingAdmissionPolicyBinding
V1ValidatingAdmissionPolicyBinding
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1ValidatingAdmissionPolicyBindingSpec
 -> V1ValidatingAdmissionPolicyBinding)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1ValidatingAdmissionPolicyBindingSpec
      -> V1ValidatingAdmissionPolicyBinding)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1ValidatingAdmissionPolicyBindingSpec
   -> V1ValidatingAdmissionPolicyBinding)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1ValidatingAdmissionPolicyBindingSpec
      -> V1ValidatingAdmissionPolicyBinding)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1ValidatingAdmissionPolicyBindingSpec
   -> V1ValidatingAdmissionPolicyBinding)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe V1ValidatingAdmissionPolicyBindingSpec
      -> V1ValidatingAdmissionPolicyBinding)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (Maybe V1ValidatingAdmissionPolicyBindingSpec
   -> V1ValidatingAdmissionPolicyBinding)
-> Parser (Maybe V1ValidatingAdmissionPolicyBindingSpec)
-> Parser V1ValidatingAdmissionPolicyBinding
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object
-> Key -> Parser (Maybe V1ValidatingAdmissionPolicyBindingSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")

-- | ToJSON V1ValidatingAdmissionPolicyBinding
instance A.ToJSON V1ValidatingAdmissionPolicyBinding where
  toJSON :: V1ValidatingAdmissionPolicyBinding -> Value
toJSON V1ValidatingAdmissionPolicyBinding {Maybe Text
Maybe V1ValidatingAdmissionPolicyBindingSpec
Maybe V1ObjectMeta
$sel:v1ValidatingAdmissionPolicyBindingApiVersion:V1ValidatingAdmissionPolicyBinding :: V1ValidatingAdmissionPolicyBinding -> Maybe Text
$sel:v1ValidatingAdmissionPolicyBindingKind:V1ValidatingAdmissionPolicyBinding :: V1ValidatingAdmissionPolicyBinding -> Maybe Text
$sel:v1ValidatingAdmissionPolicyBindingMetadata:V1ValidatingAdmissionPolicyBinding :: V1ValidatingAdmissionPolicyBinding -> Maybe V1ObjectMeta
$sel:v1ValidatingAdmissionPolicyBindingSpec:V1ValidatingAdmissionPolicyBinding :: V1ValidatingAdmissionPolicyBinding
-> Maybe V1ValidatingAdmissionPolicyBindingSpec
v1ValidatingAdmissionPolicyBindingApiVersion :: Maybe Text
v1ValidatingAdmissionPolicyBindingKind :: Maybe Text
v1ValidatingAdmissionPolicyBindingMetadata :: Maybe V1ObjectMeta
v1ValidatingAdmissionPolicyBindingSpec :: Maybe V1ValidatingAdmissionPolicyBindingSpec
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ValidatingAdmissionPolicyBindingApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ValidatingAdmissionPolicyBindingKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1ValidatingAdmissionPolicyBindingMetadata
      , Key
"spec" Key -> Maybe V1ValidatingAdmissionPolicyBindingSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ValidatingAdmissionPolicyBindingSpec
v1ValidatingAdmissionPolicyBindingSpec
      ]


-- | Construct a value of type 'V1ValidatingAdmissionPolicyBinding' (by applying it's required fields, if any)
mkV1ValidatingAdmissionPolicyBinding
  :: V1ValidatingAdmissionPolicyBinding
mkV1ValidatingAdmissionPolicyBinding :: V1ValidatingAdmissionPolicyBinding
mkV1ValidatingAdmissionPolicyBinding =
  V1ValidatingAdmissionPolicyBinding
  { $sel:v1ValidatingAdmissionPolicyBindingApiVersion:V1ValidatingAdmissionPolicyBinding :: Maybe Text
v1ValidatingAdmissionPolicyBindingApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ValidatingAdmissionPolicyBindingKind:V1ValidatingAdmissionPolicyBinding :: Maybe Text
v1ValidatingAdmissionPolicyBindingKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ValidatingAdmissionPolicyBindingMetadata:V1ValidatingAdmissionPolicyBinding :: Maybe V1ObjectMeta
v1ValidatingAdmissionPolicyBindingMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1ValidatingAdmissionPolicyBindingSpec:V1ValidatingAdmissionPolicyBinding :: Maybe V1ValidatingAdmissionPolicyBindingSpec
v1ValidatingAdmissionPolicyBindingSpec = Maybe V1ValidatingAdmissionPolicyBindingSpec
forall a. Maybe a
Nothing
  }

-- ** V1ValidatingAdmissionPolicyBindingList
-- | V1ValidatingAdmissionPolicyBindingList
-- ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding.
data V1ValidatingAdmissionPolicyBindingList = V1ValidatingAdmissionPolicyBindingList
  { V1ValidatingAdmissionPolicyBindingList -> Maybe Text
v1ValidatingAdmissionPolicyBindingListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1ValidatingAdmissionPolicyBindingList
-> [V1ValidatingAdmissionPolicyBinding]
v1ValidatingAdmissionPolicyBindingListItems :: !([V1ValidatingAdmissionPolicyBinding]) -- ^ /Required/ "items" - List of PolicyBinding.
  , V1ValidatingAdmissionPolicyBindingList -> Maybe Text
v1ValidatingAdmissionPolicyBindingListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1ValidatingAdmissionPolicyBindingList -> Maybe V1ListMeta
v1ValidatingAdmissionPolicyBindingListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1ValidatingAdmissionPolicyBindingList -> ShowS
[V1ValidatingAdmissionPolicyBindingList] -> ShowS
V1ValidatingAdmissionPolicyBindingList -> String
(Int -> V1ValidatingAdmissionPolicyBindingList -> ShowS)
-> (V1ValidatingAdmissionPolicyBindingList -> String)
-> ([V1ValidatingAdmissionPolicyBindingList] -> ShowS)
-> Show V1ValidatingAdmissionPolicyBindingList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ValidatingAdmissionPolicyBindingList -> ShowS
showsPrec :: Int -> V1ValidatingAdmissionPolicyBindingList -> ShowS
$cshow :: V1ValidatingAdmissionPolicyBindingList -> String
show :: V1ValidatingAdmissionPolicyBindingList -> String
$cshowList :: [V1ValidatingAdmissionPolicyBindingList] -> ShowS
showList :: [V1ValidatingAdmissionPolicyBindingList] -> ShowS
P.Show, V1ValidatingAdmissionPolicyBindingList
-> V1ValidatingAdmissionPolicyBindingList -> Bool
(V1ValidatingAdmissionPolicyBindingList
 -> V1ValidatingAdmissionPolicyBindingList -> Bool)
-> (V1ValidatingAdmissionPolicyBindingList
    -> V1ValidatingAdmissionPolicyBindingList -> Bool)
-> Eq V1ValidatingAdmissionPolicyBindingList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ValidatingAdmissionPolicyBindingList
-> V1ValidatingAdmissionPolicyBindingList -> Bool
== :: V1ValidatingAdmissionPolicyBindingList
-> V1ValidatingAdmissionPolicyBindingList -> Bool
$c/= :: V1ValidatingAdmissionPolicyBindingList
-> V1ValidatingAdmissionPolicyBindingList -> Bool
/= :: V1ValidatingAdmissionPolicyBindingList
-> V1ValidatingAdmissionPolicyBindingList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ValidatingAdmissionPolicyBindingList
instance A.FromJSON V1ValidatingAdmissionPolicyBindingList where
  parseJSON :: Value -> Parser V1ValidatingAdmissionPolicyBindingList
parseJSON = String
-> (Object -> Parser V1ValidatingAdmissionPolicyBindingList)
-> Value
-> Parser V1ValidatingAdmissionPolicyBindingList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ValidatingAdmissionPolicyBindingList" ((Object -> Parser V1ValidatingAdmissionPolicyBindingList)
 -> Value -> Parser V1ValidatingAdmissionPolicyBindingList)
-> (Object -> Parser V1ValidatingAdmissionPolicyBindingList)
-> Value
-> Parser V1ValidatingAdmissionPolicyBindingList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1ValidatingAdmissionPolicyBinding]
-> Maybe Text
-> Maybe V1ListMeta
-> V1ValidatingAdmissionPolicyBindingList
V1ValidatingAdmissionPolicyBindingList
      (Maybe Text
 -> [V1ValidatingAdmissionPolicyBinding]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1ValidatingAdmissionPolicyBindingList)
-> Parser (Maybe Text)
-> Parser
     ([V1ValidatingAdmissionPolicyBinding]
      -> Maybe Text
      -> Maybe V1ListMeta
      -> V1ValidatingAdmissionPolicyBindingList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1ValidatingAdmissionPolicyBinding]
   -> Maybe Text
   -> Maybe V1ListMeta
   -> V1ValidatingAdmissionPolicyBindingList)
-> Parser [V1ValidatingAdmissionPolicyBinding]
-> Parser
     (Maybe Text
      -> Maybe V1ListMeta -> V1ValidatingAdmissionPolicyBindingList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1ValidatingAdmissionPolicyBinding]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser
  (Maybe Text
   -> Maybe V1ListMeta -> V1ValidatingAdmissionPolicyBindingList)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ListMeta -> V1ValidatingAdmissionPolicyBindingList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1ValidatingAdmissionPolicyBindingList)
-> Parser (Maybe V1ListMeta)
-> Parser V1ValidatingAdmissionPolicyBindingList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1ValidatingAdmissionPolicyBindingList
instance A.ToJSON V1ValidatingAdmissionPolicyBindingList where
  toJSON :: V1ValidatingAdmissionPolicyBindingList -> Value
toJSON V1ValidatingAdmissionPolicyBindingList {[V1ValidatingAdmissionPolicyBinding]
Maybe Text
Maybe V1ListMeta
$sel:v1ValidatingAdmissionPolicyBindingListApiVersion:V1ValidatingAdmissionPolicyBindingList :: V1ValidatingAdmissionPolicyBindingList -> Maybe Text
$sel:v1ValidatingAdmissionPolicyBindingListItems:V1ValidatingAdmissionPolicyBindingList :: V1ValidatingAdmissionPolicyBindingList
-> [V1ValidatingAdmissionPolicyBinding]
$sel:v1ValidatingAdmissionPolicyBindingListKind:V1ValidatingAdmissionPolicyBindingList :: V1ValidatingAdmissionPolicyBindingList -> Maybe Text
$sel:v1ValidatingAdmissionPolicyBindingListMetadata:V1ValidatingAdmissionPolicyBindingList :: V1ValidatingAdmissionPolicyBindingList -> Maybe V1ListMeta
v1ValidatingAdmissionPolicyBindingListApiVersion :: Maybe Text
v1ValidatingAdmissionPolicyBindingListItems :: [V1ValidatingAdmissionPolicyBinding]
v1ValidatingAdmissionPolicyBindingListKind :: Maybe Text
v1ValidatingAdmissionPolicyBindingListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ValidatingAdmissionPolicyBindingListApiVersion
      , Key
"items" Key -> [V1ValidatingAdmissionPolicyBinding] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1ValidatingAdmissionPolicyBinding]
v1ValidatingAdmissionPolicyBindingListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ValidatingAdmissionPolicyBindingListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1ValidatingAdmissionPolicyBindingListMetadata
      ]


-- | Construct a value of type 'V1ValidatingAdmissionPolicyBindingList' (by applying it's required fields, if any)
mkV1ValidatingAdmissionPolicyBindingList
  :: [V1ValidatingAdmissionPolicyBinding] -- ^ 'v1ValidatingAdmissionPolicyBindingListItems': List of PolicyBinding.
  -> V1ValidatingAdmissionPolicyBindingList
mkV1ValidatingAdmissionPolicyBindingList :: [V1ValidatingAdmissionPolicyBinding]
-> V1ValidatingAdmissionPolicyBindingList
mkV1ValidatingAdmissionPolicyBindingList [V1ValidatingAdmissionPolicyBinding]
v1ValidatingAdmissionPolicyBindingListItems =
  V1ValidatingAdmissionPolicyBindingList
  { $sel:v1ValidatingAdmissionPolicyBindingListApiVersion:V1ValidatingAdmissionPolicyBindingList :: Maybe Text
v1ValidatingAdmissionPolicyBindingListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1ValidatingAdmissionPolicyBinding]
$sel:v1ValidatingAdmissionPolicyBindingListItems:V1ValidatingAdmissionPolicyBindingList :: [V1ValidatingAdmissionPolicyBinding]
v1ValidatingAdmissionPolicyBindingListItems :: [V1ValidatingAdmissionPolicyBinding]
v1ValidatingAdmissionPolicyBindingListItems
  , $sel:v1ValidatingAdmissionPolicyBindingListKind:V1ValidatingAdmissionPolicyBindingList :: Maybe Text
v1ValidatingAdmissionPolicyBindingListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ValidatingAdmissionPolicyBindingListMetadata:V1ValidatingAdmissionPolicyBindingList :: Maybe V1ListMeta
v1ValidatingAdmissionPolicyBindingListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1ValidatingAdmissionPolicyBindingSpec
-- | V1ValidatingAdmissionPolicyBindingSpec
-- ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.
data V1ValidatingAdmissionPolicyBindingSpec = V1ValidatingAdmissionPolicyBindingSpec
  { V1ValidatingAdmissionPolicyBindingSpec -> Maybe V1MatchResources
v1ValidatingAdmissionPolicyBindingSpecMatchResources :: !(Maybe V1MatchResources) -- ^ "matchResources"
  , V1ValidatingAdmissionPolicyBindingSpec -> Maybe V1ParamRef
v1ValidatingAdmissionPolicyBindingSpecParamRef :: !(Maybe V1ParamRef) -- ^ "paramRef"
  , V1ValidatingAdmissionPolicyBindingSpec -> Maybe Text
v1ValidatingAdmissionPolicyBindingSpecPolicyName :: !(Maybe Text) -- ^ "policyName" - PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. If the referenced resource does not exist, this binding is considered invalid and will be ignored Required.
  , V1ValidatingAdmissionPolicyBindingSpec -> Maybe [Text]
v1ValidatingAdmissionPolicyBindingSpecValidationActions :: !(Maybe [Text]) -- ^ "validationActions" - validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions.  Failures defined by the ValidatingAdmissionPolicy&#39;s FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy.  validationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action.  The supported actions values are:  \&quot;Deny\&quot; specifies that a validation failure results in a denied request.  \&quot;Warn\&quot; specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses.  \&quot;Audit\&quot; specifies that a validation failure is included in the published audit event for the request. The audit event will contain a &#x60;validation.policy.admission.k8s.io/validation_failure&#x60; audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: &#x60;\&quot;validation.policy.admission.k8s.io/validation_failure\&quot;: \&quot;[{\\\&quot;message\\\&quot;: \\\&quot;Invalid value\\\&quot;, {\\\&quot;policy\\\&quot;: \\\&quot;policy.example.com\\\&quot;, {\\\&quot;binding\\\&quot;: \\\&quot;policybinding.example.com\\\&quot;, {\\\&quot;expressionIndex\\\&quot;: \\\&quot;1\\\&quot;, {\\\&quot;validationActions\\\&quot;: [\\\&quot;Audit\\\&quot;]}]\&quot;&#x60;  Clients should expect to handle additional values by ignoring any values not recognized.  \&quot;Deny\&quot; and \&quot;Warn\&quot; may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers.  Required.
  } deriving (Int -> V1ValidatingAdmissionPolicyBindingSpec -> ShowS
[V1ValidatingAdmissionPolicyBindingSpec] -> ShowS
V1ValidatingAdmissionPolicyBindingSpec -> String
(Int -> V1ValidatingAdmissionPolicyBindingSpec -> ShowS)
-> (V1ValidatingAdmissionPolicyBindingSpec -> String)
-> ([V1ValidatingAdmissionPolicyBindingSpec] -> ShowS)
-> Show V1ValidatingAdmissionPolicyBindingSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ValidatingAdmissionPolicyBindingSpec -> ShowS
showsPrec :: Int -> V1ValidatingAdmissionPolicyBindingSpec -> ShowS
$cshow :: V1ValidatingAdmissionPolicyBindingSpec -> String
show :: V1ValidatingAdmissionPolicyBindingSpec -> String
$cshowList :: [V1ValidatingAdmissionPolicyBindingSpec] -> ShowS
showList :: [V1ValidatingAdmissionPolicyBindingSpec] -> ShowS
P.Show, V1ValidatingAdmissionPolicyBindingSpec
-> V1ValidatingAdmissionPolicyBindingSpec -> Bool
(V1ValidatingAdmissionPolicyBindingSpec
 -> V1ValidatingAdmissionPolicyBindingSpec -> Bool)
-> (V1ValidatingAdmissionPolicyBindingSpec
    -> V1ValidatingAdmissionPolicyBindingSpec -> Bool)
-> Eq V1ValidatingAdmissionPolicyBindingSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ValidatingAdmissionPolicyBindingSpec
-> V1ValidatingAdmissionPolicyBindingSpec -> Bool
== :: V1ValidatingAdmissionPolicyBindingSpec
-> V1ValidatingAdmissionPolicyBindingSpec -> Bool
$c/= :: V1ValidatingAdmissionPolicyBindingSpec
-> V1ValidatingAdmissionPolicyBindingSpec -> Bool
/= :: V1ValidatingAdmissionPolicyBindingSpec
-> V1ValidatingAdmissionPolicyBindingSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ValidatingAdmissionPolicyBindingSpec
instance A.FromJSON V1ValidatingAdmissionPolicyBindingSpec where
  parseJSON :: Value -> Parser V1ValidatingAdmissionPolicyBindingSpec
parseJSON = String
-> (Object -> Parser V1ValidatingAdmissionPolicyBindingSpec)
-> Value
-> Parser V1ValidatingAdmissionPolicyBindingSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ValidatingAdmissionPolicyBindingSpec" ((Object -> Parser V1ValidatingAdmissionPolicyBindingSpec)
 -> Value -> Parser V1ValidatingAdmissionPolicyBindingSpec)
-> (Object -> Parser V1ValidatingAdmissionPolicyBindingSpec)
-> Value
-> Parser V1ValidatingAdmissionPolicyBindingSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1MatchResources
-> Maybe V1ParamRef
-> Maybe Text
-> Maybe [Text]
-> V1ValidatingAdmissionPolicyBindingSpec
V1ValidatingAdmissionPolicyBindingSpec
      (Maybe V1MatchResources
 -> Maybe V1ParamRef
 -> Maybe Text
 -> Maybe [Text]
 -> V1ValidatingAdmissionPolicyBindingSpec)
-> Parser (Maybe V1MatchResources)
-> Parser
     (Maybe V1ParamRef
      -> Maybe Text
      -> Maybe [Text]
      -> V1ValidatingAdmissionPolicyBindingSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1MatchResources)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"matchResources")
      Parser
  (Maybe V1ParamRef
   -> Maybe Text
   -> Maybe [Text]
   -> V1ValidatingAdmissionPolicyBindingSpec)
-> Parser (Maybe V1ParamRef)
-> Parser
     (Maybe Text
      -> Maybe [Text] -> V1ValidatingAdmissionPolicyBindingSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ParamRef)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"paramRef")
      Parser
  (Maybe Text
   -> Maybe [Text] -> V1ValidatingAdmissionPolicyBindingSpec)
-> Parser (Maybe Text)
-> Parser (Maybe [Text] -> V1ValidatingAdmissionPolicyBindingSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"policyName")
      Parser (Maybe [Text] -> V1ValidatingAdmissionPolicyBindingSpec)
-> Parser (Maybe [Text])
-> Parser V1ValidatingAdmissionPolicyBindingSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"validationActions")

-- | ToJSON V1ValidatingAdmissionPolicyBindingSpec
instance A.ToJSON V1ValidatingAdmissionPolicyBindingSpec where
  toJSON :: V1ValidatingAdmissionPolicyBindingSpec -> Value
toJSON V1ValidatingAdmissionPolicyBindingSpec {Maybe [Text]
Maybe Text
Maybe V1ParamRef
Maybe V1MatchResources
$sel:v1ValidatingAdmissionPolicyBindingSpecMatchResources:V1ValidatingAdmissionPolicyBindingSpec :: V1ValidatingAdmissionPolicyBindingSpec -> Maybe V1MatchResources
$sel:v1ValidatingAdmissionPolicyBindingSpecParamRef:V1ValidatingAdmissionPolicyBindingSpec :: V1ValidatingAdmissionPolicyBindingSpec -> Maybe V1ParamRef
$sel:v1ValidatingAdmissionPolicyBindingSpecPolicyName:V1ValidatingAdmissionPolicyBindingSpec :: V1ValidatingAdmissionPolicyBindingSpec -> Maybe Text
$sel:v1ValidatingAdmissionPolicyBindingSpecValidationActions:V1ValidatingAdmissionPolicyBindingSpec :: V1ValidatingAdmissionPolicyBindingSpec -> Maybe [Text]
v1ValidatingAdmissionPolicyBindingSpecMatchResources :: Maybe V1MatchResources
v1ValidatingAdmissionPolicyBindingSpecParamRef :: Maybe V1ParamRef
v1ValidatingAdmissionPolicyBindingSpecPolicyName :: Maybe Text
v1ValidatingAdmissionPolicyBindingSpecValidationActions :: Maybe [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"matchResources" Key -> Maybe V1MatchResources -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1MatchResources
v1ValidatingAdmissionPolicyBindingSpecMatchResources
      , Key
"paramRef" Key -> Maybe V1ParamRef -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ParamRef
v1ValidatingAdmissionPolicyBindingSpecParamRef
      , Key
"policyName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ValidatingAdmissionPolicyBindingSpecPolicyName
      , Key
"validationActions" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1ValidatingAdmissionPolicyBindingSpecValidationActions
      ]


-- | Construct a value of type 'V1ValidatingAdmissionPolicyBindingSpec' (by applying it's required fields, if any)
mkV1ValidatingAdmissionPolicyBindingSpec
  :: V1ValidatingAdmissionPolicyBindingSpec
mkV1ValidatingAdmissionPolicyBindingSpec :: V1ValidatingAdmissionPolicyBindingSpec
mkV1ValidatingAdmissionPolicyBindingSpec =
  V1ValidatingAdmissionPolicyBindingSpec
  { $sel:v1ValidatingAdmissionPolicyBindingSpecMatchResources:V1ValidatingAdmissionPolicyBindingSpec :: Maybe V1MatchResources
v1ValidatingAdmissionPolicyBindingSpecMatchResources = Maybe V1MatchResources
forall a. Maybe a
Nothing
  , $sel:v1ValidatingAdmissionPolicyBindingSpecParamRef:V1ValidatingAdmissionPolicyBindingSpec :: Maybe V1ParamRef
v1ValidatingAdmissionPolicyBindingSpecParamRef = Maybe V1ParamRef
forall a. Maybe a
Nothing
  , $sel:v1ValidatingAdmissionPolicyBindingSpecPolicyName:V1ValidatingAdmissionPolicyBindingSpec :: Maybe Text
v1ValidatingAdmissionPolicyBindingSpecPolicyName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ValidatingAdmissionPolicyBindingSpecValidationActions:V1ValidatingAdmissionPolicyBindingSpec :: Maybe [Text]
v1ValidatingAdmissionPolicyBindingSpecValidationActions = Maybe [Text]
forall a. Maybe a
Nothing
  }

-- ** V1ValidatingAdmissionPolicyList
-- | V1ValidatingAdmissionPolicyList
-- ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy.
data V1ValidatingAdmissionPolicyList = V1ValidatingAdmissionPolicyList
  { V1ValidatingAdmissionPolicyList -> Maybe Text
v1ValidatingAdmissionPolicyListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1ValidatingAdmissionPolicyList -> [V1ValidatingAdmissionPolicy]
v1ValidatingAdmissionPolicyListItems :: !([V1ValidatingAdmissionPolicy]) -- ^ /Required/ "items" - List of ValidatingAdmissionPolicy.
  , V1ValidatingAdmissionPolicyList -> Maybe Text
v1ValidatingAdmissionPolicyListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1ValidatingAdmissionPolicyList -> Maybe V1ListMeta
v1ValidatingAdmissionPolicyListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1ValidatingAdmissionPolicyList -> ShowS
[V1ValidatingAdmissionPolicyList] -> ShowS
V1ValidatingAdmissionPolicyList -> String
(Int -> V1ValidatingAdmissionPolicyList -> ShowS)
-> (V1ValidatingAdmissionPolicyList -> String)
-> ([V1ValidatingAdmissionPolicyList] -> ShowS)
-> Show V1ValidatingAdmissionPolicyList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ValidatingAdmissionPolicyList -> ShowS
showsPrec :: Int -> V1ValidatingAdmissionPolicyList -> ShowS
$cshow :: V1ValidatingAdmissionPolicyList -> String
show :: V1ValidatingAdmissionPolicyList -> String
$cshowList :: [V1ValidatingAdmissionPolicyList] -> ShowS
showList :: [V1ValidatingAdmissionPolicyList] -> ShowS
P.Show, V1ValidatingAdmissionPolicyList
-> V1ValidatingAdmissionPolicyList -> Bool
(V1ValidatingAdmissionPolicyList
 -> V1ValidatingAdmissionPolicyList -> Bool)
-> (V1ValidatingAdmissionPolicyList
    -> V1ValidatingAdmissionPolicyList -> Bool)
-> Eq V1ValidatingAdmissionPolicyList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ValidatingAdmissionPolicyList
-> V1ValidatingAdmissionPolicyList -> Bool
== :: V1ValidatingAdmissionPolicyList
-> V1ValidatingAdmissionPolicyList -> Bool
$c/= :: V1ValidatingAdmissionPolicyList
-> V1ValidatingAdmissionPolicyList -> Bool
/= :: V1ValidatingAdmissionPolicyList
-> V1ValidatingAdmissionPolicyList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ValidatingAdmissionPolicyList
instance A.FromJSON V1ValidatingAdmissionPolicyList where
  parseJSON :: Value -> Parser V1ValidatingAdmissionPolicyList
parseJSON = String
-> (Object -> Parser V1ValidatingAdmissionPolicyList)
-> Value
-> Parser V1ValidatingAdmissionPolicyList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ValidatingAdmissionPolicyList" ((Object -> Parser V1ValidatingAdmissionPolicyList)
 -> Value -> Parser V1ValidatingAdmissionPolicyList)
-> (Object -> Parser V1ValidatingAdmissionPolicyList)
-> Value
-> Parser V1ValidatingAdmissionPolicyList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1ValidatingAdmissionPolicy]
-> Maybe Text
-> Maybe V1ListMeta
-> V1ValidatingAdmissionPolicyList
V1ValidatingAdmissionPolicyList
      (Maybe Text
 -> [V1ValidatingAdmissionPolicy]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1ValidatingAdmissionPolicyList)
-> Parser (Maybe Text)
-> Parser
     ([V1ValidatingAdmissionPolicy]
      -> Maybe Text
      -> Maybe V1ListMeta
      -> V1ValidatingAdmissionPolicyList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1ValidatingAdmissionPolicy]
   -> Maybe Text
   -> Maybe V1ListMeta
   -> V1ValidatingAdmissionPolicyList)
-> Parser [V1ValidatingAdmissionPolicy]
-> Parser
     (Maybe Text -> Maybe V1ListMeta -> V1ValidatingAdmissionPolicyList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1ValidatingAdmissionPolicy]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser
  (Maybe Text -> Maybe V1ListMeta -> V1ValidatingAdmissionPolicyList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1ValidatingAdmissionPolicyList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1ValidatingAdmissionPolicyList)
-> Parser (Maybe V1ListMeta)
-> Parser V1ValidatingAdmissionPolicyList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1ValidatingAdmissionPolicyList
instance A.ToJSON V1ValidatingAdmissionPolicyList where
  toJSON :: V1ValidatingAdmissionPolicyList -> Value
toJSON V1ValidatingAdmissionPolicyList {[V1ValidatingAdmissionPolicy]
Maybe Text
Maybe V1ListMeta
$sel:v1ValidatingAdmissionPolicyListApiVersion:V1ValidatingAdmissionPolicyList :: V1ValidatingAdmissionPolicyList -> Maybe Text
$sel:v1ValidatingAdmissionPolicyListItems:V1ValidatingAdmissionPolicyList :: V1ValidatingAdmissionPolicyList -> [V1ValidatingAdmissionPolicy]
$sel:v1ValidatingAdmissionPolicyListKind:V1ValidatingAdmissionPolicyList :: V1ValidatingAdmissionPolicyList -> Maybe Text
$sel:v1ValidatingAdmissionPolicyListMetadata:V1ValidatingAdmissionPolicyList :: V1ValidatingAdmissionPolicyList -> Maybe V1ListMeta
v1ValidatingAdmissionPolicyListApiVersion :: Maybe Text
v1ValidatingAdmissionPolicyListItems :: [V1ValidatingAdmissionPolicy]
v1ValidatingAdmissionPolicyListKind :: Maybe Text
v1ValidatingAdmissionPolicyListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ValidatingAdmissionPolicyListApiVersion
      , Key
"items" Key -> [V1ValidatingAdmissionPolicy] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1ValidatingAdmissionPolicy]
v1ValidatingAdmissionPolicyListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ValidatingAdmissionPolicyListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1ValidatingAdmissionPolicyListMetadata
      ]


-- | Construct a value of type 'V1ValidatingAdmissionPolicyList' (by applying it's required fields, if any)
mkV1ValidatingAdmissionPolicyList
  :: [V1ValidatingAdmissionPolicy] -- ^ 'v1ValidatingAdmissionPolicyListItems': List of ValidatingAdmissionPolicy.
  -> V1ValidatingAdmissionPolicyList
mkV1ValidatingAdmissionPolicyList :: [V1ValidatingAdmissionPolicy] -> V1ValidatingAdmissionPolicyList
mkV1ValidatingAdmissionPolicyList [V1ValidatingAdmissionPolicy]
v1ValidatingAdmissionPolicyListItems =
  V1ValidatingAdmissionPolicyList
  { $sel:v1ValidatingAdmissionPolicyListApiVersion:V1ValidatingAdmissionPolicyList :: Maybe Text
v1ValidatingAdmissionPolicyListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1ValidatingAdmissionPolicy]
$sel:v1ValidatingAdmissionPolicyListItems:V1ValidatingAdmissionPolicyList :: [V1ValidatingAdmissionPolicy]
v1ValidatingAdmissionPolicyListItems :: [V1ValidatingAdmissionPolicy]
v1ValidatingAdmissionPolicyListItems
  , $sel:v1ValidatingAdmissionPolicyListKind:V1ValidatingAdmissionPolicyList :: Maybe Text
v1ValidatingAdmissionPolicyListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ValidatingAdmissionPolicyListMetadata:V1ValidatingAdmissionPolicyList :: Maybe V1ListMeta
v1ValidatingAdmissionPolicyListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1ValidatingAdmissionPolicySpec
-- | V1ValidatingAdmissionPolicySpec
-- ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy.
data V1ValidatingAdmissionPolicySpec = V1ValidatingAdmissionPolicySpec
  { V1ValidatingAdmissionPolicySpec -> Maybe [V1AuditAnnotation]
v1ValidatingAdmissionPolicySpecAuditAnnotations :: !(Maybe [V1AuditAnnotation]) -- ^ "auditAnnotations" - auditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request. validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is required.
  , V1ValidatingAdmissionPolicySpec -> Maybe Text
v1ValidatingAdmissionPolicySpecFailurePolicy :: !(Maybe Text) -- ^ "failurePolicy" - failurePolicy defines how to handle failures for the admission policy. Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings.  A policy is invalid if spec.paramKind refers to a non-existent Kind. A binding is invalid if spec.paramRef.name refers to a non-existent resource.  failurePolicy does not define how validations that evaluate to false are handled.  When failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions define how failures are enforced.  Allowed values are Ignore or Fail. Defaults to Fail.
  , V1ValidatingAdmissionPolicySpec -> Maybe [V1MatchCondition]
v1ValidatingAdmissionPolicySpecMatchConditions :: !(Maybe [V1MatchCondition]) -- ^ "matchConditions" - MatchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.  If a parameter object is provided, it can be accessed via the &#x60;params&#x60; handle in the same manner as validation expressions.  The exact matching logic is (in order):   1. If ANY matchCondition evaluates to FALSE, the policy is skipped.   2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.   3. If any matchCondition evaluates to an error (but none are FALSE):      - If failurePolicy&#x3D;Fail, reject the request      - If failurePolicy&#x3D;Ignore, the policy is skipped
  , V1ValidatingAdmissionPolicySpec -> Maybe V1MatchResources
v1ValidatingAdmissionPolicySpecMatchConstraints :: !(Maybe V1MatchResources) -- ^ "matchConstraints"
  , V1ValidatingAdmissionPolicySpec -> Maybe V1ParamKind
v1ValidatingAdmissionPolicySpecParamKind :: !(Maybe V1ParamKind) -- ^ "paramKind"
  , V1ValidatingAdmissionPolicySpec -> Maybe [V1Validation]
v1ValidatingAdmissionPolicySpecValidations :: !(Maybe [V1Validation]) -- ^ "validations" - Validations contain CEL expressions which is used to apply the validation. Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is required.
  , V1ValidatingAdmissionPolicySpec -> Maybe [V1Variable]
v1ValidatingAdmissionPolicySpecVariables :: !(Maybe [V1Variable]) -- ^ "variables" - Variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under &#x60;variables&#x60; in other expressions of the policy except MatchConditions because MatchConditions are evaluated before the rest of the policy.  The expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, Variables must be sorted by the order of first appearance and acyclic.
  } deriving (Int -> V1ValidatingAdmissionPolicySpec -> ShowS
[V1ValidatingAdmissionPolicySpec] -> ShowS
V1ValidatingAdmissionPolicySpec -> String
(Int -> V1ValidatingAdmissionPolicySpec -> ShowS)
-> (V1ValidatingAdmissionPolicySpec -> String)
-> ([V1ValidatingAdmissionPolicySpec] -> ShowS)
-> Show V1ValidatingAdmissionPolicySpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ValidatingAdmissionPolicySpec -> ShowS
showsPrec :: Int -> V1ValidatingAdmissionPolicySpec -> ShowS
$cshow :: V1ValidatingAdmissionPolicySpec -> String
show :: V1ValidatingAdmissionPolicySpec -> String
$cshowList :: [V1ValidatingAdmissionPolicySpec] -> ShowS
showList :: [V1ValidatingAdmissionPolicySpec] -> ShowS
P.Show, V1ValidatingAdmissionPolicySpec
-> V1ValidatingAdmissionPolicySpec -> Bool
(V1ValidatingAdmissionPolicySpec
 -> V1ValidatingAdmissionPolicySpec -> Bool)
-> (V1ValidatingAdmissionPolicySpec
    -> V1ValidatingAdmissionPolicySpec -> Bool)
-> Eq V1ValidatingAdmissionPolicySpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ValidatingAdmissionPolicySpec
-> V1ValidatingAdmissionPolicySpec -> Bool
== :: V1ValidatingAdmissionPolicySpec
-> V1ValidatingAdmissionPolicySpec -> Bool
$c/= :: V1ValidatingAdmissionPolicySpec
-> V1ValidatingAdmissionPolicySpec -> Bool
/= :: V1ValidatingAdmissionPolicySpec
-> V1ValidatingAdmissionPolicySpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ValidatingAdmissionPolicySpec
instance A.FromJSON V1ValidatingAdmissionPolicySpec where
  parseJSON :: Value -> Parser V1ValidatingAdmissionPolicySpec
parseJSON = String
-> (Object -> Parser V1ValidatingAdmissionPolicySpec)
-> Value
-> Parser V1ValidatingAdmissionPolicySpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ValidatingAdmissionPolicySpec" ((Object -> Parser V1ValidatingAdmissionPolicySpec)
 -> Value -> Parser V1ValidatingAdmissionPolicySpec)
-> (Object -> Parser V1ValidatingAdmissionPolicySpec)
-> Value
-> Parser V1ValidatingAdmissionPolicySpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1AuditAnnotation]
-> Maybe Text
-> Maybe [V1MatchCondition]
-> Maybe V1MatchResources
-> Maybe V1ParamKind
-> Maybe [V1Validation]
-> Maybe [V1Variable]
-> V1ValidatingAdmissionPolicySpec
V1ValidatingAdmissionPolicySpec
      (Maybe [V1AuditAnnotation]
 -> Maybe Text
 -> Maybe [V1MatchCondition]
 -> Maybe V1MatchResources
 -> Maybe V1ParamKind
 -> Maybe [V1Validation]
 -> Maybe [V1Variable]
 -> V1ValidatingAdmissionPolicySpec)
-> Parser (Maybe [V1AuditAnnotation])
-> Parser
     (Maybe Text
      -> Maybe [V1MatchCondition]
      -> Maybe V1MatchResources
      -> Maybe V1ParamKind
      -> Maybe [V1Validation]
      -> Maybe [V1Variable]
      -> V1ValidatingAdmissionPolicySpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1AuditAnnotation])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"auditAnnotations")
      Parser
  (Maybe Text
   -> Maybe [V1MatchCondition]
   -> Maybe V1MatchResources
   -> Maybe V1ParamKind
   -> Maybe [V1Validation]
   -> Maybe [V1Variable]
   -> V1ValidatingAdmissionPolicySpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe [V1MatchCondition]
      -> Maybe V1MatchResources
      -> Maybe V1ParamKind
      -> Maybe [V1Validation]
      -> Maybe [V1Variable]
      -> V1ValidatingAdmissionPolicySpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"failurePolicy")
      Parser
  (Maybe [V1MatchCondition]
   -> Maybe V1MatchResources
   -> Maybe V1ParamKind
   -> Maybe [V1Validation]
   -> Maybe [V1Variable]
   -> V1ValidatingAdmissionPolicySpec)
-> Parser (Maybe [V1MatchCondition])
-> Parser
     (Maybe V1MatchResources
      -> Maybe V1ParamKind
      -> Maybe [V1Validation]
      -> Maybe [V1Variable]
      -> V1ValidatingAdmissionPolicySpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1MatchCondition])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"matchConditions")
      Parser
  (Maybe V1MatchResources
   -> Maybe V1ParamKind
   -> Maybe [V1Validation]
   -> Maybe [V1Variable]
   -> V1ValidatingAdmissionPolicySpec)
-> Parser (Maybe V1MatchResources)
-> Parser
     (Maybe V1ParamKind
      -> Maybe [V1Validation]
      -> Maybe [V1Variable]
      -> V1ValidatingAdmissionPolicySpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1MatchResources)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"matchConstraints")
      Parser
  (Maybe V1ParamKind
   -> Maybe [V1Validation]
   -> Maybe [V1Variable]
   -> V1ValidatingAdmissionPolicySpec)
-> Parser (Maybe V1ParamKind)
-> Parser
     (Maybe [V1Validation]
      -> Maybe [V1Variable] -> V1ValidatingAdmissionPolicySpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ParamKind)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"paramKind")
      Parser
  (Maybe [V1Validation]
   -> Maybe [V1Variable] -> V1ValidatingAdmissionPolicySpec)
-> Parser (Maybe [V1Validation])
-> Parser (Maybe [V1Variable] -> V1ValidatingAdmissionPolicySpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1Validation])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"validations")
      Parser (Maybe [V1Variable] -> V1ValidatingAdmissionPolicySpec)
-> Parser (Maybe [V1Variable])
-> Parser V1ValidatingAdmissionPolicySpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1Variable])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"variables")

-- | ToJSON V1ValidatingAdmissionPolicySpec
instance A.ToJSON V1ValidatingAdmissionPolicySpec where
  toJSON :: V1ValidatingAdmissionPolicySpec -> Value
toJSON V1ValidatingAdmissionPolicySpec {Maybe [V1Variable]
Maybe [V1Validation]
Maybe [V1MatchCondition]
Maybe [V1AuditAnnotation]
Maybe Text
Maybe V1ParamKind
Maybe V1MatchResources
$sel:v1ValidatingAdmissionPolicySpecAuditAnnotations:V1ValidatingAdmissionPolicySpec :: V1ValidatingAdmissionPolicySpec -> Maybe [V1AuditAnnotation]
$sel:v1ValidatingAdmissionPolicySpecFailurePolicy:V1ValidatingAdmissionPolicySpec :: V1ValidatingAdmissionPolicySpec -> Maybe Text
$sel:v1ValidatingAdmissionPolicySpecMatchConditions:V1ValidatingAdmissionPolicySpec :: V1ValidatingAdmissionPolicySpec -> Maybe [V1MatchCondition]
$sel:v1ValidatingAdmissionPolicySpecMatchConstraints:V1ValidatingAdmissionPolicySpec :: V1ValidatingAdmissionPolicySpec -> Maybe V1MatchResources
$sel:v1ValidatingAdmissionPolicySpecParamKind:V1ValidatingAdmissionPolicySpec :: V1ValidatingAdmissionPolicySpec -> Maybe V1ParamKind
$sel:v1ValidatingAdmissionPolicySpecValidations:V1ValidatingAdmissionPolicySpec :: V1ValidatingAdmissionPolicySpec -> Maybe [V1Validation]
$sel:v1ValidatingAdmissionPolicySpecVariables:V1ValidatingAdmissionPolicySpec :: V1ValidatingAdmissionPolicySpec -> Maybe [V1Variable]
v1ValidatingAdmissionPolicySpecAuditAnnotations :: Maybe [V1AuditAnnotation]
v1ValidatingAdmissionPolicySpecFailurePolicy :: Maybe Text
v1ValidatingAdmissionPolicySpecMatchConditions :: Maybe [V1MatchCondition]
v1ValidatingAdmissionPolicySpecMatchConstraints :: Maybe V1MatchResources
v1ValidatingAdmissionPolicySpecParamKind :: Maybe V1ParamKind
v1ValidatingAdmissionPolicySpecValidations :: Maybe [V1Validation]
v1ValidatingAdmissionPolicySpecVariables :: Maybe [V1Variable]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"auditAnnotations" Key -> Maybe [V1AuditAnnotation] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1AuditAnnotation]
v1ValidatingAdmissionPolicySpecAuditAnnotations
      , Key
"failurePolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ValidatingAdmissionPolicySpecFailurePolicy
      , Key
"matchConditions" Key -> Maybe [V1MatchCondition] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1MatchCondition]
v1ValidatingAdmissionPolicySpecMatchConditions
      , Key
"matchConstraints" Key -> Maybe V1MatchResources -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1MatchResources
v1ValidatingAdmissionPolicySpecMatchConstraints
      , Key
"paramKind" Key -> Maybe V1ParamKind -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ParamKind
v1ValidatingAdmissionPolicySpecParamKind
      , Key
"validations" Key -> Maybe [V1Validation] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1Validation]
v1ValidatingAdmissionPolicySpecValidations
      , Key
"variables" Key -> Maybe [V1Variable] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1Variable]
v1ValidatingAdmissionPolicySpecVariables
      ]


-- | Construct a value of type 'V1ValidatingAdmissionPolicySpec' (by applying it's required fields, if any)
mkV1ValidatingAdmissionPolicySpec
  :: V1ValidatingAdmissionPolicySpec
mkV1ValidatingAdmissionPolicySpec :: V1ValidatingAdmissionPolicySpec
mkV1ValidatingAdmissionPolicySpec =
  V1ValidatingAdmissionPolicySpec
  { $sel:v1ValidatingAdmissionPolicySpecAuditAnnotations:V1ValidatingAdmissionPolicySpec :: Maybe [V1AuditAnnotation]
v1ValidatingAdmissionPolicySpecAuditAnnotations = Maybe [V1AuditAnnotation]
forall a. Maybe a
Nothing
  , $sel:v1ValidatingAdmissionPolicySpecFailurePolicy:V1ValidatingAdmissionPolicySpec :: Maybe Text
v1ValidatingAdmissionPolicySpecFailurePolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ValidatingAdmissionPolicySpecMatchConditions:V1ValidatingAdmissionPolicySpec :: Maybe [V1MatchCondition]
v1ValidatingAdmissionPolicySpecMatchConditions = Maybe [V1MatchCondition]
forall a. Maybe a
Nothing
  , $sel:v1ValidatingAdmissionPolicySpecMatchConstraints:V1ValidatingAdmissionPolicySpec :: Maybe V1MatchResources
v1ValidatingAdmissionPolicySpecMatchConstraints = Maybe V1MatchResources
forall a. Maybe a
Nothing
  , $sel:v1ValidatingAdmissionPolicySpecParamKind:V1ValidatingAdmissionPolicySpec :: Maybe V1ParamKind
v1ValidatingAdmissionPolicySpecParamKind = Maybe V1ParamKind
forall a. Maybe a
Nothing
  , $sel:v1ValidatingAdmissionPolicySpecValidations:V1ValidatingAdmissionPolicySpec :: Maybe [V1Validation]
v1ValidatingAdmissionPolicySpecValidations = Maybe [V1Validation]
forall a. Maybe a
Nothing
  , $sel:v1ValidatingAdmissionPolicySpecVariables:V1ValidatingAdmissionPolicySpec :: Maybe [V1Variable]
v1ValidatingAdmissionPolicySpecVariables = Maybe [V1Variable]
forall a. Maybe a
Nothing
  }

-- ** V1ValidatingAdmissionPolicyStatus
-- | V1ValidatingAdmissionPolicyStatus
-- ValidatingAdmissionPolicyStatus represents the status of an admission validation policy.
data V1ValidatingAdmissionPolicyStatus = V1ValidatingAdmissionPolicyStatus
  { V1ValidatingAdmissionPolicyStatus -> Maybe [V1Condition]
v1ValidatingAdmissionPolicyStatusConditions :: !(Maybe [V1Condition]) -- ^ "conditions" - The conditions represent the latest available observations of a policy&#39;s current state.
  , V1ValidatingAdmissionPolicyStatus -> Maybe Integer
v1ValidatingAdmissionPolicyStatusObservedGeneration :: !(Maybe Integer) -- ^ "observedGeneration" - The generation observed by the controller.
  , V1ValidatingAdmissionPolicyStatus -> Maybe V1TypeChecking
v1ValidatingAdmissionPolicyStatusTypeChecking :: !(Maybe V1TypeChecking) -- ^ "typeChecking"
  } deriving (Int -> V1ValidatingAdmissionPolicyStatus -> ShowS
[V1ValidatingAdmissionPolicyStatus] -> ShowS
V1ValidatingAdmissionPolicyStatus -> String
(Int -> V1ValidatingAdmissionPolicyStatus -> ShowS)
-> (V1ValidatingAdmissionPolicyStatus -> String)
-> ([V1ValidatingAdmissionPolicyStatus] -> ShowS)
-> Show V1ValidatingAdmissionPolicyStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ValidatingAdmissionPolicyStatus -> ShowS
showsPrec :: Int -> V1ValidatingAdmissionPolicyStatus -> ShowS
$cshow :: V1ValidatingAdmissionPolicyStatus -> String
show :: V1ValidatingAdmissionPolicyStatus -> String
$cshowList :: [V1ValidatingAdmissionPolicyStatus] -> ShowS
showList :: [V1ValidatingAdmissionPolicyStatus] -> ShowS
P.Show, V1ValidatingAdmissionPolicyStatus
-> V1ValidatingAdmissionPolicyStatus -> Bool
(V1ValidatingAdmissionPolicyStatus
 -> V1ValidatingAdmissionPolicyStatus -> Bool)
-> (V1ValidatingAdmissionPolicyStatus
    -> V1ValidatingAdmissionPolicyStatus -> Bool)
-> Eq V1ValidatingAdmissionPolicyStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ValidatingAdmissionPolicyStatus
-> V1ValidatingAdmissionPolicyStatus -> Bool
== :: V1ValidatingAdmissionPolicyStatus
-> V1ValidatingAdmissionPolicyStatus -> Bool
$c/= :: V1ValidatingAdmissionPolicyStatus
-> V1ValidatingAdmissionPolicyStatus -> Bool
/= :: V1ValidatingAdmissionPolicyStatus
-> V1ValidatingAdmissionPolicyStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ValidatingAdmissionPolicyStatus
instance A.FromJSON V1ValidatingAdmissionPolicyStatus where
  parseJSON :: Value -> Parser V1ValidatingAdmissionPolicyStatus
parseJSON = String
-> (Object -> Parser V1ValidatingAdmissionPolicyStatus)
-> Value
-> Parser V1ValidatingAdmissionPolicyStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ValidatingAdmissionPolicyStatus" ((Object -> Parser V1ValidatingAdmissionPolicyStatus)
 -> Value -> Parser V1ValidatingAdmissionPolicyStatus)
-> (Object -> Parser V1ValidatingAdmissionPolicyStatus)
-> Value
-> Parser V1ValidatingAdmissionPolicyStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1Condition]
-> Maybe Integer
-> Maybe V1TypeChecking
-> V1ValidatingAdmissionPolicyStatus
V1ValidatingAdmissionPolicyStatus
      (Maybe [V1Condition]
 -> Maybe Integer
 -> Maybe V1TypeChecking
 -> V1ValidatingAdmissionPolicyStatus)
-> Parser (Maybe [V1Condition])
-> Parser
     (Maybe Integer
      -> Maybe V1TypeChecking -> V1ValidatingAdmissionPolicyStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1Condition])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"conditions")
      Parser
  (Maybe Integer
   -> Maybe V1TypeChecking -> V1ValidatingAdmissionPolicyStatus)
-> Parser (Maybe Integer)
-> Parser
     (Maybe V1TypeChecking -> V1ValidatingAdmissionPolicyStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"observedGeneration")
      Parser (Maybe V1TypeChecking -> V1ValidatingAdmissionPolicyStatus)
-> Parser (Maybe V1TypeChecking)
-> Parser V1ValidatingAdmissionPolicyStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1TypeChecking)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"typeChecking")

-- | ToJSON V1ValidatingAdmissionPolicyStatus
instance A.ToJSON V1ValidatingAdmissionPolicyStatus where
  toJSON :: V1ValidatingAdmissionPolicyStatus -> Value
toJSON V1ValidatingAdmissionPolicyStatus {Maybe Integer
Maybe [V1Condition]
Maybe V1TypeChecking
$sel:v1ValidatingAdmissionPolicyStatusConditions:V1ValidatingAdmissionPolicyStatus :: V1ValidatingAdmissionPolicyStatus -> Maybe [V1Condition]
$sel:v1ValidatingAdmissionPolicyStatusObservedGeneration:V1ValidatingAdmissionPolicyStatus :: V1ValidatingAdmissionPolicyStatus -> Maybe Integer
$sel:v1ValidatingAdmissionPolicyStatusTypeChecking:V1ValidatingAdmissionPolicyStatus :: V1ValidatingAdmissionPolicyStatus -> Maybe V1TypeChecking
v1ValidatingAdmissionPolicyStatusConditions :: Maybe [V1Condition]
v1ValidatingAdmissionPolicyStatusObservedGeneration :: Maybe Integer
v1ValidatingAdmissionPolicyStatusTypeChecking :: Maybe V1TypeChecking
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"conditions" Key -> Maybe [V1Condition] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1Condition]
v1ValidatingAdmissionPolicyStatusConditions
      , Key
"observedGeneration" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1ValidatingAdmissionPolicyStatusObservedGeneration
      , Key
"typeChecking" Key -> Maybe V1TypeChecking -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1TypeChecking
v1ValidatingAdmissionPolicyStatusTypeChecking
      ]


-- | Construct a value of type 'V1ValidatingAdmissionPolicyStatus' (by applying it's required fields, if any)
mkV1ValidatingAdmissionPolicyStatus
  :: V1ValidatingAdmissionPolicyStatus
mkV1ValidatingAdmissionPolicyStatus :: V1ValidatingAdmissionPolicyStatus
mkV1ValidatingAdmissionPolicyStatus =
  V1ValidatingAdmissionPolicyStatus
  { $sel:v1ValidatingAdmissionPolicyStatusConditions:V1ValidatingAdmissionPolicyStatus :: Maybe [V1Condition]
v1ValidatingAdmissionPolicyStatusConditions = Maybe [V1Condition]
forall a. Maybe a
Nothing
  , $sel:v1ValidatingAdmissionPolicyStatusObservedGeneration:V1ValidatingAdmissionPolicyStatus :: Maybe Integer
v1ValidatingAdmissionPolicyStatusObservedGeneration = Maybe Integer
forall a. Maybe a
Nothing
  , $sel:v1ValidatingAdmissionPolicyStatusTypeChecking:V1ValidatingAdmissionPolicyStatus :: Maybe V1TypeChecking
v1ValidatingAdmissionPolicyStatusTypeChecking = Maybe V1TypeChecking
forall a. Maybe a
Nothing
  }

-- ** V1ValidatingWebhook
-- | V1ValidatingWebhook
-- ValidatingWebhook describes an admission webhook and the resources and operations it applies to.
data V1ValidatingWebhook = V1ValidatingWebhook
  { V1ValidatingWebhook -> [Text]
v1ValidatingWebhookAdmissionReviewVersions :: !([Text]) -- ^ /Required/ "admissionReviewVersions" - AdmissionReviewVersions is an ordered list of preferred &#x60;AdmissionReview&#x60; versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy.
  , V1ValidatingWebhook -> AdmissionregistrationV1WebhookClientConfig
v1ValidatingWebhookClientConfig :: !(AdmissionregistrationV1WebhookClientConfig) -- ^ /Required/ "clientConfig"
  , V1ValidatingWebhook -> Maybe Text
v1ValidatingWebhookFailurePolicy :: !(Maybe Text) -- ^ "failurePolicy" - FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail.
  , V1ValidatingWebhook -> Maybe [V1MatchCondition]
v1ValidatingWebhookMatchConditions :: !(Maybe [V1MatchCondition]) -- ^ "matchConditions" - MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.  The exact matching logic is (in order):   1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.   2. If ALL matchConditions evaluate to TRUE, the webhook is called.   3. If any matchCondition evaluates to an error (but none are FALSE):      - If failurePolicy&#x3D;Fail, reject the request      - If failurePolicy&#x3D;Ignore, the error is ignored and the webhook is skipped
  , V1ValidatingWebhook -> Maybe Text
v1ValidatingWebhookMatchPolicy :: !(Maybe Text) -- ^ "matchPolicy" - matchPolicy defines how the \&quot;rules\&quot; list is used to match incoming requests. Allowed values are \&quot;Exact\&quot; or \&quot;Equivalent\&quot;.  - Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \&quot;rules\&quot; only included &#x60;apiGroups:[\&quot;apps\&quot;], apiVersions:[\&quot;v1\&quot;], resources: [\&quot;deployments\&quot;]&#x60;, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook.  - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \&quot;rules\&quot; only included &#x60;apiGroups:[\&quot;apps\&quot;], apiVersions:[\&quot;v1\&quot;], resources: [\&quot;deployments\&quot;]&#x60;, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook.  Defaults to \&quot;Equivalent\&quot;
  , V1ValidatingWebhook -> Text
v1ValidatingWebhookName :: !(Text) -- ^ /Required/ "name" - The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \&quot;imagepolicy\&quot; is the name of the webhook, and kubernetes.io is the name of the organization. Required.
  , V1ValidatingWebhook -> Maybe V1LabelSelector
v1ValidatingWebhookNamespaceSelector :: !(Maybe V1LabelSelector) -- ^ "namespaceSelector"
  , V1ValidatingWebhook -> Maybe V1LabelSelector
v1ValidatingWebhookObjectSelector :: !(Maybe V1LabelSelector) -- ^ "objectSelector"
  , V1ValidatingWebhook -> Maybe [V1RuleWithOperations]
v1ValidatingWebhookRules :: !(Maybe [V1RuleWithOperations]) -- ^ "rules" - Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.
  , V1ValidatingWebhook -> Text
v1ValidatingWebhookSideEffects :: !(Text) -- ^ /Required/ "sideEffects" - SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects &#x3D;&#x3D; Unknown or Some.
  , V1ValidatingWebhook -> Maybe Int
v1ValidatingWebhookTimeoutSeconds :: !(Maybe Int) -- ^ "timeoutSeconds" - TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds.
  } deriving (Int -> V1ValidatingWebhook -> ShowS
[V1ValidatingWebhook] -> ShowS
V1ValidatingWebhook -> String
(Int -> V1ValidatingWebhook -> ShowS)
-> (V1ValidatingWebhook -> String)
-> ([V1ValidatingWebhook] -> ShowS)
-> Show V1ValidatingWebhook
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ValidatingWebhook -> ShowS
showsPrec :: Int -> V1ValidatingWebhook -> ShowS
$cshow :: V1ValidatingWebhook -> String
show :: V1ValidatingWebhook -> String
$cshowList :: [V1ValidatingWebhook] -> ShowS
showList :: [V1ValidatingWebhook] -> ShowS
P.Show, V1ValidatingWebhook -> V1ValidatingWebhook -> Bool
(V1ValidatingWebhook -> V1ValidatingWebhook -> Bool)
-> (V1ValidatingWebhook -> V1ValidatingWebhook -> Bool)
-> Eq V1ValidatingWebhook
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ValidatingWebhook -> V1ValidatingWebhook -> Bool
== :: V1ValidatingWebhook -> V1ValidatingWebhook -> Bool
$c/= :: V1ValidatingWebhook -> V1ValidatingWebhook -> Bool
/= :: V1ValidatingWebhook -> V1ValidatingWebhook -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ValidatingWebhook
instance A.FromJSON V1ValidatingWebhook where
  parseJSON :: Value -> Parser V1ValidatingWebhook
parseJSON = String
-> (Object -> Parser V1ValidatingWebhook)
-> Value
-> Parser V1ValidatingWebhook
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ValidatingWebhook" ((Object -> Parser V1ValidatingWebhook)
 -> Value -> Parser V1ValidatingWebhook)
-> (Object -> Parser V1ValidatingWebhook)
-> Value
-> Parser V1ValidatingWebhook
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    [Text]
-> AdmissionregistrationV1WebhookClientConfig
-> Maybe Text
-> Maybe [V1MatchCondition]
-> Maybe Text
-> Text
-> Maybe V1LabelSelector
-> Maybe V1LabelSelector
-> Maybe [V1RuleWithOperations]
-> Text
-> Maybe Int
-> V1ValidatingWebhook
V1ValidatingWebhook
      ([Text]
 -> AdmissionregistrationV1WebhookClientConfig
 -> Maybe Text
 -> Maybe [V1MatchCondition]
 -> Maybe Text
 -> Text
 -> Maybe V1LabelSelector
 -> Maybe V1LabelSelector
 -> Maybe [V1RuleWithOperations]
 -> Text
 -> Maybe Int
 -> V1ValidatingWebhook)
-> Parser [Text]
-> Parser
     (AdmissionregistrationV1WebhookClientConfig
      -> Maybe Text
      -> Maybe [V1MatchCondition]
      -> Maybe Text
      -> Text
      -> Maybe V1LabelSelector
      -> Maybe V1LabelSelector
      -> Maybe [V1RuleWithOperations]
      -> Text
      -> Maybe Int
      -> V1ValidatingWebhook)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"admissionReviewVersions")
      Parser
  (AdmissionregistrationV1WebhookClientConfig
   -> Maybe Text
   -> Maybe [V1MatchCondition]
   -> Maybe Text
   -> Text
   -> Maybe V1LabelSelector
   -> Maybe V1LabelSelector
   -> Maybe [V1RuleWithOperations]
   -> Text
   -> Maybe Int
   -> V1ValidatingWebhook)
-> Parser AdmissionregistrationV1WebhookClientConfig
-> Parser
     (Maybe Text
      -> Maybe [V1MatchCondition]
      -> Maybe Text
      -> Text
      -> Maybe V1LabelSelector
      -> Maybe V1LabelSelector
      -> Maybe [V1RuleWithOperations]
      -> Text
      -> Maybe Int
      -> V1ValidatingWebhook)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser AdmissionregistrationV1WebhookClientConfig
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"clientConfig")
      Parser
  (Maybe Text
   -> Maybe [V1MatchCondition]
   -> Maybe Text
   -> Text
   -> Maybe V1LabelSelector
   -> Maybe V1LabelSelector
   -> Maybe [V1RuleWithOperations]
   -> Text
   -> Maybe Int
   -> V1ValidatingWebhook)
-> Parser (Maybe Text)
-> Parser
     (Maybe [V1MatchCondition]
      -> Maybe Text
      -> Text
      -> Maybe V1LabelSelector
      -> Maybe V1LabelSelector
      -> Maybe [V1RuleWithOperations]
      -> Text
      -> Maybe Int
      -> V1ValidatingWebhook)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"failurePolicy")
      Parser
  (Maybe [V1MatchCondition]
   -> Maybe Text
   -> Text
   -> Maybe V1LabelSelector
   -> Maybe V1LabelSelector
   -> Maybe [V1RuleWithOperations]
   -> Text
   -> Maybe Int
   -> V1ValidatingWebhook)
-> Parser (Maybe [V1MatchCondition])
-> Parser
     (Maybe Text
      -> Text
      -> Maybe V1LabelSelector
      -> Maybe V1LabelSelector
      -> Maybe [V1RuleWithOperations]
      -> Text
      -> Maybe Int
      -> V1ValidatingWebhook)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1MatchCondition])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"matchConditions")
      Parser
  (Maybe Text
   -> Text
   -> Maybe V1LabelSelector
   -> Maybe V1LabelSelector
   -> Maybe [V1RuleWithOperations]
   -> Text
   -> Maybe Int
   -> V1ValidatingWebhook)
-> Parser (Maybe Text)
-> Parser
     (Text
      -> Maybe V1LabelSelector
      -> Maybe V1LabelSelector
      -> Maybe [V1RuleWithOperations]
      -> Text
      -> Maybe Int
      -> V1ValidatingWebhook)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"matchPolicy")
      Parser
  (Text
   -> Maybe V1LabelSelector
   -> Maybe V1LabelSelector
   -> Maybe [V1RuleWithOperations]
   -> Text
   -> Maybe Int
   -> V1ValidatingWebhook)
-> Parser Text
-> Parser
     (Maybe V1LabelSelector
      -> Maybe V1LabelSelector
      -> Maybe [V1RuleWithOperations]
      -> Text
      -> Maybe Int
      -> V1ValidatingWebhook)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser
  (Maybe V1LabelSelector
   -> Maybe V1LabelSelector
   -> Maybe [V1RuleWithOperations]
   -> Text
   -> Maybe Int
   -> V1ValidatingWebhook)
-> Parser (Maybe V1LabelSelector)
-> Parser
     (Maybe V1LabelSelector
      -> Maybe [V1RuleWithOperations]
      -> Text
      -> Maybe Int
      -> V1ValidatingWebhook)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LabelSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"namespaceSelector")
      Parser
  (Maybe V1LabelSelector
   -> Maybe [V1RuleWithOperations]
   -> Text
   -> Maybe Int
   -> V1ValidatingWebhook)
-> Parser (Maybe V1LabelSelector)
-> Parser
     (Maybe [V1RuleWithOperations]
      -> Text -> Maybe Int -> V1ValidatingWebhook)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LabelSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"objectSelector")
      Parser
  (Maybe [V1RuleWithOperations]
   -> Text -> Maybe Int -> V1ValidatingWebhook)
-> Parser (Maybe [V1RuleWithOperations])
-> Parser (Text -> Maybe Int -> V1ValidatingWebhook)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1RuleWithOperations])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"rules")
      Parser (Text -> Maybe Int -> V1ValidatingWebhook)
-> Parser Text -> Parser (Maybe Int -> V1ValidatingWebhook)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"sideEffects")
      Parser (Maybe Int -> V1ValidatingWebhook)
-> Parser (Maybe Int) -> Parser V1ValidatingWebhook
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"timeoutSeconds")

-- | ToJSON V1ValidatingWebhook
instance A.ToJSON V1ValidatingWebhook where
  toJSON :: V1ValidatingWebhook -> Value
toJSON V1ValidatingWebhook {[Text]
Maybe Int
Maybe [V1RuleWithOperations]
Maybe [V1MatchCondition]
Maybe Text
Maybe V1LabelSelector
Text
AdmissionregistrationV1WebhookClientConfig
$sel:v1ValidatingWebhookAdmissionReviewVersions:V1ValidatingWebhook :: V1ValidatingWebhook -> [Text]
$sel:v1ValidatingWebhookClientConfig:V1ValidatingWebhook :: V1ValidatingWebhook -> AdmissionregistrationV1WebhookClientConfig
$sel:v1ValidatingWebhookFailurePolicy:V1ValidatingWebhook :: V1ValidatingWebhook -> Maybe Text
$sel:v1ValidatingWebhookMatchConditions:V1ValidatingWebhook :: V1ValidatingWebhook -> Maybe [V1MatchCondition]
$sel:v1ValidatingWebhookMatchPolicy:V1ValidatingWebhook :: V1ValidatingWebhook -> Maybe Text
$sel:v1ValidatingWebhookName:V1ValidatingWebhook :: V1ValidatingWebhook -> Text
$sel:v1ValidatingWebhookNamespaceSelector:V1ValidatingWebhook :: V1ValidatingWebhook -> Maybe V1LabelSelector
$sel:v1ValidatingWebhookObjectSelector:V1ValidatingWebhook :: V1ValidatingWebhook -> Maybe V1LabelSelector
$sel:v1ValidatingWebhookRules:V1ValidatingWebhook :: V1ValidatingWebhook -> Maybe [V1RuleWithOperations]
$sel:v1ValidatingWebhookSideEffects:V1ValidatingWebhook :: V1ValidatingWebhook -> Text
$sel:v1ValidatingWebhookTimeoutSeconds:V1ValidatingWebhook :: V1ValidatingWebhook -> Maybe Int
v1ValidatingWebhookAdmissionReviewVersions :: [Text]
v1ValidatingWebhookClientConfig :: AdmissionregistrationV1WebhookClientConfig
v1ValidatingWebhookFailurePolicy :: Maybe Text
v1ValidatingWebhookMatchConditions :: Maybe [V1MatchCondition]
v1ValidatingWebhookMatchPolicy :: Maybe Text
v1ValidatingWebhookName :: Text
v1ValidatingWebhookNamespaceSelector :: Maybe V1LabelSelector
v1ValidatingWebhookObjectSelector :: Maybe V1LabelSelector
v1ValidatingWebhookRules :: Maybe [V1RuleWithOperations]
v1ValidatingWebhookSideEffects :: Text
v1ValidatingWebhookTimeoutSeconds :: Maybe Int
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"admissionReviewVersions" Key -> [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [Text]
v1ValidatingWebhookAdmissionReviewVersions
      , Key
"clientConfig" Key -> AdmissionregistrationV1WebhookClientConfig -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= AdmissionregistrationV1WebhookClientConfig
v1ValidatingWebhookClientConfig
      , Key
"failurePolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ValidatingWebhookFailurePolicy
      , Key
"matchConditions" Key -> Maybe [V1MatchCondition] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1MatchCondition]
v1ValidatingWebhookMatchConditions
      , Key
"matchPolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ValidatingWebhookMatchPolicy
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ValidatingWebhookName
      , Key
"namespaceSelector" Key -> Maybe V1LabelSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LabelSelector
v1ValidatingWebhookNamespaceSelector
      , Key
"objectSelector" Key -> Maybe V1LabelSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LabelSelector
v1ValidatingWebhookObjectSelector
      , Key
"rules" Key -> Maybe [V1RuleWithOperations] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1RuleWithOperations]
v1ValidatingWebhookRules
      , Key
"sideEffects" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ValidatingWebhookSideEffects
      , Key
"timeoutSeconds" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1ValidatingWebhookTimeoutSeconds
      ]


-- | Construct a value of type 'V1ValidatingWebhook' (by applying it's required fields, if any)
mkV1ValidatingWebhook
  :: [Text] -- ^ 'v1ValidatingWebhookAdmissionReviewVersions': AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy.
  -> AdmissionregistrationV1WebhookClientConfig -- ^ 'v1ValidatingWebhookClientConfig' 
  -> Text -- ^ 'v1ValidatingWebhookName': The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required.
  -> Text -- ^ 'v1ValidatingWebhookSideEffects': SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some.
  -> V1ValidatingWebhook
mkV1ValidatingWebhook :: [Text]
-> AdmissionregistrationV1WebhookClientConfig
-> Text
-> Text
-> V1ValidatingWebhook
mkV1ValidatingWebhook [Text]
v1ValidatingWebhookAdmissionReviewVersions AdmissionregistrationV1WebhookClientConfig
v1ValidatingWebhookClientConfig Text
v1ValidatingWebhookName Text
v1ValidatingWebhookSideEffects =
  V1ValidatingWebhook
  { [Text]
$sel:v1ValidatingWebhookAdmissionReviewVersions:V1ValidatingWebhook :: [Text]
v1ValidatingWebhookAdmissionReviewVersions :: [Text]
v1ValidatingWebhookAdmissionReviewVersions
  , AdmissionregistrationV1WebhookClientConfig
$sel:v1ValidatingWebhookClientConfig:V1ValidatingWebhook :: AdmissionregistrationV1WebhookClientConfig
v1ValidatingWebhookClientConfig :: AdmissionregistrationV1WebhookClientConfig
v1ValidatingWebhookClientConfig
  , $sel:v1ValidatingWebhookFailurePolicy:V1ValidatingWebhook :: Maybe Text
v1ValidatingWebhookFailurePolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ValidatingWebhookMatchConditions:V1ValidatingWebhook :: Maybe [V1MatchCondition]
v1ValidatingWebhookMatchConditions = Maybe [V1MatchCondition]
forall a. Maybe a
Nothing
  , $sel:v1ValidatingWebhookMatchPolicy:V1ValidatingWebhook :: Maybe Text
v1ValidatingWebhookMatchPolicy = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1ValidatingWebhookName:V1ValidatingWebhook :: Text
v1ValidatingWebhookName :: Text
v1ValidatingWebhookName
  , $sel:v1ValidatingWebhookNamespaceSelector:V1ValidatingWebhook :: Maybe V1LabelSelector
v1ValidatingWebhookNamespaceSelector = Maybe V1LabelSelector
forall a. Maybe a
Nothing
  , $sel:v1ValidatingWebhookObjectSelector:V1ValidatingWebhook :: Maybe V1LabelSelector
v1ValidatingWebhookObjectSelector = Maybe V1LabelSelector
forall a. Maybe a
Nothing
  , $sel:v1ValidatingWebhookRules:V1ValidatingWebhook :: Maybe [V1RuleWithOperations]
v1ValidatingWebhookRules = Maybe [V1RuleWithOperations]
forall a. Maybe a
Nothing
  , Text
$sel:v1ValidatingWebhookSideEffects:V1ValidatingWebhook :: Text
v1ValidatingWebhookSideEffects :: Text
v1ValidatingWebhookSideEffects
  , $sel:v1ValidatingWebhookTimeoutSeconds:V1ValidatingWebhook :: Maybe Int
v1ValidatingWebhookTimeoutSeconds = Maybe Int
forall a. Maybe a
Nothing
  }

-- ** V1ValidatingWebhookConfiguration
-- | V1ValidatingWebhookConfiguration
-- ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it.
data V1ValidatingWebhookConfiguration = V1ValidatingWebhookConfiguration
  { V1ValidatingWebhookConfiguration -> Maybe Text
v1ValidatingWebhookConfigurationApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1ValidatingWebhookConfiguration -> Maybe Text
v1ValidatingWebhookConfigurationKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1ValidatingWebhookConfiguration -> Maybe V1ObjectMeta
v1ValidatingWebhookConfigurationMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1ValidatingWebhookConfiguration -> Maybe [V1ValidatingWebhook]
v1ValidatingWebhookConfigurationWebhooks :: !(Maybe [V1ValidatingWebhook]) -- ^ "webhooks" - Webhooks is a list of webhooks and the affected resources and operations.
  } deriving (Int -> V1ValidatingWebhookConfiguration -> ShowS
[V1ValidatingWebhookConfiguration] -> ShowS
V1ValidatingWebhookConfiguration -> String
(Int -> V1ValidatingWebhookConfiguration -> ShowS)
-> (V1ValidatingWebhookConfiguration -> String)
-> ([V1ValidatingWebhookConfiguration] -> ShowS)
-> Show V1ValidatingWebhookConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ValidatingWebhookConfiguration -> ShowS
showsPrec :: Int -> V1ValidatingWebhookConfiguration -> ShowS
$cshow :: V1ValidatingWebhookConfiguration -> String
show :: V1ValidatingWebhookConfiguration -> String
$cshowList :: [V1ValidatingWebhookConfiguration] -> ShowS
showList :: [V1ValidatingWebhookConfiguration] -> ShowS
P.Show, V1ValidatingWebhookConfiguration
-> V1ValidatingWebhookConfiguration -> Bool
(V1ValidatingWebhookConfiguration
 -> V1ValidatingWebhookConfiguration -> Bool)
-> (V1ValidatingWebhookConfiguration
    -> V1ValidatingWebhookConfiguration -> Bool)
-> Eq V1ValidatingWebhookConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ValidatingWebhookConfiguration
-> V1ValidatingWebhookConfiguration -> Bool
== :: V1ValidatingWebhookConfiguration
-> V1ValidatingWebhookConfiguration -> Bool
$c/= :: V1ValidatingWebhookConfiguration
-> V1ValidatingWebhookConfiguration -> Bool
/= :: V1ValidatingWebhookConfiguration
-> V1ValidatingWebhookConfiguration -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ValidatingWebhookConfiguration
instance A.FromJSON V1ValidatingWebhookConfiguration where
  parseJSON :: Value -> Parser V1ValidatingWebhookConfiguration
parseJSON = String
-> (Object -> Parser V1ValidatingWebhookConfiguration)
-> Value
-> Parser V1ValidatingWebhookConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ValidatingWebhookConfiguration" ((Object -> Parser V1ValidatingWebhookConfiguration)
 -> Value -> Parser V1ValidatingWebhookConfiguration)
-> (Object -> Parser V1ValidatingWebhookConfiguration)
-> Value
-> Parser V1ValidatingWebhookConfiguration
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe [V1ValidatingWebhook]
-> V1ValidatingWebhookConfiguration
V1ValidatingWebhookConfiguration
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe [V1ValidatingWebhook]
 -> V1ValidatingWebhookConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe [V1ValidatingWebhook]
      -> V1ValidatingWebhookConfiguration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe [V1ValidatingWebhook]
   -> V1ValidatingWebhookConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe [V1ValidatingWebhook] -> V1ValidatingWebhookConfiguration)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe [V1ValidatingWebhook] -> V1ValidatingWebhookConfiguration)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe [V1ValidatingWebhook] -> V1ValidatingWebhookConfiguration)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (Maybe [V1ValidatingWebhook] -> V1ValidatingWebhookConfiguration)
-> Parser (Maybe [V1ValidatingWebhook])
-> Parser V1ValidatingWebhookConfiguration
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1ValidatingWebhook])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"webhooks")

-- | ToJSON V1ValidatingWebhookConfiguration
instance A.ToJSON V1ValidatingWebhookConfiguration where
  toJSON :: V1ValidatingWebhookConfiguration -> Value
toJSON V1ValidatingWebhookConfiguration {Maybe [V1ValidatingWebhook]
Maybe Text
Maybe V1ObjectMeta
$sel:v1ValidatingWebhookConfigurationApiVersion:V1ValidatingWebhookConfiguration :: V1ValidatingWebhookConfiguration -> Maybe Text
$sel:v1ValidatingWebhookConfigurationKind:V1ValidatingWebhookConfiguration :: V1ValidatingWebhookConfiguration -> Maybe Text
$sel:v1ValidatingWebhookConfigurationMetadata:V1ValidatingWebhookConfiguration :: V1ValidatingWebhookConfiguration -> Maybe V1ObjectMeta
$sel:v1ValidatingWebhookConfigurationWebhooks:V1ValidatingWebhookConfiguration :: V1ValidatingWebhookConfiguration -> Maybe [V1ValidatingWebhook]
v1ValidatingWebhookConfigurationApiVersion :: Maybe Text
v1ValidatingWebhookConfigurationKind :: Maybe Text
v1ValidatingWebhookConfigurationMetadata :: Maybe V1ObjectMeta
v1ValidatingWebhookConfigurationWebhooks :: Maybe [V1ValidatingWebhook]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ValidatingWebhookConfigurationApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ValidatingWebhookConfigurationKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1ValidatingWebhookConfigurationMetadata
      , Key
"webhooks" Key -> Maybe [V1ValidatingWebhook] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1ValidatingWebhook]
v1ValidatingWebhookConfigurationWebhooks
      ]


-- | Construct a value of type 'V1ValidatingWebhookConfiguration' (by applying it's required fields, if any)
mkV1ValidatingWebhookConfiguration
  :: V1ValidatingWebhookConfiguration
mkV1ValidatingWebhookConfiguration :: V1ValidatingWebhookConfiguration
mkV1ValidatingWebhookConfiguration =
  V1ValidatingWebhookConfiguration
  { $sel:v1ValidatingWebhookConfigurationApiVersion:V1ValidatingWebhookConfiguration :: Maybe Text
v1ValidatingWebhookConfigurationApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ValidatingWebhookConfigurationKind:V1ValidatingWebhookConfiguration :: Maybe Text
v1ValidatingWebhookConfigurationKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ValidatingWebhookConfigurationMetadata:V1ValidatingWebhookConfiguration :: Maybe V1ObjectMeta
v1ValidatingWebhookConfigurationMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1ValidatingWebhookConfigurationWebhooks:V1ValidatingWebhookConfiguration :: Maybe [V1ValidatingWebhook]
v1ValidatingWebhookConfigurationWebhooks = Maybe [V1ValidatingWebhook]
forall a. Maybe a
Nothing
  }

-- ** V1ValidatingWebhookConfigurationList
-- | V1ValidatingWebhookConfigurationList
-- ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration.
data V1ValidatingWebhookConfigurationList = V1ValidatingWebhookConfigurationList
  { V1ValidatingWebhookConfigurationList -> Maybe Text
v1ValidatingWebhookConfigurationListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1ValidatingWebhookConfigurationList
-> [V1ValidatingWebhookConfiguration]
v1ValidatingWebhookConfigurationListItems :: !([V1ValidatingWebhookConfiguration]) -- ^ /Required/ "items" - List of ValidatingWebhookConfiguration.
  , V1ValidatingWebhookConfigurationList -> Maybe Text
v1ValidatingWebhookConfigurationListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1ValidatingWebhookConfigurationList -> Maybe V1ListMeta
v1ValidatingWebhookConfigurationListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1ValidatingWebhookConfigurationList -> ShowS
[V1ValidatingWebhookConfigurationList] -> ShowS
V1ValidatingWebhookConfigurationList -> String
(Int -> V1ValidatingWebhookConfigurationList -> ShowS)
-> (V1ValidatingWebhookConfigurationList -> String)
-> ([V1ValidatingWebhookConfigurationList] -> ShowS)
-> Show V1ValidatingWebhookConfigurationList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ValidatingWebhookConfigurationList -> ShowS
showsPrec :: Int -> V1ValidatingWebhookConfigurationList -> ShowS
$cshow :: V1ValidatingWebhookConfigurationList -> String
show :: V1ValidatingWebhookConfigurationList -> String
$cshowList :: [V1ValidatingWebhookConfigurationList] -> ShowS
showList :: [V1ValidatingWebhookConfigurationList] -> ShowS
P.Show, V1ValidatingWebhookConfigurationList
-> V1ValidatingWebhookConfigurationList -> Bool
(V1ValidatingWebhookConfigurationList
 -> V1ValidatingWebhookConfigurationList -> Bool)
-> (V1ValidatingWebhookConfigurationList
    -> V1ValidatingWebhookConfigurationList -> Bool)
-> Eq V1ValidatingWebhookConfigurationList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ValidatingWebhookConfigurationList
-> V1ValidatingWebhookConfigurationList -> Bool
== :: V1ValidatingWebhookConfigurationList
-> V1ValidatingWebhookConfigurationList -> Bool
$c/= :: V1ValidatingWebhookConfigurationList
-> V1ValidatingWebhookConfigurationList -> Bool
/= :: V1ValidatingWebhookConfigurationList
-> V1ValidatingWebhookConfigurationList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ValidatingWebhookConfigurationList
instance A.FromJSON V1ValidatingWebhookConfigurationList where
  parseJSON :: Value -> Parser V1ValidatingWebhookConfigurationList
parseJSON = String
-> (Object -> Parser V1ValidatingWebhookConfigurationList)
-> Value
-> Parser V1ValidatingWebhookConfigurationList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ValidatingWebhookConfigurationList" ((Object -> Parser V1ValidatingWebhookConfigurationList)
 -> Value -> Parser V1ValidatingWebhookConfigurationList)
-> (Object -> Parser V1ValidatingWebhookConfigurationList)
-> Value
-> Parser V1ValidatingWebhookConfigurationList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1ValidatingWebhookConfiguration]
-> Maybe Text
-> Maybe V1ListMeta
-> V1ValidatingWebhookConfigurationList
V1ValidatingWebhookConfigurationList
      (Maybe Text
 -> [V1ValidatingWebhookConfiguration]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1ValidatingWebhookConfigurationList)
-> Parser (Maybe Text)
-> Parser
     ([V1ValidatingWebhookConfiguration]
      -> Maybe Text
      -> Maybe V1ListMeta
      -> V1ValidatingWebhookConfigurationList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1ValidatingWebhookConfiguration]
   -> Maybe Text
   -> Maybe V1ListMeta
   -> V1ValidatingWebhookConfigurationList)
-> Parser [V1ValidatingWebhookConfiguration]
-> Parser
     (Maybe Text
      -> Maybe V1ListMeta -> V1ValidatingWebhookConfigurationList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1ValidatingWebhookConfiguration]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser
  (Maybe Text
   -> Maybe V1ListMeta -> V1ValidatingWebhookConfigurationList)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ListMeta -> V1ValidatingWebhookConfigurationList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1ValidatingWebhookConfigurationList)
-> Parser (Maybe V1ListMeta)
-> Parser V1ValidatingWebhookConfigurationList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1ValidatingWebhookConfigurationList
instance A.ToJSON V1ValidatingWebhookConfigurationList where
  toJSON :: V1ValidatingWebhookConfigurationList -> Value
toJSON V1ValidatingWebhookConfigurationList {[V1ValidatingWebhookConfiguration]
Maybe Text
Maybe V1ListMeta
$sel:v1ValidatingWebhookConfigurationListApiVersion:V1ValidatingWebhookConfigurationList :: V1ValidatingWebhookConfigurationList -> Maybe Text
$sel:v1ValidatingWebhookConfigurationListItems:V1ValidatingWebhookConfigurationList :: V1ValidatingWebhookConfigurationList
-> [V1ValidatingWebhookConfiguration]
$sel:v1ValidatingWebhookConfigurationListKind:V1ValidatingWebhookConfigurationList :: V1ValidatingWebhookConfigurationList -> Maybe Text
$sel:v1ValidatingWebhookConfigurationListMetadata:V1ValidatingWebhookConfigurationList :: V1ValidatingWebhookConfigurationList -> Maybe V1ListMeta
v1ValidatingWebhookConfigurationListApiVersion :: Maybe Text
v1ValidatingWebhookConfigurationListItems :: [V1ValidatingWebhookConfiguration]
v1ValidatingWebhookConfigurationListKind :: Maybe Text
v1ValidatingWebhookConfigurationListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ValidatingWebhookConfigurationListApiVersion
      , Key
"items" Key -> [V1ValidatingWebhookConfiguration] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1ValidatingWebhookConfiguration]
v1ValidatingWebhookConfigurationListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ValidatingWebhookConfigurationListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1ValidatingWebhookConfigurationListMetadata
      ]


-- | Construct a value of type 'V1ValidatingWebhookConfigurationList' (by applying it's required fields, if any)
mkV1ValidatingWebhookConfigurationList
  :: [V1ValidatingWebhookConfiguration] -- ^ 'v1ValidatingWebhookConfigurationListItems': List of ValidatingWebhookConfiguration.
  -> V1ValidatingWebhookConfigurationList
mkV1ValidatingWebhookConfigurationList :: [V1ValidatingWebhookConfiguration]
-> V1ValidatingWebhookConfigurationList
mkV1ValidatingWebhookConfigurationList [V1ValidatingWebhookConfiguration]
v1ValidatingWebhookConfigurationListItems =
  V1ValidatingWebhookConfigurationList
  { $sel:v1ValidatingWebhookConfigurationListApiVersion:V1ValidatingWebhookConfigurationList :: Maybe Text
v1ValidatingWebhookConfigurationListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1ValidatingWebhookConfiguration]
$sel:v1ValidatingWebhookConfigurationListItems:V1ValidatingWebhookConfigurationList :: [V1ValidatingWebhookConfiguration]
v1ValidatingWebhookConfigurationListItems :: [V1ValidatingWebhookConfiguration]
v1ValidatingWebhookConfigurationListItems
  , $sel:v1ValidatingWebhookConfigurationListKind:V1ValidatingWebhookConfigurationList :: Maybe Text
v1ValidatingWebhookConfigurationListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ValidatingWebhookConfigurationListMetadata:V1ValidatingWebhookConfigurationList :: Maybe V1ListMeta
v1ValidatingWebhookConfigurationListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1Validation
-- | V1Validation
-- Validation specifies the CEL expression which is used to apply the validation.
data V1Validation = V1Validation
  { V1Validation -> Text
v1ValidationExpression :: !(Text) -- ^ /Required/ "expression" - Expression represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:  - &#39;object&#39; - The object from the incoming request. The value is null for DELETE requests. - &#39;oldObject&#39; - The existing object. The value is null for CREATE requests. - &#39;request&#39; - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - &#39;params&#39; - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - &#39;namespaceObject&#39; - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - &#39;variables&#39; - Map of composited variables, from its name to its lazily evaluated value.   For example, a variable named &#39;foo&#39; can be accessed as &#39;variables.foo&#39;. - &#39;authorizer&#39; - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.   See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz - &#39;authorizer.requestResource&#39; - A CEL ResourceCheck constructed from the &#39;authorizer&#39; and configured with the   request resource.  The &#x60;apiVersion&#x60;, &#x60;kind&#x60;, &#x60;metadata.name&#x60; and &#x60;metadata.generateName&#x60; are always accessible from the root of the object. No other metadata properties are accessible.  Only property names of the form &#x60;[a-zA-Z_.-/][a-zA-Z0-9_.-/]*&#x60; are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - &#39;__&#39; escapes to &#39;__underscores__&#39; - &#39;.&#39; escapes to &#39;__dot__&#39; - &#39;-&#39; escapes to &#39;__dash__&#39; - &#39;/&#39; escapes to &#39;__slash__&#39; - Property names that exactly match a CEL RESERVED keyword escape to &#39;__{keyword}__&#39;. The keywords are:    \&quot;true\&quot;, \&quot;false\&quot;, \&quot;null\&quot;, \&quot;in\&quot;, \&quot;as\&quot;, \&quot;break\&quot;, \&quot;const\&quot;, \&quot;continue\&quot;, \&quot;else\&quot;, \&quot;for\&quot;, \&quot;function\&quot;, \&quot;if\&quot;,    \&quot;import\&quot;, \&quot;let\&quot;, \&quot;loop\&quot;, \&quot;package\&quot;, \&quot;namespace\&quot;, \&quot;return\&quot;. Examples:   - Expression accessing a property named \&quot;namespace\&quot;: {\&quot;Expression\&quot;: \&quot;object.__namespace__ &gt; 0\&quot;}   - Expression accessing a property named \&quot;x-prop\&quot;: {\&quot;Expression\&quot;: \&quot;object.x__dash__prop &gt; 0\&quot;}   - Expression accessing a property named \&quot;redact__d\&quot;: {\&quot;Expression\&quot;: \&quot;object.redact__underscores__d &gt; 0\&quot;}  Equality on arrays with list type of &#39;set&#39; or &#39;map&#39; ignores element order, i.e. [1, 2] &#x3D;&#x3D; [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type:   - &#39;set&#39;: &#x60;X + Y&#x60; performs a union where the array positions of all elements in &#x60;X&#x60; are preserved and     non-intersecting elements in &#x60;Y&#x60; are appended, retaining their partial order.   - &#39;map&#39;: &#x60;X + Y&#x60; performs a merge where the array positions of all keys in &#x60;X&#x60; are preserved but the values     are overwritten by values in &#x60;Y&#x60; when the key sets of &#x60;X&#x60; and &#x60;Y&#x60; intersect. Elements in &#x60;Y&#x60; with     non-intersecting keys are appended, retaining their partial order. Required.
  , V1Validation -> Maybe Text
v1ValidationMessage :: !(Maybe Text) -- ^ "message" - Message represents the message displayed when validation fails. The message is required if the Expression contains line breaks. The message must not contain line breaks. If unset, the message is \&quot;failed rule: {Rule}\&quot;. e.g. \&quot;must be a URL with the host matching spec.host\&quot; If the Expression contains line breaks. Message is required. The message must not contain line breaks. If unset, the message is \&quot;failed Expression: {Expression}\&quot;.
  , V1Validation -> Maybe Text
v1ValidationMessageExpression :: !(Maybe Text) -- ^ "messageExpression" - messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. messageExpression has access to all the same variables as the &#x60;expression&#x60; except for &#39;authorizer&#39; and &#39;authorizer.requestResource&#39;. Example: \&quot;object.x must be less than max (\&quot;+string(params.max)+\&quot;)\&quot;
  , V1Validation -> Maybe Text
v1ValidationReason :: !(Maybe Text) -- ^ "reason" - Reason represents a machine-readable description of why this validation failed. If this is the first validation in the list to fail, this reason, as well as the corresponding HTTP response code, are used in the HTTP response to the client. The currently supported reasons are: \&quot;Unauthorized\&quot;, \&quot;Forbidden\&quot;, \&quot;Invalid\&quot;, \&quot;RequestEntityTooLarge\&quot;. If not set, StatusReasonInvalid is used in the response to the client.
  } deriving (Int -> V1Validation -> ShowS
[V1Validation] -> ShowS
V1Validation -> String
(Int -> V1Validation -> ShowS)
-> (V1Validation -> String)
-> ([V1Validation] -> ShowS)
-> Show V1Validation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1Validation -> ShowS
showsPrec :: Int -> V1Validation -> ShowS
$cshow :: V1Validation -> String
show :: V1Validation -> String
$cshowList :: [V1Validation] -> ShowS
showList :: [V1Validation] -> ShowS
P.Show, V1Validation -> V1Validation -> Bool
(V1Validation -> V1Validation -> Bool)
-> (V1Validation -> V1Validation -> Bool) -> Eq V1Validation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1Validation -> V1Validation -> Bool
== :: V1Validation -> V1Validation -> Bool
$c/= :: V1Validation -> V1Validation -> Bool
/= :: V1Validation -> V1Validation -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1Validation
instance A.FromJSON V1Validation where
  parseJSON :: Value -> Parser V1Validation
parseJSON = String
-> (Object -> Parser V1Validation) -> Value -> Parser V1Validation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1Validation" ((Object -> Parser V1Validation) -> Value -> Parser V1Validation)
-> (Object -> Parser V1Validation) -> Value -> Parser V1Validation
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Maybe Text -> Maybe Text -> Maybe Text -> V1Validation
V1Validation
      (Text -> Maybe Text -> Maybe Text -> Maybe Text -> V1Validation)
-> Parser Text
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> V1Validation)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"expression")
      Parser (Maybe Text -> Maybe Text -> Maybe Text -> V1Validation)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> V1Validation)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"message")
      Parser (Maybe Text -> Maybe Text -> V1Validation)
-> Parser (Maybe Text) -> Parser (Maybe Text -> V1Validation)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"messageExpression")
      Parser (Maybe Text -> V1Validation)
-> Parser (Maybe Text) -> Parser V1Validation
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reason")

-- | ToJSON V1Validation
instance A.ToJSON V1Validation where
  toJSON :: V1Validation -> Value
toJSON V1Validation {Maybe Text
Text
$sel:v1ValidationExpression:V1Validation :: V1Validation -> Text
$sel:v1ValidationMessage:V1Validation :: V1Validation -> Maybe Text
$sel:v1ValidationMessageExpression:V1Validation :: V1Validation -> Maybe Text
$sel:v1ValidationReason:V1Validation :: V1Validation -> Maybe Text
v1ValidationExpression :: Text
v1ValidationMessage :: Maybe Text
v1ValidationMessageExpression :: Maybe Text
v1ValidationReason :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"expression" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ValidationExpression
      , Key
"message" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ValidationMessage
      , Key
"messageExpression" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ValidationMessageExpression
      , Key
"reason" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ValidationReason
      ]


-- | Construct a value of type 'V1Validation' (by applying it's required fields, if any)
mkV1Validation
  :: Text -- ^ 'v1ValidationExpression': Expression represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:  - 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value.   For example, a variable named 'foo' can be accessed as 'variables.foo'. - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.   See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the   request resource.  The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible.  Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are:    \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\",    \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\". Examples:   - Expression accessing a property named \"namespace\": {\"Expression\": \"object.__namespace__ > 0\"}   - Expression accessing a property named \"x-prop\": {\"Expression\": \"object.x__dash__prop > 0\"}   - Expression accessing a property named \"redact__d\": {\"Expression\": \"object.redact__underscores__d > 0\"}  Equality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type:   - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and     non-intersecting elements in `Y` are appended, retaining their partial order.   - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values     are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with     non-intersecting keys are appended, retaining their partial order. Required.
  -> V1Validation
mkV1Validation :: Text -> V1Validation
mkV1Validation Text
v1ValidationExpression =
  V1Validation
  { Text
$sel:v1ValidationExpression:V1Validation :: Text
v1ValidationExpression :: Text
v1ValidationExpression
  , $sel:v1ValidationMessage:V1Validation :: Maybe Text
v1ValidationMessage = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ValidationMessageExpression:V1Validation :: Maybe Text
v1ValidationMessageExpression = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ValidationReason:V1Validation :: Maybe Text
v1ValidationReason = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1ValidationRule
-- | V1ValidationRule
-- ValidationRule describes a validation rule written in the CEL expression language.
data V1ValidationRule = V1ValidationRule
  { V1ValidationRule -> Maybe Text
v1ValidationRuleFieldPath :: !(Maybe Text) -- ^ "fieldPath" - fieldPath represents the field path returned when the validation fails. It must be a relative JSON path (i.e. with array notation) scoped to the location of this x-kubernetes-validations extension in the schema and refer to an existing field. e.g. when validation checks if a specific attribute &#x60;foo&#x60; under a map &#x60;testMap&#x60;, the fieldPath could be set to &#x60;.testMap.foo&#x60; If the validation checks two lists must have unique attributes, the fieldPath could be set to either of the list: e.g. &#x60;.testList&#x60; It does not support list numeric index. It supports child operation to refer to an existing field currently. Refer to [JSONPath support in Kubernetes](https://kubernetes.io/docs/reference/kubectl/jsonpath/) for more info. Numeric index of array is not supported. For field name which contains special characters, use &#x60;[&#39;specialName&#39;]&#x60; to refer the field name. e.g. for attribute &#x60;foo.34$&#x60; appears in a list &#x60;testList&#x60;, the fieldPath could be set to &#x60;.testList[&#39;foo.34$&#39;]&#x60;
  , V1ValidationRule -> Maybe Text
v1ValidationRuleMessage :: !(Maybe Text) -- ^ "message" - Message represents the message displayed when validation fails. The message is required if the Rule contains line breaks. The message must not contain line breaks. If unset, the message is \&quot;failed rule: {Rule}\&quot;. e.g. \&quot;must be a URL with the host matching spec.host\&quot;
  , V1ValidationRule -> Maybe Text
v1ValidationRuleMessageExpression :: !(Maybe Text) -- ^ "messageExpression" - MessageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a rule, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. messageExpression has access to all the same variables as the rule; the only difference is the return type. Example: \&quot;x must be less than max (\&quot;+string(self.max)+\&quot;)\&quot;
  , V1ValidationRule -> Maybe Bool
v1ValidationRuleOptionalOldSelf :: !(Maybe Bool) -- ^ "optionalOldSelf" - optionalOldSelf is used to opt a transition rule into evaluation even when the object is first created, or if the old object is missing the value.  When enabled &#x60;oldSelf&#x60; will be a CEL optional whose value will be &#x60;None&#x60; if there is no old value, or when the object is initially created.  You may check for presence of oldSelf using &#x60;oldSelf.hasValue()&#x60; and unwrap it after checking using &#x60;oldSelf.value()&#x60;. Check the CEL documentation for Optional types for more information: https://pkg.go.dev/github.com/google/cel-go/cel#OptionalTypes  May not be set unless &#x60;oldSelf&#x60; is used in &#x60;rule&#x60;.
  , V1ValidationRule -> Maybe Text
v1ValidationRuleReason :: !(Maybe Text) -- ^ "reason" - reason provides a machine-readable validation failure reason that is returned to the caller when a request fails this validation rule. The HTTP status code returned to the caller will match the reason of the reason of the first failed validation rule. The currently supported reasons are: \&quot;FieldValueInvalid\&quot;, \&quot;FieldValueForbidden\&quot;, \&quot;FieldValueRequired\&quot;, \&quot;FieldValueDuplicate\&quot;. If not set, default to use \&quot;FieldValueInvalid\&quot;. All future added reasons must be accepted by clients when reading this value and unknown reasons should be treated as FieldValueInvalid.
  , V1ValidationRule -> Text
v1ValidationRuleRule :: !(Text) -- ^ /Required/ "rule" - Rule represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec The Rule is scoped to the location of the x-kubernetes-validations extension in the schema. The &#x60;self&#x60; variable in the CEL expression is bound to the scoped value. Example: - Rule scoped to the root of a resource with a status subresource: {\&quot;rule\&quot;: \&quot;self.status.actual &lt;&#x3D; self.spec.maxDesired\&quot;}  If the Rule is scoped to an object with properties, the accessible properties of the object are field selectable via &#x60;self.field&#x60; and field presence can be checked via &#x60;has(self.field)&#x60;. Null valued fields are treated as absent fields in CEL expressions. If the Rule is scoped to an object with additionalProperties (i.e. a map) the value of the map are accessible via &#x60;self[mapKey]&#x60;, map containment can be checked via &#x60;mapKey in self&#x60; and all entries of the map are accessible via CEL macros and functions such as &#x60;self.all(...)&#x60;. If the Rule is scoped to an array, the elements of the array are accessible via &#x60;self[i]&#x60; and also by macros and functions. If the Rule is scoped to a scalar, &#x60;self&#x60; is bound to the scalar value. Examples: - Rule scoped to a map of objects: {\&quot;rule\&quot;: \&quot;self.components[&#39;Widget&#39;].priority &lt; 10\&quot;} - Rule scoped to a list of integers: {\&quot;rule\&quot;: \&quot;self.values.all(value, value &gt;&#x3D; 0 &amp;&amp; value &lt; 100)\&quot;} - Rule scoped to a string value: {\&quot;rule\&quot;: \&quot;self.startsWith(&#39;kube&#39;)\&quot;}  The &#x60;apiVersion&#x60;, &#x60;kind&#x60;, &#x60;metadata.name&#x60; and &#x60;metadata.generateName&#x60; are always accessible from the root of the object and from any x-kubernetes-embedded-resource annotated objects. No other metadata properties are accessible.  Unknown data preserved in custom resources via x-kubernetes-preserve-unknown-fields is not accessible in CEL expressions. This includes: - Unknown field values that are preserved by object schemas with x-kubernetes-preserve-unknown-fields. - Object properties where the property schema is of an \&quot;unknown type\&quot;. An \&quot;unknown type\&quot; is recursively defined as:   - A schema with no type and x-kubernetes-preserve-unknown-fields set to true   - An array where the items schema is of an \&quot;unknown type\&quot;   - An object where the additionalProperties schema is of an \&quot;unknown type\&quot;  Only property names of the form &#x60;[a-zA-Z_.-/][a-zA-Z0-9_.-/]*&#x60; are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - &#39;__&#39; escapes to &#39;__underscores__&#39; - &#39;.&#39; escapes to &#39;__dot__&#39; - &#39;-&#39; escapes to &#39;__dash__&#39; - &#39;/&#39; escapes to &#39;__slash__&#39; - Property names that exactly match a CEL RESERVED keyword escape to &#39;__{keyword}__&#39;. The keywords are:    \&quot;true\&quot;, \&quot;false\&quot;, \&quot;null\&quot;, \&quot;in\&quot;, \&quot;as\&quot;, \&quot;break\&quot;, \&quot;const\&quot;, \&quot;continue\&quot;, \&quot;else\&quot;, \&quot;for\&quot;, \&quot;function\&quot;, \&quot;if\&quot;,    \&quot;import\&quot;, \&quot;let\&quot;, \&quot;loop\&quot;, \&quot;package\&quot;, \&quot;namespace\&quot;, \&quot;return\&quot;. Examples:   - Rule accessing a property named \&quot;namespace\&quot;: {\&quot;rule\&quot;: \&quot;self.__namespace__ &gt; 0\&quot;}   - Rule accessing a property named \&quot;x-prop\&quot;: {\&quot;rule\&quot;: \&quot;self.x__dash__prop &gt; 0\&quot;}   - Rule accessing a property named \&quot;redact__d\&quot;: {\&quot;rule\&quot;: \&quot;self.redact__underscores__d &gt; 0\&quot;}  Equality on arrays with x-kubernetes-list-type of &#39;set&#39; or &#39;map&#39; ignores element order, i.e. [1, 2] &#x3D;&#x3D; [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type:   - &#39;set&#39;: &#x60;X + Y&#x60; performs a union where the array positions of all elements in &#x60;X&#x60; are preserved and     non-intersecting elements in &#x60;Y&#x60; are appended, retaining their partial order.   - &#39;map&#39;: &#x60;X + Y&#x60; performs a merge where the array positions of all keys in &#x60;X&#x60; are preserved but the values     are overwritten by values in &#x60;Y&#x60; when the key sets of &#x60;X&#x60; and &#x60;Y&#x60; intersect. Elements in &#x60;Y&#x60; with     non-intersecting keys are appended, retaining their partial order.  If &#x60;rule&#x60; makes use of the &#x60;oldSelf&#x60; variable it is implicitly a &#x60;transition rule&#x60;.  By default, the &#x60;oldSelf&#x60; variable is the same type as &#x60;self&#x60;. When &#x60;optionalOldSelf&#x60; is true, the &#x60;oldSelf&#x60; variable is a CEL optional  variable whose value() is the same type as &#x60;self&#x60;. See the documentation for the &#x60;optionalOldSelf&#x60; field for details.  Transition rules by default are applied only on UPDATE requests and are skipped if an old value could not be found. You can opt a transition rule into unconditional evaluation by setting &#x60;optionalOldSelf&#x60; to true.
  } deriving (Int -> V1ValidationRule -> ShowS
[V1ValidationRule] -> ShowS
V1ValidationRule -> String
(Int -> V1ValidationRule -> ShowS)
-> (V1ValidationRule -> String)
-> ([V1ValidationRule] -> ShowS)
-> Show V1ValidationRule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1ValidationRule -> ShowS
showsPrec :: Int -> V1ValidationRule -> ShowS
$cshow :: V1ValidationRule -> String
show :: V1ValidationRule -> String
$cshowList :: [V1ValidationRule] -> ShowS
showList :: [V1ValidationRule] -> ShowS
P.Show, V1ValidationRule -> V1ValidationRule -> Bool
(V1ValidationRule -> V1ValidationRule -> Bool)
-> (V1ValidationRule -> V1ValidationRule -> Bool)
-> Eq V1ValidationRule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1ValidationRule -> V1ValidationRule -> Bool
== :: V1ValidationRule -> V1ValidationRule -> Bool
$c/= :: V1ValidationRule -> V1ValidationRule -> Bool
/= :: V1ValidationRule -> V1ValidationRule -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1ValidationRule
instance A.FromJSON V1ValidationRule where
  parseJSON :: Value -> Parser V1ValidationRule
parseJSON = String
-> (Object -> Parser V1ValidationRule)
-> Value
-> Parser V1ValidationRule
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1ValidationRule" ((Object -> Parser V1ValidationRule)
 -> Value -> Parser V1ValidationRule)
-> (Object -> Parser V1ValidationRule)
-> Value
-> Parser V1ValidationRule
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Text
-> V1ValidationRule
V1ValidationRule
      (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Text
 -> V1ValidationRule)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Text
      -> V1ValidationRule)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fieldPath")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Text
   -> V1ValidationRule)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Bool -> Maybe Text -> Text -> V1ValidationRule)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"message")
      Parser
  (Maybe Text
   -> Maybe Bool -> Maybe Text -> Text -> V1ValidationRule)
-> Parser (Maybe Text)
-> Parser (Maybe Bool -> Maybe Text -> Text -> V1ValidationRule)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"messageExpression")
      Parser (Maybe Bool -> Maybe Text -> Text -> V1ValidationRule)
-> Parser (Maybe Bool)
-> Parser (Maybe Text -> Text -> V1ValidationRule)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"optionalOldSelf")
      Parser (Maybe Text -> Text -> V1ValidationRule)
-> Parser (Maybe Text) -> Parser (Text -> V1ValidationRule)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reason")
      Parser (Text -> V1ValidationRule)
-> Parser Text -> Parser V1ValidationRule
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"rule")

-- | ToJSON V1ValidationRule
instance A.ToJSON V1ValidationRule where
  toJSON :: V1ValidationRule -> Value
toJSON V1ValidationRule {Maybe Bool
Maybe Text
Text
$sel:v1ValidationRuleFieldPath:V1ValidationRule :: V1ValidationRule -> Maybe Text
$sel:v1ValidationRuleMessage:V1ValidationRule :: V1ValidationRule -> Maybe Text
$sel:v1ValidationRuleMessageExpression:V1ValidationRule :: V1ValidationRule -> Maybe Text
$sel:v1ValidationRuleOptionalOldSelf:V1ValidationRule :: V1ValidationRule -> Maybe Bool
$sel:v1ValidationRuleReason:V1ValidationRule :: V1ValidationRule -> Maybe Text
$sel:v1ValidationRuleRule:V1ValidationRule :: V1ValidationRule -> Text
v1ValidationRuleFieldPath :: Maybe Text
v1ValidationRuleMessage :: Maybe Text
v1ValidationRuleMessageExpression :: Maybe Text
v1ValidationRuleOptionalOldSelf :: Maybe Bool
v1ValidationRuleReason :: Maybe Text
v1ValidationRuleRule :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"fieldPath" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ValidationRuleFieldPath
      , Key
"message" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ValidationRuleMessage
      , Key
"messageExpression" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ValidationRuleMessageExpression
      , Key
"optionalOldSelf" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1ValidationRuleOptionalOldSelf
      , Key
"reason" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1ValidationRuleReason
      , Key
"rule" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1ValidationRuleRule
      ]


-- | Construct a value of type 'V1ValidationRule' (by applying it's required fields, if any)
mkV1ValidationRule
  :: Text -- ^ 'v1ValidationRuleRule': Rule represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec The Rule is scoped to the location of the x-kubernetes-validations extension in the schema. The `self` variable in the CEL expression is bound to the scoped value. Example: - Rule scoped to the root of a resource with a status subresource: {\"rule\": \"self.status.actual <= self.spec.maxDesired\"}  If the Rule is scoped to an object with properties, the accessible properties of the object are field selectable via `self.field` and field presence can be checked via `has(self.field)`. Null valued fields are treated as absent fields in CEL expressions. If the Rule is scoped to an object with additionalProperties (i.e. a map) the value of the map are accessible via `self[mapKey]`, map containment can be checked via `mapKey in self` and all entries of the map are accessible via CEL macros and functions such as `self.all(...)`. If the Rule is scoped to an array, the elements of the array are accessible via `self[i]` and also by macros and functions. If the Rule is scoped to a scalar, `self` is bound to the scalar value. Examples: - Rule scoped to a map of objects: {\"rule\": \"self.components['Widget'].priority < 10\"} - Rule scoped to a list of integers: {\"rule\": \"self.values.all(value, value >= 0 && value < 100)\"} - Rule scoped to a string value: {\"rule\": \"self.startsWith('kube')\"}  The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object and from any x-kubernetes-embedded-resource annotated objects. No other metadata properties are accessible.  Unknown data preserved in custom resources via x-kubernetes-preserve-unknown-fields is not accessible in CEL expressions. This includes: - Unknown field values that are preserved by object schemas with x-kubernetes-preserve-unknown-fields. - Object properties where the property schema is of an \"unknown type\". An \"unknown type\" is recursively defined as:   - A schema with no type and x-kubernetes-preserve-unknown-fields set to true   - An array where the items schema is of an \"unknown type\"   - An object where the additionalProperties schema is of an \"unknown type\"  Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are:    \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\",    \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\". Examples:   - Rule accessing a property named \"namespace\": {\"rule\": \"self.__namespace__ > 0\"}   - Rule accessing a property named \"x-prop\": {\"rule\": \"self.x__dash__prop > 0\"}   - Rule accessing a property named \"redact__d\": {\"rule\": \"self.redact__underscores__d > 0\"}  Equality on arrays with x-kubernetes-list-type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type:   - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and     non-intersecting elements in `Y` are appended, retaining their partial order.   - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values     are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with     non-intersecting keys are appended, retaining their partial order.  If `rule` makes use of the `oldSelf` variable it is implicitly a `transition rule`.  By default, the `oldSelf` variable is the same type as `self`. When `optionalOldSelf` is true, the `oldSelf` variable is a CEL optional  variable whose value() is the same type as `self`. See the documentation for the `optionalOldSelf` field for details.  Transition rules by default are applied only on UPDATE requests and are skipped if an old value could not be found. You can opt a transition rule into unconditional evaluation by setting `optionalOldSelf` to true.
  -> V1ValidationRule
mkV1ValidationRule :: Text -> V1ValidationRule
mkV1ValidationRule Text
v1ValidationRuleRule =
  V1ValidationRule
  { $sel:v1ValidationRuleFieldPath:V1ValidationRule :: Maybe Text
v1ValidationRuleFieldPath = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ValidationRuleMessage:V1ValidationRule :: Maybe Text
v1ValidationRuleMessage = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ValidationRuleMessageExpression:V1ValidationRule :: Maybe Text
v1ValidationRuleMessageExpression = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1ValidationRuleOptionalOldSelf:V1ValidationRule :: Maybe Bool
v1ValidationRuleOptionalOldSelf = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1ValidationRuleReason:V1ValidationRule :: Maybe Text
v1ValidationRuleReason = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1ValidationRuleRule:V1ValidationRule :: Text
v1ValidationRuleRule :: Text
v1ValidationRuleRule
  }

-- ** V1Variable
-- | V1Variable
-- Variable is the definition of a variable that is used for composition. A variable is defined as a named expression.
data V1Variable = V1Variable
  { V1Variable -> Text
v1VariableExpression :: !(Text) -- ^ /Required/ "expression" - Expression is the expression that will be evaluated as the value of the variable. The CEL expression has access to the same identifiers as the CEL expressions in Validation.
  , V1Variable -> Text
v1VariableName :: !(Text) -- ^ /Required/ "name" - Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through &#x60;variables&#x60; For example, if name is \&quot;foo\&quot;, the variable will be available as &#x60;variables.foo&#x60;
  } deriving (Int -> V1Variable -> ShowS
[V1Variable] -> ShowS
V1Variable -> String
(Int -> V1Variable -> ShowS)
-> (V1Variable -> String)
-> ([V1Variable] -> ShowS)
-> Show V1Variable
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1Variable -> ShowS
showsPrec :: Int -> V1Variable -> ShowS
$cshow :: V1Variable -> String
show :: V1Variable -> String
$cshowList :: [V1Variable] -> ShowS
showList :: [V1Variable] -> ShowS
P.Show, V1Variable -> V1Variable -> Bool
(V1Variable -> V1Variable -> Bool)
-> (V1Variable -> V1Variable -> Bool) -> Eq V1Variable
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1Variable -> V1Variable -> Bool
== :: V1Variable -> V1Variable -> Bool
$c/= :: V1Variable -> V1Variable -> Bool
/= :: V1Variable -> V1Variable -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1Variable
instance A.FromJSON V1Variable where
  parseJSON :: Value -> Parser V1Variable
parseJSON = String
-> (Object -> Parser V1Variable) -> Value -> Parser V1Variable
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1Variable" ((Object -> Parser V1Variable) -> Value -> Parser V1Variable)
-> (Object -> Parser V1Variable) -> Value -> Parser V1Variable
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Text -> V1Variable
V1Variable
      (Text -> Text -> V1Variable)
-> Parser Text -> Parser (Text -> V1Variable)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"expression")
      Parser (Text -> V1Variable) -> Parser Text -> Parser V1Variable
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")

-- | ToJSON V1Variable
instance A.ToJSON V1Variable where
  toJSON :: V1Variable -> Value
toJSON V1Variable {Text
$sel:v1VariableExpression:V1Variable :: V1Variable -> Text
$sel:v1VariableName:V1Variable :: V1Variable -> Text
v1VariableExpression :: Text
v1VariableName :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"expression" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1VariableExpression
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1VariableName
      ]


-- | Construct a value of type 'V1Variable' (by applying it's required fields, if any)
mkV1Variable
  :: Text -- ^ 'v1VariableExpression': Expression is the expression that will be evaluated as the value of the variable. The CEL expression has access to the same identifiers as the CEL expressions in Validation.
  -> Text -- ^ 'v1VariableName': Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through `variables` For example, if name is \"foo\", the variable will be available as `variables.foo`
  -> V1Variable
mkV1Variable :: Text -> Text -> V1Variable
mkV1Variable Text
v1VariableExpression Text
v1VariableName =
  V1Variable
  { Text
$sel:v1VariableExpression:V1Variable :: Text
v1VariableExpression :: Text
v1VariableExpression
  , Text
$sel:v1VariableName:V1Variable :: Text
v1VariableName :: Text
v1VariableName
  }

-- ** V1Volume
-- | V1Volume
-- Volume represents a named volume in a pod that may be accessed by any container in the pod.
data V1Volume = V1Volume
  { V1Volume -> Maybe V1AWSElasticBlockStoreVolumeSource
v1VolumeAwsElasticBlockStore :: !(Maybe V1AWSElasticBlockStoreVolumeSource) -- ^ "awsElasticBlockStore"
  , V1Volume -> Maybe V1AzureDiskVolumeSource
v1VolumeAzureDisk :: !(Maybe V1AzureDiskVolumeSource) -- ^ "azureDisk"
  , V1Volume -> Maybe V1AzureFileVolumeSource
v1VolumeAzureFile :: !(Maybe V1AzureFileVolumeSource) -- ^ "azureFile"
  , V1Volume -> Maybe V1CephFSVolumeSource
v1VolumeCephfs :: !(Maybe V1CephFSVolumeSource) -- ^ "cephfs"
  , V1Volume -> Maybe V1CinderVolumeSource
v1VolumeCinder :: !(Maybe V1CinderVolumeSource) -- ^ "cinder"
  , V1Volume -> Maybe V1ConfigMapVolumeSource
v1VolumeConfigMap :: !(Maybe V1ConfigMapVolumeSource) -- ^ "configMap"
  , V1Volume -> Maybe V1CSIVolumeSource
v1VolumeCsi :: !(Maybe V1CSIVolumeSource) -- ^ "csi"
  , V1Volume -> Maybe V1DownwardAPIVolumeSource
v1VolumeDownwardApi :: !(Maybe V1DownwardAPIVolumeSource) -- ^ "downwardAPI"
  , V1Volume -> Maybe V1EmptyDirVolumeSource
v1VolumeEmptyDir :: !(Maybe V1EmptyDirVolumeSource) -- ^ "emptyDir"
  , V1Volume -> Maybe V1EphemeralVolumeSource
v1VolumeEphemeral :: !(Maybe V1EphemeralVolumeSource) -- ^ "ephemeral"
  , V1Volume -> Maybe V1FCVolumeSource
v1VolumeFc :: !(Maybe V1FCVolumeSource) -- ^ "fc"
  , V1Volume -> Maybe V1FlexVolumeSource
v1VolumeFlexVolume :: !(Maybe V1FlexVolumeSource) -- ^ "flexVolume"
  , V1Volume -> Maybe V1FlockerVolumeSource
v1VolumeFlocker :: !(Maybe V1FlockerVolumeSource) -- ^ "flocker"
  , V1Volume -> Maybe V1GCEPersistentDiskVolumeSource
v1VolumeGcePersistentDisk :: !(Maybe V1GCEPersistentDiskVolumeSource) -- ^ "gcePersistentDisk"
  , V1Volume -> Maybe V1GitRepoVolumeSource
v1VolumeGitRepo :: !(Maybe V1GitRepoVolumeSource) -- ^ "gitRepo"
  , V1Volume -> Maybe V1GlusterfsVolumeSource
v1VolumeGlusterfs :: !(Maybe V1GlusterfsVolumeSource) -- ^ "glusterfs"
  , V1Volume -> Maybe V1HostPathVolumeSource
v1VolumeHostPath :: !(Maybe V1HostPathVolumeSource) -- ^ "hostPath"
  , V1Volume -> Maybe V1ImageVolumeSource
v1VolumeImage :: !(Maybe V1ImageVolumeSource) -- ^ "image"
  , V1Volume -> Maybe V1ISCSIVolumeSource
v1VolumeIscsi :: !(Maybe V1ISCSIVolumeSource) -- ^ "iscsi"
  , V1Volume -> Text
v1VolumeName :: !(Text) -- ^ /Required/ "name" - name of the volume. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  , V1Volume -> Maybe V1NFSVolumeSource
v1VolumeNfs :: !(Maybe V1NFSVolumeSource) -- ^ "nfs"
  , V1Volume -> Maybe V1PersistentVolumeClaimVolumeSource
v1VolumePersistentVolumeClaim :: !(Maybe V1PersistentVolumeClaimVolumeSource) -- ^ "persistentVolumeClaim"
  , V1Volume -> Maybe V1PhotonPersistentDiskVolumeSource
v1VolumePhotonPersistentDisk :: !(Maybe V1PhotonPersistentDiskVolumeSource) -- ^ "photonPersistentDisk"
  , V1Volume -> Maybe V1PortworxVolumeSource
v1VolumePortworxVolume :: !(Maybe V1PortworxVolumeSource) -- ^ "portworxVolume"
  , V1Volume -> Maybe V1ProjectedVolumeSource
v1VolumeProjected :: !(Maybe V1ProjectedVolumeSource) -- ^ "projected"
  , V1Volume -> Maybe V1QuobyteVolumeSource
v1VolumeQuobyte :: !(Maybe V1QuobyteVolumeSource) -- ^ "quobyte"
  , V1Volume -> Maybe V1RBDVolumeSource
v1VolumeRbd :: !(Maybe V1RBDVolumeSource) -- ^ "rbd"
  , V1Volume -> Maybe V1ScaleIOVolumeSource
v1VolumeScaleIo :: !(Maybe V1ScaleIOVolumeSource) -- ^ "scaleIO"
  , V1Volume -> Maybe V1SecretVolumeSource
v1VolumeSecret :: !(Maybe V1SecretVolumeSource) -- ^ "secret"
  , V1Volume -> Maybe V1StorageOSVolumeSource
v1VolumeStorageos :: !(Maybe V1StorageOSVolumeSource) -- ^ "storageos"
  , V1Volume -> Maybe V1VsphereVirtualDiskVolumeSource
v1VolumeVsphereVolume :: !(Maybe V1VsphereVirtualDiskVolumeSource) -- ^ "vsphereVolume"
  } deriving (Int -> V1Volume -> ShowS
[V1Volume] -> ShowS
V1Volume -> String
(Int -> V1Volume -> ShowS)
-> (V1Volume -> String) -> ([V1Volume] -> ShowS) -> Show V1Volume
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1Volume -> ShowS
showsPrec :: Int -> V1Volume -> ShowS
$cshow :: V1Volume -> String
show :: V1Volume -> String
$cshowList :: [V1Volume] -> ShowS
showList :: [V1Volume] -> ShowS
P.Show, V1Volume -> V1Volume -> Bool
(V1Volume -> V1Volume -> Bool)
-> (V1Volume -> V1Volume -> Bool) -> Eq V1Volume
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1Volume -> V1Volume -> Bool
== :: V1Volume -> V1Volume -> Bool
$c/= :: V1Volume -> V1Volume -> Bool
/= :: V1Volume -> V1Volume -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1Volume
instance A.FromJSON V1Volume where
  parseJSON :: Value -> Parser V1Volume
parseJSON = String -> (Object -> Parser V1Volume) -> Value -> Parser V1Volume
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1Volume" ((Object -> Parser V1Volume) -> Value -> Parser V1Volume)
-> (Object -> Parser V1Volume) -> Value -> Parser V1Volume
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1AWSElasticBlockStoreVolumeSource
-> Maybe V1AzureDiskVolumeSource
-> Maybe V1AzureFileVolumeSource
-> Maybe V1CephFSVolumeSource
-> Maybe V1CinderVolumeSource
-> Maybe V1ConfigMapVolumeSource
-> Maybe V1CSIVolumeSource
-> Maybe V1DownwardAPIVolumeSource
-> Maybe V1EmptyDirVolumeSource
-> Maybe V1EphemeralVolumeSource
-> Maybe V1FCVolumeSource
-> Maybe V1FlexVolumeSource
-> Maybe V1FlockerVolumeSource
-> Maybe V1GCEPersistentDiskVolumeSource
-> Maybe V1GitRepoVolumeSource
-> Maybe V1GlusterfsVolumeSource
-> Maybe V1HostPathVolumeSource
-> Maybe V1ImageVolumeSource
-> Maybe V1ISCSIVolumeSource
-> Text
-> Maybe V1NFSVolumeSource
-> Maybe V1PersistentVolumeClaimVolumeSource
-> Maybe V1PhotonPersistentDiskVolumeSource
-> Maybe V1PortworxVolumeSource
-> Maybe V1ProjectedVolumeSource
-> Maybe V1QuobyteVolumeSource
-> Maybe V1RBDVolumeSource
-> Maybe V1ScaleIOVolumeSource
-> Maybe V1SecretVolumeSource
-> Maybe V1StorageOSVolumeSource
-> Maybe V1VsphereVirtualDiskVolumeSource
-> V1Volume
V1Volume
      (Maybe V1AWSElasticBlockStoreVolumeSource
 -> Maybe V1AzureDiskVolumeSource
 -> Maybe V1AzureFileVolumeSource
 -> Maybe V1CephFSVolumeSource
 -> Maybe V1CinderVolumeSource
 -> Maybe V1ConfigMapVolumeSource
 -> Maybe V1CSIVolumeSource
 -> Maybe V1DownwardAPIVolumeSource
 -> Maybe V1EmptyDirVolumeSource
 -> Maybe V1EphemeralVolumeSource
 -> Maybe V1FCVolumeSource
 -> Maybe V1FlexVolumeSource
 -> Maybe V1FlockerVolumeSource
 -> Maybe V1GCEPersistentDiskVolumeSource
 -> Maybe V1GitRepoVolumeSource
 -> Maybe V1GlusterfsVolumeSource
 -> Maybe V1HostPathVolumeSource
 -> Maybe V1ImageVolumeSource
 -> Maybe V1ISCSIVolumeSource
 -> Text
 -> Maybe V1NFSVolumeSource
 -> Maybe V1PersistentVolumeClaimVolumeSource
 -> Maybe V1PhotonPersistentDiskVolumeSource
 -> Maybe V1PortworxVolumeSource
 -> Maybe V1ProjectedVolumeSource
 -> Maybe V1QuobyteVolumeSource
 -> Maybe V1RBDVolumeSource
 -> Maybe V1ScaleIOVolumeSource
 -> Maybe V1SecretVolumeSource
 -> Maybe V1StorageOSVolumeSource
 -> Maybe V1VsphereVirtualDiskVolumeSource
 -> V1Volume)
-> Parser (Maybe V1AWSElasticBlockStoreVolumeSource)
-> Parser
     (Maybe V1AzureDiskVolumeSource
      -> Maybe V1AzureFileVolumeSource
      -> Maybe V1CephFSVolumeSource
      -> Maybe V1CinderVolumeSource
      -> Maybe V1ConfigMapVolumeSource
      -> Maybe V1CSIVolumeSource
      -> Maybe V1DownwardAPIVolumeSource
      -> Maybe V1EmptyDirVolumeSource
      -> Maybe V1EphemeralVolumeSource
      -> Maybe V1FCVolumeSource
      -> Maybe V1FlexVolumeSource
      -> Maybe V1FlockerVolumeSource
      -> Maybe V1GCEPersistentDiskVolumeSource
      -> Maybe V1GitRepoVolumeSource
      -> Maybe V1GlusterfsVolumeSource
      -> Maybe V1HostPathVolumeSource
      -> Maybe V1ImageVolumeSource
      -> Maybe V1ISCSIVolumeSource
      -> Text
      -> Maybe V1NFSVolumeSource
      -> Maybe V1PersistentVolumeClaimVolumeSource
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1ProjectedVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDVolumeSource
      -> Maybe V1ScaleIOVolumeSource
      -> Maybe V1SecretVolumeSource
      -> Maybe V1StorageOSVolumeSource
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1Volume)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1AWSElasticBlockStoreVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"awsElasticBlockStore")
      Parser
  (Maybe V1AzureDiskVolumeSource
   -> Maybe V1AzureFileVolumeSource
   -> Maybe V1CephFSVolumeSource
   -> Maybe V1CinderVolumeSource
   -> Maybe V1ConfigMapVolumeSource
   -> Maybe V1CSIVolumeSource
   -> Maybe V1DownwardAPIVolumeSource
   -> Maybe V1EmptyDirVolumeSource
   -> Maybe V1EphemeralVolumeSource
   -> Maybe V1FCVolumeSource
   -> Maybe V1FlexVolumeSource
   -> Maybe V1FlockerVolumeSource
   -> Maybe V1GCEPersistentDiskVolumeSource
   -> Maybe V1GitRepoVolumeSource
   -> Maybe V1GlusterfsVolumeSource
   -> Maybe V1HostPathVolumeSource
   -> Maybe V1ImageVolumeSource
   -> Maybe V1ISCSIVolumeSource
   -> Text
   -> Maybe V1NFSVolumeSource
   -> Maybe V1PersistentVolumeClaimVolumeSource
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1ProjectedVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDVolumeSource
   -> Maybe V1ScaleIOVolumeSource
   -> Maybe V1SecretVolumeSource
   -> Maybe V1StorageOSVolumeSource
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1Volume)
-> Parser (Maybe V1AzureDiskVolumeSource)
-> Parser
     (Maybe V1AzureFileVolumeSource
      -> Maybe V1CephFSVolumeSource
      -> Maybe V1CinderVolumeSource
      -> Maybe V1ConfigMapVolumeSource
      -> Maybe V1CSIVolumeSource
      -> Maybe V1DownwardAPIVolumeSource
      -> Maybe V1EmptyDirVolumeSource
      -> Maybe V1EphemeralVolumeSource
      -> Maybe V1FCVolumeSource
      -> Maybe V1FlexVolumeSource
      -> Maybe V1FlockerVolumeSource
      -> Maybe V1GCEPersistentDiskVolumeSource
      -> Maybe V1GitRepoVolumeSource
      -> Maybe V1GlusterfsVolumeSource
      -> Maybe V1HostPathVolumeSource
      -> Maybe V1ImageVolumeSource
      -> Maybe V1ISCSIVolumeSource
      -> Text
      -> Maybe V1NFSVolumeSource
      -> Maybe V1PersistentVolumeClaimVolumeSource
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1ProjectedVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDVolumeSource
      -> Maybe V1ScaleIOVolumeSource
      -> Maybe V1SecretVolumeSource
      -> Maybe V1StorageOSVolumeSource
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1Volume)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1AzureDiskVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"azureDisk")
      Parser
  (Maybe V1AzureFileVolumeSource
   -> Maybe V1CephFSVolumeSource
   -> Maybe V1CinderVolumeSource
   -> Maybe V1ConfigMapVolumeSource
   -> Maybe V1CSIVolumeSource
   -> Maybe V1DownwardAPIVolumeSource
   -> Maybe V1EmptyDirVolumeSource
   -> Maybe V1EphemeralVolumeSource
   -> Maybe V1FCVolumeSource
   -> Maybe V1FlexVolumeSource
   -> Maybe V1FlockerVolumeSource
   -> Maybe V1GCEPersistentDiskVolumeSource
   -> Maybe V1GitRepoVolumeSource
   -> Maybe V1GlusterfsVolumeSource
   -> Maybe V1HostPathVolumeSource
   -> Maybe V1ImageVolumeSource
   -> Maybe V1ISCSIVolumeSource
   -> Text
   -> Maybe V1NFSVolumeSource
   -> Maybe V1PersistentVolumeClaimVolumeSource
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1ProjectedVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDVolumeSource
   -> Maybe V1ScaleIOVolumeSource
   -> Maybe V1SecretVolumeSource
   -> Maybe V1StorageOSVolumeSource
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1Volume)
-> Parser (Maybe V1AzureFileVolumeSource)
-> Parser
     (Maybe V1CephFSVolumeSource
      -> Maybe V1CinderVolumeSource
      -> Maybe V1ConfigMapVolumeSource
      -> Maybe V1CSIVolumeSource
      -> Maybe V1DownwardAPIVolumeSource
      -> Maybe V1EmptyDirVolumeSource
      -> Maybe V1EphemeralVolumeSource
      -> Maybe V1FCVolumeSource
      -> Maybe V1FlexVolumeSource
      -> Maybe V1FlockerVolumeSource
      -> Maybe V1GCEPersistentDiskVolumeSource
      -> Maybe V1GitRepoVolumeSource
      -> Maybe V1GlusterfsVolumeSource
      -> Maybe V1HostPathVolumeSource
      -> Maybe V1ImageVolumeSource
      -> Maybe V1ISCSIVolumeSource
      -> Text
      -> Maybe V1NFSVolumeSource
      -> Maybe V1PersistentVolumeClaimVolumeSource
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1ProjectedVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDVolumeSource
      -> Maybe V1ScaleIOVolumeSource
      -> Maybe V1SecretVolumeSource
      -> Maybe V1StorageOSVolumeSource
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1Volume)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1AzureFileVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"azureFile")
      Parser
  (Maybe V1CephFSVolumeSource
   -> Maybe V1CinderVolumeSource
   -> Maybe V1ConfigMapVolumeSource
   -> Maybe V1CSIVolumeSource
   -> Maybe V1DownwardAPIVolumeSource
   -> Maybe V1EmptyDirVolumeSource
   -> Maybe V1EphemeralVolumeSource
   -> Maybe V1FCVolumeSource
   -> Maybe V1FlexVolumeSource
   -> Maybe V1FlockerVolumeSource
   -> Maybe V1GCEPersistentDiskVolumeSource
   -> Maybe V1GitRepoVolumeSource
   -> Maybe V1GlusterfsVolumeSource
   -> Maybe V1HostPathVolumeSource
   -> Maybe V1ImageVolumeSource
   -> Maybe V1ISCSIVolumeSource
   -> Text
   -> Maybe V1NFSVolumeSource
   -> Maybe V1PersistentVolumeClaimVolumeSource
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1ProjectedVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDVolumeSource
   -> Maybe V1ScaleIOVolumeSource
   -> Maybe V1SecretVolumeSource
   -> Maybe V1StorageOSVolumeSource
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1Volume)
-> Parser (Maybe V1CephFSVolumeSource)
-> Parser
     (Maybe V1CinderVolumeSource
      -> Maybe V1ConfigMapVolumeSource
      -> Maybe V1CSIVolumeSource
      -> Maybe V1DownwardAPIVolumeSource
      -> Maybe V1EmptyDirVolumeSource
      -> Maybe V1EphemeralVolumeSource
      -> Maybe V1FCVolumeSource
      -> Maybe V1FlexVolumeSource
      -> Maybe V1FlockerVolumeSource
      -> Maybe V1GCEPersistentDiskVolumeSource
      -> Maybe V1GitRepoVolumeSource
      -> Maybe V1GlusterfsVolumeSource
      -> Maybe V1HostPathVolumeSource
      -> Maybe V1ImageVolumeSource
      -> Maybe V1ISCSIVolumeSource
      -> Text
      -> Maybe V1NFSVolumeSource
      -> Maybe V1PersistentVolumeClaimVolumeSource
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1ProjectedVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDVolumeSource
      -> Maybe V1ScaleIOVolumeSource
      -> Maybe V1SecretVolumeSource
      -> Maybe V1StorageOSVolumeSource
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1Volume)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1CephFSVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"cephfs")
      Parser
  (Maybe V1CinderVolumeSource
   -> Maybe V1ConfigMapVolumeSource
   -> Maybe V1CSIVolumeSource
   -> Maybe V1DownwardAPIVolumeSource
   -> Maybe V1EmptyDirVolumeSource
   -> Maybe V1EphemeralVolumeSource
   -> Maybe V1FCVolumeSource
   -> Maybe V1FlexVolumeSource
   -> Maybe V1FlockerVolumeSource
   -> Maybe V1GCEPersistentDiskVolumeSource
   -> Maybe V1GitRepoVolumeSource
   -> Maybe V1GlusterfsVolumeSource
   -> Maybe V1HostPathVolumeSource
   -> Maybe V1ImageVolumeSource
   -> Maybe V1ISCSIVolumeSource
   -> Text
   -> Maybe V1NFSVolumeSource
   -> Maybe V1PersistentVolumeClaimVolumeSource
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1ProjectedVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDVolumeSource
   -> Maybe V1ScaleIOVolumeSource
   -> Maybe V1SecretVolumeSource
   -> Maybe V1StorageOSVolumeSource
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1Volume)
-> Parser (Maybe V1CinderVolumeSource)
-> Parser
     (Maybe V1ConfigMapVolumeSource
      -> Maybe V1CSIVolumeSource
      -> Maybe V1DownwardAPIVolumeSource
      -> Maybe V1EmptyDirVolumeSource
      -> Maybe V1EphemeralVolumeSource
      -> Maybe V1FCVolumeSource
      -> Maybe V1FlexVolumeSource
      -> Maybe V1FlockerVolumeSource
      -> Maybe V1GCEPersistentDiskVolumeSource
      -> Maybe V1GitRepoVolumeSource
      -> Maybe V1GlusterfsVolumeSource
      -> Maybe V1HostPathVolumeSource
      -> Maybe V1ImageVolumeSource
      -> Maybe V1ISCSIVolumeSource
      -> Text
      -> Maybe V1NFSVolumeSource
      -> Maybe V1PersistentVolumeClaimVolumeSource
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1ProjectedVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDVolumeSource
      -> Maybe V1ScaleIOVolumeSource
      -> Maybe V1SecretVolumeSource
      -> Maybe V1StorageOSVolumeSource
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1Volume)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1CinderVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"cinder")
      Parser
  (Maybe V1ConfigMapVolumeSource
   -> Maybe V1CSIVolumeSource
   -> Maybe V1DownwardAPIVolumeSource
   -> Maybe V1EmptyDirVolumeSource
   -> Maybe V1EphemeralVolumeSource
   -> Maybe V1FCVolumeSource
   -> Maybe V1FlexVolumeSource
   -> Maybe V1FlockerVolumeSource
   -> Maybe V1GCEPersistentDiskVolumeSource
   -> Maybe V1GitRepoVolumeSource
   -> Maybe V1GlusterfsVolumeSource
   -> Maybe V1HostPathVolumeSource
   -> Maybe V1ImageVolumeSource
   -> Maybe V1ISCSIVolumeSource
   -> Text
   -> Maybe V1NFSVolumeSource
   -> Maybe V1PersistentVolumeClaimVolumeSource
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1ProjectedVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDVolumeSource
   -> Maybe V1ScaleIOVolumeSource
   -> Maybe V1SecretVolumeSource
   -> Maybe V1StorageOSVolumeSource
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1Volume)
-> Parser (Maybe V1ConfigMapVolumeSource)
-> Parser
     (Maybe V1CSIVolumeSource
      -> Maybe V1DownwardAPIVolumeSource
      -> Maybe V1EmptyDirVolumeSource
      -> Maybe V1EphemeralVolumeSource
      -> Maybe V1FCVolumeSource
      -> Maybe V1FlexVolumeSource
      -> Maybe V1FlockerVolumeSource
      -> Maybe V1GCEPersistentDiskVolumeSource
      -> Maybe V1GitRepoVolumeSource
      -> Maybe V1GlusterfsVolumeSource
      -> Maybe V1HostPathVolumeSource
      -> Maybe V1ImageVolumeSource
      -> Maybe V1ISCSIVolumeSource
      -> Text
      -> Maybe V1NFSVolumeSource
      -> Maybe V1PersistentVolumeClaimVolumeSource
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1ProjectedVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDVolumeSource
      -> Maybe V1ScaleIOVolumeSource
      -> Maybe V1SecretVolumeSource
      -> Maybe V1StorageOSVolumeSource
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1Volume)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ConfigMapVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"configMap")
      Parser
  (Maybe V1CSIVolumeSource
   -> Maybe V1DownwardAPIVolumeSource
   -> Maybe V1EmptyDirVolumeSource
   -> Maybe V1EphemeralVolumeSource
   -> Maybe V1FCVolumeSource
   -> Maybe V1FlexVolumeSource
   -> Maybe V1FlockerVolumeSource
   -> Maybe V1GCEPersistentDiskVolumeSource
   -> Maybe V1GitRepoVolumeSource
   -> Maybe V1GlusterfsVolumeSource
   -> Maybe V1HostPathVolumeSource
   -> Maybe V1ImageVolumeSource
   -> Maybe V1ISCSIVolumeSource
   -> Text
   -> Maybe V1NFSVolumeSource
   -> Maybe V1PersistentVolumeClaimVolumeSource
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1ProjectedVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDVolumeSource
   -> Maybe V1ScaleIOVolumeSource
   -> Maybe V1SecretVolumeSource
   -> Maybe V1StorageOSVolumeSource
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1Volume)
-> Parser (Maybe V1CSIVolumeSource)
-> Parser
     (Maybe V1DownwardAPIVolumeSource
      -> Maybe V1EmptyDirVolumeSource
      -> Maybe V1EphemeralVolumeSource
      -> Maybe V1FCVolumeSource
      -> Maybe V1FlexVolumeSource
      -> Maybe V1FlockerVolumeSource
      -> Maybe V1GCEPersistentDiskVolumeSource
      -> Maybe V1GitRepoVolumeSource
      -> Maybe V1GlusterfsVolumeSource
      -> Maybe V1HostPathVolumeSource
      -> Maybe V1ImageVolumeSource
      -> Maybe V1ISCSIVolumeSource
      -> Text
      -> Maybe V1NFSVolumeSource
      -> Maybe V1PersistentVolumeClaimVolumeSource
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1ProjectedVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDVolumeSource
      -> Maybe V1ScaleIOVolumeSource
      -> Maybe V1SecretVolumeSource
      -> Maybe V1StorageOSVolumeSource
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1Volume)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1CSIVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"csi")
      Parser
  (Maybe V1DownwardAPIVolumeSource
   -> Maybe V1EmptyDirVolumeSource
   -> Maybe V1EphemeralVolumeSource
   -> Maybe V1FCVolumeSource
   -> Maybe V1FlexVolumeSource
   -> Maybe V1FlockerVolumeSource
   -> Maybe V1GCEPersistentDiskVolumeSource
   -> Maybe V1GitRepoVolumeSource
   -> Maybe V1GlusterfsVolumeSource
   -> Maybe V1HostPathVolumeSource
   -> Maybe V1ImageVolumeSource
   -> Maybe V1ISCSIVolumeSource
   -> Text
   -> Maybe V1NFSVolumeSource
   -> Maybe V1PersistentVolumeClaimVolumeSource
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1ProjectedVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDVolumeSource
   -> Maybe V1ScaleIOVolumeSource
   -> Maybe V1SecretVolumeSource
   -> Maybe V1StorageOSVolumeSource
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1Volume)
-> Parser (Maybe V1DownwardAPIVolumeSource)
-> Parser
     (Maybe V1EmptyDirVolumeSource
      -> Maybe V1EphemeralVolumeSource
      -> Maybe V1FCVolumeSource
      -> Maybe V1FlexVolumeSource
      -> Maybe V1FlockerVolumeSource
      -> Maybe V1GCEPersistentDiskVolumeSource
      -> Maybe V1GitRepoVolumeSource
      -> Maybe V1GlusterfsVolumeSource
      -> Maybe V1HostPathVolumeSource
      -> Maybe V1ImageVolumeSource
      -> Maybe V1ISCSIVolumeSource
      -> Text
      -> Maybe V1NFSVolumeSource
      -> Maybe V1PersistentVolumeClaimVolumeSource
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1ProjectedVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDVolumeSource
      -> Maybe V1ScaleIOVolumeSource
      -> Maybe V1SecretVolumeSource
      -> Maybe V1StorageOSVolumeSource
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1Volume)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1DownwardAPIVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"downwardAPI")
      Parser
  (Maybe V1EmptyDirVolumeSource
   -> Maybe V1EphemeralVolumeSource
   -> Maybe V1FCVolumeSource
   -> Maybe V1FlexVolumeSource
   -> Maybe V1FlockerVolumeSource
   -> Maybe V1GCEPersistentDiskVolumeSource
   -> Maybe V1GitRepoVolumeSource
   -> Maybe V1GlusterfsVolumeSource
   -> Maybe V1HostPathVolumeSource
   -> Maybe V1ImageVolumeSource
   -> Maybe V1ISCSIVolumeSource
   -> Text
   -> Maybe V1NFSVolumeSource
   -> Maybe V1PersistentVolumeClaimVolumeSource
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1ProjectedVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDVolumeSource
   -> Maybe V1ScaleIOVolumeSource
   -> Maybe V1SecretVolumeSource
   -> Maybe V1StorageOSVolumeSource
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1Volume)
-> Parser (Maybe V1EmptyDirVolumeSource)
-> Parser
     (Maybe V1EphemeralVolumeSource
      -> Maybe V1FCVolumeSource
      -> Maybe V1FlexVolumeSource
      -> Maybe V1FlockerVolumeSource
      -> Maybe V1GCEPersistentDiskVolumeSource
      -> Maybe V1GitRepoVolumeSource
      -> Maybe V1GlusterfsVolumeSource
      -> Maybe V1HostPathVolumeSource
      -> Maybe V1ImageVolumeSource
      -> Maybe V1ISCSIVolumeSource
      -> Text
      -> Maybe V1NFSVolumeSource
      -> Maybe V1PersistentVolumeClaimVolumeSource
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1ProjectedVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDVolumeSource
      -> Maybe V1ScaleIOVolumeSource
      -> Maybe V1SecretVolumeSource
      -> Maybe V1StorageOSVolumeSource
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1Volume)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1EmptyDirVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"emptyDir")
      Parser
  (Maybe V1EphemeralVolumeSource
   -> Maybe V1FCVolumeSource
   -> Maybe V1FlexVolumeSource
   -> Maybe V1FlockerVolumeSource
   -> Maybe V1GCEPersistentDiskVolumeSource
   -> Maybe V1GitRepoVolumeSource
   -> Maybe V1GlusterfsVolumeSource
   -> Maybe V1HostPathVolumeSource
   -> Maybe V1ImageVolumeSource
   -> Maybe V1ISCSIVolumeSource
   -> Text
   -> Maybe V1NFSVolumeSource
   -> Maybe V1PersistentVolumeClaimVolumeSource
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1ProjectedVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDVolumeSource
   -> Maybe V1ScaleIOVolumeSource
   -> Maybe V1SecretVolumeSource
   -> Maybe V1StorageOSVolumeSource
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1Volume)
-> Parser (Maybe V1EphemeralVolumeSource)
-> Parser
     (Maybe V1FCVolumeSource
      -> Maybe V1FlexVolumeSource
      -> Maybe V1FlockerVolumeSource
      -> Maybe V1GCEPersistentDiskVolumeSource
      -> Maybe V1GitRepoVolumeSource
      -> Maybe V1GlusterfsVolumeSource
      -> Maybe V1HostPathVolumeSource
      -> Maybe V1ImageVolumeSource
      -> Maybe V1ISCSIVolumeSource
      -> Text
      -> Maybe V1NFSVolumeSource
      -> Maybe V1PersistentVolumeClaimVolumeSource
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1ProjectedVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDVolumeSource
      -> Maybe V1ScaleIOVolumeSource
      -> Maybe V1SecretVolumeSource
      -> Maybe V1StorageOSVolumeSource
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1Volume)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1EphemeralVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ephemeral")
      Parser
  (Maybe V1FCVolumeSource
   -> Maybe V1FlexVolumeSource
   -> Maybe V1FlockerVolumeSource
   -> Maybe V1GCEPersistentDiskVolumeSource
   -> Maybe V1GitRepoVolumeSource
   -> Maybe V1GlusterfsVolumeSource
   -> Maybe V1HostPathVolumeSource
   -> Maybe V1ImageVolumeSource
   -> Maybe V1ISCSIVolumeSource
   -> Text
   -> Maybe V1NFSVolumeSource
   -> Maybe V1PersistentVolumeClaimVolumeSource
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1ProjectedVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDVolumeSource
   -> Maybe V1ScaleIOVolumeSource
   -> Maybe V1SecretVolumeSource
   -> Maybe V1StorageOSVolumeSource
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1Volume)
-> Parser (Maybe V1FCVolumeSource)
-> Parser
     (Maybe V1FlexVolumeSource
      -> Maybe V1FlockerVolumeSource
      -> Maybe V1GCEPersistentDiskVolumeSource
      -> Maybe V1GitRepoVolumeSource
      -> Maybe V1GlusterfsVolumeSource
      -> Maybe V1HostPathVolumeSource
      -> Maybe V1ImageVolumeSource
      -> Maybe V1ISCSIVolumeSource
      -> Text
      -> Maybe V1NFSVolumeSource
      -> Maybe V1PersistentVolumeClaimVolumeSource
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1ProjectedVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDVolumeSource
      -> Maybe V1ScaleIOVolumeSource
      -> Maybe V1SecretVolumeSource
      -> Maybe V1StorageOSVolumeSource
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1Volume)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1FCVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fc")
      Parser
  (Maybe V1FlexVolumeSource
   -> Maybe V1FlockerVolumeSource
   -> Maybe V1GCEPersistentDiskVolumeSource
   -> Maybe V1GitRepoVolumeSource
   -> Maybe V1GlusterfsVolumeSource
   -> Maybe V1HostPathVolumeSource
   -> Maybe V1ImageVolumeSource
   -> Maybe V1ISCSIVolumeSource
   -> Text
   -> Maybe V1NFSVolumeSource
   -> Maybe V1PersistentVolumeClaimVolumeSource
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1ProjectedVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDVolumeSource
   -> Maybe V1ScaleIOVolumeSource
   -> Maybe V1SecretVolumeSource
   -> Maybe V1StorageOSVolumeSource
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1Volume)
-> Parser (Maybe V1FlexVolumeSource)
-> Parser
     (Maybe V1FlockerVolumeSource
      -> Maybe V1GCEPersistentDiskVolumeSource
      -> Maybe V1GitRepoVolumeSource
      -> Maybe V1GlusterfsVolumeSource
      -> Maybe V1HostPathVolumeSource
      -> Maybe V1ImageVolumeSource
      -> Maybe V1ISCSIVolumeSource
      -> Text
      -> Maybe V1NFSVolumeSource
      -> Maybe V1PersistentVolumeClaimVolumeSource
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1ProjectedVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDVolumeSource
      -> Maybe V1ScaleIOVolumeSource
      -> Maybe V1SecretVolumeSource
      -> Maybe V1StorageOSVolumeSource
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1Volume)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1FlexVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"flexVolume")
      Parser
  (Maybe V1FlockerVolumeSource
   -> Maybe V1GCEPersistentDiskVolumeSource
   -> Maybe V1GitRepoVolumeSource
   -> Maybe V1GlusterfsVolumeSource
   -> Maybe V1HostPathVolumeSource
   -> Maybe V1ImageVolumeSource
   -> Maybe V1ISCSIVolumeSource
   -> Text
   -> Maybe V1NFSVolumeSource
   -> Maybe V1PersistentVolumeClaimVolumeSource
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1ProjectedVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDVolumeSource
   -> Maybe V1ScaleIOVolumeSource
   -> Maybe V1SecretVolumeSource
   -> Maybe V1StorageOSVolumeSource
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1Volume)
-> Parser (Maybe V1FlockerVolumeSource)
-> Parser
     (Maybe V1GCEPersistentDiskVolumeSource
      -> Maybe V1GitRepoVolumeSource
      -> Maybe V1GlusterfsVolumeSource
      -> Maybe V1HostPathVolumeSource
      -> Maybe V1ImageVolumeSource
      -> Maybe V1ISCSIVolumeSource
      -> Text
      -> Maybe V1NFSVolumeSource
      -> Maybe V1PersistentVolumeClaimVolumeSource
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1ProjectedVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDVolumeSource
      -> Maybe V1ScaleIOVolumeSource
      -> Maybe V1SecretVolumeSource
      -> Maybe V1StorageOSVolumeSource
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1Volume)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1FlockerVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"flocker")
      Parser
  (Maybe V1GCEPersistentDiskVolumeSource
   -> Maybe V1GitRepoVolumeSource
   -> Maybe V1GlusterfsVolumeSource
   -> Maybe V1HostPathVolumeSource
   -> Maybe V1ImageVolumeSource
   -> Maybe V1ISCSIVolumeSource
   -> Text
   -> Maybe V1NFSVolumeSource
   -> Maybe V1PersistentVolumeClaimVolumeSource
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1ProjectedVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDVolumeSource
   -> Maybe V1ScaleIOVolumeSource
   -> Maybe V1SecretVolumeSource
   -> Maybe V1StorageOSVolumeSource
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1Volume)
-> Parser (Maybe V1GCEPersistentDiskVolumeSource)
-> Parser
     (Maybe V1GitRepoVolumeSource
      -> Maybe V1GlusterfsVolumeSource
      -> Maybe V1HostPathVolumeSource
      -> Maybe V1ImageVolumeSource
      -> Maybe V1ISCSIVolumeSource
      -> Text
      -> Maybe V1NFSVolumeSource
      -> Maybe V1PersistentVolumeClaimVolumeSource
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1ProjectedVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDVolumeSource
      -> Maybe V1ScaleIOVolumeSource
      -> Maybe V1SecretVolumeSource
      -> Maybe V1StorageOSVolumeSource
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1Volume)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1GCEPersistentDiskVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"gcePersistentDisk")
      Parser
  (Maybe V1GitRepoVolumeSource
   -> Maybe V1GlusterfsVolumeSource
   -> Maybe V1HostPathVolumeSource
   -> Maybe V1ImageVolumeSource
   -> Maybe V1ISCSIVolumeSource
   -> Text
   -> Maybe V1NFSVolumeSource
   -> Maybe V1PersistentVolumeClaimVolumeSource
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1ProjectedVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDVolumeSource
   -> Maybe V1ScaleIOVolumeSource
   -> Maybe V1SecretVolumeSource
   -> Maybe V1StorageOSVolumeSource
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1Volume)
-> Parser (Maybe V1GitRepoVolumeSource)
-> Parser
     (Maybe V1GlusterfsVolumeSource
      -> Maybe V1HostPathVolumeSource
      -> Maybe V1ImageVolumeSource
      -> Maybe V1ISCSIVolumeSource
      -> Text
      -> Maybe V1NFSVolumeSource
      -> Maybe V1PersistentVolumeClaimVolumeSource
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1ProjectedVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDVolumeSource
      -> Maybe V1ScaleIOVolumeSource
      -> Maybe V1SecretVolumeSource
      -> Maybe V1StorageOSVolumeSource
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1Volume)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1GitRepoVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"gitRepo")
      Parser
  (Maybe V1GlusterfsVolumeSource
   -> Maybe V1HostPathVolumeSource
   -> Maybe V1ImageVolumeSource
   -> Maybe V1ISCSIVolumeSource
   -> Text
   -> Maybe V1NFSVolumeSource
   -> Maybe V1PersistentVolumeClaimVolumeSource
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1ProjectedVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDVolumeSource
   -> Maybe V1ScaleIOVolumeSource
   -> Maybe V1SecretVolumeSource
   -> Maybe V1StorageOSVolumeSource
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1Volume)
-> Parser (Maybe V1GlusterfsVolumeSource)
-> Parser
     (Maybe V1HostPathVolumeSource
      -> Maybe V1ImageVolumeSource
      -> Maybe V1ISCSIVolumeSource
      -> Text
      -> Maybe V1NFSVolumeSource
      -> Maybe V1PersistentVolumeClaimVolumeSource
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1ProjectedVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDVolumeSource
      -> Maybe V1ScaleIOVolumeSource
      -> Maybe V1SecretVolumeSource
      -> Maybe V1StorageOSVolumeSource
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1Volume)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1GlusterfsVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"glusterfs")
      Parser
  (Maybe V1HostPathVolumeSource
   -> Maybe V1ImageVolumeSource
   -> Maybe V1ISCSIVolumeSource
   -> Text
   -> Maybe V1NFSVolumeSource
   -> Maybe V1PersistentVolumeClaimVolumeSource
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1ProjectedVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDVolumeSource
   -> Maybe V1ScaleIOVolumeSource
   -> Maybe V1SecretVolumeSource
   -> Maybe V1StorageOSVolumeSource
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1Volume)
-> Parser (Maybe V1HostPathVolumeSource)
-> Parser
     (Maybe V1ImageVolumeSource
      -> Maybe V1ISCSIVolumeSource
      -> Text
      -> Maybe V1NFSVolumeSource
      -> Maybe V1PersistentVolumeClaimVolumeSource
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1ProjectedVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDVolumeSource
      -> Maybe V1ScaleIOVolumeSource
      -> Maybe V1SecretVolumeSource
      -> Maybe V1StorageOSVolumeSource
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1Volume)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1HostPathVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"hostPath")
      Parser
  (Maybe V1ImageVolumeSource
   -> Maybe V1ISCSIVolumeSource
   -> Text
   -> Maybe V1NFSVolumeSource
   -> Maybe V1PersistentVolumeClaimVolumeSource
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1ProjectedVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDVolumeSource
   -> Maybe V1ScaleIOVolumeSource
   -> Maybe V1SecretVolumeSource
   -> Maybe V1StorageOSVolumeSource
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1Volume)
-> Parser (Maybe V1ImageVolumeSource)
-> Parser
     (Maybe V1ISCSIVolumeSource
      -> Text
      -> Maybe V1NFSVolumeSource
      -> Maybe V1PersistentVolumeClaimVolumeSource
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1ProjectedVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDVolumeSource
      -> Maybe V1ScaleIOVolumeSource
      -> Maybe V1SecretVolumeSource
      -> Maybe V1StorageOSVolumeSource
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1Volume)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ImageVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"image")
      Parser
  (Maybe V1ISCSIVolumeSource
   -> Text
   -> Maybe V1NFSVolumeSource
   -> Maybe V1PersistentVolumeClaimVolumeSource
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1ProjectedVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDVolumeSource
   -> Maybe V1ScaleIOVolumeSource
   -> Maybe V1SecretVolumeSource
   -> Maybe V1StorageOSVolumeSource
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1Volume)
-> Parser (Maybe V1ISCSIVolumeSource)
-> Parser
     (Text
      -> Maybe V1NFSVolumeSource
      -> Maybe V1PersistentVolumeClaimVolumeSource
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1ProjectedVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDVolumeSource
      -> Maybe V1ScaleIOVolumeSource
      -> Maybe V1SecretVolumeSource
      -> Maybe V1StorageOSVolumeSource
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1Volume)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ISCSIVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"iscsi")
      Parser
  (Text
   -> Maybe V1NFSVolumeSource
   -> Maybe V1PersistentVolumeClaimVolumeSource
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1ProjectedVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDVolumeSource
   -> Maybe V1ScaleIOVolumeSource
   -> Maybe V1SecretVolumeSource
   -> Maybe V1StorageOSVolumeSource
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1Volume)
-> Parser Text
-> Parser
     (Maybe V1NFSVolumeSource
      -> Maybe V1PersistentVolumeClaimVolumeSource
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1ProjectedVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDVolumeSource
      -> Maybe V1ScaleIOVolumeSource
      -> Maybe V1SecretVolumeSource
      -> Maybe V1StorageOSVolumeSource
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1Volume)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser
  (Maybe V1NFSVolumeSource
   -> Maybe V1PersistentVolumeClaimVolumeSource
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1ProjectedVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDVolumeSource
   -> Maybe V1ScaleIOVolumeSource
   -> Maybe V1SecretVolumeSource
   -> Maybe V1StorageOSVolumeSource
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1Volume)
-> Parser (Maybe V1NFSVolumeSource)
-> Parser
     (Maybe V1PersistentVolumeClaimVolumeSource
      -> Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1ProjectedVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDVolumeSource
      -> Maybe V1ScaleIOVolumeSource
      -> Maybe V1SecretVolumeSource
      -> Maybe V1StorageOSVolumeSource
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1Volume)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1NFSVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nfs")
      Parser
  (Maybe V1PersistentVolumeClaimVolumeSource
   -> Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1ProjectedVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDVolumeSource
   -> Maybe V1ScaleIOVolumeSource
   -> Maybe V1SecretVolumeSource
   -> Maybe V1StorageOSVolumeSource
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1Volume)
-> Parser (Maybe V1PersistentVolumeClaimVolumeSource)
-> Parser
     (Maybe V1PhotonPersistentDiskVolumeSource
      -> Maybe V1PortworxVolumeSource
      -> Maybe V1ProjectedVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDVolumeSource
      -> Maybe V1ScaleIOVolumeSource
      -> Maybe V1SecretVolumeSource
      -> Maybe V1StorageOSVolumeSource
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1Volume)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1PersistentVolumeClaimVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"persistentVolumeClaim")
      Parser
  (Maybe V1PhotonPersistentDiskVolumeSource
   -> Maybe V1PortworxVolumeSource
   -> Maybe V1ProjectedVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDVolumeSource
   -> Maybe V1ScaleIOVolumeSource
   -> Maybe V1SecretVolumeSource
   -> Maybe V1StorageOSVolumeSource
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1Volume)
-> Parser (Maybe V1PhotonPersistentDiskVolumeSource)
-> Parser
     (Maybe V1PortworxVolumeSource
      -> Maybe V1ProjectedVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDVolumeSource
      -> Maybe V1ScaleIOVolumeSource
      -> Maybe V1SecretVolumeSource
      -> Maybe V1StorageOSVolumeSource
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1Volume)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1PhotonPersistentDiskVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"photonPersistentDisk")
      Parser
  (Maybe V1PortworxVolumeSource
   -> Maybe V1ProjectedVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDVolumeSource
   -> Maybe V1ScaleIOVolumeSource
   -> Maybe V1SecretVolumeSource
   -> Maybe V1StorageOSVolumeSource
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1Volume)
-> Parser (Maybe V1PortworxVolumeSource)
-> Parser
     (Maybe V1ProjectedVolumeSource
      -> Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDVolumeSource
      -> Maybe V1ScaleIOVolumeSource
      -> Maybe V1SecretVolumeSource
      -> Maybe V1StorageOSVolumeSource
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1Volume)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1PortworxVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"portworxVolume")
      Parser
  (Maybe V1ProjectedVolumeSource
   -> Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDVolumeSource
   -> Maybe V1ScaleIOVolumeSource
   -> Maybe V1SecretVolumeSource
   -> Maybe V1StorageOSVolumeSource
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1Volume)
-> Parser (Maybe V1ProjectedVolumeSource)
-> Parser
     (Maybe V1QuobyteVolumeSource
      -> Maybe V1RBDVolumeSource
      -> Maybe V1ScaleIOVolumeSource
      -> Maybe V1SecretVolumeSource
      -> Maybe V1StorageOSVolumeSource
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1Volume)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ProjectedVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"projected")
      Parser
  (Maybe V1QuobyteVolumeSource
   -> Maybe V1RBDVolumeSource
   -> Maybe V1ScaleIOVolumeSource
   -> Maybe V1SecretVolumeSource
   -> Maybe V1StorageOSVolumeSource
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1Volume)
-> Parser (Maybe V1QuobyteVolumeSource)
-> Parser
     (Maybe V1RBDVolumeSource
      -> Maybe V1ScaleIOVolumeSource
      -> Maybe V1SecretVolumeSource
      -> Maybe V1StorageOSVolumeSource
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1Volume)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1QuobyteVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"quobyte")
      Parser
  (Maybe V1RBDVolumeSource
   -> Maybe V1ScaleIOVolumeSource
   -> Maybe V1SecretVolumeSource
   -> Maybe V1StorageOSVolumeSource
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1Volume)
-> Parser (Maybe V1RBDVolumeSource)
-> Parser
     (Maybe V1ScaleIOVolumeSource
      -> Maybe V1SecretVolumeSource
      -> Maybe V1StorageOSVolumeSource
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1Volume)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1RBDVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"rbd")
      Parser
  (Maybe V1ScaleIOVolumeSource
   -> Maybe V1SecretVolumeSource
   -> Maybe V1StorageOSVolumeSource
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1Volume)
-> Parser (Maybe V1ScaleIOVolumeSource)
-> Parser
     (Maybe V1SecretVolumeSource
      -> Maybe V1StorageOSVolumeSource
      -> Maybe V1VsphereVirtualDiskVolumeSource
      -> V1Volume)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ScaleIOVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"scaleIO")
      Parser
  (Maybe V1SecretVolumeSource
   -> Maybe V1StorageOSVolumeSource
   -> Maybe V1VsphereVirtualDiskVolumeSource
   -> V1Volume)
-> Parser (Maybe V1SecretVolumeSource)
-> Parser
     (Maybe V1StorageOSVolumeSource
      -> Maybe V1VsphereVirtualDiskVolumeSource -> V1Volume)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1SecretVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"secret")
      Parser
  (Maybe V1StorageOSVolumeSource
   -> Maybe V1VsphereVirtualDiskVolumeSource -> V1Volume)
-> Parser (Maybe V1StorageOSVolumeSource)
-> Parser (Maybe V1VsphereVirtualDiskVolumeSource -> V1Volume)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1StorageOSVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"storageos")
      Parser (Maybe V1VsphereVirtualDiskVolumeSource -> V1Volume)
-> Parser (Maybe V1VsphereVirtualDiskVolumeSource)
-> Parser V1Volume
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1VsphereVirtualDiskVolumeSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"vsphereVolume")

-- | ToJSON V1Volume
instance A.ToJSON V1Volume where
  toJSON :: V1Volume -> Value
toJSON V1Volume {Maybe V1VsphereVirtualDiskVolumeSource
Maybe V1StorageOSVolumeSource
Maybe V1SecretVolumeSource
Maybe V1ScaleIOVolumeSource
Maybe V1RBDVolumeSource
Maybe V1QuobyteVolumeSource
Maybe V1ProjectedVolumeSource
Maybe V1PortworxVolumeSource
Maybe V1PhotonPersistentDiskVolumeSource
Maybe V1PersistentVolumeClaimVolumeSource
Maybe V1NFSVolumeSource
Maybe V1ImageVolumeSource
Maybe V1ISCSIVolumeSource
Maybe V1HostPathVolumeSource
Maybe V1GlusterfsVolumeSource
Maybe V1GitRepoVolumeSource
Maybe V1GCEPersistentDiskVolumeSource
Maybe V1FlockerVolumeSource
Maybe V1FlexVolumeSource
Maybe V1FCVolumeSource
Maybe V1EphemeralVolumeSource
Maybe V1EmptyDirVolumeSource
Maybe V1DownwardAPIVolumeSource
Maybe V1ConfigMapVolumeSource
Maybe V1CinderVolumeSource
Maybe V1CephFSVolumeSource
Maybe V1CSIVolumeSource
Maybe V1AzureFileVolumeSource
Maybe V1AzureDiskVolumeSource
Maybe V1AWSElasticBlockStoreVolumeSource
Text
$sel:v1VolumeAwsElasticBlockStore:V1Volume :: V1Volume -> Maybe V1AWSElasticBlockStoreVolumeSource
$sel:v1VolumeAzureDisk:V1Volume :: V1Volume -> Maybe V1AzureDiskVolumeSource
$sel:v1VolumeAzureFile:V1Volume :: V1Volume -> Maybe V1AzureFileVolumeSource
$sel:v1VolumeCephfs:V1Volume :: V1Volume -> Maybe V1CephFSVolumeSource
$sel:v1VolumeCinder:V1Volume :: V1Volume -> Maybe V1CinderVolumeSource
$sel:v1VolumeConfigMap:V1Volume :: V1Volume -> Maybe V1ConfigMapVolumeSource
$sel:v1VolumeCsi:V1Volume :: V1Volume -> Maybe V1CSIVolumeSource
$sel:v1VolumeDownwardApi:V1Volume :: V1Volume -> Maybe V1DownwardAPIVolumeSource
$sel:v1VolumeEmptyDir:V1Volume :: V1Volume -> Maybe V1EmptyDirVolumeSource
$sel:v1VolumeEphemeral:V1Volume :: V1Volume -> Maybe V1EphemeralVolumeSource
$sel:v1VolumeFc:V1Volume :: V1Volume -> Maybe V1FCVolumeSource
$sel:v1VolumeFlexVolume:V1Volume :: V1Volume -> Maybe V1FlexVolumeSource
$sel:v1VolumeFlocker:V1Volume :: V1Volume -> Maybe V1FlockerVolumeSource
$sel:v1VolumeGcePersistentDisk:V1Volume :: V1Volume -> Maybe V1GCEPersistentDiskVolumeSource
$sel:v1VolumeGitRepo:V1Volume :: V1Volume -> Maybe V1GitRepoVolumeSource
$sel:v1VolumeGlusterfs:V1Volume :: V1Volume -> Maybe V1GlusterfsVolumeSource
$sel:v1VolumeHostPath:V1Volume :: V1Volume -> Maybe V1HostPathVolumeSource
$sel:v1VolumeImage:V1Volume :: V1Volume -> Maybe V1ImageVolumeSource
$sel:v1VolumeIscsi:V1Volume :: V1Volume -> Maybe V1ISCSIVolumeSource
$sel:v1VolumeName:V1Volume :: V1Volume -> Text
$sel:v1VolumeNfs:V1Volume :: V1Volume -> Maybe V1NFSVolumeSource
$sel:v1VolumePersistentVolumeClaim:V1Volume :: V1Volume -> Maybe V1PersistentVolumeClaimVolumeSource
$sel:v1VolumePhotonPersistentDisk:V1Volume :: V1Volume -> Maybe V1PhotonPersistentDiskVolumeSource
$sel:v1VolumePortworxVolume:V1Volume :: V1Volume -> Maybe V1PortworxVolumeSource
$sel:v1VolumeProjected:V1Volume :: V1Volume -> Maybe V1ProjectedVolumeSource
$sel:v1VolumeQuobyte:V1Volume :: V1Volume -> Maybe V1QuobyteVolumeSource
$sel:v1VolumeRbd:V1Volume :: V1Volume -> Maybe V1RBDVolumeSource
$sel:v1VolumeScaleIo:V1Volume :: V1Volume -> Maybe V1ScaleIOVolumeSource
$sel:v1VolumeSecret:V1Volume :: V1Volume -> Maybe V1SecretVolumeSource
$sel:v1VolumeStorageos:V1Volume :: V1Volume -> Maybe V1StorageOSVolumeSource
$sel:v1VolumeVsphereVolume:V1Volume :: V1Volume -> Maybe V1VsphereVirtualDiskVolumeSource
v1VolumeAwsElasticBlockStore :: Maybe V1AWSElasticBlockStoreVolumeSource
v1VolumeAzureDisk :: Maybe V1AzureDiskVolumeSource
v1VolumeAzureFile :: Maybe V1AzureFileVolumeSource
v1VolumeCephfs :: Maybe V1CephFSVolumeSource
v1VolumeCinder :: Maybe V1CinderVolumeSource
v1VolumeConfigMap :: Maybe V1ConfigMapVolumeSource
v1VolumeCsi :: Maybe V1CSIVolumeSource
v1VolumeDownwardApi :: Maybe V1DownwardAPIVolumeSource
v1VolumeEmptyDir :: Maybe V1EmptyDirVolumeSource
v1VolumeEphemeral :: Maybe V1EphemeralVolumeSource
v1VolumeFc :: Maybe V1FCVolumeSource
v1VolumeFlexVolume :: Maybe V1FlexVolumeSource
v1VolumeFlocker :: Maybe V1FlockerVolumeSource
v1VolumeGcePersistentDisk :: Maybe V1GCEPersistentDiskVolumeSource
v1VolumeGitRepo :: Maybe V1GitRepoVolumeSource
v1VolumeGlusterfs :: Maybe V1GlusterfsVolumeSource
v1VolumeHostPath :: Maybe V1HostPathVolumeSource
v1VolumeImage :: Maybe V1ImageVolumeSource
v1VolumeIscsi :: Maybe V1ISCSIVolumeSource
v1VolumeName :: Text
v1VolumeNfs :: Maybe V1NFSVolumeSource
v1VolumePersistentVolumeClaim :: Maybe V1PersistentVolumeClaimVolumeSource
v1VolumePhotonPersistentDisk :: Maybe V1PhotonPersistentDiskVolumeSource
v1VolumePortworxVolume :: Maybe V1PortworxVolumeSource
v1VolumeProjected :: Maybe V1ProjectedVolumeSource
v1VolumeQuobyte :: Maybe V1QuobyteVolumeSource
v1VolumeRbd :: Maybe V1RBDVolumeSource
v1VolumeScaleIo :: Maybe V1ScaleIOVolumeSource
v1VolumeSecret :: Maybe V1SecretVolumeSource
v1VolumeStorageos :: Maybe V1StorageOSVolumeSource
v1VolumeVsphereVolume :: Maybe V1VsphereVirtualDiskVolumeSource
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"awsElasticBlockStore" Key -> Maybe V1AWSElasticBlockStoreVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1AWSElasticBlockStoreVolumeSource
v1VolumeAwsElasticBlockStore
      , Key
"azureDisk" Key -> Maybe V1AzureDiskVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1AzureDiskVolumeSource
v1VolumeAzureDisk
      , Key
"azureFile" Key -> Maybe V1AzureFileVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1AzureFileVolumeSource
v1VolumeAzureFile
      , Key
"cephfs" Key -> Maybe V1CephFSVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1CephFSVolumeSource
v1VolumeCephfs
      , Key
"cinder" Key -> Maybe V1CinderVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1CinderVolumeSource
v1VolumeCinder
      , Key
"configMap" Key -> Maybe V1ConfigMapVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ConfigMapVolumeSource
v1VolumeConfigMap
      , Key
"csi" Key -> Maybe V1CSIVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1CSIVolumeSource
v1VolumeCsi
      , Key
"downwardAPI" Key -> Maybe V1DownwardAPIVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1DownwardAPIVolumeSource
v1VolumeDownwardApi
      , Key
"emptyDir" Key -> Maybe V1EmptyDirVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1EmptyDirVolumeSource
v1VolumeEmptyDir
      , Key
"ephemeral" Key -> Maybe V1EphemeralVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1EphemeralVolumeSource
v1VolumeEphemeral
      , Key
"fc" Key -> Maybe V1FCVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1FCVolumeSource
v1VolumeFc
      , Key
"flexVolume" Key -> Maybe V1FlexVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1FlexVolumeSource
v1VolumeFlexVolume
      , Key
"flocker" Key -> Maybe V1FlockerVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1FlockerVolumeSource
v1VolumeFlocker
      , Key
"gcePersistentDisk" Key -> Maybe V1GCEPersistentDiskVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1GCEPersistentDiskVolumeSource
v1VolumeGcePersistentDisk
      , Key
"gitRepo" Key -> Maybe V1GitRepoVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1GitRepoVolumeSource
v1VolumeGitRepo
      , Key
"glusterfs" Key -> Maybe V1GlusterfsVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1GlusterfsVolumeSource
v1VolumeGlusterfs
      , Key
"hostPath" Key -> Maybe V1HostPathVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1HostPathVolumeSource
v1VolumeHostPath
      , Key
"image" Key -> Maybe V1ImageVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ImageVolumeSource
v1VolumeImage
      , Key
"iscsi" Key -> Maybe V1ISCSIVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ISCSIVolumeSource
v1VolumeIscsi
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1VolumeName
      , Key
"nfs" Key -> Maybe V1NFSVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1NFSVolumeSource
v1VolumeNfs
      , Key
"persistentVolumeClaim" Key -> Maybe V1PersistentVolumeClaimVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1PersistentVolumeClaimVolumeSource
v1VolumePersistentVolumeClaim
      , Key
"photonPersistentDisk" Key -> Maybe V1PhotonPersistentDiskVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1PhotonPersistentDiskVolumeSource
v1VolumePhotonPersistentDisk
      , Key
"portworxVolume" Key -> Maybe V1PortworxVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1PortworxVolumeSource
v1VolumePortworxVolume
      , Key
"projected" Key -> Maybe V1ProjectedVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ProjectedVolumeSource
v1VolumeProjected
      , Key
"quobyte" Key -> Maybe V1QuobyteVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1QuobyteVolumeSource
v1VolumeQuobyte
      , Key
"rbd" Key -> Maybe V1RBDVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1RBDVolumeSource
v1VolumeRbd
      , Key
"scaleIO" Key -> Maybe V1ScaleIOVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ScaleIOVolumeSource
v1VolumeScaleIo
      , Key
"secret" Key -> Maybe V1SecretVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1SecretVolumeSource
v1VolumeSecret
      , Key
"storageos" Key -> Maybe V1StorageOSVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1StorageOSVolumeSource
v1VolumeStorageos
      , Key
"vsphereVolume" Key -> Maybe V1VsphereVirtualDiskVolumeSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1VsphereVirtualDiskVolumeSource
v1VolumeVsphereVolume
      ]


-- | Construct a value of type 'V1Volume' (by applying it's required fields, if any)
mkV1Volume
  :: Text -- ^ 'v1VolumeName': name of the volume. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  -> V1Volume
mkV1Volume :: Text -> V1Volume
mkV1Volume Text
v1VolumeName =
  V1Volume
  { $sel:v1VolumeAwsElasticBlockStore:V1Volume :: Maybe V1AWSElasticBlockStoreVolumeSource
v1VolumeAwsElasticBlockStore = Maybe V1AWSElasticBlockStoreVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1VolumeAzureDisk:V1Volume :: Maybe V1AzureDiskVolumeSource
v1VolumeAzureDisk = Maybe V1AzureDiskVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1VolumeAzureFile:V1Volume :: Maybe V1AzureFileVolumeSource
v1VolumeAzureFile = Maybe V1AzureFileVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1VolumeCephfs:V1Volume :: Maybe V1CephFSVolumeSource
v1VolumeCephfs = Maybe V1CephFSVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1VolumeCinder:V1Volume :: Maybe V1CinderVolumeSource
v1VolumeCinder = Maybe V1CinderVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1VolumeConfigMap:V1Volume :: Maybe V1ConfigMapVolumeSource
v1VolumeConfigMap = Maybe V1ConfigMapVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1VolumeCsi:V1Volume :: Maybe V1CSIVolumeSource
v1VolumeCsi = Maybe V1CSIVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1VolumeDownwardApi:V1Volume :: Maybe V1DownwardAPIVolumeSource
v1VolumeDownwardApi = Maybe V1DownwardAPIVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1VolumeEmptyDir:V1Volume :: Maybe V1EmptyDirVolumeSource
v1VolumeEmptyDir = Maybe V1EmptyDirVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1VolumeEphemeral:V1Volume :: Maybe V1EphemeralVolumeSource
v1VolumeEphemeral = Maybe V1EphemeralVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1VolumeFc:V1Volume :: Maybe V1FCVolumeSource
v1VolumeFc = Maybe V1FCVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1VolumeFlexVolume:V1Volume :: Maybe V1FlexVolumeSource
v1VolumeFlexVolume = Maybe V1FlexVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1VolumeFlocker:V1Volume :: Maybe V1FlockerVolumeSource
v1VolumeFlocker = Maybe V1FlockerVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1VolumeGcePersistentDisk:V1Volume :: Maybe V1GCEPersistentDiskVolumeSource
v1VolumeGcePersistentDisk = Maybe V1GCEPersistentDiskVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1VolumeGitRepo:V1Volume :: Maybe V1GitRepoVolumeSource
v1VolumeGitRepo = Maybe V1GitRepoVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1VolumeGlusterfs:V1Volume :: Maybe V1GlusterfsVolumeSource
v1VolumeGlusterfs = Maybe V1GlusterfsVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1VolumeHostPath:V1Volume :: Maybe V1HostPathVolumeSource
v1VolumeHostPath = Maybe V1HostPathVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1VolumeImage:V1Volume :: Maybe V1ImageVolumeSource
v1VolumeImage = Maybe V1ImageVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1VolumeIscsi:V1Volume :: Maybe V1ISCSIVolumeSource
v1VolumeIscsi = Maybe V1ISCSIVolumeSource
forall a. Maybe a
Nothing
  , Text
$sel:v1VolumeName:V1Volume :: Text
v1VolumeName :: Text
v1VolumeName
  , $sel:v1VolumeNfs:V1Volume :: Maybe V1NFSVolumeSource
v1VolumeNfs = Maybe V1NFSVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1VolumePersistentVolumeClaim:V1Volume :: Maybe V1PersistentVolumeClaimVolumeSource
v1VolumePersistentVolumeClaim = Maybe V1PersistentVolumeClaimVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1VolumePhotonPersistentDisk:V1Volume :: Maybe V1PhotonPersistentDiskVolumeSource
v1VolumePhotonPersistentDisk = Maybe V1PhotonPersistentDiskVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1VolumePortworxVolume:V1Volume :: Maybe V1PortworxVolumeSource
v1VolumePortworxVolume = Maybe V1PortworxVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1VolumeProjected:V1Volume :: Maybe V1ProjectedVolumeSource
v1VolumeProjected = Maybe V1ProjectedVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1VolumeQuobyte:V1Volume :: Maybe V1QuobyteVolumeSource
v1VolumeQuobyte = Maybe V1QuobyteVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1VolumeRbd:V1Volume :: Maybe V1RBDVolumeSource
v1VolumeRbd = Maybe V1RBDVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1VolumeScaleIo:V1Volume :: Maybe V1ScaleIOVolumeSource
v1VolumeScaleIo = Maybe V1ScaleIOVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1VolumeSecret:V1Volume :: Maybe V1SecretVolumeSource
v1VolumeSecret = Maybe V1SecretVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1VolumeStorageos:V1Volume :: Maybe V1StorageOSVolumeSource
v1VolumeStorageos = Maybe V1StorageOSVolumeSource
forall a. Maybe a
Nothing
  , $sel:v1VolumeVsphereVolume:V1Volume :: Maybe V1VsphereVirtualDiskVolumeSource
v1VolumeVsphereVolume = Maybe V1VsphereVirtualDiskVolumeSource
forall a. Maybe a
Nothing
  }

-- ** V1VolumeAttachment
-- | V1VolumeAttachment
-- VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.  VolumeAttachment objects are non-namespaced.
data V1VolumeAttachment = V1VolumeAttachment
  { V1VolumeAttachment -> Maybe Text
v1VolumeAttachmentApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1VolumeAttachment -> Maybe Text
v1VolumeAttachmentKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1VolumeAttachment -> Maybe V1ObjectMeta
v1VolumeAttachmentMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1VolumeAttachment -> V1VolumeAttachmentSpec
v1VolumeAttachmentSpec :: !(V1VolumeAttachmentSpec) -- ^ /Required/ "spec"
  , V1VolumeAttachment -> Maybe V1VolumeAttachmentStatus
v1VolumeAttachmentStatus :: !(Maybe V1VolumeAttachmentStatus) -- ^ "status"
  } deriving (Int -> V1VolumeAttachment -> ShowS
[V1VolumeAttachment] -> ShowS
V1VolumeAttachment -> String
(Int -> V1VolumeAttachment -> ShowS)
-> (V1VolumeAttachment -> String)
-> ([V1VolumeAttachment] -> ShowS)
-> Show V1VolumeAttachment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1VolumeAttachment -> ShowS
showsPrec :: Int -> V1VolumeAttachment -> ShowS
$cshow :: V1VolumeAttachment -> String
show :: V1VolumeAttachment -> String
$cshowList :: [V1VolumeAttachment] -> ShowS
showList :: [V1VolumeAttachment] -> ShowS
P.Show, V1VolumeAttachment -> V1VolumeAttachment -> Bool
(V1VolumeAttachment -> V1VolumeAttachment -> Bool)
-> (V1VolumeAttachment -> V1VolumeAttachment -> Bool)
-> Eq V1VolumeAttachment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1VolumeAttachment -> V1VolumeAttachment -> Bool
== :: V1VolumeAttachment -> V1VolumeAttachment -> Bool
$c/= :: V1VolumeAttachment -> V1VolumeAttachment -> Bool
/= :: V1VolumeAttachment -> V1VolumeAttachment -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1VolumeAttachment
instance A.FromJSON V1VolumeAttachment where
  parseJSON :: Value -> Parser V1VolumeAttachment
parseJSON = String
-> (Object -> Parser V1VolumeAttachment)
-> Value
-> Parser V1VolumeAttachment
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1VolumeAttachment" ((Object -> Parser V1VolumeAttachment)
 -> Value -> Parser V1VolumeAttachment)
-> (Object -> Parser V1VolumeAttachment)
-> Value
-> Parser V1VolumeAttachment
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> V1VolumeAttachmentSpec
-> Maybe V1VolumeAttachmentStatus
-> V1VolumeAttachment
V1VolumeAttachment
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> V1VolumeAttachmentSpec
 -> Maybe V1VolumeAttachmentStatus
 -> V1VolumeAttachment)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> V1VolumeAttachmentSpec
      -> Maybe V1VolumeAttachmentStatus
      -> V1VolumeAttachment)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> V1VolumeAttachmentSpec
   -> Maybe V1VolumeAttachmentStatus
   -> V1VolumeAttachment)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> V1VolumeAttachmentSpec
      -> Maybe V1VolumeAttachmentStatus
      -> V1VolumeAttachment)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> V1VolumeAttachmentSpec
   -> Maybe V1VolumeAttachmentStatus
   -> V1VolumeAttachment)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (V1VolumeAttachmentSpec
      -> Maybe V1VolumeAttachmentStatus -> V1VolumeAttachment)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (V1VolumeAttachmentSpec
   -> Maybe V1VolumeAttachmentStatus -> V1VolumeAttachment)
-> Parser V1VolumeAttachmentSpec
-> Parser (Maybe V1VolumeAttachmentStatus -> V1VolumeAttachment)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1VolumeAttachmentSpec
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"spec")
      Parser (Maybe V1VolumeAttachmentStatus -> V1VolumeAttachment)
-> Parser (Maybe V1VolumeAttachmentStatus)
-> Parser V1VolumeAttachment
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1VolumeAttachmentStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1VolumeAttachment
instance A.ToJSON V1VolumeAttachment where
  toJSON :: V1VolumeAttachment -> Value
toJSON V1VolumeAttachment {Maybe Text
Maybe V1VolumeAttachmentStatus
Maybe V1ObjectMeta
V1VolumeAttachmentSpec
$sel:v1VolumeAttachmentApiVersion:V1VolumeAttachment :: V1VolumeAttachment -> Maybe Text
$sel:v1VolumeAttachmentKind:V1VolumeAttachment :: V1VolumeAttachment -> Maybe Text
$sel:v1VolumeAttachmentMetadata:V1VolumeAttachment :: V1VolumeAttachment -> Maybe V1ObjectMeta
$sel:v1VolumeAttachmentSpec:V1VolumeAttachment :: V1VolumeAttachment -> V1VolumeAttachmentSpec
$sel:v1VolumeAttachmentStatus:V1VolumeAttachment :: V1VolumeAttachment -> Maybe V1VolumeAttachmentStatus
v1VolumeAttachmentApiVersion :: Maybe Text
v1VolumeAttachmentKind :: Maybe Text
v1VolumeAttachmentMetadata :: Maybe V1ObjectMeta
v1VolumeAttachmentSpec :: V1VolumeAttachmentSpec
v1VolumeAttachmentStatus :: Maybe V1VolumeAttachmentStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1VolumeAttachmentApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1VolumeAttachmentKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1VolumeAttachmentMetadata
      , Key
"spec" Key -> V1VolumeAttachmentSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1VolumeAttachmentSpec
v1VolumeAttachmentSpec
      , Key
"status" Key -> Maybe V1VolumeAttachmentStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1VolumeAttachmentStatus
v1VolumeAttachmentStatus
      ]


-- | Construct a value of type 'V1VolumeAttachment' (by applying it's required fields, if any)
mkV1VolumeAttachment
  :: V1VolumeAttachmentSpec -- ^ 'v1VolumeAttachmentSpec' 
  -> V1VolumeAttachment
mkV1VolumeAttachment :: V1VolumeAttachmentSpec -> V1VolumeAttachment
mkV1VolumeAttachment V1VolumeAttachmentSpec
v1VolumeAttachmentSpec =
  V1VolumeAttachment
  { $sel:v1VolumeAttachmentApiVersion:V1VolumeAttachment :: Maybe Text
v1VolumeAttachmentApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1VolumeAttachmentKind:V1VolumeAttachment :: Maybe Text
v1VolumeAttachmentKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1VolumeAttachmentMetadata:V1VolumeAttachment :: Maybe V1ObjectMeta
v1VolumeAttachmentMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , V1VolumeAttachmentSpec
$sel:v1VolumeAttachmentSpec:V1VolumeAttachment :: V1VolumeAttachmentSpec
v1VolumeAttachmentSpec :: V1VolumeAttachmentSpec
v1VolumeAttachmentSpec
  , $sel:v1VolumeAttachmentStatus:V1VolumeAttachment :: Maybe V1VolumeAttachmentStatus
v1VolumeAttachmentStatus = Maybe V1VolumeAttachmentStatus
forall a. Maybe a
Nothing
  }

-- ** V1VolumeAttachmentList
-- | V1VolumeAttachmentList
-- VolumeAttachmentList is a collection of VolumeAttachment objects.
data V1VolumeAttachmentList = V1VolumeAttachmentList
  { V1VolumeAttachmentList -> Maybe Text
v1VolumeAttachmentListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1VolumeAttachmentList -> [V1VolumeAttachment]
v1VolumeAttachmentListItems :: !([V1VolumeAttachment]) -- ^ /Required/ "items" - items is the list of VolumeAttachments
  , V1VolumeAttachmentList -> Maybe Text
v1VolumeAttachmentListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1VolumeAttachmentList -> Maybe V1ListMeta
v1VolumeAttachmentListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1VolumeAttachmentList -> ShowS
[V1VolumeAttachmentList] -> ShowS
V1VolumeAttachmentList -> String
(Int -> V1VolumeAttachmentList -> ShowS)
-> (V1VolumeAttachmentList -> String)
-> ([V1VolumeAttachmentList] -> ShowS)
-> Show V1VolumeAttachmentList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1VolumeAttachmentList -> ShowS
showsPrec :: Int -> V1VolumeAttachmentList -> ShowS
$cshow :: V1VolumeAttachmentList -> String
show :: V1VolumeAttachmentList -> String
$cshowList :: [V1VolumeAttachmentList] -> ShowS
showList :: [V1VolumeAttachmentList] -> ShowS
P.Show, V1VolumeAttachmentList -> V1VolumeAttachmentList -> Bool
(V1VolumeAttachmentList -> V1VolumeAttachmentList -> Bool)
-> (V1VolumeAttachmentList -> V1VolumeAttachmentList -> Bool)
-> Eq V1VolumeAttachmentList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1VolumeAttachmentList -> V1VolumeAttachmentList -> Bool
== :: V1VolumeAttachmentList -> V1VolumeAttachmentList -> Bool
$c/= :: V1VolumeAttachmentList -> V1VolumeAttachmentList -> Bool
/= :: V1VolumeAttachmentList -> V1VolumeAttachmentList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1VolumeAttachmentList
instance A.FromJSON V1VolumeAttachmentList where
  parseJSON :: Value -> Parser V1VolumeAttachmentList
parseJSON = String
-> (Object -> Parser V1VolumeAttachmentList)
-> Value
-> Parser V1VolumeAttachmentList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1VolumeAttachmentList" ((Object -> Parser V1VolumeAttachmentList)
 -> Value -> Parser V1VolumeAttachmentList)
-> (Object -> Parser V1VolumeAttachmentList)
-> Value
-> Parser V1VolumeAttachmentList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1VolumeAttachment]
-> Maybe Text
-> Maybe V1ListMeta
-> V1VolumeAttachmentList
V1VolumeAttachmentList
      (Maybe Text
 -> [V1VolumeAttachment]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1VolumeAttachmentList)
-> Parser (Maybe Text)
-> Parser
     ([V1VolumeAttachment]
      -> Maybe Text -> Maybe V1ListMeta -> V1VolumeAttachmentList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1VolumeAttachment]
   -> Maybe Text -> Maybe V1ListMeta -> V1VolumeAttachmentList)
-> Parser [V1VolumeAttachment]
-> Parser
     (Maybe Text -> Maybe V1ListMeta -> V1VolumeAttachmentList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1VolumeAttachment]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1VolumeAttachmentList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1VolumeAttachmentList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1VolumeAttachmentList)
-> Parser (Maybe V1ListMeta) -> Parser V1VolumeAttachmentList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1VolumeAttachmentList
instance A.ToJSON V1VolumeAttachmentList where
  toJSON :: V1VolumeAttachmentList -> Value
toJSON V1VolumeAttachmentList {[V1VolumeAttachment]
Maybe Text
Maybe V1ListMeta
$sel:v1VolumeAttachmentListApiVersion:V1VolumeAttachmentList :: V1VolumeAttachmentList -> Maybe Text
$sel:v1VolumeAttachmentListItems:V1VolumeAttachmentList :: V1VolumeAttachmentList -> [V1VolumeAttachment]
$sel:v1VolumeAttachmentListKind:V1VolumeAttachmentList :: V1VolumeAttachmentList -> Maybe Text
$sel:v1VolumeAttachmentListMetadata:V1VolumeAttachmentList :: V1VolumeAttachmentList -> Maybe V1ListMeta
v1VolumeAttachmentListApiVersion :: Maybe Text
v1VolumeAttachmentListItems :: [V1VolumeAttachment]
v1VolumeAttachmentListKind :: Maybe Text
v1VolumeAttachmentListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1VolumeAttachmentListApiVersion
      , Key
"items" Key -> [V1VolumeAttachment] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1VolumeAttachment]
v1VolumeAttachmentListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1VolumeAttachmentListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1VolumeAttachmentListMetadata
      ]


-- | Construct a value of type 'V1VolumeAttachmentList' (by applying it's required fields, if any)
mkV1VolumeAttachmentList
  :: [V1VolumeAttachment] -- ^ 'v1VolumeAttachmentListItems': items is the list of VolumeAttachments
  -> V1VolumeAttachmentList
mkV1VolumeAttachmentList :: [V1VolumeAttachment] -> V1VolumeAttachmentList
mkV1VolumeAttachmentList [V1VolumeAttachment]
v1VolumeAttachmentListItems =
  V1VolumeAttachmentList
  { $sel:v1VolumeAttachmentListApiVersion:V1VolumeAttachmentList :: Maybe Text
v1VolumeAttachmentListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1VolumeAttachment]
$sel:v1VolumeAttachmentListItems:V1VolumeAttachmentList :: [V1VolumeAttachment]
v1VolumeAttachmentListItems :: [V1VolumeAttachment]
v1VolumeAttachmentListItems
  , $sel:v1VolumeAttachmentListKind:V1VolumeAttachmentList :: Maybe Text
v1VolumeAttachmentListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1VolumeAttachmentListMetadata:V1VolumeAttachmentList :: Maybe V1ListMeta
v1VolumeAttachmentListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1VolumeAttachmentSource
-- | V1VolumeAttachmentSource
-- VolumeAttachmentSource represents a volume that should be attached. Right now only PersistentVolumes can be attached via external attacher, in the future we may allow also inline volumes in pods. Exactly one member can be set.
data V1VolumeAttachmentSource = V1VolumeAttachmentSource
  { V1VolumeAttachmentSource -> Maybe V1PersistentVolumeSpec
v1VolumeAttachmentSourceInlineVolumeSpec :: !(Maybe V1PersistentVolumeSpec) -- ^ "inlineVolumeSpec"
  , V1VolumeAttachmentSource -> Maybe Text
v1VolumeAttachmentSourcePersistentVolumeName :: !(Maybe Text) -- ^ "persistentVolumeName" - persistentVolumeName represents the name of the persistent volume to attach.
  } deriving (Int -> V1VolumeAttachmentSource -> ShowS
[V1VolumeAttachmentSource] -> ShowS
V1VolumeAttachmentSource -> String
(Int -> V1VolumeAttachmentSource -> ShowS)
-> (V1VolumeAttachmentSource -> String)
-> ([V1VolumeAttachmentSource] -> ShowS)
-> Show V1VolumeAttachmentSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1VolumeAttachmentSource -> ShowS
showsPrec :: Int -> V1VolumeAttachmentSource -> ShowS
$cshow :: V1VolumeAttachmentSource -> String
show :: V1VolumeAttachmentSource -> String
$cshowList :: [V1VolumeAttachmentSource] -> ShowS
showList :: [V1VolumeAttachmentSource] -> ShowS
P.Show, V1VolumeAttachmentSource -> V1VolumeAttachmentSource -> Bool
(V1VolumeAttachmentSource -> V1VolumeAttachmentSource -> Bool)
-> (V1VolumeAttachmentSource -> V1VolumeAttachmentSource -> Bool)
-> Eq V1VolumeAttachmentSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1VolumeAttachmentSource -> V1VolumeAttachmentSource -> Bool
== :: V1VolumeAttachmentSource -> V1VolumeAttachmentSource -> Bool
$c/= :: V1VolumeAttachmentSource -> V1VolumeAttachmentSource -> Bool
/= :: V1VolumeAttachmentSource -> V1VolumeAttachmentSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1VolumeAttachmentSource
instance A.FromJSON V1VolumeAttachmentSource where
  parseJSON :: Value -> Parser V1VolumeAttachmentSource
parseJSON = String
-> (Object -> Parser V1VolumeAttachmentSource)
-> Value
-> Parser V1VolumeAttachmentSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1VolumeAttachmentSource" ((Object -> Parser V1VolumeAttachmentSource)
 -> Value -> Parser V1VolumeAttachmentSource)
-> (Object -> Parser V1VolumeAttachmentSource)
-> Value
-> Parser V1VolumeAttachmentSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1PersistentVolumeSpec
-> Maybe Text -> V1VolumeAttachmentSource
V1VolumeAttachmentSource
      (Maybe V1PersistentVolumeSpec
 -> Maybe Text -> V1VolumeAttachmentSource)
-> Parser (Maybe V1PersistentVolumeSpec)
-> Parser (Maybe Text -> V1VolumeAttachmentSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1PersistentVolumeSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"inlineVolumeSpec")
      Parser (Maybe Text -> V1VolumeAttachmentSource)
-> Parser (Maybe Text) -> Parser V1VolumeAttachmentSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"persistentVolumeName")

-- | ToJSON V1VolumeAttachmentSource
instance A.ToJSON V1VolumeAttachmentSource where
  toJSON :: V1VolumeAttachmentSource -> Value
toJSON V1VolumeAttachmentSource {Maybe Text
Maybe V1PersistentVolumeSpec
$sel:v1VolumeAttachmentSourceInlineVolumeSpec:V1VolumeAttachmentSource :: V1VolumeAttachmentSource -> Maybe V1PersistentVolumeSpec
$sel:v1VolumeAttachmentSourcePersistentVolumeName:V1VolumeAttachmentSource :: V1VolumeAttachmentSource -> Maybe Text
v1VolumeAttachmentSourceInlineVolumeSpec :: Maybe V1PersistentVolumeSpec
v1VolumeAttachmentSourcePersistentVolumeName :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"inlineVolumeSpec" Key -> Maybe V1PersistentVolumeSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1PersistentVolumeSpec
v1VolumeAttachmentSourceInlineVolumeSpec
      , Key
"persistentVolumeName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1VolumeAttachmentSourcePersistentVolumeName
      ]


-- | Construct a value of type 'V1VolumeAttachmentSource' (by applying it's required fields, if any)
mkV1VolumeAttachmentSource
  :: V1VolumeAttachmentSource
mkV1VolumeAttachmentSource :: V1VolumeAttachmentSource
mkV1VolumeAttachmentSource =
  V1VolumeAttachmentSource
  { $sel:v1VolumeAttachmentSourceInlineVolumeSpec:V1VolumeAttachmentSource :: Maybe V1PersistentVolumeSpec
v1VolumeAttachmentSourceInlineVolumeSpec = Maybe V1PersistentVolumeSpec
forall a. Maybe a
Nothing
  , $sel:v1VolumeAttachmentSourcePersistentVolumeName:V1VolumeAttachmentSource :: Maybe Text
v1VolumeAttachmentSourcePersistentVolumeName = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1VolumeAttachmentSpec
-- | V1VolumeAttachmentSpec
-- VolumeAttachmentSpec is the specification of a VolumeAttachment request.
data V1VolumeAttachmentSpec = V1VolumeAttachmentSpec
  { V1VolumeAttachmentSpec -> Text
v1VolumeAttachmentSpecAttacher :: !(Text) -- ^ /Required/ "attacher" - attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().
  , V1VolumeAttachmentSpec -> Text
v1VolumeAttachmentSpecNodeName :: !(Text) -- ^ /Required/ "nodeName" - nodeName represents the node that the volume should be attached to.
  , V1VolumeAttachmentSpec -> V1VolumeAttachmentSource
v1VolumeAttachmentSpecSource :: !(V1VolumeAttachmentSource) -- ^ /Required/ "source"
  } deriving (Int -> V1VolumeAttachmentSpec -> ShowS
[V1VolumeAttachmentSpec] -> ShowS
V1VolumeAttachmentSpec -> String
(Int -> V1VolumeAttachmentSpec -> ShowS)
-> (V1VolumeAttachmentSpec -> String)
-> ([V1VolumeAttachmentSpec] -> ShowS)
-> Show V1VolumeAttachmentSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1VolumeAttachmentSpec -> ShowS
showsPrec :: Int -> V1VolumeAttachmentSpec -> ShowS
$cshow :: V1VolumeAttachmentSpec -> String
show :: V1VolumeAttachmentSpec -> String
$cshowList :: [V1VolumeAttachmentSpec] -> ShowS
showList :: [V1VolumeAttachmentSpec] -> ShowS
P.Show, V1VolumeAttachmentSpec -> V1VolumeAttachmentSpec -> Bool
(V1VolumeAttachmentSpec -> V1VolumeAttachmentSpec -> Bool)
-> (V1VolumeAttachmentSpec -> V1VolumeAttachmentSpec -> Bool)
-> Eq V1VolumeAttachmentSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1VolumeAttachmentSpec -> V1VolumeAttachmentSpec -> Bool
== :: V1VolumeAttachmentSpec -> V1VolumeAttachmentSpec -> Bool
$c/= :: V1VolumeAttachmentSpec -> V1VolumeAttachmentSpec -> Bool
/= :: V1VolumeAttachmentSpec -> V1VolumeAttachmentSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1VolumeAttachmentSpec
instance A.FromJSON V1VolumeAttachmentSpec where
  parseJSON :: Value -> Parser V1VolumeAttachmentSpec
parseJSON = String
-> (Object -> Parser V1VolumeAttachmentSpec)
-> Value
-> Parser V1VolumeAttachmentSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1VolumeAttachmentSpec" ((Object -> Parser V1VolumeAttachmentSpec)
 -> Value -> Parser V1VolumeAttachmentSpec)
-> (Object -> Parser V1VolumeAttachmentSpec)
-> Value
-> Parser V1VolumeAttachmentSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Text -> V1VolumeAttachmentSource -> V1VolumeAttachmentSpec
V1VolumeAttachmentSpec
      (Text
 -> Text -> V1VolumeAttachmentSource -> V1VolumeAttachmentSpec)
-> Parser Text
-> Parser
     (Text -> V1VolumeAttachmentSource -> V1VolumeAttachmentSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"attacher")
      Parser (Text -> V1VolumeAttachmentSource -> V1VolumeAttachmentSpec)
-> Parser Text
-> Parser (V1VolumeAttachmentSource -> V1VolumeAttachmentSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"nodeName")
      Parser (V1VolumeAttachmentSource -> V1VolumeAttachmentSpec)
-> Parser V1VolumeAttachmentSource -> Parser V1VolumeAttachmentSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1VolumeAttachmentSource
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"source")

-- | ToJSON V1VolumeAttachmentSpec
instance A.ToJSON V1VolumeAttachmentSpec where
  toJSON :: V1VolumeAttachmentSpec -> Value
toJSON V1VolumeAttachmentSpec {Text
V1VolumeAttachmentSource
$sel:v1VolumeAttachmentSpecAttacher:V1VolumeAttachmentSpec :: V1VolumeAttachmentSpec -> Text
$sel:v1VolumeAttachmentSpecNodeName:V1VolumeAttachmentSpec :: V1VolumeAttachmentSpec -> Text
$sel:v1VolumeAttachmentSpecSource:V1VolumeAttachmentSpec :: V1VolumeAttachmentSpec -> V1VolumeAttachmentSource
v1VolumeAttachmentSpecAttacher :: Text
v1VolumeAttachmentSpecNodeName :: Text
v1VolumeAttachmentSpecSource :: V1VolumeAttachmentSource
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"attacher" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1VolumeAttachmentSpecAttacher
      , Key
"nodeName" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1VolumeAttachmentSpecNodeName
      , Key
"source" Key -> V1VolumeAttachmentSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1VolumeAttachmentSource
v1VolumeAttachmentSpecSource
      ]


-- | Construct a value of type 'V1VolumeAttachmentSpec' (by applying it's required fields, if any)
mkV1VolumeAttachmentSpec
  :: Text -- ^ 'v1VolumeAttachmentSpecAttacher': attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().
  -> Text -- ^ 'v1VolumeAttachmentSpecNodeName': nodeName represents the node that the volume should be attached to.
  -> V1VolumeAttachmentSource -- ^ 'v1VolumeAttachmentSpecSource' 
  -> V1VolumeAttachmentSpec
mkV1VolumeAttachmentSpec :: Text -> Text -> V1VolumeAttachmentSource -> V1VolumeAttachmentSpec
mkV1VolumeAttachmentSpec Text
v1VolumeAttachmentSpecAttacher Text
v1VolumeAttachmentSpecNodeName V1VolumeAttachmentSource
v1VolumeAttachmentSpecSource =
  V1VolumeAttachmentSpec
  { Text
$sel:v1VolumeAttachmentSpecAttacher:V1VolumeAttachmentSpec :: Text
v1VolumeAttachmentSpecAttacher :: Text
v1VolumeAttachmentSpecAttacher
  , Text
$sel:v1VolumeAttachmentSpecNodeName:V1VolumeAttachmentSpec :: Text
v1VolumeAttachmentSpecNodeName :: Text
v1VolumeAttachmentSpecNodeName
  , V1VolumeAttachmentSource
$sel:v1VolumeAttachmentSpecSource:V1VolumeAttachmentSpec :: V1VolumeAttachmentSource
v1VolumeAttachmentSpecSource :: V1VolumeAttachmentSource
v1VolumeAttachmentSpecSource
  }

-- ** V1VolumeAttachmentStatus
-- | V1VolumeAttachmentStatus
-- VolumeAttachmentStatus is the status of a VolumeAttachment request.
data V1VolumeAttachmentStatus = V1VolumeAttachmentStatus
  { V1VolumeAttachmentStatus -> Maybe V1VolumeError
v1VolumeAttachmentStatusAttachError :: !(Maybe V1VolumeError) -- ^ "attachError"
  , V1VolumeAttachmentStatus -> Bool
v1VolumeAttachmentStatusAttached :: !(Bool) -- ^ /Required/ "attached" - attached indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.
  , V1VolumeAttachmentStatus -> Maybe (Map String Text)
v1VolumeAttachmentStatusAttachmentMetadata :: !(Maybe (Map.Map String Text)) -- ^ "attachmentMetadata" - attachmentMetadata is populated with any information returned by the attach operation, upon successful attach, that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.
  , V1VolumeAttachmentStatus -> Maybe V1VolumeError
v1VolumeAttachmentStatusDetachError :: !(Maybe V1VolumeError) -- ^ "detachError"
  } deriving (Int -> V1VolumeAttachmentStatus -> ShowS
[V1VolumeAttachmentStatus] -> ShowS
V1VolumeAttachmentStatus -> String
(Int -> V1VolumeAttachmentStatus -> ShowS)
-> (V1VolumeAttachmentStatus -> String)
-> ([V1VolumeAttachmentStatus] -> ShowS)
-> Show V1VolumeAttachmentStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1VolumeAttachmentStatus -> ShowS
showsPrec :: Int -> V1VolumeAttachmentStatus -> ShowS
$cshow :: V1VolumeAttachmentStatus -> String
show :: V1VolumeAttachmentStatus -> String
$cshowList :: [V1VolumeAttachmentStatus] -> ShowS
showList :: [V1VolumeAttachmentStatus] -> ShowS
P.Show, V1VolumeAttachmentStatus -> V1VolumeAttachmentStatus -> Bool
(V1VolumeAttachmentStatus -> V1VolumeAttachmentStatus -> Bool)
-> (V1VolumeAttachmentStatus -> V1VolumeAttachmentStatus -> Bool)
-> Eq V1VolumeAttachmentStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1VolumeAttachmentStatus -> V1VolumeAttachmentStatus -> Bool
== :: V1VolumeAttachmentStatus -> V1VolumeAttachmentStatus -> Bool
$c/= :: V1VolumeAttachmentStatus -> V1VolumeAttachmentStatus -> Bool
/= :: V1VolumeAttachmentStatus -> V1VolumeAttachmentStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1VolumeAttachmentStatus
instance A.FromJSON V1VolumeAttachmentStatus where
  parseJSON :: Value -> Parser V1VolumeAttachmentStatus
parseJSON = String
-> (Object -> Parser V1VolumeAttachmentStatus)
-> Value
-> Parser V1VolumeAttachmentStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1VolumeAttachmentStatus" ((Object -> Parser V1VolumeAttachmentStatus)
 -> Value -> Parser V1VolumeAttachmentStatus)
-> (Object -> Parser V1VolumeAttachmentStatus)
-> Value
-> Parser V1VolumeAttachmentStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1VolumeError
-> Bool
-> Maybe (Map String Text)
-> Maybe V1VolumeError
-> V1VolumeAttachmentStatus
V1VolumeAttachmentStatus
      (Maybe V1VolumeError
 -> Bool
 -> Maybe (Map String Text)
 -> Maybe V1VolumeError
 -> V1VolumeAttachmentStatus)
-> Parser (Maybe V1VolumeError)
-> Parser
     (Bool
      -> Maybe (Map String Text)
      -> Maybe V1VolumeError
      -> V1VolumeAttachmentStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1VolumeError)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"attachError")
      Parser
  (Bool
   -> Maybe (Map String Text)
   -> Maybe V1VolumeError
   -> V1VolumeAttachmentStatus)
-> Parser Bool
-> Parser
     (Maybe (Map String Text)
      -> Maybe V1VolumeError -> V1VolumeAttachmentStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Bool
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"attached")
      Parser
  (Maybe (Map String Text)
   -> Maybe V1VolumeError -> V1VolumeAttachmentStatus)
-> Parser (Maybe (Map String Text))
-> Parser (Maybe V1VolumeError -> V1VolumeAttachmentStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String Text))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"attachmentMetadata")
      Parser (Maybe V1VolumeError -> V1VolumeAttachmentStatus)
-> Parser (Maybe V1VolumeError) -> Parser V1VolumeAttachmentStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1VolumeError)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"detachError")

-- | ToJSON V1VolumeAttachmentStatus
instance A.ToJSON V1VolumeAttachmentStatus where
  toJSON :: V1VolumeAttachmentStatus -> Value
toJSON V1VolumeAttachmentStatus {Bool
Maybe (Map String Text)
Maybe V1VolumeError
$sel:v1VolumeAttachmentStatusAttachError:V1VolumeAttachmentStatus :: V1VolumeAttachmentStatus -> Maybe V1VolumeError
$sel:v1VolumeAttachmentStatusAttached:V1VolumeAttachmentStatus :: V1VolumeAttachmentStatus -> Bool
$sel:v1VolumeAttachmentStatusAttachmentMetadata:V1VolumeAttachmentStatus :: V1VolumeAttachmentStatus -> Maybe (Map String Text)
$sel:v1VolumeAttachmentStatusDetachError:V1VolumeAttachmentStatus :: V1VolumeAttachmentStatus -> Maybe V1VolumeError
v1VolumeAttachmentStatusAttachError :: Maybe V1VolumeError
v1VolumeAttachmentStatusAttached :: Bool
v1VolumeAttachmentStatusAttachmentMetadata :: Maybe (Map String Text)
v1VolumeAttachmentStatusDetachError :: Maybe V1VolumeError
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"attachError" Key -> Maybe V1VolumeError -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1VolumeError
v1VolumeAttachmentStatusAttachError
      , Key
"attached" Key -> Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Bool
v1VolumeAttachmentStatusAttached
      , Key
"attachmentMetadata" Key -> Maybe (Map String Text) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Text)
v1VolumeAttachmentStatusAttachmentMetadata
      , Key
"detachError" Key -> Maybe V1VolumeError -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1VolumeError
v1VolumeAttachmentStatusDetachError
      ]


-- | Construct a value of type 'V1VolumeAttachmentStatus' (by applying it's required fields, if any)
mkV1VolumeAttachmentStatus
  :: Bool -- ^ 'v1VolumeAttachmentStatusAttached': attached indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.
  -> V1VolumeAttachmentStatus
mkV1VolumeAttachmentStatus :: Bool -> V1VolumeAttachmentStatus
mkV1VolumeAttachmentStatus Bool
v1VolumeAttachmentStatusAttached =
  V1VolumeAttachmentStatus
  { $sel:v1VolumeAttachmentStatusAttachError:V1VolumeAttachmentStatus :: Maybe V1VolumeError
v1VolumeAttachmentStatusAttachError = Maybe V1VolumeError
forall a. Maybe a
Nothing
  , Bool
$sel:v1VolumeAttachmentStatusAttached:V1VolumeAttachmentStatus :: Bool
v1VolumeAttachmentStatusAttached :: Bool
v1VolumeAttachmentStatusAttached
  , $sel:v1VolumeAttachmentStatusAttachmentMetadata:V1VolumeAttachmentStatus :: Maybe (Map String Text)
v1VolumeAttachmentStatusAttachmentMetadata = Maybe (Map String Text)
forall a. Maybe a
Nothing
  , $sel:v1VolumeAttachmentStatusDetachError:V1VolumeAttachmentStatus :: Maybe V1VolumeError
v1VolumeAttachmentStatusDetachError = Maybe V1VolumeError
forall a. Maybe a
Nothing
  }

-- ** V1VolumeDevice
-- | V1VolumeDevice
-- volumeDevice describes a mapping of a raw block device within a container.
data V1VolumeDevice = V1VolumeDevice
  { V1VolumeDevice -> Text
v1VolumeDeviceDevicePath :: !(Text) -- ^ /Required/ "devicePath" - devicePath is the path inside of the container that the device will be mapped to.
  , V1VolumeDevice -> Text
v1VolumeDeviceName :: !(Text) -- ^ /Required/ "name" - name must match the name of a persistentVolumeClaim in the pod
  } deriving (Int -> V1VolumeDevice -> ShowS
[V1VolumeDevice] -> ShowS
V1VolumeDevice -> String
(Int -> V1VolumeDevice -> ShowS)
-> (V1VolumeDevice -> String)
-> ([V1VolumeDevice] -> ShowS)
-> Show V1VolumeDevice
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1VolumeDevice -> ShowS
showsPrec :: Int -> V1VolumeDevice -> ShowS
$cshow :: V1VolumeDevice -> String
show :: V1VolumeDevice -> String
$cshowList :: [V1VolumeDevice] -> ShowS
showList :: [V1VolumeDevice] -> ShowS
P.Show, V1VolumeDevice -> V1VolumeDevice -> Bool
(V1VolumeDevice -> V1VolumeDevice -> Bool)
-> (V1VolumeDevice -> V1VolumeDevice -> Bool) -> Eq V1VolumeDevice
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1VolumeDevice -> V1VolumeDevice -> Bool
== :: V1VolumeDevice -> V1VolumeDevice -> Bool
$c/= :: V1VolumeDevice -> V1VolumeDevice -> Bool
/= :: V1VolumeDevice -> V1VolumeDevice -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1VolumeDevice
instance A.FromJSON V1VolumeDevice where
  parseJSON :: Value -> Parser V1VolumeDevice
parseJSON = String
-> (Object -> Parser V1VolumeDevice)
-> Value
-> Parser V1VolumeDevice
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1VolumeDevice" ((Object -> Parser V1VolumeDevice)
 -> Value -> Parser V1VolumeDevice)
-> (Object -> Parser V1VolumeDevice)
-> Value
-> Parser V1VolumeDevice
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Text -> V1VolumeDevice
V1VolumeDevice
      (Text -> Text -> V1VolumeDevice)
-> Parser Text -> Parser (Text -> V1VolumeDevice)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"devicePath")
      Parser (Text -> V1VolumeDevice)
-> Parser Text -> Parser V1VolumeDevice
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")

-- | ToJSON V1VolumeDevice
instance A.ToJSON V1VolumeDevice where
  toJSON :: V1VolumeDevice -> Value
toJSON V1VolumeDevice {Text
$sel:v1VolumeDeviceDevicePath:V1VolumeDevice :: V1VolumeDevice -> Text
$sel:v1VolumeDeviceName:V1VolumeDevice :: V1VolumeDevice -> Text
v1VolumeDeviceDevicePath :: Text
v1VolumeDeviceName :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"devicePath" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1VolumeDeviceDevicePath
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1VolumeDeviceName
      ]


-- | Construct a value of type 'V1VolumeDevice' (by applying it's required fields, if any)
mkV1VolumeDevice
  :: Text -- ^ 'v1VolumeDeviceDevicePath': devicePath is the path inside of the container that the device will be mapped to.
  -> Text -- ^ 'v1VolumeDeviceName': name must match the name of a persistentVolumeClaim in the pod
  -> V1VolumeDevice
mkV1VolumeDevice :: Text -> Text -> V1VolumeDevice
mkV1VolumeDevice Text
v1VolumeDeviceDevicePath Text
v1VolumeDeviceName =
  V1VolumeDevice
  { Text
$sel:v1VolumeDeviceDevicePath:V1VolumeDevice :: Text
v1VolumeDeviceDevicePath :: Text
v1VolumeDeviceDevicePath
  , Text
$sel:v1VolumeDeviceName:V1VolumeDevice :: Text
v1VolumeDeviceName :: Text
v1VolumeDeviceName
  }

-- ** V1VolumeError
-- | V1VolumeError
-- VolumeError captures an error encountered during a volume operation.
data V1VolumeError = V1VolumeError
  { V1VolumeError -> Maybe Text
v1VolumeErrorMessage :: !(Maybe Text) -- ^ "message" - message represents the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information.
  , V1VolumeError -> Maybe DateTime
v1VolumeErrorTime :: !(Maybe DateTime) -- ^ "time" - time represents the time the error was encountered.
  } deriving (Int -> V1VolumeError -> ShowS
[V1VolumeError] -> ShowS
V1VolumeError -> String
(Int -> V1VolumeError -> ShowS)
-> (V1VolumeError -> String)
-> ([V1VolumeError] -> ShowS)
-> Show V1VolumeError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1VolumeError -> ShowS
showsPrec :: Int -> V1VolumeError -> ShowS
$cshow :: V1VolumeError -> String
show :: V1VolumeError -> String
$cshowList :: [V1VolumeError] -> ShowS
showList :: [V1VolumeError] -> ShowS
P.Show, V1VolumeError -> V1VolumeError -> Bool
(V1VolumeError -> V1VolumeError -> Bool)
-> (V1VolumeError -> V1VolumeError -> Bool) -> Eq V1VolumeError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1VolumeError -> V1VolumeError -> Bool
== :: V1VolumeError -> V1VolumeError -> Bool
$c/= :: V1VolumeError -> V1VolumeError -> Bool
/= :: V1VolumeError -> V1VolumeError -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1VolumeError
instance A.FromJSON V1VolumeError where
  parseJSON :: Value -> Parser V1VolumeError
parseJSON = String
-> (Object -> Parser V1VolumeError)
-> Value
-> Parser V1VolumeError
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1VolumeError" ((Object -> Parser V1VolumeError) -> Value -> Parser V1VolumeError)
-> (Object -> Parser V1VolumeError)
-> Value
-> Parser V1VolumeError
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Maybe DateTime -> V1VolumeError
V1VolumeError
      (Maybe Text -> Maybe DateTime -> V1VolumeError)
-> Parser (Maybe Text) -> Parser (Maybe DateTime -> V1VolumeError)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"message")
      Parser (Maybe DateTime -> V1VolumeError)
-> Parser (Maybe DateTime) -> Parser V1VolumeError
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"time")

-- | ToJSON V1VolumeError
instance A.ToJSON V1VolumeError where
  toJSON :: V1VolumeError -> Value
toJSON V1VolumeError {Maybe Text
Maybe DateTime
$sel:v1VolumeErrorMessage:V1VolumeError :: V1VolumeError -> Maybe Text
$sel:v1VolumeErrorTime:V1VolumeError :: V1VolumeError -> Maybe DateTime
v1VolumeErrorMessage :: Maybe Text
v1VolumeErrorTime :: Maybe DateTime
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"message" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1VolumeErrorMessage
      , Key
"time" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1VolumeErrorTime
      ]


-- | Construct a value of type 'V1VolumeError' (by applying it's required fields, if any)
mkV1VolumeError
  :: V1VolumeError
mkV1VolumeError :: V1VolumeError
mkV1VolumeError =
  V1VolumeError
  { $sel:v1VolumeErrorMessage:V1VolumeError :: Maybe Text
v1VolumeErrorMessage = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1VolumeErrorTime:V1VolumeError :: Maybe DateTime
v1VolumeErrorTime = Maybe DateTime
forall a. Maybe a
Nothing
  }

-- ** V1VolumeMount
-- | V1VolumeMount
-- VolumeMount describes a mounting of a Volume within a container.
data V1VolumeMount = V1VolumeMount
  { V1VolumeMount -> Text
v1VolumeMountMountPath :: !(Text) -- ^ /Required/ "mountPath" - Path within the container at which the volume should be mounted.  Must not contain &#39;:&#39;.
  , V1VolumeMount -> Maybe Text
v1VolumeMountMountPropagation :: !(Maybe Text) -- ^ "mountPropagation" - mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10. When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified (which defaults to None).
  , V1VolumeMount -> Text
v1VolumeMountName :: !(Text) -- ^ /Required/ "name" - This must match the Name of a Volume.
  , V1VolumeMount -> Maybe Bool
v1VolumeMountReadOnly :: !(Maybe Bool) -- ^ "readOnly" - Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
  , V1VolumeMount -> Maybe Text
v1VolumeMountRecursiveReadOnly :: !(Maybe Text) -- ^ "recursiveReadOnly" - RecursiveReadOnly specifies whether read-only mounts should be handled recursively.  If ReadOnly is false, this field has no meaning and must be unspecified.  If ReadOnly is true, and this field is set to Disabled, the mount is not made recursively read-only.  If this field is set to IfPossible, the mount is made recursively read-only, if it is supported by the container runtime.  If this field is set to Enabled, the mount is made recursively read-only if it is supported by the container runtime, otherwise the pod will not be started and an error will be generated to indicate the reason.  If this field is set to IfPossible or Enabled, MountPropagation must be set to None (or be unspecified, which defaults to None).  If this field is not specified, it is treated as an equivalent of Disabled.
  , V1VolumeMount -> Maybe Text
v1VolumeMountSubPath :: !(Maybe Text) -- ^ "subPath" - Path within the volume from which the container&#39;s volume should be mounted. Defaults to \&quot;\&quot; (volume&#39;s root).
  , V1VolumeMount -> Maybe Text
v1VolumeMountSubPathExpr :: !(Maybe Text) -- ^ "subPathExpr" - Expanded path within the volume from which the container&#39;s volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container&#39;s environment. Defaults to \&quot;\&quot; (volume&#39;s root). SubPathExpr and SubPath are mutually exclusive.
  } deriving (Int -> V1VolumeMount -> ShowS
[V1VolumeMount] -> ShowS
V1VolumeMount -> String
(Int -> V1VolumeMount -> ShowS)
-> (V1VolumeMount -> String)
-> ([V1VolumeMount] -> ShowS)
-> Show V1VolumeMount
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1VolumeMount -> ShowS
showsPrec :: Int -> V1VolumeMount -> ShowS
$cshow :: V1VolumeMount -> String
show :: V1VolumeMount -> String
$cshowList :: [V1VolumeMount] -> ShowS
showList :: [V1VolumeMount] -> ShowS
P.Show, V1VolumeMount -> V1VolumeMount -> Bool
(V1VolumeMount -> V1VolumeMount -> Bool)
-> (V1VolumeMount -> V1VolumeMount -> Bool) -> Eq V1VolumeMount
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1VolumeMount -> V1VolumeMount -> Bool
== :: V1VolumeMount -> V1VolumeMount -> Bool
$c/= :: V1VolumeMount -> V1VolumeMount -> Bool
/= :: V1VolumeMount -> V1VolumeMount -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1VolumeMount
instance A.FromJSON V1VolumeMount where
  parseJSON :: Value -> Parser V1VolumeMount
parseJSON = String
-> (Object -> Parser V1VolumeMount)
-> Value
-> Parser V1VolumeMount
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1VolumeMount" ((Object -> Parser V1VolumeMount) -> Value -> Parser V1VolumeMount)
-> (Object -> Parser V1VolumeMount)
-> Value
-> Parser V1VolumeMount
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text
-> Maybe Text
-> Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> V1VolumeMount
V1VolumeMount
      (Text
 -> Maybe Text
 -> Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> V1VolumeMount)
-> Parser Text
-> Parser
     (Maybe Text
      -> Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> V1VolumeMount)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"mountPath")
      Parser
  (Maybe Text
   -> Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> V1VolumeMount)
-> Parser (Maybe Text)
-> Parser
     (Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> V1VolumeMount)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"mountPropagation")
      Parser
  (Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> V1VolumeMount)
-> Parser Text
-> Parser
     (Maybe Bool
      -> Maybe Text -> Maybe Text -> Maybe Text -> V1VolumeMount)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser
  (Maybe Bool
   -> Maybe Text -> Maybe Text -> Maybe Text -> V1VolumeMount)
-> Parser (Maybe Bool)
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> V1VolumeMount)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readOnly")
      Parser (Maybe Text -> Maybe Text -> Maybe Text -> V1VolumeMount)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> V1VolumeMount)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"recursiveReadOnly")
      Parser (Maybe Text -> Maybe Text -> V1VolumeMount)
-> Parser (Maybe Text) -> Parser (Maybe Text -> V1VolumeMount)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"subPath")
      Parser (Maybe Text -> V1VolumeMount)
-> Parser (Maybe Text) -> Parser V1VolumeMount
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"subPathExpr")

-- | ToJSON V1VolumeMount
instance A.ToJSON V1VolumeMount where
  toJSON :: V1VolumeMount -> Value
toJSON V1VolumeMount {Maybe Bool
Maybe Text
Text
$sel:v1VolumeMountMountPath:V1VolumeMount :: V1VolumeMount -> Text
$sel:v1VolumeMountMountPropagation:V1VolumeMount :: V1VolumeMount -> Maybe Text
$sel:v1VolumeMountName:V1VolumeMount :: V1VolumeMount -> Text
$sel:v1VolumeMountReadOnly:V1VolumeMount :: V1VolumeMount -> Maybe Bool
$sel:v1VolumeMountRecursiveReadOnly:V1VolumeMount :: V1VolumeMount -> Maybe Text
$sel:v1VolumeMountSubPath:V1VolumeMount :: V1VolumeMount -> Maybe Text
$sel:v1VolumeMountSubPathExpr:V1VolumeMount :: V1VolumeMount -> Maybe Text
v1VolumeMountMountPath :: Text
v1VolumeMountMountPropagation :: Maybe Text
v1VolumeMountName :: Text
v1VolumeMountReadOnly :: Maybe Bool
v1VolumeMountRecursiveReadOnly :: Maybe Text
v1VolumeMountSubPath :: Maybe Text
v1VolumeMountSubPathExpr :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"mountPath" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1VolumeMountMountPath
      , Key
"mountPropagation" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1VolumeMountMountPropagation
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1VolumeMountName
      , Key
"readOnly" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1VolumeMountReadOnly
      , Key
"recursiveReadOnly" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1VolumeMountRecursiveReadOnly
      , Key
"subPath" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1VolumeMountSubPath
      , Key
"subPathExpr" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1VolumeMountSubPathExpr
      ]


-- | Construct a value of type 'V1VolumeMount' (by applying it's required fields, if any)
mkV1VolumeMount
  :: Text -- ^ 'v1VolumeMountMountPath': Path within the container at which the volume should be mounted.  Must not contain ':'.
  -> Text -- ^ 'v1VolumeMountName': This must match the Name of a Volume.
  -> V1VolumeMount
mkV1VolumeMount :: Text -> Text -> V1VolumeMount
mkV1VolumeMount Text
v1VolumeMountMountPath Text
v1VolumeMountName =
  V1VolumeMount
  { Text
$sel:v1VolumeMountMountPath:V1VolumeMount :: Text
v1VolumeMountMountPath :: Text
v1VolumeMountMountPath
  , $sel:v1VolumeMountMountPropagation:V1VolumeMount :: Maybe Text
v1VolumeMountMountPropagation = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1VolumeMountName:V1VolumeMount :: Text
v1VolumeMountName :: Text
v1VolumeMountName
  , $sel:v1VolumeMountReadOnly:V1VolumeMount :: Maybe Bool
v1VolumeMountReadOnly = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1VolumeMountRecursiveReadOnly:V1VolumeMount :: Maybe Text
v1VolumeMountRecursiveReadOnly = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1VolumeMountSubPath:V1VolumeMount :: Maybe Text
v1VolumeMountSubPath = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1VolumeMountSubPathExpr:V1VolumeMount :: Maybe Text
v1VolumeMountSubPathExpr = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1VolumeMountStatus
-- | V1VolumeMountStatus
-- VolumeMountStatus shows status of volume mounts.
data V1VolumeMountStatus = V1VolumeMountStatus
  { V1VolumeMountStatus -> Text
v1VolumeMountStatusMountPath :: !(Text) -- ^ /Required/ "mountPath" - MountPath corresponds to the original VolumeMount.
  , V1VolumeMountStatus -> Text
v1VolumeMountStatusName :: !(Text) -- ^ /Required/ "name" - Name corresponds to the name of the original VolumeMount.
  , V1VolumeMountStatus -> Maybe Bool
v1VolumeMountStatusReadOnly :: !(Maybe Bool) -- ^ "readOnly" - ReadOnly corresponds to the original VolumeMount.
  , V1VolumeMountStatus -> Maybe Text
v1VolumeMountStatusRecursiveReadOnly :: !(Maybe Text) -- ^ "recursiveReadOnly" - RecursiveReadOnly must be set to Disabled, Enabled, or unspecified (for non-readonly mounts). An IfPossible value in the original VolumeMount must be translated to Disabled or Enabled, depending on the mount result.
  } deriving (Int -> V1VolumeMountStatus -> ShowS
[V1VolumeMountStatus] -> ShowS
V1VolumeMountStatus -> String
(Int -> V1VolumeMountStatus -> ShowS)
-> (V1VolumeMountStatus -> String)
-> ([V1VolumeMountStatus] -> ShowS)
-> Show V1VolumeMountStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1VolumeMountStatus -> ShowS
showsPrec :: Int -> V1VolumeMountStatus -> ShowS
$cshow :: V1VolumeMountStatus -> String
show :: V1VolumeMountStatus -> String
$cshowList :: [V1VolumeMountStatus] -> ShowS
showList :: [V1VolumeMountStatus] -> ShowS
P.Show, V1VolumeMountStatus -> V1VolumeMountStatus -> Bool
(V1VolumeMountStatus -> V1VolumeMountStatus -> Bool)
-> (V1VolumeMountStatus -> V1VolumeMountStatus -> Bool)
-> Eq V1VolumeMountStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1VolumeMountStatus -> V1VolumeMountStatus -> Bool
== :: V1VolumeMountStatus -> V1VolumeMountStatus -> Bool
$c/= :: V1VolumeMountStatus -> V1VolumeMountStatus -> Bool
/= :: V1VolumeMountStatus -> V1VolumeMountStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1VolumeMountStatus
instance A.FromJSON V1VolumeMountStatus where
  parseJSON :: Value -> Parser V1VolumeMountStatus
parseJSON = String
-> (Object -> Parser V1VolumeMountStatus)
-> Value
-> Parser V1VolumeMountStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1VolumeMountStatus" ((Object -> Parser V1VolumeMountStatus)
 -> Value -> Parser V1VolumeMountStatus)
-> (Object -> Parser V1VolumeMountStatus)
-> Value
-> Parser V1VolumeMountStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Text -> Maybe Bool -> Maybe Text -> V1VolumeMountStatus
V1VolumeMountStatus
      (Text -> Text -> Maybe Bool -> Maybe Text -> V1VolumeMountStatus)
-> Parser Text
-> Parser (Text -> Maybe Bool -> Maybe Text -> V1VolumeMountStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"mountPath")
      Parser (Text -> Maybe Bool -> Maybe Text -> V1VolumeMountStatus)
-> Parser Text
-> Parser (Maybe Bool -> Maybe Text -> V1VolumeMountStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser (Maybe Bool -> Maybe Text -> V1VolumeMountStatus)
-> Parser (Maybe Bool)
-> Parser (Maybe Text -> V1VolumeMountStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"readOnly")
      Parser (Maybe Text -> V1VolumeMountStatus)
-> Parser (Maybe Text) -> Parser V1VolumeMountStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"recursiveReadOnly")

-- | ToJSON V1VolumeMountStatus
instance A.ToJSON V1VolumeMountStatus where
  toJSON :: V1VolumeMountStatus -> Value
toJSON V1VolumeMountStatus {Maybe Bool
Maybe Text
Text
$sel:v1VolumeMountStatusMountPath:V1VolumeMountStatus :: V1VolumeMountStatus -> Text
$sel:v1VolumeMountStatusName:V1VolumeMountStatus :: V1VolumeMountStatus -> Text
$sel:v1VolumeMountStatusReadOnly:V1VolumeMountStatus :: V1VolumeMountStatus -> Maybe Bool
$sel:v1VolumeMountStatusRecursiveReadOnly:V1VolumeMountStatus :: V1VolumeMountStatus -> Maybe Text
v1VolumeMountStatusMountPath :: Text
v1VolumeMountStatusName :: Text
v1VolumeMountStatusReadOnly :: Maybe Bool
v1VolumeMountStatusRecursiveReadOnly :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"mountPath" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1VolumeMountStatusMountPath
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1VolumeMountStatusName
      , Key
"readOnly" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1VolumeMountStatusReadOnly
      , Key
"recursiveReadOnly" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1VolumeMountStatusRecursiveReadOnly
      ]


-- | Construct a value of type 'V1VolumeMountStatus' (by applying it's required fields, if any)
mkV1VolumeMountStatus
  :: Text -- ^ 'v1VolumeMountStatusMountPath': MountPath corresponds to the original VolumeMount.
  -> Text -- ^ 'v1VolumeMountStatusName': Name corresponds to the name of the original VolumeMount.
  -> V1VolumeMountStatus
mkV1VolumeMountStatus :: Text -> Text -> V1VolumeMountStatus
mkV1VolumeMountStatus Text
v1VolumeMountStatusMountPath Text
v1VolumeMountStatusName =
  V1VolumeMountStatus
  { Text
$sel:v1VolumeMountStatusMountPath:V1VolumeMountStatus :: Text
v1VolumeMountStatusMountPath :: Text
v1VolumeMountStatusMountPath
  , Text
$sel:v1VolumeMountStatusName:V1VolumeMountStatus :: Text
v1VolumeMountStatusName :: Text
v1VolumeMountStatusName
  , $sel:v1VolumeMountStatusReadOnly:V1VolumeMountStatus :: Maybe Bool
v1VolumeMountStatusReadOnly = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1VolumeMountStatusRecursiveReadOnly:V1VolumeMountStatus :: Maybe Text
v1VolumeMountStatusRecursiveReadOnly = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1VolumeNodeAffinity
-- | V1VolumeNodeAffinity
-- VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from.
data V1VolumeNodeAffinity = V1VolumeNodeAffinity
  { V1VolumeNodeAffinity -> Maybe V1NodeSelector
v1VolumeNodeAffinityRequired :: !(Maybe V1NodeSelector) -- ^ "required"
  } deriving (Int -> V1VolumeNodeAffinity -> ShowS
[V1VolumeNodeAffinity] -> ShowS
V1VolumeNodeAffinity -> String
(Int -> V1VolumeNodeAffinity -> ShowS)
-> (V1VolumeNodeAffinity -> String)
-> ([V1VolumeNodeAffinity] -> ShowS)
-> Show V1VolumeNodeAffinity
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1VolumeNodeAffinity -> ShowS
showsPrec :: Int -> V1VolumeNodeAffinity -> ShowS
$cshow :: V1VolumeNodeAffinity -> String
show :: V1VolumeNodeAffinity -> String
$cshowList :: [V1VolumeNodeAffinity] -> ShowS
showList :: [V1VolumeNodeAffinity] -> ShowS
P.Show, V1VolumeNodeAffinity -> V1VolumeNodeAffinity -> Bool
(V1VolumeNodeAffinity -> V1VolumeNodeAffinity -> Bool)
-> (V1VolumeNodeAffinity -> V1VolumeNodeAffinity -> Bool)
-> Eq V1VolumeNodeAffinity
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1VolumeNodeAffinity -> V1VolumeNodeAffinity -> Bool
== :: V1VolumeNodeAffinity -> V1VolumeNodeAffinity -> Bool
$c/= :: V1VolumeNodeAffinity -> V1VolumeNodeAffinity -> Bool
/= :: V1VolumeNodeAffinity -> V1VolumeNodeAffinity -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1VolumeNodeAffinity
instance A.FromJSON V1VolumeNodeAffinity where
  parseJSON :: Value -> Parser V1VolumeNodeAffinity
parseJSON = String
-> (Object -> Parser V1VolumeNodeAffinity)
-> Value
-> Parser V1VolumeNodeAffinity
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1VolumeNodeAffinity" ((Object -> Parser V1VolumeNodeAffinity)
 -> Value -> Parser V1VolumeNodeAffinity)
-> (Object -> Parser V1VolumeNodeAffinity)
-> Value
-> Parser V1VolumeNodeAffinity
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1NodeSelector -> V1VolumeNodeAffinity
V1VolumeNodeAffinity
      (Maybe V1NodeSelector -> V1VolumeNodeAffinity)
-> Parser (Maybe V1NodeSelector) -> Parser V1VolumeNodeAffinity
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1NodeSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"required")

-- | ToJSON V1VolumeNodeAffinity
instance A.ToJSON V1VolumeNodeAffinity where
  toJSON :: V1VolumeNodeAffinity -> Value
toJSON V1VolumeNodeAffinity {Maybe V1NodeSelector
$sel:v1VolumeNodeAffinityRequired:V1VolumeNodeAffinity :: V1VolumeNodeAffinity -> Maybe V1NodeSelector
v1VolumeNodeAffinityRequired :: Maybe V1NodeSelector
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"required" Key -> Maybe V1NodeSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1NodeSelector
v1VolumeNodeAffinityRequired
      ]


-- | Construct a value of type 'V1VolumeNodeAffinity' (by applying it's required fields, if any)
mkV1VolumeNodeAffinity
  :: V1VolumeNodeAffinity
mkV1VolumeNodeAffinity :: V1VolumeNodeAffinity
mkV1VolumeNodeAffinity =
  V1VolumeNodeAffinity
  { $sel:v1VolumeNodeAffinityRequired:V1VolumeNodeAffinity :: Maybe V1NodeSelector
v1VolumeNodeAffinityRequired = Maybe V1NodeSelector
forall a. Maybe a
Nothing
  }

-- ** V1VolumeNodeResources
-- | V1VolumeNodeResources
-- VolumeNodeResources is a set of resource limits for scheduling of volumes.
data V1VolumeNodeResources = V1VolumeNodeResources
  { V1VolumeNodeResources -> Maybe Int
v1VolumeNodeResourcesCount :: !(Maybe Int) -- ^ "count" - count indicates the maximum number of unique volumes managed by the CSI driver that can be used on a node. A volume that is both attached and mounted on a node is considered to be used once, not twice. The same rule applies for a unique volume that is shared among multiple pods on the same node. If this field is not specified, then the supported number of volumes on this node is unbounded.
  } deriving (Int -> V1VolumeNodeResources -> ShowS
[V1VolumeNodeResources] -> ShowS
V1VolumeNodeResources -> String
(Int -> V1VolumeNodeResources -> ShowS)
-> (V1VolumeNodeResources -> String)
-> ([V1VolumeNodeResources] -> ShowS)
-> Show V1VolumeNodeResources
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1VolumeNodeResources -> ShowS
showsPrec :: Int -> V1VolumeNodeResources -> ShowS
$cshow :: V1VolumeNodeResources -> String
show :: V1VolumeNodeResources -> String
$cshowList :: [V1VolumeNodeResources] -> ShowS
showList :: [V1VolumeNodeResources] -> ShowS
P.Show, V1VolumeNodeResources -> V1VolumeNodeResources -> Bool
(V1VolumeNodeResources -> V1VolumeNodeResources -> Bool)
-> (V1VolumeNodeResources -> V1VolumeNodeResources -> Bool)
-> Eq V1VolumeNodeResources
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1VolumeNodeResources -> V1VolumeNodeResources -> Bool
== :: V1VolumeNodeResources -> V1VolumeNodeResources -> Bool
$c/= :: V1VolumeNodeResources -> V1VolumeNodeResources -> Bool
/= :: V1VolumeNodeResources -> V1VolumeNodeResources -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1VolumeNodeResources
instance A.FromJSON V1VolumeNodeResources where
  parseJSON :: Value -> Parser V1VolumeNodeResources
parseJSON = String
-> (Object -> Parser V1VolumeNodeResources)
-> Value
-> Parser V1VolumeNodeResources
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1VolumeNodeResources" ((Object -> Parser V1VolumeNodeResources)
 -> Value -> Parser V1VolumeNodeResources)
-> (Object -> Parser V1VolumeNodeResources)
-> Value
-> Parser V1VolumeNodeResources
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Int -> V1VolumeNodeResources
V1VolumeNodeResources
      (Maybe Int -> V1VolumeNodeResources)
-> Parser (Maybe Int) -> Parser V1VolumeNodeResources
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"count")

-- | ToJSON V1VolumeNodeResources
instance A.ToJSON V1VolumeNodeResources where
  toJSON :: V1VolumeNodeResources -> Value
toJSON V1VolumeNodeResources {Maybe Int
$sel:v1VolumeNodeResourcesCount:V1VolumeNodeResources :: V1VolumeNodeResources -> Maybe Int
v1VolumeNodeResourcesCount :: Maybe Int
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"count" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v1VolumeNodeResourcesCount
      ]


-- | Construct a value of type 'V1VolumeNodeResources' (by applying it's required fields, if any)
mkV1VolumeNodeResources
  :: V1VolumeNodeResources
mkV1VolumeNodeResources :: V1VolumeNodeResources
mkV1VolumeNodeResources =
  V1VolumeNodeResources
  { $sel:v1VolumeNodeResourcesCount:V1VolumeNodeResources :: Maybe Int
v1VolumeNodeResourcesCount = Maybe Int
forall a. Maybe a
Nothing
  }

-- ** V1VolumeProjection
-- | V1VolumeProjection
-- Projection that may be projected along with other supported volume types. Exactly one of these fields must be set.
data V1VolumeProjection = V1VolumeProjection
  { V1VolumeProjection -> Maybe V1ClusterTrustBundleProjection
v1VolumeProjectionClusterTrustBundle :: !(Maybe V1ClusterTrustBundleProjection) -- ^ "clusterTrustBundle"
  , V1VolumeProjection -> Maybe V1ConfigMapProjection
v1VolumeProjectionConfigMap :: !(Maybe V1ConfigMapProjection) -- ^ "configMap"
  , V1VolumeProjection -> Maybe V1DownwardAPIProjection
v1VolumeProjectionDownwardApi :: !(Maybe V1DownwardAPIProjection) -- ^ "downwardAPI"
  , V1VolumeProjection -> Maybe V1SecretProjection
v1VolumeProjectionSecret :: !(Maybe V1SecretProjection) -- ^ "secret"
  , V1VolumeProjection -> Maybe V1ServiceAccountTokenProjection
v1VolumeProjectionServiceAccountToken :: !(Maybe V1ServiceAccountTokenProjection) -- ^ "serviceAccountToken"
  } deriving (Int -> V1VolumeProjection -> ShowS
[V1VolumeProjection] -> ShowS
V1VolumeProjection -> String
(Int -> V1VolumeProjection -> ShowS)
-> (V1VolumeProjection -> String)
-> ([V1VolumeProjection] -> ShowS)
-> Show V1VolumeProjection
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1VolumeProjection -> ShowS
showsPrec :: Int -> V1VolumeProjection -> ShowS
$cshow :: V1VolumeProjection -> String
show :: V1VolumeProjection -> String
$cshowList :: [V1VolumeProjection] -> ShowS
showList :: [V1VolumeProjection] -> ShowS
P.Show, V1VolumeProjection -> V1VolumeProjection -> Bool
(V1VolumeProjection -> V1VolumeProjection -> Bool)
-> (V1VolumeProjection -> V1VolumeProjection -> Bool)
-> Eq V1VolumeProjection
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1VolumeProjection -> V1VolumeProjection -> Bool
== :: V1VolumeProjection -> V1VolumeProjection -> Bool
$c/= :: V1VolumeProjection -> V1VolumeProjection -> Bool
/= :: V1VolumeProjection -> V1VolumeProjection -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1VolumeProjection
instance A.FromJSON V1VolumeProjection where
  parseJSON :: Value -> Parser V1VolumeProjection
parseJSON = String
-> (Object -> Parser V1VolumeProjection)
-> Value
-> Parser V1VolumeProjection
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1VolumeProjection" ((Object -> Parser V1VolumeProjection)
 -> Value -> Parser V1VolumeProjection)
-> (Object -> Parser V1VolumeProjection)
-> Value
-> Parser V1VolumeProjection
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1ClusterTrustBundleProjection
-> Maybe V1ConfigMapProjection
-> Maybe V1DownwardAPIProjection
-> Maybe V1SecretProjection
-> Maybe V1ServiceAccountTokenProjection
-> V1VolumeProjection
V1VolumeProjection
      (Maybe V1ClusterTrustBundleProjection
 -> Maybe V1ConfigMapProjection
 -> Maybe V1DownwardAPIProjection
 -> Maybe V1SecretProjection
 -> Maybe V1ServiceAccountTokenProjection
 -> V1VolumeProjection)
-> Parser (Maybe V1ClusterTrustBundleProjection)
-> Parser
     (Maybe V1ConfigMapProjection
      -> Maybe V1DownwardAPIProjection
      -> Maybe V1SecretProjection
      -> Maybe V1ServiceAccountTokenProjection
      -> V1VolumeProjection)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1ClusterTrustBundleProjection)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"clusterTrustBundle")
      Parser
  (Maybe V1ConfigMapProjection
   -> Maybe V1DownwardAPIProjection
   -> Maybe V1SecretProjection
   -> Maybe V1ServiceAccountTokenProjection
   -> V1VolumeProjection)
-> Parser (Maybe V1ConfigMapProjection)
-> Parser
     (Maybe V1DownwardAPIProjection
      -> Maybe V1SecretProjection
      -> Maybe V1ServiceAccountTokenProjection
      -> V1VolumeProjection)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ConfigMapProjection)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"configMap")
      Parser
  (Maybe V1DownwardAPIProjection
   -> Maybe V1SecretProjection
   -> Maybe V1ServiceAccountTokenProjection
   -> V1VolumeProjection)
-> Parser (Maybe V1DownwardAPIProjection)
-> Parser
     (Maybe V1SecretProjection
      -> Maybe V1ServiceAccountTokenProjection -> V1VolumeProjection)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1DownwardAPIProjection)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"downwardAPI")
      Parser
  (Maybe V1SecretProjection
   -> Maybe V1ServiceAccountTokenProjection -> V1VolumeProjection)
-> Parser (Maybe V1SecretProjection)
-> Parser
     (Maybe V1ServiceAccountTokenProjection -> V1VolumeProjection)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1SecretProjection)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"secret")
      Parser
  (Maybe V1ServiceAccountTokenProjection -> V1VolumeProjection)
-> Parser (Maybe V1ServiceAccountTokenProjection)
-> Parser V1VolumeProjection
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ServiceAccountTokenProjection)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"serviceAccountToken")

-- | ToJSON V1VolumeProjection
instance A.ToJSON V1VolumeProjection where
  toJSON :: V1VolumeProjection -> Value
toJSON V1VolumeProjection {Maybe V1ServiceAccountTokenProjection
Maybe V1SecretProjection
Maybe V1DownwardAPIProjection
Maybe V1ConfigMapProjection
Maybe V1ClusterTrustBundleProjection
$sel:v1VolumeProjectionClusterTrustBundle:V1VolumeProjection :: V1VolumeProjection -> Maybe V1ClusterTrustBundleProjection
$sel:v1VolumeProjectionConfigMap:V1VolumeProjection :: V1VolumeProjection -> Maybe V1ConfigMapProjection
$sel:v1VolumeProjectionDownwardApi:V1VolumeProjection :: V1VolumeProjection -> Maybe V1DownwardAPIProjection
$sel:v1VolumeProjectionSecret:V1VolumeProjection :: V1VolumeProjection -> Maybe V1SecretProjection
$sel:v1VolumeProjectionServiceAccountToken:V1VolumeProjection :: V1VolumeProjection -> Maybe V1ServiceAccountTokenProjection
v1VolumeProjectionClusterTrustBundle :: Maybe V1ClusterTrustBundleProjection
v1VolumeProjectionConfigMap :: Maybe V1ConfigMapProjection
v1VolumeProjectionDownwardApi :: Maybe V1DownwardAPIProjection
v1VolumeProjectionSecret :: Maybe V1SecretProjection
v1VolumeProjectionServiceAccountToken :: Maybe V1ServiceAccountTokenProjection
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"clusterTrustBundle" Key -> Maybe V1ClusterTrustBundleProjection -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ClusterTrustBundleProjection
v1VolumeProjectionClusterTrustBundle
      , Key
"configMap" Key -> Maybe V1ConfigMapProjection -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ConfigMapProjection
v1VolumeProjectionConfigMap
      , Key
"downwardAPI" Key -> Maybe V1DownwardAPIProjection -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1DownwardAPIProjection
v1VolumeProjectionDownwardApi
      , Key
"secret" Key -> Maybe V1SecretProjection -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1SecretProjection
v1VolumeProjectionSecret
      , Key
"serviceAccountToken" Key -> Maybe V1ServiceAccountTokenProjection -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ServiceAccountTokenProjection
v1VolumeProjectionServiceAccountToken
      ]


-- | Construct a value of type 'V1VolumeProjection' (by applying it's required fields, if any)
mkV1VolumeProjection
  :: V1VolumeProjection
mkV1VolumeProjection :: V1VolumeProjection
mkV1VolumeProjection =
  V1VolumeProjection
  { $sel:v1VolumeProjectionClusterTrustBundle:V1VolumeProjection :: Maybe V1ClusterTrustBundleProjection
v1VolumeProjectionClusterTrustBundle = Maybe V1ClusterTrustBundleProjection
forall a. Maybe a
Nothing
  , $sel:v1VolumeProjectionConfigMap:V1VolumeProjection :: Maybe V1ConfigMapProjection
v1VolumeProjectionConfigMap = Maybe V1ConfigMapProjection
forall a. Maybe a
Nothing
  , $sel:v1VolumeProjectionDownwardApi:V1VolumeProjection :: Maybe V1DownwardAPIProjection
v1VolumeProjectionDownwardApi = Maybe V1DownwardAPIProjection
forall a. Maybe a
Nothing
  , $sel:v1VolumeProjectionSecret:V1VolumeProjection :: Maybe V1SecretProjection
v1VolumeProjectionSecret = Maybe V1SecretProjection
forall a. Maybe a
Nothing
  , $sel:v1VolumeProjectionServiceAccountToken:V1VolumeProjection :: Maybe V1ServiceAccountTokenProjection
v1VolumeProjectionServiceAccountToken = Maybe V1ServiceAccountTokenProjection
forall a. Maybe a
Nothing
  }

-- ** V1VolumeResourceRequirements
-- | V1VolumeResourceRequirements
-- VolumeResourceRequirements describes the storage resource requirements for a volume.
data V1VolumeResourceRequirements = V1VolumeResourceRequirements
  { V1VolumeResourceRequirements -> Maybe (Map String Quantity)
v1VolumeResourceRequirementsLimits :: !(Maybe (Map.Map String Quantity)) -- ^ "limits" - Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
  , V1VolumeResourceRequirements -> Maybe (Map String Quantity)
v1VolumeResourceRequirementsRequests :: !(Maybe (Map.Map String Quantity)) -- ^ "requests" - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
  } deriving (Int -> V1VolumeResourceRequirements -> ShowS
[V1VolumeResourceRequirements] -> ShowS
V1VolumeResourceRequirements -> String
(Int -> V1VolumeResourceRequirements -> ShowS)
-> (V1VolumeResourceRequirements -> String)
-> ([V1VolumeResourceRequirements] -> ShowS)
-> Show V1VolumeResourceRequirements
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1VolumeResourceRequirements -> ShowS
showsPrec :: Int -> V1VolumeResourceRequirements -> ShowS
$cshow :: V1VolumeResourceRequirements -> String
show :: V1VolumeResourceRequirements -> String
$cshowList :: [V1VolumeResourceRequirements] -> ShowS
showList :: [V1VolumeResourceRequirements] -> ShowS
P.Show, V1VolumeResourceRequirements
-> V1VolumeResourceRequirements -> Bool
(V1VolumeResourceRequirements
 -> V1VolumeResourceRequirements -> Bool)
-> (V1VolumeResourceRequirements
    -> V1VolumeResourceRequirements -> Bool)
-> Eq V1VolumeResourceRequirements
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1VolumeResourceRequirements
-> V1VolumeResourceRequirements -> Bool
== :: V1VolumeResourceRequirements
-> V1VolumeResourceRequirements -> Bool
$c/= :: V1VolumeResourceRequirements
-> V1VolumeResourceRequirements -> Bool
/= :: V1VolumeResourceRequirements
-> V1VolumeResourceRequirements -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1VolumeResourceRequirements
instance A.FromJSON V1VolumeResourceRequirements where
  parseJSON :: Value -> Parser V1VolumeResourceRequirements
parseJSON = String
-> (Object -> Parser V1VolumeResourceRequirements)
-> Value
-> Parser V1VolumeResourceRequirements
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1VolumeResourceRequirements" ((Object -> Parser V1VolumeResourceRequirements)
 -> Value -> Parser V1VolumeResourceRequirements)
-> (Object -> Parser V1VolumeResourceRequirements)
-> Value
-> Parser V1VolumeResourceRequirements
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe (Map String Quantity)
-> Maybe (Map String Quantity) -> V1VolumeResourceRequirements
V1VolumeResourceRequirements
      (Maybe (Map String Quantity)
 -> Maybe (Map String Quantity) -> V1VolumeResourceRequirements)
-> Parser (Maybe (Map String Quantity))
-> Parser
     (Maybe (Map String Quantity) -> V1VolumeResourceRequirements)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe (Map String Quantity))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"limits")
      Parser
  (Maybe (Map String Quantity) -> V1VolumeResourceRequirements)
-> Parser (Maybe (Map String Quantity))
-> Parser V1VolumeResourceRequirements
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String Quantity))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"requests")

-- | ToJSON V1VolumeResourceRequirements
instance A.ToJSON V1VolumeResourceRequirements where
  toJSON :: V1VolumeResourceRequirements -> Value
toJSON V1VolumeResourceRequirements {Maybe (Map String Quantity)
$sel:v1VolumeResourceRequirementsLimits:V1VolumeResourceRequirements :: V1VolumeResourceRequirements -> Maybe (Map String Quantity)
$sel:v1VolumeResourceRequirementsRequests:V1VolumeResourceRequirements :: V1VolumeResourceRequirements -> Maybe (Map String Quantity)
v1VolumeResourceRequirementsLimits :: Maybe (Map String Quantity)
v1VolumeResourceRequirementsRequests :: Maybe (Map String Quantity)
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"limits" Key -> Maybe (Map String Quantity) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Quantity)
v1VolumeResourceRequirementsLimits
      , Key
"requests" Key -> Maybe (Map String Quantity) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Quantity)
v1VolumeResourceRequirementsRequests
      ]


-- | Construct a value of type 'V1VolumeResourceRequirements' (by applying it's required fields, if any)
mkV1VolumeResourceRequirements
  :: V1VolumeResourceRequirements
mkV1VolumeResourceRequirements :: V1VolumeResourceRequirements
mkV1VolumeResourceRequirements =
  V1VolumeResourceRequirements
  { $sel:v1VolumeResourceRequirementsLimits:V1VolumeResourceRequirements :: Maybe (Map String Quantity)
v1VolumeResourceRequirementsLimits = Maybe (Map String Quantity)
forall a. Maybe a
Nothing
  , $sel:v1VolumeResourceRequirementsRequests:V1VolumeResourceRequirements :: Maybe (Map String Quantity)
v1VolumeResourceRequirementsRequests = Maybe (Map String Quantity)
forall a. Maybe a
Nothing
  }

-- ** V1VsphereVirtualDiskVolumeSource
-- | V1VsphereVirtualDiskVolumeSource
-- Represents a vSphere volume resource.
data V1VsphereVirtualDiskVolumeSource = V1VsphereVirtualDiskVolumeSource
  { V1VsphereVirtualDiskVolumeSource -> Maybe Text
v1VsphereVirtualDiskVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - fsType is filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \&quot;ext4\&quot;, \&quot;xfs\&quot;, \&quot;ntfs\&quot;. Implicitly inferred to be \&quot;ext4\&quot; if unspecified.
  , V1VsphereVirtualDiskVolumeSource -> Maybe Text
v1VsphereVirtualDiskVolumeSourceStoragePolicyId :: !(Maybe Text) -- ^ "storagePolicyID" - storagePolicyID is the storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.
  , V1VsphereVirtualDiskVolumeSource -> Maybe Text
v1VsphereVirtualDiskVolumeSourceStoragePolicyName :: !(Maybe Text) -- ^ "storagePolicyName" - storagePolicyName is the storage Policy Based Management (SPBM) profile name.
  , V1VsphereVirtualDiskVolumeSource -> Text
v1VsphereVirtualDiskVolumeSourceVolumePath :: !(Text) -- ^ /Required/ "volumePath" - volumePath is the path that identifies vSphere volume vmdk
  } deriving (Int -> V1VsphereVirtualDiskVolumeSource -> ShowS
[V1VsphereVirtualDiskVolumeSource] -> ShowS
V1VsphereVirtualDiskVolumeSource -> String
(Int -> V1VsphereVirtualDiskVolumeSource -> ShowS)
-> (V1VsphereVirtualDiskVolumeSource -> String)
-> ([V1VsphereVirtualDiskVolumeSource] -> ShowS)
-> Show V1VsphereVirtualDiskVolumeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1VsphereVirtualDiskVolumeSource -> ShowS
showsPrec :: Int -> V1VsphereVirtualDiskVolumeSource -> ShowS
$cshow :: V1VsphereVirtualDiskVolumeSource -> String
show :: V1VsphereVirtualDiskVolumeSource -> String
$cshowList :: [V1VsphereVirtualDiskVolumeSource] -> ShowS
showList :: [V1VsphereVirtualDiskVolumeSource] -> ShowS
P.Show, V1VsphereVirtualDiskVolumeSource
-> V1VsphereVirtualDiskVolumeSource -> Bool
(V1VsphereVirtualDiskVolumeSource
 -> V1VsphereVirtualDiskVolumeSource -> Bool)
-> (V1VsphereVirtualDiskVolumeSource
    -> V1VsphereVirtualDiskVolumeSource -> Bool)
-> Eq V1VsphereVirtualDiskVolumeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1VsphereVirtualDiskVolumeSource
-> V1VsphereVirtualDiskVolumeSource -> Bool
== :: V1VsphereVirtualDiskVolumeSource
-> V1VsphereVirtualDiskVolumeSource -> Bool
$c/= :: V1VsphereVirtualDiskVolumeSource
-> V1VsphereVirtualDiskVolumeSource -> Bool
/= :: V1VsphereVirtualDiskVolumeSource
-> V1VsphereVirtualDiskVolumeSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1VsphereVirtualDiskVolumeSource
instance A.FromJSON V1VsphereVirtualDiskVolumeSource where
  parseJSON :: Value -> Parser V1VsphereVirtualDiskVolumeSource
parseJSON = String
-> (Object -> Parser V1VsphereVirtualDiskVolumeSource)
-> Value
-> Parser V1VsphereVirtualDiskVolumeSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1VsphereVirtualDiskVolumeSource" ((Object -> Parser V1VsphereVirtualDiskVolumeSource)
 -> Value -> Parser V1VsphereVirtualDiskVolumeSource)
-> (Object -> Parser V1VsphereVirtualDiskVolumeSource)
-> Value
-> Parser V1VsphereVirtualDiskVolumeSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> V1VsphereVirtualDiskVolumeSource
V1VsphereVirtualDiskVolumeSource
      (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> V1VsphereVirtualDiskVolumeSource)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Text -> V1VsphereVirtualDiskVolumeSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"fsType")
      Parser
  (Maybe Text
   -> Maybe Text -> Text -> V1VsphereVirtualDiskVolumeSource)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Text -> V1VsphereVirtualDiskVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"storagePolicyID")
      Parser (Maybe Text -> Text -> V1VsphereVirtualDiskVolumeSource)
-> Parser (Maybe Text)
-> Parser (Text -> V1VsphereVirtualDiskVolumeSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"storagePolicyName")
      Parser (Text -> V1VsphereVirtualDiskVolumeSource)
-> Parser Text -> Parser V1VsphereVirtualDiskVolumeSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"volumePath")

-- | ToJSON V1VsphereVirtualDiskVolumeSource
instance A.ToJSON V1VsphereVirtualDiskVolumeSource where
  toJSON :: V1VsphereVirtualDiskVolumeSource -> Value
toJSON V1VsphereVirtualDiskVolumeSource {Maybe Text
Text
$sel:v1VsphereVirtualDiskVolumeSourceFsType:V1VsphereVirtualDiskVolumeSource :: V1VsphereVirtualDiskVolumeSource -> Maybe Text
$sel:v1VsphereVirtualDiskVolumeSourceStoragePolicyId:V1VsphereVirtualDiskVolumeSource :: V1VsphereVirtualDiskVolumeSource -> Maybe Text
$sel:v1VsphereVirtualDiskVolumeSourceStoragePolicyName:V1VsphereVirtualDiskVolumeSource :: V1VsphereVirtualDiskVolumeSource -> Maybe Text
$sel:v1VsphereVirtualDiskVolumeSourceVolumePath:V1VsphereVirtualDiskVolumeSource :: V1VsphereVirtualDiskVolumeSource -> Text
v1VsphereVirtualDiskVolumeSourceFsType :: Maybe Text
v1VsphereVirtualDiskVolumeSourceStoragePolicyId :: Maybe Text
v1VsphereVirtualDiskVolumeSourceStoragePolicyName :: Maybe Text
v1VsphereVirtualDiskVolumeSourceVolumePath :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"fsType" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1VsphereVirtualDiskVolumeSourceFsType
      , Key
"storagePolicyID" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1VsphereVirtualDiskVolumeSourceStoragePolicyId
      , Key
"storagePolicyName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1VsphereVirtualDiskVolumeSourceStoragePolicyName
      , Key
"volumePath" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1VsphereVirtualDiskVolumeSourceVolumePath
      ]


-- | Construct a value of type 'V1VsphereVirtualDiskVolumeSource' (by applying it's required fields, if any)
mkV1VsphereVirtualDiskVolumeSource
  :: Text -- ^ 'v1VsphereVirtualDiskVolumeSourceVolumePath': volumePath is the path that identifies vSphere volume vmdk
  -> V1VsphereVirtualDiskVolumeSource
mkV1VsphereVirtualDiskVolumeSource :: Text -> V1VsphereVirtualDiskVolumeSource
mkV1VsphereVirtualDiskVolumeSource Text
v1VsphereVirtualDiskVolumeSourceVolumePath =
  V1VsphereVirtualDiskVolumeSource
  { $sel:v1VsphereVirtualDiskVolumeSourceFsType:V1VsphereVirtualDiskVolumeSource :: Maybe Text
v1VsphereVirtualDiskVolumeSourceFsType = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1VsphereVirtualDiskVolumeSourceStoragePolicyId:V1VsphereVirtualDiskVolumeSource :: Maybe Text
v1VsphereVirtualDiskVolumeSourceStoragePolicyId = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1VsphereVirtualDiskVolumeSourceStoragePolicyName:V1VsphereVirtualDiskVolumeSource :: Maybe Text
v1VsphereVirtualDiskVolumeSourceStoragePolicyName = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1VsphereVirtualDiskVolumeSourceVolumePath:V1VsphereVirtualDiskVolumeSource :: Text
v1VsphereVirtualDiskVolumeSourceVolumePath :: Text
v1VsphereVirtualDiskVolumeSourceVolumePath
  }

-- ** V1WatchEvent
-- | V1WatchEvent
-- Event represents a single event to a watched resource.
data V1WatchEvent = V1WatchEvent
  { V1WatchEvent -> Value
v1WatchEventObject :: !(A.Value) -- ^ /Required/ "object" - Object is:  * If Type is Added or Modified: the new state of the object.  * If Type is Deleted: the state of the object immediately before deletion.  * If Type is Error: *Status is recommended; other types may make sense    depending on context.
  , V1WatchEvent -> Text
v1WatchEventType :: !(Text) -- ^ /Required/ "type"
  } deriving (Int -> V1WatchEvent -> ShowS
[V1WatchEvent] -> ShowS
V1WatchEvent -> String
(Int -> V1WatchEvent -> ShowS)
-> (V1WatchEvent -> String)
-> ([V1WatchEvent] -> ShowS)
-> Show V1WatchEvent
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1WatchEvent -> ShowS
showsPrec :: Int -> V1WatchEvent -> ShowS
$cshow :: V1WatchEvent -> String
show :: V1WatchEvent -> String
$cshowList :: [V1WatchEvent] -> ShowS
showList :: [V1WatchEvent] -> ShowS
P.Show, V1WatchEvent -> V1WatchEvent -> Bool
(V1WatchEvent -> V1WatchEvent -> Bool)
-> (V1WatchEvent -> V1WatchEvent -> Bool) -> Eq V1WatchEvent
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1WatchEvent -> V1WatchEvent -> Bool
== :: V1WatchEvent -> V1WatchEvent -> Bool
$c/= :: V1WatchEvent -> V1WatchEvent -> Bool
/= :: V1WatchEvent -> V1WatchEvent -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1WatchEvent
instance A.FromJSON V1WatchEvent where
  parseJSON :: Value -> Parser V1WatchEvent
parseJSON = String
-> (Object -> Parser V1WatchEvent) -> Value -> Parser V1WatchEvent
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1WatchEvent" ((Object -> Parser V1WatchEvent) -> Value -> Parser V1WatchEvent)
-> (Object -> Parser V1WatchEvent) -> Value -> Parser V1WatchEvent
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Value -> Text -> V1WatchEvent
V1WatchEvent
      (Value -> Text -> V1WatchEvent)
-> Parser Value -> Parser (Text -> V1WatchEvent)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Value
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"object")
      Parser (Text -> V1WatchEvent) -> Parser Text -> Parser V1WatchEvent
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"type")

-- | ToJSON V1WatchEvent
instance A.ToJSON V1WatchEvent where
  toJSON :: V1WatchEvent -> Value
toJSON V1WatchEvent {Value
Text
$sel:v1WatchEventObject:V1WatchEvent :: V1WatchEvent -> Value
$sel:v1WatchEventType:V1WatchEvent :: V1WatchEvent -> Text
v1WatchEventObject :: Value
v1WatchEventType :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"object" Key -> Value -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Value
v1WatchEventObject
      , Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1WatchEventType
      ]


-- | Construct a value of type 'V1WatchEvent' (by applying it's required fields, if any)
mkV1WatchEvent
  :: A.Value -- ^ 'v1WatchEventObject': Object is:  * If Type is Added or Modified: the new state of the object.  * If Type is Deleted: the state of the object immediately before deletion.  * If Type is Error: *Status is recommended; other types may make sense    depending on context.
  -> Text -- ^ 'v1WatchEventType' 
  -> V1WatchEvent
mkV1WatchEvent :: Value -> Text -> V1WatchEvent
mkV1WatchEvent Value
v1WatchEventObject Text
v1WatchEventType =
  V1WatchEvent
  { Value
$sel:v1WatchEventObject:V1WatchEvent :: Value
v1WatchEventObject :: Value
v1WatchEventObject
  , Text
$sel:v1WatchEventType:V1WatchEvent :: Text
v1WatchEventType :: Text
v1WatchEventType
  }

-- ** V1WebhookConversion
-- | V1WebhookConversion
-- WebhookConversion describes how to call a conversion webhook
data V1WebhookConversion = V1WebhookConversion
  { V1WebhookConversion -> Maybe ApiextensionsV1WebhookClientConfig
v1WebhookConversionClientConfig :: !(Maybe ApiextensionsV1WebhookClientConfig) -- ^ "clientConfig"
  , V1WebhookConversion -> [Text]
v1WebhookConversionConversionReviewVersions :: !([Text]) -- ^ /Required/ "conversionReviewVersions" - conversionReviewVersions is an ordered list of preferred &#x60;ConversionReview&#x60; versions the Webhook expects. The API server will use the first version in the list which it supports. If none of the versions specified in this list are supported by API server, conversion will fail for the custom resource. If a persisted Webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail.
  } deriving (Int -> V1WebhookConversion -> ShowS
[V1WebhookConversion] -> ShowS
V1WebhookConversion -> String
(Int -> V1WebhookConversion -> ShowS)
-> (V1WebhookConversion -> String)
-> ([V1WebhookConversion] -> ShowS)
-> Show V1WebhookConversion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1WebhookConversion -> ShowS
showsPrec :: Int -> V1WebhookConversion -> ShowS
$cshow :: V1WebhookConversion -> String
show :: V1WebhookConversion -> String
$cshowList :: [V1WebhookConversion] -> ShowS
showList :: [V1WebhookConversion] -> ShowS
P.Show, V1WebhookConversion -> V1WebhookConversion -> Bool
(V1WebhookConversion -> V1WebhookConversion -> Bool)
-> (V1WebhookConversion -> V1WebhookConversion -> Bool)
-> Eq V1WebhookConversion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1WebhookConversion -> V1WebhookConversion -> Bool
== :: V1WebhookConversion -> V1WebhookConversion -> Bool
$c/= :: V1WebhookConversion -> V1WebhookConversion -> Bool
/= :: V1WebhookConversion -> V1WebhookConversion -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1WebhookConversion
instance A.FromJSON V1WebhookConversion where
  parseJSON :: Value -> Parser V1WebhookConversion
parseJSON = String
-> (Object -> Parser V1WebhookConversion)
-> Value
-> Parser V1WebhookConversion
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1WebhookConversion" ((Object -> Parser V1WebhookConversion)
 -> Value -> Parser V1WebhookConversion)
-> (Object -> Parser V1WebhookConversion)
-> Value
-> Parser V1WebhookConversion
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe ApiextensionsV1WebhookClientConfig
-> [Text] -> V1WebhookConversion
V1WebhookConversion
      (Maybe ApiextensionsV1WebhookClientConfig
 -> [Text] -> V1WebhookConversion)
-> Parser (Maybe ApiextensionsV1WebhookClientConfig)
-> Parser ([Text] -> V1WebhookConversion)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe ApiextensionsV1WebhookClientConfig)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"clientConfig")
      Parser ([Text] -> V1WebhookConversion)
-> Parser [Text] -> Parser V1WebhookConversion
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"conversionReviewVersions")

-- | ToJSON V1WebhookConversion
instance A.ToJSON V1WebhookConversion where
  toJSON :: V1WebhookConversion -> Value
toJSON V1WebhookConversion {[Text]
Maybe ApiextensionsV1WebhookClientConfig
$sel:v1WebhookConversionClientConfig:V1WebhookConversion :: V1WebhookConversion -> Maybe ApiextensionsV1WebhookClientConfig
$sel:v1WebhookConversionConversionReviewVersions:V1WebhookConversion :: V1WebhookConversion -> [Text]
v1WebhookConversionClientConfig :: Maybe ApiextensionsV1WebhookClientConfig
v1WebhookConversionConversionReviewVersions :: [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"clientConfig" Key -> Maybe ApiextensionsV1WebhookClientConfig -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe ApiextensionsV1WebhookClientConfig
v1WebhookConversionClientConfig
      , Key
"conversionReviewVersions" Key -> [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [Text]
v1WebhookConversionConversionReviewVersions
      ]


-- | Construct a value of type 'V1WebhookConversion' (by applying it's required fields, if any)
mkV1WebhookConversion
  :: [Text] -- ^ 'v1WebhookConversionConversionReviewVersions': conversionReviewVersions is an ordered list of preferred `ConversionReview` versions the Webhook expects. The API server will use the first version in the list which it supports. If none of the versions specified in this list are supported by API server, conversion will fail for the custom resource. If a persisted Webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail.
  -> V1WebhookConversion
mkV1WebhookConversion :: [Text] -> V1WebhookConversion
mkV1WebhookConversion [Text]
v1WebhookConversionConversionReviewVersions =
  V1WebhookConversion
  { $sel:v1WebhookConversionClientConfig:V1WebhookConversion :: Maybe ApiextensionsV1WebhookClientConfig
v1WebhookConversionClientConfig = Maybe ApiextensionsV1WebhookClientConfig
forall a. Maybe a
Nothing
  , [Text]
$sel:v1WebhookConversionConversionReviewVersions:V1WebhookConversion :: [Text]
v1WebhookConversionConversionReviewVersions :: [Text]
v1WebhookConversionConversionReviewVersions
  }

-- ** V1WeightedPodAffinityTerm
-- | V1WeightedPodAffinityTerm
-- The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)
data V1WeightedPodAffinityTerm = V1WeightedPodAffinityTerm
  { V1WeightedPodAffinityTerm -> V1PodAffinityTerm
v1WeightedPodAffinityTermPodAffinityTerm :: !(V1PodAffinityTerm) -- ^ /Required/ "podAffinityTerm"
  , V1WeightedPodAffinityTerm -> Int
v1WeightedPodAffinityTermWeight :: !(Int) -- ^ /Required/ "weight" - weight associated with matching the corresponding podAffinityTerm, in the range 1-100.
  } deriving (Int -> V1WeightedPodAffinityTerm -> ShowS
[V1WeightedPodAffinityTerm] -> ShowS
V1WeightedPodAffinityTerm -> String
(Int -> V1WeightedPodAffinityTerm -> ShowS)
-> (V1WeightedPodAffinityTerm -> String)
-> ([V1WeightedPodAffinityTerm] -> ShowS)
-> Show V1WeightedPodAffinityTerm
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1WeightedPodAffinityTerm -> ShowS
showsPrec :: Int -> V1WeightedPodAffinityTerm -> ShowS
$cshow :: V1WeightedPodAffinityTerm -> String
show :: V1WeightedPodAffinityTerm -> String
$cshowList :: [V1WeightedPodAffinityTerm] -> ShowS
showList :: [V1WeightedPodAffinityTerm] -> ShowS
P.Show, V1WeightedPodAffinityTerm -> V1WeightedPodAffinityTerm -> Bool
(V1WeightedPodAffinityTerm -> V1WeightedPodAffinityTerm -> Bool)
-> (V1WeightedPodAffinityTerm -> V1WeightedPodAffinityTerm -> Bool)
-> Eq V1WeightedPodAffinityTerm
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1WeightedPodAffinityTerm -> V1WeightedPodAffinityTerm -> Bool
== :: V1WeightedPodAffinityTerm -> V1WeightedPodAffinityTerm -> Bool
$c/= :: V1WeightedPodAffinityTerm -> V1WeightedPodAffinityTerm -> Bool
/= :: V1WeightedPodAffinityTerm -> V1WeightedPodAffinityTerm -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1WeightedPodAffinityTerm
instance A.FromJSON V1WeightedPodAffinityTerm where
  parseJSON :: Value -> Parser V1WeightedPodAffinityTerm
parseJSON = String
-> (Object -> Parser V1WeightedPodAffinityTerm)
-> Value
-> Parser V1WeightedPodAffinityTerm
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1WeightedPodAffinityTerm" ((Object -> Parser V1WeightedPodAffinityTerm)
 -> Value -> Parser V1WeightedPodAffinityTerm)
-> (Object -> Parser V1WeightedPodAffinityTerm)
-> Value
-> Parser V1WeightedPodAffinityTerm
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    V1PodAffinityTerm -> Int -> V1WeightedPodAffinityTerm
V1WeightedPodAffinityTerm
      (V1PodAffinityTerm -> Int -> V1WeightedPodAffinityTerm)
-> Parser V1PodAffinityTerm
-> Parser (Int -> V1WeightedPodAffinityTerm)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser V1PodAffinityTerm
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"podAffinityTerm")
      Parser (Int -> V1WeightedPodAffinityTerm)
-> Parser Int -> Parser V1WeightedPodAffinityTerm
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"weight")

-- | ToJSON V1WeightedPodAffinityTerm
instance A.ToJSON V1WeightedPodAffinityTerm where
  toJSON :: V1WeightedPodAffinityTerm -> Value
toJSON V1WeightedPodAffinityTerm {Int
V1PodAffinityTerm
$sel:v1WeightedPodAffinityTermPodAffinityTerm:V1WeightedPodAffinityTerm :: V1WeightedPodAffinityTerm -> V1PodAffinityTerm
$sel:v1WeightedPodAffinityTermWeight:V1WeightedPodAffinityTerm :: V1WeightedPodAffinityTerm -> Int
v1WeightedPodAffinityTermPodAffinityTerm :: V1PodAffinityTerm
v1WeightedPodAffinityTermWeight :: Int
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"podAffinityTerm" Key -> V1PodAffinityTerm -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1PodAffinityTerm
v1WeightedPodAffinityTermPodAffinityTerm
      , Key
"weight" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v1WeightedPodAffinityTermWeight
      ]


-- | Construct a value of type 'V1WeightedPodAffinityTerm' (by applying it's required fields, if any)
mkV1WeightedPodAffinityTerm
  :: V1PodAffinityTerm -- ^ 'v1WeightedPodAffinityTermPodAffinityTerm' 
  -> Int -- ^ 'v1WeightedPodAffinityTermWeight': weight associated with matching the corresponding podAffinityTerm, in the range 1-100.
  -> V1WeightedPodAffinityTerm
mkV1WeightedPodAffinityTerm :: V1PodAffinityTerm -> Int -> V1WeightedPodAffinityTerm
mkV1WeightedPodAffinityTerm V1PodAffinityTerm
v1WeightedPodAffinityTermPodAffinityTerm Int
v1WeightedPodAffinityTermWeight =
  V1WeightedPodAffinityTerm
  { V1PodAffinityTerm
$sel:v1WeightedPodAffinityTermPodAffinityTerm:V1WeightedPodAffinityTerm :: V1PodAffinityTerm
v1WeightedPodAffinityTermPodAffinityTerm :: V1PodAffinityTerm
v1WeightedPodAffinityTermPodAffinityTerm
  , Int
$sel:v1WeightedPodAffinityTermWeight:V1WeightedPodAffinityTerm :: Int
v1WeightedPodAffinityTermWeight :: Int
v1WeightedPodAffinityTermWeight
  }

-- ** V1WindowsSecurityContextOptions
-- | V1WindowsSecurityContextOptions
-- WindowsSecurityContextOptions contain Windows-specific options and credentials.
data V1WindowsSecurityContextOptions = V1WindowsSecurityContextOptions
  { V1WindowsSecurityContextOptions -> Maybe Text
v1WindowsSecurityContextOptionsGmsaCredentialSpec :: !(Maybe Text) -- ^ "gmsaCredentialSpec" - GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field.
  , V1WindowsSecurityContextOptions -> Maybe Text
v1WindowsSecurityContextOptionsGmsaCredentialSpecName :: !(Maybe Text) -- ^ "gmsaCredentialSpecName" - GMSACredentialSpecName is the name of the GMSA credential spec to use.
  , V1WindowsSecurityContextOptions -> Maybe Bool
v1WindowsSecurityContextOptionsHostProcess :: !(Maybe Bool) -- ^ "hostProcess" - HostProcess determines if a container should be run as a &#39;Host Process&#39; container. All of a Pod&#39;s containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true.
  , V1WindowsSecurityContextOptions -> Maybe Text
v1WindowsSecurityContextOptionsRunAsUserName :: !(Maybe Text) -- ^ "runAsUserName" - The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
  } deriving (Int -> V1WindowsSecurityContextOptions -> ShowS
[V1WindowsSecurityContextOptions] -> ShowS
V1WindowsSecurityContextOptions -> String
(Int -> V1WindowsSecurityContextOptions -> ShowS)
-> (V1WindowsSecurityContextOptions -> String)
-> ([V1WindowsSecurityContextOptions] -> ShowS)
-> Show V1WindowsSecurityContextOptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1WindowsSecurityContextOptions -> ShowS
showsPrec :: Int -> V1WindowsSecurityContextOptions -> ShowS
$cshow :: V1WindowsSecurityContextOptions -> String
show :: V1WindowsSecurityContextOptions -> String
$cshowList :: [V1WindowsSecurityContextOptions] -> ShowS
showList :: [V1WindowsSecurityContextOptions] -> ShowS
P.Show, V1WindowsSecurityContextOptions
-> V1WindowsSecurityContextOptions -> Bool
(V1WindowsSecurityContextOptions
 -> V1WindowsSecurityContextOptions -> Bool)
-> (V1WindowsSecurityContextOptions
    -> V1WindowsSecurityContextOptions -> Bool)
-> Eq V1WindowsSecurityContextOptions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1WindowsSecurityContextOptions
-> V1WindowsSecurityContextOptions -> Bool
== :: V1WindowsSecurityContextOptions
-> V1WindowsSecurityContextOptions -> Bool
$c/= :: V1WindowsSecurityContextOptions
-> V1WindowsSecurityContextOptions -> Bool
/= :: V1WindowsSecurityContextOptions
-> V1WindowsSecurityContextOptions -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1WindowsSecurityContextOptions
instance A.FromJSON V1WindowsSecurityContextOptions where
  parseJSON :: Value -> Parser V1WindowsSecurityContextOptions
parseJSON = String
-> (Object -> Parser V1WindowsSecurityContextOptions)
-> Value
-> Parser V1WindowsSecurityContextOptions
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1WindowsSecurityContextOptions" ((Object -> Parser V1WindowsSecurityContextOptions)
 -> Value -> Parser V1WindowsSecurityContextOptions)
-> (Object -> Parser V1WindowsSecurityContextOptions)
-> Value
-> Parser V1WindowsSecurityContextOptions
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> V1WindowsSecurityContextOptions
V1WindowsSecurityContextOptions
      (Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> V1WindowsSecurityContextOptions)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Bool -> Maybe Text -> V1WindowsSecurityContextOptions)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"gmsaCredentialSpec")
      Parser
  (Maybe Text
   -> Maybe Bool -> Maybe Text -> V1WindowsSecurityContextOptions)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool -> Maybe Text -> V1WindowsSecurityContextOptions)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"gmsaCredentialSpecName")
      Parser
  (Maybe Bool -> Maybe Text -> V1WindowsSecurityContextOptions)
-> Parser (Maybe Bool)
-> Parser (Maybe Text -> V1WindowsSecurityContextOptions)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"hostProcess")
      Parser (Maybe Text -> V1WindowsSecurityContextOptions)
-> Parser (Maybe Text) -> Parser V1WindowsSecurityContextOptions
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"runAsUserName")

-- | ToJSON V1WindowsSecurityContextOptions
instance A.ToJSON V1WindowsSecurityContextOptions where
  toJSON :: V1WindowsSecurityContextOptions -> Value
toJSON V1WindowsSecurityContextOptions {Maybe Bool
Maybe Text
$sel:v1WindowsSecurityContextOptionsGmsaCredentialSpec:V1WindowsSecurityContextOptions :: V1WindowsSecurityContextOptions -> Maybe Text
$sel:v1WindowsSecurityContextOptionsGmsaCredentialSpecName:V1WindowsSecurityContextOptions :: V1WindowsSecurityContextOptions -> Maybe Text
$sel:v1WindowsSecurityContextOptionsHostProcess:V1WindowsSecurityContextOptions :: V1WindowsSecurityContextOptions -> Maybe Bool
$sel:v1WindowsSecurityContextOptionsRunAsUserName:V1WindowsSecurityContextOptions :: V1WindowsSecurityContextOptions -> Maybe Text
v1WindowsSecurityContextOptionsGmsaCredentialSpec :: Maybe Text
v1WindowsSecurityContextOptionsGmsaCredentialSpecName :: Maybe Text
v1WindowsSecurityContextOptionsHostProcess :: Maybe Bool
v1WindowsSecurityContextOptionsRunAsUserName :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"gmsaCredentialSpec" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1WindowsSecurityContextOptionsGmsaCredentialSpec
      , Key
"gmsaCredentialSpecName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1WindowsSecurityContextOptionsGmsaCredentialSpecName
      , Key
"hostProcess" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1WindowsSecurityContextOptionsHostProcess
      , Key
"runAsUserName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1WindowsSecurityContextOptionsRunAsUserName
      ]


-- | Construct a value of type 'V1WindowsSecurityContextOptions' (by applying it's required fields, if any)
mkV1WindowsSecurityContextOptions
  :: V1WindowsSecurityContextOptions
mkV1WindowsSecurityContextOptions :: V1WindowsSecurityContextOptions
mkV1WindowsSecurityContextOptions =
  V1WindowsSecurityContextOptions
  { $sel:v1WindowsSecurityContextOptionsGmsaCredentialSpec:V1WindowsSecurityContextOptions :: Maybe Text
v1WindowsSecurityContextOptionsGmsaCredentialSpec = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1WindowsSecurityContextOptionsGmsaCredentialSpecName:V1WindowsSecurityContextOptions :: Maybe Text
v1WindowsSecurityContextOptionsGmsaCredentialSpecName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1WindowsSecurityContextOptionsHostProcess:V1WindowsSecurityContextOptions :: Maybe Bool
v1WindowsSecurityContextOptionsHostProcess = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1WindowsSecurityContextOptionsRunAsUserName:V1WindowsSecurityContextOptions :: Maybe Text
v1WindowsSecurityContextOptionsRunAsUserName = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1alpha1ApplyConfiguration
-- | V1alpha1ApplyConfiguration
-- ApplyConfiguration defines the desired configuration values of an object.
data V1alpha1ApplyConfiguration = V1alpha1ApplyConfiguration
  { V1alpha1ApplyConfiguration -> Maybe Text
v1alpha1ApplyConfigurationExpression :: !(Maybe Text) -- ^ "expression" - expression will be evaluated by CEL to create an apply configuration. ref: https://github.com/google/cel-spec  Apply configurations are declared in CEL using object initialization. For example, this CEL expression returns an apply configuration to set a single field:   Object{    spec: Object.spec{      serviceAccountName: \&quot;example\&quot;    }  }  Apply configurations may not modify atomic structs, maps or arrays due to the risk of accidental deletion of values not included in the apply configuration.  CEL expressions have access to the object types needed to create apply configurations:  - &#39;Object&#39; - CEL type of the resource object. - &#39;Object.&lt;fieldName&gt;&#39; - CEL type of object field (such as &#39;Object.spec&#39;) - &#39;Object.&lt;fieldName1&gt;.&lt;fieldName2&gt;...&lt;fieldNameN&gt;&#x60; - CEL type of nested field (such as &#39;Object.spec.containers&#39;)  CEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables:  - &#39;object&#39; - The object from the incoming request. The value is null for DELETE requests. - &#39;oldObject&#39; - The existing object. The value is null for CREATE requests. - &#39;request&#39; - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - &#39;params&#39; - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - &#39;namespaceObject&#39; - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - &#39;variables&#39; - Map of composited variables, from its name to its lazily evaluated value.   For example, a variable named &#39;foo&#39; can be accessed as &#39;variables.foo&#39;. - &#39;authorizer&#39; - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.   See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz - &#39;authorizer.requestResource&#39; - A CEL ResourceCheck constructed from the &#39;authorizer&#39; and configured with the   request resource.  The &#x60;apiVersion&#x60;, &#x60;kind&#x60;, &#x60;metadata.name&#x60; and &#x60;metadata.generateName&#x60; are always accessible from the root of the object. No other metadata properties are accessible.  Only property names of the form &#x60;[a-zA-Z_.-/][a-zA-Z0-9_.-/]*&#x60; are accessible. Required.
  } deriving (Int -> V1alpha1ApplyConfiguration -> ShowS
[V1alpha1ApplyConfiguration] -> ShowS
V1alpha1ApplyConfiguration -> String
(Int -> V1alpha1ApplyConfiguration -> ShowS)
-> (V1alpha1ApplyConfiguration -> String)
-> ([V1alpha1ApplyConfiguration] -> ShowS)
-> Show V1alpha1ApplyConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha1ApplyConfiguration -> ShowS
showsPrec :: Int -> V1alpha1ApplyConfiguration -> ShowS
$cshow :: V1alpha1ApplyConfiguration -> String
show :: V1alpha1ApplyConfiguration -> String
$cshowList :: [V1alpha1ApplyConfiguration] -> ShowS
showList :: [V1alpha1ApplyConfiguration] -> ShowS
P.Show, V1alpha1ApplyConfiguration -> V1alpha1ApplyConfiguration -> Bool
(V1alpha1ApplyConfiguration -> V1alpha1ApplyConfiguration -> Bool)
-> (V1alpha1ApplyConfiguration
    -> V1alpha1ApplyConfiguration -> Bool)
-> Eq V1alpha1ApplyConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha1ApplyConfiguration -> V1alpha1ApplyConfiguration -> Bool
== :: V1alpha1ApplyConfiguration -> V1alpha1ApplyConfiguration -> Bool
$c/= :: V1alpha1ApplyConfiguration -> V1alpha1ApplyConfiguration -> Bool
/= :: V1alpha1ApplyConfiguration -> V1alpha1ApplyConfiguration -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha1ApplyConfiguration
instance A.FromJSON V1alpha1ApplyConfiguration where
  parseJSON :: Value -> Parser V1alpha1ApplyConfiguration
parseJSON = String
-> (Object -> Parser V1alpha1ApplyConfiguration)
-> Value
-> Parser V1alpha1ApplyConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha1ApplyConfiguration" ((Object -> Parser V1alpha1ApplyConfiguration)
 -> Value -> Parser V1alpha1ApplyConfiguration)
-> (Object -> Parser V1alpha1ApplyConfiguration)
-> Value
-> Parser V1alpha1ApplyConfiguration
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> V1alpha1ApplyConfiguration
V1alpha1ApplyConfiguration
      (Maybe Text -> V1alpha1ApplyConfiguration)
-> Parser (Maybe Text) -> Parser V1alpha1ApplyConfiguration
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"expression")

-- | ToJSON V1alpha1ApplyConfiguration
instance A.ToJSON V1alpha1ApplyConfiguration where
  toJSON :: V1alpha1ApplyConfiguration -> Value
toJSON V1alpha1ApplyConfiguration {Maybe Text
$sel:v1alpha1ApplyConfigurationExpression:V1alpha1ApplyConfiguration :: V1alpha1ApplyConfiguration -> Maybe Text
v1alpha1ApplyConfigurationExpression :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"expression" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1ApplyConfigurationExpression
      ]


-- | Construct a value of type 'V1alpha1ApplyConfiguration' (by applying it's required fields, if any)
mkV1alpha1ApplyConfiguration
  :: V1alpha1ApplyConfiguration
mkV1alpha1ApplyConfiguration :: V1alpha1ApplyConfiguration
mkV1alpha1ApplyConfiguration =
  V1alpha1ApplyConfiguration
  { $sel:v1alpha1ApplyConfigurationExpression:V1alpha1ApplyConfiguration :: Maybe Text
v1alpha1ApplyConfigurationExpression = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1alpha1ClusterTrustBundle
-- | V1alpha1ClusterTrustBundle
-- ClusterTrustBundle is a cluster-scoped container for X.509 trust anchors (root certificates).  ClusterTrustBundle objects are considered to be readable by any authenticated user in the cluster, because they can be mounted by pods using the `clusterTrustBundle` projection.  All service accounts have read access to ClusterTrustBundles by default.  Users who only have namespace-level access to a cluster can read ClusterTrustBundles by impersonating a serviceaccount that they have access to.  It can be optionally associated with a particular assigner, in which case it contains one valid set of trust anchors for that signer. Signers may have multiple associated ClusterTrustBundles; each is an independent set of trust anchors for that signer. Admission control is used to enforce that only users with permissions on the signer can create or modify the corresponding bundle.
data V1alpha1ClusterTrustBundle = V1alpha1ClusterTrustBundle
  { V1alpha1ClusterTrustBundle -> Maybe Text
v1alpha1ClusterTrustBundleApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1alpha1ClusterTrustBundle -> Maybe Text
v1alpha1ClusterTrustBundleKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1alpha1ClusterTrustBundle -> Maybe V1ObjectMeta
v1alpha1ClusterTrustBundleMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1alpha1ClusterTrustBundle -> V1alpha1ClusterTrustBundleSpec
v1alpha1ClusterTrustBundleSpec :: !(V1alpha1ClusterTrustBundleSpec) -- ^ /Required/ "spec"
  } deriving (Int -> V1alpha1ClusterTrustBundle -> ShowS
[V1alpha1ClusterTrustBundle] -> ShowS
V1alpha1ClusterTrustBundle -> String
(Int -> V1alpha1ClusterTrustBundle -> ShowS)
-> (V1alpha1ClusterTrustBundle -> String)
-> ([V1alpha1ClusterTrustBundle] -> ShowS)
-> Show V1alpha1ClusterTrustBundle
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha1ClusterTrustBundle -> ShowS
showsPrec :: Int -> V1alpha1ClusterTrustBundle -> ShowS
$cshow :: V1alpha1ClusterTrustBundle -> String
show :: V1alpha1ClusterTrustBundle -> String
$cshowList :: [V1alpha1ClusterTrustBundle] -> ShowS
showList :: [V1alpha1ClusterTrustBundle] -> ShowS
P.Show, V1alpha1ClusterTrustBundle -> V1alpha1ClusterTrustBundle -> Bool
(V1alpha1ClusterTrustBundle -> V1alpha1ClusterTrustBundle -> Bool)
-> (V1alpha1ClusterTrustBundle
    -> V1alpha1ClusterTrustBundle -> Bool)
-> Eq V1alpha1ClusterTrustBundle
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha1ClusterTrustBundle -> V1alpha1ClusterTrustBundle -> Bool
== :: V1alpha1ClusterTrustBundle -> V1alpha1ClusterTrustBundle -> Bool
$c/= :: V1alpha1ClusterTrustBundle -> V1alpha1ClusterTrustBundle -> Bool
/= :: V1alpha1ClusterTrustBundle -> V1alpha1ClusterTrustBundle -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha1ClusterTrustBundle
instance A.FromJSON V1alpha1ClusterTrustBundle where
  parseJSON :: Value -> Parser V1alpha1ClusterTrustBundle
parseJSON = String
-> (Object -> Parser V1alpha1ClusterTrustBundle)
-> Value
-> Parser V1alpha1ClusterTrustBundle
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha1ClusterTrustBundle" ((Object -> Parser V1alpha1ClusterTrustBundle)
 -> Value -> Parser V1alpha1ClusterTrustBundle)
-> (Object -> Parser V1alpha1ClusterTrustBundle)
-> Value
-> Parser V1alpha1ClusterTrustBundle
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> V1alpha1ClusterTrustBundleSpec
-> V1alpha1ClusterTrustBundle
V1alpha1ClusterTrustBundle
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> V1alpha1ClusterTrustBundleSpec
 -> V1alpha1ClusterTrustBundle)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> V1alpha1ClusterTrustBundleSpec
      -> V1alpha1ClusterTrustBundle)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> V1alpha1ClusterTrustBundleSpec
   -> V1alpha1ClusterTrustBundle)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> V1alpha1ClusterTrustBundleSpec -> V1alpha1ClusterTrustBundle)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> V1alpha1ClusterTrustBundleSpec -> V1alpha1ClusterTrustBundle)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (V1alpha1ClusterTrustBundleSpec -> V1alpha1ClusterTrustBundle)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (V1alpha1ClusterTrustBundleSpec -> V1alpha1ClusterTrustBundle)
-> Parser V1alpha1ClusterTrustBundleSpec
-> Parser V1alpha1ClusterTrustBundle
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1alpha1ClusterTrustBundleSpec
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"spec")

-- | ToJSON V1alpha1ClusterTrustBundle
instance A.ToJSON V1alpha1ClusterTrustBundle where
  toJSON :: V1alpha1ClusterTrustBundle -> Value
toJSON V1alpha1ClusterTrustBundle {Maybe Text
Maybe V1ObjectMeta
V1alpha1ClusterTrustBundleSpec
$sel:v1alpha1ClusterTrustBundleApiVersion:V1alpha1ClusterTrustBundle :: V1alpha1ClusterTrustBundle -> Maybe Text
$sel:v1alpha1ClusterTrustBundleKind:V1alpha1ClusterTrustBundle :: V1alpha1ClusterTrustBundle -> Maybe Text
$sel:v1alpha1ClusterTrustBundleMetadata:V1alpha1ClusterTrustBundle :: V1alpha1ClusterTrustBundle -> Maybe V1ObjectMeta
$sel:v1alpha1ClusterTrustBundleSpec:V1alpha1ClusterTrustBundle :: V1alpha1ClusterTrustBundle -> V1alpha1ClusterTrustBundleSpec
v1alpha1ClusterTrustBundleApiVersion :: Maybe Text
v1alpha1ClusterTrustBundleKind :: Maybe Text
v1alpha1ClusterTrustBundleMetadata :: Maybe V1ObjectMeta
v1alpha1ClusterTrustBundleSpec :: V1alpha1ClusterTrustBundleSpec
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1ClusterTrustBundleApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1ClusterTrustBundleKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1alpha1ClusterTrustBundleMetadata
      , Key
"spec" Key -> V1alpha1ClusterTrustBundleSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1alpha1ClusterTrustBundleSpec
v1alpha1ClusterTrustBundleSpec
      ]


-- | Construct a value of type 'V1alpha1ClusterTrustBundle' (by applying it's required fields, if any)
mkV1alpha1ClusterTrustBundle
  :: V1alpha1ClusterTrustBundleSpec -- ^ 'v1alpha1ClusterTrustBundleSpec' 
  -> V1alpha1ClusterTrustBundle
mkV1alpha1ClusterTrustBundle :: V1alpha1ClusterTrustBundleSpec -> V1alpha1ClusterTrustBundle
mkV1alpha1ClusterTrustBundle V1alpha1ClusterTrustBundleSpec
v1alpha1ClusterTrustBundleSpec =
  V1alpha1ClusterTrustBundle
  { $sel:v1alpha1ClusterTrustBundleApiVersion:V1alpha1ClusterTrustBundle :: Maybe Text
v1alpha1ClusterTrustBundleApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha1ClusterTrustBundleKind:V1alpha1ClusterTrustBundle :: Maybe Text
v1alpha1ClusterTrustBundleKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha1ClusterTrustBundleMetadata:V1alpha1ClusterTrustBundle :: Maybe V1ObjectMeta
v1alpha1ClusterTrustBundleMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , V1alpha1ClusterTrustBundleSpec
$sel:v1alpha1ClusterTrustBundleSpec:V1alpha1ClusterTrustBundle :: V1alpha1ClusterTrustBundleSpec
v1alpha1ClusterTrustBundleSpec :: V1alpha1ClusterTrustBundleSpec
v1alpha1ClusterTrustBundleSpec
  }

-- ** V1alpha1ClusterTrustBundleList
-- | V1alpha1ClusterTrustBundleList
-- ClusterTrustBundleList is a collection of ClusterTrustBundle objects
data V1alpha1ClusterTrustBundleList = V1alpha1ClusterTrustBundleList
  { V1alpha1ClusterTrustBundleList -> Maybe Text
v1alpha1ClusterTrustBundleListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1alpha1ClusterTrustBundleList -> [V1alpha1ClusterTrustBundle]
v1alpha1ClusterTrustBundleListItems :: !([V1alpha1ClusterTrustBundle]) -- ^ /Required/ "items" - items is a collection of ClusterTrustBundle objects
  , V1alpha1ClusterTrustBundleList -> Maybe Text
v1alpha1ClusterTrustBundleListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1alpha1ClusterTrustBundleList -> Maybe V1ListMeta
v1alpha1ClusterTrustBundleListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1alpha1ClusterTrustBundleList -> ShowS
[V1alpha1ClusterTrustBundleList] -> ShowS
V1alpha1ClusterTrustBundleList -> String
(Int -> V1alpha1ClusterTrustBundleList -> ShowS)
-> (V1alpha1ClusterTrustBundleList -> String)
-> ([V1alpha1ClusterTrustBundleList] -> ShowS)
-> Show V1alpha1ClusterTrustBundleList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha1ClusterTrustBundleList -> ShowS
showsPrec :: Int -> V1alpha1ClusterTrustBundleList -> ShowS
$cshow :: V1alpha1ClusterTrustBundleList -> String
show :: V1alpha1ClusterTrustBundleList -> String
$cshowList :: [V1alpha1ClusterTrustBundleList] -> ShowS
showList :: [V1alpha1ClusterTrustBundleList] -> ShowS
P.Show, V1alpha1ClusterTrustBundleList
-> V1alpha1ClusterTrustBundleList -> Bool
(V1alpha1ClusterTrustBundleList
 -> V1alpha1ClusterTrustBundleList -> Bool)
-> (V1alpha1ClusterTrustBundleList
    -> V1alpha1ClusterTrustBundleList -> Bool)
-> Eq V1alpha1ClusterTrustBundleList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha1ClusterTrustBundleList
-> V1alpha1ClusterTrustBundleList -> Bool
== :: V1alpha1ClusterTrustBundleList
-> V1alpha1ClusterTrustBundleList -> Bool
$c/= :: V1alpha1ClusterTrustBundleList
-> V1alpha1ClusterTrustBundleList -> Bool
/= :: V1alpha1ClusterTrustBundleList
-> V1alpha1ClusterTrustBundleList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha1ClusterTrustBundleList
instance A.FromJSON V1alpha1ClusterTrustBundleList where
  parseJSON :: Value -> Parser V1alpha1ClusterTrustBundleList
parseJSON = String
-> (Object -> Parser V1alpha1ClusterTrustBundleList)
-> Value
-> Parser V1alpha1ClusterTrustBundleList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha1ClusterTrustBundleList" ((Object -> Parser V1alpha1ClusterTrustBundleList)
 -> Value -> Parser V1alpha1ClusterTrustBundleList)
-> (Object -> Parser V1alpha1ClusterTrustBundleList)
-> Value
-> Parser V1alpha1ClusterTrustBundleList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1alpha1ClusterTrustBundle]
-> Maybe Text
-> Maybe V1ListMeta
-> V1alpha1ClusterTrustBundleList
V1alpha1ClusterTrustBundleList
      (Maybe Text
 -> [V1alpha1ClusterTrustBundle]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1alpha1ClusterTrustBundleList)
-> Parser (Maybe Text)
-> Parser
     ([V1alpha1ClusterTrustBundle]
      -> Maybe Text
      -> Maybe V1ListMeta
      -> V1alpha1ClusterTrustBundleList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1alpha1ClusterTrustBundle]
   -> Maybe Text
   -> Maybe V1ListMeta
   -> V1alpha1ClusterTrustBundleList)
-> Parser [V1alpha1ClusterTrustBundle]
-> Parser
     (Maybe Text -> Maybe V1ListMeta -> V1alpha1ClusterTrustBundleList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1alpha1ClusterTrustBundle]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser
  (Maybe Text -> Maybe V1ListMeta -> V1alpha1ClusterTrustBundleList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1alpha1ClusterTrustBundleList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1alpha1ClusterTrustBundleList)
-> Parser (Maybe V1ListMeta)
-> Parser V1alpha1ClusterTrustBundleList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1alpha1ClusterTrustBundleList
instance A.ToJSON V1alpha1ClusterTrustBundleList where
  toJSON :: V1alpha1ClusterTrustBundleList -> Value
toJSON V1alpha1ClusterTrustBundleList {[V1alpha1ClusterTrustBundle]
Maybe Text
Maybe V1ListMeta
$sel:v1alpha1ClusterTrustBundleListApiVersion:V1alpha1ClusterTrustBundleList :: V1alpha1ClusterTrustBundleList -> Maybe Text
$sel:v1alpha1ClusterTrustBundleListItems:V1alpha1ClusterTrustBundleList :: V1alpha1ClusterTrustBundleList -> [V1alpha1ClusterTrustBundle]
$sel:v1alpha1ClusterTrustBundleListKind:V1alpha1ClusterTrustBundleList :: V1alpha1ClusterTrustBundleList -> Maybe Text
$sel:v1alpha1ClusterTrustBundleListMetadata:V1alpha1ClusterTrustBundleList :: V1alpha1ClusterTrustBundleList -> Maybe V1ListMeta
v1alpha1ClusterTrustBundleListApiVersion :: Maybe Text
v1alpha1ClusterTrustBundleListItems :: [V1alpha1ClusterTrustBundle]
v1alpha1ClusterTrustBundleListKind :: Maybe Text
v1alpha1ClusterTrustBundleListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1ClusterTrustBundleListApiVersion
      , Key
"items" Key -> [V1alpha1ClusterTrustBundle] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1alpha1ClusterTrustBundle]
v1alpha1ClusterTrustBundleListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1ClusterTrustBundleListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1alpha1ClusterTrustBundleListMetadata
      ]


-- | Construct a value of type 'V1alpha1ClusterTrustBundleList' (by applying it's required fields, if any)
mkV1alpha1ClusterTrustBundleList
  :: [V1alpha1ClusterTrustBundle] -- ^ 'v1alpha1ClusterTrustBundleListItems': items is a collection of ClusterTrustBundle objects
  -> V1alpha1ClusterTrustBundleList
mkV1alpha1ClusterTrustBundleList :: [V1alpha1ClusterTrustBundle] -> V1alpha1ClusterTrustBundleList
mkV1alpha1ClusterTrustBundleList [V1alpha1ClusterTrustBundle]
v1alpha1ClusterTrustBundleListItems =
  V1alpha1ClusterTrustBundleList
  { $sel:v1alpha1ClusterTrustBundleListApiVersion:V1alpha1ClusterTrustBundleList :: Maybe Text
v1alpha1ClusterTrustBundleListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1alpha1ClusterTrustBundle]
$sel:v1alpha1ClusterTrustBundleListItems:V1alpha1ClusterTrustBundleList :: [V1alpha1ClusterTrustBundle]
v1alpha1ClusterTrustBundleListItems :: [V1alpha1ClusterTrustBundle]
v1alpha1ClusterTrustBundleListItems
  , $sel:v1alpha1ClusterTrustBundleListKind:V1alpha1ClusterTrustBundleList :: Maybe Text
v1alpha1ClusterTrustBundleListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha1ClusterTrustBundleListMetadata:V1alpha1ClusterTrustBundleList :: Maybe V1ListMeta
v1alpha1ClusterTrustBundleListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1alpha1ClusterTrustBundleSpec
-- | V1alpha1ClusterTrustBundleSpec
-- ClusterTrustBundleSpec contains the signer and trust anchors.
data V1alpha1ClusterTrustBundleSpec = V1alpha1ClusterTrustBundleSpec
  { V1alpha1ClusterTrustBundleSpec -> Maybe Text
v1alpha1ClusterTrustBundleSpecSignerName :: !(Maybe Text) -- ^ "signerName" - signerName indicates the associated signer, if any.  In order to create or update a ClusterTrustBundle that sets signerName, you must have the following cluster-scoped permission: group&#x3D;certificates.k8s.io resource&#x3D;signers resourceName&#x3D;&lt;the signer name&gt; verb&#x3D;attest.  If signerName is not empty, then the ClusterTrustBundle object must be named with the signer name as a prefix (translating slashes to colons). For example, for the signer name &#x60;example.com/foo&#x60;, valid ClusterTrustBundle object names include &#x60;example.com:foo:abc&#x60; and &#x60;example.com:foo:v1&#x60;.  If signerName is empty, then the ClusterTrustBundle object&#39;s name must not have such a prefix.  List/watch requests for ClusterTrustBundles can filter on this field using a &#x60;spec.signerName&#x3D;NAME&#x60; field selector.
  , V1alpha1ClusterTrustBundleSpec -> Text
v1alpha1ClusterTrustBundleSpecTrustBundle :: !(Text) -- ^ /Required/ "trustBundle" - trustBundle contains the individual X.509 trust anchors for this bundle, as PEM bundle of PEM-wrapped, DER-formatted X.509 certificates.  The data must consist only of PEM certificate blocks that parse as valid X.509 certificates.  Each certificate must include a basic constraints extension with the CA bit set.  The API server will reject objects that contain duplicate certificates, or that use PEM block headers.  Users of ClusterTrustBundles, including Kubelet, are free to reorder and deduplicate certificate blocks in this file according to their own logic, as well as to drop PEM block headers and inter-block data.
  } deriving (Int -> V1alpha1ClusterTrustBundleSpec -> ShowS
[V1alpha1ClusterTrustBundleSpec] -> ShowS
V1alpha1ClusterTrustBundleSpec -> String
(Int -> V1alpha1ClusterTrustBundleSpec -> ShowS)
-> (V1alpha1ClusterTrustBundleSpec -> String)
-> ([V1alpha1ClusterTrustBundleSpec] -> ShowS)
-> Show V1alpha1ClusterTrustBundleSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha1ClusterTrustBundleSpec -> ShowS
showsPrec :: Int -> V1alpha1ClusterTrustBundleSpec -> ShowS
$cshow :: V1alpha1ClusterTrustBundleSpec -> String
show :: V1alpha1ClusterTrustBundleSpec -> String
$cshowList :: [V1alpha1ClusterTrustBundleSpec] -> ShowS
showList :: [V1alpha1ClusterTrustBundleSpec] -> ShowS
P.Show, V1alpha1ClusterTrustBundleSpec
-> V1alpha1ClusterTrustBundleSpec -> Bool
(V1alpha1ClusterTrustBundleSpec
 -> V1alpha1ClusterTrustBundleSpec -> Bool)
-> (V1alpha1ClusterTrustBundleSpec
    -> V1alpha1ClusterTrustBundleSpec -> Bool)
-> Eq V1alpha1ClusterTrustBundleSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha1ClusterTrustBundleSpec
-> V1alpha1ClusterTrustBundleSpec -> Bool
== :: V1alpha1ClusterTrustBundleSpec
-> V1alpha1ClusterTrustBundleSpec -> Bool
$c/= :: V1alpha1ClusterTrustBundleSpec
-> V1alpha1ClusterTrustBundleSpec -> Bool
/= :: V1alpha1ClusterTrustBundleSpec
-> V1alpha1ClusterTrustBundleSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha1ClusterTrustBundleSpec
instance A.FromJSON V1alpha1ClusterTrustBundleSpec where
  parseJSON :: Value -> Parser V1alpha1ClusterTrustBundleSpec
parseJSON = String
-> (Object -> Parser V1alpha1ClusterTrustBundleSpec)
-> Value
-> Parser V1alpha1ClusterTrustBundleSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha1ClusterTrustBundleSpec" ((Object -> Parser V1alpha1ClusterTrustBundleSpec)
 -> Value -> Parser V1alpha1ClusterTrustBundleSpec)
-> (Object -> Parser V1alpha1ClusterTrustBundleSpec)
-> Value
-> Parser V1alpha1ClusterTrustBundleSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Text -> V1alpha1ClusterTrustBundleSpec
V1alpha1ClusterTrustBundleSpec
      (Maybe Text -> Text -> V1alpha1ClusterTrustBundleSpec)
-> Parser (Maybe Text)
-> Parser (Text -> V1alpha1ClusterTrustBundleSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"signerName")
      Parser (Text -> V1alpha1ClusterTrustBundleSpec)
-> Parser Text -> Parser V1alpha1ClusterTrustBundleSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"trustBundle")

-- | ToJSON V1alpha1ClusterTrustBundleSpec
instance A.ToJSON V1alpha1ClusterTrustBundleSpec where
  toJSON :: V1alpha1ClusterTrustBundleSpec -> Value
toJSON V1alpha1ClusterTrustBundleSpec {Maybe Text
Text
$sel:v1alpha1ClusterTrustBundleSpecSignerName:V1alpha1ClusterTrustBundleSpec :: V1alpha1ClusterTrustBundleSpec -> Maybe Text
$sel:v1alpha1ClusterTrustBundleSpecTrustBundle:V1alpha1ClusterTrustBundleSpec :: V1alpha1ClusterTrustBundleSpec -> Text
v1alpha1ClusterTrustBundleSpecSignerName :: Maybe Text
v1alpha1ClusterTrustBundleSpecTrustBundle :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"signerName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1ClusterTrustBundleSpecSignerName
      , Key
"trustBundle" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha1ClusterTrustBundleSpecTrustBundle
      ]


-- | Construct a value of type 'V1alpha1ClusterTrustBundleSpec' (by applying it's required fields, if any)
mkV1alpha1ClusterTrustBundleSpec
  :: Text -- ^ 'v1alpha1ClusterTrustBundleSpecTrustBundle': trustBundle contains the individual X.509 trust anchors for this bundle, as PEM bundle of PEM-wrapped, DER-formatted X.509 certificates.  The data must consist only of PEM certificate blocks that parse as valid X.509 certificates.  Each certificate must include a basic constraints extension with the CA bit set.  The API server will reject objects that contain duplicate certificates, or that use PEM block headers.  Users of ClusterTrustBundles, including Kubelet, are free to reorder and deduplicate certificate blocks in this file according to their own logic, as well as to drop PEM block headers and inter-block data.
  -> V1alpha1ClusterTrustBundleSpec
mkV1alpha1ClusterTrustBundleSpec :: Text -> V1alpha1ClusterTrustBundleSpec
mkV1alpha1ClusterTrustBundleSpec Text
v1alpha1ClusterTrustBundleSpecTrustBundle =
  V1alpha1ClusterTrustBundleSpec
  { $sel:v1alpha1ClusterTrustBundleSpecSignerName:V1alpha1ClusterTrustBundleSpec :: Maybe Text
v1alpha1ClusterTrustBundleSpecSignerName = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1alpha1ClusterTrustBundleSpecTrustBundle:V1alpha1ClusterTrustBundleSpec :: Text
v1alpha1ClusterTrustBundleSpecTrustBundle :: Text
v1alpha1ClusterTrustBundleSpecTrustBundle
  }

-- ** V1alpha1GroupVersionResource
-- | V1alpha1GroupVersionResource
-- The names of the group, the version, and the resource.
data V1alpha1GroupVersionResource = V1alpha1GroupVersionResource
  { V1alpha1GroupVersionResource -> Maybe Text
v1alpha1GroupVersionResourceGroup :: !(Maybe Text) -- ^ "group" - The name of the group.
  , V1alpha1GroupVersionResource -> Maybe Text
v1alpha1GroupVersionResourceResource :: !(Maybe Text) -- ^ "resource" - The name of the resource.
  , V1alpha1GroupVersionResource -> Maybe Text
v1alpha1GroupVersionResourceVersion :: !(Maybe Text) -- ^ "version" - The name of the version.
  } deriving (Int -> V1alpha1GroupVersionResource -> ShowS
[V1alpha1GroupVersionResource] -> ShowS
V1alpha1GroupVersionResource -> String
(Int -> V1alpha1GroupVersionResource -> ShowS)
-> (V1alpha1GroupVersionResource -> String)
-> ([V1alpha1GroupVersionResource] -> ShowS)
-> Show V1alpha1GroupVersionResource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha1GroupVersionResource -> ShowS
showsPrec :: Int -> V1alpha1GroupVersionResource -> ShowS
$cshow :: V1alpha1GroupVersionResource -> String
show :: V1alpha1GroupVersionResource -> String
$cshowList :: [V1alpha1GroupVersionResource] -> ShowS
showList :: [V1alpha1GroupVersionResource] -> ShowS
P.Show, V1alpha1GroupVersionResource
-> V1alpha1GroupVersionResource -> Bool
(V1alpha1GroupVersionResource
 -> V1alpha1GroupVersionResource -> Bool)
-> (V1alpha1GroupVersionResource
    -> V1alpha1GroupVersionResource -> Bool)
-> Eq V1alpha1GroupVersionResource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha1GroupVersionResource
-> V1alpha1GroupVersionResource -> Bool
== :: V1alpha1GroupVersionResource
-> V1alpha1GroupVersionResource -> Bool
$c/= :: V1alpha1GroupVersionResource
-> V1alpha1GroupVersionResource -> Bool
/= :: V1alpha1GroupVersionResource
-> V1alpha1GroupVersionResource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha1GroupVersionResource
instance A.FromJSON V1alpha1GroupVersionResource where
  parseJSON :: Value -> Parser V1alpha1GroupVersionResource
parseJSON = String
-> (Object -> Parser V1alpha1GroupVersionResource)
-> Value
-> Parser V1alpha1GroupVersionResource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha1GroupVersionResource" ((Object -> Parser V1alpha1GroupVersionResource)
 -> Value -> Parser V1alpha1GroupVersionResource)
-> (Object -> Parser V1alpha1GroupVersionResource)
-> Value
-> Parser V1alpha1GroupVersionResource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text -> Maybe Text -> V1alpha1GroupVersionResource
V1alpha1GroupVersionResource
      (Maybe Text
 -> Maybe Text -> Maybe Text -> V1alpha1GroupVersionResource)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> V1alpha1GroupVersionResource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"group")
      Parser (Maybe Text -> Maybe Text -> V1alpha1GroupVersionResource)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> V1alpha1GroupVersionResource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resource")
      Parser (Maybe Text -> V1alpha1GroupVersionResource)
-> Parser (Maybe Text) -> Parser V1alpha1GroupVersionResource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"version")

-- | ToJSON V1alpha1GroupVersionResource
instance A.ToJSON V1alpha1GroupVersionResource where
  toJSON :: V1alpha1GroupVersionResource -> Value
toJSON V1alpha1GroupVersionResource {Maybe Text
$sel:v1alpha1GroupVersionResourceGroup:V1alpha1GroupVersionResource :: V1alpha1GroupVersionResource -> Maybe Text
$sel:v1alpha1GroupVersionResourceResource:V1alpha1GroupVersionResource :: V1alpha1GroupVersionResource -> Maybe Text
$sel:v1alpha1GroupVersionResourceVersion:V1alpha1GroupVersionResource :: V1alpha1GroupVersionResource -> Maybe Text
v1alpha1GroupVersionResourceGroup :: Maybe Text
v1alpha1GroupVersionResourceResource :: Maybe Text
v1alpha1GroupVersionResourceVersion :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"group" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1GroupVersionResourceGroup
      , Key
"resource" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1GroupVersionResourceResource
      , Key
"version" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1GroupVersionResourceVersion
      ]


-- | Construct a value of type 'V1alpha1GroupVersionResource' (by applying it's required fields, if any)
mkV1alpha1GroupVersionResource
  :: V1alpha1GroupVersionResource
mkV1alpha1GroupVersionResource :: V1alpha1GroupVersionResource
mkV1alpha1GroupVersionResource =
  V1alpha1GroupVersionResource
  { $sel:v1alpha1GroupVersionResourceGroup:V1alpha1GroupVersionResource :: Maybe Text
v1alpha1GroupVersionResourceGroup = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha1GroupVersionResourceResource:V1alpha1GroupVersionResource :: Maybe Text
v1alpha1GroupVersionResourceResource = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha1GroupVersionResourceVersion:V1alpha1GroupVersionResource :: Maybe Text
v1alpha1GroupVersionResourceVersion = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1alpha1JSONPatch
-- | V1alpha1JSONPatch
-- JSONPatch defines a JSON Patch.
data V1alpha1JSONPatch = V1alpha1JSONPatch
  { V1alpha1JSONPatch -> Maybe Text
v1alpha1JSONPatchExpression :: !(Maybe Text) -- ^ "expression" - expression will be evaluated by CEL to create a [JSON patch](https://jsonpatch.com/). ref: https://github.com/google/cel-spec  expression must return an array of JSONPatch values.  For example, this CEL expression returns a JSON patch to conditionally modify a value:     [      JSONPatch{op: \&quot;test\&quot;, path: \&quot;/spec/example\&quot;, value: \&quot;Red\&quot;},      JSONPatch{op: \&quot;replace\&quot;, path: \&quot;/spec/example\&quot;, value: \&quot;Green\&quot;}    ]  To define an object for the patch value, use Object types. For example:     [      JSONPatch{        op: \&quot;add\&quot;,        path: \&quot;/spec/selector\&quot;,        value: Object.spec.selector{matchLabels: {\&quot;environment\&quot;: \&quot;test\&quot;}}      }    ]  To use strings containing &#39;/&#39; and &#39;~&#39; as JSONPatch path keys, use \&quot;jsonpatch.escapeKey\&quot;. For example:     [      JSONPatch{        op: \&quot;add\&quot;,        path: \&quot;/metadata/labels/\&quot; + jsonpatch.escapeKey(\&quot;example.com/environment\&quot;),        value: \&quot;test\&quot;      },    ]  CEL expressions have access to the types needed to create JSON patches and objects:  - &#39;JSONPatch&#39; - CEL type of JSON Patch operations. JSONPatch has the fields &#39;op&#39;, &#39;from&#39;, &#39;path&#39; and &#39;value&#39;.   See [JSON patch](https://jsonpatch.com/) for more details. The &#39;value&#39; field may be set to any of: string,   integer, array, map or object.  If set, the &#39;path&#39; and &#39;from&#39; fields must be set to a   [JSON pointer](https://datatracker.ietf.org/doc/html/rfc6901/) string, where the &#39;jsonpatch.escapeKey()&#39; CEL   function may be used to escape path keys containing &#39;/&#39; and &#39;~&#39;. - &#39;Object&#39; - CEL type of the resource object. - &#39;Object.&lt;fieldName&gt;&#39; - CEL type of object field (such as &#39;Object.spec&#39;) - &#39;Object.&lt;fieldName1&gt;.&lt;fieldName2&gt;...&lt;fieldNameN&gt;&#x60; - CEL type of nested field (such as &#39;Object.spec.containers&#39;)  CEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables:  - &#39;object&#39; - The object from the incoming request. The value is null for DELETE requests. - &#39;oldObject&#39; - The existing object. The value is null for CREATE requests. - &#39;request&#39; - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - &#39;params&#39; - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - &#39;namespaceObject&#39; - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - &#39;variables&#39; - Map of composited variables, from its name to its lazily evaluated value.   For example, a variable named &#39;foo&#39; can be accessed as &#39;variables.foo&#39;. - &#39;authorizer&#39; - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.   See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz - &#39;authorizer.requestResource&#39; - A CEL ResourceCheck constructed from the &#39;authorizer&#39; and configured with the   request resource.  CEL expressions have access to [Kubernetes CEL function libraries](https://kubernetes.io/docs/reference/using-api/cel/#cel-options-language-features-and-libraries) as well as:  - &#39;jsonpatch.escapeKey&#39; - Performs JSONPatch key escaping. &#39;~&#39; and  &#39;/&#39; are escaped as &#39;~0&#39; and &#x60;~1&#39; respectively).  Only property names of the form &#x60;[a-zA-Z_.-/][a-zA-Z0-9_.-/]*&#x60; are accessible. Required.
  } deriving (Int -> V1alpha1JSONPatch -> ShowS
[V1alpha1JSONPatch] -> ShowS
V1alpha1JSONPatch -> String
(Int -> V1alpha1JSONPatch -> ShowS)
-> (V1alpha1JSONPatch -> String)
-> ([V1alpha1JSONPatch] -> ShowS)
-> Show V1alpha1JSONPatch
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha1JSONPatch -> ShowS
showsPrec :: Int -> V1alpha1JSONPatch -> ShowS
$cshow :: V1alpha1JSONPatch -> String
show :: V1alpha1JSONPatch -> String
$cshowList :: [V1alpha1JSONPatch] -> ShowS
showList :: [V1alpha1JSONPatch] -> ShowS
P.Show, V1alpha1JSONPatch -> V1alpha1JSONPatch -> Bool
(V1alpha1JSONPatch -> V1alpha1JSONPatch -> Bool)
-> (V1alpha1JSONPatch -> V1alpha1JSONPatch -> Bool)
-> Eq V1alpha1JSONPatch
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha1JSONPatch -> V1alpha1JSONPatch -> Bool
== :: V1alpha1JSONPatch -> V1alpha1JSONPatch -> Bool
$c/= :: V1alpha1JSONPatch -> V1alpha1JSONPatch -> Bool
/= :: V1alpha1JSONPatch -> V1alpha1JSONPatch -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha1JSONPatch
instance A.FromJSON V1alpha1JSONPatch where
  parseJSON :: Value -> Parser V1alpha1JSONPatch
parseJSON = String
-> (Object -> Parser V1alpha1JSONPatch)
-> Value
-> Parser V1alpha1JSONPatch
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha1JSONPatch" ((Object -> Parser V1alpha1JSONPatch)
 -> Value -> Parser V1alpha1JSONPatch)
-> (Object -> Parser V1alpha1JSONPatch)
-> Value
-> Parser V1alpha1JSONPatch
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> V1alpha1JSONPatch
V1alpha1JSONPatch
      (Maybe Text -> V1alpha1JSONPatch)
-> Parser (Maybe Text) -> Parser V1alpha1JSONPatch
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"expression")

-- | ToJSON V1alpha1JSONPatch
instance A.ToJSON V1alpha1JSONPatch where
  toJSON :: V1alpha1JSONPatch -> Value
toJSON V1alpha1JSONPatch {Maybe Text
$sel:v1alpha1JSONPatchExpression:V1alpha1JSONPatch :: V1alpha1JSONPatch -> Maybe Text
v1alpha1JSONPatchExpression :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"expression" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1JSONPatchExpression
      ]


-- | Construct a value of type 'V1alpha1JSONPatch' (by applying it's required fields, if any)
mkV1alpha1JSONPatch
  :: V1alpha1JSONPatch
mkV1alpha1JSONPatch :: V1alpha1JSONPatch
mkV1alpha1JSONPatch =
  V1alpha1JSONPatch
  { $sel:v1alpha1JSONPatchExpression:V1alpha1JSONPatch :: Maybe Text
v1alpha1JSONPatchExpression = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1alpha1MatchCondition
-- | V1alpha1MatchCondition
data V1alpha1MatchCondition = V1alpha1MatchCondition
  { V1alpha1MatchCondition -> Text
v1alpha1MatchConditionExpression :: !(Text) -- ^ /Required/ "expression" - Expression represents the expression which will be evaluated by CEL. Must evaluate to bool. CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:  &#39;object&#39; - The object from the incoming request. The value is null for DELETE requests. &#39;oldObject&#39; - The existing object. The value is null for CREATE requests. &#39;request&#39; - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest). &#39;authorizer&#39; - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.   See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz &#39;authorizer.requestResource&#39; - A CEL ResourceCheck constructed from the &#39;authorizer&#39; and configured with the   request resource. Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/  Required.
  , V1alpha1MatchCondition -> Text
v1alpha1MatchConditionName :: !(Text) -- ^ /Required/ "name" - Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, &#39;-&#39;, &#39;_&#39; or &#39;.&#39;, and must start and end with an alphanumeric character (e.g. &#39;MyName&#39;,  or &#39;my.name&#39;,  or &#39;123-abc&#39;, regex used for validation is &#39;([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]&#39;) with an optional DNS subdomain prefix and &#39;/&#39; (e.g. &#39;example.com/MyName&#39;)  Required.
  } deriving (Int -> V1alpha1MatchCondition -> ShowS
[V1alpha1MatchCondition] -> ShowS
V1alpha1MatchCondition -> String
(Int -> V1alpha1MatchCondition -> ShowS)
-> (V1alpha1MatchCondition -> String)
-> ([V1alpha1MatchCondition] -> ShowS)
-> Show V1alpha1MatchCondition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha1MatchCondition -> ShowS
showsPrec :: Int -> V1alpha1MatchCondition -> ShowS
$cshow :: V1alpha1MatchCondition -> String
show :: V1alpha1MatchCondition -> String
$cshowList :: [V1alpha1MatchCondition] -> ShowS
showList :: [V1alpha1MatchCondition] -> ShowS
P.Show, V1alpha1MatchCondition -> V1alpha1MatchCondition -> Bool
(V1alpha1MatchCondition -> V1alpha1MatchCondition -> Bool)
-> (V1alpha1MatchCondition -> V1alpha1MatchCondition -> Bool)
-> Eq V1alpha1MatchCondition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha1MatchCondition -> V1alpha1MatchCondition -> Bool
== :: V1alpha1MatchCondition -> V1alpha1MatchCondition -> Bool
$c/= :: V1alpha1MatchCondition -> V1alpha1MatchCondition -> Bool
/= :: V1alpha1MatchCondition -> V1alpha1MatchCondition -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha1MatchCondition
instance A.FromJSON V1alpha1MatchCondition where
  parseJSON :: Value -> Parser V1alpha1MatchCondition
parseJSON = String
-> (Object -> Parser V1alpha1MatchCondition)
-> Value
-> Parser V1alpha1MatchCondition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha1MatchCondition" ((Object -> Parser V1alpha1MatchCondition)
 -> Value -> Parser V1alpha1MatchCondition)
-> (Object -> Parser V1alpha1MatchCondition)
-> Value
-> Parser V1alpha1MatchCondition
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Text -> V1alpha1MatchCondition
V1alpha1MatchCondition
      (Text -> Text -> V1alpha1MatchCondition)
-> Parser Text -> Parser (Text -> V1alpha1MatchCondition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"expression")
      Parser (Text -> V1alpha1MatchCondition)
-> Parser Text -> Parser V1alpha1MatchCondition
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")

-- | ToJSON V1alpha1MatchCondition
instance A.ToJSON V1alpha1MatchCondition where
  toJSON :: V1alpha1MatchCondition -> Value
toJSON V1alpha1MatchCondition {Text
$sel:v1alpha1MatchConditionExpression:V1alpha1MatchCondition :: V1alpha1MatchCondition -> Text
$sel:v1alpha1MatchConditionName:V1alpha1MatchCondition :: V1alpha1MatchCondition -> Text
v1alpha1MatchConditionExpression :: Text
v1alpha1MatchConditionName :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"expression" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha1MatchConditionExpression
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha1MatchConditionName
      ]


-- | Construct a value of type 'V1alpha1MatchCondition' (by applying it's required fields, if any)
mkV1alpha1MatchCondition
  :: Text -- ^ 'v1alpha1MatchConditionExpression': Expression represents the expression which will be evaluated by CEL. Must evaluate to bool. CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:  'object' - The object from the incoming request. The value is null for DELETE requests. 'oldObject' - The existing object. The value is null for CREATE requests. 'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest). 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.   See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the   request resource. Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/  Required.
  -> Text -- ^ 'v1alpha1MatchConditionName': Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName',  or 'my.name',  or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')  Required.
  -> V1alpha1MatchCondition
mkV1alpha1MatchCondition :: Text -> Text -> V1alpha1MatchCondition
mkV1alpha1MatchCondition Text
v1alpha1MatchConditionExpression Text
v1alpha1MatchConditionName =
  V1alpha1MatchCondition
  { Text
$sel:v1alpha1MatchConditionExpression:V1alpha1MatchCondition :: Text
v1alpha1MatchConditionExpression :: Text
v1alpha1MatchConditionExpression
  , Text
$sel:v1alpha1MatchConditionName:V1alpha1MatchCondition :: Text
v1alpha1MatchConditionName :: Text
v1alpha1MatchConditionName
  }

-- ** V1alpha1MatchResources
-- | V1alpha1MatchResources
-- MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
data V1alpha1MatchResources = V1alpha1MatchResources
  { V1alpha1MatchResources -> Maybe [V1alpha1NamedRuleWithOperations]
v1alpha1MatchResourcesExcludeResourceRules :: !(Maybe [V1alpha1NamedRuleWithOperations]) -- ^ "excludeResourceRules" - ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
  , V1alpha1MatchResources -> Maybe Text
v1alpha1MatchResourcesMatchPolicy :: !(Maybe Text) -- ^ "matchPolicy" - matchPolicy defines how the \&quot;MatchResources\&quot; list is used to match incoming requests. Allowed values are \&quot;Exact\&quot; or \&quot;Equivalent\&quot;.  - Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \&quot;rules\&quot; only included &#x60;apiGroups:[\&quot;apps\&quot;], apiVersions:[\&quot;v1\&quot;], resources: [\&quot;deployments\&quot;]&#x60;, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy.  - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \&quot;rules\&quot; only included &#x60;apiGroups:[\&quot;apps\&quot;], apiVersions:[\&quot;v1\&quot;], resources: [\&quot;deployments\&quot;]&#x60;, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy.  Defaults to \&quot;Equivalent\&quot;
  , V1alpha1MatchResources -> Maybe V1LabelSelector
v1alpha1MatchResourcesNamespaceSelector :: !(Maybe V1LabelSelector) -- ^ "namespaceSelector"
  , V1alpha1MatchResources -> Maybe V1LabelSelector
v1alpha1MatchResourcesObjectSelector :: !(Maybe V1LabelSelector) -- ^ "objectSelector"
  , V1alpha1MatchResources -> Maybe [V1alpha1NamedRuleWithOperations]
v1alpha1MatchResourcesResourceRules :: !(Maybe [V1alpha1NamedRuleWithOperations]) -- ^ "resourceRules" - ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. The policy cares about an operation if it matches _any_ Rule.
  } deriving (Int -> V1alpha1MatchResources -> ShowS
[V1alpha1MatchResources] -> ShowS
V1alpha1MatchResources -> String
(Int -> V1alpha1MatchResources -> ShowS)
-> (V1alpha1MatchResources -> String)
-> ([V1alpha1MatchResources] -> ShowS)
-> Show V1alpha1MatchResources
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha1MatchResources -> ShowS
showsPrec :: Int -> V1alpha1MatchResources -> ShowS
$cshow :: V1alpha1MatchResources -> String
show :: V1alpha1MatchResources -> String
$cshowList :: [V1alpha1MatchResources] -> ShowS
showList :: [V1alpha1MatchResources] -> ShowS
P.Show, V1alpha1MatchResources -> V1alpha1MatchResources -> Bool
(V1alpha1MatchResources -> V1alpha1MatchResources -> Bool)
-> (V1alpha1MatchResources -> V1alpha1MatchResources -> Bool)
-> Eq V1alpha1MatchResources
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha1MatchResources -> V1alpha1MatchResources -> Bool
== :: V1alpha1MatchResources -> V1alpha1MatchResources -> Bool
$c/= :: V1alpha1MatchResources -> V1alpha1MatchResources -> Bool
/= :: V1alpha1MatchResources -> V1alpha1MatchResources -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha1MatchResources
instance A.FromJSON V1alpha1MatchResources where
  parseJSON :: Value -> Parser V1alpha1MatchResources
parseJSON = String
-> (Object -> Parser V1alpha1MatchResources)
-> Value
-> Parser V1alpha1MatchResources
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha1MatchResources" ((Object -> Parser V1alpha1MatchResources)
 -> Value -> Parser V1alpha1MatchResources)
-> (Object -> Parser V1alpha1MatchResources)
-> Value
-> Parser V1alpha1MatchResources
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1alpha1NamedRuleWithOperations]
-> Maybe Text
-> Maybe V1LabelSelector
-> Maybe V1LabelSelector
-> Maybe [V1alpha1NamedRuleWithOperations]
-> V1alpha1MatchResources
V1alpha1MatchResources
      (Maybe [V1alpha1NamedRuleWithOperations]
 -> Maybe Text
 -> Maybe V1LabelSelector
 -> Maybe V1LabelSelector
 -> Maybe [V1alpha1NamedRuleWithOperations]
 -> V1alpha1MatchResources)
-> Parser (Maybe [V1alpha1NamedRuleWithOperations])
-> Parser
     (Maybe Text
      -> Maybe V1LabelSelector
      -> Maybe V1LabelSelector
      -> Maybe [V1alpha1NamedRuleWithOperations]
      -> V1alpha1MatchResources)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1alpha1NamedRuleWithOperations])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"excludeResourceRules")
      Parser
  (Maybe Text
   -> Maybe V1LabelSelector
   -> Maybe V1LabelSelector
   -> Maybe [V1alpha1NamedRuleWithOperations]
   -> V1alpha1MatchResources)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1LabelSelector
      -> Maybe V1LabelSelector
      -> Maybe [V1alpha1NamedRuleWithOperations]
      -> V1alpha1MatchResources)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"matchPolicy")
      Parser
  (Maybe V1LabelSelector
   -> Maybe V1LabelSelector
   -> Maybe [V1alpha1NamedRuleWithOperations]
   -> V1alpha1MatchResources)
-> Parser (Maybe V1LabelSelector)
-> Parser
     (Maybe V1LabelSelector
      -> Maybe [V1alpha1NamedRuleWithOperations]
      -> V1alpha1MatchResources)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LabelSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"namespaceSelector")
      Parser
  (Maybe V1LabelSelector
   -> Maybe [V1alpha1NamedRuleWithOperations]
   -> V1alpha1MatchResources)
-> Parser (Maybe V1LabelSelector)
-> Parser
     (Maybe [V1alpha1NamedRuleWithOperations] -> V1alpha1MatchResources)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LabelSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"objectSelector")
      Parser
  (Maybe [V1alpha1NamedRuleWithOperations] -> V1alpha1MatchResources)
-> Parser (Maybe [V1alpha1NamedRuleWithOperations])
-> Parser V1alpha1MatchResources
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1alpha1NamedRuleWithOperations])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resourceRules")

-- | ToJSON V1alpha1MatchResources
instance A.ToJSON V1alpha1MatchResources where
  toJSON :: V1alpha1MatchResources -> Value
toJSON V1alpha1MatchResources {Maybe [V1alpha1NamedRuleWithOperations]
Maybe Text
Maybe V1LabelSelector
$sel:v1alpha1MatchResourcesExcludeResourceRules:V1alpha1MatchResources :: V1alpha1MatchResources -> Maybe [V1alpha1NamedRuleWithOperations]
$sel:v1alpha1MatchResourcesMatchPolicy:V1alpha1MatchResources :: V1alpha1MatchResources -> Maybe Text
$sel:v1alpha1MatchResourcesNamespaceSelector:V1alpha1MatchResources :: V1alpha1MatchResources -> Maybe V1LabelSelector
$sel:v1alpha1MatchResourcesObjectSelector:V1alpha1MatchResources :: V1alpha1MatchResources -> Maybe V1LabelSelector
$sel:v1alpha1MatchResourcesResourceRules:V1alpha1MatchResources :: V1alpha1MatchResources -> Maybe [V1alpha1NamedRuleWithOperations]
v1alpha1MatchResourcesExcludeResourceRules :: Maybe [V1alpha1NamedRuleWithOperations]
v1alpha1MatchResourcesMatchPolicy :: Maybe Text
v1alpha1MatchResourcesNamespaceSelector :: Maybe V1LabelSelector
v1alpha1MatchResourcesObjectSelector :: Maybe V1LabelSelector
v1alpha1MatchResourcesResourceRules :: Maybe [V1alpha1NamedRuleWithOperations]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"excludeResourceRules" Key -> Maybe [V1alpha1NamedRuleWithOperations] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1alpha1NamedRuleWithOperations]
v1alpha1MatchResourcesExcludeResourceRules
      , Key
"matchPolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1MatchResourcesMatchPolicy
      , Key
"namespaceSelector" Key -> Maybe V1LabelSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LabelSelector
v1alpha1MatchResourcesNamespaceSelector
      , Key
"objectSelector" Key -> Maybe V1LabelSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LabelSelector
v1alpha1MatchResourcesObjectSelector
      , Key
"resourceRules" Key -> Maybe [V1alpha1NamedRuleWithOperations] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1alpha1NamedRuleWithOperations]
v1alpha1MatchResourcesResourceRules
      ]


-- | Construct a value of type 'V1alpha1MatchResources' (by applying it's required fields, if any)
mkV1alpha1MatchResources
  :: V1alpha1MatchResources
mkV1alpha1MatchResources :: V1alpha1MatchResources
mkV1alpha1MatchResources =
  V1alpha1MatchResources
  { $sel:v1alpha1MatchResourcesExcludeResourceRules:V1alpha1MatchResources :: Maybe [V1alpha1NamedRuleWithOperations]
v1alpha1MatchResourcesExcludeResourceRules = Maybe [V1alpha1NamedRuleWithOperations]
forall a. Maybe a
Nothing
  , $sel:v1alpha1MatchResourcesMatchPolicy:V1alpha1MatchResources :: Maybe Text
v1alpha1MatchResourcesMatchPolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha1MatchResourcesNamespaceSelector:V1alpha1MatchResources :: Maybe V1LabelSelector
v1alpha1MatchResourcesNamespaceSelector = Maybe V1LabelSelector
forall a. Maybe a
Nothing
  , $sel:v1alpha1MatchResourcesObjectSelector:V1alpha1MatchResources :: Maybe V1LabelSelector
v1alpha1MatchResourcesObjectSelector = Maybe V1LabelSelector
forall a. Maybe a
Nothing
  , $sel:v1alpha1MatchResourcesResourceRules:V1alpha1MatchResources :: Maybe [V1alpha1NamedRuleWithOperations]
v1alpha1MatchResourcesResourceRules = Maybe [V1alpha1NamedRuleWithOperations]
forall a. Maybe a
Nothing
  }

-- ** V1alpha1MigrationCondition
-- | V1alpha1MigrationCondition
-- Describes the state of a migration at a certain point.
data V1alpha1MigrationCondition = V1alpha1MigrationCondition
  { V1alpha1MigrationCondition -> Maybe DateTime
v1alpha1MigrationConditionLastUpdateTime :: !(Maybe DateTime) -- ^ "lastUpdateTime" - The last time this condition was updated.
  , V1alpha1MigrationCondition -> Maybe Text
v1alpha1MigrationConditionMessage :: !(Maybe Text) -- ^ "message" - A human readable message indicating details about the transition.
  , V1alpha1MigrationCondition -> Maybe Text
v1alpha1MigrationConditionReason :: !(Maybe Text) -- ^ "reason" - The reason for the condition&#39;s last transition.
  , V1alpha1MigrationCondition -> Text
v1alpha1MigrationConditionStatus :: !(Text) -- ^ /Required/ "status" - Status of the condition, one of True, False, Unknown.
  , V1alpha1MigrationCondition -> Text
v1alpha1MigrationConditionType :: !(Text) -- ^ /Required/ "type" - Type of the condition.
  } deriving (Int -> V1alpha1MigrationCondition -> ShowS
[V1alpha1MigrationCondition] -> ShowS
V1alpha1MigrationCondition -> String
(Int -> V1alpha1MigrationCondition -> ShowS)
-> (V1alpha1MigrationCondition -> String)
-> ([V1alpha1MigrationCondition] -> ShowS)
-> Show V1alpha1MigrationCondition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha1MigrationCondition -> ShowS
showsPrec :: Int -> V1alpha1MigrationCondition -> ShowS
$cshow :: V1alpha1MigrationCondition -> String
show :: V1alpha1MigrationCondition -> String
$cshowList :: [V1alpha1MigrationCondition] -> ShowS
showList :: [V1alpha1MigrationCondition] -> ShowS
P.Show, V1alpha1MigrationCondition -> V1alpha1MigrationCondition -> Bool
(V1alpha1MigrationCondition -> V1alpha1MigrationCondition -> Bool)
-> (V1alpha1MigrationCondition
    -> V1alpha1MigrationCondition -> Bool)
-> Eq V1alpha1MigrationCondition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha1MigrationCondition -> V1alpha1MigrationCondition -> Bool
== :: V1alpha1MigrationCondition -> V1alpha1MigrationCondition -> Bool
$c/= :: V1alpha1MigrationCondition -> V1alpha1MigrationCondition -> Bool
/= :: V1alpha1MigrationCondition -> V1alpha1MigrationCondition -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha1MigrationCondition
instance A.FromJSON V1alpha1MigrationCondition where
  parseJSON :: Value -> Parser V1alpha1MigrationCondition
parseJSON = String
-> (Object -> Parser V1alpha1MigrationCondition)
-> Value
-> Parser V1alpha1MigrationCondition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha1MigrationCondition" ((Object -> Parser V1alpha1MigrationCondition)
 -> Value -> Parser V1alpha1MigrationCondition)
-> (Object -> Parser V1alpha1MigrationCondition)
-> Value
-> Parser V1alpha1MigrationCondition
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe DateTime
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> V1alpha1MigrationCondition
V1alpha1MigrationCondition
      (Maybe DateTime
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> Text
 -> V1alpha1MigrationCondition)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe Text
      -> Maybe Text -> Text -> Text -> V1alpha1MigrationCondition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lastUpdateTime")
      Parser
  (Maybe Text
   -> Maybe Text -> Text -> Text -> V1alpha1MigrationCondition)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Text -> Text -> V1alpha1MigrationCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"message")
      Parser (Maybe Text -> Text -> Text -> V1alpha1MigrationCondition)
-> Parser (Maybe Text)
-> Parser (Text -> Text -> V1alpha1MigrationCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reason")
      Parser (Text -> Text -> V1alpha1MigrationCondition)
-> Parser Text -> Parser (Text -> V1alpha1MigrationCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"status")
      Parser (Text -> V1alpha1MigrationCondition)
-> Parser Text -> Parser V1alpha1MigrationCondition
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"type")

-- | ToJSON V1alpha1MigrationCondition
instance A.ToJSON V1alpha1MigrationCondition where
  toJSON :: V1alpha1MigrationCondition -> Value
toJSON V1alpha1MigrationCondition {Maybe Text
Maybe DateTime
Text
$sel:v1alpha1MigrationConditionLastUpdateTime:V1alpha1MigrationCondition :: V1alpha1MigrationCondition -> Maybe DateTime
$sel:v1alpha1MigrationConditionMessage:V1alpha1MigrationCondition :: V1alpha1MigrationCondition -> Maybe Text
$sel:v1alpha1MigrationConditionReason:V1alpha1MigrationCondition :: V1alpha1MigrationCondition -> Maybe Text
$sel:v1alpha1MigrationConditionStatus:V1alpha1MigrationCondition :: V1alpha1MigrationCondition -> Text
$sel:v1alpha1MigrationConditionType:V1alpha1MigrationCondition :: V1alpha1MigrationCondition -> Text
v1alpha1MigrationConditionLastUpdateTime :: Maybe DateTime
v1alpha1MigrationConditionMessage :: Maybe Text
v1alpha1MigrationConditionReason :: Maybe Text
v1alpha1MigrationConditionStatus :: Text
v1alpha1MigrationConditionType :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"lastUpdateTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1alpha1MigrationConditionLastUpdateTime
      , Key
"message" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1MigrationConditionMessage
      , Key
"reason" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1MigrationConditionReason
      , Key
"status" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha1MigrationConditionStatus
      , Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha1MigrationConditionType
      ]


-- | Construct a value of type 'V1alpha1MigrationCondition' (by applying it's required fields, if any)
mkV1alpha1MigrationCondition
  :: Text -- ^ 'v1alpha1MigrationConditionStatus': Status of the condition, one of True, False, Unknown.
  -> Text -- ^ 'v1alpha1MigrationConditionType': Type of the condition.
  -> V1alpha1MigrationCondition
mkV1alpha1MigrationCondition :: Text -> Text -> V1alpha1MigrationCondition
mkV1alpha1MigrationCondition Text
v1alpha1MigrationConditionStatus Text
v1alpha1MigrationConditionType =
  V1alpha1MigrationCondition
  { $sel:v1alpha1MigrationConditionLastUpdateTime:V1alpha1MigrationCondition :: Maybe DateTime
v1alpha1MigrationConditionLastUpdateTime = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1alpha1MigrationConditionMessage:V1alpha1MigrationCondition :: Maybe Text
v1alpha1MigrationConditionMessage = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha1MigrationConditionReason:V1alpha1MigrationCondition :: Maybe Text
v1alpha1MigrationConditionReason = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1alpha1MigrationConditionStatus:V1alpha1MigrationCondition :: Text
v1alpha1MigrationConditionStatus :: Text
v1alpha1MigrationConditionStatus
  , Text
$sel:v1alpha1MigrationConditionType:V1alpha1MigrationCondition :: Text
v1alpha1MigrationConditionType :: Text
v1alpha1MigrationConditionType
  }

-- ** V1alpha1MutatingAdmissionPolicy
-- | V1alpha1MutatingAdmissionPolicy
-- MutatingAdmissionPolicy describes the definition of an admission mutation policy that mutates the object coming into admission chain.
data V1alpha1MutatingAdmissionPolicy = V1alpha1MutatingAdmissionPolicy
  { V1alpha1MutatingAdmissionPolicy -> Maybe Text
v1alpha1MutatingAdmissionPolicyApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1alpha1MutatingAdmissionPolicy -> Maybe Text
v1alpha1MutatingAdmissionPolicyKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1alpha1MutatingAdmissionPolicy -> Maybe V1ObjectMeta
v1alpha1MutatingAdmissionPolicyMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1alpha1MutatingAdmissionPolicy
-> Maybe V1alpha1MutatingAdmissionPolicySpec
v1alpha1MutatingAdmissionPolicySpec :: !(Maybe V1alpha1MutatingAdmissionPolicySpec) -- ^ "spec"
  } deriving (Int -> V1alpha1MutatingAdmissionPolicy -> ShowS
[V1alpha1MutatingAdmissionPolicy] -> ShowS
V1alpha1MutatingAdmissionPolicy -> String
(Int -> V1alpha1MutatingAdmissionPolicy -> ShowS)
-> (V1alpha1MutatingAdmissionPolicy -> String)
-> ([V1alpha1MutatingAdmissionPolicy] -> ShowS)
-> Show V1alpha1MutatingAdmissionPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha1MutatingAdmissionPolicy -> ShowS
showsPrec :: Int -> V1alpha1MutatingAdmissionPolicy -> ShowS
$cshow :: V1alpha1MutatingAdmissionPolicy -> String
show :: V1alpha1MutatingAdmissionPolicy -> String
$cshowList :: [V1alpha1MutatingAdmissionPolicy] -> ShowS
showList :: [V1alpha1MutatingAdmissionPolicy] -> ShowS
P.Show, V1alpha1MutatingAdmissionPolicy
-> V1alpha1MutatingAdmissionPolicy -> Bool
(V1alpha1MutatingAdmissionPolicy
 -> V1alpha1MutatingAdmissionPolicy -> Bool)
-> (V1alpha1MutatingAdmissionPolicy
    -> V1alpha1MutatingAdmissionPolicy -> Bool)
-> Eq V1alpha1MutatingAdmissionPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha1MutatingAdmissionPolicy
-> V1alpha1MutatingAdmissionPolicy -> Bool
== :: V1alpha1MutatingAdmissionPolicy
-> V1alpha1MutatingAdmissionPolicy -> Bool
$c/= :: V1alpha1MutatingAdmissionPolicy
-> V1alpha1MutatingAdmissionPolicy -> Bool
/= :: V1alpha1MutatingAdmissionPolicy
-> V1alpha1MutatingAdmissionPolicy -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha1MutatingAdmissionPolicy
instance A.FromJSON V1alpha1MutatingAdmissionPolicy where
  parseJSON :: Value -> Parser V1alpha1MutatingAdmissionPolicy
parseJSON = String
-> (Object -> Parser V1alpha1MutatingAdmissionPolicy)
-> Value
-> Parser V1alpha1MutatingAdmissionPolicy
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha1MutatingAdmissionPolicy" ((Object -> Parser V1alpha1MutatingAdmissionPolicy)
 -> Value -> Parser V1alpha1MutatingAdmissionPolicy)
-> (Object -> Parser V1alpha1MutatingAdmissionPolicy)
-> Value
-> Parser V1alpha1MutatingAdmissionPolicy
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1alpha1MutatingAdmissionPolicySpec
-> V1alpha1MutatingAdmissionPolicy
V1alpha1MutatingAdmissionPolicy
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1alpha1MutatingAdmissionPolicySpec
 -> V1alpha1MutatingAdmissionPolicy)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1alpha1MutatingAdmissionPolicySpec
      -> V1alpha1MutatingAdmissionPolicy)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1alpha1MutatingAdmissionPolicySpec
   -> V1alpha1MutatingAdmissionPolicy)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1alpha1MutatingAdmissionPolicySpec
      -> V1alpha1MutatingAdmissionPolicy)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1alpha1MutatingAdmissionPolicySpec
   -> V1alpha1MutatingAdmissionPolicy)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe V1alpha1MutatingAdmissionPolicySpec
      -> V1alpha1MutatingAdmissionPolicy)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (Maybe V1alpha1MutatingAdmissionPolicySpec
   -> V1alpha1MutatingAdmissionPolicy)
-> Parser (Maybe V1alpha1MutatingAdmissionPolicySpec)
-> Parser V1alpha1MutatingAdmissionPolicy
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1alpha1MutatingAdmissionPolicySpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")

-- | ToJSON V1alpha1MutatingAdmissionPolicy
instance A.ToJSON V1alpha1MutatingAdmissionPolicy where
  toJSON :: V1alpha1MutatingAdmissionPolicy -> Value
toJSON V1alpha1MutatingAdmissionPolicy {Maybe Text
Maybe V1alpha1MutatingAdmissionPolicySpec
Maybe V1ObjectMeta
$sel:v1alpha1MutatingAdmissionPolicyApiVersion:V1alpha1MutatingAdmissionPolicy :: V1alpha1MutatingAdmissionPolicy -> Maybe Text
$sel:v1alpha1MutatingAdmissionPolicyKind:V1alpha1MutatingAdmissionPolicy :: V1alpha1MutatingAdmissionPolicy -> Maybe Text
$sel:v1alpha1MutatingAdmissionPolicyMetadata:V1alpha1MutatingAdmissionPolicy :: V1alpha1MutatingAdmissionPolicy -> Maybe V1ObjectMeta
$sel:v1alpha1MutatingAdmissionPolicySpec:V1alpha1MutatingAdmissionPolicy :: V1alpha1MutatingAdmissionPolicy
-> Maybe V1alpha1MutatingAdmissionPolicySpec
v1alpha1MutatingAdmissionPolicyApiVersion :: Maybe Text
v1alpha1MutatingAdmissionPolicyKind :: Maybe Text
v1alpha1MutatingAdmissionPolicyMetadata :: Maybe V1ObjectMeta
v1alpha1MutatingAdmissionPolicySpec :: Maybe V1alpha1MutatingAdmissionPolicySpec
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1MutatingAdmissionPolicyApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1MutatingAdmissionPolicyKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1alpha1MutatingAdmissionPolicyMetadata
      , Key
"spec" Key -> Maybe V1alpha1MutatingAdmissionPolicySpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1alpha1MutatingAdmissionPolicySpec
v1alpha1MutatingAdmissionPolicySpec
      ]


-- | Construct a value of type 'V1alpha1MutatingAdmissionPolicy' (by applying it's required fields, if any)
mkV1alpha1MutatingAdmissionPolicy
  :: V1alpha1MutatingAdmissionPolicy
mkV1alpha1MutatingAdmissionPolicy :: V1alpha1MutatingAdmissionPolicy
mkV1alpha1MutatingAdmissionPolicy =
  V1alpha1MutatingAdmissionPolicy
  { $sel:v1alpha1MutatingAdmissionPolicyApiVersion:V1alpha1MutatingAdmissionPolicy :: Maybe Text
v1alpha1MutatingAdmissionPolicyApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha1MutatingAdmissionPolicyKind:V1alpha1MutatingAdmissionPolicy :: Maybe Text
v1alpha1MutatingAdmissionPolicyKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha1MutatingAdmissionPolicyMetadata:V1alpha1MutatingAdmissionPolicy :: Maybe V1ObjectMeta
v1alpha1MutatingAdmissionPolicyMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1alpha1MutatingAdmissionPolicySpec:V1alpha1MutatingAdmissionPolicy :: Maybe V1alpha1MutatingAdmissionPolicySpec
v1alpha1MutatingAdmissionPolicySpec = Maybe V1alpha1MutatingAdmissionPolicySpec
forall a. Maybe a
Nothing
  }

-- ** V1alpha1MutatingAdmissionPolicyBinding
-- | V1alpha1MutatingAdmissionPolicyBinding
-- MutatingAdmissionPolicyBinding binds the MutatingAdmissionPolicy with parametrized resources. MutatingAdmissionPolicyBinding and the optional parameter resource together define how cluster administrators configure policies for clusters.  For a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don't use params, otherwise N is the number of parameters selected by the binding. Each evaluation is constrained by a [runtime cost budget](https://kubernetes.io/docs/reference/using-api/cel/#runtime-cost-budget).  Adding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget.
data V1alpha1MutatingAdmissionPolicyBinding = V1alpha1MutatingAdmissionPolicyBinding
  { V1alpha1MutatingAdmissionPolicyBinding -> Maybe Text
v1alpha1MutatingAdmissionPolicyBindingApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1alpha1MutatingAdmissionPolicyBinding -> Maybe Text
v1alpha1MutatingAdmissionPolicyBindingKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1alpha1MutatingAdmissionPolicyBinding -> Maybe V1ObjectMeta
v1alpha1MutatingAdmissionPolicyBindingMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1alpha1MutatingAdmissionPolicyBinding
-> Maybe V1alpha1MutatingAdmissionPolicyBindingSpec
v1alpha1MutatingAdmissionPolicyBindingSpec :: !(Maybe V1alpha1MutatingAdmissionPolicyBindingSpec) -- ^ "spec"
  } deriving (Int -> V1alpha1MutatingAdmissionPolicyBinding -> ShowS
[V1alpha1MutatingAdmissionPolicyBinding] -> ShowS
V1alpha1MutatingAdmissionPolicyBinding -> String
(Int -> V1alpha1MutatingAdmissionPolicyBinding -> ShowS)
-> (V1alpha1MutatingAdmissionPolicyBinding -> String)
-> ([V1alpha1MutatingAdmissionPolicyBinding] -> ShowS)
-> Show V1alpha1MutatingAdmissionPolicyBinding
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha1MutatingAdmissionPolicyBinding -> ShowS
showsPrec :: Int -> V1alpha1MutatingAdmissionPolicyBinding -> ShowS
$cshow :: V1alpha1MutatingAdmissionPolicyBinding -> String
show :: V1alpha1MutatingAdmissionPolicyBinding -> String
$cshowList :: [V1alpha1MutatingAdmissionPolicyBinding] -> ShowS
showList :: [V1alpha1MutatingAdmissionPolicyBinding] -> ShowS
P.Show, V1alpha1MutatingAdmissionPolicyBinding
-> V1alpha1MutatingAdmissionPolicyBinding -> Bool
(V1alpha1MutatingAdmissionPolicyBinding
 -> V1alpha1MutatingAdmissionPolicyBinding -> Bool)
-> (V1alpha1MutatingAdmissionPolicyBinding
    -> V1alpha1MutatingAdmissionPolicyBinding -> Bool)
-> Eq V1alpha1MutatingAdmissionPolicyBinding
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha1MutatingAdmissionPolicyBinding
-> V1alpha1MutatingAdmissionPolicyBinding -> Bool
== :: V1alpha1MutatingAdmissionPolicyBinding
-> V1alpha1MutatingAdmissionPolicyBinding -> Bool
$c/= :: V1alpha1MutatingAdmissionPolicyBinding
-> V1alpha1MutatingAdmissionPolicyBinding -> Bool
/= :: V1alpha1MutatingAdmissionPolicyBinding
-> V1alpha1MutatingAdmissionPolicyBinding -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha1MutatingAdmissionPolicyBinding
instance A.FromJSON V1alpha1MutatingAdmissionPolicyBinding where
  parseJSON :: Value -> Parser V1alpha1MutatingAdmissionPolicyBinding
parseJSON = String
-> (Object -> Parser V1alpha1MutatingAdmissionPolicyBinding)
-> Value
-> Parser V1alpha1MutatingAdmissionPolicyBinding
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha1MutatingAdmissionPolicyBinding" ((Object -> Parser V1alpha1MutatingAdmissionPolicyBinding)
 -> Value -> Parser V1alpha1MutatingAdmissionPolicyBinding)
-> (Object -> Parser V1alpha1MutatingAdmissionPolicyBinding)
-> Value
-> Parser V1alpha1MutatingAdmissionPolicyBinding
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1alpha1MutatingAdmissionPolicyBindingSpec
-> V1alpha1MutatingAdmissionPolicyBinding
V1alpha1MutatingAdmissionPolicyBinding
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1alpha1MutatingAdmissionPolicyBindingSpec
 -> V1alpha1MutatingAdmissionPolicyBinding)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1alpha1MutatingAdmissionPolicyBindingSpec
      -> V1alpha1MutatingAdmissionPolicyBinding)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1alpha1MutatingAdmissionPolicyBindingSpec
   -> V1alpha1MutatingAdmissionPolicyBinding)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1alpha1MutatingAdmissionPolicyBindingSpec
      -> V1alpha1MutatingAdmissionPolicyBinding)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1alpha1MutatingAdmissionPolicyBindingSpec
   -> V1alpha1MutatingAdmissionPolicyBinding)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe V1alpha1MutatingAdmissionPolicyBindingSpec
      -> V1alpha1MutatingAdmissionPolicyBinding)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (Maybe V1alpha1MutatingAdmissionPolicyBindingSpec
   -> V1alpha1MutatingAdmissionPolicyBinding)
-> Parser (Maybe V1alpha1MutatingAdmissionPolicyBindingSpec)
-> Parser V1alpha1MutatingAdmissionPolicyBinding
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object
-> Key -> Parser (Maybe V1alpha1MutatingAdmissionPolicyBindingSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")

-- | ToJSON V1alpha1MutatingAdmissionPolicyBinding
instance A.ToJSON V1alpha1MutatingAdmissionPolicyBinding where
  toJSON :: V1alpha1MutatingAdmissionPolicyBinding -> Value
toJSON V1alpha1MutatingAdmissionPolicyBinding {Maybe Text
Maybe V1alpha1MutatingAdmissionPolicyBindingSpec
Maybe V1ObjectMeta
$sel:v1alpha1MutatingAdmissionPolicyBindingApiVersion:V1alpha1MutatingAdmissionPolicyBinding :: V1alpha1MutatingAdmissionPolicyBinding -> Maybe Text
$sel:v1alpha1MutatingAdmissionPolicyBindingKind:V1alpha1MutatingAdmissionPolicyBinding :: V1alpha1MutatingAdmissionPolicyBinding -> Maybe Text
$sel:v1alpha1MutatingAdmissionPolicyBindingMetadata:V1alpha1MutatingAdmissionPolicyBinding :: V1alpha1MutatingAdmissionPolicyBinding -> Maybe V1ObjectMeta
$sel:v1alpha1MutatingAdmissionPolicyBindingSpec:V1alpha1MutatingAdmissionPolicyBinding :: V1alpha1MutatingAdmissionPolicyBinding
-> Maybe V1alpha1MutatingAdmissionPolicyBindingSpec
v1alpha1MutatingAdmissionPolicyBindingApiVersion :: Maybe Text
v1alpha1MutatingAdmissionPolicyBindingKind :: Maybe Text
v1alpha1MutatingAdmissionPolicyBindingMetadata :: Maybe V1ObjectMeta
v1alpha1MutatingAdmissionPolicyBindingSpec :: Maybe V1alpha1MutatingAdmissionPolicyBindingSpec
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1MutatingAdmissionPolicyBindingApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1MutatingAdmissionPolicyBindingKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1alpha1MutatingAdmissionPolicyBindingMetadata
      , Key
"spec" Key
-> Maybe V1alpha1MutatingAdmissionPolicyBindingSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1alpha1MutatingAdmissionPolicyBindingSpec
v1alpha1MutatingAdmissionPolicyBindingSpec
      ]


-- | Construct a value of type 'V1alpha1MutatingAdmissionPolicyBinding' (by applying it's required fields, if any)
mkV1alpha1MutatingAdmissionPolicyBinding
  :: V1alpha1MutatingAdmissionPolicyBinding
mkV1alpha1MutatingAdmissionPolicyBinding :: V1alpha1MutatingAdmissionPolicyBinding
mkV1alpha1MutatingAdmissionPolicyBinding =
  V1alpha1MutatingAdmissionPolicyBinding
  { $sel:v1alpha1MutatingAdmissionPolicyBindingApiVersion:V1alpha1MutatingAdmissionPolicyBinding :: Maybe Text
v1alpha1MutatingAdmissionPolicyBindingApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha1MutatingAdmissionPolicyBindingKind:V1alpha1MutatingAdmissionPolicyBinding :: Maybe Text
v1alpha1MutatingAdmissionPolicyBindingKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha1MutatingAdmissionPolicyBindingMetadata:V1alpha1MutatingAdmissionPolicyBinding :: Maybe V1ObjectMeta
v1alpha1MutatingAdmissionPolicyBindingMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1alpha1MutatingAdmissionPolicyBindingSpec:V1alpha1MutatingAdmissionPolicyBinding :: Maybe V1alpha1MutatingAdmissionPolicyBindingSpec
v1alpha1MutatingAdmissionPolicyBindingSpec = Maybe V1alpha1MutatingAdmissionPolicyBindingSpec
forall a. Maybe a
Nothing
  }

-- ** V1alpha1MutatingAdmissionPolicyBindingList
-- | V1alpha1MutatingAdmissionPolicyBindingList
-- MutatingAdmissionPolicyBindingList is a list of MutatingAdmissionPolicyBinding.
data V1alpha1MutatingAdmissionPolicyBindingList = V1alpha1MutatingAdmissionPolicyBindingList
  { V1alpha1MutatingAdmissionPolicyBindingList -> Maybe Text
v1alpha1MutatingAdmissionPolicyBindingListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1alpha1MutatingAdmissionPolicyBindingList
-> [V1alpha1MutatingAdmissionPolicyBinding]
v1alpha1MutatingAdmissionPolicyBindingListItems :: !([V1alpha1MutatingAdmissionPolicyBinding]) -- ^ /Required/ "items" - List of PolicyBinding.
  , V1alpha1MutatingAdmissionPolicyBindingList -> Maybe Text
v1alpha1MutatingAdmissionPolicyBindingListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1alpha1MutatingAdmissionPolicyBindingList -> Maybe V1ListMeta
v1alpha1MutatingAdmissionPolicyBindingListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1alpha1MutatingAdmissionPolicyBindingList -> ShowS
[V1alpha1MutatingAdmissionPolicyBindingList] -> ShowS
V1alpha1MutatingAdmissionPolicyBindingList -> String
(Int -> V1alpha1MutatingAdmissionPolicyBindingList -> ShowS)
-> (V1alpha1MutatingAdmissionPolicyBindingList -> String)
-> ([V1alpha1MutatingAdmissionPolicyBindingList] -> ShowS)
-> Show V1alpha1MutatingAdmissionPolicyBindingList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha1MutatingAdmissionPolicyBindingList -> ShowS
showsPrec :: Int -> V1alpha1MutatingAdmissionPolicyBindingList -> ShowS
$cshow :: V1alpha1MutatingAdmissionPolicyBindingList -> String
show :: V1alpha1MutatingAdmissionPolicyBindingList -> String
$cshowList :: [V1alpha1MutatingAdmissionPolicyBindingList] -> ShowS
showList :: [V1alpha1MutatingAdmissionPolicyBindingList] -> ShowS
P.Show, V1alpha1MutatingAdmissionPolicyBindingList
-> V1alpha1MutatingAdmissionPolicyBindingList -> Bool
(V1alpha1MutatingAdmissionPolicyBindingList
 -> V1alpha1MutatingAdmissionPolicyBindingList -> Bool)
-> (V1alpha1MutatingAdmissionPolicyBindingList
    -> V1alpha1MutatingAdmissionPolicyBindingList -> Bool)
-> Eq V1alpha1MutatingAdmissionPolicyBindingList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha1MutatingAdmissionPolicyBindingList
-> V1alpha1MutatingAdmissionPolicyBindingList -> Bool
== :: V1alpha1MutatingAdmissionPolicyBindingList
-> V1alpha1MutatingAdmissionPolicyBindingList -> Bool
$c/= :: V1alpha1MutatingAdmissionPolicyBindingList
-> V1alpha1MutatingAdmissionPolicyBindingList -> Bool
/= :: V1alpha1MutatingAdmissionPolicyBindingList
-> V1alpha1MutatingAdmissionPolicyBindingList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha1MutatingAdmissionPolicyBindingList
instance A.FromJSON V1alpha1MutatingAdmissionPolicyBindingList where
  parseJSON :: Value -> Parser V1alpha1MutatingAdmissionPolicyBindingList
parseJSON = String
-> (Object -> Parser V1alpha1MutatingAdmissionPolicyBindingList)
-> Value
-> Parser V1alpha1MutatingAdmissionPolicyBindingList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha1MutatingAdmissionPolicyBindingList" ((Object -> Parser V1alpha1MutatingAdmissionPolicyBindingList)
 -> Value -> Parser V1alpha1MutatingAdmissionPolicyBindingList)
-> (Object -> Parser V1alpha1MutatingAdmissionPolicyBindingList)
-> Value
-> Parser V1alpha1MutatingAdmissionPolicyBindingList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1alpha1MutatingAdmissionPolicyBinding]
-> Maybe Text
-> Maybe V1ListMeta
-> V1alpha1MutatingAdmissionPolicyBindingList
V1alpha1MutatingAdmissionPolicyBindingList
      (Maybe Text
 -> [V1alpha1MutatingAdmissionPolicyBinding]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1alpha1MutatingAdmissionPolicyBindingList)
-> Parser (Maybe Text)
-> Parser
     ([V1alpha1MutatingAdmissionPolicyBinding]
      -> Maybe Text
      -> Maybe V1ListMeta
      -> V1alpha1MutatingAdmissionPolicyBindingList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1alpha1MutatingAdmissionPolicyBinding]
   -> Maybe Text
   -> Maybe V1ListMeta
   -> V1alpha1MutatingAdmissionPolicyBindingList)
-> Parser [V1alpha1MutatingAdmissionPolicyBinding]
-> Parser
     (Maybe Text
      -> Maybe V1ListMeta -> V1alpha1MutatingAdmissionPolicyBindingList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1alpha1MutatingAdmissionPolicyBinding]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser
  (Maybe Text
   -> Maybe V1ListMeta -> V1alpha1MutatingAdmissionPolicyBindingList)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ListMeta -> V1alpha1MutatingAdmissionPolicyBindingList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ListMeta -> V1alpha1MutatingAdmissionPolicyBindingList)
-> Parser (Maybe V1ListMeta)
-> Parser V1alpha1MutatingAdmissionPolicyBindingList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1alpha1MutatingAdmissionPolicyBindingList
instance A.ToJSON V1alpha1MutatingAdmissionPolicyBindingList where
  toJSON :: V1alpha1MutatingAdmissionPolicyBindingList -> Value
toJSON V1alpha1MutatingAdmissionPolicyBindingList {[V1alpha1MutatingAdmissionPolicyBinding]
Maybe Text
Maybe V1ListMeta
$sel:v1alpha1MutatingAdmissionPolicyBindingListApiVersion:V1alpha1MutatingAdmissionPolicyBindingList :: V1alpha1MutatingAdmissionPolicyBindingList -> Maybe Text
$sel:v1alpha1MutatingAdmissionPolicyBindingListItems:V1alpha1MutatingAdmissionPolicyBindingList :: V1alpha1MutatingAdmissionPolicyBindingList
-> [V1alpha1MutatingAdmissionPolicyBinding]
$sel:v1alpha1MutatingAdmissionPolicyBindingListKind:V1alpha1MutatingAdmissionPolicyBindingList :: V1alpha1MutatingAdmissionPolicyBindingList -> Maybe Text
$sel:v1alpha1MutatingAdmissionPolicyBindingListMetadata:V1alpha1MutatingAdmissionPolicyBindingList :: V1alpha1MutatingAdmissionPolicyBindingList -> Maybe V1ListMeta
v1alpha1MutatingAdmissionPolicyBindingListApiVersion :: Maybe Text
v1alpha1MutatingAdmissionPolicyBindingListItems :: [V1alpha1MutatingAdmissionPolicyBinding]
v1alpha1MutatingAdmissionPolicyBindingListKind :: Maybe Text
v1alpha1MutatingAdmissionPolicyBindingListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1MutatingAdmissionPolicyBindingListApiVersion
      , Key
"items" Key -> [V1alpha1MutatingAdmissionPolicyBinding] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1alpha1MutatingAdmissionPolicyBinding]
v1alpha1MutatingAdmissionPolicyBindingListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1MutatingAdmissionPolicyBindingListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1alpha1MutatingAdmissionPolicyBindingListMetadata
      ]


-- | Construct a value of type 'V1alpha1MutatingAdmissionPolicyBindingList' (by applying it's required fields, if any)
mkV1alpha1MutatingAdmissionPolicyBindingList
  :: [V1alpha1MutatingAdmissionPolicyBinding] -- ^ 'v1alpha1MutatingAdmissionPolicyBindingListItems': List of PolicyBinding.
  -> V1alpha1MutatingAdmissionPolicyBindingList
mkV1alpha1MutatingAdmissionPolicyBindingList :: [V1alpha1MutatingAdmissionPolicyBinding]
-> V1alpha1MutatingAdmissionPolicyBindingList
mkV1alpha1MutatingAdmissionPolicyBindingList [V1alpha1MutatingAdmissionPolicyBinding]
v1alpha1MutatingAdmissionPolicyBindingListItems =
  V1alpha1MutatingAdmissionPolicyBindingList
  { $sel:v1alpha1MutatingAdmissionPolicyBindingListApiVersion:V1alpha1MutatingAdmissionPolicyBindingList :: Maybe Text
v1alpha1MutatingAdmissionPolicyBindingListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1alpha1MutatingAdmissionPolicyBinding]
$sel:v1alpha1MutatingAdmissionPolicyBindingListItems:V1alpha1MutatingAdmissionPolicyBindingList :: [V1alpha1MutatingAdmissionPolicyBinding]
v1alpha1MutatingAdmissionPolicyBindingListItems :: [V1alpha1MutatingAdmissionPolicyBinding]
v1alpha1MutatingAdmissionPolicyBindingListItems
  , $sel:v1alpha1MutatingAdmissionPolicyBindingListKind:V1alpha1MutatingAdmissionPolicyBindingList :: Maybe Text
v1alpha1MutatingAdmissionPolicyBindingListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha1MutatingAdmissionPolicyBindingListMetadata:V1alpha1MutatingAdmissionPolicyBindingList :: Maybe V1ListMeta
v1alpha1MutatingAdmissionPolicyBindingListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1alpha1MutatingAdmissionPolicyBindingSpec
-- | V1alpha1MutatingAdmissionPolicyBindingSpec
-- MutatingAdmissionPolicyBindingSpec is the specification of the MutatingAdmissionPolicyBinding.
data V1alpha1MutatingAdmissionPolicyBindingSpec = V1alpha1MutatingAdmissionPolicyBindingSpec
  { V1alpha1MutatingAdmissionPolicyBindingSpec
-> Maybe V1alpha1MatchResources
v1alpha1MutatingAdmissionPolicyBindingSpecMatchResources :: !(Maybe V1alpha1MatchResources) -- ^ "matchResources"
  , V1alpha1MutatingAdmissionPolicyBindingSpec
-> Maybe V1alpha1ParamRef
v1alpha1MutatingAdmissionPolicyBindingSpecParamRef :: !(Maybe V1alpha1ParamRef) -- ^ "paramRef"
  , V1alpha1MutatingAdmissionPolicyBindingSpec -> Maybe Text
v1alpha1MutatingAdmissionPolicyBindingSpecPolicyName :: !(Maybe Text) -- ^ "policyName" - policyName references a MutatingAdmissionPolicy name which the MutatingAdmissionPolicyBinding binds to. If the referenced resource does not exist, this binding is considered invalid and will be ignored Required.
  } deriving (Int -> V1alpha1MutatingAdmissionPolicyBindingSpec -> ShowS
[V1alpha1MutatingAdmissionPolicyBindingSpec] -> ShowS
V1alpha1MutatingAdmissionPolicyBindingSpec -> String
(Int -> V1alpha1MutatingAdmissionPolicyBindingSpec -> ShowS)
-> (V1alpha1MutatingAdmissionPolicyBindingSpec -> String)
-> ([V1alpha1MutatingAdmissionPolicyBindingSpec] -> ShowS)
-> Show V1alpha1MutatingAdmissionPolicyBindingSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha1MutatingAdmissionPolicyBindingSpec -> ShowS
showsPrec :: Int -> V1alpha1MutatingAdmissionPolicyBindingSpec -> ShowS
$cshow :: V1alpha1MutatingAdmissionPolicyBindingSpec -> String
show :: V1alpha1MutatingAdmissionPolicyBindingSpec -> String
$cshowList :: [V1alpha1MutatingAdmissionPolicyBindingSpec] -> ShowS
showList :: [V1alpha1MutatingAdmissionPolicyBindingSpec] -> ShowS
P.Show, V1alpha1MutatingAdmissionPolicyBindingSpec
-> V1alpha1MutatingAdmissionPolicyBindingSpec -> Bool
(V1alpha1MutatingAdmissionPolicyBindingSpec
 -> V1alpha1MutatingAdmissionPolicyBindingSpec -> Bool)
-> (V1alpha1MutatingAdmissionPolicyBindingSpec
    -> V1alpha1MutatingAdmissionPolicyBindingSpec -> Bool)
-> Eq V1alpha1MutatingAdmissionPolicyBindingSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha1MutatingAdmissionPolicyBindingSpec
-> V1alpha1MutatingAdmissionPolicyBindingSpec -> Bool
== :: V1alpha1MutatingAdmissionPolicyBindingSpec
-> V1alpha1MutatingAdmissionPolicyBindingSpec -> Bool
$c/= :: V1alpha1MutatingAdmissionPolicyBindingSpec
-> V1alpha1MutatingAdmissionPolicyBindingSpec -> Bool
/= :: V1alpha1MutatingAdmissionPolicyBindingSpec
-> V1alpha1MutatingAdmissionPolicyBindingSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha1MutatingAdmissionPolicyBindingSpec
instance A.FromJSON V1alpha1MutatingAdmissionPolicyBindingSpec where
  parseJSON :: Value -> Parser V1alpha1MutatingAdmissionPolicyBindingSpec
parseJSON = String
-> (Object -> Parser V1alpha1MutatingAdmissionPolicyBindingSpec)
-> Value
-> Parser V1alpha1MutatingAdmissionPolicyBindingSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha1MutatingAdmissionPolicyBindingSpec" ((Object -> Parser V1alpha1MutatingAdmissionPolicyBindingSpec)
 -> Value -> Parser V1alpha1MutatingAdmissionPolicyBindingSpec)
-> (Object -> Parser V1alpha1MutatingAdmissionPolicyBindingSpec)
-> Value
-> Parser V1alpha1MutatingAdmissionPolicyBindingSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1alpha1MatchResources
-> Maybe V1alpha1ParamRef
-> Maybe Text
-> V1alpha1MutatingAdmissionPolicyBindingSpec
V1alpha1MutatingAdmissionPolicyBindingSpec
      (Maybe V1alpha1MatchResources
 -> Maybe V1alpha1ParamRef
 -> Maybe Text
 -> V1alpha1MutatingAdmissionPolicyBindingSpec)
-> Parser (Maybe V1alpha1MatchResources)
-> Parser
     (Maybe V1alpha1ParamRef
      -> Maybe Text -> V1alpha1MutatingAdmissionPolicyBindingSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1alpha1MatchResources)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"matchResources")
      Parser
  (Maybe V1alpha1ParamRef
   -> Maybe Text -> V1alpha1MutatingAdmissionPolicyBindingSpec)
-> Parser (Maybe V1alpha1ParamRef)
-> Parser
     (Maybe Text -> V1alpha1MutatingAdmissionPolicyBindingSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1alpha1ParamRef)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"paramRef")
      Parser (Maybe Text -> V1alpha1MutatingAdmissionPolicyBindingSpec)
-> Parser (Maybe Text)
-> Parser V1alpha1MutatingAdmissionPolicyBindingSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"policyName")

-- | ToJSON V1alpha1MutatingAdmissionPolicyBindingSpec
instance A.ToJSON V1alpha1MutatingAdmissionPolicyBindingSpec where
  toJSON :: V1alpha1MutatingAdmissionPolicyBindingSpec -> Value
toJSON V1alpha1MutatingAdmissionPolicyBindingSpec {Maybe Text
Maybe V1alpha1ParamRef
Maybe V1alpha1MatchResources
$sel:v1alpha1MutatingAdmissionPolicyBindingSpecMatchResources:V1alpha1MutatingAdmissionPolicyBindingSpec :: V1alpha1MutatingAdmissionPolicyBindingSpec
-> Maybe V1alpha1MatchResources
$sel:v1alpha1MutatingAdmissionPolicyBindingSpecParamRef:V1alpha1MutatingAdmissionPolicyBindingSpec :: V1alpha1MutatingAdmissionPolicyBindingSpec
-> Maybe V1alpha1ParamRef
$sel:v1alpha1MutatingAdmissionPolicyBindingSpecPolicyName:V1alpha1MutatingAdmissionPolicyBindingSpec :: V1alpha1MutatingAdmissionPolicyBindingSpec -> Maybe Text
v1alpha1MutatingAdmissionPolicyBindingSpecMatchResources :: Maybe V1alpha1MatchResources
v1alpha1MutatingAdmissionPolicyBindingSpecParamRef :: Maybe V1alpha1ParamRef
v1alpha1MutatingAdmissionPolicyBindingSpecPolicyName :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"matchResources" Key -> Maybe V1alpha1MatchResources -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1alpha1MatchResources
v1alpha1MutatingAdmissionPolicyBindingSpecMatchResources
      , Key
"paramRef" Key -> Maybe V1alpha1ParamRef -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1alpha1ParamRef
v1alpha1MutatingAdmissionPolicyBindingSpecParamRef
      , Key
"policyName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1MutatingAdmissionPolicyBindingSpecPolicyName
      ]


-- | Construct a value of type 'V1alpha1MutatingAdmissionPolicyBindingSpec' (by applying it's required fields, if any)
mkV1alpha1MutatingAdmissionPolicyBindingSpec
  :: V1alpha1MutatingAdmissionPolicyBindingSpec
mkV1alpha1MutatingAdmissionPolicyBindingSpec :: V1alpha1MutatingAdmissionPolicyBindingSpec
mkV1alpha1MutatingAdmissionPolicyBindingSpec =
  V1alpha1MutatingAdmissionPolicyBindingSpec
  { $sel:v1alpha1MutatingAdmissionPolicyBindingSpecMatchResources:V1alpha1MutatingAdmissionPolicyBindingSpec :: Maybe V1alpha1MatchResources
v1alpha1MutatingAdmissionPolicyBindingSpecMatchResources = Maybe V1alpha1MatchResources
forall a. Maybe a
Nothing
  , $sel:v1alpha1MutatingAdmissionPolicyBindingSpecParamRef:V1alpha1MutatingAdmissionPolicyBindingSpec :: Maybe V1alpha1ParamRef
v1alpha1MutatingAdmissionPolicyBindingSpecParamRef = Maybe V1alpha1ParamRef
forall a. Maybe a
Nothing
  , $sel:v1alpha1MutatingAdmissionPolicyBindingSpecPolicyName:V1alpha1MutatingAdmissionPolicyBindingSpec :: Maybe Text
v1alpha1MutatingAdmissionPolicyBindingSpecPolicyName = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1alpha1MutatingAdmissionPolicyList
-- | V1alpha1MutatingAdmissionPolicyList
-- MutatingAdmissionPolicyList is a list of MutatingAdmissionPolicy.
data V1alpha1MutatingAdmissionPolicyList = V1alpha1MutatingAdmissionPolicyList
  { V1alpha1MutatingAdmissionPolicyList -> Maybe Text
v1alpha1MutatingAdmissionPolicyListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1alpha1MutatingAdmissionPolicyList
-> [V1alpha1MutatingAdmissionPolicy]
v1alpha1MutatingAdmissionPolicyListItems :: !([V1alpha1MutatingAdmissionPolicy]) -- ^ /Required/ "items" - List of ValidatingAdmissionPolicy.
  , V1alpha1MutatingAdmissionPolicyList -> Maybe Text
v1alpha1MutatingAdmissionPolicyListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1alpha1MutatingAdmissionPolicyList -> Maybe V1ListMeta
v1alpha1MutatingAdmissionPolicyListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1alpha1MutatingAdmissionPolicyList -> ShowS
[V1alpha1MutatingAdmissionPolicyList] -> ShowS
V1alpha1MutatingAdmissionPolicyList -> String
(Int -> V1alpha1MutatingAdmissionPolicyList -> ShowS)
-> (V1alpha1MutatingAdmissionPolicyList -> String)
-> ([V1alpha1MutatingAdmissionPolicyList] -> ShowS)
-> Show V1alpha1MutatingAdmissionPolicyList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha1MutatingAdmissionPolicyList -> ShowS
showsPrec :: Int -> V1alpha1MutatingAdmissionPolicyList -> ShowS
$cshow :: V1alpha1MutatingAdmissionPolicyList -> String
show :: V1alpha1MutatingAdmissionPolicyList -> String
$cshowList :: [V1alpha1MutatingAdmissionPolicyList] -> ShowS
showList :: [V1alpha1MutatingAdmissionPolicyList] -> ShowS
P.Show, V1alpha1MutatingAdmissionPolicyList
-> V1alpha1MutatingAdmissionPolicyList -> Bool
(V1alpha1MutatingAdmissionPolicyList
 -> V1alpha1MutatingAdmissionPolicyList -> Bool)
-> (V1alpha1MutatingAdmissionPolicyList
    -> V1alpha1MutatingAdmissionPolicyList -> Bool)
-> Eq V1alpha1MutatingAdmissionPolicyList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha1MutatingAdmissionPolicyList
-> V1alpha1MutatingAdmissionPolicyList -> Bool
== :: V1alpha1MutatingAdmissionPolicyList
-> V1alpha1MutatingAdmissionPolicyList -> Bool
$c/= :: V1alpha1MutatingAdmissionPolicyList
-> V1alpha1MutatingAdmissionPolicyList -> Bool
/= :: V1alpha1MutatingAdmissionPolicyList
-> V1alpha1MutatingAdmissionPolicyList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha1MutatingAdmissionPolicyList
instance A.FromJSON V1alpha1MutatingAdmissionPolicyList where
  parseJSON :: Value -> Parser V1alpha1MutatingAdmissionPolicyList
parseJSON = String
-> (Object -> Parser V1alpha1MutatingAdmissionPolicyList)
-> Value
-> Parser V1alpha1MutatingAdmissionPolicyList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha1MutatingAdmissionPolicyList" ((Object -> Parser V1alpha1MutatingAdmissionPolicyList)
 -> Value -> Parser V1alpha1MutatingAdmissionPolicyList)
-> (Object -> Parser V1alpha1MutatingAdmissionPolicyList)
-> Value
-> Parser V1alpha1MutatingAdmissionPolicyList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1alpha1MutatingAdmissionPolicy]
-> Maybe Text
-> Maybe V1ListMeta
-> V1alpha1MutatingAdmissionPolicyList
V1alpha1MutatingAdmissionPolicyList
      (Maybe Text
 -> [V1alpha1MutatingAdmissionPolicy]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1alpha1MutatingAdmissionPolicyList)
-> Parser (Maybe Text)
-> Parser
     ([V1alpha1MutatingAdmissionPolicy]
      -> Maybe Text
      -> Maybe V1ListMeta
      -> V1alpha1MutatingAdmissionPolicyList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1alpha1MutatingAdmissionPolicy]
   -> Maybe Text
   -> Maybe V1ListMeta
   -> V1alpha1MutatingAdmissionPolicyList)
-> Parser [V1alpha1MutatingAdmissionPolicy]
-> Parser
     (Maybe Text
      -> Maybe V1ListMeta -> V1alpha1MutatingAdmissionPolicyList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1alpha1MutatingAdmissionPolicy]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser
  (Maybe Text
   -> Maybe V1ListMeta -> V1alpha1MutatingAdmissionPolicyList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1alpha1MutatingAdmissionPolicyList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1alpha1MutatingAdmissionPolicyList)
-> Parser (Maybe V1ListMeta)
-> Parser V1alpha1MutatingAdmissionPolicyList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1alpha1MutatingAdmissionPolicyList
instance A.ToJSON V1alpha1MutatingAdmissionPolicyList where
  toJSON :: V1alpha1MutatingAdmissionPolicyList -> Value
toJSON V1alpha1MutatingAdmissionPolicyList {[V1alpha1MutatingAdmissionPolicy]
Maybe Text
Maybe V1ListMeta
$sel:v1alpha1MutatingAdmissionPolicyListApiVersion:V1alpha1MutatingAdmissionPolicyList :: V1alpha1MutatingAdmissionPolicyList -> Maybe Text
$sel:v1alpha1MutatingAdmissionPolicyListItems:V1alpha1MutatingAdmissionPolicyList :: V1alpha1MutatingAdmissionPolicyList
-> [V1alpha1MutatingAdmissionPolicy]
$sel:v1alpha1MutatingAdmissionPolicyListKind:V1alpha1MutatingAdmissionPolicyList :: V1alpha1MutatingAdmissionPolicyList -> Maybe Text
$sel:v1alpha1MutatingAdmissionPolicyListMetadata:V1alpha1MutatingAdmissionPolicyList :: V1alpha1MutatingAdmissionPolicyList -> Maybe V1ListMeta
v1alpha1MutatingAdmissionPolicyListApiVersion :: Maybe Text
v1alpha1MutatingAdmissionPolicyListItems :: [V1alpha1MutatingAdmissionPolicy]
v1alpha1MutatingAdmissionPolicyListKind :: Maybe Text
v1alpha1MutatingAdmissionPolicyListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1MutatingAdmissionPolicyListApiVersion
      , Key
"items" Key -> [V1alpha1MutatingAdmissionPolicy] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1alpha1MutatingAdmissionPolicy]
v1alpha1MutatingAdmissionPolicyListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1MutatingAdmissionPolicyListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1alpha1MutatingAdmissionPolicyListMetadata
      ]


-- | Construct a value of type 'V1alpha1MutatingAdmissionPolicyList' (by applying it's required fields, if any)
mkV1alpha1MutatingAdmissionPolicyList
  :: [V1alpha1MutatingAdmissionPolicy] -- ^ 'v1alpha1MutatingAdmissionPolicyListItems': List of ValidatingAdmissionPolicy.
  -> V1alpha1MutatingAdmissionPolicyList
mkV1alpha1MutatingAdmissionPolicyList :: [V1alpha1MutatingAdmissionPolicy]
-> V1alpha1MutatingAdmissionPolicyList
mkV1alpha1MutatingAdmissionPolicyList [V1alpha1MutatingAdmissionPolicy]
v1alpha1MutatingAdmissionPolicyListItems =
  V1alpha1MutatingAdmissionPolicyList
  { $sel:v1alpha1MutatingAdmissionPolicyListApiVersion:V1alpha1MutatingAdmissionPolicyList :: Maybe Text
v1alpha1MutatingAdmissionPolicyListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1alpha1MutatingAdmissionPolicy]
$sel:v1alpha1MutatingAdmissionPolicyListItems:V1alpha1MutatingAdmissionPolicyList :: [V1alpha1MutatingAdmissionPolicy]
v1alpha1MutatingAdmissionPolicyListItems :: [V1alpha1MutatingAdmissionPolicy]
v1alpha1MutatingAdmissionPolicyListItems
  , $sel:v1alpha1MutatingAdmissionPolicyListKind:V1alpha1MutatingAdmissionPolicyList :: Maybe Text
v1alpha1MutatingAdmissionPolicyListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha1MutatingAdmissionPolicyListMetadata:V1alpha1MutatingAdmissionPolicyList :: Maybe V1ListMeta
v1alpha1MutatingAdmissionPolicyListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1alpha1MutatingAdmissionPolicySpec
-- | V1alpha1MutatingAdmissionPolicySpec
-- MutatingAdmissionPolicySpec is the specification of the desired behavior of the admission policy.
data V1alpha1MutatingAdmissionPolicySpec = V1alpha1MutatingAdmissionPolicySpec
  { V1alpha1MutatingAdmissionPolicySpec -> Maybe Text
v1alpha1MutatingAdmissionPolicySpecFailurePolicy :: !(Maybe Text) -- ^ "failurePolicy" - failurePolicy defines how to handle failures for the admission policy. Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings.  A policy is invalid if paramKind refers to a non-existent Kind. A binding is invalid if paramRef.name refers to a non-existent resource.  failurePolicy does not define how validations that evaluate to false are handled.  Allowed values are Ignore or Fail. Defaults to Fail.
  , V1alpha1MutatingAdmissionPolicySpec
-> Maybe [V1alpha1MatchCondition]
v1alpha1MutatingAdmissionPolicySpecMatchConditions :: !(Maybe [V1alpha1MatchCondition]) -- ^ "matchConditions" - matchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the matchConstraints. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.  If a parameter object is provided, it can be accessed via the &#x60;params&#x60; handle in the same manner as validation expressions.  The exact matching logic is (in order):   1. If ANY matchCondition evaluates to FALSE, the policy is skipped.   2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.   3. If any matchCondition evaluates to an error (but none are FALSE):      - If failurePolicy&#x3D;Fail, reject the request      - If failurePolicy&#x3D;Ignore, the policy is skipped
  , V1alpha1MutatingAdmissionPolicySpec -> Maybe V1alpha1MatchResources
v1alpha1MutatingAdmissionPolicySpecMatchConstraints :: !(Maybe V1alpha1MatchResources) -- ^ "matchConstraints"
  , V1alpha1MutatingAdmissionPolicySpec -> Maybe [V1alpha1Mutation]
v1alpha1MutatingAdmissionPolicySpecMutations :: !(Maybe [V1alpha1Mutation]) -- ^ "mutations" - mutations contain operations to perform on matching objects. mutations may not be empty; a minimum of one mutation is required. mutations are evaluated in order, and are reinvoked according to the reinvocationPolicy. The mutations of a policy are invoked for each binding of this policy and reinvocation of mutations occurs on a per binding basis.
  , V1alpha1MutatingAdmissionPolicySpec -> Maybe V1alpha1ParamKind
v1alpha1MutatingAdmissionPolicySpecParamKind :: !(Maybe V1alpha1ParamKind) -- ^ "paramKind"
  , V1alpha1MutatingAdmissionPolicySpec -> Maybe Text
v1alpha1MutatingAdmissionPolicySpecReinvocationPolicy :: !(Maybe Text) -- ^ "reinvocationPolicy" - reinvocationPolicy indicates whether mutations may be called multiple times per MutatingAdmissionPolicyBinding as part of a single admission evaluation. Allowed values are \&quot;Never\&quot; and \&quot;IfNeeded\&quot;.  Never: These mutations will not be called more than once per binding in a single admission evaluation.  IfNeeded: These mutations may be invoked more than once per binding for a single admission request and there is no guarantee of order with respect to other admission plugins, admission webhooks, bindings of this policy and admission policies.  Mutations are only reinvoked when mutations change the object after this mutation is invoked. Required.
  , V1alpha1MutatingAdmissionPolicySpec -> Maybe [V1alpha1Variable]
v1alpha1MutatingAdmissionPolicySpecVariables :: !(Maybe [V1alpha1Variable]) -- ^ "variables" - variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under &#x60;variables&#x60; in other expressions of the policy except matchConditions because matchConditions are evaluated before the rest of the policy.  The expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, variables must be sorted by the order of first appearance and acyclic.
  } deriving (Int -> V1alpha1MutatingAdmissionPolicySpec -> ShowS
[V1alpha1MutatingAdmissionPolicySpec] -> ShowS
V1alpha1MutatingAdmissionPolicySpec -> String
(Int -> V1alpha1MutatingAdmissionPolicySpec -> ShowS)
-> (V1alpha1MutatingAdmissionPolicySpec -> String)
-> ([V1alpha1MutatingAdmissionPolicySpec] -> ShowS)
-> Show V1alpha1MutatingAdmissionPolicySpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha1MutatingAdmissionPolicySpec -> ShowS
showsPrec :: Int -> V1alpha1MutatingAdmissionPolicySpec -> ShowS
$cshow :: V1alpha1MutatingAdmissionPolicySpec -> String
show :: V1alpha1MutatingAdmissionPolicySpec -> String
$cshowList :: [V1alpha1MutatingAdmissionPolicySpec] -> ShowS
showList :: [V1alpha1MutatingAdmissionPolicySpec] -> ShowS
P.Show, V1alpha1MutatingAdmissionPolicySpec
-> V1alpha1MutatingAdmissionPolicySpec -> Bool
(V1alpha1MutatingAdmissionPolicySpec
 -> V1alpha1MutatingAdmissionPolicySpec -> Bool)
-> (V1alpha1MutatingAdmissionPolicySpec
    -> V1alpha1MutatingAdmissionPolicySpec -> Bool)
-> Eq V1alpha1MutatingAdmissionPolicySpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha1MutatingAdmissionPolicySpec
-> V1alpha1MutatingAdmissionPolicySpec -> Bool
== :: V1alpha1MutatingAdmissionPolicySpec
-> V1alpha1MutatingAdmissionPolicySpec -> Bool
$c/= :: V1alpha1MutatingAdmissionPolicySpec
-> V1alpha1MutatingAdmissionPolicySpec -> Bool
/= :: V1alpha1MutatingAdmissionPolicySpec
-> V1alpha1MutatingAdmissionPolicySpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha1MutatingAdmissionPolicySpec
instance A.FromJSON V1alpha1MutatingAdmissionPolicySpec where
  parseJSON :: Value -> Parser V1alpha1MutatingAdmissionPolicySpec
parseJSON = String
-> (Object -> Parser V1alpha1MutatingAdmissionPolicySpec)
-> Value
-> Parser V1alpha1MutatingAdmissionPolicySpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha1MutatingAdmissionPolicySpec" ((Object -> Parser V1alpha1MutatingAdmissionPolicySpec)
 -> Value -> Parser V1alpha1MutatingAdmissionPolicySpec)
-> (Object -> Parser V1alpha1MutatingAdmissionPolicySpec)
-> Value
-> Parser V1alpha1MutatingAdmissionPolicySpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe [V1alpha1MatchCondition]
-> Maybe V1alpha1MatchResources
-> Maybe [V1alpha1Mutation]
-> Maybe V1alpha1ParamKind
-> Maybe Text
-> Maybe [V1alpha1Variable]
-> V1alpha1MutatingAdmissionPolicySpec
V1alpha1MutatingAdmissionPolicySpec
      (Maybe Text
 -> Maybe [V1alpha1MatchCondition]
 -> Maybe V1alpha1MatchResources
 -> Maybe [V1alpha1Mutation]
 -> Maybe V1alpha1ParamKind
 -> Maybe Text
 -> Maybe [V1alpha1Variable]
 -> V1alpha1MutatingAdmissionPolicySpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe [V1alpha1MatchCondition]
      -> Maybe V1alpha1MatchResources
      -> Maybe [V1alpha1Mutation]
      -> Maybe V1alpha1ParamKind
      -> Maybe Text
      -> Maybe [V1alpha1Variable]
      -> V1alpha1MutatingAdmissionPolicySpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"failurePolicy")
      Parser
  (Maybe [V1alpha1MatchCondition]
   -> Maybe V1alpha1MatchResources
   -> Maybe [V1alpha1Mutation]
   -> Maybe V1alpha1ParamKind
   -> Maybe Text
   -> Maybe [V1alpha1Variable]
   -> V1alpha1MutatingAdmissionPolicySpec)
-> Parser (Maybe [V1alpha1MatchCondition])
-> Parser
     (Maybe V1alpha1MatchResources
      -> Maybe [V1alpha1Mutation]
      -> Maybe V1alpha1ParamKind
      -> Maybe Text
      -> Maybe [V1alpha1Variable]
      -> V1alpha1MutatingAdmissionPolicySpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1alpha1MatchCondition])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"matchConditions")
      Parser
  (Maybe V1alpha1MatchResources
   -> Maybe [V1alpha1Mutation]
   -> Maybe V1alpha1ParamKind
   -> Maybe Text
   -> Maybe [V1alpha1Variable]
   -> V1alpha1MutatingAdmissionPolicySpec)
-> Parser (Maybe V1alpha1MatchResources)
-> Parser
     (Maybe [V1alpha1Mutation]
      -> Maybe V1alpha1ParamKind
      -> Maybe Text
      -> Maybe [V1alpha1Variable]
      -> V1alpha1MutatingAdmissionPolicySpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1alpha1MatchResources)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"matchConstraints")
      Parser
  (Maybe [V1alpha1Mutation]
   -> Maybe V1alpha1ParamKind
   -> Maybe Text
   -> Maybe [V1alpha1Variable]
   -> V1alpha1MutatingAdmissionPolicySpec)
-> Parser (Maybe [V1alpha1Mutation])
-> Parser
     (Maybe V1alpha1ParamKind
      -> Maybe Text
      -> Maybe [V1alpha1Variable]
      -> V1alpha1MutatingAdmissionPolicySpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1alpha1Mutation])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"mutations")
      Parser
  (Maybe V1alpha1ParamKind
   -> Maybe Text
   -> Maybe [V1alpha1Variable]
   -> V1alpha1MutatingAdmissionPolicySpec)
-> Parser (Maybe V1alpha1ParamKind)
-> Parser
     (Maybe Text
      -> Maybe [V1alpha1Variable] -> V1alpha1MutatingAdmissionPolicySpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1alpha1ParamKind)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"paramKind")
      Parser
  (Maybe Text
   -> Maybe [V1alpha1Variable] -> V1alpha1MutatingAdmissionPolicySpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe [V1alpha1Variable] -> V1alpha1MutatingAdmissionPolicySpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reinvocationPolicy")
      Parser
  (Maybe [V1alpha1Variable] -> V1alpha1MutatingAdmissionPolicySpec)
-> Parser (Maybe [V1alpha1Variable])
-> Parser V1alpha1MutatingAdmissionPolicySpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1alpha1Variable])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"variables")

-- | ToJSON V1alpha1MutatingAdmissionPolicySpec
instance A.ToJSON V1alpha1MutatingAdmissionPolicySpec where
  toJSON :: V1alpha1MutatingAdmissionPolicySpec -> Value
toJSON V1alpha1MutatingAdmissionPolicySpec {Maybe [V1alpha1Variable]
Maybe [V1alpha1Mutation]
Maybe [V1alpha1MatchCondition]
Maybe Text
Maybe V1alpha1ParamKind
Maybe V1alpha1MatchResources
$sel:v1alpha1MutatingAdmissionPolicySpecFailurePolicy:V1alpha1MutatingAdmissionPolicySpec :: V1alpha1MutatingAdmissionPolicySpec -> Maybe Text
$sel:v1alpha1MutatingAdmissionPolicySpecMatchConditions:V1alpha1MutatingAdmissionPolicySpec :: V1alpha1MutatingAdmissionPolicySpec
-> Maybe [V1alpha1MatchCondition]
$sel:v1alpha1MutatingAdmissionPolicySpecMatchConstraints:V1alpha1MutatingAdmissionPolicySpec :: V1alpha1MutatingAdmissionPolicySpec -> Maybe V1alpha1MatchResources
$sel:v1alpha1MutatingAdmissionPolicySpecMutations:V1alpha1MutatingAdmissionPolicySpec :: V1alpha1MutatingAdmissionPolicySpec -> Maybe [V1alpha1Mutation]
$sel:v1alpha1MutatingAdmissionPolicySpecParamKind:V1alpha1MutatingAdmissionPolicySpec :: V1alpha1MutatingAdmissionPolicySpec -> Maybe V1alpha1ParamKind
$sel:v1alpha1MutatingAdmissionPolicySpecReinvocationPolicy:V1alpha1MutatingAdmissionPolicySpec :: V1alpha1MutatingAdmissionPolicySpec -> Maybe Text
$sel:v1alpha1MutatingAdmissionPolicySpecVariables:V1alpha1MutatingAdmissionPolicySpec :: V1alpha1MutatingAdmissionPolicySpec -> Maybe [V1alpha1Variable]
v1alpha1MutatingAdmissionPolicySpecFailurePolicy :: Maybe Text
v1alpha1MutatingAdmissionPolicySpecMatchConditions :: Maybe [V1alpha1MatchCondition]
v1alpha1MutatingAdmissionPolicySpecMatchConstraints :: Maybe V1alpha1MatchResources
v1alpha1MutatingAdmissionPolicySpecMutations :: Maybe [V1alpha1Mutation]
v1alpha1MutatingAdmissionPolicySpecParamKind :: Maybe V1alpha1ParamKind
v1alpha1MutatingAdmissionPolicySpecReinvocationPolicy :: Maybe Text
v1alpha1MutatingAdmissionPolicySpecVariables :: Maybe [V1alpha1Variable]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"failurePolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1MutatingAdmissionPolicySpecFailurePolicy
      , Key
"matchConditions" Key -> Maybe [V1alpha1MatchCondition] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1alpha1MatchCondition]
v1alpha1MutatingAdmissionPolicySpecMatchConditions
      , Key
"matchConstraints" Key -> Maybe V1alpha1MatchResources -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1alpha1MatchResources
v1alpha1MutatingAdmissionPolicySpecMatchConstraints
      , Key
"mutations" Key -> Maybe [V1alpha1Mutation] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1alpha1Mutation]
v1alpha1MutatingAdmissionPolicySpecMutations
      , Key
"paramKind" Key -> Maybe V1alpha1ParamKind -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1alpha1ParamKind
v1alpha1MutatingAdmissionPolicySpecParamKind
      , Key
"reinvocationPolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1MutatingAdmissionPolicySpecReinvocationPolicy
      , Key
"variables" Key -> Maybe [V1alpha1Variable] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1alpha1Variable]
v1alpha1MutatingAdmissionPolicySpecVariables
      ]


-- | Construct a value of type 'V1alpha1MutatingAdmissionPolicySpec' (by applying it's required fields, if any)
mkV1alpha1MutatingAdmissionPolicySpec
  :: V1alpha1MutatingAdmissionPolicySpec
mkV1alpha1MutatingAdmissionPolicySpec :: V1alpha1MutatingAdmissionPolicySpec
mkV1alpha1MutatingAdmissionPolicySpec =
  V1alpha1MutatingAdmissionPolicySpec
  { $sel:v1alpha1MutatingAdmissionPolicySpecFailurePolicy:V1alpha1MutatingAdmissionPolicySpec :: Maybe Text
v1alpha1MutatingAdmissionPolicySpecFailurePolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha1MutatingAdmissionPolicySpecMatchConditions:V1alpha1MutatingAdmissionPolicySpec :: Maybe [V1alpha1MatchCondition]
v1alpha1MutatingAdmissionPolicySpecMatchConditions = Maybe [V1alpha1MatchCondition]
forall a. Maybe a
Nothing
  , $sel:v1alpha1MutatingAdmissionPolicySpecMatchConstraints:V1alpha1MutatingAdmissionPolicySpec :: Maybe V1alpha1MatchResources
v1alpha1MutatingAdmissionPolicySpecMatchConstraints = Maybe V1alpha1MatchResources
forall a. Maybe a
Nothing
  , $sel:v1alpha1MutatingAdmissionPolicySpecMutations:V1alpha1MutatingAdmissionPolicySpec :: Maybe [V1alpha1Mutation]
v1alpha1MutatingAdmissionPolicySpecMutations = Maybe [V1alpha1Mutation]
forall a. Maybe a
Nothing
  , $sel:v1alpha1MutatingAdmissionPolicySpecParamKind:V1alpha1MutatingAdmissionPolicySpec :: Maybe V1alpha1ParamKind
v1alpha1MutatingAdmissionPolicySpecParamKind = Maybe V1alpha1ParamKind
forall a. Maybe a
Nothing
  , $sel:v1alpha1MutatingAdmissionPolicySpecReinvocationPolicy:V1alpha1MutatingAdmissionPolicySpec :: Maybe Text
v1alpha1MutatingAdmissionPolicySpecReinvocationPolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha1MutatingAdmissionPolicySpecVariables:V1alpha1MutatingAdmissionPolicySpec :: Maybe [V1alpha1Variable]
v1alpha1MutatingAdmissionPolicySpecVariables = Maybe [V1alpha1Variable]
forall a. Maybe a
Nothing
  }

-- ** V1alpha1Mutation
-- | V1alpha1Mutation
-- Mutation specifies the CEL expression which is used to apply the Mutation.
data V1alpha1Mutation = V1alpha1Mutation
  { V1alpha1Mutation -> Maybe V1alpha1ApplyConfiguration
v1alpha1MutationApplyConfiguration :: !(Maybe V1alpha1ApplyConfiguration) -- ^ "applyConfiguration"
  , V1alpha1Mutation -> Maybe V1alpha1JSONPatch
v1alpha1MutationJsonPatch :: !(Maybe V1alpha1JSONPatch) -- ^ "jsonPatch"
  , V1alpha1Mutation -> Text
v1alpha1MutationPatchType :: !(Text) -- ^ /Required/ "patchType" - patchType indicates the patch strategy used. Allowed values are \&quot;ApplyConfiguration\&quot; and \&quot;JSONPatch\&quot;. Required.
  } deriving (Int -> V1alpha1Mutation -> ShowS
[V1alpha1Mutation] -> ShowS
V1alpha1Mutation -> String
(Int -> V1alpha1Mutation -> ShowS)
-> (V1alpha1Mutation -> String)
-> ([V1alpha1Mutation] -> ShowS)
-> Show V1alpha1Mutation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha1Mutation -> ShowS
showsPrec :: Int -> V1alpha1Mutation -> ShowS
$cshow :: V1alpha1Mutation -> String
show :: V1alpha1Mutation -> String
$cshowList :: [V1alpha1Mutation] -> ShowS
showList :: [V1alpha1Mutation] -> ShowS
P.Show, V1alpha1Mutation -> V1alpha1Mutation -> Bool
(V1alpha1Mutation -> V1alpha1Mutation -> Bool)
-> (V1alpha1Mutation -> V1alpha1Mutation -> Bool)
-> Eq V1alpha1Mutation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha1Mutation -> V1alpha1Mutation -> Bool
== :: V1alpha1Mutation -> V1alpha1Mutation -> Bool
$c/= :: V1alpha1Mutation -> V1alpha1Mutation -> Bool
/= :: V1alpha1Mutation -> V1alpha1Mutation -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha1Mutation
instance A.FromJSON V1alpha1Mutation where
  parseJSON :: Value -> Parser V1alpha1Mutation
parseJSON = String
-> (Object -> Parser V1alpha1Mutation)
-> Value
-> Parser V1alpha1Mutation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha1Mutation" ((Object -> Parser V1alpha1Mutation)
 -> Value -> Parser V1alpha1Mutation)
-> (Object -> Parser V1alpha1Mutation)
-> Value
-> Parser V1alpha1Mutation
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1alpha1ApplyConfiguration
-> Maybe V1alpha1JSONPatch -> Text -> V1alpha1Mutation
V1alpha1Mutation
      (Maybe V1alpha1ApplyConfiguration
 -> Maybe V1alpha1JSONPatch -> Text -> V1alpha1Mutation)
-> Parser (Maybe V1alpha1ApplyConfiguration)
-> Parser (Maybe V1alpha1JSONPatch -> Text -> V1alpha1Mutation)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1alpha1ApplyConfiguration)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"applyConfiguration")
      Parser (Maybe V1alpha1JSONPatch -> Text -> V1alpha1Mutation)
-> Parser (Maybe V1alpha1JSONPatch)
-> Parser (Text -> V1alpha1Mutation)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1alpha1JSONPatch)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"jsonPatch")
      Parser (Text -> V1alpha1Mutation)
-> Parser Text -> Parser V1alpha1Mutation
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"patchType")

-- | ToJSON V1alpha1Mutation
instance A.ToJSON V1alpha1Mutation where
  toJSON :: V1alpha1Mutation -> Value
toJSON V1alpha1Mutation {Maybe V1alpha1JSONPatch
Maybe V1alpha1ApplyConfiguration
Text
$sel:v1alpha1MutationApplyConfiguration:V1alpha1Mutation :: V1alpha1Mutation -> Maybe V1alpha1ApplyConfiguration
$sel:v1alpha1MutationJsonPatch:V1alpha1Mutation :: V1alpha1Mutation -> Maybe V1alpha1JSONPatch
$sel:v1alpha1MutationPatchType:V1alpha1Mutation :: V1alpha1Mutation -> Text
v1alpha1MutationApplyConfiguration :: Maybe V1alpha1ApplyConfiguration
v1alpha1MutationJsonPatch :: Maybe V1alpha1JSONPatch
v1alpha1MutationPatchType :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"applyConfiguration" Key -> Maybe V1alpha1ApplyConfiguration -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1alpha1ApplyConfiguration
v1alpha1MutationApplyConfiguration
      , Key
"jsonPatch" Key -> Maybe V1alpha1JSONPatch -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1alpha1JSONPatch
v1alpha1MutationJsonPatch
      , Key
"patchType" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha1MutationPatchType
      ]


-- | Construct a value of type 'V1alpha1Mutation' (by applying it's required fields, if any)
mkV1alpha1Mutation
  :: Text -- ^ 'v1alpha1MutationPatchType': patchType indicates the patch strategy used. Allowed values are \"ApplyConfiguration\" and \"JSONPatch\". Required.
  -> V1alpha1Mutation
mkV1alpha1Mutation :: Text -> V1alpha1Mutation
mkV1alpha1Mutation Text
v1alpha1MutationPatchType =
  V1alpha1Mutation
  { $sel:v1alpha1MutationApplyConfiguration:V1alpha1Mutation :: Maybe V1alpha1ApplyConfiguration
v1alpha1MutationApplyConfiguration = Maybe V1alpha1ApplyConfiguration
forall a. Maybe a
Nothing
  , $sel:v1alpha1MutationJsonPatch:V1alpha1Mutation :: Maybe V1alpha1JSONPatch
v1alpha1MutationJsonPatch = Maybe V1alpha1JSONPatch
forall a. Maybe a
Nothing
  , Text
$sel:v1alpha1MutationPatchType:V1alpha1Mutation :: Text
v1alpha1MutationPatchType :: Text
v1alpha1MutationPatchType
  }

-- ** V1alpha1NamedRuleWithOperations
-- | V1alpha1NamedRuleWithOperations
-- NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.
data V1alpha1NamedRuleWithOperations = V1alpha1NamedRuleWithOperations
  { V1alpha1NamedRuleWithOperations -> Maybe [Text]
v1alpha1NamedRuleWithOperationsApiGroups :: !(Maybe [Text]) -- ^ "apiGroups" - APIGroups is the API groups the resources belong to. &#39;*&#39; is all groups. If &#39;*&#39; is present, the length of the slice must be one. Required.
  , V1alpha1NamedRuleWithOperations -> Maybe [Text]
v1alpha1NamedRuleWithOperationsApiVersions :: !(Maybe [Text]) -- ^ "apiVersions" - APIVersions is the API versions the resources belong to. &#39;*&#39; is all versions. If &#39;*&#39; is present, the length of the slice must be one. Required.
  , V1alpha1NamedRuleWithOperations -> Maybe [Text]
v1alpha1NamedRuleWithOperationsOperations :: !(Maybe [Text]) -- ^ "operations" - Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If &#39;*&#39; is present, the length of the slice must be one. Required.
  , V1alpha1NamedRuleWithOperations -> Maybe [Text]
v1alpha1NamedRuleWithOperationsResourceNames :: !(Maybe [Text]) -- ^ "resourceNames" - ResourceNames is an optional white list of names that the rule applies to.  An empty set means that everything is allowed.
  , V1alpha1NamedRuleWithOperations -> Maybe [Text]
v1alpha1NamedRuleWithOperationsResources :: !(Maybe [Text]) -- ^ "resources" - Resources is a list of resources this rule applies to.  For example: &#39;pods&#39; means pods. &#39;pods/log&#39; means the log subresource of pods. &#39;*&#39; means all resources, but not subresources. &#39;pods/*&#39; means all subresources of pods. &#39;*/scale&#39; means all scale subresources. &#39;*/*&#39; means all resources and their subresources.  If wildcard is present, the validation rule will ensure resources do not overlap with each other.  Depending on the enclosing object, subresources might not be allowed. Required.
  , V1alpha1NamedRuleWithOperations -> Maybe Text
v1alpha1NamedRuleWithOperationsScope :: !(Maybe Text) -- ^ "scope" - scope specifies the scope of this rule. Valid values are \&quot;Cluster\&quot;, \&quot;Namespaced\&quot;, and \&quot;*\&quot; \&quot;Cluster\&quot; means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \&quot;Namespaced\&quot; means that only namespaced resources will match this rule. \&quot;*\&quot; means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \&quot;*\&quot;.
  } deriving (Int -> V1alpha1NamedRuleWithOperations -> ShowS
[V1alpha1NamedRuleWithOperations] -> ShowS
V1alpha1NamedRuleWithOperations -> String
(Int -> V1alpha1NamedRuleWithOperations -> ShowS)
-> (V1alpha1NamedRuleWithOperations -> String)
-> ([V1alpha1NamedRuleWithOperations] -> ShowS)
-> Show V1alpha1NamedRuleWithOperations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha1NamedRuleWithOperations -> ShowS
showsPrec :: Int -> V1alpha1NamedRuleWithOperations -> ShowS
$cshow :: V1alpha1NamedRuleWithOperations -> String
show :: V1alpha1NamedRuleWithOperations -> String
$cshowList :: [V1alpha1NamedRuleWithOperations] -> ShowS
showList :: [V1alpha1NamedRuleWithOperations] -> ShowS
P.Show, V1alpha1NamedRuleWithOperations
-> V1alpha1NamedRuleWithOperations -> Bool
(V1alpha1NamedRuleWithOperations
 -> V1alpha1NamedRuleWithOperations -> Bool)
-> (V1alpha1NamedRuleWithOperations
    -> V1alpha1NamedRuleWithOperations -> Bool)
-> Eq V1alpha1NamedRuleWithOperations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha1NamedRuleWithOperations
-> V1alpha1NamedRuleWithOperations -> Bool
== :: V1alpha1NamedRuleWithOperations
-> V1alpha1NamedRuleWithOperations -> Bool
$c/= :: V1alpha1NamedRuleWithOperations
-> V1alpha1NamedRuleWithOperations -> Bool
/= :: V1alpha1NamedRuleWithOperations
-> V1alpha1NamedRuleWithOperations -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha1NamedRuleWithOperations
instance A.FromJSON V1alpha1NamedRuleWithOperations where
  parseJSON :: Value -> Parser V1alpha1NamedRuleWithOperations
parseJSON = String
-> (Object -> Parser V1alpha1NamedRuleWithOperations)
-> Value
-> Parser V1alpha1NamedRuleWithOperations
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha1NamedRuleWithOperations" ((Object -> Parser V1alpha1NamedRuleWithOperations)
 -> Value -> Parser V1alpha1NamedRuleWithOperations)
-> (Object -> Parser V1alpha1NamedRuleWithOperations)
-> Value
-> Parser V1alpha1NamedRuleWithOperations
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> V1alpha1NamedRuleWithOperations
V1alpha1NamedRuleWithOperations
      (Maybe [Text]
 -> Maybe [Text]
 -> Maybe [Text]
 -> Maybe [Text]
 -> Maybe [Text]
 -> Maybe Text
 -> V1alpha1NamedRuleWithOperations)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [Text]
      -> Maybe [Text]
      -> Maybe [Text]
      -> Maybe [Text]
      -> Maybe Text
      -> V1alpha1NamedRuleWithOperations)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiGroups")
      Parser
  (Maybe [Text]
   -> Maybe [Text]
   -> Maybe [Text]
   -> Maybe [Text]
   -> Maybe Text
   -> V1alpha1NamedRuleWithOperations)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [Text]
      -> Maybe [Text]
      -> Maybe [Text]
      -> Maybe Text
      -> V1alpha1NamedRuleWithOperations)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersions")
      Parser
  (Maybe [Text]
   -> Maybe [Text]
   -> Maybe [Text]
   -> Maybe Text
   -> V1alpha1NamedRuleWithOperations)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [Text]
      -> Maybe [Text] -> Maybe Text -> V1alpha1NamedRuleWithOperations)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"operations")
      Parser
  (Maybe [Text]
   -> Maybe [Text] -> Maybe Text -> V1alpha1NamedRuleWithOperations)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [Text] -> Maybe Text -> V1alpha1NamedRuleWithOperations)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resourceNames")
      Parser
  (Maybe [Text] -> Maybe Text -> V1alpha1NamedRuleWithOperations)
-> Parser (Maybe [Text])
-> Parser (Maybe Text -> V1alpha1NamedRuleWithOperations)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resources")
      Parser (Maybe Text -> V1alpha1NamedRuleWithOperations)
-> Parser (Maybe Text) -> Parser V1alpha1NamedRuleWithOperations
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"scope")

-- | ToJSON V1alpha1NamedRuleWithOperations
instance A.ToJSON V1alpha1NamedRuleWithOperations where
  toJSON :: V1alpha1NamedRuleWithOperations -> Value
toJSON V1alpha1NamedRuleWithOperations {Maybe [Text]
Maybe Text
$sel:v1alpha1NamedRuleWithOperationsApiGroups:V1alpha1NamedRuleWithOperations :: V1alpha1NamedRuleWithOperations -> Maybe [Text]
$sel:v1alpha1NamedRuleWithOperationsApiVersions:V1alpha1NamedRuleWithOperations :: V1alpha1NamedRuleWithOperations -> Maybe [Text]
$sel:v1alpha1NamedRuleWithOperationsOperations:V1alpha1NamedRuleWithOperations :: V1alpha1NamedRuleWithOperations -> Maybe [Text]
$sel:v1alpha1NamedRuleWithOperationsResourceNames:V1alpha1NamedRuleWithOperations :: V1alpha1NamedRuleWithOperations -> Maybe [Text]
$sel:v1alpha1NamedRuleWithOperationsResources:V1alpha1NamedRuleWithOperations :: V1alpha1NamedRuleWithOperations -> Maybe [Text]
$sel:v1alpha1NamedRuleWithOperationsScope:V1alpha1NamedRuleWithOperations :: V1alpha1NamedRuleWithOperations -> Maybe Text
v1alpha1NamedRuleWithOperationsApiGroups :: Maybe [Text]
v1alpha1NamedRuleWithOperationsApiVersions :: Maybe [Text]
v1alpha1NamedRuleWithOperationsOperations :: Maybe [Text]
v1alpha1NamedRuleWithOperationsResourceNames :: Maybe [Text]
v1alpha1NamedRuleWithOperationsResources :: Maybe [Text]
v1alpha1NamedRuleWithOperationsScope :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiGroups" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1alpha1NamedRuleWithOperationsApiGroups
      , Key
"apiVersions" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1alpha1NamedRuleWithOperationsApiVersions
      , Key
"operations" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1alpha1NamedRuleWithOperationsOperations
      , Key
"resourceNames" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1alpha1NamedRuleWithOperationsResourceNames
      , Key
"resources" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1alpha1NamedRuleWithOperationsResources
      , Key
"scope" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1NamedRuleWithOperationsScope
      ]


-- | Construct a value of type 'V1alpha1NamedRuleWithOperations' (by applying it's required fields, if any)
mkV1alpha1NamedRuleWithOperations
  :: V1alpha1NamedRuleWithOperations
mkV1alpha1NamedRuleWithOperations :: V1alpha1NamedRuleWithOperations
mkV1alpha1NamedRuleWithOperations =
  V1alpha1NamedRuleWithOperations
  { $sel:v1alpha1NamedRuleWithOperationsApiGroups:V1alpha1NamedRuleWithOperations :: Maybe [Text]
v1alpha1NamedRuleWithOperationsApiGroups = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1alpha1NamedRuleWithOperationsApiVersions:V1alpha1NamedRuleWithOperations :: Maybe [Text]
v1alpha1NamedRuleWithOperationsApiVersions = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1alpha1NamedRuleWithOperationsOperations:V1alpha1NamedRuleWithOperations :: Maybe [Text]
v1alpha1NamedRuleWithOperationsOperations = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1alpha1NamedRuleWithOperationsResourceNames:V1alpha1NamedRuleWithOperations :: Maybe [Text]
v1alpha1NamedRuleWithOperationsResourceNames = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1alpha1NamedRuleWithOperationsResources:V1alpha1NamedRuleWithOperations :: Maybe [Text]
v1alpha1NamedRuleWithOperationsResources = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1alpha1NamedRuleWithOperationsScope:V1alpha1NamedRuleWithOperations :: Maybe Text
v1alpha1NamedRuleWithOperationsScope = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1alpha1ParamKind
-- | V1alpha1ParamKind
-- ParamKind is a tuple of Group Kind and Version.
data V1alpha1ParamKind = V1alpha1ParamKind
  { V1alpha1ParamKind -> Maybe Text
v1alpha1ParamKindApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion is the API group version the resources belong to. In format of \&quot;group/version\&quot;. Required.
  , V1alpha1ParamKind -> Maybe Text
v1alpha1ParamKindKind :: !(Maybe Text) -- ^ "kind" - Kind is the API kind the resources belong to. Required.
  } deriving (Int -> V1alpha1ParamKind -> ShowS
[V1alpha1ParamKind] -> ShowS
V1alpha1ParamKind -> String
(Int -> V1alpha1ParamKind -> ShowS)
-> (V1alpha1ParamKind -> String)
-> ([V1alpha1ParamKind] -> ShowS)
-> Show V1alpha1ParamKind
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha1ParamKind -> ShowS
showsPrec :: Int -> V1alpha1ParamKind -> ShowS
$cshow :: V1alpha1ParamKind -> String
show :: V1alpha1ParamKind -> String
$cshowList :: [V1alpha1ParamKind] -> ShowS
showList :: [V1alpha1ParamKind] -> ShowS
P.Show, V1alpha1ParamKind -> V1alpha1ParamKind -> Bool
(V1alpha1ParamKind -> V1alpha1ParamKind -> Bool)
-> (V1alpha1ParamKind -> V1alpha1ParamKind -> Bool)
-> Eq V1alpha1ParamKind
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha1ParamKind -> V1alpha1ParamKind -> Bool
== :: V1alpha1ParamKind -> V1alpha1ParamKind -> Bool
$c/= :: V1alpha1ParamKind -> V1alpha1ParamKind -> Bool
/= :: V1alpha1ParamKind -> V1alpha1ParamKind -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha1ParamKind
instance A.FromJSON V1alpha1ParamKind where
  parseJSON :: Value -> Parser V1alpha1ParamKind
parseJSON = String
-> (Object -> Parser V1alpha1ParamKind)
-> Value
-> Parser V1alpha1ParamKind
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha1ParamKind" ((Object -> Parser V1alpha1ParamKind)
 -> Value -> Parser V1alpha1ParamKind)
-> (Object -> Parser V1alpha1ParamKind)
-> Value
-> Parser V1alpha1ParamKind
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Maybe Text -> V1alpha1ParamKind
V1alpha1ParamKind
      (Maybe Text -> Maybe Text -> V1alpha1ParamKind)
-> Parser (Maybe Text) -> Parser (Maybe Text -> V1alpha1ParamKind)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser (Maybe Text -> V1alpha1ParamKind)
-> Parser (Maybe Text) -> Parser V1alpha1ParamKind
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")

-- | ToJSON V1alpha1ParamKind
instance A.ToJSON V1alpha1ParamKind where
  toJSON :: V1alpha1ParamKind -> Value
toJSON V1alpha1ParamKind {Maybe Text
$sel:v1alpha1ParamKindApiVersion:V1alpha1ParamKind :: V1alpha1ParamKind -> Maybe Text
$sel:v1alpha1ParamKindKind:V1alpha1ParamKind :: V1alpha1ParamKind -> Maybe Text
v1alpha1ParamKindApiVersion :: Maybe Text
v1alpha1ParamKindKind :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1ParamKindApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1ParamKindKind
      ]


-- | Construct a value of type 'V1alpha1ParamKind' (by applying it's required fields, if any)
mkV1alpha1ParamKind
  :: V1alpha1ParamKind
mkV1alpha1ParamKind :: V1alpha1ParamKind
mkV1alpha1ParamKind =
  V1alpha1ParamKind
  { $sel:v1alpha1ParamKindApiVersion:V1alpha1ParamKind :: Maybe Text
v1alpha1ParamKindApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha1ParamKindKind:V1alpha1ParamKind :: Maybe Text
v1alpha1ParamKindKind = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1alpha1ParamRef
-- | V1alpha1ParamRef
-- ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding.
data V1alpha1ParamRef = V1alpha1ParamRef
  { V1alpha1ParamRef -> Maybe Text
v1alpha1ParamRefName :: !(Maybe Text) -- ^ "name" - &#x60;name&#x60; is the name of the resource being referenced.  &#x60;name&#x60; and &#x60;selector&#x60; are mutually exclusive properties. If one is set, the other must be unset.
  , V1alpha1ParamRef -> Maybe Text
v1alpha1ParamRefNamespace :: !(Maybe Text) -- ^ "namespace" - namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both &#x60;name&#x60; and &#x60;selector&#x60; fields.  A per-namespace parameter may be used by specifying a namespace-scoped &#x60;paramKind&#x60; in the policy and leaving this field empty.  - If &#x60;paramKind&#x60; is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error.  - If &#x60;paramKind&#x60; is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error.
  , V1alpha1ParamRef -> Maybe Text
v1alpha1ParamRefParameterNotFoundAction :: !(Maybe Text) -- ^ "parameterNotFoundAction" - &#x60;parameterNotFoundAction&#x60; controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to &#x60;Allow&#x60;, then no matched parameters will be treated as successful validation by the binding. If set to &#x60;Deny&#x60;, then no matched parameters will be subject to the &#x60;failurePolicy&#x60; of the policy.  Allowed values are &#x60;Allow&#x60; or &#x60;Deny&#x60; Default to &#x60;Deny&#x60;
  , V1alpha1ParamRef -> Maybe V1LabelSelector
v1alpha1ParamRefSelector :: !(Maybe V1LabelSelector) -- ^ "selector"
  } deriving (Int -> V1alpha1ParamRef -> ShowS
[V1alpha1ParamRef] -> ShowS
V1alpha1ParamRef -> String
(Int -> V1alpha1ParamRef -> ShowS)
-> (V1alpha1ParamRef -> String)
-> ([V1alpha1ParamRef] -> ShowS)
-> Show V1alpha1ParamRef
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha1ParamRef -> ShowS
showsPrec :: Int -> V1alpha1ParamRef -> ShowS
$cshow :: V1alpha1ParamRef -> String
show :: V1alpha1ParamRef -> String
$cshowList :: [V1alpha1ParamRef] -> ShowS
showList :: [V1alpha1ParamRef] -> ShowS
P.Show, V1alpha1ParamRef -> V1alpha1ParamRef -> Bool
(V1alpha1ParamRef -> V1alpha1ParamRef -> Bool)
-> (V1alpha1ParamRef -> V1alpha1ParamRef -> Bool)
-> Eq V1alpha1ParamRef
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha1ParamRef -> V1alpha1ParamRef -> Bool
== :: V1alpha1ParamRef -> V1alpha1ParamRef -> Bool
$c/= :: V1alpha1ParamRef -> V1alpha1ParamRef -> Bool
/= :: V1alpha1ParamRef -> V1alpha1ParamRef -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha1ParamRef
instance A.FromJSON V1alpha1ParamRef where
  parseJSON :: Value -> Parser V1alpha1ParamRef
parseJSON = String
-> (Object -> Parser V1alpha1ParamRef)
-> Value
-> Parser V1alpha1ParamRef
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha1ParamRef" ((Object -> Parser V1alpha1ParamRef)
 -> Value -> Parser V1alpha1ParamRef)
-> (Object -> Parser V1alpha1ParamRef)
-> Value
-> Parser V1alpha1ParamRef
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe V1LabelSelector
-> V1alpha1ParamRef
V1alpha1ParamRef
      (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe V1LabelSelector
 -> V1alpha1ParamRef)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe V1LabelSelector -> V1alpha1ParamRef)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"name")
      Parser
  (Maybe Text
   -> Maybe Text -> Maybe V1LabelSelector -> V1alpha1ParamRef)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe V1LabelSelector -> V1alpha1ParamRef)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"namespace")
      Parser (Maybe Text -> Maybe V1LabelSelector -> V1alpha1ParamRef)
-> Parser (Maybe Text)
-> Parser (Maybe V1LabelSelector -> V1alpha1ParamRef)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"parameterNotFoundAction")
      Parser (Maybe V1LabelSelector -> V1alpha1ParamRef)
-> Parser (Maybe V1LabelSelector) -> Parser V1alpha1ParamRef
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LabelSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"selector")

-- | ToJSON V1alpha1ParamRef
instance A.ToJSON V1alpha1ParamRef where
  toJSON :: V1alpha1ParamRef -> Value
toJSON V1alpha1ParamRef {Maybe Text
Maybe V1LabelSelector
$sel:v1alpha1ParamRefName:V1alpha1ParamRef :: V1alpha1ParamRef -> Maybe Text
$sel:v1alpha1ParamRefNamespace:V1alpha1ParamRef :: V1alpha1ParamRef -> Maybe Text
$sel:v1alpha1ParamRefParameterNotFoundAction:V1alpha1ParamRef :: V1alpha1ParamRef -> Maybe Text
$sel:v1alpha1ParamRefSelector:V1alpha1ParamRef :: V1alpha1ParamRef -> Maybe V1LabelSelector
v1alpha1ParamRefName :: Maybe Text
v1alpha1ParamRefNamespace :: Maybe Text
v1alpha1ParamRefParameterNotFoundAction :: Maybe Text
v1alpha1ParamRefSelector :: Maybe V1LabelSelector
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"name" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1ParamRefName
      , Key
"namespace" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1ParamRefNamespace
      , Key
"parameterNotFoundAction" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1ParamRefParameterNotFoundAction
      , Key
"selector" Key -> Maybe V1LabelSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LabelSelector
v1alpha1ParamRefSelector
      ]


-- | Construct a value of type 'V1alpha1ParamRef' (by applying it's required fields, if any)
mkV1alpha1ParamRef
  :: V1alpha1ParamRef
mkV1alpha1ParamRef :: V1alpha1ParamRef
mkV1alpha1ParamRef =
  V1alpha1ParamRef
  { $sel:v1alpha1ParamRefName:V1alpha1ParamRef :: Maybe Text
v1alpha1ParamRefName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha1ParamRefNamespace:V1alpha1ParamRef :: Maybe Text
v1alpha1ParamRefNamespace = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha1ParamRefParameterNotFoundAction:V1alpha1ParamRef :: Maybe Text
v1alpha1ParamRefParameterNotFoundAction = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha1ParamRefSelector:V1alpha1ParamRef :: Maybe V1LabelSelector
v1alpha1ParamRefSelector = Maybe V1LabelSelector
forall a. Maybe a
Nothing
  }

-- ** V1alpha1ServerStorageVersion
-- | V1alpha1ServerStorageVersion
-- An API server instance reports the version it can decode and the version it encodes objects to when persisting objects in the backend.
data V1alpha1ServerStorageVersion = V1alpha1ServerStorageVersion
  { V1alpha1ServerStorageVersion -> Maybe Text
v1alpha1ServerStorageVersionApiServerId :: !(Maybe Text) -- ^ "apiServerID" - The ID of the reporting API server.
  , V1alpha1ServerStorageVersion -> Maybe [Text]
v1alpha1ServerStorageVersionDecodableVersions :: !(Maybe [Text]) -- ^ "decodableVersions" - The API server can decode objects encoded in these versions. The encodingVersion must be included in the decodableVersions.
  , V1alpha1ServerStorageVersion -> Maybe Text
v1alpha1ServerStorageVersionEncodingVersion :: !(Maybe Text) -- ^ "encodingVersion" - The API server encodes the object to this version when persisting it in the backend (e.g., etcd).
  , V1alpha1ServerStorageVersion -> Maybe [Text]
v1alpha1ServerStorageVersionServedVersions :: !(Maybe [Text]) -- ^ "servedVersions" - The API server can serve these versions. DecodableVersions must include all ServedVersions.
  } deriving (Int -> V1alpha1ServerStorageVersion -> ShowS
[V1alpha1ServerStorageVersion] -> ShowS
V1alpha1ServerStorageVersion -> String
(Int -> V1alpha1ServerStorageVersion -> ShowS)
-> (V1alpha1ServerStorageVersion -> String)
-> ([V1alpha1ServerStorageVersion] -> ShowS)
-> Show V1alpha1ServerStorageVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha1ServerStorageVersion -> ShowS
showsPrec :: Int -> V1alpha1ServerStorageVersion -> ShowS
$cshow :: V1alpha1ServerStorageVersion -> String
show :: V1alpha1ServerStorageVersion -> String
$cshowList :: [V1alpha1ServerStorageVersion] -> ShowS
showList :: [V1alpha1ServerStorageVersion] -> ShowS
P.Show, V1alpha1ServerStorageVersion
-> V1alpha1ServerStorageVersion -> Bool
(V1alpha1ServerStorageVersion
 -> V1alpha1ServerStorageVersion -> Bool)
-> (V1alpha1ServerStorageVersion
    -> V1alpha1ServerStorageVersion -> Bool)
-> Eq V1alpha1ServerStorageVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha1ServerStorageVersion
-> V1alpha1ServerStorageVersion -> Bool
== :: V1alpha1ServerStorageVersion
-> V1alpha1ServerStorageVersion -> Bool
$c/= :: V1alpha1ServerStorageVersion
-> V1alpha1ServerStorageVersion -> Bool
/= :: V1alpha1ServerStorageVersion
-> V1alpha1ServerStorageVersion -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha1ServerStorageVersion
instance A.FromJSON V1alpha1ServerStorageVersion where
  parseJSON :: Value -> Parser V1alpha1ServerStorageVersion
parseJSON = String
-> (Object -> Parser V1alpha1ServerStorageVersion)
-> Value
-> Parser V1alpha1ServerStorageVersion
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha1ServerStorageVersion" ((Object -> Parser V1alpha1ServerStorageVersion)
 -> Value -> Parser V1alpha1ServerStorageVersion)
-> (Object -> Parser V1alpha1ServerStorageVersion)
-> Value
-> Parser V1alpha1ServerStorageVersion
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> V1alpha1ServerStorageVersion
V1alpha1ServerStorageVersion
      (Maybe Text
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe [Text]
 -> V1alpha1ServerStorageVersion)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe Text -> Maybe [Text] -> V1alpha1ServerStorageVersion)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiServerID")
      Parser
  (Maybe [Text]
   -> Maybe Text -> Maybe [Text] -> V1alpha1ServerStorageVersion)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Text -> Maybe [Text] -> V1alpha1ServerStorageVersion)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"decodableVersions")
      Parser (Maybe Text -> Maybe [Text] -> V1alpha1ServerStorageVersion)
-> Parser (Maybe Text)
-> Parser (Maybe [Text] -> V1alpha1ServerStorageVersion)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"encodingVersion")
      Parser (Maybe [Text] -> V1alpha1ServerStorageVersion)
-> Parser (Maybe [Text]) -> Parser V1alpha1ServerStorageVersion
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"servedVersions")

-- | ToJSON V1alpha1ServerStorageVersion
instance A.ToJSON V1alpha1ServerStorageVersion where
  toJSON :: V1alpha1ServerStorageVersion -> Value
toJSON V1alpha1ServerStorageVersion {Maybe [Text]
Maybe Text
$sel:v1alpha1ServerStorageVersionApiServerId:V1alpha1ServerStorageVersion :: V1alpha1ServerStorageVersion -> Maybe Text
$sel:v1alpha1ServerStorageVersionDecodableVersions:V1alpha1ServerStorageVersion :: V1alpha1ServerStorageVersion -> Maybe [Text]
$sel:v1alpha1ServerStorageVersionEncodingVersion:V1alpha1ServerStorageVersion :: V1alpha1ServerStorageVersion -> Maybe Text
$sel:v1alpha1ServerStorageVersionServedVersions:V1alpha1ServerStorageVersion :: V1alpha1ServerStorageVersion -> Maybe [Text]
v1alpha1ServerStorageVersionApiServerId :: Maybe Text
v1alpha1ServerStorageVersionDecodableVersions :: Maybe [Text]
v1alpha1ServerStorageVersionEncodingVersion :: Maybe Text
v1alpha1ServerStorageVersionServedVersions :: Maybe [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiServerID" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1ServerStorageVersionApiServerId
      , Key
"decodableVersions" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1alpha1ServerStorageVersionDecodableVersions
      , Key
"encodingVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1ServerStorageVersionEncodingVersion
      , Key
"servedVersions" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1alpha1ServerStorageVersionServedVersions
      ]


-- | Construct a value of type 'V1alpha1ServerStorageVersion' (by applying it's required fields, if any)
mkV1alpha1ServerStorageVersion
  :: V1alpha1ServerStorageVersion
mkV1alpha1ServerStorageVersion :: V1alpha1ServerStorageVersion
mkV1alpha1ServerStorageVersion =
  V1alpha1ServerStorageVersion
  { $sel:v1alpha1ServerStorageVersionApiServerId:V1alpha1ServerStorageVersion :: Maybe Text
v1alpha1ServerStorageVersionApiServerId = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha1ServerStorageVersionDecodableVersions:V1alpha1ServerStorageVersion :: Maybe [Text]
v1alpha1ServerStorageVersionDecodableVersions = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1alpha1ServerStorageVersionEncodingVersion:V1alpha1ServerStorageVersion :: Maybe Text
v1alpha1ServerStorageVersionEncodingVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha1ServerStorageVersionServedVersions:V1alpha1ServerStorageVersion :: Maybe [Text]
v1alpha1ServerStorageVersionServedVersions = Maybe [Text]
forall a. Maybe a
Nothing
  }

-- ** V1alpha1StorageVersion
-- | V1alpha1StorageVersion
-- Storage version of a specific resource.
data V1alpha1StorageVersion = V1alpha1StorageVersion
  { V1alpha1StorageVersion -> Maybe Text
v1alpha1StorageVersionApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1alpha1StorageVersion -> Maybe Text
v1alpha1StorageVersionKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1alpha1StorageVersion -> Maybe V1ObjectMeta
v1alpha1StorageVersionMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1alpha1StorageVersion -> Value
v1alpha1StorageVersionSpec :: !(A.Value) -- ^ /Required/ "spec" - Spec is an empty spec. It is here to comply with Kubernetes API style.
  , V1alpha1StorageVersion -> V1alpha1StorageVersionStatus
v1alpha1StorageVersionStatus :: !(V1alpha1StorageVersionStatus) -- ^ /Required/ "status"
  } deriving (Int -> V1alpha1StorageVersion -> ShowS
[V1alpha1StorageVersion] -> ShowS
V1alpha1StorageVersion -> String
(Int -> V1alpha1StorageVersion -> ShowS)
-> (V1alpha1StorageVersion -> String)
-> ([V1alpha1StorageVersion] -> ShowS)
-> Show V1alpha1StorageVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha1StorageVersion -> ShowS
showsPrec :: Int -> V1alpha1StorageVersion -> ShowS
$cshow :: V1alpha1StorageVersion -> String
show :: V1alpha1StorageVersion -> String
$cshowList :: [V1alpha1StorageVersion] -> ShowS
showList :: [V1alpha1StorageVersion] -> ShowS
P.Show, V1alpha1StorageVersion -> V1alpha1StorageVersion -> Bool
(V1alpha1StorageVersion -> V1alpha1StorageVersion -> Bool)
-> (V1alpha1StorageVersion -> V1alpha1StorageVersion -> Bool)
-> Eq V1alpha1StorageVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha1StorageVersion -> V1alpha1StorageVersion -> Bool
== :: V1alpha1StorageVersion -> V1alpha1StorageVersion -> Bool
$c/= :: V1alpha1StorageVersion -> V1alpha1StorageVersion -> Bool
/= :: V1alpha1StorageVersion -> V1alpha1StorageVersion -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha1StorageVersion
instance A.FromJSON V1alpha1StorageVersion where
  parseJSON :: Value -> Parser V1alpha1StorageVersion
parseJSON = String
-> (Object -> Parser V1alpha1StorageVersion)
-> Value
-> Parser V1alpha1StorageVersion
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha1StorageVersion" ((Object -> Parser V1alpha1StorageVersion)
 -> Value -> Parser V1alpha1StorageVersion)
-> (Object -> Parser V1alpha1StorageVersion)
-> Value
-> Parser V1alpha1StorageVersion
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Value
-> V1alpha1StorageVersionStatus
-> V1alpha1StorageVersion
V1alpha1StorageVersion
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Value
 -> V1alpha1StorageVersionStatus
 -> V1alpha1StorageVersion)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Value
      -> V1alpha1StorageVersionStatus
      -> V1alpha1StorageVersion)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Value
   -> V1alpha1StorageVersionStatus
   -> V1alpha1StorageVersion)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Value -> V1alpha1StorageVersionStatus -> V1alpha1StorageVersion)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Value -> V1alpha1StorageVersionStatus -> V1alpha1StorageVersion)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Value -> V1alpha1StorageVersionStatus -> V1alpha1StorageVersion)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (Value -> V1alpha1StorageVersionStatus -> V1alpha1StorageVersion)
-> Parser Value
-> Parser (V1alpha1StorageVersionStatus -> V1alpha1StorageVersion)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Value
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"spec")
      Parser (V1alpha1StorageVersionStatus -> V1alpha1StorageVersion)
-> Parser V1alpha1StorageVersionStatus
-> Parser V1alpha1StorageVersion
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1alpha1StorageVersionStatus
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"status")

-- | ToJSON V1alpha1StorageVersion
instance A.ToJSON V1alpha1StorageVersion where
  toJSON :: V1alpha1StorageVersion -> Value
toJSON V1alpha1StorageVersion {Maybe Text
Maybe V1ObjectMeta
Value
V1alpha1StorageVersionStatus
$sel:v1alpha1StorageVersionApiVersion:V1alpha1StorageVersion :: V1alpha1StorageVersion -> Maybe Text
$sel:v1alpha1StorageVersionKind:V1alpha1StorageVersion :: V1alpha1StorageVersion -> Maybe Text
$sel:v1alpha1StorageVersionMetadata:V1alpha1StorageVersion :: V1alpha1StorageVersion -> Maybe V1ObjectMeta
$sel:v1alpha1StorageVersionSpec:V1alpha1StorageVersion :: V1alpha1StorageVersion -> Value
$sel:v1alpha1StorageVersionStatus:V1alpha1StorageVersion :: V1alpha1StorageVersion -> V1alpha1StorageVersionStatus
v1alpha1StorageVersionApiVersion :: Maybe Text
v1alpha1StorageVersionKind :: Maybe Text
v1alpha1StorageVersionMetadata :: Maybe V1ObjectMeta
v1alpha1StorageVersionSpec :: Value
v1alpha1StorageVersionStatus :: V1alpha1StorageVersionStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1StorageVersionApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1StorageVersionKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1alpha1StorageVersionMetadata
      , Key
"spec" Key -> Value -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Value
v1alpha1StorageVersionSpec
      , Key
"status" Key -> V1alpha1StorageVersionStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1alpha1StorageVersionStatus
v1alpha1StorageVersionStatus
      ]


-- | Construct a value of type 'V1alpha1StorageVersion' (by applying it's required fields, if any)
mkV1alpha1StorageVersion
  :: A.Value -- ^ 'v1alpha1StorageVersionSpec': Spec is an empty spec. It is here to comply with Kubernetes API style.
  -> V1alpha1StorageVersionStatus -- ^ 'v1alpha1StorageVersionStatus' 
  -> V1alpha1StorageVersion
mkV1alpha1StorageVersion :: Value -> V1alpha1StorageVersionStatus -> V1alpha1StorageVersion
mkV1alpha1StorageVersion Value
v1alpha1StorageVersionSpec V1alpha1StorageVersionStatus
v1alpha1StorageVersionStatus =
  V1alpha1StorageVersion
  { $sel:v1alpha1StorageVersionApiVersion:V1alpha1StorageVersion :: Maybe Text
v1alpha1StorageVersionApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha1StorageVersionKind:V1alpha1StorageVersion :: Maybe Text
v1alpha1StorageVersionKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha1StorageVersionMetadata:V1alpha1StorageVersion :: Maybe V1ObjectMeta
v1alpha1StorageVersionMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , Value
$sel:v1alpha1StorageVersionSpec:V1alpha1StorageVersion :: Value
v1alpha1StorageVersionSpec :: Value
v1alpha1StorageVersionSpec
  , V1alpha1StorageVersionStatus
$sel:v1alpha1StorageVersionStatus:V1alpha1StorageVersion :: V1alpha1StorageVersionStatus
v1alpha1StorageVersionStatus :: V1alpha1StorageVersionStatus
v1alpha1StorageVersionStatus
  }

-- ** V1alpha1StorageVersionCondition
-- | V1alpha1StorageVersionCondition
-- Describes the state of the storageVersion at a certain point.
data V1alpha1StorageVersionCondition = V1alpha1StorageVersionCondition
  { V1alpha1StorageVersionCondition -> Maybe DateTime
v1alpha1StorageVersionConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - Last time the condition transitioned from one status to another.
  , V1alpha1StorageVersionCondition -> Text
v1alpha1StorageVersionConditionMessage :: !(Text) -- ^ /Required/ "message" - A human readable message indicating details about the transition.
  , V1alpha1StorageVersionCondition -> Maybe Integer
v1alpha1StorageVersionConditionObservedGeneration :: !(Maybe Integer) -- ^ "observedGeneration" - If set, this represents the .metadata.generation that the condition was set based upon.
  , V1alpha1StorageVersionCondition -> Text
v1alpha1StorageVersionConditionReason :: !(Text) -- ^ /Required/ "reason" - The reason for the condition&#39;s last transition.
  , V1alpha1StorageVersionCondition -> Text
v1alpha1StorageVersionConditionStatus :: !(Text) -- ^ /Required/ "status" - Status of the condition, one of True, False, Unknown.
  , V1alpha1StorageVersionCondition -> Text
v1alpha1StorageVersionConditionType :: !(Text) -- ^ /Required/ "type" - Type of the condition.
  } deriving (Int -> V1alpha1StorageVersionCondition -> ShowS
[V1alpha1StorageVersionCondition] -> ShowS
V1alpha1StorageVersionCondition -> String
(Int -> V1alpha1StorageVersionCondition -> ShowS)
-> (V1alpha1StorageVersionCondition -> String)
-> ([V1alpha1StorageVersionCondition] -> ShowS)
-> Show V1alpha1StorageVersionCondition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha1StorageVersionCondition -> ShowS
showsPrec :: Int -> V1alpha1StorageVersionCondition -> ShowS
$cshow :: V1alpha1StorageVersionCondition -> String
show :: V1alpha1StorageVersionCondition -> String
$cshowList :: [V1alpha1StorageVersionCondition] -> ShowS
showList :: [V1alpha1StorageVersionCondition] -> ShowS
P.Show, V1alpha1StorageVersionCondition
-> V1alpha1StorageVersionCondition -> Bool
(V1alpha1StorageVersionCondition
 -> V1alpha1StorageVersionCondition -> Bool)
-> (V1alpha1StorageVersionCondition
    -> V1alpha1StorageVersionCondition -> Bool)
-> Eq V1alpha1StorageVersionCondition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha1StorageVersionCondition
-> V1alpha1StorageVersionCondition -> Bool
== :: V1alpha1StorageVersionCondition
-> V1alpha1StorageVersionCondition -> Bool
$c/= :: V1alpha1StorageVersionCondition
-> V1alpha1StorageVersionCondition -> Bool
/= :: V1alpha1StorageVersionCondition
-> V1alpha1StorageVersionCondition -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha1StorageVersionCondition
instance A.FromJSON V1alpha1StorageVersionCondition where
  parseJSON :: Value -> Parser V1alpha1StorageVersionCondition
parseJSON = String
-> (Object -> Parser V1alpha1StorageVersionCondition)
-> Value
-> Parser V1alpha1StorageVersionCondition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha1StorageVersionCondition" ((Object -> Parser V1alpha1StorageVersionCondition)
 -> Value -> Parser V1alpha1StorageVersionCondition)
-> (Object -> Parser V1alpha1StorageVersionCondition)
-> Value
-> Parser V1alpha1StorageVersionCondition
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe DateTime
-> Text
-> Maybe Integer
-> Text
-> Text
-> Text
-> V1alpha1StorageVersionCondition
V1alpha1StorageVersionCondition
      (Maybe DateTime
 -> Text
 -> Maybe Integer
 -> Text
 -> Text
 -> Text
 -> V1alpha1StorageVersionCondition)
-> Parser (Maybe DateTime)
-> Parser
     (Text
      -> Maybe Integer
      -> Text
      -> Text
      -> Text
      -> V1alpha1StorageVersionCondition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lastTransitionTime")
      Parser
  (Text
   -> Maybe Integer
   -> Text
   -> Text
   -> Text
   -> V1alpha1StorageVersionCondition)
-> Parser Text
-> Parser
     (Maybe Integer
      -> Text -> Text -> Text -> V1alpha1StorageVersionCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"message")
      Parser
  (Maybe Integer
   -> Text -> Text -> Text -> V1alpha1StorageVersionCondition)
-> Parser (Maybe Integer)
-> Parser (Text -> Text -> Text -> V1alpha1StorageVersionCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"observedGeneration")
      Parser (Text -> Text -> Text -> V1alpha1StorageVersionCondition)
-> Parser Text
-> Parser (Text -> Text -> V1alpha1StorageVersionCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"reason")
      Parser (Text -> Text -> V1alpha1StorageVersionCondition)
-> Parser Text -> Parser (Text -> V1alpha1StorageVersionCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"status")
      Parser (Text -> V1alpha1StorageVersionCondition)
-> Parser Text -> Parser V1alpha1StorageVersionCondition
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"type")

-- | ToJSON V1alpha1StorageVersionCondition
instance A.ToJSON V1alpha1StorageVersionCondition where
  toJSON :: V1alpha1StorageVersionCondition -> Value
toJSON V1alpha1StorageVersionCondition {Maybe Integer
Maybe DateTime
Text
$sel:v1alpha1StorageVersionConditionLastTransitionTime:V1alpha1StorageVersionCondition :: V1alpha1StorageVersionCondition -> Maybe DateTime
$sel:v1alpha1StorageVersionConditionMessage:V1alpha1StorageVersionCondition :: V1alpha1StorageVersionCondition -> Text
$sel:v1alpha1StorageVersionConditionObservedGeneration:V1alpha1StorageVersionCondition :: V1alpha1StorageVersionCondition -> Maybe Integer
$sel:v1alpha1StorageVersionConditionReason:V1alpha1StorageVersionCondition :: V1alpha1StorageVersionCondition -> Text
$sel:v1alpha1StorageVersionConditionStatus:V1alpha1StorageVersionCondition :: V1alpha1StorageVersionCondition -> Text
$sel:v1alpha1StorageVersionConditionType:V1alpha1StorageVersionCondition :: V1alpha1StorageVersionCondition -> Text
v1alpha1StorageVersionConditionLastTransitionTime :: Maybe DateTime
v1alpha1StorageVersionConditionMessage :: Text
v1alpha1StorageVersionConditionObservedGeneration :: Maybe Integer
v1alpha1StorageVersionConditionReason :: Text
v1alpha1StorageVersionConditionStatus :: Text
v1alpha1StorageVersionConditionType :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"lastTransitionTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1alpha1StorageVersionConditionLastTransitionTime
      , Key
"message" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha1StorageVersionConditionMessage
      , Key
"observedGeneration" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1alpha1StorageVersionConditionObservedGeneration
      , Key
"reason" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha1StorageVersionConditionReason
      , Key
"status" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha1StorageVersionConditionStatus
      , Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha1StorageVersionConditionType
      ]


-- | Construct a value of type 'V1alpha1StorageVersionCondition' (by applying it's required fields, if any)
mkV1alpha1StorageVersionCondition
  :: Text -- ^ 'v1alpha1StorageVersionConditionMessage': A human readable message indicating details about the transition.
  -> Text -- ^ 'v1alpha1StorageVersionConditionReason': The reason for the condition's last transition.
  -> Text -- ^ 'v1alpha1StorageVersionConditionStatus': Status of the condition, one of True, False, Unknown.
  -> Text -- ^ 'v1alpha1StorageVersionConditionType': Type of the condition.
  -> V1alpha1StorageVersionCondition
mkV1alpha1StorageVersionCondition :: Text -> Text -> Text -> Text -> V1alpha1StorageVersionCondition
mkV1alpha1StorageVersionCondition Text
v1alpha1StorageVersionConditionMessage Text
v1alpha1StorageVersionConditionReason Text
v1alpha1StorageVersionConditionStatus Text
v1alpha1StorageVersionConditionType =
  V1alpha1StorageVersionCondition
  { $sel:v1alpha1StorageVersionConditionLastTransitionTime:V1alpha1StorageVersionCondition :: Maybe DateTime
v1alpha1StorageVersionConditionLastTransitionTime = Maybe DateTime
forall a. Maybe a
Nothing
  , Text
$sel:v1alpha1StorageVersionConditionMessage:V1alpha1StorageVersionCondition :: Text
v1alpha1StorageVersionConditionMessage :: Text
v1alpha1StorageVersionConditionMessage
  , $sel:v1alpha1StorageVersionConditionObservedGeneration:V1alpha1StorageVersionCondition :: Maybe Integer
v1alpha1StorageVersionConditionObservedGeneration = Maybe Integer
forall a. Maybe a
Nothing
  , Text
$sel:v1alpha1StorageVersionConditionReason:V1alpha1StorageVersionCondition :: Text
v1alpha1StorageVersionConditionReason :: Text
v1alpha1StorageVersionConditionReason
  , Text
$sel:v1alpha1StorageVersionConditionStatus:V1alpha1StorageVersionCondition :: Text
v1alpha1StorageVersionConditionStatus :: Text
v1alpha1StorageVersionConditionStatus
  , Text
$sel:v1alpha1StorageVersionConditionType:V1alpha1StorageVersionCondition :: Text
v1alpha1StorageVersionConditionType :: Text
v1alpha1StorageVersionConditionType
  }

-- ** V1alpha1StorageVersionList
-- | V1alpha1StorageVersionList
-- A list of StorageVersions.
data V1alpha1StorageVersionList = V1alpha1StorageVersionList
  { V1alpha1StorageVersionList -> Maybe Text
v1alpha1StorageVersionListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1alpha1StorageVersionList -> [V1alpha1StorageVersion]
v1alpha1StorageVersionListItems :: !([V1alpha1StorageVersion]) -- ^ /Required/ "items" - Items holds a list of StorageVersion
  , V1alpha1StorageVersionList -> Maybe Text
v1alpha1StorageVersionListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1alpha1StorageVersionList -> Maybe V1ListMeta
v1alpha1StorageVersionListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1alpha1StorageVersionList -> ShowS
[V1alpha1StorageVersionList] -> ShowS
V1alpha1StorageVersionList -> String
(Int -> V1alpha1StorageVersionList -> ShowS)
-> (V1alpha1StorageVersionList -> String)
-> ([V1alpha1StorageVersionList] -> ShowS)
-> Show V1alpha1StorageVersionList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha1StorageVersionList -> ShowS
showsPrec :: Int -> V1alpha1StorageVersionList -> ShowS
$cshow :: V1alpha1StorageVersionList -> String
show :: V1alpha1StorageVersionList -> String
$cshowList :: [V1alpha1StorageVersionList] -> ShowS
showList :: [V1alpha1StorageVersionList] -> ShowS
P.Show, V1alpha1StorageVersionList -> V1alpha1StorageVersionList -> Bool
(V1alpha1StorageVersionList -> V1alpha1StorageVersionList -> Bool)
-> (V1alpha1StorageVersionList
    -> V1alpha1StorageVersionList -> Bool)
-> Eq V1alpha1StorageVersionList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha1StorageVersionList -> V1alpha1StorageVersionList -> Bool
== :: V1alpha1StorageVersionList -> V1alpha1StorageVersionList -> Bool
$c/= :: V1alpha1StorageVersionList -> V1alpha1StorageVersionList -> Bool
/= :: V1alpha1StorageVersionList -> V1alpha1StorageVersionList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha1StorageVersionList
instance A.FromJSON V1alpha1StorageVersionList where
  parseJSON :: Value -> Parser V1alpha1StorageVersionList
parseJSON = String
-> (Object -> Parser V1alpha1StorageVersionList)
-> Value
-> Parser V1alpha1StorageVersionList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha1StorageVersionList" ((Object -> Parser V1alpha1StorageVersionList)
 -> Value -> Parser V1alpha1StorageVersionList)
-> (Object -> Parser V1alpha1StorageVersionList)
-> Value
-> Parser V1alpha1StorageVersionList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1alpha1StorageVersion]
-> Maybe Text
-> Maybe V1ListMeta
-> V1alpha1StorageVersionList
V1alpha1StorageVersionList
      (Maybe Text
 -> [V1alpha1StorageVersion]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1alpha1StorageVersionList)
-> Parser (Maybe Text)
-> Parser
     ([V1alpha1StorageVersion]
      -> Maybe Text -> Maybe V1ListMeta -> V1alpha1StorageVersionList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1alpha1StorageVersion]
   -> Maybe Text -> Maybe V1ListMeta -> V1alpha1StorageVersionList)
-> Parser [V1alpha1StorageVersion]
-> Parser
     (Maybe Text -> Maybe V1ListMeta -> V1alpha1StorageVersionList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1alpha1StorageVersion]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser
  (Maybe Text -> Maybe V1ListMeta -> V1alpha1StorageVersionList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1alpha1StorageVersionList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1alpha1StorageVersionList)
-> Parser (Maybe V1ListMeta) -> Parser V1alpha1StorageVersionList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1alpha1StorageVersionList
instance A.ToJSON V1alpha1StorageVersionList where
  toJSON :: V1alpha1StorageVersionList -> Value
toJSON V1alpha1StorageVersionList {[V1alpha1StorageVersion]
Maybe Text
Maybe V1ListMeta
$sel:v1alpha1StorageVersionListApiVersion:V1alpha1StorageVersionList :: V1alpha1StorageVersionList -> Maybe Text
$sel:v1alpha1StorageVersionListItems:V1alpha1StorageVersionList :: V1alpha1StorageVersionList -> [V1alpha1StorageVersion]
$sel:v1alpha1StorageVersionListKind:V1alpha1StorageVersionList :: V1alpha1StorageVersionList -> Maybe Text
$sel:v1alpha1StorageVersionListMetadata:V1alpha1StorageVersionList :: V1alpha1StorageVersionList -> Maybe V1ListMeta
v1alpha1StorageVersionListApiVersion :: Maybe Text
v1alpha1StorageVersionListItems :: [V1alpha1StorageVersion]
v1alpha1StorageVersionListKind :: Maybe Text
v1alpha1StorageVersionListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1StorageVersionListApiVersion
      , Key
"items" Key -> [V1alpha1StorageVersion] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1alpha1StorageVersion]
v1alpha1StorageVersionListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1StorageVersionListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1alpha1StorageVersionListMetadata
      ]


-- | Construct a value of type 'V1alpha1StorageVersionList' (by applying it's required fields, if any)
mkV1alpha1StorageVersionList
  :: [V1alpha1StorageVersion] -- ^ 'v1alpha1StorageVersionListItems': Items holds a list of StorageVersion
  -> V1alpha1StorageVersionList
mkV1alpha1StorageVersionList :: [V1alpha1StorageVersion] -> V1alpha1StorageVersionList
mkV1alpha1StorageVersionList [V1alpha1StorageVersion]
v1alpha1StorageVersionListItems =
  V1alpha1StorageVersionList
  { $sel:v1alpha1StorageVersionListApiVersion:V1alpha1StorageVersionList :: Maybe Text
v1alpha1StorageVersionListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1alpha1StorageVersion]
$sel:v1alpha1StorageVersionListItems:V1alpha1StorageVersionList :: [V1alpha1StorageVersion]
v1alpha1StorageVersionListItems :: [V1alpha1StorageVersion]
v1alpha1StorageVersionListItems
  , $sel:v1alpha1StorageVersionListKind:V1alpha1StorageVersionList :: Maybe Text
v1alpha1StorageVersionListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha1StorageVersionListMetadata:V1alpha1StorageVersionList :: Maybe V1ListMeta
v1alpha1StorageVersionListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1alpha1StorageVersionMigration
-- | V1alpha1StorageVersionMigration
-- StorageVersionMigration represents a migration of stored data to the latest storage version.
data V1alpha1StorageVersionMigration = V1alpha1StorageVersionMigration
  { V1alpha1StorageVersionMigration -> Maybe Text
v1alpha1StorageVersionMigrationApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1alpha1StorageVersionMigration -> Maybe Text
v1alpha1StorageVersionMigrationKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1alpha1StorageVersionMigration -> Maybe V1ObjectMeta
v1alpha1StorageVersionMigrationMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1alpha1StorageVersionMigration
-> Maybe V1alpha1StorageVersionMigrationSpec
v1alpha1StorageVersionMigrationSpec :: !(Maybe V1alpha1StorageVersionMigrationSpec) -- ^ "spec"
  , V1alpha1StorageVersionMigration
-> Maybe V1alpha1StorageVersionMigrationStatus
v1alpha1StorageVersionMigrationStatus :: !(Maybe V1alpha1StorageVersionMigrationStatus) -- ^ "status"
  } deriving (Int -> V1alpha1StorageVersionMigration -> ShowS
[V1alpha1StorageVersionMigration] -> ShowS
V1alpha1StorageVersionMigration -> String
(Int -> V1alpha1StorageVersionMigration -> ShowS)
-> (V1alpha1StorageVersionMigration -> String)
-> ([V1alpha1StorageVersionMigration] -> ShowS)
-> Show V1alpha1StorageVersionMigration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha1StorageVersionMigration -> ShowS
showsPrec :: Int -> V1alpha1StorageVersionMigration -> ShowS
$cshow :: V1alpha1StorageVersionMigration -> String
show :: V1alpha1StorageVersionMigration -> String
$cshowList :: [V1alpha1StorageVersionMigration] -> ShowS
showList :: [V1alpha1StorageVersionMigration] -> ShowS
P.Show, V1alpha1StorageVersionMigration
-> V1alpha1StorageVersionMigration -> Bool
(V1alpha1StorageVersionMigration
 -> V1alpha1StorageVersionMigration -> Bool)
-> (V1alpha1StorageVersionMigration
    -> V1alpha1StorageVersionMigration -> Bool)
-> Eq V1alpha1StorageVersionMigration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha1StorageVersionMigration
-> V1alpha1StorageVersionMigration -> Bool
== :: V1alpha1StorageVersionMigration
-> V1alpha1StorageVersionMigration -> Bool
$c/= :: V1alpha1StorageVersionMigration
-> V1alpha1StorageVersionMigration -> Bool
/= :: V1alpha1StorageVersionMigration
-> V1alpha1StorageVersionMigration -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha1StorageVersionMigration
instance A.FromJSON V1alpha1StorageVersionMigration where
  parseJSON :: Value -> Parser V1alpha1StorageVersionMigration
parseJSON = String
-> (Object -> Parser V1alpha1StorageVersionMigration)
-> Value
-> Parser V1alpha1StorageVersionMigration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha1StorageVersionMigration" ((Object -> Parser V1alpha1StorageVersionMigration)
 -> Value -> Parser V1alpha1StorageVersionMigration)
-> (Object -> Parser V1alpha1StorageVersionMigration)
-> Value
-> Parser V1alpha1StorageVersionMigration
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1alpha1StorageVersionMigrationSpec
-> Maybe V1alpha1StorageVersionMigrationStatus
-> V1alpha1StorageVersionMigration
V1alpha1StorageVersionMigration
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1alpha1StorageVersionMigrationSpec
 -> Maybe V1alpha1StorageVersionMigrationStatus
 -> V1alpha1StorageVersionMigration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1alpha1StorageVersionMigrationSpec
      -> Maybe V1alpha1StorageVersionMigrationStatus
      -> V1alpha1StorageVersionMigration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1alpha1StorageVersionMigrationSpec
   -> Maybe V1alpha1StorageVersionMigrationStatus
   -> V1alpha1StorageVersionMigration)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1alpha1StorageVersionMigrationSpec
      -> Maybe V1alpha1StorageVersionMigrationStatus
      -> V1alpha1StorageVersionMigration)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1alpha1StorageVersionMigrationSpec
   -> Maybe V1alpha1StorageVersionMigrationStatus
   -> V1alpha1StorageVersionMigration)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe V1alpha1StorageVersionMigrationSpec
      -> Maybe V1alpha1StorageVersionMigrationStatus
      -> V1alpha1StorageVersionMigration)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (Maybe V1alpha1StorageVersionMigrationSpec
   -> Maybe V1alpha1StorageVersionMigrationStatus
   -> V1alpha1StorageVersionMigration)
-> Parser (Maybe V1alpha1StorageVersionMigrationSpec)
-> Parser
     (Maybe V1alpha1StorageVersionMigrationStatus
      -> V1alpha1StorageVersionMigration)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1alpha1StorageVersionMigrationSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")
      Parser
  (Maybe V1alpha1StorageVersionMigrationStatus
   -> V1alpha1StorageVersionMigration)
-> Parser (Maybe V1alpha1StorageVersionMigrationStatus)
-> Parser V1alpha1StorageVersionMigration
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object
-> Key -> Parser (Maybe V1alpha1StorageVersionMigrationStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1alpha1StorageVersionMigration
instance A.ToJSON V1alpha1StorageVersionMigration where
  toJSON :: V1alpha1StorageVersionMigration -> Value
toJSON V1alpha1StorageVersionMigration {Maybe Text
Maybe V1alpha1StorageVersionMigrationStatus
Maybe V1alpha1StorageVersionMigrationSpec
Maybe V1ObjectMeta
$sel:v1alpha1StorageVersionMigrationApiVersion:V1alpha1StorageVersionMigration :: V1alpha1StorageVersionMigration -> Maybe Text
$sel:v1alpha1StorageVersionMigrationKind:V1alpha1StorageVersionMigration :: V1alpha1StorageVersionMigration -> Maybe Text
$sel:v1alpha1StorageVersionMigrationMetadata:V1alpha1StorageVersionMigration :: V1alpha1StorageVersionMigration -> Maybe V1ObjectMeta
$sel:v1alpha1StorageVersionMigrationSpec:V1alpha1StorageVersionMigration :: V1alpha1StorageVersionMigration
-> Maybe V1alpha1StorageVersionMigrationSpec
$sel:v1alpha1StorageVersionMigrationStatus:V1alpha1StorageVersionMigration :: V1alpha1StorageVersionMigration
-> Maybe V1alpha1StorageVersionMigrationStatus
v1alpha1StorageVersionMigrationApiVersion :: Maybe Text
v1alpha1StorageVersionMigrationKind :: Maybe Text
v1alpha1StorageVersionMigrationMetadata :: Maybe V1ObjectMeta
v1alpha1StorageVersionMigrationSpec :: Maybe V1alpha1StorageVersionMigrationSpec
v1alpha1StorageVersionMigrationStatus :: Maybe V1alpha1StorageVersionMigrationStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1StorageVersionMigrationApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1StorageVersionMigrationKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1alpha1StorageVersionMigrationMetadata
      , Key
"spec" Key -> Maybe V1alpha1StorageVersionMigrationSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1alpha1StorageVersionMigrationSpec
v1alpha1StorageVersionMigrationSpec
      , Key
"status" Key -> Maybe V1alpha1StorageVersionMigrationStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1alpha1StorageVersionMigrationStatus
v1alpha1StorageVersionMigrationStatus
      ]


-- | Construct a value of type 'V1alpha1StorageVersionMigration' (by applying it's required fields, if any)
mkV1alpha1StorageVersionMigration
  :: V1alpha1StorageVersionMigration
mkV1alpha1StorageVersionMigration :: V1alpha1StorageVersionMigration
mkV1alpha1StorageVersionMigration =
  V1alpha1StorageVersionMigration
  { $sel:v1alpha1StorageVersionMigrationApiVersion:V1alpha1StorageVersionMigration :: Maybe Text
v1alpha1StorageVersionMigrationApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha1StorageVersionMigrationKind:V1alpha1StorageVersionMigration :: Maybe Text
v1alpha1StorageVersionMigrationKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha1StorageVersionMigrationMetadata:V1alpha1StorageVersionMigration :: Maybe V1ObjectMeta
v1alpha1StorageVersionMigrationMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1alpha1StorageVersionMigrationSpec:V1alpha1StorageVersionMigration :: Maybe V1alpha1StorageVersionMigrationSpec
v1alpha1StorageVersionMigrationSpec = Maybe V1alpha1StorageVersionMigrationSpec
forall a. Maybe a
Nothing
  , $sel:v1alpha1StorageVersionMigrationStatus:V1alpha1StorageVersionMigration :: Maybe V1alpha1StorageVersionMigrationStatus
v1alpha1StorageVersionMigrationStatus = Maybe V1alpha1StorageVersionMigrationStatus
forall a. Maybe a
Nothing
  }

-- ** V1alpha1StorageVersionMigrationList
-- | V1alpha1StorageVersionMigrationList
-- StorageVersionMigrationList is a collection of storage version migrations.
data V1alpha1StorageVersionMigrationList = V1alpha1StorageVersionMigrationList
  { V1alpha1StorageVersionMigrationList -> Maybe Text
v1alpha1StorageVersionMigrationListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1alpha1StorageVersionMigrationList
-> [V1alpha1StorageVersionMigration]
v1alpha1StorageVersionMigrationListItems :: !([V1alpha1StorageVersionMigration]) -- ^ /Required/ "items" - Items is the list of StorageVersionMigration
  , V1alpha1StorageVersionMigrationList -> Maybe Text
v1alpha1StorageVersionMigrationListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1alpha1StorageVersionMigrationList -> Maybe V1ListMeta
v1alpha1StorageVersionMigrationListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1alpha1StorageVersionMigrationList -> ShowS
[V1alpha1StorageVersionMigrationList] -> ShowS
V1alpha1StorageVersionMigrationList -> String
(Int -> V1alpha1StorageVersionMigrationList -> ShowS)
-> (V1alpha1StorageVersionMigrationList -> String)
-> ([V1alpha1StorageVersionMigrationList] -> ShowS)
-> Show V1alpha1StorageVersionMigrationList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha1StorageVersionMigrationList -> ShowS
showsPrec :: Int -> V1alpha1StorageVersionMigrationList -> ShowS
$cshow :: V1alpha1StorageVersionMigrationList -> String
show :: V1alpha1StorageVersionMigrationList -> String
$cshowList :: [V1alpha1StorageVersionMigrationList] -> ShowS
showList :: [V1alpha1StorageVersionMigrationList] -> ShowS
P.Show, V1alpha1StorageVersionMigrationList
-> V1alpha1StorageVersionMigrationList -> Bool
(V1alpha1StorageVersionMigrationList
 -> V1alpha1StorageVersionMigrationList -> Bool)
-> (V1alpha1StorageVersionMigrationList
    -> V1alpha1StorageVersionMigrationList -> Bool)
-> Eq V1alpha1StorageVersionMigrationList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha1StorageVersionMigrationList
-> V1alpha1StorageVersionMigrationList -> Bool
== :: V1alpha1StorageVersionMigrationList
-> V1alpha1StorageVersionMigrationList -> Bool
$c/= :: V1alpha1StorageVersionMigrationList
-> V1alpha1StorageVersionMigrationList -> Bool
/= :: V1alpha1StorageVersionMigrationList
-> V1alpha1StorageVersionMigrationList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha1StorageVersionMigrationList
instance A.FromJSON V1alpha1StorageVersionMigrationList where
  parseJSON :: Value -> Parser V1alpha1StorageVersionMigrationList
parseJSON = String
-> (Object -> Parser V1alpha1StorageVersionMigrationList)
-> Value
-> Parser V1alpha1StorageVersionMigrationList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha1StorageVersionMigrationList" ((Object -> Parser V1alpha1StorageVersionMigrationList)
 -> Value -> Parser V1alpha1StorageVersionMigrationList)
-> (Object -> Parser V1alpha1StorageVersionMigrationList)
-> Value
-> Parser V1alpha1StorageVersionMigrationList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1alpha1StorageVersionMigration]
-> Maybe Text
-> Maybe V1ListMeta
-> V1alpha1StorageVersionMigrationList
V1alpha1StorageVersionMigrationList
      (Maybe Text
 -> [V1alpha1StorageVersionMigration]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1alpha1StorageVersionMigrationList)
-> Parser (Maybe Text)
-> Parser
     ([V1alpha1StorageVersionMigration]
      -> Maybe Text
      -> Maybe V1ListMeta
      -> V1alpha1StorageVersionMigrationList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1alpha1StorageVersionMigration]
   -> Maybe Text
   -> Maybe V1ListMeta
   -> V1alpha1StorageVersionMigrationList)
-> Parser [V1alpha1StorageVersionMigration]
-> Parser
     (Maybe Text
      -> Maybe V1ListMeta -> V1alpha1StorageVersionMigrationList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1alpha1StorageVersionMigration]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser
  (Maybe Text
   -> Maybe V1ListMeta -> V1alpha1StorageVersionMigrationList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1alpha1StorageVersionMigrationList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1alpha1StorageVersionMigrationList)
-> Parser (Maybe V1ListMeta)
-> Parser V1alpha1StorageVersionMigrationList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1alpha1StorageVersionMigrationList
instance A.ToJSON V1alpha1StorageVersionMigrationList where
  toJSON :: V1alpha1StorageVersionMigrationList -> Value
toJSON V1alpha1StorageVersionMigrationList {[V1alpha1StorageVersionMigration]
Maybe Text
Maybe V1ListMeta
$sel:v1alpha1StorageVersionMigrationListApiVersion:V1alpha1StorageVersionMigrationList :: V1alpha1StorageVersionMigrationList -> Maybe Text
$sel:v1alpha1StorageVersionMigrationListItems:V1alpha1StorageVersionMigrationList :: V1alpha1StorageVersionMigrationList
-> [V1alpha1StorageVersionMigration]
$sel:v1alpha1StorageVersionMigrationListKind:V1alpha1StorageVersionMigrationList :: V1alpha1StorageVersionMigrationList -> Maybe Text
$sel:v1alpha1StorageVersionMigrationListMetadata:V1alpha1StorageVersionMigrationList :: V1alpha1StorageVersionMigrationList -> Maybe V1ListMeta
v1alpha1StorageVersionMigrationListApiVersion :: Maybe Text
v1alpha1StorageVersionMigrationListItems :: [V1alpha1StorageVersionMigration]
v1alpha1StorageVersionMigrationListKind :: Maybe Text
v1alpha1StorageVersionMigrationListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1StorageVersionMigrationListApiVersion
      , Key
"items" Key -> [V1alpha1StorageVersionMigration] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1alpha1StorageVersionMigration]
v1alpha1StorageVersionMigrationListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1StorageVersionMigrationListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1alpha1StorageVersionMigrationListMetadata
      ]


-- | Construct a value of type 'V1alpha1StorageVersionMigrationList' (by applying it's required fields, if any)
mkV1alpha1StorageVersionMigrationList
  :: [V1alpha1StorageVersionMigration] -- ^ 'v1alpha1StorageVersionMigrationListItems': Items is the list of StorageVersionMigration
  -> V1alpha1StorageVersionMigrationList
mkV1alpha1StorageVersionMigrationList :: [V1alpha1StorageVersionMigration]
-> V1alpha1StorageVersionMigrationList
mkV1alpha1StorageVersionMigrationList [V1alpha1StorageVersionMigration]
v1alpha1StorageVersionMigrationListItems =
  V1alpha1StorageVersionMigrationList
  { $sel:v1alpha1StorageVersionMigrationListApiVersion:V1alpha1StorageVersionMigrationList :: Maybe Text
v1alpha1StorageVersionMigrationListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1alpha1StorageVersionMigration]
$sel:v1alpha1StorageVersionMigrationListItems:V1alpha1StorageVersionMigrationList :: [V1alpha1StorageVersionMigration]
v1alpha1StorageVersionMigrationListItems :: [V1alpha1StorageVersionMigration]
v1alpha1StorageVersionMigrationListItems
  , $sel:v1alpha1StorageVersionMigrationListKind:V1alpha1StorageVersionMigrationList :: Maybe Text
v1alpha1StorageVersionMigrationListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha1StorageVersionMigrationListMetadata:V1alpha1StorageVersionMigrationList :: Maybe V1ListMeta
v1alpha1StorageVersionMigrationListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1alpha1StorageVersionMigrationSpec
-- | V1alpha1StorageVersionMigrationSpec
-- Spec of the storage version migration.
data V1alpha1StorageVersionMigrationSpec = V1alpha1StorageVersionMigrationSpec
  { V1alpha1StorageVersionMigrationSpec -> Maybe Text
v1alpha1StorageVersionMigrationSpecContinueToken :: !(Maybe Text) -- ^ "continueToken" - The token used in the list options to get the next chunk of objects to migrate. When the .status.conditions indicates the migration is \&quot;Running\&quot;, users can use this token to check the progress of the migration.
  , V1alpha1StorageVersionMigrationSpec -> V1alpha1GroupVersionResource
v1alpha1StorageVersionMigrationSpecResource :: !(V1alpha1GroupVersionResource) -- ^ /Required/ "resource"
  } deriving (Int -> V1alpha1StorageVersionMigrationSpec -> ShowS
[V1alpha1StorageVersionMigrationSpec] -> ShowS
V1alpha1StorageVersionMigrationSpec -> String
(Int -> V1alpha1StorageVersionMigrationSpec -> ShowS)
-> (V1alpha1StorageVersionMigrationSpec -> String)
-> ([V1alpha1StorageVersionMigrationSpec] -> ShowS)
-> Show V1alpha1StorageVersionMigrationSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha1StorageVersionMigrationSpec -> ShowS
showsPrec :: Int -> V1alpha1StorageVersionMigrationSpec -> ShowS
$cshow :: V1alpha1StorageVersionMigrationSpec -> String
show :: V1alpha1StorageVersionMigrationSpec -> String
$cshowList :: [V1alpha1StorageVersionMigrationSpec] -> ShowS
showList :: [V1alpha1StorageVersionMigrationSpec] -> ShowS
P.Show, V1alpha1StorageVersionMigrationSpec
-> V1alpha1StorageVersionMigrationSpec -> Bool
(V1alpha1StorageVersionMigrationSpec
 -> V1alpha1StorageVersionMigrationSpec -> Bool)
-> (V1alpha1StorageVersionMigrationSpec
    -> V1alpha1StorageVersionMigrationSpec -> Bool)
-> Eq V1alpha1StorageVersionMigrationSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha1StorageVersionMigrationSpec
-> V1alpha1StorageVersionMigrationSpec -> Bool
== :: V1alpha1StorageVersionMigrationSpec
-> V1alpha1StorageVersionMigrationSpec -> Bool
$c/= :: V1alpha1StorageVersionMigrationSpec
-> V1alpha1StorageVersionMigrationSpec -> Bool
/= :: V1alpha1StorageVersionMigrationSpec
-> V1alpha1StorageVersionMigrationSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha1StorageVersionMigrationSpec
instance A.FromJSON V1alpha1StorageVersionMigrationSpec where
  parseJSON :: Value -> Parser V1alpha1StorageVersionMigrationSpec
parseJSON = String
-> (Object -> Parser V1alpha1StorageVersionMigrationSpec)
-> Value
-> Parser V1alpha1StorageVersionMigrationSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha1StorageVersionMigrationSpec" ((Object -> Parser V1alpha1StorageVersionMigrationSpec)
 -> Value -> Parser V1alpha1StorageVersionMigrationSpec)
-> (Object -> Parser V1alpha1StorageVersionMigrationSpec)
-> Value
-> Parser V1alpha1StorageVersionMigrationSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> V1alpha1GroupVersionResource
-> V1alpha1StorageVersionMigrationSpec
V1alpha1StorageVersionMigrationSpec
      (Maybe Text
 -> V1alpha1GroupVersionResource
 -> V1alpha1StorageVersionMigrationSpec)
-> Parser (Maybe Text)
-> Parser
     (V1alpha1GroupVersionResource
      -> V1alpha1StorageVersionMigrationSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"continueToken")
      Parser
  (V1alpha1GroupVersionResource
   -> V1alpha1StorageVersionMigrationSpec)
-> Parser V1alpha1GroupVersionResource
-> Parser V1alpha1StorageVersionMigrationSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1alpha1GroupVersionResource
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"resource")

-- | ToJSON V1alpha1StorageVersionMigrationSpec
instance A.ToJSON V1alpha1StorageVersionMigrationSpec where
  toJSON :: V1alpha1StorageVersionMigrationSpec -> Value
toJSON V1alpha1StorageVersionMigrationSpec {Maybe Text
V1alpha1GroupVersionResource
$sel:v1alpha1StorageVersionMigrationSpecContinueToken:V1alpha1StorageVersionMigrationSpec :: V1alpha1StorageVersionMigrationSpec -> Maybe Text
$sel:v1alpha1StorageVersionMigrationSpecResource:V1alpha1StorageVersionMigrationSpec :: V1alpha1StorageVersionMigrationSpec -> V1alpha1GroupVersionResource
v1alpha1StorageVersionMigrationSpecContinueToken :: Maybe Text
v1alpha1StorageVersionMigrationSpecResource :: V1alpha1GroupVersionResource
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"continueToken" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1StorageVersionMigrationSpecContinueToken
      , Key
"resource" Key -> V1alpha1GroupVersionResource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1alpha1GroupVersionResource
v1alpha1StorageVersionMigrationSpecResource
      ]


-- | Construct a value of type 'V1alpha1StorageVersionMigrationSpec' (by applying it's required fields, if any)
mkV1alpha1StorageVersionMigrationSpec
  :: V1alpha1GroupVersionResource -- ^ 'v1alpha1StorageVersionMigrationSpecResource' 
  -> V1alpha1StorageVersionMigrationSpec
mkV1alpha1StorageVersionMigrationSpec :: V1alpha1GroupVersionResource -> V1alpha1StorageVersionMigrationSpec
mkV1alpha1StorageVersionMigrationSpec V1alpha1GroupVersionResource
v1alpha1StorageVersionMigrationSpecResource =
  V1alpha1StorageVersionMigrationSpec
  { $sel:v1alpha1StorageVersionMigrationSpecContinueToken:V1alpha1StorageVersionMigrationSpec :: Maybe Text
v1alpha1StorageVersionMigrationSpecContinueToken = Maybe Text
forall a. Maybe a
Nothing
  , V1alpha1GroupVersionResource
$sel:v1alpha1StorageVersionMigrationSpecResource:V1alpha1StorageVersionMigrationSpec :: V1alpha1GroupVersionResource
v1alpha1StorageVersionMigrationSpecResource :: V1alpha1GroupVersionResource
v1alpha1StorageVersionMigrationSpecResource
  }

-- ** V1alpha1StorageVersionMigrationStatus
-- | V1alpha1StorageVersionMigrationStatus
-- Status of the storage version migration.
data V1alpha1StorageVersionMigrationStatus = V1alpha1StorageVersionMigrationStatus
  { V1alpha1StorageVersionMigrationStatus
-> Maybe [V1alpha1MigrationCondition]
v1alpha1StorageVersionMigrationStatusConditions :: !(Maybe [V1alpha1MigrationCondition]) -- ^ "conditions" - The latest available observations of the migration&#39;s current state.
  , V1alpha1StorageVersionMigrationStatus -> Maybe Text
v1alpha1StorageVersionMigrationStatusResourceVersion :: !(Maybe Text) -- ^ "resourceVersion" - ResourceVersion to compare with the GC cache for performing the migration. This is the current resource version of given group, version and resource when kube-controller-manager first observes this StorageVersionMigration resource.
  } deriving (Int -> V1alpha1StorageVersionMigrationStatus -> ShowS
[V1alpha1StorageVersionMigrationStatus] -> ShowS
V1alpha1StorageVersionMigrationStatus -> String
(Int -> V1alpha1StorageVersionMigrationStatus -> ShowS)
-> (V1alpha1StorageVersionMigrationStatus -> String)
-> ([V1alpha1StorageVersionMigrationStatus] -> ShowS)
-> Show V1alpha1StorageVersionMigrationStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha1StorageVersionMigrationStatus -> ShowS
showsPrec :: Int -> V1alpha1StorageVersionMigrationStatus -> ShowS
$cshow :: V1alpha1StorageVersionMigrationStatus -> String
show :: V1alpha1StorageVersionMigrationStatus -> String
$cshowList :: [V1alpha1StorageVersionMigrationStatus] -> ShowS
showList :: [V1alpha1StorageVersionMigrationStatus] -> ShowS
P.Show, V1alpha1StorageVersionMigrationStatus
-> V1alpha1StorageVersionMigrationStatus -> Bool
(V1alpha1StorageVersionMigrationStatus
 -> V1alpha1StorageVersionMigrationStatus -> Bool)
-> (V1alpha1StorageVersionMigrationStatus
    -> V1alpha1StorageVersionMigrationStatus -> Bool)
-> Eq V1alpha1StorageVersionMigrationStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha1StorageVersionMigrationStatus
-> V1alpha1StorageVersionMigrationStatus -> Bool
== :: V1alpha1StorageVersionMigrationStatus
-> V1alpha1StorageVersionMigrationStatus -> Bool
$c/= :: V1alpha1StorageVersionMigrationStatus
-> V1alpha1StorageVersionMigrationStatus -> Bool
/= :: V1alpha1StorageVersionMigrationStatus
-> V1alpha1StorageVersionMigrationStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha1StorageVersionMigrationStatus
instance A.FromJSON V1alpha1StorageVersionMigrationStatus where
  parseJSON :: Value -> Parser V1alpha1StorageVersionMigrationStatus
parseJSON = String
-> (Object -> Parser V1alpha1StorageVersionMigrationStatus)
-> Value
-> Parser V1alpha1StorageVersionMigrationStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha1StorageVersionMigrationStatus" ((Object -> Parser V1alpha1StorageVersionMigrationStatus)
 -> Value -> Parser V1alpha1StorageVersionMigrationStatus)
-> (Object -> Parser V1alpha1StorageVersionMigrationStatus)
-> Value
-> Parser V1alpha1StorageVersionMigrationStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1alpha1MigrationCondition]
-> Maybe Text -> V1alpha1StorageVersionMigrationStatus
V1alpha1StorageVersionMigrationStatus
      (Maybe [V1alpha1MigrationCondition]
 -> Maybe Text -> V1alpha1StorageVersionMigrationStatus)
-> Parser (Maybe [V1alpha1MigrationCondition])
-> Parser (Maybe Text -> V1alpha1StorageVersionMigrationStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1alpha1MigrationCondition])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"conditions")
      Parser (Maybe Text -> V1alpha1StorageVersionMigrationStatus)
-> Parser (Maybe Text)
-> Parser V1alpha1StorageVersionMigrationStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resourceVersion")

-- | ToJSON V1alpha1StorageVersionMigrationStatus
instance A.ToJSON V1alpha1StorageVersionMigrationStatus where
  toJSON :: V1alpha1StorageVersionMigrationStatus -> Value
toJSON V1alpha1StorageVersionMigrationStatus {Maybe [V1alpha1MigrationCondition]
Maybe Text
$sel:v1alpha1StorageVersionMigrationStatusConditions:V1alpha1StorageVersionMigrationStatus :: V1alpha1StorageVersionMigrationStatus
-> Maybe [V1alpha1MigrationCondition]
$sel:v1alpha1StorageVersionMigrationStatusResourceVersion:V1alpha1StorageVersionMigrationStatus :: V1alpha1StorageVersionMigrationStatus -> Maybe Text
v1alpha1StorageVersionMigrationStatusConditions :: Maybe [V1alpha1MigrationCondition]
v1alpha1StorageVersionMigrationStatusResourceVersion :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"conditions" Key -> Maybe [V1alpha1MigrationCondition] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1alpha1MigrationCondition]
v1alpha1StorageVersionMigrationStatusConditions
      , Key
"resourceVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1StorageVersionMigrationStatusResourceVersion
      ]


-- | Construct a value of type 'V1alpha1StorageVersionMigrationStatus' (by applying it's required fields, if any)
mkV1alpha1StorageVersionMigrationStatus
  :: V1alpha1StorageVersionMigrationStatus
mkV1alpha1StorageVersionMigrationStatus :: V1alpha1StorageVersionMigrationStatus
mkV1alpha1StorageVersionMigrationStatus =
  V1alpha1StorageVersionMigrationStatus
  { $sel:v1alpha1StorageVersionMigrationStatusConditions:V1alpha1StorageVersionMigrationStatus :: Maybe [V1alpha1MigrationCondition]
v1alpha1StorageVersionMigrationStatusConditions = Maybe [V1alpha1MigrationCondition]
forall a. Maybe a
Nothing
  , $sel:v1alpha1StorageVersionMigrationStatusResourceVersion:V1alpha1StorageVersionMigrationStatus :: Maybe Text
v1alpha1StorageVersionMigrationStatusResourceVersion = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1alpha1StorageVersionStatus
-- | V1alpha1StorageVersionStatus
-- API server instances report the versions they can decode and the version they encode objects to when persisting objects in the backend.
data V1alpha1StorageVersionStatus = V1alpha1StorageVersionStatus
  { V1alpha1StorageVersionStatus -> Maybe Text
v1alpha1StorageVersionStatusCommonEncodingVersion :: !(Maybe Text) -- ^ "commonEncodingVersion" - If all API server instances agree on the same encoding storage version, then this field is set to that version. Otherwise this field is left empty. API servers should finish updating its storageVersionStatus entry before serving write operations, so that this field will be in sync with the reality.
  , V1alpha1StorageVersionStatus
-> Maybe [V1alpha1StorageVersionCondition]
v1alpha1StorageVersionStatusConditions :: !(Maybe [V1alpha1StorageVersionCondition]) -- ^ "conditions" - The latest available observations of the storageVersion&#39;s state.
  , V1alpha1StorageVersionStatus
-> Maybe [V1alpha1ServerStorageVersion]
v1alpha1StorageVersionStatusStorageVersions :: !(Maybe [V1alpha1ServerStorageVersion]) -- ^ "storageVersions" - The reported versions per API server instance.
  } deriving (Int -> V1alpha1StorageVersionStatus -> ShowS
[V1alpha1StorageVersionStatus] -> ShowS
V1alpha1StorageVersionStatus -> String
(Int -> V1alpha1StorageVersionStatus -> ShowS)
-> (V1alpha1StorageVersionStatus -> String)
-> ([V1alpha1StorageVersionStatus] -> ShowS)
-> Show V1alpha1StorageVersionStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha1StorageVersionStatus -> ShowS
showsPrec :: Int -> V1alpha1StorageVersionStatus -> ShowS
$cshow :: V1alpha1StorageVersionStatus -> String
show :: V1alpha1StorageVersionStatus -> String
$cshowList :: [V1alpha1StorageVersionStatus] -> ShowS
showList :: [V1alpha1StorageVersionStatus] -> ShowS
P.Show, V1alpha1StorageVersionStatus
-> V1alpha1StorageVersionStatus -> Bool
(V1alpha1StorageVersionStatus
 -> V1alpha1StorageVersionStatus -> Bool)
-> (V1alpha1StorageVersionStatus
    -> V1alpha1StorageVersionStatus -> Bool)
-> Eq V1alpha1StorageVersionStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha1StorageVersionStatus
-> V1alpha1StorageVersionStatus -> Bool
== :: V1alpha1StorageVersionStatus
-> V1alpha1StorageVersionStatus -> Bool
$c/= :: V1alpha1StorageVersionStatus
-> V1alpha1StorageVersionStatus -> Bool
/= :: V1alpha1StorageVersionStatus
-> V1alpha1StorageVersionStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha1StorageVersionStatus
instance A.FromJSON V1alpha1StorageVersionStatus where
  parseJSON :: Value -> Parser V1alpha1StorageVersionStatus
parseJSON = String
-> (Object -> Parser V1alpha1StorageVersionStatus)
-> Value
-> Parser V1alpha1StorageVersionStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha1StorageVersionStatus" ((Object -> Parser V1alpha1StorageVersionStatus)
 -> Value -> Parser V1alpha1StorageVersionStatus)
-> (Object -> Parser V1alpha1StorageVersionStatus)
-> Value
-> Parser V1alpha1StorageVersionStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe [V1alpha1StorageVersionCondition]
-> Maybe [V1alpha1ServerStorageVersion]
-> V1alpha1StorageVersionStatus
V1alpha1StorageVersionStatus
      (Maybe Text
 -> Maybe [V1alpha1StorageVersionCondition]
 -> Maybe [V1alpha1ServerStorageVersion]
 -> V1alpha1StorageVersionStatus)
-> Parser (Maybe Text)
-> Parser
     (Maybe [V1alpha1StorageVersionCondition]
      -> Maybe [V1alpha1ServerStorageVersion]
      -> V1alpha1StorageVersionStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"commonEncodingVersion")
      Parser
  (Maybe [V1alpha1StorageVersionCondition]
   -> Maybe [V1alpha1ServerStorageVersion]
   -> V1alpha1StorageVersionStatus)
-> Parser (Maybe [V1alpha1StorageVersionCondition])
-> Parser
     (Maybe [V1alpha1ServerStorageVersion]
      -> V1alpha1StorageVersionStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1alpha1StorageVersionCondition])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"conditions")
      Parser
  (Maybe [V1alpha1ServerStorageVersion]
   -> V1alpha1StorageVersionStatus)
-> Parser (Maybe [V1alpha1ServerStorageVersion])
-> Parser V1alpha1StorageVersionStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1alpha1ServerStorageVersion])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"storageVersions")

-- | ToJSON V1alpha1StorageVersionStatus
instance A.ToJSON V1alpha1StorageVersionStatus where
  toJSON :: V1alpha1StorageVersionStatus -> Value
toJSON V1alpha1StorageVersionStatus {Maybe [V1alpha1StorageVersionCondition]
Maybe [V1alpha1ServerStorageVersion]
Maybe Text
$sel:v1alpha1StorageVersionStatusCommonEncodingVersion:V1alpha1StorageVersionStatus :: V1alpha1StorageVersionStatus -> Maybe Text
$sel:v1alpha1StorageVersionStatusConditions:V1alpha1StorageVersionStatus :: V1alpha1StorageVersionStatus
-> Maybe [V1alpha1StorageVersionCondition]
$sel:v1alpha1StorageVersionStatusStorageVersions:V1alpha1StorageVersionStatus :: V1alpha1StorageVersionStatus
-> Maybe [V1alpha1ServerStorageVersion]
v1alpha1StorageVersionStatusCommonEncodingVersion :: Maybe Text
v1alpha1StorageVersionStatusConditions :: Maybe [V1alpha1StorageVersionCondition]
v1alpha1StorageVersionStatusStorageVersions :: Maybe [V1alpha1ServerStorageVersion]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"commonEncodingVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1StorageVersionStatusCommonEncodingVersion
      , Key
"conditions" Key -> Maybe [V1alpha1StorageVersionCondition] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1alpha1StorageVersionCondition]
v1alpha1StorageVersionStatusConditions
      , Key
"storageVersions" Key -> Maybe [V1alpha1ServerStorageVersion] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1alpha1ServerStorageVersion]
v1alpha1StorageVersionStatusStorageVersions
      ]


-- | Construct a value of type 'V1alpha1StorageVersionStatus' (by applying it's required fields, if any)
mkV1alpha1StorageVersionStatus
  :: V1alpha1StorageVersionStatus
mkV1alpha1StorageVersionStatus :: V1alpha1StorageVersionStatus
mkV1alpha1StorageVersionStatus =
  V1alpha1StorageVersionStatus
  { $sel:v1alpha1StorageVersionStatusCommonEncodingVersion:V1alpha1StorageVersionStatus :: Maybe Text
v1alpha1StorageVersionStatusCommonEncodingVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha1StorageVersionStatusConditions:V1alpha1StorageVersionStatus :: Maybe [V1alpha1StorageVersionCondition]
v1alpha1StorageVersionStatusConditions = Maybe [V1alpha1StorageVersionCondition]
forall a. Maybe a
Nothing
  , $sel:v1alpha1StorageVersionStatusStorageVersions:V1alpha1StorageVersionStatus :: Maybe [V1alpha1ServerStorageVersion]
v1alpha1StorageVersionStatusStorageVersions = Maybe [V1alpha1ServerStorageVersion]
forall a. Maybe a
Nothing
  }

-- ** V1alpha1Variable
-- | V1alpha1Variable
-- Variable is the definition of a variable that is used for composition.
data V1alpha1Variable = V1alpha1Variable
  { V1alpha1Variable -> Text
v1alpha1VariableExpression :: !(Text) -- ^ /Required/ "expression" - Expression is the expression that will be evaluated as the value of the variable. The CEL expression has access to the same identifiers as the CEL expressions in Validation.
  , V1alpha1Variable -> Text
v1alpha1VariableName :: !(Text) -- ^ /Required/ "name" - Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through &#x60;variables&#x60; For example, if name is \&quot;foo\&quot;, the variable will be available as &#x60;variables.foo&#x60;
  } deriving (Int -> V1alpha1Variable -> ShowS
[V1alpha1Variable] -> ShowS
V1alpha1Variable -> String
(Int -> V1alpha1Variable -> ShowS)
-> (V1alpha1Variable -> String)
-> ([V1alpha1Variable] -> ShowS)
-> Show V1alpha1Variable
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha1Variable -> ShowS
showsPrec :: Int -> V1alpha1Variable -> ShowS
$cshow :: V1alpha1Variable -> String
show :: V1alpha1Variable -> String
$cshowList :: [V1alpha1Variable] -> ShowS
showList :: [V1alpha1Variable] -> ShowS
P.Show, V1alpha1Variable -> V1alpha1Variable -> Bool
(V1alpha1Variable -> V1alpha1Variable -> Bool)
-> (V1alpha1Variable -> V1alpha1Variable -> Bool)
-> Eq V1alpha1Variable
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha1Variable -> V1alpha1Variable -> Bool
== :: V1alpha1Variable -> V1alpha1Variable -> Bool
$c/= :: V1alpha1Variable -> V1alpha1Variable -> Bool
/= :: V1alpha1Variable -> V1alpha1Variable -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha1Variable
instance A.FromJSON V1alpha1Variable where
  parseJSON :: Value -> Parser V1alpha1Variable
parseJSON = String
-> (Object -> Parser V1alpha1Variable)
-> Value
-> Parser V1alpha1Variable
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha1Variable" ((Object -> Parser V1alpha1Variable)
 -> Value -> Parser V1alpha1Variable)
-> (Object -> Parser V1alpha1Variable)
-> Value
-> Parser V1alpha1Variable
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Text -> V1alpha1Variable
V1alpha1Variable
      (Text -> Text -> V1alpha1Variable)
-> Parser Text -> Parser (Text -> V1alpha1Variable)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"expression")
      Parser (Text -> V1alpha1Variable)
-> Parser Text -> Parser V1alpha1Variable
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")

-- | ToJSON V1alpha1Variable
instance A.ToJSON V1alpha1Variable where
  toJSON :: V1alpha1Variable -> Value
toJSON V1alpha1Variable {Text
$sel:v1alpha1VariableExpression:V1alpha1Variable :: V1alpha1Variable -> Text
$sel:v1alpha1VariableName:V1alpha1Variable :: V1alpha1Variable -> Text
v1alpha1VariableExpression :: Text
v1alpha1VariableName :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"expression" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha1VariableExpression
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha1VariableName
      ]


-- | Construct a value of type 'V1alpha1Variable' (by applying it's required fields, if any)
mkV1alpha1Variable
  :: Text -- ^ 'v1alpha1VariableExpression': Expression is the expression that will be evaluated as the value of the variable. The CEL expression has access to the same identifiers as the CEL expressions in Validation.
  -> Text -- ^ 'v1alpha1VariableName': Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through `variables` For example, if name is \"foo\", the variable will be available as `variables.foo`
  -> V1alpha1Variable
mkV1alpha1Variable :: Text -> Text -> V1alpha1Variable
mkV1alpha1Variable Text
v1alpha1VariableExpression Text
v1alpha1VariableName =
  V1alpha1Variable
  { Text
$sel:v1alpha1VariableExpression:V1alpha1Variable :: Text
v1alpha1VariableExpression :: Text
v1alpha1VariableExpression
  , Text
$sel:v1alpha1VariableName:V1alpha1Variable :: Text
v1alpha1VariableName :: Text
v1alpha1VariableName
  }

-- ** V1alpha1VolumeAttributesClass
-- | V1alpha1VolumeAttributesClass
-- VolumeAttributesClass represents a specification of mutable volume attributes defined by the CSI driver. The class can be specified during dynamic provisioning of PersistentVolumeClaims, and changed in the PersistentVolumeClaim spec after provisioning.
data V1alpha1VolumeAttributesClass = V1alpha1VolumeAttributesClass
  { V1alpha1VolumeAttributesClass -> Maybe Text
v1alpha1VolumeAttributesClassApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1alpha1VolumeAttributesClass -> Text
v1alpha1VolumeAttributesClassDriverName :: !(Text) -- ^ /Required/ "driverName" - Name of the CSI driver This field is immutable.
  , V1alpha1VolumeAttributesClass -> Maybe Text
v1alpha1VolumeAttributesClassKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1alpha1VolumeAttributesClass -> Maybe V1ObjectMeta
v1alpha1VolumeAttributesClassMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1alpha1VolumeAttributesClass -> Maybe (Map String Text)
v1alpha1VolumeAttributesClassParameters :: !(Maybe (Map.Map String Text)) -- ^ "parameters" - parameters hold volume attributes defined by the CSI driver. These values are opaque to the Kubernetes and are passed directly to the CSI driver. The underlying storage provider supports changing these attributes on an existing volume, however the parameters field itself is immutable. To invoke a volume update, a new VolumeAttributesClass should be created with new parameters, and the PersistentVolumeClaim should be updated to reference the new VolumeAttributesClass.  This field is required and must contain at least one key/value pair. The keys cannot be empty, and the maximum number of parameters is 512, with a cumulative max size of 256K. If the CSI driver rejects invalid parameters, the target PersistentVolumeClaim will be set to an \&quot;Infeasible\&quot; state in the modifyVolumeStatus field.
  } deriving (Int -> V1alpha1VolumeAttributesClass -> ShowS
[V1alpha1VolumeAttributesClass] -> ShowS
V1alpha1VolumeAttributesClass -> String
(Int -> V1alpha1VolumeAttributesClass -> ShowS)
-> (V1alpha1VolumeAttributesClass -> String)
-> ([V1alpha1VolumeAttributesClass] -> ShowS)
-> Show V1alpha1VolumeAttributesClass
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha1VolumeAttributesClass -> ShowS
showsPrec :: Int -> V1alpha1VolumeAttributesClass -> ShowS
$cshow :: V1alpha1VolumeAttributesClass -> String
show :: V1alpha1VolumeAttributesClass -> String
$cshowList :: [V1alpha1VolumeAttributesClass] -> ShowS
showList :: [V1alpha1VolumeAttributesClass] -> ShowS
P.Show, V1alpha1VolumeAttributesClass
-> V1alpha1VolumeAttributesClass -> Bool
(V1alpha1VolumeAttributesClass
 -> V1alpha1VolumeAttributesClass -> Bool)
-> (V1alpha1VolumeAttributesClass
    -> V1alpha1VolumeAttributesClass -> Bool)
-> Eq V1alpha1VolumeAttributesClass
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha1VolumeAttributesClass
-> V1alpha1VolumeAttributesClass -> Bool
== :: V1alpha1VolumeAttributesClass
-> V1alpha1VolumeAttributesClass -> Bool
$c/= :: V1alpha1VolumeAttributesClass
-> V1alpha1VolumeAttributesClass -> Bool
/= :: V1alpha1VolumeAttributesClass
-> V1alpha1VolumeAttributesClass -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha1VolumeAttributesClass
instance A.FromJSON V1alpha1VolumeAttributesClass where
  parseJSON :: Value -> Parser V1alpha1VolumeAttributesClass
parseJSON = String
-> (Object -> Parser V1alpha1VolumeAttributesClass)
-> Value
-> Parser V1alpha1VolumeAttributesClass
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha1VolumeAttributesClass" ((Object -> Parser V1alpha1VolumeAttributesClass)
 -> Value -> Parser V1alpha1VolumeAttributesClass)
-> (Object -> Parser V1alpha1VolumeAttributesClass)
-> Value
-> Parser V1alpha1VolumeAttributesClass
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe (Map String Text)
-> V1alpha1VolumeAttributesClass
V1alpha1VolumeAttributesClass
      (Maybe Text
 -> Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe (Map String Text)
 -> V1alpha1VolumeAttributesClass)
-> Parser (Maybe Text)
-> Parser
     (Text
      -> Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe (Map String Text)
      -> V1alpha1VolumeAttributesClass)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Text
   -> Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe (Map String Text)
   -> V1alpha1VolumeAttributesClass)
-> Parser Text
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe (Map String Text)
      -> V1alpha1VolumeAttributesClass)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"driverName")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe (Map String Text)
   -> V1alpha1VolumeAttributesClass)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe (Map String Text) -> V1alpha1VolumeAttributesClass)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe (Map String Text) -> V1alpha1VolumeAttributesClass)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe (Map String Text) -> V1alpha1VolumeAttributesClass)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (Maybe (Map String Text) -> V1alpha1VolumeAttributesClass)
-> Parser (Maybe (Map String Text))
-> Parser V1alpha1VolumeAttributesClass
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String Text))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"parameters")

-- | ToJSON V1alpha1VolumeAttributesClass
instance A.ToJSON V1alpha1VolumeAttributesClass where
  toJSON :: V1alpha1VolumeAttributesClass -> Value
toJSON V1alpha1VolumeAttributesClass {Maybe (Map String Text)
Maybe Text
Maybe V1ObjectMeta
Text
$sel:v1alpha1VolumeAttributesClassApiVersion:V1alpha1VolumeAttributesClass :: V1alpha1VolumeAttributesClass -> Maybe Text
$sel:v1alpha1VolumeAttributesClassDriverName:V1alpha1VolumeAttributesClass :: V1alpha1VolumeAttributesClass -> Text
$sel:v1alpha1VolumeAttributesClassKind:V1alpha1VolumeAttributesClass :: V1alpha1VolumeAttributesClass -> Maybe Text
$sel:v1alpha1VolumeAttributesClassMetadata:V1alpha1VolumeAttributesClass :: V1alpha1VolumeAttributesClass -> Maybe V1ObjectMeta
$sel:v1alpha1VolumeAttributesClassParameters:V1alpha1VolumeAttributesClass :: V1alpha1VolumeAttributesClass -> Maybe (Map String Text)
v1alpha1VolumeAttributesClassApiVersion :: Maybe Text
v1alpha1VolumeAttributesClassDriverName :: Text
v1alpha1VolumeAttributesClassKind :: Maybe Text
v1alpha1VolumeAttributesClassMetadata :: Maybe V1ObjectMeta
v1alpha1VolumeAttributesClassParameters :: Maybe (Map String Text)
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1VolumeAttributesClassApiVersion
      , Key
"driverName" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha1VolumeAttributesClassDriverName
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1VolumeAttributesClassKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1alpha1VolumeAttributesClassMetadata
      , Key
"parameters" Key -> Maybe (Map String Text) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Text)
v1alpha1VolumeAttributesClassParameters
      ]


-- | Construct a value of type 'V1alpha1VolumeAttributesClass' (by applying it's required fields, if any)
mkV1alpha1VolumeAttributesClass
  :: Text -- ^ 'v1alpha1VolumeAttributesClassDriverName': Name of the CSI driver This field is immutable.
  -> V1alpha1VolumeAttributesClass
mkV1alpha1VolumeAttributesClass :: Text -> V1alpha1VolumeAttributesClass
mkV1alpha1VolumeAttributesClass Text
v1alpha1VolumeAttributesClassDriverName =
  V1alpha1VolumeAttributesClass
  { $sel:v1alpha1VolumeAttributesClassApiVersion:V1alpha1VolumeAttributesClass :: Maybe Text
v1alpha1VolumeAttributesClassApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1alpha1VolumeAttributesClassDriverName:V1alpha1VolumeAttributesClass :: Text
v1alpha1VolumeAttributesClassDriverName :: Text
v1alpha1VolumeAttributesClassDriverName
  , $sel:v1alpha1VolumeAttributesClassKind:V1alpha1VolumeAttributesClass :: Maybe Text
v1alpha1VolumeAttributesClassKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha1VolumeAttributesClassMetadata:V1alpha1VolumeAttributesClass :: Maybe V1ObjectMeta
v1alpha1VolumeAttributesClassMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1alpha1VolumeAttributesClassParameters:V1alpha1VolumeAttributesClass :: Maybe (Map String Text)
v1alpha1VolumeAttributesClassParameters = Maybe (Map String Text)
forall a. Maybe a
Nothing
  }

-- ** V1alpha1VolumeAttributesClassList
-- | V1alpha1VolumeAttributesClassList
-- VolumeAttributesClassList is a collection of VolumeAttributesClass objects.
data V1alpha1VolumeAttributesClassList = V1alpha1VolumeAttributesClassList
  { V1alpha1VolumeAttributesClassList -> Maybe Text
v1alpha1VolumeAttributesClassListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1alpha1VolumeAttributesClassList
-> [V1alpha1VolumeAttributesClass]
v1alpha1VolumeAttributesClassListItems :: !([V1alpha1VolumeAttributesClass]) -- ^ /Required/ "items" - items is the list of VolumeAttributesClass objects.
  , V1alpha1VolumeAttributesClassList -> Maybe Text
v1alpha1VolumeAttributesClassListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1alpha1VolumeAttributesClassList -> Maybe V1ListMeta
v1alpha1VolumeAttributesClassListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1alpha1VolumeAttributesClassList -> ShowS
[V1alpha1VolumeAttributesClassList] -> ShowS
V1alpha1VolumeAttributesClassList -> String
(Int -> V1alpha1VolumeAttributesClassList -> ShowS)
-> (V1alpha1VolumeAttributesClassList -> String)
-> ([V1alpha1VolumeAttributesClassList] -> ShowS)
-> Show V1alpha1VolumeAttributesClassList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha1VolumeAttributesClassList -> ShowS
showsPrec :: Int -> V1alpha1VolumeAttributesClassList -> ShowS
$cshow :: V1alpha1VolumeAttributesClassList -> String
show :: V1alpha1VolumeAttributesClassList -> String
$cshowList :: [V1alpha1VolumeAttributesClassList] -> ShowS
showList :: [V1alpha1VolumeAttributesClassList] -> ShowS
P.Show, V1alpha1VolumeAttributesClassList
-> V1alpha1VolumeAttributesClassList -> Bool
(V1alpha1VolumeAttributesClassList
 -> V1alpha1VolumeAttributesClassList -> Bool)
-> (V1alpha1VolumeAttributesClassList
    -> V1alpha1VolumeAttributesClassList -> Bool)
-> Eq V1alpha1VolumeAttributesClassList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha1VolumeAttributesClassList
-> V1alpha1VolumeAttributesClassList -> Bool
== :: V1alpha1VolumeAttributesClassList
-> V1alpha1VolumeAttributesClassList -> Bool
$c/= :: V1alpha1VolumeAttributesClassList
-> V1alpha1VolumeAttributesClassList -> Bool
/= :: V1alpha1VolumeAttributesClassList
-> V1alpha1VolumeAttributesClassList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha1VolumeAttributesClassList
instance A.FromJSON V1alpha1VolumeAttributesClassList where
  parseJSON :: Value -> Parser V1alpha1VolumeAttributesClassList
parseJSON = String
-> (Object -> Parser V1alpha1VolumeAttributesClassList)
-> Value
-> Parser V1alpha1VolumeAttributesClassList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha1VolumeAttributesClassList" ((Object -> Parser V1alpha1VolumeAttributesClassList)
 -> Value -> Parser V1alpha1VolumeAttributesClassList)
-> (Object -> Parser V1alpha1VolumeAttributesClassList)
-> Value
-> Parser V1alpha1VolumeAttributesClassList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1alpha1VolumeAttributesClass]
-> Maybe Text
-> Maybe V1ListMeta
-> V1alpha1VolumeAttributesClassList
V1alpha1VolumeAttributesClassList
      (Maybe Text
 -> [V1alpha1VolumeAttributesClass]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1alpha1VolumeAttributesClassList)
-> Parser (Maybe Text)
-> Parser
     ([V1alpha1VolumeAttributesClass]
      -> Maybe Text
      -> Maybe V1ListMeta
      -> V1alpha1VolumeAttributesClassList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1alpha1VolumeAttributesClass]
   -> Maybe Text
   -> Maybe V1ListMeta
   -> V1alpha1VolumeAttributesClassList)
-> Parser [V1alpha1VolumeAttributesClass]
-> Parser
     (Maybe Text
      -> Maybe V1ListMeta -> V1alpha1VolumeAttributesClassList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1alpha1VolumeAttributesClass]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser
  (Maybe Text
   -> Maybe V1ListMeta -> V1alpha1VolumeAttributesClassList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1alpha1VolumeAttributesClassList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1alpha1VolumeAttributesClassList)
-> Parser (Maybe V1ListMeta)
-> Parser V1alpha1VolumeAttributesClassList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1alpha1VolumeAttributesClassList
instance A.ToJSON V1alpha1VolumeAttributesClassList where
  toJSON :: V1alpha1VolumeAttributesClassList -> Value
toJSON V1alpha1VolumeAttributesClassList {[V1alpha1VolumeAttributesClass]
Maybe Text
Maybe V1ListMeta
$sel:v1alpha1VolumeAttributesClassListApiVersion:V1alpha1VolumeAttributesClassList :: V1alpha1VolumeAttributesClassList -> Maybe Text
$sel:v1alpha1VolumeAttributesClassListItems:V1alpha1VolumeAttributesClassList :: V1alpha1VolumeAttributesClassList
-> [V1alpha1VolumeAttributesClass]
$sel:v1alpha1VolumeAttributesClassListKind:V1alpha1VolumeAttributesClassList :: V1alpha1VolumeAttributesClassList -> Maybe Text
$sel:v1alpha1VolumeAttributesClassListMetadata:V1alpha1VolumeAttributesClassList :: V1alpha1VolumeAttributesClassList -> Maybe V1ListMeta
v1alpha1VolumeAttributesClassListApiVersion :: Maybe Text
v1alpha1VolumeAttributesClassListItems :: [V1alpha1VolumeAttributesClass]
v1alpha1VolumeAttributesClassListKind :: Maybe Text
v1alpha1VolumeAttributesClassListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1VolumeAttributesClassListApiVersion
      , Key
"items" Key -> [V1alpha1VolumeAttributesClass] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1alpha1VolumeAttributesClass]
v1alpha1VolumeAttributesClassListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha1VolumeAttributesClassListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1alpha1VolumeAttributesClassListMetadata
      ]


-- | Construct a value of type 'V1alpha1VolumeAttributesClassList' (by applying it's required fields, if any)
mkV1alpha1VolumeAttributesClassList
  :: [V1alpha1VolumeAttributesClass] -- ^ 'v1alpha1VolumeAttributesClassListItems': items is the list of VolumeAttributesClass objects.
  -> V1alpha1VolumeAttributesClassList
mkV1alpha1VolumeAttributesClassList :: [V1alpha1VolumeAttributesClass]
-> V1alpha1VolumeAttributesClassList
mkV1alpha1VolumeAttributesClassList [V1alpha1VolumeAttributesClass]
v1alpha1VolumeAttributesClassListItems =
  V1alpha1VolumeAttributesClassList
  { $sel:v1alpha1VolumeAttributesClassListApiVersion:V1alpha1VolumeAttributesClassList :: Maybe Text
v1alpha1VolumeAttributesClassListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1alpha1VolumeAttributesClass]
$sel:v1alpha1VolumeAttributesClassListItems:V1alpha1VolumeAttributesClassList :: [V1alpha1VolumeAttributesClass]
v1alpha1VolumeAttributesClassListItems :: [V1alpha1VolumeAttributesClass]
v1alpha1VolumeAttributesClassListItems
  , $sel:v1alpha1VolumeAttributesClassListKind:V1alpha1VolumeAttributesClassList :: Maybe Text
v1alpha1VolumeAttributesClassListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha1VolumeAttributesClassListMetadata:V1alpha1VolumeAttributesClassList :: Maybe V1ListMeta
v1alpha1VolumeAttributesClassListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1alpha2LeaseCandidate
-- | V1alpha2LeaseCandidate
-- LeaseCandidate defines a candidate for a Lease object. Candidates are created such that coordinated leader election will pick the best leader from the list of candidates.
data V1alpha2LeaseCandidate = V1alpha2LeaseCandidate
  { V1alpha2LeaseCandidate -> Maybe Text
v1alpha2LeaseCandidateApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1alpha2LeaseCandidate -> Maybe Text
v1alpha2LeaseCandidateKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1alpha2LeaseCandidate -> Maybe V1ObjectMeta
v1alpha2LeaseCandidateMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1alpha2LeaseCandidate -> Maybe V1alpha2LeaseCandidateSpec
v1alpha2LeaseCandidateSpec :: !(Maybe V1alpha2LeaseCandidateSpec) -- ^ "spec"
  } deriving (Int -> V1alpha2LeaseCandidate -> ShowS
[V1alpha2LeaseCandidate] -> ShowS
V1alpha2LeaseCandidate -> String
(Int -> V1alpha2LeaseCandidate -> ShowS)
-> (V1alpha2LeaseCandidate -> String)
-> ([V1alpha2LeaseCandidate] -> ShowS)
-> Show V1alpha2LeaseCandidate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha2LeaseCandidate -> ShowS
showsPrec :: Int -> V1alpha2LeaseCandidate -> ShowS
$cshow :: V1alpha2LeaseCandidate -> String
show :: V1alpha2LeaseCandidate -> String
$cshowList :: [V1alpha2LeaseCandidate] -> ShowS
showList :: [V1alpha2LeaseCandidate] -> ShowS
P.Show, V1alpha2LeaseCandidate -> V1alpha2LeaseCandidate -> Bool
(V1alpha2LeaseCandidate -> V1alpha2LeaseCandidate -> Bool)
-> (V1alpha2LeaseCandidate -> V1alpha2LeaseCandidate -> Bool)
-> Eq V1alpha2LeaseCandidate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha2LeaseCandidate -> V1alpha2LeaseCandidate -> Bool
== :: V1alpha2LeaseCandidate -> V1alpha2LeaseCandidate -> Bool
$c/= :: V1alpha2LeaseCandidate -> V1alpha2LeaseCandidate -> Bool
/= :: V1alpha2LeaseCandidate -> V1alpha2LeaseCandidate -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha2LeaseCandidate
instance A.FromJSON V1alpha2LeaseCandidate where
  parseJSON :: Value -> Parser V1alpha2LeaseCandidate
parseJSON = String
-> (Object -> Parser V1alpha2LeaseCandidate)
-> Value
-> Parser V1alpha2LeaseCandidate
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha2LeaseCandidate" ((Object -> Parser V1alpha2LeaseCandidate)
 -> Value -> Parser V1alpha2LeaseCandidate)
-> (Object -> Parser V1alpha2LeaseCandidate)
-> Value
-> Parser V1alpha2LeaseCandidate
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1alpha2LeaseCandidateSpec
-> V1alpha2LeaseCandidate
V1alpha2LeaseCandidate
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1alpha2LeaseCandidateSpec
 -> V1alpha2LeaseCandidate)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1alpha2LeaseCandidateSpec
      -> V1alpha2LeaseCandidate)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1alpha2LeaseCandidateSpec
   -> V1alpha2LeaseCandidate)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1alpha2LeaseCandidateSpec -> V1alpha2LeaseCandidate)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1alpha2LeaseCandidateSpec -> V1alpha2LeaseCandidate)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe V1alpha2LeaseCandidateSpec -> V1alpha2LeaseCandidate)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (Maybe V1alpha2LeaseCandidateSpec -> V1alpha2LeaseCandidate)
-> Parser (Maybe V1alpha2LeaseCandidateSpec)
-> Parser V1alpha2LeaseCandidate
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1alpha2LeaseCandidateSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")

-- | ToJSON V1alpha2LeaseCandidate
instance A.ToJSON V1alpha2LeaseCandidate where
  toJSON :: V1alpha2LeaseCandidate -> Value
toJSON V1alpha2LeaseCandidate {Maybe Text
Maybe V1alpha2LeaseCandidateSpec
Maybe V1ObjectMeta
$sel:v1alpha2LeaseCandidateApiVersion:V1alpha2LeaseCandidate :: V1alpha2LeaseCandidate -> Maybe Text
$sel:v1alpha2LeaseCandidateKind:V1alpha2LeaseCandidate :: V1alpha2LeaseCandidate -> Maybe Text
$sel:v1alpha2LeaseCandidateMetadata:V1alpha2LeaseCandidate :: V1alpha2LeaseCandidate -> Maybe V1ObjectMeta
$sel:v1alpha2LeaseCandidateSpec:V1alpha2LeaseCandidate :: V1alpha2LeaseCandidate -> Maybe V1alpha2LeaseCandidateSpec
v1alpha2LeaseCandidateApiVersion :: Maybe Text
v1alpha2LeaseCandidateKind :: Maybe Text
v1alpha2LeaseCandidateMetadata :: Maybe V1ObjectMeta
v1alpha2LeaseCandidateSpec :: Maybe V1alpha2LeaseCandidateSpec
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha2LeaseCandidateApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha2LeaseCandidateKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1alpha2LeaseCandidateMetadata
      , Key
"spec" Key -> Maybe V1alpha2LeaseCandidateSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1alpha2LeaseCandidateSpec
v1alpha2LeaseCandidateSpec
      ]


-- | Construct a value of type 'V1alpha2LeaseCandidate' (by applying it's required fields, if any)
mkV1alpha2LeaseCandidate
  :: V1alpha2LeaseCandidate
mkV1alpha2LeaseCandidate :: V1alpha2LeaseCandidate
mkV1alpha2LeaseCandidate =
  V1alpha2LeaseCandidate
  { $sel:v1alpha2LeaseCandidateApiVersion:V1alpha2LeaseCandidate :: Maybe Text
v1alpha2LeaseCandidateApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha2LeaseCandidateKind:V1alpha2LeaseCandidate :: Maybe Text
v1alpha2LeaseCandidateKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha2LeaseCandidateMetadata:V1alpha2LeaseCandidate :: Maybe V1ObjectMeta
v1alpha2LeaseCandidateMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1alpha2LeaseCandidateSpec:V1alpha2LeaseCandidate :: Maybe V1alpha2LeaseCandidateSpec
v1alpha2LeaseCandidateSpec = Maybe V1alpha2LeaseCandidateSpec
forall a. Maybe a
Nothing
  }

-- ** V1alpha2LeaseCandidateList
-- | V1alpha2LeaseCandidateList
-- LeaseCandidateList is a list of Lease objects.
data V1alpha2LeaseCandidateList = V1alpha2LeaseCandidateList
  { V1alpha2LeaseCandidateList -> Maybe Text
v1alpha2LeaseCandidateListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1alpha2LeaseCandidateList -> [V1alpha2LeaseCandidate]
v1alpha2LeaseCandidateListItems :: !([V1alpha2LeaseCandidate]) -- ^ /Required/ "items" - items is a list of schema objects.
  , V1alpha2LeaseCandidateList -> Maybe Text
v1alpha2LeaseCandidateListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1alpha2LeaseCandidateList -> Maybe V1ListMeta
v1alpha2LeaseCandidateListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1alpha2LeaseCandidateList -> ShowS
[V1alpha2LeaseCandidateList] -> ShowS
V1alpha2LeaseCandidateList -> String
(Int -> V1alpha2LeaseCandidateList -> ShowS)
-> (V1alpha2LeaseCandidateList -> String)
-> ([V1alpha2LeaseCandidateList] -> ShowS)
-> Show V1alpha2LeaseCandidateList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha2LeaseCandidateList -> ShowS
showsPrec :: Int -> V1alpha2LeaseCandidateList -> ShowS
$cshow :: V1alpha2LeaseCandidateList -> String
show :: V1alpha2LeaseCandidateList -> String
$cshowList :: [V1alpha2LeaseCandidateList] -> ShowS
showList :: [V1alpha2LeaseCandidateList] -> ShowS
P.Show, V1alpha2LeaseCandidateList -> V1alpha2LeaseCandidateList -> Bool
(V1alpha2LeaseCandidateList -> V1alpha2LeaseCandidateList -> Bool)
-> (V1alpha2LeaseCandidateList
    -> V1alpha2LeaseCandidateList -> Bool)
-> Eq V1alpha2LeaseCandidateList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha2LeaseCandidateList -> V1alpha2LeaseCandidateList -> Bool
== :: V1alpha2LeaseCandidateList -> V1alpha2LeaseCandidateList -> Bool
$c/= :: V1alpha2LeaseCandidateList -> V1alpha2LeaseCandidateList -> Bool
/= :: V1alpha2LeaseCandidateList -> V1alpha2LeaseCandidateList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha2LeaseCandidateList
instance A.FromJSON V1alpha2LeaseCandidateList where
  parseJSON :: Value -> Parser V1alpha2LeaseCandidateList
parseJSON = String
-> (Object -> Parser V1alpha2LeaseCandidateList)
-> Value
-> Parser V1alpha2LeaseCandidateList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha2LeaseCandidateList" ((Object -> Parser V1alpha2LeaseCandidateList)
 -> Value -> Parser V1alpha2LeaseCandidateList)
-> (Object -> Parser V1alpha2LeaseCandidateList)
-> Value
-> Parser V1alpha2LeaseCandidateList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1alpha2LeaseCandidate]
-> Maybe Text
-> Maybe V1ListMeta
-> V1alpha2LeaseCandidateList
V1alpha2LeaseCandidateList
      (Maybe Text
 -> [V1alpha2LeaseCandidate]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1alpha2LeaseCandidateList)
-> Parser (Maybe Text)
-> Parser
     ([V1alpha2LeaseCandidate]
      -> Maybe Text -> Maybe V1ListMeta -> V1alpha2LeaseCandidateList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1alpha2LeaseCandidate]
   -> Maybe Text -> Maybe V1ListMeta -> V1alpha2LeaseCandidateList)
-> Parser [V1alpha2LeaseCandidate]
-> Parser
     (Maybe Text -> Maybe V1ListMeta -> V1alpha2LeaseCandidateList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1alpha2LeaseCandidate]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser
  (Maybe Text -> Maybe V1ListMeta -> V1alpha2LeaseCandidateList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1alpha2LeaseCandidateList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1alpha2LeaseCandidateList)
-> Parser (Maybe V1ListMeta) -> Parser V1alpha2LeaseCandidateList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1alpha2LeaseCandidateList
instance A.ToJSON V1alpha2LeaseCandidateList where
  toJSON :: V1alpha2LeaseCandidateList -> Value
toJSON V1alpha2LeaseCandidateList {[V1alpha2LeaseCandidate]
Maybe Text
Maybe V1ListMeta
$sel:v1alpha2LeaseCandidateListApiVersion:V1alpha2LeaseCandidateList :: V1alpha2LeaseCandidateList -> Maybe Text
$sel:v1alpha2LeaseCandidateListItems:V1alpha2LeaseCandidateList :: V1alpha2LeaseCandidateList -> [V1alpha2LeaseCandidate]
$sel:v1alpha2LeaseCandidateListKind:V1alpha2LeaseCandidateList :: V1alpha2LeaseCandidateList -> Maybe Text
$sel:v1alpha2LeaseCandidateListMetadata:V1alpha2LeaseCandidateList :: V1alpha2LeaseCandidateList -> Maybe V1ListMeta
v1alpha2LeaseCandidateListApiVersion :: Maybe Text
v1alpha2LeaseCandidateListItems :: [V1alpha2LeaseCandidate]
v1alpha2LeaseCandidateListKind :: Maybe Text
v1alpha2LeaseCandidateListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha2LeaseCandidateListApiVersion
      , Key
"items" Key -> [V1alpha2LeaseCandidate] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1alpha2LeaseCandidate]
v1alpha2LeaseCandidateListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha2LeaseCandidateListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1alpha2LeaseCandidateListMetadata
      ]


-- | Construct a value of type 'V1alpha2LeaseCandidateList' (by applying it's required fields, if any)
mkV1alpha2LeaseCandidateList
  :: [V1alpha2LeaseCandidate] -- ^ 'v1alpha2LeaseCandidateListItems': items is a list of schema objects.
  -> V1alpha2LeaseCandidateList
mkV1alpha2LeaseCandidateList :: [V1alpha2LeaseCandidate] -> V1alpha2LeaseCandidateList
mkV1alpha2LeaseCandidateList [V1alpha2LeaseCandidate]
v1alpha2LeaseCandidateListItems =
  V1alpha2LeaseCandidateList
  { $sel:v1alpha2LeaseCandidateListApiVersion:V1alpha2LeaseCandidateList :: Maybe Text
v1alpha2LeaseCandidateListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1alpha2LeaseCandidate]
$sel:v1alpha2LeaseCandidateListItems:V1alpha2LeaseCandidateList :: [V1alpha2LeaseCandidate]
v1alpha2LeaseCandidateListItems :: [V1alpha2LeaseCandidate]
v1alpha2LeaseCandidateListItems
  , $sel:v1alpha2LeaseCandidateListKind:V1alpha2LeaseCandidateList :: Maybe Text
v1alpha2LeaseCandidateListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha2LeaseCandidateListMetadata:V1alpha2LeaseCandidateList :: Maybe V1ListMeta
v1alpha2LeaseCandidateListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1alpha2LeaseCandidateSpec
-- | V1alpha2LeaseCandidateSpec
-- LeaseCandidateSpec is a specification of a Lease.
data V1alpha2LeaseCandidateSpec = V1alpha2LeaseCandidateSpec
  { V1alpha2LeaseCandidateSpec -> Text
v1alpha2LeaseCandidateSpecBinaryVersion :: !(Text) -- ^ /Required/ "binaryVersion" - BinaryVersion is the binary version. It must be in a semver format without leading &#x60;v&#x60;. This field is required.
  , V1alpha2LeaseCandidateSpec -> Maybe Text
v1alpha2LeaseCandidateSpecEmulationVersion :: !(Maybe Text) -- ^ "emulationVersion" - EmulationVersion is the emulation version. It must be in a semver format without leading &#x60;v&#x60;. EmulationVersion must be less than or equal to BinaryVersion. This field is required when strategy is \&quot;OldestEmulationVersion\&quot;
  , V1alpha2LeaseCandidateSpec -> Text
v1alpha2LeaseCandidateSpecLeaseName :: !(Text) -- ^ /Required/ "leaseName" - LeaseName is the name of the lease for which this candidate is contending. This field is immutable.
  , V1alpha2LeaseCandidateSpec -> Maybe DateTime
v1alpha2LeaseCandidateSpecPingTime :: !(Maybe DateTime) -- ^ "pingTime" - PingTime is the last time that the server has requested the LeaseCandidate to renew. It is only done during leader election to check if any LeaseCandidates have become ineligible. When PingTime is updated, the LeaseCandidate will respond by updating RenewTime.
  , V1alpha2LeaseCandidateSpec -> Maybe DateTime
v1alpha2LeaseCandidateSpecRenewTime :: !(Maybe DateTime) -- ^ "renewTime" - RenewTime is the time that the LeaseCandidate was last updated. Any time a Lease needs to do leader election, the PingTime field is updated to signal to the LeaseCandidate that they should update the RenewTime. Old LeaseCandidate objects are also garbage collected if it has been hours since the last renew. The PingTime field is updated regularly to prevent garbage collection for still active LeaseCandidates.
  , V1alpha2LeaseCandidateSpec -> Text
v1alpha2LeaseCandidateSpecStrategy :: !(Text) -- ^ /Required/ "strategy" - Strategy is the strategy that coordinated leader election will use for picking the leader. If multiple candidates for the same Lease return different strategies, the strategy provided by the candidate with the latest BinaryVersion will be used. If there is still conflict, this is a user error and coordinated leader election will not operate the Lease until resolved. (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.
  } deriving (Int -> V1alpha2LeaseCandidateSpec -> ShowS
[V1alpha2LeaseCandidateSpec] -> ShowS
V1alpha2LeaseCandidateSpec -> String
(Int -> V1alpha2LeaseCandidateSpec -> ShowS)
-> (V1alpha2LeaseCandidateSpec -> String)
-> ([V1alpha2LeaseCandidateSpec] -> ShowS)
-> Show V1alpha2LeaseCandidateSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha2LeaseCandidateSpec -> ShowS
showsPrec :: Int -> V1alpha2LeaseCandidateSpec -> ShowS
$cshow :: V1alpha2LeaseCandidateSpec -> String
show :: V1alpha2LeaseCandidateSpec -> String
$cshowList :: [V1alpha2LeaseCandidateSpec] -> ShowS
showList :: [V1alpha2LeaseCandidateSpec] -> ShowS
P.Show, V1alpha2LeaseCandidateSpec -> V1alpha2LeaseCandidateSpec -> Bool
(V1alpha2LeaseCandidateSpec -> V1alpha2LeaseCandidateSpec -> Bool)
-> (V1alpha2LeaseCandidateSpec
    -> V1alpha2LeaseCandidateSpec -> Bool)
-> Eq V1alpha2LeaseCandidateSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha2LeaseCandidateSpec -> V1alpha2LeaseCandidateSpec -> Bool
== :: V1alpha2LeaseCandidateSpec -> V1alpha2LeaseCandidateSpec -> Bool
$c/= :: V1alpha2LeaseCandidateSpec -> V1alpha2LeaseCandidateSpec -> Bool
/= :: V1alpha2LeaseCandidateSpec -> V1alpha2LeaseCandidateSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha2LeaseCandidateSpec
instance A.FromJSON V1alpha2LeaseCandidateSpec where
  parseJSON :: Value -> Parser V1alpha2LeaseCandidateSpec
parseJSON = String
-> (Object -> Parser V1alpha2LeaseCandidateSpec)
-> Value
-> Parser V1alpha2LeaseCandidateSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha2LeaseCandidateSpec" ((Object -> Parser V1alpha2LeaseCandidateSpec)
 -> Value -> Parser V1alpha2LeaseCandidateSpec)
-> (Object -> Parser V1alpha2LeaseCandidateSpec)
-> Value
-> Parser V1alpha2LeaseCandidateSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text
-> Maybe Text
-> Text
-> Maybe DateTime
-> Maybe DateTime
-> Text
-> V1alpha2LeaseCandidateSpec
V1alpha2LeaseCandidateSpec
      (Text
 -> Maybe Text
 -> Text
 -> Maybe DateTime
 -> Maybe DateTime
 -> Text
 -> V1alpha2LeaseCandidateSpec)
-> Parser Text
-> Parser
     (Maybe Text
      -> Text
      -> Maybe DateTime
      -> Maybe DateTime
      -> Text
      -> V1alpha2LeaseCandidateSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"binaryVersion")
      Parser
  (Maybe Text
   -> Text
   -> Maybe DateTime
   -> Maybe DateTime
   -> Text
   -> V1alpha2LeaseCandidateSpec)
-> Parser (Maybe Text)
-> Parser
     (Text
      -> Maybe DateTime
      -> Maybe DateTime
      -> Text
      -> V1alpha2LeaseCandidateSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"emulationVersion")
      Parser
  (Text
   -> Maybe DateTime
   -> Maybe DateTime
   -> Text
   -> V1alpha2LeaseCandidateSpec)
-> Parser Text
-> Parser
     (Maybe DateTime
      -> Maybe DateTime -> Text -> V1alpha2LeaseCandidateSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"leaseName")
      Parser
  (Maybe DateTime
   -> Maybe DateTime -> Text -> V1alpha2LeaseCandidateSpec)
-> Parser (Maybe DateTime)
-> Parser (Maybe DateTime -> Text -> V1alpha2LeaseCandidateSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"pingTime")
      Parser (Maybe DateTime -> Text -> V1alpha2LeaseCandidateSpec)
-> Parser (Maybe DateTime)
-> Parser (Text -> V1alpha2LeaseCandidateSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"renewTime")
      Parser (Text -> V1alpha2LeaseCandidateSpec)
-> Parser Text -> Parser V1alpha2LeaseCandidateSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"strategy")

-- | ToJSON V1alpha2LeaseCandidateSpec
instance A.ToJSON V1alpha2LeaseCandidateSpec where
  toJSON :: V1alpha2LeaseCandidateSpec -> Value
toJSON V1alpha2LeaseCandidateSpec {Maybe Text
Maybe DateTime
Text
$sel:v1alpha2LeaseCandidateSpecBinaryVersion:V1alpha2LeaseCandidateSpec :: V1alpha2LeaseCandidateSpec -> Text
$sel:v1alpha2LeaseCandidateSpecEmulationVersion:V1alpha2LeaseCandidateSpec :: V1alpha2LeaseCandidateSpec -> Maybe Text
$sel:v1alpha2LeaseCandidateSpecLeaseName:V1alpha2LeaseCandidateSpec :: V1alpha2LeaseCandidateSpec -> Text
$sel:v1alpha2LeaseCandidateSpecPingTime:V1alpha2LeaseCandidateSpec :: V1alpha2LeaseCandidateSpec -> Maybe DateTime
$sel:v1alpha2LeaseCandidateSpecRenewTime:V1alpha2LeaseCandidateSpec :: V1alpha2LeaseCandidateSpec -> Maybe DateTime
$sel:v1alpha2LeaseCandidateSpecStrategy:V1alpha2LeaseCandidateSpec :: V1alpha2LeaseCandidateSpec -> Text
v1alpha2LeaseCandidateSpecBinaryVersion :: Text
v1alpha2LeaseCandidateSpecEmulationVersion :: Maybe Text
v1alpha2LeaseCandidateSpecLeaseName :: Text
v1alpha2LeaseCandidateSpecPingTime :: Maybe DateTime
v1alpha2LeaseCandidateSpecRenewTime :: Maybe DateTime
v1alpha2LeaseCandidateSpecStrategy :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"binaryVersion" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha2LeaseCandidateSpecBinaryVersion
      , Key
"emulationVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha2LeaseCandidateSpecEmulationVersion
      , Key
"leaseName" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha2LeaseCandidateSpecLeaseName
      , Key
"pingTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1alpha2LeaseCandidateSpecPingTime
      , Key
"renewTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v1alpha2LeaseCandidateSpecRenewTime
      , Key
"strategy" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha2LeaseCandidateSpecStrategy
      ]


-- | Construct a value of type 'V1alpha2LeaseCandidateSpec' (by applying it's required fields, if any)
mkV1alpha2LeaseCandidateSpec
  :: Text -- ^ 'v1alpha2LeaseCandidateSpecBinaryVersion': BinaryVersion is the binary version. It must be in a semver format without leading `v`. This field is required.
  -> Text -- ^ 'v1alpha2LeaseCandidateSpecLeaseName': LeaseName is the name of the lease for which this candidate is contending. This field is immutable.
  -> Text -- ^ 'v1alpha2LeaseCandidateSpecStrategy': Strategy is the strategy that coordinated leader election will use for picking the leader. If multiple candidates for the same Lease return different strategies, the strategy provided by the candidate with the latest BinaryVersion will be used. If there is still conflict, this is a user error and coordinated leader election will not operate the Lease until resolved. (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.
  -> V1alpha2LeaseCandidateSpec
mkV1alpha2LeaseCandidateSpec :: Text -> Text -> Text -> V1alpha2LeaseCandidateSpec
mkV1alpha2LeaseCandidateSpec Text
v1alpha2LeaseCandidateSpecBinaryVersion Text
v1alpha2LeaseCandidateSpecLeaseName Text
v1alpha2LeaseCandidateSpecStrategy =
  V1alpha2LeaseCandidateSpec
  { Text
$sel:v1alpha2LeaseCandidateSpecBinaryVersion:V1alpha2LeaseCandidateSpec :: Text
v1alpha2LeaseCandidateSpecBinaryVersion :: Text
v1alpha2LeaseCandidateSpecBinaryVersion
  , $sel:v1alpha2LeaseCandidateSpecEmulationVersion:V1alpha2LeaseCandidateSpec :: Maybe Text
v1alpha2LeaseCandidateSpecEmulationVersion = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1alpha2LeaseCandidateSpecLeaseName:V1alpha2LeaseCandidateSpec :: Text
v1alpha2LeaseCandidateSpecLeaseName :: Text
v1alpha2LeaseCandidateSpecLeaseName
  , $sel:v1alpha2LeaseCandidateSpecPingTime:V1alpha2LeaseCandidateSpec :: Maybe DateTime
v1alpha2LeaseCandidateSpecPingTime = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v1alpha2LeaseCandidateSpecRenewTime:V1alpha2LeaseCandidateSpec :: Maybe DateTime
v1alpha2LeaseCandidateSpecRenewTime = Maybe DateTime
forall a. Maybe a
Nothing
  , Text
$sel:v1alpha2LeaseCandidateSpecStrategy:V1alpha2LeaseCandidateSpec :: Text
v1alpha2LeaseCandidateSpecStrategy :: Text
v1alpha2LeaseCandidateSpecStrategy
  }

-- ** V1alpha3AllocatedDeviceStatus
-- | V1alpha3AllocatedDeviceStatus
-- AllocatedDeviceStatus contains the status of an allocated device, if the driver chooses to report it. This may include driver-specific information.
data V1alpha3AllocatedDeviceStatus = V1alpha3AllocatedDeviceStatus
  { V1alpha3AllocatedDeviceStatus -> Maybe [V1Condition]
v1alpha3AllocatedDeviceStatusConditions :: !(Maybe [V1Condition]) -- ^ "conditions" - Conditions contains the latest observation of the device&#39;s state. If the device has been configured according to the class and claim config references, the &#x60;Ready&#x60; condition should be True.
  , V1alpha3AllocatedDeviceStatus -> Maybe Value
v1alpha3AllocatedDeviceStatusData :: !(Maybe A.Value) -- ^ "data" - Data contains arbitrary driver-specific data.  The length of the raw data must be smaller or equal to 10 Ki.
  , V1alpha3AllocatedDeviceStatus -> Text
v1alpha3AllocatedDeviceStatusDevice :: !(Text) -- ^ /Required/ "device" - Device references one device instance via its name in the driver&#39;s resource pool. It must be a DNS label.
  , V1alpha3AllocatedDeviceStatus -> Text
v1alpha3AllocatedDeviceStatusDriver :: !(Text) -- ^ /Required/ "driver" - Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.  Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.
  , V1alpha3AllocatedDeviceStatus -> Maybe V1alpha3NetworkDeviceData
v1alpha3AllocatedDeviceStatusNetworkData :: !(Maybe V1alpha3NetworkDeviceData) -- ^ "networkData"
  , V1alpha3AllocatedDeviceStatus -> Text
v1alpha3AllocatedDeviceStatusPool :: !(Text) -- ^ /Required/ "pool" - This name together with the driver name and the device name field identify which device was allocated (&#x60;&lt;driver name&gt;/&lt;pool name&gt;/&lt;device name&gt;&#x60;).  Must not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.
  } deriving (Int -> V1alpha3AllocatedDeviceStatus -> ShowS
[V1alpha3AllocatedDeviceStatus] -> ShowS
V1alpha3AllocatedDeviceStatus -> String
(Int -> V1alpha3AllocatedDeviceStatus -> ShowS)
-> (V1alpha3AllocatedDeviceStatus -> String)
-> ([V1alpha3AllocatedDeviceStatus] -> ShowS)
-> Show V1alpha3AllocatedDeviceStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha3AllocatedDeviceStatus -> ShowS
showsPrec :: Int -> V1alpha3AllocatedDeviceStatus -> ShowS
$cshow :: V1alpha3AllocatedDeviceStatus -> String
show :: V1alpha3AllocatedDeviceStatus -> String
$cshowList :: [V1alpha3AllocatedDeviceStatus] -> ShowS
showList :: [V1alpha3AllocatedDeviceStatus] -> ShowS
P.Show, V1alpha3AllocatedDeviceStatus
-> V1alpha3AllocatedDeviceStatus -> Bool
(V1alpha3AllocatedDeviceStatus
 -> V1alpha3AllocatedDeviceStatus -> Bool)
-> (V1alpha3AllocatedDeviceStatus
    -> V1alpha3AllocatedDeviceStatus -> Bool)
-> Eq V1alpha3AllocatedDeviceStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha3AllocatedDeviceStatus
-> V1alpha3AllocatedDeviceStatus -> Bool
== :: V1alpha3AllocatedDeviceStatus
-> V1alpha3AllocatedDeviceStatus -> Bool
$c/= :: V1alpha3AllocatedDeviceStatus
-> V1alpha3AllocatedDeviceStatus -> Bool
/= :: V1alpha3AllocatedDeviceStatus
-> V1alpha3AllocatedDeviceStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha3AllocatedDeviceStatus
instance A.FromJSON V1alpha3AllocatedDeviceStatus where
  parseJSON :: Value -> Parser V1alpha3AllocatedDeviceStatus
parseJSON = String
-> (Object -> Parser V1alpha3AllocatedDeviceStatus)
-> Value
-> Parser V1alpha3AllocatedDeviceStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha3AllocatedDeviceStatus" ((Object -> Parser V1alpha3AllocatedDeviceStatus)
 -> Value -> Parser V1alpha3AllocatedDeviceStatus)
-> (Object -> Parser V1alpha3AllocatedDeviceStatus)
-> Value
-> Parser V1alpha3AllocatedDeviceStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1Condition]
-> Maybe Value
-> Text
-> Text
-> Maybe V1alpha3NetworkDeviceData
-> Text
-> V1alpha3AllocatedDeviceStatus
V1alpha3AllocatedDeviceStatus
      (Maybe [V1Condition]
 -> Maybe Value
 -> Text
 -> Text
 -> Maybe V1alpha3NetworkDeviceData
 -> Text
 -> V1alpha3AllocatedDeviceStatus)
-> Parser (Maybe [V1Condition])
-> Parser
     (Maybe Value
      -> Text
      -> Text
      -> Maybe V1alpha3NetworkDeviceData
      -> Text
      -> V1alpha3AllocatedDeviceStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1Condition])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"conditions")
      Parser
  (Maybe Value
   -> Text
   -> Text
   -> Maybe V1alpha3NetworkDeviceData
   -> Text
   -> V1alpha3AllocatedDeviceStatus)
-> Parser (Maybe Value)
-> Parser
     (Text
      -> Text
      -> Maybe V1alpha3NetworkDeviceData
      -> Text
      -> V1alpha3AllocatedDeviceStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Value)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"data")
      Parser
  (Text
   -> Text
   -> Maybe V1alpha3NetworkDeviceData
   -> Text
   -> V1alpha3AllocatedDeviceStatus)
-> Parser Text
-> Parser
     (Text
      -> Maybe V1alpha3NetworkDeviceData
      -> Text
      -> V1alpha3AllocatedDeviceStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"device")
      Parser
  (Text
   -> Maybe V1alpha3NetworkDeviceData
   -> Text
   -> V1alpha3AllocatedDeviceStatus)
-> Parser Text
-> Parser
     (Maybe V1alpha3NetworkDeviceData
      -> Text -> V1alpha3AllocatedDeviceStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"driver")
      Parser
  (Maybe V1alpha3NetworkDeviceData
   -> Text -> V1alpha3AllocatedDeviceStatus)
-> Parser (Maybe V1alpha3NetworkDeviceData)
-> Parser (Text -> V1alpha3AllocatedDeviceStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1alpha3NetworkDeviceData)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"networkData")
      Parser (Text -> V1alpha3AllocatedDeviceStatus)
-> Parser Text -> Parser V1alpha3AllocatedDeviceStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"pool")

-- | ToJSON V1alpha3AllocatedDeviceStatus
instance A.ToJSON V1alpha3AllocatedDeviceStatus where
  toJSON :: V1alpha3AllocatedDeviceStatus -> Value
toJSON V1alpha3AllocatedDeviceStatus {Maybe [V1Condition]
Maybe Value
Maybe V1alpha3NetworkDeviceData
Text
$sel:v1alpha3AllocatedDeviceStatusConditions:V1alpha3AllocatedDeviceStatus :: V1alpha3AllocatedDeviceStatus -> Maybe [V1Condition]
$sel:v1alpha3AllocatedDeviceStatusData:V1alpha3AllocatedDeviceStatus :: V1alpha3AllocatedDeviceStatus -> Maybe Value
$sel:v1alpha3AllocatedDeviceStatusDevice:V1alpha3AllocatedDeviceStatus :: V1alpha3AllocatedDeviceStatus -> Text
$sel:v1alpha3AllocatedDeviceStatusDriver:V1alpha3AllocatedDeviceStatus :: V1alpha3AllocatedDeviceStatus -> Text
$sel:v1alpha3AllocatedDeviceStatusNetworkData:V1alpha3AllocatedDeviceStatus :: V1alpha3AllocatedDeviceStatus -> Maybe V1alpha3NetworkDeviceData
$sel:v1alpha3AllocatedDeviceStatusPool:V1alpha3AllocatedDeviceStatus :: V1alpha3AllocatedDeviceStatus -> Text
v1alpha3AllocatedDeviceStatusConditions :: Maybe [V1Condition]
v1alpha3AllocatedDeviceStatusData :: Maybe Value
v1alpha3AllocatedDeviceStatusDevice :: Text
v1alpha3AllocatedDeviceStatusDriver :: Text
v1alpha3AllocatedDeviceStatusNetworkData :: Maybe V1alpha3NetworkDeviceData
v1alpha3AllocatedDeviceStatusPool :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"conditions" Key -> Maybe [V1Condition] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1Condition]
v1alpha3AllocatedDeviceStatusConditions
      , Key
"data" Key -> Maybe Value -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Value
v1alpha3AllocatedDeviceStatusData
      , Key
"device" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha3AllocatedDeviceStatusDevice
      , Key
"driver" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha3AllocatedDeviceStatusDriver
      , Key
"networkData" Key -> Maybe V1alpha3NetworkDeviceData -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1alpha3NetworkDeviceData
v1alpha3AllocatedDeviceStatusNetworkData
      , Key
"pool" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha3AllocatedDeviceStatusPool
      ]


-- | Construct a value of type 'V1alpha3AllocatedDeviceStatus' (by applying it's required fields, if any)
mkV1alpha3AllocatedDeviceStatus
  :: Text -- ^ 'v1alpha3AllocatedDeviceStatusDevice': Device references one device instance via its name in the driver's resource pool. It must be a DNS label.
  -> Text -- ^ 'v1alpha3AllocatedDeviceStatusDriver': Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.  Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.
  -> Text -- ^ 'v1alpha3AllocatedDeviceStatusPool': This name together with the driver name and the device name field identify which device was allocated (`<driver name>/<pool name>/<device name>`).  Must not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.
  -> V1alpha3AllocatedDeviceStatus
mkV1alpha3AllocatedDeviceStatus :: Text -> Text -> Text -> V1alpha3AllocatedDeviceStatus
mkV1alpha3AllocatedDeviceStatus Text
v1alpha3AllocatedDeviceStatusDevice Text
v1alpha3AllocatedDeviceStatusDriver Text
v1alpha3AllocatedDeviceStatusPool =
  V1alpha3AllocatedDeviceStatus
  { $sel:v1alpha3AllocatedDeviceStatusConditions:V1alpha3AllocatedDeviceStatus :: Maybe [V1Condition]
v1alpha3AllocatedDeviceStatusConditions = Maybe [V1Condition]
forall a. Maybe a
Nothing
  , $sel:v1alpha3AllocatedDeviceStatusData:V1alpha3AllocatedDeviceStatus :: Maybe Value
v1alpha3AllocatedDeviceStatusData = Maybe Value
forall a. Maybe a
Nothing
  , Text
$sel:v1alpha3AllocatedDeviceStatusDevice:V1alpha3AllocatedDeviceStatus :: Text
v1alpha3AllocatedDeviceStatusDevice :: Text
v1alpha3AllocatedDeviceStatusDevice
  , Text
$sel:v1alpha3AllocatedDeviceStatusDriver:V1alpha3AllocatedDeviceStatus :: Text
v1alpha3AllocatedDeviceStatusDriver :: Text
v1alpha3AllocatedDeviceStatusDriver
  , $sel:v1alpha3AllocatedDeviceStatusNetworkData:V1alpha3AllocatedDeviceStatus :: Maybe V1alpha3NetworkDeviceData
v1alpha3AllocatedDeviceStatusNetworkData = Maybe V1alpha3NetworkDeviceData
forall a. Maybe a
Nothing
  , Text
$sel:v1alpha3AllocatedDeviceStatusPool:V1alpha3AllocatedDeviceStatus :: Text
v1alpha3AllocatedDeviceStatusPool :: Text
v1alpha3AllocatedDeviceStatusPool
  }

-- ** V1alpha3AllocationResult
-- | V1alpha3AllocationResult
-- AllocationResult contains attributes of an allocated resource.
data V1alpha3AllocationResult = V1alpha3AllocationResult
  { V1alpha3AllocationResult -> Maybe V1alpha3DeviceAllocationResult
v1alpha3AllocationResultDevices :: !(Maybe V1alpha3DeviceAllocationResult) -- ^ "devices"
  , V1alpha3AllocationResult -> Maybe V1NodeSelector
v1alpha3AllocationResultNodeSelector :: !(Maybe V1NodeSelector) -- ^ "nodeSelector"
  } deriving (Int -> V1alpha3AllocationResult -> ShowS
[V1alpha3AllocationResult] -> ShowS
V1alpha3AllocationResult -> String
(Int -> V1alpha3AllocationResult -> ShowS)
-> (V1alpha3AllocationResult -> String)
-> ([V1alpha3AllocationResult] -> ShowS)
-> Show V1alpha3AllocationResult
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha3AllocationResult -> ShowS
showsPrec :: Int -> V1alpha3AllocationResult -> ShowS
$cshow :: V1alpha3AllocationResult -> String
show :: V1alpha3AllocationResult -> String
$cshowList :: [V1alpha3AllocationResult] -> ShowS
showList :: [V1alpha3AllocationResult] -> ShowS
P.Show, V1alpha3AllocationResult -> V1alpha3AllocationResult -> Bool
(V1alpha3AllocationResult -> V1alpha3AllocationResult -> Bool)
-> (V1alpha3AllocationResult -> V1alpha3AllocationResult -> Bool)
-> Eq V1alpha3AllocationResult
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha3AllocationResult -> V1alpha3AllocationResult -> Bool
== :: V1alpha3AllocationResult -> V1alpha3AllocationResult -> Bool
$c/= :: V1alpha3AllocationResult -> V1alpha3AllocationResult -> Bool
/= :: V1alpha3AllocationResult -> V1alpha3AllocationResult -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha3AllocationResult
instance A.FromJSON V1alpha3AllocationResult where
  parseJSON :: Value -> Parser V1alpha3AllocationResult
parseJSON = String
-> (Object -> Parser V1alpha3AllocationResult)
-> Value
-> Parser V1alpha3AllocationResult
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha3AllocationResult" ((Object -> Parser V1alpha3AllocationResult)
 -> Value -> Parser V1alpha3AllocationResult)
-> (Object -> Parser V1alpha3AllocationResult)
-> Value
-> Parser V1alpha3AllocationResult
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1alpha3DeviceAllocationResult
-> Maybe V1NodeSelector -> V1alpha3AllocationResult
V1alpha3AllocationResult
      (Maybe V1alpha3DeviceAllocationResult
 -> Maybe V1NodeSelector -> V1alpha3AllocationResult)
-> Parser (Maybe V1alpha3DeviceAllocationResult)
-> Parser (Maybe V1NodeSelector -> V1alpha3AllocationResult)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1alpha3DeviceAllocationResult)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"devices")
      Parser (Maybe V1NodeSelector -> V1alpha3AllocationResult)
-> Parser (Maybe V1NodeSelector) -> Parser V1alpha3AllocationResult
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1NodeSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nodeSelector")

-- | ToJSON V1alpha3AllocationResult
instance A.ToJSON V1alpha3AllocationResult where
  toJSON :: V1alpha3AllocationResult -> Value
toJSON V1alpha3AllocationResult {Maybe V1alpha3DeviceAllocationResult
Maybe V1NodeSelector
$sel:v1alpha3AllocationResultDevices:V1alpha3AllocationResult :: V1alpha3AllocationResult -> Maybe V1alpha3DeviceAllocationResult
$sel:v1alpha3AllocationResultNodeSelector:V1alpha3AllocationResult :: V1alpha3AllocationResult -> Maybe V1NodeSelector
v1alpha3AllocationResultDevices :: Maybe V1alpha3DeviceAllocationResult
v1alpha3AllocationResultNodeSelector :: Maybe V1NodeSelector
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"devices" Key -> Maybe V1alpha3DeviceAllocationResult -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1alpha3DeviceAllocationResult
v1alpha3AllocationResultDevices
      , Key
"nodeSelector" Key -> Maybe V1NodeSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1NodeSelector
v1alpha3AllocationResultNodeSelector
      ]


-- | Construct a value of type 'V1alpha3AllocationResult' (by applying it's required fields, if any)
mkV1alpha3AllocationResult
  :: V1alpha3AllocationResult
mkV1alpha3AllocationResult :: V1alpha3AllocationResult
mkV1alpha3AllocationResult =
  V1alpha3AllocationResult
  { $sel:v1alpha3AllocationResultDevices:V1alpha3AllocationResult :: Maybe V1alpha3DeviceAllocationResult
v1alpha3AllocationResultDevices = Maybe V1alpha3DeviceAllocationResult
forall a. Maybe a
Nothing
  , $sel:v1alpha3AllocationResultNodeSelector:V1alpha3AllocationResult :: Maybe V1NodeSelector
v1alpha3AllocationResultNodeSelector = Maybe V1NodeSelector
forall a. Maybe a
Nothing
  }

-- ** V1alpha3BasicDevice
-- | V1alpha3BasicDevice
-- BasicDevice defines one device instance.
data V1alpha3BasicDevice = V1alpha3BasicDevice
  { V1alpha3BasicDevice -> Maybe (Map String V1alpha3DeviceAttribute)
v1alpha3BasicDeviceAttributes :: !(Maybe (Map.Map String V1alpha3DeviceAttribute)) -- ^ "attributes" - Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set.  The maximum number of attributes and capacities combined is 32.
  , V1alpha3BasicDevice -> Maybe (Map String Quantity)
v1alpha3BasicDeviceCapacity :: !(Maybe (Map.Map String Quantity)) -- ^ "capacity" - Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set.  The maximum number of attributes and capacities combined is 32.
  } deriving (Int -> V1alpha3BasicDevice -> ShowS
[V1alpha3BasicDevice] -> ShowS
V1alpha3BasicDevice -> String
(Int -> V1alpha3BasicDevice -> ShowS)
-> (V1alpha3BasicDevice -> String)
-> ([V1alpha3BasicDevice] -> ShowS)
-> Show V1alpha3BasicDevice
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha3BasicDevice -> ShowS
showsPrec :: Int -> V1alpha3BasicDevice -> ShowS
$cshow :: V1alpha3BasicDevice -> String
show :: V1alpha3BasicDevice -> String
$cshowList :: [V1alpha3BasicDevice] -> ShowS
showList :: [V1alpha3BasicDevice] -> ShowS
P.Show, V1alpha3BasicDevice -> V1alpha3BasicDevice -> Bool
(V1alpha3BasicDevice -> V1alpha3BasicDevice -> Bool)
-> (V1alpha3BasicDevice -> V1alpha3BasicDevice -> Bool)
-> Eq V1alpha3BasicDevice
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha3BasicDevice -> V1alpha3BasicDevice -> Bool
== :: V1alpha3BasicDevice -> V1alpha3BasicDevice -> Bool
$c/= :: V1alpha3BasicDevice -> V1alpha3BasicDevice -> Bool
/= :: V1alpha3BasicDevice -> V1alpha3BasicDevice -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha3BasicDevice
instance A.FromJSON V1alpha3BasicDevice where
  parseJSON :: Value -> Parser V1alpha3BasicDevice
parseJSON = String
-> (Object -> Parser V1alpha3BasicDevice)
-> Value
-> Parser V1alpha3BasicDevice
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha3BasicDevice" ((Object -> Parser V1alpha3BasicDevice)
 -> Value -> Parser V1alpha3BasicDevice)
-> (Object -> Parser V1alpha3BasicDevice)
-> Value
-> Parser V1alpha3BasicDevice
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe (Map String V1alpha3DeviceAttribute)
-> Maybe (Map String Quantity) -> V1alpha3BasicDevice
V1alpha3BasicDevice
      (Maybe (Map String V1alpha3DeviceAttribute)
 -> Maybe (Map String Quantity) -> V1alpha3BasicDevice)
-> Parser (Maybe (Map String V1alpha3DeviceAttribute))
-> Parser (Maybe (Map String Quantity) -> V1alpha3BasicDevice)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object
-> Key -> Parser (Maybe (Map String V1alpha3DeviceAttribute))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"attributes")
      Parser (Maybe (Map String Quantity) -> V1alpha3BasicDevice)
-> Parser (Maybe (Map String Quantity))
-> Parser V1alpha3BasicDevice
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String Quantity))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"capacity")

-- | ToJSON V1alpha3BasicDevice
instance A.ToJSON V1alpha3BasicDevice where
  toJSON :: V1alpha3BasicDevice -> Value
toJSON V1alpha3BasicDevice {Maybe (Map String Quantity)
Maybe (Map String V1alpha3DeviceAttribute)
$sel:v1alpha3BasicDeviceAttributes:V1alpha3BasicDevice :: V1alpha3BasicDevice -> Maybe (Map String V1alpha3DeviceAttribute)
$sel:v1alpha3BasicDeviceCapacity:V1alpha3BasicDevice :: V1alpha3BasicDevice -> Maybe (Map String Quantity)
v1alpha3BasicDeviceAttributes :: Maybe (Map String V1alpha3DeviceAttribute)
v1alpha3BasicDeviceCapacity :: Maybe (Map String Quantity)
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"attributes" Key -> Maybe (Map String V1alpha3DeviceAttribute) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String V1alpha3DeviceAttribute)
v1alpha3BasicDeviceAttributes
      , Key
"capacity" Key -> Maybe (Map String Quantity) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Quantity)
v1alpha3BasicDeviceCapacity
      ]


-- | Construct a value of type 'V1alpha3BasicDevice' (by applying it's required fields, if any)
mkV1alpha3BasicDevice
  :: V1alpha3BasicDevice
mkV1alpha3BasicDevice :: V1alpha3BasicDevice
mkV1alpha3BasicDevice =
  V1alpha3BasicDevice
  { $sel:v1alpha3BasicDeviceAttributes:V1alpha3BasicDevice :: Maybe (Map String V1alpha3DeviceAttribute)
v1alpha3BasicDeviceAttributes = Maybe (Map String V1alpha3DeviceAttribute)
forall a. Maybe a
Nothing
  , $sel:v1alpha3BasicDeviceCapacity:V1alpha3BasicDevice :: Maybe (Map String Quantity)
v1alpha3BasicDeviceCapacity = Maybe (Map String Quantity)
forall a. Maybe a
Nothing
  }

-- ** V1alpha3CELDeviceSelector
-- | V1alpha3CELDeviceSelector
-- CELDeviceSelector contains a CEL expression for selecting a device.
data V1alpha3CELDeviceSelector = V1alpha3CELDeviceSelector
  { V1alpha3CELDeviceSelector -> Text
v1alpha3CELDeviceSelectorExpression :: !(Text) -- ^ /Required/ "expression" - Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort.  The expression&#39;s input is an object named \&quot;device\&quot;, which carries the following properties:  - driver (string): the name of the driver which defines this device.  - attributes (map[string]object): the device&#39;s attributes, grouped by prefix    (e.g. device.attributes[\&quot;dra.example.com\&quot;] evaluates to an object with all    of the attributes which were prefixed by \&quot;dra.example.com\&quot;.  - capacity (map[string]object): the device&#39;s capacities, grouped by prefix.  Example: Consider a device with driver&#x3D;\&quot;dra.example.com\&quot;, which exposes two attributes named \&quot;model\&quot; and \&quot;ext.example.com/family\&quot; and which exposes one capacity named \&quot;modules\&quot;. This input to this expression would have the following fields:      device.driver     device.attributes[\&quot;dra.example.com\&quot;].model     device.attributes[\&quot;ext.example.com\&quot;].family     device.capacity[\&quot;dra.example.com\&quot;].modules  The device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers.  The value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity.  If an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort.  A robust expression should check for the existence of attributes before referencing them.  For ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example:      cel.bind(dra, device.attributes[\&quot;dra.example.com\&quot;], dra.someBool &amp;&amp; dra.anotherBool)  The length of the expression must be smaller or equal to 10 Ki. The cost of evaluating it is also limited based on the estimated number of logical steps.
  } deriving (Int -> V1alpha3CELDeviceSelector -> ShowS
[V1alpha3CELDeviceSelector] -> ShowS
V1alpha3CELDeviceSelector -> String
(Int -> V1alpha3CELDeviceSelector -> ShowS)
-> (V1alpha3CELDeviceSelector -> String)
-> ([V1alpha3CELDeviceSelector] -> ShowS)
-> Show V1alpha3CELDeviceSelector
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha3CELDeviceSelector -> ShowS
showsPrec :: Int -> V1alpha3CELDeviceSelector -> ShowS
$cshow :: V1alpha3CELDeviceSelector -> String
show :: V1alpha3CELDeviceSelector -> String
$cshowList :: [V1alpha3CELDeviceSelector] -> ShowS
showList :: [V1alpha3CELDeviceSelector] -> ShowS
P.Show, V1alpha3CELDeviceSelector -> V1alpha3CELDeviceSelector -> Bool
(V1alpha3CELDeviceSelector -> V1alpha3CELDeviceSelector -> Bool)
-> (V1alpha3CELDeviceSelector -> V1alpha3CELDeviceSelector -> Bool)
-> Eq V1alpha3CELDeviceSelector
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha3CELDeviceSelector -> V1alpha3CELDeviceSelector -> Bool
== :: V1alpha3CELDeviceSelector -> V1alpha3CELDeviceSelector -> Bool
$c/= :: V1alpha3CELDeviceSelector -> V1alpha3CELDeviceSelector -> Bool
/= :: V1alpha3CELDeviceSelector -> V1alpha3CELDeviceSelector -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha3CELDeviceSelector
instance A.FromJSON V1alpha3CELDeviceSelector where
  parseJSON :: Value -> Parser V1alpha3CELDeviceSelector
parseJSON = String
-> (Object -> Parser V1alpha3CELDeviceSelector)
-> Value
-> Parser V1alpha3CELDeviceSelector
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha3CELDeviceSelector" ((Object -> Parser V1alpha3CELDeviceSelector)
 -> Value -> Parser V1alpha3CELDeviceSelector)
-> (Object -> Parser V1alpha3CELDeviceSelector)
-> Value
-> Parser V1alpha3CELDeviceSelector
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> V1alpha3CELDeviceSelector
V1alpha3CELDeviceSelector
      (Text -> V1alpha3CELDeviceSelector)
-> Parser Text -> Parser V1alpha3CELDeviceSelector
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"expression")

-- | ToJSON V1alpha3CELDeviceSelector
instance A.ToJSON V1alpha3CELDeviceSelector where
  toJSON :: V1alpha3CELDeviceSelector -> Value
toJSON V1alpha3CELDeviceSelector {Text
$sel:v1alpha3CELDeviceSelectorExpression:V1alpha3CELDeviceSelector :: V1alpha3CELDeviceSelector -> Text
v1alpha3CELDeviceSelectorExpression :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"expression" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha3CELDeviceSelectorExpression
      ]


-- | Construct a value of type 'V1alpha3CELDeviceSelector' (by applying it's required fields, if any)
mkV1alpha3CELDeviceSelector
  :: Text -- ^ 'v1alpha3CELDeviceSelectorExpression': Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort.  The expression's input is an object named \"device\", which carries the following properties:  - driver (string): the name of the driver which defines this device.  - attributes (map[string]object): the device's attributes, grouped by prefix    (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all    of the attributes which were prefixed by \"dra.example.com\".  - capacity (map[string]object): the device's capacities, grouped by prefix.  Example: Consider a device with driver=\"dra.example.com\", which exposes two attributes named \"model\" and \"ext.example.com/family\" and which exposes one capacity named \"modules\". This input to this expression would have the following fields:      device.driver     device.attributes[\"dra.example.com\"].model     device.attributes[\"ext.example.com\"].family     device.capacity[\"dra.example.com\"].modules  The device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers.  The value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity.  If an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort.  A robust expression should check for the existence of attributes before referencing them.  For ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example:      cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool)  The length of the expression must be smaller or equal to 10 Ki. The cost of evaluating it is also limited based on the estimated number of logical steps.
  -> V1alpha3CELDeviceSelector
mkV1alpha3CELDeviceSelector :: Text -> V1alpha3CELDeviceSelector
mkV1alpha3CELDeviceSelector Text
v1alpha3CELDeviceSelectorExpression =
  V1alpha3CELDeviceSelector
  { Text
$sel:v1alpha3CELDeviceSelectorExpression:V1alpha3CELDeviceSelector :: Text
v1alpha3CELDeviceSelectorExpression :: Text
v1alpha3CELDeviceSelectorExpression
  }

-- ** V1alpha3Device
-- | V1alpha3Device
-- Device represents one individual hardware instance that can be selected based on its attributes. Besides the name, exactly one field must be set.
data V1alpha3Device = V1alpha3Device
  { V1alpha3Device -> Maybe V1alpha3BasicDevice
v1alpha3DeviceBasic :: !(Maybe V1alpha3BasicDevice) -- ^ "basic"
  , V1alpha3Device -> Text
v1alpha3DeviceName :: !(Text) -- ^ /Required/ "name" - Name is unique identifier among all devices managed by the driver in the pool. It must be a DNS label.
  } deriving (Int -> V1alpha3Device -> ShowS
[V1alpha3Device] -> ShowS
V1alpha3Device -> String
(Int -> V1alpha3Device -> ShowS)
-> (V1alpha3Device -> String)
-> ([V1alpha3Device] -> ShowS)
-> Show V1alpha3Device
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha3Device -> ShowS
showsPrec :: Int -> V1alpha3Device -> ShowS
$cshow :: V1alpha3Device -> String
show :: V1alpha3Device -> String
$cshowList :: [V1alpha3Device] -> ShowS
showList :: [V1alpha3Device] -> ShowS
P.Show, V1alpha3Device -> V1alpha3Device -> Bool
(V1alpha3Device -> V1alpha3Device -> Bool)
-> (V1alpha3Device -> V1alpha3Device -> Bool) -> Eq V1alpha3Device
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha3Device -> V1alpha3Device -> Bool
== :: V1alpha3Device -> V1alpha3Device -> Bool
$c/= :: V1alpha3Device -> V1alpha3Device -> Bool
/= :: V1alpha3Device -> V1alpha3Device -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha3Device
instance A.FromJSON V1alpha3Device where
  parseJSON :: Value -> Parser V1alpha3Device
parseJSON = String
-> (Object -> Parser V1alpha3Device)
-> Value
-> Parser V1alpha3Device
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha3Device" ((Object -> Parser V1alpha3Device)
 -> Value -> Parser V1alpha3Device)
-> (Object -> Parser V1alpha3Device)
-> Value
-> Parser V1alpha3Device
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1alpha3BasicDevice -> Text -> V1alpha3Device
V1alpha3Device
      (Maybe V1alpha3BasicDevice -> Text -> V1alpha3Device)
-> Parser (Maybe V1alpha3BasicDevice)
-> Parser (Text -> V1alpha3Device)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1alpha3BasicDevice)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"basic")
      Parser (Text -> V1alpha3Device)
-> Parser Text -> Parser V1alpha3Device
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")

-- | ToJSON V1alpha3Device
instance A.ToJSON V1alpha3Device where
  toJSON :: V1alpha3Device -> Value
toJSON V1alpha3Device {Maybe V1alpha3BasicDevice
Text
$sel:v1alpha3DeviceBasic:V1alpha3Device :: V1alpha3Device -> Maybe V1alpha3BasicDevice
$sel:v1alpha3DeviceName:V1alpha3Device :: V1alpha3Device -> Text
v1alpha3DeviceBasic :: Maybe V1alpha3BasicDevice
v1alpha3DeviceName :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"basic" Key -> Maybe V1alpha3BasicDevice -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1alpha3BasicDevice
v1alpha3DeviceBasic
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha3DeviceName
      ]


-- | Construct a value of type 'V1alpha3Device' (by applying it's required fields, if any)
mkV1alpha3Device
  :: Text -- ^ 'v1alpha3DeviceName': Name is unique identifier among all devices managed by the driver in the pool. It must be a DNS label.
  -> V1alpha3Device
mkV1alpha3Device :: Text -> V1alpha3Device
mkV1alpha3Device Text
v1alpha3DeviceName =
  V1alpha3Device
  { $sel:v1alpha3DeviceBasic:V1alpha3Device :: Maybe V1alpha3BasicDevice
v1alpha3DeviceBasic = Maybe V1alpha3BasicDevice
forall a. Maybe a
Nothing
  , Text
$sel:v1alpha3DeviceName:V1alpha3Device :: Text
v1alpha3DeviceName :: Text
v1alpha3DeviceName
  }

-- ** V1alpha3DeviceAllocationConfiguration
-- | V1alpha3DeviceAllocationConfiguration
-- DeviceAllocationConfiguration gets embedded in an AllocationResult.
data V1alpha3DeviceAllocationConfiguration = V1alpha3DeviceAllocationConfiguration
  { V1alpha3DeviceAllocationConfiguration
-> Maybe V1alpha3OpaqueDeviceConfiguration
v1alpha3DeviceAllocationConfigurationOpaque :: !(Maybe V1alpha3OpaqueDeviceConfiguration) -- ^ "opaque"
  , V1alpha3DeviceAllocationConfiguration -> Maybe [Text]
v1alpha3DeviceAllocationConfigurationRequests :: !(Maybe [Text]) -- ^ "requests" - Requests lists the names of requests where the configuration applies. If empty, its applies to all requests.
  , V1alpha3DeviceAllocationConfiguration -> Text
v1alpha3DeviceAllocationConfigurationSource :: !(Text) -- ^ /Required/ "source" - Source records whether the configuration comes from a class and thus is not something that a normal user would have been able to set or from a claim.
  } deriving (Int -> V1alpha3DeviceAllocationConfiguration -> ShowS
[V1alpha3DeviceAllocationConfiguration] -> ShowS
V1alpha3DeviceAllocationConfiguration -> String
(Int -> V1alpha3DeviceAllocationConfiguration -> ShowS)
-> (V1alpha3DeviceAllocationConfiguration -> String)
-> ([V1alpha3DeviceAllocationConfiguration] -> ShowS)
-> Show V1alpha3DeviceAllocationConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha3DeviceAllocationConfiguration -> ShowS
showsPrec :: Int -> V1alpha3DeviceAllocationConfiguration -> ShowS
$cshow :: V1alpha3DeviceAllocationConfiguration -> String
show :: V1alpha3DeviceAllocationConfiguration -> String
$cshowList :: [V1alpha3DeviceAllocationConfiguration] -> ShowS
showList :: [V1alpha3DeviceAllocationConfiguration] -> ShowS
P.Show, V1alpha3DeviceAllocationConfiguration
-> V1alpha3DeviceAllocationConfiguration -> Bool
(V1alpha3DeviceAllocationConfiguration
 -> V1alpha3DeviceAllocationConfiguration -> Bool)
-> (V1alpha3DeviceAllocationConfiguration
    -> V1alpha3DeviceAllocationConfiguration -> Bool)
-> Eq V1alpha3DeviceAllocationConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha3DeviceAllocationConfiguration
-> V1alpha3DeviceAllocationConfiguration -> Bool
== :: V1alpha3DeviceAllocationConfiguration
-> V1alpha3DeviceAllocationConfiguration -> Bool
$c/= :: V1alpha3DeviceAllocationConfiguration
-> V1alpha3DeviceAllocationConfiguration -> Bool
/= :: V1alpha3DeviceAllocationConfiguration
-> V1alpha3DeviceAllocationConfiguration -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha3DeviceAllocationConfiguration
instance A.FromJSON V1alpha3DeviceAllocationConfiguration where
  parseJSON :: Value -> Parser V1alpha3DeviceAllocationConfiguration
parseJSON = String
-> (Object -> Parser V1alpha3DeviceAllocationConfiguration)
-> Value
-> Parser V1alpha3DeviceAllocationConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha3DeviceAllocationConfiguration" ((Object -> Parser V1alpha3DeviceAllocationConfiguration)
 -> Value -> Parser V1alpha3DeviceAllocationConfiguration)
-> (Object -> Parser V1alpha3DeviceAllocationConfiguration)
-> Value
-> Parser V1alpha3DeviceAllocationConfiguration
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1alpha3OpaqueDeviceConfiguration
-> Maybe [Text] -> Text -> V1alpha3DeviceAllocationConfiguration
V1alpha3DeviceAllocationConfiguration
      (Maybe V1alpha3OpaqueDeviceConfiguration
 -> Maybe [Text] -> Text -> V1alpha3DeviceAllocationConfiguration)
-> Parser (Maybe V1alpha3OpaqueDeviceConfiguration)
-> Parser
     (Maybe [Text] -> Text -> V1alpha3DeviceAllocationConfiguration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1alpha3OpaqueDeviceConfiguration)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"opaque")
      Parser
  (Maybe [Text] -> Text -> V1alpha3DeviceAllocationConfiguration)
-> Parser (Maybe [Text])
-> Parser (Text -> V1alpha3DeviceAllocationConfiguration)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"requests")
      Parser (Text -> V1alpha3DeviceAllocationConfiguration)
-> Parser Text -> Parser V1alpha3DeviceAllocationConfiguration
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"source")

-- | ToJSON V1alpha3DeviceAllocationConfiguration
instance A.ToJSON V1alpha3DeviceAllocationConfiguration where
  toJSON :: V1alpha3DeviceAllocationConfiguration -> Value
toJSON V1alpha3DeviceAllocationConfiguration {Maybe [Text]
Maybe V1alpha3OpaqueDeviceConfiguration
Text
$sel:v1alpha3DeviceAllocationConfigurationOpaque:V1alpha3DeviceAllocationConfiguration :: V1alpha3DeviceAllocationConfiguration
-> Maybe V1alpha3OpaqueDeviceConfiguration
$sel:v1alpha3DeviceAllocationConfigurationRequests:V1alpha3DeviceAllocationConfiguration :: V1alpha3DeviceAllocationConfiguration -> Maybe [Text]
$sel:v1alpha3DeviceAllocationConfigurationSource:V1alpha3DeviceAllocationConfiguration :: V1alpha3DeviceAllocationConfiguration -> Text
v1alpha3DeviceAllocationConfigurationOpaque :: Maybe V1alpha3OpaqueDeviceConfiguration
v1alpha3DeviceAllocationConfigurationRequests :: Maybe [Text]
v1alpha3DeviceAllocationConfigurationSource :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"opaque" Key -> Maybe V1alpha3OpaqueDeviceConfiguration -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1alpha3OpaqueDeviceConfiguration
v1alpha3DeviceAllocationConfigurationOpaque
      , Key
"requests" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1alpha3DeviceAllocationConfigurationRequests
      , Key
"source" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha3DeviceAllocationConfigurationSource
      ]


-- | Construct a value of type 'V1alpha3DeviceAllocationConfiguration' (by applying it's required fields, if any)
mkV1alpha3DeviceAllocationConfiguration
  :: Text -- ^ 'v1alpha3DeviceAllocationConfigurationSource': Source records whether the configuration comes from a class and thus is not something that a normal user would have been able to set or from a claim.
  -> V1alpha3DeviceAllocationConfiguration
mkV1alpha3DeviceAllocationConfiguration :: Text -> V1alpha3DeviceAllocationConfiguration
mkV1alpha3DeviceAllocationConfiguration Text
v1alpha3DeviceAllocationConfigurationSource =
  V1alpha3DeviceAllocationConfiguration
  { $sel:v1alpha3DeviceAllocationConfigurationOpaque:V1alpha3DeviceAllocationConfiguration :: Maybe V1alpha3OpaqueDeviceConfiguration
v1alpha3DeviceAllocationConfigurationOpaque = Maybe V1alpha3OpaqueDeviceConfiguration
forall a. Maybe a
Nothing
  , $sel:v1alpha3DeviceAllocationConfigurationRequests:V1alpha3DeviceAllocationConfiguration :: Maybe [Text]
v1alpha3DeviceAllocationConfigurationRequests = Maybe [Text]
forall a. Maybe a
Nothing
  , Text
$sel:v1alpha3DeviceAllocationConfigurationSource:V1alpha3DeviceAllocationConfiguration :: Text
v1alpha3DeviceAllocationConfigurationSource :: Text
v1alpha3DeviceAllocationConfigurationSource
  }

-- ** V1alpha3DeviceAllocationResult
-- | V1alpha3DeviceAllocationResult
-- DeviceAllocationResult is the result of allocating devices.
data V1alpha3DeviceAllocationResult = V1alpha3DeviceAllocationResult
  { V1alpha3DeviceAllocationResult
-> Maybe [V1alpha3DeviceAllocationConfiguration]
v1alpha3DeviceAllocationResultConfig :: !(Maybe [V1alpha3DeviceAllocationConfiguration]) -- ^ "config" - This field is a combination of all the claim and class configuration parameters. Drivers can distinguish between those based on a flag.  This includes configuration parameters for drivers which have no allocated devices in the result because it is up to the drivers which configuration parameters they support. They can silently ignore unknown configuration parameters.
  , V1alpha3DeviceAllocationResult
-> Maybe [V1alpha3DeviceRequestAllocationResult]
v1alpha3DeviceAllocationResultResults :: !(Maybe [V1alpha3DeviceRequestAllocationResult]) -- ^ "results" - Results lists all allocated devices.
  } deriving (Int -> V1alpha3DeviceAllocationResult -> ShowS
[V1alpha3DeviceAllocationResult] -> ShowS
V1alpha3DeviceAllocationResult -> String
(Int -> V1alpha3DeviceAllocationResult -> ShowS)
-> (V1alpha3DeviceAllocationResult -> String)
-> ([V1alpha3DeviceAllocationResult] -> ShowS)
-> Show V1alpha3DeviceAllocationResult
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha3DeviceAllocationResult -> ShowS
showsPrec :: Int -> V1alpha3DeviceAllocationResult -> ShowS
$cshow :: V1alpha3DeviceAllocationResult -> String
show :: V1alpha3DeviceAllocationResult -> String
$cshowList :: [V1alpha3DeviceAllocationResult] -> ShowS
showList :: [V1alpha3DeviceAllocationResult] -> ShowS
P.Show, V1alpha3DeviceAllocationResult
-> V1alpha3DeviceAllocationResult -> Bool
(V1alpha3DeviceAllocationResult
 -> V1alpha3DeviceAllocationResult -> Bool)
-> (V1alpha3DeviceAllocationResult
    -> V1alpha3DeviceAllocationResult -> Bool)
-> Eq V1alpha3DeviceAllocationResult
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha3DeviceAllocationResult
-> V1alpha3DeviceAllocationResult -> Bool
== :: V1alpha3DeviceAllocationResult
-> V1alpha3DeviceAllocationResult -> Bool
$c/= :: V1alpha3DeviceAllocationResult
-> V1alpha3DeviceAllocationResult -> Bool
/= :: V1alpha3DeviceAllocationResult
-> V1alpha3DeviceAllocationResult -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha3DeviceAllocationResult
instance A.FromJSON V1alpha3DeviceAllocationResult where
  parseJSON :: Value -> Parser V1alpha3DeviceAllocationResult
parseJSON = String
-> (Object -> Parser V1alpha3DeviceAllocationResult)
-> Value
-> Parser V1alpha3DeviceAllocationResult
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha3DeviceAllocationResult" ((Object -> Parser V1alpha3DeviceAllocationResult)
 -> Value -> Parser V1alpha3DeviceAllocationResult)
-> (Object -> Parser V1alpha3DeviceAllocationResult)
-> Value
-> Parser V1alpha3DeviceAllocationResult
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1alpha3DeviceAllocationConfiguration]
-> Maybe [V1alpha3DeviceRequestAllocationResult]
-> V1alpha3DeviceAllocationResult
V1alpha3DeviceAllocationResult
      (Maybe [V1alpha3DeviceAllocationConfiguration]
 -> Maybe [V1alpha3DeviceRequestAllocationResult]
 -> V1alpha3DeviceAllocationResult)
-> Parser (Maybe [V1alpha3DeviceAllocationConfiguration])
-> Parser
     (Maybe [V1alpha3DeviceRequestAllocationResult]
      -> V1alpha3DeviceAllocationResult)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object
-> Key -> Parser (Maybe [V1alpha3DeviceAllocationConfiguration])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"config")
      Parser
  (Maybe [V1alpha3DeviceRequestAllocationResult]
   -> V1alpha3DeviceAllocationResult)
-> Parser (Maybe [V1alpha3DeviceRequestAllocationResult])
-> Parser V1alpha3DeviceAllocationResult
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object
-> Key -> Parser (Maybe [V1alpha3DeviceRequestAllocationResult])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"results")

-- | ToJSON V1alpha3DeviceAllocationResult
instance A.ToJSON V1alpha3DeviceAllocationResult where
  toJSON :: V1alpha3DeviceAllocationResult -> Value
toJSON V1alpha3DeviceAllocationResult {Maybe [V1alpha3DeviceRequestAllocationResult]
Maybe [V1alpha3DeviceAllocationConfiguration]
$sel:v1alpha3DeviceAllocationResultConfig:V1alpha3DeviceAllocationResult :: V1alpha3DeviceAllocationResult
-> Maybe [V1alpha3DeviceAllocationConfiguration]
$sel:v1alpha3DeviceAllocationResultResults:V1alpha3DeviceAllocationResult :: V1alpha3DeviceAllocationResult
-> Maybe [V1alpha3DeviceRequestAllocationResult]
v1alpha3DeviceAllocationResultConfig :: Maybe [V1alpha3DeviceAllocationConfiguration]
v1alpha3DeviceAllocationResultResults :: Maybe [V1alpha3DeviceRequestAllocationResult]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"config" Key
-> Maybe [V1alpha3DeviceAllocationConfiguration] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1alpha3DeviceAllocationConfiguration]
v1alpha3DeviceAllocationResultConfig
      , Key
"results" Key
-> Maybe [V1alpha3DeviceRequestAllocationResult] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1alpha3DeviceRequestAllocationResult]
v1alpha3DeviceAllocationResultResults
      ]


-- | Construct a value of type 'V1alpha3DeviceAllocationResult' (by applying it's required fields, if any)
mkV1alpha3DeviceAllocationResult
  :: V1alpha3DeviceAllocationResult
mkV1alpha3DeviceAllocationResult :: V1alpha3DeviceAllocationResult
mkV1alpha3DeviceAllocationResult =
  V1alpha3DeviceAllocationResult
  { $sel:v1alpha3DeviceAllocationResultConfig:V1alpha3DeviceAllocationResult :: Maybe [V1alpha3DeviceAllocationConfiguration]
v1alpha3DeviceAllocationResultConfig = Maybe [V1alpha3DeviceAllocationConfiguration]
forall a. Maybe a
Nothing
  , $sel:v1alpha3DeviceAllocationResultResults:V1alpha3DeviceAllocationResult :: Maybe [V1alpha3DeviceRequestAllocationResult]
v1alpha3DeviceAllocationResultResults = Maybe [V1alpha3DeviceRequestAllocationResult]
forall a. Maybe a
Nothing
  }

-- ** V1alpha3DeviceAttribute
-- | V1alpha3DeviceAttribute
-- DeviceAttribute must have exactly one field set.
data V1alpha3DeviceAttribute = V1alpha3DeviceAttribute
  { V1alpha3DeviceAttribute -> Maybe Bool
v1alpha3DeviceAttributeBool :: !(Maybe Bool) -- ^ "bool" - BoolValue is a true/false value.
  , V1alpha3DeviceAttribute -> Maybe Integer
v1alpha3DeviceAttributeInt :: !(Maybe Integer) -- ^ "int" - IntValue is a number.
  , V1alpha3DeviceAttribute -> Maybe Text
v1alpha3DeviceAttributeString :: !(Maybe Text) -- ^ "string" - StringValue is a string. Must not be longer than 64 characters.
  , V1alpha3DeviceAttribute -> Maybe Text
v1alpha3DeviceAttributeVersion :: !(Maybe Text) -- ^ "version" - VersionValue is a semantic version according to semver.org spec 2.0.0. Must not be longer than 64 characters.
  } deriving (Int -> V1alpha3DeviceAttribute -> ShowS
[V1alpha3DeviceAttribute] -> ShowS
V1alpha3DeviceAttribute -> String
(Int -> V1alpha3DeviceAttribute -> ShowS)
-> (V1alpha3DeviceAttribute -> String)
-> ([V1alpha3DeviceAttribute] -> ShowS)
-> Show V1alpha3DeviceAttribute
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha3DeviceAttribute -> ShowS
showsPrec :: Int -> V1alpha3DeviceAttribute -> ShowS
$cshow :: V1alpha3DeviceAttribute -> String
show :: V1alpha3DeviceAttribute -> String
$cshowList :: [V1alpha3DeviceAttribute] -> ShowS
showList :: [V1alpha3DeviceAttribute] -> ShowS
P.Show, V1alpha3DeviceAttribute -> V1alpha3DeviceAttribute -> Bool
(V1alpha3DeviceAttribute -> V1alpha3DeviceAttribute -> Bool)
-> (V1alpha3DeviceAttribute -> V1alpha3DeviceAttribute -> Bool)
-> Eq V1alpha3DeviceAttribute
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha3DeviceAttribute -> V1alpha3DeviceAttribute -> Bool
== :: V1alpha3DeviceAttribute -> V1alpha3DeviceAttribute -> Bool
$c/= :: V1alpha3DeviceAttribute -> V1alpha3DeviceAttribute -> Bool
/= :: V1alpha3DeviceAttribute -> V1alpha3DeviceAttribute -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha3DeviceAttribute
instance A.FromJSON V1alpha3DeviceAttribute where
  parseJSON :: Value -> Parser V1alpha3DeviceAttribute
parseJSON = String
-> (Object -> Parser V1alpha3DeviceAttribute)
-> Value
-> Parser V1alpha3DeviceAttribute
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha3DeviceAttribute" ((Object -> Parser V1alpha3DeviceAttribute)
 -> Value -> Parser V1alpha3DeviceAttribute)
-> (Object -> Parser V1alpha3DeviceAttribute)
-> Value
-> Parser V1alpha3DeviceAttribute
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Bool
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> V1alpha3DeviceAttribute
V1alpha3DeviceAttribute
      (Maybe Bool
 -> Maybe Integer
 -> Maybe Text
 -> Maybe Text
 -> V1alpha3DeviceAttribute)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Integer
      -> Maybe Text -> Maybe Text -> V1alpha3DeviceAttribute)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"bool")
      Parser
  (Maybe Integer
   -> Maybe Text -> Maybe Text -> V1alpha3DeviceAttribute)
-> Parser (Maybe Integer)
-> Parser (Maybe Text -> Maybe Text -> V1alpha3DeviceAttribute)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"int")
      Parser (Maybe Text -> Maybe Text -> V1alpha3DeviceAttribute)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> V1alpha3DeviceAttribute)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"string")
      Parser (Maybe Text -> V1alpha3DeviceAttribute)
-> Parser (Maybe Text) -> Parser V1alpha3DeviceAttribute
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"version")

-- | ToJSON V1alpha3DeviceAttribute
instance A.ToJSON V1alpha3DeviceAttribute where
  toJSON :: V1alpha3DeviceAttribute -> Value
toJSON V1alpha3DeviceAttribute {Maybe Bool
Maybe Integer
Maybe Text
$sel:v1alpha3DeviceAttributeBool:V1alpha3DeviceAttribute :: V1alpha3DeviceAttribute -> Maybe Bool
$sel:v1alpha3DeviceAttributeInt:V1alpha3DeviceAttribute :: V1alpha3DeviceAttribute -> Maybe Integer
$sel:v1alpha3DeviceAttributeString:V1alpha3DeviceAttribute :: V1alpha3DeviceAttribute -> Maybe Text
$sel:v1alpha3DeviceAttributeVersion:V1alpha3DeviceAttribute :: V1alpha3DeviceAttribute -> Maybe Text
v1alpha3DeviceAttributeBool :: Maybe Bool
v1alpha3DeviceAttributeInt :: Maybe Integer
v1alpha3DeviceAttributeString :: Maybe Text
v1alpha3DeviceAttributeVersion :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"bool" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1alpha3DeviceAttributeBool
      , Key
"int" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1alpha3DeviceAttributeInt
      , Key
"string" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha3DeviceAttributeString
      , Key
"version" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha3DeviceAttributeVersion
      ]


-- | Construct a value of type 'V1alpha3DeviceAttribute' (by applying it's required fields, if any)
mkV1alpha3DeviceAttribute
  :: V1alpha3DeviceAttribute
mkV1alpha3DeviceAttribute :: V1alpha3DeviceAttribute
mkV1alpha3DeviceAttribute =
  V1alpha3DeviceAttribute
  { $sel:v1alpha3DeviceAttributeBool:V1alpha3DeviceAttribute :: Maybe Bool
v1alpha3DeviceAttributeBool = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1alpha3DeviceAttributeInt:V1alpha3DeviceAttribute :: Maybe Integer
v1alpha3DeviceAttributeInt = Maybe Integer
forall a. Maybe a
Nothing
  , $sel:v1alpha3DeviceAttributeString:V1alpha3DeviceAttribute :: Maybe Text
v1alpha3DeviceAttributeString = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha3DeviceAttributeVersion:V1alpha3DeviceAttribute :: Maybe Text
v1alpha3DeviceAttributeVersion = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1alpha3DeviceClaim
-- | V1alpha3DeviceClaim
-- DeviceClaim defines how to request devices with a ResourceClaim.
data V1alpha3DeviceClaim = V1alpha3DeviceClaim
  { V1alpha3DeviceClaim -> Maybe [V1alpha3DeviceClaimConfiguration]
v1alpha3DeviceClaimConfig :: !(Maybe [V1alpha3DeviceClaimConfiguration]) -- ^ "config" - This field holds configuration for multiple potential drivers which could satisfy requests in this claim. It is ignored while allocating the claim.
  , V1alpha3DeviceClaim -> Maybe [V1alpha3DeviceConstraint]
v1alpha3DeviceClaimConstraints :: !(Maybe [V1alpha3DeviceConstraint]) -- ^ "constraints" - These constraints must be satisfied by the set of devices that get allocated for the claim.
  , V1alpha3DeviceClaim -> Maybe [V1alpha3DeviceRequest]
v1alpha3DeviceClaimRequests :: !(Maybe [V1alpha3DeviceRequest]) -- ^ "requests" - Requests represent individual requests for distinct devices which must all be satisfied. If empty, nothing needs to be allocated.
  } deriving (Int -> V1alpha3DeviceClaim -> ShowS
[V1alpha3DeviceClaim] -> ShowS
V1alpha3DeviceClaim -> String
(Int -> V1alpha3DeviceClaim -> ShowS)
-> (V1alpha3DeviceClaim -> String)
-> ([V1alpha3DeviceClaim] -> ShowS)
-> Show V1alpha3DeviceClaim
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha3DeviceClaim -> ShowS
showsPrec :: Int -> V1alpha3DeviceClaim -> ShowS
$cshow :: V1alpha3DeviceClaim -> String
show :: V1alpha3DeviceClaim -> String
$cshowList :: [V1alpha3DeviceClaim] -> ShowS
showList :: [V1alpha3DeviceClaim] -> ShowS
P.Show, V1alpha3DeviceClaim -> V1alpha3DeviceClaim -> Bool
(V1alpha3DeviceClaim -> V1alpha3DeviceClaim -> Bool)
-> (V1alpha3DeviceClaim -> V1alpha3DeviceClaim -> Bool)
-> Eq V1alpha3DeviceClaim
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha3DeviceClaim -> V1alpha3DeviceClaim -> Bool
== :: V1alpha3DeviceClaim -> V1alpha3DeviceClaim -> Bool
$c/= :: V1alpha3DeviceClaim -> V1alpha3DeviceClaim -> Bool
/= :: V1alpha3DeviceClaim -> V1alpha3DeviceClaim -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha3DeviceClaim
instance A.FromJSON V1alpha3DeviceClaim where
  parseJSON :: Value -> Parser V1alpha3DeviceClaim
parseJSON = String
-> (Object -> Parser V1alpha3DeviceClaim)
-> Value
-> Parser V1alpha3DeviceClaim
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha3DeviceClaim" ((Object -> Parser V1alpha3DeviceClaim)
 -> Value -> Parser V1alpha3DeviceClaim)
-> (Object -> Parser V1alpha3DeviceClaim)
-> Value
-> Parser V1alpha3DeviceClaim
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1alpha3DeviceClaimConfiguration]
-> Maybe [V1alpha3DeviceConstraint]
-> Maybe [V1alpha3DeviceRequest]
-> V1alpha3DeviceClaim
V1alpha3DeviceClaim
      (Maybe [V1alpha3DeviceClaimConfiguration]
 -> Maybe [V1alpha3DeviceConstraint]
 -> Maybe [V1alpha3DeviceRequest]
 -> V1alpha3DeviceClaim)
-> Parser (Maybe [V1alpha3DeviceClaimConfiguration])
-> Parser
     (Maybe [V1alpha3DeviceConstraint]
      -> Maybe [V1alpha3DeviceRequest] -> V1alpha3DeviceClaim)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1alpha3DeviceClaimConfiguration])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"config")
      Parser
  (Maybe [V1alpha3DeviceConstraint]
   -> Maybe [V1alpha3DeviceRequest] -> V1alpha3DeviceClaim)
-> Parser (Maybe [V1alpha3DeviceConstraint])
-> Parser (Maybe [V1alpha3DeviceRequest] -> V1alpha3DeviceClaim)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1alpha3DeviceConstraint])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"constraints")
      Parser (Maybe [V1alpha3DeviceRequest] -> V1alpha3DeviceClaim)
-> Parser (Maybe [V1alpha3DeviceRequest])
-> Parser V1alpha3DeviceClaim
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1alpha3DeviceRequest])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"requests")

-- | ToJSON V1alpha3DeviceClaim
instance A.ToJSON V1alpha3DeviceClaim where
  toJSON :: V1alpha3DeviceClaim -> Value
toJSON V1alpha3DeviceClaim {Maybe [V1alpha3DeviceRequest]
Maybe [V1alpha3DeviceConstraint]
Maybe [V1alpha3DeviceClaimConfiguration]
$sel:v1alpha3DeviceClaimConfig:V1alpha3DeviceClaim :: V1alpha3DeviceClaim -> Maybe [V1alpha3DeviceClaimConfiguration]
$sel:v1alpha3DeviceClaimConstraints:V1alpha3DeviceClaim :: V1alpha3DeviceClaim -> Maybe [V1alpha3DeviceConstraint]
$sel:v1alpha3DeviceClaimRequests:V1alpha3DeviceClaim :: V1alpha3DeviceClaim -> Maybe [V1alpha3DeviceRequest]
v1alpha3DeviceClaimConfig :: Maybe [V1alpha3DeviceClaimConfiguration]
v1alpha3DeviceClaimConstraints :: Maybe [V1alpha3DeviceConstraint]
v1alpha3DeviceClaimRequests :: Maybe [V1alpha3DeviceRequest]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"config" Key -> Maybe [V1alpha3DeviceClaimConfiguration] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1alpha3DeviceClaimConfiguration]
v1alpha3DeviceClaimConfig
      , Key
"constraints" Key -> Maybe [V1alpha3DeviceConstraint] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1alpha3DeviceConstraint]
v1alpha3DeviceClaimConstraints
      , Key
"requests" Key -> Maybe [V1alpha3DeviceRequest] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1alpha3DeviceRequest]
v1alpha3DeviceClaimRequests
      ]


-- | Construct a value of type 'V1alpha3DeviceClaim' (by applying it's required fields, if any)
mkV1alpha3DeviceClaim
  :: V1alpha3DeviceClaim
mkV1alpha3DeviceClaim :: V1alpha3DeviceClaim
mkV1alpha3DeviceClaim =
  V1alpha3DeviceClaim
  { $sel:v1alpha3DeviceClaimConfig:V1alpha3DeviceClaim :: Maybe [V1alpha3DeviceClaimConfiguration]
v1alpha3DeviceClaimConfig = Maybe [V1alpha3DeviceClaimConfiguration]
forall a. Maybe a
Nothing
  , $sel:v1alpha3DeviceClaimConstraints:V1alpha3DeviceClaim :: Maybe [V1alpha3DeviceConstraint]
v1alpha3DeviceClaimConstraints = Maybe [V1alpha3DeviceConstraint]
forall a. Maybe a
Nothing
  , $sel:v1alpha3DeviceClaimRequests:V1alpha3DeviceClaim :: Maybe [V1alpha3DeviceRequest]
v1alpha3DeviceClaimRequests = Maybe [V1alpha3DeviceRequest]
forall a. Maybe a
Nothing
  }

-- ** V1alpha3DeviceClaimConfiguration
-- | V1alpha3DeviceClaimConfiguration
-- DeviceClaimConfiguration is used for configuration parameters in DeviceClaim.
data V1alpha3DeviceClaimConfiguration = V1alpha3DeviceClaimConfiguration
  { V1alpha3DeviceClaimConfiguration
-> Maybe V1alpha3OpaqueDeviceConfiguration
v1alpha3DeviceClaimConfigurationOpaque :: !(Maybe V1alpha3OpaqueDeviceConfiguration) -- ^ "opaque"
  , V1alpha3DeviceClaimConfiguration -> Maybe [Text]
v1alpha3DeviceClaimConfigurationRequests :: !(Maybe [Text]) -- ^ "requests" - Requests lists the names of requests where the configuration applies. If empty, it applies to all requests.
  } deriving (Int -> V1alpha3DeviceClaimConfiguration -> ShowS
[V1alpha3DeviceClaimConfiguration] -> ShowS
V1alpha3DeviceClaimConfiguration -> String
(Int -> V1alpha3DeviceClaimConfiguration -> ShowS)
-> (V1alpha3DeviceClaimConfiguration -> String)
-> ([V1alpha3DeviceClaimConfiguration] -> ShowS)
-> Show V1alpha3DeviceClaimConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha3DeviceClaimConfiguration -> ShowS
showsPrec :: Int -> V1alpha3DeviceClaimConfiguration -> ShowS
$cshow :: V1alpha3DeviceClaimConfiguration -> String
show :: V1alpha3DeviceClaimConfiguration -> String
$cshowList :: [V1alpha3DeviceClaimConfiguration] -> ShowS
showList :: [V1alpha3DeviceClaimConfiguration] -> ShowS
P.Show, V1alpha3DeviceClaimConfiguration
-> V1alpha3DeviceClaimConfiguration -> Bool
(V1alpha3DeviceClaimConfiguration
 -> V1alpha3DeviceClaimConfiguration -> Bool)
-> (V1alpha3DeviceClaimConfiguration
    -> V1alpha3DeviceClaimConfiguration -> Bool)
-> Eq V1alpha3DeviceClaimConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha3DeviceClaimConfiguration
-> V1alpha3DeviceClaimConfiguration -> Bool
== :: V1alpha3DeviceClaimConfiguration
-> V1alpha3DeviceClaimConfiguration -> Bool
$c/= :: V1alpha3DeviceClaimConfiguration
-> V1alpha3DeviceClaimConfiguration -> Bool
/= :: V1alpha3DeviceClaimConfiguration
-> V1alpha3DeviceClaimConfiguration -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha3DeviceClaimConfiguration
instance A.FromJSON V1alpha3DeviceClaimConfiguration where
  parseJSON :: Value -> Parser V1alpha3DeviceClaimConfiguration
parseJSON = String
-> (Object -> Parser V1alpha3DeviceClaimConfiguration)
-> Value
-> Parser V1alpha3DeviceClaimConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha3DeviceClaimConfiguration" ((Object -> Parser V1alpha3DeviceClaimConfiguration)
 -> Value -> Parser V1alpha3DeviceClaimConfiguration)
-> (Object -> Parser V1alpha3DeviceClaimConfiguration)
-> Value
-> Parser V1alpha3DeviceClaimConfiguration
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1alpha3OpaqueDeviceConfiguration
-> Maybe [Text] -> V1alpha3DeviceClaimConfiguration
V1alpha3DeviceClaimConfiguration
      (Maybe V1alpha3OpaqueDeviceConfiguration
 -> Maybe [Text] -> V1alpha3DeviceClaimConfiguration)
-> Parser (Maybe V1alpha3OpaqueDeviceConfiguration)
-> Parser (Maybe [Text] -> V1alpha3DeviceClaimConfiguration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1alpha3OpaqueDeviceConfiguration)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"opaque")
      Parser (Maybe [Text] -> V1alpha3DeviceClaimConfiguration)
-> Parser (Maybe [Text]) -> Parser V1alpha3DeviceClaimConfiguration
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"requests")

-- | ToJSON V1alpha3DeviceClaimConfiguration
instance A.ToJSON V1alpha3DeviceClaimConfiguration where
  toJSON :: V1alpha3DeviceClaimConfiguration -> Value
toJSON V1alpha3DeviceClaimConfiguration {Maybe [Text]
Maybe V1alpha3OpaqueDeviceConfiguration
$sel:v1alpha3DeviceClaimConfigurationOpaque:V1alpha3DeviceClaimConfiguration :: V1alpha3DeviceClaimConfiguration
-> Maybe V1alpha3OpaqueDeviceConfiguration
$sel:v1alpha3DeviceClaimConfigurationRequests:V1alpha3DeviceClaimConfiguration :: V1alpha3DeviceClaimConfiguration -> Maybe [Text]
v1alpha3DeviceClaimConfigurationOpaque :: Maybe V1alpha3OpaqueDeviceConfiguration
v1alpha3DeviceClaimConfigurationRequests :: Maybe [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"opaque" Key -> Maybe V1alpha3OpaqueDeviceConfiguration -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1alpha3OpaqueDeviceConfiguration
v1alpha3DeviceClaimConfigurationOpaque
      , Key
"requests" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1alpha3DeviceClaimConfigurationRequests
      ]


-- | Construct a value of type 'V1alpha3DeviceClaimConfiguration' (by applying it's required fields, if any)
mkV1alpha3DeviceClaimConfiguration
  :: V1alpha3DeviceClaimConfiguration
mkV1alpha3DeviceClaimConfiguration :: V1alpha3DeviceClaimConfiguration
mkV1alpha3DeviceClaimConfiguration =
  V1alpha3DeviceClaimConfiguration
  { $sel:v1alpha3DeviceClaimConfigurationOpaque:V1alpha3DeviceClaimConfiguration :: Maybe V1alpha3OpaqueDeviceConfiguration
v1alpha3DeviceClaimConfigurationOpaque = Maybe V1alpha3OpaqueDeviceConfiguration
forall a. Maybe a
Nothing
  , $sel:v1alpha3DeviceClaimConfigurationRequests:V1alpha3DeviceClaimConfiguration :: Maybe [Text]
v1alpha3DeviceClaimConfigurationRequests = Maybe [Text]
forall a. Maybe a
Nothing
  }

-- ** V1alpha3DeviceClass
-- | V1alpha3DeviceClass
-- DeviceClass is a vendor- or admin-provided resource that contains device configuration and selectors. It can be referenced in the device requests of a claim to apply these presets. Cluster scoped.  This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.
data V1alpha3DeviceClass = V1alpha3DeviceClass
  { V1alpha3DeviceClass -> Maybe Text
v1alpha3DeviceClassApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1alpha3DeviceClass -> Maybe Text
v1alpha3DeviceClassKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1alpha3DeviceClass -> Maybe V1ObjectMeta
v1alpha3DeviceClassMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1alpha3DeviceClass -> V1alpha3DeviceClassSpec
v1alpha3DeviceClassSpec :: !(V1alpha3DeviceClassSpec) -- ^ /Required/ "spec"
  } deriving (Int -> V1alpha3DeviceClass -> ShowS
[V1alpha3DeviceClass] -> ShowS
V1alpha3DeviceClass -> String
(Int -> V1alpha3DeviceClass -> ShowS)
-> (V1alpha3DeviceClass -> String)
-> ([V1alpha3DeviceClass] -> ShowS)
-> Show V1alpha3DeviceClass
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha3DeviceClass -> ShowS
showsPrec :: Int -> V1alpha3DeviceClass -> ShowS
$cshow :: V1alpha3DeviceClass -> String
show :: V1alpha3DeviceClass -> String
$cshowList :: [V1alpha3DeviceClass] -> ShowS
showList :: [V1alpha3DeviceClass] -> ShowS
P.Show, V1alpha3DeviceClass -> V1alpha3DeviceClass -> Bool
(V1alpha3DeviceClass -> V1alpha3DeviceClass -> Bool)
-> (V1alpha3DeviceClass -> V1alpha3DeviceClass -> Bool)
-> Eq V1alpha3DeviceClass
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha3DeviceClass -> V1alpha3DeviceClass -> Bool
== :: V1alpha3DeviceClass -> V1alpha3DeviceClass -> Bool
$c/= :: V1alpha3DeviceClass -> V1alpha3DeviceClass -> Bool
/= :: V1alpha3DeviceClass -> V1alpha3DeviceClass -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha3DeviceClass
instance A.FromJSON V1alpha3DeviceClass where
  parseJSON :: Value -> Parser V1alpha3DeviceClass
parseJSON = String
-> (Object -> Parser V1alpha3DeviceClass)
-> Value
-> Parser V1alpha3DeviceClass
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha3DeviceClass" ((Object -> Parser V1alpha3DeviceClass)
 -> Value -> Parser V1alpha3DeviceClass)
-> (Object -> Parser V1alpha3DeviceClass)
-> Value
-> Parser V1alpha3DeviceClass
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> V1alpha3DeviceClassSpec
-> V1alpha3DeviceClass
V1alpha3DeviceClass
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> V1alpha3DeviceClassSpec
 -> V1alpha3DeviceClass)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> V1alpha3DeviceClassSpec
      -> V1alpha3DeviceClass)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> V1alpha3DeviceClassSpec
   -> V1alpha3DeviceClass)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> V1alpha3DeviceClassSpec -> V1alpha3DeviceClass)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> V1alpha3DeviceClassSpec -> V1alpha3DeviceClass)
-> Parser (Maybe V1ObjectMeta)
-> Parser (V1alpha3DeviceClassSpec -> V1alpha3DeviceClass)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (V1alpha3DeviceClassSpec -> V1alpha3DeviceClass)
-> Parser V1alpha3DeviceClassSpec -> Parser V1alpha3DeviceClass
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1alpha3DeviceClassSpec
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"spec")

-- | ToJSON V1alpha3DeviceClass
instance A.ToJSON V1alpha3DeviceClass where
  toJSON :: V1alpha3DeviceClass -> Value
toJSON V1alpha3DeviceClass {Maybe Text
Maybe V1ObjectMeta
V1alpha3DeviceClassSpec
$sel:v1alpha3DeviceClassApiVersion:V1alpha3DeviceClass :: V1alpha3DeviceClass -> Maybe Text
$sel:v1alpha3DeviceClassKind:V1alpha3DeviceClass :: V1alpha3DeviceClass -> Maybe Text
$sel:v1alpha3DeviceClassMetadata:V1alpha3DeviceClass :: V1alpha3DeviceClass -> Maybe V1ObjectMeta
$sel:v1alpha3DeviceClassSpec:V1alpha3DeviceClass :: V1alpha3DeviceClass -> V1alpha3DeviceClassSpec
v1alpha3DeviceClassApiVersion :: Maybe Text
v1alpha3DeviceClassKind :: Maybe Text
v1alpha3DeviceClassMetadata :: Maybe V1ObjectMeta
v1alpha3DeviceClassSpec :: V1alpha3DeviceClassSpec
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha3DeviceClassApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha3DeviceClassKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1alpha3DeviceClassMetadata
      , Key
"spec" Key -> V1alpha3DeviceClassSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1alpha3DeviceClassSpec
v1alpha3DeviceClassSpec
      ]


-- | Construct a value of type 'V1alpha3DeviceClass' (by applying it's required fields, if any)
mkV1alpha3DeviceClass
  :: V1alpha3DeviceClassSpec -- ^ 'v1alpha3DeviceClassSpec' 
  -> V1alpha3DeviceClass
mkV1alpha3DeviceClass :: V1alpha3DeviceClassSpec -> V1alpha3DeviceClass
mkV1alpha3DeviceClass V1alpha3DeviceClassSpec
v1alpha3DeviceClassSpec =
  V1alpha3DeviceClass
  { $sel:v1alpha3DeviceClassApiVersion:V1alpha3DeviceClass :: Maybe Text
v1alpha3DeviceClassApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha3DeviceClassKind:V1alpha3DeviceClass :: Maybe Text
v1alpha3DeviceClassKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha3DeviceClassMetadata:V1alpha3DeviceClass :: Maybe V1ObjectMeta
v1alpha3DeviceClassMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , V1alpha3DeviceClassSpec
$sel:v1alpha3DeviceClassSpec:V1alpha3DeviceClass :: V1alpha3DeviceClassSpec
v1alpha3DeviceClassSpec :: V1alpha3DeviceClassSpec
v1alpha3DeviceClassSpec
  }

-- ** V1alpha3DeviceClassConfiguration
-- | V1alpha3DeviceClassConfiguration
-- DeviceClassConfiguration is used in DeviceClass.
data V1alpha3DeviceClassConfiguration = V1alpha3DeviceClassConfiguration
  { V1alpha3DeviceClassConfiguration
-> Maybe V1alpha3OpaqueDeviceConfiguration
v1alpha3DeviceClassConfigurationOpaque :: !(Maybe V1alpha3OpaqueDeviceConfiguration) -- ^ "opaque"
  } deriving (Int -> V1alpha3DeviceClassConfiguration -> ShowS
[V1alpha3DeviceClassConfiguration] -> ShowS
V1alpha3DeviceClassConfiguration -> String
(Int -> V1alpha3DeviceClassConfiguration -> ShowS)
-> (V1alpha3DeviceClassConfiguration -> String)
-> ([V1alpha3DeviceClassConfiguration] -> ShowS)
-> Show V1alpha3DeviceClassConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha3DeviceClassConfiguration -> ShowS
showsPrec :: Int -> V1alpha3DeviceClassConfiguration -> ShowS
$cshow :: V1alpha3DeviceClassConfiguration -> String
show :: V1alpha3DeviceClassConfiguration -> String
$cshowList :: [V1alpha3DeviceClassConfiguration] -> ShowS
showList :: [V1alpha3DeviceClassConfiguration] -> ShowS
P.Show, V1alpha3DeviceClassConfiguration
-> V1alpha3DeviceClassConfiguration -> Bool
(V1alpha3DeviceClassConfiguration
 -> V1alpha3DeviceClassConfiguration -> Bool)
-> (V1alpha3DeviceClassConfiguration
    -> V1alpha3DeviceClassConfiguration -> Bool)
-> Eq V1alpha3DeviceClassConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha3DeviceClassConfiguration
-> V1alpha3DeviceClassConfiguration -> Bool
== :: V1alpha3DeviceClassConfiguration
-> V1alpha3DeviceClassConfiguration -> Bool
$c/= :: V1alpha3DeviceClassConfiguration
-> V1alpha3DeviceClassConfiguration -> Bool
/= :: V1alpha3DeviceClassConfiguration
-> V1alpha3DeviceClassConfiguration -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha3DeviceClassConfiguration
instance A.FromJSON V1alpha3DeviceClassConfiguration where
  parseJSON :: Value -> Parser V1alpha3DeviceClassConfiguration
parseJSON = String
-> (Object -> Parser V1alpha3DeviceClassConfiguration)
-> Value
-> Parser V1alpha3DeviceClassConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha3DeviceClassConfiguration" ((Object -> Parser V1alpha3DeviceClassConfiguration)
 -> Value -> Parser V1alpha3DeviceClassConfiguration)
-> (Object -> Parser V1alpha3DeviceClassConfiguration)
-> Value
-> Parser V1alpha3DeviceClassConfiguration
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1alpha3OpaqueDeviceConfiguration
-> V1alpha3DeviceClassConfiguration
V1alpha3DeviceClassConfiguration
      (Maybe V1alpha3OpaqueDeviceConfiguration
 -> V1alpha3DeviceClassConfiguration)
-> Parser (Maybe V1alpha3OpaqueDeviceConfiguration)
-> Parser V1alpha3DeviceClassConfiguration
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1alpha3OpaqueDeviceConfiguration)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"opaque")

-- | ToJSON V1alpha3DeviceClassConfiguration
instance A.ToJSON V1alpha3DeviceClassConfiguration where
  toJSON :: V1alpha3DeviceClassConfiguration -> Value
toJSON V1alpha3DeviceClassConfiguration {Maybe V1alpha3OpaqueDeviceConfiguration
$sel:v1alpha3DeviceClassConfigurationOpaque:V1alpha3DeviceClassConfiguration :: V1alpha3DeviceClassConfiguration
-> Maybe V1alpha3OpaqueDeviceConfiguration
v1alpha3DeviceClassConfigurationOpaque :: Maybe V1alpha3OpaqueDeviceConfiguration
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"opaque" Key -> Maybe V1alpha3OpaqueDeviceConfiguration -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1alpha3OpaqueDeviceConfiguration
v1alpha3DeviceClassConfigurationOpaque
      ]


-- | Construct a value of type 'V1alpha3DeviceClassConfiguration' (by applying it's required fields, if any)
mkV1alpha3DeviceClassConfiguration
  :: V1alpha3DeviceClassConfiguration
mkV1alpha3DeviceClassConfiguration :: V1alpha3DeviceClassConfiguration
mkV1alpha3DeviceClassConfiguration =
  V1alpha3DeviceClassConfiguration
  { $sel:v1alpha3DeviceClassConfigurationOpaque:V1alpha3DeviceClassConfiguration :: Maybe V1alpha3OpaqueDeviceConfiguration
v1alpha3DeviceClassConfigurationOpaque = Maybe V1alpha3OpaqueDeviceConfiguration
forall a. Maybe a
Nothing
  }

-- ** V1alpha3DeviceClassList
-- | V1alpha3DeviceClassList
-- DeviceClassList is a collection of classes.
data V1alpha3DeviceClassList = V1alpha3DeviceClassList
  { V1alpha3DeviceClassList -> Maybe Text
v1alpha3DeviceClassListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1alpha3DeviceClassList -> [V1alpha3DeviceClass]
v1alpha3DeviceClassListItems :: !([V1alpha3DeviceClass]) -- ^ /Required/ "items" - Items is the list of resource classes.
  , V1alpha3DeviceClassList -> Maybe Text
v1alpha3DeviceClassListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1alpha3DeviceClassList -> Maybe V1ListMeta
v1alpha3DeviceClassListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1alpha3DeviceClassList -> ShowS
[V1alpha3DeviceClassList] -> ShowS
V1alpha3DeviceClassList -> String
(Int -> V1alpha3DeviceClassList -> ShowS)
-> (V1alpha3DeviceClassList -> String)
-> ([V1alpha3DeviceClassList] -> ShowS)
-> Show V1alpha3DeviceClassList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha3DeviceClassList -> ShowS
showsPrec :: Int -> V1alpha3DeviceClassList -> ShowS
$cshow :: V1alpha3DeviceClassList -> String
show :: V1alpha3DeviceClassList -> String
$cshowList :: [V1alpha3DeviceClassList] -> ShowS
showList :: [V1alpha3DeviceClassList] -> ShowS
P.Show, V1alpha3DeviceClassList -> V1alpha3DeviceClassList -> Bool
(V1alpha3DeviceClassList -> V1alpha3DeviceClassList -> Bool)
-> (V1alpha3DeviceClassList -> V1alpha3DeviceClassList -> Bool)
-> Eq V1alpha3DeviceClassList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha3DeviceClassList -> V1alpha3DeviceClassList -> Bool
== :: V1alpha3DeviceClassList -> V1alpha3DeviceClassList -> Bool
$c/= :: V1alpha3DeviceClassList -> V1alpha3DeviceClassList -> Bool
/= :: V1alpha3DeviceClassList -> V1alpha3DeviceClassList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha3DeviceClassList
instance A.FromJSON V1alpha3DeviceClassList where
  parseJSON :: Value -> Parser V1alpha3DeviceClassList
parseJSON = String
-> (Object -> Parser V1alpha3DeviceClassList)
-> Value
-> Parser V1alpha3DeviceClassList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha3DeviceClassList" ((Object -> Parser V1alpha3DeviceClassList)
 -> Value -> Parser V1alpha3DeviceClassList)
-> (Object -> Parser V1alpha3DeviceClassList)
-> Value
-> Parser V1alpha3DeviceClassList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1alpha3DeviceClass]
-> Maybe Text
-> Maybe V1ListMeta
-> V1alpha3DeviceClassList
V1alpha3DeviceClassList
      (Maybe Text
 -> [V1alpha3DeviceClass]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1alpha3DeviceClassList)
-> Parser (Maybe Text)
-> Parser
     ([V1alpha3DeviceClass]
      -> Maybe Text -> Maybe V1ListMeta -> V1alpha3DeviceClassList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1alpha3DeviceClass]
   -> Maybe Text -> Maybe V1ListMeta -> V1alpha3DeviceClassList)
-> Parser [V1alpha3DeviceClass]
-> Parser
     (Maybe Text -> Maybe V1ListMeta -> V1alpha3DeviceClassList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1alpha3DeviceClass]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1alpha3DeviceClassList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1alpha3DeviceClassList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1alpha3DeviceClassList)
-> Parser (Maybe V1ListMeta) -> Parser V1alpha3DeviceClassList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1alpha3DeviceClassList
instance A.ToJSON V1alpha3DeviceClassList where
  toJSON :: V1alpha3DeviceClassList -> Value
toJSON V1alpha3DeviceClassList {[V1alpha3DeviceClass]
Maybe Text
Maybe V1ListMeta
$sel:v1alpha3DeviceClassListApiVersion:V1alpha3DeviceClassList :: V1alpha3DeviceClassList -> Maybe Text
$sel:v1alpha3DeviceClassListItems:V1alpha3DeviceClassList :: V1alpha3DeviceClassList -> [V1alpha3DeviceClass]
$sel:v1alpha3DeviceClassListKind:V1alpha3DeviceClassList :: V1alpha3DeviceClassList -> Maybe Text
$sel:v1alpha3DeviceClassListMetadata:V1alpha3DeviceClassList :: V1alpha3DeviceClassList -> Maybe V1ListMeta
v1alpha3DeviceClassListApiVersion :: Maybe Text
v1alpha3DeviceClassListItems :: [V1alpha3DeviceClass]
v1alpha3DeviceClassListKind :: Maybe Text
v1alpha3DeviceClassListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha3DeviceClassListApiVersion
      , Key
"items" Key -> [V1alpha3DeviceClass] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1alpha3DeviceClass]
v1alpha3DeviceClassListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha3DeviceClassListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1alpha3DeviceClassListMetadata
      ]


-- | Construct a value of type 'V1alpha3DeviceClassList' (by applying it's required fields, if any)
mkV1alpha3DeviceClassList
  :: [V1alpha3DeviceClass] -- ^ 'v1alpha3DeviceClassListItems': Items is the list of resource classes.
  -> V1alpha3DeviceClassList
mkV1alpha3DeviceClassList :: [V1alpha3DeviceClass] -> V1alpha3DeviceClassList
mkV1alpha3DeviceClassList [V1alpha3DeviceClass]
v1alpha3DeviceClassListItems =
  V1alpha3DeviceClassList
  { $sel:v1alpha3DeviceClassListApiVersion:V1alpha3DeviceClassList :: Maybe Text
v1alpha3DeviceClassListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1alpha3DeviceClass]
$sel:v1alpha3DeviceClassListItems:V1alpha3DeviceClassList :: [V1alpha3DeviceClass]
v1alpha3DeviceClassListItems :: [V1alpha3DeviceClass]
v1alpha3DeviceClassListItems
  , $sel:v1alpha3DeviceClassListKind:V1alpha3DeviceClassList :: Maybe Text
v1alpha3DeviceClassListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha3DeviceClassListMetadata:V1alpha3DeviceClassList :: Maybe V1ListMeta
v1alpha3DeviceClassListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1alpha3DeviceClassSpec
-- | V1alpha3DeviceClassSpec
-- DeviceClassSpec is used in a [DeviceClass] to define what can be allocated and how to configure it.
data V1alpha3DeviceClassSpec = V1alpha3DeviceClassSpec
  { V1alpha3DeviceClassSpec -> Maybe [V1alpha3DeviceClassConfiguration]
v1alpha3DeviceClassSpecConfig :: !(Maybe [V1alpha3DeviceClassConfiguration]) -- ^ "config" - Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver.  They are passed to the driver, but are not considered while allocating the claim.
  , V1alpha3DeviceClassSpec -> Maybe [V1alpha3DeviceSelector]
v1alpha3DeviceClassSpecSelectors :: !(Maybe [V1alpha3DeviceSelector]) -- ^ "selectors" - Each selector must be satisfied by a device which is claimed via this class.
  } deriving (Int -> V1alpha3DeviceClassSpec -> ShowS
[V1alpha3DeviceClassSpec] -> ShowS
V1alpha3DeviceClassSpec -> String
(Int -> V1alpha3DeviceClassSpec -> ShowS)
-> (V1alpha3DeviceClassSpec -> String)
-> ([V1alpha3DeviceClassSpec] -> ShowS)
-> Show V1alpha3DeviceClassSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha3DeviceClassSpec -> ShowS
showsPrec :: Int -> V1alpha3DeviceClassSpec -> ShowS
$cshow :: V1alpha3DeviceClassSpec -> String
show :: V1alpha3DeviceClassSpec -> String
$cshowList :: [V1alpha3DeviceClassSpec] -> ShowS
showList :: [V1alpha3DeviceClassSpec] -> ShowS
P.Show, V1alpha3DeviceClassSpec -> V1alpha3DeviceClassSpec -> Bool
(V1alpha3DeviceClassSpec -> V1alpha3DeviceClassSpec -> Bool)
-> (V1alpha3DeviceClassSpec -> V1alpha3DeviceClassSpec -> Bool)
-> Eq V1alpha3DeviceClassSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha3DeviceClassSpec -> V1alpha3DeviceClassSpec -> Bool
== :: V1alpha3DeviceClassSpec -> V1alpha3DeviceClassSpec -> Bool
$c/= :: V1alpha3DeviceClassSpec -> V1alpha3DeviceClassSpec -> Bool
/= :: V1alpha3DeviceClassSpec -> V1alpha3DeviceClassSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha3DeviceClassSpec
instance A.FromJSON V1alpha3DeviceClassSpec where
  parseJSON :: Value -> Parser V1alpha3DeviceClassSpec
parseJSON = String
-> (Object -> Parser V1alpha3DeviceClassSpec)
-> Value
-> Parser V1alpha3DeviceClassSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha3DeviceClassSpec" ((Object -> Parser V1alpha3DeviceClassSpec)
 -> Value -> Parser V1alpha3DeviceClassSpec)
-> (Object -> Parser V1alpha3DeviceClassSpec)
-> Value
-> Parser V1alpha3DeviceClassSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1alpha3DeviceClassConfiguration]
-> Maybe [V1alpha3DeviceSelector] -> V1alpha3DeviceClassSpec
V1alpha3DeviceClassSpec
      (Maybe [V1alpha3DeviceClassConfiguration]
 -> Maybe [V1alpha3DeviceSelector] -> V1alpha3DeviceClassSpec)
-> Parser (Maybe [V1alpha3DeviceClassConfiguration])
-> Parser
     (Maybe [V1alpha3DeviceSelector] -> V1alpha3DeviceClassSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1alpha3DeviceClassConfiguration])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"config")
      Parser (Maybe [V1alpha3DeviceSelector] -> V1alpha3DeviceClassSpec)
-> Parser (Maybe [V1alpha3DeviceSelector])
-> Parser V1alpha3DeviceClassSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1alpha3DeviceSelector])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"selectors")

-- | ToJSON V1alpha3DeviceClassSpec
instance A.ToJSON V1alpha3DeviceClassSpec where
  toJSON :: V1alpha3DeviceClassSpec -> Value
toJSON V1alpha3DeviceClassSpec {Maybe [V1alpha3DeviceSelector]
Maybe [V1alpha3DeviceClassConfiguration]
$sel:v1alpha3DeviceClassSpecConfig:V1alpha3DeviceClassSpec :: V1alpha3DeviceClassSpec -> Maybe [V1alpha3DeviceClassConfiguration]
$sel:v1alpha3DeviceClassSpecSelectors:V1alpha3DeviceClassSpec :: V1alpha3DeviceClassSpec -> Maybe [V1alpha3DeviceSelector]
v1alpha3DeviceClassSpecConfig :: Maybe [V1alpha3DeviceClassConfiguration]
v1alpha3DeviceClassSpecSelectors :: Maybe [V1alpha3DeviceSelector]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"config" Key -> Maybe [V1alpha3DeviceClassConfiguration] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1alpha3DeviceClassConfiguration]
v1alpha3DeviceClassSpecConfig
      , Key
"selectors" Key -> Maybe [V1alpha3DeviceSelector] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1alpha3DeviceSelector]
v1alpha3DeviceClassSpecSelectors
      ]


-- | Construct a value of type 'V1alpha3DeviceClassSpec' (by applying it's required fields, if any)
mkV1alpha3DeviceClassSpec
  :: V1alpha3DeviceClassSpec
mkV1alpha3DeviceClassSpec :: V1alpha3DeviceClassSpec
mkV1alpha3DeviceClassSpec =
  V1alpha3DeviceClassSpec
  { $sel:v1alpha3DeviceClassSpecConfig:V1alpha3DeviceClassSpec :: Maybe [V1alpha3DeviceClassConfiguration]
v1alpha3DeviceClassSpecConfig = Maybe [V1alpha3DeviceClassConfiguration]
forall a. Maybe a
Nothing
  , $sel:v1alpha3DeviceClassSpecSelectors:V1alpha3DeviceClassSpec :: Maybe [V1alpha3DeviceSelector]
v1alpha3DeviceClassSpecSelectors = Maybe [V1alpha3DeviceSelector]
forall a. Maybe a
Nothing
  }

-- ** V1alpha3DeviceConstraint
-- | V1alpha3DeviceConstraint
-- DeviceConstraint must have exactly one field set besides Requests.
data V1alpha3DeviceConstraint = V1alpha3DeviceConstraint
  { V1alpha3DeviceConstraint -> Maybe Text
v1alpha3DeviceConstraintMatchAttribute :: !(Maybe Text) -- ^ "matchAttribute" - MatchAttribute requires that all devices in question have this attribute and that its type and value are the same across those devices.  For example, if you specified \&quot;dra.example.com/numa\&quot; (a hypothetical example!), then only devices in the same NUMA node will be chosen. A device which does not have that attribute will not be chosen. All devices should use a value of the same type for this attribute because that is part of its specification, but if one device doesn&#39;t, then it also will not be chosen.  Must include the domain qualifier.
  , V1alpha3DeviceConstraint -> Maybe [Text]
v1alpha3DeviceConstraintRequests :: !(Maybe [Text]) -- ^ "requests" - Requests is a list of the one or more requests in this claim which must co-satisfy this constraint. If a request is fulfilled by multiple devices, then all of the devices must satisfy the constraint. If this is not specified, this constraint applies to all requests in this claim.
  } deriving (Int -> V1alpha3DeviceConstraint -> ShowS
[V1alpha3DeviceConstraint] -> ShowS
V1alpha3DeviceConstraint -> String
(Int -> V1alpha3DeviceConstraint -> ShowS)
-> (V1alpha3DeviceConstraint -> String)
-> ([V1alpha3DeviceConstraint] -> ShowS)
-> Show V1alpha3DeviceConstraint
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha3DeviceConstraint -> ShowS
showsPrec :: Int -> V1alpha3DeviceConstraint -> ShowS
$cshow :: V1alpha3DeviceConstraint -> String
show :: V1alpha3DeviceConstraint -> String
$cshowList :: [V1alpha3DeviceConstraint] -> ShowS
showList :: [V1alpha3DeviceConstraint] -> ShowS
P.Show, V1alpha3DeviceConstraint -> V1alpha3DeviceConstraint -> Bool
(V1alpha3DeviceConstraint -> V1alpha3DeviceConstraint -> Bool)
-> (V1alpha3DeviceConstraint -> V1alpha3DeviceConstraint -> Bool)
-> Eq V1alpha3DeviceConstraint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha3DeviceConstraint -> V1alpha3DeviceConstraint -> Bool
== :: V1alpha3DeviceConstraint -> V1alpha3DeviceConstraint -> Bool
$c/= :: V1alpha3DeviceConstraint -> V1alpha3DeviceConstraint -> Bool
/= :: V1alpha3DeviceConstraint -> V1alpha3DeviceConstraint -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha3DeviceConstraint
instance A.FromJSON V1alpha3DeviceConstraint where
  parseJSON :: Value -> Parser V1alpha3DeviceConstraint
parseJSON = String
-> (Object -> Parser V1alpha3DeviceConstraint)
-> Value
-> Parser V1alpha3DeviceConstraint
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha3DeviceConstraint" ((Object -> Parser V1alpha3DeviceConstraint)
 -> Value -> Parser V1alpha3DeviceConstraint)
-> (Object -> Parser V1alpha3DeviceConstraint)
-> Value
-> Parser V1alpha3DeviceConstraint
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Maybe [Text] -> V1alpha3DeviceConstraint
V1alpha3DeviceConstraint
      (Maybe Text -> Maybe [Text] -> V1alpha3DeviceConstraint)
-> Parser (Maybe Text)
-> Parser (Maybe [Text] -> V1alpha3DeviceConstraint)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"matchAttribute")
      Parser (Maybe [Text] -> V1alpha3DeviceConstraint)
-> Parser (Maybe [Text]) -> Parser V1alpha3DeviceConstraint
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"requests")

-- | ToJSON V1alpha3DeviceConstraint
instance A.ToJSON V1alpha3DeviceConstraint where
  toJSON :: V1alpha3DeviceConstraint -> Value
toJSON V1alpha3DeviceConstraint {Maybe [Text]
Maybe Text
$sel:v1alpha3DeviceConstraintMatchAttribute:V1alpha3DeviceConstraint :: V1alpha3DeviceConstraint -> Maybe Text
$sel:v1alpha3DeviceConstraintRequests:V1alpha3DeviceConstraint :: V1alpha3DeviceConstraint -> Maybe [Text]
v1alpha3DeviceConstraintMatchAttribute :: Maybe Text
v1alpha3DeviceConstraintRequests :: Maybe [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"matchAttribute" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha3DeviceConstraintMatchAttribute
      , Key
"requests" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1alpha3DeviceConstraintRequests
      ]


-- | Construct a value of type 'V1alpha3DeviceConstraint' (by applying it's required fields, if any)
mkV1alpha3DeviceConstraint
  :: V1alpha3DeviceConstraint
mkV1alpha3DeviceConstraint :: V1alpha3DeviceConstraint
mkV1alpha3DeviceConstraint =
  V1alpha3DeviceConstraint
  { $sel:v1alpha3DeviceConstraintMatchAttribute:V1alpha3DeviceConstraint :: Maybe Text
v1alpha3DeviceConstraintMatchAttribute = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha3DeviceConstraintRequests:V1alpha3DeviceConstraint :: Maybe [Text]
v1alpha3DeviceConstraintRequests = Maybe [Text]
forall a. Maybe a
Nothing
  }

-- ** V1alpha3DeviceRequest
-- | V1alpha3DeviceRequest
-- DeviceRequest is a request for devices required for a claim. This is typically a request for a single resource like a device, but can also ask for several identical devices.  A DeviceClassName is currently required. Clients must check that it is indeed set. It's absence indicates that something changed in a way that is not supported by the client yet, in which case it must refuse to handle the request.
data V1alpha3DeviceRequest = V1alpha3DeviceRequest
  { V1alpha3DeviceRequest -> Maybe Bool
v1alpha3DeviceRequestAdminAccess :: !(Maybe Bool) -- ^ "adminAccess" - AdminAccess indicates that this is a claim for administrative access to the device(s). Claims with AdminAccess are expected to be used for monitoring or other management services for a device.  They ignore all ordinary claims to the device with respect to access modes and any resource allocations.  This is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled.
  , V1alpha3DeviceRequest -> Maybe Text
v1alpha3DeviceRequestAllocationMode :: !(Maybe Text) -- ^ "allocationMode" - AllocationMode and its related fields define how devices are allocated to satisfy this request. Supported values are:  - ExactCount: This request is for a specific number of devices.   This is the default. The exact number is provided in the   count field.  - All: This request is for all of the matching devices in a pool.   Allocation will fail if some devices are already allocated,   unless adminAccess is requested.  If AlloctionMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other requests must specify this field.  More modes may get added in the future. Clients must refuse to handle requests with unknown modes.
  , V1alpha3DeviceRequest -> Maybe Integer
v1alpha3DeviceRequestCount :: !(Maybe Integer) -- ^ "count" - Count is used only when the count mode is \&quot;ExactCount\&quot;. Must be greater than zero. If AllocationMode is ExactCount and this field is not specified, the default is one.
  , V1alpha3DeviceRequest -> Text
v1alpha3DeviceRequestDeviceClassName :: !(Text) -- ^ /Required/ "deviceClassName" - DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this request.  A class is required. Which classes are available depends on the cluster.  Administrators may use this to restrict which devices may get requested by only installing classes with selectors for permitted devices. If users are free to request anything without restrictions, then administrators can create an empty DeviceClass for users to reference.
  , V1alpha3DeviceRequest -> Text
v1alpha3DeviceRequestName :: !(Text) -- ^ /Required/ "name" - Name can be used to reference this request in a pod.spec.containers[].resources.claims entry and in a constraint of the claim.  Must be a DNS label.
  , V1alpha3DeviceRequest -> Maybe [V1alpha3DeviceSelector]
v1alpha3DeviceRequestSelectors :: !(Maybe [V1alpha3DeviceSelector]) -- ^ "selectors" - Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this request. All selectors must be satisfied for a device to be considered.
  } deriving (Int -> V1alpha3DeviceRequest -> ShowS
[V1alpha3DeviceRequest] -> ShowS
V1alpha3DeviceRequest -> String
(Int -> V1alpha3DeviceRequest -> ShowS)
-> (V1alpha3DeviceRequest -> String)
-> ([V1alpha3DeviceRequest] -> ShowS)
-> Show V1alpha3DeviceRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha3DeviceRequest -> ShowS
showsPrec :: Int -> V1alpha3DeviceRequest -> ShowS
$cshow :: V1alpha3DeviceRequest -> String
show :: V1alpha3DeviceRequest -> String
$cshowList :: [V1alpha3DeviceRequest] -> ShowS
showList :: [V1alpha3DeviceRequest] -> ShowS
P.Show, V1alpha3DeviceRequest -> V1alpha3DeviceRequest -> Bool
(V1alpha3DeviceRequest -> V1alpha3DeviceRequest -> Bool)
-> (V1alpha3DeviceRequest -> V1alpha3DeviceRequest -> Bool)
-> Eq V1alpha3DeviceRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha3DeviceRequest -> V1alpha3DeviceRequest -> Bool
== :: V1alpha3DeviceRequest -> V1alpha3DeviceRequest -> Bool
$c/= :: V1alpha3DeviceRequest -> V1alpha3DeviceRequest -> Bool
/= :: V1alpha3DeviceRequest -> V1alpha3DeviceRequest -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha3DeviceRequest
instance A.FromJSON V1alpha3DeviceRequest where
  parseJSON :: Value -> Parser V1alpha3DeviceRequest
parseJSON = String
-> (Object -> Parser V1alpha3DeviceRequest)
-> Value
-> Parser V1alpha3DeviceRequest
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha3DeviceRequest" ((Object -> Parser V1alpha3DeviceRequest)
 -> Value -> Parser V1alpha3DeviceRequest)
-> (Object -> Parser V1alpha3DeviceRequest)
-> Value
-> Parser V1alpha3DeviceRequest
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Bool
-> Maybe Text
-> Maybe Integer
-> Text
-> Text
-> Maybe [V1alpha3DeviceSelector]
-> V1alpha3DeviceRequest
V1alpha3DeviceRequest
      (Maybe Bool
 -> Maybe Text
 -> Maybe Integer
 -> Text
 -> Text
 -> Maybe [V1alpha3DeviceSelector]
 -> V1alpha3DeviceRequest)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Integer
      -> Text
      -> Text
      -> Maybe [V1alpha3DeviceSelector]
      -> V1alpha3DeviceRequest)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"adminAccess")
      Parser
  (Maybe Text
   -> Maybe Integer
   -> Text
   -> Text
   -> Maybe [V1alpha3DeviceSelector]
   -> V1alpha3DeviceRequest)
-> Parser (Maybe Text)
-> Parser
     (Maybe Integer
      -> Text
      -> Text
      -> Maybe [V1alpha3DeviceSelector]
      -> V1alpha3DeviceRequest)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"allocationMode")
      Parser
  (Maybe Integer
   -> Text
   -> Text
   -> Maybe [V1alpha3DeviceSelector]
   -> V1alpha3DeviceRequest)
-> Parser (Maybe Integer)
-> Parser
     (Text
      -> Text -> Maybe [V1alpha3DeviceSelector] -> V1alpha3DeviceRequest)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"count")
      Parser
  (Text
   -> Text -> Maybe [V1alpha3DeviceSelector] -> V1alpha3DeviceRequest)
-> Parser Text
-> Parser
     (Text -> Maybe [V1alpha3DeviceSelector] -> V1alpha3DeviceRequest)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"deviceClassName")
      Parser
  (Text -> Maybe [V1alpha3DeviceSelector] -> V1alpha3DeviceRequest)
-> Parser Text
-> Parser (Maybe [V1alpha3DeviceSelector] -> V1alpha3DeviceRequest)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser (Maybe [V1alpha3DeviceSelector] -> V1alpha3DeviceRequest)
-> Parser (Maybe [V1alpha3DeviceSelector])
-> Parser V1alpha3DeviceRequest
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1alpha3DeviceSelector])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"selectors")

-- | ToJSON V1alpha3DeviceRequest
instance A.ToJSON V1alpha3DeviceRequest where
  toJSON :: V1alpha3DeviceRequest -> Value
toJSON V1alpha3DeviceRequest {Maybe Bool
Maybe Integer
Maybe [V1alpha3DeviceSelector]
Maybe Text
Text
$sel:v1alpha3DeviceRequestAdminAccess:V1alpha3DeviceRequest :: V1alpha3DeviceRequest -> Maybe Bool
$sel:v1alpha3DeviceRequestAllocationMode:V1alpha3DeviceRequest :: V1alpha3DeviceRequest -> Maybe Text
$sel:v1alpha3DeviceRequestCount:V1alpha3DeviceRequest :: V1alpha3DeviceRequest -> Maybe Integer
$sel:v1alpha3DeviceRequestDeviceClassName:V1alpha3DeviceRequest :: V1alpha3DeviceRequest -> Text
$sel:v1alpha3DeviceRequestName:V1alpha3DeviceRequest :: V1alpha3DeviceRequest -> Text
$sel:v1alpha3DeviceRequestSelectors:V1alpha3DeviceRequest :: V1alpha3DeviceRequest -> Maybe [V1alpha3DeviceSelector]
v1alpha3DeviceRequestAdminAccess :: Maybe Bool
v1alpha3DeviceRequestAllocationMode :: Maybe Text
v1alpha3DeviceRequestCount :: Maybe Integer
v1alpha3DeviceRequestDeviceClassName :: Text
v1alpha3DeviceRequestName :: Text
v1alpha3DeviceRequestSelectors :: Maybe [V1alpha3DeviceSelector]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"adminAccess" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1alpha3DeviceRequestAdminAccess
      , Key
"allocationMode" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha3DeviceRequestAllocationMode
      , Key
"count" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1alpha3DeviceRequestCount
      , Key
"deviceClassName" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha3DeviceRequestDeviceClassName
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha3DeviceRequestName
      , Key
"selectors" Key -> Maybe [V1alpha3DeviceSelector] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1alpha3DeviceSelector]
v1alpha3DeviceRequestSelectors
      ]


-- | Construct a value of type 'V1alpha3DeviceRequest' (by applying it's required fields, if any)
mkV1alpha3DeviceRequest
  :: Text -- ^ 'v1alpha3DeviceRequestDeviceClassName': DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this request.  A class is required. Which classes are available depends on the cluster.  Administrators may use this to restrict which devices may get requested by only installing classes with selectors for permitted devices. If users are free to request anything without restrictions, then administrators can create an empty DeviceClass for users to reference.
  -> Text -- ^ 'v1alpha3DeviceRequestName': Name can be used to reference this request in a pod.spec.containers[].resources.claims entry and in a constraint of the claim.  Must be a DNS label.
  -> V1alpha3DeviceRequest
mkV1alpha3DeviceRequest :: Text -> Text -> V1alpha3DeviceRequest
mkV1alpha3DeviceRequest Text
v1alpha3DeviceRequestDeviceClassName Text
v1alpha3DeviceRequestName =
  V1alpha3DeviceRequest
  { $sel:v1alpha3DeviceRequestAdminAccess:V1alpha3DeviceRequest :: Maybe Bool
v1alpha3DeviceRequestAdminAccess = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1alpha3DeviceRequestAllocationMode:V1alpha3DeviceRequest :: Maybe Text
v1alpha3DeviceRequestAllocationMode = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha3DeviceRequestCount:V1alpha3DeviceRequest :: Maybe Integer
v1alpha3DeviceRequestCount = Maybe Integer
forall a. Maybe a
Nothing
  , Text
$sel:v1alpha3DeviceRequestDeviceClassName:V1alpha3DeviceRequest :: Text
v1alpha3DeviceRequestDeviceClassName :: Text
v1alpha3DeviceRequestDeviceClassName
  , Text
$sel:v1alpha3DeviceRequestName:V1alpha3DeviceRequest :: Text
v1alpha3DeviceRequestName :: Text
v1alpha3DeviceRequestName
  , $sel:v1alpha3DeviceRequestSelectors:V1alpha3DeviceRequest :: Maybe [V1alpha3DeviceSelector]
v1alpha3DeviceRequestSelectors = Maybe [V1alpha3DeviceSelector]
forall a. Maybe a
Nothing
  }

-- ** V1alpha3DeviceRequestAllocationResult
-- | V1alpha3DeviceRequestAllocationResult
-- DeviceRequestAllocationResult contains the allocation result for one request.
data V1alpha3DeviceRequestAllocationResult = V1alpha3DeviceRequestAllocationResult
  { V1alpha3DeviceRequestAllocationResult -> Maybe Bool
v1alpha3DeviceRequestAllocationResultAdminAccess :: !(Maybe Bool) -- ^ "adminAccess" - AdminAccess indicates that this device was allocated for administrative access. See the corresponding request field for a definition of mode.  This is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled.
  , V1alpha3DeviceRequestAllocationResult -> Text
v1alpha3DeviceRequestAllocationResultDevice :: !(Text) -- ^ /Required/ "device" - Device references one device instance via its name in the driver&#39;s resource pool. It must be a DNS label.
  , V1alpha3DeviceRequestAllocationResult -> Text
v1alpha3DeviceRequestAllocationResultDriver :: !(Text) -- ^ /Required/ "driver" - Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.  Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.
  , V1alpha3DeviceRequestAllocationResult -> Text
v1alpha3DeviceRequestAllocationResultPool :: !(Text) -- ^ /Required/ "pool" - This name together with the driver name and the device name field identify which device was allocated (&#x60;&lt;driver name&gt;/&lt;pool name&gt;/&lt;device name&gt;&#x60;).  Must not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.
  , V1alpha3DeviceRequestAllocationResult -> Text
v1alpha3DeviceRequestAllocationResultRequest :: !(Text) -- ^ /Required/ "request" - Request is the name of the request in the claim which caused this device to be allocated. Multiple devices may have been allocated per request.
  } deriving (Int -> V1alpha3DeviceRequestAllocationResult -> ShowS
[V1alpha3DeviceRequestAllocationResult] -> ShowS
V1alpha3DeviceRequestAllocationResult -> String
(Int -> V1alpha3DeviceRequestAllocationResult -> ShowS)
-> (V1alpha3DeviceRequestAllocationResult -> String)
-> ([V1alpha3DeviceRequestAllocationResult] -> ShowS)
-> Show V1alpha3DeviceRequestAllocationResult
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha3DeviceRequestAllocationResult -> ShowS
showsPrec :: Int -> V1alpha3DeviceRequestAllocationResult -> ShowS
$cshow :: V1alpha3DeviceRequestAllocationResult -> String
show :: V1alpha3DeviceRequestAllocationResult -> String
$cshowList :: [V1alpha3DeviceRequestAllocationResult] -> ShowS
showList :: [V1alpha3DeviceRequestAllocationResult] -> ShowS
P.Show, V1alpha3DeviceRequestAllocationResult
-> V1alpha3DeviceRequestAllocationResult -> Bool
(V1alpha3DeviceRequestAllocationResult
 -> V1alpha3DeviceRequestAllocationResult -> Bool)
-> (V1alpha3DeviceRequestAllocationResult
    -> V1alpha3DeviceRequestAllocationResult -> Bool)
-> Eq V1alpha3DeviceRequestAllocationResult
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha3DeviceRequestAllocationResult
-> V1alpha3DeviceRequestAllocationResult -> Bool
== :: V1alpha3DeviceRequestAllocationResult
-> V1alpha3DeviceRequestAllocationResult -> Bool
$c/= :: V1alpha3DeviceRequestAllocationResult
-> V1alpha3DeviceRequestAllocationResult -> Bool
/= :: V1alpha3DeviceRequestAllocationResult
-> V1alpha3DeviceRequestAllocationResult -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha3DeviceRequestAllocationResult
instance A.FromJSON V1alpha3DeviceRequestAllocationResult where
  parseJSON :: Value -> Parser V1alpha3DeviceRequestAllocationResult
parseJSON = String
-> (Object -> Parser V1alpha3DeviceRequestAllocationResult)
-> Value
-> Parser V1alpha3DeviceRequestAllocationResult
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha3DeviceRequestAllocationResult" ((Object -> Parser V1alpha3DeviceRequestAllocationResult)
 -> Value -> Parser V1alpha3DeviceRequestAllocationResult)
-> (Object -> Parser V1alpha3DeviceRequestAllocationResult)
-> Value
-> Parser V1alpha3DeviceRequestAllocationResult
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Bool
-> Text
-> Text
-> Text
-> Text
-> V1alpha3DeviceRequestAllocationResult
V1alpha3DeviceRequestAllocationResult
      (Maybe Bool
 -> Text
 -> Text
 -> Text
 -> Text
 -> V1alpha3DeviceRequestAllocationResult)
-> Parser (Maybe Bool)
-> Parser
     (Text
      -> Text -> Text -> Text -> V1alpha3DeviceRequestAllocationResult)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"adminAccess")
      Parser
  (Text
   -> Text -> Text -> Text -> V1alpha3DeviceRequestAllocationResult)
-> Parser Text
-> Parser
     (Text -> Text -> Text -> V1alpha3DeviceRequestAllocationResult)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"device")
      Parser
  (Text -> Text -> Text -> V1alpha3DeviceRequestAllocationResult)
-> Parser Text
-> Parser (Text -> Text -> V1alpha3DeviceRequestAllocationResult)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"driver")
      Parser (Text -> Text -> V1alpha3DeviceRequestAllocationResult)
-> Parser Text
-> Parser (Text -> V1alpha3DeviceRequestAllocationResult)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"pool")
      Parser (Text -> V1alpha3DeviceRequestAllocationResult)
-> Parser Text -> Parser V1alpha3DeviceRequestAllocationResult
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"request")

-- | ToJSON V1alpha3DeviceRequestAllocationResult
instance A.ToJSON V1alpha3DeviceRequestAllocationResult where
  toJSON :: V1alpha3DeviceRequestAllocationResult -> Value
toJSON V1alpha3DeviceRequestAllocationResult {Maybe Bool
Text
$sel:v1alpha3DeviceRequestAllocationResultAdminAccess:V1alpha3DeviceRequestAllocationResult :: V1alpha3DeviceRequestAllocationResult -> Maybe Bool
$sel:v1alpha3DeviceRequestAllocationResultDevice:V1alpha3DeviceRequestAllocationResult :: V1alpha3DeviceRequestAllocationResult -> Text
$sel:v1alpha3DeviceRequestAllocationResultDriver:V1alpha3DeviceRequestAllocationResult :: V1alpha3DeviceRequestAllocationResult -> Text
$sel:v1alpha3DeviceRequestAllocationResultPool:V1alpha3DeviceRequestAllocationResult :: V1alpha3DeviceRequestAllocationResult -> Text
$sel:v1alpha3DeviceRequestAllocationResultRequest:V1alpha3DeviceRequestAllocationResult :: V1alpha3DeviceRequestAllocationResult -> Text
v1alpha3DeviceRequestAllocationResultAdminAccess :: Maybe Bool
v1alpha3DeviceRequestAllocationResultDevice :: Text
v1alpha3DeviceRequestAllocationResultDriver :: Text
v1alpha3DeviceRequestAllocationResultPool :: Text
v1alpha3DeviceRequestAllocationResultRequest :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"adminAccess" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1alpha3DeviceRequestAllocationResultAdminAccess
      , Key
"device" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha3DeviceRequestAllocationResultDevice
      , Key
"driver" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha3DeviceRequestAllocationResultDriver
      , Key
"pool" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha3DeviceRequestAllocationResultPool
      , Key
"request" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha3DeviceRequestAllocationResultRequest
      ]


-- | Construct a value of type 'V1alpha3DeviceRequestAllocationResult' (by applying it's required fields, if any)
mkV1alpha3DeviceRequestAllocationResult
  :: Text -- ^ 'v1alpha3DeviceRequestAllocationResultDevice': Device references one device instance via its name in the driver's resource pool. It must be a DNS label.
  -> Text -- ^ 'v1alpha3DeviceRequestAllocationResultDriver': Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.  Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.
  -> Text -- ^ 'v1alpha3DeviceRequestAllocationResultPool': This name together with the driver name and the device name field identify which device was allocated (`<driver name>/<pool name>/<device name>`).  Must not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.
  -> Text -- ^ 'v1alpha3DeviceRequestAllocationResultRequest': Request is the name of the request in the claim which caused this device to be allocated. Multiple devices may have been allocated per request.
  -> V1alpha3DeviceRequestAllocationResult
mkV1alpha3DeviceRequestAllocationResult :: Text
-> Text -> Text -> Text -> V1alpha3DeviceRequestAllocationResult
mkV1alpha3DeviceRequestAllocationResult Text
v1alpha3DeviceRequestAllocationResultDevice Text
v1alpha3DeviceRequestAllocationResultDriver Text
v1alpha3DeviceRequestAllocationResultPool Text
v1alpha3DeviceRequestAllocationResultRequest =
  V1alpha3DeviceRequestAllocationResult
  { $sel:v1alpha3DeviceRequestAllocationResultAdminAccess:V1alpha3DeviceRequestAllocationResult :: Maybe Bool
v1alpha3DeviceRequestAllocationResultAdminAccess = Maybe Bool
forall a. Maybe a
Nothing
  , Text
$sel:v1alpha3DeviceRequestAllocationResultDevice:V1alpha3DeviceRequestAllocationResult :: Text
v1alpha3DeviceRequestAllocationResultDevice :: Text
v1alpha3DeviceRequestAllocationResultDevice
  , Text
$sel:v1alpha3DeviceRequestAllocationResultDriver:V1alpha3DeviceRequestAllocationResult :: Text
v1alpha3DeviceRequestAllocationResultDriver :: Text
v1alpha3DeviceRequestAllocationResultDriver
  , Text
$sel:v1alpha3DeviceRequestAllocationResultPool:V1alpha3DeviceRequestAllocationResult :: Text
v1alpha3DeviceRequestAllocationResultPool :: Text
v1alpha3DeviceRequestAllocationResultPool
  , Text
$sel:v1alpha3DeviceRequestAllocationResultRequest:V1alpha3DeviceRequestAllocationResult :: Text
v1alpha3DeviceRequestAllocationResultRequest :: Text
v1alpha3DeviceRequestAllocationResultRequest
  }

-- ** V1alpha3DeviceSelector
-- | V1alpha3DeviceSelector
-- DeviceSelector must have exactly one field set.
data V1alpha3DeviceSelector = V1alpha3DeviceSelector
  { V1alpha3DeviceSelector -> Maybe V1alpha3CELDeviceSelector
v1alpha3DeviceSelectorCel :: !(Maybe V1alpha3CELDeviceSelector) -- ^ "cel"
  } deriving (Int -> V1alpha3DeviceSelector -> ShowS
[V1alpha3DeviceSelector] -> ShowS
V1alpha3DeviceSelector -> String
(Int -> V1alpha3DeviceSelector -> ShowS)
-> (V1alpha3DeviceSelector -> String)
-> ([V1alpha3DeviceSelector] -> ShowS)
-> Show V1alpha3DeviceSelector
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha3DeviceSelector -> ShowS
showsPrec :: Int -> V1alpha3DeviceSelector -> ShowS
$cshow :: V1alpha3DeviceSelector -> String
show :: V1alpha3DeviceSelector -> String
$cshowList :: [V1alpha3DeviceSelector] -> ShowS
showList :: [V1alpha3DeviceSelector] -> ShowS
P.Show, V1alpha3DeviceSelector -> V1alpha3DeviceSelector -> Bool
(V1alpha3DeviceSelector -> V1alpha3DeviceSelector -> Bool)
-> (V1alpha3DeviceSelector -> V1alpha3DeviceSelector -> Bool)
-> Eq V1alpha3DeviceSelector
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha3DeviceSelector -> V1alpha3DeviceSelector -> Bool
== :: V1alpha3DeviceSelector -> V1alpha3DeviceSelector -> Bool
$c/= :: V1alpha3DeviceSelector -> V1alpha3DeviceSelector -> Bool
/= :: V1alpha3DeviceSelector -> V1alpha3DeviceSelector -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha3DeviceSelector
instance A.FromJSON V1alpha3DeviceSelector where
  parseJSON :: Value -> Parser V1alpha3DeviceSelector
parseJSON = String
-> (Object -> Parser V1alpha3DeviceSelector)
-> Value
-> Parser V1alpha3DeviceSelector
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha3DeviceSelector" ((Object -> Parser V1alpha3DeviceSelector)
 -> Value -> Parser V1alpha3DeviceSelector)
-> (Object -> Parser V1alpha3DeviceSelector)
-> Value
-> Parser V1alpha3DeviceSelector
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1alpha3CELDeviceSelector -> V1alpha3DeviceSelector
V1alpha3DeviceSelector
      (Maybe V1alpha3CELDeviceSelector -> V1alpha3DeviceSelector)
-> Parser (Maybe V1alpha3CELDeviceSelector)
-> Parser V1alpha3DeviceSelector
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1alpha3CELDeviceSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"cel")

-- | ToJSON V1alpha3DeviceSelector
instance A.ToJSON V1alpha3DeviceSelector where
  toJSON :: V1alpha3DeviceSelector -> Value
toJSON V1alpha3DeviceSelector {Maybe V1alpha3CELDeviceSelector
$sel:v1alpha3DeviceSelectorCel:V1alpha3DeviceSelector :: V1alpha3DeviceSelector -> Maybe V1alpha3CELDeviceSelector
v1alpha3DeviceSelectorCel :: Maybe V1alpha3CELDeviceSelector
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"cel" Key -> Maybe V1alpha3CELDeviceSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1alpha3CELDeviceSelector
v1alpha3DeviceSelectorCel
      ]


-- | Construct a value of type 'V1alpha3DeviceSelector' (by applying it's required fields, if any)
mkV1alpha3DeviceSelector
  :: V1alpha3DeviceSelector
mkV1alpha3DeviceSelector :: V1alpha3DeviceSelector
mkV1alpha3DeviceSelector =
  V1alpha3DeviceSelector
  { $sel:v1alpha3DeviceSelectorCel:V1alpha3DeviceSelector :: Maybe V1alpha3CELDeviceSelector
v1alpha3DeviceSelectorCel = Maybe V1alpha3CELDeviceSelector
forall a. Maybe a
Nothing
  }

-- ** V1alpha3NetworkDeviceData
-- | V1alpha3NetworkDeviceData
-- NetworkDeviceData provides network-related details for the allocated device. This information may be filled by drivers or other components to configure or identify the device within a network context.
data V1alpha3NetworkDeviceData = V1alpha3NetworkDeviceData
  { V1alpha3NetworkDeviceData -> Maybe Text
v1alpha3NetworkDeviceDataHardwareAddress :: !(Maybe Text) -- ^ "hardwareAddress" - HardwareAddress represents the hardware address (e.g. MAC Address) of the device&#39;s network interface.  Must not be longer than 128 characters.
  , V1alpha3NetworkDeviceData -> Maybe Text
v1alpha3NetworkDeviceDataInterfaceName :: !(Maybe Text) -- ^ "interfaceName" - InterfaceName specifies the name of the network interface associated with the allocated device. This might be the name of a physical or virtual network interface being configured in the pod.  Must not be longer than 256 characters.
  , V1alpha3NetworkDeviceData -> Maybe [Text]
v1alpha3NetworkDeviceDataIps :: !(Maybe [Text]) -- ^ "ips" - IPs lists the network addresses assigned to the device&#39;s network interface. This can include both IPv4 and IPv6 addresses. The IPs are in the CIDR notation, which includes both the address and the associated subnet mask. e.g.: \&quot;192.0.2.5/24\&quot; for IPv4 and \&quot;2001:db8::5/64\&quot; for IPv6.
  } deriving (Int -> V1alpha3NetworkDeviceData -> ShowS
[V1alpha3NetworkDeviceData] -> ShowS
V1alpha3NetworkDeviceData -> String
(Int -> V1alpha3NetworkDeviceData -> ShowS)
-> (V1alpha3NetworkDeviceData -> String)
-> ([V1alpha3NetworkDeviceData] -> ShowS)
-> Show V1alpha3NetworkDeviceData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha3NetworkDeviceData -> ShowS
showsPrec :: Int -> V1alpha3NetworkDeviceData -> ShowS
$cshow :: V1alpha3NetworkDeviceData -> String
show :: V1alpha3NetworkDeviceData -> String
$cshowList :: [V1alpha3NetworkDeviceData] -> ShowS
showList :: [V1alpha3NetworkDeviceData] -> ShowS
P.Show, V1alpha3NetworkDeviceData -> V1alpha3NetworkDeviceData -> Bool
(V1alpha3NetworkDeviceData -> V1alpha3NetworkDeviceData -> Bool)
-> (V1alpha3NetworkDeviceData -> V1alpha3NetworkDeviceData -> Bool)
-> Eq V1alpha3NetworkDeviceData
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha3NetworkDeviceData -> V1alpha3NetworkDeviceData -> Bool
== :: V1alpha3NetworkDeviceData -> V1alpha3NetworkDeviceData -> Bool
$c/= :: V1alpha3NetworkDeviceData -> V1alpha3NetworkDeviceData -> Bool
/= :: V1alpha3NetworkDeviceData -> V1alpha3NetworkDeviceData -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha3NetworkDeviceData
instance A.FromJSON V1alpha3NetworkDeviceData where
  parseJSON :: Value -> Parser V1alpha3NetworkDeviceData
parseJSON = String
-> (Object -> Parser V1alpha3NetworkDeviceData)
-> Value
-> Parser V1alpha3NetworkDeviceData
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha3NetworkDeviceData" ((Object -> Parser V1alpha3NetworkDeviceData)
 -> Value -> Parser V1alpha3NetworkDeviceData)
-> (Object -> Parser V1alpha3NetworkDeviceData)
-> Value
-> Parser V1alpha3NetworkDeviceData
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text -> Maybe [Text] -> V1alpha3NetworkDeviceData
V1alpha3NetworkDeviceData
      (Maybe Text
 -> Maybe Text -> Maybe [Text] -> V1alpha3NetworkDeviceData)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe [Text] -> V1alpha3NetworkDeviceData)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"hardwareAddress")
      Parser (Maybe Text -> Maybe [Text] -> V1alpha3NetworkDeviceData)
-> Parser (Maybe Text)
-> Parser (Maybe [Text] -> V1alpha3NetworkDeviceData)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"interfaceName")
      Parser (Maybe [Text] -> V1alpha3NetworkDeviceData)
-> Parser (Maybe [Text]) -> Parser V1alpha3NetworkDeviceData
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ips")

-- | ToJSON V1alpha3NetworkDeviceData
instance A.ToJSON V1alpha3NetworkDeviceData where
  toJSON :: V1alpha3NetworkDeviceData -> Value
toJSON V1alpha3NetworkDeviceData {Maybe [Text]
Maybe Text
$sel:v1alpha3NetworkDeviceDataHardwareAddress:V1alpha3NetworkDeviceData :: V1alpha3NetworkDeviceData -> Maybe Text
$sel:v1alpha3NetworkDeviceDataInterfaceName:V1alpha3NetworkDeviceData :: V1alpha3NetworkDeviceData -> Maybe Text
$sel:v1alpha3NetworkDeviceDataIps:V1alpha3NetworkDeviceData :: V1alpha3NetworkDeviceData -> Maybe [Text]
v1alpha3NetworkDeviceDataHardwareAddress :: Maybe Text
v1alpha3NetworkDeviceDataInterfaceName :: Maybe Text
v1alpha3NetworkDeviceDataIps :: Maybe [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"hardwareAddress" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha3NetworkDeviceDataHardwareAddress
      , Key
"interfaceName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha3NetworkDeviceDataInterfaceName
      , Key
"ips" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1alpha3NetworkDeviceDataIps
      ]


-- | Construct a value of type 'V1alpha3NetworkDeviceData' (by applying it's required fields, if any)
mkV1alpha3NetworkDeviceData
  :: V1alpha3NetworkDeviceData
mkV1alpha3NetworkDeviceData :: V1alpha3NetworkDeviceData
mkV1alpha3NetworkDeviceData =
  V1alpha3NetworkDeviceData
  { $sel:v1alpha3NetworkDeviceDataHardwareAddress:V1alpha3NetworkDeviceData :: Maybe Text
v1alpha3NetworkDeviceDataHardwareAddress = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha3NetworkDeviceDataInterfaceName:V1alpha3NetworkDeviceData :: Maybe Text
v1alpha3NetworkDeviceDataInterfaceName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha3NetworkDeviceDataIps:V1alpha3NetworkDeviceData :: Maybe [Text]
v1alpha3NetworkDeviceDataIps = Maybe [Text]
forall a. Maybe a
Nothing
  }

-- ** V1alpha3OpaqueDeviceConfiguration
-- | V1alpha3OpaqueDeviceConfiguration
-- OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.
data V1alpha3OpaqueDeviceConfiguration = V1alpha3OpaqueDeviceConfiguration
  { V1alpha3OpaqueDeviceConfiguration -> Text
v1alpha3OpaqueDeviceConfigurationDriver :: !(Text) -- ^ /Required/ "driver" - Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.  An admission policy provided by the driver developer could use this to decide whether it needs to validate them.  Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.
  , V1alpha3OpaqueDeviceConfiguration -> Value
v1alpha3OpaqueDeviceConfigurationParameters :: !(A.Value) -- ^ /Required/ "parameters" - Parameters can contain arbitrary data. It is the responsibility of the driver developer to handle validation and versioning. Typically this includes self-identification and a version (\&quot;kind\&quot; + \&quot;apiVersion\&quot; for Kubernetes types), with conversion between different versions.  The length of the raw data must be smaller or equal to 10 Ki.
  } deriving (Int -> V1alpha3OpaqueDeviceConfiguration -> ShowS
[V1alpha3OpaqueDeviceConfiguration] -> ShowS
V1alpha3OpaqueDeviceConfiguration -> String
(Int -> V1alpha3OpaqueDeviceConfiguration -> ShowS)
-> (V1alpha3OpaqueDeviceConfiguration -> String)
-> ([V1alpha3OpaqueDeviceConfiguration] -> ShowS)
-> Show V1alpha3OpaqueDeviceConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha3OpaqueDeviceConfiguration -> ShowS
showsPrec :: Int -> V1alpha3OpaqueDeviceConfiguration -> ShowS
$cshow :: V1alpha3OpaqueDeviceConfiguration -> String
show :: V1alpha3OpaqueDeviceConfiguration -> String
$cshowList :: [V1alpha3OpaqueDeviceConfiguration] -> ShowS
showList :: [V1alpha3OpaqueDeviceConfiguration] -> ShowS
P.Show, V1alpha3OpaqueDeviceConfiguration
-> V1alpha3OpaqueDeviceConfiguration -> Bool
(V1alpha3OpaqueDeviceConfiguration
 -> V1alpha3OpaqueDeviceConfiguration -> Bool)
-> (V1alpha3OpaqueDeviceConfiguration
    -> V1alpha3OpaqueDeviceConfiguration -> Bool)
-> Eq V1alpha3OpaqueDeviceConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha3OpaqueDeviceConfiguration
-> V1alpha3OpaqueDeviceConfiguration -> Bool
== :: V1alpha3OpaqueDeviceConfiguration
-> V1alpha3OpaqueDeviceConfiguration -> Bool
$c/= :: V1alpha3OpaqueDeviceConfiguration
-> V1alpha3OpaqueDeviceConfiguration -> Bool
/= :: V1alpha3OpaqueDeviceConfiguration
-> V1alpha3OpaqueDeviceConfiguration -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha3OpaqueDeviceConfiguration
instance A.FromJSON V1alpha3OpaqueDeviceConfiguration where
  parseJSON :: Value -> Parser V1alpha3OpaqueDeviceConfiguration
parseJSON = String
-> (Object -> Parser V1alpha3OpaqueDeviceConfiguration)
-> Value
-> Parser V1alpha3OpaqueDeviceConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha3OpaqueDeviceConfiguration" ((Object -> Parser V1alpha3OpaqueDeviceConfiguration)
 -> Value -> Parser V1alpha3OpaqueDeviceConfiguration)
-> (Object -> Parser V1alpha3OpaqueDeviceConfiguration)
-> Value
-> Parser V1alpha3OpaqueDeviceConfiguration
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Value -> V1alpha3OpaqueDeviceConfiguration
V1alpha3OpaqueDeviceConfiguration
      (Text -> Value -> V1alpha3OpaqueDeviceConfiguration)
-> Parser Text
-> Parser (Value -> V1alpha3OpaqueDeviceConfiguration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"driver")
      Parser (Value -> V1alpha3OpaqueDeviceConfiguration)
-> Parser Value -> Parser V1alpha3OpaqueDeviceConfiguration
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Value
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"parameters")

-- | ToJSON V1alpha3OpaqueDeviceConfiguration
instance A.ToJSON V1alpha3OpaqueDeviceConfiguration where
  toJSON :: V1alpha3OpaqueDeviceConfiguration -> Value
toJSON V1alpha3OpaqueDeviceConfiguration {Value
Text
$sel:v1alpha3OpaqueDeviceConfigurationDriver:V1alpha3OpaqueDeviceConfiguration :: V1alpha3OpaqueDeviceConfiguration -> Text
$sel:v1alpha3OpaqueDeviceConfigurationParameters:V1alpha3OpaqueDeviceConfiguration :: V1alpha3OpaqueDeviceConfiguration -> Value
v1alpha3OpaqueDeviceConfigurationDriver :: Text
v1alpha3OpaqueDeviceConfigurationParameters :: Value
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"driver" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha3OpaqueDeviceConfigurationDriver
      , Key
"parameters" Key -> Value -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Value
v1alpha3OpaqueDeviceConfigurationParameters
      ]


-- | Construct a value of type 'V1alpha3OpaqueDeviceConfiguration' (by applying it's required fields, if any)
mkV1alpha3OpaqueDeviceConfiguration
  :: Text -- ^ 'v1alpha3OpaqueDeviceConfigurationDriver': Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.  An admission policy provided by the driver developer could use this to decide whether it needs to validate them.  Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.
  -> A.Value -- ^ 'v1alpha3OpaqueDeviceConfigurationParameters': Parameters can contain arbitrary data. It is the responsibility of the driver developer to handle validation and versioning. Typically this includes self-identification and a version (\"kind\" + \"apiVersion\" for Kubernetes types), with conversion between different versions.  The length of the raw data must be smaller or equal to 10 Ki.
  -> V1alpha3OpaqueDeviceConfiguration
mkV1alpha3OpaqueDeviceConfiguration :: Text -> Value -> V1alpha3OpaqueDeviceConfiguration
mkV1alpha3OpaqueDeviceConfiguration Text
v1alpha3OpaqueDeviceConfigurationDriver Value
v1alpha3OpaqueDeviceConfigurationParameters =
  V1alpha3OpaqueDeviceConfiguration
  { Text
$sel:v1alpha3OpaqueDeviceConfigurationDriver:V1alpha3OpaqueDeviceConfiguration :: Text
v1alpha3OpaqueDeviceConfigurationDriver :: Text
v1alpha3OpaqueDeviceConfigurationDriver
  , Value
$sel:v1alpha3OpaqueDeviceConfigurationParameters:V1alpha3OpaqueDeviceConfiguration :: Value
v1alpha3OpaqueDeviceConfigurationParameters :: Value
v1alpha3OpaqueDeviceConfigurationParameters
  }

-- ** V1alpha3ResourceClaim
-- | V1alpha3ResourceClaim
-- ResourceClaim describes a request for access to resources in the cluster, for use by workloads. For example, if a workload needs an accelerator device with specific properties, this is how that request is expressed. The status stanza tracks whether this claim has been satisfied and what specific resources have been allocated.  This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.
data V1alpha3ResourceClaim = V1alpha3ResourceClaim
  { V1alpha3ResourceClaim -> Maybe Text
v1alpha3ResourceClaimApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1alpha3ResourceClaim -> Maybe Text
v1alpha3ResourceClaimKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1alpha3ResourceClaim -> Maybe V1ObjectMeta
v1alpha3ResourceClaimMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1alpha3ResourceClaim -> V1alpha3ResourceClaimSpec
v1alpha3ResourceClaimSpec :: !(V1alpha3ResourceClaimSpec) -- ^ /Required/ "spec"
  , V1alpha3ResourceClaim -> Maybe V1alpha3ResourceClaimStatus
v1alpha3ResourceClaimStatus :: !(Maybe V1alpha3ResourceClaimStatus) -- ^ "status"
  } deriving (Int -> V1alpha3ResourceClaim -> ShowS
[V1alpha3ResourceClaim] -> ShowS
V1alpha3ResourceClaim -> String
(Int -> V1alpha3ResourceClaim -> ShowS)
-> (V1alpha3ResourceClaim -> String)
-> ([V1alpha3ResourceClaim] -> ShowS)
-> Show V1alpha3ResourceClaim
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha3ResourceClaim -> ShowS
showsPrec :: Int -> V1alpha3ResourceClaim -> ShowS
$cshow :: V1alpha3ResourceClaim -> String
show :: V1alpha3ResourceClaim -> String
$cshowList :: [V1alpha3ResourceClaim] -> ShowS
showList :: [V1alpha3ResourceClaim] -> ShowS
P.Show, V1alpha3ResourceClaim -> V1alpha3ResourceClaim -> Bool
(V1alpha3ResourceClaim -> V1alpha3ResourceClaim -> Bool)
-> (V1alpha3ResourceClaim -> V1alpha3ResourceClaim -> Bool)
-> Eq V1alpha3ResourceClaim
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha3ResourceClaim -> V1alpha3ResourceClaim -> Bool
== :: V1alpha3ResourceClaim -> V1alpha3ResourceClaim -> Bool
$c/= :: V1alpha3ResourceClaim -> V1alpha3ResourceClaim -> Bool
/= :: V1alpha3ResourceClaim -> V1alpha3ResourceClaim -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha3ResourceClaim
instance A.FromJSON V1alpha3ResourceClaim where
  parseJSON :: Value -> Parser V1alpha3ResourceClaim
parseJSON = String
-> (Object -> Parser V1alpha3ResourceClaim)
-> Value
-> Parser V1alpha3ResourceClaim
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha3ResourceClaim" ((Object -> Parser V1alpha3ResourceClaim)
 -> Value -> Parser V1alpha3ResourceClaim)
-> (Object -> Parser V1alpha3ResourceClaim)
-> Value
-> Parser V1alpha3ResourceClaim
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> V1alpha3ResourceClaimSpec
-> Maybe V1alpha3ResourceClaimStatus
-> V1alpha3ResourceClaim
V1alpha3ResourceClaim
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> V1alpha3ResourceClaimSpec
 -> Maybe V1alpha3ResourceClaimStatus
 -> V1alpha3ResourceClaim)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> V1alpha3ResourceClaimSpec
      -> Maybe V1alpha3ResourceClaimStatus
      -> V1alpha3ResourceClaim)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> V1alpha3ResourceClaimSpec
   -> Maybe V1alpha3ResourceClaimStatus
   -> V1alpha3ResourceClaim)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> V1alpha3ResourceClaimSpec
      -> Maybe V1alpha3ResourceClaimStatus
      -> V1alpha3ResourceClaim)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> V1alpha3ResourceClaimSpec
   -> Maybe V1alpha3ResourceClaimStatus
   -> V1alpha3ResourceClaim)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (V1alpha3ResourceClaimSpec
      -> Maybe V1alpha3ResourceClaimStatus -> V1alpha3ResourceClaim)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (V1alpha3ResourceClaimSpec
   -> Maybe V1alpha3ResourceClaimStatus -> V1alpha3ResourceClaim)
-> Parser V1alpha3ResourceClaimSpec
-> Parser
     (Maybe V1alpha3ResourceClaimStatus -> V1alpha3ResourceClaim)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1alpha3ResourceClaimSpec
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"spec")
      Parser (Maybe V1alpha3ResourceClaimStatus -> V1alpha3ResourceClaim)
-> Parser (Maybe V1alpha3ResourceClaimStatus)
-> Parser V1alpha3ResourceClaim
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1alpha3ResourceClaimStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1alpha3ResourceClaim
instance A.ToJSON V1alpha3ResourceClaim where
  toJSON :: V1alpha3ResourceClaim -> Value
toJSON V1alpha3ResourceClaim {Maybe Text
Maybe V1alpha3ResourceClaimStatus
Maybe V1ObjectMeta
V1alpha3ResourceClaimSpec
$sel:v1alpha3ResourceClaimApiVersion:V1alpha3ResourceClaim :: V1alpha3ResourceClaim -> Maybe Text
$sel:v1alpha3ResourceClaimKind:V1alpha3ResourceClaim :: V1alpha3ResourceClaim -> Maybe Text
$sel:v1alpha3ResourceClaimMetadata:V1alpha3ResourceClaim :: V1alpha3ResourceClaim -> Maybe V1ObjectMeta
$sel:v1alpha3ResourceClaimSpec:V1alpha3ResourceClaim :: V1alpha3ResourceClaim -> V1alpha3ResourceClaimSpec
$sel:v1alpha3ResourceClaimStatus:V1alpha3ResourceClaim :: V1alpha3ResourceClaim -> Maybe V1alpha3ResourceClaimStatus
v1alpha3ResourceClaimApiVersion :: Maybe Text
v1alpha3ResourceClaimKind :: Maybe Text
v1alpha3ResourceClaimMetadata :: Maybe V1ObjectMeta
v1alpha3ResourceClaimSpec :: V1alpha3ResourceClaimSpec
v1alpha3ResourceClaimStatus :: Maybe V1alpha3ResourceClaimStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha3ResourceClaimApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha3ResourceClaimKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1alpha3ResourceClaimMetadata
      , Key
"spec" Key -> V1alpha3ResourceClaimSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1alpha3ResourceClaimSpec
v1alpha3ResourceClaimSpec
      , Key
"status" Key -> Maybe V1alpha3ResourceClaimStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1alpha3ResourceClaimStatus
v1alpha3ResourceClaimStatus
      ]


-- | Construct a value of type 'V1alpha3ResourceClaim' (by applying it's required fields, if any)
mkV1alpha3ResourceClaim
  :: V1alpha3ResourceClaimSpec -- ^ 'v1alpha3ResourceClaimSpec' 
  -> V1alpha3ResourceClaim
mkV1alpha3ResourceClaim :: V1alpha3ResourceClaimSpec -> V1alpha3ResourceClaim
mkV1alpha3ResourceClaim V1alpha3ResourceClaimSpec
v1alpha3ResourceClaimSpec =
  V1alpha3ResourceClaim
  { $sel:v1alpha3ResourceClaimApiVersion:V1alpha3ResourceClaim :: Maybe Text
v1alpha3ResourceClaimApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha3ResourceClaimKind:V1alpha3ResourceClaim :: Maybe Text
v1alpha3ResourceClaimKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha3ResourceClaimMetadata:V1alpha3ResourceClaim :: Maybe V1ObjectMeta
v1alpha3ResourceClaimMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , V1alpha3ResourceClaimSpec
$sel:v1alpha3ResourceClaimSpec:V1alpha3ResourceClaim :: V1alpha3ResourceClaimSpec
v1alpha3ResourceClaimSpec :: V1alpha3ResourceClaimSpec
v1alpha3ResourceClaimSpec
  , $sel:v1alpha3ResourceClaimStatus:V1alpha3ResourceClaim :: Maybe V1alpha3ResourceClaimStatus
v1alpha3ResourceClaimStatus = Maybe V1alpha3ResourceClaimStatus
forall a. Maybe a
Nothing
  }

-- ** V1alpha3ResourceClaimConsumerReference
-- | V1alpha3ResourceClaimConsumerReference
-- ResourceClaimConsumerReference contains enough information to let you locate the consumer of a ResourceClaim. The user must be a resource in the same namespace as the ResourceClaim.
data V1alpha3ResourceClaimConsumerReference = V1alpha3ResourceClaimConsumerReference
  { V1alpha3ResourceClaimConsumerReference -> Maybe Text
v1alpha3ResourceClaimConsumerReferenceApiGroup :: !(Maybe Text) -- ^ "apiGroup" - APIGroup is the group for the resource being referenced. It is empty for the core API. This matches the group in the APIVersion that is used when creating the resources.
  , V1alpha3ResourceClaimConsumerReference -> Text
v1alpha3ResourceClaimConsumerReferenceName :: !(Text) -- ^ /Required/ "name" - Name is the name of resource being referenced.
  , V1alpha3ResourceClaimConsumerReference -> Text
v1alpha3ResourceClaimConsumerReferenceResource :: !(Text) -- ^ /Required/ "resource" - Resource is the type of resource being referenced, for example \&quot;pods\&quot;.
  , V1alpha3ResourceClaimConsumerReference -> Text
v1alpha3ResourceClaimConsumerReferenceUid :: !(Text) -- ^ /Required/ "uid" - UID identifies exactly one incarnation of the resource.
  } deriving (Int -> V1alpha3ResourceClaimConsumerReference -> ShowS
[V1alpha3ResourceClaimConsumerReference] -> ShowS
V1alpha3ResourceClaimConsumerReference -> String
(Int -> V1alpha3ResourceClaimConsumerReference -> ShowS)
-> (V1alpha3ResourceClaimConsumerReference -> String)
-> ([V1alpha3ResourceClaimConsumerReference] -> ShowS)
-> Show V1alpha3ResourceClaimConsumerReference
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha3ResourceClaimConsumerReference -> ShowS
showsPrec :: Int -> V1alpha3ResourceClaimConsumerReference -> ShowS
$cshow :: V1alpha3ResourceClaimConsumerReference -> String
show :: V1alpha3ResourceClaimConsumerReference -> String
$cshowList :: [V1alpha3ResourceClaimConsumerReference] -> ShowS
showList :: [V1alpha3ResourceClaimConsumerReference] -> ShowS
P.Show, V1alpha3ResourceClaimConsumerReference
-> V1alpha3ResourceClaimConsumerReference -> Bool
(V1alpha3ResourceClaimConsumerReference
 -> V1alpha3ResourceClaimConsumerReference -> Bool)
-> (V1alpha3ResourceClaimConsumerReference
    -> V1alpha3ResourceClaimConsumerReference -> Bool)
-> Eq V1alpha3ResourceClaimConsumerReference
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha3ResourceClaimConsumerReference
-> V1alpha3ResourceClaimConsumerReference -> Bool
== :: V1alpha3ResourceClaimConsumerReference
-> V1alpha3ResourceClaimConsumerReference -> Bool
$c/= :: V1alpha3ResourceClaimConsumerReference
-> V1alpha3ResourceClaimConsumerReference -> Bool
/= :: V1alpha3ResourceClaimConsumerReference
-> V1alpha3ResourceClaimConsumerReference -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha3ResourceClaimConsumerReference
instance A.FromJSON V1alpha3ResourceClaimConsumerReference where
  parseJSON :: Value -> Parser V1alpha3ResourceClaimConsumerReference
parseJSON = String
-> (Object -> Parser V1alpha3ResourceClaimConsumerReference)
-> Value
-> Parser V1alpha3ResourceClaimConsumerReference
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha3ResourceClaimConsumerReference" ((Object -> Parser V1alpha3ResourceClaimConsumerReference)
 -> Value -> Parser V1alpha3ResourceClaimConsumerReference)
-> (Object -> Parser V1alpha3ResourceClaimConsumerReference)
-> Value
-> Parser V1alpha3ResourceClaimConsumerReference
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Text -> Text -> Text -> V1alpha3ResourceClaimConsumerReference
V1alpha3ResourceClaimConsumerReference
      (Maybe Text
 -> Text -> Text -> Text -> V1alpha3ResourceClaimConsumerReference)
-> Parser (Maybe Text)
-> Parser
     (Text -> Text -> Text -> V1alpha3ResourceClaimConsumerReference)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiGroup")
      Parser
  (Text -> Text -> Text -> V1alpha3ResourceClaimConsumerReference)
-> Parser Text
-> Parser (Text -> Text -> V1alpha3ResourceClaimConsumerReference)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser (Text -> Text -> V1alpha3ResourceClaimConsumerReference)
-> Parser Text
-> Parser (Text -> V1alpha3ResourceClaimConsumerReference)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"resource")
      Parser (Text -> V1alpha3ResourceClaimConsumerReference)
-> Parser Text -> Parser V1alpha3ResourceClaimConsumerReference
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"uid")

-- | ToJSON V1alpha3ResourceClaimConsumerReference
instance A.ToJSON V1alpha3ResourceClaimConsumerReference where
  toJSON :: V1alpha3ResourceClaimConsumerReference -> Value
toJSON V1alpha3ResourceClaimConsumerReference {Maybe Text
Text
$sel:v1alpha3ResourceClaimConsumerReferenceApiGroup:V1alpha3ResourceClaimConsumerReference :: V1alpha3ResourceClaimConsumerReference -> Maybe Text
$sel:v1alpha3ResourceClaimConsumerReferenceName:V1alpha3ResourceClaimConsumerReference :: V1alpha3ResourceClaimConsumerReference -> Text
$sel:v1alpha3ResourceClaimConsumerReferenceResource:V1alpha3ResourceClaimConsumerReference :: V1alpha3ResourceClaimConsumerReference -> Text
$sel:v1alpha3ResourceClaimConsumerReferenceUid:V1alpha3ResourceClaimConsumerReference :: V1alpha3ResourceClaimConsumerReference -> Text
v1alpha3ResourceClaimConsumerReferenceApiGroup :: Maybe Text
v1alpha3ResourceClaimConsumerReferenceName :: Text
v1alpha3ResourceClaimConsumerReferenceResource :: Text
v1alpha3ResourceClaimConsumerReferenceUid :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiGroup" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha3ResourceClaimConsumerReferenceApiGroup
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha3ResourceClaimConsumerReferenceName
      , Key
"resource" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha3ResourceClaimConsumerReferenceResource
      , Key
"uid" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha3ResourceClaimConsumerReferenceUid
      ]


-- | Construct a value of type 'V1alpha3ResourceClaimConsumerReference' (by applying it's required fields, if any)
mkV1alpha3ResourceClaimConsumerReference
  :: Text -- ^ 'v1alpha3ResourceClaimConsumerReferenceName': Name is the name of resource being referenced.
  -> Text -- ^ 'v1alpha3ResourceClaimConsumerReferenceResource': Resource is the type of resource being referenced, for example \"pods\".
  -> Text -- ^ 'v1alpha3ResourceClaimConsumerReferenceUid': UID identifies exactly one incarnation of the resource.
  -> V1alpha3ResourceClaimConsumerReference
mkV1alpha3ResourceClaimConsumerReference :: Text -> Text -> Text -> V1alpha3ResourceClaimConsumerReference
mkV1alpha3ResourceClaimConsumerReference Text
v1alpha3ResourceClaimConsumerReferenceName Text
v1alpha3ResourceClaimConsumerReferenceResource Text
v1alpha3ResourceClaimConsumerReferenceUid =
  V1alpha3ResourceClaimConsumerReference
  { $sel:v1alpha3ResourceClaimConsumerReferenceApiGroup:V1alpha3ResourceClaimConsumerReference :: Maybe Text
v1alpha3ResourceClaimConsumerReferenceApiGroup = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1alpha3ResourceClaimConsumerReferenceName:V1alpha3ResourceClaimConsumerReference :: Text
v1alpha3ResourceClaimConsumerReferenceName :: Text
v1alpha3ResourceClaimConsumerReferenceName
  , Text
$sel:v1alpha3ResourceClaimConsumerReferenceResource:V1alpha3ResourceClaimConsumerReference :: Text
v1alpha3ResourceClaimConsumerReferenceResource :: Text
v1alpha3ResourceClaimConsumerReferenceResource
  , Text
$sel:v1alpha3ResourceClaimConsumerReferenceUid:V1alpha3ResourceClaimConsumerReference :: Text
v1alpha3ResourceClaimConsumerReferenceUid :: Text
v1alpha3ResourceClaimConsumerReferenceUid
  }

-- ** V1alpha3ResourceClaimList
-- | V1alpha3ResourceClaimList
-- ResourceClaimList is a collection of claims.
data V1alpha3ResourceClaimList = V1alpha3ResourceClaimList
  { V1alpha3ResourceClaimList -> Maybe Text
v1alpha3ResourceClaimListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1alpha3ResourceClaimList -> [V1alpha3ResourceClaim]
v1alpha3ResourceClaimListItems :: !([V1alpha3ResourceClaim]) -- ^ /Required/ "items" - Items is the list of resource claims.
  , V1alpha3ResourceClaimList -> Maybe Text
v1alpha3ResourceClaimListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1alpha3ResourceClaimList -> Maybe V1ListMeta
v1alpha3ResourceClaimListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1alpha3ResourceClaimList -> ShowS
[V1alpha3ResourceClaimList] -> ShowS
V1alpha3ResourceClaimList -> String
(Int -> V1alpha3ResourceClaimList -> ShowS)
-> (V1alpha3ResourceClaimList -> String)
-> ([V1alpha3ResourceClaimList] -> ShowS)
-> Show V1alpha3ResourceClaimList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha3ResourceClaimList -> ShowS
showsPrec :: Int -> V1alpha3ResourceClaimList -> ShowS
$cshow :: V1alpha3ResourceClaimList -> String
show :: V1alpha3ResourceClaimList -> String
$cshowList :: [V1alpha3ResourceClaimList] -> ShowS
showList :: [V1alpha3ResourceClaimList] -> ShowS
P.Show, V1alpha3ResourceClaimList -> V1alpha3ResourceClaimList -> Bool
(V1alpha3ResourceClaimList -> V1alpha3ResourceClaimList -> Bool)
-> (V1alpha3ResourceClaimList -> V1alpha3ResourceClaimList -> Bool)
-> Eq V1alpha3ResourceClaimList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha3ResourceClaimList -> V1alpha3ResourceClaimList -> Bool
== :: V1alpha3ResourceClaimList -> V1alpha3ResourceClaimList -> Bool
$c/= :: V1alpha3ResourceClaimList -> V1alpha3ResourceClaimList -> Bool
/= :: V1alpha3ResourceClaimList -> V1alpha3ResourceClaimList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha3ResourceClaimList
instance A.FromJSON V1alpha3ResourceClaimList where
  parseJSON :: Value -> Parser V1alpha3ResourceClaimList
parseJSON = String
-> (Object -> Parser V1alpha3ResourceClaimList)
-> Value
-> Parser V1alpha3ResourceClaimList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha3ResourceClaimList" ((Object -> Parser V1alpha3ResourceClaimList)
 -> Value -> Parser V1alpha3ResourceClaimList)
-> (Object -> Parser V1alpha3ResourceClaimList)
-> Value
-> Parser V1alpha3ResourceClaimList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1alpha3ResourceClaim]
-> Maybe Text
-> Maybe V1ListMeta
-> V1alpha3ResourceClaimList
V1alpha3ResourceClaimList
      (Maybe Text
 -> [V1alpha3ResourceClaim]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1alpha3ResourceClaimList)
-> Parser (Maybe Text)
-> Parser
     ([V1alpha3ResourceClaim]
      -> Maybe Text -> Maybe V1ListMeta -> V1alpha3ResourceClaimList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1alpha3ResourceClaim]
   -> Maybe Text -> Maybe V1ListMeta -> V1alpha3ResourceClaimList)
-> Parser [V1alpha3ResourceClaim]
-> Parser
     (Maybe Text -> Maybe V1ListMeta -> V1alpha3ResourceClaimList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1alpha3ResourceClaim]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser
  (Maybe Text -> Maybe V1ListMeta -> V1alpha3ResourceClaimList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1alpha3ResourceClaimList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1alpha3ResourceClaimList)
-> Parser (Maybe V1ListMeta) -> Parser V1alpha3ResourceClaimList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1alpha3ResourceClaimList
instance A.ToJSON V1alpha3ResourceClaimList where
  toJSON :: V1alpha3ResourceClaimList -> Value
toJSON V1alpha3ResourceClaimList {[V1alpha3ResourceClaim]
Maybe Text
Maybe V1ListMeta
$sel:v1alpha3ResourceClaimListApiVersion:V1alpha3ResourceClaimList :: V1alpha3ResourceClaimList -> Maybe Text
$sel:v1alpha3ResourceClaimListItems:V1alpha3ResourceClaimList :: V1alpha3ResourceClaimList -> [V1alpha3ResourceClaim]
$sel:v1alpha3ResourceClaimListKind:V1alpha3ResourceClaimList :: V1alpha3ResourceClaimList -> Maybe Text
$sel:v1alpha3ResourceClaimListMetadata:V1alpha3ResourceClaimList :: V1alpha3ResourceClaimList -> Maybe V1ListMeta
v1alpha3ResourceClaimListApiVersion :: Maybe Text
v1alpha3ResourceClaimListItems :: [V1alpha3ResourceClaim]
v1alpha3ResourceClaimListKind :: Maybe Text
v1alpha3ResourceClaimListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha3ResourceClaimListApiVersion
      , Key
"items" Key -> [V1alpha3ResourceClaim] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1alpha3ResourceClaim]
v1alpha3ResourceClaimListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha3ResourceClaimListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1alpha3ResourceClaimListMetadata
      ]


-- | Construct a value of type 'V1alpha3ResourceClaimList' (by applying it's required fields, if any)
mkV1alpha3ResourceClaimList
  :: [V1alpha3ResourceClaim] -- ^ 'v1alpha3ResourceClaimListItems': Items is the list of resource claims.
  -> V1alpha3ResourceClaimList
mkV1alpha3ResourceClaimList :: [V1alpha3ResourceClaim] -> V1alpha3ResourceClaimList
mkV1alpha3ResourceClaimList [V1alpha3ResourceClaim]
v1alpha3ResourceClaimListItems =
  V1alpha3ResourceClaimList
  { $sel:v1alpha3ResourceClaimListApiVersion:V1alpha3ResourceClaimList :: Maybe Text
v1alpha3ResourceClaimListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1alpha3ResourceClaim]
$sel:v1alpha3ResourceClaimListItems:V1alpha3ResourceClaimList :: [V1alpha3ResourceClaim]
v1alpha3ResourceClaimListItems :: [V1alpha3ResourceClaim]
v1alpha3ResourceClaimListItems
  , $sel:v1alpha3ResourceClaimListKind:V1alpha3ResourceClaimList :: Maybe Text
v1alpha3ResourceClaimListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha3ResourceClaimListMetadata:V1alpha3ResourceClaimList :: Maybe V1ListMeta
v1alpha3ResourceClaimListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1alpha3ResourceClaimSpec
-- | V1alpha3ResourceClaimSpec
-- ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it.
data V1alpha3ResourceClaimSpec = V1alpha3ResourceClaimSpec
  { V1alpha3ResourceClaimSpec -> Maybe V1alpha3DeviceClaim
v1alpha3ResourceClaimSpecDevices :: !(Maybe V1alpha3DeviceClaim) -- ^ "devices"
  } deriving (Int -> V1alpha3ResourceClaimSpec -> ShowS
[V1alpha3ResourceClaimSpec] -> ShowS
V1alpha3ResourceClaimSpec -> String
(Int -> V1alpha3ResourceClaimSpec -> ShowS)
-> (V1alpha3ResourceClaimSpec -> String)
-> ([V1alpha3ResourceClaimSpec] -> ShowS)
-> Show V1alpha3ResourceClaimSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha3ResourceClaimSpec -> ShowS
showsPrec :: Int -> V1alpha3ResourceClaimSpec -> ShowS
$cshow :: V1alpha3ResourceClaimSpec -> String
show :: V1alpha3ResourceClaimSpec -> String
$cshowList :: [V1alpha3ResourceClaimSpec] -> ShowS
showList :: [V1alpha3ResourceClaimSpec] -> ShowS
P.Show, V1alpha3ResourceClaimSpec -> V1alpha3ResourceClaimSpec -> Bool
(V1alpha3ResourceClaimSpec -> V1alpha3ResourceClaimSpec -> Bool)
-> (V1alpha3ResourceClaimSpec -> V1alpha3ResourceClaimSpec -> Bool)
-> Eq V1alpha3ResourceClaimSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha3ResourceClaimSpec -> V1alpha3ResourceClaimSpec -> Bool
== :: V1alpha3ResourceClaimSpec -> V1alpha3ResourceClaimSpec -> Bool
$c/= :: V1alpha3ResourceClaimSpec -> V1alpha3ResourceClaimSpec -> Bool
/= :: V1alpha3ResourceClaimSpec -> V1alpha3ResourceClaimSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha3ResourceClaimSpec
instance A.FromJSON V1alpha3ResourceClaimSpec where
  parseJSON :: Value -> Parser V1alpha3ResourceClaimSpec
parseJSON = String
-> (Object -> Parser V1alpha3ResourceClaimSpec)
-> Value
-> Parser V1alpha3ResourceClaimSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha3ResourceClaimSpec" ((Object -> Parser V1alpha3ResourceClaimSpec)
 -> Value -> Parser V1alpha3ResourceClaimSpec)
-> (Object -> Parser V1alpha3ResourceClaimSpec)
-> Value
-> Parser V1alpha3ResourceClaimSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1alpha3DeviceClaim -> V1alpha3ResourceClaimSpec
V1alpha3ResourceClaimSpec
      (Maybe V1alpha3DeviceClaim -> V1alpha3ResourceClaimSpec)
-> Parser (Maybe V1alpha3DeviceClaim)
-> Parser V1alpha3ResourceClaimSpec
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1alpha3DeviceClaim)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"devices")

-- | ToJSON V1alpha3ResourceClaimSpec
instance A.ToJSON V1alpha3ResourceClaimSpec where
  toJSON :: V1alpha3ResourceClaimSpec -> Value
toJSON V1alpha3ResourceClaimSpec {Maybe V1alpha3DeviceClaim
$sel:v1alpha3ResourceClaimSpecDevices:V1alpha3ResourceClaimSpec :: V1alpha3ResourceClaimSpec -> Maybe V1alpha3DeviceClaim
v1alpha3ResourceClaimSpecDevices :: Maybe V1alpha3DeviceClaim
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"devices" Key -> Maybe V1alpha3DeviceClaim -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1alpha3DeviceClaim
v1alpha3ResourceClaimSpecDevices
      ]


-- | Construct a value of type 'V1alpha3ResourceClaimSpec' (by applying it's required fields, if any)
mkV1alpha3ResourceClaimSpec
  :: V1alpha3ResourceClaimSpec
mkV1alpha3ResourceClaimSpec :: V1alpha3ResourceClaimSpec
mkV1alpha3ResourceClaimSpec =
  V1alpha3ResourceClaimSpec
  { $sel:v1alpha3ResourceClaimSpecDevices:V1alpha3ResourceClaimSpec :: Maybe V1alpha3DeviceClaim
v1alpha3ResourceClaimSpecDevices = Maybe V1alpha3DeviceClaim
forall a. Maybe a
Nothing
  }

-- ** V1alpha3ResourceClaimStatus
-- | V1alpha3ResourceClaimStatus
-- ResourceClaimStatus tracks whether the resource has been allocated and what the result of that was.
data V1alpha3ResourceClaimStatus = V1alpha3ResourceClaimStatus
  { V1alpha3ResourceClaimStatus -> Maybe V1alpha3AllocationResult
v1alpha3ResourceClaimStatusAllocation :: !(Maybe V1alpha3AllocationResult) -- ^ "allocation"
  , V1alpha3ResourceClaimStatus
-> Maybe [V1alpha3AllocatedDeviceStatus]
v1alpha3ResourceClaimStatusDevices :: !(Maybe [V1alpha3AllocatedDeviceStatus]) -- ^ "devices" - Devices contains the status of each device allocated for this claim, as reported by the driver. This can include driver-specific information. Entries are owned by their respective drivers.
  , V1alpha3ResourceClaimStatus
-> Maybe [V1alpha3ResourceClaimConsumerReference]
v1alpha3ResourceClaimStatusReservedFor :: !(Maybe [V1alpha3ResourceClaimConsumerReference]) -- ^ "reservedFor" - ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated.  In a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled.  Both schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again.  There can be at most 256 such reservations. This may get increased in the future, but not reduced.
  } deriving (Int -> V1alpha3ResourceClaimStatus -> ShowS
[V1alpha3ResourceClaimStatus] -> ShowS
V1alpha3ResourceClaimStatus -> String
(Int -> V1alpha3ResourceClaimStatus -> ShowS)
-> (V1alpha3ResourceClaimStatus -> String)
-> ([V1alpha3ResourceClaimStatus] -> ShowS)
-> Show V1alpha3ResourceClaimStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha3ResourceClaimStatus -> ShowS
showsPrec :: Int -> V1alpha3ResourceClaimStatus -> ShowS
$cshow :: V1alpha3ResourceClaimStatus -> String
show :: V1alpha3ResourceClaimStatus -> String
$cshowList :: [V1alpha3ResourceClaimStatus] -> ShowS
showList :: [V1alpha3ResourceClaimStatus] -> ShowS
P.Show, V1alpha3ResourceClaimStatus -> V1alpha3ResourceClaimStatus -> Bool
(V1alpha3ResourceClaimStatus
 -> V1alpha3ResourceClaimStatus -> Bool)
-> (V1alpha3ResourceClaimStatus
    -> V1alpha3ResourceClaimStatus -> Bool)
-> Eq V1alpha3ResourceClaimStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha3ResourceClaimStatus -> V1alpha3ResourceClaimStatus -> Bool
== :: V1alpha3ResourceClaimStatus -> V1alpha3ResourceClaimStatus -> Bool
$c/= :: V1alpha3ResourceClaimStatus -> V1alpha3ResourceClaimStatus -> Bool
/= :: V1alpha3ResourceClaimStatus -> V1alpha3ResourceClaimStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha3ResourceClaimStatus
instance A.FromJSON V1alpha3ResourceClaimStatus where
  parseJSON :: Value -> Parser V1alpha3ResourceClaimStatus
parseJSON = String
-> (Object -> Parser V1alpha3ResourceClaimStatus)
-> Value
-> Parser V1alpha3ResourceClaimStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha3ResourceClaimStatus" ((Object -> Parser V1alpha3ResourceClaimStatus)
 -> Value -> Parser V1alpha3ResourceClaimStatus)
-> (Object -> Parser V1alpha3ResourceClaimStatus)
-> Value
-> Parser V1alpha3ResourceClaimStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1alpha3AllocationResult
-> Maybe [V1alpha3AllocatedDeviceStatus]
-> Maybe [V1alpha3ResourceClaimConsumerReference]
-> V1alpha3ResourceClaimStatus
V1alpha3ResourceClaimStatus
      (Maybe V1alpha3AllocationResult
 -> Maybe [V1alpha3AllocatedDeviceStatus]
 -> Maybe [V1alpha3ResourceClaimConsumerReference]
 -> V1alpha3ResourceClaimStatus)
-> Parser (Maybe V1alpha3AllocationResult)
-> Parser
     (Maybe [V1alpha3AllocatedDeviceStatus]
      -> Maybe [V1alpha3ResourceClaimConsumerReference]
      -> V1alpha3ResourceClaimStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1alpha3AllocationResult)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"allocation")
      Parser
  (Maybe [V1alpha3AllocatedDeviceStatus]
   -> Maybe [V1alpha3ResourceClaimConsumerReference]
   -> V1alpha3ResourceClaimStatus)
-> Parser (Maybe [V1alpha3AllocatedDeviceStatus])
-> Parser
     (Maybe [V1alpha3ResourceClaimConsumerReference]
      -> V1alpha3ResourceClaimStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1alpha3AllocatedDeviceStatus])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"devices")
      Parser
  (Maybe [V1alpha3ResourceClaimConsumerReference]
   -> V1alpha3ResourceClaimStatus)
-> Parser (Maybe [V1alpha3ResourceClaimConsumerReference])
-> Parser V1alpha3ResourceClaimStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object
-> Key -> Parser (Maybe [V1alpha3ResourceClaimConsumerReference])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reservedFor")

-- | ToJSON V1alpha3ResourceClaimStatus
instance A.ToJSON V1alpha3ResourceClaimStatus where
  toJSON :: V1alpha3ResourceClaimStatus -> Value
toJSON V1alpha3ResourceClaimStatus {Maybe [V1alpha3ResourceClaimConsumerReference]
Maybe [V1alpha3AllocatedDeviceStatus]
Maybe V1alpha3AllocationResult
$sel:v1alpha3ResourceClaimStatusAllocation:V1alpha3ResourceClaimStatus :: V1alpha3ResourceClaimStatus -> Maybe V1alpha3AllocationResult
$sel:v1alpha3ResourceClaimStatusDevices:V1alpha3ResourceClaimStatus :: V1alpha3ResourceClaimStatus
-> Maybe [V1alpha3AllocatedDeviceStatus]
$sel:v1alpha3ResourceClaimStatusReservedFor:V1alpha3ResourceClaimStatus :: V1alpha3ResourceClaimStatus
-> Maybe [V1alpha3ResourceClaimConsumerReference]
v1alpha3ResourceClaimStatusAllocation :: Maybe V1alpha3AllocationResult
v1alpha3ResourceClaimStatusDevices :: Maybe [V1alpha3AllocatedDeviceStatus]
v1alpha3ResourceClaimStatusReservedFor :: Maybe [V1alpha3ResourceClaimConsumerReference]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"allocation" Key -> Maybe V1alpha3AllocationResult -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1alpha3AllocationResult
v1alpha3ResourceClaimStatusAllocation
      , Key
"devices" Key -> Maybe [V1alpha3AllocatedDeviceStatus] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1alpha3AllocatedDeviceStatus]
v1alpha3ResourceClaimStatusDevices
      , Key
"reservedFor" Key
-> Maybe [V1alpha3ResourceClaimConsumerReference] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1alpha3ResourceClaimConsumerReference]
v1alpha3ResourceClaimStatusReservedFor
      ]


-- | Construct a value of type 'V1alpha3ResourceClaimStatus' (by applying it's required fields, if any)
mkV1alpha3ResourceClaimStatus
  :: V1alpha3ResourceClaimStatus
mkV1alpha3ResourceClaimStatus :: V1alpha3ResourceClaimStatus
mkV1alpha3ResourceClaimStatus =
  V1alpha3ResourceClaimStatus
  { $sel:v1alpha3ResourceClaimStatusAllocation:V1alpha3ResourceClaimStatus :: Maybe V1alpha3AllocationResult
v1alpha3ResourceClaimStatusAllocation = Maybe V1alpha3AllocationResult
forall a. Maybe a
Nothing
  , $sel:v1alpha3ResourceClaimStatusDevices:V1alpha3ResourceClaimStatus :: Maybe [V1alpha3AllocatedDeviceStatus]
v1alpha3ResourceClaimStatusDevices = Maybe [V1alpha3AllocatedDeviceStatus]
forall a. Maybe a
Nothing
  , $sel:v1alpha3ResourceClaimStatusReservedFor:V1alpha3ResourceClaimStatus :: Maybe [V1alpha3ResourceClaimConsumerReference]
v1alpha3ResourceClaimStatusReservedFor = Maybe [V1alpha3ResourceClaimConsumerReference]
forall a. Maybe a
Nothing
  }

-- ** V1alpha3ResourceClaimTemplate
-- | V1alpha3ResourceClaimTemplate
-- ResourceClaimTemplate is used to produce ResourceClaim objects.  This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.
data V1alpha3ResourceClaimTemplate = V1alpha3ResourceClaimTemplate
  { V1alpha3ResourceClaimTemplate -> Maybe Text
v1alpha3ResourceClaimTemplateApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1alpha3ResourceClaimTemplate -> Maybe Text
v1alpha3ResourceClaimTemplateKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1alpha3ResourceClaimTemplate -> Maybe V1ObjectMeta
v1alpha3ResourceClaimTemplateMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1alpha3ResourceClaimTemplate -> V1alpha3ResourceClaimTemplateSpec
v1alpha3ResourceClaimTemplateSpec :: !(V1alpha3ResourceClaimTemplateSpec) -- ^ /Required/ "spec"
  } deriving (Int -> V1alpha3ResourceClaimTemplate -> ShowS
[V1alpha3ResourceClaimTemplate] -> ShowS
V1alpha3ResourceClaimTemplate -> String
(Int -> V1alpha3ResourceClaimTemplate -> ShowS)
-> (V1alpha3ResourceClaimTemplate -> String)
-> ([V1alpha3ResourceClaimTemplate] -> ShowS)
-> Show V1alpha3ResourceClaimTemplate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha3ResourceClaimTemplate -> ShowS
showsPrec :: Int -> V1alpha3ResourceClaimTemplate -> ShowS
$cshow :: V1alpha3ResourceClaimTemplate -> String
show :: V1alpha3ResourceClaimTemplate -> String
$cshowList :: [V1alpha3ResourceClaimTemplate] -> ShowS
showList :: [V1alpha3ResourceClaimTemplate] -> ShowS
P.Show, V1alpha3ResourceClaimTemplate
-> V1alpha3ResourceClaimTemplate -> Bool
(V1alpha3ResourceClaimTemplate
 -> V1alpha3ResourceClaimTemplate -> Bool)
-> (V1alpha3ResourceClaimTemplate
    -> V1alpha3ResourceClaimTemplate -> Bool)
-> Eq V1alpha3ResourceClaimTemplate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha3ResourceClaimTemplate
-> V1alpha3ResourceClaimTemplate -> Bool
== :: V1alpha3ResourceClaimTemplate
-> V1alpha3ResourceClaimTemplate -> Bool
$c/= :: V1alpha3ResourceClaimTemplate
-> V1alpha3ResourceClaimTemplate -> Bool
/= :: V1alpha3ResourceClaimTemplate
-> V1alpha3ResourceClaimTemplate -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha3ResourceClaimTemplate
instance A.FromJSON V1alpha3ResourceClaimTemplate where
  parseJSON :: Value -> Parser V1alpha3ResourceClaimTemplate
parseJSON = String
-> (Object -> Parser V1alpha3ResourceClaimTemplate)
-> Value
-> Parser V1alpha3ResourceClaimTemplate
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha3ResourceClaimTemplate" ((Object -> Parser V1alpha3ResourceClaimTemplate)
 -> Value -> Parser V1alpha3ResourceClaimTemplate)
-> (Object -> Parser V1alpha3ResourceClaimTemplate)
-> Value
-> Parser V1alpha3ResourceClaimTemplate
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> V1alpha3ResourceClaimTemplateSpec
-> V1alpha3ResourceClaimTemplate
V1alpha3ResourceClaimTemplate
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> V1alpha3ResourceClaimTemplateSpec
 -> V1alpha3ResourceClaimTemplate)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> V1alpha3ResourceClaimTemplateSpec
      -> V1alpha3ResourceClaimTemplate)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> V1alpha3ResourceClaimTemplateSpec
   -> V1alpha3ResourceClaimTemplate)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> V1alpha3ResourceClaimTemplateSpec
      -> V1alpha3ResourceClaimTemplate)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> V1alpha3ResourceClaimTemplateSpec
   -> V1alpha3ResourceClaimTemplate)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (V1alpha3ResourceClaimTemplateSpec
      -> V1alpha3ResourceClaimTemplate)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (V1alpha3ResourceClaimTemplateSpec
   -> V1alpha3ResourceClaimTemplate)
-> Parser V1alpha3ResourceClaimTemplateSpec
-> Parser V1alpha3ResourceClaimTemplate
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1alpha3ResourceClaimTemplateSpec
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"spec")

-- | ToJSON V1alpha3ResourceClaimTemplate
instance A.ToJSON V1alpha3ResourceClaimTemplate where
  toJSON :: V1alpha3ResourceClaimTemplate -> Value
toJSON V1alpha3ResourceClaimTemplate {Maybe Text
Maybe V1ObjectMeta
V1alpha3ResourceClaimTemplateSpec
$sel:v1alpha3ResourceClaimTemplateApiVersion:V1alpha3ResourceClaimTemplate :: V1alpha3ResourceClaimTemplate -> Maybe Text
$sel:v1alpha3ResourceClaimTemplateKind:V1alpha3ResourceClaimTemplate :: V1alpha3ResourceClaimTemplate -> Maybe Text
$sel:v1alpha3ResourceClaimTemplateMetadata:V1alpha3ResourceClaimTemplate :: V1alpha3ResourceClaimTemplate -> Maybe V1ObjectMeta
$sel:v1alpha3ResourceClaimTemplateSpec:V1alpha3ResourceClaimTemplate :: V1alpha3ResourceClaimTemplate -> V1alpha3ResourceClaimTemplateSpec
v1alpha3ResourceClaimTemplateApiVersion :: Maybe Text
v1alpha3ResourceClaimTemplateKind :: Maybe Text
v1alpha3ResourceClaimTemplateMetadata :: Maybe V1ObjectMeta
v1alpha3ResourceClaimTemplateSpec :: V1alpha3ResourceClaimTemplateSpec
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha3ResourceClaimTemplateApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha3ResourceClaimTemplateKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1alpha3ResourceClaimTemplateMetadata
      , Key
"spec" Key -> V1alpha3ResourceClaimTemplateSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1alpha3ResourceClaimTemplateSpec
v1alpha3ResourceClaimTemplateSpec
      ]


-- | Construct a value of type 'V1alpha3ResourceClaimTemplate' (by applying it's required fields, if any)
mkV1alpha3ResourceClaimTemplate
  :: V1alpha3ResourceClaimTemplateSpec -- ^ 'v1alpha3ResourceClaimTemplateSpec' 
  -> V1alpha3ResourceClaimTemplate
mkV1alpha3ResourceClaimTemplate :: V1alpha3ResourceClaimTemplateSpec -> V1alpha3ResourceClaimTemplate
mkV1alpha3ResourceClaimTemplate V1alpha3ResourceClaimTemplateSpec
v1alpha3ResourceClaimTemplateSpec =
  V1alpha3ResourceClaimTemplate
  { $sel:v1alpha3ResourceClaimTemplateApiVersion:V1alpha3ResourceClaimTemplate :: Maybe Text
v1alpha3ResourceClaimTemplateApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha3ResourceClaimTemplateKind:V1alpha3ResourceClaimTemplate :: Maybe Text
v1alpha3ResourceClaimTemplateKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha3ResourceClaimTemplateMetadata:V1alpha3ResourceClaimTemplate :: Maybe V1ObjectMeta
v1alpha3ResourceClaimTemplateMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , V1alpha3ResourceClaimTemplateSpec
$sel:v1alpha3ResourceClaimTemplateSpec:V1alpha3ResourceClaimTemplate :: V1alpha3ResourceClaimTemplateSpec
v1alpha3ResourceClaimTemplateSpec :: V1alpha3ResourceClaimTemplateSpec
v1alpha3ResourceClaimTemplateSpec
  }

-- ** V1alpha3ResourceClaimTemplateList
-- | V1alpha3ResourceClaimTemplateList
-- ResourceClaimTemplateList is a collection of claim templates.
data V1alpha3ResourceClaimTemplateList = V1alpha3ResourceClaimTemplateList
  { V1alpha3ResourceClaimTemplateList -> Maybe Text
v1alpha3ResourceClaimTemplateListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1alpha3ResourceClaimTemplateList
-> [V1alpha3ResourceClaimTemplate]
v1alpha3ResourceClaimTemplateListItems :: !([V1alpha3ResourceClaimTemplate]) -- ^ /Required/ "items" - Items is the list of resource claim templates.
  , V1alpha3ResourceClaimTemplateList -> Maybe Text
v1alpha3ResourceClaimTemplateListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1alpha3ResourceClaimTemplateList -> Maybe V1ListMeta
v1alpha3ResourceClaimTemplateListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1alpha3ResourceClaimTemplateList -> ShowS
[V1alpha3ResourceClaimTemplateList] -> ShowS
V1alpha3ResourceClaimTemplateList -> String
(Int -> V1alpha3ResourceClaimTemplateList -> ShowS)
-> (V1alpha3ResourceClaimTemplateList -> String)
-> ([V1alpha3ResourceClaimTemplateList] -> ShowS)
-> Show V1alpha3ResourceClaimTemplateList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha3ResourceClaimTemplateList -> ShowS
showsPrec :: Int -> V1alpha3ResourceClaimTemplateList -> ShowS
$cshow :: V1alpha3ResourceClaimTemplateList -> String
show :: V1alpha3ResourceClaimTemplateList -> String
$cshowList :: [V1alpha3ResourceClaimTemplateList] -> ShowS
showList :: [V1alpha3ResourceClaimTemplateList] -> ShowS
P.Show, V1alpha3ResourceClaimTemplateList
-> V1alpha3ResourceClaimTemplateList -> Bool
(V1alpha3ResourceClaimTemplateList
 -> V1alpha3ResourceClaimTemplateList -> Bool)
-> (V1alpha3ResourceClaimTemplateList
    -> V1alpha3ResourceClaimTemplateList -> Bool)
-> Eq V1alpha3ResourceClaimTemplateList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha3ResourceClaimTemplateList
-> V1alpha3ResourceClaimTemplateList -> Bool
== :: V1alpha3ResourceClaimTemplateList
-> V1alpha3ResourceClaimTemplateList -> Bool
$c/= :: V1alpha3ResourceClaimTemplateList
-> V1alpha3ResourceClaimTemplateList -> Bool
/= :: V1alpha3ResourceClaimTemplateList
-> V1alpha3ResourceClaimTemplateList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha3ResourceClaimTemplateList
instance A.FromJSON V1alpha3ResourceClaimTemplateList where
  parseJSON :: Value -> Parser V1alpha3ResourceClaimTemplateList
parseJSON = String
-> (Object -> Parser V1alpha3ResourceClaimTemplateList)
-> Value
-> Parser V1alpha3ResourceClaimTemplateList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha3ResourceClaimTemplateList" ((Object -> Parser V1alpha3ResourceClaimTemplateList)
 -> Value -> Parser V1alpha3ResourceClaimTemplateList)
-> (Object -> Parser V1alpha3ResourceClaimTemplateList)
-> Value
-> Parser V1alpha3ResourceClaimTemplateList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1alpha3ResourceClaimTemplate]
-> Maybe Text
-> Maybe V1ListMeta
-> V1alpha3ResourceClaimTemplateList
V1alpha3ResourceClaimTemplateList
      (Maybe Text
 -> [V1alpha3ResourceClaimTemplate]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1alpha3ResourceClaimTemplateList)
-> Parser (Maybe Text)
-> Parser
     ([V1alpha3ResourceClaimTemplate]
      -> Maybe Text
      -> Maybe V1ListMeta
      -> V1alpha3ResourceClaimTemplateList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1alpha3ResourceClaimTemplate]
   -> Maybe Text
   -> Maybe V1ListMeta
   -> V1alpha3ResourceClaimTemplateList)
-> Parser [V1alpha3ResourceClaimTemplate]
-> Parser
     (Maybe Text
      -> Maybe V1ListMeta -> V1alpha3ResourceClaimTemplateList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1alpha3ResourceClaimTemplate]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser
  (Maybe Text
   -> Maybe V1ListMeta -> V1alpha3ResourceClaimTemplateList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1alpha3ResourceClaimTemplateList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1alpha3ResourceClaimTemplateList)
-> Parser (Maybe V1ListMeta)
-> Parser V1alpha3ResourceClaimTemplateList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1alpha3ResourceClaimTemplateList
instance A.ToJSON V1alpha3ResourceClaimTemplateList where
  toJSON :: V1alpha3ResourceClaimTemplateList -> Value
toJSON V1alpha3ResourceClaimTemplateList {[V1alpha3ResourceClaimTemplate]
Maybe Text
Maybe V1ListMeta
$sel:v1alpha3ResourceClaimTemplateListApiVersion:V1alpha3ResourceClaimTemplateList :: V1alpha3ResourceClaimTemplateList -> Maybe Text
$sel:v1alpha3ResourceClaimTemplateListItems:V1alpha3ResourceClaimTemplateList :: V1alpha3ResourceClaimTemplateList
-> [V1alpha3ResourceClaimTemplate]
$sel:v1alpha3ResourceClaimTemplateListKind:V1alpha3ResourceClaimTemplateList :: V1alpha3ResourceClaimTemplateList -> Maybe Text
$sel:v1alpha3ResourceClaimTemplateListMetadata:V1alpha3ResourceClaimTemplateList :: V1alpha3ResourceClaimTemplateList -> Maybe V1ListMeta
v1alpha3ResourceClaimTemplateListApiVersion :: Maybe Text
v1alpha3ResourceClaimTemplateListItems :: [V1alpha3ResourceClaimTemplate]
v1alpha3ResourceClaimTemplateListKind :: Maybe Text
v1alpha3ResourceClaimTemplateListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha3ResourceClaimTemplateListApiVersion
      , Key
"items" Key -> [V1alpha3ResourceClaimTemplate] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1alpha3ResourceClaimTemplate]
v1alpha3ResourceClaimTemplateListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha3ResourceClaimTemplateListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1alpha3ResourceClaimTemplateListMetadata
      ]


-- | Construct a value of type 'V1alpha3ResourceClaimTemplateList' (by applying it's required fields, if any)
mkV1alpha3ResourceClaimTemplateList
  :: [V1alpha3ResourceClaimTemplate] -- ^ 'v1alpha3ResourceClaimTemplateListItems': Items is the list of resource claim templates.
  -> V1alpha3ResourceClaimTemplateList
mkV1alpha3ResourceClaimTemplateList :: [V1alpha3ResourceClaimTemplate]
-> V1alpha3ResourceClaimTemplateList
mkV1alpha3ResourceClaimTemplateList [V1alpha3ResourceClaimTemplate]
v1alpha3ResourceClaimTemplateListItems =
  V1alpha3ResourceClaimTemplateList
  { $sel:v1alpha3ResourceClaimTemplateListApiVersion:V1alpha3ResourceClaimTemplateList :: Maybe Text
v1alpha3ResourceClaimTemplateListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1alpha3ResourceClaimTemplate]
$sel:v1alpha3ResourceClaimTemplateListItems:V1alpha3ResourceClaimTemplateList :: [V1alpha3ResourceClaimTemplate]
v1alpha3ResourceClaimTemplateListItems :: [V1alpha3ResourceClaimTemplate]
v1alpha3ResourceClaimTemplateListItems
  , $sel:v1alpha3ResourceClaimTemplateListKind:V1alpha3ResourceClaimTemplateList :: Maybe Text
v1alpha3ResourceClaimTemplateListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha3ResourceClaimTemplateListMetadata:V1alpha3ResourceClaimTemplateList :: Maybe V1ListMeta
v1alpha3ResourceClaimTemplateListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1alpha3ResourceClaimTemplateSpec
-- | V1alpha3ResourceClaimTemplateSpec
-- ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim.
data V1alpha3ResourceClaimTemplateSpec = V1alpha3ResourceClaimTemplateSpec
  { V1alpha3ResourceClaimTemplateSpec -> Maybe V1ObjectMeta
v1alpha3ResourceClaimTemplateSpecMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1alpha3ResourceClaimTemplateSpec -> V1alpha3ResourceClaimSpec
v1alpha3ResourceClaimTemplateSpecSpec :: !(V1alpha3ResourceClaimSpec) -- ^ /Required/ "spec"
  } deriving (Int -> V1alpha3ResourceClaimTemplateSpec -> ShowS
[V1alpha3ResourceClaimTemplateSpec] -> ShowS
V1alpha3ResourceClaimTemplateSpec -> String
(Int -> V1alpha3ResourceClaimTemplateSpec -> ShowS)
-> (V1alpha3ResourceClaimTemplateSpec -> String)
-> ([V1alpha3ResourceClaimTemplateSpec] -> ShowS)
-> Show V1alpha3ResourceClaimTemplateSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha3ResourceClaimTemplateSpec -> ShowS
showsPrec :: Int -> V1alpha3ResourceClaimTemplateSpec -> ShowS
$cshow :: V1alpha3ResourceClaimTemplateSpec -> String
show :: V1alpha3ResourceClaimTemplateSpec -> String
$cshowList :: [V1alpha3ResourceClaimTemplateSpec] -> ShowS
showList :: [V1alpha3ResourceClaimTemplateSpec] -> ShowS
P.Show, V1alpha3ResourceClaimTemplateSpec
-> V1alpha3ResourceClaimTemplateSpec -> Bool
(V1alpha3ResourceClaimTemplateSpec
 -> V1alpha3ResourceClaimTemplateSpec -> Bool)
-> (V1alpha3ResourceClaimTemplateSpec
    -> V1alpha3ResourceClaimTemplateSpec -> Bool)
-> Eq V1alpha3ResourceClaimTemplateSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha3ResourceClaimTemplateSpec
-> V1alpha3ResourceClaimTemplateSpec -> Bool
== :: V1alpha3ResourceClaimTemplateSpec
-> V1alpha3ResourceClaimTemplateSpec -> Bool
$c/= :: V1alpha3ResourceClaimTemplateSpec
-> V1alpha3ResourceClaimTemplateSpec -> Bool
/= :: V1alpha3ResourceClaimTemplateSpec
-> V1alpha3ResourceClaimTemplateSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha3ResourceClaimTemplateSpec
instance A.FromJSON V1alpha3ResourceClaimTemplateSpec where
  parseJSON :: Value -> Parser V1alpha3ResourceClaimTemplateSpec
parseJSON = String
-> (Object -> Parser V1alpha3ResourceClaimTemplateSpec)
-> Value
-> Parser V1alpha3ResourceClaimTemplateSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha3ResourceClaimTemplateSpec" ((Object -> Parser V1alpha3ResourceClaimTemplateSpec)
 -> Value -> Parser V1alpha3ResourceClaimTemplateSpec)
-> (Object -> Parser V1alpha3ResourceClaimTemplateSpec)
-> Value
-> Parser V1alpha3ResourceClaimTemplateSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1ObjectMeta
-> V1alpha3ResourceClaimSpec -> V1alpha3ResourceClaimTemplateSpec
V1alpha3ResourceClaimTemplateSpec
      (Maybe V1ObjectMeta
 -> V1alpha3ResourceClaimSpec -> V1alpha3ResourceClaimTemplateSpec)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (V1alpha3ResourceClaimSpec -> V1alpha3ResourceClaimTemplateSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (V1alpha3ResourceClaimSpec -> V1alpha3ResourceClaimTemplateSpec)
-> Parser V1alpha3ResourceClaimSpec
-> Parser V1alpha3ResourceClaimTemplateSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1alpha3ResourceClaimSpec
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"spec")

-- | ToJSON V1alpha3ResourceClaimTemplateSpec
instance A.ToJSON V1alpha3ResourceClaimTemplateSpec where
  toJSON :: V1alpha3ResourceClaimTemplateSpec -> Value
toJSON V1alpha3ResourceClaimTemplateSpec {Maybe V1ObjectMeta
V1alpha3ResourceClaimSpec
$sel:v1alpha3ResourceClaimTemplateSpecMetadata:V1alpha3ResourceClaimTemplateSpec :: V1alpha3ResourceClaimTemplateSpec -> Maybe V1ObjectMeta
$sel:v1alpha3ResourceClaimTemplateSpecSpec:V1alpha3ResourceClaimTemplateSpec :: V1alpha3ResourceClaimTemplateSpec -> V1alpha3ResourceClaimSpec
v1alpha3ResourceClaimTemplateSpecMetadata :: Maybe V1ObjectMeta
v1alpha3ResourceClaimTemplateSpecSpec :: V1alpha3ResourceClaimSpec
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1alpha3ResourceClaimTemplateSpecMetadata
      , Key
"spec" Key -> V1alpha3ResourceClaimSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1alpha3ResourceClaimSpec
v1alpha3ResourceClaimTemplateSpecSpec
      ]


-- | Construct a value of type 'V1alpha3ResourceClaimTemplateSpec' (by applying it's required fields, if any)
mkV1alpha3ResourceClaimTemplateSpec
  :: V1alpha3ResourceClaimSpec -- ^ 'v1alpha3ResourceClaimTemplateSpecSpec' 
  -> V1alpha3ResourceClaimTemplateSpec
mkV1alpha3ResourceClaimTemplateSpec :: V1alpha3ResourceClaimSpec -> V1alpha3ResourceClaimTemplateSpec
mkV1alpha3ResourceClaimTemplateSpec V1alpha3ResourceClaimSpec
v1alpha3ResourceClaimTemplateSpecSpec =
  V1alpha3ResourceClaimTemplateSpec
  { $sel:v1alpha3ResourceClaimTemplateSpecMetadata:V1alpha3ResourceClaimTemplateSpec :: Maybe V1ObjectMeta
v1alpha3ResourceClaimTemplateSpecMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , V1alpha3ResourceClaimSpec
$sel:v1alpha3ResourceClaimTemplateSpecSpec:V1alpha3ResourceClaimTemplateSpec :: V1alpha3ResourceClaimSpec
v1alpha3ResourceClaimTemplateSpecSpec :: V1alpha3ResourceClaimSpec
v1alpha3ResourceClaimTemplateSpecSpec
  }

-- ** V1alpha3ResourcePool
-- | V1alpha3ResourcePool
-- ResourcePool describes the pool that ResourceSlices belong to.
data V1alpha3ResourcePool = V1alpha3ResourcePool
  { V1alpha3ResourcePool -> Integer
v1alpha3ResourcePoolGeneration :: !(Integer) -- ^ /Required/ "generation" - Generation tracks the change in a pool over time. Whenever a driver changes something about one or more of the resources in a pool, it must change the generation in all ResourceSlices which are part of that pool. Consumers of ResourceSlices should only consider resources from the pool with the highest generation number. The generation may be reset by drivers, which should be fine for consumers, assuming that all ResourceSlices in a pool are updated to match or deleted.  Combined with ResourceSliceCount, this mechanism enables consumers to detect pools which are comprised of multiple ResourceSlices and are in an incomplete state.
  , V1alpha3ResourcePool -> Text
v1alpha3ResourcePoolName :: !(Text) -- ^ /Required/ "name" - Name is used to identify the pool. For node-local devices, this is often the node name, but this is not required.  It must not be longer than 253 characters and must consist of one or more DNS sub-domains separated by slashes. This field is immutable.
  , V1alpha3ResourcePool -> Integer
v1alpha3ResourcePoolResourceSliceCount :: !(Integer) -- ^ /Required/ "resourceSliceCount" - ResourceSliceCount is the total number of ResourceSlices in the pool at this generation number. Must be greater than zero.  Consumers can use this to check whether they have seen all ResourceSlices belonging to the same pool.
  } deriving (Int -> V1alpha3ResourcePool -> ShowS
[V1alpha3ResourcePool] -> ShowS
V1alpha3ResourcePool -> String
(Int -> V1alpha3ResourcePool -> ShowS)
-> (V1alpha3ResourcePool -> String)
-> ([V1alpha3ResourcePool] -> ShowS)
-> Show V1alpha3ResourcePool
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha3ResourcePool -> ShowS
showsPrec :: Int -> V1alpha3ResourcePool -> ShowS
$cshow :: V1alpha3ResourcePool -> String
show :: V1alpha3ResourcePool -> String
$cshowList :: [V1alpha3ResourcePool] -> ShowS
showList :: [V1alpha3ResourcePool] -> ShowS
P.Show, V1alpha3ResourcePool -> V1alpha3ResourcePool -> Bool
(V1alpha3ResourcePool -> V1alpha3ResourcePool -> Bool)
-> (V1alpha3ResourcePool -> V1alpha3ResourcePool -> Bool)
-> Eq V1alpha3ResourcePool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha3ResourcePool -> V1alpha3ResourcePool -> Bool
== :: V1alpha3ResourcePool -> V1alpha3ResourcePool -> Bool
$c/= :: V1alpha3ResourcePool -> V1alpha3ResourcePool -> Bool
/= :: V1alpha3ResourcePool -> V1alpha3ResourcePool -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha3ResourcePool
instance A.FromJSON V1alpha3ResourcePool where
  parseJSON :: Value -> Parser V1alpha3ResourcePool
parseJSON = String
-> (Object -> Parser V1alpha3ResourcePool)
-> Value
-> Parser V1alpha3ResourcePool
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha3ResourcePool" ((Object -> Parser V1alpha3ResourcePool)
 -> Value -> Parser V1alpha3ResourcePool)
-> (Object -> Parser V1alpha3ResourcePool)
-> Value
-> Parser V1alpha3ResourcePool
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Integer -> Text -> Integer -> V1alpha3ResourcePool
V1alpha3ResourcePool
      (Integer -> Text -> Integer -> V1alpha3ResourcePool)
-> Parser Integer
-> Parser (Text -> Integer -> V1alpha3ResourcePool)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Integer
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"generation")
      Parser (Text -> Integer -> V1alpha3ResourcePool)
-> Parser Text -> Parser (Integer -> V1alpha3ResourcePool)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser (Integer -> V1alpha3ResourcePool)
-> Parser Integer -> Parser V1alpha3ResourcePool
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Integer
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"resourceSliceCount")

-- | ToJSON V1alpha3ResourcePool
instance A.ToJSON V1alpha3ResourcePool where
  toJSON :: V1alpha3ResourcePool -> Value
toJSON V1alpha3ResourcePool {Integer
Text
$sel:v1alpha3ResourcePoolGeneration:V1alpha3ResourcePool :: V1alpha3ResourcePool -> Integer
$sel:v1alpha3ResourcePoolName:V1alpha3ResourcePool :: V1alpha3ResourcePool -> Text
$sel:v1alpha3ResourcePoolResourceSliceCount:V1alpha3ResourcePool :: V1alpha3ResourcePool -> Integer
v1alpha3ResourcePoolGeneration :: Integer
v1alpha3ResourcePoolName :: Text
v1alpha3ResourcePoolResourceSliceCount :: Integer
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"generation" Key -> Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Integer
v1alpha3ResourcePoolGeneration
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha3ResourcePoolName
      , Key
"resourceSliceCount" Key -> Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Integer
v1alpha3ResourcePoolResourceSliceCount
      ]


-- | Construct a value of type 'V1alpha3ResourcePool' (by applying it's required fields, if any)
mkV1alpha3ResourcePool
  :: Integer -- ^ 'v1alpha3ResourcePoolGeneration': Generation tracks the change in a pool over time. Whenever a driver changes something about one or more of the resources in a pool, it must change the generation in all ResourceSlices which are part of that pool. Consumers of ResourceSlices should only consider resources from the pool with the highest generation number. The generation may be reset by drivers, which should be fine for consumers, assuming that all ResourceSlices in a pool are updated to match or deleted.  Combined with ResourceSliceCount, this mechanism enables consumers to detect pools which are comprised of multiple ResourceSlices and are in an incomplete state.
  -> Text -- ^ 'v1alpha3ResourcePoolName': Name is used to identify the pool. For node-local devices, this is often the node name, but this is not required.  It must not be longer than 253 characters and must consist of one or more DNS sub-domains separated by slashes. This field is immutable.
  -> Integer -- ^ 'v1alpha3ResourcePoolResourceSliceCount': ResourceSliceCount is the total number of ResourceSlices in the pool at this generation number. Must be greater than zero.  Consumers can use this to check whether they have seen all ResourceSlices belonging to the same pool.
  -> V1alpha3ResourcePool
mkV1alpha3ResourcePool :: Integer -> Text -> Integer -> V1alpha3ResourcePool
mkV1alpha3ResourcePool Integer
v1alpha3ResourcePoolGeneration Text
v1alpha3ResourcePoolName Integer
v1alpha3ResourcePoolResourceSliceCount =
  V1alpha3ResourcePool
  { Integer
$sel:v1alpha3ResourcePoolGeneration:V1alpha3ResourcePool :: Integer
v1alpha3ResourcePoolGeneration :: Integer
v1alpha3ResourcePoolGeneration
  , Text
$sel:v1alpha3ResourcePoolName:V1alpha3ResourcePool :: Text
v1alpha3ResourcePoolName :: Text
v1alpha3ResourcePoolName
  , Integer
$sel:v1alpha3ResourcePoolResourceSliceCount:V1alpha3ResourcePool :: Integer
v1alpha3ResourcePoolResourceSliceCount :: Integer
v1alpha3ResourcePoolResourceSliceCount
  }

-- ** V1alpha3ResourceSlice
-- | V1alpha3ResourceSlice
-- ResourceSlice represents one or more resources in a pool of similar resources, managed by a common driver. A pool may span more than one ResourceSlice, and exactly how many ResourceSlices comprise a pool is determined by the driver.  At the moment, the only supported resources are devices with attributes and capacities. Each device in a given pool, regardless of how many ResourceSlices, must have a unique name. The ResourceSlice in which a device gets published may change over time. The unique identifier for a device is the tuple <driver name>, <pool name>, <device name>.  Whenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number and updates all ResourceSlices with that new number and new resource definitions. A consumer must only use ResourceSlices with the highest generation number and ignore all others.  When allocating all resources in a pool matching certain criteria or when looking for the best solution among several different alternatives, a consumer should check the number of ResourceSlices in a pool (included in each ResourceSlice) to determine whether its view of a pool is complete and if not, should wait until the driver has completed updating the pool.  For resources that are not local to a node, the node name is not set. Instead, the driver may use a node selector to specify where the devices are available.  This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.
data V1alpha3ResourceSlice = V1alpha3ResourceSlice
  { V1alpha3ResourceSlice -> Maybe Text
v1alpha3ResourceSliceApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1alpha3ResourceSlice -> Maybe Text
v1alpha3ResourceSliceKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1alpha3ResourceSlice -> Maybe V1ObjectMeta
v1alpha3ResourceSliceMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1alpha3ResourceSlice -> V1alpha3ResourceSliceSpec
v1alpha3ResourceSliceSpec :: !(V1alpha3ResourceSliceSpec) -- ^ /Required/ "spec"
  } deriving (Int -> V1alpha3ResourceSlice -> ShowS
[V1alpha3ResourceSlice] -> ShowS
V1alpha3ResourceSlice -> String
(Int -> V1alpha3ResourceSlice -> ShowS)
-> (V1alpha3ResourceSlice -> String)
-> ([V1alpha3ResourceSlice] -> ShowS)
-> Show V1alpha3ResourceSlice
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha3ResourceSlice -> ShowS
showsPrec :: Int -> V1alpha3ResourceSlice -> ShowS
$cshow :: V1alpha3ResourceSlice -> String
show :: V1alpha3ResourceSlice -> String
$cshowList :: [V1alpha3ResourceSlice] -> ShowS
showList :: [V1alpha3ResourceSlice] -> ShowS
P.Show, V1alpha3ResourceSlice -> V1alpha3ResourceSlice -> Bool
(V1alpha3ResourceSlice -> V1alpha3ResourceSlice -> Bool)
-> (V1alpha3ResourceSlice -> V1alpha3ResourceSlice -> Bool)
-> Eq V1alpha3ResourceSlice
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha3ResourceSlice -> V1alpha3ResourceSlice -> Bool
== :: V1alpha3ResourceSlice -> V1alpha3ResourceSlice -> Bool
$c/= :: V1alpha3ResourceSlice -> V1alpha3ResourceSlice -> Bool
/= :: V1alpha3ResourceSlice -> V1alpha3ResourceSlice -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha3ResourceSlice
instance A.FromJSON V1alpha3ResourceSlice where
  parseJSON :: Value -> Parser V1alpha3ResourceSlice
parseJSON = String
-> (Object -> Parser V1alpha3ResourceSlice)
-> Value
-> Parser V1alpha3ResourceSlice
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha3ResourceSlice" ((Object -> Parser V1alpha3ResourceSlice)
 -> Value -> Parser V1alpha3ResourceSlice)
-> (Object -> Parser V1alpha3ResourceSlice)
-> Value
-> Parser V1alpha3ResourceSlice
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> V1alpha3ResourceSliceSpec
-> V1alpha3ResourceSlice
V1alpha3ResourceSlice
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> V1alpha3ResourceSliceSpec
 -> V1alpha3ResourceSlice)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> V1alpha3ResourceSliceSpec
      -> V1alpha3ResourceSlice)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> V1alpha3ResourceSliceSpec
   -> V1alpha3ResourceSlice)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> V1alpha3ResourceSliceSpec -> V1alpha3ResourceSlice)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> V1alpha3ResourceSliceSpec -> V1alpha3ResourceSlice)
-> Parser (Maybe V1ObjectMeta)
-> Parser (V1alpha3ResourceSliceSpec -> V1alpha3ResourceSlice)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (V1alpha3ResourceSliceSpec -> V1alpha3ResourceSlice)
-> Parser V1alpha3ResourceSliceSpec -> Parser V1alpha3ResourceSlice
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1alpha3ResourceSliceSpec
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"spec")

-- | ToJSON V1alpha3ResourceSlice
instance A.ToJSON V1alpha3ResourceSlice where
  toJSON :: V1alpha3ResourceSlice -> Value
toJSON V1alpha3ResourceSlice {Maybe Text
Maybe V1ObjectMeta
V1alpha3ResourceSliceSpec
$sel:v1alpha3ResourceSliceApiVersion:V1alpha3ResourceSlice :: V1alpha3ResourceSlice -> Maybe Text
$sel:v1alpha3ResourceSliceKind:V1alpha3ResourceSlice :: V1alpha3ResourceSlice -> Maybe Text
$sel:v1alpha3ResourceSliceMetadata:V1alpha3ResourceSlice :: V1alpha3ResourceSlice -> Maybe V1ObjectMeta
$sel:v1alpha3ResourceSliceSpec:V1alpha3ResourceSlice :: V1alpha3ResourceSlice -> V1alpha3ResourceSliceSpec
v1alpha3ResourceSliceApiVersion :: Maybe Text
v1alpha3ResourceSliceKind :: Maybe Text
v1alpha3ResourceSliceMetadata :: Maybe V1ObjectMeta
v1alpha3ResourceSliceSpec :: V1alpha3ResourceSliceSpec
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha3ResourceSliceApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha3ResourceSliceKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1alpha3ResourceSliceMetadata
      , Key
"spec" Key -> V1alpha3ResourceSliceSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1alpha3ResourceSliceSpec
v1alpha3ResourceSliceSpec
      ]


-- | Construct a value of type 'V1alpha3ResourceSlice' (by applying it's required fields, if any)
mkV1alpha3ResourceSlice
  :: V1alpha3ResourceSliceSpec -- ^ 'v1alpha3ResourceSliceSpec' 
  -> V1alpha3ResourceSlice
mkV1alpha3ResourceSlice :: V1alpha3ResourceSliceSpec -> V1alpha3ResourceSlice
mkV1alpha3ResourceSlice V1alpha3ResourceSliceSpec
v1alpha3ResourceSliceSpec =
  V1alpha3ResourceSlice
  { $sel:v1alpha3ResourceSliceApiVersion:V1alpha3ResourceSlice :: Maybe Text
v1alpha3ResourceSliceApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha3ResourceSliceKind:V1alpha3ResourceSlice :: Maybe Text
v1alpha3ResourceSliceKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha3ResourceSliceMetadata:V1alpha3ResourceSlice :: Maybe V1ObjectMeta
v1alpha3ResourceSliceMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , V1alpha3ResourceSliceSpec
$sel:v1alpha3ResourceSliceSpec:V1alpha3ResourceSlice :: V1alpha3ResourceSliceSpec
v1alpha3ResourceSliceSpec :: V1alpha3ResourceSliceSpec
v1alpha3ResourceSliceSpec
  }

-- ** V1alpha3ResourceSliceList
-- | V1alpha3ResourceSliceList
-- ResourceSliceList is a collection of ResourceSlices.
data V1alpha3ResourceSliceList = V1alpha3ResourceSliceList
  { V1alpha3ResourceSliceList -> Maybe Text
v1alpha3ResourceSliceListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1alpha3ResourceSliceList -> [V1alpha3ResourceSlice]
v1alpha3ResourceSliceListItems :: !([V1alpha3ResourceSlice]) -- ^ /Required/ "items" - Items is the list of resource ResourceSlices.
  , V1alpha3ResourceSliceList -> Maybe Text
v1alpha3ResourceSliceListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1alpha3ResourceSliceList -> Maybe V1ListMeta
v1alpha3ResourceSliceListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1alpha3ResourceSliceList -> ShowS
[V1alpha3ResourceSliceList] -> ShowS
V1alpha3ResourceSliceList -> String
(Int -> V1alpha3ResourceSliceList -> ShowS)
-> (V1alpha3ResourceSliceList -> String)
-> ([V1alpha3ResourceSliceList] -> ShowS)
-> Show V1alpha3ResourceSliceList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha3ResourceSliceList -> ShowS
showsPrec :: Int -> V1alpha3ResourceSliceList -> ShowS
$cshow :: V1alpha3ResourceSliceList -> String
show :: V1alpha3ResourceSliceList -> String
$cshowList :: [V1alpha3ResourceSliceList] -> ShowS
showList :: [V1alpha3ResourceSliceList] -> ShowS
P.Show, V1alpha3ResourceSliceList -> V1alpha3ResourceSliceList -> Bool
(V1alpha3ResourceSliceList -> V1alpha3ResourceSliceList -> Bool)
-> (V1alpha3ResourceSliceList -> V1alpha3ResourceSliceList -> Bool)
-> Eq V1alpha3ResourceSliceList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha3ResourceSliceList -> V1alpha3ResourceSliceList -> Bool
== :: V1alpha3ResourceSliceList -> V1alpha3ResourceSliceList -> Bool
$c/= :: V1alpha3ResourceSliceList -> V1alpha3ResourceSliceList -> Bool
/= :: V1alpha3ResourceSliceList -> V1alpha3ResourceSliceList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha3ResourceSliceList
instance A.FromJSON V1alpha3ResourceSliceList where
  parseJSON :: Value -> Parser V1alpha3ResourceSliceList
parseJSON = String
-> (Object -> Parser V1alpha3ResourceSliceList)
-> Value
-> Parser V1alpha3ResourceSliceList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha3ResourceSliceList" ((Object -> Parser V1alpha3ResourceSliceList)
 -> Value -> Parser V1alpha3ResourceSliceList)
-> (Object -> Parser V1alpha3ResourceSliceList)
-> Value
-> Parser V1alpha3ResourceSliceList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1alpha3ResourceSlice]
-> Maybe Text
-> Maybe V1ListMeta
-> V1alpha3ResourceSliceList
V1alpha3ResourceSliceList
      (Maybe Text
 -> [V1alpha3ResourceSlice]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1alpha3ResourceSliceList)
-> Parser (Maybe Text)
-> Parser
     ([V1alpha3ResourceSlice]
      -> Maybe Text -> Maybe V1ListMeta -> V1alpha3ResourceSliceList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1alpha3ResourceSlice]
   -> Maybe Text -> Maybe V1ListMeta -> V1alpha3ResourceSliceList)
-> Parser [V1alpha3ResourceSlice]
-> Parser
     (Maybe Text -> Maybe V1ListMeta -> V1alpha3ResourceSliceList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1alpha3ResourceSlice]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser
  (Maybe Text -> Maybe V1ListMeta -> V1alpha3ResourceSliceList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1alpha3ResourceSliceList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1alpha3ResourceSliceList)
-> Parser (Maybe V1ListMeta) -> Parser V1alpha3ResourceSliceList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1alpha3ResourceSliceList
instance A.ToJSON V1alpha3ResourceSliceList where
  toJSON :: V1alpha3ResourceSliceList -> Value
toJSON V1alpha3ResourceSliceList {[V1alpha3ResourceSlice]
Maybe Text
Maybe V1ListMeta
$sel:v1alpha3ResourceSliceListApiVersion:V1alpha3ResourceSliceList :: V1alpha3ResourceSliceList -> Maybe Text
$sel:v1alpha3ResourceSliceListItems:V1alpha3ResourceSliceList :: V1alpha3ResourceSliceList -> [V1alpha3ResourceSlice]
$sel:v1alpha3ResourceSliceListKind:V1alpha3ResourceSliceList :: V1alpha3ResourceSliceList -> Maybe Text
$sel:v1alpha3ResourceSliceListMetadata:V1alpha3ResourceSliceList :: V1alpha3ResourceSliceList -> Maybe V1ListMeta
v1alpha3ResourceSliceListApiVersion :: Maybe Text
v1alpha3ResourceSliceListItems :: [V1alpha3ResourceSlice]
v1alpha3ResourceSliceListKind :: Maybe Text
v1alpha3ResourceSliceListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha3ResourceSliceListApiVersion
      , Key
"items" Key -> [V1alpha3ResourceSlice] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1alpha3ResourceSlice]
v1alpha3ResourceSliceListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha3ResourceSliceListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1alpha3ResourceSliceListMetadata
      ]


-- | Construct a value of type 'V1alpha3ResourceSliceList' (by applying it's required fields, if any)
mkV1alpha3ResourceSliceList
  :: [V1alpha3ResourceSlice] -- ^ 'v1alpha3ResourceSliceListItems': Items is the list of resource ResourceSlices.
  -> V1alpha3ResourceSliceList
mkV1alpha3ResourceSliceList :: [V1alpha3ResourceSlice] -> V1alpha3ResourceSliceList
mkV1alpha3ResourceSliceList [V1alpha3ResourceSlice]
v1alpha3ResourceSliceListItems =
  V1alpha3ResourceSliceList
  { $sel:v1alpha3ResourceSliceListApiVersion:V1alpha3ResourceSliceList :: Maybe Text
v1alpha3ResourceSliceListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1alpha3ResourceSlice]
$sel:v1alpha3ResourceSliceListItems:V1alpha3ResourceSliceList :: [V1alpha3ResourceSlice]
v1alpha3ResourceSliceListItems :: [V1alpha3ResourceSlice]
v1alpha3ResourceSliceListItems
  , $sel:v1alpha3ResourceSliceListKind:V1alpha3ResourceSliceList :: Maybe Text
v1alpha3ResourceSliceListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha3ResourceSliceListMetadata:V1alpha3ResourceSliceList :: Maybe V1ListMeta
v1alpha3ResourceSliceListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1alpha3ResourceSliceSpec
-- | V1alpha3ResourceSliceSpec
-- ResourceSliceSpec contains the information published by the driver in one ResourceSlice.
data V1alpha3ResourceSliceSpec = V1alpha3ResourceSliceSpec
  { V1alpha3ResourceSliceSpec -> Maybe Bool
v1alpha3ResourceSliceSpecAllNodes :: !(Maybe Bool) -- ^ "allNodes" - AllNodes indicates that all nodes have access to the resources in the pool.  Exactly one of NodeName, NodeSelector and AllNodes must be set.
  , V1alpha3ResourceSliceSpec -> Maybe [V1alpha3Device]
v1alpha3ResourceSliceSpecDevices :: !(Maybe [V1alpha3Device]) -- ^ "devices" - Devices lists some or all of the devices in this pool.  Must not have more than 128 entries.
  , V1alpha3ResourceSliceSpec -> Text
v1alpha3ResourceSliceSpecDriver :: !(Text) -- ^ /Required/ "driver" - Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.  Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.
  , V1alpha3ResourceSliceSpec -> Maybe Text
v1alpha3ResourceSliceSpecNodeName :: !(Maybe Text) -- ^ "nodeName" - NodeName identifies the node which provides the resources in this pool. A field selector can be used to list only ResourceSlice objects belonging to a certain node.  This field can be used to limit access from nodes to ResourceSlices with the same node name. It also indicates to autoscalers that adding new nodes of the same type as some old node might also make new resources available.  Exactly one of NodeName, NodeSelector and AllNodes must be set. This field is immutable.
  , V1alpha3ResourceSliceSpec -> Maybe V1NodeSelector
v1alpha3ResourceSliceSpecNodeSelector :: !(Maybe V1NodeSelector) -- ^ "nodeSelector"
  , V1alpha3ResourceSliceSpec -> V1alpha3ResourcePool
v1alpha3ResourceSliceSpecPool :: !(V1alpha3ResourcePool) -- ^ /Required/ "pool"
  } deriving (Int -> V1alpha3ResourceSliceSpec -> ShowS
[V1alpha3ResourceSliceSpec] -> ShowS
V1alpha3ResourceSliceSpec -> String
(Int -> V1alpha3ResourceSliceSpec -> ShowS)
-> (V1alpha3ResourceSliceSpec -> String)
-> ([V1alpha3ResourceSliceSpec] -> ShowS)
-> Show V1alpha3ResourceSliceSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1alpha3ResourceSliceSpec -> ShowS
showsPrec :: Int -> V1alpha3ResourceSliceSpec -> ShowS
$cshow :: V1alpha3ResourceSliceSpec -> String
show :: V1alpha3ResourceSliceSpec -> String
$cshowList :: [V1alpha3ResourceSliceSpec] -> ShowS
showList :: [V1alpha3ResourceSliceSpec] -> ShowS
P.Show, V1alpha3ResourceSliceSpec -> V1alpha3ResourceSliceSpec -> Bool
(V1alpha3ResourceSliceSpec -> V1alpha3ResourceSliceSpec -> Bool)
-> (V1alpha3ResourceSliceSpec -> V1alpha3ResourceSliceSpec -> Bool)
-> Eq V1alpha3ResourceSliceSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1alpha3ResourceSliceSpec -> V1alpha3ResourceSliceSpec -> Bool
== :: V1alpha3ResourceSliceSpec -> V1alpha3ResourceSliceSpec -> Bool
$c/= :: V1alpha3ResourceSliceSpec -> V1alpha3ResourceSliceSpec -> Bool
/= :: V1alpha3ResourceSliceSpec -> V1alpha3ResourceSliceSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1alpha3ResourceSliceSpec
instance A.FromJSON V1alpha3ResourceSliceSpec where
  parseJSON :: Value -> Parser V1alpha3ResourceSliceSpec
parseJSON = String
-> (Object -> Parser V1alpha3ResourceSliceSpec)
-> Value
-> Parser V1alpha3ResourceSliceSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1alpha3ResourceSliceSpec" ((Object -> Parser V1alpha3ResourceSliceSpec)
 -> Value -> Parser V1alpha3ResourceSliceSpec)
-> (Object -> Parser V1alpha3ResourceSliceSpec)
-> Value
-> Parser V1alpha3ResourceSliceSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Bool
-> Maybe [V1alpha3Device]
-> Text
-> Maybe Text
-> Maybe V1NodeSelector
-> V1alpha3ResourcePool
-> V1alpha3ResourceSliceSpec
V1alpha3ResourceSliceSpec
      (Maybe Bool
 -> Maybe [V1alpha3Device]
 -> Text
 -> Maybe Text
 -> Maybe V1NodeSelector
 -> V1alpha3ResourcePool
 -> V1alpha3ResourceSliceSpec)
-> Parser (Maybe Bool)
-> Parser
     (Maybe [V1alpha3Device]
      -> Text
      -> Maybe Text
      -> Maybe V1NodeSelector
      -> V1alpha3ResourcePool
      -> V1alpha3ResourceSliceSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"allNodes")
      Parser
  (Maybe [V1alpha3Device]
   -> Text
   -> Maybe Text
   -> Maybe V1NodeSelector
   -> V1alpha3ResourcePool
   -> V1alpha3ResourceSliceSpec)
-> Parser (Maybe [V1alpha3Device])
-> Parser
     (Text
      -> Maybe Text
      -> Maybe V1NodeSelector
      -> V1alpha3ResourcePool
      -> V1alpha3ResourceSliceSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1alpha3Device])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"devices")
      Parser
  (Text
   -> Maybe Text
   -> Maybe V1NodeSelector
   -> V1alpha3ResourcePool
   -> V1alpha3ResourceSliceSpec)
-> Parser Text
-> Parser
     (Maybe Text
      -> Maybe V1NodeSelector
      -> V1alpha3ResourcePool
      -> V1alpha3ResourceSliceSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"driver")
      Parser
  (Maybe Text
   -> Maybe V1NodeSelector
   -> V1alpha3ResourcePool
   -> V1alpha3ResourceSliceSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1NodeSelector
      -> V1alpha3ResourcePool -> V1alpha3ResourceSliceSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nodeName")
      Parser
  (Maybe V1NodeSelector
   -> V1alpha3ResourcePool -> V1alpha3ResourceSliceSpec)
-> Parser (Maybe V1NodeSelector)
-> Parser (V1alpha3ResourcePool -> V1alpha3ResourceSliceSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1NodeSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nodeSelector")
      Parser (V1alpha3ResourcePool -> V1alpha3ResourceSliceSpec)
-> Parser V1alpha3ResourcePool -> Parser V1alpha3ResourceSliceSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1alpha3ResourcePool
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"pool")

-- | ToJSON V1alpha3ResourceSliceSpec
instance A.ToJSON V1alpha3ResourceSliceSpec where
  toJSON :: V1alpha3ResourceSliceSpec -> Value
toJSON V1alpha3ResourceSliceSpec {Maybe Bool
Maybe [V1alpha3Device]
Maybe Text
Maybe V1NodeSelector
Text
V1alpha3ResourcePool
$sel:v1alpha3ResourceSliceSpecAllNodes:V1alpha3ResourceSliceSpec :: V1alpha3ResourceSliceSpec -> Maybe Bool
$sel:v1alpha3ResourceSliceSpecDevices:V1alpha3ResourceSliceSpec :: V1alpha3ResourceSliceSpec -> Maybe [V1alpha3Device]
$sel:v1alpha3ResourceSliceSpecDriver:V1alpha3ResourceSliceSpec :: V1alpha3ResourceSliceSpec -> Text
$sel:v1alpha3ResourceSliceSpecNodeName:V1alpha3ResourceSliceSpec :: V1alpha3ResourceSliceSpec -> Maybe Text
$sel:v1alpha3ResourceSliceSpecNodeSelector:V1alpha3ResourceSliceSpec :: V1alpha3ResourceSliceSpec -> Maybe V1NodeSelector
$sel:v1alpha3ResourceSliceSpecPool:V1alpha3ResourceSliceSpec :: V1alpha3ResourceSliceSpec -> V1alpha3ResourcePool
v1alpha3ResourceSliceSpecAllNodes :: Maybe Bool
v1alpha3ResourceSliceSpecDevices :: Maybe [V1alpha3Device]
v1alpha3ResourceSliceSpecDriver :: Text
v1alpha3ResourceSliceSpecNodeName :: Maybe Text
v1alpha3ResourceSliceSpecNodeSelector :: Maybe V1NodeSelector
v1alpha3ResourceSliceSpecPool :: V1alpha3ResourcePool
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"allNodes" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1alpha3ResourceSliceSpecAllNodes
      , Key
"devices" Key -> Maybe [V1alpha3Device] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1alpha3Device]
v1alpha3ResourceSliceSpecDevices
      , Key
"driver" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1alpha3ResourceSliceSpecDriver
      , Key
"nodeName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1alpha3ResourceSliceSpecNodeName
      , Key
"nodeSelector" Key -> Maybe V1NodeSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1NodeSelector
v1alpha3ResourceSliceSpecNodeSelector
      , Key
"pool" Key -> V1alpha3ResourcePool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1alpha3ResourcePool
v1alpha3ResourceSliceSpecPool
      ]


-- | Construct a value of type 'V1alpha3ResourceSliceSpec' (by applying it's required fields, if any)
mkV1alpha3ResourceSliceSpec
  :: Text -- ^ 'v1alpha3ResourceSliceSpecDriver': Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.  Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.
  -> V1alpha3ResourcePool -- ^ 'v1alpha3ResourceSliceSpecPool' 
  -> V1alpha3ResourceSliceSpec
mkV1alpha3ResourceSliceSpec :: Text -> V1alpha3ResourcePool -> V1alpha3ResourceSliceSpec
mkV1alpha3ResourceSliceSpec Text
v1alpha3ResourceSliceSpecDriver V1alpha3ResourcePool
v1alpha3ResourceSliceSpecPool =
  V1alpha3ResourceSliceSpec
  { $sel:v1alpha3ResourceSliceSpecAllNodes:V1alpha3ResourceSliceSpec :: Maybe Bool
v1alpha3ResourceSliceSpecAllNodes = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1alpha3ResourceSliceSpecDevices:V1alpha3ResourceSliceSpec :: Maybe [V1alpha3Device]
v1alpha3ResourceSliceSpecDevices = Maybe [V1alpha3Device]
forall a. Maybe a
Nothing
  , Text
$sel:v1alpha3ResourceSliceSpecDriver:V1alpha3ResourceSliceSpec :: Text
v1alpha3ResourceSliceSpecDriver :: Text
v1alpha3ResourceSliceSpecDriver
  , $sel:v1alpha3ResourceSliceSpecNodeName:V1alpha3ResourceSliceSpec :: Maybe Text
v1alpha3ResourceSliceSpecNodeName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1alpha3ResourceSliceSpecNodeSelector:V1alpha3ResourceSliceSpec :: Maybe V1NodeSelector
v1alpha3ResourceSliceSpecNodeSelector = Maybe V1NodeSelector
forall a. Maybe a
Nothing
  , V1alpha3ResourcePool
$sel:v1alpha3ResourceSliceSpecPool:V1alpha3ResourceSliceSpec :: V1alpha3ResourcePool
v1alpha3ResourceSliceSpecPool :: V1alpha3ResourcePool
v1alpha3ResourceSliceSpecPool
  }

-- ** V1beta1AllocatedDeviceStatus
-- | V1beta1AllocatedDeviceStatus
-- AllocatedDeviceStatus contains the status of an allocated device, if the driver chooses to report it. This may include driver-specific information.
data V1beta1AllocatedDeviceStatus = V1beta1AllocatedDeviceStatus
  { V1beta1AllocatedDeviceStatus -> Maybe [V1Condition]
v1beta1AllocatedDeviceStatusConditions :: !(Maybe [V1Condition]) -- ^ "conditions" - Conditions contains the latest observation of the device&#39;s state. If the device has been configured according to the class and claim config references, the &#x60;Ready&#x60; condition should be True.
  , V1beta1AllocatedDeviceStatus -> Maybe Value
v1beta1AllocatedDeviceStatusData :: !(Maybe A.Value) -- ^ "data" - Data contains arbitrary driver-specific data.  The length of the raw data must be smaller or equal to 10 Ki.
  , V1beta1AllocatedDeviceStatus -> Text
v1beta1AllocatedDeviceStatusDevice :: !(Text) -- ^ /Required/ "device" - Device references one device instance via its name in the driver&#39;s resource pool. It must be a DNS label.
  , V1beta1AllocatedDeviceStatus -> Text
v1beta1AllocatedDeviceStatusDriver :: !(Text) -- ^ /Required/ "driver" - Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.  Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.
  , V1beta1AllocatedDeviceStatus -> Maybe V1beta1NetworkDeviceData
v1beta1AllocatedDeviceStatusNetworkData :: !(Maybe V1beta1NetworkDeviceData) -- ^ "networkData"
  , V1beta1AllocatedDeviceStatus -> Text
v1beta1AllocatedDeviceStatusPool :: !(Text) -- ^ /Required/ "pool" - This name together with the driver name and the device name field identify which device was allocated (&#x60;&lt;driver name&gt;/&lt;pool name&gt;/&lt;device name&gt;&#x60;).  Must not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.
  } deriving (Int -> V1beta1AllocatedDeviceStatus -> ShowS
[V1beta1AllocatedDeviceStatus] -> ShowS
V1beta1AllocatedDeviceStatus -> String
(Int -> V1beta1AllocatedDeviceStatus -> ShowS)
-> (V1beta1AllocatedDeviceStatus -> String)
-> ([V1beta1AllocatedDeviceStatus] -> ShowS)
-> Show V1beta1AllocatedDeviceStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1AllocatedDeviceStatus -> ShowS
showsPrec :: Int -> V1beta1AllocatedDeviceStatus -> ShowS
$cshow :: V1beta1AllocatedDeviceStatus -> String
show :: V1beta1AllocatedDeviceStatus -> String
$cshowList :: [V1beta1AllocatedDeviceStatus] -> ShowS
showList :: [V1beta1AllocatedDeviceStatus] -> ShowS
P.Show, V1beta1AllocatedDeviceStatus
-> V1beta1AllocatedDeviceStatus -> Bool
(V1beta1AllocatedDeviceStatus
 -> V1beta1AllocatedDeviceStatus -> Bool)
-> (V1beta1AllocatedDeviceStatus
    -> V1beta1AllocatedDeviceStatus -> Bool)
-> Eq V1beta1AllocatedDeviceStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1AllocatedDeviceStatus
-> V1beta1AllocatedDeviceStatus -> Bool
== :: V1beta1AllocatedDeviceStatus
-> V1beta1AllocatedDeviceStatus -> Bool
$c/= :: V1beta1AllocatedDeviceStatus
-> V1beta1AllocatedDeviceStatus -> Bool
/= :: V1beta1AllocatedDeviceStatus
-> V1beta1AllocatedDeviceStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1AllocatedDeviceStatus
instance A.FromJSON V1beta1AllocatedDeviceStatus where
  parseJSON :: Value -> Parser V1beta1AllocatedDeviceStatus
parseJSON = String
-> (Object -> Parser V1beta1AllocatedDeviceStatus)
-> Value
-> Parser V1beta1AllocatedDeviceStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1AllocatedDeviceStatus" ((Object -> Parser V1beta1AllocatedDeviceStatus)
 -> Value -> Parser V1beta1AllocatedDeviceStatus)
-> (Object -> Parser V1beta1AllocatedDeviceStatus)
-> Value
-> Parser V1beta1AllocatedDeviceStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1Condition]
-> Maybe Value
-> Text
-> Text
-> Maybe V1beta1NetworkDeviceData
-> Text
-> V1beta1AllocatedDeviceStatus
V1beta1AllocatedDeviceStatus
      (Maybe [V1Condition]
 -> Maybe Value
 -> Text
 -> Text
 -> Maybe V1beta1NetworkDeviceData
 -> Text
 -> V1beta1AllocatedDeviceStatus)
-> Parser (Maybe [V1Condition])
-> Parser
     (Maybe Value
      -> Text
      -> Text
      -> Maybe V1beta1NetworkDeviceData
      -> Text
      -> V1beta1AllocatedDeviceStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1Condition])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"conditions")
      Parser
  (Maybe Value
   -> Text
   -> Text
   -> Maybe V1beta1NetworkDeviceData
   -> Text
   -> V1beta1AllocatedDeviceStatus)
-> Parser (Maybe Value)
-> Parser
     (Text
      -> Text
      -> Maybe V1beta1NetworkDeviceData
      -> Text
      -> V1beta1AllocatedDeviceStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Value)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"data")
      Parser
  (Text
   -> Text
   -> Maybe V1beta1NetworkDeviceData
   -> Text
   -> V1beta1AllocatedDeviceStatus)
-> Parser Text
-> Parser
     (Text
      -> Maybe V1beta1NetworkDeviceData
      -> Text
      -> V1beta1AllocatedDeviceStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"device")
      Parser
  (Text
   -> Maybe V1beta1NetworkDeviceData
   -> Text
   -> V1beta1AllocatedDeviceStatus)
-> Parser Text
-> Parser
     (Maybe V1beta1NetworkDeviceData
      -> Text -> V1beta1AllocatedDeviceStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"driver")
      Parser
  (Maybe V1beta1NetworkDeviceData
   -> Text -> V1beta1AllocatedDeviceStatus)
-> Parser (Maybe V1beta1NetworkDeviceData)
-> Parser (Text -> V1beta1AllocatedDeviceStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1beta1NetworkDeviceData)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"networkData")
      Parser (Text -> V1beta1AllocatedDeviceStatus)
-> Parser Text -> Parser V1beta1AllocatedDeviceStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"pool")

-- | ToJSON V1beta1AllocatedDeviceStatus
instance A.ToJSON V1beta1AllocatedDeviceStatus where
  toJSON :: V1beta1AllocatedDeviceStatus -> Value
toJSON V1beta1AllocatedDeviceStatus {Maybe [V1Condition]
Maybe Value
Maybe V1beta1NetworkDeviceData
Text
$sel:v1beta1AllocatedDeviceStatusConditions:V1beta1AllocatedDeviceStatus :: V1beta1AllocatedDeviceStatus -> Maybe [V1Condition]
$sel:v1beta1AllocatedDeviceStatusData:V1beta1AllocatedDeviceStatus :: V1beta1AllocatedDeviceStatus -> Maybe Value
$sel:v1beta1AllocatedDeviceStatusDevice:V1beta1AllocatedDeviceStatus :: V1beta1AllocatedDeviceStatus -> Text
$sel:v1beta1AllocatedDeviceStatusDriver:V1beta1AllocatedDeviceStatus :: V1beta1AllocatedDeviceStatus -> Text
$sel:v1beta1AllocatedDeviceStatusNetworkData:V1beta1AllocatedDeviceStatus :: V1beta1AllocatedDeviceStatus -> Maybe V1beta1NetworkDeviceData
$sel:v1beta1AllocatedDeviceStatusPool:V1beta1AllocatedDeviceStatus :: V1beta1AllocatedDeviceStatus -> Text
v1beta1AllocatedDeviceStatusConditions :: Maybe [V1Condition]
v1beta1AllocatedDeviceStatusData :: Maybe Value
v1beta1AllocatedDeviceStatusDevice :: Text
v1beta1AllocatedDeviceStatusDriver :: Text
v1beta1AllocatedDeviceStatusNetworkData :: Maybe V1beta1NetworkDeviceData
v1beta1AllocatedDeviceStatusPool :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"conditions" Key -> Maybe [V1Condition] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1Condition]
v1beta1AllocatedDeviceStatusConditions
      , Key
"data" Key -> Maybe Value -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Value
v1beta1AllocatedDeviceStatusData
      , Key
"device" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1beta1AllocatedDeviceStatusDevice
      , Key
"driver" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1beta1AllocatedDeviceStatusDriver
      , Key
"networkData" Key -> Maybe V1beta1NetworkDeviceData -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1beta1NetworkDeviceData
v1beta1AllocatedDeviceStatusNetworkData
      , Key
"pool" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1beta1AllocatedDeviceStatusPool
      ]


-- | Construct a value of type 'V1beta1AllocatedDeviceStatus' (by applying it's required fields, if any)
mkV1beta1AllocatedDeviceStatus
  :: Text -- ^ 'v1beta1AllocatedDeviceStatusDevice': Device references one device instance via its name in the driver's resource pool. It must be a DNS label.
  -> Text -- ^ 'v1beta1AllocatedDeviceStatusDriver': Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.  Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.
  -> Text -- ^ 'v1beta1AllocatedDeviceStatusPool': This name together with the driver name and the device name field identify which device was allocated (`<driver name>/<pool name>/<device name>`).  Must not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.
  -> V1beta1AllocatedDeviceStatus
mkV1beta1AllocatedDeviceStatus :: Text -> Text -> Text -> V1beta1AllocatedDeviceStatus
mkV1beta1AllocatedDeviceStatus Text
v1beta1AllocatedDeviceStatusDevice Text
v1beta1AllocatedDeviceStatusDriver Text
v1beta1AllocatedDeviceStatusPool =
  V1beta1AllocatedDeviceStatus
  { $sel:v1beta1AllocatedDeviceStatusConditions:V1beta1AllocatedDeviceStatus :: Maybe [V1Condition]
v1beta1AllocatedDeviceStatusConditions = Maybe [V1Condition]
forall a. Maybe a
Nothing
  , $sel:v1beta1AllocatedDeviceStatusData:V1beta1AllocatedDeviceStatus :: Maybe Value
v1beta1AllocatedDeviceStatusData = Maybe Value
forall a. Maybe a
Nothing
  , Text
$sel:v1beta1AllocatedDeviceStatusDevice:V1beta1AllocatedDeviceStatus :: Text
v1beta1AllocatedDeviceStatusDevice :: Text
v1beta1AllocatedDeviceStatusDevice
  , Text
$sel:v1beta1AllocatedDeviceStatusDriver:V1beta1AllocatedDeviceStatus :: Text
v1beta1AllocatedDeviceStatusDriver :: Text
v1beta1AllocatedDeviceStatusDriver
  , $sel:v1beta1AllocatedDeviceStatusNetworkData:V1beta1AllocatedDeviceStatus :: Maybe V1beta1NetworkDeviceData
v1beta1AllocatedDeviceStatusNetworkData = Maybe V1beta1NetworkDeviceData
forall a. Maybe a
Nothing
  , Text
$sel:v1beta1AllocatedDeviceStatusPool:V1beta1AllocatedDeviceStatus :: Text
v1beta1AllocatedDeviceStatusPool :: Text
v1beta1AllocatedDeviceStatusPool
  }

-- ** V1beta1AllocationResult
-- | V1beta1AllocationResult
-- AllocationResult contains attributes of an allocated resource.
data V1beta1AllocationResult = V1beta1AllocationResult
  { V1beta1AllocationResult -> Maybe V1beta1DeviceAllocationResult
v1beta1AllocationResultDevices :: !(Maybe V1beta1DeviceAllocationResult) -- ^ "devices"
  , V1beta1AllocationResult -> Maybe V1NodeSelector
v1beta1AllocationResultNodeSelector :: !(Maybe V1NodeSelector) -- ^ "nodeSelector"
  } deriving (Int -> V1beta1AllocationResult -> ShowS
[V1beta1AllocationResult] -> ShowS
V1beta1AllocationResult -> String
(Int -> V1beta1AllocationResult -> ShowS)
-> (V1beta1AllocationResult -> String)
-> ([V1beta1AllocationResult] -> ShowS)
-> Show V1beta1AllocationResult
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1AllocationResult -> ShowS
showsPrec :: Int -> V1beta1AllocationResult -> ShowS
$cshow :: V1beta1AllocationResult -> String
show :: V1beta1AllocationResult -> String
$cshowList :: [V1beta1AllocationResult] -> ShowS
showList :: [V1beta1AllocationResult] -> ShowS
P.Show, V1beta1AllocationResult -> V1beta1AllocationResult -> Bool
(V1beta1AllocationResult -> V1beta1AllocationResult -> Bool)
-> (V1beta1AllocationResult -> V1beta1AllocationResult -> Bool)
-> Eq V1beta1AllocationResult
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1AllocationResult -> V1beta1AllocationResult -> Bool
== :: V1beta1AllocationResult -> V1beta1AllocationResult -> Bool
$c/= :: V1beta1AllocationResult -> V1beta1AllocationResult -> Bool
/= :: V1beta1AllocationResult -> V1beta1AllocationResult -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1AllocationResult
instance A.FromJSON V1beta1AllocationResult where
  parseJSON :: Value -> Parser V1beta1AllocationResult
parseJSON = String
-> (Object -> Parser V1beta1AllocationResult)
-> Value
-> Parser V1beta1AllocationResult
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1AllocationResult" ((Object -> Parser V1beta1AllocationResult)
 -> Value -> Parser V1beta1AllocationResult)
-> (Object -> Parser V1beta1AllocationResult)
-> Value
-> Parser V1beta1AllocationResult
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1beta1DeviceAllocationResult
-> Maybe V1NodeSelector -> V1beta1AllocationResult
V1beta1AllocationResult
      (Maybe V1beta1DeviceAllocationResult
 -> Maybe V1NodeSelector -> V1beta1AllocationResult)
-> Parser (Maybe V1beta1DeviceAllocationResult)
-> Parser (Maybe V1NodeSelector -> V1beta1AllocationResult)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1beta1DeviceAllocationResult)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"devices")
      Parser (Maybe V1NodeSelector -> V1beta1AllocationResult)
-> Parser (Maybe V1NodeSelector) -> Parser V1beta1AllocationResult
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1NodeSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nodeSelector")

-- | ToJSON V1beta1AllocationResult
instance A.ToJSON V1beta1AllocationResult where
  toJSON :: V1beta1AllocationResult -> Value
toJSON V1beta1AllocationResult {Maybe V1beta1DeviceAllocationResult
Maybe V1NodeSelector
$sel:v1beta1AllocationResultDevices:V1beta1AllocationResult :: V1beta1AllocationResult -> Maybe V1beta1DeviceAllocationResult
$sel:v1beta1AllocationResultNodeSelector:V1beta1AllocationResult :: V1beta1AllocationResult -> Maybe V1NodeSelector
v1beta1AllocationResultDevices :: Maybe V1beta1DeviceAllocationResult
v1beta1AllocationResultNodeSelector :: Maybe V1NodeSelector
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"devices" Key -> Maybe V1beta1DeviceAllocationResult -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1beta1DeviceAllocationResult
v1beta1AllocationResultDevices
      , Key
"nodeSelector" Key -> Maybe V1NodeSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1NodeSelector
v1beta1AllocationResultNodeSelector
      ]


-- | Construct a value of type 'V1beta1AllocationResult' (by applying it's required fields, if any)
mkV1beta1AllocationResult
  :: V1beta1AllocationResult
mkV1beta1AllocationResult :: V1beta1AllocationResult
mkV1beta1AllocationResult =
  V1beta1AllocationResult
  { $sel:v1beta1AllocationResultDevices:V1beta1AllocationResult :: Maybe V1beta1DeviceAllocationResult
v1beta1AllocationResultDevices = Maybe V1beta1DeviceAllocationResult
forall a. Maybe a
Nothing
  , $sel:v1beta1AllocationResultNodeSelector:V1beta1AllocationResult :: Maybe V1NodeSelector
v1beta1AllocationResultNodeSelector = Maybe V1NodeSelector
forall a. Maybe a
Nothing
  }

-- ** V1beta1AuditAnnotation
-- | V1beta1AuditAnnotation
-- AuditAnnotation describes how to produce an audit annotation for an API request.
data V1beta1AuditAnnotation = V1beta1AuditAnnotation
  { V1beta1AuditAnnotation -> Text
v1beta1AuditAnnotationKey :: !(Text) -- ^ /Required/ "key" - key specifies the audit annotation key. The audit annotation keys of a ValidatingAdmissionPolicy must be unique. The key must be a qualified name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length.  The key is combined with the resource name of the ValidatingAdmissionPolicy to construct an audit annotation key: \&quot;{ValidatingAdmissionPolicy name}/{key}\&quot;.  If an admission webhook uses the same resource name as this ValidatingAdmissionPolicy and the same audit annotation key, the annotation key will be identical. In this case, the first annotation written with the key will be included in the audit event and all subsequent annotations with the same key will be discarded.  Required.
  , V1beta1AuditAnnotation -> Text
v1beta1AuditAnnotationValueExpression :: !(Text) -- ^ /Required/ "valueExpression" - valueExpression represents the expression which is evaluated by CEL to produce an audit annotation value. The expression must evaluate to either a string or null value. If the expression evaluates to a string, the audit annotation is included with the string value. If the expression evaluates to null or empty string the audit annotation will be omitted. The valueExpression may be no longer than 5kb in length. If the result of the valueExpression is more than 10kb in length, it will be truncated to 10kb.  If multiple ValidatingAdmissionPolicyBinding resources match an API request, then the valueExpression will be evaluated for each binding. All unique values produced by the valueExpressions will be joined together in a comma-separated list.  Required.
  } deriving (Int -> V1beta1AuditAnnotation -> ShowS
[V1beta1AuditAnnotation] -> ShowS
V1beta1AuditAnnotation -> String
(Int -> V1beta1AuditAnnotation -> ShowS)
-> (V1beta1AuditAnnotation -> String)
-> ([V1beta1AuditAnnotation] -> ShowS)
-> Show V1beta1AuditAnnotation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1AuditAnnotation -> ShowS
showsPrec :: Int -> V1beta1AuditAnnotation -> ShowS
$cshow :: V1beta1AuditAnnotation -> String
show :: V1beta1AuditAnnotation -> String
$cshowList :: [V1beta1AuditAnnotation] -> ShowS
showList :: [V1beta1AuditAnnotation] -> ShowS
P.Show, V1beta1AuditAnnotation -> V1beta1AuditAnnotation -> Bool
(V1beta1AuditAnnotation -> V1beta1AuditAnnotation -> Bool)
-> (V1beta1AuditAnnotation -> V1beta1AuditAnnotation -> Bool)
-> Eq V1beta1AuditAnnotation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1AuditAnnotation -> V1beta1AuditAnnotation -> Bool
== :: V1beta1AuditAnnotation -> V1beta1AuditAnnotation -> Bool
$c/= :: V1beta1AuditAnnotation -> V1beta1AuditAnnotation -> Bool
/= :: V1beta1AuditAnnotation -> V1beta1AuditAnnotation -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1AuditAnnotation
instance A.FromJSON V1beta1AuditAnnotation where
  parseJSON :: Value -> Parser V1beta1AuditAnnotation
parseJSON = String
-> (Object -> Parser V1beta1AuditAnnotation)
-> Value
-> Parser V1beta1AuditAnnotation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1AuditAnnotation" ((Object -> Parser V1beta1AuditAnnotation)
 -> Value -> Parser V1beta1AuditAnnotation)
-> (Object -> Parser V1beta1AuditAnnotation)
-> Value
-> Parser V1beta1AuditAnnotation
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Text -> V1beta1AuditAnnotation
V1beta1AuditAnnotation
      (Text -> Text -> V1beta1AuditAnnotation)
-> Parser Text -> Parser (Text -> V1beta1AuditAnnotation)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"key")
      Parser (Text -> V1beta1AuditAnnotation)
-> Parser Text -> Parser V1beta1AuditAnnotation
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"valueExpression")

-- | ToJSON V1beta1AuditAnnotation
instance A.ToJSON V1beta1AuditAnnotation where
  toJSON :: V1beta1AuditAnnotation -> Value
toJSON V1beta1AuditAnnotation {Text
$sel:v1beta1AuditAnnotationKey:V1beta1AuditAnnotation :: V1beta1AuditAnnotation -> Text
$sel:v1beta1AuditAnnotationValueExpression:V1beta1AuditAnnotation :: V1beta1AuditAnnotation -> Text
v1beta1AuditAnnotationKey :: Text
v1beta1AuditAnnotationValueExpression :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"key" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1beta1AuditAnnotationKey
      , Key
"valueExpression" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1beta1AuditAnnotationValueExpression
      ]


-- | Construct a value of type 'V1beta1AuditAnnotation' (by applying it's required fields, if any)
mkV1beta1AuditAnnotation
  :: Text -- ^ 'v1beta1AuditAnnotationKey': key specifies the audit annotation key. The audit annotation keys of a ValidatingAdmissionPolicy must be unique. The key must be a qualified name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length.  The key is combined with the resource name of the ValidatingAdmissionPolicy to construct an audit annotation key: \"{ValidatingAdmissionPolicy name}/{key}\".  If an admission webhook uses the same resource name as this ValidatingAdmissionPolicy and the same audit annotation key, the annotation key will be identical. In this case, the first annotation written with the key will be included in the audit event and all subsequent annotations with the same key will be discarded.  Required.
  -> Text -- ^ 'v1beta1AuditAnnotationValueExpression': valueExpression represents the expression which is evaluated by CEL to produce an audit annotation value. The expression must evaluate to either a string or null value. If the expression evaluates to a string, the audit annotation is included with the string value. If the expression evaluates to null or empty string the audit annotation will be omitted. The valueExpression may be no longer than 5kb in length. If the result of the valueExpression is more than 10kb in length, it will be truncated to 10kb.  If multiple ValidatingAdmissionPolicyBinding resources match an API request, then the valueExpression will be evaluated for each binding. All unique values produced by the valueExpressions will be joined together in a comma-separated list.  Required.
  -> V1beta1AuditAnnotation
mkV1beta1AuditAnnotation :: Text -> Text -> V1beta1AuditAnnotation
mkV1beta1AuditAnnotation Text
v1beta1AuditAnnotationKey Text
v1beta1AuditAnnotationValueExpression =
  V1beta1AuditAnnotation
  { Text
$sel:v1beta1AuditAnnotationKey:V1beta1AuditAnnotation :: Text
v1beta1AuditAnnotationKey :: Text
v1beta1AuditAnnotationKey
  , Text
$sel:v1beta1AuditAnnotationValueExpression:V1beta1AuditAnnotation :: Text
v1beta1AuditAnnotationValueExpression :: Text
v1beta1AuditAnnotationValueExpression
  }

-- ** V1beta1BasicDevice
-- | V1beta1BasicDevice
-- BasicDevice defines one device instance.
data V1beta1BasicDevice = V1beta1BasicDevice
  { V1beta1BasicDevice -> Maybe (Map String V1beta1DeviceAttribute)
v1beta1BasicDeviceAttributes :: !(Maybe (Map.Map String V1beta1DeviceAttribute)) -- ^ "attributes" - Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set.  The maximum number of attributes and capacities combined is 32.
  , V1beta1BasicDevice -> Maybe (Map String V1beta1DeviceCapacity)
v1beta1BasicDeviceCapacity :: !(Maybe (Map.Map String V1beta1DeviceCapacity)) -- ^ "capacity" - Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set.  The maximum number of attributes and capacities combined is 32.
  } deriving (Int -> V1beta1BasicDevice -> ShowS
[V1beta1BasicDevice] -> ShowS
V1beta1BasicDevice -> String
(Int -> V1beta1BasicDevice -> ShowS)
-> (V1beta1BasicDevice -> String)
-> ([V1beta1BasicDevice] -> ShowS)
-> Show V1beta1BasicDevice
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1BasicDevice -> ShowS
showsPrec :: Int -> V1beta1BasicDevice -> ShowS
$cshow :: V1beta1BasicDevice -> String
show :: V1beta1BasicDevice -> String
$cshowList :: [V1beta1BasicDevice] -> ShowS
showList :: [V1beta1BasicDevice] -> ShowS
P.Show, V1beta1BasicDevice -> V1beta1BasicDevice -> Bool
(V1beta1BasicDevice -> V1beta1BasicDevice -> Bool)
-> (V1beta1BasicDevice -> V1beta1BasicDevice -> Bool)
-> Eq V1beta1BasicDevice
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1BasicDevice -> V1beta1BasicDevice -> Bool
== :: V1beta1BasicDevice -> V1beta1BasicDevice -> Bool
$c/= :: V1beta1BasicDevice -> V1beta1BasicDevice -> Bool
/= :: V1beta1BasicDevice -> V1beta1BasicDevice -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1BasicDevice
instance A.FromJSON V1beta1BasicDevice where
  parseJSON :: Value -> Parser V1beta1BasicDevice
parseJSON = String
-> (Object -> Parser V1beta1BasicDevice)
-> Value
-> Parser V1beta1BasicDevice
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1BasicDevice" ((Object -> Parser V1beta1BasicDevice)
 -> Value -> Parser V1beta1BasicDevice)
-> (Object -> Parser V1beta1BasicDevice)
-> Value
-> Parser V1beta1BasicDevice
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe (Map String V1beta1DeviceAttribute)
-> Maybe (Map String V1beta1DeviceCapacity) -> V1beta1BasicDevice
V1beta1BasicDevice
      (Maybe (Map String V1beta1DeviceAttribute)
 -> Maybe (Map String V1beta1DeviceCapacity) -> V1beta1BasicDevice)
-> Parser (Maybe (Map String V1beta1DeviceAttribute))
-> Parser
     (Maybe (Map String V1beta1DeviceCapacity) -> V1beta1BasicDevice)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe (Map String V1beta1DeviceAttribute))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"attributes")
      Parser
  (Maybe (Map String V1beta1DeviceCapacity) -> V1beta1BasicDevice)
-> Parser (Maybe (Map String V1beta1DeviceCapacity))
-> Parser V1beta1BasicDevice
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String V1beta1DeviceCapacity))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"capacity")

-- | ToJSON V1beta1BasicDevice
instance A.ToJSON V1beta1BasicDevice where
  toJSON :: V1beta1BasicDevice -> Value
toJSON V1beta1BasicDevice {Maybe (Map String V1beta1DeviceCapacity)
Maybe (Map String V1beta1DeviceAttribute)
$sel:v1beta1BasicDeviceAttributes:V1beta1BasicDevice :: V1beta1BasicDevice -> Maybe (Map String V1beta1DeviceAttribute)
$sel:v1beta1BasicDeviceCapacity:V1beta1BasicDevice :: V1beta1BasicDevice -> Maybe (Map String V1beta1DeviceCapacity)
v1beta1BasicDeviceAttributes :: Maybe (Map String V1beta1DeviceAttribute)
v1beta1BasicDeviceCapacity :: Maybe (Map String V1beta1DeviceCapacity)
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"attributes" Key -> Maybe (Map String V1beta1DeviceAttribute) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String V1beta1DeviceAttribute)
v1beta1BasicDeviceAttributes
      , Key
"capacity" Key -> Maybe (Map String V1beta1DeviceCapacity) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String V1beta1DeviceCapacity)
v1beta1BasicDeviceCapacity
      ]


-- | Construct a value of type 'V1beta1BasicDevice' (by applying it's required fields, if any)
mkV1beta1BasicDevice
  :: V1beta1BasicDevice
mkV1beta1BasicDevice :: V1beta1BasicDevice
mkV1beta1BasicDevice =
  V1beta1BasicDevice
  { $sel:v1beta1BasicDeviceAttributes:V1beta1BasicDevice :: Maybe (Map String V1beta1DeviceAttribute)
v1beta1BasicDeviceAttributes = Maybe (Map String V1beta1DeviceAttribute)
forall a. Maybe a
Nothing
  , $sel:v1beta1BasicDeviceCapacity:V1beta1BasicDevice :: Maybe (Map String V1beta1DeviceCapacity)
v1beta1BasicDeviceCapacity = Maybe (Map String V1beta1DeviceCapacity)
forall a. Maybe a
Nothing
  }

-- ** V1beta1CELDeviceSelector
-- | V1beta1CELDeviceSelector
-- CELDeviceSelector contains a CEL expression for selecting a device.
data V1beta1CELDeviceSelector = V1beta1CELDeviceSelector
  { V1beta1CELDeviceSelector -> Text
v1beta1CELDeviceSelectorExpression :: !(Text) -- ^ /Required/ "expression" - Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort.  The expression&#39;s input is an object named \&quot;device\&quot;, which carries the following properties:  - driver (string): the name of the driver which defines this device.  - attributes (map[string]object): the device&#39;s attributes, grouped by prefix    (e.g. device.attributes[\&quot;dra.example.com\&quot;] evaluates to an object with all    of the attributes which were prefixed by \&quot;dra.example.com\&quot;.  - capacity (map[string]object): the device&#39;s capacities, grouped by prefix.  Example: Consider a device with driver&#x3D;\&quot;dra.example.com\&quot;, which exposes two attributes named \&quot;model\&quot; and \&quot;ext.example.com/family\&quot; and which exposes one capacity named \&quot;modules\&quot;. This input to this expression would have the following fields:      device.driver     device.attributes[\&quot;dra.example.com\&quot;].model     device.attributes[\&quot;ext.example.com\&quot;].family     device.capacity[\&quot;dra.example.com\&quot;].modules  The device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers.  The value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity.  If an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort.  A robust expression should check for the existence of attributes before referencing them.  For ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example:      cel.bind(dra, device.attributes[\&quot;dra.example.com\&quot;], dra.someBool &amp;&amp; dra.anotherBool)  The length of the expression must be smaller or equal to 10 Ki. The cost of evaluating it is also limited based on the estimated number of logical steps.
  } deriving (Int -> V1beta1CELDeviceSelector -> ShowS
[V1beta1CELDeviceSelector] -> ShowS
V1beta1CELDeviceSelector -> String
(Int -> V1beta1CELDeviceSelector -> ShowS)
-> (V1beta1CELDeviceSelector -> String)
-> ([V1beta1CELDeviceSelector] -> ShowS)
-> Show V1beta1CELDeviceSelector
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1CELDeviceSelector -> ShowS
showsPrec :: Int -> V1beta1CELDeviceSelector -> ShowS
$cshow :: V1beta1CELDeviceSelector -> String
show :: V1beta1CELDeviceSelector -> String
$cshowList :: [V1beta1CELDeviceSelector] -> ShowS
showList :: [V1beta1CELDeviceSelector] -> ShowS
P.Show, V1beta1CELDeviceSelector -> V1beta1CELDeviceSelector -> Bool
(V1beta1CELDeviceSelector -> V1beta1CELDeviceSelector -> Bool)
-> (V1beta1CELDeviceSelector -> V1beta1CELDeviceSelector -> Bool)
-> Eq V1beta1CELDeviceSelector
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1CELDeviceSelector -> V1beta1CELDeviceSelector -> Bool
== :: V1beta1CELDeviceSelector -> V1beta1CELDeviceSelector -> Bool
$c/= :: V1beta1CELDeviceSelector -> V1beta1CELDeviceSelector -> Bool
/= :: V1beta1CELDeviceSelector -> V1beta1CELDeviceSelector -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1CELDeviceSelector
instance A.FromJSON V1beta1CELDeviceSelector where
  parseJSON :: Value -> Parser V1beta1CELDeviceSelector
parseJSON = String
-> (Object -> Parser V1beta1CELDeviceSelector)
-> Value
-> Parser V1beta1CELDeviceSelector
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1CELDeviceSelector" ((Object -> Parser V1beta1CELDeviceSelector)
 -> Value -> Parser V1beta1CELDeviceSelector)
-> (Object -> Parser V1beta1CELDeviceSelector)
-> Value
-> Parser V1beta1CELDeviceSelector
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> V1beta1CELDeviceSelector
V1beta1CELDeviceSelector
      (Text -> V1beta1CELDeviceSelector)
-> Parser Text -> Parser V1beta1CELDeviceSelector
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"expression")

-- | ToJSON V1beta1CELDeviceSelector
instance A.ToJSON V1beta1CELDeviceSelector where
  toJSON :: V1beta1CELDeviceSelector -> Value
toJSON V1beta1CELDeviceSelector {Text
$sel:v1beta1CELDeviceSelectorExpression:V1beta1CELDeviceSelector :: V1beta1CELDeviceSelector -> Text
v1beta1CELDeviceSelectorExpression :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"expression" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1beta1CELDeviceSelectorExpression
      ]


-- | Construct a value of type 'V1beta1CELDeviceSelector' (by applying it's required fields, if any)
mkV1beta1CELDeviceSelector
  :: Text -- ^ 'v1beta1CELDeviceSelectorExpression': Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort.  The expression's input is an object named \"device\", which carries the following properties:  - driver (string): the name of the driver which defines this device.  - attributes (map[string]object): the device's attributes, grouped by prefix    (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all    of the attributes which were prefixed by \"dra.example.com\".  - capacity (map[string]object): the device's capacities, grouped by prefix.  Example: Consider a device with driver=\"dra.example.com\", which exposes two attributes named \"model\" and \"ext.example.com/family\" and which exposes one capacity named \"modules\". This input to this expression would have the following fields:      device.driver     device.attributes[\"dra.example.com\"].model     device.attributes[\"ext.example.com\"].family     device.capacity[\"dra.example.com\"].modules  The device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers.  The value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity.  If an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort.  A robust expression should check for the existence of attributes before referencing them.  For ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example:      cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool)  The length of the expression must be smaller or equal to 10 Ki. The cost of evaluating it is also limited based on the estimated number of logical steps.
  -> V1beta1CELDeviceSelector
mkV1beta1CELDeviceSelector :: Text -> V1beta1CELDeviceSelector
mkV1beta1CELDeviceSelector Text
v1beta1CELDeviceSelectorExpression =
  V1beta1CELDeviceSelector
  { Text
$sel:v1beta1CELDeviceSelectorExpression:V1beta1CELDeviceSelector :: Text
v1beta1CELDeviceSelectorExpression :: Text
v1beta1CELDeviceSelectorExpression
  }

-- ** V1beta1Device
-- | V1beta1Device
-- Device represents one individual hardware instance that can be selected based on its attributes. Besides the name, exactly one field must be set.
data V1beta1Device = V1beta1Device
  { V1beta1Device -> Maybe V1beta1BasicDevice
v1beta1DeviceBasic :: !(Maybe V1beta1BasicDevice) -- ^ "basic"
  , V1beta1Device -> Text
v1beta1DeviceName :: !(Text) -- ^ /Required/ "name" - Name is unique identifier among all devices managed by the driver in the pool. It must be a DNS label.
  } deriving (Int -> V1beta1Device -> ShowS
[V1beta1Device] -> ShowS
V1beta1Device -> String
(Int -> V1beta1Device -> ShowS)
-> (V1beta1Device -> String)
-> ([V1beta1Device] -> ShowS)
-> Show V1beta1Device
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1Device -> ShowS
showsPrec :: Int -> V1beta1Device -> ShowS
$cshow :: V1beta1Device -> String
show :: V1beta1Device -> String
$cshowList :: [V1beta1Device] -> ShowS
showList :: [V1beta1Device] -> ShowS
P.Show, V1beta1Device -> V1beta1Device -> Bool
(V1beta1Device -> V1beta1Device -> Bool)
-> (V1beta1Device -> V1beta1Device -> Bool) -> Eq V1beta1Device
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1Device -> V1beta1Device -> Bool
== :: V1beta1Device -> V1beta1Device -> Bool
$c/= :: V1beta1Device -> V1beta1Device -> Bool
/= :: V1beta1Device -> V1beta1Device -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1Device
instance A.FromJSON V1beta1Device where
  parseJSON :: Value -> Parser V1beta1Device
parseJSON = String
-> (Object -> Parser V1beta1Device)
-> Value
-> Parser V1beta1Device
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1Device" ((Object -> Parser V1beta1Device) -> Value -> Parser V1beta1Device)
-> (Object -> Parser V1beta1Device)
-> Value
-> Parser V1beta1Device
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1beta1BasicDevice -> Text -> V1beta1Device
V1beta1Device
      (Maybe V1beta1BasicDevice -> Text -> V1beta1Device)
-> Parser (Maybe V1beta1BasicDevice)
-> Parser (Text -> V1beta1Device)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1beta1BasicDevice)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"basic")
      Parser (Text -> V1beta1Device)
-> Parser Text -> Parser V1beta1Device
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")

-- | ToJSON V1beta1Device
instance A.ToJSON V1beta1Device where
  toJSON :: V1beta1Device -> Value
toJSON V1beta1Device {Maybe V1beta1BasicDevice
Text
$sel:v1beta1DeviceBasic:V1beta1Device :: V1beta1Device -> Maybe V1beta1BasicDevice
$sel:v1beta1DeviceName:V1beta1Device :: V1beta1Device -> Text
v1beta1DeviceBasic :: Maybe V1beta1BasicDevice
v1beta1DeviceName :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"basic" Key -> Maybe V1beta1BasicDevice -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1beta1BasicDevice
v1beta1DeviceBasic
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1beta1DeviceName
      ]


-- | Construct a value of type 'V1beta1Device' (by applying it's required fields, if any)
mkV1beta1Device
  :: Text -- ^ 'v1beta1DeviceName': Name is unique identifier among all devices managed by the driver in the pool. It must be a DNS label.
  -> V1beta1Device
mkV1beta1Device :: Text -> V1beta1Device
mkV1beta1Device Text
v1beta1DeviceName =
  V1beta1Device
  { $sel:v1beta1DeviceBasic:V1beta1Device :: Maybe V1beta1BasicDevice
v1beta1DeviceBasic = Maybe V1beta1BasicDevice
forall a. Maybe a
Nothing
  , Text
$sel:v1beta1DeviceName:V1beta1Device :: Text
v1beta1DeviceName :: Text
v1beta1DeviceName
  }

-- ** V1beta1DeviceAllocationConfiguration
-- | V1beta1DeviceAllocationConfiguration
-- DeviceAllocationConfiguration gets embedded in an AllocationResult.
data V1beta1DeviceAllocationConfiguration = V1beta1DeviceAllocationConfiguration
  { V1beta1DeviceAllocationConfiguration
-> Maybe V1beta1OpaqueDeviceConfiguration
v1beta1DeviceAllocationConfigurationOpaque :: !(Maybe V1beta1OpaqueDeviceConfiguration) -- ^ "opaque"
  , V1beta1DeviceAllocationConfiguration -> Maybe [Text]
v1beta1DeviceAllocationConfigurationRequests :: !(Maybe [Text]) -- ^ "requests" - Requests lists the names of requests where the configuration applies. If empty, its applies to all requests.
  , V1beta1DeviceAllocationConfiguration -> Text
v1beta1DeviceAllocationConfigurationSource :: !(Text) -- ^ /Required/ "source" - Source records whether the configuration comes from a class and thus is not something that a normal user would have been able to set or from a claim.
  } deriving (Int -> V1beta1DeviceAllocationConfiguration -> ShowS
[V1beta1DeviceAllocationConfiguration] -> ShowS
V1beta1DeviceAllocationConfiguration -> String
(Int -> V1beta1DeviceAllocationConfiguration -> ShowS)
-> (V1beta1DeviceAllocationConfiguration -> String)
-> ([V1beta1DeviceAllocationConfiguration] -> ShowS)
-> Show V1beta1DeviceAllocationConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1DeviceAllocationConfiguration -> ShowS
showsPrec :: Int -> V1beta1DeviceAllocationConfiguration -> ShowS
$cshow :: V1beta1DeviceAllocationConfiguration -> String
show :: V1beta1DeviceAllocationConfiguration -> String
$cshowList :: [V1beta1DeviceAllocationConfiguration] -> ShowS
showList :: [V1beta1DeviceAllocationConfiguration] -> ShowS
P.Show, V1beta1DeviceAllocationConfiguration
-> V1beta1DeviceAllocationConfiguration -> Bool
(V1beta1DeviceAllocationConfiguration
 -> V1beta1DeviceAllocationConfiguration -> Bool)
-> (V1beta1DeviceAllocationConfiguration
    -> V1beta1DeviceAllocationConfiguration -> Bool)
-> Eq V1beta1DeviceAllocationConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1DeviceAllocationConfiguration
-> V1beta1DeviceAllocationConfiguration -> Bool
== :: V1beta1DeviceAllocationConfiguration
-> V1beta1DeviceAllocationConfiguration -> Bool
$c/= :: V1beta1DeviceAllocationConfiguration
-> V1beta1DeviceAllocationConfiguration -> Bool
/= :: V1beta1DeviceAllocationConfiguration
-> V1beta1DeviceAllocationConfiguration -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1DeviceAllocationConfiguration
instance A.FromJSON V1beta1DeviceAllocationConfiguration where
  parseJSON :: Value -> Parser V1beta1DeviceAllocationConfiguration
parseJSON = String
-> (Object -> Parser V1beta1DeviceAllocationConfiguration)
-> Value
-> Parser V1beta1DeviceAllocationConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1DeviceAllocationConfiguration" ((Object -> Parser V1beta1DeviceAllocationConfiguration)
 -> Value -> Parser V1beta1DeviceAllocationConfiguration)
-> (Object -> Parser V1beta1DeviceAllocationConfiguration)
-> Value
-> Parser V1beta1DeviceAllocationConfiguration
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1beta1OpaqueDeviceConfiguration
-> Maybe [Text] -> Text -> V1beta1DeviceAllocationConfiguration
V1beta1DeviceAllocationConfiguration
      (Maybe V1beta1OpaqueDeviceConfiguration
 -> Maybe [Text] -> Text -> V1beta1DeviceAllocationConfiguration)
-> Parser (Maybe V1beta1OpaqueDeviceConfiguration)
-> Parser
     (Maybe [Text] -> Text -> V1beta1DeviceAllocationConfiguration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1beta1OpaqueDeviceConfiguration)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"opaque")
      Parser
  (Maybe [Text] -> Text -> V1beta1DeviceAllocationConfiguration)
-> Parser (Maybe [Text])
-> Parser (Text -> V1beta1DeviceAllocationConfiguration)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"requests")
      Parser (Text -> V1beta1DeviceAllocationConfiguration)
-> Parser Text -> Parser V1beta1DeviceAllocationConfiguration
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"source")

-- | ToJSON V1beta1DeviceAllocationConfiguration
instance A.ToJSON V1beta1DeviceAllocationConfiguration where
  toJSON :: V1beta1DeviceAllocationConfiguration -> Value
toJSON V1beta1DeviceAllocationConfiguration {Maybe [Text]
Maybe V1beta1OpaqueDeviceConfiguration
Text
$sel:v1beta1DeviceAllocationConfigurationOpaque:V1beta1DeviceAllocationConfiguration :: V1beta1DeviceAllocationConfiguration
-> Maybe V1beta1OpaqueDeviceConfiguration
$sel:v1beta1DeviceAllocationConfigurationRequests:V1beta1DeviceAllocationConfiguration :: V1beta1DeviceAllocationConfiguration -> Maybe [Text]
$sel:v1beta1DeviceAllocationConfigurationSource:V1beta1DeviceAllocationConfiguration :: V1beta1DeviceAllocationConfiguration -> Text
v1beta1DeviceAllocationConfigurationOpaque :: Maybe V1beta1OpaqueDeviceConfiguration
v1beta1DeviceAllocationConfigurationRequests :: Maybe [Text]
v1beta1DeviceAllocationConfigurationSource :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"opaque" Key -> Maybe V1beta1OpaqueDeviceConfiguration -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1beta1OpaqueDeviceConfiguration
v1beta1DeviceAllocationConfigurationOpaque
      , Key
"requests" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1beta1DeviceAllocationConfigurationRequests
      , Key
"source" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1beta1DeviceAllocationConfigurationSource
      ]


-- | Construct a value of type 'V1beta1DeviceAllocationConfiguration' (by applying it's required fields, if any)
mkV1beta1DeviceAllocationConfiguration
  :: Text -- ^ 'v1beta1DeviceAllocationConfigurationSource': Source records whether the configuration comes from a class and thus is not something that a normal user would have been able to set or from a claim.
  -> V1beta1DeviceAllocationConfiguration
mkV1beta1DeviceAllocationConfiguration :: Text -> V1beta1DeviceAllocationConfiguration
mkV1beta1DeviceAllocationConfiguration Text
v1beta1DeviceAllocationConfigurationSource =
  V1beta1DeviceAllocationConfiguration
  { $sel:v1beta1DeviceAllocationConfigurationOpaque:V1beta1DeviceAllocationConfiguration :: Maybe V1beta1OpaqueDeviceConfiguration
v1beta1DeviceAllocationConfigurationOpaque = Maybe V1beta1OpaqueDeviceConfiguration
forall a. Maybe a
Nothing
  , $sel:v1beta1DeviceAllocationConfigurationRequests:V1beta1DeviceAllocationConfiguration :: Maybe [Text]
v1beta1DeviceAllocationConfigurationRequests = Maybe [Text]
forall a. Maybe a
Nothing
  , Text
$sel:v1beta1DeviceAllocationConfigurationSource:V1beta1DeviceAllocationConfiguration :: Text
v1beta1DeviceAllocationConfigurationSource :: Text
v1beta1DeviceAllocationConfigurationSource
  }

-- ** V1beta1DeviceAllocationResult
-- | V1beta1DeviceAllocationResult
-- DeviceAllocationResult is the result of allocating devices.
data V1beta1DeviceAllocationResult = V1beta1DeviceAllocationResult
  { V1beta1DeviceAllocationResult
-> Maybe [V1beta1DeviceAllocationConfiguration]
v1beta1DeviceAllocationResultConfig :: !(Maybe [V1beta1DeviceAllocationConfiguration]) -- ^ "config" - This field is a combination of all the claim and class configuration parameters. Drivers can distinguish between those based on a flag.  This includes configuration parameters for drivers which have no allocated devices in the result because it is up to the drivers which configuration parameters they support. They can silently ignore unknown configuration parameters.
  , V1beta1DeviceAllocationResult
-> Maybe [V1beta1DeviceRequestAllocationResult]
v1beta1DeviceAllocationResultResults :: !(Maybe [V1beta1DeviceRequestAllocationResult]) -- ^ "results" - Results lists all allocated devices.
  } deriving (Int -> V1beta1DeviceAllocationResult -> ShowS
[V1beta1DeviceAllocationResult] -> ShowS
V1beta1DeviceAllocationResult -> String
(Int -> V1beta1DeviceAllocationResult -> ShowS)
-> (V1beta1DeviceAllocationResult -> String)
-> ([V1beta1DeviceAllocationResult] -> ShowS)
-> Show V1beta1DeviceAllocationResult
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1DeviceAllocationResult -> ShowS
showsPrec :: Int -> V1beta1DeviceAllocationResult -> ShowS
$cshow :: V1beta1DeviceAllocationResult -> String
show :: V1beta1DeviceAllocationResult -> String
$cshowList :: [V1beta1DeviceAllocationResult] -> ShowS
showList :: [V1beta1DeviceAllocationResult] -> ShowS
P.Show, V1beta1DeviceAllocationResult
-> V1beta1DeviceAllocationResult -> Bool
(V1beta1DeviceAllocationResult
 -> V1beta1DeviceAllocationResult -> Bool)
-> (V1beta1DeviceAllocationResult
    -> V1beta1DeviceAllocationResult -> Bool)
-> Eq V1beta1DeviceAllocationResult
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1DeviceAllocationResult
-> V1beta1DeviceAllocationResult -> Bool
== :: V1beta1DeviceAllocationResult
-> V1beta1DeviceAllocationResult -> Bool
$c/= :: V1beta1DeviceAllocationResult
-> V1beta1DeviceAllocationResult -> Bool
/= :: V1beta1DeviceAllocationResult
-> V1beta1DeviceAllocationResult -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1DeviceAllocationResult
instance A.FromJSON V1beta1DeviceAllocationResult where
  parseJSON :: Value -> Parser V1beta1DeviceAllocationResult
parseJSON = String
-> (Object -> Parser V1beta1DeviceAllocationResult)
-> Value
-> Parser V1beta1DeviceAllocationResult
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1DeviceAllocationResult" ((Object -> Parser V1beta1DeviceAllocationResult)
 -> Value -> Parser V1beta1DeviceAllocationResult)
-> (Object -> Parser V1beta1DeviceAllocationResult)
-> Value
-> Parser V1beta1DeviceAllocationResult
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1beta1DeviceAllocationConfiguration]
-> Maybe [V1beta1DeviceRequestAllocationResult]
-> V1beta1DeviceAllocationResult
V1beta1DeviceAllocationResult
      (Maybe [V1beta1DeviceAllocationConfiguration]
 -> Maybe [V1beta1DeviceRequestAllocationResult]
 -> V1beta1DeviceAllocationResult)
-> Parser (Maybe [V1beta1DeviceAllocationConfiguration])
-> Parser
     (Maybe [V1beta1DeviceRequestAllocationResult]
      -> V1beta1DeviceAllocationResult)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object
-> Key -> Parser (Maybe [V1beta1DeviceAllocationConfiguration])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"config")
      Parser
  (Maybe [V1beta1DeviceRequestAllocationResult]
   -> V1beta1DeviceAllocationResult)
-> Parser (Maybe [V1beta1DeviceRequestAllocationResult])
-> Parser V1beta1DeviceAllocationResult
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object
-> Key -> Parser (Maybe [V1beta1DeviceRequestAllocationResult])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"results")

-- | ToJSON V1beta1DeviceAllocationResult
instance A.ToJSON V1beta1DeviceAllocationResult where
  toJSON :: V1beta1DeviceAllocationResult -> Value
toJSON V1beta1DeviceAllocationResult {Maybe [V1beta1DeviceRequestAllocationResult]
Maybe [V1beta1DeviceAllocationConfiguration]
$sel:v1beta1DeviceAllocationResultConfig:V1beta1DeviceAllocationResult :: V1beta1DeviceAllocationResult
-> Maybe [V1beta1DeviceAllocationConfiguration]
$sel:v1beta1DeviceAllocationResultResults:V1beta1DeviceAllocationResult :: V1beta1DeviceAllocationResult
-> Maybe [V1beta1DeviceRequestAllocationResult]
v1beta1DeviceAllocationResultConfig :: Maybe [V1beta1DeviceAllocationConfiguration]
v1beta1DeviceAllocationResultResults :: Maybe [V1beta1DeviceRequestAllocationResult]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"config" Key -> Maybe [V1beta1DeviceAllocationConfiguration] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1beta1DeviceAllocationConfiguration]
v1beta1DeviceAllocationResultConfig
      , Key
"results" Key -> Maybe [V1beta1DeviceRequestAllocationResult] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1beta1DeviceRequestAllocationResult]
v1beta1DeviceAllocationResultResults
      ]


-- | Construct a value of type 'V1beta1DeviceAllocationResult' (by applying it's required fields, if any)
mkV1beta1DeviceAllocationResult
  :: V1beta1DeviceAllocationResult
mkV1beta1DeviceAllocationResult :: V1beta1DeviceAllocationResult
mkV1beta1DeviceAllocationResult =
  V1beta1DeviceAllocationResult
  { $sel:v1beta1DeviceAllocationResultConfig:V1beta1DeviceAllocationResult :: Maybe [V1beta1DeviceAllocationConfiguration]
v1beta1DeviceAllocationResultConfig = Maybe [V1beta1DeviceAllocationConfiguration]
forall a. Maybe a
Nothing
  , $sel:v1beta1DeviceAllocationResultResults:V1beta1DeviceAllocationResult :: Maybe [V1beta1DeviceRequestAllocationResult]
v1beta1DeviceAllocationResultResults = Maybe [V1beta1DeviceRequestAllocationResult]
forall a. Maybe a
Nothing
  }

-- ** V1beta1DeviceAttribute
-- | V1beta1DeviceAttribute
-- DeviceAttribute must have exactly one field set.
data V1beta1DeviceAttribute = V1beta1DeviceAttribute
  { V1beta1DeviceAttribute -> Maybe Bool
v1beta1DeviceAttributeBool :: !(Maybe Bool) -- ^ "bool" - BoolValue is a true/false value.
  , V1beta1DeviceAttribute -> Maybe Integer
v1beta1DeviceAttributeInt :: !(Maybe Integer) -- ^ "int" - IntValue is a number.
  , V1beta1DeviceAttribute -> Maybe Text
v1beta1DeviceAttributeString :: !(Maybe Text) -- ^ "string" - StringValue is a string. Must not be longer than 64 characters.
  , V1beta1DeviceAttribute -> Maybe Text
v1beta1DeviceAttributeVersion :: !(Maybe Text) -- ^ "version" - VersionValue is a semantic version according to semver.org spec 2.0.0. Must not be longer than 64 characters.
  } deriving (Int -> V1beta1DeviceAttribute -> ShowS
[V1beta1DeviceAttribute] -> ShowS
V1beta1DeviceAttribute -> String
(Int -> V1beta1DeviceAttribute -> ShowS)
-> (V1beta1DeviceAttribute -> String)
-> ([V1beta1DeviceAttribute] -> ShowS)
-> Show V1beta1DeviceAttribute
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1DeviceAttribute -> ShowS
showsPrec :: Int -> V1beta1DeviceAttribute -> ShowS
$cshow :: V1beta1DeviceAttribute -> String
show :: V1beta1DeviceAttribute -> String
$cshowList :: [V1beta1DeviceAttribute] -> ShowS
showList :: [V1beta1DeviceAttribute] -> ShowS
P.Show, V1beta1DeviceAttribute -> V1beta1DeviceAttribute -> Bool
(V1beta1DeviceAttribute -> V1beta1DeviceAttribute -> Bool)
-> (V1beta1DeviceAttribute -> V1beta1DeviceAttribute -> Bool)
-> Eq V1beta1DeviceAttribute
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1DeviceAttribute -> V1beta1DeviceAttribute -> Bool
== :: V1beta1DeviceAttribute -> V1beta1DeviceAttribute -> Bool
$c/= :: V1beta1DeviceAttribute -> V1beta1DeviceAttribute -> Bool
/= :: V1beta1DeviceAttribute -> V1beta1DeviceAttribute -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1DeviceAttribute
instance A.FromJSON V1beta1DeviceAttribute where
  parseJSON :: Value -> Parser V1beta1DeviceAttribute
parseJSON = String
-> (Object -> Parser V1beta1DeviceAttribute)
-> Value
-> Parser V1beta1DeviceAttribute
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1DeviceAttribute" ((Object -> Parser V1beta1DeviceAttribute)
 -> Value -> Parser V1beta1DeviceAttribute)
-> (Object -> Parser V1beta1DeviceAttribute)
-> Value
-> Parser V1beta1DeviceAttribute
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Bool
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> V1beta1DeviceAttribute
V1beta1DeviceAttribute
      (Maybe Bool
 -> Maybe Integer
 -> Maybe Text
 -> Maybe Text
 -> V1beta1DeviceAttribute)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Integer
      -> Maybe Text -> Maybe Text -> V1beta1DeviceAttribute)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"bool")
      Parser
  (Maybe Integer
   -> Maybe Text -> Maybe Text -> V1beta1DeviceAttribute)
-> Parser (Maybe Integer)
-> Parser (Maybe Text -> Maybe Text -> V1beta1DeviceAttribute)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"int")
      Parser (Maybe Text -> Maybe Text -> V1beta1DeviceAttribute)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> V1beta1DeviceAttribute)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"string")
      Parser (Maybe Text -> V1beta1DeviceAttribute)
-> Parser (Maybe Text) -> Parser V1beta1DeviceAttribute
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"version")

-- | ToJSON V1beta1DeviceAttribute
instance A.ToJSON V1beta1DeviceAttribute where
  toJSON :: V1beta1DeviceAttribute -> Value
toJSON V1beta1DeviceAttribute {Maybe Bool
Maybe Integer
Maybe Text
$sel:v1beta1DeviceAttributeBool:V1beta1DeviceAttribute :: V1beta1DeviceAttribute -> Maybe Bool
$sel:v1beta1DeviceAttributeInt:V1beta1DeviceAttribute :: V1beta1DeviceAttribute -> Maybe Integer
$sel:v1beta1DeviceAttributeString:V1beta1DeviceAttribute :: V1beta1DeviceAttribute -> Maybe Text
$sel:v1beta1DeviceAttributeVersion:V1beta1DeviceAttribute :: V1beta1DeviceAttribute -> Maybe Text
v1beta1DeviceAttributeBool :: Maybe Bool
v1beta1DeviceAttributeInt :: Maybe Integer
v1beta1DeviceAttributeString :: Maybe Text
v1beta1DeviceAttributeVersion :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"bool" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1beta1DeviceAttributeBool
      , Key
"int" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1beta1DeviceAttributeInt
      , Key
"string" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1DeviceAttributeString
      , Key
"version" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1DeviceAttributeVersion
      ]


-- | Construct a value of type 'V1beta1DeviceAttribute' (by applying it's required fields, if any)
mkV1beta1DeviceAttribute
  :: V1beta1DeviceAttribute
mkV1beta1DeviceAttribute :: V1beta1DeviceAttribute
mkV1beta1DeviceAttribute =
  V1beta1DeviceAttribute
  { $sel:v1beta1DeviceAttributeBool:V1beta1DeviceAttribute :: Maybe Bool
v1beta1DeviceAttributeBool = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1beta1DeviceAttributeInt:V1beta1DeviceAttribute :: Maybe Integer
v1beta1DeviceAttributeInt = Maybe Integer
forall a. Maybe a
Nothing
  , $sel:v1beta1DeviceAttributeString:V1beta1DeviceAttribute :: Maybe Text
v1beta1DeviceAttributeString = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1DeviceAttributeVersion:V1beta1DeviceAttribute :: Maybe Text
v1beta1DeviceAttributeVersion = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1beta1DeviceCapacity
-- | V1beta1DeviceCapacity
-- DeviceCapacity describes a quantity associated with a device.
data V1beta1DeviceCapacity = V1beta1DeviceCapacity
  { V1beta1DeviceCapacity -> Quantity
v1beta1DeviceCapacityValue :: !(Quantity) -- ^ /Required/ "value"
  } deriving (Int -> V1beta1DeviceCapacity -> ShowS
[V1beta1DeviceCapacity] -> ShowS
V1beta1DeviceCapacity -> String
(Int -> V1beta1DeviceCapacity -> ShowS)
-> (V1beta1DeviceCapacity -> String)
-> ([V1beta1DeviceCapacity] -> ShowS)
-> Show V1beta1DeviceCapacity
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1DeviceCapacity -> ShowS
showsPrec :: Int -> V1beta1DeviceCapacity -> ShowS
$cshow :: V1beta1DeviceCapacity -> String
show :: V1beta1DeviceCapacity -> String
$cshowList :: [V1beta1DeviceCapacity] -> ShowS
showList :: [V1beta1DeviceCapacity] -> ShowS
P.Show, V1beta1DeviceCapacity -> V1beta1DeviceCapacity -> Bool
(V1beta1DeviceCapacity -> V1beta1DeviceCapacity -> Bool)
-> (V1beta1DeviceCapacity -> V1beta1DeviceCapacity -> Bool)
-> Eq V1beta1DeviceCapacity
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1DeviceCapacity -> V1beta1DeviceCapacity -> Bool
== :: V1beta1DeviceCapacity -> V1beta1DeviceCapacity -> Bool
$c/= :: V1beta1DeviceCapacity -> V1beta1DeviceCapacity -> Bool
/= :: V1beta1DeviceCapacity -> V1beta1DeviceCapacity -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1DeviceCapacity
instance A.FromJSON V1beta1DeviceCapacity where
  parseJSON :: Value -> Parser V1beta1DeviceCapacity
parseJSON = String
-> (Object -> Parser V1beta1DeviceCapacity)
-> Value
-> Parser V1beta1DeviceCapacity
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1DeviceCapacity" ((Object -> Parser V1beta1DeviceCapacity)
 -> Value -> Parser V1beta1DeviceCapacity)
-> (Object -> Parser V1beta1DeviceCapacity)
-> Value
-> Parser V1beta1DeviceCapacity
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Quantity -> V1beta1DeviceCapacity
V1beta1DeviceCapacity
      (Quantity -> V1beta1DeviceCapacity)
-> Parser Quantity -> Parser V1beta1DeviceCapacity
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Quantity
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"value")

-- | ToJSON V1beta1DeviceCapacity
instance A.ToJSON V1beta1DeviceCapacity where
  toJSON :: V1beta1DeviceCapacity -> Value
toJSON V1beta1DeviceCapacity {Quantity
$sel:v1beta1DeviceCapacityValue:V1beta1DeviceCapacity :: V1beta1DeviceCapacity -> Quantity
v1beta1DeviceCapacityValue :: Quantity
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"value" Key -> Quantity -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Quantity
v1beta1DeviceCapacityValue
      ]


-- | Construct a value of type 'V1beta1DeviceCapacity' (by applying it's required fields, if any)
mkV1beta1DeviceCapacity
  :: Quantity -- ^ 'v1beta1DeviceCapacityValue' 
  -> V1beta1DeviceCapacity
mkV1beta1DeviceCapacity :: Quantity -> V1beta1DeviceCapacity
mkV1beta1DeviceCapacity Quantity
v1beta1DeviceCapacityValue =
  V1beta1DeviceCapacity
  { Quantity
$sel:v1beta1DeviceCapacityValue:V1beta1DeviceCapacity :: Quantity
v1beta1DeviceCapacityValue :: Quantity
v1beta1DeviceCapacityValue
  }

-- ** V1beta1DeviceClaim
-- | V1beta1DeviceClaim
-- DeviceClaim defines how to request devices with a ResourceClaim.
data V1beta1DeviceClaim = V1beta1DeviceClaim
  { V1beta1DeviceClaim -> Maybe [V1beta1DeviceClaimConfiguration]
v1beta1DeviceClaimConfig :: !(Maybe [V1beta1DeviceClaimConfiguration]) -- ^ "config" - This field holds configuration for multiple potential drivers which could satisfy requests in this claim. It is ignored while allocating the claim.
  , V1beta1DeviceClaim -> Maybe [V1beta1DeviceConstraint]
v1beta1DeviceClaimConstraints :: !(Maybe [V1beta1DeviceConstraint]) -- ^ "constraints" - These constraints must be satisfied by the set of devices that get allocated for the claim.
  , V1beta1DeviceClaim -> Maybe [V1beta1DeviceRequest]
v1beta1DeviceClaimRequests :: !(Maybe [V1beta1DeviceRequest]) -- ^ "requests" - Requests represent individual requests for distinct devices which must all be satisfied. If empty, nothing needs to be allocated.
  } deriving (Int -> V1beta1DeviceClaim -> ShowS
[V1beta1DeviceClaim] -> ShowS
V1beta1DeviceClaim -> String
(Int -> V1beta1DeviceClaim -> ShowS)
-> (V1beta1DeviceClaim -> String)
-> ([V1beta1DeviceClaim] -> ShowS)
-> Show V1beta1DeviceClaim
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1DeviceClaim -> ShowS
showsPrec :: Int -> V1beta1DeviceClaim -> ShowS
$cshow :: V1beta1DeviceClaim -> String
show :: V1beta1DeviceClaim -> String
$cshowList :: [V1beta1DeviceClaim] -> ShowS
showList :: [V1beta1DeviceClaim] -> ShowS
P.Show, V1beta1DeviceClaim -> V1beta1DeviceClaim -> Bool
(V1beta1DeviceClaim -> V1beta1DeviceClaim -> Bool)
-> (V1beta1DeviceClaim -> V1beta1DeviceClaim -> Bool)
-> Eq V1beta1DeviceClaim
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1DeviceClaim -> V1beta1DeviceClaim -> Bool
== :: V1beta1DeviceClaim -> V1beta1DeviceClaim -> Bool
$c/= :: V1beta1DeviceClaim -> V1beta1DeviceClaim -> Bool
/= :: V1beta1DeviceClaim -> V1beta1DeviceClaim -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1DeviceClaim
instance A.FromJSON V1beta1DeviceClaim where
  parseJSON :: Value -> Parser V1beta1DeviceClaim
parseJSON = String
-> (Object -> Parser V1beta1DeviceClaim)
-> Value
-> Parser V1beta1DeviceClaim
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1DeviceClaim" ((Object -> Parser V1beta1DeviceClaim)
 -> Value -> Parser V1beta1DeviceClaim)
-> (Object -> Parser V1beta1DeviceClaim)
-> Value
-> Parser V1beta1DeviceClaim
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1beta1DeviceClaimConfiguration]
-> Maybe [V1beta1DeviceConstraint]
-> Maybe [V1beta1DeviceRequest]
-> V1beta1DeviceClaim
V1beta1DeviceClaim
      (Maybe [V1beta1DeviceClaimConfiguration]
 -> Maybe [V1beta1DeviceConstraint]
 -> Maybe [V1beta1DeviceRequest]
 -> V1beta1DeviceClaim)
-> Parser (Maybe [V1beta1DeviceClaimConfiguration])
-> Parser
     (Maybe [V1beta1DeviceConstraint]
      -> Maybe [V1beta1DeviceRequest] -> V1beta1DeviceClaim)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1beta1DeviceClaimConfiguration])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"config")
      Parser
  (Maybe [V1beta1DeviceConstraint]
   -> Maybe [V1beta1DeviceRequest] -> V1beta1DeviceClaim)
-> Parser (Maybe [V1beta1DeviceConstraint])
-> Parser (Maybe [V1beta1DeviceRequest] -> V1beta1DeviceClaim)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1beta1DeviceConstraint])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"constraints")
      Parser (Maybe [V1beta1DeviceRequest] -> V1beta1DeviceClaim)
-> Parser (Maybe [V1beta1DeviceRequest])
-> Parser V1beta1DeviceClaim
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1beta1DeviceRequest])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"requests")

-- | ToJSON V1beta1DeviceClaim
instance A.ToJSON V1beta1DeviceClaim where
  toJSON :: V1beta1DeviceClaim -> Value
toJSON V1beta1DeviceClaim {Maybe [V1beta1DeviceRequest]
Maybe [V1beta1DeviceConstraint]
Maybe [V1beta1DeviceClaimConfiguration]
$sel:v1beta1DeviceClaimConfig:V1beta1DeviceClaim :: V1beta1DeviceClaim -> Maybe [V1beta1DeviceClaimConfiguration]
$sel:v1beta1DeviceClaimConstraints:V1beta1DeviceClaim :: V1beta1DeviceClaim -> Maybe [V1beta1DeviceConstraint]
$sel:v1beta1DeviceClaimRequests:V1beta1DeviceClaim :: V1beta1DeviceClaim -> Maybe [V1beta1DeviceRequest]
v1beta1DeviceClaimConfig :: Maybe [V1beta1DeviceClaimConfiguration]
v1beta1DeviceClaimConstraints :: Maybe [V1beta1DeviceConstraint]
v1beta1DeviceClaimRequests :: Maybe [V1beta1DeviceRequest]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"config" Key -> Maybe [V1beta1DeviceClaimConfiguration] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1beta1DeviceClaimConfiguration]
v1beta1DeviceClaimConfig
      , Key
"constraints" Key -> Maybe [V1beta1DeviceConstraint] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1beta1DeviceConstraint]
v1beta1DeviceClaimConstraints
      , Key
"requests" Key -> Maybe [V1beta1DeviceRequest] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1beta1DeviceRequest]
v1beta1DeviceClaimRequests
      ]


-- | Construct a value of type 'V1beta1DeviceClaim' (by applying it's required fields, if any)
mkV1beta1DeviceClaim
  :: V1beta1DeviceClaim
mkV1beta1DeviceClaim :: V1beta1DeviceClaim
mkV1beta1DeviceClaim =
  V1beta1DeviceClaim
  { $sel:v1beta1DeviceClaimConfig:V1beta1DeviceClaim :: Maybe [V1beta1DeviceClaimConfiguration]
v1beta1DeviceClaimConfig = Maybe [V1beta1DeviceClaimConfiguration]
forall a. Maybe a
Nothing
  , $sel:v1beta1DeviceClaimConstraints:V1beta1DeviceClaim :: Maybe [V1beta1DeviceConstraint]
v1beta1DeviceClaimConstraints = Maybe [V1beta1DeviceConstraint]
forall a. Maybe a
Nothing
  , $sel:v1beta1DeviceClaimRequests:V1beta1DeviceClaim :: Maybe [V1beta1DeviceRequest]
v1beta1DeviceClaimRequests = Maybe [V1beta1DeviceRequest]
forall a. Maybe a
Nothing
  }

-- ** V1beta1DeviceClaimConfiguration
-- | V1beta1DeviceClaimConfiguration
-- DeviceClaimConfiguration is used for configuration parameters in DeviceClaim.
data V1beta1DeviceClaimConfiguration = V1beta1DeviceClaimConfiguration
  { V1beta1DeviceClaimConfiguration
-> Maybe V1beta1OpaqueDeviceConfiguration
v1beta1DeviceClaimConfigurationOpaque :: !(Maybe V1beta1OpaqueDeviceConfiguration) -- ^ "opaque"
  , V1beta1DeviceClaimConfiguration -> Maybe [Text]
v1beta1DeviceClaimConfigurationRequests :: !(Maybe [Text]) -- ^ "requests" - Requests lists the names of requests where the configuration applies. If empty, it applies to all requests.
  } deriving (Int -> V1beta1DeviceClaimConfiguration -> ShowS
[V1beta1DeviceClaimConfiguration] -> ShowS
V1beta1DeviceClaimConfiguration -> String
(Int -> V1beta1DeviceClaimConfiguration -> ShowS)
-> (V1beta1DeviceClaimConfiguration -> String)
-> ([V1beta1DeviceClaimConfiguration] -> ShowS)
-> Show V1beta1DeviceClaimConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1DeviceClaimConfiguration -> ShowS
showsPrec :: Int -> V1beta1DeviceClaimConfiguration -> ShowS
$cshow :: V1beta1DeviceClaimConfiguration -> String
show :: V1beta1DeviceClaimConfiguration -> String
$cshowList :: [V1beta1DeviceClaimConfiguration] -> ShowS
showList :: [V1beta1DeviceClaimConfiguration] -> ShowS
P.Show, V1beta1DeviceClaimConfiguration
-> V1beta1DeviceClaimConfiguration -> Bool
(V1beta1DeviceClaimConfiguration
 -> V1beta1DeviceClaimConfiguration -> Bool)
-> (V1beta1DeviceClaimConfiguration
    -> V1beta1DeviceClaimConfiguration -> Bool)
-> Eq V1beta1DeviceClaimConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1DeviceClaimConfiguration
-> V1beta1DeviceClaimConfiguration -> Bool
== :: V1beta1DeviceClaimConfiguration
-> V1beta1DeviceClaimConfiguration -> Bool
$c/= :: V1beta1DeviceClaimConfiguration
-> V1beta1DeviceClaimConfiguration -> Bool
/= :: V1beta1DeviceClaimConfiguration
-> V1beta1DeviceClaimConfiguration -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1DeviceClaimConfiguration
instance A.FromJSON V1beta1DeviceClaimConfiguration where
  parseJSON :: Value -> Parser V1beta1DeviceClaimConfiguration
parseJSON = String
-> (Object -> Parser V1beta1DeviceClaimConfiguration)
-> Value
-> Parser V1beta1DeviceClaimConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1DeviceClaimConfiguration" ((Object -> Parser V1beta1DeviceClaimConfiguration)
 -> Value -> Parser V1beta1DeviceClaimConfiguration)
-> (Object -> Parser V1beta1DeviceClaimConfiguration)
-> Value
-> Parser V1beta1DeviceClaimConfiguration
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1beta1OpaqueDeviceConfiguration
-> Maybe [Text] -> V1beta1DeviceClaimConfiguration
V1beta1DeviceClaimConfiguration
      (Maybe V1beta1OpaqueDeviceConfiguration
 -> Maybe [Text] -> V1beta1DeviceClaimConfiguration)
-> Parser (Maybe V1beta1OpaqueDeviceConfiguration)
-> Parser (Maybe [Text] -> V1beta1DeviceClaimConfiguration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1beta1OpaqueDeviceConfiguration)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"opaque")
      Parser (Maybe [Text] -> V1beta1DeviceClaimConfiguration)
-> Parser (Maybe [Text]) -> Parser V1beta1DeviceClaimConfiguration
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"requests")

-- | ToJSON V1beta1DeviceClaimConfiguration
instance A.ToJSON V1beta1DeviceClaimConfiguration where
  toJSON :: V1beta1DeviceClaimConfiguration -> Value
toJSON V1beta1DeviceClaimConfiguration {Maybe [Text]
Maybe V1beta1OpaqueDeviceConfiguration
$sel:v1beta1DeviceClaimConfigurationOpaque:V1beta1DeviceClaimConfiguration :: V1beta1DeviceClaimConfiguration
-> Maybe V1beta1OpaqueDeviceConfiguration
$sel:v1beta1DeviceClaimConfigurationRequests:V1beta1DeviceClaimConfiguration :: V1beta1DeviceClaimConfiguration -> Maybe [Text]
v1beta1DeviceClaimConfigurationOpaque :: Maybe V1beta1OpaqueDeviceConfiguration
v1beta1DeviceClaimConfigurationRequests :: Maybe [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"opaque" Key -> Maybe V1beta1OpaqueDeviceConfiguration -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1beta1OpaqueDeviceConfiguration
v1beta1DeviceClaimConfigurationOpaque
      , Key
"requests" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1beta1DeviceClaimConfigurationRequests
      ]


-- | Construct a value of type 'V1beta1DeviceClaimConfiguration' (by applying it's required fields, if any)
mkV1beta1DeviceClaimConfiguration
  :: V1beta1DeviceClaimConfiguration
mkV1beta1DeviceClaimConfiguration :: V1beta1DeviceClaimConfiguration
mkV1beta1DeviceClaimConfiguration =
  V1beta1DeviceClaimConfiguration
  { $sel:v1beta1DeviceClaimConfigurationOpaque:V1beta1DeviceClaimConfiguration :: Maybe V1beta1OpaqueDeviceConfiguration
v1beta1DeviceClaimConfigurationOpaque = Maybe V1beta1OpaqueDeviceConfiguration
forall a. Maybe a
Nothing
  , $sel:v1beta1DeviceClaimConfigurationRequests:V1beta1DeviceClaimConfiguration :: Maybe [Text]
v1beta1DeviceClaimConfigurationRequests = Maybe [Text]
forall a. Maybe a
Nothing
  }

-- ** V1beta1DeviceClass
-- | V1beta1DeviceClass
-- DeviceClass is a vendor- or admin-provided resource that contains device configuration and selectors. It can be referenced in the device requests of a claim to apply these presets. Cluster scoped.  This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.
data V1beta1DeviceClass = V1beta1DeviceClass
  { V1beta1DeviceClass -> Maybe Text
v1beta1DeviceClassApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1beta1DeviceClass -> Maybe Text
v1beta1DeviceClassKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1beta1DeviceClass -> Maybe V1ObjectMeta
v1beta1DeviceClassMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1beta1DeviceClass -> V1beta1DeviceClassSpec
v1beta1DeviceClassSpec :: !(V1beta1DeviceClassSpec) -- ^ /Required/ "spec"
  } deriving (Int -> V1beta1DeviceClass -> ShowS
[V1beta1DeviceClass] -> ShowS
V1beta1DeviceClass -> String
(Int -> V1beta1DeviceClass -> ShowS)
-> (V1beta1DeviceClass -> String)
-> ([V1beta1DeviceClass] -> ShowS)
-> Show V1beta1DeviceClass
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1DeviceClass -> ShowS
showsPrec :: Int -> V1beta1DeviceClass -> ShowS
$cshow :: V1beta1DeviceClass -> String
show :: V1beta1DeviceClass -> String
$cshowList :: [V1beta1DeviceClass] -> ShowS
showList :: [V1beta1DeviceClass] -> ShowS
P.Show, V1beta1DeviceClass -> V1beta1DeviceClass -> Bool
(V1beta1DeviceClass -> V1beta1DeviceClass -> Bool)
-> (V1beta1DeviceClass -> V1beta1DeviceClass -> Bool)
-> Eq V1beta1DeviceClass
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1DeviceClass -> V1beta1DeviceClass -> Bool
== :: V1beta1DeviceClass -> V1beta1DeviceClass -> Bool
$c/= :: V1beta1DeviceClass -> V1beta1DeviceClass -> Bool
/= :: V1beta1DeviceClass -> V1beta1DeviceClass -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1DeviceClass
instance A.FromJSON V1beta1DeviceClass where
  parseJSON :: Value -> Parser V1beta1DeviceClass
parseJSON = String
-> (Object -> Parser V1beta1DeviceClass)
-> Value
-> Parser V1beta1DeviceClass
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1DeviceClass" ((Object -> Parser V1beta1DeviceClass)
 -> Value -> Parser V1beta1DeviceClass)
-> (Object -> Parser V1beta1DeviceClass)
-> Value
-> Parser V1beta1DeviceClass
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> V1beta1DeviceClassSpec
-> V1beta1DeviceClass
V1beta1DeviceClass
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> V1beta1DeviceClassSpec
 -> V1beta1DeviceClass)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> V1beta1DeviceClassSpec
      -> V1beta1DeviceClass)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> V1beta1DeviceClassSpec
   -> V1beta1DeviceClass)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> V1beta1DeviceClassSpec -> V1beta1DeviceClass)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> V1beta1DeviceClassSpec -> V1beta1DeviceClass)
-> Parser (Maybe V1ObjectMeta)
-> Parser (V1beta1DeviceClassSpec -> V1beta1DeviceClass)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (V1beta1DeviceClassSpec -> V1beta1DeviceClass)
-> Parser V1beta1DeviceClassSpec -> Parser V1beta1DeviceClass
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1beta1DeviceClassSpec
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"spec")

-- | ToJSON V1beta1DeviceClass
instance A.ToJSON V1beta1DeviceClass where
  toJSON :: V1beta1DeviceClass -> Value
toJSON V1beta1DeviceClass {Maybe Text
Maybe V1ObjectMeta
V1beta1DeviceClassSpec
$sel:v1beta1DeviceClassApiVersion:V1beta1DeviceClass :: V1beta1DeviceClass -> Maybe Text
$sel:v1beta1DeviceClassKind:V1beta1DeviceClass :: V1beta1DeviceClass -> Maybe Text
$sel:v1beta1DeviceClassMetadata:V1beta1DeviceClass :: V1beta1DeviceClass -> Maybe V1ObjectMeta
$sel:v1beta1DeviceClassSpec:V1beta1DeviceClass :: V1beta1DeviceClass -> V1beta1DeviceClassSpec
v1beta1DeviceClassApiVersion :: Maybe Text
v1beta1DeviceClassKind :: Maybe Text
v1beta1DeviceClassMetadata :: Maybe V1ObjectMeta
v1beta1DeviceClassSpec :: V1beta1DeviceClassSpec
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1DeviceClassApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1DeviceClassKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1beta1DeviceClassMetadata
      , Key
"spec" Key -> V1beta1DeviceClassSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1beta1DeviceClassSpec
v1beta1DeviceClassSpec
      ]


-- | Construct a value of type 'V1beta1DeviceClass' (by applying it's required fields, if any)
mkV1beta1DeviceClass
  :: V1beta1DeviceClassSpec -- ^ 'v1beta1DeviceClassSpec' 
  -> V1beta1DeviceClass
mkV1beta1DeviceClass :: V1beta1DeviceClassSpec -> V1beta1DeviceClass
mkV1beta1DeviceClass V1beta1DeviceClassSpec
v1beta1DeviceClassSpec =
  V1beta1DeviceClass
  { $sel:v1beta1DeviceClassApiVersion:V1beta1DeviceClass :: Maybe Text
v1beta1DeviceClassApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1DeviceClassKind:V1beta1DeviceClass :: Maybe Text
v1beta1DeviceClassKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1DeviceClassMetadata:V1beta1DeviceClass :: Maybe V1ObjectMeta
v1beta1DeviceClassMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , V1beta1DeviceClassSpec
$sel:v1beta1DeviceClassSpec:V1beta1DeviceClass :: V1beta1DeviceClassSpec
v1beta1DeviceClassSpec :: V1beta1DeviceClassSpec
v1beta1DeviceClassSpec
  }

-- ** V1beta1DeviceClassConfiguration
-- | V1beta1DeviceClassConfiguration
-- DeviceClassConfiguration is used in DeviceClass.
data V1beta1DeviceClassConfiguration = V1beta1DeviceClassConfiguration
  { V1beta1DeviceClassConfiguration
-> Maybe V1beta1OpaqueDeviceConfiguration
v1beta1DeviceClassConfigurationOpaque :: !(Maybe V1beta1OpaqueDeviceConfiguration) -- ^ "opaque"
  } deriving (Int -> V1beta1DeviceClassConfiguration -> ShowS
[V1beta1DeviceClassConfiguration] -> ShowS
V1beta1DeviceClassConfiguration -> String
(Int -> V1beta1DeviceClassConfiguration -> ShowS)
-> (V1beta1DeviceClassConfiguration -> String)
-> ([V1beta1DeviceClassConfiguration] -> ShowS)
-> Show V1beta1DeviceClassConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1DeviceClassConfiguration -> ShowS
showsPrec :: Int -> V1beta1DeviceClassConfiguration -> ShowS
$cshow :: V1beta1DeviceClassConfiguration -> String
show :: V1beta1DeviceClassConfiguration -> String
$cshowList :: [V1beta1DeviceClassConfiguration] -> ShowS
showList :: [V1beta1DeviceClassConfiguration] -> ShowS
P.Show, V1beta1DeviceClassConfiguration
-> V1beta1DeviceClassConfiguration -> Bool
(V1beta1DeviceClassConfiguration
 -> V1beta1DeviceClassConfiguration -> Bool)
-> (V1beta1DeviceClassConfiguration
    -> V1beta1DeviceClassConfiguration -> Bool)
-> Eq V1beta1DeviceClassConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1DeviceClassConfiguration
-> V1beta1DeviceClassConfiguration -> Bool
== :: V1beta1DeviceClassConfiguration
-> V1beta1DeviceClassConfiguration -> Bool
$c/= :: V1beta1DeviceClassConfiguration
-> V1beta1DeviceClassConfiguration -> Bool
/= :: V1beta1DeviceClassConfiguration
-> V1beta1DeviceClassConfiguration -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1DeviceClassConfiguration
instance A.FromJSON V1beta1DeviceClassConfiguration where
  parseJSON :: Value -> Parser V1beta1DeviceClassConfiguration
parseJSON = String
-> (Object -> Parser V1beta1DeviceClassConfiguration)
-> Value
-> Parser V1beta1DeviceClassConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1DeviceClassConfiguration" ((Object -> Parser V1beta1DeviceClassConfiguration)
 -> Value -> Parser V1beta1DeviceClassConfiguration)
-> (Object -> Parser V1beta1DeviceClassConfiguration)
-> Value
-> Parser V1beta1DeviceClassConfiguration
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1beta1OpaqueDeviceConfiguration
-> V1beta1DeviceClassConfiguration
V1beta1DeviceClassConfiguration
      (Maybe V1beta1OpaqueDeviceConfiguration
 -> V1beta1DeviceClassConfiguration)
-> Parser (Maybe V1beta1OpaqueDeviceConfiguration)
-> Parser V1beta1DeviceClassConfiguration
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1beta1OpaqueDeviceConfiguration)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"opaque")

-- | ToJSON V1beta1DeviceClassConfiguration
instance A.ToJSON V1beta1DeviceClassConfiguration where
  toJSON :: V1beta1DeviceClassConfiguration -> Value
toJSON V1beta1DeviceClassConfiguration {Maybe V1beta1OpaqueDeviceConfiguration
$sel:v1beta1DeviceClassConfigurationOpaque:V1beta1DeviceClassConfiguration :: V1beta1DeviceClassConfiguration
-> Maybe V1beta1OpaqueDeviceConfiguration
v1beta1DeviceClassConfigurationOpaque :: Maybe V1beta1OpaqueDeviceConfiguration
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"opaque" Key -> Maybe V1beta1OpaqueDeviceConfiguration -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1beta1OpaqueDeviceConfiguration
v1beta1DeviceClassConfigurationOpaque
      ]


-- | Construct a value of type 'V1beta1DeviceClassConfiguration' (by applying it's required fields, if any)
mkV1beta1DeviceClassConfiguration
  :: V1beta1DeviceClassConfiguration
mkV1beta1DeviceClassConfiguration :: V1beta1DeviceClassConfiguration
mkV1beta1DeviceClassConfiguration =
  V1beta1DeviceClassConfiguration
  { $sel:v1beta1DeviceClassConfigurationOpaque:V1beta1DeviceClassConfiguration :: Maybe V1beta1OpaqueDeviceConfiguration
v1beta1DeviceClassConfigurationOpaque = Maybe V1beta1OpaqueDeviceConfiguration
forall a. Maybe a
Nothing
  }

-- ** V1beta1DeviceClassList
-- | V1beta1DeviceClassList
-- DeviceClassList is a collection of classes.
data V1beta1DeviceClassList = V1beta1DeviceClassList
  { V1beta1DeviceClassList -> Maybe Text
v1beta1DeviceClassListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1beta1DeviceClassList -> [V1beta1DeviceClass]
v1beta1DeviceClassListItems :: !([V1beta1DeviceClass]) -- ^ /Required/ "items" - Items is the list of resource classes.
  , V1beta1DeviceClassList -> Maybe Text
v1beta1DeviceClassListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1beta1DeviceClassList -> Maybe V1ListMeta
v1beta1DeviceClassListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1beta1DeviceClassList -> ShowS
[V1beta1DeviceClassList] -> ShowS
V1beta1DeviceClassList -> String
(Int -> V1beta1DeviceClassList -> ShowS)
-> (V1beta1DeviceClassList -> String)
-> ([V1beta1DeviceClassList] -> ShowS)
-> Show V1beta1DeviceClassList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1DeviceClassList -> ShowS
showsPrec :: Int -> V1beta1DeviceClassList -> ShowS
$cshow :: V1beta1DeviceClassList -> String
show :: V1beta1DeviceClassList -> String
$cshowList :: [V1beta1DeviceClassList] -> ShowS
showList :: [V1beta1DeviceClassList] -> ShowS
P.Show, V1beta1DeviceClassList -> V1beta1DeviceClassList -> Bool
(V1beta1DeviceClassList -> V1beta1DeviceClassList -> Bool)
-> (V1beta1DeviceClassList -> V1beta1DeviceClassList -> Bool)
-> Eq V1beta1DeviceClassList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1DeviceClassList -> V1beta1DeviceClassList -> Bool
== :: V1beta1DeviceClassList -> V1beta1DeviceClassList -> Bool
$c/= :: V1beta1DeviceClassList -> V1beta1DeviceClassList -> Bool
/= :: V1beta1DeviceClassList -> V1beta1DeviceClassList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1DeviceClassList
instance A.FromJSON V1beta1DeviceClassList where
  parseJSON :: Value -> Parser V1beta1DeviceClassList
parseJSON = String
-> (Object -> Parser V1beta1DeviceClassList)
-> Value
-> Parser V1beta1DeviceClassList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1DeviceClassList" ((Object -> Parser V1beta1DeviceClassList)
 -> Value -> Parser V1beta1DeviceClassList)
-> (Object -> Parser V1beta1DeviceClassList)
-> Value
-> Parser V1beta1DeviceClassList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1beta1DeviceClass]
-> Maybe Text
-> Maybe V1ListMeta
-> V1beta1DeviceClassList
V1beta1DeviceClassList
      (Maybe Text
 -> [V1beta1DeviceClass]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1beta1DeviceClassList)
-> Parser (Maybe Text)
-> Parser
     ([V1beta1DeviceClass]
      -> Maybe Text -> Maybe V1ListMeta -> V1beta1DeviceClassList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1beta1DeviceClass]
   -> Maybe Text -> Maybe V1ListMeta -> V1beta1DeviceClassList)
-> Parser [V1beta1DeviceClass]
-> Parser
     (Maybe Text -> Maybe V1ListMeta -> V1beta1DeviceClassList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1beta1DeviceClass]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1beta1DeviceClassList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1beta1DeviceClassList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1beta1DeviceClassList)
-> Parser (Maybe V1ListMeta) -> Parser V1beta1DeviceClassList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1beta1DeviceClassList
instance A.ToJSON V1beta1DeviceClassList where
  toJSON :: V1beta1DeviceClassList -> Value
toJSON V1beta1DeviceClassList {[V1beta1DeviceClass]
Maybe Text
Maybe V1ListMeta
$sel:v1beta1DeviceClassListApiVersion:V1beta1DeviceClassList :: V1beta1DeviceClassList -> Maybe Text
$sel:v1beta1DeviceClassListItems:V1beta1DeviceClassList :: V1beta1DeviceClassList -> [V1beta1DeviceClass]
$sel:v1beta1DeviceClassListKind:V1beta1DeviceClassList :: V1beta1DeviceClassList -> Maybe Text
$sel:v1beta1DeviceClassListMetadata:V1beta1DeviceClassList :: V1beta1DeviceClassList -> Maybe V1ListMeta
v1beta1DeviceClassListApiVersion :: Maybe Text
v1beta1DeviceClassListItems :: [V1beta1DeviceClass]
v1beta1DeviceClassListKind :: Maybe Text
v1beta1DeviceClassListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1DeviceClassListApiVersion
      , Key
"items" Key -> [V1beta1DeviceClass] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1beta1DeviceClass]
v1beta1DeviceClassListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1DeviceClassListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1beta1DeviceClassListMetadata
      ]


-- | Construct a value of type 'V1beta1DeviceClassList' (by applying it's required fields, if any)
mkV1beta1DeviceClassList
  :: [V1beta1DeviceClass] -- ^ 'v1beta1DeviceClassListItems': Items is the list of resource classes.
  -> V1beta1DeviceClassList
mkV1beta1DeviceClassList :: [V1beta1DeviceClass] -> V1beta1DeviceClassList
mkV1beta1DeviceClassList [V1beta1DeviceClass]
v1beta1DeviceClassListItems =
  V1beta1DeviceClassList
  { $sel:v1beta1DeviceClassListApiVersion:V1beta1DeviceClassList :: Maybe Text
v1beta1DeviceClassListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1beta1DeviceClass]
$sel:v1beta1DeviceClassListItems:V1beta1DeviceClassList :: [V1beta1DeviceClass]
v1beta1DeviceClassListItems :: [V1beta1DeviceClass]
v1beta1DeviceClassListItems
  , $sel:v1beta1DeviceClassListKind:V1beta1DeviceClassList :: Maybe Text
v1beta1DeviceClassListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1DeviceClassListMetadata:V1beta1DeviceClassList :: Maybe V1ListMeta
v1beta1DeviceClassListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1beta1DeviceClassSpec
-- | V1beta1DeviceClassSpec
-- DeviceClassSpec is used in a [DeviceClass] to define what can be allocated and how to configure it.
data V1beta1DeviceClassSpec = V1beta1DeviceClassSpec
  { V1beta1DeviceClassSpec -> Maybe [V1beta1DeviceClassConfiguration]
v1beta1DeviceClassSpecConfig :: !(Maybe [V1beta1DeviceClassConfiguration]) -- ^ "config" - Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver.  They are passed to the driver, but are not considered while allocating the claim.
  , V1beta1DeviceClassSpec -> Maybe [V1beta1DeviceSelector]
v1beta1DeviceClassSpecSelectors :: !(Maybe [V1beta1DeviceSelector]) -- ^ "selectors" - Each selector must be satisfied by a device which is claimed via this class.
  } deriving (Int -> V1beta1DeviceClassSpec -> ShowS
[V1beta1DeviceClassSpec] -> ShowS
V1beta1DeviceClassSpec -> String
(Int -> V1beta1DeviceClassSpec -> ShowS)
-> (V1beta1DeviceClassSpec -> String)
-> ([V1beta1DeviceClassSpec] -> ShowS)
-> Show V1beta1DeviceClassSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1DeviceClassSpec -> ShowS
showsPrec :: Int -> V1beta1DeviceClassSpec -> ShowS
$cshow :: V1beta1DeviceClassSpec -> String
show :: V1beta1DeviceClassSpec -> String
$cshowList :: [V1beta1DeviceClassSpec] -> ShowS
showList :: [V1beta1DeviceClassSpec] -> ShowS
P.Show, V1beta1DeviceClassSpec -> V1beta1DeviceClassSpec -> Bool
(V1beta1DeviceClassSpec -> V1beta1DeviceClassSpec -> Bool)
-> (V1beta1DeviceClassSpec -> V1beta1DeviceClassSpec -> Bool)
-> Eq V1beta1DeviceClassSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1DeviceClassSpec -> V1beta1DeviceClassSpec -> Bool
== :: V1beta1DeviceClassSpec -> V1beta1DeviceClassSpec -> Bool
$c/= :: V1beta1DeviceClassSpec -> V1beta1DeviceClassSpec -> Bool
/= :: V1beta1DeviceClassSpec -> V1beta1DeviceClassSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1DeviceClassSpec
instance A.FromJSON V1beta1DeviceClassSpec where
  parseJSON :: Value -> Parser V1beta1DeviceClassSpec
parseJSON = String
-> (Object -> Parser V1beta1DeviceClassSpec)
-> Value
-> Parser V1beta1DeviceClassSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1DeviceClassSpec" ((Object -> Parser V1beta1DeviceClassSpec)
 -> Value -> Parser V1beta1DeviceClassSpec)
-> (Object -> Parser V1beta1DeviceClassSpec)
-> Value
-> Parser V1beta1DeviceClassSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1beta1DeviceClassConfiguration]
-> Maybe [V1beta1DeviceSelector] -> V1beta1DeviceClassSpec
V1beta1DeviceClassSpec
      (Maybe [V1beta1DeviceClassConfiguration]
 -> Maybe [V1beta1DeviceSelector] -> V1beta1DeviceClassSpec)
-> Parser (Maybe [V1beta1DeviceClassConfiguration])
-> Parser (Maybe [V1beta1DeviceSelector] -> V1beta1DeviceClassSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1beta1DeviceClassConfiguration])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"config")
      Parser (Maybe [V1beta1DeviceSelector] -> V1beta1DeviceClassSpec)
-> Parser (Maybe [V1beta1DeviceSelector])
-> Parser V1beta1DeviceClassSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1beta1DeviceSelector])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"selectors")

-- | ToJSON V1beta1DeviceClassSpec
instance A.ToJSON V1beta1DeviceClassSpec where
  toJSON :: V1beta1DeviceClassSpec -> Value
toJSON V1beta1DeviceClassSpec {Maybe [V1beta1DeviceSelector]
Maybe [V1beta1DeviceClassConfiguration]
$sel:v1beta1DeviceClassSpecConfig:V1beta1DeviceClassSpec :: V1beta1DeviceClassSpec -> Maybe [V1beta1DeviceClassConfiguration]
$sel:v1beta1DeviceClassSpecSelectors:V1beta1DeviceClassSpec :: V1beta1DeviceClassSpec -> Maybe [V1beta1DeviceSelector]
v1beta1DeviceClassSpecConfig :: Maybe [V1beta1DeviceClassConfiguration]
v1beta1DeviceClassSpecSelectors :: Maybe [V1beta1DeviceSelector]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"config" Key -> Maybe [V1beta1DeviceClassConfiguration] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1beta1DeviceClassConfiguration]
v1beta1DeviceClassSpecConfig
      , Key
"selectors" Key -> Maybe [V1beta1DeviceSelector] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1beta1DeviceSelector]
v1beta1DeviceClassSpecSelectors
      ]


-- | Construct a value of type 'V1beta1DeviceClassSpec' (by applying it's required fields, if any)
mkV1beta1DeviceClassSpec
  :: V1beta1DeviceClassSpec
mkV1beta1DeviceClassSpec :: V1beta1DeviceClassSpec
mkV1beta1DeviceClassSpec =
  V1beta1DeviceClassSpec
  { $sel:v1beta1DeviceClassSpecConfig:V1beta1DeviceClassSpec :: Maybe [V1beta1DeviceClassConfiguration]
v1beta1DeviceClassSpecConfig = Maybe [V1beta1DeviceClassConfiguration]
forall a. Maybe a
Nothing
  , $sel:v1beta1DeviceClassSpecSelectors:V1beta1DeviceClassSpec :: Maybe [V1beta1DeviceSelector]
v1beta1DeviceClassSpecSelectors = Maybe [V1beta1DeviceSelector]
forall a. Maybe a
Nothing
  }

-- ** V1beta1DeviceConstraint
-- | V1beta1DeviceConstraint
-- DeviceConstraint must have exactly one field set besides Requests.
data V1beta1DeviceConstraint = V1beta1DeviceConstraint
  { V1beta1DeviceConstraint -> Maybe Text
v1beta1DeviceConstraintMatchAttribute :: !(Maybe Text) -- ^ "matchAttribute" - MatchAttribute requires that all devices in question have this attribute and that its type and value are the same across those devices.  For example, if you specified \&quot;dra.example.com/numa\&quot; (a hypothetical example!), then only devices in the same NUMA node will be chosen. A device which does not have that attribute will not be chosen. All devices should use a value of the same type for this attribute because that is part of its specification, but if one device doesn&#39;t, then it also will not be chosen.  Must include the domain qualifier.
  , V1beta1DeviceConstraint -> Maybe [Text]
v1beta1DeviceConstraintRequests :: !(Maybe [Text]) -- ^ "requests" - Requests is a list of the one or more requests in this claim which must co-satisfy this constraint. If a request is fulfilled by multiple devices, then all of the devices must satisfy the constraint. If this is not specified, this constraint applies to all requests in this claim.
  } deriving (Int -> V1beta1DeviceConstraint -> ShowS
[V1beta1DeviceConstraint] -> ShowS
V1beta1DeviceConstraint -> String
(Int -> V1beta1DeviceConstraint -> ShowS)
-> (V1beta1DeviceConstraint -> String)
-> ([V1beta1DeviceConstraint] -> ShowS)
-> Show V1beta1DeviceConstraint
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1DeviceConstraint -> ShowS
showsPrec :: Int -> V1beta1DeviceConstraint -> ShowS
$cshow :: V1beta1DeviceConstraint -> String
show :: V1beta1DeviceConstraint -> String
$cshowList :: [V1beta1DeviceConstraint] -> ShowS
showList :: [V1beta1DeviceConstraint] -> ShowS
P.Show, V1beta1DeviceConstraint -> V1beta1DeviceConstraint -> Bool
(V1beta1DeviceConstraint -> V1beta1DeviceConstraint -> Bool)
-> (V1beta1DeviceConstraint -> V1beta1DeviceConstraint -> Bool)
-> Eq V1beta1DeviceConstraint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1DeviceConstraint -> V1beta1DeviceConstraint -> Bool
== :: V1beta1DeviceConstraint -> V1beta1DeviceConstraint -> Bool
$c/= :: V1beta1DeviceConstraint -> V1beta1DeviceConstraint -> Bool
/= :: V1beta1DeviceConstraint -> V1beta1DeviceConstraint -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1DeviceConstraint
instance A.FromJSON V1beta1DeviceConstraint where
  parseJSON :: Value -> Parser V1beta1DeviceConstraint
parseJSON = String
-> (Object -> Parser V1beta1DeviceConstraint)
-> Value
-> Parser V1beta1DeviceConstraint
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1DeviceConstraint" ((Object -> Parser V1beta1DeviceConstraint)
 -> Value -> Parser V1beta1DeviceConstraint)
-> (Object -> Parser V1beta1DeviceConstraint)
-> Value
-> Parser V1beta1DeviceConstraint
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Maybe [Text] -> V1beta1DeviceConstraint
V1beta1DeviceConstraint
      (Maybe Text -> Maybe [Text] -> V1beta1DeviceConstraint)
-> Parser (Maybe Text)
-> Parser (Maybe [Text] -> V1beta1DeviceConstraint)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"matchAttribute")
      Parser (Maybe [Text] -> V1beta1DeviceConstraint)
-> Parser (Maybe [Text]) -> Parser V1beta1DeviceConstraint
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"requests")

-- | ToJSON V1beta1DeviceConstraint
instance A.ToJSON V1beta1DeviceConstraint where
  toJSON :: V1beta1DeviceConstraint -> Value
toJSON V1beta1DeviceConstraint {Maybe [Text]
Maybe Text
$sel:v1beta1DeviceConstraintMatchAttribute:V1beta1DeviceConstraint :: V1beta1DeviceConstraint -> Maybe Text
$sel:v1beta1DeviceConstraintRequests:V1beta1DeviceConstraint :: V1beta1DeviceConstraint -> Maybe [Text]
v1beta1DeviceConstraintMatchAttribute :: Maybe Text
v1beta1DeviceConstraintRequests :: Maybe [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"matchAttribute" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1DeviceConstraintMatchAttribute
      , Key
"requests" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1beta1DeviceConstraintRequests
      ]


-- | Construct a value of type 'V1beta1DeviceConstraint' (by applying it's required fields, if any)
mkV1beta1DeviceConstraint
  :: V1beta1DeviceConstraint
mkV1beta1DeviceConstraint :: V1beta1DeviceConstraint
mkV1beta1DeviceConstraint =
  V1beta1DeviceConstraint
  { $sel:v1beta1DeviceConstraintMatchAttribute:V1beta1DeviceConstraint :: Maybe Text
v1beta1DeviceConstraintMatchAttribute = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1DeviceConstraintRequests:V1beta1DeviceConstraint :: Maybe [Text]
v1beta1DeviceConstraintRequests = Maybe [Text]
forall a. Maybe a
Nothing
  }

-- ** V1beta1DeviceRequest
-- | V1beta1DeviceRequest
-- DeviceRequest is a request for devices required for a claim. This is typically a request for a single resource like a device, but can also ask for several identical devices.  A DeviceClassName is currently required. Clients must check that it is indeed set. It's absence indicates that something changed in a way that is not supported by the client yet, in which case it must refuse to handle the request.
data V1beta1DeviceRequest = V1beta1DeviceRequest
  { V1beta1DeviceRequest -> Maybe Bool
v1beta1DeviceRequestAdminAccess :: !(Maybe Bool) -- ^ "adminAccess" - AdminAccess indicates that this is a claim for administrative access to the device(s). Claims with AdminAccess are expected to be used for monitoring or other management services for a device.  They ignore all ordinary claims to the device with respect to access modes and any resource allocations.  This is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled.
  , V1beta1DeviceRequest -> Maybe Text
v1beta1DeviceRequestAllocationMode :: !(Maybe Text) -- ^ "allocationMode" - AllocationMode and its related fields define how devices are allocated to satisfy this request. Supported values are:  - ExactCount: This request is for a specific number of devices.   This is the default. The exact number is provided in the   count field.  - All: This request is for all of the matching devices in a pool.   Allocation will fail if some devices are already allocated,   unless adminAccess is requested.  If AlloctionMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other requests must specify this field.  More modes may get added in the future. Clients must refuse to handle requests with unknown modes.
  , V1beta1DeviceRequest -> Maybe Integer
v1beta1DeviceRequestCount :: !(Maybe Integer) -- ^ "count" - Count is used only when the count mode is \&quot;ExactCount\&quot;. Must be greater than zero. If AllocationMode is ExactCount and this field is not specified, the default is one.
  , V1beta1DeviceRequest -> Text
v1beta1DeviceRequestDeviceClassName :: !(Text) -- ^ /Required/ "deviceClassName" - DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this request.  A class is required. Which classes are available depends on the cluster.  Administrators may use this to restrict which devices may get requested by only installing classes with selectors for permitted devices. If users are free to request anything without restrictions, then administrators can create an empty DeviceClass for users to reference.
  , V1beta1DeviceRequest -> Text
v1beta1DeviceRequestName :: !(Text) -- ^ /Required/ "name" - Name can be used to reference this request in a pod.spec.containers[].resources.claims entry and in a constraint of the claim.  Must be a DNS label.
  , V1beta1DeviceRequest -> Maybe [V1beta1DeviceSelector]
v1beta1DeviceRequestSelectors :: !(Maybe [V1beta1DeviceSelector]) -- ^ "selectors" - Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this request. All selectors must be satisfied for a device to be considered.
  } deriving (Int -> V1beta1DeviceRequest -> ShowS
[V1beta1DeviceRequest] -> ShowS
V1beta1DeviceRequest -> String
(Int -> V1beta1DeviceRequest -> ShowS)
-> (V1beta1DeviceRequest -> String)
-> ([V1beta1DeviceRequest] -> ShowS)
-> Show V1beta1DeviceRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1DeviceRequest -> ShowS
showsPrec :: Int -> V1beta1DeviceRequest -> ShowS
$cshow :: V1beta1DeviceRequest -> String
show :: V1beta1DeviceRequest -> String
$cshowList :: [V1beta1DeviceRequest] -> ShowS
showList :: [V1beta1DeviceRequest] -> ShowS
P.Show, V1beta1DeviceRequest -> V1beta1DeviceRequest -> Bool
(V1beta1DeviceRequest -> V1beta1DeviceRequest -> Bool)
-> (V1beta1DeviceRequest -> V1beta1DeviceRequest -> Bool)
-> Eq V1beta1DeviceRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1DeviceRequest -> V1beta1DeviceRequest -> Bool
== :: V1beta1DeviceRequest -> V1beta1DeviceRequest -> Bool
$c/= :: V1beta1DeviceRequest -> V1beta1DeviceRequest -> Bool
/= :: V1beta1DeviceRequest -> V1beta1DeviceRequest -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1DeviceRequest
instance A.FromJSON V1beta1DeviceRequest where
  parseJSON :: Value -> Parser V1beta1DeviceRequest
parseJSON = String
-> (Object -> Parser V1beta1DeviceRequest)
-> Value
-> Parser V1beta1DeviceRequest
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1DeviceRequest" ((Object -> Parser V1beta1DeviceRequest)
 -> Value -> Parser V1beta1DeviceRequest)
-> (Object -> Parser V1beta1DeviceRequest)
-> Value
-> Parser V1beta1DeviceRequest
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Bool
-> Maybe Text
-> Maybe Integer
-> Text
-> Text
-> Maybe [V1beta1DeviceSelector]
-> V1beta1DeviceRequest
V1beta1DeviceRequest
      (Maybe Bool
 -> Maybe Text
 -> Maybe Integer
 -> Text
 -> Text
 -> Maybe [V1beta1DeviceSelector]
 -> V1beta1DeviceRequest)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Integer
      -> Text
      -> Text
      -> Maybe [V1beta1DeviceSelector]
      -> V1beta1DeviceRequest)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"adminAccess")
      Parser
  (Maybe Text
   -> Maybe Integer
   -> Text
   -> Text
   -> Maybe [V1beta1DeviceSelector]
   -> V1beta1DeviceRequest)
-> Parser (Maybe Text)
-> Parser
     (Maybe Integer
      -> Text
      -> Text
      -> Maybe [V1beta1DeviceSelector]
      -> V1beta1DeviceRequest)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"allocationMode")
      Parser
  (Maybe Integer
   -> Text
   -> Text
   -> Maybe [V1beta1DeviceSelector]
   -> V1beta1DeviceRequest)
-> Parser (Maybe Integer)
-> Parser
     (Text
      -> Text -> Maybe [V1beta1DeviceSelector] -> V1beta1DeviceRequest)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"count")
      Parser
  (Text
   -> Text -> Maybe [V1beta1DeviceSelector] -> V1beta1DeviceRequest)
-> Parser Text
-> Parser
     (Text -> Maybe [V1beta1DeviceSelector] -> V1beta1DeviceRequest)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"deviceClassName")
      Parser
  (Text -> Maybe [V1beta1DeviceSelector] -> V1beta1DeviceRequest)
-> Parser Text
-> Parser (Maybe [V1beta1DeviceSelector] -> V1beta1DeviceRequest)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser (Maybe [V1beta1DeviceSelector] -> V1beta1DeviceRequest)
-> Parser (Maybe [V1beta1DeviceSelector])
-> Parser V1beta1DeviceRequest
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1beta1DeviceSelector])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"selectors")

-- | ToJSON V1beta1DeviceRequest
instance A.ToJSON V1beta1DeviceRequest where
  toJSON :: V1beta1DeviceRequest -> Value
toJSON V1beta1DeviceRequest {Maybe Bool
Maybe Integer
Maybe [V1beta1DeviceSelector]
Maybe Text
Text
$sel:v1beta1DeviceRequestAdminAccess:V1beta1DeviceRequest :: V1beta1DeviceRequest -> Maybe Bool
$sel:v1beta1DeviceRequestAllocationMode:V1beta1DeviceRequest :: V1beta1DeviceRequest -> Maybe Text
$sel:v1beta1DeviceRequestCount:V1beta1DeviceRequest :: V1beta1DeviceRequest -> Maybe Integer
$sel:v1beta1DeviceRequestDeviceClassName:V1beta1DeviceRequest :: V1beta1DeviceRequest -> Text
$sel:v1beta1DeviceRequestName:V1beta1DeviceRequest :: V1beta1DeviceRequest -> Text
$sel:v1beta1DeviceRequestSelectors:V1beta1DeviceRequest :: V1beta1DeviceRequest -> Maybe [V1beta1DeviceSelector]
v1beta1DeviceRequestAdminAccess :: Maybe Bool
v1beta1DeviceRequestAllocationMode :: Maybe Text
v1beta1DeviceRequestCount :: Maybe Integer
v1beta1DeviceRequestDeviceClassName :: Text
v1beta1DeviceRequestName :: Text
v1beta1DeviceRequestSelectors :: Maybe [V1beta1DeviceSelector]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"adminAccess" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1beta1DeviceRequestAdminAccess
      , Key
"allocationMode" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1DeviceRequestAllocationMode
      , Key
"count" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1beta1DeviceRequestCount
      , Key
"deviceClassName" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1beta1DeviceRequestDeviceClassName
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1beta1DeviceRequestName
      , Key
"selectors" Key -> Maybe [V1beta1DeviceSelector] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1beta1DeviceSelector]
v1beta1DeviceRequestSelectors
      ]


-- | Construct a value of type 'V1beta1DeviceRequest' (by applying it's required fields, if any)
mkV1beta1DeviceRequest
  :: Text -- ^ 'v1beta1DeviceRequestDeviceClassName': DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this request.  A class is required. Which classes are available depends on the cluster.  Administrators may use this to restrict which devices may get requested by only installing classes with selectors for permitted devices. If users are free to request anything without restrictions, then administrators can create an empty DeviceClass for users to reference.
  -> Text -- ^ 'v1beta1DeviceRequestName': Name can be used to reference this request in a pod.spec.containers[].resources.claims entry and in a constraint of the claim.  Must be a DNS label.
  -> V1beta1DeviceRequest
mkV1beta1DeviceRequest :: Text -> Text -> V1beta1DeviceRequest
mkV1beta1DeviceRequest Text
v1beta1DeviceRequestDeviceClassName Text
v1beta1DeviceRequestName =
  V1beta1DeviceRequest
  { $sel:v1beta1DeviceRequestAdminAccess:V1beta1DeviceRequest :: Maybe Bool
v1beta1DeviceRequestAdminAccess = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1beta1DeviceRequestAllocationMode:V1beta1DeviceRequest :: Maybe Text
v1beta1DeviceRequestAllocationMode = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1DeviceRequestCount:V1beta1DeviceRequest :: Maybe Integer
v1beta1DeviceRequestCount = Maybe Integer
forall a. Maybe a
Nothing
  , Text
$sel:v1beta1DeviceRequestDeviceClassName:V1beta1DeviceRequest :: Text
v1beta1DeviceRequestDeviceClassName :: Text
v1beta1DeviceRequestDeviceClassName
  , Text
$sel:v1beta1DeviceRequestName:V1beta1DeviceRequest :: Text
v1beta1DeviceRequestName :: Text
v1beta1DeviceRequestName
  , $sel:v1beta1DeviceRequestSelectors:V1beta1DeviceRequest :: Maybe [V1beta1DeviceSelector]
v1beta1DeviceRequestSelectors = Maybe [V1beta1DeviceSelector]
forall a. Maybe a
Nothing
  }

-- ** V1beta1DeviceRequestAllocationResult
-- | V1beta1DeviceRequestAllocationResult
-- DeviceRequestAllocationResult contains the allocation result for one request.
data V1beta1DeviceRequestAllocationResult = V1beta1DeviceRequestAllocationResult
  { V1beta1DeviceRequestAllocationResult -> Maybe Bool
v1beta1DeviceRequestAllocationResultAdminAccess :: !(Maybe Bool) -- ^ "adminAccess" - AdminAccess indicates that this device was allocated for administrative access. See the corresponding request field for a definition of mode.  This is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled.
  , V1beta1DeviceRequestAllocationResult -> Text
v1beta1DeviceRequestAllocationResultDevice :: !(Text) -- ^ /Required/ "device" - Device references one device instance via its name in the driver&#39;s resource pool. It must be a DNS label.
  , V1beta1DeviceRequestAllocationResult -> Text
v1beta1DeviceRequestAllocationResultDriver :: !(Text) -- ^ /Required/ "driver" - Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.  Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.
  , V1beta1DeviceRequestAllocationResult -> Text
v1beta1DeviceRequestAllocationResultPool :: !(Text) -- ^ /Required/ "pool" - This name together with the driver name and the device name field identify which device was allocated (&#x60;&lt;driver name&gt;/&lt;pool name&gt;/&lt;device name&gt;&#x60;).  Must not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.
  , V1beta1DeviceRequestAllocationResult -> Text
v1beta1DeviceRequestAllocationResultRequest :: !(Text) -- ^ /Required/ "request" - Request is the name of the request in the claim which caused this device to be allocated. Multiple devices may have been allocated per request.
  } deriving (Int -> V1beta1DeviceRequestAllocationResult -> ShowS
[V1beta1DeviceRequestAllocationResult] -> ShowS
V1beta1DeviceRequestAllocationResult -> String
(Int -> V1beta1DeviceRequestAllocationResult -> ShowS)
-> (V1beta1DeviceRequestAllocationResult -> String)
-> ([V1beta1DeviceRequestAllocationResult] -> ShowS)
-> Show V1beta1DeviceRequestAllocationResult
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1DeviceRequestAllocationResult -> ShowS
showsPrec :: Int -> V1beta1DeviceRequestAllocationResult -> ShowS
$cshow :: V1beta1DeviceRequestAllocationResult -> String
show :: V1beta1DeviceRequestAllocationResult -> String
$cshowList :: [V1beta1DeviceRequestAllocationResult] -> ShowS
showList :: [V1beta1DeviceRequestAllocationResult] -> ShowS
P.Show, V1beta1DeviceRequestAllocationResult
-> V1beta1DeviceRequestAllocationResult -> Bool
(V1beta1DeviceRequestAllocationResult
 -> V1beta1DeviceRequestAllocationResult -> Bool)
-> (V1beta1DeviceRequestAllocationResult
    -> V1beta1DeviceRequestAllocationResult -> Bool)
-> Eq V1beta1DeviceRequestAllocationResult
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1DeviceRequestAllocationResult
-> V1beta1DeviceRequestAllocationResult -> Bool
== :: V1beta1DeviceRequestAllocationResult
-> V1beta1DeviceRequestAllocationResult -> Bool
$c/= :: V1beta1DeviceRequestAllocationResult
-> V1beta1DeviceRequestAllocationResult -> Bool
/= :: V1beta1DeviceRequestAllocationResult
-> V1beta1DeviceRequestAllocationResult -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1DeviceRequestAllocationResult
instance A.FromJSON V1beta1DeviceRequestAllocationResult where
  parseJSON :: Value -> Parser V1beta1DeviceRequestAllocationResult
parseJSON = String
-> (Object -> Parser V1beta1DeviceRequestAllocationResult)
-> Value
-> Parser V1beta1DeviceRequestAllocationResult
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1DeviceRequestAllocationResult" ((Object -> Parser V1beta1DeviceRequestAllocationResult)
 -> Value -> Parser V1beta1DeviceRequestAllocationResult)
-> (Object -> Parser V1beta1DeviceRequestAllocationResult)
-> Value
-> Parser V1beta1DeviceRequestAllocationResult
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Bool
-> Text
-> Text
-> Text
-> Text
-> V1beta1DeviceRequestAllocationResult
V1beta1DeviceRequestAllocationResult
      (Maybe Bool
 -> Text
 -> Text
 -> Text
 -> Text
 -> V1beta1DeviceRequestAllocationResult)
-> Parser (Maybe Bool)
-> Parser
     (Text
      -> Text -> Text -> Text -> V1beta1DeviceRequestAllocationResult)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"adminAccess")
      Parser
  (Text
   -> Text -> Text -> Text -> V1beta1DeviceRequestAllocationResult)
-> Parser Text
-> Parser
     (Text -> Text -> Text -> V1beta1DeviceRequestAllocationResult)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"device")
      Parser
  (Text -> Text -> Text -> V1beta1DeviceRequestAllocationResult)
-> Parser Text
-> Parser (Text -> Text -> V1beta1DeviceRequestAllocationResult)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"driver")
      Parser (Text -> Text -> V1beta1DeviceRequestAllocationResult)
-> Parser Text
-> Parser (Text -> V1beta1DeviceRequestAllocationResult)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"pool")
      Parser (Text -> V1beta1DeviceRequestAllocationResult)
-> Parser Text -> Parser V1beta1DeviceRequestAllocationResult
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"request")

-- | ToJSON V1beta1DeviceRequestAllocationResult
instance A.ToJSON V1beta1DeviceRequestAllocationResult where
  toJSON :: V1beta1DeviceRequestAllocationResult -> Value
toJSON V1beta1DeviceRequestAllocationResult {Maybe Bool
Text
$sel:v1beta1DeviceRequestAllocationResultAdminAccess:V1beta1DeviceRequestAllocationResult :: V1beta1DeviceRequestAllocationResult -> Maybe Bool
$sel:v1beta1DeviceRequestAllocationResultDevice:V1beta1DeviceRequestAllocationResult :: V1beta1DeviceRequestAllocationResult -> Text
$sel:v1beta1DeviceRequestAllocationResultDriver:V1beta1DeviceRequestAllocationResult :: V1beta1DeviceRequestAllocationResult -> Text
$sel:v1beta1DeviceRequestAllocationResultPool:V1beta1DeviceRequestAllocationResult :: V1beta1DeviceRequestAllocationResult -> Text
$sel:v1beta1DeviceRequestAllocationResultRequest:V1beta1DeviceRequestAllocationResult :: V1beta1DeviceRequestAllocationResult -> Text
v1beta1DeviceRequestAllocationResultAdminAccess :: Maybe Bool
v1beta1DeviceRequestAllocationResultDevice :: Text
v1beta1DeviceRequestAllocationResultDriver :: Text
v1beta1DeviceRequestAllocationResultPool :: Text
v1beta1DeviceRequestAllocationResultRequest :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"adminAccess" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1beta1DeviceRequestAllocationResultAdminAccess
      , Key
"device" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1beta1DeviceRequestAllocationResultDevice
      , Key
"driver" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1beta1DeviceRequestAllocationResultDriver
      , Key
"pool" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1beta1DeviceRequestAllocationResultPool
      , Key
"request" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1beta1DeviceRequestAllocationResultRequest
      ]


-- | Construct a value of type 'V1beta1DeviceRequestAllocationResult' (by applying it's required fields, if any)
mkV1beta1DeviceRequestAllocationResult
  :: Text -- ^ 'v1beta1DeviceRequestAllocationResultDevice': Device references one device instance via its name in the driver's resource pool. It must be a DNS label.
  -> Text -- ^ 'v1beta1DeviceRequestAllocationResultDriver': Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.  Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.
  -> Text -- ^ 'v1beta1DeviceRequestAllocationResultPool': This name together with the driver name and the device name field identify which device was allocated (`<driver name>/<pool name>/<device name>`).  Must not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.
  -> Text -- ^ 'v1beta1DeviceRequestAllocationResultRequest': Request is the name of the request in the claim which caused this device to be allocated. Multiple devices may have been allocated per request.
  -> V1beta1DeviceRequestAllocationResult
mkV1beta1DeviceRequestAllocationResult :: Text
-> Text -> Text -> Text -> V1beta1DeviceRequestAllocationResult
mkV1beta1DeviceRequestAllocationResult Text
v1beta1DeviceRequestAllocationResultDevice Text
v1beta1DeviceRequestAllocationResultDriver Text
v1beta1DeviceRequestAllocationResultPool Text
v1beta1DeviceRequestAllocationResultRequest =
  V1beta1DeviceRequestAllocationResult
  { $sel:v1beta1DeviceRequestAllocationResultAdminAccess:V1beta1DeviceRequestAllocationResult :: Maybe Bool
v1beta1DeviceRequestAllocationResultAdminAccess = Maybe Bool
forall a. Maybe a
Nothing
  , Text
$sel:v1beta1DeviceRequestAllocationResultDevice:V1beta1DeviceRequestAllocationResult :: Text
v1beta1DeviceRequestAllocationResultDevice :: Text
v1beta1DeviceRequestAllocationResultDevice
  , Text
$sel:v1beta1DeviceRequestAllocationResultDriver:V1beta1DeviceRequestAllocationResult :: Text
v1beta1DeviceRequestAllocationResultDriver :: Text
v1beta1DeviceRequestAllocationResultDriver
  , Text
$sel:v1beta1DeviceRequestAllocationResultPool:V1beta1DeviceRequestAllocationResult :: Text
v1beta1DeviceRequestAllocationResultPool :: Text
v1beta1DeviceRequestAllocationResultPool
  , Text
$sel:v1beta1DeviceRequestAllocationResultRequest:V1beta1DeviceRequestAllocationResult :: Text
v1beta1DeviceRequestAllocationResultRequest :: Text
v1beta1DeviceRequestAllocationResultRequest
  }

-- ** V1beta1DeviceSelector
-- | V1beta1DeviceSelector
-- DeviceSelector must have exactly one field set.
data V1beta1DeviceSelector = V1beta1DeviceSelector
  { V1beta1DeviceSelector -> Maybe V1beta1CELDeviceSelector
v1beta1DeviceSelectorCel :: !(Maybe V1beta1CELDeviceSelector) -- ^ "cel"
  } deriving (Int -> V1beta1DeviceSelector -> ShowS
[V1beta1DeviceSelector] -> ShowS
V1beta1DeviceSelector -> String
(Int -> V1beta1DeviceSelector -> ShowS)
-> (V1beta1DeviceSelector -> String)
-> ([V1beta1DeviceSelector] -> ShowS)
-> Show V1beta1DeviceSelector
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1DeviceSelector -> ShowS
showsPrec :: Int -> V1beta1DeviceSelector -> ShowS
$cshow :: V1beta1DeviceSelector -> String
show :: V1beta1DeviceSelector -> String
$cshowList :: [V1beta1DeviceSelector] -> ShowS
showList :: [V1beta1DeviceSelector] -> ShowS
P.Show, V1beta1DeviceSelector -> V1beta1DeviceSelector -> Bool
(V1beta1DeviceSelector -> V1beta1DeviceSelector -> Bool)
-> (V1beta1DeviceSelector -> V1beta1DeviceSelector -> Bool)
-> Eq V1beta1DeviceSelector
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1DeviceSelector -> V1beta1DeviceSelector -> Bool
== :: V1beta1DeviceSelector -> V1beta1DeviceSelector -> Bool
$c/= :: V1beta1DeviceSelector -> V1beta1DeviceSelector -> Bool
/= :: V1beta1DeviceSelector -> V1beta1DeviceSelector -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1DeviceSelector
instance A.FromJSON V1beta1DeviceSelector where
  parseJSON :: Value -> Parser V1beta1DeviceSelector
parseJSON = String
-> (Object -> Parser V1beta1DeviceSelector)
-> Value
-> Parser V1beta1DeviceSelector
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1DeviceSelector" ((Object -> Parser V1beta1DeviceSelector)
 -> Value -> Parser V1beta1DeviceSelector)
-> (Object -> Parser V1beta1DeviceSelector)
-> Value
-> Parser V1beta1DeviceSelector
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1beta1CELDeviceSelector -> V1beta1DeviceSelector
V1beta1DeviceSelector
      (Maybe V1beta1CELDeviceSelector -> V1beta1DeviceSelector)
-> Parser (Maybe V1beta1CELDeviceSelector)
-> Parser V1beta1DeviceSelector
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1beta1CELDeviceSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"cel")

-- | ToJSON V1beta1DeviceSelector
instance A.ToJSON V1beta1DeviceSelector where
  toJSON :: V1beta1DeviceSelector -> Value
toJSON V1beta1DeviceSelector {Maybe V1beta1CELDeviceSelector
$sel:v1beta1DeviceSelectorCel:V1beta1DeviceSelector :: V1beta1DeviceSelector -> Maybe V1beta1CELDeviceSelector
v1beta1DeviceSelectorCel :: Maybe V1beta1CELDeviceSelector
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"cel" Key -> Maybe V1beta1CELDeviceSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1beta1CELDeviceSelector
v1beta1DeviceSelectorCel
      ]


-- | Construct a value of type 'V1beta1DeviceSelector' (by applying it's required fields, if any)
mkV1beta1DeviceSelector
  :: V1beta1DeviceSelector
mkV1beta1DeviceSelector :: V1beta1DeviceSelector
mkV1beta1DeviceSelector =
  V1beta1DeviceSelector
  { $sel:v1beta1DeviceSelectorCel:V1beta1DeviceSelector :: Maybe V1beta1CELDeviceSelector
v1beta1DeviceSelectorCel = Maybe V1beta1CELDeviceSelector
forall a. Maybe a
Nothing
  }

-- ** V1beta1ExpressionWarning
-- | V1beta1ExpressionWarning
-- ExpressionWarning is a warning information that targets a specific expression.
data V1beta1ExpressionWarning = V1beta1ExpressionWarning
  { V1beta1ExpressionWarning -> Text
v1beta1ExpressionWarningFieldRef :: !(Text) -- ^ /Required/ "fieldRef" - The path to the field that refers the expression. For example, the reference to the expression of the first item of validations is \&quot;spec.validations[0].expression\&quot;
  , V1beta1ExpressionWarning -> Text
v1beta1ExpressionWarningWarning :: !(Text) -- ^ /Required/ "warning" - The content of type checking information in a human-readable form. Each line of the warning contains the type that the expression is checked against, followed by the type check error from the compiler.
  } deriving (Int -> V1beta1ExpressionWarning -> ShowS
[V1beta1ExpressionWarning] -> ShowS
V1beta1ExpressionWarning -> String
(Int -> V1beta1ExpressionWarning -> ShowS)
-> (V1beta1ExpressionWarning -> String)
-> ([V1beta1ExpressionWarning] -> ShowS)
-> Show V1beta1ExpressionWarning
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1ExpressionWarning -> ShowS
showsPrec :: Int -> V1beta1ExpressionWarning -> ShowS
$cshow :: V1beta1ExpressionWarning -> String
show :: V1beta1ExpressionWarning -> String
$cshowList :: [V1beta1ExpressionWarning] -> ShowS
showList :: [V1beta1ExpressionWarning] -> ShowS
P.Show, V1beta1ExpressionWarning -> V1beta1ExpressionWarning -> Bool
(V1beta1ExpressionWarning -> V1beta1ExpressionWarning -> Bool)
-> (V1beta1ExpressionWarning -> V1beta1ExpressionWarning -> Bool)
-> Eq V1beta1ExpressionWarning
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1ExpressionWarning -> V1beta1ExpressionWarning -> Bool
== :: V1beta1ExpressionWarning -> V1beta1ExpressionWarning -> Bool
$c/= :: V1beta1ExpressionWarning -> V1beta1ExpressionWarning -> Bool
/= :: V1beta1ExpressionWarning -> V1beta1ExpressionWarning -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1ExpressionWarning
instance A.FromJSON V1beta1ExpressionWarning where
  parseJSON :: Value -> Parser V1beta1ExpressionWarning
parseJSON = String
-> (Object -> Parser V1beta1ExpressionWarning)
-> Value
-> Parser V1beta1ExpressionWarning
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1ExpressionWarning" ((Object -> Parser V1beta1ExpressionWarning)
 -> Value -> Parser V1beta1ExpressionWarning)
-> (Object -> Parser V1beta1ExpressionWarning)
-> Value
-> Parser V1beta1ExpressionWarning
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Text -> V1beta1ExpressionWarning
V1beta1ExpressionWarning
      (Text -> Text -> V1beta1ExpressionWarning)
-> Parser Text -> Parser (Text -> V1beta1ExpressionWarning)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"fieldRef")
      Parser (Text -> V1beta1ExpressionWarning)
-> Parser Text -> Parser V1beta1ExpressionWarning
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"warning")

-- | ToJSON V1beta1ExpressionWarning
instance A.ToJSON V1beta1ExpressionWarning where
  toJSON :: V1beta1ExpressionWarning -> Value
toJSON V1beta1ExpressionWarning {Text
$sel:v1beta1ExpressionWarningFieldRef:V1beta1ExpressionWarning :: V1beta1ExpressionWarning -> Text
$sel:v1beta1ExpressionWarningWarning:V1beta1ExpressionWarning :: V1beta1ExpressionWarning -> Text
v1beta1ExpressionWarningFieldRef :: Text
v1beta1ExpressionWarningWarning :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"fieldRef" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1beta1ExpressionWarningFieldRef
      , Key
"warning" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1beta1ExpressionWarningWarning
      ]


-- | Construct a value of type 'V1beta1ExpressionWarning' (by applying it's required fields, if any)
mkV1beta1ExpressionWarning
  :: Text -- ^ 'v1beta1ExpressionWarningFieldRef': The path to the field that refers the expression. For example, the reference to the expression of the first item of validations is \"spec.validations[0].expression\"
  -> Text -- ^ 'v1beta1ExpressionWarningWarning': The content of type checking information in a human-readable form. Each line of the warning contains the type that the expression is checked against, followed by the type check error from the compiler.
  -> V1beta1ExpressionWarning
mkV1beta1ExpressionWarning :: Text -> Text -> V1beta1ExpressionWarning
mkV1beta1ExpressionWarning Text
v1beta1ExpressionWarningFieldRef Text
v1beta1ExpressionWarningWarning =
  V1beta1ExpressionWarning
  { Text
$sel:v1beta1ExpressionWarningFieldRef:V1beta1ExpressionWarning :: Text
v1beta1ExpressionWarningFieldRef :: Text
v1beta1ExpressionWarningFieldRef
  , Text
$sel:v1beta1ExpressionWarningWarning:V1beta1ExpressionWarning :: Text
v1beta1ExpressionWarningWarning :: Text
v1beta1ExpressionWarningWarning
  }

-- ** V1beta1IPAddress
-- | V1beta1IPAddress
-- IPAddress represents a single IP of a single IP Family. The object is designed to be used by APIs that operate on IP addresses. The object is used by the Service core API for allocation of IP addresses. An IP address can be represented in different formats, to guarantee the uniqueness of the IP, the name of the object is the IP address in canonical format, four decimal digits separated by dots suppressing leading zeros for IPv4 and the representation defined by RFC 5952 for IPv6. Valid: 192.168.1.5 or 2001:db8::1 or 2001:db8:aaaa:bbbb:cccc:dddd:eeee:1 Invalid: 10.01.2.3 or 2001:db8:0:0:0::1
data V1beta1IPAddress = V1beta1IPAddress
  { V1beta1IPAddress -> Maybe Text
v1beta1IPAddressApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1beta1IPAddress -> Maybe Text
v1beta1IPAddressKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1beta1IPAddress -> Maybe V1ObjectMeta
v1beta1IPAddressMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1beta1IPAddress -> Maybe V1beta1IPAddressSpec
v1beta1IPAddressSpec :: !(Maybe V1beta1IPAddressSpec) -- ^ "spec"
  } deriving (Int -> V1beta1IPAddress -> ShowS
[V1beta1IPAddress] -> ShowS
V1beta1IPAddress -> String
(Int -> V1beta1IPAddress -> ShowS)
-> (V1beta1IPAddress -> String)
-> ([V1beta1IPAddress] -> ShowS)
-> Show V1beta1IPAddress
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1IPAddress -> ShowS
showsPrec :: Int -> V1beta1IPAddress -> ShowS
$cshow :: V1beta1IPAddress -> String
show :: V1beta1IPAddress -> String
$cshowList :: [V1beta1IPAddress] -> ShowS
showList :: [V1beta1IPAddress] -> ShowS
P.Show, V1beta1IPAddress -> V1beta1IPAddress -> Bool
(V1beta1IPAddress -> V1beta1IPAddress -> Bool)
-> (V1beta1IPAddress -> V1beta1IPAddress -> Bool)
-> Eq V1beta1IPAddress
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1IPAddress -> V1beta1IPAddress -> Bool
== :: V1beta1IPAddress -> V1beta1IPAddress -> Bool
$c/= :: V1beta1IPAddress -> V1beta1IPAddress -> Bool
/= :: V1beta1IPAddress -> V1beta1IPAddress -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1IPAddress
instance A.FromJSON V1beta1IPAddress where
  parseJSON :: Value -> Parser V1beta1IPAddress
parseJSON = String
-> (Object -> Parser V1beta1IPAddress)
-> Value
-> Parser V1beta1IPAddress
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1IPAddress" ((Object -> Parser V1beta1IPAddress)
 -> Value -> Parser V1beta1IPAddress)
-> (Object -> Parser V1beta1IPAddress)
-> Value
-> Parser V1beta1IPAddress
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1beta1IPAddressSpec
-> V1beta1IPAddress
V1beta1IPAddress
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1beta1IPAddressSpec
 -> V1beta1IPAddress)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1beta1IPAddressSpec
      -> V1beta1IPAddress)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1beta1IPAddressSpec
   -> V1beta1IPAddress)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1beta1IPAddressSpec -> V1beta1IPAddress)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1beta1IPAddressSpec -> V1beta1IPAddress)
-> Parser (Maybe V1ObjectMeta)
-> Parser (Maybe V1beta1IPAddressSpec -> V1beta1IPAddress)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (Maybe V1beta1IPAddressSpec -> V1beta1IPAddress)
-> Parser (Maybe V1beta1IPAddressSpec) -> Parser V1beta1IPAddress
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1beta1IPAddressSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")

-- | ToJSON V1beta1IPAddress
instance A.ToJSON V1beta1IPAddress where
  toJSON :: V1beta1IPAddress -> Value
toJSON V1beta1IPAddress {Maybe Text
Maybe V1beta1IPAddressSpec
Maybe V1ObjectMeta
$sel:v1beta1IPAddressApiVersion:V1beta1IPAddress :: V1beta1IPAddress -> Maybe Text
$sel:v1beta1IPAddressKind:V1beta1IPAddress :: V1beta1IPAddress -> Maybe Text
$sel:v1beta1IPAddressMetadata:V1beta1IPAddress :: V1beta1IPAddress -> Maybe V1ObjectMeta
$sel:v1beta1IPAddressSpec:V1beta1IPAddress :: V1beta1IPAddress -> Maybe V1beta1IPAddressSpec
v1beta1IPAddressApiVersion :: Maybe Text
v1beta1IPAddressKind :: Maybe Text
v1beta1IPAddressMetadata :: Maybe V1ObjectMeta
v1beta1IPAddressSpec :: Maybe V1beta1IPAddressSpec
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1IPAddressApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1IPAddressKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1beta1IPAddressMetadata
      , Key
"spec" Key -> Maybe V1beta1IPAddressSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1beta1IPAddressSpec
v1beta1IPAddressSpec
      ]


-- | Construct a value of type 'V1beta1IPAddress' (by applying it's required fields, if any)
mkV1beta1IPAddress
  :: V1beta1IPAddress
mkV1beta1IPAddress :: V1beta1IPAddress
mkV1beta1IPAddress =
  V1beta1IPAddress
  { $sel:v1beta1IPAddressApiVersion:V1beta1IPAddress :: Maybe Text
v1beta1IPAddressApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1IPAddressKind:V1beta1IPAddress :: Maybe Text
v1beta1IPAddressKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1IPAddressMetadata:V1beta1IPAddress :: Maybe V1ObjectMeta
v1beta1IPAddressMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1beta1IPAddressSpec:V1beta1IPAddress :: Maybe V1beta1IPAddressSpec
v1beta1IPAddressSpec = Maybe V1beta1IPAddressSpec
forall a. Maybe a
Nothing
  }

-- ** V1beta1IPAddressList
-- | V1beta1IPAddressList
-- IPAddressList contains a list of IPAddress.
data V1beta1IPAddressList = V1beta1IPAddressList
  { V1beta1IPAddressList -> Maybe Text
v1beta1IPAddressListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1beta1IPAddressList -> [V1beta1IPAddress]
v1beta1IPAddressListItems :: !([V1beta1IPAddress]) -- ^ /Required/ "items" - items is the list of IPAddresses.
  , V1beta1IPAddressList -> Maybe Text
v1beta1IPAddressListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1beta1IPAddressList -> Maybe V1ListMeta
v1beta1IPAddressListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1beta1IPAddressList -> ShowS
[V1beta1IPAddressList] -> ShowS
V1beta1IPAddressList -> String
(Int -> V1beta1IPAddressList -> ShowS)
-> (V1beta1IPAddressList -> String)
-> ([V1beta1IPAddressList] -> ShowS)
-> Show V1beta1IPAddressList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1IPAddressList -> ShowS
showsPrec :: Int -> V1beta1IPAddressList -> ShowS
$cshow :: V1beta1IPAddressList -> String
show :: V1beta1IPAddressList -> String
$cshowList :: [V1beta1IPAddressList] -> ShowS
showList :: [V1beta1IPAddressList] -> ShowS
P.Show, V1beta1IPAddressList -> V1beta1IPAddressList -> Bool
(V1beta1IPAddressList -> V1beta1IPAddressList -> Bool)
-> (V1beta1IPAddressList -> V1beta1IPAddressList -> Bool)
-> Eq V1beta1IPAddressList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1IPAddressList -> V1beta1IPAddressList -> Bool
== :: V1beta1IPAddressList -> V1beta1IPAddressList -> Bool
$c/= :: V1beta1IPAddressList -> V1beta1IPAddressList -> Bool
/= :: V1beta1IPAddressList -> V1beta1IPAddressList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1IPAddressList
instance A.FromJSON V1beta1IPAddressList where
  parseJSON :: Value -> Parser V1beta1IPAddressList
parseJSON = String
-> (Object -> Parser V1beta1IPAddressList)
-> Value
-> Parser V1beta1IPAddressList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1IPAddressList" ((Object -> Parser V1beta1IPAddressList)
 -> Value -> Parser V1beta1IPAddressList)
-> (Object -> Parser V1beta1IPAddressList)
-> Value
-> Parser V1beta1IPAddressList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1beta1IPAddress]
-> Maybe Text
-> Maybe V1ListMeta
-> V1beta1IPAddressList
V1beta1IPAddressList
      (Maybe Text
 -> [V1beta1IPAddress]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1beta1IPAddressList)
-> Parser (Maybe Text)
-> Parser
     ([V1beta1IPAddress]
      -> Maybe Text -> Maybe V1ListMeta -> V1beta1IPAddressList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1beta1IPAddress]
   -> Maybe Text -> Maybe V1ListMeta -> V1beta1IPAddressList)
-> Parser [V1beta1IPAddress]
-> Parser (Maybe Text -> Maybe V1ListMeta -> V1beta1IPAddressList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1beta1IPAddress]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1beta1IPAddressList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1beta1IPAddressList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1beta1IPAddressList)
-> Parser (Maybe V1ListMeta) -> Parser V1beta1IPAddressList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1beta1IPAddressList
instance A.ToJSON V1beta1IPAddressList where
  toJSON :: V1beta1IPAddressList -> Value
toJSON V1beta1IPAddressList {[V1beta1IPAddress]
Maybe Text
Maybe V1ListMeta
$sel:v1beta1IPAddressListApiVersion:V1beta1IPAddressList :: V1beta1IPAddressList -> Maybe Text
$sel:v1beta1IPAddressListItems:V1beta1IPAddressList :: V1beta1IPAddressList -> [V1beta1IPAddress]
$sel:v1beta1IPAddressListKind:V1beta1IPAddressList :: V1beta1IPAddressList -> Maybe Text
$sel:v1beta1IPAddressListMetadata:V1beta1IPAddressList :: V1beta1IPAddressList -> Maybe V1ListMeta
v1beta1IPAddressListApiVersion :: Maybe Text
v1beta1IPAddressListItems :: [V1beta1IPAddress]
v1beta1IPAddressListKind :: Maybe Text
v1beta1IPAddressListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1IPAddressListApiVersion
      , Key
"items" Key -> [V1beta1IPAddress] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1beta1IPAddress]
v1beta1IPAddressListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1IPAddressListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1beta1IPAddressListMetadata
      ]


-- | Construct a value of type 'V1beta1IPAddressList' (by applying it's required fields, if any)
mkV1beta1IPAddressList
  :: [V1beta1IPAddress] -- ^ 'v1beta1IPAddressListItems': items is the list of IPAddresses.
  -> V1beta1IPAddressList
mkV1beta1IPAddressList :: [V1beta1IPAddress] -> V1beta1IPAddressList
mkV1beta1IPAddressList [V1beta1IPAddress]
v1beta1IPAddressListItems =
  V1beta1IPAddressList
  { $sel:v1beta1IPAddressListApiVersion:V1beta1IPAddressList :: Maybe Text
v1beta1IPAddressListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1beta1IPAddress]
$sel:v1beta1IPAddressListItems:V1beta1IPAddressList :: [V1beta1IPAddress]
v1beta1IPAddressListItems :: [V1beta1IPAddress]
v1beta1IPAddressListItems
  , $sel:v1beta1IPAddressListKind:V1beta1IPAddressList :: Maybe Text
v1beta1IPAddressListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1IPAddressListMetadata:V1beta1IPAddressList :: Maybe V1ListMeta
v1beta1IPAddressListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1beta1IPAddressSpec
-- | V1beta1IPAddressSpec
-- IPAddressSpec describe the attributes in an IP Address.
data V1beta1IPAddressSpec = V1beta1IPAddressSpec
  { V1beta1IPAddressSpec -> V1beta1ParentReference
v1beta1IPAddressSpecParentRef :: !(V1beta1ParentReference) -- ^ /Required/ "parentRef"
  } deriving (Int -> V1beta1IPAddressSpec -> ShowS
[V1beta1IPAddressSpec] -> ShowS
V1beta1IPAddressSpec -> String
(Int -> V1beta1IPAddressSpec -> ShowS)
-> (V1beta1IPAddressSpec -> String)
-> ([V1beta1IPAddressSpec] -> ShowS)
-> Show V1beta1IPAddressSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1IPAddressSpec -> ShowS
showsPrec :: Int -> V1beta1IPAddressSpec -> ShowS
$cshow :: V1beta1IPAddressSpec -> String
show :: V1beta1IPAddressSpec -> String
$cshowList :: [V1beta1IPAddressSpec] -> ShowS
showList :: [V1beta1IPAddressSpec] -> ShowS
P.Show, V1beta1IPAddressSpec -> V1beta1IPAddressSpec -> Bool
(V1beta1IPAddressSpec -> V1beta1IPAddressSpec -> Bool)
-> (V1beta1IPAddressSpec -> V1beta1IPAddressSpec -> Bool)
-> Eq V1beta1IPAddressSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1IPAddressSpec -> V1beta1IPAddressSpec -> Bool
== :: V1beta1IPAddressSpec -> V1beta1IPAddressSpec -> Bool
$c/= :: V1beta1IPAddressSpec -> V1beta1IPAddressSpec -> Bool
/= :: V1beta1IPAddressSpec -> V1beta1IPAddressSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1IPAddressSpec
instance A.FromJSON V1beta1IPAddressSpec where
  parseJSON :: Value -> Parser V1beta1IPAddressSpec
parseJSON = String
-> (Object -> Parser V1beta1IPAddressSpec)
-> Value
-> Parser V1beta1IPAddressSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1IPAddressSpec" ((Object -> Parser V1beta1IPAddressSpec)
 -> Value -> Parser V1beta1IPAddressSpec)
-> (Object -> Parser V1beta1IPAddressSpec)
-> Value
-> Parser V1beta1IPAddressSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    V1beta1ParentReference -> V1beta1IPAddressSpec
V1beta1IPAddressSpec
      (V1beta1ParentReference -> V1beta1IPAddressSpec)
-> Parser V1beta1ParentReference -> Parser V1beta1IPAddressSpec
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser V1beta1ParentReference
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"parentRef")

-- | ToJSON V1beta1IPAddressSpec
instance A.ToJSON V1beta1IPAddressSpec where
  toJSON :: V1beta1IPAddressSpec -> Value
toJSON V1beta1IPAddressSpec {V1beta1ParentReference
$sel:v1beta1IPAddressSpecParentRef:V1beta1IPAddressSpec :: V1beta1IPAddressSpec -> V1beta1ParentReference
v1beta1IPAddressSpecParentRef :: V1beta1ParentReference
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"parentRef" Key -> V1beta1ParentReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1beta1ParentReference
v1beta1IPAddressSpecParentRef
      ]


-- | Construct a value of type 'V1beta1IPAddressSpec' (by applying it's required fields, if any)
mkV1beta1IPAddressSpec
  :: V1beta1ParentReference -- ^ 'v1beta1IPAddressSpecParentRef' 
  -> V1beta1IPAddressSpec
mkV1beta1IPAddressSpec :: V1beta1ParentReference -> V1beta1IPAddressSpec
mkV1beta1IPAddressSpec V1beta1ParentReference
v1beta1IPAddressSpecParentRef =
  V1beta1IPAddressSpec
  { V1beta1ParentReference
$sel:v1beta1IPAddressSpecParentRef:V1beta1IPAddressSpec :: V1beta1ParentReference
v1beta1IPAddressSpecParentRef :: V1beta1ParentReference
v1beta1IPAddressSpecParentRef
  }

-- ** V1beta1MatchCondition
-- | V1beta1MatchCondition
-- MatchCondition represents a condition which must be fulfilled for a request to be sent to a webhook.
data V1beta1MatchCondition = V1beta1MatchCondition
  { V1beta1MatchCondition -> Text
v1beta1MatchConditionExpression :: !(Text) -- ^ /Required/ "expression" - Expression represents the expression which will be evaluated by CEL. Must evaluate to bool. CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:  &#39;object&#39; - The object from the incoming request. The value is null for DELETE requests. &#39;oldObject&#39; - The existing object. The value is null for CREATE requests. &#39;request&#39; - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest). &#39;authorizer&#39; - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.   See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz &#39;authorizer.requestResource&#39; - A CEL ResourceCheck constructed from the &#39;authorizer&#39; and configured with the   request resource. Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/  Required.
  , V1beta1MatchCondition -> Text
v1beta1MatchConditionName :: !(Text) -- ^ /Required/ "name" - Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, &#39;-&#39;, &#39;_&#39; or &#39;.&#39;, and must start and end with an alphanumeric character (e.g. &#39;MyName&#39;,  or &#39;my.name&#39;,  or &#39;123-abc&#39;, regex used for validation is &#39;([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]&#39;) with an optional DNS subdomain prefix and &#39;/&#39; (e.g. &#39;example.com/MyName&#39;)  Required.
  } deriving (Int -> V1beta1MatchCondition -> ShowS
[V1beta1MatchCondition] -> ShowS
V1beta1MatchCondition -> String
(Int -> V1beta1MatchCondition -> ShowS)
-> (V1beta1MatchCondition -> String)
-> ([V1beta1MatchCondition] -> ShowS)
-> Show V1beta1MatchCondition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1MatchCondition -> ShowS
showsPrec :: Int -> V1beta1MatchCondition -> ShowS
$cshow :: V1beta1MatchCondition -> String
show :: V1beta1MatchCondition -> String
$cshowList :: [V1beta1MatchCondition] -> ShowS
showList :: [V1beta1MatchCondition] -> ShowS
P.Show, V1beta1MatchCondition -> V1beta1MatchCondition -> Bool
(V1beta1MatchCondition -> V1beta1MatchCondition -> Bool)
-> (V1beta1MatchCondition -> V1beta1MatchCondition -> Bool)
-> Eq V1beta1MatchCondition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1MatchCondition -> V1beta1MatchCondition -> Bool
== :: V1beta1MatchCondition -> V1beta1MatchCondition -> Bool
$c/= :: V1beta1MatchCondition -> V1beta1MatchCondition -> Bool
/= :: V1beta1MatchCondition -> V1beta1MatchCondition -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1MatchCondition
instance A.FromJSON V1beta1MatchCondition where
  parseJSON :: Value -> Parser V1beta1MatchCondition
parseJSON = String
-> (Object -> Parser V1beta1MatchCondition)
-> Value
-> Parser V1beta1MatchCondition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1MatchCondition" ((Object -> Parser V1beta1MatchCondition)
 -> Value -> Parser V1beta1MatchCondition)
-> (Object -> Parser V1beta1MatchCondition)
-> Value
-> Parser V1beta1MatchCondition
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Text -> V1beta1MatchCondition
V1beta1MatchCondition
      (Text -> Text -> V1beta1MatchCondition)
-> Parser Text -> Parser (Text -> V1beta1MatchCondition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"expression")
      Parser (Text -> V1beta1MatchCondition)
-> Parser Text -> Parser V1beta1MatchCondition
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")

-- | ToJSON V1beta1MatchCondition
instance A.ToJSON V1beta1MatchCondition where
  toJSON :: V1beta1MatchCondition -> Value
toJSON V1beta1MatchCondition {Text
$sel:v1beta1MatchConditionExpression:V1beta1MatchCondition :: V1beta1MatchCondition -> Text
$sel:v1beta1MatchConditionName:V1beta1MatchCondition :: V1beta1MatchCondition -> Text
v1beta1MatchConditionExpression :: Text
v1beta1MatchConditionName :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"expression" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1beta1MatchConditionExpression
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1beta1MatchConditionName
      ]


-- | Construct a value of type 'V1beta1MatchCondition' (by applying it's required fields, if any)
mkV1beta1MatchCondition
  :: Text -- ^ 'v1beta1MatchConditionExpression': Expression represents the expression which will be evaluated by CEL. Must evaluate to bool. CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:  'object' - The object from the incoming request. The value is null for DELETE requests. 'oldObject' - The existing object. The value is null for CREATE requests. 'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest). 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.   See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the   request resource. Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/  Required.
  -> Text -- ^ 'v1beta1MatchConditionName': Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName',  or 'my.name',  or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')  Required.
  -> V1beta1MatchCondition
mkV1beta1MatchCondition :: Text -> Text -> V1beta1MatchCondition
mkV1beta1MatchCondition Text
v1beta1MatchConditionExpression Text
v1beta1MatchConditionName =
  V1beta1MatchCondition
  { Text
$sel:v1beta1MatchConditionExpression:V1beta1MatchCondition :: Text
v1beta1MatchConditionExpression :: Text
v1beta1MatchConditionExpression
  , Text
$sel:v1beta1MatchConditionName:V1beta1MatchCondition :: Text
v1beta1MatchConditionName :: Text
v1beta1MatchConditionName
  }

-- ** V1beta1MatchResources
-- | V1beta1MatchResources
-- MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
data V1beta1MatchResources = V1beta1MatchResources
  { V1beta1MatchResources -> Maybe [V1beta1NamedRuleWithOperations]
v1beta1MatchResourcesExcludeResourceRules :: !(Maybe [V1beta1NamedRuleWithOperations]) -- ^ "excludeResourceRules" - ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
  , V1beta1MatchResources -> Maybe Text
v1beta1MatchResourcesMatchPolicy :: !(Maybe Text) -- ^ "matchPolicy" - matchPolicy defines how the \&quot;MatchResources\&quot; list is used to match incoming requests. Allowed values are \&quot;Exact\&quot; or \&quot;Equivalent\&quot;.  - Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \&quot;rules\&quot; only included &#x60;apiGroups:[\&quot;apps\&quot;], apiVersions:[\&quot;v1\&quot;], resources: [\&quot;deployments\&quot;]&#x60;, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy.  - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \&quot;rules\&quot; only included &#x60;apiGroups:[\&quot;apps\&quot;], apiVersions:[\&quot;v1\&quot;], resources: [\&quot;deployments\&quot;]&#x60;, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy.  Defaults to \&quot;Equivalent\&quot;
  , V1beta1MatchResources -> Maybe V1LabelSelector
v1beta1MatchResourcesNamespaceSelector :: !(Maybe V1LabelSelector) -- ^ "namespaceSelector"
  , V1beta1MatchResources -> Maybe V1LabelSelector
v1beta1MatchResourcesObjectSelector :: !(Maybe V1LabelSelector) -- ^ "objectSelector"
  , V1beta1MatchResources -> Maybe [V1beta1NamedRuleWithOperations]
v1beta1MatchResourcesResourceRules :: !(Maybe [V1beta1NamedRuleWithOperations]) -- ^ "resourceRules" - ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. The policy cares about an operation if it matches _any_ Rule.
  } deriving (Int -> V1beta1MatchResources -> ShowS
[V1beta1MatchResources] -> ShowS
V1beta1MatchResources -> String
(Int -> V1beta1MatchResources -> ShowS)
-> (V1beta1MatchResources -> String)
-> ([V1beta1MatchResources] -> ShowS)
-> Show V1beta1MatchResources
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1MatchResources -> ShowS
showsPrec :: Int -> V1beta1MatchResources -> ShowS
$cshow :: V1beta1MatchResources -> String
show :: V1beta1MatchResources -> String
$cshowList :: [V1beta1MatchResources] -> ShowS
showList :: [V1beta1MatchResources] -> ShowS
P.Show, V1beta1MatchResources -> V1beta1MatchResources -> Bool
(V1beta1MatchResources -> V1beta1MatchResources -> Bool)
-> (V1beta1MatchResources -> V1beta1MatchResources -> Bool)
-> Eq V1beta1MatchResources
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1MatchResources -> V1beta1MatchResources -> Bool
== :: V1beta1MatchResources -> V1beta1MatchResources -> Bool
$c/= :: V1beta1MatchResources -> V1beta1MatchResources -> Bool
/= :: V1beta1MatchResources -> V1beta1MatchResources -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1MatchResources
instance A.FromJSON V1beta1MatchResources where
  parseJSON :: Value -> Parser V1beta1MatchResources
parseJSON = String
-> (Object -> Parser V1beta1MatchResources)
-> Value
-> Parser V1beta1MatchResources
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1MatchResources" ((Object -> Parser V1beta1MatchResources)
 -> Value -> Parser V1beta1MatchResources)
-> (Object -> Parser V1beta1MatchResources)
-> Value
-> Parser V1beta1MatchResources
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1beta1NamedRuleWithOperations]
-> Maybe Text
-> Maybe V1LabelSelector
-> Maybe V1LabelSelector
-> Maybe [V1beta1NamedRuleWithOperations]
-> V1beta1MatchResources
V1beta1MatchResources
      (Maybe [V1beta1NamedRuleWithOperations]
 -> Maybe Text
 -> Maybe V1LabelSelector
 -> Maybe V1LabelSelector
 -> Maybe [V1beta1NamedRuleWithOperations]
 -> V1beta1MatchResources)
-> Parser (Maybe [V1beta1NamedRuleWithOperations])
-> Parser
     (Maybe Text
      -> Maybe V1LabelSelector
      -> Maybe V1LabelSelector
      -> Maybe [V1beta1NamedRuleWithOperations]
      -> V1beta1MatchResources)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1beta1NamedRuleWithOperations])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"excludeResourceRules")
      Parser
  (Maybe Text
   -> Maybe V1LabelSelector
   -> Maybe V1LabelSelector
   -> Maybe [V1beta1NamedRuleWithOperations]
   -> V1beta1MatchResources)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1LabelSelector
      -> Maybe V1LabelSelector
      -> Maybe [V1beta1NamedRuleWithOperations]
      -> V1beta1MatchResources)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"matchPolicy")
      Parser
  (Maybe V1LabelSelector
   -> Maybe V1LabelSelector
   -> Maybe [V1beta1NamedRuleWithOperations]
   -> V1beta1MatchResources)
-> Parser (Maybe V1LabelSelector)
-> Parser
     (Maybe V1LabelSelector
      -> Maybe [V1beta1NamedRuleWithOperations] -> V1beta1MatchResources)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LabelSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"namespaceSelector")
      Parser
  (Maybe V1LabelSelector
   -> Maybe [V1beta1NamedRuleWithOperations] -> V1beta1MatchResources)
-> Parser (Maybe V1LabelSelector)
-> Parser
     (Maybe [V1beta1NamedRuleWithOperations] -> V1beta1MatchResources)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LabelSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"objectSelector")
      Parser
  (Maybe [V1beta1NamedRuleWithOperations] -> V1beta1MatchResources)
-> Parser (Maybe [V1beta1NamedRuleWithOperations])
-> Parser V1beta1MatchResources
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1beta1NamedRuleWithOperations])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resourceRules")

-- | ToJSON V1beta1MatchResources
instance A.ToJSON V1beta1MatchResources where
  toJSON :: V1beta1MatchResources -> Value
toJSON V1beta1MatchResources {Maybe [V1beta1NamedRuleWithOperations]
Maybe Text
Maybe V1LabelSelector
$sel:v1beta1MatchResourcesExcludeResourceRules:V1beta1MatchResources :: V1beta1MatchResources -> Maybe [V1beta1NamedRuleWithOperations]
$sel:v1beta1MatchResourcesMatchPolicy:V1beta1MatchResources :: V1beta1MatchResources -> Maybe Text
$sel:v1beta1MatchResourcesNamespaceSelector:V1beta1MatchResources :: V1beta1MatchResources -> Maybe V1LabelSelector
$sel:v1beta1MatchResourcesObjectSelector:V1beta1MatchResources :: V1beta1MatchResources -> Maybe V1LabelSelector
$sel:v1beta1MatchResourcesResourceRules:V1beta1MatchResources :: V1beta1MatchResources -> Maybe [V1beta1NamedRuleWithOperations]
v1beta1MatchResourcesExcludeResourceRules :: Maybe [V1beta1NamedRuleWithOperations]
v1beta1MatchResourcesMatchPolicy :: Maybe Text
v1beta1MatchResourcesNamespaceSelector :: Maybe V1LabelSelector
v1beta1MatchResourcesObjectSelector :: Maybe V1LabelSelector
v1beta1MatchResourcesResourceRules :: Maybe [V1beta1NamedRuleWithOperations]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"excludeResourceRules" Key -> Maybe [V1beta1NamedRuleWithOperations] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1beta1NamedRuleWithOperations]
v1beta1MatchResourcesExcludeResourceRules
      , Key
"matchPolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1MatchResourcesMatchPolicy
      , Key
"namespaceSelector" Key -> Maybe V1LabelSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LabelSelector
v1beta1MatchResourcesNamespaceSelector
      , Key
"objectSelector" Key -> Maybe V1LabelSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LabelSelector
v1beta1MatchResourcesObjectSelector
      , Key
"resourceRules" Key -> Maybe [V1beta1NamedRuleWithOperations] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1beta1NamedRuleWithOperations]
v1beta1MatchResourcesResourceRules
      ]


-- | Construct a value of type 'V1beta1MatchResources' (by applying it's required fields, if any)
mkV1beta1MatchResources
  :: V1beta1MatchResources
mkV1beta1MatchResources :: V1beta1MatchResources
mkV1beta1MatchResources =
  V1beta1MatchResources
  { $sel:v1beta1MatchResourcesExcludeResourceRules:V1beta1MatchResources :: Maybe [V1beta1NamedRuleWithOperations]
v1beta1MatchResourcesExcludeResourceRules = Maybe [V1beta1NamedRuleWithOperations]
forall a. Maybe a
Nothing
  , $sel:v1beta1MatchResourcesMatchPolicy:V1beta1MatchResources :: Maybe Text
v1beta1MatchResourcesMatchPolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1MatchResourcesNamespaceSelector:V1beta1MatchResources :: Maybe V1LabelSelector
v1beta1MatchResourcesNamespaceSelector = Maybe V1LabelSelector
forall a. Maybe a
Nothing
  , $sel:v1beta1MatchResourcesObjectSelector:V1beta1MatchResources :: Maybe V1LabelSelector
v1beta1MatchResourcesObjectSelector = Maybe V1LabelSelector
forall a. Maybe a
Nothing
  , $sel:v1beta1MatchResourcesResourceRules:V1beta1MatchResources :: Maybe [V1beta1NamedRuleWithOperations]
v1beta1MatchResourcesResourceRules = Maybe [V1beta1NamedRuleWithOperations]
forall a. Maybe a
Nothing
  }

-- ** V1beta1NamedRuleWithOperations
-- | V1beta1NamedRuleWithOperations
-- NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.
data V1beta1NamedRuleWithOperations = V1beta1NamedRuleWithOperations
  { V1beta1NamedRuleWithOperations -> Maybe [Text]
v1beta1NamedRuleWithOperationsApiGroups :: !(Maybe [Text]) -- ^ "apiGroups" - APIGroups is the API groups the resources belong to. &#39;*&#39; is all groups. If &#39;*&#39; is present, the length of the slice must be one. Required.
  , V1beta1NamedRuleWithOperations -> Maybe [Text]
v1beta1NamedRuleWithOperationsApiVersions :: !(Maybe [Text]) -- ^ "apiVersions" - APIVersions is the API versions the resources belong to. &#39;*&#39; is all versions. If &#39;*&#39; is present, the length of the slice must be one. Required.
  , V1beta1NamedRuleWithOperations -> Maybe [Text]
v1beta1NamedRuleWithOperationsOperations :: !(Maybe [Text]) -- ^ "operations" - Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If &#39;*&#39; is present, the length of the slice must be one. Required.
  , V1beta1NamedRuleWithOperations -> Maybe [Text]
v1beta1NamedRuleWithOperationsResourceNames :: !(Maybe [Text]) -- ^ "resourceNames" - ResourceNames is an optional white list of names that the rule applies to.  An empty set means that everything is allowed.
  , V1beta1NamedRuleWithOperations -> Maybe [Text]
v1beta1NamedRuleWithOperationsResources :: !(Maybe [Text]) -- ^ "resources" - Resources is a list of resources this rule applies to.  For example: &#39;pods&#39; means pods. &#39;pods/log&#39; means the log subresource of pods. &#39;*&#39; means all resources, but not subresources. &#39;pods/*&#39; means all subresources of pods. &#39;*/scale&#39; means all scale subresources. &#39;*/*&#39; means all resources and their subresources.  If wildcard is present, the validation rule will ensure resources do not overlap with each other.  Depending on the enclosing object, subresources might not be allowed. Required.
  , V1beta1NamedRuleWithOperations -> Maybe Text
v1beta1NamedRuleWithOperationsScope :: !(Maybe Text) -- ^ "scope" - scope specifies the scope of this rule. Valid values are \&quot;Cluster\&quot;, \&quot;Namespaced\&quot;, and \&quot;*\&quot; \&quot;Cluster\&quot; means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \&quot;Namespaced\&quot; means that only namespaced resources will match this rule. \&quot;*\&quot; means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \&quot;*\&quot;.
  } deriving (Int -> V1beta1NamedRuleWithOperations -> ShowS
[V1beta1NamedRuleWithOperations] -> ShowS
V1beta1NamedRuleWithOperations -> String
(Int -> V1beta1NamedRuleWithOperations -> ShowS)
-> (V1beta1NamedRuleWithOperations -> String)
-> ([V1beta1NamedRuleWithOperations] -> ShowS)
-> Show V1beta1NamedRuleWithOperations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1NamedRuleWithOperations -> ShowS
showsPrec :: Int -> V1beta1NamedRuleWithOperations -> ShowS
$cshow :: V1beta1NamedRuleWithOperations -> String
show :: V1beta1NamedRuleWithOperations -> String
$cshowList :: [V1beta1NamedRuleWithOperations] -> ShowS
showList :: [V1beta1NamedRuleWithOperations] -> ShowS
P.Show, V1beta1NamedRuleWithOperations
-> V1beta1NamedRuleWithOperations -> Bool
(V1beta1NamedRuleWithOperations
 -> V1beta1NamedRuleWithOperations -> Bool)
-> (V1beta1NamedRuleWithOperations
    -> V1beta1NamedRuleWithOperations -> Bool)
-> Eq V1beta1NamedRuleWithOperations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1NamedRuleWithOperations
-> V1beta1NamedRuleWithOperations -> Bool
== :: V1beta1NamedRuleWithOperations
-> V1beta1NamedRuleWithOperations -> Bool
$c/= :: V1beta1NamedRuleWithOperations
-> V1beta1NamedRuleWithOperations -> Bool
/= :: V1beta1NamedRuleWithOperations
-> V1beta1NamedRuleWithOperations -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1NamedRuleWithOperations
instance A.FromJSON V1beta1NamedRuleWithOperations where
  parseJSON :: Value -> Parser V1beta1NamedRuleWithOperations
parseJSON = String
-> (Object -> Parser V1beta1NamedRuleWithOperations)
-> Value
-> Parser V1beta1NamedRuleWithOperations
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1NamedRuleWithOperations" ((Object -> Parser V1beta1NamedRuleWithOperations)
 -> Value -> Parser V1beta1NamedRuleWithOperations)
-> (Object -> Parser V1beta1NamedRuleWithOperations)
-> Value
-> Parser V1beta1NamedRuleWithOperations
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> V1beta1NamedRuleWithOperations
V1beta1NamedRuleWithOperations
      (Maybe [Text]
 -> Maybe [Text]
 -> Maybe [Text]
 -> Maybe [Text]
 -> Maybe [Text]
 -> Maybe Text
 -> V1beta1NamedRuleWithOperations)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [Text]
      -> Maybe [Text]
      -> Maybe [Text]
      -> Maybe [Text]
      -> Maybe Text
      -> V1beta1NamedRuleWithOperations)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiGroups")
      Parser
  (Maybe [Text]
   -> Maybe [Text]
   -> Maybe [Text]
   -> Maybe [Text]
   -> Maybe Text
   -> V1beta1NamedRuleWithOperations)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [Text]
      -> Maybe [Text]
      -> Maybe [Text]
      -> Maybe Text
      -> V1beta1NamedRuleWithOperations)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersions")
      Parser
  (Maybe [Text]
   -> Maybe [Text]
   -> Maybe [Text]
   -> Maybe Text
   -> V1beta1NamedRuleWithOperations)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [Text]
      -> Maybe [Text] -> Maybe Text -> V1beta1NamedRuleWithOperations)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"operations")
      Parser
  (Maybe [Text]
   -> Maybe [Text] -> Maybe Text -> V1beta1NamedRuleWithOperations)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [Text] -> Maybe Text -> V1beta1NamedRuleWithOperations)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resourceNames")
      Parser
  (Maybe [Text] -> Maybe Text -> V1beta1NamedRuleWithOperations)
-> Parser (Maybe [Text])
-> Parser (Maybe Text -> V1beta1NamedRuleWithOperations)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resources")
      Parser (Maybe Text -> V1beta1NamedRuleWithOperations)
-> Parser (Maybe Text) -> Parser V1beta1NamedRuleWithOperations
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"scope")

-- | ToJSON V1beta1NamedRuleWithOperations
instance A.ToJSON V1beta1NamedRuleWithOperations where
  toJSON :: V1beta1NamedRuleWithOperations -> Value
toJSON V1beta1NamedRuleWithOperations {Maybe [Text]
Maybe Text
$sel:v1beta1NamedRuleWithOperationsApiGroups:V1beta1NamedRuleWithOperations :: V1beta1NamedRuleWithOperations -> Maybe [Text]
$sel:v1beta1NamedRuleWithOperationsApiVersions:V1beta1NamedRuleWithOperations :: V1beta1NamedRuleWithOperations -> Maybe [Text]
$sel:v1beta1NamedRuleWithOperationsOperations:V1beta1NamedRuleWithOperations :: V1beta1NamedRuleWithOperations -> Maybe [Text]
$sel:v1beta1NamedRuleWithOperationsResourceNames:V1beta1NamedRuleWithOperations :: V1beta1NamedRuleWithOperations -> Maybe [Text]
$sel:v1beta1NamedRuleWithOperationsResources:V1beta1NamedRuleWithOperations :: V1beta1NamedRuleWithOperations -> Maybe [Text]
$sel:v1beta1NamedRuleWithOperationsScope:V1beta1NamedRuleWithOperations :: V1beta1NamedRuleWithOperations -> Maybe Text
v1beta1NamedRuleWithOperationsApiGroups :: Maybe [Text]
v1beta1NamedRuleWithOperationsApiVersions :: Maybe [Text]
v1beta1NamedRuleWithOperationsOperations :: Maybe [Text]
v1beta1NamedRuleWithOperationsResourceNames :: Maybe [Text]
v1beta1NamedRuleWithOperationsResources :: Maybe [Text]
v1beta1NamedRuleWithOperationsScope :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiGroups" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1beta1NamedRuleWithOperationsApiGroups
      , Key
"apiVersions" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1beta1NamedRuleWithOperationsApiVersions
      , Key
"operations" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1beta1NamedRuleWithOperationsOperations
      , Key
"resourceNames" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1beta1NamedRuleWithOperationsResourceNames
      , Key
"resources" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1beta1NamedRuleWithOperationsResources
      , Key
"scope" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1NamedRuleWithOperationsScope
      ]


-- | Construct a value of type 'V1beta1NamedRuleWithOperations' (by applying it's required fields, if any)
mkV1beta1NamedRuleWithOperations
  :: V1beta1NamedRuleWithOperations
mkV1beta1NamedRuleWithOperations :: V1beta1NamedRuleWithOperations
mkV1beta1NamedRuleWithOperations =
  V1beta1NamedRuleWithOperations
  { $sel:v1beta1NamedRuleWithOperationsApiGroups:V1beta1NamedRuleWithOperations :: Maybe [Text]
v1beta1NamedRuleWithOperationsApiGroups = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1beta1NamedRuleWithOperationsApiVersions:V1beta1NamedRuleWithOperations :: Maybe [Text]
v1beta1NamedRuleWithOperationsApiVersions = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1beta1NamedRuleWithOperationsOperations:V1beta1NamedRuleWithOperations :: Maybe [Text]
v1beta1NamedRuleWithOperationsOperations = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1beta1NamedRuleWithOperationsResourceNames:V1beta1NamedRuleWithOperations :: Maybe [Text]
v1beta1NamedRuleWithOperationsResourceNames = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1beta1NamedRuleWithOperationsResources:V1beta1NamedRuleWithOperations :: Maybe [Text]
v1beta1NamedRuleWithOperationsResources = Maybe [Text]
forall a. Maybe a
Nothing
  , $sel:v1beta1NamedRuleWithOperationsScope:V1beta1NamedRuleWithOperations :: Maybe Text
v1beta1NamedRuleWithOperationsScope = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1beta1NetworkDeviceData
-- | V1beta1NetworkDeviceData
-- NetworkDeviceData provides network-related details for the allocated device. This information may be filled by drivers or other components to configure or identify the device within a network context.
data V1beta1NetworkDeviceData = V1beta1NetworkDeviceData
  { V1beta1NetworkDeviceData -> Maybe Text
v1beta1NetworkDeviceDataHardwareAddress :: !(Maybe Text) -- ^ "hardwareAddress" - HardwareAddress represents the hardware address (e.g. MAC Address) of the device&#39;s network interface.  Must not be longer than 128 characters.
  , V1beta1NetworkDeviceData -> Maybe Text
v1beta1NetworkDeviceDataInterfaceName :: !(Maybe Text) -- ^ "interfaceName" - InterfaceName specifies the name of the network interface associated with the allocated device. This might be the name of a physical or virtual network interface being configured in the pod.  Must not be longer than 256 characters.
  , V1beta1NetworkDeviceData -> Maybe [Text]
v1beta1NetworkDeviceDataIps :: !(Maybe [Text]) -- ^ "ips" - IPs lists the network addresses assigned to the device&#39;s network interface. This can include both IPv4 and IPv6 addresses. The IPs are in the CIDR notation, which includes both the address and the associated subnet mask. e.g.: \&quot;192.0.2.5/24\&quot; for IPv4 and \&quot;2001:db8::5/64\&quot; for IPv6.
  } deriving (Int -> V1beta1NetworkDeviceData -> ShowS
[V1beta1NetworkDeviceData] -> ShowS
V1beta1NetworkDeviceData -> String
(Int -> V1beta1NetworkDeviceData -> ShowS)
-> (V1beta1NetworkDeviceData -> String)
-> ([V1beta1NetworkDeviceData] -> ShowS)
-> Show V1beta1NetworkDeviceData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1NetworkDeviceData -> ShowS
showsPrec :: Int -> V1beta1NetworkDeviceData -> ShowS
$cshow :: V1beta1NetworkDeviceData -> String
show :: V1beta1NetworkDeviceData -> String
$cshowList :: [V1beta1NetworkDeviceData] -> ShowS
showList :: [V1beta1NetworkDeviceData] -> ShowS
P.Show, V1beta1NetworkDeviceData -> V1beta1NetworkDeviceData -> Bool
(V1beta1NetworkDeviceData -> V1beta1NetworkDeviceData -> Bool)
-> (V1beta1NetworkDeviceData -> V1beta1NetworkDeviceData -> Bool)
-> Eq V1beta1NetworkDeviceData
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1NetworkDeviceData -> V1beta1NetworkDeviceData -> Bool
== :: V1beta1NetworkDeviceData -> V1beta1NetworkDeviceData -> Bool
$c/= :: V1beta1NetworkDeviceData -> V1beta1NetworkDeviceData -> Bool
/= :: V1beta1NetworkDeviceData -> V1beta1NetworkDeviceData -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1NetworkDeviceData
instance A.FromJSON V1beta1NetworkDeviceData where
  parseJSON :: Value -> Parser V1beta1NetworkDeviceData
parseJSON = String
-> (Object -> Parser V1beta1NetworkDeviceData)
-> Value
-> Parser V1beta1NetworkDeviceData
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1NetworkDeviceData" ((Object -> Parser V1beta1NetworkDeviceData)
 -> Value -> Parser V1beta1NetworkDeviceData)
-> (Object -> Parser V1beta1NetworkDeviceData)
-> Value
-> Parser V1beta1NetworkDeviceData
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text -> Maybe [Text] -> V1beta1NetworkDeviceData
V1beta1NetworkDeviceData
      (Maybe Text
 -> Maybe Text -> Maybe [Text] -> V1beta1NetworkDeviceData)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe [Text] -> V1beta1NetworkDeviceData)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"hardwareAddress")
      Parser (Maybe Text -> Maybe [Text] -> V1beta1NetworkDeviceData)
-> Parser (Maybe Text)
-> Parser (Maybe [Text] -> V1beta1NetworkDeviceData)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"interfaceName")
      Parser (Maybe [Text] -> V1beta1NetworkDeviceData)
-> Parser (Maybe [Text]) -> Parser V1beta1NetworkDeviceData
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ips")

-- | ToJSON V1beta1NetworkDeviceData
instance A.ToJSON V1beta1NetworkDeviceData where
  toJSON :: V1beta1NetworkDeviceData -> Value
toJSON V1beta1NetworkDeviceData {Maybe [Text]
Maybe Text
$sel:v1beta1NetworkDeviceDataHardwareAddress:V1beta1NetworkDeviceData :: V1beta1NetworkDeviceData -> Maybe Text
$sel:v1beta1NetworkDeviceDataInterfaceName:V1beta1NetworkDeviceData :: V1beta1NetworkDeviceData -> Maybe Text
$sel:v1beta1NetworkDeviceDataIps:V1beta1NetworkDeviceData :: V1beta1NetworkDeviceData -> Maybe [Text]
v1beta1NetworkDeviceDataHardwareAddress :: Maybe Text
v1beta1NetworkDeviceDataInterfaceName :: Maybe Text
v1beta1NetworkDeviceDataIps :: Maybe [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"hardwareAddress" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1NetworkDeviceDataHardwareAddress
      , Key
"interfaceName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1NetworkDeviceDataInterfaceName
      , Key
"ips" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1beta1NetworkDeviceDataIps
      ]


-- | Construct a value of type 'V1beta1NetworkDeviceData' (by applying it's required fields, if any)
mkV1beta1NetworkDeviceData
  :: V1beta1NetworkDeviceData
mkV1beta1NetworkDeviceData :: V1beta1NetworkDeviceData
mkV1beta1NetworkDeviceData =
  V1beta1NetworkDeviceData
  { $sel:v1beta1NetworkDeviceDataHardwareAddress:V1beta1NetworkDeviceData :: Maybe Text
v1beta1NetworkDeviceDataHardwareAddress = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1NetworkDeviceDataInterfaceName:V1beta1NetworkDeviceData :: Maybe Text
v1beta1NetworkDeviceDataInterfaceName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1NetworkDeviceDataIps:V1beta1NetworkDeviceData :: Maybe [Text]
v1beta1NetworkDeviceDataIps = Maybe [Text]
forall a. Maybe a
Nothing
  }

-- ** V1beta1OpaqueDeviceConfiguration
-- | V1beta1OpaqueDeviceConfiguration
-- OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.
data V1beta1OpaqueDeviceConfiguration = V1beta1OpaqueDeviceConfiguration
  { V1beta1OpaqueDeviceConfiguration -> Text
v1beta1OpaqueDeviceConfigurationDriver :: !(Text) -- ^ /Required/ "driver" - Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.  An admission policy provided by the driver developer could use this to decide whether it needs to validate them.  Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.
  , V1beta1OpaqueDeviceConfiguration -> Value
v1beta1OpaqueDeviceConfigurationParameters :: !(A.Value) -- ^ /Required/ "parameters" - Parameters can contain arbitrary data. It is the responsibility of the driver developer to handle validation and versioning. Typically this includes self-identification and a version (\&quot;kind\&quot; + \&quot;apiVersion\&quot; for Kubernetes types), with conversion between different versions.  The length of the raw data must be smaller or equal to 10 Ki.
  } deriving (Int -> V1beta1OpaqueDeviceConfiguration -> ShowS
[V1beta1OpaqueDeviceConfiguration] -> ShowS
V1beta1OpaqueDeviceConfiguration -> String
(Int -> V1beta1OpaqueDeviceConfiguration -> ShowS)
-> (V1beta1OpaqueDeviceConfiguration -> String)
-> ([V1beta1OpaqueDeviceConfiguration] -> ShowS)
-> Show V1beta1OpaqueDeviceConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1OpaqueDeviceConfiguration -> ShowS
showsPrec :: Int -> V1beta1OpaqueDeviceConfiguration -> ShowS
$cshow :: V1beta1OpaqueDeviceConfiguration -> String
show :: V1beta1OpaqueDeviceConfiguration -> String
$cshowList :: [V1beta1OpaqueDeviceConfiguration] -> ShowS
showList :: [V1beta1OpaqueDeviceConfiguration] -> ShowS
P.Show, V1beta1OpaqueDeviceConfiguration
-> V1beta1OpaqueDeviceConfiguration -> Bool
(V1beta1OpaqueDeviceConfiguration
 -> V1beta1OpaqueDeviceConfiguration -> Bool)
-> (V1beta1OpaqueDeviceConfiguration
    -> V1beta1OpaqueDeviceConfiguration -> Bool)
-> Eq V1beta1OpaqueDeviceConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1OpaqueDeviceConfiguration
-> V1beta1OpaqueDeviceConfiguration -> Bool
== :: V1beta1OpaqueDeviceConfiguration
-> V1beta1OpaqueDeviceConfiguration -> Bool
$c/= :: V1beta1OpaqueDeviceConfiguration
-> V1beta1OpaqueDeviceConfiguration -> Bool
/= :: V1beta1OpaqueDeviceConfiguration
-> V1beta1OpaqueDeviceConfiguration -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1OpaqueDeviceConfiguration
instance A.FromJSON V1beta1OpaqueDeviceConfiguration where
  parseJSON :: Value -> Parser V1beta1OpaqueDeviceConfiguration
parseJSON = String
-> (Object -> Parser V1beta1OpaqueDeviceConfiguration)
-> Value
-> Parser V1beta1OpaqueDeviceConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1OpaqueDeviceConfiguration" ((Object -> Parser V1beta1OpaqueDeviceConfiguration)
 -> Value -> Parser V1beta1OpaqueDeviceConfiguration)
-> (Object -> Parser V1beta1OpaqueDeviceConfiguration)
-> Value
-> Parser V1beta1OpaqueDeviceConfiguration
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Value -> V1beta1OpaqueDeviceConfiguration
V1beta1OpaqueDeviceConfiguration
      (Text -> Value -> V1beta1OpaqueDeviceConfiguration)
-> Parser Text
-> Parser (Value -> V1beta1OpaqueDeviceConfiguration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"driver")
      Parser (Value -> V1beta1OpaqueDeviceConfiguration)
-> Parser Value -> Parser V1beta1OpaqueDeviceConfiguration
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Value
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"parameters")

-- | ToJSON V1beta1OpaqueDeviceConfiguration
instance A.ToJSON V1beta1OpaqueDeviceConfiguration where
  toJSON :: V1beta1OpaqueDeviceConfiguration -> Value
toJSON V1beta1OpaqueDeviceConfiguration {Value
Text
$sel:v1beta1OpaqueDeviceConfigurationDriver:V1beta1OpaqueDeviceConfiguration :: V1beta1OpaqueDeviceConfiguration -> Text
$sel:v1beta1OpaqueDeviceConfigurationParameters:V1beta1OpaqueDeviceConfiguration :: V1beta1OpaqueDeviceConfiguration -> Value
v1beta1OpaqueDeviceConfigurationDriver :: Text
v1beta1OpaqueDeviceConfigurationParameters :: Value
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"driver" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1beta1OpaqueDeviceConfigurationDriver
      , Key
"parameters" Key -> Value -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Value
v1beta1OpaqueDeviceConfigurationParameters
      ]


-- | Construct a value of type 'V1beta1OpaqueDeviceConfiguration' (by applying it's required fields, if any)
mkV1beta1OpaqueDeviceConfiguration
  :: Text -- ^ 'v1beta1OpaqueDeviceConfigurationDriver': Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.  An admission policy provided by the driver developer could use this to decide whether it needs to validate them.  Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.
  -> A.Value -- ^ 'v1beta1OpaqueDeviceConfigurationParameters': Parameters can contain arbitrary data. It is the responsibility of the driver developer to handle validation and versioning. Typically this includes self-identification and a version (\"kind\" + \"apiVersion\" for Kubernetes types), with conversion between different versions.  The length of the raw data must be smaller or equal to 10 Ki.
  -> V1beta1OpaqueDeviceConfiguration
mkV1beta1OpaqueDeviceConfiguration :: Text -> Value -> V1beta1OpaqueDeviceConfiguration
mkV1beta1OpaqueDeviceConfiguration Text
v1beta1OpaqueDeviceConfigurationDriver Value
v1beta1OpaqueDeviceConfigurationParameters =
  V1beta1OpaqueDeviceConfiguration
  { Text
$sel:v1beta1OpaqueDeviceConfigurationDriver:V1beta1OpaqueDeviceConfiguration :: Text
v1beta1OpaqueDeviceConfigurationDriver :: Text
v1beta1OpaqueDeviceConfigurationDriver
  , Value
$sel:v1beta1OpaqueDeviceConfigurationParameters:V1beta1OpaqueDeviceConfiguration :: Value
v1beta1OpaqueDeviceConfigurationParameters :: Value
v1beta1OpaqueDeviceConfigurationParameters
  }

-- ** V1beta1ParamKind
-- | V1beta1ParamKind
-- ParamKind is a tuple of Group Kind and Version.
data V1beta1ParamKind = V1beta1ParamKind
  { V1beta1ParamKind -> Maybe Text
v1beta1ParamKindApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion is the API group version the resources belong to. In format of \&quot;group/version\&quot;. Required.
  , V1beta1ParamKind -> Maybe Text
v1beta1ParamKindKind :: !(Maybe Text) -- ^ "kind" - Kind is the API kind the resources belong to. Required.
  } deriving (Int -> V1beta1ParamKind -> ShowS
[V1beta1ParamKind] -> ShowS
V1beta1ParamKind -> String
(Int -> V1beta1ParamKind -> ShowS)
-> (V1beta1ParamKind -> String)
-> ([V1beta1ParamKind] -> ShowS)
-> Show V1beta1ParamKind
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1ParamKind -> ShowS
showsPrec :: Int -> V1beta1ParamKind -> ShowS
$cshow :: V1beta1ParamKind -> String
show :: V1beta1ParamKind -> String
$cshowList :: [V1beta1ParamKind] -> ShowS
showList :: [V1beta1ParamKind] -> ShowS
P.Show, V1beta1ParamKind -> V1beta1ParamKind -> Bool
(V1beta1ParamKind -> V1beta1ParamKind -> Bool)
-> (V1beta1ParamKind -> V1beta1ParamKind -> Bool)
-> Eq V1beta1ParamKind
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1ParamKind -> V1beta1ParamKind -> Bool
== :: V1beta1ParamKind -> V1beta1ParamKind -> Bool
$c/= :: V1beta1ParamKind -> V1beta1ParamKind -> Bool
/= :: V1beta1ParamKind -> V1beta1ParamKind -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1ParamKind
instance A.FromJSON V1beta1ParamKind where
  parseJSON :: Value -> Parser V1beta1ParamKind
parseJSON = String
-> (Object -> Parser V1beta1ParamKind)
-> Value
-> Parser V1beta1ParamKind
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1ParamKind" ((Object -> Parser V1beta1ParamKind)
 -> Value -> Parser V1beta1ParamKind)
-> (Object -> Parser V1beta1ParamKind)
-> Value
-> Parser V1beta1ParamKind
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Maybe Text -> V1beta1ParamKind
V1beta1ParamKind
      (Maybe Text -> Maybe Text -> V1beta1ParamKind)
-> Parser (Maybe Text) -> Parser (Maybe Text -> V1beta1ParamKind)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser (Maybe Text -> V1beta1ParamKind)
-> Parser (Maybe Text) -> Parser V1beta1ParamKind
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")

-- | ToJSON V1beta1ParamKind
instance A.ToJSON V1beta1ParamKind where
  toJSON :: V1beta1ParamKind -> Value
toJSON V1beta1ParamKind {Maybe Text
$sel:v1beta1ParamKindApiVersion:V1beta1ParamKind :: V1beta1ParamKind -> Maybe Text
$sel:v1beta1ParamKindKind:V1beta1ParamKind :: V1beta1ParamKind -> Maybe Text
v1beta1ParamKindApiVersion :: Maybe Text
v1beta1ParamKindKind :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ParamKindApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ParamKindKind
      ]


-- | Construct a value of type 'V1beta1ParamKind' (by applying it's required fields, if any)
mkV1beta1ParamKind
  :: V1beta1ParamKind
mkV1beta1ParamKind :: V1beta1ParamKind
mkV1beta1ParamKind =
  V1beta1ParamKind
  { $sel:v1beta1ParamKindApiVersion:V1beta1ParamKind :: Maybe Text
v1beta1ParamKindApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1ParamKindKind:V1beta1ParamKind :: Maybe Text
v1beta1ParamKindKind = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1beta1ParamRef
-- | V1beta1ParamRef
-- ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding.
data V1beta1ParamRef = V1beta1ParamRef
  { V1beta1ParamRef -> Maybe Text
v1beta1ParamRefName :: !(Maybe Text) -- ^ "name" - name is the name of the resource being referenced.  One of &#x60;name&#x60; or &#x60;selector&#x60; must be set, but &#x60;name&#x60; and &#x60;selector&#x60; are mutually exclusive properties. If one is set, the other must be unset.  A single parameter used for all admission requests can be configured by setting the &#x60;name&#x60; field, leaving &#x60;selector&#x60; blank, and setting namespace if &#x60;paramKind&#x60; is namespace-scoped.
  , V1beta1ParamRef -> Maybe Text
v1beta1ParamRefNamespace :: !(Maybe Text) -- ^ "namespace" - namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both &#x60;name&#x60; and &#x60;selector&#x60; fields.  A per-namespace parameter may be used by specifying a namespace-scoped &#x60;paramKind&#x60; in the policy and leaving this field empty.  - If &#x60;paramKind&#x60; is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error.  - If &#x60;paramKind&#x60; is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error.
  , V1beta1ParamRef -> Maybe Text
v1beta1ParamRefParameterNotFoundAction :: !(Maybe Text) -- ^ "parameterNotFoundAction" - &#x60;parameterNotFoundAction&#x60; controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to &#x60;Allow&#x60;, then no matched parameters will be treated as successful validation by the binding. If set to &#x60;Deny&#x60;, then no matched parameters will be subject to the &#x60;failurePolicy&#x60; of the policy.  Allowed values are &#x60;Allow&#x60; or &#x60;Deny&#x60;  Required
  , V1beta1ParamRef -> Maybe V1LabelSelector
v1beta1ParamRefSelector :: !(Maybe V1LabelSelector) -- ^ "selector"
  } deriving (Int -> V1beta1ParamRef -> ShowS
[V1beta1ParamRef] -> ShowS
V1beta1ParamRef -> String
(Int -> V1beta1ParamRef -> ShowS)
-> (V1beta1ParamRef -> String)
-> ([V1beta1ParamRef] -> ShowS)
-> Show V1beta1ParamRef
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1ParamRef -> ShowS
showsPrec :: Int -> V1beta1ParamRef -> ShowS
$cshow :: V1beta1ParamRef -> String
show :: V1beta1ParamRef -> String
$cshowList :: [V1beta1ParamRef] -> ShowS
showList :: [V1beta1ParamRef] -> ShowS
P.Show, V1beta1ParamRef -> V1beta1ParamRef -> Bool
(V1beta1ParamRef -> V1beta1ParamRef -> Bool)
-> (V1beta1ParamRef -> V1beta1ParamRef -> Bool)
-> Eq V1beta1ParamRef
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1ParamRef -> V1beta1ParamRef -> Bool
== :: V1beta1ParamRef -> V1beta1ParamRef -> Bool
$c/= :: V1beta1ParamRef -> V1beta1ParamRef -> Bool
/= :: V1beta1ParamRef -> V1beta1ParamRef -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1ParamRef
instance A.FromJSON V1beta1ParamRef where
  parseJSON :: Value -> Parser V1beta1ParamRef
parseJSON = String
-> (Object -> Parser V1beta1ParamRef)
-> Value
-> Parser V1beta1ParamRef
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1ParamRef" ((Object -> Parser V1beta1ParamRef)
 -> Value -> Parser V1beta1ParamRef)
-> (Object -> Parser V1beta1ParamRef)
-> Value
-> Parser V1beta1ParamRef
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe V1LabelSelector
-> V1beta1ParamRef
V1beta1ParamRef
      (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe V1LabelSelector
 -> V1beta1ParamRef)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe V1LabelSelector -> V1beta1ParamRef)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"name")
      Parser
  (Maybe Text
   -> Maybe Text -> Maybe V1LabelSelector -> V1beta1ParamRef)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe V1LabelSelector -> V1beta1ParamRef)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"namespace")
      Parser (Maybe Text -> Maybe V1LabelSelector -> V1beta1ParamRef)
-> Parser (Maybe Text)
-> Parser (Maybe V1LabelSelector -> V1beta1ParamRef)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"parameterNotFoundAction")
      Parser (Maybe V1LabelSelector -> V1beta1ParamRef)
-> Parser (Maybe V1LabelSelector) -> Parser V1beta1ParamRef
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LabelSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"selector")

-- | ToJSON V1beta1ParamRef
instance A.ToJSON V1beta1ParamRef where
  toJSON :: V1beta1ParamRef -> Value
toJSON V1beta1ParamRef {Maybe Text
Maybe V1LabelSelector
$sel:v1beta1ParamRefName:V1beta1ParamRef :: V1beta1ParamRef -> Maybe Text
$sel:v1beta1ParamRefNamespace:V1beta1ParamRef :: V1beta1ParamRef -> Maybe Text
$sel:v1beta1ParamRefParameterNotFoundAction:V1beta1ParamRef :: V1beta1ParamRef -> Maybe Text
$sel:v1beta1ParamRefSelector:V1beta1ParamRef :: V1beta1ParamRef -> Maybe V1LabelSelector
v1beta1ParamRefName :: Maybe Text
v1beta1ParamRefNamespace :: Maybe Text
v1beta1ParamRefParameterNotFoundAction :: Maybe Text
v1beta1ParamRefSelector :: Maybe V1LabelSelector
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"name" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ParamRefName
      , Key
"namespace" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ParamRefNamespace
      , Key
"parameterNotFoundAction" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ParamRefParameterNotFoundAction
      , Key
"selector" Key -> Maybe V1LabelSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LabelSelector
v1beta1ParamRefSelector
      ]


-- | Construct a value of type 'V1beta1ParamRef' (by applying it's required fields, if any)
mkV1beta1ParamRef
  :: V1beta1ParamRef
mkV1beta1ParamRef :: V1beta1ParamRef
mkV1beta1ParamRef =
  V1beta1ParamRef
  { $sel:v1beta1ParamRefName:V1beta1ParamRef :: Maybe Text
v1beta1ParamRefName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1ParamRefNamespace:V1beta1ParamRef :: Maybe Text
v1beta1ParamRefNamespace = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1ParamRefParameterNotFoundAction:V1beta1ParamRef :: Maybe Text
v1beta1ParamRefParameterNotFoundAction = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1ParamRefSelector:V1beta1ParamRef :: Maybe V1LabelSelector
v1beta1ParamRefSelector = Maybe V1LabelSelector
forall a. Maybe a
Nothing
  }

-- ** V1beta1ParentReference
-- | V1beta1ParentReference
-- ParentReference describes a reference to a parent object.
data V1beta1ParentReference = V1beta1ParentReference
  { V1beta1ParentReference -> Maybe Text
v1beta1ParentReferenceGroup :: !(Maybe Text) -- ^ "group" - Group is the group of the object being referenced.
  , V1beta1ParentReference -> Text
v1beta1ParentReferenceName :: !(Text) -- ^ /Required/ "name" - Name is the name of the object being referenced.
  , V1beta1ParentReference -> Maybe Text
v1beta1ParentReferenceNamespace :: !(Maybe Text) -- ^ "namespace" - Namespace is the namespace of the object being referenced.
  , V1beta1ParentReference -> Text
v1beta1ParentReferenceResource :: !(Text) -- ^ /Required/ "resource" - Resource is the resource of the object being referenced.
  } deriving (Int -> V1beta1ParentReference -> ShowS
[V1beta1ParentReference] -> ShowS
V1beta1ParentReference -> String
(Int -> V1beta1ParentReference -> ShowS)
-> (V1beta1ParentReference -> String)
-> ([V1beta1ParentReference] -> ShowS)
-> Show V1beta1ParentReference
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1ParentReference -> ShowS
showsPrec :: Int -> V1beta1ParentReference -> ShowS
$cshow :: V1beta1ParentReference -> String
show :: V1beta1ParentReference -> String
$cshowList :: [V1beta1ParentReference] -> ShowS
showList :: [V1beta1ParentReference] -> ShowS
P.Show, V1beta1ParentReference -> V1beta1ParentReference -> Bool
(V1beta1ParentReference -> V1beta1ParentReference -> Bool)
-> (V1beta1ParentReference -> V1beta1ParentReference -> Bool)
-> Eq V1beta1ParentReference
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1ParentReference -> V1beta1ParentReference -> Bool
== :: V1beta1ParentReference -> V1beta1ParentReference -> Bool
$c/= :: V1beta1ParentReference -> V1beta1ParentReference -> Bool
/= :: V1beta1ParentReference -> V1beta1ParentReference -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1ParentReference
instance A.FromJSON V1beta1ParentReference where
  parseJSON :: Value -> Parser V1beta1ParentReference
parseJSON = String
-> (Object -> Parser V1beta1ParentReference)
-> Value
-> Parser V1beta1ParentReference
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1ParentReference" ((Object -> Parser V1beta1ParentReference)
 -> Value -> Parser V1beta1ParentReference)
-> (Object -> Parser V1beta1ParentReference)
-> Value
-> Parser V1beta1ParentReference
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Text -> Maybe Text -> Text -> V1beta1ParentReference
V1beta1ParentReference
      (Maybe Text
 -> Text -> Maybe Text -> Text -> V1beta1ParentReference)
-> Parser (Maybe Text)
-> Parser (Text -> Maybe Text -> Text -> V1beta1ParentReference)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"group")
      Parser (Text -> Maybe Text -> Text -> V1beta1ParentReference)
-> Parser Text
-> Parser (Maybe Text -> Text -> V1beta1ParentReference)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser (Maybe Text -> Text -> V1beta1ParentReference)
-> Parser (Maybe Text) -> Parser (Text -> V1beta1ParentReference)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"namespace")
      Parser (Text -> V1beta1ParentReference)
-> Parser Text -> Parser V1beta1ParentReference
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"resource")

-- | ToJSON V1beta1ParentReference
instance A.ToJSON V1beta1ParentReference where
  toJSON :: V1beta1ParentReference -> Value
toJSON V1beta1ParentReference {Maybe Text
Text
$sel:v1beta1ParentReferenceGroup:V1beta1ParentReference :: V1beta1ParentReference -> Maybe Text
$sel:v1beta1ParentReferenceName:V1beta1ParentReference :: V1beta1ParentReference -> Text
$sel:v1beta1ParentReferenceNamespace:V1beta1ParentReference :: V1beta1ParentReference -> Maybe Text
$sel:v1beta1ParentReferenceResource:V1beta1ParentReference :: V1beta1ParentReference -> Text
v1beta1ParentReferenceGroup :: Maybe Text
v1beta1ParentReferenceName :: Text
v1beta1ParentReferenceNamespace :: Maybe Text
v1beta1ParentReferenceResource :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"group" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ParentReferenceGroup
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1beta1ParentReferenceName
      , Key
"namespace" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ParentReferenceNamespace
      , Key
"resource" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1beta1ParentReferenceResource
      ]


-- | Construct a value of type 'V1beta1ParentReference' (by applying it's required fields, if any)
mkV1beta1ParentReference
  :: Text -- ^ 'v1beta1ParentReferenceName': Name is the name of the object being referenced.
  -> Text -- ^ 'v1beta1ParentReferenceResource': Resource is the resource of the object being referenced.
  -> V1beta1ParentReference
mkV1beta1ParentReference :: Text -> Text -> V1beta1ParentReference
mkV1beta1ParentReference Text
v1beta1ParentReferenceName Text
v1beta1ParentReferenceResource =
  V1beta1ParentReference
  { $sel:v1beta1ParentReferenceGroup:V1beta1ParentReference :: Maybe Text
v1beta1ParentReferenceGroup = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1beta1ParentReferenceName:V1beta1ParentReference :: Text
v1beta1ParentReferenceName :: Text
v1beta1ParentReferenceName
  , $sel:v1beta1ParentReferenceNamespace:V1beta1ParentReference :: Maybe Text
v1beta1ParentReferenceNamespace = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1beta1ParentReferenceResource:V1beta1ParentReference :: Text
v1beta1ParentReferenceResource :: Text
v1beta1ParentReferenceResource
  }

-- ** V1beta1ResourceClaim
-- | V1beta1ResourceClaim
-- ResourceClaim describes a request for access to resources in the cluster, for use by workloads. For example, if a workload needs an accelerator device with specific properties, this is how that request is expressed. The status stanza tracks whether this claim has been satisfied and what specific resources have been allocated.  This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.
data V1beta1ResourceClaim = V1beta1ResourceClaim
  { V1beta1ResourceClaim -> Maybe Text
v1beta1ResourceClaimApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1beta1ResourceClaim -> Maybe Text
v1beta1ResourceClaimKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1beta1ResourceClaim -> Maybe V1ObjectMeta
v1beta1ResourceClaimMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1beta1ResourceClaim -> V1beta1ResourceClaimSpec
v1beta1ResourceClaimSpec :: !(V1beta1ResourceClaimSpec) -- ^ /Required/ "spec"
  , V1beta1ResourceClaim -> Maybe V1beta1ResourceClaimStatus
v1beta1ResourceClaimStatus :: !(Maybe V1beta1ResourceClaimStatus) -- ^ "status"
  } deriving (Int -> V1beta1ResourceClaim -> ShowS
[V1beta1ResourceClaim] -> ShowS
V1beta1ResourceClaim -> String
(Int -> V1beta1ResourceClaim -> ShowS)
-> (V1beta1ResourceClaim -> String)
-> ([V1beta1ResourceClaim] -> ShowS)
-> Show V1beta1ResourceClaim
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1ResourceClaim -> ShowS
showsPrec :: Int -> V1beta1ResourceClaim -> ShowS
$cshow :: V1beta1ResourceClaim -> String
show :: V1beta1ResourceClaim -> String
$cshowList :: [V1beta1ResourceClaim] -> ShowS
showList :: [V1beta1ResourceClaim] -> ShowS
P.Show, V1beta1ResourceClaim -> V1beta1ResourceClaim -> Bool
(V1beta1ResourceClaim -> V1beta1ResourceClaim -> Bool)
-> (V1beta1ResourceClaim -> V1beta1ResourceClaim -> Bool)
-> Eq V1beta1ResourceClaim
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1ResourceClaim -> V1beta1ResourceClaim -> Bool
== :: V1beta1ResourceClaim -> V1beta1ResourceClaim -> Bool
$c/= :: V1beta1ResourceClaim -> V1beta1ResourceClaim -> Bool
/= :: V1beta1ResourceClaim -> V1beta1ResourceClaim -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1ResourceClaim
instance A.FromJSON V1beta1ResourceClaim where
  parseJSON :: Value -> Parser V1beta1ResourceClaim
parseJSON = String
-> (Object -> Parser V1beta1ResourceClaim)
-> Value
-> Parser V1beta1ResourceClaim
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1ResourceClaim" ((Object -> Parser V1beta1ResourceClaim)
 -> Value -> Parser V1beta1ResourceClaim)
-> (Object -> Parser V1beta1ResourceClaim)
-> Value
-> Parser V1beta1ResourceClaim
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> V1beta1ResourceClaimSpec
-> Maybe V1beta1ResourceClaimStatus
-> V1beta1ResourceClaim
V1beta1ResourceClaim
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> V1beta1ResourceClaimSpec
 -> Maybe V1beta1ResourceClaimStatus
 -> V1beta1ResourceClaim)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> V1beta1ResourceClaimSpec
      -> Maybe V1beta1ResourceClaimStatus
      -> V1beta1ResourceClaim)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> V1beta1ResourceClaimSpec
   -> Maybe V1beta1ResourceClaimStatus
   -> V1beta1ResourceClaim)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> V1beta1ResourceClaimSpec
      -> Maybe V1beta1ResourceClaimStatus
      -> V1beta1ResourceClaim)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> V1beta1ResourceClaimSpec
   -> Maybe V1beta1ResourceClaimStatus
   -> V1beta1ResourceClaim)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (V1beta1ResourceClaimSpec
      -> Maybe V1beta1ResourceClaimStatus -> V1beta1ResourceClaim)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (V1beta1ResourceClaimSpec
   -> Maybe V1beta1ResourceClaimStatus -> V1beta1ResourceClaim)
-> Parser V1beta1ResourceClaimSpec
-> Parser
     (Maybe V1beta1ResourceClaimStatus -> V1beta1ResourceClaim)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1beta1ResourceClaimSpec
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"spec")
      Parser (Maybe V1beta1ResourceClaimStatus -> V1beta1ResourceClaim)
-> Parser (Maybe V1beta1ResourceClaimStatus)
-> Parser V1beta1ResourceClaim
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1beta1ResourceClaimStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1beta1ResourceClaim
instance A.ToJSON V1beta1ResourceClaim where
  toJSON :: V1beta1ResourceClaim -> Value
toJSON V1beta1ResourceClaim {Maybe Text
Maybe V1beta1ResourceClaimStatus
Maybe V1ObjectMeta
V1beta1ResourceClaimSpec
$sel:v1beta1ResourceClaimApiVersion:V1beta1ResourceClaim :: V1beta1ResourceClaim -> Maybe Text
$sel:v1beta1ResourceClaimKind:V1beta1ResourceClaim :: V1beta1ResourceClaim -> Maybe Text
$sel:v1beta1ResourceClaimMetadata:V1beta1ResourceClaim :: V1beta1ResourceClaim -> Maybe V1ObjectMeta
$sel:v1beta1ResourceClaimSpec:V1beta1ResourceClaim :: V1beta1ResourceClaim -> V1beta1ResourceClaimSpec
$sel:v1beta1ResourceClaimStatus:V1beta1ResourceClaim :: V1beta1ResourceClaim -> Maybe V1beta1ResourceClaimStatus
v1beta1ResourceClaimApiVersion :: Maybe Text
v1beta1ResourceClaimKind :: Maybe Text
v1beta1ResourceClaimMetadata :: Maybe V1ObjectMeta
v1beta1ResourceClaimSpec :: V1beta1ResourceClaimSpec
v1beta1ResourceClaimStatus :: Maybe V1beta1ResourceClaimStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ResourceClaimApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ResourceClaimKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1beta1ResourceClaimMetadata
      , Key
"spec" Key -> V1beta1ResourceClaimSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1beta1ResourceClaimSpec
v1beta1ResourceClaimSpec
      , Key
"status" Key -> Maybe V1beta1ResourceClaimStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1beta1ResourceClaimStatus
v1beta1ResourceClaimStatus
      ]


-- | Construct a value of type 'V1beta1ResourceClaim' (by applying it's required fields, if any)
mkV1beta1ResourceClaim
  :: V1beta1ResourceClaimSpec -- ^ 'v1beta1ResourceClaimSpec' 
  -> V1beta1ResourceClaim
mkV1beta1ResourceClaim :: V1beta1ResourceClaimSpec -> V1beta1ResourceClaim
mkV1beta1ResourceClaim V1beta1ResourceClaimSpec
v1beta1ResourceClaimSpec =
  V1beta1ResourceClaim
  { $sel:v1beta1ResourceClaimApiVersion:V1beta1ResourceClaim :: Maybe Text
v1beta1ResourceClaimApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1ResourceClaimKind:V1beta1ResourceClaim :: Maybe Text
v1beta1ResourceClaimKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1ResourceClaimMetadata:V1beta1ResourceClaim :: Maybe V1ObjectMeta
v1beta1ResourceClaimMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , V1beta1ResourceClaimSpec
$sel:v1beta1ResourceClaimSpec:V1beta1ResourceClaim :: V1beta1ResourceClaimSpec
v1beta1ResourceClaimSpec :: V1beta1ResourceClaimSpec
v1beta1ResourceClaimSpec
  , $sel:v1beta1ResourceClaimStatus:V1beta1ResourceClaim :: Maybe V1beta1ResourceClaimStatus
v1beta1ResourceClaimStatus = Maybe V1beta1ResourceClaimStatus
forall a. Maybe a
Nothing
  }

-- ** V1beta1ResourceClaimConsumerReference
-- | V1beta1ResourceClaimConsumerReference
-- ResourceClaimConsumerReference contains enough information to let you locate the consumer of a ResourceClaim. The user must be a resource in the same namespace as the ResourceClaim.
data V1beta1ResourceClaimConsumerReference = V1beta1ResourceClaimConsumerReference
  { V1beta1ResourceClaimConsumerReference -> Maybe Text
v1beta1ResourceClaimConsumerReferenceApiGroup :: !(Maybe Text) -- ^ "apiGroup" - APIGroup is the group for the resource being referenced. It is empty for the core API. This matches the group in the APIVersion that is used when creating the resources.
  , V1beta1ResourceClaimConsumerReference -> Text
v1beta1ResourceClaimConsumerReferenceName :: !(Text) -- ^ /Required/ "name" - Name is the name of resource being referenced.
  , V1beta1ResourceClaimConsumerReference -> Text
v1beta1ResourceClaimConsumerReferenceResource :: !(Text) -- ^ /Required/ "resource" - Resource is the type of resource being referenced, for example \&quot;pods\&quot;.
  , V1beta1ResourceClaimConsumerReference -> Text
v1beta1ResourceClaimConsumerReferenceUid :: !(Text) -- ^ /Required/ "uid" - UID identifies exactly one incarnation of the resource.
  } deriving (Int -> V1beta1ResourceClaimConsumerReference -> ShowS
[V1beta1ResourceClaimConsumerReference] -> ShowS
V1beta1ResourceClaimConsumerReference -> String
(Int -> V1beta1ResourceClaimConsumerReference -> ShowS)
-> (V1beta1ResourceClaimConsumerReference -> String)
-> ([V1beta1ResourceClaimConsumerReference] -> ShowS)
-> Show V1beta1ResourceClaimConsumerReference
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1ResourceClaimConsumerReference -> ShowS
showsPrec :: Int -> V1beta1ResourceClaimConsumerReference -> ShowS
$cshow :: V1beta1ResourceClaimConsumerReference -> String
show :: V1beta1ResourceClaimConsumerReference -> String
$cshowList :: [V1beta1ResourceClaimConsumerReference] -> ShowS
showList :: [V1beta1ResourceClaimConsumerReference] -> ShowS
P.Show, V1beta1ResourceClaimConsumerReference
-> V1beta1ResourceClaimConsumerReference -> Bool
(V1beta1ResourceClaimConsumerReference
 -> V1beta1ResourceClaimConsumerReference -> Bool)
-> (V1beta1ResourceClaimConsumerReference
    -> V1beta1ResourceClaimConsumerReference -> Bool)
-> Eq V1beta1ResourceClaimConsumerReference
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1ResourceClaimConsumerReference
-> V1beta1ResourceClaimConsumerReference -> Bool
== :: V1beta1ResourceClaimConsumerReference
-> V1beta1ResourceClaimConsumerReference -> Bool
$c/= :: V1beta1ResourceClaimConsumerReference
-> V1beta1ResourceClaimConsumerReference -> Bool
/= :: V1beta1ResourceClaimConsumerReference
-> V1beta1ResourceClaimConsumerReference -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1ResourceClaimConsumerReference
instance A.FromJSON V1beta1ResourceClaimConsumerReference where
  parseJSON :: Value -> Parser V1beta1ResourceClaimConsumerReference
parseJSON = String
-> (Object -> Parser V1beta1ResourceClaimConsumerReference)
-> Value
-> Parser V1beta1ResourceClaimConsumerReference
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1ResourceClaimConsumerReference" ((Object -> Parser V1beta1ResourceClaimConsumerReference)
 -> Value -> Parser V1beta1ResourceClaimConsumerReference)
-> (Object -> Parser V1beta1ResourceClaimConsumerReference)
-> Value
-> Parser V1beta1ResourceClaimConsumerReference
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Text -> Text -> Text -> V1beta1ResourceClaimConsumerReference
V1beta1ResourceClaimConsumerReference
      (Maybe Text
 -> Text -> Text -> Text -> V1beta1ResourceClaimConsumerReference)
-> Parser (Maybe Text)
-> Parser
     (Text -> Text -> Text -> V1beta1ResourceClaimConsumerReference)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiGroup")
      Parser
  (Text -> Text -> Text -> V1beta1ResourceClaimConsumerReference)
-> Parser Text
-> Parser (Text -> Text -> V1beta1ResourceClaimConsumerReference)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser (Text -> Text -> V1beta1ResourceClaimConsumerReference)
-> Parser Text
-> Parser (Text -> V1beta1ResourceClaimConsumerReference)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"resource")
      Parser (Text -> V1beta1ResourceClaimConsumerReference)
-> Parser Text -> Parser V1beta1ResourceClaimConsumerReference
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"uid")

-- | ToJSON V1beta1ResourceClaimConsumerReference
instance A.ToJSON V1beta1ResourceClaimConsumerReference where
  toJSON :: V1beta1ResourceClaimConsumerReference -> Value
toJSON V1beta1ResourceClaimConsumerReference {Maybe Text
Text
$sel:v1beta1ResourceClaimConsumerReferenceApiGroup:V1beta1ResourceClaimConsumerReference :: V1beta1ResourceClaimConsumerReference -> Maybe Text
$sel:v1beta1ResourceClaimConsumerReferenceName:V1beta1ResourceClaimConsumerReference :: V1beta1ResourceClaimConsumerReference -> Text
$sel:v1beta1ResourceClaimConsumerReferenceResource:V1beta1ResourceClaimConsumerReference :: V1beta1ResourceClaimConsumerReference -> Text
$sel:v1beta1ResourceClaimConsumerReferenceUid:V1beta1ResourceClaimConsumerReference :: V1beta1ResourceClaimConsumerReference -> Text
v1beta1ResourceClaimConsumerReferenceApiGroup :: Maybe Text
v1beta1ResourceClaimConsumerReferenceName :: Text
v1beta1ResourceClaimConsumerReferenceResource :: Text
v1beta1ResourceClaimConsumerReferenceUid :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiGroup" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ResourceClaimConsumerReferenceApiGroup
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1beta1ResourceClaimConsumerReferenceName
      , Key
"resource" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1beta1ResourceClaimConsumerReferenceResource
      , Key
"uid" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1beta1ResourceClaimConsumerReferenceUid
      ]


-- | Construct a value of type 'V1beta1ResourceClaimConsumerReference' (by applying it's required fields, if any)
mkV1beta1ResourceClaimConsumerReference
  :: Text -- ^ 'v1beta1ResourceClaimConsumerReferenceName': Name is the name of resource being referenced.
  -> Text -- ^ 'v1beta1ResourceClaimConsumerReferenceResource': Resource is the type of resource being referenced, for example \"pods\".
  -> Text -- ^ 'v1beta1ResourceClaimConsumerReferenceUid': UID identifies exactly one incarnation of the resource.
  -> V1beta1ResourceClaimConsumerReference
mkV1beta1ResourceClaimConsumerReference :: Text -> Text -> Text -> V1beta1ResourceClaimConsumerReference
mkV1beta1ResourceClaimConsumerReference Text
v1beta1ResourceClaimConsumerReferenceName Text
v1beta1ResourceClaimConsumerReferenceResource Text
v1beta1ResourceClaimConsumerReferenceUid =
  V1beta1ResourceClaimConsumerReference
  { $sel:v1beta1ResourceClaimConsumerReferenceApiGroup:V1beta1ResourceClaimConsumerReference :: Maybe Text
v1beta1ResourceClaimConsumerReferenceApiGroup = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1beta1ResourceClaimConsumerReferenceName:V1beta1ResourceClaimConsumerReference :: Text
v1beta1ResourceClaimConsumerReferenceName :: Text
v1beta1ResourceClaimConsumerReferenceName
  , Text
$sel:v1beta1ResourceClaimConsumerReferenceResource:V1beta1ResourceClaimConsumerReference :: Text
v1beta1ResourceClaimConsumerReferenceResource :: Text
v1beta1ResourceClaimConsumerReferenceResource
  , Text
$sel:v1beta1ResourceClaimConsumerReferenceUid:V1beta1ResourceClaimConsumerReference :: Text
v1beta1ResourceClaimConsumerReferenceUid :: Text
v1beta1ResourceClaimConsumerReferenceUid
  }

-- ** V1beta1ResourceClaimList
-- | V1beta1ResourceClaimList
-- ResourceClaimList is a collection of claims.
data V1beta1ResourceClaimList = V1beta1ResourceClaimList
  { V1beta1ResourceClaimList -> Maybe Text
v1beta1ResourceClaimListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1beta1ResourceClaimList -> [V1beta1ResourceClaim]
v1beta1ResourceClaimListItems :: !([V1beta1ResourceClaim]) -- ^ /Required/ "items" - Items is the list of resource claims.
  , V1beta1ResourceClaimList -> Maybe Text
v1beta1ResourceClaimListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1beta1ResourceClaimList -> Maybe V1ListMeta
v1beta1ResourceClaimListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1beta1ResourceClaimList -> ShowS
[V1beta1ResourceClaimList] -> ShowS
V1beta1ResourceClaimList -> String
(Int -> V1beta1ResourceClaimList -> ShowS)
-> (V1beta1ResourceClaimList -> String)
-> ([V1beta1ResourceClaimList] -> ShowS)
-> Show V1beta1ResourceClaimList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1ResourceClaimList -> ShowS
showsPrec :: Int -> V1beta1ResourceClaimList -> ShowS
$cshow :: V1beta1ResourceClaimList -> String
show :: V1beta1ResourceClaimList -> String
$cshowList :: [V1beta1ResourceClaimList] -> ShowS
showList :: [V1beta1ResourceClaimList] -> ShowS
P.Show, V1beta1ResourceClaimList -> V1beta1ResourceClaimList -> Bool
(V1beta1ResourceClaimList -> V1beta1ResourceClaimList -> Bool)
-> (V1beta1ResourceClaimList -> V1beta1ResourceClaimList -> Bool)
-> Eq V1beta1ResourceClaimList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1ResourceClaimList -> V1beta1ResourceClaimList -> Bool
== :: V1beta1ResourceClaimList -> V1beta1ResourceClaimList -> Bool
$c/= :: V1beta1ResourceClaimList -> V1beta1ResourceClaimList -> Bool
/= :: V1beta1ResourceClaimList -> V1beta1ResourceClaimList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1ResourceClaimList
instance A.FromJSON V1beta1ResourceClaimList where
  parseJSON :: Value -> Parser V1beta1ResourceClaimList
parseJSON = String
-> (Object -> Parser V1beta1ResourceClaimList)
-> Value
-> Parser V1beta1ResourceClaimList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1ResourceClaimList" ((Object -> Parser V1beta1ResourceClaimList)
 -> Value -> Parser V1beta1ResourceClaimList)
-> (Object -> Parser V1beta1ResourceClaimList)
-> Value
-> Parser V1beta1ResourceClaimList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1beta1ResourceClaim]
-> Maybe Text
-> Maybe V1ListMeta
-> V1beta1ResourceClaimList
V1beta1ResourceClaimList
      (Maybe Text
 -> [V1beta1ResourceClaim]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1beta1ResourceClaimList)
-> Parser (Maybe Text)
-> Parser
     ([V1beta1ResourceClaim]
      -> Maybe Text -> Maybe V1ListMeta -> V1beta1ResourceClaimList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1beta1ResourceClaim]
   -> Maybe Text -> Maybe V1ListMeta -> V1beta1ResourceClaimList)
-> Parser [V1beta1ResourceClaim]
-> Parser
     (Maybe Text -> Maybe V1ListMeta -> V1beta1ResourceClaimList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1beta1ResourceClaim]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1beta1ResourceClaimList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1beta1ResourceClaimList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1beta1ResourceClaimList)
-> Parser (Maybe V1ListMeta) -> Parser V1beta1ResourceClaimList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1beta1ResourceClaimList
instance A.ToJSON V1beta1ResourceClaimList where
  toJSON :: V1beta1ResourceClaimList -> Value
toJSON V1beta1ResourceClaimList {[V1beta1ResourceClaim]
Maybe Text
Maybe V1ListMeta
$sel:v1beta1ResourceClaimListApiVersion:V1beta1ResourceClaimList :: V1beta1ResourceClaimList -> Maybe Text
$sel:v1beta1ResourceClaimListItems:V1beta1ResourceClaimList :: V1beta1ResourceClaimList -> [V1beta1ResourceClaim]
$sel:v1beta1ResourceClaimListKind:V1beta1ResourceClaimList :: V1beta1ResourceClaimList -> Maybe Text
$sel:v1beta1ResourceClaimListMetadata:V1beta1ResourceClaimList :: V1beta1ResourceClaimList -> Maybe V1ListMeta
v1beta1ResourceClaimListApiVersion :: Maybe Text
v1beta1ResourceClaimListItems :: [V1beta1ResourceClaim]
v1beta1ResourceClaimListKind :: Maybe Text
v1beta1ResourceClaimListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ResourceClaimListApiVersion
      , Key
"items" Key -> [V1beta1ResourceClaim] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1beta1ResourceClaim]
v1beta1ResourceClaimListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ResourceClaimListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1beta1ResourceClaimListMetadata
      ]


-- | Construct a value of type 'V1beta1ResourceClaimList' (by applying it's required fields, if any)
mkV1beta1ResourceClaimList
  :: [V1beta1ResourceClaim] -- ^ 'v1beta1ResourceClaimListItems': Items is the list of resource claims.
  -> V1beta1ResourceClaimList
mkV1beta1ResourceClaimList :: [V1beta1ResourceClaim] -> V1beta1ResourceClaimList
mkV1beta1ResourceClaimList [V1beta1ResourceClaim]
v1beta1ResourceClaimListItems =
  V1beta1ResourceClaimList
  { $sel:v1beta1ResourceClaimListApiVersion:V1beta1ResourceClaimList :: Maybe Text
v1beta1ResourceClaimListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1beta1ResourceClaim]
$sel:v1beta1ResourceClaimListItems:V1beta1ResourceClaimList :: [V1beta1ResourceClaim]
v1beta1ResourceClaimListItems :: [V1beta1ResourceClaim]
v1beta1ResourceClaimListItems
  , $sel:v1beta1ResourceClaimListKind:V1beta1ResourceClaimList :: Maybe Text
v1beta1ResourceClaimListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1ResourceClaimListMetadata:V1beta1ResourceClaimList :: Maybe V1ListMeta
v1beta1ResourceClaimListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1beta1ResourceClaimSpec
-- | V1beta1ResourceClaimSpec
-- ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it.
data V1beta1ResourceClaimSpec = V1beta1ResourceClaimSpec
  { V1beta1ResourceClaimSpec -> Maybe V1beta1DeviceClaim
v1beta1ResourceClaimSpecDevices :: !(Maybe V1beta1DeviceClaim) -- ^ "devices"
  } deriving (Int -> V1beta1ResourceClaimSpec -> ShowS
[V1beta1ResourceClaimSpec] -> ShowS
V1beta1ResourceClaimSpec -> String
(Int -> V1beta1ResourceClaimSpec -> ShowS)
-> (V1beta1ResourceClaimSpec -> String)
-> ([V1beta1ResourceClaimSpec] -> ShowS)
-> Show V1beta1ResourceClaimSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1ResourceClaimSpec -> ShowS
showsPrec :: Int -> V1beta1ResourceClaimSpec -> ShowS
$cshow :: V1beta1ResourceClaimSpec -> String
show :: V1beta1ResourceClaimSpec -> String
$cshowList :: [V1beta1ResourceClaimSpec] -> ShowS
showList :: [V1beta1ResourceClaimSpec] -> ShowS
P.Show, V1beta1ResourceClaimSpec -> V1beta1ResourceClaimSpec -> Bool
(V1beta1ResourceClaimSpec -> V1beta1ResourceClaimSpec -> Bool)
-> (V1beta1ResourceClaimSpec -> V1beta1ResourceClaimSpec -> Bool)
-> Eq V1beta1ResourceClaimSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1ResourceClaimSpec -> V1beta1ResourceClaimSpec -> Bool
== :: V1beta1ResourceClaimSpec -> V1beta1ResourceClaimSpec -> Bool
$c/= :: V1beta1ResourceClaimSpec -> V1beta1ResourceClaimSpec -> Bool
/= :: V1beta1ResourceClaimSpec -> V1beta1ResourceClaimSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1ResourceClaimSpec
instance A.FromJSON V1beta1ResourceClaimSpec where
  parseJSON :: Value -> Parser V1beta1ResourceClaimSpec
parseJSON = String
-> (Object -> Parser V1beta1ResourceClaimSpec)
-> Value
-> Parser V1beta1ResourceClaimSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1ResourceClaimSpec" ((Object -> Parser V1beta1ResourceClaimSpec)
 -> Value -> Parser V1beta1ResourceClaimSpec)
-> (Object -> Parser V1beta1ResourceClaimSpec)
-> Value
-> Parser V1beta1ResourceClaimSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1beta1DeviceClaim -> V1beta1ResourceClaimSpec
V1beta1ResourceClaimSpec
      (Maybe V1beta1DeviceClaim -> V1beta1ResourceClaimSpec)
-> Parser (Maybe V1beta1DeviceClaim)
-> Parser V1beta1ResourceClaimSpec
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1beta1DeviceClaim)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"devices")

-- | ToJSON V1beta1ResourceClaimSpec
instance A.ToJSON V1beta1ResourceClaimSpec where
  toJSON :: V1beta1ResourceClaimSpec -> Value
toJSON V1beta1ResourceClaimSpec {Maybe V1beta1DeviceClaim
$sel:v1beta1ResourceClaimSpecDevices:V1beta1ResourceClaimSpec :: V1beta1ResourceClaimSpec -> Maybe V1beta1DeviceClaim
v1beta1ResourceClaimSpecDevices :: Maybe V1beta1DeviceClaim
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"devices" Key -> Maybe V1beta1DeviceClaim -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1beta1DeviceClaim
v1beta1ResourceClaimSpecDevices
      ]


-- | Construct a value of type 'V1beta1ResourceClaimSpec' (by applying it's required fields, if any)
mkV1beta1ResourceClaimSpec
  :: V1beta1ResourceClaimSpec
mkV1beta1ResourceClaimSpec :: V1beta1ResourceClaimSpec
mkV1beta1ResourceClaimSpec =
  V1beta1ResourceClaimSpec
  { $sel:v1beta1ResourceClaimSpecDevices:V1beta1ResourceClaimSpec :: Maybe V1beta1DeviceClaim
v1beta1ResourceClaimSpecDevices = Maybe V1beta1DeviceClaim
forall a. Maybe a
Nothing
  }

-- ** V1beta1ResourceClaimStatus
-- | V1beta1ResourceClaimStatus
-- ResourceClaimStatus tracks whether the resource has been allocated and what the result of that was.
data V1beta1ResourceClaimStatus = V1beta1ResourceClaimStatus
  { V1beta1ResourceClaimStatus -> Maybe V1beta1AllocationResult
v1beta1ResourceClaimStatusAllocation :: !(Maybe V1beta1AllocationResult) -- ^ "allocation"
  , V1beta1ResourceClaimStatus -> Maybe [V1beta1AllocatedDeviceStatus]
v1beta1ResourceClaimStatusDevices :: !(Maybe [V1beta1AllocatedDeviceStatus]) -- ^ "devices" - Devices contains the status of each device allocated for this claim, as reported by the driver. This can include driver-specific information. Entries are owned by their respective drivers.
  , V1beta1ResourceClaimStatus
-> Maybe [V1beta1ResourceClaimConsumerReference]
v1beta1ResourceClaimStatusReservedFor :: !(Maybe [V1beta1ResourceClaimConsumerReference]) -- ^ "reservedFor" - ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated.  In a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled.  Both schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again.  There can be at most 256 such reservations. This may get increased in the future, but not reduced.
  } deriving (Int -> V1beta1ResourceClaimStatus -> ShowS
[V1beta1ResourceClaimStatus] -> ShowS
V1beta1ResourceClaimStatus -> String
(Int -> V1beta1ResourceClaimStatus -> ShowS)
-> (V1beta1ResourceClaimStatus -> String)
-> ([V1beta1ResourceClaimStatus] -> ShowS)
-> Show V1beta1ResourceClaimStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1ResourceClaimStatus -> ShowS
showsPrec :: Int -> V1beta1ResourceClaimStatus -> ShowS
$cshow :: V1beta1ResourceClaimStatus -> String
show :: V1beta1ResourceClaimStatus -> String
$cshowList :: [V1beta1ResourceClaimStatus] -> ShowS
showList :: [V1beta1ResourceClaimStatus] -> ShowS
P.Show, V1beta1ResourceClaimStatus -> V1beta1ResourceClaimStatus -> Bool
(V1beta1ResourceClaimStatus -> V1beta1ResourceClaimStatus -> Bool)
-> (V1beta1ResourceClaimStatus
    -> V1beta1ResourceClaimStatus -> Bool)
-> Eq V1beta1ResourceClaimStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1ResourceClaimStatus -> V1beta1ResourceClaimStatus -> Bool
== :: V1beta1ResourceClaimStatus -> V1beta1ResourceClaimStatus -> Bool
$c/= :: V1beta1ResourceClaimStatus -> V1beta1ResourceClaimStatus -> Bool
/= :: V1beta1ResourceClaimStatus -> V1beta1ResourceClaimStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1ResourceClaimStatus
instance A.FromJSON V1beta1ResourceClaimStatus where
  parseJSON :: Value -> Parser V1beta1ResourceClaimStatus
parseJSON = String
-> (Object -> Parser V1beta1ResourceClaimStatus)
-> Value
-> Parser V1beta1ResourceClaimStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1ResourceClaimStatus" ((Object -> Parser V1beta1ResourceClaimStatus)
 -> Value -> Parser V1beta1ResourceClaimStatus)
-> (Object -> Parser V1beta1ResourceClaimStatus)
-> Value
-> Parser V1beta1ResourceClaimStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1beta1AllocationResult
-> Maybe [V1beta1AllocatedDeviceStatus]
-> Maybe [V1beta1ResourceClaimConsumerReference]
-> V1beta1ResourceClaimStatus
V1beta1ResourceClaimStatus
      (Maybe V1beta1AllocationResult
 -> Maybe [V1beta1AllocatedDeviceStatus]
 -> Maybe [V1beta1ResourceClaimConsumerReference]
 -> V1beta1ResourceClaimStatus)
-> Parser (Maybe V1beta1AllocationResult)
-> Parser
     (Maybe [V1beta1AllocatedDeviceStatus]
      -> Maybe [V1beta1ResourceClaimConsumerReference]
      -> V1beta1ResourceClaimStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1beta1AllocationResult)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"allocation")
      Parser
  (Maybe [V1beta1AllocatedDeviceStatus]
   -> Maybe [V1beta1ResourceClaimConsumerReference]
   -> V1beta1ResourceClaimStatus)
-> Parser (Maybe [V1beta1AllocatedDeviceStatus])
-> Parser
     (Maybe [V1beta1ResourceClaimConsumerReference]
      -> V1beta1ResourceClaimStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1beta1AllocatedDeviceStatus])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"devices")
      Parser
  (Maybe [V1beta1ResourceClaimConsumerReference]
   -> V1beta1ResourceClaimStatus)
-> Parser (Maybe [V1beta1ResourceClaimConsumerReference])
-> Parser V1beta1ResourceClaimStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object
-> Key -> Parser (Maybe [V1beta1ResourceClaimConsumerReference])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reservedFor")

-- | ToJSON V1beta1ResourceClaimStatus
instance A.ToJSON V1beta1ResourceClaimStatus where
  toJSON :: V1beta1ResourceClaimStatus -> Value
toJSON V1beta1ResourceClaimStatus {Maybe [V1beta1ResourceClaimConsumerReference]
Maybe [V1beta1AllocatedDeviceStatus]
Maybe V1beta1AllocationResult
$sel:v1beta1ResourceClaimStatusAllocation:V1beta1ResourceClaimStatus :: V1beta1ResourceClaimStatus -> Maybe V1beta1AllocationResult
$sel:v1beta1ResourceClaimStatusDevices:V1beta1ResourceClaimStatus :: V1beta1ResourceClaimStatus -> Maybe [V1beta1AllocatedDeviceStatus]
$sel:v1beta1ResourceClaimStatusReservedFor:V1beta1ResourceClaimStatus :: V1beta1ResourceClaimStatus
-> Maybe [V1beta1ResourceClaimConsumerReference]
v1beta1ResourceClaimStatusAllocation :: Maybe V1beta1AllocationResult
v1beta1ResourceClaimStatusDevices :: Maybe [V1beta1AllocatedDeviceStatus]
v1beta1ResourceClaimStatusReservedFor :: Maybe [V1beta1ResourceClaimConsumerReference]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"allocation" Key -> Maybe V1beta1AllocationResult -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1beta1AllocationResult
v1beta1ResourceClaimStatusAllocation
      , Key
"devices" Key -> Maybe [V1beta1AllocatedDeviceStatus] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1beta1AllocatedDeviceStatus]
v1beta1ResourceClaimStatusDevices
      , Key
"reservedFor" Key
-> Maybe [V1beta1ResourceClaimConsumerReference] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1beta1ResourceClaimConsumerReference]
v1beta1ResourceClaimStatusReservedFor
      ]


-- | Construct a value of type 'V1beta1ResourceClaimStatus' (by applying it's required fields, if any)
mkV1beta1ResourceClaimStatus
  :: V1beta1ResourceClaimStatus
mkV1beta1ResourceClaimStatus :: V1beta1ResourceClaimStatus
mkV1beta1ResourceClaimStatus =
  V1beta1ResourceClaimStatus
  { $sel:v1beta1ResourceClaimStatusAllocation:V1beta1ResourceClaimStatus :: Maybe V1beta1AllocationResult
v1beta1ResourceClaimStatusAllocation = Maybe V1beta1AllocationResult
forall a. Maybe a
Nothing
  , $sel:v1beta1ResourceClaimStatusDevices:V1beta1ResourceClaimStatus :: Maybe [V1beta1AllocatedDeviceStatus]
v1beta1ResourceClaimStatusDevices = Maybe [V1beta1AllocatedDeviceStatus]
forall a. Maybe a
Nothing
  , $sel:v1beta1ResourceClaimStatusReservedFor:V1beta1ResourceClaimStatus :: Maybe [V1beta1ResourceClaimConsumerReference]
v1beta1ResourceClaimStatusReservedFor = Maybe [V1beta1ResourceClaimConsumerReference]
forall a. Maybe a
Nothing
  }

-- ** V1beta1ResourceClaimTemplate
-- | V1beta1ResourceClaimTemplate
-- ResourceClaimTemplate is used to produce ResourceClaim objects.  This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.
data V1beta1ResourceClaimTemplate = V1beta1ResourceClaimTemplate
  { V1beta1ResourceClaimTemplate -> Maybe Text
v1beta1ResourceClaimTemplateApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1beta1ResourceClaimTemplate -> Maybe Text
v1beta1ResourceClaimTemplateKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1beta1ResourceClaimTemplate -> Maybe V1ObjectMeta
v1beta1ResourceClaimTemplateMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1beta1ResourceClaimTemplate -> V1beta1ResourceClaimTemplateSpec
v1beta1ResourceClaimTemplateSpec :: !(V1beta1ResourceClaimTemplateSpec) -- ^ /Required/ "spec"
  } deriving (Int -> V1beta1ResourceClaimTemplate -> ShowS
[V1beta1ResourceClaimTemplate] -> ShowS
V1beta1ResourceClaimTemplate -> String
(Int -> V1beta1ResourceClaimTemplate -> ShowS)
-> (V1beta1ResourceClaimTemplate -> String)
-> ([V1beta1ResourceClaimTemplate] -> ShowS)
-> Show V1beta1ResourceClaimTemplate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1ResourceClaimTemplate -> ShowS
showsPrec :: Int -> V1beta1ResourceClaimTemplate -> ShowS
$cshow :: V1beta1ResourceClaimTemplate -> String
show :: V1beta1ResourceClaimTemplate -> String
$cshowList :: [V1beta1ResourceClaimTemplate] -> ShowS
showList :: [V1beta1ResourceClaimTemplate] -> ShowS
P.Show, V1beta1ResourceClaimTemplate
-> V1beta1ResourceClaimTemplate -> Bool
(V1beta1ResourceClaimTemplate
 -> V1beta1ResourceClaimTemplate -> Bool)
-> (V1beta1ResourceClaimTemplate
    -> V1beta1ResourceClaimTemplate -> Bool)
-> Eq V1beta1ResourceClaimTemplate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1ResourceClaimTemplate
-> V1beta1ResourceClaimTemplate -> Bool
== :: V1beta1ResourceClaimTemplate
-> V1beta1ResourceClaimTemplate -> Bool
$c/= :: V1beta1ResourceClaimTemplate
-> V1beta1ResourceClaimTemplate -> Bool
/= :: V1beta1ResourceClaimTemplate
-> V1beta1ResourceClaimTemplate -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1ResourceClaimTemplate
instance A.FromJSON V1beta1ResourceClaimTemplate where
  parseJSON :: Value -> Parser V1beta1ResourceClaimTemplate
parseJSON = String
-> (Object -> Parser V1beta1ResourceClaimTemplate)
-> Value
-> Parser V1beta1ResourceClaimTemplate
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1ResourceClaimTemplate" ((Object -> Parser V1beta1ResourceClaimTemplate)
 -> Value -> Parser V1beta1ResourceClaimTemplate)
-> (Object -> Parser V1beta1ResourceClaimTemplate)
-> Value
-> Parser V1beta1ResourceClaimTemplate
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> V1beta1ResourceClaimTemplateSpec
-> V1beta1ResourceClaimTemplate
V1beta1ResourceClaimTemplate
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> V1beta1ResourceClaimTemplateSpec
 -> V1beta1ResourceClaimTemplate)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> V1beta1ResourceClaimTemplateSpec
      -> V1beta1ResourceClaimTemplate)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> V1beta1ResourceClaimTemplateSpec
   -> V1beta1ResourceClaimTemplate)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> V1beta1ResourceClaimTemplateSpec
      -> V1beta1ResourceClaimTemplate)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> V1beta1ResourceClaimTemplateSpec
   -> V1beta1ResourceClaimTemplate)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (V1beta1ResourceClaimTemplateSpec -> V1beta1ResourceClaimTemplate)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (V1beta1ResourceClaimTemplateSpec -> V1beta1ResourceClaimTemplate)
-> Parser V1beta1ResourceClaimTemplateSpec
-> Parser V1beta1ResourceClaimTemplate
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1beta1ResourceClaimTemplateSpec
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"spec")

-- | ToJSON V1beta1ResourceClaimTemplate
instance A.ToJSON V1beta1ResourceClaimTemplate where
  toJSON :: V1beta1ResourceClaimTemplate -> Value
toJSON V1beta1ResourceClaimTemplate {Maybe Text
Maybe V1ObjectMeta
V1beta1ResourceClaimTemplateSpec
$sel:v1beta1ResourceClaimTemplateApiVersion:V1beta1ResourceClaimTemplate :: V1beta1ResourceClaimTemplate -> Maybe Text
$sel:v1beta1ResourceClaimTemplateKind:V1beta1ResourceClaimTemplate :: V1beta1ResourceClaimTemplate -> Maybe Text
$sel:v1beta1ResourceClaimTemplateMetadata:V1beta1ResourceClaimTemplate :: V1beta1ResourceClaimTemplate -> Maybe V1ObjectMeta
$sel:v1beta1ResourceClaimTemplateSpec:V1beta1ResourceClaimTemplate :: V1beta1ResourceClaimTemplate -> V1beta1ResourceClaimTemplateSpec
v1beta1ResourceClaimTemplateApiVersion :: Maybe Text
v1beta1ResourceClaimTemplateKind :: Maybe Text
v1beta1ResourceClaimTemplateMetadata :: Maybe V1ObjectMeta
v1beta1ResourceClaimTemplateSpec :: V1beta1ResourceClaimTemplateSpec
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ResourceClaimTemplateApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ResourceClaimTemplateKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1beta1ResourceClaimTemplateMetadata
      , Key
"spec" Key -> V1beta1ResourceClaimTemplateSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1beta1ResourceClaimTemplateSpec
v1beta1ResourceClaimTemplateSpec
      ]


-- | Construct a value of type 'V1beta1ResourceClaimTemplate' (by applying it's required fields, if any)
mkV1beta1ResourceClaimTemplate
  :: V1beta1ResourceClaimTemplateSpec -- ^ 'v1beta1ResourceClaimTemplateSpec' 
  -> V1beta1ResourceClaimTemplate
mkV1beta1ResourceClaimTemplate :: V1beta1ResourceClaimTemplateSpec -> V1beta1ResourceClaimTemplate
mkV1beta1ResourceClaimTemplate V1beta1ResourceClaimTemplateSpec
v1beta1ResourceClaimTemplateSpec =
  V1beta1ResourceClaimTemplate
  { $sel:v1beta1ResourceClaimTemplateApiVersion:V1beta1ResourceClaimTemplate :: Maybe Text
v1beta1ResourceClaimTemplateApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1ResourceClaimTemplateKind:V1beta1ResourceClaimTemplate :: Maybe Text
v1beta1ResourceClaimTemplateKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1ResourceClaimTemplateMetadata:V1beta1ResourceClaimTemplate :: Maybe V1ObjectMeta
v1beta1ResourceClaimTemplateMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , V1beta1ResourceClaimTemplateSpec
$sel:v1beta1ResourceClaimTemplateSpec:V1beta1ResourceClaimTemplate :: V1beta1ResourceClaimTemplateSpec
v1beta1ResourceClaimTemplateSpec :: V1beta1ResourceClaimTemplateSpec
v1beta1ResourceClaimTemplateSpec
  }

-- ** V1beta1ResourceClaimTemplateList
-- | V1beta1ResourceClaimTemplateList
-- ResourceClaimTemplateList is a collection of claim templates.
data V1beta1ResourceClaimTemplateList = V1beta1ResourceClaimTemplateList
  { V1beta1ResourceClaimTemplateList -> Maybe Text
v1beta1ResourceClaimTemplateListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1beta1ResourceClaimTemplateList -> [V1beta1ResourceClaimTemplate]
v1beta1ResourceClaimTemplateListItems :: !([V1beta1ResourceClaimTemplate]) -- ^ /Required/ "items" - Items is the list of resource claim templates.
  , V1beta1ResourceClaimTemplateList -> Maybe Text
v1beta1ResourceClaimTemplateListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1beta1ResourceClaimTemplateList -> Maybe V1ListMeta
v1beta1ResourceClaimTemplateListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1beta1ResourceClaimTemplateList -> ShowS
[V1beta1ResourceClaimTemplateList] -> ShowS
V1beta1ResourceClaimTemplateList -> String
(Int -> V1beta1ResourceClaimTemplateList -> ShowS)
-> (V1beta1ResourceClaimTemplateList -> String)
-> ([V1beta1ResourceClaimTemplateList] -> ShowS)
-> Show V1beta1ResourceClaimTemplateList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1ResourceClaimTemplateList -> ShowS
showsPrec :: Int -> V1beta1ResourceClaimTemplateList -> ShowS
$cshow :: V1beta1ResourceClaimTemplateList -> String
show :: V1beta1ResourceClaimTemplateList -> String
$cshowList :: [V1beta1ResourceClaimTemplateList] -> ShowS
showList :: [V1beta1ResourceClaimTemplateList] -> ShowS
P.Show, V1beta1ResourceClaimTemplateList
-> V1beta1ResourceClaimTemplateList -> Bool
(V1beta1ResourceClaimTemplateList
 -> V1beta1ResourceClaimTemplateList -> Bool)
-> (V1beta1ResourceClaimTemplateList
    -> V1beta1ResourceClaimTemplateList -> Bool)
-> Eq V1beta1ResourceClaimTemplateList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1ResourceClaimTemplateList
-> V1beta1ResourceClaimTemplateList -> Bool
== :: V1beta1ResourceClaimTemplateList
-> V1beta1ResourceClaimTemplateList -> Bool
$c/= :: V1beta1ResourceClaimTemplateList
-> V1beta1ResourceClaimTemplateList -> Bool
/= :: V1beta1ResourceClaimTemplateList
-> V1beta1ResourceClaimTemplateList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1ResourceClaimTemplateList
instance A.FromJSON V1beta1ResourceClaimTemplateList where
  parseJSON :: Value -> Parser V1beta1ResourceClaimTemplateList
parseJSON = String
-> (Object -> Parser V1beta1ResourceClaimTemplateList)
-> Value
-> Parser V1beta1ResourceClaimTemplateList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1ResourceClaimTemplateList" ((Object -> Parser V1beta1ResourceClaimTemplateList)
 -> Value -> Parser V1beta1ResourceClaimTemplateList)
-> (Object -> Parser V1beta1ResourceClaimTemplateList)
-> Value
-> Parser V1beta1ResourceClaimTemplateList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1beta1ResourceClaimTemplate]
-> Maybe Text
-> Maybe V1ListMeta
-> V1beta1ResourceClaimTemplateList
V1beta1ResourceClaimTemplateList
      (Maybe Text
 -> [V1beta1ResourceClaimTemplate]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1beta1ResourceClaimTemplateList)
-> Parser (Maybe Text)
-> Parser
     ([V1beta1ResourceClaimTemplate]
      -> Maybe Text
      -> Maybe V1ListMeta
      -> V1beta1ResourceClaimTemplateList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1beta1ResourceClaimTemplate]
   -> Maybe Text
   -> Maybe V1ListMeta
   -> V1beta1ResourceClaimTemplateList)
-> Parser [V1beta1ResourceClaimTemplate]
-> Parser
     (Maybe Text
      -> Maybe V1ListMeta -> V1beta1ResourceClaimTemplateList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1beta1ResourceClaimTemplate]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser
  (Maybe Text
   -> Maybe V1ListMeta -> V1beta1ResourceClaimTemplateList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1beta1ResourceClaimTemplateList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1beta1ResourceClaimTemplateList)
-> Parser (Maybe V1ListMeta)
-> Parser V1beta1ResourceClaimTemplateList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1beta1ResourceClaimTemplateList
instance A.ToJSON V1beta1ResourceClaimTemplateList where
  toJSON :: V1beta1ResourceClaimTemplateList -> Value
toJSON V1beta1ResourceClaimTemplateList {[V1beta1ResourceClaimTemplate]
Maybe Text
Maybe V1ListMeta
$sel:v1beta1ResourceClaimTemplateListApiVersion:V1beta1ResourceClaimTemplateList :: V1beta1ResourceClaimTemplateList -> Maybe Text
$sel:v1beta1ResourceClaimTemplateListItems:V1beta1ResourceClaimTemplateList :: V1beta1ResourceClaimTemplateList -> [V1beta1ResourceClaimTemplate]
$sel:v1beta1ResourceClaimTemplateListKind:V1beta1ResourceClaimTemplateList :: V1beta1ResourceClaimTemplateList -> Maybe Text
$sel:v1beta1ResourceClaimTemplateListMetadata:V1beta1ResourceClaimTemplateList :: V1beta1ResourceClaimTemplateList -> Maybe V1ListMeta
v1beta1ResourceClaimTemplateListApiVersion :: Maybe Text
v1beta1ResourceClaimTemplateListItems :: [V1beta1ResourceClaimTemplate]
v1beta1ResourceClaimTemplateListKind :: Maybe Text
v1beta1ResourceClaimTemplateListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ResourceClaimTemplateListApiVersion
      , Key
"items" Key -> [V1beta1ResourceClaimTemplate] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1beta1ResourceClaimTemplate]
v1beta1ResourceClaimTemplateListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ResourceClaimTemplateListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1beta1ResourceClaimTemplateListMetadata
      ]


-- | Construct a value of type 'V1beta1ResourceClaimTemplateList' (by applying it's required fields, if any)
mkV1beta1ResourceClaimTemplateList
  :: [V1beta1ResourceClaimTemplate] -- ^ 'v1beta1ResourceClaimTemplateListItems': Items is the list of resource claim templates.
  -> V1beta1ResourceClaimTemplateList
mkV1beta1ResourceClaimTemplateList :: [V1beta1ResourceClaimTemplate] -> V1beta1ResourceClaimTemplateList
mkV1beta1ResourceClaimTemplateList [V1beta1ResourceClaimTemplate]
v1beta1ResourceClaimTemplateListItems =
  V1beta1ResourceClaimTemplateList
  { $sel:v1beta1ResourceClaimTemplateListApiVersion:V1beta1ResourceClaimTemplateList :: Maybe Text
v1beta1ResourceClaimTemplateListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1beta1ResourceClaimTemplate]
$sel:v1beta1ResourceClaimTemplateListItems:V1beta1ResourceClaimTemplateList :: [V1beta1ResourceClaimTemplate]
v1beta1ResourceClaimTemplateListItems :: [V1beta1ResourceClaimTemplate]
v1beta1ResourceClaimTemplateListItems
  , $sel:v1beta1ResourceClaimTemplateListKind:V1beta1ResourceClaimTemplateList :: Maybe Text
v1beta1ResourceClaimTemplateListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1ResourceClaimTemplateListMetadata:V1beta1ResourceClaimTemplateList :: Maybe V1ListMeta
v1beta1ResourceClaimTemplateListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1beta1ResourceClaimTemplateSpec
-- | V1beta1ResourceClaimTemplateSpec
-- ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim.
data V1beta1ResourceClaimTemplateSpec = V1beta1ResourceClaimTemplateSpec
  { V1beta1ResourceClaimTemplateSpec -> Maybe V1ObjectMeta
v1beta1ResourceClaimTemplateSpecMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1beta1ResourceClaimTemplateSpec -> V1beta1ResourceClaimSpec
v1beta1ResourceClaimTemplateSpecSpec :: !(V1beta1ResourceClaimSpec) -- ^ /Required/ "spec"
  } deriving (Int -> V1beta1ResourceClaimTemplateSpec -> ShowS
[V1beta1ResourceClaimTemplateSpec] -> ShowS
V1beta1ResourceClaimTemplateSpec -> String
(Int -> V1beta1ResourceClaimTemplateSpec -> ShowS)
-> (V1beta1ResourceClaimTemplateSpec -> String)
-> ([V1beta1ResourceClaimTemplateSpec] -> ShowS)
-> Show V1beta1ResourceClaimTemplateSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1ResourceClaimTemplateSpec -> ShowS
showsPrec :: Int -> V1beta1ResourceClaimTemplateSpec -> ShowS
$cshow :: V1beta1ResourceClaimTemplateSpec -> String
show :: V1beta1ResourceClaimTemplateSpec -> String
$cshowList :: [V1beta1ResourceClaimTemplateSpec] -> ShowS
showList :: [V1beta1ResourceClaimTemplateSpec] -> ShowS
P.Show, V1beta1ResourceClaimTemplateSpec
-> V1beta1ResourceClaimTemplateSpec -> Bool
(V1beta1ResourceClaimTemplateSpec
 -> V1beta1ResourceClaimTemplateSpec -> Bool)
-> (V1beta1ResourceClaimTemplateSpec
    -> V1beta1ResourceClaimTemplateSpec -> Bool)
-> Eq V1beta1ResourceClaimTemplateSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1ResourceClaimTemplateSpec
-> V1beta1ResourceClaimTemplateSpec -> Bool
== :: V1beta1ResourceClaimTemplateSpec
-> V1beta1ResourceClaimTemplateSpec -> Bool
$c/= :: V1beta1ResourceClaimTemplateSpec
-> V1beta1ResourceClaimTemplateSpec -> Bool
/= :: V1beta1ResourceClaimTemplateSpec
-> V1beta1ResourceClaimTemplateSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1ResourceClaimTemplateSpec
instance A.FromJSON V1beta1ResourceClaimTemplateSpec where
  parseJSON :: Value -> Parser V1beta1ResourceClaimTemplateSpec
parseJSON = String
-> (Object -> Parser V1beta1ResourceClaimTemplateSpec)
-> Value
-> Parser V1beta1ResourceClaimTemplateSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1ResourceClaimTemplateSpec" ((Object -> Parser V1beta1ResourceClaimTemplateSpec)
 -> Value -> Parser V1beta1ResourceClaimTemplateSpec)
-> (Object -> Parser V1beta1ResourceClaimTemplateSpec)
-> Value
-> Parser V1beta1ResourceClaimTemplateSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1ObjectMeta
-> V1beta1ResourceClaimSpec -> V1beta1ResourceClaimTemplateSpec
V1beta1ResourceClaimTemplateSpec
      (Maybe V1ObjectMeta
 -> V1beta1ResourceClaimSpec -> V1beta1ResourceClaimTemplateSpec)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (V1beta1ResourceClaimSpec -> V1beta1ResourceClaimTemplateSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (V1beta1ResourceClaimSpec -> V1beta1ResourceClaimTemplateSpec)
-> Parser V1beta1ResourceClaimSpec
-> Parser V1beta1ResourceClaimTemplateSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1beta1ResourceClaimSpec
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"spec")

-- | ToJSON V1beta1ResourceClaimTemplateSpec
instance A.ToJSON V1beta1ResourceClaimTemplateSpec where
  toJSON :: V1beta1ResourceClaimTemplateSpec -> Value
toJSON V1beta1ResourceClaimTemplateSpec {Maybe V1ObjectMeta
V1beta1ResourceClaimSpec
$sel:v1beta1ResourceClaimTemplateSpecMetadata:V1beta1ResourceClaimTemplateSpec :: V1beta1ResourceClaimTemplateSpec -> Maybe V1ObjectMeta
$sel:v1beta1ResourceClaimTemplateSpecSpec:V1beta1ResourceClaimTemplateSpec :: V1beta1ResourceClaimTemplateSpec -> V1beta1ResourceClaimSpec
v1beta1ResourceClaimTemplateSpecMetadata :: Maybe V1ObjectMeta
v1beta1ResourceClaimTemplateSpecSpec :: V1beta1ResourceClaimSpec
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1beta1ResourceClaimTemplateSpecMetadata
      , Key
"spec" Key -> V1beta1ResourceClaimSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1beta1ResourceClaimSpec
v1beta1ResourceClaimTemplateSpecSpec
      ]


-- | Construct a value of type 'V1beta1ResourceClaimTemplateSpec' (by applying it's required fields, if any)
mkV1beta1ResourceClaimTemplateSpec
  :: V1beta1ResourceClaimSpec -- ^ 'v1beta1ResourceClaimTemplateSpecSpec' 
  -> V1beta1ResourceClaimTemplateSpec
mkV1beta1ResourceClaimTemplateSpec :: V1beta1ResourceClaimSpec -> V1beta1ResourceClaimTemplateSpec
mkV1beta1ResourceClaimTemplateSpec V1beta1ResourceClaimSpec
v1beta1ResourceClaimTemplateSpecSpec =
  V1beta1ResourceClaimTemplateSpec
  { $sel:v1beta1ResourceClaimTemplateSpecMetadata:V1beta1ResourceClaimTemplateSpec :: Maybe V1ObjectMeta
v1beta1ResourceClaimTemplateSpecMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , V1beta1ResourceClaimSpec
$sel:v1beta1ResourceClaimTemplateSpecSpec:V1beta1ResourceClaimTemplateSpec :: V1beta1ResourceClaimSpec
v1beta1ResourceClaimTemplateSpecSpec :: V1beta1ResourceClaimSpec
v1beta1ResourceClaimTemplateSpecSpec
  }

-- ** V1beta1ResourcePool
-- | V1beta1ResourcePool
-- ResourcePool describes the pool that ResourceSlices belong to.
data V1beta1ResourcePool = V1beta1ResourcePool
  { V1beta1ResourcePool -> Integer
v1beta1ResourcePoolGeneration :: !(Integer) -- ^ /Required/ "generation" - Generation tracks the change in a pool over time. Whenever a driver changes something about one or more of the resources in a pool, it must change the generation in all ResourceSlices which are part of that pool. Consumers of ResourceSlices should only consider resources from the pool with the highest generation number. The generation may be reset by drivers, which should be fine for consumers, assuming that all ResourceSlices in a pool are updated to match or deleted.  Combined with ResourceSliceCount, this mechanism enables consumers to detect pools which are comprised of multiple ResourceSlices and are in an incomplete state.
  , V1beta1ResourcePool -> Text
v1beta1ResourcePoolName :: !(Text) -- ^ /Required/ "name" - Name is used to identify the pool. For node-local devices, this is often the node name, but this is not required.  It must not be longer than 253 characters and must consist of one or more DNS sub-domains separated by slashes. This field is immutable.
  , V1beta1ResourcePool -> Integer
v1beta1ResourcePoolResourceSliceCount :: !(Integer) -- ^ /Required/ "resourceSliceCount" - ResourceSliceCount is the total number of ResourceSlices in the pool at this generation number. Must be greater than zero.  Consumers can use this to check whether they have seen all ResourceSlices belonging to the same pool.
  } deriving (Int -> V1beta1ResourcePool -> ShowS
[V1beta1ResourcePool] -> ShowS
V1beta1ResourcePool -> String
(Int -> V1beta1ResourcePool -> ShowS)
-> (V1beta1ResourcePool -> String)
-> ([V1beta1ResourcePool] -> ShowS)
-> Show V1beta1ResourcePool
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1ResourcePool -> ShowS
showsPrec :: Int -> V1beta1ResourcePool -> ShowS
$cshow :: V1beta1ResourcePool -> String
show :: V1beta1ResourcePool -> String
$cshowList :: [V1beta1ResourcePool] -> ShowS
showList :: [V1beta1ResourcePool] -> ShowS
P.Show, V1beta1ResourcePool -> V1beta1ResourcePool -> Bool
(V1beta1ResourcePool -> V1beta1ResourcePool -> Bool)
-> (V1beta1ResourcePool -> V1beta1ResourcePool -> Bool)
-> Eq V1beta1ResourcePool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1ResourcePool -> V1beta1ResourcePool -> Bool
== :: V1beta1ResourcePool -> V1beta1ResourcePool -> Bool
$c/= :: V1beta1ResourcePool -> V1beta1ResourcePool -> Bool
/= :: V1beta1ResourcePool -> V1beta1ResourcePool -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1ResourcePool
instance A.FromJSON V1beta1ResourcePool where
  parseJSON :: Value -> Parser V1beta1ResourcePool
parseJSON = String
-> (Object -> Parser V1beta1ResourcePool)
-> Value
-> Parser V1beta1ResourcePool
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1ResourcePool" ((Object -> Parser V1beta1ResourcePool)
 -> Value -> Parser V1beta1ResourcePool)
-> (Object -> Parser V1beta1ResourcePool)
-> Value
-> Parser V1beta1ResourcePool
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Integer -> Text -> Integer -> V1beta1ResourcePool
V1beta1ResourcePool
      (Integer -> Text -> Integer -> V1beta1ResourcePool)
-> Parser Integer
-> Parser (Text -> Integer -> V1beta1ResourcePool)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Integer
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"generation")
      Parser (Text -> Integer -> V1beta1ResourcePool)
-> Parser Text -> Parser (Integer -> V1beta1ResourcePool)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser (Integer -> V1beta1ResourcePool)
-> Parser Integer -> Parser V1beta1ResourcePool
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Integer
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"resourceSliceCount")

-- | ToJSON V1beta1ResourcePool
instance A.ToJSON V1beta1ResourcePool where
  toJSON :: V1beta1ResourcePool -> Value
toJSON V1beta1ResourcePool {Integer
Text
$sel:v1beta1ResourcePoolGeneration:V1beta1ResourcePool :: V1beta1ResourcePool -> Integer
$sel:v1beta1ResourcePoolName:V1beta1ResourcePool :: V1beta1ResourcePool -> Text
$sel:v1beta1ResourcePoolResourceSliceCount:V1beta1ResourcePool :: V1beta1ResourcePool -> Integer
v1beta1ResourcePoolGeneration :: Integer
v1beta1ResourcePoolName :: Text
v1beta1ResourcePoolResourceSliceCount :: Integer
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"generation" Key -> Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Integer
v1beta1ResourcePoolGeneration
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1beta1ResourcePoolName
      , Key
"resourceSliceCount" Key -> Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Integer
v1beta1ResourcePoolResourceSliceCount
      ]


-- | Construct a value of type 'V1beta1ResourcePool' (by applying it's required fields, if any)
mkV1beta1ResourcePool
  :: Integer -- ^ 'v1beta1ResourcePoolGeneration': Generation tracks the change in a pool over time. Whenever a driver changes something about one or more of the resources in a pool, it must change the generation in all ResourceSlices which are part of that pool. Consumers of ResourceSlices should only consider resources from the pool with the highest generation number. The generation may be reset by drivers, which should be fine for consumers, assuming that all ResourceSlices in a pool are updated to match or deleted.  Combined with ResourceSliceCount, this mechanism enables consumers to detect pools which are comprised of multiple ResourceSlices and are in an incomplete state.
  -> Text -- ^ 'v1beta1ResourcePoolName': Name is used to identify the pool. For node-local devices, this is often the node name, but this is not required.  It must not be longer than 253 characters and must consist of one or more DNS sub-domains separated by slashes. This field is immutable.
  -> Integer -- ^ 'v1beta1ResourcePoolResourceSliceCount': ResourceSliceCount is the total number of ResourceSlices in the pool at this generation number. Must be greater than zero.  Consumers can use this to check whether they have seen all ResourceSlices belonging to the same pool.
  -> V1beta1ResourcePool
mkV1beta1ResourcePool :: Integer -> Text -> Integer -> V1beta1ResourcePool
mkV1beta1ResourcePool Integer
v1beta1ResourcePoolGeneration Text
v1beta1ResourcePoolName Integer
v1beta1ResourcePoolResourceSliceCount =
  V1beta1ResourcePool
  { Integer
$sel:v1beta1ResourcePoolGeneration:V1beta1ResourcePool :: Integer
v1beta1ResourcePoolGeneration :: Integer
v1beta1ResourcePoolGeneration
  , Text
$sel:v1beta1ResourcePoolName:V1beta1ResourcePool :: Text
v1beta1ResourcePoolName :: Text
v1beta1ResourcePoolName
  , Integer
$sel:v1beta1ResourcePoolResourceSliceCount:V1beta1ResourcePool :: Integer
v1beta1ResourcePoolResourceSliceCount :: Integer
v1beta1ResourcePoolResourceSliceCount
  }

-- ** V1beta1ResourceSlice
-- | V1beta1ResourceSlice
-- ResourceSlice represents one or more resources in a pool of similar resources, managed by a common driver. A pool may span more than one ResourceSlice, and exactly how many ResourceSlices comprise a pool is determined by the driver.  At the moment, the only supported resources are devices with attributes and capacities. Each device in a given pool, regardless of how many ResourceSlices, must have a unique name. The ResourceSlice in which a device gets published may change over time. The unique identifier for a device is the tuple <driver name>, <pool name>, <device name>.  Whenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number and updates all ResourceSlices with that new number and new resource definitions. A consumer must only use ResourceSlices with the highest generation number and ignore all others.  When allocating all resources in a pool matching certain criteria or when looking for the best solution among several different alternatives, a consumer should check the number of ResourceSlices in a pool (included in each ResourceSlice) to determine whether its view of a pool is complete and if not, should wait until the driver has completed updating the pool.  For resources that are not local to a node, the node name is not set. Instead, the driver may use a node selector to specify where the devices are available.  This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.
data V1beta1ResourceSlice = V1beta1ResourceSlice
  { V1beta1ResourceSlice -> Maybe Text
v1beta1ResourceSliceApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1beta1ResourceSlice -> Maybe Text
v1beta1ResourceSliceKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1beta1ResourceSlice -> Maybe V1ObjectMeta
v1beta1ResourceSliceMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1beta1ResourceSlice -> V1beta1ResourceSliceSpec
v1beta1ResourceSliceSpec :: !(V1beta1ResourceSliceSpec) -- ^ /Required/ "spec"
  } deriving (Int -> V1beta1ResourceSlice -> ShowS
[V1beta1ResourceSlice] -> ShowS
V1beta1ResourceSlice -> String
(Int -> V1beta1ResourceSlice -> ShowS)
-> (V1beta1ResourceSlice -> String)
-> ([V1beta1ResourceSlice] -> ShowS)
-> Show V1beta1ResourceSlice
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1ResourceSlice -> ShowS
showsPrec :: Int -> V1beta1ResourceSlice -> ShowS
$cshow :: V1beta1ResourceSlice -> String
show :: V1beta1ResourceSlice -> String
$cshowList :: [V1beta1ResourceSlice] -> ShowS
showList :: [V1beta1ResourceSlice] -> ShowS
P.Show, V1beta1ResourceSlice -> V1beta1ResourceSlice -> Bool
(V1beta1ResourceSlice -> V1beta1ResourceSlice -> Bool)
-> (V1beta1ResourceSlice -> V1beta1ResourceSlice -> Bool)
-> Eq V1beta1ResourceSlice
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1ResourceSlice -> V1beta1ResourceSlice -> Bool
== :: V1beta1ResourceSlice -> V1beta1ResourceSlice -> Bool
$c/= :: V1beta1ResourceSlice -> V1beta1ResourceSlice -> Bool
/= :: V1beta1ResourceSlice -> V1beta1ResourceSlice -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1ResourceSlice
instance A.FromJSON V1beta1ResourceSlice where
  parseJSON :: Value -> Parser V1beta1ResourceSlice
parseJSON = String
-> (Object -> Parser V1beta1ResourceSlice)
-> Value
-> Parser V1beta1ResourceSlice
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1ResourceSlice" ((Object -> Parser V1beta1ResourceSlice)
 -> Value -> Parser V1beta1ResourceSlice)
-> (Object -> Parser V1beta1ResourceSlice)
-> Value
-> Parser V1beta1ResourceSlice
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> V1beta1ResourceSliceSpec
-> V1beta1ResourceSlice
V1beta1ResourceSlice
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> V1beta1ResourceSliceSpec
 -> V1beta1ResourceSlice)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> V1beta1ResourceSliceSpec
      -> V1beta1ResourceSlice)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> V1beta1ResourceSliceSpec
   -> V1beta1ResourceSlice)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> V1beta1ResourceSliceSpec -> V1beta1ResourceSlice)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> V1beta1ResourceSliceSpec -> V1beta1ResourceSlice)
-> Parser (Maybe V1ObjectMeta)
-> Parser (V1beta1ResourceSliceSpec -> V1beta1ResourceSlice)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (V1beta1ResourceSliceSpec -> V1beta1ResourceSlice)
-> Parser V1beta1ResourceSliceSpec -> Parser V1beta1ResourceSlice
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1beta1ResourceSliceSpec
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"spec")

-- | ToJSON V1beta1ResourceSlice
instance A.ToJSON V1beta1ResourceSlice where
  toJSON :: V1beta1ResourceSlice -> Value
toJSON V1beta1ResourceSlice {Maybe Text
Maybe V1ObjectMeta
V1beta1ResourceSliceSpec
$sel:v1beta1ResourceSliceApiVersion:V1beta1ResourceSlice :: V1beta1ResourceSlice -> Maybe Text
$sel:v1beta1ResourceSliceKind:V1beta1ResourceSlice :: V1beta1ResourceSlice -> Maybe Text
$sel:v1beta1ResourceSliceMetadata:V1beta1ResourceSlice :: V1beta1ResourceSlice -> Maybe V1ObjectMeta
$sel:v1beta1ResourceSliceSpec:V1beta1ResourceSlice :: V1beta1ResourceSlice -> V1beta1ResourceSliceSpec
v1beta1ResourceSliceApiVersion :: Maybe Text
v1beta1ResourceSliceKind :: Maybe Text
v1beta1ResourceSliceMetadata :: Maybe V1ObjectMeta
v1beta1ResourceSliceSpec :: V1beta1ResourceSliceSpec
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ResourceSliceApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ResourceSliceKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1beta1ResourceSliceMetadata
      , Key
"spec" Key -> V1beta1ResourceSliceSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1beta1ResourceSliceSpec
v1beta1ResourceSliceSpec
      ]


-- | Construct a value of type 'V1beta1ResourceSlice' (by applying it's required fields, if any)
mkV1beta1ResourceSlice
  :: V1beta1ResourceSliceSpec -- ^ 'v1beta1ResourceSliceSpec' 
  -> V1beta1ResourceSlice
mkV1beta1ResourceSlice :: V1beta1ResourceSliceSpec -> V1beta1ResourceSlice
mkV1beta1ResourceSlice V1beta1ResourceSliceSpec
v1beta1ResourceSliceSpec =
  V1beta1ResourceSlice
  { $sel:v1beta1ResourceSliceApiVersion:V1beta1ResourceSlice :: Maybe Text
v1beta1ResourceSliceApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1ResourceSliceKind:V1beta1ResourceSlice :: Maybe Text
v1beta1ResourceSliceKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1ResourceSliceMetadata:V1beta1ResourceSlice :: Maybe V1ObjectMeta
v1beta1ResourceSliceMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , V1beta1ResourceSliceSpec
$sel:v1beta1ResourceSliceSpec:V1beta1ResourceSlice :: V1beta1ResourceSliceSpec
v1beta1ResourceSliceSpec :: V1beta1ResourceSliceSpec
v1beta1ResourceSliceSpec
  }

-- ** V1beta1ResourceSliceList
-- | V1beta1ResourceSliceList
-- ResourceSliceList is a collection of ResourceSlices.
data V1beta1ResourceSliceList = V1beta1ResourceSliceList
  { V1beta1ResourceSliceList -> Maybe Text
v1beta1ResourceSliceListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1beta1ResourceSliceList -> [V1beta1ResourceSlice]
v1beta1ResourceSliceListItems :: !([V1beta1ResourceSlice]) -- ^ /Required/ "items" - Items is the list of resource ResourceSlices.
  , V1beta1ResourceSliceList -> Maybe Text
v1beta1ResourceSliceListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1beta1ResourceSliceList -> Maybe V1ListMeta
v1beta1ResourceSliceListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1beta1ResourceSliceList -> ShowS
[V1beta1ResourceSliceList] -> ShowS
V1beta1ResourceSliceList -> String
(Int -> V1beta1ResourceSliceList -> ShowS)
-> (V1beta1ResourceSliceList -> String)
-> ([V1beta1ResourceSliceList] -> ShowS)
-> Show V1beta1ResourceSliceList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1ResourceSliceList -> ShowS
showsPrec :: Int -> V1beta1ResourceSliceList -> ShowS
$cshow :: V1beta1ResourceSliceList -> String
show :: V1beta1ResourceSliceList -> String
$cshowList :: [V1beta1ResourceSliceList] -> ShowS
showList :: [V1beta1ResourceSliceList] -> ShowS
P.Show, V1beta1ResourceSliceList -> V1beta1ResourceSliceList -> Bool
(V1beta1ResourceSliceList -> V1beta1ResourceSliceList -> Bool)
-> (V1beta1ResourceSliceList -> V1beta1ResourceSliceList -> Bool)
-> Eq V1beta1ResourceSliceList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1ResourceSliceList -> V1beta1ResourceSliceList -> Bool
== :: V1beta1ResourceSliceList -> V1beta1ResourceSliceList -> Bool
$c/= :: V1beta1ResourceSliceList -> V1beta1ResourceSliceList -> Bool
/= :: V1beta1ResourceSliceList -> V1beta1ResourceSliceList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1ResourceSliceList
instance A.FromJSON V1beta1ResourceSliceList where
  parseJSON :: Value -> Parser V1beta1ResourceSliceList
parseJSON = String
-> (Object -> Parser V1beta1ResourceSliceList)
-> Value
-> Parser V1beta1ResourceSliceList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1ResourceSliceList" ((Object -> Parser V1beta1ResourceSliceList)
 -> Value -> Parser V1beta1ResourceSliceList)
-> (Object -> Parser V1beta1ResourceSliceList)
-> Value
-> Parser V1beta1ResourceSliceList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1beta1ResourceSlice]
-> Maybe Text
-> Maybe V1ListMeta
-> V1beta1ResourceSliceList
V1beta1ResourceSliceList
      (Maybe Text
 -> [V1beta1ResourceSlice]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1beta1ResourceSliceList)
-> Parser (Maybe Text)
-> Parser
     ([V1beta1ResourceSlice]
      -> Maybe Text -> Maybe V1ListMeta -> V1beta1ResourceSliceList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1beta1ResourceSlice]
   -> Maybe Text -> Maybe V1ListMeta -> V1beta1ResourceSliceList)
-> Parser [V1beta1ResourceSlice]
-> Parser
     (Maybe Text -> Maybe V1ListMeta -> V1beta1ResourceSliceList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1beta1ResourceSlice]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1beta1ResourceSliceList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1beta1ResourceSliceList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1beta1ResourceSliceList)
-> Parser (Maybe V1ListMeta) -> Parser V1beta1ResourceSliceList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1beta1ResourceSliceList
instance A.ToJSON V1beta1ResourceSliceList where
  toJSON :: V1beta1ResourceSliceList -> Value
toJSON V1beta1ResourceSliceList {[V1beta1ResourceSlice]
Maybe Text
Maybe V1ListMeta
$sel:v1beta1ResourceSliceListApiVersion:V1beta1ResourceSliceList :: V1beta1ResourceSliceList -> Maybe Text
$sel:v1beta1ResourceSliceListItems:V1beta1ResourceSliceList :: V1beta1ResourceSliceList -> [V1beta1ResourceSlice]
$sel:v1beta1ResourceSliceListKind:V1beta1ResourceSliceList :: V1beta1ResourceSliceList -> Maybe Text
$sel:v1beta1ResourceSliceListMetadata:V1beta1ResourceSliceList :: V1beta1ResourceSliceList -> Maybe V1ListMeta
v1beta1ResourceSliceListApiVersion :: Maybe Text
v1beta1ResourceSliceListItems :: [V1beta1ResourceSlice]
v1beta1ResourceSliceListKind :: Maybe Text
v1beta1ResourceSliceListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ResourceSliceListApiVersion
      , Key
"items" Key -> [V1beta1ResourceSlice] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1beta1ResourceSlice]
v1beta1ResourceSliceListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ResourceSliceListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1beta1ResourceSliceListMetadata
      ]


-- | Construct a value of type 'V1beta1ResourceSliceList' (by applying it's required fields, if any)
mkV1beta1ResourceSliceList
  :: [V1beta1ResourceSlice] -- ^ 'v1beta1ResourceSliceListItems': Items is the list of resource ResourceSlices.
  -> V1beta1ResourceSliceList
mkV1beta1ResourceSliceList :: [V1beta1ResourceSlice] -> V1beta1ResourceSliceList
mkV1beta1ResourceSliceList [V1beta1ResourceSlice]
v1beta1ResourceSliceListItems =
  V1beta1ResourceSliceList
  { $sel:v1beta1ResourceSliceListApiVersion:V1beta1ResourceSliceList :: Maybe Text
v1beta1ResourceSliceListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1beta1ResourceSlice]
$sel:v1beta1ResourceSliceListItems:V1beta1ResourceSliceList :: [V1beta1ResourceSlice]
v1beta1ResourceSliceListItems :: [V1beta1ResourceSlice]
v1beta1ResourceSliceListItems
  , $sel:v1beta1ResourceSliceListKind:V1beta1ResourceSliceList :: Maybe Text
v1beta1ResourceSliceListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1ResourceSliceListMetadata:V1beta1ResourceSliceList :: Maybe V1ListMeta
v1beta1ResourceSliceListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1beta1ResourceSliceSpec
-- | V1beta1ResourceSliceSpec
-- ResourceSliceSpec contains the information published by the driver in one ResourceSlice.
data V1beta1ResourceSliceSpec = V1beta1ResourceSliceSpec
  { V1beta1ResourceSliceSpec -> Maybe Bool
v1beta1ResourceSliceSpecAllNodes :: !(Maybe Bool) -- ^ "allNodes" - AllNodes indicates that all nodes have access to the resources in the pool.  Exactly one of NodeName, NodeSelector and AllNodes must be set.
  , V1beta1ResourceSliceSpec -> Maybe [V1beta1Device]
v1beta1ResourceSliceSpecDevices :: !(Maybe [V1beta1Device]) -- ^ "devices" - Devices lists some or all of the devices in this pool.  Must not have more than 128 entries.
  , V1beta1ResourceSliceSpec -> Text
v1beta1ResourceSliceSpecDriver :: !(Text) -- ^ /Required/ "driver" - Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.  Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.
  , V1beta1ResourceSliceSpec -> Maybe Text
v1beta1ResourceSliceSpecNodeName :: !(Maybe Text) -- ^ "nodeName" - NodeName identifies the node which provides the resources in this pool. A field selector can be used to list only ResourceSlice objects belonging to a certain node.  This field can be used to limit access from nodes to ResourceSlices with the same node name. It also indicates to autoscalers that adding new nodes of the same type as some old node might also make new resources available.  Exactly one of NodeName, NodeSelector and AllNodes must be set. This field is immutable.
  , V1beta1ResourceSliceSpec -> Maybe V1NodeSelector
v1beta1ResourceSliceSpecNodeSelector :: !(Maybe V1NodeSelector) -- ^ "nodeSelector"
  , V1beta1ResourceSliceSpec -> V1beta1ResourcePool
v1beta1ResourceSliceSpecPool :: !(V1beta1ResourcePool) -- ^ /Required/ "pool"
  } deriving (Int -> V1beta1ResourceSliceSpec -> ShowS
[V1beta1ResourceSliceSpec] -> ShowS
V1beta1ResourceSliceSpec -> String
(Int -> V1beta1ResourceSliceSpec -> ShowS)
-> (V1beta1ResourceSliceSpec -> String)
-> ([V1beta1ResourceSliceSpec] -> ShowS)
-> Show V1beta1ResourceSliceSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1ResourceSliceSpec -> ShowS
showsPrec :: Int -> V1beta1ResourceSliceSpec -> ShowS
$cshow :: V1beta1ResourceSliceSpec -> String
show :: V1beta1ResourceSliceSpec -> String
$cshowList :: [V1beta1ResourceSliceSpec] -> ShowS
showList :: [V1beta1ResourceSliceSpec] -> ShowS
P.Show, V1beta1ResourceSliceSpec -> V1beta1ResourceSliceSpec -> Bool
(V1beta1ResourceSliceSpec -> V1beta1ResourceSliceSpec -> Bool)
-> (V1beta1ResourceSliceSpec -> V1beta1ResourceSliceSpec -> Bool)
-> Eq V1beta1ResourceSliceSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1ResourceSliceSpec -> V1beta1ResourceSliceSpec -> Bool
== :: V1beta1ResourceSliceSpec -> V1beta1ResourceSliceSpec -> Bool
$c/= :: V1beta1ResourceSliceSpec -> V1beta1ResourceSliceSpec -> Bool
/= :: V1beta1ResourceSliceSpec -> V1beta1ResourceSliceSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1ResourceSliceSpec
instance A.FromJSON V1beta1ResourceSliceSpec where
  parseJSON :: Value -> Parser V1beta1ResourceSliceSpec
parseJSON = String
-> (Object -> Parser V1beta1ResourceSliceSpec)
-> Value
-> Parser V1beta1ResourceSliceSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1ResourceSliceSpec" ((Object -> Parser V1beta1ResourceSliceSpec)
 -> Value -> Parser V1beta1ResourceSliceSpec)
-> (Object -> Parser V1beta1ResourceSliceSpec)
-> Value
-> Parser V1beta1ResourceSliceSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Bool
-> Maybe [V1beta1Device]
-> Text
-> Maybe Text
-> Maybe V1NodeSelector
-> V1beta1ResourcePool
-> V1beta1ResourceSliceSpec
V1beta1ResourceSliceSpec
      (Maybe Bool
 -> Maybe [V1beta1Device]
 -> Text
 -> Maybe Text
 -> Maybe V1NodeSelector
 -> V1beta1ResourcePool
 -> V1beta1ResourceSliceSpec)
-> Parser (Maybe Bool)
-> Parser
     (Maybe [V1beta1Device]
      -> Text
      -> Maybe Text
      -> Maybe V1NodeSelector
      -> V1beta1ResourcePool
      -> V1beta1ResourceSliceSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"allNodes")
      Parser
  (Maybe [V1beta1Device]
   -> Text
   -> Maybe Text
   -> Maybe V1NodeSelector
   -> V1beta1ResourcePool
   -> V1beta1ResourceSliceSpec)
-> Parser (Maybe [V1beta1Device])
-> Parser
     (Text
      -> Maybe Text
      -> Maybe V1NodeSelector
      -> V1beta1ResourcePool
      -> V1beta1ResourceSliceSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1beta1Device])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"devices")
      Parser
  (Text
   -> Maybe Text
   -> Maybe V1NodeSelector
   -> V1beta1ResourcePool
   -> V1beta1ResourceSliceSpec)
-> Parser Text
-> Parser
     (Maybe Text
      -> Maybe V1NodeSelector
      -> V1beta1ResourcePool
      -> V1beta1ResourceSliceSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"driver")
      Parser
  (Maybe Text
   -> Maybe V1NodeSelector
   -> V1beta1ResourcePool
   -> V1beta1ResourceSliceSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1NodeSelector
      -> V1beta1ResourcePool -> V1beta1ResourceSliceSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nodeName")
      Parser
  (Maybe V1NodeSelector
   -> V1beta1ResourcePool -> V1beta1ResourceSliceSpec)
-> Parser (Maybe V1NodeSelector)
-> Parser (V1beta1ResourcePool -> V1beta1ResourceSliceSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1NodeSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nodeSelector")
      Parser (V1beta1ResourcePool -> V1beta1ResourceSliceSpec)
-> Parser V1beta1ResourcePool -> Parser V1beta1ResourceSliceSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V1beta1ResourcePool
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"pool")

-- | ToJSON V1beta1ResourceSliceSpec
instance A.ToJSON V1beta1ResourceSliceSpec where
  toJSON :: V1beta1ResourceSliceSpec -> Value
toJSON V1beta1ResourceSliceSpec {Maybe Bool
Maybe [V1beta1Device]
Maybe Text
Maybe V1NodeSelector
Text
V1beta1ResourcePool
$sel:v1beta1ResourceSliceSpecAllNodes:V1beta1ResourceSliceSpec :: V1beta1ResourceSliceSpec -> Maybe Bool
$sel:v1beta1ResourceSliceSpecDevices:V1beta1ResourceSliceSpec :: V1beta1ResourceSliceSpec -> Maybe [V1beta1Device]
$sel:v1beta1ResourceSliceSpecDriver:V1beta1ResourceSliceSpec :: V1beta1ResourceSliceSpec -> Text
$sel:v1beta1ResourceSliceSpecNodeName:V1beta1ResourceSliceSpec :: V1beta1ResourceSliceSpec -> Maybe Text
$sel:v1beta1ResourceSliceSpecNodeSelector:V1beta1ResourceSliceSpec :: V1beta1ResourceSliceSpec -> Maybe V1NodeSelector
$sel:v1beta1ResourceSliceSpecPool:V1beta1ResourceSliceSpec :: V1beta1ResourceSliceSpec -> V1beta1ResourcePool
v1beta1ResourceSliceSpecAllNodes :: Maybe Bool
v1beta1ResourceSliceSpecDevices :: Maybe [V1beta1Device]
v1beta1ResourceSliceSpecDriver :: Text
v1beta1ResourceSliceSpecNodeName :: Maybe Text
v1beta1ResourceSliceSpecNodeSelector :: Maybe V1NodeSelector
v1beta1ResourceSliceSpecPool :: V1beta1ResourcePool
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"allNodes" Key -> Maybe Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
v1beta1ResourceSliceSpecAllNodes
      , Key
"devices" Key -> Maybe [V1beta1Device] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1beta1Device]
v1beta1ResourceSliceSpecDevices
      , Key
"driver" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1beta1ResourceSliceSpecDriver
      , Key
"nodeName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ResourceSliceSpecNodeName
      , Key
"nodeSelector" Key -> Maybe V1NodeSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1NodeSelector
v1beta1ResourceSliceSpecNodeSelector
      , Key
"pool" Key -> V1beta1ResourcePool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V1beta1ResourcePool
v1beta1ResourceSliceSpecPool
      ]


-- | Construct a value of type 'V1beta1ResourceSliceSpec' (by applying it's required fields, if any)
mkV1beta1ResourceSliceSpec
  :: Text -- ^ 'v1beta1ResourceSliceSpecDriver': Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.  Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.
  -> V1beta1ResourcePool -- ^ 'v1beta1ResourceSliceSpecPool' 
  -> V1beta1ResourceSliceSpec
mkV1beta1ResourceSliceSpec :: Text -> V1beta1ResourcePool -> V1beta1ResourceSliceSpec
mkV1beta1ResourceSliceSpec Text
v1beta1ResourceSliceSpecDriver V1beta1ResourcePool
v1beta1ResourceSliceSpecPool =
  V1beta1ResourceSliceSpec
  { $sel:v1beta1ResourceSliceSpecAllNodes:V1beta1ResourceSliceSpec :: Maybe Bool
v1beta1ResourceSliceSpecAllNodes = Maybe Bool
forall a. Maybe a
Nothing
  , $sel:v1beta1ResourceSliceSpecDevices:V1beta1ResourceSliceSpec :: Maybe [V1beta1Device]
v1beta1ResourceSliceSpecDevices = Maybe [V1beta1Device]
forall a. Maybe a
Nothing
  , Text
$sel:v1beta1ResourceSliceSpecDriver:V1beta1ResourceSliceSpec :: Text
v1beta1ResourceSliceSpecDriver :: Text
v1beta1ResourceSliceSpecDriver
  , $sel:v1beta1ResourceSliceSpecNodeName:V1beta1ResourceSliceSpec :: Maybe Text
v1beta1ResourceSliceSpecNodeName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1ResourceSliceSpecNodeSelector:V1beta1ResourceSliceSpec :: Maybe V1NodeSelector
v1beta1ResourceSliceSpecNodeSelector = Maybe V1NodeSelector
forall a. Maybe a
Nothing
  , V1beta1ResourcePool
$sel:v1beta1ResourceSliceSpecPool:V1beta1ResourceSliceSpec :: V1beta1ResourcePool
v1beta1ResourceSliceSpecPool :: V1beta1ResourcePool
v1beta1ResourceSliceSpecPool
  }

-- ** V1beta1SelfSubjectReview
-- | V1beta1SelfSubjectReview
-- SelfSubjectReview contains the user information that the kube-apiserver has about the user making this request. When using impersonation, users will receive the user info of the user being impersonated.  If impersonation or request header authentication is used, any extra keys will have their case ignored and returned as lowercase.
data V1beta1SelfSubjectReview = V1beta1SelfSubjectReview
  { V1beta1SelfSubjectReview -> Maybe Text
v1beta1SelfSubjectReviewApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1beta1SelfSubjectReview -> Maybe Text
v1beta1SelfSubjectReviewKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1beta1SelfSubjectReview -> Maybe V1ObjectMeta
v1beta1SelfSubjectReviewMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1beta1SelfSubjectReview -> Maybe V1beta1SelfSubjectReviewStatus
v1beta1SelfSubjectReviewStatus :: !(Maybe V1beta1SelfSubjectReviewStatus) -- ^ "status"
  } deriving (Int -> V1beta1SelfSubjectReview -> ShowS
[V1beta1SelfSubjectReview] -> ShowS
V1beta1SelfSubjectReview -> String
(Int -> V1beta1SelfSubjectReview -> ShowS)
-> (V1beta1SelfSubjectReview -> String)
-> ([V1beta1SelfSubjectReview] -> ShowS)
-> Show V1beta1SelfSubjectReview
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1SelfSubjectReview -> ShowS
showsPrec :: Int -> V1beta1SelfSubjectReview -> ShowS
$cshow :: V1beta1SelfSubjectReview -> String
show :: V1beta1SelfSubjectReview -> String
$cshowList :: [V1beta1SelfSubjectReview] -> ShowS
showList :: [V1beta1SelfSubjectReview] -> ShowS
P.Show, V1beta1SelfSubjectReview -> V1beta1SelfSubjectReview -> Bool
(V1beta1SelfSubjectReview -> V1beta1SelfSubjectReview -> Bool)
-> (V1beta1SelfSubjectReview -> V1beta1SelfSubjectReview -> Bool)
-> Eq V1beta1SelfSubjectReview
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1SelfSubjectReview -> V1beta1SelfSubjectReview -> Bool
== :: V1beta1SelfSubjectReview -> V1beta1SelfSubjectReview -> Bool
$c/= :: V1beta1SelfSubjectReview -> V1beta1SelfSubjectReview -> Bool
/= :: V1beta1SelfSubjectReview -> V1beta1SelfSubjectReview -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1SelfSubjectReview
instance A.FromJSON V1beta1SelfSubjectReview where
  parseJSON :: Value -> Parser V1beta1SelfSubjectReview
parseJSON = String
-> (Object -> Parser V1beta1SelfSubjectReview)
-> Value
-> Parser V1beta1SelfSubjectReview
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1SelfSubjectReview" ((Object -> Parser V1beta1SelfSubjectReview)
 -> Value -> Parser V1beta1SelfSubjectReview)
-> (Object -> Parser V1beta1SelfSubjectReview)
-> Value
-> Parser V1beta1SelfSubjectReview
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1beta1SelfSubjectReviewStatus
-> V1beta1SelfSubjectReview
V1beta1SelfSubjectReview
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1beta1SelfSubjectReviewStatus
 -> V1beta1SelfSubjectReview)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1beta1SelfSubjectReviewStatus
      -> V1beta1SelfSubjectReview)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1beta1SelfSubjectReviewStatus
   -> V1beta1SelfSubjectReview)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1beta1SelfSubjectReviewStatus
      -> V1beta1SelfSubjectReview)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1beta1SelfSubjectReviewStatus
   -> V1beta1SelfSubjectReview)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe V1beta1SelfSubjectReviewStatus -> V1beta1SelfSubjectReview)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (Maybe V1beta1SelfSubjectReviewStatus -> V1beta1SelfSubjectReview)
-> Parser (Maybe V1beta1SelfSubjectReviewStatus)
-> Parser V1beta1SelfSubjectReview
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1beta1SelfSubjectReviewStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1beta1SelfSubjectReview
instance A.ToJSON V1beta1SelfSubjectReview where
  toJSON :: V1beta1SelfSubjectReview -> Value
toJSON V1beta1SelfSubjectReview {Maybe Text
Maybe V1beta1SelfSubjectReviewStatus
Maybe V1ObjectMeta
$sel:v1beta1SelfSubjectReviewApiVersion:V1beta1SelfSubjectReview :: V1beta1SelfSubjectReview -> Maybe Text
$sel:v1beta1SelfSubjectReviewKind:V1beta1SelfSubjectReview :: V1beta1SelfSubjectReview -> Maybe Text
$sel:v1beta1SelfSubjectReviewMetadata:V1beta1SelfSubjectReview :: V1beta1SelfSubjectReview -> Maybe V1ObjectMeta
$sel:v1beta1SelfSubjectReviewStatus:V1beta1SelfSubjectReview :: V1beta1SelfSubjectReview -> Maybe V1beta1SelfSubjectReviewStatus
v1beta1SelfSubjectReviewApiVersion :: Maybe Text
v1beta1SelfSubjectReviewKind :: Maybe Text
v1beta1SelfSubjectReviewMetadata :: Maybe V1ObjectMeta
v1beta1SelfSubjectReviewStatus :: Maybe V1beta1SelfSubjectReviewStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1SelfSubjectReviewApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1SelfSubjectReviewKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1beta1SelfSubjectReviewMetadata
      , Key
"status" Key -> Maybe V1beta1SelfSubjectReviewStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1beta1SelfSubjectReviewStatus
v1beta1SelfSubjectReviewStatus
      ]


-- | Construct a value of type 'V1beta1SelfSubjectReview' (by applying it's required fields, if any)
mkV1beta1SelfSubjectReview
  :: V1beta1SelfSubjectReview
mkV1beta1SelfSubjectReview :: V1beta1SelfSubjectReview
mkV1beta1SelfSubjectReview =
  V1beta1SelfSubjectReview
  { $sel:v1beta1SelfSubjectReviewApiVersion:V1beta1SelfSubjectReview :: Maybe Text
v1beta1SelfSubjectReviewApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1SelfSubjectReviewKind:V1beta1SelfSubjectReview :: Maybe Text
v1beta1SelfSubjectReviewKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1SelfSubjectReviewMetadata:V1beta1SelfSubjectReview :: Maybe V1ObjectMeta
v1beta1SelfSubjectReviewMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1beta1SelfSubjectReviewStatus:V1beta1SelfSubjectReview :: Maybe V1beta1SelfSubjectReviewStatus
v1beta1SelfSubjectReviewStatus = Maybe V1beta1SelfSubjectReviewStatus
forall a. Maybe a
Nothing
  }

-- ** V1beta1SelfSubjectReviewStatus
-- | V1beta1SelfSubjectReviewStatus
-- SelfSubjectReviewStatus is filled by the kube-apiserver and sent back to a user.
data V1beta1SelfSubjectReviewStatus = V1beta1SelfSubjectReviewStatus
  { V1beta1SelfSubjectReviewStatus -> Maybe V1UserInfo
v1beta1SelfSubjectReviewStatusUserInfo :: !(Maybe V1UserInfo) -- ^ "userInfo"
  } deriving (Int -> V1beta1SelfSubjectReviewStatus -> ShowS
[V1beta1SelfSubjectReviewStatus] -> ShowS
V1beta1SelfSubjectReviewStatus -> String
(Int -> V1beta1SelfSubjectReviewStatus -> ShowS)
-> (V1beta1SelfSubjectReviewStatus -> String)
-> ([V1beta1SelfSubjectReviewStatus] -> ShowS)
-> Show V1beta1SelfSubjectReviewStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1SelfSubjectReviewStatus -> ShowS
showsPrec :: Int -> V1beta1SelfSubjectReviewStatus -> ShowS
$cshow :: V1beta1SelfSubjectReviewStatus -> String
show :: V1beta1SelfSubjectReviewStatus -> String
$cshowList :: [V1beta1SelfSubjectReviewStatus] -> ShowS
showList :: [V1beta1SelfSubjectReviewStatus] -> ShowS
P.Show, V1beta1SelfSubjectReviewStatus
-> V1beta1SelfSubjectReviewStatus -> Bool
(V1beta1SelfSubjectReviewStatus
 -> V1beta1SelfSubjectReviewStatus -> Bool)
-> (V1beta1SelfSubjectReviewStatus
    -> V1beta1SelfSubjectReviewStatus -> Bool)
-> Eq V1beta1SelfSubjectReviewStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1SelfSubjectReviewStatus
-> V1beta1SelfSubjectReviewStatus -> Bool
== :: V1beta1SelfSubjectReviewStatus
-> V1beta1SelfSubjectReviewStatus -> Bool
$c/= :: V1beta1SelfSubjectReviewStatus
-> V1beta1SelfSubjectReviewStatus -> Bool
/= :: V1beta1SelfSubjectReviewStatus
-> V1beta1SelfSubjectReviewStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1SelfSubjectReviewStatus
instance A.FromJSON V1beta1SelfSubjectReviewStatus where
  parseJSON :: Value -> Parser V1beta1SelfSubjectReviewStatus
parseJSON = String
-> (Object -> Parser V1beta1SelfSubjectReviewStatus)
-> Value
-> Parser V1beta1SelfSubjectReviewStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1SelfSubjectReviewStatus" ((Object -> Parser V1beta1SelfSubjectReviewStatus)
 -> Value -> Parser V1beta1SelfSubjectReviewStatus)
-> (Object -> Parser V1beta1SelfSubjectReviewStatus)
-> Value
-> Parser V1beta1SelfSubjectReviewStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1UserInfo -> V1beta1SelfSubjectReviewStatus
V1beta1SelfSubjectReviewStatus
      (Maybe V1UserInfo -> V1beta1SelfSubjectReviewStatus)
-> Parser (Maybe V1UserInfo)
-> Parser V1beta1SelfSubjectReviewStatus
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1UserInfo)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"userInfo")

-- | ToJSON V1beta1SelfSubjectReviewStatus
instance A.ToJSON V1beta1SelfSubjectReviewStatus where
  toJSON :: V1beta1SelfSubjectReviewStatus -> Value
toJSON V1beta1SelfSubjectReviewStatus {Maybe V1UserInfo
$sel:v1beta1SelfSubjectReviewStatusUserInfo:V1beta1SelfSubjectReviewStatus :: V1beta1SelfSubjectReviewStatus -> Maybe V1UserInfo
v1beta1SelfSubjectReviewStatusUserInfo :: Maybe V1UserInfo
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"userInfo" Key -> Maybe V1UserInfo -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1UserInfo
v1beta1SelfSubjectReviewStatusUserInfo
      ]


-- | Construct a value of type 'V1beta1SelfSubjectReviewStatus' (by applying it's required fields, if any)
mkV1beta1SelfSubjectReviewStatus
  :: V1beta1SelfSubjectReviewStatus
mkV1beta1SelfSubjectReviewStatus :: V1beta1SelfSubjectReviewStatus
mkV1beta1SelfSubjectReviewStatus =
  V1beta1SelfSubjectReviewStatus
  { $sel:v1beta1SelfSubjectReviewStatusUserInfo:V1beta1SelfSubjectReviewStatus :: Maybe V1UserInfo
v1beta1SelfSubjectReviewStatusUserInfo = Maybe V1UserInfo
forall a. Maybe a
Nothing
  }

-- ** V1beta1ServiceCIDR
-- | V1beta1ServiceCIDR
-- ServiceCIDR defines a range of IP addresses using CIDR format (e.g. 192.168.0.0/24 or 2001:db2::/64). This range is used to allocate ClusterIPs to Service objects.
data V1beta1ServiceCIDR = V1beta1ServiceCIDR
  { V1beta1ServiceCIDR -> Maybe Text
v1beta1ServiceCIDRApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1beta1ServiceCIDR -> Maybe Text
v1beta1ServiceCIDRKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1beta1ServiceCIDR -> Maybe V1ObjectMeta
v1beta1ServiceCIDRMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1beta1ServiceCIDR -> Maybe V1beta1ServiceCIDRSpec
v1beta1ServiceCIDRSpec :: !(Maybe V1beta1ServiceCIDRSpec) -- ^ "spec"
  , V1beta1ServiceCIDR -> Maybe V1beta1ServiceCIDRStatus
v1beta1ServiceCIDRStatus :: !(Maybe V1beta1ServiceCIDRStatus) -- ^ "status"
  } deriving (Int -> V1beta1ServiceCIDR -> ShowS
[V1beta1ServiceCIDR] -> ShowS
V1beta1ServiceCIDR -> String
(Int -> V1beta1ServiceCIDR -> ShowS)
-> (V1beta1ServiceCIDR -> String)
-> ([V1beta1ServiceCIDR] -> ShowS)
-> Show V1beta1ServiceCIDR
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1ServiceCIDR -> ShowS
showsPrec :: Int -> V1beta1ServiceCIDR -> ShowS
$cshow :: V1beta1ServiceCIDR -> String
show :: V1beta1ServiceCIDR -> String
$cshowList :: [V1beta1ServiceCIDR] -> ShowS
showList :: [V1beta1ServiceCIDR] -> ShowS
P.Show, V1beta1ServiceCIDR -> V1beta1ServiceCIDR -> Bool
(V1beta1ServiceCIDR -> V1beta1ServiceCIDR -> Bool)
-> (V1beta1ServiceCIDR -> V1beta1ServiceCIDR -> Bool)
-> Eq V1beta1ServiceCIDR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1ServiceCIDR -> V1beta1ServiceCIDR -> Bool
== :: V1beta1ServiceCIDR -> V1beta1ServiceCIDR -> Bool
$c/= :: V1beta1ServiceCIDR -> V1beta1ServiceCIDR -> Bool
/= :: V1beta1ServiceCIDR -> V1beta1ServiceCIDR -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1ServiceCIDR
instance A.FromJSON V1beta1ServiceCIDR where
  parseJSON :: Value -> Parser V1beta1ServiceCIDR
parseJSON = String
-> (Object -> Parser V1beta1ServiceCIDR)
-> Value
-> Parser V1beta1ServiceCIDR
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1ServiceCIDR" ((Object -> Parser V1beta1ServiceCIDR)
 -> Value -> Parser V1beta1ServiceCIDR)
-> (Object -> Parser V1beta1ServiceCIDR)
-> Value
-> Parser V1beta1ServiceCIDR
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1beta1ServiceCIDRSpec
-> Maybe V1beta1ServiceCIDRStatus
-> V1beta1ServiceCIDR
V1beta1ServiceCIDR
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1beta1ServiceCIDRSpec
 -> Maybe V1beta1ServiceCIDRStatus
 -> V1beta1ServiceCIDR)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1beta1ServiceCIDRSpec
      -> Maybe V1beta1ServiceCIDRStatus
      -> V1beta1ServiceCIDR)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1beta1ServiceCIDRSpec
   -> Maybe V1beta1ServiceCIDRStatus
   -> V1beta1ServiceCIDR)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1beta1ServiceCIDRSpec
      -> Maybe V1beta1ServiceCIDRStatus
      -> V1beta1ServiceCIDR)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1beta1ServiceCIDRSpec
   -> Maybe V1beta1ServiceCIDRStatus
   -> V1beta1ServiceCIDR)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe V1beta1ServiceCIDRSpec
      -> Maybe V1beta1ServiceCIDRStatus -> V1beta1ServiceCIDR)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (Maybe V1beta1ServiceCIDRSpec
   -> Maybe V1beta1ServiceCIDRStatus -> V1beta1ServiceCIDR)
-> Parser (Maybe V1beta1ServiceCIDRSpec)
-> Parser (Maybe V1beta1ServiceCIDRStatus -> V1beta1ServiceCIDR)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1beta1ServiceCIDRSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")
      Parser (Maybe V1beta1ServiceCIDRStatus -> V1beta1ServiceCIDR)
-> Parser (Maybe V1beta1ServiceCIDRStatus)
-> Parser V1beta1ServiceCIDR
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1beta1ServiceCIDRStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1beta1ServiceCIDR
instance A.ToJSON V1beta1ServiceCIDR where
  toJSON :: V1beta1ServiceCIDR -> Value
toJSON V1beta1ServiceCIDR {Maybe Text
Maybe V1beta1ServiceCIDRStatus
Maybe V1beta1ServiceCIDRSpec
Maybe V1ObjectMeta
$sel:v1beta1ServiceCIDRApiVersion:V1beta1ServiceCIDR :: V1beta1ServiceCIDR -> Maybe Text
$sel:v1beta1ServiceCIDRKind:V1beta1ServiceCIDR :: V1beta1ServiceCIDR -> Maybe Text
$sel:v1beta1ServiceCIDRMetadata:V1beta1ServiceCIDR :: V1beta1ServiceCIDR -> Maybe V1ObjectMeta
$sel:v1beta1ServiceCIDRSpec:V1beta1ServiceCIDR :: V1beta1ServiceCIDR -> Maybe V1beta1ServiceCIDRSpec
$sel:v1beta1ServiceCIDRStatus:V1beta1ServiceCIDR :: V1beta1ServiceCIDR -> Maybe V1beta1ServiceCIDRStatus
v1beta1ServiceCIDRApiVersion :: Maybe Text
v1beta1ServiceCIDRKind :: Maybe Text
v1beta1ServiceCIDRMetadata :: Maybe V1ObjectMeta
v1beta1ServiceCIDRSpec :: Maybe V1beta1ServiceCIDRSpec
v1beta1ServiceCIDRStatus :: Maybe V1beta1ServiceCIDRStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ServiceCIDRApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ServiceCIDRKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1beta1ServiceCIDRMetadata
      , Key
"spec" Key -> Maybe V1beta1ServiceCIDRSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1beta1ServiceCIDRSpec
v1beta1ServiceCIDRSpec
      , Key
"status" Key -> Maybe V1beta1ServiceCIDRStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1beta1ServiceCIDRStatus
v1beta1ServiceCIDRStatus
      ]


-- | Construct a value of type 'V1beta1ServiceCIDR' (by applying it's required fields, if any)
mkV1beta1ServiceCIDR
  :: V1beta1ServiceCIDR
mkV1beta1ServiceCIDR :: V1beta1ServiceCIDR
mkV1beta1ServiceCIDR =
  V1beta1ServiceCIDR
  { $sel:v1beta1ServiceCIDRApiVersion:V1beta1ServiceCIDR :: Maybe Text
v1beta1ServiceCIDRApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1ServiceCIDRKind:V1beta1ServiceCIDR :: Maybe Text
v1beta1ServiceCIDRKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1ServiceCIDRMetadata:V1beta1ServiceCIDR :: Maybe V1ObjectMeta
v1beta1ServiceCIDRMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1beta1ServiceCIDRSpec:V1beta1ServiceCIDR :: Maybe V1beta1ServiceCIDRSpec
v1beta1ServiceCIDRSpec = Maybe V1beta1ServiceCIDRSpec
forall a. Maybe a
Nothing
  , $sel:v1beta1ServiceCIDRStatus:V1beta1ServiceCIDR :: Maybe V1beta1ServiceCIDRStatus
v1beta1ServiceCIDRStatus = Maybe V1beta1ServiceCIDRStatus
forall a. Maybe a
Nothing
  }

-- ** V1beta1ServiceCIDRList
-- | V1beta1ServiceCIDRList
-- ServiceCIDRList contains a list of ServiceCIDR objects.
data V1beta1ServiceCIDRList = V1beta1ServiceCIDRList
  { V1beta1ServiceCIDRList -> Maybe Text
v1beta1ServiceCIDRListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1beta1ServiceCIDRList -> [V1beta1ServiceCIDR]
v1beta1ServiceCIDRListItems :: !([V1beta1ServiceCIDR]) -- ^ /Required/ "items" - items is the list of ServiceCIDRs.
  , V1beta1ServiceCIDRList -> Maybe Text
v1beta1ServiceCIDRListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1beta1ServiceCIDRList -> Maybe V1ListMeta
v1beta1ServiceCIDRListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1beta1ServiceCIDRList -> ShowS
[V1beta1ServiceCIDRList] -> ShowS
V1beta1ServiceCIDRList -> String
(Int -> V1beta1ServiceCIDRList -> ShowS)
-> (V1beta1ServiceCIDRList -> String)
-> ([V1beta1ServiceCIDRList] -> ShowS)
-> Show V1beta1ServiceCIDRList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1ServiceCIDRList -> ShowS
showsPrec :: Int -> V1beta1ServiceCIDRList -> ShowS
$cshow :: V1beta1ServiceCIDRList -> String
show :: V1beta1ServiceCIDRList -> String
$cshowList :: [V1beta1ServiceCIDRList] -> ShowS
showList :: [V1beta1ServiceCIDRList] -> ShowS
P.Show, V1beta1ServiceCIDRList -> V1beta1ServiceCIDRList -> Bool
(V1beta1ServiceCIDRList -> V1beta1ServiceCIDRList -> Bool)
-> (V1beta1ServiceCIDRList -> V1beta1ServiceCIDRList -> Bool)
-> Eq V1beta1ServiceCIDRList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1ServiceCIDRList -> V1beta1ServiceCIDRList -> Bool
== :: V1beta1ServiceCIDRList -> V1beta1ServiceCIDRList -> Bool
$c/= :: V1beta1ServiceCIDRList -> V1beta1ServiceCIDRList -> Bool
/= :: V1beta1ServiceCIDRList -> V1beta1ServiceCIDRList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1ServiceCIDRList
instance A.FromJSON V1beta1ServiceCIDRList where
  parseJSON :: Value -> Parser V1beta1ServiceCIDRList
parseJSON = String
-> (Object -> Parser V1beta1ServiceCIDRList)
-> Value
-> Parser V1beta1ServiceCIDRList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1ServiceCIDRList" ((Object -> Parser V1beta1ServiceCIDRList)
 -> Value -> Parser V1beta1ServiceCIDRList)
-> (Object -> Parser V1beta1ServiceCIDRList)
-> Value
-> Parser V1beta1ServiceCIDRList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1beta1ServiceCIDR]
-> Maybe Text
-> Maybe V1ListMeta
-> V1beta1ServiceCIDRList
V1beta1ServiceCIDRList
      (Maybe Text
 -> [V1beta1ServiceCIDR]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1beta1ServiceCIDRList)
-> Parser (Maybe Text)
-> Parser
     ([V1beta1ServiceCIDR]
      -> Maybe Text -> Maybe V1ListMeta -> V1beta1ServiceCIDRList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1beta1ServiceCIDR]
   -> Maybe Text -> Maybe V1ListMeta -> V1beta1ServiceCIDRList)
-> Parser [V1beta1ServiceCIDR]
-> Parser
     (Maybe Text -> Maybe V1ListMeta -> V1beta1ServiceCIDRList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1beta1ServiceCIDR]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser (Maybe Text -> Maybe V1ListMeta -> V1beta1ServiceCIDRList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1beta1ServiceCIDRList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1beta1ServiceCIDRList)
-> Parser (Maybe V1ListMeta) -> Parser V1beta1ServiceCIDRList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1beta1ServiceCIDRList
instance A.ToJSON V1beta1ServiceCIDRList where
  toJSON :: V1beta1ServiceCIDRList -> Value
toJSON V1beta1ServiceCIDRList {[V1beta1ServiceCIDR]
Maybe Text
Maybe V1ListMeta
$sel:v1beta1ServiceCIDRListApiVersion:V1beta1ServiceCIDRList :: V1beta1ServiceCIDRList -> Maybe Text
$sel:v1beta1ServiceCIDRListItems:V1beta1ServiceCIDRList :: V1beta1ServiceCIDRList -> [V1beta1ServiceCIDR]
$sel:v1beta1ServiceCIDRListKind:V1beta1ServiceCIDRList :: V1beta1ServiceCIDRList -> Maybe Text
$sel:v1beta1ServiceCIDRListMetadata:V1beta1ServiceCIDRList :: V1beta1ServiceCIDRList -> Maybe V1ListMeta
v1beta1ServiceCIDRListApiVersion :: Maybe Text
v1beta1ServiceCIDRListItems :: [V1beta1ServiceCIDR]
v1beta1ServiceCIDRListKind :: Maybe Text
v1beta1ServiceCIDRListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ServiceCIDRListApiVersion
      , Key
"items" Key -> [V1beta1ServiceCIDR] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1beta1ServiceCIDR]
v1beta1ServiceCIDRListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ServiceCIDRListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1beta1ServiceCIDRListMetadata
      ]


-- | Construct a value of type 'V1beta1ServiceCIDRList' (by applying it's required fields, if any)
mkV1beta1ServiceCIDRList
  :: [V1beta1ServiceCIDR] -- ^ 'v1beta1ServiceCIDRListItems': items is the list of ServiceCIDRs.
  -> V1beta1ServiceCIDRList
mkV1beta1ServiceCIDRList :: [V1beta1ServiceCIDR] -> V1beta1ServiceCIDRList
mkV1beta1ServiceCIDRList [V1beta1ServiceCIDR]
v1beta1ServiceCIDRListItems =
  V1beta1ServiceCIDRList
  { $sel:v1beta1ServiceCIDRListApiVersion:V1beta1ServiceCIDRList :: Maybe Text
v1beta1ServiceCIDRListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1beta1ServiceCIDR]
$sel:v1beta1ServiceCIDRListItems:V1beta1ServiceCIDRList :: [V1beta1ServiceCIDR]
v1beta1ServiceCIDRListItems :: [V1beta1ServiceCIDR]
v1beta1ServiceCIDRListItems
  , $sel:v1beta1ServiceCIDRListKind:V1beta1ServiceCIDRList :: Maybe Text
v1beta1ServiceCIDRListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1ServiceCIDRListMetadata:V1beta1ServiceCIDRList :: Maybe V1ListMeta
v1beta1ServiceCIDRListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1beta1ServiceCIDRSpec
-- | V1beta1ServiceCIDRSpec
-- ServiceCIDRSpec define the CIDRs the user wants to use for allocating ClusterIPs for Services.
data V1beta1ServiceCIDRSpec = V1beta1ServiceCIDRSpec
  { V1beta1ServiceCIDRSpec -> Maybe [Text]
v1beta1ServiceCIDRSpecCidrs :: !(Maybe [Text]) -- ^ "cidrs" - CIDRs defines the IP blocks in CIDR notation (e.g. \&quot;192.168.0.0/24\&quot; or \&quot;2001:db8::/64\&quot;) from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family. This field is immutable.
  } deriving (Int -> V1beta1ServiceCIDRSpec -> ShowS
[V1beta1ServiceCIDRSpec] -> ShowS
V1beta1ServiceCIDRSpec -> String
(Int -> V1beta1ServiceCIDRSpec -> ShowS)
-> (V1beta1ServiceCIDRSpec -> String)
-> ([V1beta1ServiceCIDRSpec] -> ShowS)
-> Show V1beta1ServiceCIDRSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1ServiceCIDRSpec -> ShowS
showsPrec :: Int -> V1beta1ServiceCIDRSpec -> ShowS
$cshow :: V1beta1ServiceCIDRSpec -> String
show :: V1beta1ServiceCIDRSpec -> String
$cshowList :: [V1beta1ServiceCIDRSpec] -> ShowS
showList :: [V1beta1ServiceCIDRSpec] -> ShowS
P.Show, V1beta1ServiceCIDRSpec -> V1beta1ServiceCIDRSpec -> Bool
(V1beta1ServiceCIDRSpec -> V1beta1ServiceCIDRSpec -> Bool)
-> (V1beta1ServiceCIDRSpec -> V1beta1ServiceCIDRSpec -> Bool)
-> Eq V1beta1ServiceCIDRSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1ServiceCIDRSpec -> V1beta1ServiceCIDRSpec -> Bool
== :: V1beta1ServiceCIDRSpec -> V1beta1ServiceCIDRSpec -> Bool
$c/= :: V1beta1ServiceCIDRSpec -> V1beta1ServiceCIDRSpec -> Bool
/= :: V1beta1ServiceCIDRSpec -> V1beta1ServiceCIDRSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1ServiceCIDRSpec
instance A.FromJSON V1beta1ServiceCIDRSpec where
  parseJSON :: Value -> Parser V1beta1ServiceCIDRSpec
parseJSON = String
-> (Object -> Parser V1beta1ServiceCIDRSpec)
-> Value
-> Parser V1beta1ServiceCIDRSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1ServiceCIDRSpec" ((Object -> Parser V1beta1ServiceCIDRSpec)
 -> Value -> Parser V1beta1ServiceCIDRSpec)
-> (Object -> Parser V1beta1ServiceCIDRSpec)
-> Value
-> Parser V1beta1ServiceCIDRSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [Text] -> V1beta1ServiceCIDRSpec
V1beta1ServiceCIDRSpec
      (Maybe [Text] -> V1beta1ServiceCIDRSpec)
-> Parser (Maybe [Text]) -> Parser V1beta1ServiceCIDRSpec
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"cidrs")

-- | ToJSON V1beta1ServiceCIDRSpec
instance A.ToJSON V1beta1ServiceCIDRSpec where
  toJSON :: V1beta1ServiceCIDRSpec -> Value
toJSON V1beta1ServiceCIDRSpec {Maybe [Text]
$sel:v1beta1ServiceCIDRSpecCidrs:V1beta1ServiceCIDRSpec :: V1beta1ServiceCIDRSpec -> Maybe [Text]
v1beta1ServiceCIDRSpecCidrs :: Maybe [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"cidrs" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1beta1ServiceCIDRSpecCidrs
      ]


-- | Construct a value of type 'V1beta1ServiceCIDRSpec' (by applying it's required fields, if any)
mkV1beta1ServiceCIDRSpec
  :: V1beta1ServiceCIDRSpec
mkV1beta1ServiceCIDRSpec :: V1beta1ServiceCIDRSpec
mkV1beta1ServiceCIDRSpec =
  V1beta1ServiceCIDRSpec
  { $sel:v1beta1ServiceCIDRSpecCidrs:V1beta1ServiceCIDRSpec :: Maybe [Text]
v1beta1ServiceCIDRSpecCidrs = Maybe [Text]
forall a. Maybe a
Nothing
  }

-- ** V1beta1ServiceCIDRStatus
-- | V1beta1ServiceCIDRStatus
-- ServiceCIDRStatus describes the current state of the ServiceCIDR.
data V1beta1ServiceCIDRStatus = V1beta1ServiceCIDRStatus
  { V1beta1ServiceCIDRStatus -> Maybe [V1Condition]
v1beta1ServiceCIDRStatusConditions :: !(Maybe [V1Condition]) -- ^ "conditions" - conditions holds an array of metav1.Condition that describe the state of the ServiceCIDR. Current service state
  } deriving (Int -> V1beta1ServiceCIDRStatus -> ShowS
[V1beta1ServiceCIDRStatus] -> ShowS
V1beta1ServiceCIDRStatus -> String
(Int -> V1beta1ServiceCIDRStatus -> ShowS)
-> (V1beta1ServiceCIDRStatus -> String)
-> ([V1beta1ServiceCIDRStatus] -> ShowS)
-> Show V1beta1ServiceCIDRStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1ServiceCIDRStatus -> ShowS
showsPrec :: Int -> V1beta1ServiceCIDRStatus -> ShowS
$cshow :: V1beta1ServiceCIDRStatus -> String
show :: V1beta1ServiceCIDRStatus -> String
$cshowList :: [V1beta1ServiceCIDRStatus] -> ShowS
showList :: [V1beta1ServiceCIDRStatus] -> ShowS
P.Show, V1beta1ServiceCIDRStatus -> V1beta1ServiceCIDRStatus -> Bool
(V1beta1ServiceCIDRStatus -> V1beta1ServiceCIDRStatus -> Bool)
-> (V1beta1ServiceCIDRStatus -> V1beta1ServiceCIDRStatus -> Bool)
-> Eq V1beta1ServiceCIDRStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1ServiceCIDRStatus -> V1beta1ServiceCIDRStatus -> Bool
== :: V1beta1ServiceCIDRStatus -> V1beta1ServiceCIDRStatus -> Bool
$c/= :: V1beta1ServiceCIDRStatus -> V1beta1ServiceCIDRStatus -> Bool
/= :: V1beta1ServiceCIDRStatus -> V1beta1ServiceCIDRStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1ServiceCIDRStatus
instance A.FromJSON V1beta1ServiceCIDRStatus where
  parseJSON :: Value -> Parser V1beta1ServiceCIDRStatus
parseJSON = String
-> (Object -> Parser V1beta1ServiceCIDRStatus)
-> Value
-> Parser V1beta1ServiceCIDRStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1ServiceCIDRStatus" ((Object -> Parser V1beta1ServiceCIDRStatus)
 -> Value -> Parser V1beta1ServiceCIDRStatus)
-> (Object -> Parser V1beta1ServiceCIDRStatus)
-> Value
-> Parser V1beta1ServiceCIDRStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1Condition] -> V1beta1ServiceCIDRStatus
V1beta1ServiceCIDRStatus
      (Maybe [V1Condition] -> V1beta1ServiceCIDRStatus)
-> Parser (Maybe [V1Condition]) -> Parser V1beta1ServiceCIDRStatus
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1Condition])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"conditions")

-- | ToJSON V1beta1ServiceCIDRStatus
instance A.ToJSON V1beta1ServiceCIDRStatus where
  toJSON :: V1beta1ServiceCIDRStatus -> Value
toJSON V1beta1ServiceCIDRStatus {Maybe [V1Condition]
$sel:v1beta1ServiceCIDRStatusConditions:V1beta1ServiceCIDRStatus :: V1beta1ServiceCIDRStatus -> Maybe [V1Condition]
v1beta1ServiceCIDRStatusConditions :: Maybe [V1Condition]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"conditions" Key -> Maybe [V1Condition] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1Condition]
v1beta1ServiceCIDRStatusConditions
      ]


-- | Construct a value of type 'V1beta1ServiceCIDRStatus' (by applying it's required fields, if any)
mkV1beta1ServiceCIDRStatus
  :: V1beta1ServiceCIDRStatus
mkV1beta1ServiceCIDRStatus :: V1beta1ServiceCIDRStatus
mkV1beta1ServiceCIDRStatus =
  V1beta1ServiceCIDRStatus
  { $sel:v1beta1ServiceCIDRStatusConditions:V1beta1ServiceCIDRStatus :: Maybe [V1Condition]
v1beta1ServiceCIDRStatusConditions = Maybe [V1Condition]
forall a. Maybe a
Nothing
  }

-- ** V1beta1TypeChecking
-- | V1beta1TypeChecking
-- TypeChecking contains results of type checking the expressions in the ValidatingAdmissionPolicy
data V1beta1TypeChecking = V1beta1TypeChecking
  { V1beta1TypeChecking -> Maybe [V1beta1ExpressionWarning]
v1beta1TypeCheckingExpressionWarnings :: !(Maybe [V1beta1ExpressionWarning]) -- ^ "expressionWarnings" - The type checking warnings for each expression.
  } deriving (Int -> V1beta1TypeChecking -> ShowS
[V1beta1TypeChecking] -> ShowS
V1beta1TypeChecking -> String
(Int -> V1beta1TypeChecking -> ShowS)
-> (V1beta1TypeChecking -> String)
-> ([V1beta1TypeChecking] -> ShowS)
-> Show V1beta1TypeChecking
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1TypeChecking -> ShowS
showsPrec :: Int -> V1beta1TypeChecking -> ShowS
$cshow :: V1beta1TypeChecking -> String
show :: V1beta1TypeChecking -> String
$cshowList :: [V1beta1TypeChecking] -> ShowS
showList :: [V1beta1TypeChecking] -> ShowS
P.Show, V1beta1TypeChecking -> V1beta1TypeChecking -> Bool
(V1beta1TypeChecking -> V1beta1TypeChecking -> Bool)
-> (V1beta1TypeChecking -> V1beta1TypeChecking -> Bool)
-> Eq V1beta1TypeChecking
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1TypeChecking -> V1beta1TypeChecking -> Bool
== :: V1beta1TypeChecking -> V1beta1TypeChecking -> Bool
$c/= :: V1beta1TypeChecking -> V1beta1TypeChecking -> Bool
/= :: V1beta1TypeChecking -> V1beta1TypeChecking -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1TypeChecking
instance A.FromJSON V1beta1TypeChecking where
  parseJSON :: Value -> Parser V1beta1TypeChecking
parseJSON = String
-> (Object -> Parser V1beta1TypeChecking)
-> Value
-> Parser V1beta1TypeChecking
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1TypeChecking" ((Object -> Parser V1beta1TypeChecking)
 -> Value -> Parser V1beta1TypeChecking)
-> (Object -> Parser V1beta1TypeChecking)
-> Value
-> Parser V1beta1TypeChecking
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1beta1ExpressionWarning] -> V1beta1TypeChecking
V1beta1TypeChecking
      (Maybe [V1beta1ExpressionWarning] -> V1beta1TypeChecking)
-> Parser (Maybe [V1beta1ExpressionWarning])
-> Parser V1beta1TypeChecking
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1beta1ExpressionWarning])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"expressionWarnings")

-- | ToJSON V1beta1TypeChecking
instance A.ToJSON V1beta1TypeChecking where
  toJSON :: V1beta1TypeChecking -> Value
toJSON V1beta1TypeChecking {Maybe [V1beta1ExpressionWarning]
$sel:v1beta1TypeCheckingExpressionWarnings:V1beta1TypeChecking :: V1beta1TypeChecking -> Maybe [V1beta1ExpressionWarning]
v1beta1TypeCheckingExpressionWarnings :: Maybe [V1beta1ExpressionWarning]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"expressionWarnings" Key -> Maybe [V1beta1ExpressionWarning] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1beta1ExpressionWarning]
v1beta1TypeCheckingExpressionWarnings
      ]


-- | Construct a value of type 'V1beta1TypeChecking' (by applying it's required fields, if any)
mkV1beta1TypeChecking
  :: V1beta1TypeChecking
mkV1beta1TypeChecking :: V1beta1TypeChecking
mkV1beta1TypeChecking =
  V1beta1TypeChecking
  { $sel:v1beta1TypeCheckingExpressionWarnings:V1beta1TypeChecking :: Maybe [V1beta1ExpressionWarning]
v1beta1TypeCheckingExpressionWarnings = Maybe [V1beta1ExpressionWarning]
forall a. Maybe a
Nothing
  }

-- ** V1beta1ValidatingAdmissionPolicy
-- | V1beta1ValidatingAdmissionPolicy
-- ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it.
data V1beta1ValidatingAdmissionPolicy = V1beta1ValidatingAdmissionPolicy
  { V1beta1ValidatingAdmissionPolicy -> Maybe Text
v1beta1ValidatingAdmissionPolicyApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1beta1ValidatingAdmissionPolicy -> Maybe Text
v1beta1ValidatingAdmissionPolicyKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1beta1ValidatingAdmissionPolicy -> Maybe V1ObjectMeta
v1beta1ValidatingAdmissionPolicyMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1beta1ValidatingAdmissionPolicy
-> Maybe V1beta1ValidatingAdmissionPolicySpec
v1beta1ValidatingAdmissionPolicySpec :: !(Maybe V1beta1ValidatingAdmissionPolicySpec) -- ^ "spec"
  , V1beta1ValidatingAdmissionPolicy
-> Maybe V1beta1ValidatingAdmissionPolicyStatus
v1beta1ValidatingAdmissionPolicyStatus :: !(Maybe V1beta1ValidatingAdmissionPolicyStatus) -- ^ "status"
  } deriving (Int -> V1beta1ValidatingAdmissionPolicy -> ShowS
[V1beta1ValidatingAdmissionPolicy] -> ShowS
V1beta1ValidatingAdmissionPolicy -> String
(Int -> V1beta1ValidatingAdmissionPolicy -> ShowS)
-> (V1beta1ValidatingAdmissionPolicy -> String)
-> ([V1beta1ValidatingAdmissionPolicy] -> ShowS)
-> Show V1beta1ValidatingAdmissionPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1ValidatingAdmissionPolicy -> ShowS
showsPrec :: Int -> V1beta1ValidatingAdmissionPolicy -> ShowS
$cshow :: V1beta1ValidatingAdmissionPolicy -> String
show :: V1beta1ValidatingAdmissionPolicy -> String
$cshowList :: [V1beta1ValidatingAdmissionPolicy] -> ShowS
showList :: [V1beta1ValidatingAdmissionPolicy] -> ShowS
P.Show, V1beta1ValidatingAdmissionPolicy
-> V1beta1ValidatingAdmissionPolicy -> Bool
(V1beta1ValidatingAdmissionPolicy
 -> V1beta1ValidatingAdmissionPolicy -> Bool)
-> (V1beta1ValidatingAdmissionPolicy
    -> V1beta1ValidatingAdmissionPolicy -> Bool)
-> Eq V1beta1ValidatingAdmissionPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1ValidatingAdmissionPolicy
-> V1beta1ValidatingAdmissionPolicy -> Bool
== :: V1beta1ValidatingAdmissionPolicy
-> V1beta1ValidatingAdmissionPolicy -> Bool
$c/= :: V1beta1ValidatingAdmissionPolicy
-> V1beta1ValidatingAdmissionPolicy -> Bool
/= :: V1beta1ValidatingAdmissionPolicy
-> V1beta1ValidatingAdmissionPolicy -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1ValidatingAdmissionPolicy
instance A.FromJSON V1beta1ValidatingAdmissionPolicy where
  parseJSON :: Value -> Parser V1beta1ValidatingAdmissionPolicy
parseJSON = String
-> (Object -> Parser V1beta1ValidatingAdmissionPolicy)
-> Value
-> Parser V1beta1ValidatingAdmissionPolicy
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1ValidatingAdmissionPolicy" ((Object -> Parser V1beta1ValidatingAdmissionPolicy)
 -> Value -> Parser V1beta1ValidatingAdmissionPolicy)
-> (Object -> Parser V1beta1ValidatingAdmissionPolicy)
-> Value
-> Parser V1beta1ValidatingAdmissionPolicy
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1beta1ValidatingAdmissionPolicySpec
-> Maybe V1beta1ValidatingAdmissionPolicyStatus
-> V1beta1ValidatingAdmissionPolicy
V1beta1ValidatingAdmissionPolicy
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1beta1ValidatingAdmissionPolicySpec
 -> Maybe V1beta1ValidatingAdmissionPolicyStatus
 -> V1beta1ValidatingAdmissionPolicy)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1beta1ValidatingAdmissionPolicySpec
      -> Maybe V1beta1ValidatingAdmissionPolicyStatus
      -> V1beta1ValidatingAdmissionPolicy)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1beta1ValidatingAdmissionPolicySpec
   -> Maybe V1beta1ValidatingAdmissionPolicyStatus
   -> V1beta1ValidatingAdmissionPolicy)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1beta1ValidatingAdmissionPolicySpec
      -> Maybe V1beta1ValidatingAdmissionPolicyStatus
      -> V1beta1ValidatingAdmissionPolicy)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1beta1ValidatingAdmissionPolicySpec
   -> Maybe V1beta1ValidatingAdmissionPolicyStatus
   -> V1beta1ValidatingAdmissionPolicy)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe V1beta1ValidatingAdmissionPolicySpec
      -> Maybe V1beta1ValidatingAdmissionPolicyStatus
      -> V1beta1ValidatingAdmissionPolicy)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (Maybe V1beta1ValidatingAdmissionPolicySpec
   -> Maybe V1beta1ValidatingAdmissionPolicyStatus
   -> V1beta1ValidatingAdmissionPolicy)
-> Parser (Maybe V1beta1ValidatingAdmissionPolicySpec)
-> Parser
     (Maybe V1beta1ValidatingAdmissionPolicyStatus
      -> V1beta1ValidatingAdmissionPolicy)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object
-> Key -> Parser (Maybe V1beta1ValidatingAdmissionPolicySpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")
      Parser
  (Maybe V1beta1ValidatingAdmissionPolicyStatus
   -> V1beta1ValidatingAdmissionPolicy)
-> Parser (Maybe V1beta1ValidatingAdmissionPolicyStatus)
-> Parser V1beta1ValidatingAdmissionPolicy
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object
-> Key -> Parser (Maybe V1beta1ValidatingAdmissionPolicyStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V1beta1ValidatingAdmissionPolicy
instance A.ToJSON V1beta1ValidatingAdmissionPolicy where
  toJSON :: V1beta1ValidatingAdmissionPolicy -> Value
toJSON V1beta1ValidatingAdmissionPolicy {Maybe Text
Maybe V1beta1ValidatingAdmissionPolicyStatus
Maybe V1beta1ValidatingAdmissionPolicySpec
Maybe V1ObjectMeta
$sel:v1beta1ValidatingAdmissionPolicyApiVersion:V1beta1ValidatingAdmissionPolicy :: V1beta1ValidatingAdmissionPolicy -> Maybe Text
$sel:v1beta1ValidatingAdmissionPolicyKind:V1beta1ValidatingAdmissionPolicy :: V1beta1ValidatingAdmissionPolicy -> Maybe Text
$sel:v1beta1ValidatingAdmissionPolicyMetadata:V1beta1ValidatingAdmissionPolicy :: V1beta1ValidatingAdmissionPolicy -> Maybe V1ObjectMeta
$sel:v1beta1ValidatingAdmissionPolicySpec:V1beta1ValidatingAdmissionPolicy :: V1beta1ValidatingAdmissionPolicy
-> Maybe V1beta1ValidatingAdmissionPolicySpec
$sel:v1beta1ValidatingAdmissionPolicyStatus:V1beta1ValidatingAdmissionPolicy :: V1beta1ValidatingAdmissionPolicy
-> Maybe V1beta1ValidatingAdmissionPolicyStatus
v1beta1ValidatingAdmissionPolicyApiVersion :: Maybe Text
v1beta1ValidatingAdmissionPolicyKind :: Maybe Text
v1beta1ValidatingAdmissionPolicyMetadata :: Maybe V1ObjectMeta
v1beta1ValidatingAdmissionPolicySpec :: Maybe V1beta1ValidatingAdmissionPolicySpec
v1beta1ValidatingAdmissionPolicyStatus :: Maybe V1beta1ValidatingAdmissionPolicyStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ValidatingAdmissionPolicyApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ValidatingAdmissionPolicyKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1beta1ValidatingAdmissionPolicyMetadata
      , Key
"spec" Key -> Maybe V1beta1ValidatingAdmissionPolicySpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1beta1ValidatingAdmissionPolicySpec
v1beta1ValidatingAdmissionPolicySpec
      , Key
"status" Key -> Maybe V1beta1ValidatingAdmissionPolicyStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1beta1ValidatingAdmissionPolicyStatus
v1beta1ValidatingAdmissionPolicyStatus
      ]


-- | Construct a value of type 'V1beta1ValidatingAdmissionPolicy' (by applying it's required fields, if any)
mkV1beta1ValidatingAdmissionPolicy
  :: V1beta1ValidatingAdmissionPolicy
mkV1beta1ValidatingAdmissionPolicy :: V1beta1ValidatingAdmissionPolicy
mkV1beta1ValidatingAdmissionPolicy =
  V1beta1ValidatingAdmissionPolicy
  { $sel:v1beta1ValidatingAdmissionPolicyApiVersion:V1beta1ValidatingAdmissionPolicy :: Maybe Text
v1beta1ValidatingAdmissionPolicyApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1ValidatingAdmissionPolicyKind:V1beta1ValidatingAdmissionPolicy :: Maybe Text
v1beta1ValidatingAdmissionPolicyKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1ValidatingAdmissionPolicyMetadata:V1beta1ValidatingAdmissionPolicy :: Maybe V1ObjectMeta
v1beta1ValidatingAdmissionPolicyMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1beta1ValidatingAdmissionPolicySpec:V1beta1ValidatingAdmissionPolicy :: Maybe V1beta1ValidatingAdmissionPolicySpec
v1beta1ValidatingAdmissionPolicySpec = Maybe V1beta1ValidatingAdmissionPolicySpec
forall a. Maybe a
Nothing
  , $sel:v1beta1ValidatingAdmissionPolicyStatus:V1beta1ValidatingAdmissionPolicy :: Maybe V1beta1ValidatingAdmissionPolicyStatus
v1beta1ValidatingAdmissionPolicyStatus = Maybe V1beta1ValidatingAdmissionPolicyStatus
forall a. Maybe a
Nothing
  }

-- ** V1beta1ValidatingAdmissionPolicyBinding
-- | V1beta1ValidatingAdmissionPolicyBinding
-- ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters.  For a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don't use params, otherwise N is the number of parameters selected by the binding.  The CEL expressions of a policy must have a computed CEL cost below the maximum CEL budget. Each evaluation of the policy is given an independent CEL cost budget. Adding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget.
data V1beta1ValidatingAdmissionPolicyBinding = V1beta1ValidatingAdmissionPolicyBinding
  { V1beta1ValidatingAdmissionPolicyBinding -> Maybe Text
v1beta1ValidatingAdmissionPolicyBindingApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1beta1ValidatingAdmissionPolicyBinding -> Maybe Text
v1beta1ValidatingAdmissionPolicyBindingKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1beta1ValidatingAdmissionPolicyBinding -> Maybe V1ObjectMeta
v1beta1ValidatingAdmissionPolicyBindingMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1beta1ValidatingAdmissionPolicyBinding
-> Maybe V1beta1ValidatingAdmissionPolicyBindingSpec
v1beta1ValidatingAdmissionPolicyBindingSpec :: !(Maybe V1beta1ValidatingAdmissionPolicyBindingSpec) -- ^ "spec"
  } deriving (Int -> V1beta1ValidatingAdmissionPolicyBinding -> ShowS
[V1beta1ValidatingAdmissionPolicyBinding] -> ShowS
V1beta1ValidatingAdmissionPolicyBinding -> String
(Int -> V1beta1ValidatingAdmissionPolicyBinding -> ShowS)
-> (V1beta1ValidatingAdmissionPolicyBinding -> String)
-> ([V1beta1ValidatingAdmissionPolicyBinding] -> ShowS)
-> Show V1beta1ValidatingAdmissionPolicyBinding
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1ValidatingAdmissionPolicyBinding -> ShowS
showsPrec :: Int -> V1beta1ValidatingAdmissionPolicyBinding -> ShowS
$cshow :: V1beta1ValidatingAdmissionPolicyBinding -> String
show :: V1beta1ValidatingAdmissionPolicyBinding -> String
$cshowList :: [V1beta1ValidatingAdmissionPolicyBinding] -> ShowS
showList :: [V1beta1ValidatingAdmissionPolicyBinding] -> ShowS
P.Show, V1beta1ValidatingAdmissionPolicyBinding
-> V1beta1ValidatingAdmissionPolicyBinding -> Bool
(V1beta1ValidatingAdmissionPolicyBinding
 -> V1beta1ValidatingAdmissionPolicyBinding -> Bool)
-> (V1beta1ValidatingAdmissionPolicyBinding
    -> V1beta1ValidatingAdmissionPolicyBinding -> Bool)
-> Eq V1beta1ValidatingAdmissionPolicyBinding
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1ValidatingAdmissionPolicyBinding
-> V1beta1ValidatingAdmissionPolicyBinding -> Bool
== :: V1beta1ValidatingAdmissionPolicyBinding
-> V1beta1ValidatingAdmissionPolicyBinding -> Bool
$c/= :: V1beta1ValidatingAdmissionPolicyBinding
-> V1beta1ValidatingAdmissionPolicyBinding -> Bool
/= :: V1beta1ValidatingAdmissionPolicyBinding
-> V1beta1ValidatingAdmissionPolicyBinding -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1ValidatingAdmissionPolicyBinding
instance A.FromJSON V1beta1ValidatingAdmissionPolicyBinding where
  parseJSON :: Value -> Parser V1beta1ValidatingAdmissionPolicyBinding
parseJSON = String
-> (Object -> Parser V1beta1ValidatingAdmissionPolicyBinding)
-> Value
-> Parser V1beta1ValidatingAdmissionPolicyBinding
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1ValidatingAdmissionPolicyBinding" ((Object -> Parser V1beta1ValidatingAdmissionPolicyBinding)
 -> Value -> Parser V1beta1ValidatingAdmissionPolicyBinding)
-> (Object -> Parser V1beta1ValidatingAdmissionPolicyBinding)
-> Value
-> Parser V1beta1ValidatingAdmissionPolicyBinding
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V1beta1ValidatingAdmissionPolicyBindingSpec
-> V1beta1ValidatingAdmissionPolicyBinding
V1beta1ValidatingAdmissionPolicyBinding
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V1beta1ValidatingAdmissionPolicyBindingSpec
 -> V1beta1ValidatingAdmissionPolicyBinding)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V1beta1ValidatingAdmissionPolicyBindingSpec
      -> V1beta1ValidatingAdmissionPolicyBinding)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V1beta1ValidatingAdmissionPolicyBindingSpec
   -> V1beta1ValidatingAdmissionPolicyBinding)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V1beta1ValidatingAdmissionPolicyBindingSpec
      -> V1beta1ValidatingAdmissionPolicyBinding)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V1beta1ValidatingAdmissionPolicyBindingSpec
   -> V1beta1ValidatingAdmissionPolicyBinding)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe V1beta1ValidatingAdmissionPolicyBindingSpec
      -> V1beta1ValidatingAdmissionPolicyBinding)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (Maybe V1beta1ValidatingAdmissionPolicyBindingSpec
   -> V1beta1ValidatingAdmissionPolicyBinding)
-> Parser (Maybe V1beta1ValidatingAdmissionPolicyBindingSpec)
-> Parser V1beta1ValidatingAdmissionPolicyBinding
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object
-> Key
-> Parser (Maybe V1beta1ValidatingAdmissionPolicyBindingSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")

-- | ToJSON V1beta1ValidatingAdmissionPolicyBinding
instance A.ToJSON V1beta1ValidatingAdmissionPolicyBinding where
  toJSON :: V1beta1ValidatingAdmissionPolicyBinding -> Value
toJSON V1beta1ValidatingAdmissionPolicyBinding {Maybe Text
Maybe V1beta1ValidatingAdmissionPolicyBindingSpec
Maybe V1ObjectMeta
$sel:v1beta1ValidatingAdmissionPolicyBindingApiVersion:V1beta1ValidatingAdmissionPolicyBinding :: V1beta1ValidatingAdmissionPolicyBinding -> Maybe Text
$sel:v1beta1ValidatingAdmissionPolicyBindingKind:V1beta1ValidatingAdmissionPolicyBinding :: V1beta1ValidatingAdmissionPolicyBinding -> Maybe Text
$sel:v1beta1ValidatingAdmissionPolicyBindingMetadata:V1beta1ValidatingAdmissionPolicyBinding :: V1beta1ValidatingAdmissionPolicyBinding -> Maybe V1ObjectMeta
$sel:v1beta1ValidatingAdmissionPolicyBindingSpec:V1beta1ValidatingAdmissionPolicyBinding :: V1beta1ValidatingAdmissionPolicyBinding
-> Maybe V1beta1ValidatingAdmissionPolicyBindingSpec
v1beta1ValidatingAdmissionPolicyBindingApiVersion :: Maybe Text
v1beta1ValidatingAdmissionPolicyBindingKind :: Maybe Text
v1beta1ValidatingAdmissionPolicyBindingMetadata :: Maybe V1ObjectMeta
v1beta1ValidatingAdmissionPolicyBindingSpec :: Maybe V1beta1ValidatingAdmissionPolicyBindingSpec
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ValidatingAdmissionPolicyBindingApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ValidatingAdmissionPolicyBindingKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1beta1ValidatingAdmissionPolicyBindingMetadata
      , Key
"spec" Key
-> Maybe V1beta1ValidatingAdmissionPolicyBindingSpec
-> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1beta1ValidatingAdmissionPolicyBindingSpec
v1beta1ValidatingAdmissionPolicyBindingSpec
      ]


-- | Construct a value of type 'V1beta1ValidatingAdmissionPolicyBinding' (by applying it's required fields, if any)
mkV1beta1ValidatingAdmissionPolicyBinding
  :: V1beta1ValidatingAdmissionPolicyBinding
mkV1beta1ValidatingAdmissionPolicyBinding :: V1beta1ValidatingAdmissionPolicyBinding
mkV1beta1ValidatingAdmissionPolicyBinding =
  V1beta1ValidatingAdmissionPolicyBinding
  { $sel:v1beta1ValidatingAdmissionPolicyBindingApiVersion:V1beta1ValidatingAdmissionPolicyBinding :: Maybe Text
v1beta1ValidatingAdmissionPolicyBindingApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1ValidatingAdmissionPolicyBindingKind:V1beta1ValidatingAdmissionPolicyBinding :: Maybe Text
v1beta1ValidatingAdmissionPolicyBindingKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1ValidatingAdmissionPolicyBindingMetadata:V1beta1ValidatingAdmissionPolicyBinding :: Maybe V1ObjectMeta
v1beta1ValidatingAdmissionPolicyBindingMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1beta1ValidatingAdmissionPolicyBindingSpec:V1beta1ValidatingAdmissionPolicyBinding :: Maybe V1beta1ValidatingAdmissionPolicyBindingSpec
v1beta1ValidatingAdmissionPolicyBindingSpec = Maybe V1beta1ValidatingAdmissionPolicyBindingSpec
forall a. Maybe a
Nothing
  }

-- ** V1beta1ValidatingAdmissionPolicyBindingList
-- | V1beta1ValidatingAdmissionPolicyBindingList
-- ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding.
data V1beta1ValidatingAdmissionPolicyBindingList = V1beta1ValidatingAdmissionPolicyBindingList
  { V1beta1ValidatingAdmissionPolicyBindingList -> Maybe Text
v1beta1ValidatingAdmissionPolicyBindingListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1beta1ValidatingAdmissionPolicyBindingList
-> [V1beta1ValidatingAdmissionPolicyBinding]
v1beta1ValidatingAdmissionPolicyBindingListItems :: !([V1beta1ValidatingAdmissionPolicyBinding]) -- ^ /Required/ "items" - List of PolicyBinding.
  , V1beta1ValidatingAdmissionPolicyBindingList -> Maybe Text
v1beta1ValidatingAdmissionPolicyBindingListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1beta1ValidatingAdmissionPolicyBindingList -> Maybe V1ListMeta
v1beta1ValidatingAdmissionPolicyBindingListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1beta1ValidatingAdmissionPolicyBindingList -> ShowS
[V1beta1ValidatingAdmissionPolicyBindingList] -> ShowS
V1beta1ValidatingAdmissionPolicyBindingList -> String
(Int -> V1beta1ValidatingAdmissionPolicyBindingList -> ShowS)
-> (V1beta1ValidatingAdmissionPolicyBindingList -> String)
-> ([V1beta1ValidatingAdmissionPolicyBindingList] -> ShowS)
-> Show V1beta1ValidatingAdmissionPolicyBindingList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1ValidatingAdmissionPolicyBindingList -> ShowS
showsPrec :: Int -> V1beta1ValidatingAdmissionPolicyBindingList -> ShowS
$cshow :: V1beta1ValidatingAdmissionPolicyBindingList -> String
show :: V1beta1ValidatingAdmissionPolicyBindingList -> String
$cshowList :: [V1beta1ValidatingAdmissionPolicyBindingList] -> ShowS
showList :: [V1beta1ValidatingAdmissionPolicyBindingList] -> ShowS
P.Show, V1beta1ValidatingAdmissionPolicyBindingList
-> V1beta1ValidatingAdmissionPolicyBindingList -> Bool
(V1beta1ValidatingAdmissionPolicyBindingList
 -> V1beta1ValidatingAdmissionPolicyBindingList -> Bool)
-> (V1beta1ValidatingAdmissionPolicyBindingList
    -> V1beta1ValidatingAdmissionPolicyBindingList -> Bool)
-> Eq V1beta1ValidatingAdmissionPolicyBindingList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1ValidatingAdmissionPolicyBindingList
-> V1beta1ValidatingAdmissionPolicyBindingList -> Bool
== :: V1beta1ValidatingAdmissionPolicyBindingList
-> V1beta1ValidatingAdmissionPolicyBindingList -> Bool
$c/= :: V1beta1ValidatingAdmissionPolicyBindingList
-> V1beta1ValidatingAdmissionPolicyBindingList -> Bool
/= :: V1beta1ValidatingAdmissionPolicyBindingList
-> V1beta1ValidatingAdmissionPolicyBindingList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1ValidatingAdmissionPolicyBindingList
instance A.FromJSON V1beta1ValidatingAdmissionPolicyBindingList where
  parseJSON :: Value -> Parser V1beta1ValidatingAdmissionPolicyBindingList
parseJSON = String
-> (Object -> Parser V1beta1ValidatingAdmissionPolicyBindingList)
-> Value
-> Parser V1beta1ValidatingAdmissionPolicyBindingList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1ValidatingAdmissionPolicyBindingList" ((Object -> Parser V1beta1ValidatingAdmissionPolicyBindingList)
 -> Value -> Parser V1beta1ValidatingAdmissionPolicyBindingList)
-> (Object -> Parser V1beta1ValidatingAdmissionPolicyBindingList)
-> Value
-> Parser V1beta1ValidatingAdmissionPolicyBindingList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1beta1ValidatingAdmissionPolicyBinding]
-> Maybe Text
-> Maybe V1ListMeta
-> V1beta1ValidatingAdmissionPolicyBindingList
V1beta1ValidatingAdmissionPolicyBindingList
      (Maybe Text
 -> [V1beta1ValidatingAdmissionPolicyBinding]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1beta1ValidatingAdmissionPolicyBindingList)
-> Parser (Maybe Text)
-> Parser
     ([V1beta1ValidatingAdmissionPolicyBinding]
      -> Maybe Text
      -> Maybe V1ListMeta
      -> V1beta1ValidatingAdmissionPolicyBindingList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1beta1ValidatingAdmissionPolicyBinding]
   -> Maybe Text
   -> Maybe V1ListMeta
   -> V1beta1ValidatingAdmissionPolicyBindingList)
-> Parser [V1beta1ValidatingAdmissionPolicyBinding]
-> Parser
     (Maybe Text
      -> Maybe V1ListMeta -> V1beta1ValidatingAdmissionPolicyBindingList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1beta1ValidatingAdmissionPolicyBinding]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser
  (Maybe Text
   -> Maybe V1ListMeta -> V1beta1ValidatingAdmissionPolicyBindingList)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ListMeta -> V1beta1ValidatingAdmissionPolicyBindingList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ListMeta -> V1beta1ValidatingAdmissionPolicyBindingList)
-> Parser (Maybe V1ListMeta)
-> Parser V1beta1ValidatingAdmissionPolicyBindingList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1beta1ValidatingAdmissionPolicyBindingList
instance A.ToJSON V1beta1ValidatingAdmissionPolicyBindingList where
  toJSON :: V1beta1ValidatingAdmissionPolicyBindingList -> Value
toJSON V1beta1ValidatingAdmissionPolicyBindingList {[V1beta1ValidatingAdmissionPolicyBinding]
Maybe Text
Maybe V1ListMeta
$sel:v1beta1ValidatingAdmissionPolicyBindingListApiVersion:V1beta1ValidatingAdmissionPolicyBindingList :: V1beta1ValidatingAdmissionPolicyBindingList -> Maybe Text
$sel:v1beta1ValidatingAdmissionPolicyBindingListItems:V1beta1ValidatingAdmissionPolicyBindingList :: V1beta1ValidatingAdmissionPolicyBindingList
-> [V1beta1ValidatingAdmissionPolicyBinding]
$sel:v1beta1ValidatingAdmissionPolicyBindingListKind:V1beta1ValidatingAdmissionPolicyBindingList :: V1beta1ValidatingAdmissionPolicyBindingList -> Maybe Text
$sel:v1beta1ValidatingAdmissionPolicyBindingListMetadata:V1beta1ValidatingAdmissionPolicyBindingList :: V1beta1ValidatingAdmissionPolicyBindingList -> Maybe V1ListMeta
v1beta1ValidatingAdmissionPolicyBindingListApiVersion :: Maybe Text
v1beta1ValidatingAdmissionPolicyBindingListItems :: [V1beta1ValidatingAdmissionPolicyBinding]
v1beta1ValidatingAdmissionPolicyBindingListKind :: Maybe Text
v1beta1ValidatingAdmissionPolicyBindingListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ValidatingAdmissionPolicyBindingListApiVersion
      , Key
"items" Key -> [V1beta1ValidatingAdmissionPolicyBinding] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1beta1ValidatingAdmissionPolicyBinding]
v1beta1ValidatingAdmissionPolicyBindingListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ValidatingAdmissionPolicyBindingListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1beta1ValidatingAdmissionPolicyBindingListMetadata
      ]


-- | Construct a value of type 'V1beta1ValidatingAdmissionPolicyBindingList' (by applying it's required fields, if any)
mkV1beta1ValidatingAdmissionPolicyBindingList
  :: [V1beta1ValidatingAdmissionPolicyBinding] -- ^ 'v1beta1ValidatingAdmissionPolicyBindingListItems': List of PolicyBinding.
  -> V1beta1ValidatingAdmissionPolicyBindingList
mkV1beta1ValidatingAdmissionPolicyBindingList :: [V1beta1ValidatingAdmissionPolicyBinding]
-> V1beta1ValidatingAdmissionPolicyBindingList
mkV1beta1ValidatingAdmissionPolicyBindingList [V1beta1ValidatingAdmissionPolicyBinding]
v1beta1ValidatingAdmissionPolicyBindingListItems =
  V1beta1ValidatingAdmissionPolicyBindingList
  { $sel:v1beta1ValidatingAdmissionPolicyBindingListApiVersion:V1beta1ValidatingAdmissionPolicyBindingList :: Maybe Text
v1beta1ValidatingAdmissionPolicyBindingListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1beta1ValidatingAdmissionPolicyBinding]
$sel:v1beta1ValidatingAdmissionPolicyBindingListItems:V1beta1ValidatingAdmissionPolicyBindingList :: [V1beta1ValidatingAdmissionPolicyBinding]
v1beta1ValidatingAdmissionPolicyBindingListItems :: [V1beta1ValidatingAdmissionPolicyBinding]
v1beta1ValidatingAdmissionPolicyBindingListItems
  , $sel:v1beta1ValidatingAdmissionPolicyBindingListKind:V1beta1ValidatingAdmissionPolicyBindingList :: Maybe Text
v1beta1ValidatingAdmissionPolicyBindingListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1ValidatingAdmissionPolicyBindingListMetadata:V1beta1ValidatingAdmissionPolicyBindingList :: Maybe V1ListMeta
v1beta1ValidatingAdmissionPolicyBindingListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1beta1ValidatingAdmissionPolicyBindingSpec
-- | V1beta1ValidatingAdmissionPolicyBindingSpec
-- ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.
data V1beta1ValidatingAdmissionPolicyBindingSpec = V1beta1ValidatingAdmissionPolicyBindingSpec
  { V1beta1ValidatingAdmissionPolicyBindingSpec
-> Maybe V1beta1MatchResources
v1beta1ValidatingAdmissionPolicyBindingSpecMatchResources :: !(Maybe V1beta1MatchResources) -- ^ "matchResources"
  , V1beta1ValidatingAdmissionPolicyBindingSpec
-> Maybe V1beta1ParamRef
v1beta1ValidatingAdmissionPolicyBindingSpecParamRef :: !(Maybe V1beta1ParamRef) -- ^ "paramRef"
  , V1beta1ValidatingAdmissionPolicyBindingSpec -> Maybe Text
v1beta1ValidatingAdmissionPolicyBindingSpecPolicyName :: !(Maybe Text) -- ^ "policyName" - PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. If the referenced resource does not exist, this binding is considered invalid and will be ignored Required.
  , V1beta1ValidatingAdmissionPolicyBindingSpec -> Maybe [Text]
v1beta1ValidatingAdmissionPolicyBindingSpecValidationActions :: !(Maybe [Text]) -- ^ "validationActions" - validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions.  Failures defined by the ValidatingAdmissionPolicy&#39;s FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy.  validationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action.  The supported actions values are:  \&quot;Deny\&quot; specifies that a validation failure results in a denied request.  \&quot;Warn\&quot; specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses.  \&quot;Audit\&quot; specifies that a validation failure is included in the published audit event for the request. The audit event will contain a &#x60;validation.policy.admission.k8s.io/validation_failure&#x60; audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: &#x60;\&quot;validation.policy.admission.k8s.io/validation_failure\&quot;: \&quot;[{\\\&quot;message\\\&quot;: \\\&quot;Invalid value\\\&quot;, {\\\&quot;policy\\\&quot;: \\\&quot;policy.example.com\\\&quot;, {\\\&quot;binding\\\&quot;: \\\&quot;policybinding.example.com\\\&quot;, {\\\&quot;expressionIndex\\\&quot;: \\\&quot;1\\\&quot;, {\\\&quot;validationActions\\\&quot;: [\\\&quot;Audit\\\&quot;]}]\&quot;&#x60;  Clients should expect to handle additional values by ignoring any values not recognized.  \&quot;Deny\&quot; and \&quot;Warn\&quot; may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers.  Required.
  } deriving (Int -> V1beta1ValidatingAdmissionPolicyBindingSpec -> ShowS
[V1beta1ValidatingAdmissionPolicyBindingSpec] -> ShowS
V1beta1ValidatingAdmissionPolicyBindingSpec -> String
(Int -> V1beta1ValidatingAdmissionPolicyBindingSpec -> ShowS)
-> (V1beta1ValidatingAdmissionPolicyBindingSpec -> String)
-> ([V1beta1ValidatingAdmissionPolicyBindingSpec] -> ShowS)
-> Show V1beta1ValidatingAdmissionPolicyBindingSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1ValidatingAdmissionPolicyBindingSpec -> ShowS
showsPrec :: Int -> V1beta1ValidatingAdmissionPolicyBindingSpec -> ShowS
$cshow :: V1beta1ValidatingAdmissionPolicyBindingSpec -> String
show :: V1beta1ValidatingAdmissionPolicyBindingSpec -> String
$cshowList :: [V1beta1ValidatingAdmissionPolicyBindingSpec] -> ShowS
showList :: [V1beta1ValidatingAdmissionPolicyBindingSpec] -> ShowS
P.Show, V1beta1ValidatingAdmissionPolicyBindingSpec
-> V1beta1ValidatingAdmissionPolicyBindingSpec -> Bool
(V1beta1ValidatingAdmissionPolicyBindingSpec
 -> V1beta1ValidatingAdmissionPolicyBindingSpec -> Bool)
-> (V1beta1ValidatingAdmissionPolicyBindingSpec
    -> V1beta1ValidatingAdmissionPolicyBindingSpec -> Bool)
-> Eq V1beta1ValidatingAdmissionPolicyBindingSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1ValidatingAdmissionPolicyBindingSpec
-> V1beta1ValidatingAdmissionPolicyBindingSpec -> Bool
== :: V1beta1ValidatingAdmissionPolicyBindingSpec
-> V1beta1ValidatingAdmissionPolicyBindingSpec -> Bool
$c/= :: V1beta1ValidatingAdmissionPolicyBindingSpec
-> V1beta1ValidatingAdmissionPolicyBindingSpec -> Bool
/= :: V1beta1ValidatingAdmissionPolicyBindingSpec
-> V1beta1ValidatingAdmissionPolicyBindingSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1ValidatingAdmissionPolicyBindingSpec
instance A.FromJSON V1beta1ValidatingAdmissionPolicyBindingSpec where
  parseJSON :: Value -> Parser V1beta1ValidatingAdmissionPolicyBindingSpec
parseJSON = String
-> (Object -> Parser V1beta1ValidatingAdmissionPolicyBindingSpec)
-> Value
-> Parser V1beta1ValidatingAdmissionPolicyBindingSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1ValidatingAdmissionPolicyBindingSpec" ((Object -> Parser V1beta1ValidatingAdmissionPolicyBindingSpec)
 -> Value -> Parser V1beta1ValidatingAdmissionPolicyBindingSpec)
-> (Object -> Parser V1beta1ValidatingAdmissionPolicyBindingSpec)
-> Value
-> Parser V1beta1ValidatingAdmissionPolicyBindingSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V1beta1MatchResources
-> Maybe V1beta1ParamRef
-> Maybe Text
-> Maybe [Text]
-> V1beta1ValidatingAdmissionPolicyBindingSpec
V1beta1ValidatingAdmissionPolicyBindingSpec
      (Maybe V1beta1MatchResources
 -> Maybe V1beta1ParamRef
 -> Maybe Text
 -> Maybe [Text]
 -> V1beta1ValidatingAdmissionPolicyBindingSpec)
-> Parser (Maybe V1beta1MatchResources)
-> Parser
     (Maybe V1beta1ParamRef
      -> Maybe Text
      -> Maybe [Text]
      -> V1beta1ValidatingAdmissionPolicyBindingSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V1beta1MatchResources)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"matchResources")
      Parser
  (Maybe V1beta1ParamRef
   -> Maybe Text
   -> Maybe [Text]
   -> V1beta1ValidatingAdmissionPolicyBindingSpec)
-> Parser (Maybe V1beta1ParamRef)
-> Parser
     (Maybe Text
      -> Maybe [Text] -> V1beta1ValidatingAdmissionPolicyBindingSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1beta1ParamRef)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"paramRef")
      Parser
  (Maybe Text
   -> Maybe [Text] -> V1beta1ValidatingAdmissionPolicyBindingSpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text] -> V1beta1ValidatingAdmissionPolicyBindingSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"policyName")
      Parser
  (Maybe [Text] -> V1beta1ValidatingAdmissionPolicyBindingSpec)
-> Parser (Maybe [Text])
-> Parser V1beta1ValidatingAdmissionPolicyBindingSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"validationActions")

-- | ToJSON V1beta1ValidatingAdmissionPolicyBindingSpec
instance A.ToJSON V1beta1ValidatingAdmissionPolicyBindingSpec where
  toJSON :: V1beta1ValidatingAdmissionPolicyBindingSpec -> Value
toJSON V1beta1ValidatingAdmissionPolicyBindingSpec {Maybe [Text]
Maybe Text
Maybe V1beta1ParamRef
Maybe V1beta1MatchResources
$sel:v1beta1ValidatingAdmissionPolicyBindingSpecMatchResources:V1beta1ValidatingAdmissionPolicyBindingSpec :: V1beta1ValidatingAdmissionPolicyBindingSpec
-> Maybe V1beta1MatchResources
$sel:v1beta1ValidatingAdmissionPolicyBindingSpecParamRef:V1beta1ValidatingAdmissionPolicyBindingSpec :: V1beta1ValidatingAdmissionPolicyBindingSpec
-> Maybe V1beta1ParamRef
$sel:v1beta1ValidatingAdmissionPolicyBindingSpecPolicyName:V1beta1ValidatingAdmissionPolicyBindingSpec :: V1beta1ValidatingAdmissionPolicyBindingSpec -> Maybe Text
$sel:v1beta1ValidatingAdmissionPolicyBindingSpecValidationActions:V1beta1ValidatingAdmissionPolicyBindingSpec :: V1beta1ValidatingAdmissionPolicyBindingSpec -> Maybe [Text]
v1beta1ValidatingAdmissionPolicyBindingSpecMatchResources :: Maybe V1beta1MatchResources
v1beta1ValidatingAdmissionPolicyBindingSpecParamRef :: Maybe V1beta1ParamRef
v1beta1ValidatingAdmissionPolicyBindingSpecPolicyName :: Maybe Text
v1beta1ValidatingAdmissionPolicyBindingSpecValidationActions :: Maybe [Text]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"matchResources" Key -> Maybe V1beta1MatchResources -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1beta1MatchResources
v1beta1ValidatingAdmissionPolicyBindingSpecMatchResources
      , Key
"paramRef" Key -> Maybe V1beta1ParamRef -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1beta1ParamRef
v1beta1ValidatingAdmissionPolicyBindingSpecParamRef
      , Key
"policyName" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ValidatingAdmissionPolicyBindingSpecPolicyName
      , Key
"validationActions" Key -> Maybe [Text] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
v1beta1ValidatingAdmissionPolicyBindingSpecValidationActions
      ]


-- | Construct a value of type 'V1beta1ValidatingAdmissionPolicyBindingSpec' (by applying it's required fields, if any)
mkV1beta1ValidatingAdmissionPolicyBindingSpec
  :: V1beta1ValidatingAdmissionPolicyBindingSpec
mkV1beta1ValidatingAdmissionPolicyBindingSpec :: V1beta1ValidatingAdmissionPolicyBindingSpec
mkV1beta1ValidatingAdmissionPolicyBindingSpec =
  V1beta1ValidatingAdmissionPolicyBindingSpec
  { $sel:v1beta1ValidatingAdmissionPolicyBindingSpecMatchResources:V1beta1ValidatingAdmissionPolicyBindingSpec :: Maybe V1beta1MatchResources
v1beta1ValidatingAdmissionPolicyBindingSpecMatchResources = Maybe V1beta1MatchResources
forall a. Maybe a
Nothing
  , $sel:v1beta1ValidatingAdmissionPolicyBindingSpecParamRef:V1beta1ValidatingAdmissionPolicyBindingSpec :: Maybe V1beta1ParamRef
v1beta1ValidatingAdmissionPolicyBindingSpecParamRef = Maybe V1beta1ParamRef
forall a. Maybe a
Nothing
  , $sel:v1beta1ValidatingAdmissionPolicyBindingSpecPolicyName:V1beta1ValidatingAdmissionPolicyBindingSpec :: Maybe Text
v1beta1ValidatingAdmissionPolicyBindingSpecPolicyName = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1ValidatingAdmissionPolicyBindingSpecValidationActions:V1beta1ValidatingAdmissionPolicyBindingSpec :: Maybe [Text]
v1beta1ValidatingAdmissionPolicyBindingSpecValidationActions = Maybe [Text]
forall a. Maybe a
Nothing
  }

-- ** V1beta1ValidatingAdmissionPolicyList
-- | V1beta1ValidatingAdmissionPolicyList
-- ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy.
data V1beta1ValidatingAdmissionPolicyList = V1beta1ValidatingAdmissionPolicyList
  { V1beta1ValidatingAdmissionPolicyList -> Maybe Text
v1beta1ValidatingAdmissionPolicyListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1beta1ValidatingAdmissionPolicyList
-> [V1beta1ValidatingAdmissionPolicy]
v1beta1ValidatingAdmissionPolicyListItems :: !([V1beta1ValidatingAdmissionPolicy]) -- ^ /Required/ "items" - List of ValidatingAdmissionPolicy.
  , V1beta1ValidatingAdmissionPolicyList -> Maybe Text
v1beta1ValidatingAdmissionPolicyListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1beta1ValidatingAdmissionPolicyList -> Maybe V1ListMeta
v1beta1ValidatingAdmissionPolicyListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1beta1ValidatingAdmissionPolicyList -> ShowS
[V1beta1ValidatingAdmissionPolicyList] -> ShowS
V1beta1ValidatingAdmissionPolicyList -> String
(Int -> V1beta1ValidatingAdmissionPolicyList -> ShowS)
-> (V1beta1ValidatingAdmissionPolicyList -> String)
-> ([V1beta1ValidatingAdmissionPolicyList] -> ShowS)
-> Show V1beta1ValidatingAdmissionPolicyList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1ValidatingAdmissionPolicyList -> ShowS
showsPrec :: Int -> V1beta1ValidatingAdmissionPolicyList -> ShowS
$cshow :: V1beta1ValidatingAdmissionPolicyList -> String
show :: V1beta1ValidatingAdmissionPolicyList -> String
$cshowList :: [V1beta1ValidatingAdmissionPolicyList] -> ShowS
showList :: [V1beta1ValidatingAdmissionPolicyList] -> ShowS
P.Show, V1beta1ValidatingAdmissionPolicyList
-> V1beta1ValidatingAdmissionPolicyList -> Bool
(V1beta1ValidatingAdmissionPolicyList
 -> V1beta1ValidatingAdmissionPolicyList -> Bool)
-> (V1beta1ValidatingAdmissionPolicyList
    -> V1beta1ValidatingAdmissionPolicyList -> Bool)
-> Eq V1beta1ValidatingAdmissionPolicyList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1ValidatingAdmissionPolicyList
-> V1beta1ValidatingAdmissionPolicyList -> Bool
== :: V1beta1ValidatingAdmissionPolicyList
-> V1beta1ValidatingAdmissionPolicyList -> Bool
$c/= :: V1beta1ValidatingAdmissionPolicyList
-> V1beta1ValidatingAdmissionPolicyList -> Bool
/= :: V1beta1ValidatingAdmissionPolicyList
-> V1beta1ValidatingAdmissionPolicyList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1ValidatingAdmissionPolicyList
instance A.FromJSON V1beta1ValidatingAdmissionPolicyList where
  parseJSON :: Value -> Parser V1beta1ValidatingAdmissionPolicyList
parseJSON = String
-> (Object -> Parser V1beta1ValidatingAdmissionPolicyList)
-> Value
-> Parser V1beta1ValidatingAdmissionPolicyList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1ValidatingAdmissionPolicyList" ((Object -> Parser V1beta1ValidatingAdmissionPolicyList)
 -> Value -> Parser V1beta1ValidatingAdmissionPolicyList)
-> (Object -> Parser V1beta1ValidatingAdmissionPolicyList)
-> Value
-> Parser V1beta1ValidatingAdmissionPolicyList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1beta1ValidatingAdmissionPolicy]
-> Maybe Text
-> Maybe V1ListMeta
-> V1beta1ValidatingAdmissionPolicyList
V1beta1ValidatingAdmissionPolicyList
      (Maybe Text
 -> [V1beta1ValidatingAdmissionPolicy]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1beta1ValidatingAdmissionPolicyList)
-> Parser (Maybe Text)
-> Parser
     ([V1beta1ValidatingAdmissionPolicy]
      -> Maybe Text
      -> Maybe V1ListMeta
      -> V1beta1ValidatingAdmissionPolicyList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1beta1ValidatingAdmissionPolicy]
   -> Maybe Text
   -> Maybe V1ListMeta
   -> V1beta1ValidatingAdmissionPolicyList)
-> Parser [V1beta1ValidatingAdmissionPolicy]
-> Parser
     (Maybe Text
      -> Maybe V1ListMeta -> V1beta1ValidatingAdmissionPolicyList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1beta1ValidatingAdmissionPolicy]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser
  (Maybe Text
   -> Maybe V1ListMeta -> V1beta1ValidatingAdmissionPolicyList)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ListMeta -> V1beta1ValidatingAdmissionPolicyList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1beta1ValidatingAdmissionPolicyList)
-> Parser (Maybe V1ListMeta)
-> Parser V1beta1ValidatingAdmissionPolicyList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1beta1ValidatingAdmissionPolicyList
instance A.ToJSON V1beta1ValidatingAdmissionPolicyList where
  toJSON :: V1beta1ValidatingAdmissionPolicyList -> Value
toJSON V1beta1ValidatingAdmissionPolicyList {[V1beta1ValidatingAdmissionPolicy]
Maybe Text
Maybe V1ListMeta
$sel:v1beta1ValidatingAdmissionPolicyListApiVersion:V1beta1ValidatingAdmissionPolicyList :: V1beta1ValidatingAdmissionPolicyList -> Maybe Text
$sel:v1beta1ValidatingAdmissionPolicyListItems:V1beta1ValidatingAdmissionPolicyList :: V1beta1ValidatingAdmissionPolicyList
-> [V1beta1ValidatingAdmissionPolicy]
$sel:v1beta1ValidatingAdmissionPolicyListKind:V1beta1ValidatingAdmissionPolicyList :: V1beta1ValidatingAdmissionPolicyList -> Maybe Text
$sel:v1beta1ValidatingAdmissionPolicyListMetadata:V1beta1ValidatingAdmissionPolicyList :: V1beta1ValidatingAdmissionPolicyList -> Maybe V1ListMeta
v1beta1ValidatingAdmissionPolicyListApiVersion :: Maybe Text
v1beta1ValidatingAdmissionPolicyListItems :: [V1beta1ValidatingAdmissionPolicy]
v1beta1ValidatingAdmissionPolicyListKind :: Maybe Text
v1beta1ValidatingAdmissionPolicyListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ValidatingAdmissionPolicyListApiVersion
      , Key
"items" Key -> [V1beta1ValidatingAdmissionPolicy] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1beta1ValidatingAdmissionPolicy]
v1beta1ValidatingAdmissionPolicyListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ValidatingAdmissionPolicyListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1beta1ValidatingAdmissionPolicyListMetadata
      ]


-- | Construct a value of type 'V1beta1ValidatingAdmissionPolicyList' (by applying it's required fields, if any)
mkV1beta1ValidatingAdmissionPolicyList
  :: [V1beta1ValidatingAdmissionPolicy] -- ^ 'v1beta1ValidatingAdmissionPolicyListItems': List of ValidatingAdmissionPolicy.
  -> V1beta1ValidatingAdmissionPolicyList
mkV1beta1ValidatingAdmissionPolicyList :: [V1beta1ValidatingAdmissionPolicy]
-> V1beta1ValidatingAdmissionPolicyList
mkV1beta1ValidatingAdmissionPolicyList [V1beta1ValidatingAdmissionPolicy]
v1beta1ValidatingAdmissionPolicyListItems =
  V1beta1ValidatingAdmissionPolicyList
  { $sel:v1beta1ValidatingAdmissionPolicyListApiVersion:V1beta1ValidatingAdmissionPolicyList :: Maybe Text
v1beta1ValidatingAdmissionPolicyListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1beta1ValidatingAdmissionPolicy]
$sel:v1beta1ValidatingAdmissionPolicyListItems:V1beta1ValidatingAdmissionPolicyList :: [V1beta1ValidatingAdmissionPolicy]
v1beta1ValidatingAdmissionPolicyListItems :: [V1beta1ValidatingAdmissionPolicy]
v1beta1ValidatingAdmissionPolicyListItems
  , $sel:v1beta1ValidatingAdmissionPolicyListKind:V1beta1ValidatingAdmissionPolicyList :: Maybe Text
v1beta1ValidatingAdmissionPolicyListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1ValidatingAdmissionPolicyListMetadata:V1beta1ValidatingAdmissionPolicyList :: Maybe V1ListMeta
v1beta1ValidatingAdmissionPolicyListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V1beta1ValidatingAdmissionPolicySpec
-- | V1beta1ValidatingAdmissionPolicySpec
-- ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy.
data V1beta1ValidatingAdmissionPolicySpec = V1beta1ValidatingAdmissionPolicySpec
  { V1beta1ValidatingAdmissionPolicySpec
-> Maybe [V1beta1AuditAnnotation]
v1beta1ValidatingAdmissionPolicySpecAuditAnnotations :: !(Maybe [V1beta1AuditAnnotation]) -- ^ "auditAnnotations" - auditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request. validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is required.
  , V1beta1ValidatingAdmissionPolicySpec -> Maybe Text
v1beta1ValidatingAdmissionPolicySpecFailurePolicy :: !(Maybe Text) -- ^ "failurePolicy" - failurePolicy defines how to handle failures for the admission policy. Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings.  A policy is invalid if spec.paramKind refers to a non-existent Kind. A binding is invalid if spec.paramRef.name refers to a non-existent resource.  failurePolicy does not define how validations that evaluate to false are handled.  When failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions define how failures are enforced.  Allowed values are Ignore or Fail. Defaults to Fail.
  , V1beta1ValidatingAdmissionPolicySpec
-> Maybe [V1beta1MatchCondition]
v1beta1ValidatingAdmissionPolicySpecMatchConditions :: !(Maybe [V1beta1MatchCondition]) -- ^ "matchConditions" - MatchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.  If a parameter object is provided, it can be accessed via the &#x60;params&#x60; handle in the same manner as validation expressions.  The exact matching logic is (in order):   1. If ANY matchCondition evaluates to FALSE, the policy is skipped.   2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.   3. If any matchCondition evaluates to an error (but none are FALSE):      - If failurePolicy&#x3D;Fail, reject the request      - If failurePolicy&#x3D;Ignore, the policy is skipped
  , V1beta1ValidatingAdmissionPolicySpec -> Maybe V1beta1MatchResources
v1beta1ValidatingAdmissionPolicySpecMatchConstraints :: !(Maybe V1beta1MatchResources) -- ^ "matchConstraints"
  , V1beta1ValidatingAdmissionPolicySpec -> Maybe V1beta1ParamKind
v1beta1ValidatingAdmissionPolicySpecParamKind :: !(Maybe V1beta1ParamKind) -- ^ "paramKind"
  , V1beta1ValidatingAdmissionPolicySpec -> Maybe [V1beta1Validation]
v1beta1ValidatingAdmissionPolicySpecValidations :: !(Maybe [V1beta1Validation]) -- ^ "validations" - Validations contain CEL expressions which is used to apply the validation. Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is required.
  , V1beta1ValidatingAdmissionPolicySpec -> Maybe [V1beta1Variable]
v1beta1ValidatingAdmissionPolicySpecVariables :: !(Maybe [V1beta1Variable]) -- ^ "variables" - Variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under &#x60;variables&#x60; in other expressions of the policy except MatchConditions because MatchConditions are evaluated before the rest of the policy.  The expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, Variables must be sorted by the order of first appearance and acyclic.
  } deriving (Int -> V1beta1ValidatingAdmissionPolicySpec -> ShowS
[V1beta1ValidatingAdmissionPolicySpec] -> ShowS
V1beta1ValidatingAdmissionPolicySpec -> String
(Int -> V1beta1ValidatingAdmissionPolicySpec -> ShowS)
-> (V1beta1ValidatingAdmissionPolicySpec -> String)
-> ([V1beta1ValidatingAdmissionPolicySpec] -> ShowS)
-> Show V1beta1ValidatingAdmissionPolicySpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1ValidatingAdmissionPolicySpec -> ShowS
showsPrec :: Int -> V1beta1ValidatingAdmissionPolicySpec -> ShowS
$cshow :: V1beta1ValidatingAdmissionPolicySpec -> String
show :: V1beta1ValidatingAdmissionPolicySpec -> String
$cshowList :: [V1beta1ValidatingAdmissionPolicySpec] -> ShowS
showList :: [V1beta1ValidatingAdmissionPolicySpec] -> ShowS
P.Show, V1beta1ValidatingAdmissionPolicySpec
-> V1beta1ValidatingAdmissionPolicySpec -> Bool
(V1beta1ValidatingAdmissionPolicySpec
 -> V1beta1ValidatingAdmissionPolicySpec -> Bool)
-> (V1beta1ValidatingAdmissionPolicySpec
    -> V1beta1ValidatingAdmissionPolicySpec -> Bool)
-> Eq V1beta1ValidatingAdmissionPolicySpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1ValidatingAdmissionPolicySpec
-> V1beta1ValidatingAdmissionPolicySpec -> Bool
== :: V1beta1ValidatingAdmissionPolicySpec
-> V1beta1ValidatingAdmissionPolicySpec -> Bool
$c/= :: V1beta1ValidatingAdmissionPolicySpec
-> V1beta1ValidatingAdmissionPolicySpec -> Bool
/= :: V1beta1ValidatingAdmissionPolicySpec
-> V1beta1ValidatingAdmissionPolicySpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1ValidatingAdmissionPolicySpec
instance A.FromJSON V1beta1ValidatingAdmissionPolicySpec where
  parseJSON :: Value -> Parser V1beta1ValidatingAdmissionPolicySpec
parseJSON = String
-> (Object -> Parser V1beta1ValidatingAdmissionPolicySpec)
-> Value
-> Parser V1beta1ValidatingAdmissionPolicySpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1ValidatingAdmissionPolicySpec" ((Object -> Parser V1beta1ValidatingAdmissionPolicySpec)
 -> Value -> Parser V1beta1ValidatingAdmissionPolicySpec)
-> (Object -> Parser V1beta1ValidatingAdmissionPolicySpec)
-> Value
-> Parser V1beta1ValidatingAdmissionPolicySpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1beta1AuditAnnotation]
-> Maybe Text
-> Maybe [V1beta1MatchCondition]
-> Maybe V1beta1MatchResources
-> Maybe V1beta1ParamKind
-> Maybe [V1beta1Validation]
-> Maybe [V1beta1Variable]
-> V1beta1ValidatingAdmissionPolicySpec
V1beta1ValidatingAdmissionPolicySpec
      (Maybe [V1beta1AuditAnnotation]
 -> Maybe Text
 -> Maybe [V1beta1MatchCondition]
 -> Maybe V1beta1MatchResources
 -> Maybe V1beta1ParamKind
 -> Maybe [V1beta1Validation]
 -> Maybe [V1beta1Variable]
 -> V1beta1ValidatingAdmissionPolicySpec)
-> Parser (Maybe [V1beta1AuditAnnotation])
-> Parser
     (Maybe Text
      -> Maybe [V1beta1MatchCondition]
      -> Maybe V1beta1MatchResources
      -> Maybe V1beta1ParamKind
      -> Maybe [V1beta1Validation]
      -> Maybe [V1beta1Variable]
      -> V1beta1ValidatingAdmissionPolicySpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1beta1AuditAnnotation])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"auditAnnotations")
      Parser
  (Maybe Text
   -> Maybe [V1beta1MatchCondition]
   -> Maybe V1beta1MatchResources
   -> Maybe V1beta1ParamKind
   -> Maybe [V1beta1Validation]
   -> Maybe [V1beta1Variable]
   -> V1beta1ValidatingAdmissionPolicySpec)
-> Parser (Maybe Text)
-> Parser
     (Maybe [V1beta1MatchCondition]
      -> Maybe V1beta1MatchResources
      -> Maybe V1beta1ParamKind
      -> Maybe [V1beta1Validation]
      -> Maybe [V1beta1Variable]
      -> V1beta1ValidatingAdmissionPolicySpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"failurePolicy")
      Parser
  (Maybe [V1beta1MatchCondition]
   -> Maybe V1beta1MatchResources
   -> Maybe V1beta1ParamKind
   -> Maybe [V1beta1Validation]
   -> Maybe [V1beta1Variable]
   -> V1beta1ValidatingAdmissionPolicySpec)
-> Parser (Maybe [V1beta1MatchCondition])
-> Parser
     (Maybe V1beta1MatchResources
      -> Maybe V1beta1ParamKind
      -> Maybe [V1beta1Validation]
      -> Maybe [V1beta1Variable]
      -> V1beta1ValidatingAdmissionPolicySpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1beta1MatchCondition])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"matchConditions")
      Parser
  (Maybe V1beta1MatchResources
   -> Maybe V1beta1ParamKind
   -> Maybe [V1beta1Validation]
   -> Maybe [V1beta1Variable]
   -> V1beta1ValidatingAdmissionPolicySpec)
-> Parser (Maybe V1beta1MatchResources)
-> Parser
     (Maybe V1beta1ParamKind
      -> Maybe [V1beta1Validation]
      -> Maybe [V1beta1Variable]
      -> V1beta1ValidatingAdmissionPolicySpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1beta1MatchResources)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"matchConstraints")
      Parser
  (Maybe V1beta1ParamKind
   -> Maybe [V1beta1Validation]
   -> Maybe [V1beta1Variable]
   -> V1beta1ValidatingAdmissionPolicySpec)
-> Parser (Maybe V1beta1ParamKind)
-> Parser
     (Maybe [V1beta1Validation]
      -> Maybe [V1beta1Variable] -> V1beta1ValidatingAdmissionPolicySpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1beta1ParamKind)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"paramKind")
      Parser
  (Maybe [V1beta1Validation]
   -> Maybe [V1beta1Variable] -> V1beta1ValidatingAdmissionPolicySpec)
-> Parser (Maybe [V1beta1Validation])
-> Parser
     (Maybe [V1beta1Variable] -> V1beta1ValidatingAdmissionPolicySpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1beta1Validation])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"validations")
      Parser
  (Maybe [V1beta1Variable] -> V1beta1ValidatingAdmissionPolicySpec)
-> Parser (Maybe [V1beta1Variable])
-> Parser V1beta1ValidatingAdmissionPolicySpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V1beta1Variable])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"variables")

-- | ToJSON V1beta1ValidatingAdmissionPolicySpec
instance A.ToJSON V1beta1ValidatingAdmissionPolicySpec where
  toJSON :: V1beta1ValidatingAdmissionPolicySpec -> Value
toJSON V1beta1ValidatingAdmissionPolicySpec {Maybe [V1beta1Variable]
Maybe [V1beta1Validation]
Maybe [V1beta1MatchCondition]
Maybe [V1beta1AuditAnnotation]
Maybe Text
Maybe V1beta1ParamKind
Maybe V1beta1MatchResources
$sel:v1beta1ValidatingAdmissionPolicySpecAuditAnnotations:V1beta1ValidatingAdmissionPolicySpec :: V1beta1ValidatingAdmissionPolicySpec
-> Maybe [V1beta1AuditAnnotation]
$sel:v1beta1ValidatingAdmissionPolicySpecFailurePolicy:V1beta1ValidatingAdmissionPolicySpec :: V1beta1ValidatingAdmissionPolicySpec -> Maybe Text
$sel:v1beta1ValidatingAdmissionPolicySpecMatchConditions:V1beta1ValidatingAdmissionPolicySpec :: V1beta1ValidatingAdmissionPolicySpec
-> Maybe [V1beta1MatchCondition]
$sel:v1beta1ValidatingAdmissionPolicySpecMatchConstraints:V1beta1ValidatingAdmissionPolicySpec :: V1beta1ValidatingAdmissionPolicySpec -> Maybe V1beta1MatchResources
$sel:v1beta1ValidatingAdmissionPolicySpecParamKind:V1beta1ValidatingAdmissionPolicySpec :: V1beta1ValidatingAdmissionPolicySpec -> Maybe V1beta1ParamKind
$sel:v1beta1ValidatingAdmissionPolicySpecValidations:V1beta1ValidatingAdmissionPolicySpec :: V1beta1ValidatingAdmissionPolicySpec -> Maybe [V1beta1Validation]
$sel:v1beta1ValidatingAdmissionPolicySpecVariables:V1beta1ValidatingAdmissionPolicySpec :: V1beta1ValidatingAdmissionPolicySpec -> Maybe [V1beta1Variable]
v1beta1ValidatingAdmissionPolicySpecAuditAnnotations :: Maybe [V1beta1AuditAnnotation]
v1beta1ValidatingAdmissionPolicySpecFailurePolicy :: Maybe Text
v1beta1ValidatingAdmissionPolicySpecMatchConditions :: Maybe [V1beta1MatchCondition]
v1beta1ValidatingAdmissionPolicySpecMatchConstraints :: Maybe V1beta1MatchResources
v1beta1ValidatingAdmissionPolicySpecParamKind :: Maybe V1beta1ParamKind
v1beta1ValidatingAdmissionPolicySpecValidations :: Maybe [V1beta1Validation]
v1beta1ValidatingAdmissionPolicySpecVariables :: Maybe [V1beta1Variable]
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"auditAnnotations" Key -> Maybe [V1beta1AuditAnnotation] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1beta1AuditAnnotation]
v1beta1ValidatingAdmissionPolicySpecAuditAnnotations
      , Key
"failurePolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ValidatingAdmissionPolicySpecFailurePolicy
      , Key
"matchConditions" Key -> Maybe [V1beta1MatchCondition] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1beta1MatchCondition]
v1beta1ValidatingAdmissionPolicySpecMatchConditions
      , Key
"matchConstraints" Key -> Maybe V1beta1MatchResources -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1beta1MatchResources
v1beta1ValidatingAdmissionPolicySpecMatchConstraints
      , Key
"paramKind" Key -> Maybe V1beta1ParamKind -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1beta1ParamKind
v1beta1ValidatingAdmissionPolicySpecParamKind
      , Key
"validations" Key -> Maybe [V1beta1Validation] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1beta1Validation]
v1beta1ValidatingAdmissionPolicySpecValidations
      , Key
"variables" Key -> Maybe [V1beta1Variable] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1beta1Variable]
v1beta1ValidatingAdmissionPolicySpecVariables
      ]


-- | Construct a value of type 'V1beta1ValidatingAdmissionPolicySpec' (by applying it's required fields, if any)
mkV1beta1ValidatingAdmissionPolicySpec
  :: V1beta1ValidatingAdmissionPolicySpec
mkV1beta1ValidatingAdmissionPolicySpec :: V1beta1ValidatingAdmissionPolicySpec
mkV1beta1ValidatingAdmissionPolicySpec =
  V1beta1ValidatingAdmissionPolicySpec
  { $sel:v1beta1ValidatingAdmissionPolicySpecAuditAnnotations:V1beta1ValidatingAdmissionPolicySpec :: Maybe [V1beta1AuditAnnotation]
v1beta1ValidatingAdmissionPolicySpecAuditAnnotations = Maybe [V1beta1AuditAnnotation]
forall a. Maybe a
Nothing
  , $sel:v1beta1ValidatingAdmissionPolicySpecFailurePolicy:V1beta1ValidatingAdmissionPolicySpec :: Maybe Text
v1beta1ValidatingAdmissionPolicySpecFailurePolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1ValidatingAdmissionPolicySpecMatchConditions:V1beta1ValidatingAdmissionPolicySpec :: Maybe [V1beta1MatchCondition]
v1beta1ValidatingAdmissionPolicySpecMatchConditions = Maybe [V1beta1MatchCondition]
forall a. Maybe a
Nothing
  , $sel:v1beta1ValidatingAdmissionPolicySpecMatchConstraints:V1beta1ValidatingAdmissionPolicySpec :: Maybe V1beta1MatchResources
v1beta1ValidatingAdmissionPolicySpecMatchConstraints = Maybe V1beta1MatchResources
forall a. Maybe a
Nothing
  , $sel:v1beta1ValidatingAdmissionPolicySpecParamKind:V1beta1ValidatingAdmissionPolicySpec :: Maybe V1beta1ParamKind
v1beta1ValidatingAdmissionPolicySpecParamKind = Maybe V1beta1ParamKind
forall a. Maybe a
Nothing
  , $sel:v1beta1ValidatingAdmissionPolicySpecValidations:V1beta1ValidatingAdmissionPolicySpec :: Maybe [V1beta1Validation]
v1beta1ValidatingAdmissionPolicySpecValidations = Maybe [V1beta1Validation]
forall a. Maybe a
Nothing
  , $sel:v1beta1ValidatingAdmissionPolicySpecVariables:V1beta1ValidatingAdmissionPolicySpec :: Maybe [V1beta1Variable]
v1beta1ValidatingAdmissionPolicySpecVariables = Maybe [V1beta1Variable]
forall a. Maybe a
Nothing
  }

-- ** V1beta1ValidatingAdmissionPolicyStatus
-- | V1beta1ValidatingAdmissionPolicyStatus
-- ValidatingAdmissionPolicyStatus represents the status of an admission validation policy.
data V1beta1ValidatingAdmissionPolicyStatus = V1beta1ValidatingAdmissionPolicyStatus
  { V1beta1ValidatingAdmissionPolicyStatus -> Maybe [V1Condition]
v1beta1ValidatingAdmissionPolicyStatusConditions :: !(Maybe [V1Condition]) -- ^ "conditions" - The conditions represent the latest available observations of a policy&#39;s current state.
  , V1beta1ValidatingAdmissionPolicyStatus -> Maybe Integer
v1beta1ValidatingAdmissionPolicyStatusObservedGeneration :: !(Maybe Integer) -- ^ "observedGeneration" - The generation observed by the controller.
  , V1beta1ValidatingAdmissionPolicyStatus -> Maybe V1beta1TypeChecking
v1beta1ValidatingAdmissionPolicyStatusTypeChecking :: !(Maybe V1beta1TypeChecking) -- ^ "typeChecking"
  } deriving (Int -> V1beta1ValidatingAdmissionPolicyStatus -> ShowS
[V1beta1ValidatingAdmissionPolicyStatus] -> ShowS
V1beta1ValidatingAdmissionPolicyStatus -> String
(Int -> V1beta1ValidatingAdmissionPolicyStatus -> ShowS)
-> (V1beta1ValidatingAdmissionPolicyStatus -> String)
-> ([V1beta1ValidatingAdmissionPolicyStatus] -> ShowS)
-> Show V1beta1ValidatingAdmissionPolicyStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1ValidatingAdmissionPolicyStatus -> ShowS
showsPrec :: Int -> V1beta1ValidatingAdmissionPolicyStatus -> ShowS
$cshow :: V1beta1ValidatingAdmissionPolicyStatus -> String
show :: V1beta1ValidatingAdmissionPolicyStatus -> String
$cshowList :: [V1beta1ValidatingAdmissionPolicyStatus] -> ShowS
showList :: [V1beta1ValidatingAdmissionPolicyStatus] -> ShowS
P.Show, V1beta1ValidatingAdmissionPolicyStatus
-> V1beta1ValidatingAdmissionPolicyStatus -> Bool
(V1beta1ValidatingAdmissionPolicyStatus
 -> V1beta1ValidatingAdmissionPolicyStatus -> Bool)
-> (V1beta1ValidatingAdmissionPolicyStatus
    -> V1beta1ValidatingAdmissionPolicyStatus -> Bool)
-> Eq V1beta1ValidatingAdmissionPolicyStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1ValidatingAdmissionPolicyStatus
-> V1beta1ValidatingAdmissionPolicyStatus -> Bool
== :: V1beta1ValidatingAdmissionPolicyStatus
-> V1beta1ValidatingAdmissionPolicyStatus -> Bool
$c/= :: V1beta1ValidatingAdmissionPolicyStatus
-> V1beta1ValidatingAdmissionPolicyStatus -> Bool
/= :: V1beta1ValidatingAdmissionPolicyStatus
-> V1beta1ValidatingAdmissionPolicyStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1ValidatingAdmissionPolicyStatus
instance A.FromJSON V1beta1ValidatingAdmissionPolicyStatus where
  parseJSON :: Value -> Parser V1beta1ValidatingAdmissionPolicyStatus
parseJSON = String
-> (Object -> Parser V1beta1ValidatingAdmissionPolicyStatus)
-> Value
-> Parser V1beta1ValidatingAdmissionPolicyStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1ValidatingAdmissionPolicyStatus" ((Object -> Parser V1beta1ValidatingAdmissionPolicyStatus)
 -> Value -> Parser V1beta1ValidatingAdmissionPolicyStatus)
-> (Object -> Parser V1beta1ValidatingAdmissionPolicyStatus)
-> Value
-> Parser V1beta1ValidatingAdmissionPolicyStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V1Condition]
-> Maybe Integer
-> Maybe V1beta1TypeChecking
-> V1beta1ValidatingAdmissionPolicyStatus
V1beta1ValidatingAdmissionPolicyStatus
      (Maybe [V1Condition]
 -> Maybe Integer
 -> Maybe V1beta1TypeChecking
 -> V1beta1ValidatingAdmissionPolicyStatus)
-> Parser (Maybe [V1Condition])
-> Parser
     (Maybe Integer
      -> Maybe V1beta1TypeChecking
      -> V1beta1ValidatingAdmissionPolicyStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V1Condition])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"conditions")
      Parser
  (Maybe Integer
   -> Maybe V1beta1TypeChecking
   -> V1beta1ValidatingAdmissionPolicyStatus)
-> Parser (Maybe Integer)
-> Parser
     (Maybe V1beta1TypeChecking
      -> V1beta1ValidatingAdmissionPolicyStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"observedGeneration")
      Parser
  (Maybe V1beta1TypeChecking
   -> V1beta1ValidatingAdmissionPolicyStatus)
-> Parser (Maybe V1beta1TypeChecking)
-> Parser V1beta1ValidatingAdmissionPolicyStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1beta1TypeChecking)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"typeChecking")

-- | ToJSON V1beta1ValidatingAdmissionPolicyStatus
instance A.ToJSON V1beta1ValidatingAdmissionPolicyStatus where
  toJSON :: V1beta1ValidatingAdmissionPolicyStatus -> Value
toJSON V1beta1ValidatingAdmissionPolicyStatus {Maybe Integer
Maybe [V1Condition]
Maybe V1beta1TypeChecking
$sel:v1beta1ValidatingAdmissionPolicyStatusConditions:V1beta1ValidatingAdmissionPolicyStatus :: V1beta1ValidatingAdmissionPolicyStatus -> Maybe [V1Condition]
$sel:v1beta1ValidatingAdmissionPolicyStatusObservedGeneration:V1beta1ValidatingAdmissionPolicyStatus :: V1beta1ValidatingAdmissionPolicyStatus -> Maybe Integer
$sel:v1beta1ValidatingAdmissionPolicyStatusTypeChecking:V1beta1ValidatingAdmissionPolicyStatus :: V1beta1ValidatingAdmissionPolicyStatus -> Maybe V1beta1TypeChecking
v1beta1ValidatingAdmissionPolicyStatusConditions :: Maybe [V1Condition]
v1beta1ValidatingAdmissionPolicyStatusObservedGeneration :: Maybe Integer
v1beta1ValidatingAdmissionPolicyStatusTypeChecking :: Maybe V1beta1TypeChecking
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"conditions" Key -> Maybe [V1Condition] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V1Condition]
v1beta1ValidatingAdmissionPolicyStatusConditions
      , Key
"observedGeneration" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v1beta1ValidatingAdmissionPolicyStatusObservedGeneration
      , Key
"typeChecking" Key -> Maybe V1beta1TypeChecking -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1beta1TypeChecking
v1beta1ValidatingAdmissionPolicyStatusTypeChecking
      ]


-- | Construct a value of type 'V1beta1ValidatingAdmissionPolicyStatus' (by applying it's required fields, if any)
mkV1beta1ValidatingAdmissionPolicyStatus
  :: V1beta1ValidatingAdmissionPolicyStatus
mkV1beta1ValidatingAdmissionPolicyStatus :: V1beta1ValidatingAdmissionPolicyStatus
mkV1beta1ValidatingAdmissionPolicyStatus =
  V1beta1ValidatingAdmissionPolicyStatus
  { $sel:v1beta1ValidatingAdmissionPolicyStatusConditions:V1beta1ValidatingAdmissionPolicyStatus :: Maybe [V1Condition]
v1beta1ValidatingAdmissionPolicyStatusConditions = Maybe [V1Condition]
forall a. Maybe a
Nothing
  , $sel:v1beta1ValidatingAdmissionPolicyStatusObservedGeneration:V1beta1ValidatingAdmissionPolicyStatus :: Maybe Integer
v1beta1ValidatingAdmissionPolicyStatusObservedGeneration = Maybe Integer
forall a. Maybe a
Nothing
  , $sel:v1beta1ValidatingAdmissionPolicyStatusTypeChecking:V1beta1ValidatingAdmissionPolicyStatus :: Maybe V1beta1TypeChecking
v1beta1ValidatingAdmissionPolicyStatusTypeChecking = Maybe V1beta1TypeChecking
forall a. Maybe a
Nothing
  }

-- ** V1beta1Validation
-- | V1beta1Validation
-- Validation specifies the CEL expression which is used to apply the validation.
data V1beta1Validation = V1beta1Validation
  { V1beta1Validation -> Text
v1beta1ValidationExpression :: !(Text) -- ^ /Required/ "expression" - Expression represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:  - &#39;object&#39; - The object from the incoming request. The value is null for DELETE requests. - &#39;oldObject&#39; - The existing object. The value is null for CREATE requests. - &#39;request&#39; - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - &#39;params&#39; - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - &#39;namespaceObject&#39; - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - &#39;variables&#39; - Map of composited variables, from its name to its lazily evaluated value.   For example, a variable named &#39;foo&#39; can be accessed as &#39;variables.foo&#39;. - &#39;authorizer&#39; - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.   See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz - &#39;authorizer.requestResource&#39; - A CEL ResourceCheck constructed from the &#39;authorizer&#39; and configured with the   request resource.  The &#x60;apiVersion&#x60;, &#x60;kind&#x60;, &#x60;metadata.name&#x60; and &#x60;metadata.generateName&#x60; are always accessible from the root of the object. No other metadata properties are accessible.  Only property names of the form &#x60;[a-zA-Z_.-/][a-zA-Z0-9_.-/]*&#x60; are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - &#39;__&#39; escapes to &#39;__underscores__&#39; - &#39;.&#39; escapes to &#39;__dot__&#39; - &#39;-&#39; escapes to &#39;__dash__&#39; - &#39;/&#39; escapes to &#39;__slash__&#39; - Property names that exactly match a CEL RESERVED keyword escape to &#39;__{keyword}__&#39;. The keywords are:    \&quot;true\&quot;, \&quot;false\&quot;, \&quot;null\&quot;, \&quot;in\&quot;, \&quot;as\&quot;, \&quot;break\&quot;, \&quot;const\&quot;, \&quot;continue\&quot;, \&quot;else\&quot;, \&quot;for\&quot;, \&quot;function\&quot;, \&quot;if\&quot;,    \&quot;import\&quot;, \&quot;let\&quot;, \&quot;loop\&quot;, \&quot;package\&quot;, \&quot;namespace\&quot;, \&quot;return\&quot;. Examples:   - Expression accessing a property named \&quot;namespace\&quot;: {\&quot;Expression\&quot;: \&quot;object.__namespace__ &gt; 0\&quot;}   - Expression accessing a property named \&quot;x-prop\&quot;: {\&quot;Expression\&quot;: \&quot;object.x__dash__prop &gt; 0\&quot;}   - Expression accessing a property named \&quot;redact__d\&quot;: {\&quot;Expression\&quot;: \&quot;object.redact__underscores__d &gt; 0\&quot;}  Equality on arrays with list type of &#39;set&#39; or &#39;map&#39; ignores element order, i.e. [1, 2] &#x3D;&#x3D; [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type:   - &#39;set&#39;: &#x60;X + Y&#x60; performs a union where the array positions of all elements in &#x60;X&#x60; are preserved and     non-intersecting elements in &#x60;Y&#x60; are appended, retaining their partial order.   - &#39;map&#39;: &#x60;X + Y&#x60; performs a merge where the array positions of all keys in &#x60;X&#x60; are preserved but the values     are overwritten by values in &#x60;Y&#x60; when the key sets of &#x60;X&#x60; and &#x60;Y&#x60; intersect. Elements in &#x60;Y&#x60; with     non-intersecting keys are appended, retaining their partial order. Required.
  , V1beta1Validation -> Maybe Text
v1beta1ValidationMessage :: !(Maybe Text) -- ^ "message" - Message represents the message displayed when validation fails. The message is required if the Expression contains line breaks. The message must not contain line breaks. If unset, the message is \&quot;failed rule: {Rule}\&quot;. e.g. \&quot;must be a URL with the host matching spec.host\&quot; If the Expression contains line breaks. Message is required. The message must not contain line breaks. If unset, the message is \&quot;failed Expression: {Expression}\&quot;.
  , V1beta1Validation -> Maybe Text
v1beta1ValidationMessageExpression :: !(Maybe Text) -- ^ "messageExpression" - messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. messageExpression has access to all the same variables as the &#x60;expression&#x60; except for &#39;authorizer&#39; and &#39;authorizer.requestResource&#39;. Example: \&quot;object.x must be less than max (\&quot;+string(params.max)+\&quot;)\&quot;
  , V1beta1Validation -> Maybe Text
v1beta1ValidationReason :: !(Maybe Text) -- ^ "reason" - Reason represents a machine-readable description of why this validation failed. If this is the first validation in the list to fail, this reason, as well as the corresponding HTTP response code, are used in the HTTP response to the client. The currently supported reasons are: \&quot;Unauthorized\&quot;, \&quot;Forbidden\&quot;, \&quot;Invalid\&quot;, \&quot;RequestEntityTooLarge\&quot;. If not set, StatusReasonInvalid is used in the response to the client.
  } deriving (Int -> V1beta1Validation -> ShowS
[V1beta1Validation] -> ShowS
V1beta1Validation -> String
(Int -> V1beta1Validation -> ShowS)
-> (V1beta1Validation -> String)
-> ([V1beta1Validation] -> ShowS)
-> Show V1beta1Validation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1Validation -> ShowS
showsPrec :: Int -> V1beta1Validation -> ShowS
$cshow :: V1beta1Validation -> String
show :: V1beta1Validation -> String
$cshowList :: [V1beta1Validation] -> ShowS
showList :: [V1beta1Validation] -> ShowS
P.Show, V1beta1Validation -> V1beta1Validation -> Bool
(V1beta1Validation -> V1beta1Validation -> Bool)
-> (V1beta1Validation -> V1beta1Validation -> Bool)
-> Eq V1beta1Validation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1Validation -> V1beta1Validation -> Bool
== :: V1beta1Validation -> V1beta1Validation -> Bool
$c/= :: V1beta1Validation -> V1beta1Validation -> Bool
/= :: V1beta1Validation -> V1beta1Validation -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1Validation
instance A.FromJSON V1beta1Validation where
  parseJSON :: Value -> Parser V1beta1Validation
parseJSON = String
-> (Object -> Parser V1beta1Validation)
-> Value
-> Parser V1beta1Validation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1Validation" ((Object -> Parser V1beta1Validation)
 -> Value -> Parser V1beta1Validation)
-> (Object -> Parser V1beta1Validation)
-> Value
-> Parser V1beta1Validation
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Maybe Text -> Maybe Text -> Maybe Text -> V1beta1Validation
V1beta1Validation
      (Text
 -> Maybe Text -> Maybe Text -> Maybe Text -> V1beta1Validation)
-> Parser Text
-> Parser
     (Maybe Text -> Maybe Text -> Maybe Text -> V1beta1Validation)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"expression")
      Parser
  (Maybe Text -> Maybe Text -> Maybe Text -> V1beta1Validation)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> V1beta1Validation)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"message")
      Parser (Maybe Text -> Maybe Text -> V1beta1Validation)
-> Parser (Maybe Text) -> Parser (Maybe Text -> V1beta1Validation)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"messageExpression")
      Parser (Maybe Text -> V1beta1Validation)
-> Parser (Maybe Text) -> Parser V1beta1Validation
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reason")

-- | ToJSON V1beta1Validation
instance A.ToJSON V1beta1Validation where
  toJSON :: V1beta1Validation -> Value
toJSON V1beta1Validation {Maybe Text
Text
$sel:v1beta1ValidationExpression:V1beta1Validation :: V1beta1Validation -> Text
$sel:v1beta1ValidationMessage:V1beta1Validation :: V1beta1Validation -> Maybe Text
$sel:v1beta1ValidationMessageExpression:V1beta1Validation :: V1beta1Validation -> Maybe Text
$sel:v1beta1ValidationReason:V1beta1Validation :: V1beta1Validation -> Maybe Text
v1beta1ValidationExpression :: Text
v1beta1ValidationMessage :: Maybe Text
v1beta1ValidationMessageExpression :: Maybe Text
v1beta1ValidationReason :: Maybe Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"expression" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1beta1ValidationExpression
      , Key
"message" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ValidationMessage
      , Key
"messageExpression" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ValidationMessageExpression
      , Key
"reason" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1ValidationReason
      ]


-- | Construct a value of type 'V1beta1Validation' (by applying it's required fields, if any)
mkV1beta1Validation
  :: Text -- ^ 'v1beta1ValidationExpression': Expression represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:  - 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value.   For example, a variable named 'foo' can be accessed as 'variables.foo'. - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.   See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the   request resource.  The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible.  Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are:    \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\",    \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\". Examples:   - Expression accessing a property named \"namespace\": {\"Expression\": \"object.__namespace__ > 0\"}   - Expression accessing a property named \"x-prop\": {\"Expression\": \"object.x__dash__prop > 0\"}   - Expression accessing a property named \"redact__d\": {\"Expression\": \"object.redact__underscores__d > 0\"}  Equality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type:   - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and     non-intersecting elements in `Y` are appended, retaining their partial order.   - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values     are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with     non-intersecting keys are appended, retaining their partial order. Required.
  -> V1beta1Validation
mkV1beta1Validation :: Text -> V1beta1Validation
mkV1beta1Validation Text
v1beta1ValidationExpression =
  V1beta1Validation
  { Text
$sel:v1beta1ValidationExpression:V1beta1Validation :: Text
v1beta1ValidationExpression :: Text
v1beta1ValidationExpression
  , $sel:v1beta1ValidationMessage:V1beta1Validation :: Maybe Text
v1beta1ValidationMessage = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1ValidationMessageExpression:V1beta1Validation :: Maybe Text
v1beta1ValidationMessageExpression = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1ValidationReason:V1beta1Validation :: Maybe Text
v1beta1ValidationReason = Maybe Text
forall a. Maybe a
Nothing
  }

-- ** V1beta1Variable
-- | V1beta1Variable
-- Variable is the definition of a variable that is used for composition. A variable is defined as a named expression.
data V1beta1Variable = V1beta1Variable
  { V1beta1Variable -> Text
v1beta1VariableExpression :: !(Text) -- ^ /Required/ "expression" - Expression is the expression that will be evaluated as the value of the variable. The CEL expression has access to the same identifiers as the CEL expressions in Validation.
  , V1beta1Variable -> Text
v1beta1VariableName :: !(Text) -- ^ /Required/ "name" - Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through &#x60;variables&#x60; For example, if name is \&quot;foo\&quot;, the variable will be available as &#x60;variables.foo&#x60;
  } deriving (Int -> V1beta1Variable -> ShowS
[V1beta1Variable] -> ShowS
V1beta1Variable -> String
(Int -> V1beta1Variable -> ShowS)
-> (V1beta1Variable -> String)
-> ([V1beta1Variable] -> ShowS)
-> Show V1beta1Variable
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1Variable -> ShowS
showsPrec :: Int -> V1beta1Variable -> ShowS
$cshow :: V1beta1Variable -> String
show :: V1beta1Variable -> String
$cshowList :: [V1beta1Variable] -> ShowS
showList :: [V1beta1Variable] -> ShowS
P.Show, V1beta1Variable -> V1beta1Variable -> Bool
(V1beta1Variable -> V1beta1Variable -> Bool)
-> (V1beta1Variable -> V1beta1Variable -> Bool)
-> Eq V1beta1Variable
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1Variable -> V1beta1Variable -> Bool
== :: V1beta1Variable -> V1beta1Variable -> Bool
$c/= :: V1beta1Variable -> V1beta1Variable -> Bool
/= :: V1beta1Variable -> V1beta1Variable -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1Variable
instance A.FromJSON V1beta1Variable where
  parseJSON :: Value -> Parser V1beta1Variable
parseJSON = String
-> (Object -> Parser V1beta1Variable)
-> Value
-> Parser V1beta1Variable
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1Variable" ((Object -> Parser V1beta1Variable)
 -> Value -> Parser V1beta1Variable)
-> (Object -> Parser V1beta1Variable)
-> Value
-> Parser V1beta1Variable
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Text -> V1beta1Variable
V1beta1Variable
      (Text -> Text -> V1beta1Variable)
-> Parser Text -> Parser (Text -> V1beta1Variable)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"expression")
      Parser (Text -> V1beta1Variable)
-> Parser Text -> Parser V1beta1Variable
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")

-- | ToJSON V1beta1Variable
instance A.ToJSON V1beta1Variable where
  toJSON :: V1beta1Variable -> Value
toJSON V1beta1Variable {Text
$sel:v1beta1VariableExpression:V1beta1Variable :: V1beta1Variable -> Text
$sel:v1beta1VariableName:V1beta1Variable :: V1beta1Variable -> Text
v1beta1VariableExpression :: Text
v1beta1VariableName :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"expression" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1beta1VariableExpression
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1beta1VariableName
      ]


-- | Construct a value of type 'V1beta1Variable' (by applying it's required fields, if any)
mkV1beta1Variable
  :: Text -- ^ 'v1beta1VariableExpression': Expression is the expression that will be evaluated as the value of the variable. The CEL expression has access to the same identifiers as the CEL expressions in Validation.
  -> Text -- ^ 'v1beta1VariableName': Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through `variables` For example, if name is \"foo\", the variable will be available as `variables.foo`
  -> V1beta1Variable
mkV1beta1Variable :: Text -> Text -> V1beta1Variable
mkV1beta1Variable Text
v1beta1VariableExpression Text
v1beta1VariableName =
  V1beta1Variable
  { Text
$sel:v1beta1VariableExpression:V1beta1Variable :: Text
v1beta1VariableExpression :: Text
v1beta1VariableExpression
  , Text
$sel:v1beta1VariableName:V1beta1Variable :: Text
v1beta1VariableName :: Text
v1beta1VariableName
  }

-- ** V1beta1VolumeAttributesClass
-- | V1beta1VolumeAttributesClass
-- VolumeAttributesClass represents a specification of mutable volume attributes defined by the CSI driver. The class can be specified during dynamic provisioning of PersistentVolumeClaims, and changed in the PersistentVolumeClaim spec after provisioning.
data V1beta1VolumeAttributesClass = V1beta1VolumeAttributesClass
  { V1beta1VolumeAttributesClass -> Maybe Text
v1beta1VolumeAttributesClassApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1beta1VolumeAttributesClass -> Text
v1beta1VolumeAttributesClassDriverName :: !(Text) -- ^ /Required/ "driverName" - Name of the CSI driver This field is immutable.
  , V1beta1VolumeAttributesClass -> Maybe Text
v1beta1VolumeAttributesClassKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1beta1VolumeAttributesClass -> Maybe V1ObjectMeta
v1beta1VolumeAttributesClassMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V1beta1VolumeAttributesClass -> Maybe (Map String Text)
v1beta1VolumeAttributesClassParameters :: !(Maybe (Map.Map String Text)) -- ^ "parameters" - parameters hold volume attributes defined by the CSI driver. These values are opaque to the Kubernetes and are passed directly to the CSI driver. The underlying storage provider supports changing these attributes on an existing volume, however the parameters field itself is immutable. To invoke a volume update, a new VolumeAttributesClass should be created with new parameters, and the PersistentVolumeClaim should be updated to reference the new VolumeAttributesClass.  This field is required and must contain at least one key/value pair. The keys cannot be empty, and the maximum number of parameters is 512, with a cumulative max size of 256K. If the CSI driver rejects invalid parameters, the target PersistentVolumeClaim will be set to an \&quot;Infeasible\&quot; state in the modifyVolumeStatus field.
  } deriving (Int -> V1beta1VolumeAttributesClass -> ShowS
[V1beta1VolumeAttributesClass] -> ShowS
V1beta1VolumeAttributesClass -> String
(Int -> V1beta1VolumeAttributesClass -> ShowS)
-> (V1beta1VolumeAttributesClass -> String)
-> ([V1beta1VolumeAttributesClass] -> ShowS)
-> Show V1beta1VolumeAttributesClass
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1VolumeAttributesClass -> ShowS
showsPrec :: Int -> V1beta1VolumeAttributesClass -> ShowS
$cshow :: V1beta1VolumeAttributesClass -> String
show :: V1beta1VolumeAttributesClass -> String
$cshowList :: [V1beta1VolumeAttributesClass] -> ShowS
showList :: [V1beta1VolumeAttributesClass] -> ShowS
P.Show, V1beta1VolumeAttributesClass
-> V1beta1VolumeAttributesClass -> Bool
(V1beta1VolumeAttributesClass
 -> V1beta1VolumeAttributesClass -> Bool)
-> (V1beta1VolumeAttributesClass
    -> V1beta1VolumeAttributesClass -> Bool)
-> Eq V1beta1VolumeAttributesClass
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1VolumeAttributesClass
-> V1beta1VolumeAttributesClass -> Bool
== :: V1beta1VolumeAttributesClass
-> V1beta1VolumeAttributesClass -> Bool
$c/= :: V1beta1VolumeAttributesClass
-> V1beta1VolumeAttributesClass -> Bool
/= :: V1beta1VolumeAttributesClass
-> V1beta1VolumeAttributesClass -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1VolumeAttributesClass
instance A.FromJSON V1beta1VolumeAttributesClass where
  parseJSON :: Value -> Parser V1beta1VolumeAttributesClass
parseJSON = String
-> (Object -> Parser V1beta1VolumeAttributesClass)
-> Value
-> Parser V1beta1VolumeAttributesClass
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1VolumeAttributesClass" ((Object -> Parser V1beta1VolumeAttributesClass)
 -> Value -> Parser V1beta1VolumeAttributesClass)
-> (Object -> Parser V1beta1VolumeAttributesClass)
-> Value
-> Parser V1beta1VolumeAttributesClass
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe (Map String Text)
-> V1beta1VolumeAttributesClass
V1beta1VolumeAttributesClass
      (Maybe Text
 -> Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe (Map String Text)
 -> V1beta1VolumeAttributesClass)
-> Parser (Maybe Text)
-> Parser
     (Text
      -> Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe (Map String Text)
      -> V1beta1VolumeAttributesClass)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Text
   -> Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe (Map String Text)
   -> V1beta1VolumeAttributesClass)
-> Parser Text
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe (Map String Text)
      -> V1beta1VolumeAttributesClass)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"driverName")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe (Map String Text)
   -> V1beta1VolumeAttributesClass)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe (Map String Text) -> V1beta1VolumeAttributesClass)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe (Map String Text) -> V1beta1VolumeAttributesClass)
-> Parser (Maybe V1ObjectMeta)
-> Parser (Maybe (Map String Text) -> V1beta1VolumeAttributesClass)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser (Maybe (Map String Text) -> V1beta1VolumeAttributesClass)
-> Parser (Maybe (Map String Text))
-> Parser V1beta1VolumeAttributesClass
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe (Map String Text))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"parameters")

-- | ToJSON V1beta1VolumeAttributesClass
instance A.ToJSON V1beta1VolumeAttributesClass where
  toJSON :: V1beta1VolumeAttributesClass -> Value
toJSON V1beta1VolumeAttributesClass {Maybe (Map String Text)
Maybe Text
Maybe V1ObjectMeta
Text
$sel:v1beta1VolumeAttributesClassApiVersion:V1beta1VolumeAttributesClass :: V1beta1VolumeAttributesClass -> Maybe Text
$sel:v1beta1VolumeAttributesClassDriverName:V1beta1VolumeAttributesClass :: V1beta1VolumeAttributesClass -> Text
$sel:v1beta1VolumeAttributesClassKind:V1beta1VolumeAttributesClass :: V1beta1VolumeAttributesClass -> Maybe Text
$sel:v1beta1VolumeAttributesClassMetadata:V1beta1VolumeAttributesClass :: V1beta1VolumeAttributesClass -> Maybe V1ObjectMeta
$sel:v1beta1VolumeAttributesClassParameters:V1beta1VolumeAttributesClass :: V1beta1VolumeAttributesClass -> Maybe (Map String Text)
v1beta1VolumeAttributesClassApiVersion :: Maybe Text
v1beta1VolumeAttributesClassDriverName :: Text
v1beta1VolumeAttributesClassKind :: Maybe Text
v1beta1VolumeAttributesClassMetadata :: Maybe V1ObjectMeta
v1beta1VolumeAttributesClassParameters :: Maybe (Map String Text)
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1VolumeAttributesClassApiVersion
      , Key
"driverName" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v1beta1VolumeAttributesClassDriverName
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1VolumeAttributesClassKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v1beta1VolumeAttributesClassMetadata
      , Key
"parameters" Key -> Maybe (Map String Text) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Text)
v1beta1VolumeAttributesClassParameters
      ]


-- | Construct a value of type 'V1beta1VolumeAttributesClass' (by applying it's required fields, if any)
mkV1beta1VolumeAttributesClass
  :: Text -- ^ 'v1beta1VolumeAttributesClassDriverName': Name of the CSI driver This field is immutable.
  -> V1beta1VolumeAttributesClass
mkV1beta1VolumeAttributesClass :: Text -> V1beta1VolumeAttributesClass
mkV1beta1VolumeAttributesClass Text
v1beta1VolumeAttributesClassDriverName =
  V1beta1VolumeAttributesClass
  { $sel:v1beta1VolumeAttributesClassApiVersion:V1beta1VolumeAttributesClass :: Maybe Text
v1beta1VolumeAttributesClassApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v1beta1VolumeAttributesClassDriverName:V1beta1VolumeAttributesClass :: Text
v1beta1VolumeAttributesClassDriverName :: Text
v1beta1VolumeAttributesClassDriverName
  , $sel:v1beta1VolumeAttributesClassKind:V1beta1VolumeAttributesClass :: Maybe Text
v1beta1VolumeAttributesClassKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1VolumeAttributesClassMetadata:V1beta1VolumeAttributesClass :: Maybe V1ObjectMeta
v1beta1VolumeAttributesClassMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v1beta1VolumeAttributesClassParameters:V1beta1VolumeAttributesClass :: Maybe (Map String Text)
v1beta1VolumeAttributesClassParameters = Maybe (Map String Text)
forall a. Maybe a
Nothing
  }

-- ** V1beta1VolumeAttributesClassList
-- | V1beta1VolumeAttributesClassList
-- VolumeAttributesClassList is a collection of VolumeAttributesClass objects.
data V1beta1VolumeAttributesClassList = V1beta1VolumeAttributesClassList
  { V1beta1VolumeAttributesClassList -> Maybe Text
v1beta1VolumeAttributesClassListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V1beta1VolumeAttributesClassList -> [V1beta1VolumeAttributesClass]
v1beta1VolumeAttributesClassListItems :: !([V1beta1VolumeAttributesClass]) -- ^ /Required/ "items" - items is the list of VolumeAttributesClass objects.
  , V1beta1VolumeAttributesClassList -> Maybe Text
v1beta1VolumeAttributesClassListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V1beta1VolumeAttributesClassList -> Maybe V1ListMeta
v1beta1VolumeAttributesClassListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V1beta1VolumeAttributesClassList -> ShowS
[V1beta1VolumeAttributesClassList] -> ShowS
V1beta1VolumeAttributesClassList -> String
(Int -> V1beta1VolumeAttributesClassList -> ShowS)
-> (V1beta1VolumeAttributesClassList -> String)
-> ([V1beta1VolumeAttributesClassList] -> ShowS)
-> Show V1beta1VolumeAttributesClassList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V1beta1VolumeAttributesClassList -> ShowS
showsPrec :: Int -> V1beta1VolumeAttributesClassList -> ShowS
$cshow :: V1beta1VolumeAttributesClassList -> String
show :: V1beta1VolumeAttributesClassList -> String
$cshowList :: [V1beta1VolumeAttributesClassList] -> ShowS
showList :: [V1beta1VolumeAttributesClassList] -> ShowS
P.Show, V1beta1VolumeAttributesClassList
-> V1beta1VolumeAttributesClassList -> Bool
(V1beta1VolumeAttributesClassList
 -> V1beta1VolumeAttributesClassList -> Bool)
-> (V1beta1VolumeAttributesClassList
    -> V1beta1VolumeAttributesClassList -> Bool)
-> Eq V1beta1VolumeAttributesClassList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V1beta1VolumeAttributesClassList
-> V1beta1VolumeAttributesClassList -> Bool
== :: V1beta1VolumeAttributesClassList
-> V1beta1VolumeAttributesClassList -> Bool
$c/= :: V1beta1VolumeAttributesClassList
-> V1beta1VolumeAttributesClassList -> Bool
/= :: V1beta1VolumeAttributesClassList
-> V1beta1VolumeAttributesClassList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V1beta1VolumeAttributesClassList
instance A.FromJSON V1beta1VolumeAttributesClassList where
  parseJSON :: Value -> Parser V1beta1VolumeAttributesClassList
parseJSON = String
-> (Object -> Parser V1beta1VolumeAttributesClassList)
-> Value
-> Parser V1beta1VolumeAttributesClassList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V1beta1VolumeAttributesClassList" ((Object -> Parser V1beta1VolumeAttributesClassList)
 -> Value -> Parser V1beta1VolumeAttributesClassList)
-> (Object -> Parser V1beta1VolumeAttributesClassList)
-> Value
-> Parser V1beta1VolumeAttributesClassList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V1beta1VolumeAttributesClass]
-> Maybe Text
-> Maybe V1ListMeta
-> V1beta1VolumeAttributesClassList
V1beta1VolumeAttributesClassList
      (Maybe Text
 -> [V1beta1VolumeAttributesClass]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V1beta1VolumeAttributesClassList)
-> Parser (Maybe Text)
-> Parser
     ([V1beta1VolumeAttributesClass]
      -> Maybe Text
      -> Maybe V1ListMeta
      -> V1beta1VolumeAttributesClassList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V1beta1VolumeAttributesClass]
   -> Maybe Text
   -> Maybe V1ListMeta
   -> V1beta1VolumeAttributesClassList)
-> Parser [V1beta1VolumeAttributesClass]
-> Parser
     (Maybe Text
      -> Maybe V1ListMeta -> V1beta1VolumeAttributesClassList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V1beta1VolumeAttributesClass]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser
  (Maybe Text
   -> Maybe V1ListMeta -> V1beta1VolumeAttributesClassList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V1beta1VolumeAttributesClassList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V1beta1VolumeAttributesClassList)
-> Parser (Maybe V1ListMeta)
-> Parser V1beta1VolumeAttributesClassList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V1beta1VolumeAttributesClassList
instance A.ToJSON V1beta1VolumeAttributesClassList where
  toJSON :: V1beta1VolumeAttributesClassList -> Value
toJSON V1beta1VolumeAttributesClassList {[V1beta1VolumeAttributesClass]
Maybe Text
Maybe V1ListMeta
$sel:v1beta1VolumeAttributesClassListApiVersion:V1beta1VolumeAttributesClassList :: V1beta1VolumeAttributesClassList -> Maybe Text
$sel:v1beta1VolumeAttributesClassListItems:V1beta1VolumeAttributesClassList :: V1beta1VolumeAttributesClassList -> [V1beta1VolumeAttributesClass]
$sel:v1beta1VolumeAttributesClassListKind:V1beta1VolumeAttributesClassList :: V1beta1VolumeAttributesClassList -> Maybe Text
$sel:v1beta1VolumeAttributesClassListMetadata:V1beta1VolumeAttributesClassList :: V1beta1VolumeAttributesClassList -> Maybe V1ListMeta
v1beta1VolumeAttributesClassListApiVersion :: Maybe Text
v1beta1VolumeAttributesClassListItems :: [V1beta1VolumeAttributesClass]
v1beta1VolumeAttributesClassListKind :: Maybe Text
v1beta1VolumeAttributesClassListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1VolumeAttributesClassListApiVersion
      , Key
"items" Key -> [V1beta1VolumeAttributesClass] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V1beta1VolumeAttributesClass]
v1beta1VolumeAttributesClassListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v1beta1VolumeAttributesClassListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v1beta1VolumeAttributesClassListMetadata
      ]


-- | Construct a value of type 'V1beta1VolumeAttributesClassList' (by applying it's required fields, if any)
mkV1beta1VolumeAttributesClassList
  :: [V1beta1VolumeAttributesClass] -- ^ 'v1beta1VolumeAttributesClassListItems': items is the list of VolumeAttributesClass objects.
  -> V1beta1VolumeAttributesClassList
mkV1beta1VolumeAttributesClassList :: [V1beta1VolumeAttributesClass] -> V1beta1VolumeAttributesClassList
mkV1beta1VolumeAttributesClassList [V1beta1VolumeAttributesClass]
v1beta1VolumeAttributesClassListItems =
  V1beta1VolumeAttributesClassList
  { $sel:v1beta1VolumeAttributesClassListApiVersion:V1beta1VolumeAttributesClassList :: Maybe Text
v1beta1VolumeAttributesClassListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V1beta1VolumeAttributesClass]
$sel:v1beta1VolumeAttributesClassListItems:V1beta1VolumeAttributesClassList :: [V1beta1VolumeAttributesClass]
v1beta1VolumeAttributesClassListItems :: [V1beta1VolumeAttributesClass]
v1beta1VolumeAttributesClassListItems
  , $sel:v1beta1VolumeAttributesClassListKind:V1beta1VolumeAttributesClassList :: Maybe Text
v1beta1VolumeAttributesClassListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v1beta1VolumeAttributesClassListMetadata:V1beta1VolumeAttributesClassList :: Maybe V1ListMeta
v1beta1VolumeAttributesClassListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V2ContainerResourceMetricSource
-- | V2ContainerResourceMetricSource
-- ContainerResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory).  The values will be averaged together before being compared to the target.  Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.  Only one \"target\" type should be set.
data V2ContainerResourceMetricSource = V2ContainerResourceMetricSource
  { V2ContainerResourceMetricSource -> Text
v2ContainerResourceMetricSourceContainer :: !(Text) -- ^ /Required/ "container" - container is the name of the container in the pods of the scaling target
  , V2ContainerResourceMetricSource -> Text
v2ContainerResourceMetricSourceName :: !(Text) -- ^ /Required/ "name" - name is the name of the resource in question.
  , V2ContainerResourceMetricSource -> V2MetricTarget
v2ContainerResourceMetricSourceTarget :: !(V2MetricTarget) -- ^ /Required/ "target"
  } deriving (Int -> V2ContainerResourceMetricSource -> ShowS
[V2ContainerResourceMetricSource] -> ShowS
V2ContainerResourceMetricSource -> String
(Int -> V2ContainerResourceMetricSource -> ShowS)
-> (V2ContainerResourceMetricSource -> String)
-> ([V2ContainerResourceMetricSource] -> ShowS)
-> Show V2ContainerResourceMetricSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V2ContainerResourceMetricSource -> ShowS
showsPrec :: Int -> V2ContainerResourceMetricSource -> ShowS
$cshow :: V2ContainerResourceMetricSource -> String
show :: V2ContainerResourceMetricSource -> String
$cshowList :: [V2ContainerResourceMetricSource] -> ShowS
showList :: [V2ContainerResourceMetricSource] -> ShowS
P.Show, V2ContainerResourceMetricSource
-> V2ContainerResourceMetricSource -> Bool
(V2ContainerResourceMetricSource
 -> V2ContainerResourceMetricSource -> Bool)
-> (V2ContainerResourceMetricSource
    -> V2ContainerResourceMetricSource -> Bool)
-> Eq V2ContainerResourceMetricSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V2ContainerResourceMetricSource
-> V2ContainerResourceMetricSource -> Bool
== :: V2ContainerResourceMetricSource
-> V2ContainerResourceMetricSource -> Bool
$c/= :: V2ContainerResourceMetricSource
-> V2ContainerResourceMetricSource -> Bool
/= :: V2ContainerResourceMetricSource
-> V2ContainerResourceMetricSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V2ContainerResourceMetricSource
instance A.FromJSON V2ContainerResourceMetricSource where
  parseJSON :: Value -> Parser V2ContainerResourceMetricSource
parseJSON = String
-> (Object -> Parser V2ContainerResourceMetricSource)
-> Value
-> Parser V2ContainerResourceMetricSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V2ContainerResourceMetricSource" ((Object -> Parser V2ContainerResourceMetricSource)
 -> Value -> Parser V2ContainerResourceMetricSource)
-> (Object -> Parser V2ContainerResourceMetricSource)
-> Value
-> Parser V2ContainerResourceMetricSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Text -> V2MetricTarget -> V2ContainerResourceMetricSource
V2ContainerResourceMetricSource
      (Text -> Text -> V2MetricTarget -> V2ContainerResourceMetricSource)
-> Parser Text
-> Parser
     (Text -> V2MetricTarget -> V2ContainerResourceMetricSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"container")
      Parser (Text -> V2MetricTarget -> V2ContainerResourceMetricSource)
-> Parser Text
-> Parser (V2MetricTarget -> V2ContainerResourceMetricSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser (V2MetricTarget -> V2ContainerResourceMetricSource)
-> Parser V2MetricTarget -> Parser V2ContainerResourceMetricSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V2MetricTarget
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"target")

-- | ToJSON V2ContainerResourceMetricSource
instance A.ToJSON V2ContainerResourceMetricSource where
  toJSON :: V2ContainerResourceMetricSource -> Value
toJSON V2ContainerResourceMetricSource {Text
V2MetricTarget
$sel:v2ContainerResourceMetricSourceContainer:V2ContainerResourceMetricSource :: V2ContainerResourceMetricSource -> Text
$sel:v2ContainerResourceMetricSourceName:V2ContainerResourceMetricSource :: V2ContainerResourceMetricSource -> Text
$sel:v2ContainerResourceMetricSourceTarget:V2ContainerResourceMetricSource :: V2ContainerResourceMetricSource -> V2MetricTarget
v2ContainerResourceMetricSourceContainer :: Text
v2ContainerResourceMetricSourceName :: Text
v2ContainerResourceMetricSourceTarget :: V2MetricTarget
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"container" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v2ContainerResourceMetricSourceContainer
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v2ContainerResourceMetricSourceName
      , Key
"target" Key -> V2MetricTarget -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V2MetricTarget
v2ContainerResourceMetricSourceTarget
      ]


-- | Construct a value of type 'V2ContainerResourceMetricSource' (by applying it's required fields, if any)
mkV2ContainerResourceMetricSource
  :: Text -- ^ 'v2ContainerResourceMetricSourceContainer': container is the name of the container in the pods of the scaling target
  -> Text -- ^ 'v2ContainerResourceMetricSourceName': name is the name of the resource in question.
  -> V2MetricTarget -- ^ 'v2ContainerResourceMetricSourceTarget' 
  -> V2ContainerResourceMetricSource
mkV2ContainerResourceMetricSource :: Text -> Text -> V2MetricTarget -> V2ContainerResourceMetricSource
mkV2ContainerResourceMetricSource Text
v2ContainerResourceMetricSourceContainer Text
v2ContainerResourceMetricSourceName V2MetricTarget
v2ContainerResourceMetricSourceTarget =
  V2ContainerResourceMetricSource
  { Text
$sel:v2ContainerResourceMetricSourceContainer:V2ContainerResourceMetricSource :: Text
v2ContainerResourceMetricSourceContainer :: Text
v2ContainerResourceMetricSourceContainer
  , Text
$sel:v2ContainerResourceMetricSourceName:V2ContainerResourceMetricSource :: Text
v2ContainerResourceMetricSourceName :: Text
v2ContainerResourceMetricSourceName
  , V2MetricTarget
$sel:v2ContainerResourceMetricSourceTarget:V2ContainerResourceMetricSource :: V2MetricTarget
v2ContainerResourceMetricSourceTarget :: V2MetricTarget
v2ContainerResourceMetricSourceTarget
  }

-- ** V2ContainerResourceMetricStatus
-- | V2ContainerResourceMetricStatus
-- ContainerResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing a single container in each pod in the current scale target (e.g. CPU or memory).  Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.
data V2ContainerResourceMetricStatus = V2ContainerResourceMetricStatus
  { V2ContainerResourceMetricStatus -> Text
v2ContainerResourceMetricStatusContainer :: !(Text) -- ^ /Required/ "container" - container is the name of the container in the pods of the scaling target
  , V2ContainerResourceMetricStatus -> V2MetricValueStatus
v2ContainerResourceMetricStatusCurrent :: !(V2MetricValueStatus) -- ^ /Required/ "current"
  , V2ContainerResourceMetricStatus -> Text
v2ContainerResourceMetricStatusName :: !(Text) -- ^ /Required/ "name" - name is the name of the resource in question.
  } deriving (Int -> V2ContainerResourceMetricStatus -> ShowS
[V2ContainerResourceMetricStatus] -> ShowS
V2ContainerResourceMetricStatus -> String
(Int -> V2ContainerResourceMetricStatus -> ShowS)
-> (V2ContainerResourceMetricStatus -> String)
-> ([V2ContainerResourceMetricStatus] -> ShowS)
-> Show V2ContainerResourceMetricStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V2ContainerResourceMetricStatus -> ShowS
showsPrec :: Int -> V2ContainerResourceMetricStatus -> ShowS
$cshow :: V2ContainerResourceMetricStatus -> String
show :: V2ContainerResourceMetricStatus -> String
$cshowList :: [V2ContainerResourceMetricStatus] -> ShowS
showList :: [V2ContainerResourceMetricStatus] -> ShowS
P.Show, V2ContainerResourceMetricStatus
-> V2ContainerResourceMetricStatus -> Bool
(V2ContainerResourceMetricStatus
 -> V2ContainerResourceMetricStatus -> Bool)
-> (V2ContainerResourceMetricStatus
    -> V2ContainerResourceMetricStatus -> Bool)
-> Eq V2ContainerResourceMetricStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V2ContainerResourceMetricStatus
-> V2ContainerResourceMetricStatus -> Bool
== :: V2ContainerResourceMetricStatus
-> V2ContainerResourceMetricStatus -> Bool
$c/= :: V2ContainerResourceMetricStatus
-> V2ContainerResourceMetricStatus -> Bool
/= :: V2ContainerResourceMetricStatus
-> V2ContainerResourceMetricStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V2ContainerResourceMetricStatus
instance A.FromJSON V2ContainerResourceMetricStatus where
  parseJSON :: Value -> Parser V2ContainerResourceMetricStatus
parseJSON = String
-> (Object -> Parser V2ContainerResourceMetricStatus)
-> Value
-> Parser V2ContainerResourceMetricStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V2ContainerResourceMetricStatus" ((Object -> Parser V2ContainerResourceMetricStatus)
 -> Value -> Parser V2ContainerResourceMetricStatus)
-> (Object -> Parser V2ContainerResourceMetricStatus)
-> Value
-> Parser V2ContainerResourceMetricStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text
-> V2MetricValueStatus -> Text -> V2ContainerResourceMetricStatus
V2ContainerResourceMetricStatus
      (Text
 -> V2MetricValueStatus -> Text -> V2ContainerResourceMetricStatus)
-> Parser Text
-> Parser
     (V2MetricValueStatus -> Text -> V2ContainerResourceMetricStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"container")
      Parser
  (V2MetricValueStatus -> Text -> V2ContainerResourceMetricStatus)
-> Parser V2MetricValueStatus
-> Parser (Text -> V2ContainerResourceMetricStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V2MetricValueStatus
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"current")
      Parser (Text -> V2ContainerResourceMetricStatus)
-> Parser Text -> Parser V2ContainerResourceMetricStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")

-- | ToJSON V2ContainerResourceMetricStatus
instance A.ToJSON V2ContainerResourceMetricStatus where
  toJSON :: V2ContainerResourceMetricStatus -> Value
toJSON V2ContainerResourceMetricStatus {Text
V2MetricValueStatus
$sel:v2ContainerResourceMetricStatusContainer:V2ContainerResourceMetricStatus :: V2ContainerResourceMetricStatus -> Text
$sel:v2ContainerResourceMetricStatusCurrent:V2ContainerResourceMetricStatus :: V2ContainerResourceMetricStatus -> V2MetricValueStatus
$sel:v2ContainerResourceMetricStatusName:V2ContainerResourceMetricStatus :: V2ContainerResourceMetricStatus -> Text
v2ContainerResourceMetricStatusContainer :: Text
v2ContainerResourceMetricStatusCurrent :: V2MetricValueStatus
v2ContainerResourceMetricStatusName :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"container" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v2ContainerResourceMetricStatusContainer
      , Key
"current" Key -> V2MetricValueStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V2MetricValueStatus
v2ContainerResourceMetricStatusCurrent
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v2ContainerResourceMetricStatusName
      ]


-- | Construct a value of type 'V2ContainerResourceMetricStatus' (by applying it's required fields, if any)
mkV2ContainerResourceMetricStatus
  :: Text -- ^ 'v2ContainerResourceMetricStatusContainer': container is the name of the container in the pods of the scaling target
  -> V2MetricValueStatus -- ^ 'v2ContainerResourceMetricStatusCurrent' 
  -> Text -- ^ 'v2ContainerResourceMetricStatusName': name is the name of the resource in question.
  -> V2ContainerResourceMetricStatus
mkV2ContainerResourceMetricStatus :: Text
-> V2MetricValueStatus -> Text -> V2ContainerResourceMetricStatus
mkV2ContainerResourceMetricStatus Text
v2ContainerResourceMetricStatusContainer V2MetricValueStatus
v2ContainerResourceMetricStatusCurrent Text
v2ContainerResourceMetricStatusName =
  V2ContainerResourceMetricStatus
  { Text
$sel:v2ContainerResourceMetricStatusContainer:V2ContainerResourceMetricStatus :: Text
v2ContainerResourceMetricStatusContainer :: Text
v2ContainerResourceMetricStatusContainer
  , V2MetricValueStatus
$sel:v2ContainerResourceMetricStatusCurrent:V2ContainerResourceMetricStatus :: V2MetricValueStatus
v2ContainerResourceMetricStatusCurrent :: V2MetricValueStatus
v2ContainerResourceMetricStatusCurrent
  , Text
$sel:v2ContainerResourceMetricStatusName:V2ContainerResourceMetricStatus :: Text
v2ContainerResourceMetricStatusName :: Text
v2ContainerResourceMetricStatusName
  }

-- ** V2CrossVersionObjectReference
-- | V2CrossVersionObjectReference
-- CrossVersionObjectReference contains enough information to let you identify the referred resource.
data V2CrossVersionObjectReference = V2CrossVersionObjectReference
  { V2CrossVersionObjectReference -> Maybe Text
v2CrossVersionObjectReferenceApiVersion :: !(Maybe Text) -- ^ "apiVersion" - apiVersion is the API version of the referent
  , V2CrossVersionObjectReference -> Text
v2CrossVersionObjectReferenceKind :: !(Text) -- ^ /Required/ "kind" - kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V2CrossVersionObjectReference -> Text
v2CrossVersionObjectReferenceName :: !(Text) -- ^ /Required/ "name" - name is the name of the referent; More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  } deriving (Int -> V2CrossVersionObjectReference -> ShowS
[V2CrossVersionObjectReference] -> ShowS
V2CrossVersionObjectReference -> String
(Int -> V2CrossVersionObjectReference -> ShowS)
-> (V2CrossVersionObjectReference -> String)
-> ([V2CrossVersionObjectReference] -> ShowS)
-> Show V2CrossVersionObjectReference
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V2CrossVersionObjectReference -> ShowS
showsPrec :: Int -> V2CrossVersionObjectReference -> ShowS
$cshow :: V2CrossVersionObjectReference -> String
show :: V2CrossVersionObjectReference -> String
$cshowList :: [V2CrossVersionObjectReference] -> ShowS
showList :: [V2CrossVersionObjectReference] -> ShowS
P.Show, V2CrossVersionObjectReference
-> V2CrossVersionObjectReference -> Bool
(V2CrossVersionObjectReference
 -> V2CrossVersionObjectReference -> Bool)
-> (V2CrossVersionObjectReference
    -> V2CrossVersionObjectReference -> Bool)
-> Eq V2CrossVersionObjectReference
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V2CrossVersionObjectReference
-> V2CrossVersionObjectReference -> Bool
== :: V2CrossVersionObjectReference
-> V2CrossVersionObjectReference -> Bool
$c/= :: V2CrossVersionObjectReference
-> V2CrossVersionObjectReference -> Bool
/= :: V2CrossVersionObjectReference
-> V2CrossVersionObjectReference -> Bool
P.Eq, P.Typeable)

-- | FromJSON V2CrossVersionObjectReference
instance A.FromJSON V2CrossVersionObjectReference where
  parseJSON :: Value -> Parser V2CrossVersionObjectReference
parseJSON = String
-> (Object -> Parser V2CrossVersionObjectReference)
-> Value
-> Parser V2CrossVersionObjectReference
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V2CrossVersionObjectReference" ((Object -> Parser V2CrossVersionObjectReference)
 -> Value -> Parser V2CrossVersionObjectReference)
-> (Object -> Parser V2CrossVersionObjectReference)
-> Value
-> Parser V2CrossVersionObjectReference
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text -> Text -> Text -> V2CrossVersionObjectReference
V2CrossVersionObjectReference
      (Maybe Text -> Text -> Text -> V2CrossVersionObjectReference)
-> Parser (Maybe Text)
-> Parser (Text -> Text -> V2CrossVersionObjectReference)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser (Text -> Text -> V2CrossVersionObjectReference)
-> Parser Text -> Parser (Text -> V2CrossVersionObjectReference)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"kind")
      Parser (Text -> V2CrossVersionObjectReference)
-> Parser Text -> Parser V2CrossVersionObjectReference
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")

-- | ToJSON V2CrossVersionObjectReference
instance A.ToJSON V2CrossVersionObjectReference where
  toJSON :: V2CrossVersionObjectReference -> Value
toJSON V2CrossVersionObjectReference {Maybe Text
Text
$sel:v2CrossVersionObjectReferenceApiVersion:V2CrossVersionObjectReference :: V2CrossVersionObjectReference -> Maybe Text
$sel:v2CrossVersionObjectReferenceKind:V2CrossVersionObjectReference :: V2CrossVersionObjectReference -> Text
$sel:v2CrossVersionObjectReferenceName:V2CrossVersionObjectReference :: V2CrossVersionObjectReference -> Text
v2CrossVersionObjectReferenceApiVersion :: Maybe Text
v2CrossVersionObjectReferenceKind :: Text
v2CrossVersionObjectReferenceName :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v2CrossVersionObjectReferenceApiVersion
      , Key
"kind" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v2CrossVersionObjectReferenceKind
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v2CrossVersionObjectReferenceName
      ]


-- | Construct a value of type 'V2CrossVersionObjectReference' (by applying it's required fields, if any)
mkV2CrossVersionObjectReference
  :: Text -- ^ 'v2CrossVersionObjectReferenceKind': kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  -> Text -- ^ 'v2CrossVersionObjectReferenceName': name is the name of the referent; More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  -> V2CrossVersionObjectReference
mkV2CrossVersionObjectReference :: Text -> Text -> V2CrossVersionObjectReference
mkV2CrossVersionObjectReference Text
v2CrossVersionObjectReferenceKind Text
v2CrossVersionObjectReferenceName =
  V2CrossVersionObjectReference
  { $sel:v2CrossVersionObjectReferenceApiVersion:V2CrossVersionObjectReference :: Maybe Text
v2CrossVersionObjectReferenceApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v2CrossVersionObjectReferenceKind:V2CrossVersionObjectReference :: Text
v2CrossVersionObjectReferenceKind :: Text
v2CrossVersionObjectReferenceKind
  , Text
$sel:v2CrossVersionObjectReferenceName:V2CrossVersionObjectReference :: Text
v2CrossVersionObjectReferenceName :: Text
v2CrossVersionObjectReferenceName
  }

-- ** V2ExternalMetricSource
-- | V2ExternalMetricSource
-- ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).
data V2ExternalMetricSource = V2ExternalMetricSource
  { V2ExternalMetricSource -> V2MetricIdentifier
v2ExternalMetricSourceMetric :: !(V2MetricIdentifier) -- ^ /Required/ "metric"
  , V2ExternalMetricSource -> V2MetricTarget
v2ExternalMetricSourceTarget :: !(V2MetricTarget) -- ^ /Required/ "target"
  } deriving (Int -> V2ExternalMetricSource -> ShowS
[V2ExternalMetricSource] -> ShowS
V2ExternalMetricSource -> String
(Int -> V2ExternalMetricSource -> ShowS)
-> (V2ExternalMetricSource -> String)
-> ([V2ExternalMetricSource] -> ShowS)
-> Show V2ExternalMetricSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V2ExternalMetricSource -> ShowS
showsPrec :: Int -> V2ExternalMetricSource -> ShowS
$cshow :: V2ExternalMetricSource -> String
show :: V2ExternalMetricSource -> String
$cshowList :: [V2ExternalMetricSource] -> ShowS
showList :: [V2ExternalMetricSource] -> ShowS
P.Show, V2ExternalMetricSource -> V2ExternalMetricSource -> Bool
(V2ExternalMetricSource -> V2ExternalMetricSource -> Bool)
-> (V2ExternalMetricSource -> V2ExternalMetricSource -> Bool)
-> Eq V2ExternalMetricSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V2ExternalMetricSource -> V2ExternalMetricSource -> Bool
== :: V2ExternalMetricSource -> V2ExternalMetricSource -> Bool
$c/= :: V2ExternalMetricSource -> V2ExternalMetricSource -> Bool
/= :: V2ExternalMetricSource -> V2ExternalMetricSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V2ExternalMetricSource
instance A.FromJSON V2ExternalMetricSource where
  parseJSON :: Value -> Parser V2ExternalMetricSource
parseJSON = String
-> (Object -> Parser V2ExternalMetricSource)
-> Value
-> Parser V2ExternalMetricSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V2ExternalMetricSource" ((Object -> Parser V2ExternalMetricSource)
 -> Value -> Parser V2ExternalMetricSource)
-> (Object -> Parser V2ExternalMetricSource)
-> Value
-> Parser V2ExternalMetricSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    V2MetricIdentifier -> V2MetricTarget -> V2ExternalMetricSource
V2ExternalMetricSource
      (V2MetricIdentifier -> V2MetricTarget -> V2ExternalMetricSource)
-> Parser V2MetricIdentifier
-> Parser (V2MetricTarget -> V2ExternalMetricSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser V2MetricIdentifier
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"metric")
      Parser (V2MetricTarget -> V2ExternalMetricSource)
-> Parser V2MetricTarget -> Parser V2ExternalMetricSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V2MetricTarget
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"target")

-- | ToJSON V2ExternalMetricSource
instance A.ToJSON V2ExternalMetricSource where
  toJSON :: V2ExternalMetricSource -> Value
toJSON V2ExternalMetricSource {V2MetricTarget
V2MetricIdentifier
$sel:v2ExternalMetricSourceMetric:V2ExternalMetricSource :: V2ExternalMetricSource -> V2MetricIdentifier
$sel:v2ExternalMetricSourceTarget:V2ExternalMetricSource :: V2ExternalMetricSource -> V2MetricTarget
v2ExternalMetricSourceMetric :: V2MetricIdentifier
v2ExternalMetricSourceTarget :: V2MetricTarget
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"metric" Key -> V2MetricIdentifier -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V2MetricIdentifier
v2ExternalMetricSourceMetric
      , Key
"target" Key -> V2MetricTarget -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V2MetricTarget
v2ExternalMetricSourceTarget
      ]


-- | Construct a value of type 'V2ExternalMetricSource' (by applying it's required fields, if any)
mkV2ExternalMetricSource
  :: V2MetricIdentifier -- ^ 'v2ExternalMetricSourceMetric' 
  -> V2MetricTarget -- ^ 'v2ExternalMetricSourceTarget' 
  -> V2ExternalMetricSource
mkV2ExternalMetricSource :: V2MetricIdentifier -> V2MetricTarget -> V2ExternalMetricSource
mkV2ExternalMetricSource V2MetricIdentifier
v2ExternalMetricSourceMetric V2MetricTarget
v2ExternalMetricSourceTarget =
  V2ExternalMetricSource
  { V2MetricIdentifier
$sel:v2ExternalMetricSourceMetric:V2ExternalMetricSource :: V2MetricIdentifier
v2ExternalMetricSourceMetric :: V2MetricIdentifier
v2ExternalMetricSourceMetric
  , V2MetricTarget
$sel:v2ExternalMetricSourceTarget:V2ExternalMetricSource :: V2MetricTarget
v2ExternalMetricSourceTarget :: V2MetricTarget
v2ExternalMetricSourceTarget
  }

-- ** V2ExternalMetricStatus
-- | V2ExternalMetricStatus
-- ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.
data V2ExternalMetricStatus = V2ExternalMetricStatus
  { V2ExternalMetricStatus -> V2MetricValueStatus
v2ExternalMetricStatusCurrent :: !(V2MetricValueStatus) -- ^ /Required/ "current"
  , V2ExternalMetricStatus -> V2MetricIdentifier
v2ExternalMetricStatusMetric :: !(V2MetricIdentifier) -- ^ /Required/ "metric"
  } deriving (Int -> V2ExternalMetricStatus -> ShowS
[V2ExternalMetricStatus] -> ShowS
V2ExternalMetricStatus -> String
(Int -> V2ExternalMetricStatus -> ShowS)
-> (V2ExternalMetricStatus -> String)
-> ([V2ExternalMetricStatus] -> ShowS)
-> Show V2ExternalMetricStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V2ExternalMetricStatus -> ShowS
showsPrec :: Int -> V2ExternalMetricStatus -> ShowS
$cshow :: V2ExternalMetricStatus -> String
show :: V2ExternalMetricStatus -> String
$cshowList :: [V2ExternalMetricStatus] -> ShowS
showList :: [V2ExternalMetricStatus] -> ShowS
P.Show, V2ExternalMetricStatus -> V2ExternalMetricStatus -> Bool
(V2ExternalMetricStatus -> V2ExternalMetricStatus -> Bool)
-> (V2ExternalMetricStatus -> V2ExternalMetricStatus -> Bool)
-> Eq V2ExternalMetricStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V2ExternalMetricStatus -> V2ExternalMetricStatus -> Bool
== :: V2ExternalMetricStatus -> V2ExternalMetricStatus -> Bool
$c/= :: V2ExternalMetricStatus -> V2ExternalMetricStatus -> Bool
/= :: V2ExternalMetricStatus -> V2ExternalMetricStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V2ExternalMetricStatus
instance A.FromJSON V2ExternalMetricStatus where
  parseJSON :: Value -> Parser V2ExternalMetricStatus
parseJSON = String
-> (Object -> Parser V2ExternalMetricStatus)
-> Value
-> Parser V2ExternalMetricStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V2ExternalMetricStatus" ((Object -> Parser V2ExternalMetricStatus)
 -> Value -> Parser V2ExternalMetricStatus)
-> (Object -> Parser V2ExternalMetricStatus)
-> Value
-> Parser V2ExternalMetricStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    V2MetricValueStatus -> V2MetricIdentifier -> V2ExternalMetricStatus
V2ExternalMetricStatus
      (V2MetricValueStatus
 -> V2MetricIdentifier -> V2ExternalMetricStatus)
-> Parser V2MetricValueStatus
-> Parser (V2MetricIdentifier -> V2ExternalMetricStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser V2MetricValueStatus
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"current")
      Parser (V2MetricIdentifier -> V2ExternalMetricStatus)
-> Parser V2MetricIdentifier -> Parser V2ExternalMetricStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V2MetricIdentifier
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"metric")

-- | ToJSON V2ExternalMetricStatus
instance A.ToJSON V2ExternalMetricStatus where
  toJSON :: V2ExternalMetricStatus -> Value
toJSON V2ExternalMetricStatus {V2MetricValueStatus
V2MetricIdentifier
$sel:v2ExternalMetricStatusCurrent:V2ExternalMetricStatus :: V2ExternalMetricStatus -> V2MetricValueStatus
$sel:v2ExternalMetricStatusMetric:V2ExternalMetricStatus :: V2ExternalMetricStatus -> V2MetricIdentifier
v2ExternalMetricStatusCurrent :: V2MetricValueStatus
v2ExternalMetricStatusMetric :: V2MetricIdentifier
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"current" Key -> V2MetricValueStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V2MetricValueStatus
v2ExternalMetricStatusCurrent
      , Key
"metric" Key -> V2MetricIdentifier -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V2MetricIdentifier
v2ExternalMetricStatusMetric
      ]


-- | Construct a value of type 'V2ExternalMetricStatus' (by applying it's required fields, if any)
mkV2ExternalMetricStatus
  :: V2MetricValueStatus -- ^ 'v2ExternalMetricStatusCurrent' 
  -> V2MetricIdentifier -- ^ 'v2ExternalMetricStatusMetric' 
  -> V2ExternalMetricStatus
mkV2ExternalMetricStatus :: V2MetricValueStatus -> V2MetricIdentifier -> V2ExternalMetricStatus
mkV2ExternalMetricStatus V2MetricValueStatus
v2ExternalMetricStatusCurrent V2MetricIdentifier
v2ExternalMetricStatusMetric =
  V2ExternalMetricStatus
  { V2MetricValueStatus
$sel:v2ExternalMetricStatusCurrent:V2ExternalMetricStatus :: V2MetricValueStatus
v2ExternalMetricStatusCurrent :: V2MetricValueStatus
v2ExternalMetricStatusCurrent
  , V2MetricIdentifier
$sel:v2ExternalMetricStatusMetric:V2ExternalMetricStatus :: V2MetricIdentifier
v2ExternalMetricStatusMetric :: V2MetricIdentifier
v2ExternalMetricStatusMetric
  }

-- ** V2HPAScalingPolicy
-- | V2HPAScalingPolicy
-- HPAScalingPolicy is a single policy which must hold true for a specified past interval.
data V2HPAScalingPolicy = V2HPAScalingPolicy
  { V2HPAScalingPolicy -> Int
v2HPAScalingPolicyPeriodSeconds :: !(Int) -- ^ /Required/ "periodSeconds" - periodSeconds specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).
  , V2HPAScalingPolicy -> Text
v2HPAScalingPolicyType :: !(Text) -- ^ /Required/ "type" - type is used to specify the scaling policy.
  , V2HPAScalingPolicy -> Int
v2HPAScalingPolicyValue :: !(Int) -- ^ /Required/ "value" - value contains the amount of change which is permitted by the policy. It must be greater than zero
  } deriving (Int -> V2HPAScalingPolicy -> ShowS
[V2HPAScalingPolicy] -> ShowS
V2HPAScalingPolicy -> String
(Int -> V2HPAScalingPolicy -> ShowS)
-> (V2HPAScalingPolicy -> String)
-> ([V2HPAScalingPolicy] -> ShowS)
-> Show V2HPAScalingPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V2HPAScalingPolicy -> ShowS
showsPrec :: Int -> V2HPAScalingPolicy -> ShowS
$cshow :: V2HPAScalingPolicy -> String
show :: V2HPAScalingPolicy -> String
$cshowList :: [V2HPAScalingPolicy] -> ShowS
showList :: [V2HPAScalingPolicy] -> ShowS
P.Show, V2HPAScalingPolicy -> V2HPAScalingPolicy -> Bool
(V2HPAScalingPolicy -> V2HPAScalingPolicy -> Bool)
-> (V2HPAScalingPolicy -> V2HPAScalingPolicy -> Bool)
-> Eq V2HPAScalingPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V2HPAScalingPolicy -> V2HPAScalingPolicy -> Bool
== :: V2HPAScalingPolicy -> V2HPAScalingPolicy -> Bool
$c/= :: V2HPAScalingPolicy -> V2HPAScalingPolicy -> Bool
/= :: V2HPAScalingPolicy -> V2HPAScalingPolicy -> Bool
P.Eq, P.Typeable)

-- | FromJSON V2HPAScalingPolicy
instance A.FromJSON V2HPAScalingPolicy where
  parseJSON :: Value -> Parser V2HPAScalingPolicy
parseJSON = String
-> (Object -> Parser V2HPAScalingPolicy)
-> Value
-> Parser V2HPAScalingPolicy
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V2HPAScalingPolicy" ((Object -> Parser V2HPAScalingPolicy)
 -> Value -> Parser V2HPAScalingPolicy)
-> (Object -> Parser V2HPAScalingPolicy)
-> Value
-> Parser V2HPAScalingPolicy
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Int -> Text -> Int -> V2HPAScalingPolicy
V2HPAScalingPolicy
      (Int -> Text -> Int -> V2HPAScalingPolicy)
-> Parser Int -> Parser (Text -> Int -> V2HPAScalingPolicy)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"periodSeconds")
      Parser (Text -> Int -> V2HPAScalingPolicy)
-> Parser Text -> Parser (Int -> V2HPAScalingPolicy)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"type")
      Parser (Int -> V2HPAScalingPolicy)
-> Parser Int -> Parser V2HPAScalingPolicy
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"value")

-- | ToJSON V2HPAScalingPolicy
instance A.ToJSON V2HPAScalingPolicy where
  toJSON :: V2HPAScalingPolicy -> Value
toJSON V2HPAScalingPolicy {Int
Text
$sel:v2HPAScalingPolicyPeriodSeconds:V2HPAScalingPolicy :: V2HPAScalingPolicy -> Int
$sel:v2HPAScalingPolicyType:V2HPAScalingPolicy :: V2HPAScalingPolicy -> Text
$sel:v2HPAScalingPolicyValue:V2HPAScalingPolicy :: V2HPAScalingPolicy -> Int
v2HPAScalingPolicyPeriodSeconds :: Int
v2HPAScalingPolicyType :: Text
v2HPAScalingPolicyValue :: Int
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"periodSeconds" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v2HPAScalingPolicyPeriodSeconds
      , Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v2HPAScalingPolicyType
      , Key
"value" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v2HPAScalingPolicyValue
      ]


-- | Construct a value of type 'V2HPAScalingPolicy' (by applying it's required fields, if any)
mkV2HPAScalingPolicy
  :: Int -- ^ 'v2HPAScalingPolicyPeriodSeconds': periodSeconds specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).
  -> Text -- ^ 'v2HPAScalingPolicyType': type is used to specify the scaling policy.
  -> Int -- ^ 'v2HPAScalingPolicyValue': value contains the amount of change which is permitted by the policy. It must be greater than zero
  -> V2HPAScalingPolicy
mkV2HPAScalingPolicy :: Int -> Text -> Int -> V2HPAScalingPolicy
mkV2HPAScalingPolicy Int
v2HPAScalingPolicyPeriodSeconds Text
v2HPAScalingPolicyType Int
v2HPAScalingPolicyValue =
  V2HPAScalingPolicy
  { Int
$sel:v2HPAScalingPolicyPeriodSeconds:V2HPAScalingPolicy :: Int
v2HPAScalingPolicyPeriodSeconds :: Int
v2HPAScalingPolicyPeriodSeconds
  , Text
$sel:v2HPAScalingPolicyType:V2HPAScalingPolicy :: Text
v2HPAScalingPolicyType :: Text
v2HPAScalingPolicyType
  , Int
$sel:v2HPAScalingPolicyValue:V2HPAScalingPolicy :: Int
v2HPAScalingPolicyValue :: Int
v2HPAScalingPolicyValue
  }

-- ** V2HPAScalingRules
-- | V2HPAScalingRules
-- HPAScalingRules configures the scaling behavior for one direction. These Rules are applied after calculating DesiredReplicas from metrics for the HPA. They can limit the scaling velocity by specifying scaling policies. They can prevent flapping by specifying the stabilization window, so that the number of replicas is not set instantly, instead, the safest value from the stabilization window is chosen.
data V2HPAScalingRules = V2HPAScalingRules
  { V2HPAScalingRules -> Maybe [V2HPAScalingPolicy]
v2HPAScalingRulesPolicies :: !(Maybe [V2HPAScalingPolicy]) -- ^ "policies" - policies is a list of potential scaling polices which can be used during scaling. At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid
  , V2HPAScalingRules -> Maybe Text
v2HPAScalingRulesSelectPolicy :: !(Maybe Text) -- ^ "selectPolicy" - selectPolicy is used to specify which policy should be used. If not set, the default value Max is used.
  , V2HPAScalingRules -> Maybe Int
v2HPAScalingRulesStabilizationWindowSeconds :: !(Maybe Int) -- ^ "stabilizationWindowSeconds" - stabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long).
  } deriving (Int -> V2HPAScalingRules -> ShowS
[V2HPAScalingRules] -> ShowS
V2HPAScalingRules -> String
(Int -> V2HPAScalingRules -> ShowS)
-> (V2HPAScalingRules -> String)
-> ([V2HPAScalingRules] -> ShowS)
-> Show V2HPAScalingRules
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V2HPAScalingRules -> ShowS
showsPrec :: Int -> V2HPAScalingRules -> ShowS
$cshow :: V2HPAScalingRules -> String
show :: V2HPAScalingRules -> String
$cshowList :: [V2HPAScalingRules] -> ShowS
showList :: [V2HPAScalingRules] -> ShowS
P.Show, V2HPAScalingRules -> V2HPAScalingRules -> Bool
(V2HPAScalingRules -> V2HPAScalingRules -> Bool)
-> (V2HPAScalingRules -> V2HPAScalingRules -> Bool)
-> Eq V2HPAScalingRules
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V2HPAScalingRules -> V2HPAScalingRules -> Bool
== :: V2HPAScalingRules -> V2HPAScalingRules -> Bool
$c/= :: V2HPAScalingRules -> V2HPAScalingRules -> Bool
/= :: V2HPAScalingRules -> V2HPAScalingRules -> Bool
P.Eq, P.Typeable)

-- | FromJSON V2HPAScalingRules
instance A.FromJSON V2HPAScalingRules where
  parseJSON :: Value -> Parser V2HPAScalingRules
parseJSON = String
-> (Object -> Parser V2HPAScalingRules)
-> Value
-> Parser V2HPAScalingRules
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V2HPAScalingRules" ((Object -> Parser V2HPAScalingRules)
 -> Value -> Parser V2HPAScalingRules)
-> (Object -> Parser V2HPAScalingRules)
-> Value
-> Parser V2HPAScalingRules
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V2HPAScalingPolicy]
-> Maybe Text -> Maybe Int -> V2HPAScalingRules
V2HPAScalingRules
      (Maybe [V2HPAScalingPolicy]
 -> Maybe Text -> Maybe Int -> V2HPAScalingRules)
-> Parser (Maybe [V2HPAScalingPolicy])
-> Parser (Maybe Text -> Maybe Int -> V2HPAScalingRules)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [V2HPAScalingPolicy])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"policies")
      Parser (Maybe Text -> Maybe Int -> V2HPAScalingRules)
-> Parser (Maybe Text) -> Parser (Maybe Int -> V2HPAScalingRules)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"selectPolicy")
      Parser (Maybe Int -> V2HPAScalingRules)
-> Parser (Maybe Int) -> Parser V2HPAScalingRules
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"stabilizationWindowSeconds")

-- | ToJSON V2HPAScalingRules
instance A.ToJSON V2HPAScalingRules where
  toJSON :: V2HPAScalingRules -> Value
toJSON V2HPAScalingRules {Maybe Int
Maybe [V2HPAScalingPolicy]
Maybe Text
$sel:v2HPAScalingRulesPolicies:V2HPAScalingRules :: V2HPAScalingRules -> Maybe [V2HPAScalingPolicy]
$sel:v2HPAScalingRulesSelectPolicy:V2HPAScalingRules :: V2HPAScalingRules -> Maybe Text
$sel:v2HPAScalingRulesStabilizationWindowSeconds:V2HPAScalingRules :: V2HPAScalingRules -> Maybe Int
v2HPAScalingRulesPolicies :: Maybe [V2HPAScalingPolicy]
v2HPAScalingRulesSelectPolicy :: Maybe Text
v2HPAScalingRulesStabilizationWindowSeconds :: Maybe Int
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"policies" Key -> Maybe [V2HPAScalingPolicy] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V2HPAScalingPolicy]
v2HPAScalingRulesPolicies
      , Key
"selectPolicy" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v2HPAScalingRulesSelectPolicy
      , Key
"stabilizationWindowSeconds" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v2HPAScalingRulesStabilizationWindowSeconds
      ]


-- | Construct a value of type 'V2HPAScalingRules' (by applying it's required fields, if any)
mkV2HPAScalingRules
  :: V2HPAScalingRules
mkV2HPAScalingRules :: V2HPAScalingRules
mkV2HPAScalingRules =
  V2HPAScalingRules
  { $sel:v2HPAScalingRulesPolicies:V2HPAScalingRules :: Maybe [V2HPAScalingPolicy]
v2HPAScalingRulesPolicies = Maybe [V2HPAScalingPolicy]
forall a. Maybe a
Nothing
  , $sel:v2HPAScalingRulesSelectPolicy:V2HPAScalingRules :: Maybe Text
v2HPAScalingRulesSelectPolicy = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v2HPAScalingRulesStabilizationWindowSeconds:V2HPAScalingRules :: Maybe Int
v2HPAScalingRulesStabilizationWindowSeconds = Maybe Int
forall a. Maybe a
Nothing
  }

-- ** V2HorizontalPodAutoscaler
-- | V2HorizontalPodAutoscaler
-- HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.
data V2HorizontalPodAutoscaler = V2HorizontalPodAutoscaler
  { V2HorizontalPodAutoscaler -> Maybe Text
v2HorizontalPodAutoscalerApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V2HorizontalPodAutoscaler -> Maybe Text
v2HorizontalPodAutoscalerKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V2HorizontalPodAutoscaler -> Maybe V1ObjectMeta
v2HorizontalPodAutoscalerMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , V2HorizontalPodAutoscaler -> Maybe V2HorizontalPodAutoscalerSpec
v2HorizontalPodAutoscalerSpec :: !(Maybe V2HorizontalPodAutoscalerSpec) -- ^ "spec"
  , V2HorizontalPodAutoscaler -> Maybe V2HorizontalPodAutoscalerStatus
v2HorizontalPodAutoscalerStatus :: !(Maybe V2HorizontalPodAutoscalerStatus) -- ^ "status"
  } deriving (Int -> V2HorizontalPodAutoscaler -> ShowS
[V2HorizontalPodAutoscaler] -> ShowS
V2HorizontalPodAutoscaler -> String
(Int -> V2HorizontalPodAutoscaler -> ShowS)
-> (V2HorizontalPodAutoscaler -> String)
-> ([V2HorizontalPodAutoscaler] -> ShowS)
-> Show V2HorizontalPodAutoscaler
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V2HorizontalPodAutoscaler -> ShowS
showsPrec :: Int -> V2HorizontalPodAutoscaler -> ShowS
$cshow :: V2HorizontalPodAutoscaler -> String
show :: V2HorizontalPodAutoscaler -> String
$cshowList :: [V2HorizontalPodAutoscaler] -> ShowS
showList :: [V2HorizontalPodAutoscaler] -> ShowS
P.Show, V2HorizontalPodAutoscaler -> V2HorizontalPodAutoscaler -> Bool
(V2HorizontalPodAutoscaler -> V2HorizontalPodAutoscaler -> Bool)
-> (V2HorizontalPodAutoscaler -> V2HorizontalPodAutoscaler -> Bool)
-> Eq V2HorizontalPodAutoscaler
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V2HorizontalPodAutoscaler -> V2HorizontalPodAutoscaler -> Bool
== :: V2HorizontalPodAutoscaler -> V2HorizontalPodAutoscaler -> Bool
$c/= :: V2HorizontalPodAutoscaler -> V2HorizontalPodAutoscaler -> Bool
/= :: V2HorizontalPodAutoscaler -> V2HorizontalPodAutoscaler -> Bool
P.Eq, P.Typeable)

-- | FromJSON V2HorizontalPodAutoscaler
instance A.FromJSON V2HorizontalPodAutoscaler where
  parseJSON :: Value -> Parser V2HorizontalPodAutoscaler
parseJSON = String
-> (Object -> Parser V2HorizontalPodAutoscaler)
-> Value
-> Parser V2HorizontalPodAutoscaler
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V2HorizontalPodAutoscaler" ((Object -> Parser V2HorizontalPodAutoscaler)
 -> Value -> Parser V2HorizontalPodAutoscaler)
-> (Object -> Parser V2HorizontalPodAutoscaler)
-> Value
-> Parser V2HorizontalPodAutoscaler
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> Maybe Text
-> Maybe V1ObjectMeta
-> Maybe V2HorizontalPodAutoscalerSpec
-> Maybe V2HorizontalPodAutoscalerStatus
-> V2HorizontalPodAutoscaler
V2HorizontalPodAutoscaler
      (Maybe Text
 -> Maybe Text
 -> Maybe V1ObjectMeta
 -> Maybe V2HorizontalPodAutoscalerSpec
 -> Maybe V2HorizontalPodAutoscalerStatus
 -> V2HorizontalPodAutoscaler)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe V1ObjectMeta
      -> Maybe V2HorizontalPodAutoscalerSpec
      -> Maybe V2HorizontalPodAutoscalerStatus
      -> V2HorizontalPodAutoscaler)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  (Maybe Text
   -> Maybe V1ObjectMeta
   -> Maybe V2HorizontalPodAutoscalerSpec
   -> Maybe V2HorizontalPodAutoscalerStatus
   -> V2HorizontalPodAutoscaler)
-> Parser (Maybe Text)
-> Parser
     (Maybe V1ObjectMeta
      -> Maybe V2HorizontalPodAutoscalerSpec
      -> Maybe V2HorizontalPodAutoscalerStatus
      -> V2HorizontalPodAutoscaler)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser
  (Maybe V1ObjectMeta
   -> Maybe V2HorizontalPodAutoscalerSpec
   -> Maybe V2HorizontalPodAutoscalerStatus
   -> V2HorizontalPodAutoscaler)
-> Parser (Maybe V1ObjectMeta)
-> Parser
     (Maybe V2HorizontalPodAutoscalerSpec
      -> Maybe V2HorizontalPodAutoscalerStatus
      -> V2HorizontalPodAutoscaler)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ObjectMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
      Parser
  (Maybe V2HorizontalPodAutoscalerSpec
   -> Maybe V2HorizontalPodAutoscalerStatus
   -> V2HorizontalPodAutoscaler)
-> Parser (Maybe V2HorizontalPodAutoscalerSpec)
-> Parser
     (Maybe V2HorizontalPodAutoscalerStatus
      -> V2HorizontalPodAutoscaler)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V2HorizontalPodAutoscalerSpec)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"spec")
      Parser
  (Maybe V2HorizontalPodAutoscalerStatus
   -> V2HorizontalPodAutoscaler)
-> Parser (Maybe V2HorizontalPodAutoscalerStatus)
-> Parser V2HorizontalPodAutoscaler
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V2HorizontalPodAutoscalerStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")

-- | ToJSON V2HorizontalPodAutoscaler
instance A.ToJSON V2HorizontalPodAutoscaler where
  toJSON :: V2HorizontalPodAutoscaler -> Value
toJSON V2HorizontalPodAutoscaler {Maybe Text
Maybe V2HorizontalPodAutoscalerStatus
Maybe V2HorizontalPodAutoscalerSpec
Maybe V1ObjectMeta
$sel:v2HorizontalPodAutoscalerApiVersion:V2HorizontalPodAutoscaler :: V2HorizontalPodAutoscaler -> Maybe Text
$sel:v2HorizontalPodAutoscalerKind:V2HorizontalPodAutoscaler :: V2HorizontalPodAutoscaler -> Maybe Text
$sel:v2HorizontalPodAutoscalerMetadata:V2HorizontalPodAutoscaler :: V2HorizontalPodAutoscaler -> Maybe V1ObjectMeta
$sel:v2HorizontalPodAutoscalerSpec:V2HorizontalPodAutoscaler :: V2HorizontalPodAutoscaler -> Maybe V2HorizontalPodAutoscalerSpec
$sel:v2HorizontalPodAutoscalerStatus:V2HorizontalPodAutoscaler :: V2HorizontalPodAutoscaler -> Maybe V2HorizontalPodAutoscalerStatus
v2HorizontalPodAutoscalerApiVersion :: Maybe Text
v2HorizontalPodAutoscalerKind :: Maybe Text
v2HorizontalPodAutoscalerMetadata :: Maybe V1ObjectMeta
v2HorizontalPodAutoscalerSpec :: Maybe V2HorizontalPodAutoscalerSpec
v2HorizontalPodAutoscalerStatus :: Maybe V2HorizontalPodAutoscalerStatus
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v2HorizontalPodAutoscalerApiVersion
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v2HorizontalPodAutoscalerKind
      , Key
"metadata" Key -> Maybe V1ObjectMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ObjectMeta
v2HorizontalPodAutoscalerMetadata
      , Key
"spec" Key -> Maybe V2HorizontalPodAutoscalerSpec -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V2HorizontalPodAutoscalerSpec
v2HorizontalPodAutoscalerSpec
      , Key
"status" Key -> Maybe V2HorizontalPodAutoscalerStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V2HorizontalPodAutoscalerStatus
v2HorizontalPodAutoscalerStatus
      ]


-- | Construct a value of type 'V2HorizontalPodAutoscaler' (by applying it's required fields, if any)
mkV2HorizontalPodAutoscaler
  :: V2HorizontalPodAutoscaler
mkV2HorizontalPodAutoscaler :: V2HorizontalPodAutoscaler
mkV2HorizontalPodAutoscaler =
  V2HorizontalPodAutoscaler
  { $sel:v2HorizontalPodAutoscalerApiVersion:V2HorizontalPodAutoscaler :: Maybe Text
v2HorizontalPodAutoscalerApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v2HorizontalPodAutoscalerKind:V2HorizontalPodAutoscaler :: Maybe Text
v2HorizontalPodAutoscalerKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v2HorizontalPodAutoscalerMetadata:V2HorizontalPodAutoscaler :: Maybe V1ObjectMeta
v2HorizontalPodAutoscalerMetadata = Maybe V1ObjectMeta
forall a. Maybe a
Nothing
  , $sel:v2HorizontalPodAutoscalerSpec:V2HorizontalPodAutoscaler :: Maybe V2HorizontalPodAutoscalerSpec
v2HorizontalPodAutoscalerSpec = Maybe V2HorizontalPodAutoscalerSpec
forall a. Maybe a
Nothing
  , $sel:v2HorizontalPodAutoscalerStatus:V2HorizontalPodAutoscaler :: Maybe V2HorizontalPodAutoscalerStatus
v2HorizontalPodAutoscalerStatus = Maybe V2HorizontalPodAutoscalerStatus
forall a. Maybe a
Nothing
  }

-- ** V2HorizontalPodAutoscalerBehavior
-- | V2HorizontalPodAutoscalerBehavior
-- HorizontalPodAutoscalerBehavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively).
data V2HorizontalPodAutoscalerBehavior = V2HorizontalPodAutoscalerBehavior
  { V2HorizontalPodAutoscalerBehavior -> Maybe V2HPAScalingRules
v2HorizontalPodAutoscalerBehaviorScaleDown :: !(Maybe V2HPAScalingRules) -- ^ "scaleDown"
  , V2HorizontalPodAutoscalerBehavior -> Maybe V2HPAScalingRules
v2HorizontalPodAutoscalerBehaviorScaleUp :: !(Maybe V2HPAScalingRules) -- ^ "scaleUp"
  } deriving (Int -> V2HorizontalPodAutoscalerBehavior -> ShowS
[V2HorizontalPodAutoscalerBehavior] -> ShowS
V2HorizontalPodAutoscalerBehavior -> String
(Int -> V2HorizontalPodAutoscalerBehavior -> ShowS)
-> (V2HorizontalPodAutoscalerBehavior -> String)
-> ([V2HorizontalPodAutoscalerBehavior] -> ShowS)
-> Show V2HorizontalPodAutoscalerBehavior
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V2HorizontalPodAutoscalerBehavior -> ShowS
showsPrec :: Int -> V2HorizontalPodAutoscalerBehavior -> ShowS
$cshow :: V2HorizontalPodAutoscalerBehavior -> String
show :: V2HorizontalPodAutoscalerBehavior -> String
$cshowList :: [V2HorizontalPodAutoscalerBehavior] -> ShowS
showList :: [V2HorizontalPodAutoscalerBehavior] -> ShowS
P.Show, V2HorizontalPodAutoscalerBehavior
-> V2HorizontalPodAutoscalerBehavior -> Bool
(V2HorizontalPodAutoscalerBehavior
 -> V2HorizontalPodAutoscalerBehavior -> Bool)
-> (V2HorizontalPodAutoscalerBehavior
    -> V2HorizontalPodAutoscalerBehavior -> Bool)
-> Eq V2HorizontalPodAutoscalerBehavior
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V2HorizontalPodAutoscalerBehavior
-> V2HorizontalPodAutoscalerBehavior -> Bool
== :: V2HorizontalPodAutoscalerBehavior
-> V2HorizontalPodAutoscalerBehavior -> Bool
$c/= :: V2HorizontalPodAutoscalerBehavior
-> V2HorizontalPodAutoscalerBehavior -> Bool
/= :: V2HorizontalPodAutoscalerBehavior
-> V2HorizontalPodAutoscalerBehavior -> Bool
P.Eq, P.Typeable)

-- | FromJSON V2HorizontalPodAutoscalerBehavior
instance A.FromJSON V2HorizontalPodAutoscalerBehavior where
  parseJSON :: Value -> Parser V2HorizontalPodAutoscalerBehavior
parseJSON = String
-> (Object -> Parser V2HorizontalPodAutoscalerBehavior)
-> Value
-> Parser V2HorizontalPodAutoscalerBehavior
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V2HorizontalPodAutoscalerBehavior" ((Object -> Parser V2HorizontalPodAutoscalerBehavior)
 -> Value -> Parser V2HorizontalPodAutoscalerBehavior)
-> (Object -> Parser V2HorizontalPodAutoscalerBehavior)
-> Value
-> Parser V2HorizontalPodAutoscalerBehavior
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V2HPAScalingRules
-> Maybe V2HPAScalingRules -> V2HorizontalPodAutoscalerBehavior
V2HorizontalPodAutoscalerBehavior
      (Maybe V2HPAScalingRules
 -> Maybe V2HPAScalingRules -> V2HorizontalPodAutoscalerBehavior)
-> Parser (Maybe V2HPAScalingRules)
-> Parser
     (Maybe V2HPAScalingRules -> V2HorizontalPodAutoscalerBehavior)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V2HPAScalingRules)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"scaleDown")
      Parser
  (Maybe V2HPAScalingRules -> V2HorizontalPodAutoscalerBehavior)
-> Parser (Maybe V2HPAScalingRules)
-> Parser V2HorizontalPodAutoscalerBehavior
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V2HPAScalingRules)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"scaleUp")

-- | ToJSON V2HorizontalPodAutoscalerBehavior
instance A.ToJSON V2HorizontalPodAutoscalerBehavior where
  toJSON :: V2HorizontalPodAutoscalerBehavior -> Value
toJSON V2HorizontalPodAutoscalerBehavior {Maybe V2HPAScalingRules
$sel:v2HorizontalPodAutoscalerBehaviorScaleDown:V2HorizontalPodAutoscalerBehavior :: V2HorizontalPodAutoscalerBehavior -> Maybe V2HPAScalingRules
$sel:v2HorizontalPodAutoscalerBehaviorScaleUp:V2HorizontalPodAutoscalerBehavior :: V2HorizontalPodAutoscalerBehavior -> Maybe V2HPAScalingRules
v2HorizontalPodAutoscalerBehaviorScaleDown :: Maybe V2HPAScalingRules
v2HorizontalPodAutoscalerBehaviorScaleUp :: Maybe V2HPAScalingRules
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"scaleDown" Key -> Maybe V2HPAScalingRules -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V2HPAScalingRules
v2HorizontalPodAutoscalerBehaviorScaleDown
      , Key
"scaleUp" Key -> Maybe V2HPAScalingRules -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V2HPAScalingRules
v2HorizontalPodAutoscalerBehaviorScaleUp
      ]


-- | Construct a value of type 'V2HorizontalPodAutoscalerBehavior' (by applying it's required fields, if any)
mkV2HorizontalPodAutoscalerBehavior
  :: V2HorizontalPodAutoscalerBehavior
mkV2HorizontalPodAutoscalerBehavior :: V2HorizontalPodAutoscalerBehavior
mkV2HorizontalPodAutoscalerBehavior =
  V2HorizontalPodAutoscalerBehavior
  { $sel:v2HorizontalPodAutoscalerBehaviorScaleDown:V2HorizontalPodAutoscalerBehavior :: Maybe V2HPAScalingRules
v2HorizontalPodAutoscalerBehaviorScaleDown = Maybe V2HPAScalingRules
forall a. Maybe a
Nothing
  , $sel:v2HorizontalPodAutoscalerBehaviorScaleUp:V2HorizontalPodAutoscalerBehavior :: Maybe V2HPAScalingRules
v2HorizontalPodAutoscalerBehaviorScaleUp = Maybe V2HPAScalingRules
forall a. Maybe a
Nothing
  }

-- ** V2HorizontalPodAutoscalerCondition
-- | V2HorizontalPodAutoscalerCondition
-- HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.
data V2HorizontalPodAutoscalerCondition = V2HorizontalPodAutoscalerCondition
  { V2HorizontalPodAutoscalerCondition -> Maybe DateTime
v2HorizontalPodAutoscalerConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - lastTransitionTime is the last time the condition transitioned from one status to another
  , V2HorizontalPodAutoscalerCondition -> Maybe Text
v2HorizontalPodAutoscalerConditionMessage :: !(Maybe Text) -- ^ "message" - message is a human-readable explanation containing details about the transition
  , V2HorizontalPodAutoscalerCondition -> Maybe Text
v2HorizontalPodAutoscalerConditionReason :: !(Maybe Text) -- ^ "reason" - reason is the reason for the condition&#39;s last transition.
  , V2HorizontalPodAutoscalerCondition -> Text
v2HorizontalPodAutoscalerConditionStatus :: !(Text) -- ^ /Required/ "status" - status is the status of the condition (True, False, Unknown)
  , V2HorizontalPodAutoscalerCondition -> Text
v2HorizontalPodAutoscalerConditionType :: !(Text) -- ^ /Required/ "type" - type describes the current condition
  } deriving (Int -> V2HorizontalPodAutoscalerCondition -> ShowS
[V2HorizontalPodAutoscalerCondition] -> ShowS
V2HorizontalPodAutoscalerCondition -> String
(Int -> V2HorizontalPodAutoscalerCondition -> ShowS)
-> (V2HorizontalPodAutoscalerCondition -> String)
-> ([V2HorizontalPodAutoscalerCondition] -> ShowS)
-> Show V2HorizontalPodAutoscalerCondition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V2HorizontalPodAutoscalerCondition -> ShowS
showsPrec :: Int -> V2HorizontalPodAutoscalerCondition -> ShowS
$cshow :: V2HorizontalPodAutoscalerCondition -> String
show :: V2HorizontalPodAutoscalerCondition -> String
$cshowList :: [V2HorizontalPodAutoscalerCondition] -> ShowS
showList :: [V2HorizontalPodAutoscalerCondition] -> ShowS
P.Show, V2HorizontalPodAutoscalerCondition
-> V2HorizontalPodAutoscalerCondition -> Bool
(V2HorizontalPodAutoscalerCondition
 -> V2HorizontalPodAutoscalerCondition -> Bool)
-> (V2HorizontalPodAutoscalerCondition
    -> V2HorizontalPodAutoscalerCondition -> Bool)
-> Eq V2HorizontalPodAutoscalerCondition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V2HorizontalPodAutoscalerCondition
-> V2HorizontalPodAutoscalerCondition -> Bool
== :: V2HorizontalPodAutoscalerCondition
-> V2HorizontalPodAutoscalerCondition -> Bool
$c/= :: V2HorizontalPodAutoscalerCondition
-> V2HorizontalPodAutoscalerCondition -> Bool
/= :: V2HorizontalPodAutoscalerCondition
-> V2HorizontalPodAutoscalerCondition -> Bool
P.Eq, P.Typeable)

-- | FromJSON V2HorizontalPodAutoscalerCondition
instance A.FromJSON V2HorizontalPodAutoscalerCondition where
  parseJSON :: Value -> Parser V2HorizontalPodAutoscalerCondition
parseJSON = String
-> (Object -> Parser V2HorizontalPodAutoscalerCondition)
-> Value
-> Parser V2HorizontalPodAutoscalerCondition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V2HorizontalPodAutoscalerCondition" ((Object -> Parser V2HorizontalPodAutoscalerCondition)
 -> Value -> Parser V2HorizontalPodAutoscalerCondition)
-> (Object -> Parser V2HorizontalPodAutoscalerCondition)
-> Value
-> Parser V2HorizontalPodAutoscalerCondition
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe DateTime
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> V2HorizontalPodAutoscalerCondition
V2HorizontalPodAutoscalerCondition
      (Maybe DateTime
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> Text
 -> V2HorizontalPodAutoscalerCondition)
-> Parser (Maybe DateTime)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> V2HorizontalPodAutoscalerCondition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lastTransitionTime")
      Parser
  (Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> V2HorizontalPodAutoscalerCondition)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Text -> Text -> V2HorizontalPodAutoscalerCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"message")
      Parser
  (Maybe Text -> Text -> Text -> V2HorizontalPodAutoscalerCondition)
-> Parser (Maybe Text)
-> Parser (Text -> Text -> V2HorizontalPodAutoscalerCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"reason")
      Parser (Text -> Text -> V2HorizontalPodAutoscalerCondition)
-> Parser Text
-> Parser (Text -> V2HorizontalPodAutoscalerCondition)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"status")
      Parser (Text -> V2HorizontalPodAutoscalerCondition)
-> Parser Text -> Parser V2HorizontalPodAutoscalerCondition
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"type")

-- | ToJSON V2HorizontalPodAutoscalerCondition
instance A.ToJSON V2HorizontalPodAutoscalerCondition where
  toJSON :: V2HorizontalPodAutoscalerCondition -> Value
toJSON V2HorizontalPodAutoscalerCondition {Maybe Text
Maybe DateTime
Text
$sel:v2HorizontalPodAutoscalerConditionLastTransitionTime:V2HorizontalPodAutoscalerCondition :: V2HorizontalPodAutoscalerCondition -> Maybe DateTime
$sel:v2HorizontalPodAutoscalerConditionMessage:V2HorizontalPodAutoscalerCondition :: V2HorizontalPodAutoscalerCondition -> Maybe Text
$sel:v2HorizontalPodAutoscalerConditionReason:V2HorizontalPodAutoscalerCondition :: V2HorizontalPodAutoscalerCondition -> Maybe Text
$sel:v2HorizontalPodAutoscalerConditionStatus:V2HorizontalPodAutoscalerCondition :: V2HorizontalPodAutoscalerCondition -> Text
$sel:v2HorizontalPodAutoscalerConditionType:V2HorizontalPodAutoscalerCondition :: V2HorizontalPodAutoscalerCondition -> Text
v2HorizontalPodAutoscalerConditionLastTransitionTime :: Maybe DateTime
v2HorizontalPodAutoscalerConditionMessage :: Maybe Text
v2HorizontalPodAutoscalerConditionReason :: Maybe Text
v2HorizontalPodAutoscalerConditionStatus :: Text
v2HorizontalPodAutoscalerConditionType :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"lastTransitionTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v2HorizontalPodAutoscalerConditionLastTransitionTime
      , Key
"message" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v2HorizontalPodAutoscalerConditionMessage
      , Key
"reason" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v2HorizontalPodAutoscalerConditionReason
      , Key
"status" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v2HorizontalPodAutoscalerConditionStatus
      , Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v2HorizontalPodAutoscalerConditionType
      ]


-- | Construct a value of type 'V2HorizontalPodAutoscalerCondition' (by applying it's required fields, if any)
mkV2HorizontalPodAutoscalerCondition
  :: Text -- ^ 'v2HorizontalPodAutoscalerConditionStatus': status is the status of the condition (True, False, Unknown)
  -> Text -- ^ 'v2HorizontalPodAutoscalerConditionType': type describes the current condition
  -> V2HorizontalPodAutoscalerCondition
mkV2HorizontalPodAutoscalerCondition :: Text -> Text -> V2HorizontalPodAutoscalerCondition
mkV2HorizontalPodAutoscalerCondition Text
v2HorizontalPodAutoscalerConditionStatus Text
v2HorizontalPodAutoscalerConditionType =
  V2HorizontalPodAutoscalerCondition
  { $sel:v2HorizontalPodAutoscalerConditionLastTransitionTime:V2HorizontalPodAutoscalerCondition :: Maybe DateTime
v2HorizontalPodAutoscalerConditionLastTransitionTime = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v2HorizontalPodAutoscalerConditionMessage:V2HorizontalPodAutoscalerCondition :: Maybe Text
v2HorizontalPodAutoscalerConditionMessage = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v2HorizontalPodAutoscalerConditionReason:V2HorizontalPodAutoscalerCondition :: Maybe Text
v2HorizontalPodAutoscalerConditionReason = Maybe Text
forall a. Maybe a
Nothing
  , Text
$sel:v2HorizontalPodAutoscalerConditionStatus:V2HorizontalPodAutoscalerCondition :: Text
v2HorizontalPodAutoscalerConditionStatus :: Text
v2HorizontalPodAutoscalerConditionStatus
  , Text
$sel:v2HorizontalPodAutoscalerConditionType:V2HorizontalPodAutoscalerCondition :: Text
v2HorizontalPodAutoscalerConditionType :: Text
v2HorizontalPodAutoscalerConditionType
  }

-- ** V2HorizontalPodAutoscalerList
-- | V2HorizontalPodAutoscalerList
-- HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects.
data V2HorizontalPodAutoscalerList = V2HorizontalPodAutoscalerList
  { V2HorizontalPodAutoscalerList -> Maybe Text
v2HorizontalPodAutoscalerListApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  , V2HorizontalPodAutoscalerList -> [V2HorizontalPodAutoscaler]
v2HorizontalPodAutoscalerListItems :: !([V2HorizontalPodAutoscaler]) -- ^ /Required/ "items" - items is the list of horizontal pod autoscaler objects.
  , V2HorizontalPodAutoscalerList -> Maybe Text
v2HorizontalPodAutoscalerListKind :: !(Maybe Text) -- ^ "kind" - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  , V2HorizontalPodAutoscalerList -> Maybe V1ListMeta
v2HorizontalPodAutoscalerListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (Int -> V2HorizontalPodAutoscalerList -> ShowS
[V2HorizontalPodAutoscalerList] -> ShowS
V2HorizontalPodAutoscalerList -> String
(Int -> V2HorizontalPodAutoscalerList -> ShowS)
-> (V2HorizontalPodAutoscalerList -> String)
-> ([V2HorizontalPodAutoscalerList] -> ShowS)
-> Show V2HorizontalPodAutoscalerList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V2HorizontalPodAutoscalerList -> ShowS
showsPrec :: Int -> V2HorizontalPodAutoscalerList -> ShowS
$cshow :: V2HorizontalPodAutoscalerList -> String
show :: V2HorizontalPodAutoscalerList -> String
$cshowList :: [V2HorizontalPodAutoscalerList] -> ShowS
showList :: [V2HorizontalPodAutoscalerList] -> ShowS
P.Show, V2HorizontalPodAutoscalerList
-> V2HorizontalPodAutoscalerList -> Bool
(V2HorizontalPodAutoscalerList
 -> V2HorizontalPodAutoscalerList -> Bool)
-> (V2HorizontalPodAutoscalerList
    -> V2HorizontalPodAutoscalerList -> Bool)
-> Eq V2HorizontalPodAutoscalerList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V2HorizontalPodAutoscalerList
-> V2HorizontalPodAutoscalerList -> Bool
== :: V2HorizontalPodAutoscalerList
-> V2HorizontalPodAutoscalerList -> Bool
$c/= :: V2HorizontalPodAutoscalerList
-> V2HorizontalPodAutoscalerList -> Bool
/= :: V2HorizontalPodAutoscalerList
-> V2HorizontalPodAutoscalerList -> Bool
P.Eq, P.Typeable)

-- | FromJSON V2HorizontalPodAutoscalerList
instance A.FromJSON V2HorizontalPodAutoscalerList where
  parseJSON :: Value -> Parser V2HorizontalPodAutoscalerList
parseJSON = String
-> (Object -> Parser V2HorizontalPodAutoscalerList)
-> Value
-> Parser V2HorizontalPodAutoscalerList
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V2HorizontalPodAutoscalerList" ((Object -> Parser V2HorizontalPodAutoscalerList)
 -> Value -> Parser V2HorizontalPodAutoscalerList)
-> (Object -> Parser V2HorizontalPodAutoscalerList)
-> Value
-> Parser V2HorizontalPodAutoscalerList
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Text
-> [V2HorizontalPodAutoscaler]
-> Maybe Text
-> Maybe V1ListMeta
-> V2HorizontalPodAutoscalerList
V2HorizontalPodAutoscalerList
      (Maybe Text
 -> [V2HorizontalPodAutoscaler]
 -> Maybe Text
 -> Maybe V1ListMeta
 -> V2HorizontalPodAutoscalerList)
-> Parser (Maybe Text)
-> Parser
     ([V2HorizontalPodAutoscaler]
      -> Maybe Text -> Maybe V1ListMeta -> V2HorizontalPodAutoscalerList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"apiVersion")
      Parser
  ([V2HorizontalPodAutoscaler]
   -> Maybe Text -> Maybe V1ListMeta -> V2HorizontalPodAutoscalerList)
-> Parser [V2HorizontalPodAutoscaler]
-> Parser
     (Maybe Text -> Maybe V1ListMeta -> V2HorizontalPodAutoscalerList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [V2HorizontalPodAutoscaler]
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"items")
      Parser
  (Maybe Text -> Maybe V1ListMeta -> V2HorizontalPodAutoscalerList)
-> Parser (Maybe Text)
-> Parser (Maybe V1ListMeta -> V2HorizontalPodAutoscalerList)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"kind")
      Parser (Maybe V1ListMeta -> V2HorizontalPodAutoscalerList)
-> Parser (Maybe V1ListMeta)
-> Parser V2HorizontalPodAutoscalerList
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1ListMeta)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")

-- | ToJSON V2HorizontalPodAutoscalerList
instance A.ToJSON V2HorizontalPodAutoscalerList where
  toJSON :: V2HorizontalPodAutoscalerList -> Value
toJSON V2HorizontalPodAutoscalerList {[V2HorizontalPodAutoscaler]
Maybe Text
Maybe V1ListMeta
$sel:v2HorizontalPodAutoscalerListApiVersion:V2HorizontalPodAutoscalerList :: V2HorizontalPodAutoscalerList -> Maybe Text
$sel:v2HorizontalPodAutoscalerListItems:V2HorizontalPodAutoscalerList :: V2HorizontalPodAutoscalerList -> [V2HorizontalPodAutoscaler]
$sel:v2HorizontalPodAutoscalerListKind:V2HorizontalPodAutoscalerList :: V2HorizontalPodAutoscalerList -> Maybe Text
$sel:v2HorizontalPodAutoscalerListMetadata:V2HorizontalPodAutoscalerList :: V2HorizontalPodAutoscalerList -> Maybe V1ListMeta
v2HorizontalPodAutoscalerListApiVersion :: Maybe Text
v2HorizontalPodAutoscalerListItems :: [V2HorizontalPodAutoscaler]
v2HorizontalPodAutoscalerListKind :: Maybe Text
v2HorizontalPodAutoscalerListMetadata :: Maybe V1ListMeta
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"apiVersion" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v2HorizontalPodAutoscalerListApiVersion
      , Key
"items" Key -> [V2HorizontalPodAutoscaler] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= [V2HorizontalPodAutoscaler]
v2HorizontalPodAutoscalerListItems
      , Key
"kind" Key -> Maybe Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
v2HorizontalPodAutoscalerListKind
      , Key
"metadata" Key -> Maybe V1ListMeta -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1ListMeta
v2HorizontalPodAutoscalerListMetadata
      ]


-- | Construct a value of type 'V2HorizontalPodAutoscalerList' (by applying it's required fields, if any)
mkV2HorizontalPodAutoscalerList
  :: [V2HorizontalPodAutoscaler] -- ^ 'v2HorizontalPodAutoscalerListItems': items is the list of horizontal pod autoscaler objects.
  -> V2HorizontalPodAutoscalerList
mkV2HorizontalPodAutoscalerList :: [V2HorizontalPodAutoscaler] -> V2HorizontalPodAutoscalerList
mkV2HorizontalPodAutoscalerList [V2HorizontalPodAutoscaler]
v2HorizontalPodAutoscalerListItems =
  V2HorizontalPodAutoscalerList
  { $sel:v2HorizontalPodAutoscalerListApiVersion:V2HorizontalPodAutoscalerList :: Maybe Text
v2HorizontalPodAutoscalerListApiVersion = Maybe Text
forall a. Maybe a
Nothing
  , [V2HorizontalPodAutoscaler]
$sel:v2HorizontalPodAutoscalerListItems:V2HorizontalPodAutoscalerList :: [V2HorizontalPodAutoscaler]
v2HorizontalPodAutoscalerListItems :: [V2HorizontalPodAutoscaler]
v2HorizontalPodAutoscalerListItems
  , $sel:v2HorizontalPodAutoscalerListKind:V2HorizontalPodAutoscalerList :: Maybe Text
v2HorizontalPodAutoscalerListKind = Maybe Text
forall a. Maybe a
Nothing
  , $sel:v2HorizontalPodAutoscalerListMetadata:V2HorizontalPodAutoscalerList :: Maybe V1ListMeta
v2HorizontalPodAutoscalerListMetadata = Maybe V1ListMeta
forall a. Maybe a
Nothing
  }

-- ** V2HorizontalPodAutoscalerSpec
-- | V2HorizontalPodAutoscalerSpec
-- HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.
data V2HorizontalPodAutoscalerSpec = V2HorizontalPodAutoscalerSpec
  { V2HorizontalPodAutoscalerSpec
-> Maybe V2HorizontalPodAutoscalerBehavior
v2HorizontalPodAutoscalerSpecBehavior :: !(Maybe V2HorizontalPodAutoscalerBehavior) -- ^ "behavior"
  , V2HorizontalPodAutoscalerSpec -> Int
v2HorizontalPodAutoscalerSpecMaxReplicas :: !(Int) -- ^ /Required/ "maxReplicas" - maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas.
  , V2HorizontalPodAutoscalerSpec -> Maybe [V2MetricSpec]
v2HorizontalPodAutoscalerSpecMetrics :: !(Maybe [V2MetricSpec]) -- ^ "metrics" - metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used).  The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods.  Ergo, metrics used must decrease as the pod count is increased, and vice-versa.  See the individual metric source types for more information about how each type of metric must respond. If not set, the default metric will be set to 80% average CPU utilization.
  , V2HorizontalPodAutoscalerSpec -> Maybe Int
v2HorizontalPodAutoscalerSpecMinReplicas :: !(Maybe Int) -- ^ "minReplicas" - minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down.  It defaults to 1 pod.  minReplicas is allowed to be 0 if the alpha feature gate HPAScaleToZero is enabled and at least one Object or External metric is configured.  Scaling is active as long as at least one metric value is available.
  , V2HorizontalPodAutoscalerSpec -> V2CrossVersionObjectReference
v2HorizontalPodAutoscalerSpecScaleTargetRef :: !(V2CrossVersionObjectReference) -- ^ /Required/ "scaleTargetRef"
  } deriving (Int -> V2HorizontalPodAutoscalerSpec -> ShowS
[V2HorizontalPodAutoscalerSpec] -> ShowS
V2HorizontalPodAutoscalerSpec -> String
(Int -> V2HorizontalPodAutoscalerSpec -> ShowS)
-> (V2HorizontalPodAutoscalerSpec -> String)
-> ([V2HorizontalPodAutoscalerSpec] -> ShowS)
-> Show V2HorizontalPodAutoscalerSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V2HorizontalPodAutoscalerSpec -> ShowS
showsPrec :: Int -> V2HorizontalPodAutoscalerSpec -> ShowS
$cshow :: V2HorizontalPodAutoscalerSpec -> String
show :: V2HorizontalPodAutoscalerSpec -> String
$cshowList :: [V2HorizontalPodAutoscalerSpec] -> ShowS
showList :: [V2HorizontalPodAutoscalerSpec] -> ShowS
P.Show, V2HorizontalPodAutoscalerSpec
-> V2HorizontalPodAutoscalerSpec -> Bool
(V2HorizontalPodAutoscalerSpec
 -> V2HorizontalPodAutoscalerSpec -> Bool)
-> (V2HorizontalPodAutoscalerSpec
    -> V2HorizontalPodAutoscalerSpec -> Bool)
-> Eq V2HorizontalPodAutoscalerSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V2HorizontalPodAutoscalerSpec
-> V2HorizontalPodAutoscalerSpec -> Bool
== :: V2HorizontalPodAutoscalerSpec
-> V2HorizontalPodAutoscalerSpec -> Bool
$c/= :: V2HorizontalPodAutoscalerSpec
-> V2HorizontalPodAutoscalerSpec -> Bool
/= :: V2HorizontalPodAutoscalerSpec
-> V2HorizontalPodAutoscalerSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V2HorizontalPodAutoscalerSpec
instance A.FromJSON V2HorizontalPodAutoscalerSpec where
  parseJSON :: Value -> Parser V2HorizontalPodAutoscalerSpec
parseJSON = String
-> (Object -> Parser V2HorizontalPodAutoscalerSpec)
-> Value
-> Parser V2HorizontalPodAutoscalerSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V2HorizontalPodAutoscalerSpec" ((Object -> Parser V2HorizontalPodAutoscalerSpec)
 -> Value -> Parser V2HorizontalPodAutoscalerSpec)
-> (Object -> Parser V2HorizontalPodAutoscalerSpec)
-> Value
-> Parser V2HorizontalPodAutoscalerSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V2HorizontalPodAutoscalerBehavior
-> Int
-> Maybe [V2MetricSpec]
-> Maybe Int
-> V2CrossVersionObjectReference
-> V2HorizontalPodAutoscalerSpec
V2HorizontalPodAutoscalerSpec
      (Maybe V2HorizontalPodAutoscalerBehavior
 -> Int
 -> Maybe [V2MetricSpec]
 -> Maybe Int
 -> V2CrossVersionObjectReference
 -> V2HorizontalPodAutoscalerSpec)
-> Parser (Maybe V2HorizontalPodAutoscalerBehavior)
-> Parser
     (Int
      -> Maybe [V2MetricSpec]
      -> Maybe Int
      -> V2CrossVersionObjectReference
      -> V2HorizontalPodAutoscalerSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V2HorizontalPodAutoscalerBehavior)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"behavior")
      Parser
  (Int
   -> Maybe [V2MetricSpec]
   -> Maybe Int
   -> V2CrossVersionObjectReference
   -> V2HorizontalPodAutoscalerSpec)
-> Parser Int
-> Parser
     (Maybe [V2MetricSpec]
      -> Maybe Int
      -> V2CrossVersionObjectReference
      -> V2HorizontalPodAutoscalerSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"maxReplicas")
      Parser
  (Maybe [V2MetricSpec]
   -> Maybe Int
   -> V2CrossVersionObjectReference
   -> V2HorizontalPodAutoscalerSpec)
-> Parser (Maybe [V2MetricSpec])
-> Parser
     (Maybe Int
      -> V2CrossVersionObjectReference -> V2HorizontalPodAutoscalerSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V2MetricSpec])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metrics")
      Parser
  (Maybe Int
   -> V2CrossVersionObjectReference -> V2HorizontalPodAutoscalerSpec)
-> Parser (Maybe Int)
-> Parser
     (V2CrossVersionObjectReference -> V2HorizontalPodAutoscalerSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"minReplicas")
      Parser
  (V2CrossVersionObjectReference -> V2HorizontalPodAutoscalerSpec)
-> Parser V2CrossVersionObjectReference
-> Parser V2HorizontalPodAutoscalerSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V2CrossVersionObjectReference
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"scaleTargetRef")

-- | ToJSON V2HorizontalPodAutoscalerSpec
instance A.ToJSON V2HorizontalPodAutoscalerSpec where
  toJSON :: V2HorizontalPodAutoscalerSpec -> Value
toJSON V2HorizontalPodAutoscalerSpec {Int
Maybe Int
Maybe [V2MetricSpec]
Maybe V2HorizontalPodAutoscalerBehavior
V2CrossVersionObjectReference
$sel:v2HorizontalPodAutoscalerSpecBehavior:V2HorizontalPodAutoscalerSpec :: V2HorizontalPodAutoscalerSpec
-> Maybe V2HorizontalPodAutoscalerBehavior
$sel:v2HorizontalPodAutoscalerSpecMaxReplicas:V2HorizontalPodAutoscalerSpec :: V2HorizontalPodAutoscalerSpec -> Int
$sel:v2HorizontalPodAutoscalerSpecMetrics:V2HorizontalPodAutoscalerSpec :: V2HorizontalPodAutoscalerSpec -> Maybe [V2MetricSpec]
$sel:v2HorizontalPodAutoscalerSpecMinReplicas:V2HorizontalPodAutoscalerSpec :: V2HorizontalPodAutoscalerSpec -> Maybe Int
$sel:v2HorizontalPodAutoscalerSpecScaleTargetRef:V2HorizontalPodAutoscalerSpec :: V2HorizontalPodAutoscalerSpec -> V2CrossVersionObjectReference
v2HorizontalPodAutoscalerSpecBehavior :: Maybe V2HorizontalPodAutoscalerBehavior
v2HorizontalPodAutoscalerSpecMaxReplicas :: Int
v2HorizontalPodAutoscalerSpecMetrics :: Maybe [V2MetricSpec]
v2HorizontalPodAutoscalerSpecMinReplicas :: Maybe Int
v2HorizontalPodAutoscalerSpecScaleTargetRef :: V2CrossVersionObjectReference
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"behavior" Key -> Maybe V2HorizontalPodAutoscalerBehavior -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V2HorizontalPodAutoscalerBehavior
v2HorizontalPodAutoscalerSpecBehavior
      , Key
"maxReplicas" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v2HorizontalPodAutoscalerSpecMaxReplicas
      , Key
"metrics" Key -> Maybe [V2MetricSpec] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V2MetricSpec]
v2HorizontalPodAutoscalerSpecMetrics
      , Key
"minReplicas" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v2HorizontalPodAutoscalerSpecMinReplicas
      , Key
"scaleTargetRef" Key -> V2CrossVersionObjectReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V2CrossVersionObjectReference
v2HorizontalPodAutoscalerSpecScaleTargetRef
      ]


-- | Construct a value of type 'V2HorizontalPodAutoscalerSpec' (by applying it's required fields, if any)
mkV2HorizontalPodAutoscalerSpec
  :: Int -- ^ 'v2HorizontalPodAutoscalerSpecMaxReplicas': maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas.
  -> V2CrossVersionObjectReference -- ^ 'v2HorizontalPodAutoscalerSpecScaleTargetRef' 
  -> V2HorizontalPodAutoscalerSpec
mkV2HorizontalPodAutoscalerSpec :: Int
-> V2CrossVersionObjectReference -> V2HorizontalPodAutoscalerSpec
mkV2HorizontalPodAutoscalerSpec Int
v2HorizontalPodAutoscalerSpecMaxReplicas V2CrossVersionObjectReference
v2HorizontalPodAutoscalerSpecScaleTargetRef =
  V2HorizontalPodAutoscalerSpec
  { $sel:v2HorizontalPodAutoscalerSpecBehavior:V2HorizontalPodAutoscalerSpec :: Maybe V2HorizontalPodAutoscalerBehavior
v2HorizontalPodAutoscalerSpecBehavior = Maybe V2HorizontalPodAutoscalerBehavior
forall a. Maybe a
Nothing
  , Int
$sel:v2HorizontalPodAutoscalerSpecMaxReplicas:V2HorizontalPodAutoscalerSpec :: Int
v2HorizontalPodAutoscalerSpecMaxReplicas :: Int
v2HorizontalPodAutoscalerSpecMaxReplicas
  , $sel:v2HorizontalPodAutoscalerSpecMetrics:V2HorizontalPodAutoscalerSpec :: Maybe [V2MetricSpec]
v2HorizontalPodAutoscalerSpecMetrics = Maybe [V2MetricSpec]
forall a. Maybe a
Nothing
  , $sel:v2HorizontalPodAutoscalerSpecMinReplicas:V2HorizontalPodAutoscalerSpec :: Maybe Int
v2HorizontalPodAutoscalerSpecMinReplicas = Maybe Int
forall a. Maybe a
Nothing
  , V2CrossVersionObjectReference
$sel:v2HorizontalPodAutoscalerSpecScaleTargetRef:V2HorizontalPodAutoscalerSpec :: V2CrossVersionObjectReference
v2HorizontalPodAutoscalerSpecScaleTargetRef :: V2CrossVersionObjectReference
v2HorizontalPodAutoscalerSpecScaleTargetRef
  }

-- ** V2HorizontalPodAutoscalerStatus
-- | V2HorizontalPodAutoscalerStatus
-- HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.
data V2HorizontalPodAutoscalerStatus = V2HorizontalPodAutoscalerStatus
  { V2HorizontalPodAutoscalerStatus
-> Maybe [V2HorizontalPodAutoscalerCondition]
v2HorizontalPodAutoscalerStatusConditions :: !(Maybe [V2HorizontalPodAutoscalerCondition]) -- ^ "conditions" - conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met.
  , V2HorizontalPodAutoscalerStatus -> Maybe [V2MetricStatus]
v2HorizontalPodAutoscalerStatusCurrentMetrics :: !(Maybe [V2MetricStatus]) -- ^ "currentMetrics" - currentMetrics is the last read state of the metrics used by this autoscaler.
  , V2HorizontalPodAutoscalerStatus -> Maybe Int
v2HorizontalPodAutoscalerStatusCurrentReplicas :: !(Maybe Int) -- ^ "currentReplicas" - currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler.
  , V2HorizontalPodAutoscalerStatus -> Int
v2HorizontalPodAutoscalerStatusDesiredReplicas :: !(Int) -- ^ /Required/ "desiredReplicas" - desiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler.
  , V2HorizontalPodAutoscalerStatus -> Maybe DateTime
v2HorizontalPodAutoscalerStatusLastScaleTime :: !(Maybe DateTime) -- ^ "lastScaleTime" - lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, used by the autoscaler to control how often the number of pods is changed.
  , V2HorizontalPodAutoscalerStatus -> Maybe Integer
v2HorizontalPodAutoscalerStatusObservedGeneration :: !(Maybe Integer) -- ^ "observedGeneration" - observedGeneration is the most recent generation observed by this autoscaler.
  } deriving (Int -> V2HorizontalPodAutoscalerStatus -> ShowS
[V2HorizontalPodAutoscalerStatus] -> ShowS
V2HorizontalPodAutoscalerStatus -> String
(Int -> V2HorizontalPodAutoscalerStatus -> ShowS)
-> (V2HorizontalPodAutoscalerStatus -> String)
-> ([V2HorizontalPodAutoscalerStatus] -> ShowS)
-> Show V2HorizontalPodAutoscalerStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V2HorizontalPodAutoscalerStatus -> ShowS
showsPrec :: Int -> V2HorizontalPodAutoscalerStatus -> ShowS
$cshow :: V2HorizontalPodAutoscalerStatus -> String
show :: V2HorizontalPodAutoscalerStatus -> String
$cshowList :: [V2HorizontalPodAutoscalerStatus] -> ShowS
showList :: [V2HorizontalPodAutoscalerStatus] -> ShowS
P.Show, V2HorizontalPodAutoscalerStatus
-> V2HorizontalPodAutoscalerStatus -> Bool
(V2HorizontalPodAutoscalerStatus
 -> V2HorizontalPodAutoscalerStatus -> Bool)
-> (V2HorizontalPodAutoscalerStatus
    -> V2HorizontalPodAutoscalerStatus -> Bool)
-> Eq V2HorizontalPodAutoscalerStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V2HorizontalPodAutoscalerStatus
-> V2HorizontalPodAutoscalerStatus -> Bool
== :: V2HorizontalPodAutoscalerStatus
-> V2HorizontalPodAutoscalerStatus -> Bool
$c/= :: V2HorizontalPodAutoscalerStatus
-> V2HorizontalPodAutoscalerStatus -> Bool
/= :: V2HorizontalPodAutoscalerStatus
-> V2HorizontalPodAutoscalerStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V2HorizontalPodAutoscalerStatus
instance A.FromJSON V2HorizontalPodAutoscalerStatus where
  parseJSON :: Value -> Parser V2HorizontalPodAutoscalerStatus
parseJSON = String
-> (Object -> Parser V2HorizontalPodAutoscalerStatus)
-> Value
-> Parser V2HorizontalPodAutoscalerStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V2HorizontalPodAutoscalerStatus" ((Object -> Parser V2HorizontalPodAutoscalerStatus)
 -> Value -> Parser V2HorizontalPodAutoscalerStatus)
-> (Object -> Parser V2HorizontalPodAutoscalerStatus)
-> Value
-> Parser V2HorizontalPodAutoscalerStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe [V2HorizontalPodAutoscalerCondition]
-> Maybe [V2MetricStatus]
-> Maybe Int
-> Int
-> Maybe DateTime
-> Maybe Integer
-> V2HorizontalPodAutoscalerStatus
V2HorizontalPodAutoscalerStatus
      (Maybe [V2HorizontalPodAutoscalerCondition]
 -> Maybe [V2MetricStatus]
 -> Maybe Int
 -> Int
 -> Maybe DateTime
 -> Maybe Integer
 -> V2HorizontalPodAutoscalerStatus)
-> Parser (Maybe [V2HorizontalPodAutoscalerCondition])
-> Parser
     (Maybe [V2MetricStatus]
      -> Maybe Int
      -> Int
      -> Maybe DateTime
      -> Maybe Integer
      -> V2HorizontalPodAutoscalerStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object
-> Key -> Parser (Maybe [V2HorizontalPodAutoscalerCondition])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"conditions")
      Parser
  (Maybe [V2MetricStatus]
   -> Maybe Int
   -> Int
   -> Maybe DateTime
   -> Maybe Integer
   -> V2HorizontalPodAutoscalerStatus)
-> Parser (Maybe [V2MetricStatus])
-> Parser
     (Maybe Int
      -> Int
      -> Maybe DateTime
      -> Maybe Integer
      -> V2HorizontalPodAutoscalerStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [V2MetricStatus])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"currentMetrics")
      Parser
  (Maybe Int
   -> Int
   -> Maybe DateTime
   -> Maybe Integer
   -> V2HorizontalPodAutoscalerStatus)
-> Parser (Maybe Int)
-> Parser
     (Int
      -> Maybe DateTime
      -> Maybe Integer
      -> V2HorizontalPodAutoscalerStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"currentReplicas")
      Parser
  (Int
   -> Maybe DateTime
   -> Maybe Integer
   -> V2HorizontalPodAutoscalerStatus)
-> Parser Int
-> Parser
     (Maybe DateTime
      -> Maybe Integer -> V2HorizontalPodAutoscalerStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"desiredReplicas")
      Parser
  (Maybe DateTime
   -> Maybe Integer -> V2HorizontalPodAutoscalerStatus)
-> Parser (Maybe DateTime)
-> Parser (Maybe Integer -> V2HorizontalPodAutoscalerStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"lastScaleTime")
      Parser (Maybe Integer -> V2HorizontalPodAutoscalerStatus)
-> Parser (Maybe Integer) -> Parser V2HorizontalPodAutoscalerStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"observedGeneration")

-- | ToJSON V2HorizontalPodAutoscalerStatus
instance A.ToJSON V2HorizontalPodAutoscalerStatus where
  toJSON :: V2HorizontalPodAutoscalerStatus -> Value
toJSON V2HorizontalPodAutoscalerStatus {Int
Maybe Int
Maybe Integer
Maybe [V2MetricStatus]
Maybe [V2HorizontalPodAutoscalerCondition]
Maybe DateTime
$sel:v2HorizontalPodAutoscalerStatusConditions:V2HorizontalPodAutoscalerStatus :: V2HorizontalPodAutoscalerStatus
-> Maybe [V2HorizontalPodAutoscalerCondition]
$sel:v2HorizontalPodAutoscalerStatusCurrentMetrics:V2HorizontalPodAutoscalerStatus :: V2HorizontalPodAutoscalerStatus -> Maybe [V2MetricStatus]
$sel:v2HorizontalPodAutoscalerStatusCurrentReplicas:V2HorizontalPodAutoscalerStatus :: V2HorizontalPodAutoscalerStatus -> Maybe Int
$sel:v2HorizontalPodAutoscalerStatusDesiredReplicas:V2HorizontalPodAutoscalerStatus :: V2HorizontalPodAutoscalerStatus -> Int
$sel:v2HorizontalPodAutoscalerStatusLastScaleTime:V2HorizontalPodAutoscalerStatus :: V2HorizontalPodAutoscalerStatus -> Maybe DateTime
$sel:v2HorizontalPodAutoscalerStatusObservedGeneration:V2HorizontalPodAutoscalerStatus :: V2HorizontalPodAutoscalerStatus -> Maybe Integer
v2HorizontalPodAutoscalerStatusConditions :: Maybe [V2HorizontalPodAutoscalerCondition]
v2HorizontalPodAutoscalerStatusCurrentMetrics :: Maybe [V2MetricStatus]
v2HorizontalPodAutoscalerStatusCurrentReplicas :: Maybe Int
v2HorizontalPodAutoscalerStatusDesiredReplicas :: Int
v2HorizontalPodAutoscalerStatusLastScaleTime :: Maybe DateTime
v2HorizontalPodAutoscalerStatusObservedGeneration :: Maybe Integer
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"conditions" Key -> Maybe [V2HorizontalPodAutoscalerCondition] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V2HorizontalPodAutoscalerCondition]
v2HorizontalPodAutoscalerStatusConditions
      , Key
"currentMetrics" Key -> Maybe [V2MetricStatus] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe [V2MetricStatus]
v2HorizontalPodAutoscalerStatusCurrentMetrics
      , Key
"currentReplicas" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v2HorizontalPodAutoscalerStatusCurrentReplicas
      , Key
"desiredReplicas" Key -> Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Int
v2HorizontalPodAutoscalerStatusDesiredReplicas
      , Key
"lastScaleTime" Key -> Maybe DateTime -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
v2HorizontalPodAutoscalerStatusLastScaleTime
      , Key
"observedGeneration" Key -> Maybe Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
v2HorizontalPodAutoscalerStatusObservedGeneration
      ]


-- | Construct a value of type 'V2HorizontalPodAutoscalerStatus' (by applying it's required fields, if any)
mkV2HorizontalPodAutoscalerStatus
  :: Int -- ^ 'v2HorizontalPodAutoscalerStatusDesiredReplicas': desiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler.
  -> V2HorizontalPodAutoscalerStatus
mkV2HorizontalPodAutoscalerStatus :: Int -> V2HorizontalPodAutoscalerStatus
mkV2HorizontalPodAutoscalerStatus Int
v2HorizontalPodAutoscalerStatusDesiredReplicas =
  V2HorizontalPodAutoscalerStatus
  { $sel:v2HorizontalPodAutoscalerStatusConditions:V2HorizontalPodAutoscalerStatus :: Maybe [V2HorizontalPodAutoscalerCondition]
v2HorizontalPodAutoscalerStatusConditions = Maybe [V2HorizontalPodAutoscalerCondition]
forall a. Maybe a
Nothing
  , $sel:v2HorizontalPodAutoscalerStatusCurrentMetrics:V2HorizontalPodAutoscalerStatus :: Maybe [V2MetricStatus]
v2HorizontalPodAutoscalerStatusCurrentMetrics = Maybe [V2MetricStatus]
forall a. Maybe a
Nothing
  , $sel:v2HorizontalPodAutoscalerStatusCurrentReplicas:V2HorizontalPodAutoscalerStatus :: Maybe Int
v2HorizontalPodAutoscalerStatusCurrentReplicas = Maybe Int
forall a. Maybe a
Nothing
  , Int
$sel:v2HorizontalPodAutoscalerStatusDesiredReplicas:V2HorizontalPodAutoscalerStatus :: Int
v2HorizontalPodAutoscalerStatusDesiredReplicas :: Int
v2HorizontalPodAutoscalerStatusDesiredReplicas
  , $sel:v2HorizontalPodAutoscalerStatusLastScaleTime:V2HorizontalPodAutoscalerStatus :: Maybe DateTime
v2HorizontalPodAutoscalerStatusLastScaleTime = Maybe DateTime
forall a. Maybe a
Nothing
  , $sel:v2HorizontalPodAutoscalerStatusObservedGeneration:V2HorizontalPodAutoscalerStatus :: Maybe Integer
v2HorizontalPodAutoscalerStatusObservedGeneration = Maybe Integer
forall a. Maybe a
Nothing
  }

-- ** V2MetricIdentifier
-- | V2MetricIdentifier
-- MetricIdentifier defines the name and optionally selector for a metric
data V2MetricIdentifier = V2MetricIdentifier
  { V2MetricIdentifier -> Text
v2MetricIdentifierName :: !(Text) -- ^ /Required/ "name" - name is the name of the given metric
  , V2MetricIdentifier -> Maybe V1LabelSelector
v2MetricIdentifierSelector :: !(Maybe V1LabelSelector) -- ^ "selector"
  } deriving (Int -> V2MetricIdentifier -> ShowS
[V2MetricIdentifier] -> ShowS
V2MetricIdentifier -> String
(Int -> V2MetricIdentifier -> ShowS)
-> (V2MetricIdentifier -> String)
-> ([V2MetricIdentifier] -> ShowS)
-> Show V2MetricIdentifier
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V2MetricIdentifier -> ShowS
showsPrec :: Int -> V2MetricIdentifier -> ShowS
$cshow :: V2MetricIdentifier -> String
show :: V2MetricIdentifier -> String
$cshowList :: [V2MetricIdentifier] -> ShowS
showList :: [V2MetricIdentifier] -> ShowS
P.Show, V2MetricIdentifier -> V2MetricIdentifier -> Bool
(V2MetricIdentifier -> V2MetricIdentifier -> Bool)
-> (V2MetricIdentifier -> V2MetricIdentifier -> Bool)
-> Eq V2MetricIdentifier
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V2MetricIdentifier -> V2MetricIdentifier -> Bool
== :: V2MetricIdentifier -> V2MetricIdentifier -> Bool
$c/= :: V2MetricIdentifier -> V2MetricIdentifier -> Bool
/= :: V2MetricIdentifier -> V2MetricIdentifier -> Bool
P.Eq, P.Typeable)

-- | FromJSON V2MetricIdentifier
instance A.FromJSON V2MetricIdentifier where
  parseJSON :: Value -> Parser V2MetricIdentifier
parseJSON = String
-> (Object -> Parser V2MetricIdentifier)
-> Value
-> Parser V2MetricIdentifier
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V2MetricIdentifier" ((Object -> Parser V2MetricIdentifier)
 -> Value -> Parser V2MetricIdentifier)
-> (Object -> Parser V2MetricIdentifier)
-> Value
-> Parser V2MetricIdentifier
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> Maybe V1LabelSelector -> V2MetricIdentifier
V2MetricIdentifier
      (Text -> Maybe V1LabelSelector -> V2MetricIdentifier)
-> Parser Text
-> Parser (Maybe V1LabelSelector -> V2MetricIdentifier)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser (Maybe V1LabelSelector -> V2MetricIdentifier)
-> Parser (Maybe V1LabelSelector) -> Parser V2MetricIdentifier
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V1LabelSelector)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"selector")

-- | ToJSON V2MetricIdentifier
instance A.ToJSON V2MetricIdentifier where
  toJSON :: V2MetricIdentifier -> Value
toJSON V2MetricIdentifier {Maybe V1LabelSelector
Text
$sel:v2MetricIdentifierName:V2MetricIdentifier :: V2MetricIdentifier -> Text
$sel:v2MetricIdentifierSelector:V2MetricIdentifier :: V2MetricIdentifier -> Maybe V1LabelSelector
v2MetricIdentifierName :: Text
v2MetricIdentifierSelector :: Maybe V1LabelSelector
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v2MetricIdentifierName
      , Key
"selector" Key -> Maybe V1LabelSelector -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V1LabelSelector
v2MetricIdentifierSelector
      ]


-- | Construct a value of type 'V2MetricIdentifier' (by applying it's required fields, if any)
mkV2MetricIdentifier
  :: Text -- ^ 'v2MetricIdentifierName': name is the name of the given metric
  -> V2MetricIdentifier
mkV2MetricIdentifier :: Text -> V2MetricIdentifier
mkV2MetricIdentifier Text
v2MetricIdentifierName =
  V2MetricIdentifier
  { Text
$sel:v2MetricIdentifierName:V2MetricIdentifier :: Text
v2MetricIdentifierName :: Text
v2MetricIdentifierName
  , $sel:v2MetricIdentifierSelector:V2MetricIdentifier :: Maybe V1LabelSelector
v2MetricIdentifierSelector = Maybe V1LabelSelector
forall a. Maybe a
Nothing
  }

-- ** V2MetricSpec
-- | V2MetricSpec
-- MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).
data V2MetricSpec = V2MetricSpec
  { V2MetricSpec -> Maybe V2ContainerResourceMetricSource
v2MetricSpecContainerResource :: !(Maybe V2ContainerResourceMetricSource) -- ^ "containerResource"
  , V2MetricSpec -> Maybe V2ExternalMetricSource
v2MetricSpecExternal :: !(Maybe V2ExternalMetricSource) -- ^ "external"
  , V2MetricSpec -> Maybe V2ObjectMetricSource
v2MetricSpecObject :: !(Maybe V2ObjectMetricSource) -- ^ "object"
  , V2MetricSpec -> Maybe V2PodsMetricSource
v2MetricSpecPods :: !(Maybe V2PodsMetricSource) -- ^ "pods"
  , V2MetricSpec -> Maybe V2ResourceMetricSource
v2MetricSpecResource :: !(Maybe V2ResourceMetricSource) -- ^ "resource"
  , V2MetricSpec -> Text
v2MetricSpecType :: !(Text) -- ^ /Required/ "type" - type is the type of metric source.  It should be one of \&quot;ContainerResource\&quot;, \&quot;External\&quot;, \&quot;Object\&quot;, \&quot;Pods\&quot; or \&quot;Resource\&quot;, each mapping to a matching field in the object.
  } deriving (Int -> V2MetricSpec -> ShowS
[V2MetricSpec] -> ShowS
V2MetricSpec -> String
(Int -> V2MetricSpec -> ShowS)
-> (V2MetricSpec -> String)
-> ([V2MetricSpec] -> ShowS)
-> Show V2MetricSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V2MetricSpec -> ShowS
showsPrec :: Int -> V2MetricSpec -> ShowS
$cshow :: V2MetricSpec -> String
show :: V2MetricSpec -> String
$cshowList :: [V2MetricSpec] -> ShowS
showList :: [V2MetricSpec] -> ShowS
P.Show, V2MetricSpec -> V2MetricSpec -> Bool
(V2MetricSpec -> V2MetricSpec -> Bool)
-> (V2MetricSpec -> V2MetricSpec -> Bool) -> Eq V2MetricSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V2MetricSpec -> V2MetricSpec -> Bool
== :: V2MetricSpec -> V2MetricSpec -> Bool
$c/= :: V2MetricSpec -> V2MetricSpec -> Bool
/= :: V2MetricSpec -> V2MetricSpec -> Bool
P.Eq, P.Typeable)

-- | FromJSON V2MetricSpec
instance A.FromJSON V2MetricSpec where
  parseJSON :: Value -> Parser V2MetricSpec
parseJSON = String
-> (Object -> Parser V2MetricSpec) -> Value -> Parser V2MetricSpec
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V2MetricSpec" ((Object -> Parser V2MetricSpec) -> Value -> Parser V2MetricSpec)
-> (Object -> Parser V2MetricSpec) -> Value -> Parser V2MetricSpec
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V2ContainerResourceMetricSource
-> Maybe V2ExternalMetricSource
-> Maybe V2ObjectMetricSource
-> Maybe V2PodsMetricSource
-> Maybe V2ResourceMetricSource
-> Text
-> V2MetricSpec
V2MetricSpec
      (Maybe V2ContainerResourceMetricSource
 -> Maybe V2ExternalMetricSource
 -> Maybe V2ObjectMetricSource
 -> Maybe V2PodsMetricSource
 -> Maybe V2ResourceMetricSource
 -> Text
 -> V2MetricSpec)
-> Parser (Maybe V2ContainerResourceMetricSource)
-> Parser
     (Maybe V2ExternalMetricSource
      -> Maybe V2ObjectMetricSource
      -> Maybe V2PodsMetricSource
      -> Maybe V2ResourceMetricSource
      -> Text
      -> V2MetricSpec)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V2ContainerResourceMetricSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"containerResource")
      Parser
  (Maybe V2ExternalMetricSource
   -> Maybe V2ObjectMetricSource
   -> Maybe V2PodsMetricSource
   -> Maybe V2ResourceMetricSource
   -> Text
   -> V2MetricSpec)
-> Parser (Maybe V2ExternalMetricSource)
-> Parser
     (Maybe V2ObjectMetricSource
      -> Maybe V2PodsMetricSource
      -> Maybe V2ResourceMetricSource
      -> Text
      -> V2MetricSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V2ExternalMetricSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"external")
      Parser
  (Maybe V2ObjectMetricSource
   -> Maybe V2PodsMetricSource
   -> Maybe V2ResourceMetricSource
   -> Text
   -> V2MetricSpec)
-> Parser (Maybe V2ObjectMetricSource)
-> Parser
     (Maybe V2PodsMetricSource
      -> Maybe V2ResourceMetricSource -> Text -> V2MetricSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V2ObjectMetricSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"object")
      Parser
  (Maybe V2PodsMetricSource
   -> Maybe V2ResourceMetricSource -> Text -> V2MetricSpec)
-> Parser (Maybe V2PodsMetricSource)
-> Parser (Maybe V2ResourceMetricSource -> Text -> V2MetricSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V2PodsMetricSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"pods")
      Parser (Maybe V2ResourceMetricSource -> Text -> V2MetricSpec)
-> Parser (Maybe V2ResourceMetricSource)
-> Parser (Text -> V2MetricSpec)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V2ResourceMetricSource)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resource")
      Parser (Text -> V2MetricSpec) -> Parser Text -> Parser V2MetricSpec
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"type")

-- | ToJSON V2MetricSpec
instance A.ToJSON V2MetricSpec where
  toJSON :: V2MetricSpec -> Value
toJSON V2MetricSpec {Maybe V2ResourceMetricSource
Maybe V2PodsMetricSource
Maybe V2ObjectMetricSource
Maybe V2ExternalMetricSource
Maybe V2ContainerResourceMetricSource
Text
$sel:v2MetricSpecContainerResource:V2MetricSpec :: V2MetricSpec -> Maybe V2ContainerResourceMetricSource
$sel:v2MetricSpecExternal:V2MetricSpec :: V2MetricSpec -> Maybe V2ExternalMetricSource
$sel:v2MetricSpecObject:V2MetricSpec :: V2MetricSpec -> Maybe V2ObjectMetricSource
$sel:v2MetricSpecPods:V2MetricSpec :: V2MetricSpec -> Maybe V2PodsMetricSource
$sel:v2MetricSpecResource:V2MetricSpec :: V2MetricSpec -> Maybe V2ResourceMetricSource
$sel:v2MetricSpecType:V2MetricSpec :: V2MetricSpec -> Text
v2MetricSpecContainerResource :: Maybe V2ContainerResourceMetricSource
v2MetricSpecExternal :: Maybe V2ExternalMetricSource
v2MetricSpecObject :: Maybe V2ObjectMetricSource
v2MetricSpecPods :: Maybe V2PodsMetricSource
v2MetricSpecResource :: Maybe V2ResourceMetricSource
v2MetricSpecType :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"containerResource" Key -> Maybe V2ContainerResourceMetricSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V2ContainerResourceMetricSource
v2MetricSpecContainerResource
      , Key
"external" Key -> Maybe V2ExternalMetricSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V2ExternalMetricSource
v2MetricSpecExternal
      , Key
"object" Key -> Maybe V2ObjectMetricSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V2ObjectMetricSource
v2MetricSpecObject
      , Key
"pods" Key -> Maybe V2PodsMetricSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V2PodsMetricSource
v2MetricSpecPods
      , Key
"resource" Key -> Maybe V2ResourceMetricSource -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V2ResourceMetricSource
v2MetricSpecResource
      , Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v2MetricSpecType
      ]


-- | Construct a value of type 'V2MetricSpec' (by applying it's required fields, if any)
mkV2MetricSpec
  :: Text -- ^ 'v2MetricSpecType': type is the type of metric source.  It should be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object.
  -> V2MetricSpec
mkV2MetricSpec :: Text -> V2MetricSpec
mkV2MetricSpec Text
v2MetricSpecType =
  V2MetricSpec
  { $sel:v2MetricSpecContainerResource:V2MetricSpec :: Maybe V2ContainerResourceMetricSource
v2MetricSpecContainerResource = Maybe V2ContainerResourceMetricSource
forall a. Maybe a
Nothing
  , $sel:v2MetricSpecExternal:V2MetricSpec :: Maybe V2ExternalMetricSource
v2MetricSpecExternal = Maybe V2ExternalMetricSource
forall a. Maybe a
Nothing
  , $sel:v2MetricSpecObject:V2MetricSpec :: Maybe V2ObjectMetricSource
v2MetricSpecObject = Maybe V2ObjectMetricSource
forall a. Maybe a
Nothing
  , $sel:v2MetricSpecPods:V2MetricSpec :: Maybe V2PodsMetricSource
v2MetricSpecPods = Maybe V2PodsMetricSource
forall a. Maybe a
Nothing
  , $sel:v2MetricSpecResource:V2MetricSpec :: Maybe V2ResourceMetricSource
v2MetricSpecResource = Maybe V2ResourceMetricSource
forall a. Maybe a
Nothing
  , Text
$sel:v2MetricSpecType:V2MetricSpec :: Text
v2MetricSpecType :: Text
v2MetricSpecType
  }

-- ** V2MetricStatus
-- | V2MetricStatus
-- MetricStatus describes the last-read state of a single metric.
data V2MetricStatus = V2MetricStatus
  { V2MetricStatus -> Maybe V2ContainerResourceMetricStatus
v2MetricStatusContainerResource :: !(Maybe V2ContainerResourceMetricStatus) -- ^ "containerResource"
  , V2MetricStatus -> Maybe V2ExternalMetricStatus
v2MetricStatusExternal :: !(Maybe V2ExternalMetricStatus) -- ^ "external"
  , V2MetricStatus -> Maybe V2ObjectMetricStatus
v2MetricStatusObject :: !(Maybe V2ObjectMetricStatus) -- ^ "object"
  , V2MetricStatus -> Maybe V2PodsMetricStatus
v2MetricStatusPods :: !(Maybe V2PodsMetricStatus) -- ^ "pods"
  , V2MetricStatus -> Maybe V2ResourceMetricStatus
v2MetricStatusResource :: !(Maybe V2ResourceMetricStatus) -- ^ "resource"
  , V2MetricStatus -> Text
v2MetricStatusType :: !(Text) -- ^ /Required/ "type" - type is the type of metric source.  It will be one of \&quot;ContainerResource\&quot;, \&quot;External\&quot;, \&quot;Object\&quot;, \&quot;Pods\&quot; or \&quot;Resource\&quot;, each corresponds to a matching field in the object.
  } deriving (Int -> V2MetricStatus -> ShowS
[V2MetricStatus] -> ShowS
V2MetricStatus -> String
(Int -> V2MetricStatus -> ShowS)
-> (V2MetricStatus -> String)
-> ([V2MetricStatus] -> ShowS)
-> Show V2MetricStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V2MetricStatus -> ShowS
showsPrec :: Int -> V2MetricStatus -> ShowS
$cshow :: V2MetricStatus -> String
show :: V2MetricStatus -> String
$cshowList :: [V2MetricStatus] -> ShowS
showList :: [V2MetricStatus] -> ShowS
P.Show, V2MetricStatus -> V2MetricStatus -> Bool
(V2MetricStatus -> V2MetricStatus -> Bool)
-> (V2MetricStatus -> V2MetricStatus -> Bool) -> Eq V2MetricStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V2MetricStatus -> V2MetricStatus -> Bool
== :: V2MetricStatus -> V2MetricStatus -> Bool
$c/= :: V2MetricStatus -> V2MetricStatus -> Bool
/= :: V2MetricStatus -> V2MetricStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V2MetricStatus
instance A.FromJSON V2MetricStatus where
  parseJSON :: Value -> Parser V2MetricStatus
parseJSON = String
-> (Object -> Parser V2MetricStatus)
-> Value
-> Parser V2MetricStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V2MetricStatus" ((Object -> Parser V2MetricStatus)
 -> Value -> Parser V2MetricStatus)
-> (Object -> Parser V2MetricStatus)
-> Value
-> Parser V2MetricStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe V2ContainerResourceMetricStatus
-> Maybe V2ExternalMetricStatus
-> Maybe V2ObjectMetricStatus
-> Maybe V2PodsMetricStatus
-> Maybe V2ResourceMetricStatus
-> Text
-> V2MetricStatus
V2MetricStatus
      (Maybe V2ContainerResourceMetricStatus
 -> Maybe V2ExternalMetricStatus
 -> Maybe V2ObjectMetricStatus
 -> Maybe V2PodsMetricStatus
 -> Maybe V2ResourceMetricStatus
 -> Text
 -> V2MetricStatus)
-> Parser (Maybe V2ContainerResourceMetricStatus)
-> Parser
     (Maybe V2ExternalMetricStatus
      -> Maybe V2ObjectMetricStatus
      -> Maybe V2PodsMetricStatus
      -> Maybe V2ResourceMetricStatus
      -> Text
      -> V2MetricStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe V2ContainerResourceMetricStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"containerResource")
      Parser
  (Maybe V2ExternalMetricStatus
   -> Maybe V2ObjectMetricStatus
   -> Maybe V2PodsMetricStatus
   -> Maybe V2ResourceMetricStatus
   -> Text
   -> V2MetricStatus)
-> Parser (Maybe V2ExternalMetricStatus)
-> Parser
     (Maybe V2ObjectMetricStatus
      -> Maybe V2PodsMetricStatus
      -> Maybe V2ResourceMetricStatus
      -> Text
      -> V2MetricStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V2ExternalMetricStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"external")
      Parser
  (Maybe V2ObjectMetricStatus
   -> Maybe V2PodsMetricStatus
   -> Maybe V2ResourceMetricStatus
   -> Text
   -> V2MetricStatus)
-> Parser (Maybe V2ObjectMetricStatus)
-> Parser
     (Maybe V2PodsMetricStatus
      -> Maybe V2ResourceMetricStatus -> Text -> V2MetricStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V2ObjectMetricStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"object")
      Parser
  (Maybe V2PodsMetricStatus
   -> Maybe V2ResourceMetricStatus -> Text -> V2MetricStatus)
-> Parser (Maybe V2PodsMetricStatus)
-> Parser (Maybe V2ResourceMetricStatus -> Text -> V2MetricStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V2PodsMetricStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"pods")
      Parser (Maybe V2ResourceMetricStatus -> Text -> V2MetricStatus)
-> Parser (Maybe V2ResourceMetricStatus)
-> Parser (Text -> V2MetricStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe V2ResourceMetricStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"resource")
      Parser (Text -> V2MetricStatus)
-> Parser Text -> Parser V2MetricStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"type")

-- | ToJSON V2MetricStatus
instance A.ToJSON V2MetricStatus where
  toJSON :: V2MetricStatus -> Value
toJSON V2MetricStatus {Maybe V2ResourceMetricStatus
Maybe V2PodsMetricStatus
Maybe V2ObjectMetricStatus
Maybe V2ExternalMetricStatus
Maybe V2ContainerResourceMetricStatus
Text
$sel:v2MetricStatusContainerResource:V2MetricStatus :: V2MetricStatus -> Maybe V2ContainerResourceMetricStatus
$sel:v2MetricStatusExternal:V2MetricStatus :: V2MetricStatus -> Maybe V2ExternalMetricStatus
$sel:v2MetricStatusObject:V2MetricStatus :: V2MetricStatus -> Maybe V2ObjectMetricStatus
$sel:v2MetricStatusPods:V2MetricStatus :: V2MetricStatus -> Maybe V2PodsMetricStatus
$sel:v2MetricStatusResource:V2MetricStatus :: V2MetricStatus -> Maybe V2ResourceMetricStatus
$sel:v2MetricStatusType:V2MetricStatus :: V2MetricStatus -> Text
v2MetricStatusContainerResource :: Maybe V2ContainerResourceMetricStatus
v2MetricStatusExternal :: Maybe V2ExternalMetricStatus
v2MetricStatusObject :: Maybe V2ObjectMetricStatus
v2MetricStatusPods :: Maybe V2PodsMetricStatus
v2MetricStatusResource :: Maybe V2ResourceMetricStatus
v2MetricStatusType :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"containerResource" Key -> Maybe V2ContainerResourceMetricStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V2ContainerResourceMetricStatus
v2MetricStatusContainerResource
      , Key
"external" Key -> Maybe V2ExternalMetricStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V2ExternalMetricStatus
v2MetricStatusExternal
      , Key
"object" Key -> Maybe V2ObjectMetricStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V2ObjectMetricStatus
v2MetricStatusObject
      , Key
"pods" Key -> Maybe V2PodsMetricStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V2PodsMetricStatus
v2MetricStatusPods
      , Key
"resource" Key -> Maybe V2ResourceMetricStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe V2ResourceMetricStatus
v2MetricStatusResource
      , Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v2MetricStatusType
      ]


-- | Construct a value of type 'V2MetricStatus' (by applying it's required fields, if any)
mkV2MetricStatus
  :: Text -- ^ 'v2MetricStatusType': type is the type of metric source.  It will be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object.
  -> V2MetricStatus
mkV2MetricStatus :: Text -> V2MetricStatus
mkV2MetricStatus Text
v2MetricStatusType =
  V2MetricStatus
  { $sel:v2MetricStatusContainerResource:V2MetricStatus :: Maybe V2ContainerResourceMetricStatus
v2MetricStatusContainerResource = Maybe V2ContainerResourceMetricStatus
forall a. Maybe a
Nothing
  , $sel:v2MetricStatusExternal:V2MetricStatus :: Maybe V2ExternalMetricStatus
v2MetricStatusExternal = Maybe V2ExternalMetricStatus
forall a. Maybe a
Nothing
  , $sel:v2MetricStatusObject:V2MetricStatus :: Maybe V2ObjectMetricStatus
v2MetricStatusObject = Maybe V2ObjectMetricStatus
forall a. Maybe a
Nothing
  , $sel:v2MetricStatusPods:V2MetricStatus :: Maybe V2PodsMetricStatus
v2MetricStatusPods = Maybe V2PodsMetricStatus
forall a. Maybe a
Nothing
  , $sel:v2MetricStatusResource:V2MetricStatus :: Maybe V2ResourceMetricStatus
v2MetricStatusResource = Maybe V2ResourceMetricStatus
forall a. Maybe a
Nothing
  , Text
$sel:v2MetricStatusType:V2MetricStatus :: Text
v2MetricStatusType :: Text
v2MetricStatusType
  }

-- ** V2MetricTarget
-- | V2MetricTarget
-- MetricTarget defines the target value, average value, or average utilization of a specific metric
data V2MetricTarget = V2MetricTarget
  { V2MetricTarget -> Maybe Int
v2MetricTargetAverageUtilization :: !(Maybe Int) -- ^ "averageUtilization" - averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type
  , V2MetricTarget -> Maybe Quantity
v2MetricTargetAverageValue :: !(Maybe Quantity) -- ^ "averageValue"
  , V2MetricTarget -> Text
v2MetricTargetType :: !(Text) -- ^ /Required/ "type" - type represents whether the metric type is Utilization, Value, or AverageValue
  , V2MetricTarget -> Maybe Quantity
v2MetricTargetValue :: !(Maybe Quantity) -- ^ "value"
  } deriving (Int -> V2MetricTarget -> ShowS
[V2MetricTarget] -> ShowS
V2MetricTarget -> String
(Int -> V2MetricTarget -> ShowS)
-> (V2MetricTarget -> String)
-> ([V2MetricTarget] -> ShowS)
-> Show V2MetricTarget
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V2MetricTarget -> ShowS
showsPrec :: Int -> V2MetricTarget -> ShowS
$cshow :: V2MetricTarget -> String
show :: V2MetricTarget -> String
$cshowList :: [V2MetricTarget] -> ShowS
showList :: [V2MetricTarget] -> ShowS
P.Show, V2MetricTarget -> V2MetricTarget -> Bool
(V2MetricTarget -> V2MetricTarget -> Bool)
-> (V2MetricTarget -> V2MetricTarget -> Bool) -> Eq V2MetricTarget
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V2MetricTarget -> V2MetricTarget -> Bool
== :: V2MetricTarget -> V2MetricTarget -> Bool
$c/= :: V2MetricTarget -> V2MetricTarget -> Bool
/= :: V2MetricTarget -> V2MetricTarget -> Bool
P.Eq, P.Typeable)

-- | FromJSON V2MetricTarget
instance A.FromJSON V2MetricTarget where
  parseJSON :: Value -> Parser V2MetricTarget
parseJSON = String
-> (Object -> Parser V2MetricTarget)
-> Value
-> Parser V2MetricTarget
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V2MetricTarget" ((Object -> Parser V2MetricTarget)
 -> Value -> Parser V2MetricTarget)
-> (Object -> Parser V2MetricTarget)
-> Value
-> Parser V2MetricTarget
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Int
-> Maybe Quantity -> Text -> Maybe Quantity -> V2MetricTarget
V2MetricTarget
      (Maybe Int
 -> Maybe Quantity -> Text -> Maybe Quantity -> V2MetricTarget)
-> Parser (Maybe Int)
-> Parser
     (Maybe Quantity -> Text -> Maybe Quantity -> V2MetricTarget)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"averageUtilization")
      Parser (Maybe Quantity -> Text -> Maybe Quantity -> V2MetricTarget)
-> Parser (Maybe Quantity)
-> Parser (Text -> Maybe Quantity -> V2MetricTarget)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Quantity)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"averageValue")
      Parser (Text -> Maybe Quantity -> V2MetricTarget)
-> Parser Text -> Parser (Maybe Quantity -> V2MetricTarget)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"type")
      Parser (Maybe Quantity -> V2MetricTarget)
-> Parser (Maybe Quantity) -> Parser V2MetricTarget
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Quantity)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"value")

-- | ToJSON V2MetricTarget
instance A.ToJSON V2MetricTarget where
  toJSON :: V2MetricTarget -> Value
toJSON V2MetricTarget {Maybe Int
Maybe Quantity
Text
$sel:v2MetricTargetAverageUtilization:V2MetricTarget :: V2MetricTarget -> Maybe Int
$sel:v2MetricTargetAverageValue:V2MetricTarget :: V2MetricTarget -> Maybe Quantity
$sel:v2MetricTargetType:V2MetricTarget :: V2MetricTarget -> Text
$sel:v2MetricTargetValue:V2MetricTarget :: V2MetricTarget -> Maybe Quantity
v2MetricTargetAverageUtilization :: Maybe Int
v2MetricTargetAverageValue :: Maybe Quantity
v2MetricTargetType :: Text
v2MetricTargetValue :: Maybe Quantity
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"averageUtilization" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v2MetricTargetAverageUtilization
      , Key
"averageValue" Key -> Maybe Quantity -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Quantity
v2MetricTargetAverageValue
      , Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v2MetricTargetType
      , Key
"value" Key -> Maybe Quantity -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Quantity
v2MetricTargetValue
      ]


-- | Construct a value of type 'V2MetricTarget' (by applying it's required fields, if any)
mkV2MetricTarget
  :: Text -- ^ 'v2MetricTargetType': type represents whether the metric type is Utilization, Value, or AverageValue
  -> V2MetricTarget
mkV2MetricTarget :: Text -> V2MetricTarget
mkV2MetricTarget Text
v2MetricTargetType =
  V2MetricTarget
  { $sel:v2MetricTargetAverageUtilization:V2MetricTarget :: Maybe Int
v2MetricTargetAverageUtilization = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v2MetricTargetAverageValue:V2MetricTarget :: Maybe Quantity
v2MetricTargetAverageValue = Maybe Quantity
forall a. Maybe a
Nothing
  , Text
$sel:v2MetricTargetType:V2MetricTarget :: Text
v2MetricTargetType :: Text
v2MetricTargetType
  , $sel:v2MetricTargetValue:V2MetricTarget :: Maybe Quantity
v2MetricTargetValue = Maybe Quantity
forall a. Maybe a
Nothing
  }

-- ** V2MetricValueStatus
-- | V2MetricValueStatus
-- MetricValueStatus holds the current value for a metric
data V2MetricValueStatus = V2MetricValueStatus
  { V2MetricValueStatus -> Maybe Int
v2MetricValueStatusAverageUtilization :: !(Maybe Int) -- ^ "averageUtilization" - currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.
  , V2MetricValueStatus -> Maybe Quantity
v2MetricValueStatusAverageValue :: !(Maybe Quantity) -- ^ "averageValue"
  , V2MetricValueStatus -> Maybe Quantity
v2MetricValueStatusValue :: !(Maybe Quantity) -- ^ "value"
  } deriving (Int -> V2MetricValueStatus -> ShowS
[V2MetricValueStatus] -> ShowS
V2MetricValueStatus -> String
(Int -> V2MetricValueStatus -> ShowS)
-> (V2MetricValueStatus -> String)
-> ([V2MetricValueStatus] -> ShowS)
-> Show V2MetricValueStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V2MetricValueStatus -> ShowS
showsPrec :: Int -> V2MetricValueStatus -> ShowS
$cshow :: V2MetricValueStatus -> String
show :: V2MetricValueStatus -> String
$cshowList :: [V2MetricValueStatus] -> ShowS
showList :: [V2MetricValueStatus] -> ShowS
P.Show, V2MetricValueStatus -> V2MetricValueStatus -> Bool
(V2MetricValueStatus -> V2MetricValueStatus -> Bool)
-> (V2MetricValueStatus -> V2MetricValueStatus -> Bool)
-> Eq V2MetricValueStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V2MetricValueStatus -> V2MetricValueStatus -> Bool
== :: V2MetricValueStatus -> V2MetricValueStatus -> Bool
$c/= :: V2MetricValueStatus -> V2MetricValueStatus -> Bool
/= :: V2MetricValueStatus -> V2MetricValueStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V2MetricValueStatus
instance A.FromJSON V2MetricValueStatus where
  parseJSON :: Value -> Parser V2MetricValueStatus
parseJSON = String
-> (Object -> Parser V2MetricValueStatus)
-> Value
-> Parser V2MetricValueStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V2MetricValueStatus" ((Object -> Parser V2MetricValueStatus)
 -> Value -> Parser V2MetricValueStatus)
-> (Object -> Parser V2MetricValueStatus)
-> Value
-> Parser V2MetricValueStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Maybe Int
-> Maybe Quantity -> Maybe Quantity -> V2MetricValueStatus
V2MetricValueStatus
      (Maybe Int
 -> Maybe Quantity -> Maybe Quantity -> V2MetricValueStatus)
-> Parser (Maybe Int)
-> Parser (Maybe Quantity -> Maybe Quantity -> V2MetricValueStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"averageUtilization")
      Parser (Maybe Quantity -> Maybe Quantity -> V2MetricValueStatus)
-> Parser (Maybe Quantity)
-> Parser (Maybe Quantity -> V2MetricValueStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Quantity)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"averageValue")
      Parser (Maybe Quantity -> V2MetricValueStatus)
-> Parser (Maybe Quantity) -> Parser V2MetricValueStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Quantity)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"value")

-- | ToJSON V2MetricValueStatus
instance A.ToJSON V2MetricValueStatus where
  toJSON :: V2MetricValueStatus -> Value
toJSON V2MetricValueStatus {Maybe Int
Maybe Quantity
$sel:v2MetricValueStatusAverageUtilization:V2MetricValueStatus :: V2MetricValueStatus -> Maybe Int
$sel:v2MetricValueStatusAverageValue:V2MetricValueStatus :: V2MetricValueStatus -> Maybe Quantity
$sel:v2MetricValueStatusValue:V2MetricValueStatus :: V2MetricValueStatus -> Maybe Quantity
v2MetricValueStatusAverageUtilization :: Maybe Int
v2MetricValueStatusAverageValue :: Maybe Quantity
v2MetricValueStatusValue :: Maybe Quantity
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"averageUtilization" Key -> Maybe Int -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
v2MetricValueStatusAverageUtilization
      , Key
"averageValue" Key -> Maybe Quantity -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Quantity
v2MetricValueStatusAverageValue
      , Key
"value" Key -> Maybe Quantity -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Quantity
v2MetricValueStatusValue
      ]


-- | Construct a value of type 'V2MetricValueStatus' (by applying it's required fields, if any)
mkV2MetricValueStatus
  :: V2MetricValueStatus
mkV2MetricValueStatus :: V2MetricValueStatus
mkV2MetricValueStatus =
  V2MetricValueStatus
  { $sel:v2MetricValueStatusAverageUtilization:V2MetricValueStatus :: Maybe Int
v2MetricValueStatusAverageUtilization = Maybe Int
forall a. Maybe a
Nothing
  , $sel:v2MetricValueStatusAverageValue:V2MetricValueStatus :: Maybe Quantity
v2MetricValueStatusAverageValue = Maybe Quantity
forall a. Maybe a
Nothing
  , $sel:v2MetricValueStatusValue:V2MetricValueStatus :: Maybe Quantity
v2MetricValueStatusValue = Maybe Quantity
forall a. Maybe a
Nothing
  }

-- ** V2ObjectMetricSource
-- | V2ObjectMetricSource
-- ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).
data V2ObjectMetricSource = V2ObjectMetricSource
  { V2ObjectMetricSource -> V2CrossVersionObjectReference
v2ObjectMetricSourceDescribedObject :: !(V2CrossVersionObjectReference) -- ^ /Required/ "describedObject"
  , V2ObjectMetricSource -> V2MetricIdentifier
v2ObjectMetricSourceMetric :: !(V2MetricIdentifier) -- ^ /Required/ "metric"
  , V2ObjectMetricSource -> V2MetricTarget
v2ObjectMetricSourceTarget :: !(V2MetricTarget) -- ^ /Required/ "target"
  } deriving (Int -> V2ObjectMetricSource -> ShowS
[V2ObjectMetricSource] -> ShowS
V2ObjectMetricSource -> String
(Int -> V2ObjectMetricSource -> ShowS)
-> (V2ObjectMetricSource -> String)
-> ([V2ObjectMetricSource] -> ShowS)
-> Show V2ObjectMetricSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V2ObjectMetricSource -> ShowS
showsPrec :: Int -> V2ObjectMetricSource -> ShowS
$cshow :: V2ObjectMetricSource -> String
show :: V2ObjectMetricSource -> String
$cshowList :: [V2ObjectMetricSource] -> ShowS
showList :: [V2ObjectMetricSource] -> ShowS
P.Show, V2ObjectMetricSource -> V2ObjectMetricSource -> Bool
(V2ObjectMetricSource -> V2ObjectMetricSource -> Bool)
-> (V2ObjectMetricSource -> V2ObjectMetricSource -> Bool)
-> Eq V2ObjectMetricSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V2ObjectMetricSource -> V2ObjectMetricSource -> Bool
== :: V2ObjectMetricSource -> V2ObjectMetricSource -> Bool
$c/= :: V2ObjectMetricSource -> V2ObjectMetricSource -> Bool
/= :: V2ObjectMetricSource -> V2ObjectMetricSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V2ObjectMetricSource
instance A.FromJSON V2ObjectMetricSource where
  parseJSON :: Value -> Parser V2ObjectMetricSource
parseJSON = String
-> (Object -> Parser V2ObjectMetricSource)
-> Value
-> Parser V2ObjectMetricSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V2ObjectMetricSource" ((Object -> Parser V2ObjectMetricSource)
 -> Value -> Parser V2ObjectMetricSource)
-> (Object -> Parser V2ObjectMetricSource)
-> Value
-> Parser V2ObjectMetricSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    V2CrossVersionObjectReference
-> V2MetricIdentifier -> V2MetricTarget -> V2ObjectMetricSource
V2ObjectMetricSource
      (V2CrossVersionObjectReference
 -> V2MetricIdentifier -> V2MetricTarget -> V2ObjectMetricSource)
-> Parser V2CrossVersionObjectReference
-> Parser
     (V2MetricIdentifier -> V2MetricTarget -> V2ObjectMetricSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser V2CrossVersionObjectReference
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"describedObject")
      Parser
  (V2MetricIdentifier -> V2MetricTarget -> V2ObjectMetricSource)
-> Parser V2MetricIdentifier
-> Parser (V2MetricTarget -> V2ObjectMetricSource)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V2MetricIdentifier
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"metric")
      Parser (V2MetricTarget -> V2ObjectMetricSource)
-> Parser V2MetricTarget -> Parser V2ObjectMetricSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V2MetricTarget
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"target")

-- | ToJSON V2ObjectMetricSource
instance A.ToJSON V2ObjectMetricSource where
  toJSON :: V2ObjectMetricSource -> Value
toJSON V2ObjectMetricSource {V2MetricTarget
V2MetricIdentifier
V2CrossVersionObjectReference
$sel:v2ObjectMetricSourceDescribedObject:V2ObjectMetricSource :: V2ObjectMetricSource -> V2CrossVersionObjectReference
$sel:v2ObjectMetricSourceMetric:V2ObjectMetricSource :: V2ObjectMetricSource -> V2MetricIdentifier
$sel:v2ObjectMetricSourceTarget:V2ObjectMetricSource :: V2ObjectMetricSource -> V2MetricTarget
v2ObjectMetricSourceDescribedObject :: V2CrossVersionObjectReference
v2ObjectMetricSourceMetric :: V2MetricIdentifier
v2ObjectMetricSourceTarget :: V2MetricTarget
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"describedObject" Key -> V2CrossVersionObjectReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V2CrossVersionObjectReference
v2ObjectMetricSourceDescribedObject
      , Key
"metric" Key -> V2MetricIdentifier -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V2MetricIdentifier
v2ObjectMetricSourceMetric
      , Key
"target" Key -> V2MetricTarget -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V2MetricTarget
v2ObjectMetricSourceTarget
      ]


-- | Construct a value of type 'V2ObjectMetricSource' (by applying it's required fields, if any)
mkV2ObjectMetricSource
  :: V2CrossVersionObjectReference -- ^ 'v2ObjectMetricSourceDescribedObject' 
  -> V2MetricIdentifier -- ^ 'v2ObjectMetricSourceMetric' 
  -> V2MetricTarget -- ^ 'v2ObjectMetricSourceTarget' 
  -> V2ObjectMetricSource
mkV2ObjectMetricSource :: V2CrossVersionObjectReference
-> V2MetricIdentifier -> V2MetricTarget -> V2ObjectMetricSource
mkV2ObjectMetricSource V2CrossVersionObjectReference
v2ObjectMetricSourceDescribedObject V2MetricIdentifier
v2ObjectMetricSourceMetric V2MetricTarget
v2ObjectMetricSourceTarget =
  V2ObjectMetricSource
  { V2CrossVersionObjectReference
$sel:v2ObjectMetricSourceDescribedObject:V2ObjectMetricSource :: V2CrossVersionObjectReference
v2ObjectMetricSourceDescribedObject :: V2CrossVersionObjectReference
v2ObjectMetricSourceDescribedObject
  , V2MetricIdentifier
$sel:v2ObjectMetricSourceMetric:V2ObjectMetricSource :: V2MetricIdentifier
v2ObjectMetricSourceMetric :: V2MetricIdentifier
v2ObjectMetricSourceMetric
  , V2MetricTarget
$sel:v2ObjectMetricSourceTarget:V2ObjectMetricSource :: V2MetricTarget
v2ObjectMetricSourceTarget :: V2MetricTarget
v2ObjectMetricSourceTarget
  }

-- ** V2ObjectMetricStatus
-- | V2ObjectMetricStatus
-- ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).
data V2ObjectMetricStatus = V2ObjectMetricStatus
  { V2ObjectMetricStatus -> V2MetricValueStatus
v2ObjectMetricStatusCurrent :: !(V2MetricValueStatus) -- ^ /Required/ "current"
  , V2ObjectMetricStatus -> V2CrossVersionObjectReference
v2ObjectMetricStatusDescribedObject :: !(V2CrossVersionObjectReference) -- ^ /Required/ "describedObject"
  , V2ObjectMetricStatus -> V2MetricIdentifier
v2ObjectMetricStatusMetric :: !(V2MetricIdentifier) -- ^ /Required/ "metric"
  } deriving (Int -> V2ObjectMetricStatus -> ShowS
[V2ObjectMetricStatus] -> ShowS
V2ObjectMetricStatus -> String
(Int -> V2ObjectMetricStatus -> ShowS)
-> (V2ObjectMetricStatus -> String)
-> ([V2ObjectMetricStatus] -> ShowS)
-> Show V2ObjectMetricStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V2ObjectMetricStatus -> ShowS
showsPrec :: Int -> V2ObjectMetricStatus -> ShowS
$cshow :: V2ObjectMetricStatus -> String
show :: V2ObjectMetricStatus -> String
$cshowList :: [V2ObjectMetricStatus] -> ShowS
showList :: [V2ObjectMetricStatus] -> ShowS
P.Show, V2ObjectMetricStatus -> V2ObjectMetricStatus -> Bool
(V2ObjectMetricStatus -> V2ObjectMetricStatus -> Bool)
-> (V2ObjectMetricStatus -> V2ObjectMetricStatus -> Bool)
-> Eq V2ObjectMetricStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V2ObjectMetricStatus -> V2ObjectMetricStatus -> Bool
== :: V2ObjectMetricStatus -> V2ObjectMetricStatus -> Bool
$c/= :: V2ObjectMetricStatus -> V2ObjectMetricStatus -> Bool
/= :: V2ObjectMetricStatus -> V2ObjectMetricStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V2ObjectMetricStatus
instance A.FromJSON V2ObjectMetricStatus where
  parseJSON :: Value -> Parser V2ObjectMetricStatus
parseJSON = String
-> (Object -> Parser V2ObjectMetricStatus)
-> Value
-> Parser V2ObjectMetricStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V2ObjectMetricStatus" ((Object -> Parser V2ObjectMetricStatus)
 -> Value -> Parser V2ObjectMetricStatus)
-> (Object -> Parser V2ObjectMetricStatus)
-> Value
-> Parser V2ObjectMetricStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    V2MetricValueStatus
-> V2CrossVersionObjectReference
-> V2MetricIdentifier
-> V2ObjectMetricStatus
V2ObjectMetricStatus
      (V2MetricValueStatus
 -> V2CrossVersionObjectReference
 -> V2MetricIdentifier
 -> V2ObjectMetricStatus)
-> Parser V2MetricValueStatus
-> Parser
     (V2CrossVersionObjectReference
      -> V2MetricIdentifier -> V2ObjectMetricStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser V2MetricValueStatus
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"current")
      Parser
  (V2CrossVersionObjectReference
   -> V2MetricIdentifier -> V2ObjectMetricStatus)
-> Parser V2CrossVersionObjectReference
-> Parser (V2MetricIdentifier -> V2ObjectMetricStatus)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V2CrossVersionObjectReference
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"describedObject")
      Parser (V2MetricIdentifier -> V2ObjectMetricStatus)
-> Parser V2MetricIdentifier -> Parser V2ObjectMetricStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V2MetricIdentifier
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"metric")

-- | ToJSON V2ObjectMetricStatus
instance A.ToJSON V2ObjectMetricStatus where
  toJSON :: V2ObjectMetricStatus -> Value
toJSON V2ObjectMetricStatus {V2MetricValueStatus
V2MetricIdentifier
V2CrossVersionObjectReference
$sel:v2ObjectMetricStatusCurrent:V2ObjectMetricStatus :: V2ObjectMetricStatus -> V2MetricValueStatus
$sel:v2ObjectMetricStatusDescribedObject:V2ObjectMetricStatus :: V2ObjectMetricStatus -> V2CrossVersionObjectReference
$sel:v2ObjectMetricStatusMetric:V2ObjectMetricStatus :: V2ObjectMetricStatus -> V2MetricIdentifier
v2ObjectMetricStatusCurrent :: V2MetricValueStatus
v2ObjectMetricStatusDescribedObject :: V2CrossVersionObjectReference
v2ObjectMetricStatusMetric :: V2MetricIdentifier
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"current" Key -> V2MetricValueStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V2MetricValueStatus
v2ObjectMetricStatusCurrent
      , Key
"describedObject" Key -> V2CrossVersionObjectReference -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V2CrossVersionObjectReference
v2ObjectMetricStatusDescribedObject
      , Key
"metric" Key -> V2MetricIdentifier -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V2MetricIdentifier
v2ObjectMetricStatusMetric
      ]


-- | Construct a value of type 'V2ObjectMetricStatus' (by applying it's required fields, if any)
mkV2ObjectMetricStatus
  :: V2MetricValueStatus -- ^ 'v2ObjectMetricStatusCurrent' 
  -> V2CrossVersionObjectReference -- ^ 'v2ObjectMetricStatusDescribedObject' 
  -> V2MetricIdentifier -- ^ 'v2ObjectMetricStatusMetric' 
  -> V2ObjectMetricStatus
mkV2ObjectMetricStatus :: V2MetricValueStatus
-> V2CrossVersionObjectReference
-> V2MetricIdentifier
-> V2ObjectMetricStatus
mkV2ObjectMetricStatus V2MetricValueStatus
v2ObjectMetricStatusCurrent V2CrossVersionObjectReference
v2ObjectMetricStatusDescribedObject V2MetricIdentifier
v2ObjectMetricStatusMetric =
  V2ObjectMetricStatus
  { V2MetricValueStatus
$sel:v2ObjectMetricStatusCurrent:V2ObjectMetricStatus :: V2MetricValueStatus
v2ObjectMetricStatusCurrent :: V2MetricValueStatus
v2ObjectMetricStatusCurrent
  , V2CrossVersionObjectReference
$sel:v2ObjectMetricStatusDescribedObject:V2ObjectMetricStatus :: V2CrossVersionObjectReference
v2ObjectMetricStatusDescribedObject :: V2CrossVersionObjectReference
v2ObjectMetricStatusDescribedObject
  , V2MetricIdentifier
$sel:v2ObjectMetricStatusMetric:V2ObjectMetricStatus :: V2MetricIdentifier
v2ObjectMetricStatusMetric :: V2MetricIdentifier
v2ObjectMetricStatusMetric
  }

-- ** V2PodsMetricSource
-- | V2PodsMetricSource
-- PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.
data V2PodsMetricSource = V2PodsMetricSource
  { V2PodsMetricSource -> V2MetricIdentifier
v2PodsMetricSourceMetric :: !(V2MetricIdentifier) -- ^ /Required/ "metric"
  , V2PodsMetricSource -> V2MetricTarget
v2PodsMetricSourceTarget :: !(V2MetricTarget) -- ^ /Required/ "target"
  } deriving (Int -> V2PodsMetricSource -> ShowS
[V2PodsMetricSource] -> ShowS
V2PodsMetricSource -> String
(Int -> V2PodsMetricSource -> ShowS)
-> (V2PodsMetricSource -> String)
-> ([V2PodsMetricSource] -> ShowS)
-> Show V2PodsMetricSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V2PodsMetricSource -> ShowS
showsPrec :: Int -> V2PodsMetricSource -> ShowS
$cshow :: V2PodsMetricSource -> String
show :: V2PodsMetricSource -> String
$cshowList :: [V2PodsMetricSource] -> ShowS
showList :: [V2PodsMetricSource] -> ShowS
P.Show, V2PodsMetricSource -> V2PodsMetricSource -> Bool
(V2PodsMetricSource -> V2PodsMetricSource -> Bool)
-> (V2PodsMetricSource -> V2PodsMetricSource -> Bool)
-> Eq V2PodsMetricSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V2PodsMetricSource -> V2PodsMetricSource -> Bool
== :: V2PodsMetricSource -> V2PodsMetricSource -> Bool
$c/= :: V2PodsMetricSource -> V2PodsMetricSource -> Bool
/= :: V2PodsMetricSource -> V2PodsMetricSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V2PodsMetricSource
instance A.FromJSON V2PodsMetricSource where
  parseJSON :: Value -> Parser V2PodsMetricSource
parseJSON = String
-> (Object -> Parser V2PodsMetricSource)
-> Value
-> Parser V2PodsMetricSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V2PodsMetricSource" ((Object -> Parser V2PodsMetricSource)
 -> Value -> Parser V2PodsMetricSource)
-> (Object -> Parser V2PodsMetricSource)
-> Value
-> Parser V2PodsMetricSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    V2MetricIdentifier -> V2MetricTarget -> V2PodsMetricSource
V2PodsMetricSource
      (V2MetricIdentifier -> V2MetricTarget -> V2PodsMetricSource)
-> Parser V2MetricIdentifier
-> Parser (V2MetricTarget -> V2PodsMetricSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser V2MetricIdentifier
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"metric")
      Parser (V2MetricTarget -> V2PodsMetricSource)
-> Parser V2MetricTarget -> Parser V2PodsMetricSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V2MetricTarget
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"target")

-- | ToJSON V2PodsMetricSource
instance A.ToJSON V2PodsMetricSource where
  toJSON :: V2PodsMetricSource -> Value
toJSON V2PodsMetricSource {V2MetricTarget
V2MetricIdentifier
$sel:v2PodsMetricSourceMetric:V2PodsMetricSource :: V2PodsMetricSource -> V2MetricIdentifier
$sel:v2PodsMetricSourceTarget:V2PodsMetricSource :: V2PodsMetricSource -> V2MetricTarget
v2PodsMetricSourceMetric :: V2MetricIdentifier
v2PodsMetricSourceTarget :: V2MetricTarget
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"metric" Key -> V2MetricIdentifier -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V2MetricIdentifier
v2PodsMetricSourceMetric
      , Key
"target" Key -> V2MetricTarget -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V2MetricTarget
v2PodsMetricSourceTarget
      ]


-- | Construct a value of type 'V2PodsMetricSource' (by applying it's required fields, if any)
mkV2PodsMetricSource
  :: V2MetricIdentifier -- ^ 'v2PodsMetricSourceMetric' 
  -> V2MetricTarget -- ^ 'v2PodsMetricSourceTarget' 
  -> V2PodsMetricSource
mkV2PodsMetricSource :: V2MetricIdentifier -> V2MetricTarget -> V2PodsMetricSource
mkV2PodsMetricSource V2MetricIdentifier
v2PodsMetricSourceMetric V2MetricTarget
v2PodsMetricSourceTarget =
  V2PodsMetricSource
  { V2MetricIdentifier
$sel:v2PodsMetricSourceMetric:V2PodsMetricSource :: V2MetricIdentifier
v2PodsMetricSourceMetric :: V2MetricIdentifier
v2PodsMetricSourceMetric
  , V2MetricTarget
$sel:v2PodsMetricSourceTarget:V2PodsMetricSource :: V2MetricTarget
v2PodsMetricSourceTarget :: V2MetricTarget
v2PodsMetricSourceTarget
  }

-- ** V2PodsMetricStatus
-- | V2PodsMetricStatus
-- PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).
data V2PodsMetricStatus = V2PodsMetricStatus
  { V2PodsMetricStatus -> V2MetricValueStatus
v2PodsMetricStatusCurrent :: !(V2MetricValueStatus) -- ^ /Required/ "current"
  , V2PodsMetricStatus -> V2MetricIdentifier
v2PodsMetricStatusMetric :: !(V2MetricIdentifier) -- ^ /Required/ "metric"
  } deriving (Int -> V2PodsMetricStatus -> ShowS
[V2PodsMetricStatus] -> ShowS
V2PodsMetricStatus -> String
(Int -> V2PodsMetricStatus -> ShowS)
-> (V2PodsMetricStatus -> String)
-> ([V2PodsMetricStatus] -> ShowS)
-> Show V2PodsMetricStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V2PodsMetricStatus -> ShowS
showsPrec :: Int -> V2PodsMetricStatus -> ShowS
$cshow :: V2PodsMetricStatus -> String
show :: V2PodsMetricStatus -> String
$cshowList :: [V2PodsMetricStatus] -> ShowS
showList :: [V2PodsMetricStatus] -> ShowS
P.Show, V2PodsMetricStatus -> V2PodsMetricStatus -> Bool
(V2PodsMetricStatus -> V2PodsMetricStatus -> Bool)
-> (V2PodsMetricStatus -> V2PodsMetricStatus -> Bool)
-> Eq V2PodsMetricStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V2PodsMetricStatus -> V2PodsMetricStatus -> Bool
== :: V2PodsMetricStatus -> V2PodsMetricStatus -> Bool
$c/= :: V2PodsMetricStatus -> V2PodsMetricStatus -> Bool
/= :: V2PodsMetricStatus -> V2PodsMetricStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V2PodsMetricStatus
instance A.FromJSON V2PodsMetricStatus where
  parseJSON :: Value -> Parser V2PodsMetricStatus
parseJSON = String
-> (Object -> Parser V2PodsMetricStatus)
-> Value
-> Parser V2PodsMetricStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V2PodsMetricStatus" ((Object -> Parser V2PodsMetricStatus)
 -> Value -> Parser V2PodsMetricStatus)
-> (Object -> Parser V2PodsMetricStatus)
-> Value
-> Parser V2PodsMetricStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    V2MetricValueStatus -> V2MetricIdentifier -> V2PodsMetricStatus
V2PodsMetricStatus
      (V2MetricValueStatus -> V2MetricIdentifier -> V2PodsMetricStatus)
-> Parser V2MetricValueStatus
-> Parser (V2MetricIdentifier -> V2PodsMetricStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser V2MetricValueStatus
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"current")
      Parser (V2MetricIdentifier -> V2PodsMetricStatus)
-> Parser V2MetricIdentifier -> Parser V2PodsMetricStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V2MetricIdentifier
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"metric")

-- | ToJSON V2PodsMetricStatus
instance A.ToJSON V2PodsMetricStatus where
  toJSON :: V2PodsMetricStatus -> Value
toJSON V2PodsMetricStatus {V2MetricValueStatus
V2MetricIdentifier
$sel:v2PodsMetricStatusCurrent:V2PodsMetricStatus :: V2PodsMetricStatus -> V2MetricValueStatus
$sel:v2PodsMetricStatusMetric:V2PodsMetricStatus :: V2PodsMetricStatus -> V2MetricIdentifier
v2PodsMetricStatusCurrent :: V2MetricValueStatus
v2PodsMetricStatusMetric :: V2MetricIdentifier
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"current" Key -> V2MetricValueStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V2MetricValueStatus
v2PodsMetricStatusCurrent
      , Key
"metric" Key -> V2MetricIdentifier -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V2MetricIdentifier
v2PodsMetricStatusMetric
      ]


-- | Construct a value of type 'V2PodsMetricStatus' (by applying it's required fields, if any)
mkV2PodsMetricStatus
  :: V2MetricValueStatus -- ^ 'v2PodsMetricStatusCurrent' 
  -> V2MetricIdentifier -- ^ 'v2PodsMetricStatusMetric' 
  -> V2PodsMetricStatus
mkV2PodsMetricStatus :: V2MetricValueStatus -> V2MetricIdentifier -> V2PodsMetricStatus
mkV2PodsMetricStatus V2MetricValueStatus
v2PodsMetricStatusCurrent V2MetricIdentifier
v2PodsMetricStatusMetric =
  V2PodsMetricStatus
  { V2MetricValueStatus
$sel:v2PodsMetricStatusCurrent:V2PodsMetricStatus :: V2MetricValueStatus
v2PodsMetricStatusCurrent :: V2MetricValueStatus
v2PodsMetricStatusCurrent
  , V2MetricIdentifier
$sel:v2PodsMetricStatusMetric:V2PodsMetricStatus :: V2MetricIdentifier
v2PodsMetricStatusMetric :: V2MetricIdentifier
v2PodsMetricStatusMetric
  }

-- ** V2ResourceMetricSource
-- | V2ResourceMetricSource
-- ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory).  The values will be averaged together before being compared to the target.  Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.  Only one \"target\" type should be set.
data V2ResourceMetricSource = V2ResourceMetricSource
  { V2ResourceMetricSource -> Text
v2ResourceMetricSourceName :: !(Text) -- ^ /Required/ "name" - name is the name of the resource in question.
  , V2ResourceMetricSource -> V2MetricTarget
v2ResourceMetricSourceTarget :: !(V2MetricTarget) -- ^ /Required/ "target"
  } deriving (Int -> V2ResourceMetricSource -> ShowS
[V2ResourceMetricSource] -> ShowS
V2ResourceMetricSource -> String
(Int -> V2ResourceMetricSource -> ShowS)
-> (V2ResourceMetricSource -> String)
-> ([V2ResourceMetricSource] -> ShowS)
-> Show V2ResourceMetricSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V2ResourceMetricSource -> ShowS
showsPrec :: Int -> V2ResourceMetricSource -> ShowS
$cshow :: V2ResourceMetricSource -> String
show :: V2ResourceMetricSource -> String
$cshowList :: [V2ResourceMetricSource] -> ShowS
showList :: [V2ResourceMetricSource] -> ShowS
P.Show, V2ResourceMetricSource -> V2ResourceMetricSource -> Bool
(V2ResourceMetricSource -> V2ResourceMetricSource -> Bool)
-> (V2ResourceMetricSource -> V2ResourceMetricSource -> Bool)
-> Eq V2ResourceMetricSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V2ResourceMetricSource -> V2ResourceMetricSource -> Bool
== :: V2ResourceMetricSource -> V2ResourceMetricSource -> Bool
$c/= :: V2ResourceMetricSource -> V2ResourceMetricSource -> Bool
/= :: V2ResourceMetricSource -> V2ResourceMetricSource -> Bool
P.Eq, P.Typeable)

-- | FromJSON V2ResourceMetricSource
instance A.FromJSON V2ResourceMetricSource where
  parseJSON :: Value -> Parser V2ResourceMetricSource
parseJSON = String
-> (Object -> Parser V2ResourceMetricSource)
-> Value
-> Parser V2ResourceMetricSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V2ResourceMetricSource" ((Object -> Parser V2ResourceMetricSource)
 -> Value -> Parser V2ResourceMetricSource)
-> (Object -> Parser V2ResourceMetricSource)
-> Value
-> Parser V2ResourceMetricSource
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text -> V2MetricTarget -> V2ResourceMetricSource
V2ResourceMetricSource
      (Text -> V2MetricTarget -> V2ResourceMetricSource)
-> Parser Text -> Parser (V2MetricTarget -> V2ResourceMetricSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")
      Parser (V2MetricTarget -> V2ResourceMetricSource)
-> Parser V2MetricTarget -> Parser V2ResourceMetricSource
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser V2MetricTarget
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"target")

-- | ToJSON V2ResourceMetricSource
instance A.ToJSON V2ResourceMetricSource where
  toJSON :: V2ResourceMetricSource -> Value
toJSON V2ResourceMetricSource {Text
V2MetricTarget
$sel:v2ResourceMetricSourceName:V2ResourceMetricSource :: V2ResourceMetricSource -> Text
$sel:v2ResourceMetricSourceTarget:V2ResourceMetricSource :: V2ResourceMetricSource -> V2MetricTarget
v2ResourceMetricSourceName :: Text
v2ResourceMetricSourceTarget :: V2MetricTarget
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v2ResourceMetricSourceName
      , Key
"target" Key -> V2MetricTarget -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V2MetricTarget
v2ResourceMetricSourceTarget
      ]


-- | Construct a value of type 'V2ResourceMetricSource' (by applying it's required fields, if any)
mkV2ResourceMetricSource
  :: Text -- ^ 'v2ResourceMetricSourceName': name is the name of the resource in question.
  -> V2MetricTarget -- ^ 'v2ResourceMetricSourceTarget' 
  -> V2ResourceMetricSource
mkV2ResourceMetricSource :: Text -> V2MetricTarget -> V2ResourceMetricSource
mkV2ResourceMetricSource Text
v2ResourceMetricSourceName V2MetricTarget
v2ResourceMetricSourceTarget =
  V2ResourceMetricSource
  { Text
$sel:v2ResourceMetricSourceName:V2ResourceMetricSource :: Text
v2ResourceMetricSourceName :: Text
v2ResourceMetricSourceName
  , V2MetricTarget
$sel:v2ResourceMetricSourceTarget:V2ResourceMetricSource :: V2MetricTarget
v2ResourceMetricSourceTarget :: V2MetricTarget
v2ResourceMetricSourceTarget
  }

-- ** V2ResourceMetricStatus
-- | V2ResourceMetricStatus
-- ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory).  Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.
data V2ResourceMetricStatus = V2ResourceMetricStatus
  { V2ResourceMetricStatus -> V2MetricValueStatus
v2ResourceMetricStatusCurrent :: !(V2MetricValueStatus) -- ^ /Required/ "current"
  , V2ResourceMetricStatus -> Text
v2ResourceMetricStatusName :: !(Text) -- ^ /Required/ "name" - name is the name of the resource in question.
  } deriving (Int -> V2ResourceMetricStatus -> ShowS
[V2ResourceMetricStatus] -> ShowS
V2ResourceMetricStatus -> String
(Int -> V2ResourceMetricStatus -> ShowS)
-> (V2ResourceMetricStatus -> String)
-> ([V2ResourceMetricStatus] -> ShowS)
-> Show V2ResourceMetricStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> V2ResourceMetricStatus -> ShowS
showsPrec :: Int -> V2ResourceMetricStatus -> ShowS
$cshow :: V2ResourceMetricStatus -> String
show :: V2ResourceMetricStatus -> String
$cshowList :: [V2ResourceMetricStatus] -> ShowS
showList :: [V2ResourceMetricStatus] -> ShowS
P.Show, V2ResourceMetricStatus -> V2ResourceMetricStatus -> Bool
(V2ResourceMetricStatus -> V2ResourceMetricStatus -> Bool)
-> (V2ResourceMetricStatus -> V2ResourceMetricStatus -> Bool)
-> Eq V2ResourceMetricStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: V2ResourceMetricStatus -> V2ResourceMetricStatus -> Bool
== :: V2ResourceMetricStatus -> V2ResourceMetricStatus -> Bool
$c/= :: V2ResourceMetricStatus -> V2ResourceMetricStatus -> Bool
/= :: V2ResourceMetricStatus -> V2ResourceMetricStatus -> Bool
P.Eq, P.Typeable)

-- | FromJSON V2ResourceMetricStatus
instance A.FromJSON V2ResourceMetricStatus where
  parseJSON :: Value -> Parser V2ResourceMetricStatus
parseJSON = String
-> (Object -> Parser V2ResourceMetricStatus)
-> Value
-> Parser V2ResourceMetricStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"V2ResourceMetricStatus" ((Object -> Parser V2ResourceMetricStatus)
 -> Value -> Parser V2ResourceMetricStatus)
-> (Object -> Parser V2ResourceMetricStatus)
-> Value
-> Parser V2ResourceMetricStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    V2MetricValueStatus -> Text -> V2ResourceMetricStatus
V2ResourceMetricStatus
      (V2MetricValueStatus -> Text -> V2ResourceMetricStatus)
-> Parser V2MetricValueStatus
-> Parser (Text -> V2ResourceMetricStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser V2MetricValueStatus
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"current")
      Parser (Text -> V2ResourceMetricStatus)
-> Parser Text -> Parser V2ResourceMetricStatus
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"name")

-- | ToJSON V2ResourceMetricStatus
instance A.ToJSON V2ResourceMetricStatus where
  toJSON :: V2ResourceMetricStatus -> Value
toJSON V2ResourceMetricStatus {Text
V2MetricValueStatus
$sel:v2ResourceMetricStatusCurrent:V2ResourceMetricStatus :: V2ResourceMetricStatus -> V2MetricValueStatus
$sel:v2ResourceMetricStatusName:V2ResourceMetricStatus :: V2ResourceMetricStatus -> Text
v2ResourceMetricStatusCurrent :: V2MetricValueStatus
v2ResourceMetricStatusName :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"current" Key -> V2MetricValueStatus -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= V2MetricValueStatus
v2ResourceMetricStatusCurrent
      , Key
"name" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
v2ResourceMetricStatusName
      ]


-- | Construct a value of type 'V2ResourceMetricStatus' (by applying it's required fields, if any)
mkV2ResourceMetricStatus
  :: V2MetricValueStatus -- ^ 'v2ResourceMetricStatusCurrent' 
  -> Text -- ^ 'v2ResourceMetricStatusName': name is the name of the resource in question.
  -> V2ResourceMetricStatus
mkV2ResourceMetricStatus :: V2MetricValueStatus -> Text -> V2ResourceMetricStatus
mkV2ResourceMetricStatus V2MetricValueStatus
v2ResourceMetricStatusCurrent Text
v2ResourceMetricStatusName =
  V2ResourceMetricStatus
  { V2MetricValueStatus
$sel:v2ResourceMetricStatusCurrent:V2ResourceMetricStatus :: V2MetricValueStatus
v2ResourceMetricStatusCurrent :: V2MetricValueStatus
v2ResourceMetricStatusCurrent
  , Text
$sel:v2ResourceMetricStatusName:V2ResourceMetricStatus :: Text
v2ResourceMetricStatusName :: Text
v2ResourceMetricStatusName
  }

-- ** VersionInfo
-- | VersionInfo
-- Info contains versioning information. how we'll want to distribute that information.
data VersionInfo = VersionInfo
  { VersionInfo -> Text
versionInfoBuildDate :: !(Text) -- ^ /Required/ "buildDate"
  , VersionInfo -> Text
versionInfoCompiler :: !(Text) -- ^ /Required/ "compiler"
  , VersionInfo -> Text
versionInfoGitCommit :: !(Text) -- ^ /Required/ "gitCommit"
  , VersionInfo -> Text
versionInfoGitTreeState :: !(Text) -- ^ /Required/ "gitTreeState"
  , VersionInfo -> Text
versionInfoGitVersion :: !(Text) -- ^ /Required/ "gitVersion"
  , VersionInfo -> Text
versionInfoGoVersion :: !(Text) -- ^ /Required/ "goVersion"
  , VersionInfo -> Text
versionInfoMajor :: !(Text) -- ^ /Required/ "major"
  , VersionInfo -> Text
versionInfoMinor :: !(Text) -- ^ /Required/ "minor"
  , VersionInfo -> Text
versionInfoPlatform :: !(Text) -- ^ /Required/ "platform"
  } deriving (Int -> VersionInfo -> ShowS
[VersionInfo] -> ShowS
VersionInfo -> String
(Int -> VersionInfo -> ShowS)
-> (VersionInfo -> String)
-> ([VersionInfo] -> ShowS)
-> Show VersionInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> VersionInfo -> ShowS
showsPrec :: Int -> VersionInfo -> ShowS
$cshow :: VersionInfo -> String
show :: VersionInfo -> String
$cshowList :: [VersionInfo] -> ShowS
showList :: [VersionInfo] -> ShowS
P.Show, VersionInfo -> VersionInfo -> Bool
(VersionInfo -> VersionInfo -> Bool)
-> (VersionInfo -> VersionInfo -> Bool) -> Eq VersionInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: VersionInfo -> VersionInfo -> Bool
== :: VersionInfo -> VersionInfo -> Bool
$c/= :: VersionInfo -> VersionInfo -> Bool
/= :: VersionInfo -> VersionInfo -> Bool
P.Eq, P.Typeable)

-- | FromJSON VersionInfo
instance A.FromJSON VersionInfo where
  parseJSON :: Value -> Parser VersionInfo
parseJSON = String
-> (Object -> Parser VersionInfo) -> Value -> Parser VersionInfo
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"VersionInfo" ((Object -> Parser VersionInfo) -> Value -> Parser VersionInfo)
-> (Object -> Parser VersionInfo) -> Value -> Parser VersionInfo
forall a b. (a -> b) -> a -> b
$ \Object
o ->
    Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> VersionInfo
VersionInfo
      (Text
 -> Text
 -> Text
 -> Text
 -> Text
 -> Text
 -> Text
 -> Text
 -> Text
 -> VersionInfo)
-> Parser Text
-> Parser
     (Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> VersionInfo)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"buildDate")
      Parser
  (Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> VersionInfo)
-> Parser Text
-> Parser
     (Text
      -> Text -> Text -> Text -> Text -> Text -> Text -> VersionInfo)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"compiler")
      Parser
  (Text
   -> Text -> Text -> Text -> Text -> Text -> Text -> VersionInfo)
-> Parser Text
-> Parser
     (Text -> Text -> Text -> Text -> Text -> Text -> VersionInfo)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"gitCommit")
      Parser
  (Text -> Text -> Text -> Text -> Text -> Text -> VersionInfo)
-> Parser Text
-> Parser (Text -> Text -> Text -> Text -> Text -> VersionInfo)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"gitTreeState")
      Parser (Text -> Text -> Text -> Text -> Text -> VersionInfo)
-> Parser Text
-> Parser (Text -> Text -> Text -> Text -> VersionInfo)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"gitVersion")
      Parser (Text -> Text -> Text -> Text -> VersionInfo)
-> Parser Text -> Parser (Text -> Text -> Text -> VersionInfo)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"goVersion")
      Parser (Text -> Text -> Text -> VersionInfo)
-> Parser Text -> Parser (Text -> Text -> VersionInfo)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"major")
      Parser (Text -> Text -> VersionInfo)
-> Parser Text -> Parser (Text -> VersionInfo)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"minor")
      Parser (Text -> VersionInfo) -> Parser Text -> Parser VersionInfo
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.:  Key
"platform")

-- | ToJSON VersionInfo
instance A.ToJSON VersionInfo where
  toJSON :: VersionInfo -> Value
toJSON VersionInfo {Text
$sel:versionInfoBuildDate:VersionInfo :: VersionInfo -> Text
$sel:versionInfoCompiler:VersionInfo :: VersionInfo -> Text
$sel:versionInfoGitCommit:VersionInfo :: VersionInfo -> Text
$sel:versionInfoGitTreeState:VersionInfo :: VersionInfo -> Text
$sel:versionInfoGitVersion:VersionInfo :: VersionInfo -> Text
$sel:versionInfoGoVersion:VersionInfo :: VersionInfo -> Text
$sel:versionInfoMajor:VersionInfo :: VersionInfo -> Text
$sel:versionInfoMinor:VersionInfo :: VersionInfo -> Text
$sel:versionInfoPlatform:VersionInfo :: VersionInfo -> Text
versionInfoBuildDate :: Text
versionInfoCompiler :: Text
versionInfoGitCommit :: Text
versionInfoGitTreeState :: Text
versionInfoGitVersion :: Text
versionInfoGoVersion :: Text
versionInfoMajor :: Text
versionInfoMinor :: Text
versionInfoPlatform :: Text
..} =
   [(Key, Value)] -> Value
_omitNulls
      [ Key
"buildDate" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
versionInfoBuildDate
      , Key
"compiler" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
versionInfoCompiler
      , Key
"gitCommit" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
versionInfoGitCommit
      , Key
"gitTreeState" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
versionInfoGitTreeState
      , Key
"gitVersion" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
versionInfoGitVersion
      , Key
"goVersion" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
versionInfoGoVersion
      , Key
"major" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
versionInfoMajor
      , Key
"minor" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
versionInfoMinor
      , Key
"platform" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
versionInfoPlatform
      ]


-- | Construct a value of type 'VersionInfo' (by applying it's required fields, if any)
mkVersionInfo
  :: Text -- ^ 'versionInfoBuildDate' 
  -> Text -- ^ 'versionInfoCompiler' 
  -> Text -- ^ 'versionInfoGitCommit' 
  -> Text -- ^ 'versionInfoGitTreeState' 
  -> Text -- ^ 'versionInfoGitVersion' 
  -> Text -- ^ 'versionInfoGoVersion' 
  -> Text -- ^ 'versionInfoMajor' 
  -> Text -- ^ 'versionInfoMinor' 
  -> Text -- ^ 'versionInfoPlatform' 
  -> VersionInfo
mkVersionInfo :: Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> VersionInfo
mkVersionInfo Text
versionInfoBuildDate Text
versionInfoCompiler Text
versionInfoGitCommit Text
versionInfoGitTreeState Text
versionInfoGitVersion Text
versionInfoGoVersion Text
versionInfoMajor Text
versionInfoMinor Text
versionInfoPlatform =
  VersionInfo
  { Text
$sel:versionInfoBuildDate:VersionInfo :: Text
versionInfoBuildDate :: Text
versionInfoBuildDate
  , Text
$sel:versionInfoCompiler:VersionInfo :: Text
versionInfoCompiler :: Text
versionInfoCompiler
  , Text
$sel:versionInfoGitCommit:VersionInfo :: Text
versionInfoGitCommit :: Text
versionInfoGitCommit
  , Text
$sel:versionInfoGitTreeState:VersionInfo :: Text
versionInfoGitTreeState :: Text
versionInfoGitTreeState
  , Text
$sel:versionInfoGitVersion:VersionInfo :: Text
versionInfoGitVersion :: Text
versionInfoGitVersion
  , Text
$sel:versionInfoGoVersion:VersionInfo :: Text
versionInfoGoVersion :: Text
versionInfoGoVersion
  , Text
$sel:versionInfoMajor:VersionInfo :: Text
versionInfoMajor :: Text
versionInfoMajor
  , Text
$sel:versionInfoMinor:VersionInfo :: Text
versionInfoMinor :: Text
versionInfoMinor
  , Text
$sel:versionInfoPlatform:VersionInfo :: Text
versionInfoPlatform :: Text
versionInfoPlatform
  }




-- * Auth Methods

-- ** AuthApiKeyBearerToken
data AuthApiKeyBearerToken =
  AuthApiKeyBearerToken Text -- ^ secret
  deriving (AuthApiKeyBearerToken -> AuthApiKeyBearerToken -> Bool
(AuthApiKeyBearerToken -> AuthApiKeyBearerToken -> Bool)
-> (AuthApiKeyBearerToken -> AuthApiKeyBearerToken -> Bool)
-> Eq AuthApiKeyBearerToken
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AuthApiKeyBearerToken -> AuthApiKeyBearerToken -> Bool
== :: AuthApiKeyBearerToken -> AuthApiKeyBearerToken -> Bool
$c/= :: AuthApiKeyBearerToken -> AuthApiKeyBearerToken -> Bool
/= :: AuthApiKeyBearerToken -> AuthApiKeyBearerToken -> Bool
P.Eq, Int -> AuthApiKeyBearerToken -> ShowS
[AuthApiKeyBearerToken] -> ShowS
AuthApiKeyBearerToken -> String
(Int -> AuthApiKeyBearerToken -> ShowS)
-> (AuthApiKeyBearerToken -> String)
-> ([AuthApiKeyBearerToken] -> ShowS)
-> Show AuthApiKeyBearerToken
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AuthApiKeyBearerToken -> ShowS
showsPrec :: Int -> AuthApiKeyBearerToken -> ShowS
$cshow :: AuthApiKeyBearerToken -> String
show :: AuthApiKeyBearerToken -> String
$cshowList :: [AuthApiKeyBearerToken] -> ShowS
showList :: [AuthApiKeyBearerToken] -> ShowS
P.Show, P.Typeable)

instance AuthMethod AuthApiKeyBearerToken where
  applyAuthMethod :: forall req contentType res accept.
KubernetesClientConfig
-> AuthApiKeyBearerToken
-> KubernetesRequest req contentType res accept
-> IO (KubernetesRequest req contentType res accept)
applyAuthMethod KubernetesClientConfig
_ a :: AuthApiKeyBearerToken
a@(AuthApiKeyBearerToken Text
secret) KubernetesRequest req contentType res accept
req =
    KubernetesRequest req contentType res accept
-> IO (KubernetesRequest req contentType res accept)
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
P.pure (KubernetesRequest req contentType res accept
 -> IO (KubernetesRequest req contentType res accept))
-> KubernetesRequest req contentType res accept
-> IO (KubernetesRequest req contentType res accept)
forall a b. (a -> b) -> a -> b
$
    if (AuthApiKeyBearerToken -> TypeRep
forall a. Typeable a => a -> TypeRep
P.typeOf AuthApiKeyBearerToken
a TypeRep -> [TypeRep] -> Bool
forall a. Eq a => a -> [a] -> Bool
forall (t :: * -> *) a. (Foldable t, Eq a) => a -> t a -> Bool
`P.elem` KubernetesRequest req contentType res accept -> [TypeRep]
forall req contentType res accept.
KubernetesRequest req contentType res accept -> [TypeRep]
rAuthTypes KubernetesRequest req contentType res accept
req)
      then KubernetesRequest req contentType res accept
req KubernetesRequest req contentType res accept
-> [Header] -> KubernetesRequest req contentType res accept
forall req contentType res accept.
KubernetesRequest req contentType res accept
-> [Header] -> KubernetesRequest req contentType res accept
`setHeader` (HeaderName, Text) -> [Header]
forall a. ToHttpApiData a => (HeaderName, a) -> [Header]
toHeader (HeaderName
"authorization", Text
secret)
           KubernetesRequest req contentType res accept
-> (KubernetesRequest req contentType res accept
    -> KubernetesRequest req contentType res accept)
-> KubernetesRequest req contentType res accept
forall a b. a -> (a -> b) -> b
& ASetter
  (KubernetesRequest req contentType res accept)
  (KubernetesRequest req contentType res accept)
  [TypeRep]
  [TypeRep]
-> ([TypeRep] -> [TypeRep])
-> KubernetesRequest req contentType res accept
-> KubernetesRequest req contentType res accept
forall s t a b. ASetter s t a b -> (a -> b) -> s -> t
L.over ASetter
  (KubernetesRequest req contentType res accept)
  (KubernetesRequest req contentType res accept)
  [TypeRep]
  [TypeRep]
forall req contentType res accept (f :: * -> *).
Functor f =>
([TypeRep] -> f [TypeRep])
-> KubernetesRequest req contentType res accept
-> f (KubernetesRequest req contentType res accept)
rAuthTypesL ((TypeRep -> Bool) -> [TypeRep] -> [TypeRep]
forall a. (a -> Bool) -> [a] -> [a]
P.filter (TypeRep -> TypeRep -> Bool
forall a. Eq a => a -> a -> Bool
/= AuthApiKeyBearerToken -> TypeRep
forall a. Typeable a => a -> TypeRep
P.typeOf AuthApiKeyBearerToken
a))
      else KubernetesRequest req contentType res accept
req