{-
   Kubernetes

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

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

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

{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveTraversable #-}
{-# 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


-- ** Body
newtype Body = Body { unBody :: A.Value } deriving (P.Eq, P.Show, A.ToJSON)

-- ** Command
newtype Command = Command { unCommand :: Text } deriving (P.Eq, P.Show)

-- ** Container
newtype Container = Container { unContainer :: Text } deriving (P.Eq, P.Show)

-- ** Continue
newtype Continue = Continue { unContinue :: Text } deriving (P.Eq, P.Show)

-- ** DryRun
newtype DryRun = DryRun { unDryRun :: Text } deriving (P.Eq, P.Show)

-- ** Exact
newtype Exact = Exact { unExact :: Bool } deriving (P.Eq, P.Show)

-- ** Export
newtype Export = Export { unExport :: Bool } deriving (P.Eq, P.Show)

-- ** FieldManager
newtype FieldManager = FieldManager { unFieldManager :: Text } deriving (P.Eq, P.Show)

-- ** FieldSelector
newtype FieldSelector = FieldSelector { unFieldSelector :: Text } deriving (P.Eq, P.Show)

-- ** Follow
newtype Follow = Follow { unFollow :: Bool } deriving (P.Eq, P.Show)

-- ** Force
newtype Force = Force { unForce :: Bool } deriving (P.Eq, P.Show)

-- ** GracePeriodSeconds
newtype GracePeriodSeconds = GracePeriodSeconds { unGracePeriodSeconds :: Int } deriving (P.Eq, P.Show)

-- ** Group
newtype Group = Group { unGroup :: Text } deriving (P.Eq, P.Show)

-- ** LabelSelector
newtype LabelSelector = LabelSelector { unLabelSelector :: Text } deriving (P.Eq, P.Show)

-- ** Limit
newtype Limit = Limit { unLimit :: Int } deriving (P.Eq, P.Show)

-- ** LimitBytes
newtype LimitBytes = LimitBytes { unLimitBytes :: Int } deriving (P.Eq, P.Show)

-- ** Logpath
newtype Logpath = Logpath { unLogpath :: Text } deriving (P.Eq, P.Show)

-- ** Name
newtype Name = Name { unName :: Text } deriving (P.Eq, P.Show)

-- ** Namespace
newtype Namespace = Namespace { unNamespace :: Text } deriving (P.Eq, P.Show)

-- ** OrphanDependents
newtype OrphanDependents = OrphanDependents { unOrphanDependents :: Bool } deriving (P.Eq, P.Show)

-- ** Path
newtype Path = Path { unPath :: Text } deriving (P.Eq, P.Show)

-- ** Path2
newtype Path2 = Path2 { unPath2 :: Text } deriving (P.Eq, P.Show)

-- ** Plural
newtype Plural = Plural { unPlural :: Text } deriving (P.Eq, P.Show)

-- ** Ports
newtype Ports = Ports { unPorts :: Int } deriving (P.Eq, P.Show)

-- ** Pretty
newtype Pretty = Pretty { unPretty :: Text } deriving (P.Eq, P.Show)

-- ** Previous
newtype Previous = Previous { unPrevious :: Bool } deriving (P.Eq, P.Show)

-- ** PropagationPolicy
newtype PropagationPolicy = PropagationPolicy { unPropagationPolicy :: Text } deriving (P.Eq, P.Show)

-- ** ResourceVersion
newtype ResourceVersion = ResourceVersion { unResourceVersion :: Text } deriving (P.Eq, P.Show)

-- ** SinceSeconds
newtype SinceSeconds = SinceSeconds { unSinceSeconds :: Int } deriving (P.Eq, P.Show)

-- ** Stderr
newtype Stderr = Stderr { unStderr :: Bool } deriving (P.Eq, P.Show)

-- ** Stdin
newtype Stdin = Stdin { unStdin :: Bool } deriving (P.Eq, P.Show)

-- ** Stdout
newtype Stdout = Stdout { unStdout :: Bool } deriving (P.Eq, P.Show)

-- ** TailLines
newtype TailLines = TailLines { unTailLines :: Int } deriving (P.Eq, P.Show)

-- ** TimeoutSeconds
newtype TimeoutSeconds = TimeoutSeconds { unTimeoutSeconds :: Int } deriving (P.Eq, P.Show)

-- ** Timestamps
newtype Timestamps = Timestamps { unTimestamps :: Bool } deriving (P.Eq, P.Show)

-- ** Tty
newtype Tty = Tty { unTty :: Bool } deriving (P.Eq, P.Show)

-- ** Version
newtype Version = Version { unVersion :: Text } deriving (P.Eq, P.Show)

-- ** Watch
newtype Watch = Watch { unWatch :: Bool } deriving (P.Eq, P.Show)

-- * Models


-- ** AdmissionregistrationV1beta1ServiceReference
-- | AdmissionregistrationV1beta1ServiceReference
-- ServiceReference holds a reference to Service.legacy.k8s.io
data AdmissionregistrationV1beta1ServiceReference = AdmissionregistrationV1beta1ServiceReference
  { admissionregistrationV1beta1ServiceReferenceName :: !(Text) -- ^ /Required/ "name" - &#x60;name&#x60; is the name of the service. Required
  , admissionregistrationV1beta1ServiceReferenceNamespace :: !(Text) -- ^ /Required/ "namespace" - &#x60;namespace&#x60; is the namespace of the service. Required
  , admissionregistrationV1beta1ServiceReferencePath :: !(Maybe Text) -- ^ "path" - &#x60;path&#x60; is an optional URL path which will be sent in any request to this service.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON AdmissionregistrationV1beta1ServiceReference
instance A.FromJSON AdmissionregistrationV1beta1ServiceReference where
  parseJSON = A.withObject "AdmissionregistrationV1beta1ServiceReference" $ \o ->
    AdmissionregistrationV1beta1ServiceReference
      <$> (o .:  "name")
      <*> (o .:  "namespace")
      <*> (o .:? "path")

-- | ToJSON AdmissionregistrationV1beta1ServiceReference
instance A.ToJSON AdmissionregistrationV1beta1ServiceReference where
  toJSON AdmissionregistrationV1beta1ServiceReference {..} =
   _omitNulls
      [ "name" .= admissionregistrationV1beta1ServiceReferenceName
      , "namespace" .= admissionregistrationV1beta1ServiceReferenceNamespace
      , "path" .= admissionregistrationV1beta1ServiceReferencePath
      ]


-- | Construct a value of type 'AdmissionregistrationV1beta1ServiceReference' (by applying it's required fields, if any)
mkAdmissionregistrationV1beta1ServiceReference
  :: Text -- ^ 'admissionregistrationV1beta1ServiceReferenceName': `name` is the name of the service. Required
  -> Text -- ^ 'admissionregistrationV1beta1ServiceReferenceNamespace': `namespace` is the namespace of the service. Required
  -> AdmissionregistrationV1beta1ServiceReference
mkAdmissionregistrationV1beta1ServiceReference admissionregistrationV1beta1ServiceReferenceName admissionregistrationV1beta1ServiceReferenceNamespace =
  AdmissionregistrationV1beta1ServiceReference
  { admissionregistrationV1beta1ServiceReferenceName
  , admissionregistrationV1beta1ServiceReferenceNamespace
  , admissionregistrationV1beta1ServiceReferencePath = Nothing
  }

-- ** AdmissionregistrationV1beta1WebhookClientConfig
-- | AdmissionregistrationV1beta1WebhookClientConfig
-- WebhookClientConfig contains the information to make a TLS connection with the webhook
data AdmissionregistrationV1beta1WebhookClientConfig = AdmissionregistrationV1beta1WebhookClientConfig
  { admissionregistrationV1beta1WebhookClientConfigCaBundle :: !(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.
  , admissionregistrationV1beta1WebhookClientConfigService :: !(Maybe AdmissionregistrationV1beta1ServiceReference) -- ^ "service"
  , admissionregistrationV1beta1WebhookClientConfigUrl :: !(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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON AdmissionregistrationV1beta1WebhookClientConfig
instance A.FromJSON AdmissionregistrationV1beta1WebhookClientConfig where
  parseJSON = A.withObject "AdmissionregistrationV1beta1WebhookClientConfig" $ \o ->
    AdmissionregistrationV1beta1WebhookClientConfig
      <$> (o .:? "caBundle")
      <*> (o .:? "service")
      <*> (o .:? "url")

-- | ToJSON AdmissionregistrationV1beta1WebhookClientConfig
instance A.ToJSON AdmissionregistrationV1beta1WebhookClientConfig where
  toJSON AdmissionregistrationV1beta1WebhookClientConfig {..} =
   _omitNulls
      [ "caBundle" .= admissionregistrationV1beta1WebhookClientConfigCaBundle
      , "service" .= admissionregistrationV1beta1WebhookClientConfigService
      , "url" .= admissionregistrationV1beta1WebhookClientConfigUrl
      ]


-- | Construct a value of type 'AdmissionregistrationV1beta1WebhookClientConfig' (by applying it's required fields, if any)
mkAdmissionregistrationV1beta1WebhookClientConfig
  :: AdmissionregistrationV1beta1WebhookClientConfig
mkAdmissionregistrationV1beta1WebhookClientConfig =
  AdmissionregistrationV1beta1WebhookClientConfig
  { admissionregistrationV1beta1WebhookClientConfigCaBundle = Nothing
  , admissionregistrationV1beta1WebhookClientConfigService = Nothing
  , admissionregistrationV1beta1WebhookClientConfigUrl = Nothing
  }

-- ** ApiextensionsV1beta1ServiceReference
-- | ApiextensionsV1beta1ServiceReference
-- ServiceReference holds a reference to Service.legacy.k8s.io
data ApiextensionsV1beta1ServiceReference = ApiextensionsV1beta1ServiceReference
  { apiextensionsV1beta1ServiceReferenceName :: !(Text) -- ^ /Required/ "name" - &#x60;name&#x60; is the name of the service. Required
  , apiextensionsV1beta1ServiceReferenceNamespace :: !(Text) -- ^ /Required/ "namespace" - &#x60;namespace&#x60; is the namespace of the service. Required
  , apiextensionsV1beta1ServiceReferencePath :: !(Maybe Text) -- ^ "path" - &#x60;path&#x60; is an optional URL path which will be sent in any request to this service.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ApiextensionsV1beta1ServiceReference
instance A.FromJSON ApiextensionsV1beta1ServiceReference where
  parseJSON = A.withObject "ApiextensionsV1beta1ServiceReference" $ \o ->
    ApiextensionsV1beta1ServiceReference
      <$> (o .:  "name")
      <*> (o .:  "namespace")
      <*> (o .:? "path")

-- | ToJSON ApiextensionsV1beta1ServiceReference
instance A.ToJSON ApiextensionsV1beta1ServiceReference where
  toJSON ApiextensionsV1beta1ServiceReference {..} =
   _omitNulls
      [ "name" .= apiextensionsV1beta1ServiceReferenceName
      , "namespace" .= apiextensionsV1beta1ServiceReferenceNamespace
      , "path" .= apiextensionsV1beta1ServiceReferencePath
      ]


-- | Construct a value of type 'ApiextensionsV1beta1ServiceReference' (by applying it's required fields, if any)
mkApiextensionsV1beta1ServiceReference
  :: Text -- ^ 'apiextensionsV1beta1ServiceReferenceName': `name` is the name of the service. Required
  -> Text -- ^ 'apiextensionsV1beta1ServiceReferenceNamespace': `namespace` is the namespace of the service. Required
  -> ApiextensionsV1beta1ServiceReference
mkApiextensionsV1beta1ServiceReference apiextensionsV1beta1ServiceReferenceName apiextensionsV1beta1ServiceReferenceNamespace =
  ApiextensionsV1beta1ServiceReference
  { apiextensionsV1beta1ServiceReferenceName
  , apiextensionsV1beta1ServiceReferenceNamespace
  , apiextensionsV1beta1ServiceReferencePath = Nothing
  }

-- ** ApiextensionsV1beta1WebhookClientConfig
-- | ApiextensionsV1beta1WebhookClientConfig
-- WebhookClientConfig contains the information to make a TLS connection with the webhook. It has the same field as admissionregistration.v1beta1.WebhookClientConfig.
data ApiextensionsV1beta1WebhookClientConfig = ApiextensionsV1beta1WebhookClientConfig
  { apiextensionsV1beta1WebhookClientConfigCaBundle :: !(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.
  , apiextensionsV1beta1WebhookClientConfigService :: !(Maybe ApiextensionsV1beta1ServiceReference) -- ^ "service"
  , apiextensionsV1beta1WebhookClientConfigUrl :: !(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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON ApiextensionsV1beta1WebhookClientConfig
instance A.FromJSON ApiextensionsV1beta1WebhookClientConfig where
  parseJSON = A.withObject "ApiextensionsV1beta1WebhookClientConfig" $ \o ->
    ApiextensionsV1beta1WebhookClientConfig
      <$> (o .:? "caBundle")
      <*> (o .:? "service")
      <*> (o .:? "url")

-- | ToJSON ApiextensionsV1beta1WebhookClientConfig
instance A.ToJSON ApiextensionsV1beta1WebhookClientConfig where
  toJSON ApiextensionsV1beta1WebhookClientConfig {..} =
   _omitNulls
      [ "caBundle" .= apiextensionsV1beta1WebhookClientConfigCaBundle
      , "service" .= apiextensionsV1beta1WebhookClientConfigService
      , "url" .= apiextensionsV1beta1WebhookClientConfigUrl
      ]


-- | Construct a value of type 'ApiextensionsV1beta1WebhookClientConfig' (by applying it's required fields, if any)
mkApiextensionsV1beta1WebhookClientConfig
  :: ApiextensionsV1beta1WebhookClientConfig
mkApiextensionsV1beta1WebhookClientConfig =
  ApiextensionsV1beta1WebhookClientConfig
  { apiextensionsV1beta1WebhookClientConfigCaBundle = Nothing
  , apiextensionsV1beta1WebhookClientConfigService = Nothing
  , apiextensionsV1beta1WebhookClientConfigUrl = Nothing
  }

-- ** ApiregistrationV1beta1ServiceReference
-- | ApiregistrationV1beta1ServiceReference
-- ServiceReference holds a reference to Service.legacy.k8s.io
data ApiregistrationV1beta1ServiceReference = ApiregistrationV1beta1ServiceReference
  { apiregistrationV1beta1ServiceReferenceName :: !(Maybe Text) -- ^ "name" - Name is the name of the service
  , apiregistrationV1beta1ServiceReferenceNamespace :: !(Maybe Text) -- ^ "namespace" - Namespace is the namespace of the service
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ApiregistrationV1beta1ServiceReference
instance A.FromJSON ApiregistrationV1beta1ServiceReference where
  parseJSON = A.withObject "ApiregistrationV1beta1ServiceReference" $ \o ->
    ApiregistrationV1beta1ServiceReference
      <$> (o .:? "name")
      <*> (o .:? "namespace")

-- | ToJSON ApiregistrationV1beta1ServiceReference
instance A.ToJSON ApiregistrationV1beta1ServiceReference where
  toJSON ApiregistrationV1beta1ServiceReference {..} =
   _omitNulls
      [ "name" .= apiregistrationV1beta1ServiceReferenceName
      , "namespace" .= apiregistrationV1beta1ServiceReferenceNamespace
      ]


-- | Construct a value of type 'ApiregistrationV1beta1ServiceReference' (by applying it's required fields, if any)
mkApiregistrationV1beta1ServiceReference
  :: ApiregistrationV1beta1ServiceReference
mkApiregistrationV1beta1ServiceReference =
  ApiregistrationV1beta1ServiceReference
  { apiregistrationV1beta1ServiceReferenceName = Nothing
  , apiregistrationV1beta1ServiceReferenceNamespace = Nothing
  }

-- ** AppsV1beta1Deployment
-- | AppsV1beta1Deployment
-- DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for more information. Deployment enables declarative updates for Pods and ReplicaSets.
data AppsV1beta1Deployment = AppsV1beta1Deployment
  { appsV1beta1DeploymentApiVersion :: !(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/api-conventions.md#resources
  , appsV1beta1DeploymentKind :: !(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/api-conventions.md#types-kinds
  , appsV1beta1DeploymentMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , appsV1beta1DeploymentSpec :: !(Maybe AppsV1beta1DeploymentSpec) -- ^ "spec"
  , appsV1beta1DeploymentStatus :: !(Maybe AppsV1beta1DeploymentStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON AppsV1beta1Deployment
instance A.FromJSON AppsV1beta1Deployment where
  parseJSON = A.withObject "AppsV1beta1Deployment" $ \o ->
    AppsV1beta1Deployment
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON AppsV1beta1Deployment
instance A.ToJSON AppsV1beta1Deployment where
  toJSON AppsV1beta1Deployment {..} =
   _omitNulls
      [ "apiVersion" .= appsV1beta1DeploymentApiVersion
      , "kind" .= appsV1beta1DeploymentKind
      , "metadata" .= appsV1beta1DeploymentMetadata
      , "spec" .= appsV1beta1DeploymentSpec
      , "status" .= appsV1beta1DeploymentStatus
      ]


-- | Construct a value of type 'AppsV1beta1Deployment' (by applying it's required fields, if any)
mkAppsV1beta1Deployment
  :: AppsV1beta1Deployment
mkAppsV1beta1Deployment =
  AppsV1beta1Deployment
  { appsV1beta1DeploymentApiVersion = Nothing
  , appsV1beta1DeploymentKind = Nothing
  , appsV1beta1DeploymentMetadata = Nothing
  , appsV1beta1DeploymentSpec = Nothing
  , appsV1beta1DeploymentStatus = Nothing
  }

-- ** AppsV1beta1DeploymentCondition
-- | AppsV1beta1DeploymentCondition
-- DeploymentCondition describes the state of a deployment at a certain point.
data AppsV1beta1DeploymentCondition = AppsV1beta1DeploymentCondition
  { appsV1beta1DeploymentConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - Last time the condition transitioned from one status to another.
  , appsV1beta1DeploymentConditionLastUpdateTime :: !(Maybe DateTime) -- ^ "lastUpdateTime" - The last time this condition was updated.
  , appsV1beta1DeploymentConditionMessage :: !(Maybe Text) -- ^ "message" - A human readable message indicating details about the transition.
  , appsV1beta1DeploymentConditionReason :: !(Maybe Text) -- ^ "reason" - The reason for the condition&#39;s last transition.
  , appsV1beta1DeploymentConditionStatus :: !(Text) -- ^ /Required/ "status" - Status of the condition, one of True, False, Unknown.
  , appsV1beta1DeploymentConditionType :: !(Text) -- ^ /Required/ "type" - Type of deployment condition.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON AppsV1beta1DeploymentCondition
instance A.FromJSON AppsV1beta1DeploymentCondition where
  parseJSON = A.withObject "AppsV1beta1DeploymentCondition" $ \o ->
    AppsV1beta1DeploymentCondition
      <$> (o .:? "lastTransitionTime")
      <*> (o .:? "lastUpdateTime")
      <*> (o .:? "message")
      <*> (o .:? "reason")
      <*> (o .:  "status")
      <*> (o .:  "type")

-- | ToJSON AppsV1beta1DeploymentCondition
instance A.ToJSON AppsV1beta1DeploymentCondition where
  toJSON AppsV1beta1DeploymentCondition {..} =
   _omitNulls
      [ "lastTransitionTime" .= appsV1beta1DeploymentConditionLastTransitionTime
      , "lastUpdateTime" .= appsV1beta1DeploymentConditionLastUpdateTime
      , "message" .= appsV1beta1DeploymentConditionMessage
      , "reason" .= appsV1beta1DeploymentConditionReason
      , "status" .= appsV1beta1DeploymentConditionStatus
      , "type" .= appsV1beta1DeploymentConditionType
      ]


-- | Construct a value of type 'AppsV1beta1DeploymentCondition' (by applying it's required fields, if any)
mkAppsV1beta1DeploymentCondition
  :: Text -- ^ 'appsV1beta1DeploymentConditionStatus': Status of the condition, one of True, False, Unknown.
  -> Text -- ^ 'appsV1beta1DeploymentConditionType': Type of deployment condition.
  -> AppsV1beta1DeploymentCondition
mkAppsV1beta1DeploymentCondition appsV1beta1DeploymentConditionStatus appsV1beta1DeploymentConditionType =
  AppsV1beta1DeploymentCondition
  { appsV1beta1DeploymentConditionLastTransitionTime = Nothing
  , appsV1beta1DeploymentConditionLastUpdateTime = Nothing
  , appsV1beta1DeploymentConditionMessage = Nothing
  , appsV1beta1DeploymentConditionReason = Nothing
  , appsV1beta1DeploymentConditionStatus
  , appsV1beta1DeploymentConditionType
  }

-- ** AppsV1beta1DeploymentList
-- | AppsV1beta1DeploymentList
-- DeploymentList is a list of Deployments.
data AppsV1beta1DeploymentList = AppsV1beta1DeploymentList
  { appsV1beta1DeploymentListApiVersion :: !(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/api-conventions.md#resources
  , appsV1beta1DeploymentListItems :: !([AppsV1beta1Deployment]) -- ^ /Required/ "items" - Items is the list of Deployments.
  , appsV1beta1DeploymentListKind :: !(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/api-conventions.md#types-kinds
  , appsV1beta1DeploymentListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON AppsV1beta1DeploymentList
instance A.FromJSON AppsV1beta1DeploymentList where
  parseJSON = A.withObject "AppsV1beta1DeploymentList" $ \o ->
    AppsV1beta1DeploymentList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON AppsV1beta1DeploymentList
instance A.ToJSON AppsV1beta1DeploymentList where
  toJSON AppsV1beta1DeploymentList {..} =
   _omitNulls
      [ "apiVersion" .= appsV1beta1DeploymentListApiVersion
      , "items" .= appsV1beta1DeploymentListItems
      , "kind" .= appsV1beta1DeploymentListKind
      , "metadata" .= appsV1beta1DeploymentListMetadata
      ]


-- | Construct a value of type 'AppsV1beta1DeploymentList' (by applying it's required fields, if any)
mkAppsV1beta1DeploymentList
  :: [AppsV1beta1Deployment] -- ^ 'appsV1beta1DeploymentListItems': Items is the list of Deployments.
  -> AppsV1beta1DeploymentList
mkAppsV1beta1DeploymentList appsV1beta1DeploymentListItems =
  AppsV1beta1DeploymentList
  { appsV1beta1DeploymentListApiVersion = Nothing
  , appsV1beta1DeploymentListItems
  , appsV1beta1DeploymentListKind = Nothing
  , appsV1beta1DeploymentListMetadata = Nothing
  }

-- ** AppsV1beta1DeploymentRollback
-- | AppsV1beta1DeploymentRollback
-- DEPRECATED. DeploymentRollback stores the information required to rollback a deployment.
data AppsV1beta1DeploymentRollback = AppsV1beta1DeploymentRollback
  { appsV1beta1DeploymentRollbackApiVersion :: !(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/api-conventions.md#resources
  , appsV1beta1DeploymentRollbackKind :: !(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/api-conventions.md#types-kinds
  , appsV1beta1DeploymentRollbackName :: !(Text) -- ^ /Required/ "name" - Required: This must match the Name of a deployment.
  , appsV1beta1DeploymentRollbackRollbackTo :: !(AppsV1beta1RollbackConfig) -- ^ /Required/ "rollbackTo"
  , appsV1beta1DeploymentRollbackUpdatedAnnotations :: !(Maybe (Map.Map String Text)) -- ^ "updatedAnnotations" - The annotations to be updated to a deployment
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON AppsV1beta1DeploymentRollback
instance A.FromJSON AppsV1beta1DeploymentRollback where
  parseJSON = A.withObject "AppsV1beta1DeploymentRollback" $ \o ->
    AppsV1beta1DeploymentRollback
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:  "name")
      <*> (o .:  "rollbackTo")
      <*> (o .:? "updatedAnnotations")

-- | ToJSON AppsV1beta1DeploymentRollback
instance A.ToJSON AppsV1beta1DeploymentRollback where
  toJSON AppsV1beta1DeploymentRollback {..} =
   _omitNulls
      [ "apiVersion" .= appsV1beta1DeploymentRollbackApiVersion
      , "kind" .= appsV1beta1DeploymentRollbackKind
      , "name" .= appsV1beta1DeploymentRollbackName
      , "rollbackTo" .= appsV1beta1DeploymentRollbackRollbackTo
      , "updatedAnnotations" .= appsV1beta1DeploymentRollbackUpdatedAnnotations
      ]


-- | Construct a value of type 'AppsV1beta1DeploymentRollback' (by applying it's required fields, if any)
mkAppsV1beta1DeploymentRollback
  :: Text -- ^ 'appsV1beta1DeploymentRollbackName': Required: This must match the Name of a deployment.
  -> AppsV1beta1RollbackConfig -- ^ 'appsV1beta1DeploymentRollbackRollbackTo' 
  -> AppsV1beta1DeploymentRollback
mkAppsV1beta1DeploymentRollback appsV1beta1DeploymentRollbackName appsV1beta1DeploymentRollbackRollbackTo =
  AppsV1beta1DeploymentRollback
  { appsV1beta1DeploymentRollbackApiVersion = Nothing
  , appsV1beta1DeploymentRollbackKind = Nothing
  , appsV1beta1DeploymentRollbackName
  , appsV1beta1DeploymentRollbackRollbackTo
  , appsV1beta1DeploymentRollbackUpdatedAnnotations = Nothing
  }

-- ** AppsV1beta1DeploymentSpec
-- | AppsV1beta1DeploymentSpec
-- DeploymentSpec is the specification of the desired behavior of the Deployment.
data AppsV1beta1DeploymentSpec = AppsV1beta1DeploymentSpec
  { appsV1beta1DeploymentSpecMinReadySeconds :: !(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)
  , appsV1beta1DeploymentSpecPaused :: !(Maybe Bool) -- ^ "paused" - Indicates that the deployment is paused.
  , appsV1beta1DeploymentSpecProgressDeadlineSeconds :: !(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.
  , appsV1beta1DeploymentSpecReplicas :: !(Maybe Int) -- ^ "replicas" - Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.
  , appsV1beta1DeploymentSpecRevisionHistoryLimit :: !(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 2.
  , appsV1beta1DeploymentSpecRollbackTo :: !(Maybe AppsV1beta1RollbackConfig) -- ^ "rollbackTo"
  , appsV1beta1DeploymentSpecSelector :: !(Maybe V1LabelSelector) -- ^ "selector"
  , appsV1beta1DeploymentSpecStrategy :: !(Maybe AppsV1beta1DeploymentStrategy) -- ^ "strategy"
  , appsV1beta1DeploymentSpecTemplate :: !(V1PodTemplateSpec) -- ^ /Required/ "template"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON AppsV1beta1DeploymentSpec
instance A.FromJSON AppsV1beta1DeploymentSpec where
  parseJSON = A.withObject "AppsV1beta1DeploymentSpec" $ \o ->
    AppsV1beta1DeploymentSpec
      <$> (o .:? "minReadySeconds")
      <*> (o .:? "paused")
      <*> (o .:? "progressDeadlineSeconds")
      <*> (o .:? "replicas")
      <*> (o .:? "revisionHistoryLimit")
      <*> (o .:? "rollbackTo")
      <*> (o .:? "selector")
      <*> (o .:? "strategy")
      <*> (o .:  "template")

-- | ToJSON AppsV1beta1DeploymentSpec
instance A.ToJSON AppsV1beta1DeploymentSpec where
  toJSON AppsV1beta1DeploymentSpec {..} =
   _omitNulls
      [ "minReadySeconds" .= appsV1beta1DeploymentSpecMinReadySeconds
      , "paused" .= appsV1beta1DeploymentSpecPaused
      , "progressDeadlineSeconds" .= appsV1beta1DeploymentSpecProgressDeadlineSeconds
      , "replicas" .= appsV1beta1DeploymentSpecReplicas
      , "revisionHistoryLimit" .= appsV1beta1DeploymentSpecRevisionHistoryLimit
      , "rollbackTo" .= appsV1beta1DeploymentSpecRollbackTo
      , "selector" .= appsV1beta1DeploymentSpecSelector
      , "strategy" .= appsV1beta1DeploymentSpecStrategy
      , "template" .= appsV1beta1DeploymentSpecTemplate
      ]


-- | Construct a value of type 'AppsV1beta1DeploymentSpec' (by applying it's required fields, if any)
mkAppsV1beta1DeploymentSpec
  :: V1PodTemplateSpec -- ^ 'appsV1beta1DeploymentSpecTemplate' 
  -> AppsV1beta1DeploymentSpec
mkAppsV1beta1DeploymentSpec appsV1beta1DeploymentSpecTemplate =
  AppsV1beta1DeploymentSpec
  { appsV1beta1DeploymentSpecMinReadySeconds = Nothing
  , appsV1beta1DeploymentSpecPaused = Nothing
  , appsV1beta1DeploymentSpecProgressDeadlineSeconds = Nothing
  , appsV1beta1DeploymentSpecReplicas = Nothing
  , appsV1beta1DeploymentSpecRevisionHistoryLimit = Nothing
  , appsV1beta1DeploymentSpecRollbackTo = Nothing
  , appsV1beta1DeploymentSpecSelector = Nothing
  , appsV1beta1DeploymentSpecStrategy = Nothing
  , appsV1beta1DeploymentSpecTemplate
  }

-- ** AppsV1beta1DeploymentStatus
-- | AppsV1beta1DeploymentStatus
-- DeploymentStatus is the most recently observed status of the Deployment.
data AppsV1beta1DeploymentStatus = AppsV1beta1DeploymentStatus
  { appsV1beta1DeploymentStatusAvailableReplicas :: !(Maybe Int) -- ^ "availableReplicas" - Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
  , appsV1beta1DeploymentStatusCollisionCount :: !(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.
  , appsV1beta1DeploymentStatusConditions :: !(Maybe [AppsV1beta1DeploymentCondition]) -- ^ "conditions" - Represents the latest available observations of a deployment&#39;s current state.
  , appsV1beta1DeploymentStatusObservedGeneration :: !(Maybe Integer) -- ^ "observedGeneration" - The generation observed by the deployment controller.
  , appsV1beta1DeploymentStatusReadyReplicas :: !(Maybe Int) -- ^ "readyReplicas" - Total number of ready pods targeted by this deployment.
  , appsV1beta1DeploymentStatusReplicas :: !(Maybe Int) -- ^ "replicas" - Total number of non-terminated pods targeted by this deployment (their labels match the selector).
  , appsV1beta1DeploymentStatusUnavailableReplicas :: !(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.
  , appsV1beta1DeploymentStatusUpdatedReplicas :: !(Maybe Int) -- ^ "updatedReplicas" - Total number of non-terminated pods targeted by this deployment that have the desired template spec.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON AppsV1beta1DeploymentStatus
instance A.FromJSON AppsV1beta1DeploymentStatus where
  parseJSON = A.withObject "AppsV1beta1DeploymentStatus" $ \o ->
    AppsV1beta1DeploymentStatus
      <$> (o .:? "availableReplicas")
      <*> (o .:? "collisionCount")
      <*> (o .:? "conditions")
      <*> (o .:? "observedGeneration")
      <*> (o .:? "readyReplicas")
      <*> (o .:? "replicas")
      <*> (o .:? "unavailableReplicas")
      <*> (o .:? "updatedReplicas")

-- | ToJSON AppsV1beta1DeploymentStatus
instance A.ToJSON AppsV1beta1DeploymentStatus where
  toJSON AppsV1beta1DeploymentStatus {..} =
   _omitNulls
      [ "availableReplicas" .= appsV1beta1DeploymentStatusAvailableReplicas
      , "collisionCount" .= appsV1beta1DeploymentStatusCollisionCount
      , "conditions" .= appsV1beta1DeploymentStatusConditions
      , "observedGeneration" .= appsV1beta1DeploymentStatusObservedGeneration
      , "readyReplicas" .= appsV1beta1DeploymentStatusReadyReplicas
      , "replicas" .= appsV1beta1DeploymentStatusReplicas
      , "unavailableReplicas" .= appsV1beta1DeploymentStatusUnavailableReplicas
      , "updatedReplicas" .= appsV1beta1DeploymentStatusUpdatedReplicas
      ]


-- | Construct a value of type 'AppsV1beta1DeploymentStatus' (by applying it's required fields, if any)
mkAppsV1beta1DeploymentStatus
  :: AppsV1beta1DeploymentStatus
mkAppsV1beta1DeploymentStatus =
  AppsV1beta1DeploymentStatus
  { appsV1beta1DeploymentStatusAvailableReplicas = Nothing
  , appsV1beta1DeploymentStatusCollisionCount = Nothing
  , appsV1beta1DeploymentStatusConditions = Nothing
  , appsV1beta1DeploymentStatusObservedGeneration = Nothing
  , appsV1beta1DeploymentStatusReadyReplicas = Nothing
  , appsV1beta1DeploymentStatusReplicas = Nothing
  , appsV1beta1DeploymentStatusUnavailableReplicas = Nothing
  , appsV1beta1DeploymentStatusUpdatedReplicas = Nothing
  }

-- ** AppsV1beta1DeploymentStrategy
-- | AppsV1beta1DeploymentStrategy
-- DeploymentStrategy describes how to replace existing pods with new ones.
data AppsV1beta1DeploymentStrategy = AppsV1beta1DeploymentStrategy
  { appsV1beta1DeploymentStrategyRollingUpdate :: !(Maybe AppsV1beta1RollingUpdateDeployment) -- ^ "rollingUpdate"
  , appsV1beta1DeploymentStrategyType :: !(Maybe Text) -- ^ "type" - Type of deployment. Can be \&quot;Recreate\&quot; or \&quot;RollingUpdate\&quot;. Default is RollingUpdate.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON AppsV1beta1DeploymentStrategy
instance A.FromJSON AppsV1beta1DeploymentStrategy where
  parseJSON = A.withObject "AppsV1beta1DeploymentStrategy" $ \o ->
    AppsV1beta1DeploymentStrategy
      <$> (o .:? "rollingUpdate")
      <*> (o .:? "type")

-- | ToJSON AppsV1beta1DeploymentStrategy
instance A.ToJSON AppsV1beta1DeploymentStrategy where
  toJSON AppsV1beta1DeploymentStrategy {..} =
   _omitNulls
      [ "rollingUpdate" .= appsV1beta1DeploymentStrategyRollingUpdate
      , "type" .= appsV1beta1DeploymentStrategyType
      ]


-- | Construct a value of type 'AppsV1beta1DeploymentStrategy' (by applying it's required fields, if any)
mkAppsV1beta1DeploymentStrategy
  :: AppsV1beta1DeploymentStrategy
mkAppsV1beta1DeploymentStrategy =
  AppsV1beta1DeploymentStrategy
  { appsV1beta1DeploymentStrategyRollingUpdate = Nothing
  , appsV1beta1DeploymentStrategyType = Nothing
  }

-- ** AppsV1beta1RollbackConfig
-- | AppsV1beta1RollbackConfig
-- DEPRECATED.
data AppsV1beta1RollbackConfig = AppsV1beta1RollbackConfig
  { appsV1beta1RollbackConfigRevision :: !(Maybe Integer) -- ^ "revision" - The revision to rollback to. If set to 0, rollback to the last revision.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON AppsV1beta1RollbackConfig
instance A.FromJSON AppsV1beta1RollbackConfig where
  parseJSON = A.withObject "AppsV1beta1RollbackConfig" $ \o ->
    AppsV1beta1RollbackConfig
      <$> (o .:? "revision")

-- | ToJSON AppsV1beta1RollbackConfig
instance A.ToJSON AppsV1beta1RollbackConfig where
  toJSON AppsV1beta1RollbackConfig {..} =
   _omitNulls
      [ "revision" .= appsV1beta1RollbackConfigRevision
      ]


-- | Construct a value of type 'AppsV1beta1RollbackConfig' (by applying it's required fields, if any)
mkAppsV1beta1RollbackConfig
  :: AppsV1beta1RollbackConfig
mkAppsV1beta1RollbackConfig =
  AppsV1beta1RollbackConfig
  { appsV1beta1RollbackConfigRevision = Nothing
  }

-- ** AppsV1beta1RollingUpdateDeployment
-- | AppsV1beta1RollingUpdateDeployment
-- Spec to control the desired behavior of rolling update.
data AppsV1beta1RollingUpdateDeployment = AppsV1beta1RollingUpdateDeployment
  { appsV1beta1RollingUpdateDeploymentMaxSurge :: !(Maybe IntOrString) -- ^ "maxSurge"
  , appsV1beta1RollingUpdateDeploymentMaxUnavailable :: !(Maybe IntOrString) -- ^ "maxUnavailable"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON AppsV1beta1RollingUpdateDeployment
instance A.FromJSON AppsV1beta1RollingUpdateDeployment where
  parseJSON = A.withObject "AppsV1beta1RollingUpdateDeployment" $ \o ->
    AppsV1beta1RollingUpdateDeployment
      <$> (o .:? "maxSurge")
      <*> (o .:? "maxUnavailable")

-- | ToJSON AppsV1beta1RollingUpdateDeployment
instance A.ToJSON AppsV1beta1RollingUpdateDeployment where
  toJSON AppsV1beta1RollingUpdateDeployment {..} =
   _omitNulls
      [ "maxSurge" .= appsV1beta1RollingUpdateDeploymentMaxSurge
      , "maxUnavailable" .= appsV1beta1RollingUpdateDeploymentMaxUnavailable
      ]


-- | Construct a value of type 'AppsV1beta1RollingUpdateDeployment' (by applying it's required fields, if any)
mkAppsV1beta1RollingUpdateDeployment
  :: AppsV1beta1RollingUpdateDeployment
mkAppsV1beta1RollingUpdateDeployment =
  AppsV1beta1RollingUpdateDeployment
  { appsV1beta1RollingUpdateDeploymentMaxSurge = Nothing
  , appsV1beta1RollingUpdateDeploymentMaxUnavailable = Nothing
  }

-- ** AppsV1beta1Scale
-- | AppsV1beta1Scale
-- Scale represents a scaling request for a resource.
data AppsV1beta1Scale = AppsV1beta1Scale
  { appsV1beta1ScaleApiVersion :: !(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/api-conventions.md#resources
  , appsV1beta1ScaleKind :: !(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/api-conventions.md#types-kinds
  , appsV1beta1ScaleMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , appsV1beta1ScaleSpec :: !(Maybe AppsV1beta1ScaleSpec) -- ^ "spec"
  , appsV1beta1ScaleStatus :: !(Maybe AppsV1beta1ScaleStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON AppsV1beta1Scale
instance A.FromJSON AppsV1beta1Scale where
  parseJSON = A.withObject "AppsV1beta1Scale" $ \o ->
    AppsV1beta1Scale
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON AppsV1beta1Scale
instance A.ToJSON AppsV1beta1Scale where
  toJSON AppsV1beta1Scale {..} =
   _omitNulls
      [ "apiVersion" .= appsV1beta1ScaleApiVersion
      , "kind" .= appsV1beta1ScaleKind
      , "metadata" .= appsV1beta1ScaleMetadata
      , "spec" .= appsV1beta1ScaleSpec
      , "status" .= appsV1beta1ScaleStatus
      ]


-- | Construct a value of type 'AppsV1beta1Scale' (by applying it's required fields, if any)
mkAppsV1beta1Scale
  :: AppsV1beta1Scale
mkAppsV1beta1Scale =
  AppsV1beta1Scale
  { appsV1beta1ScaleApiVersion = Nothing
  , appsV1beta1ScaleKind = Nothing
  , appsV1beta1ScaleMetadata = Nothing
  , appsV1beta1ScaleSpec = Nothing
  , appsV1beta1ScaleStatus = Nothing
  }

-- ** AppsV1beta1ScaleSpec
-- | AppsV1beta1ScaleSpec
-- ScaleSpec describes the attributes of a scale subresource
data AppsV1beta1ScaleSpec = AppsV1beta1ScaleSpec
  { appsV1beta1ScaleSpecReplicas :: !(Maybe Int) -- ^ "replicas" - desired number of instances for the scaled object.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON AppsV1beta1ScaleSpec
instance A.FromJSON AppsV1beta1ScaleSpec where
  parseJSON = A.withObject "AppsV1beta1ScaleSpec" $ \o ->
    AppsV1beta1ScaleSpec
      <$> (o .:? "replicas")

-- | ToJSON AppsV1beta1ScaleSpec
instance A.ToJSON AppsV1beta1ScaleSpec where
  toJSON AppsV1beta1ScaleSpec {..} =
   _omitNulls
      [ "replicas" .= appsV1beta1ScaleSpecReplicas
      ]


-- | Construct a value of type 'AppsV1beta1ScaleSpec' (by applying it's required fields, if any)
mkAppsV1beta1ScaleSpec
  :: AppsV1beta1ScaleSpec
mkAppsV1beta1ScaleSpec =
  AppsV1beta1ScaleSpec
  { appsV1beta1ScaleSpecReplicas = Nothing
  }

-- ** AppsV1beta1ScaleStatus
-- | AppsV1beta1ScaleStatus
-- ScaleStatus represents the current status of a scale subresource.
data AppsV1beta1ScaleStatus = AppsV1beta1ScaleStatus
  { appsV1beta1ScaleStatusReplicas :: !(Int) -- ^ /Required/ "replicas" - actual number of observed instances of the scaled object.
  , appsV1beta1ScaleStatusSelector :: !(Maybe (Map.Map String Text)) -- ^ "selector" - label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
  , appsV1beta1ScaleStatusTargetSelector :: !(Maybe Text) -- ^ "targetSelector" - label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON AppsV1beta1ScaleStatus
instance A.FromJSON AppsV1beta1ScaleStatus where
  parseJSON = A.withObject "AppsV1beta1ScaleStatus" $ \o ->
    AppsV1beta1ScaleStatus
      <$> (o .:  "replicas")
      <*> (o .:? "selector")
      <*> (o .:? "targetSelector")

-- | ToJSON AppsV1beta1ScaleStatus
instance A.ToJSON AppsV1beta1ScaleStatus where
  toJSON AppsV1beta1ScaleStatus {..} =
   _omitNulls
      [ "replicas" .= appsV1beta1ScaleStatusReplicas
      , "selector" .= appsV1beta1ScaleStatusSelector
      , "targetSelector" .= appsV1beta1ScaleStatusTargetSelector
      ]


-- | Construct a value of type 'AppsV1beta1ScaleStatus' (by applying it's required fields, if any)
mkAppsV1beta1ScaleStatus
  :: Int -- ^ 'appsV1beta1ScaleStatusReplicas': actual number of observed instances of the scaled object.
  -> AppsV1beta1ScaleStatus
mkAppsV1beta1ScaleStatus appsV1beta1ScaleStatusReplicas =
  AppsV1beta1ScaleStatus
  { appsV1beta1ScaleStatusReplicas
  , appsV1beta1ScaleStatusSelector = Nothing
  , appsV1beta1ScaleStatusTargetSelector = Nothing
  }

-- ** ExtensionsV1beta1AllowedCSIDriver
-- | ExtensionsV1beta1AllowedCSIDriver
-- AllowedCSIDriver represents a single inline CSI Driver that is allowed to be used.
data ExtensionsV1beta1AllowedCSIDriver = ExtensionsV1beta1AllowedCSIDriver
  { extensionsV1beta1AllowedCSIDriverName :: !(Text) -- ^ /Required/ "name" - Name is the registered name of the CSI driver
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1AllowedCSIDriver
instance A.FromJSON ExtensionsV1beta1AllowedCSIDriver where
  parseJSON = A.withObject "ExtensionsV1beta1AllowedCSIDriver" $ \o ->
    ExtensionsV1beta1AllowedCSIDriver
      <$> (o .:  "name")

-- | ToJSON ExtensionsV1beta1AllowedCSIDriver
instance A.ToJSON ExtensionsV1beta1AllowedCSIDriver where
  toJSON ExtensionsV1beta1AllowedCSIDriver {..} =
   _omitNulls
      [ "name" .= extensionsV1beta1AllowedCSIDriverName
      ]


-- | Construct a value of type 'ExtensionsV1beta1AllowedCSIDriver' (by applying it's required fields, if any)
mkExtensionsV1beta1AllowedCSIDriver
  :: Text -- ^ 'extensionsV1beta1AllowedCSIDriverName': Name is the registered name of the CSI driver
  -> ExtensionsV1beta1AllowedCSIDriver
mkExtensionsV1beta1AllowedCSIDriver extensionsV1beta1AllowedCSIDriverName =
  ExtensionsV1beta1AllowedCSIDriver
  { extensionsV1beta1AllowedCSIDriverName
  }

-- ** ExtensionsV1beta1AllowedFlexVolume
-- | ExtensionsV1beta1AllowedFlexVolume
-- AllowedFlexVolume represents a single Flexvolume that is allowed to be used. Deprecated: use AllowedFlexVolume from policy API Group instead.
data ExtensionsV1beta1AllowedFlexVolume = ExtensionsV1beta1AllowedFlexVolume
  { extensionsV1beta1AllowedFlexVolumeDriver :: !(Text) -- ^ /Required/ "driver" - driver is the name of the Flexvolume driver.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1AllowedFlexVolume
instance A.FromJSON ExtensionsV1beta1AllowedFlexVolume where
  parseJSON = A.withObject "ExtensionsV1beta1AllowedFlexVolume" $ \o ->
    ExtensionsV1beta1AllowedFlexVolume
      <$> (o .:  "driver")

-- | ToJSON ExtensionsV1beta1AllowedFlexVolume
instance A.ToJSON ExtensionsV1beta1AllowedFlexVolume where
  toJSON ExtensionsV1beta1AllowedFlexVolume {..} =
   _omitNulls
      [ "driver" .= extensionsV1beta1AllowedFlexVolumeDriver
      ]


-- | Construct a value of type 'ExtensionsV1beta1AllowedFlexVolume' (by applying it's required fields, if any)
mkExtensionsV1beta1AllowedFlexVolume
  :: Text -- ^ 'extensionsV1beta1AllowedFlexVolumeDriver': driver is the name of the Flexvolume driver.
  -> ExtensionsV1beta1AllowedFlexVolume
mkExtensionsV1beta1AllowedFlexVolume extensionsV1beta1AllowedFlexVolumeDriver =
  ExtensionsV1beta1AllowedFlexVolume
  { extensionsV1beta1AllowedFlexVolumeDriver
  }

-- ** ExtensionsV1beta1AllowedHostPath
-- | ExtensionsV1beta1AllowedHostPath
-- AllowedHostPath defines the host volume conditions that will be enabled by a policy for pods to use. It requires the path prefix to be defined. Deprecated: use AllowedHostPath from policy API Group instead.
data ExtensionsV1beta1AllowedHostPath = ExtensionsV1beta1AllowedHostPath
  { extensionsV1beta1AllowedHostPathPathPrefix :: !(Maybe Text) -- ^ "pathPrefix" - pathPrefix is the path prefix that the host volume must match. It does not support &#x60;*&#x60;. Trailing slashes are trimmed when validating the path prefix with a host path.  Examples: &#x60;/foo&#x60; would allow &#x60;/foo&#x60;, &#x60;/foo/&#x60; and &#x60;/foo/bar&#x60; &#x60;/foo&#x60; would not allow &#x60;/food&#x60; or &#x60;/etc/foo&#x60;
  , extensionsV1beta1AllowedHostPathReadOnly :: !(Maybe Bool) -- ^ "readOnly" - when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1AllowedHostPath
instance A.FromJSON ExtensionsV1beta1AllowedHostPath where
  parseJSON = A.withObject "ExtensionsV1beta1AllowedHostPath" $ \o ->
    ExtensionsV1beta1AllowedHostPath
      <$> (o .:? "pathPrefix")
      <*> (o .:? "readOnly")

-- | ToJSON ExtensionsV1beta1AllowedHostPath
instance A.ToJSON ExtensionsV1beta1AllowedHostPath where
  toJSON ExtensionsV1beta1AllowedHostPath {..} =
   _omitNulls
      [ "pathPrefix" .= extensionsV1beta1AllowedHostPathPathPrefix
      , "readOnly" .= extensionsV1beta1AllowedHostPathReadOnly
      ]


-- | Construct a value of type 'ExtensionsV1beta1AllowedHostPath' (by applying it's required fields, if any)
mkExtensionsV1beta1AllowedHostPath
  :: ExtensionsV1beta1AllowedHostPath
mkExtensionsV1beta1AllowedHostPath =
  ExtensionsV1beta1AllowedHostPath
  { extensionsV1beta1AllowedHostPathPathPrefix = Nothing
  , extensionsV1beta1AllowedHostPathReadOnly = Nothing
  }

-- ** ExtensionsV1beta1Deployment
-- | ExtensionsV1beta1Deployment
-- DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for more information. Deployment enables declarative updates for Pods and ReplicaSets.
data ExtensionsV1beta1Deployment = ExtensionsV1beta1Deployment
  { extensionsV1beta1DeploymentApiVersion :: !(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/api-conventions.md#resources
  , extensionsV1beta1DeploymentKind :: !(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/api-conventions.md#types-kinds
  , extensionsV1beta1DeploymentMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , extensionsV1beta1DeploymentSpec :: !(Maybe ExtensionsV1beta1DeploymentSpec) -- ^ "spec"
  , extensionsV1beta1DeploymentStatus :: !(Maybe ExtensionsV1beta1DeploymentStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1Deployment
instance A.FromJSON ExtensionsV1beta1Deployment where
  parseJSON = A.withObject "ExtensionsV1beta1Deployment" $ \o ->
    ExtensionsV1beta1Deployment
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON ExtensionsV1beta1Deployment
instance A.ToJSON ExtensionsV1beta1Deployment where
  toJSON ExtensionsV1beta1Deployment {..} =
   _omitNulls
      [ "apiVersion" .= extensionsV1beta1DeploymentApiVersion
      , "kind" .= extensionsV1beta1DeploymentKind
      , "metadata" .= extensionsV1beta1DeploymentMetadata
      , "spec" .= extensionsV1beta1DeploymentSpec
      , "status" .= extensionsV1beta1DeploymentStatus
      ]


-- | Construct a value of type 'ExtensionsV1beta1Deployment' (by applying it's required fields, if any)
mkExtensionsV1beta1Deployment
  :: ExtensionsV1beta1Deployment
mkExtensionsV1beta1Deployment =
  ExtensionsV1beta1Deployment
  { extensionsV1beta1DeploymentApiVersion = Nothing
  , extensionsV1beta1DeploymentKind = Nothing
  , extensionsV1beta1DeploymentMetadata = Nothing
  , extensionsV1beta1DeploymentSpec = Nothing
  , extensionsV1beta1DeploymentStatus = Nothing
  }

-- ** ExtensionsV1beta1DeploymentCondition
-- | ExtensionsV1beta1DeploymentCondition
-- DeploymentCondition describes the state of a deployment at a certain point.
data ExtensionsV1beta1DeploymentCondition = ExtensionsV1beta1DeploymentCondition
  { extensionsV1beta1DeploymentConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - Last time the condition transitioned from one status to another.
  , extensionsV1beta1DeploymentConditionLastUpdateTime :: !(Maybe DateTime) -- ^ "lastUpdateTime" - The last time this condition was updated.
  , extensionsV1beta1DeploymentConditionMessage :: !(Maybe Text) -- ^ "message" - A human readable message indicating details about the transition.
  , extensionsV1beta1DeploymentConditionReason :: !(Maybe Text) -- ^ "reason" - The reason for the condition&#39;s last transition.
  , extensionsV1beta1DeploymentConditionStatus :: !(Text) -- ^ /Required/ "status" - Status of the condition, one of True, False, Unknown.
  , extensionsV1beta1DeploymentConditionType :: !(Text) -- ^ /Required/ "type" - Type of deployment condition.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1DeploymentCondition
instance A.FromJSON ExtensionsV1beta1DeploymentCondition where
  parseJSON = A.withObject "ExtensionsV1beta1DeploymentCondition" $ \o ->
    ExtensionsV1beta1DeploymentCondition
      <$> (o .:? "lastTransitionTime")
      <*> (o .:? "lastUpdateTime")
      <*> (o .:? "message")
      <*> (o .:? "reason")
      <*> (o .:  "status")
      <*> (o .:  "type")

-- | ToJSON ExtensionsV1beta1DeploymentCondition
instance A.ToJSON ExtensionsV1beta1DeploymentCondition where
  toJSON ExtensionsV1beta1DeploymentCondition {..} =
   _omitNulls
      [ "lastTransitionTime" .= extensionsV1beta1DeploymentConditionLastTransitionTime
      , "lastUpdateTime" .= extensionsV1beta1DeploymentConditionLastUpdateTime
      , "message" .= extensionsV1beta1DeploymentConditionMessage
      , "reason" .= extensionsV1beta1DeploymentConditionReason
      , "status" .= extensionsV1beta1DeploymentConditionStatus
      , "type" .= extensionsV1beta1DeploymentConditionType
      ]


-- | Construct a value of type 'ExtensionsV1beta1DeploymentCondition' (by applying it's required fields, if any)
mkExtensionsV1beta1DeploymentCondition
  :: Text -- ^ 'extensionsV1beta1DeploymentConditionStatus': Status of the condition, one of True, False, Unknown.
  -> Text -- ^ 'extensionsV1beta1DeploymentConditionType': Type of deployment condition.
  -> ExtensionsV1beta1DeploymentCondition
mkExtensionsV1beta1DeploymentCondition extensionsV1beta1DeploymentConditionStatus extensionsV1beta1DeploymentConditionType =
  ExtensionsV1beta1DeploymentCondition
  { extensionsV1beta1DeploymentConditionLastTransitionTime = Nothing
  , extensionsV1beta1DeploymentConditionLastUpdateTime = Nothing
  , extensionsV1beta1DeploymentConditionMessage = Nothing
  , extensionsV1beta1DeploymentConditionReason = Nothing
  , extensionsV1beta1DeploymentConditionStatus
  , extensionsV1beta1DeploymentConditionType
  }

-- ** ExtensionsV1beta1DeploymentList
-- | ExtensionsV1beta1DeploymentList
-- DeploymentList is a list of Deployments.
data ExtensionsV1beta1DeploymentList = ExtensionsV1beta1DeploymentList
  { extensionsV1beta1DeploymentListApiVersion :: !(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/api-conventions.md#resources
  , extensionsV1beta1DeploymentListItems :: !([ExtensionsV1beta1Deployment]) -- ^ /Required/ "items" - Items is the list of Deployments.
  , extensionsV1beta1DeploymentListKind :: !(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/api-conventions.md#types-kinds
  , extensionsV1beta1DeploymentListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1DeploymentList
instance A.FromJSON ExtensionsV1beta1DeploymentList where
  parseJSON = A.withObject "ExtensionsV1beta1DeploymentList" $ \o ->
    ExtensionsV1beta1DeploymentList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON ExtensionsV1beta1DeploymentList
instance A.ToJSON ExtensionsV1beta1DeploymentList where
  toJSON ExtensionsV1beta1DeploymentList {..} =
   _omitNulls
      [ "apiVersion" .= extensionsV1beta1DeploymentListApiVersion
      , "items" .= extensionsV1beta1DeploymentListItems
      , "kind" .= extensionsV1beta1DeploymentListKind
      , "metadata" .= extensionsV1beta1DeploymentListMetadata
      ]


-- | Construct a value of type 'ExtensionsV1beta1DeploymentList' (by applying it's required fields, if any)
mkExtensionsV1beta1DeploymentList
  :: [ExtensionsV1beta1Deployment] -- ^ 'extensionsV1beta1DeploymentListItems': Items is the list of Deployments.
  -> ExtensionsV1beta1DeploymentList
mkExtensionsV1beta1DeploymentList extensionsV1beta1DeploymentListItems =
  ExtensionsV1beta1DeploymentList
  { extensionsV1beta1DeploymentListApiVersion = Nothing
  , extensionsV1beta1DeploymentListItems
  , extensionsV1beta1DeploymentListKind = Nothing
  , extensionsV1beta1DeploymentListMetadata = Nothing
  }

-- ** ExtensionsV1beta1DeploymentRollback
-- | ExtensionsV1beta1DeploymentRollback
-- DEPRECATED. DeploymentRollback stores the information required to rollback a deployment.
data ExtensionsV1beta1DeploymentRollback = ExtensionsV1beta1DeploymentRollback
  { extensionsV1beta1DeploymentRollbackApiVersion :: !(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/api-conventions.md#resources
  , extensionsV1beta1DeploymentRollbackKind :: !(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/api-conventions.md#types-kinds
  , extensionsV1beta1DeploymentRollbackName :: !(Text) -- ^ /Required/ "name" - Required: This must match the Name of a deployment.
  , extensionsV1beta1DeploymentRollbackRollbackTo :: !(ExtensionsV1beta1RollbackConfig) -- ^ /Required/ "rollbackTo"
  , extensionsV1beta1DeploymentRollbackUpdatedAnnotations :: !(Maybe (Map.Map String Text)) -- ^ "updatedAnnotations" - The annotations to be updated to a deployment
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1DeploymentRollback
instance A.FromJSON ExtensionsV1beta1DeploymentRollback where
  parseJSON = A.withObject "ExtensionsV1beta1DeploymentRollback" $ \o ->
    ExtensionsV1beta1DeploymentRollback
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:  "name")
      <*> (o .:  "rollbackTo")
      <*> (o .:? "updatedAnnotations")

-- | ToJSON ExtensionsV1beta1DeploymentRollback
instance A.ToJSON ExtensionsV1beta1DeploymentRollback where
  toJSON ExtensionsV1beta1DeploymentRollback {..} =
   _omitNulls
      [ "apiVersion" .= extensionsV1beta1DeploymentRollbackApiVersion
      , "kind" .= extensionsV1beta1DeploymentRollbackKind
      , "name" .= extensionsV1beta1DeploymentRollbackName
      , "rollbackTo" .= extensionsV1beta1DeploymentRollbackRollbackTo
      , "updatedAnnotations" .= extensionsV1beta1DeploymentRollbackUpdatedAnnotations
      ]


-- | Construct a value of type 'ExtensionsV1beta1DeploymentRollback' (by applying it's required fields, if any)
mkExtensionsV1beta1DeploymentRollback
  :: Text -- ^ 'extensionsV1beta1DeploymentRollbackName': Required: This must match the Name of a deployment.
  -> ExtensionsV1beta1RollbackConfig -- ^ 'extensionsV1beta1DeploymentRollbackRollbackTo' 
  -> ExtensionsV1beta1DeploymentRollback
mkExtensionsV1beta1DeploymentRollback extensionsV1beta1DeploymentRollbackName extensionsV1beta1DeploymentRollbackRollbackTo =
  ExtensionsV1beta1DeploymentRollback
  { extensionsV1beta1DeploymentRollbackApiVersion = Nothing
  , extensionsV1beta1DeploymentRollbackKind = Nothing
  , extensionsV1beta1DeploymentRollbackName
  , extensionsV1beta1DeploymentRollbackRollbackTo
  , extensionsV1beta1DeploymentRollbackUpdatedAnnotations = Nothing
  }

-- ** ExtensionsV1beta1DeploymentSpec
-- | ExtensionsV1beta1DeploymentSpec
-- DeploymentSpec is the specification of the desired behavior of the Deployment.
data ExtensionsV1beta1DeploymentSpec = ExtensionsV1beta1DeploymentSpec
  { extensionsV1beta1DeploymentSpecMinReadySeconds :: !(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)
  , extensionsV1beta1DeploymentSpecPaused :: !(Maybe Bool) -- ^ "paused" - Indicates that the deployment is paused and will not be processed by the deployment controller.
  , extensionsV1beta1DeploymentSpecProgressDeadlineSeconds :: !(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. This is set to the max value of int32 (i.e. 2147483647) by default, which means \&quot;no deadline\&quot;.
  , extensionsV1beta1DeploymentSpecReplicas :: !(Maybe Int) -- ^ "replicas" - Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.
  , extensionsV1beta1DeploymentSpecRevisionHistoryLimit :: !(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. This is set to the max value of int32 (i.e. 2147483647) by default, which means \&quot;retaining all old RelicaSets\&quot;.
  , extensionsV1beta1DeploymentSpecRollbackTo :: !(Maybe ExtensionsV1beta1RollbackConfig) -- ^ "rollbackTo"
  , extensionsV1beta1DeploymentSpecSelector :: !(Maybe V1LabelSelector) -- ^ "selector"
  , extensionsV1beta1DeploymentSpecStrategy :: !(Maybe ExtensionsV1beta1DeploymentStrategy) -- ^ "strategy"
  , extensionsV1beta1DeploymentSpecTemplate :: !(V1PodTemplateSpec) -- ^ /Required/ "template"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1DeploymentSpec
instance A.FromJSON ExtensionsV1beta1DeploymentSpec where
  parseJSON = A.withObject "ExtensionsV1beta1DeploymentSpec" $ \o ->
    ExtensionsV1beta1DeploymentSpec
      <$> (o .:? "minReadySeconds")
      <*> (o .:? "paused")
      <*> (o .:? "progressDeadlineSeconds")
      <*> (o .:? "replicas")
      <*> (o .:? "revisionHistoryLimit")
      <*> (o .:? "rollbackTo")
      <*> (o .:? "selector")
      <*> (o .:? "strategy")
      <*> (o .:  "template")

-- | ToJSON ExtensionsV1beta1DeploymentSpec
instance A.ToJSON ExtensionsV1beta1DeploymentSpec where
  toJSON ExtensionsV1beta1DeploymentSpec {..} =
   _omitNulls
      [ "minReadySeconds" .= extensionsV1beta1DeploymentSpecMinReadySeconds
      , "paused" .= extensionsV1beta1DeploymentSpecPaused
      , "progressDeadlineSeconds" .= extensionsV1beta1DeploymentSpecProgressDeadlineSeconds
      , "replicas" .= extensionsV1beta1DeploymentSpecReplicas
      , "revisionHistoryLimit" .= extensionsV1beta1DeploymentSpecRevisionHistoryLimit
      , "rollbackTo" .= extensionsV1beta1DeploymentSpecRollbackTo
      , "selector" .= extensionsV1beta1DeploymentSpecSelector
      , "strategy" .= extensionsV1beta1DeploymentSpecStrategy
      , "template" .= extensionsV1beta1DeploymentSpecTemplate
      ]


-- | Construct a value of type 'ExtensionsV1beta1DeploymentSpec' (by applying it's required fields, if any)
mkExtensionsV1beta1DeploymentSpec
  :: V1PodTemplateSpec -- ^ 'extensionsV1beta1DeploymentSpecTemplate' 
  -> ExtensionsV1beta1DeploymentSpec
mkExtensionsV1beta1DeploymentSpec extensionsV1beta1DeploymentSpecTemplate =
  ExtensionsV1beta1DeploymentSpec
  { extensionsV1beta1DeploymentSpecMinReadySeconds = Nothing
  , extensionsV1beta1DeploymentSpecPaused = Nothing
  , extensionsV1beta1DeploymentSpecProgressDeadlineSeconds = Nothing
  , extensionsV1beta1DeploymentSpecReplicas = Nothing
  , extensionsV1beta1DeploymentSpecRevisionHistoryLimit = Nothing
  , extensionsV1beta1DeploymentSpecRollbackTo = Nothing
  , extensionsV1beta1DeploymentSpecSelector = Nothing
  , extensionsV1beta1DeploymentSpecStrategy = Nothing
  , extensionsV1beta1DeploymentSpecTemplate
  }

-- ** ExtensionsV1beta1DeploymentStatus
-- | ExtensionsV1beta1DeploymentStatus
-- DeploymentStatus is the most recently observed status of the Deployment.
data ExtensionsV1beta1DeploymentStatus = ExtensionsV1beta1DeploymentStatus
  { extensionsV1beta1DeploymentStatusAvailableReplicas :: !(Maybe Int) -- ^ "availableReplicas" - Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
  , extensionsV1beta1DeploymentStatusCollisionCount :: !(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.
  , extensionsV1beta1DeploymentStatusConditions :: !(Maybe [ExtensionsV1beta1DeploymentCondition]) -- ^ "conditions" - Represents the latest available observations of a deployment&#39;s current state.
  , extensionsV1beta1DeploymentStatusObservedGeneration :: !(Maybe Integer) -- ^ "observedGeneration" - The generation observed by the deployment controller.
  , extensionsV1beta1DeploymentStatusReadyReplicas :: !(Maybe Int) -- ^ "readyReplicas" - Total number of ready pods targeted by this deployment.
  , extensionsV1beta1DeploymentStatusReplicas :: !(Maybe Int) -- ^ "replicas" - Total number of non-terminated pods targeted by this deployment (their labels match the selector).
  , extensionsV1beta1DeploymentStatusUnavailableReplicas :: !(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.
  , extensionsV1beta1DeploymentStatusUpdatedReplicas :: !(Maybe Int) -- ^ "updatedReplicas" - Total number of non-terminated pods targeted by this deployment that have the desired template spec.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1DeploymentStatus
instance A.FromJSON ExtensionsV1beta1DeploymentStatus where
  parseJSON = A.withObject "ExtensionsV1beta1DeploymentStatus" $ \o ->
    ExtensionsV1beta1DeploymentStatus
      <$> (o .:? "availableReplicas")
      <*> (o .:? "collisionCount")
      <*> (o .:? "conditions")
      <*> (o .:? "observedGeneration")
      <*> (o .:? "readyReplicas")
      <*> (o .:? "replicas")
      <*> (o .:? "unavailableReplicas")
      <*> (o .:? "updatedReplicas")

-- | ToJSON ExtensionsV1beta1DeploymentStatus
instance A.ToJSON ExtensionsV1beta1DeploymentStatus where
  toJSON ExtensionsV1beta1DeploymentStatus {..} =
   _omitNulls
      [ "availableReplicas" .= extensionsV1beta1DeploymentStatusAvailableReplicas
      , "collisionCount" .= extensionsV1beta1DeploymentStatusCollisionCount
      , "conditions" .= extensionsV1beta1DeploymentStatusConditions
      , "observedGeneration" .= extensionsV1beta1DeploymentStatusObservedGeneration
      , "readyReplicas" .= extensionsV1beta1DeploymentStatusReadyReplicas
      , "replicas" .= extensionsV1beta1DeploymentStatusReplicas
      , "unavailableReplicas" .= extensionsV1beta1DeploymentStatusUnavailableReplicas
      , "updatedReplicas" .= extensionsV1beta1DeploymentStatusUpdatedReplicas
      ]


-- | Construct a value of type 'ExtensionsV1beta1DeploymentStatus' (by applying it's required fields, if any)
mkExtensionsV1beta1DeploymentStatus
  :: ExtensionsV1beta1DeploymentStatus
mkExtensionsV1beta1DeploymentStatus =
  ExtensionsV1beta1DeploymentStatus
  { extensionsV1beta1DeploymentStatusAvailableReplicas = Nothing
  , extensionsV1beta1DeploymentStatusCollisionCount = Nothing
  , extensionsV1beta1DeploymentStatusConditions = Nothing
  , extensionsV1beta1DeploymentStatusObservedGeneration = Nothing
  , extensionsV1beta1DeploymentStatusReadyReplicas = Nothing
  , extensionsV1beta1DeploymentStatusReplicas = Nothing
  , extensionsV1beta1DeploymentStatusUnavailableReplicas = Nothing
  , extensionsV1beta1DeploymentStatusUpdatedReplicas = Nothing
  }

-- ** ExtensionsV1beta1DeploymentStrategy
-- | ExtensionsV1beta1DeploymentStrategy
-- DeploymentStrategy describes how to replace existing pods with new ones.
data ExtensionsV1beta1DeploymentStrategy = ExtensionsV1beta1DeploymentStrategy
  { extensionsV1beta1DeploymentStrategyRollingUpdate :: !(Maybe ExtensionsV1beta1RollingUpdateDeployment) -- ^ "rollingUpdate"
  , extensionsV1beta1DeploymentStrategyType :: !(Maybe Text) -- ^ "type" - Type of deployment. Can be \&quot;Recreate\&quot; or \&quot;RollingUpdate\&quot;. Default is RollingUpdate.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1DeploymentStrategy
instance A.FromJSON ExtensionsV1beta1DeploymentStrategy where
  parseJSON = A.withObject "ExtensionsV1beta1DeploymentStrategy" $ \o ->
    ExtensionsV1beta1DeploymentStrategy
      <$> (o .:? "rollingUpdate")
      <*> (o .:? "type")

-- | ToJSON ExtensionsV1beta1DeploymentStrategy
instance A.ToJSON ExtensionsV1beta1DeploymentStrategy where
  toJSON ExtensionsV1beta1DeploymentStrategy {..} =
   _omitNulls
      [ "rollingUpdate" .= extensionsV1beta1DeploymentStrategyRollingUpdate
      , "type" .= extensionsV1beta1DeploymentStrategyType
      ]


-- | Construct a value of type 'ExtensionsV1beta1DeploymentStrategy' (by applying it's required fields, if any)
mkExtensionsV1beta1DeploymentStrategy
  :: ExtensionsV1beta1DeploymentStrategy
mkExtensionsV1beta1DeploymentStrategy =
  ExtensionsV1beta1DeploymentStrategy
  { extensionsV1beta1DeploymentStrategyRollingUpdate = Nothing
  , extensionsV1beta1DeploymentStrategyType = Nothing
  }

-- ** ExtensionsV1beta1FSGroupStrategyOptions
-- | ExtensionsV1beta1FSGroupStrategyOptions
-- FSGroupStrategyOptions defines the strategy type and options used to create the strategy. Deprecated: use FSGroupStrategyOptions from policy API Group instead.
data ExtensionsV1beta1FSGroupStrategyOptions = ExtensionsV1beta1FSGroupStrategyOptions
  { extensionsV1beta1FSGroupStrategyOptionsRanges :: !(Maybe [ExtensionsV1beta1IDRange]) -- ^ "ranges" - ranges are the allowed ranges of fs groups.  If you would like to force a single fs group then supply a single range with the same start and end. Required for MustRunAs.
  , extensionsV1beta1FSGroupStrategyOptionsRule :: !(Maybe Text) -- ^ "rule" - rule is the strategy that will dictate what FSGroup is used in the SecurityContext.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1FSGroupStrategyOptions
instance A.FromJSON ExtensionsV1beta1FSGroupStrategyOptions where
  parseJSON = A.withObject "ExtensionsV1beta1FSGroupStrategyOptions" $ \o ->
    ExtensionsV1beta1FSGroupStrategyOptions
      <$> (o .:? "ranges")
      <*> (o .:? "rule")

-- | ToJSON ExtensionsV1beta1FSGroupStrategyOptions
instance A.ToJSON ExtensionsV1beta1FSGroupStrategyOptions where
  toJSON ExtensionsV1beta1FSGroupStrategyOptions {..} =
   _omitNulls
      [ "ranges" .= extensionsV1beta1FSGroupStrategyOptionsRanges
      , "rule" .= extensionsV1beta1FSGroupStrategyOptionsRule
      ]


-- | Construct a value of type 'ExtensionsV1beta1FSGroupStrategyOptions' (by applying it's required fields, if any)
mkExtensionsV1beta1FSGroupStrategyOptions
  :: ExtensionsV1beta1FSGroupStrategyOptions
mkExtensionsV1beta1FSGroupStrategyOptions =
  ExtensionsV1beta1FSGroupStrategyOptions
  { extensionsV1beta1FSGroupStrategyOptionsRanges = Nothing
  , extensionsV1beta1FSGroupStrategyOptionsRule = Nothing
  }

-- ** ExtensionsV1beta1HTTPIngressPath
-- | ExtensionsV1beta1HTTPIngressPath
-- HTTPIngressPath associates a path regex with a backend. Incoming urls matching the path are forwarded to the backend.
data ExtensionsV1beta1HTTPIngressPath = ExtensionsV1beta1HTTPIngressPath
  { extensionsV1beta1HTTPIngressPathBackend :: !(ExtensionsV1beta1IngressBackend) -- ^ /Required/ "backend"
  , extensionsV1beta1HTTPIngressPathPath :: !(Maybe Text) -- ^ "path" - Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) 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;. If unspecified, the path defaults to a catch all sending traffic to the backend.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1HTTPIngressPath
instance A.FromJSON ExtensionsV1beta1HTTPIngressPath where
  parseJSON = A.withObject "ExtensionsV1beta1HTTPIngressPath" $ \o ->
    ExtensionsV1beta1HTTPIngressPath
      <$> (o .:  "backend")
      <*> (o .:? "path")

-- | ToJSON ExtensionsV1beta1HTTPIngressPath
instance A.ToJSON ExtensionsV1beta1HTTPIngressPath where
  toJSON ExtensionsV1beta1HTTPIngressPath {..} =
   _omitNulls
      [ "backend" .= extensionsV1beta1HTTPIngressPathBackend
      , "path" .= extensionsV1beta1HTTPIngressPathPath
      ]


-- | Construct a value of type 'ExtensionsV1beta1HTTPIngressPath' (by applying it's required fields, if any)
mkExtensionsV1beta1HTTPIngressPath
  :: ExtensionsV1beta1IngressBackend -- ^ 'extensionsV1beta1HTTPIngressPathBackend' 
  -> ExtensionsV1beta1HTTPIngressPath
mkExtensionsV1beta1HTTPIngressPath extensionsV1beta1HTTPIngressPathBackend =
  ExtensionsV1beta1HTTPIngressPath
  { extensionsV1beta1HTTPIngressPathBackend
  , extensionsV1beta1HTTPIngressPathPath = Nothing
  }

-- ** ExtensionsV1beta1HTTPIngressRuleValue
-- | ExtensionsV1beta1HTTPIngressRuleValue
-- 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 ExtensionsV1beta1HTTPIngressRuleValue = ExtensionsV1beta1HTTPIngressRuleValue
  { extensionsV1beta1HTTPIngressRuleValuePaths :: !([ExtensionsV1beta1HTTPIngressPath]) -- ^ /Required/ "paths" - A collection of paths that map requests to backends.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1HTTPIngressRuleValue
instance A.FromJSON ExtensionsV1beta1HTTPIngressRuleValue where
  parseJSON = A.withObject "ExtensionsV1beta1HTTPIngressRuleValue" $ \o ->
    ExtensionsV1beta1HTTPIngressRuleValue
      <$> (o .:  "paths")

-- | ToJSON ExtensionsV1beta1HTTPIngressRuleValue
instance A.ToJSON ExtensionsV1beta1HTTPIngressRuleValue where
  toJSON ExtensionsV1beta1HTTPIngressRuleValue {..} =
   _omitNulls
      [ "paths" .= extensionsV1beta1HTTPIngressRuleValuePaths
      ]


-- | Construct a value of type 'ExtensionsV1beta1HTTPIngressRuleValue' (by applying it's required fields, if any)
mkExtensionsV1beta1HTTPIngressRuleValue
  :: [ExtensionsV1beta1HTTPIngressPath] -- ^ 'extensionsV1beta1HTTPIngressRuleValuePaths': A collection of paths that map requests to backends.
  -> ExtensionsV1beta1HTTPIngressRuleValue
mkExtensionsV1beta1HTTPIngressRuleValue extensionsV1beta1HTTPIngressRuleValuePaths =
  ExtensionsV1beta1HTTPIngressRuleValue
  { extensionsV1beta1HTTPIngressRuleValuePaths
  }

-- ** ExtensionsV1beta1HostPortRange
-- | ExtensionsV1beta1HostPortRange
-- HostPortRange defines a range of host ports that will be enabled by a policy for pods to use.  It requires both the start and end to be defined. Deprecated: use HostPortRange from policy API Group instead.
data ExtensionsV1beta1HostPortRange = ExtensionsV1beta1HostPortRange
  { extensionsV1beta1HostPortRangeMax :: !(Int) -- ^ /Required/ "max" - max is the end of the range, inclusive.
  , extensionsV1beta1HostPortRangeMin :: !(Int) -- ^ /Required/ "min" - min is the start of the range, inclusive.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1HostPortRange
instance A.FromJSON ExtensionsV1beta1HostPortRange where
  parseJSON = A.withObject "ExtensionsV1beta1HostPortRange" $ \o ->
    ExtensionsV1beta1HostPortRange
      <$> (o .:  "max")
      <*> (o .:  "min")

-- | ToJSON ExtensionsV1beta1HostPortRange
instance A.ToJSON ExtensionsV1beta1HostPortRange where
  toJSON ExtensionsV1beta1HostPortRange {..} =
   _omitNulls
      [ "max" .= extensionsV1beta1HostPortRangeMax
      , "min" .= extensionsV1beta1HostPortRangeMin
      ]


-- | Construct a value of type 'ExtensionsV1beta1HostPortRange' (by applying it's required fields, if any)
mkExtensionsV1beta1HostPortRange
  :: Int -- ^ 'extensionsV1beta1HostPortRangeMax': max is the end of the range, inclusive.
  -> Int -- ^ 'extensionsV1beta1HostPortRangeMin': min is the start of the range, inclusive.
  -> ExtensionsV1beta1HostPortRange
mkExtensionsV1beta1HostPortRange extensionsV1beta1HostPortRangeMax extensionsV1beta1HostPortRangeMin =
  ExtensionsV1beta1HostPortRange
  { extensionsV1beta1HostPortRangeMax
  , extensionsV1beta1HostPortRangeMin
  }

-- ** ExtensionsV1beta1IDRange
-- | ExtensionsV1beta1IDRange
-- IDRange provides a min/max of an allowed range of IDs. Deprecated: use IDRange from policy API Group instead.
data ExtensionsV1beta1IDRange = ExtensionsV1beta1IDRange
  { extensionsV1beta1IDRangeMax :: !(Integer) -- ^ /Required/ "max" - max is the end of the range, inclusive.
  , extensionsV1beta1IDRangeMin :: !(Integer) -- ^ /Required/ "min" - min is the start of the range, inclusive.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1IDRange
instance A.FromJSON ExtensionsV1beta1IDRange where
  parseJSON = A.withObject "ExtensionsV1beta1IDRange" $ \o ->
    ExtensionsV1beta1IDRange
      <$> (o .:  "max")
      <*> (o .:  "min")

-- | ToJSON ExtensionsV1beta1IDRange
instance A.ToJSON ExtensionsV1beta1IDRange where
  toJSON ExtensionsV1beta1IDRange {..} =
   _omitNulls
      [ "max" .= extensionsV1beta1IDRangeMax
      , "min" .= extensionsV1beta1IDRangeMin
      ]


-- | Construct a value of type 'ExtensionsV1beta1IDRange' (by applying it's required fields, if any)
mkExtensionsV1beta1IDRange
  :: Integer -- ^ 'extensionsV1beta1IDRangeMax': max is the end of the range, inclusive.
  -> Integer -- ^ 'extensionsV1beta1IDRangeMin': min is the start of the range, inclusive.
  -> ExtensionsV1beta1IDRange
mkExtensionsV1beta1IDRange extensionsV1beta1IDRangeMax extensionsV1beta1IDRangeMin =
  ExtensionsV1beta1IDRange
  { extensionsV1beta1IDRangeMax
  , extensionsV1beta1IDRangeMin
  }

-- ** ExtensionsV1beta1Ingress
-- | ExtensionsV1beta1Ingress
-- 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. DEPRECATED - This group version of Ingress is deprecated by networking.k8s.io/v1beta1 Ingress. See the release notes for more information.
data ExtensionsV1beta1Ingress = ExtensionsV1beta1Ingress
  { extensionsV1beta1IngressApiVersion :: !(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/api-conventions.md#resources
  , extensionsV1beta1IngressKind :: !(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/api-conventions.md#types-kinds
  , extensionsV1beta1IngressMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , extensionsV1beta1IngressSpec :: !(Maybe ExtensionsV1beta1IngressSpec) -- ^ "spec"
  , extensionsV1beta1IngressStatus :: !(Maybe ExtensionsV1beta1IngressStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1Ingress
instance A.FromJSON ExtensionsV1beta1Ingress where
  parseJSON = A.withObject "ExtensionsV1beta1Ingress" $ \o ->
    ExtensionsV1beta1Ingress
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON ExtensionsV1beta1Ingress
instance A.ToJSON ExtensionsV1beta1Ingress where
  toJSON ExtensionsV1beta1Ingress {..} =
   _omitNulls
      [ "apiVersion" .= extensionsV1beta1IngressApiVersion
      , "kind" .= extensionsV1beta1IngressKind
      , "metadata" .= extensionsV1beta1IngressMetadata
      , "spec" .= extensionsV1beta1IngressSpec
      , "status" .= extensionsV1beta1IngressStatus
      ]


-- | Construct a value of type 'ExtensionsV1beta1Ingress' (by applying it's required fields, if any)
mkExtensionsV1beta1Ingress
  :: ExtensionsV1beta1Ingress
mkExtensionsV1beta1Ingress =
  ExtensionsV1beta1Ingress
  { extensionsV1beta1IngressApiVersion = Nothing
  , extensionsV1beta1IngressKind = Nothing
  , extensionsV1beta1IngressMetadata = Nothing
  , extensionsV1beta1IngressSpec = Nothing
  , extensionsV1beta1IngressStatus = Nothing
  }

-- ** ExtensionsV1beta1IngressBackend
-- | ExtensionsV1beta1IngressBackend
-- IngressBackend describes all endpoints for a given service and port.
data ExtensionsV1beta1IngressBackend = ExtensionsV1beta1IngressBackend
  { extensionsV1beta1IngressBackendServiceName :: !(Text) -- ^ /Required/ "serviceName" - Specifies the name of the referenced service.
  , extensionsV1beta1IngressBackendServicePort :: !(IntOrString) -- ^ /Required/ "servicePort"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1IngressBackend
instance A.FromJSON ExtensionsV1beta1IngressBackend where
  parseJSON = A.withObject "ExtensionsV1beta1IngressBackend" $ \o ->
    ExtensionsV1beta1IngressBackend
      <$> (o .:  "serviceName")
      <*> (o .:  "servicePort")

-- | ToJSON ExtensionsV1beta1IngressBackend
instance A.ToJSON ExtensionsV1beta1IngressBackend where
  toJSON ExtensionsV1beta1IngressBackend {..} =
   _omitNulls
      [ "serviceName" .= extensionsV1beta1IngressBackendServiceName
      , "servicePort" .= extensionsV1beta1IngressBackendServicePort
      ]


-- | Construct a value of type 'ExtensionsV1beta1IngressBackend' (by applying it's required fields, if any)
mkExtensionsV1beta1IngressBackend
  :: Text -- ^ 'extensionsV1beta1IngressBackendServiceName': Specifies the name of the referenced service.
  -> IntOrString -- ^ 'extensionsV1beta1IngressBackendServicePort' 
  -> ExtensionsV1beta1IngressBackend
mkExtensionsV1beta1IngressBackend extensionsV1beta1IngressBackendServiceName extensionsV1beta1IngressBackendServicePort =
  ExtensionsV1beta1IngressBackend
  { extensionsV1beta1IngressBackendServiceName
  , extensionsV1beta1IngressBackendServicePort
  }

-- ** ExtensionsV1beta1IngressList
-- | ExtensionsV1beta1IngressList
-- IngressList is a collection of Ingress.
data ExtensionsV1beta1IngressList = ExtensionsV1beta1IngressList
  { extensionsV1beta1IngressListApiVersion :: !(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/api-conventions.md#resources
  , extensionsV1beta1IngressListItems :: !([ExtensionsV1beta1Ingress]) -- ^ /Required/ "items" - Items is the list of Ingress.
  , extensionsV1beta1IngressListKind :: !(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/api-conventions.md#types-kinds
  , extensionsV1beta1IngressListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1IngressList
instance A.FromJSON ExtensionsV1beta1IngressList where
  parseJSON = A.withObject "ExtensionsV1beta1IngressList" $ \o ->
    ExtensionsV1beta1IngressList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON ExtensionsV1beta1IngressList
instance A.ToJSON ExtensionsV1beta1IngressList where
  toJSON ExtensionsV1beta1IngressList {..} =
   _omitNulls
      [ "apiVersion" .= extensionsV1beta1IngressListApiVersion
      , "items" .= extensionsV1beta1IngressListItems
      , "kind" .= extensionsV1beta1IngressListKind
      , "metadata" .= extensionsV1beta1IngressListMetadata
      ]


-- | Construct a value of type 'ExtensionsV1beta1IngressList' (by applying it's required fields, if any)
mkExtensionsV1beta1IngressList
  :: [ExtensionsV1beta1Ingress] -- ^ 'extensionsV1beta1IngressListItems': Items is the list of Ingress.
  -> ExtensionsV1beta1IngressList
mkExtensionsV1beta1IngressList extensionsV1beta1IngressListItems =
  ExtensionsV1beta1IngressList
  { extensionsV1beta1IngressListApiVersion = Nothing
  , extensionsV1beta1IngressListItems
  , extensionsV1beta1IngressListKind = Nothing
  , extensionsV1beta1IngressListMetadata = Nothing
  }

-- ** ExtensionsV1beta1IngressRule
-- | ExtensionsV1beta1IngressRule
-- 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 ExtensionsV1beta1IngressRule = ExtensionsV1beta1IngressRule
  { extensionsV1beta1IngressRuleHost :: !(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 the RFC: 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.
  , extensionsV1beta1IngressRuleHttp :: !(Maybe ExtensionsV1beta1HTTPIngressRuleValue) -- ^ "http"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1IngressRule
instance A.FromJSON ExtensionsV1beta1IngressRule where
  parseJSON = A.withObject "ExtensionsV1beta1IngressRule" $ \o ->
    ExtensionsV1beta1IngressRule
      <$> (o .:? "host")
      <*> (o .:? "http")

-- | ToJSON ExtensionsV1beta1IngressRule
instance A.ToJSON ExtensionsV1beta1IngressRule where
  toJSON ExtensionsV1beta1IngressRule {..} =
   _omitNulls
      [ "host" .= extensionsV1beta1IngressRuleHost
      , "http" .= extensionsV1beta1IngressRuleHttp
      ]


-- | Construct a value of type 'ExtensionsV1beta1IngressRule' (by applying it's required fields, if any)
mkExtensionsV1beta1IngressRule
  :: ExtensionsV1beta1IngressRule
mkExtensionsV1beta1IngressRule =
  ExtensionsV1beta1IngressRule
  { extensionsV1beta1IngressRuleHost = Nothing
  , extensionsV1beta1IngressRuleHttp = Nothing
  }

-- ** ExtensionsV1beta1IngressSpec
-- | ExtensionsV1beta1IngressSpec
-- IngressSpec describes the Ingress the user wishes to exist.
data ExtensionsV1beta1IngressSpec = ExtensionsV1beta1IngressSpec
  { extensionsV1beta1IngressSpecBackend :: !(Maybe ExtensionsV1beta1IngressBackend) -- ^ "backend"
  , extensionsV1beta1IngressSpecRules :: !(Maybe [ExtensionsV1beta1IngressRule]) -- ^ "rules" - A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.
  , extensionsV1beta1IngressSpecTls :: !(Maybe [ExtensionsV1beta1IngressTLS]) -- ^ "tls" - 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1IngressSpec
instance A.FromJSON ExtensionsV1beta1IngressSpec where
  parseJSON = A.withObject "ExtensionsV1beta1IngressSpec" $ \o ->
    ExtensionsV1beta1IngressSpec
      <$> (o .:? "backend")
      <*> (o .:? "rules")
      <*> (o .:? "tls")

-- | ToJSON ExtensionsV1beta1IngressSpec
instance A.ToJSON ExtensionsV1beta1IngressSpec where
  toJSON ExtensionsV1beta1IngressSpec {..} =
   _omitNulls
      [ "backend" .= extensionsV1beta1IngressSpecBackend
      , "rules" .= extensionsV1beta1IngressSpecRules
      , "tls" .= extensionsV1beta1IngressSpecTls
      ]


-- | Construct a value of type 'ExtensionsV1beta1IngressSpec' (by applying it's required fields, if any)
mkExtensionsV1beta1IngressSpec
  :: ExtensionsV1beta1IngressSpec
mkExtensionsV1beta1IngressSpec =
  ExtensionsV1beta1IngressSpec
  { extensionsV1beta1IngressSpecBackend = Nothing
  , extensionsV1beta1IngressSpecRules = Nothing
  , extensionsV1beta1IngressSpecTls = Nothing
  }

-- ** ExtensionsV1beta1IngressStatus
-- | ExtensionsV1beta1IngressStatus
-- IngressStatus describe the current state of the Ingress.
data ExtensionsV1beta1IngressStatus = ExtensionsV1beta1IngressStatus
  { extensionsV1beta1IngressStatusLoadBalancer :: !(Maybe V1LoadBalancerStatus) -- ^ "loadBalancer"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1IngressStatus
instance A.FromJSON ExtensionsV1beta1IngressStatus where
  parseJSON = A.withObject "ExtensionsV1beta1IngressStatus" $ \o ->
    ExtensionsV1beta1IngressStatus
      <$> (o .:? "loadBalancer")

-- | ToJSON ExtensionsV1beta1IngressStatus
instance A.ToJSON ExtensionsV1beta1IngressStatus where
  toJSON ExtensionsV1beta1IngressStatus {..} =
   _omitNulls
      [ "loadBalancer" .= extensionsV1beta1IngressStatusLoadBalancer
      ]


-- | Construct a value of type 'ExtensionsV1beta1IngressStatus' (by applying it's required fields, if any)
mkExtensionsV1beta1IngressStatus
  :: ExtensionsV1beta1IngressStatus
mkExtensionsV1beta1IngressStatus =
  ExtensionsV1beta1IngressStatus
  { extensionsV1beta1IngressStatusLoadBalancer = Nothing
  }

-- ** ExtensionsV1beta1IngressTLS
-- | ExtensionsV1beta1IngressTLS
-- IngressTLS describes the transport layer security associated with an Ingress.
data ExtensionsV1beta1IngressTLS = ExtensionsV1beta1IngressTLS
  { extensionsV1beta1IngressTLSHosts :: !(Maybe [Text]) -- ^ "hosts" - Hosts are 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.
  , extensionsV1beta1IngressTLSSecretName :: !(Maybe Text) -- ^ "secretName" - SecretName is the name of the secret used to terminate SSL traffic on 443. Field is left optional to allow SSL 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 Host header is used for routing.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1IngressTLS
instance A.FromJSON ExtensionsV1beta1IngressTLS where
  parseJSON = A.withObject "ExtensionsV1beta1IngressTLS" $ \o ->
    ExtensionsV1beta1IngressTLS
      <$> (o .:? "hosts")
      <*> (o .:? "secretName")

-- | ToJSON ExtensionsV1beta1IngressTLS
instance A.ToJSON ExtensionsV1beta1IngressTLS where
  toJSON ExtensionsV1beta1IngressTLS {..} =
   _omitNulls
      [ "hosts" .= extensionsV1beta1IngressTLSHosts
      , "secretName" .= extensionsV1beta1IngressTLSSecretName
      ]


-- | Construct a value of type 'ExtensionsV1beta1IngressTLS' (by applying it's required fields, if any)
mkExtensionsV1beta1IngressTLS
  :: ExtensionsV1beta1IngressTLS
mkExtensionsV1beta1IngressTLS =
  ExtensionsV1beta1IngressTLS
  { extensionsV1beta1IngressTLSHosts = Nothing
  , extensionsV1beta1IngressTLSSecretName = Nothing
  }

-- ** ExtensionsV1beta1PodSecurityPolicy
-- | ExtensionsV1beta1PodSecurityPolicy
-- PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. Deprecated: use PodSecurityPolicy from policy API Group instead.
data ExtensionsV1beta1PodSecurityPolicy = ExtensionsV1beta1PodSecurityPolicy
  { extensionsV1beta1PodSecurityPolicyApiVersion :: !(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/api-conventions.md#resources
  , extensionsV1beta1PodSecurityPolicyKind :: !(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/api-conventions.md#types-kinds
  , extensionsV1beta1PodSecurityPolicyMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , extensionsV1beta1PodSecurityPolicySpec :: !(Maybe ExtensionsV1beta1PodSecurityPolicySpec) -- ^ "spec"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1PodSecurityPolicy
instance A.FromJSON ExtensionsV1beta1PodSecurityPolicy where
  parseJSON = A.withObject "ExtensionsV1beta1PodSecurityPolicy" $ \o ->
    ExtensionsV1beta1PodSecurityPolicy
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")

-- | ToJSON ExtensionsV1beta1PodSecurityPolicy
instance A.ToJSON ExtensionsV1beta1PodSecurityPolicy where
  toJSON ExtensionsV1beta1PodSecurityPolicy {..} =
   _omitNulls
      [ "apiVersion" .= extensionsV1beta1PodSecurityPolicyApiVersion
      , "kind" .= extensionsV1beta1PodSecurityPolicyKind
      , "metadata" .= extensionsV1beta1PodSecurityPolicyMetadata
      , "spec" .= extensionsV1beta1PodSecurityPolicySpec
      ]


-- | Construct a value of type 'ExtensionsV1beta1PodSecurityPolicy' (by applying it's required fields, if any)
mkExtensionsV1beta1PodSecurityPolicy
  :: ExtensionsV1beta1PodSecurityPolicy
mkExtensionsV1beta1PodSecurityPolicy =
  ExtensionsV1beta1PodSecurityPolicy
  { extensionsV1beta1PodSecurityPolicyApiVersion = Nothing
  , extensionsV1beta1PodSecurityPolicyKind = Nothing
  , extensionsV1beta1PodSecurityPolicyMetadata = Nothing
  , extensionsV1beta1PodSecurityPolicySpec = Nothing
  }

-- ** ExtensionsV1beta1PodSecurityPolicyList
-- | ExtensionsV1beta1PodSecurityPolicyList
-- PodSecurityPolicyList is a list of PodSecurityPolicy objects. Deprecated: use PodSecurityPolicyList from policy API Group instead.
data ExtensionsV1beta1PodSecurityPolicyList = ExtensionsV1beta1PodSecurityPolicyList
  { extensionsV1beta1PodSecurityPolicyListApiVersion :: !(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/api-conventions.md#resources
  , extensionsV1beta1PodSecurityPolicyListItems :: !([ExtensionsV1beta1PodSecurityPolicy]) -- ^ /Required/ "items" - items is a list of schema objects.
  , extensionsV1beta1PodSecurityPolicyListKind :: !(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/api-conventions.md#types-kinds
  , extensionsV1beta1PodSecurityPolicyListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1PodSecurityPolicyList
instance A.FromJSON ExtensionsV1beta1PodSecurityPolicyList where
  parseJSON = A.withObject "ExtensionsV1beta1PodSecurityPolicyList" $ \o ->
    ExtensionsV1beta1PodSecurityPolicyList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON ExtensionsV1beta1PodSecurityPolicyList
instance A.ToJSON ExtensionsV1beta1PodSecurityPolicyList where
  toJSON ExtensionsV1beta1PodSecurityPolicyList {..} =
   _omitNulls
      [ "apiVersion" .= extensionsV1beta1PodSecurityPolicyListApiVersion
      , "items" .= extensionsV1beta1PodSecurityPolicyListItems
      , "kind" .= extensionsV1beta1PodSecurityPolicyListKind
      , "metadata" .= extensionsV1beta1PodSecurityPolicyListMetadata
      ]


-- | Construct a value of type 'ExtensionsV1beta1PodSecurityPolicyList' (by applying it's required fields, if any)
mkExtensionsV1beta1PodSecurityPolicyList
  :: [ExtensionsV1beta1PodSecurityPolicy] -- ^ 'extensionsV1beta1PodSecurityPolicyListItems': items is a list of schema objects.
  -> ExtensionsV1beta1PodSecurityPolicyList
mkExtensionsV1beta1PodSecurityPolicyList extensionsV1beta1PodSecurityPolicyListItems =
  ExtensionsV1beta1PodSecurityPolicyList
  { extensionsV1beta1PodSecurityPolicyListApiVersion = Nothing
  , extensionsV1beta1PodSecurityPolicyListItems
  , extensionsV1beta1PodSecurityPolicyListKind = Nothing
  , extensionsV1beta1PodSecurityPolicyListMetadata = Nothing
  }

-- ** ExtensionsV1beta1PodSecurityPolicySpec
-- | ExtensionsV1beta1PodSecurityPolicySpec
-- PodSecurityPolicySpec defines the policy enforced. Deprecated: use PodSecurityPolicySpec from policy API Group instead.
data ExtensionsV1beta1PodSecurityPolicySpec = ExtensionsV1beta1PodSecurityPolicySpec
  { extensionsV1beta1PodSecurityPolicySpecAllowPrivilegeEscalation :: !(Maybe Bool) -- ^ "allowPrivilegeEscalation" - allowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true.
  , extensionsV1beta1PodSecurityPolicySpecAllowedCsiDrivers :: !(Maybe [ExtensionsV1beta1AllowedCSIDriver]) -- ^ "allowedCSIDrivers" - AllowedCSIDrivers is a whitelist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. An empty value means no CSI drivers can run inline within a pod spec.
  , extensionsV1beta1PodSecurityPolicySpecAllowedCapabilities :: !(Maybe [Text]) -- ^ "allowedCapabilities" - allowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author&#39;s discretion. You must not list a capability in both allowedCapabilities and requiredDropCapabilities.
  , extensionsV1beta1PodSecurityPolicySpecAllowedFlexVolumes :: !(Maybe [ExtensionsV1beta1AllowedFlexVolume]) -- ^ "allowedFlexVolumes" - allowedFlexVolumes is a whitelist of allowed Flexvolumes.  Empty or nil indicates that all Flexvolumes may be used.  This parameter is effective only when the usage of the Flexvolumes is allowed in the \&quot;volumes\&quot; field.
  , extensionsV1beta1PodSecurityPolicySpecAllowedHostPaths :: !(Maybe [ExtensionsV1beta1AllowedHostPath]) -- ^ "allowedHostPaths" - allowedHostPaths is a white list of allowed host paths. Empty indicates that all host paths may be used.
  , extensionsV1beta1PodSecurityPolicySpecAllowedProcMountTypes :: !(Maybe [Text]) -- ^ "allowedProcMountTypes" - AllowedProcMountTypes is a whitelist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled.
  , extensionsV1beta1PodSecurityPolicySpecAllowedUnsafeSysctls :: !(Maybe [Text]) -- ^ "allowedUnsafeSysctls" - allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \&quot;*\&quot; in which case it is considered as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. Kubelet has to whitelist all allowed unsafe sysctls explicitly to avoid rejection.  Examples: e.g. \&quot;foo/*\&quot; allows \&quot;foo/bar\&quot;, \&quot;foo/baz\&quot;, etc. e.g. \&quot;foo.*\&quot; allows \&quot;foo.bar\&quot;, \&quot;foo.baz\&quot;, etc.
  , extensionsV1beta1PodSecurityPolicySpecDefaultAddCapabilities :: !(Maybe [Text]) -- ^ "defaultAddCapabilities" - defaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability.  You may not list a capability in both defaultAddCapabilities and requiredDropCapabilities. Capabilities added here are implicitly allowed, and need not be included in the allowedCapabilities list.
  , extensionsV1beta1PodSecurityPolicySpecDefaultAllowPrivilegeEscalation :: !(Maybe Bool) -- ^ "defaultAllowPrivilegeEscalation" - defaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process.
  , extensionsV1beta1PodSecurityPolicySpecForbiddenSysctls :: !(Maybe [Text]) -- ^ "forbiddenSysctls" - forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \&quot;*\&quot; in which case it is considered as a prefix of forbidden sysctls. Single * means all sysctls are forbidden.  Examples: e.g. \&quot;foo/*\&quot; forbids \&quot;foo/bar\&quot;, \&quot;foo/baz\&quot;, etc. e.g. \&quot;foo.*\&quot; forbids \&quot;foo.bar\&quot;, \&quot;foo.baz\&quot;, etc.
  , extensionsV1beta1PodSecurityPolicySpecFsGroup :: !(ExtensionsV1beta1FSGroupStrategyOptions) -- ^ /Required/ "fsGroup"
  , extensionsV1beta1PodSecurityPolicySpecHostIpc :: !(Maybe Bool) -- ^ "hostIPC" - hostIPC determines if the policy allows the use of HostIPC in the pod spec.
  , extensionsV1beta1PodSecurityPolicySpecHostNetwork :: !(Maybe Bool) -- ^ "hostNetwork" - hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.
  , extensionsV1beta1PodSecurityPolicySpecHostPid :: !(Maybe Bool) -- ^ "hostPID" - hostPID determines if the policy allows the use of HostPID in the pod spec.
  , extensionsV1beta1PodSecurityPolicySpecHostPorts :: !(Maybe [ExtensionsV1beta1HostPortRange]) -- ^ "hostPorts" - hostPorts determines which host port ranges are allowed to be exposed.
  , extensionsV1beta1PodSecurityPolicySpecPrivileged :: !(Maybe Bool) -- ^ "privileged" - privileged determines if a pod can request to be run as privileged.
  , extensionsV1beta1PodSecurityPolicySpecReadOnlyRootFilesystem :: !(Maybe Bool) -- ^ "readOnlyRootFilesystem" - readOnlyRootFilesystem when set to true will force containers to run with a read only root file system.  If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to.
  , extensionsV1beta1PodSecurityPolicySpecRequiredDropCapabilities :: !(Maybe [Text]) -- ^ "requiredDropCapabilities" - requiredDropCapabilities are the capabilities that will be dropped from the container.  These are required to be dropped and cannot be added.
  , extensionsV1beta1PodSecurityPolicySpecRunAsGroup :: !(Maybe ExtensionsV1beta1RunAsGroupStrategyOptions) -- ^ "runAsGroup"
  , extensionsV1beta1PodSecurityPolicySpecRunAsUser :: !(ExtensionsV1beta1RunAsUserStrategyOptions) -- ^ /Required/ "runAsUser"
  , extensionsV1beta1PodSecurityPolicySpecSeLinux :: !(ExtensionsV1beta1SELinuxStrategyOptions) -- ^ /Required/ "seLinux"
  , extensionsV1beta1PodSecurityPolicySpecSupplementalGroups :: !(ExtensionsV1beta1SupplementalGroupsStrategyOptions) -- ^ /Required/ "supplementalGroups"
  , extensionsV1beta1PodSecurityPolicySpecVolumes :: !(Maybe [Text]) -- ^ "volumes" - volumes is a white list of allowed volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use &#39;*&#39;.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1PodSecurityPolicySpec
instance A.FromJSON ExtensionsV1beta1PodSecurityPolicySpec where
  parseJSON = A.withObject "ExtensionsV1beta1PodSecurityPolicySpec" $ \o ->
    ExtensionsV1beta1PodSecurityPolicySpec
      <$> (o .:? "allowPrivilegeEscalation")
      <*> (o .:? "allowedCSIDrivers")
      <*> (o .:? "allowedCapabilities")
      <*> (o .:? "allowedFlexVolumes")
      <*> (o .:? "allowedHostPaths")
      <*> (o .:? "allowedProcMountTypes")
      <*> (o .:? "allowedUnsafeSysctls")
      <*> (o .:? "defaultAddCapabilities")
      <*> (o .:? "defaultAllowPrivilegeEscalation")
      <*> (o .:? "forbiddenSysctls")
      <*> (o .:  "fsGroup")
      <*> (o .:? "hostIPC")
      <*> (o .:? "hostNetwork")
      <*> (o .:? "hostPID")
      <*> (o .:? "hostPorts")
      <*> (o .:? "privileged")
      <*> (o .:? "readOnlyRootFilesystem")
      <*> (o .:? "requiredDropCapabilities")
      <*> (o .:? "runAsGroup")
      <*> (o .:  "runAsUser")
      <*> (o .:  "seLinux")
      <*> (o .:  "supplementalGroups")
      <*> (o .:? "volumes")

-- | ToJSON ExtensionsV1beta1PodSecurityPolicySpec
instance A.ToJSON ExtensionsV1beta1PodSecurityPolicySpec where
  toJSON ExtensionsV1beta1PodSecurityPolicySpec {..} =
   _omitNulls
      [ "allowPrivilegeEscalation" .= extensionsV1beta1PodSecurityPolicySpecAllowPrivilegeEscalation
      , "allowedCSIDrivers" .= extensionsV1beta1PodSecurityPolicySpecAllowedCsiDrivers
      , "allowedCapabilities" .= extensionsV1beta1PodSecurityPolicySpecAllowedCapabilities
      , "allowedFlexVolumes" .= extensionsV1beta1PodSecurityPolicySpecAllowedFlexVolumes
      , "allowedHostPaths" .= extensionsV1beta1PodSecurityPolicySpecAllowedHostPaths
      , "allowedProcMountTypes" .= extensionsV1beta1PodSecurityPolicySpecAllowedProcMountTypes
      , "allowedUnsafeSysctls" .= extensionsV1beta1PodSecurityPolicySpecAllowedUnsafeSysctls
      , "defaultAddCapabilities" .= extensionsV1beta1PodSecurityPolicySpecDefaultAddCapabilities
      , "defaultAllowPrivilegeEscalation" .= extensionsV1beta1PodSecurityPolicySpecDefaultAllowPrivilegeEscalation
      , "forbiddenSysctls" .= extensionsV1beta1PodSecurityPolicySpecForbiddenSysctls
      , "fsGroup" .= extensionsV1beta1PodSecurityPolicySpecFsGroup
      , "hostIPC" .= extensionsV1beta1PodSecurityPolicySpecHostIpc
      , "hostNetwork" .= extensionsV1beta1PodSecurityPolicySpecHostNetwork
      , "hostPID" .= extensionsV1beta1PodSecurityPolicySpecHostPid
      , "hostPorts" .= extensionsV1beta1PodSecurityPolicySpecHostPorts
      , "privileged" .= extensionsV1beta1PodSecurityPolicySpecPrivileged
      , "readOnlyRootFilesystem" .= extensionsV1beta1PodSecurityPolicySpecReadOnlyRootFilesystem
      , "requiredDropCapabilities" .= extensionsV1beta1PodSecurityPolicySpecRequiredDropCapabilities
      , "runAsGroup" .= extensionsV1beta1PodSecurityPolicySpecRunAsGroup
      , "runAsUser" .= extensionsV1beta1PodSecurityPolicySpecRunAsUser
      , "seLinux" .= extensionsV1beta1PodSecurityPolicySpecSeLinux
      , "supplementalGroups" .= extensionsV1beta1PodSecurityPolicySpecSupplementalGroups
      , "volumes" .= extensionsV1beta1PodSecurityPolicySpecVolumes
      ]


-- | Construct a value of type 'ExtensionsV1beta1PodSecurityPolicySpec' (by applying it's required fields, if any)
mkExtensionsV1beta1PodSecurityPolicySpec
  :: ExtensionsV1beta1FSGroupStrategyOptions -- ^ 'extensionsV1beta1PodSecurityPolicySpecFsGroup' 
  -> ExtensionsV1beta1RunAsUserStrategyOptions -- ^ 'extensionsV1beta1PodSecurityPolicySpecRunAsUser' 
  -> ExtensionsV1beta1SELinuxStrategyOptions -- ^ 'extensionsV1beta1PodSecurityPolicySpecSeLinux' 
  -> ExtensionsV1beta1SupplementalGroupsStrategyOptions -- ^ 'extensionsV1beta1PodSecurityPolicySpecSupplementalGroups' 
  -> ExtensionsV1beta1PodSecurityPolicySpec
mkExtensionsV1beta1PodSecurityPolicySpec extensionsV1beta1PodSecurityPolicySpecFsGroup extensionsV1beta1PodSecurityPolicySpecRunAsUser extensionsV1beta1PodSecurityPolicySpecSeLinux extensionsV1beta1PodSecurityPolicySpecSupplementalGroups =
  ExtensionsV1beta1PodSecurityPolicySpec
  { extensionsV1beta1PodSecurityPolicySpecAllowPrivilegeEscalation = Nothing
  , extensionsV1beta1PodSecurityPolicySpecAllowedCsiDrivers = Nothing
  , extensionsV1beta1PodSecurityPolicySpecAllowedCapabilities = Nothing
  , extensionsV1beta1PodSecurityPolicySpecAllowedFlexVolumes = Nothing
  , extensionsV1beta1PodSecurityPolicySpecAllowedHostPaths = Nothing
  , extensionsV1beta1PodSecurityPolicySpecAllowedProcMountTypes = Nothing
  , extensionsV1beta1PodSecurityPolicySpecAllowedUnsafeSysctls = Nothing
  , extensionsV1beta1PodSecurityPolicySpecDefaultAddCapabilities = Nothing
  , extensionsV1beta1PodSecurityPolicySpecDefaultAllowPrivilegeEscalation = Nothing
  , extensionsV1beta1PodSecurityPolicySpecForbiddenSysctls = Nothing
  , extensionsV1beta1PodSecurityPolicySpecFsGroup
  , extensionsV1beta1PodSecurityPolicySpecHostIpc = Nothing
  , extensionsV1beta1PodSecurityPolicySpecHostNetwork = Nothing
  , extensionsV1beta1PodSecurityPolicySpecHostPid = Nothing
  , extensionsV1beta1PodSecurityPolicySpecHostPorts = Nothing
  , extensionsV1beta1PodSecurityPolicySpecPrivileged = Nothing
  , extensionsV1beta1PodSecurityPolicySpecReadOnlyRootFilesystem = Nothing
  , extensionsV1beta1PodSecurityPolicySpecRequiredDropCapabilities = Nothing
  , extensionsV1beta1PodSecurityPolicySpecRunAsGroup = Nothing
  , extensionsV1beta1PodSecurityPolicySpecRunAsUser
  , extensionsV1beta1PodSecurityPolicySpecSeLinux
  , extensionsV1beta1PodSecurityPolicySpecSupplementalGroups
  , extensionsV1beta1PodSecurityPolicySpecVolumes = Nothing
  }

-- ** ExtensionsV1beta1RollbackConfig
-- | ExtensionsV1beta1RollbackConfig
-- DEPRECATED.
data ExtensionsV1beta1RollbackConfig = ExtensionsV1beta1RollbackConfig
  { extensionsV1beta1RollbackConfigRevision :: !(Maybe Integer) -- ^ "revision" - The revision to rollback to. If set to 0, rollback to the last revision.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1RollbackConfig
instance A.FromJSON ExtensionsV1beta1RollbackConfig where
  parseJSON = A.withObject "ExtensionsV1beta1RollbackConfig" $ \o ->
    ExtensionsV1beta1RollbackConfig
      <$> (o .:? "revision")

-- | ToJSON ExtensionsV1beta1RollbackConfig
instance A.ToJSON ExtensionsV1beta1RollbackConfig where
  toJSON ExtensionsV1beta1RollbackConfig {..} =
   _omitNulls
      [ "revision" .= extensionsV1beta1RollbackConfigRevision
      ]


-- | Construct a value of type 'ExtensionsV1beta1RollbackConfig' (by applying it's required fields, if any)
mkExtensionsV1beta1RollbackConfig
  :: ExtensionsV1beta1RollbackConfig
mkExtensionsV1beta1RollbackConfig =
  ExtensionsV1beta1RollbackConfig
  { extensionsV1beta1RollbackConfigRevision = Nothing
  }

-- ** ExtensionsV1beta1RollingUpdateDeployment
-- | ExtensionsV1beta1RollingUpdateDeployment
-- Spec to control the desired behavior of rolling update.
data ExtensionsV1beta1RollingUpdateDeployment = ExtensionsV1beta1RollingUpdateDeployment
  { extensionsV1beta1RollingUpdateDeploymentMaxSurge :: !(Maybe IntOrString) -- ^ "maxSurge"
  , extensionsV1beta1RollingUpdateDeploymentMaxUnavailable :: !(Maybe IntOrString) -- ^ "maxUnavailable"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1RollingUpdateDeployment
instance A.FromJSON ExtensionsV1beta1RollingUpdateDeployment where
  parseJSON = A.withObject "ExtensionsV1beta1RollingUpdateDeployment" $ \o ->
    ExtensionsV1beta1RollingUpdateDeployment
      <$> (o .:? "maxSurge")
      <*> (o .:? "maxUnavailable")

-- | ToJSON ExtensionsV1beta1RollingUpdateDeployment
instance A.ToJSON ExtensionsV1beta1RollingUpdateDeployment where
  toJSON ExtensionsV1beta1RollingUpdateDeployment {..} =
   _omitNulls
      [ "maxSurge" .= extensionsV1beta1RollingUpdateDeploymentMaxSurge
      , "maxUnavailable" .= extensionsV1beta1RollingUpdateDeploymentMaxUnavailable
      ]


-- | Construct a value of type 'ExtensionsV1beta1RollingUpdateDeployment' (by applying it's required fields, if any)
mkExtensionsV1beta1RollingUpdateDeployment
  :: ExtensionsV1beta1RollingUpdateDeployment
mkExtensionsV1beta1RollingUpdateDeployment =
  ExtensionsV1beta1RollingUpdateDeployment
  { extensionsV1beta1RollingUpdateDeploymentMaxSurge = Nothing
  , extensionsV1beta1RollingUpdateDeploymentMaxUnavailable = Nothing
  }

-- ** ExtensionsV1beta1RunAsGroupStrategyOptions
-- | ExtensionsV1beta1RunAsGroupStrategyOptions
-- RunAsGroupStrategyOptions defines the strategy type and any options used to create the strategy. Deprecated: use RunAsGroupStrategyOptions from policy API Group instead.
data ExtensionsV1beta1RunAsGroupStrategyOptions = ExtensionsV1beta1RunAsGroupStrategyOptions
  { extensionsV1beta1RunAsGroupStrategyOptionsRanges :: !(Maybe [ExtensionsV1beta1IDRange]) -- ^ "ranges" - ranges are the allowed ranges of gids that may be used. If you would like to force a single gid then supply a single range with the same start and end. Required for MustRunAs.
  , extensionsV1beta1RunAsGroupStrategyOptionsRule :: !(Text) -- ^ /Required/ "rule" - rule is the strategy that will dictate the allowable RunAsGroup values that may be set.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1RunAsGroupStrategyOptions
instance A.FromJSON ExtensionsV1beta1RunAsGroupStrategyOptions where
  parseJSON = A.withObject "ExtensionsV1beta1RunAsGroupStrategyOptions" $ \o ->
    ExtensionsV1beta1RunAsGroupStrategyOptions
      <$> (o .:? "ranges")
      <*> (o .:  "rule")

-- | ToJSON ExtensionsV1beta1RunAsGroupStrategyOptions
instance A.ToJSON ExtensionsV1beta1RunAsGroupStrategyOptions where
  toJSON ExtensionsV1beta1RunAsGroupStrategyOptions {..} =
   _omitNulls
      [ "ranges" .= extensionsV1beta1RunAsGroupStrategyOptionsRanges
      , "rule" .= extensionsV1beta1RunAsGroupStrategyOptionsRule
      ]


-- | Construct a value of type 'ExtensionsV1beta1RunAsGroupStrategyOptions' (by applying it's required fields, if any)
mkExtensionsV1beta1RunAsGroupStrategyOptions
  :: Text -- ^ 'extensionsV1beta1RunAsGroupStrategyOptionsRule': rule is the strategy that will dictate the allowable RunAsGroup values that may be set.
  -> ExtensionsV1beta1RunAsGroupStrategyOptions
mkExtensionsV1beta1RunAsGroupStrategyOptions extensionsV1beta1RunAsGroupStrategyOptionsRule =
  ExtensionsV1beta1RunAsGroupStrategyOptions
  { extensionsV1beta1RunAsGroupStrategyOptionsRanges = Nothing
  , extensionsV1beta1RunAsGroupStrategyOptionsRule
  }

-- ** ExtensionsV1beta1RunAsUserStrategyOptions
-- | ExtensionsV1beta1RunAsUserStrategyOptions
-- RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy. Deprecated: use RunAsUserStrategyOptions from policy API Group instead.
data ExtensionsV1beta1RunAsUserStrategyOptions = ExtensionsV1beta1RunAsUserStrategyOptions
  { extensionsV1beta1RunAsUserStrategyOptionsRanges :: !(Maybe [ExtensionsV1beta1IDRange]) -- ^ "ranges" - ranges are the allowed ranges of uids that may be used. If you would like to force a single uid then supply a single range with the same start and end. Required for MustRunAs.
  , extensionsV1beta1RunAsUserStrategyOptionsRule :: !(Text) -- ^ /Required/ "rule" - rule is the strategy that will dictate the allowable RunAsUser values that may be set.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1RunAsUserStrategyOptions
instance A.FromJSON ExtensionsV1beta1RunAsUserStrategyOptions where
  parseJSON = A.withObject "ExtensionsV1beta1RunAsUserStrategyOptions" $ \o ->
    ExtensionsV1beta1RunAsUserStrategyOptions
      <$> (o .:? "ranges")
      <*> (o .:  "rule")

-- | ToJSON ExtensionsV1beta1RunAsUserStrategyOptions
instance A.ToJSON ExtensionsV1beta1RunAsUserStrategyOptions where
  toJSON ExtensionsV1beta1RunAsUserStrategyOptions {..} =
   _omitNulls
      [ "ranges" .= extensionsV1beta1RunAsUserStrategyOptionsRanges
      , "rule" .= extensionsV1beta1RunAsUserStrategyOptionsRule
      ]


-- | Construct a value of type 'ExtensionsV1beta1RunAsUserStrategyOptions' (by applying it's required fields, if any)
mkExtensionsV1beta1RunAsUserStrategyOptions
  :: Text -- ^ 'extensionsV1beta1RunAsUserStrategyOptionsRule': rule is the strategy that will dictate the allowable RunAsUser values that may be set.
  -> ExtensionsV1beta1RunAsUserStrategyOptions
mkExtensionsV1beta1RunAsUserStrategyOptions extensionsV1beta1RunAsUserStrategyOptionsRule =
  ExtensionsV1beta1RunAsUserStrategyOptions
  { extensionsV1beta1RunAsUserStrategyOptionsRanges = Nothing
  , extensionsV1beta1RunAsUserStrategyOptionsRule
  }

-- ** ExtensionsV1beta1SELinuxStrategyOptions
-- | ExtensionsV1beta1SELinuxStrategyOptions
-- SELinuxStrategyOptions defines the strategy type and any options used to create the strategy. Deprecated: use SELinuxStrategyOptions from policy API Group instead.
data ExtensionsV1beta1SELinuxStrategyOptions = ExtensionsV1beta1SELinuxStrategyOptions
  { extensionsV1beta1SELinuxStrategyOptionsRule :: !(Text) -- ^ /Required/ "rule" - rule is the strategy that will dictate the allowable labels that may be set.
  , extensionsV1beta1SELinuxStrategyOptionsSeLinuxOptions :: !(Maybe V1SELinuxOptions) -- ^ "seLinuxOptions"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1SELinuxStrategyOptions
instance A.FromJSON ExtensionsV1beta1SELinuxStrategyOptions where
  parseJSON = A.withObject "ExtensionsV1beta1SELinuxStrategyOptions" $ \o ->
    ExtensionsV1beta1SELinuxStrategyOptions
      <$> (o .:  "rule")
      <*> (o .:? "seLinuxOptions")

-- | ToJSON ExtensionsV1beta1SELinuxStrategyOptions
instance A.ToJSON ExtensionsV1beta1SELinuxStrategyOptions where
  toJSON ExtensionsV1beta1SELinuxStrategyOptions {..} =
   _omitNulls
      [ "rule" .= extensionsV1beta1SELinuxStrategyOptionsRule
      , "seLinuxOptions" .= extensionsV1beta1SELinuxStrategyOptionsSeLinuxOptions
      ]


-- | Construct a value of type 'ExtensionsV1beta1SELinuxStrategyOptions' (by applying it's required fields, if any)
mkExtensionsV1beta1SELinuxStrategyOptions
  :: Text -- ^ 'extensionsV1beta1SELinuxStrategyOptionsRule': rule is the strategy that will dictate the allowable labels that may be set.
  -> ExtensionsV1beta1SELinuxStrategyOptions
mkExtensionsV1beta1SELinuxStrategyOptions extensionsV1beta1SELinuxStrategyOptionsRule =
  ExtensionsV1beta1SELinuxStrategyOptions
  { extensionsV1beta1SELinuxStrategyOptionsRule
  , extensionsV1beta1SELinuxStrategyOptionsSeLinuxOptions = Nothing
  }

-- ** ExtensionsV1beta1Scale
-- | ExtensionsV1beta1Scale
-- represents a scaling request for a resource.
data ExtensionsV1beta1Scale = ExtensionsV1beta1Scale
  { extensionsV1beta1ScaleApiVersion :: !(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/api-conventions.md#resources
  , extensionsV1beta1ScaleKind :: !(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/api-conventions.md#types-kinds
  , extensionsV1beta1ScaleMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , extensionsV1beta1ScaleSpec :: !(Maybe ExtensionsV1beta1ScaleSpec) -- ^ "spec"
  , extensionsV1beta1ScaleStatus :: !(Maybe ExtensionsV1beta1ScaleStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1Scale
instance A.FromJSON ExtensionsV1beta1Scale where
  parseJSON = A.withObject "ExtensionsV1beta1Scale" $ \o ->
    ExtensionsV1beta1Scale
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON ExtensionsV1beta1Scale
instance A.ToJSON ExtensionsV1beta1Scale where
  toJSON ExtensionsV1beta1Scale {..} =
   _omitNulls
      [ "apiVersion" .= extensionsV1beta1ScaleApiVersion
      , "kind" .= extensionsV1beta1ScaleKind
      , "metadata" .= extensionsV1beta1ScaleMetadata
      , "spec" .= extensionsV1beta1ScaleSpec
      , "status" .= extensionsV1beta1ScaleStatus
      ]


-- | Construct a value of type 'ExtensionsV1beta1Scale' (by applying it's required fields, if any)
mkExtensionsV1beta1Scale
  :: ExtensionsV1beta1Scale
mkExtensionsV1beta1Scale =
  ExtensionsV1beta1Scale
  { extensionsV1beta1ScaleApiVersion = Nothing
  , extensionsV1beta1ScaleKind = Nothing
  , extensionsV1beta1ScaleMetadata = Nothing
  , extensionsV1beta1ScaleSpec = Nothing
  , extensionsV1beta1ScaleStatus = Nothing
  }

-- ** ExtensionsV1beta1ScaleSpec
-- | ExtensionsV1beta1ScaleSpec
-- describes the attributes of a scale subresource
data ExtensionsV1beta1ScaleSpec = ExtensionsV1beta1ScaleSpec
  { extensionsV1beta1ScaleSpecReplicas :: !(Maybe Int) -- ^ "replicas" - desired number of instances for the scaled object.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1ScaleSpec
instance A.FromJSON ExtensionsV1beta1ScaleSpec where
  parseJSON = A.withObject "ExtensionsV1beta1ScaleSpec" $ \o ->
    ExtensionsV1beta1ScaleSpec
      <$> (o .:? "replicas")

-- | ToJSON ExtensionsV1beta1ScaleSpec
instance A.ToJSON ExtensionsV1beta1ScaleSpec where
  toJSON ExtensionsV1beta1ScaleSpec {..} =
   _omitNulls
      [ "replicas" .= extensionsV1beta1ScaleSpecReplicas
      ]


-- | Construct a value of type 'ExtensionsV1beta1ScaleSpec' (by applying it's required fields, if any)
mkExtensionsV1beta1ScaleSpec
  :: ExtensionsV1beta1ScaleSpec
mkExtensionsV1beta1ScaleSpec =
  ExtensionsV1beta1ScaleSpec
  { extensionsV1beta1ScaleSpecReplicas = Nothing
  }

-- ** ExtensionsV1beta1ScaleStatus
-- | ExtensionsV1beta1ScaleStatus
-- represents the current status of a scale subresource.
data ExtensionsV1beta1ScaleStatus = ExtensionsV1beta1ScaleStatus
  { extensionsV1beta1ScaleStatusReplicas :: !(Int) -- ^ /Required/ "replicas" - actual number of observed instances of the scaled object.
  , extensionsV1beta1ScaleStatusSelector :: !(Maybe (Map.Map String Text)) -- ^ "selector" - label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
  , extensionsV1beta1ScaleStatusTargetSelector :: !(Maybe Text) -- ^ "targetSelector" - label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1ScaleStatus
instance A.FromJSON ExtensionsV1beta1ScaleStatus where
  parseJSON = A.withObject "ExtensionsV1beta1ScaleStatus" $ \o ->
    ExtensionsV1beta1ScaleStatus
      <$> (o .:  "replicas")
      <*> (o .:? "selector")
      <*> (o .:? "targetSelector")

-- | ToJSON ExtensionsV1beta1ScaleStatus
instance A.ToJSON ExtensionsV1beta1ScaleStatus where
  toJSON ExtensionsV1beta1ScaleStatus {..} =
   _omitNulls
      [ "replicas" .= extensionsV1beta1ScaleStatusReplicas
      , "selector" .= extensionsV1beta1ScaleStatusSelector
      , "targetSelector" .= extensionsV1beta1ScaleStatusTargetSelector
      ]


-- | Construct a value of type 'ExtensionsV1beta1ScaleStatus' (by applying it's required fields, if any)
mkExtensionsV1beta1ScaleStatus
  :: Int -- ^ 'extensionsV1beta1ScaleStatusReplicas': actual number of observed instances of the scaled object.
  -> ExtensionsV1beta1ScaleStatus
mkExtensionsV1beta1ScaleStatus extensionsV1beta1ScaleStatusReplicas =
  ExtensionsV1beta1ScaleStatus
  { extensionsV1beta1ScaleStatusReplicas
  , extensionsV1beta1ScaleStatusSelector = Nothing
  , extensionsV1beta1ScaleStatusTargetSelector = Nothing
  }

-- ** ExtensionsV1beta1SupplementalGroupsStrategyOptions
-- | ExtensionsV1beta1SupplementalGroupsStrategyOptions
-- SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy. Deprecated: use SupplementalGroupsStrategyOptions from policy API Group instead.
data ExtensionsV1beta1SupplementalGroupsStrategyOptions = ExtensionsV1beta1SupplementalGroupsStrategyOptions
  { extensionsV1beta1SupplementalGroupsStrategyOptionsRanges :: !(Maybe [ExtensionsV1beta1IDRange]) -- ^ "ranges" - ranges are the allowed ranges of supplemental groups.  If you would like to force a single supplemental group then supply a single range with the same start and end. Required for MustRunAs.
  , extensionsV1beta1SupplementalGroupsStrategyOptionsRule :: !(Maybe Text) -- ^ "rule" - rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON ExtensionsV1beta1SupplementalGroupsStrategyOptions
instance A.FromJSON ExtensionsV1beta1SupplementalGroupsStrategyOptions where
  parseJSON = A.withObject "ExtensionsV1beta1SupplementalGroupsStrategyOptions" $ \o ->
    ExtensionsV1beta1SupplementalGroupsStrategyOptions
      <$> (o .:? "ranges")
      <*> (o .:? "rule")

-- | ToJSON ExtensionsV1beta1SupplementalGroupsStrategyOptions
instance A.ToJSON ExtensionsV1beta1SupplementalGroupsStrategyOptions where
  toJSON ExtensionsV1beta1SupplementalGroupsStrategyOptions {..} =
   _omitNulls
      [ "ranges" .= extensionsV1beta1SupplementalGroupsStrategyOptionsRanges
      , "rule" .= extensionsV1beta1SupplementalGroupsStrategyOptionsRule
      ]


-- | Construct a value of type 'ExtensionsV1beta1SupplementalGroupsStrategyOptions' (by applying it's required fields, if any)
mkExtensionsV1beta1SupplementalGroupsStrategyOptions
  :: ExtensionsV1beta1SupplementalGroupsStrategyOptions
mkExtensionsV1beta1SupplementalGroupsStrategyOptions =
  ExtensionsV1beta1SupplementalGroupsStrategyOptions
  { extensionsV1beta1SupplementalGroupsStrategyOptionsRanges = Nothing
  , extensionsV1beta1SupplementalGroupsStrategyOptionsRule = Nothing
  }

-- ** NetworkingV1beta1HTTPIngressPath
-- | NetworkingV1beta1HTTPIngressPath
-- HTTPIngressPath associates a path regex with a backend. Incoming urls matching the path are forwarded to the backend.
data NetworkingV1beta1HTTPIngressPath = NetworkingV1beta1HTTPIngressPath
  { networkingV1beta1HTTPIngressPathBackend :: !(NetworkingV1beta1IngressBackend) -- ^ /Required/ "backend"
  , networkingV1beta1HTTPIngressPathPath :: !(Maybe Text) -- ^ "path" - Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) 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;. If unspecified, the path defaults to a catch all sending traffic to the backend.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON NetworkingV1beta1HTTPIngressPath
instance A.FromJSON NetworkingV1beta1HTTPIngressPath where
  parseJSON = A.withObject "NetworkingV1beta1HTTPIngressPath" $ \o ->
    NetworkingV1beta1HTTPIngressPath
      <$> (o .:  "backend")
      <*> (o .:? "path")

-- | ToJSON NetworkingV1beta1HTTPIngressPath
instance A.ToJSON NetworkingV1beta1HTTPIngressPath where
  toJSON NetworkingV1beta1HTTPIngressPath {..} =
   _omitNulls
      [ "backend" .= networkingV1beta1HTTPIngressPathBackend
      , "path" .= networkingV1beta1HTTPIngressPathPath
      ]


-- | Construct a value of type 'NetworkingV1beta1HTTPIngressPath' (by applying it's required fields, if any)
mkNetworkingV1beta1HTTPIngressPath
  :: NetworkingV1beta1IngressBackend -- ^ 'networkingV1beta1HTTPIngressPathBackend' 
  -> NetworkingV1beta1HTTPIngressPath
mkNetworkingV1beta1HTTPIngressPath networkingV1beta1HTTPIngressPathBackend =
  NetworkingV1beta1HTTPIngressPath
  { networkingV1beta1HTTPIngressPathBackend
  , networkingV1beta1HTTPIngressPathPath = Nothing
  }

-- ** NetworkingV1beta1HTTPIngressRuleValue
-- | NetworkingV1beta1HTTPIngressRuleValue
-- 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 NetworkingV1beta1HTTPIngressRuleValue = NetworkingV1beta1HTTPIngressRuleValue
  { networkingV1beta1HTTPIngressRuleValuePaths :: !([NetworkingV1beta1HTTPIngressPath]) -- ^ /Required/ "paths" - A collection of paths that map requests to backends.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON NetworkingV1beta1HTTPIngressRuleValue
instance A.FromJSON NetworkingV1beta1HTTPIngressRuleValue where
  parseJSON = A.withObject "NetworkingV1beta1HTTPIngressRuleValue" $ \o ->
    NetworkingV1beta1HTTPIngressRuleValue
      <$> (o .:  "paths")

-- | ToJSON NetworkingV1beta1HTTPIngressRuleValue
instance A.ToJSON NetworkingV1beta1HTTPIngressRuleValue where
  toJSON NetworkingV1beta1HTTPIngressRuleValue {..} =
   _omitNulls
      [ "paths" .= networkingV1beta1HTTPIngressRuleValuePaths
      ]


-- | Construct a value of type 'NetworkingV1beta1HTTPIngressRuleValue' (by applying it's required fields, if any)
mkNetworkingV1beta1HTTPIngressRuleValue
  :: [NetworkingV1beta1HTTPIngressPath] -- ^ 'networkingV1beta1HTTPIngressRuleValuePaths': A collection of paths that map requests to backends.
  -> NetworkingV1beta1HTTPIngressRuleValue
mkNetworkingV1beta1HTTPIngressRuleValue networkingV1beta1HTTPIngressRuleValuePaths =
  NetworkingV1beta1HTTPIngressRuleValue
  { networkingV1beta1HTTPIngressRuleValuePaths
  }

-- ** NetworkingV1beta1Ingress
-- | NetworkingV1beta1Ingress
-- 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 NetworkingV1beta1Ingress = NetworkingV1beta1Ingress
  { networkingV1beta1IngressApiVersion :: !(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/api-conventions.md#resources
  , networkingV1beta1IngressKind :: !(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/api-conventions.md#types-kinds
  , networkingV1beta1IngressMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , networkingV1beta1IngressSpec :: !(Maybe NetworkingV1beta1IngressSpec) -- ^ "spec"
  , networkingV1beta1IngressStatus :: !(Maybe NetworkingV1beta1IngressStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON NetworkingV1beta1Ingress
instance A.FromJSON NetworkingV1beta1Ingress where
  parseJSON = A.withObject "NetworkingV1beta1Ingress" $ \o ->
    NetworkingV1beta1Ingress
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON NetworkingV1beta1Ingress
instance A.ToJSON NetworkingV1beta1Ingress where
  toJSON NetworkingV1beta1Ingress {..} =
   _omitNulls
      [ "apiVersion" .= networkingV1beta1IngressApiVersion
      , "kind" .= networkingV1beta1IngressKind
      , "metadata" .= networkingV1beta1IngressMetadata
      , "spec" .= networkingV1beta1IngressSpec
      , "status" .= networkingV1beta1IngressStatus
      ]


-- | Construct a value of type 'NetworkingV1beta1Ingress' (by applying it's required fields, if any)
mkNetworkingV1beta1Ingress
  :: NetworkingV1beta1Ingress
mkNetworkingV1beta1Ingress =
  NetworkingV1beta1Ingress
  { networkingV1beta1IngressApiVersion = Nothing
  , networkingV1beta1IngressKind = Nothing
  , networkingV1beta1IngressMetadata = Nothing
  , networkingV1beta1IngressSpec = Nothing
  , networkingV1beta1IngressStatus = Nothing
  }

-- ** NetworkingV1beta1IngressBackend
-- | NetworkingV1beta1IngressBackend
-- IngressBackend describes all endpoints for a given service and port.
data NetworkingV1beta1IngressBackend = NetworkingV1beta1IngressBackend
  { networkingV1beta1IngressBackendServiceName :: !(Text) -- ^ /Required/ "serviceName" - Specifies the name of the referenced service.
  , networkingV1beta1IngressBackendServicePort :: !(IntOrString) -- ^ /Required/ "servicePort"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON NetworkingV1beta1IngressBackend
instance A.FromJSON NetworkingV1beta1IngressBackend where
  parseJSON = A.withObject "NetworkingV1beta1IngressBackend" $ \o ->
    NetworkingV1beta1IngressBackend
      <$> (o .:  "serviceName")
      <*> (o .:  "servicePort")

-- | ToJSON NetworkingV1beta1IngressBackend
instance A.ToJSON NetworkingV1beta1IngressBackend where
  toJSON NetworkingV1beta1IngressBackend {..} =
   _omitNulls
      [ "serviceName" .= networkingV1beta1IngressBackendServiceName
      , "servicePort" .= networkingV1beta1IngressBackendServicePort
      ]


-- | Construct a value of type 'NetworkingV1beta1IngressBackend' (by applying it's required fields, if any)
mkNetworkingV1beta1IngressBackend
  :: Text -- ^ 'networkingV1beta1IngressBackendServiceName': Specifies the name of the referenced service.
  -> IntOrString -- ^ 'networkingV1beta1IngressBackendServicePort' 
  -> NetworkingV1beta1IngressBackend
mkNetworkingV1beta1IngressBackend networkingV1beta1IngressBackendServiceName networkingV1beta1IngressBackendServicePort =
  NetworkingV1beta1IngressBackend
  { networkingV1beta1IngressBackendServiceName
  , networkingV1beta1IngressBackendServicePort
  }

-- ** NetworkingV1beta1IngressList
-- | NetworkingV1beta1IngressList
-- IngressList is a collection of Ingress.
data NetworkingV1beta1IngressList = NetworkingV1beta1IngressList
  { networkingV1beta1IngressListApiVersion :: !(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/api-conventions.md#resources
  , networkingV1beta1IngressListItems :: !([NetworkingV1beta1Ingress]) -- ^ /Required/ "items" - Items is the list of Ingress.
  , networkingV1beta1IngressListKind :: !(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/api-conventions.md#types-kinds
  , networkingV1beta1IngressListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON NetworkingV1beta1IngressList
instance A.FromJSON NetworkingV1beta1IngressList where
  parseJSON = A.withObject "NetworkingV1beta1IngressList" $ \o ->
    NetworkingV1beta1IngressList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON NetworkingV1beta1IngressList
instance A.ToJSON NetworkingV1beta1IngressList where
  toJSON NetworkingV1beta1IngressList {..} =
   _omitNulls
      [ "apiVersion" .= networkingV1beta1IngressListApiVersion
      , "items" .= networkingV1beta1IngressListItems
      , "kind" .= networkingV1beta1IngressListKind
      , "metadata" .= networkingV1beta1IngressListMetadata
      ]


-- | Construct a value of type 'NetworkingV1beta1IngressList' (by applying it's required fields, if any)
mkNetworkingV1beta1IngressList
  :: [NetworkingV1beta1Ingress] -- ^ 'networkingV1beta1IngressListItems': Items is the list of Ingress.
  -> NetworkingV1beta1IngressList
mkNetworkingV1beta1IngressList networkingV1beta1IngressListItems =
  NetworkingV1beta1IngressList
  { networkingV1beta1IngressListApiVersion = Nothing
  , networkingV1beta1IngressListItems
  , networkingV1beta1IngressListKind = Nothing
  , networkingV1beta1IngressListMetadata = Nothing
  }

-- ** NetworkingV1beta1IngressRule
-- | NetworkingV1beta1IngressRule
-- 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 NetworkingV1beta1IngressRule = NetworkingV1beta1IngressRule
  { networkingV1beta1IngressRuleHost :: !(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 the RFC: 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.
  , networkingV1beta1IngressRuleHttp :: !(Maybe NetworkingV1beta1HTTPIngressRuleValue) -- ^ "http"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON NetworkingV1beta1IngressRule
instance A.FromJSON NetworkingV1beta1IngressRule where
  parseJSON = A.withObject "NetworkingV1beta1IngressRule" $ \o ->
    NetworkingV1beta1IngressRule
      <$> (o .:? "host")
      <*> (o .:? "http")

-- | ToJSON NetworkingV1beta1IngressRule
instance A.ToJSON NetworkingV1beta1IngressRule where
  toJSON NetworkingV1beta1IngressRule {..} =
   _omitNulls
      [ "host" .= networkingV1beta1IngressRuleHost
      , "http" .= networkingV1beta1IngressRuleHttp
      ]


-- | Construct a value of type 'NetworkingV1beta1IngressRule' (by applying it's required fields, if any)
mkNetworkingV1beta1IngressRule
  :: NetworkingV1beta1IngressRule
mkNetworkingV1beta1IngressRule =
  NetworkingV1beta1IngressRule
  { networkingV1beta1IngressRuleHost = Nothing
  , networkingV1beta1IngressRuleHttp = Nothing
  }

-- ** NetworkingV1beta1IngressSpec
-- | NetworkingV1beta1IngressSpec
-- IngressSpec describes the Ingress the user wishes to exist.
data NetworkingV1beta1IngressSpec = NetworkingV1beta1IngressSpec
  { networkingV1beta1IngressSpecBackend :: !(Maybe NetworkingV1beta1IngressBackend) -- ^ "backend"
  , networkingV1beta1IngressSpecRules :: !(Maybe [NetworkingV1beta1IngressRule]) -- ^ "rules" - A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.
  , networkingV1beta1IngressSpecTls :: !(Maybe [NetworkingV1beta1IngressTLS]) -- ^ "tls" - 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON NetworkingV1beta1IngressSpec
instance A.FromJSON NetworkingV1beta1IngressSpec where
  parseJSON = A.withObject "NetworkingV1beta1IngressSpec" $ \o ->
    NetworkingV1beta1IngressSpec
      <$> (o .:? "backend")
      <*> (o .:? "rules")
      <*> (o .:? "tls")

-- | ToJSON NetworkingV1beta1IngressSpec
instance A.ToJSON NetworkingV1beta1IngressSpec where
  toJSON NetworkingV1beta1IngressSpec {..} =
   _omitNulls
      [ "backend" .= networkingV1beta1IngressSpecBackend
      , "rules" .= networkingV1beta1IngressSpecRules
      , "tls" .= networkingV1beta1IngressSpecTls
      ]


-- | Construct a value of type 'NetworkingV1beta1IngressSpec' (by applying it's required fields, if any)
mkNetworkingV1beta1IngressSpec
  :: NetworkingV1beta1IngressSpec
mkNetworkingV1beta1IngressSpec =
  NetworkingV1beta1IngressSpec
  { networkingV1beta1IngressSpecBackend = Nothing
  , networkingV1beta1IngressSpecRules = Nothing
  , networkingV1beta1IngressSpecTls = Nothing
  }

-- ** NetworkingV1beta1IngressStatus
-- | NetworkingV1beta1IngressStatus
-- IngressStatus describe the current state of the Ingress.
data NetworkingV1beta1IngressStatus = NetworkingV1beta1IngressStatus
  { networkingV1beta1IngressStatusLoadBalancer :: !(Maybe V1LoadBalancerStatus) -- ^ "loadBalancer"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON NetworkingV1beta1IngressStatus
instance A.FromJSON NetworkingV1beta1IngressStatus where
  parseJSON = A.withObject "NetworkingV1beta1IngressStatus" $ \o ->
    NetworkingV1beta1IngressStatus
      <$> (o .:? "loadBalancer")

-- | ToJSON NetworkingV1beta1IngressStatus
instance A.ToJSON NetworkingV1beta1IngressStatus where
  toJSON NetworkingV1beta1IngressStatus {..} =
   _omitNulls
      [ "loadBalancer" .= networkingV1beta1IngressStatusLoadBalancer
      ]


-- | Construct a value of type 'NetworkingV1beta1IngressStatus' (by applying it's required fields, if any)
mkNetworkingV1beta1IngressStatus
  :: NetworkingV1beta1IngressStatus
mkNetworkingV1beta1IngressStatus =
  NetworkingV1beta1IngressStatus
  { networkingV1beta1IngressStatusLoadBalancer = Nothing
  }

-- ** NetworkingV1beta1IngressTLS
-- | NetworkingV1beta1IngressTLS
-- IngressTLS describes the transport layer security associated with an Ingress.
data NetworkingV1beta1IngressTLS = NetworkingV1beta1IngressTLS
  { networkingV1beta1IngressTLSHosts :: !(Maybe [Text]) -- ^ "hosts" - Hosts are 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.
  , networkingV1beta1IngressTLSSecretName :: !(Maybe Text) -- ^ "secretName" - SecretName is the name of the secret used to terminate SSL traffic on 443. Field is left optional to allow SSL 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 Host header is used for routing.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON NetworkingV1beta1IngressTLS
instance A.FromJSON NetworkingV1beta1IngressTLS where
  parseJSON = A.withObject "NetworkingV1beta1IngressTLS" $ \o ->
    NetworkingV1beta1IngressTLS
      <$> (o .:? "hosts")
      <*> (o .:? "secretName")

-- | ToJSON NetworkingV1beta1IngressTLS
instance A.ToJSON NetworkingV1beta1IngressTLS where
  toJSON NetworkingV1beta1IngressTLS {..} =
   _omitNulls
      [ "hosts" .= networkingV1beta1IngressTLSHosts
      , "secretName" .= networkingV1beta1IngressTLSSecretName
      ]


-- | Construct a value of type 'NetworkingV1beta1IngressTLS' (by applying it's required fields, if any)
mkNetworkingV1beta1IngressTLS
  :: NetworkingV1beta1IngressTLS
mkNetworkingV1beta1IngressTLS =
  NetworkingV1beta1IngressTLS
  { networkingV1beta1IngressTLSHosts = Nothing
  , networkingV1beta1IngressTLSSecretName = Nothing
  }

-- ** PolicyV1beta1AllowedCSIDriver
-- | PolicyV1beta1AllowedCSIDriver
-- AllowedCSIDriver represents a single inline CSI Driver that is allowed to be used.
data PolicyV1beta1AllowedCSIDriver = PolicyV1beta1AllowedCSIDriver
  { policyV1beta1AllowedCSIDriverName :: !(Text) -- ^ /Required/ "name" - Name is the registered name of the CSI driver
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON PolicyV1beta1AllowedCSIDriver
instance A.FromJSON PolicyV1beta1AllowedCSIDriver where
  parseJSON = A.withObject "PolicyV1beta1AllowedCSIDriver" $ \o ->
    PolicyV1beta1AllowedCSIDriver
      <$> (o .:  "name")

-- | ToJSON PolicyV1beta1AllowedCSIDriver
instance A.ToJSON PolicyV1beta1AllowedCSIDriver where
  toJSON PolicyV1beta1AllowedCSIDriver {..} =
   _omitNulls
      [ "name" .= policyV1beta1AllowedCSIDriverName
      ]


-- | Construct a value of type 'PolicyV1beta1AllowedCSIDriver' (by applying it's required fields, if any)
mkPolicyV1beta1AllowedCSIDriver
  :: Text -- ^ 'policyV1beta1AllowedCSIDriverName': Name is the registered name of the CSI driver
  -> PolicyV1beta1AllowedCSIDriver
mkPolicyV1beta1AllowedCSIDriver policyV1beta1AllowedCSIDriverName =
  PolicyV1beta1AllowedCSIDriver
  { policyV1beta1AllowedCSIDriverName
  }

-- ** PolicyV1beta1AllowedFlexVolume
-- | PolicyV1beta1AllowedFlexVolume
-- AllowedFlexVolume represents a single Flexvolume that is allowed to be used.
data PolicyV1beta1AllowedFlexVolume = PolicyV1beta1AllowedFlexVolume
  { policyV1beta1AllowedFlexVolumeDriver :: !(Text) -- ^ /Required/ "driver" - driver is the name of the Flexvolume driver.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON PolicyV1beta1AllowedFlexVolume
instance A.FromJSON PolicyV1beta1AllowedFlexVolume where
  parseJSON = A.withObject "PolicyV1beta1AllowedFlexVolume" $ \o ->
    PolicyV1beta1AllowedFlexVolume
      <$> (o .:  "driver")

-- | ToJSON PolicyV1beta1AllowedFlexVolume
instance A.ToJSON PolicyV1beta1AllowedFlexVolume where
  toJSON PolicyV1beta1AllowedFlexVolume {..} =
   _omitNulls
      [ "driver" .= policyV1beta1AllowedFlexVolumeDriver
      ]


-- | Construct a value of type 'PolicyV1beta1AllowedFlexVolume' (by applying it's required fields, if any)
mkPolicyV1beta1AllowedFlexVolume
  :: Text -- ^ 'policyV1beta1AllowedFlexVolumeDriver': driver is the name of the Flexvolume driver.
  -> PolicyV1beta1AllowedFlexVolume
mkPolicyV1beta1AllowedFlexVolume policyV1beta1AllowedFlexVolumeDriver =
  PolicyV1beta1AllowedFlexVolume
  { policyV1beta1AllowedFlexVolumeDriver
  }

-- ** PolicyV1beta1AllowedHostPath
-- | PolicyV1beta1AllowedHostPath
-- AllowedHostPath defines the host volume conditions that will be enabled by a policy for pods to use. It requires the path prefix to be defined.
data PolicyV1beta1AllowedHostPath = PolicyV1beta1AllowedHostPath
  { policyV1beta1AllowedHostPathPathPrefix :: !(Maybe Text) -- ^ "pathPrefix" - pathPrefix is the path prefix that the host volume must match. It does not support &#x60;*&#x60;. Trailing slashes are trimmed when validating the path prefix with a host path.  Examples: &#x60;/foo&#x60; would allow &#x60;/foo&#x60;, &#x60;/foo/&#x60; and &#x60;/foo/bar&#x60; &#x60;/foo&#x60; would not allow &#x60;/food&#x60; or &#x60;/etc/foo&#x60;
  , policyV1beta1AllowedHostPathReadOnly :: !(Maybe Bool) -- ^ "readOnly" - when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON PolicyV1beta1AllowedHostPath
instance A.FromJSON PolicyV1beta1AllowedHostPath where
  parseJSON = A.withObject "PolicyV1beta1AllowedHostPath" $ \o ->
    PolicyV1beta1AllowedHostPath
      <$> (o .:? "pathPrefix")
      <*> (o .:? "readOnly")

-- | ToJSON PolicyV1beta1AllowedHostPath
instance A.ToJSON PolicyV1beta1AllowedHostPath where
  toJSON PolicyV1beta1AllowedHostPath {..} =
   _omitNulls
      [ "pathPrefix" .= policyV1beta1AllowedHostPathPathPrefix
      , "readOnly" .= policyV1beta1AllowedHostPathReadOnly
      ]


-- | Construct a value of type 'PolicyV1beta1AllowedHostPath' (by applying it's required fields, if any)
mkPolicyV1beta1AllowedHostPath
  :: PolicyV1beta1AllowedHostPath
mkPolicyV1beta1AllowedHostPath =
  PolicyV1beta1AllowedHostPath
  { policyV1beta1AllowedHostPathPathPrefix = Nothing
  , policyV1beta1AllowedHostPathReadOnly = Nothing
  }

-- ** PolicyV1beta1FSGroupStrategyOptions
-- | PolicyV1beta1FSGroupStrategyOptions
-- FSGroupStrategyOptions defines the strategy type and options used to create the strategy.
data PolicyV1beta1FSGroupStrategyOptions = PolicyV1beta1FSGroupStrategyOptions
  { policyV1beta1FSGroupStrategyOptionsRanges :: !(Maybe [PolicyV1beta1IDRange]) -- ^ "ranges" - ranges are the allowed ranges of fs groups.  If you would like to force a single fs group then supply a single range with the same start and end. Required for MustRunAs.
  , policyV1beta1FSGroupStrategyOptionsRule :: !(Maybe Text) -- ^ "rule" - rule is the strategy that will dictate what FSGroup is used in the SecurityContext.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON PolicyV1beta1FSGroupStrategyOptions
instance A.FromJSON PolicyV1beta1FSGroupStrategyOptions where
  parseJSON = A.withObject "PolicyV1beta1FSGroupStrategyOptions" $ \o ->
    PolicyV1beta1FSGroupStrategyOptions
      <$> (o .:? "ranges")
      <*> (o .:? "rule")

-- | ToJSON PolicyV1beta1FSGroupStrategyOptions
instance A.ToJSON PolicyV1beta1FSGroupStrategyOptions where
  toJSON PolicyV1beta1FSGroupStrategyOptions {..} =
   _omitNulls
      [ "ranges" .= policyV1beta1FSGroupStrategyOptionsRanges
      , "rule" .= policyV1beta1FSGroupStrategyOptionsRule
      ]


-- | Construct a value of type 'PolicyV1beta1FSGroupStrategyOptions' (by applying it's required fields, if any)
mkPolicyV1beta1FSGroupStrategyOptions
  :: PolicyV1beta1FSGroupStrategyOptions
mkPolicyV1beta1FSGroupStrategyOptions =
  PolicyV1beta1FSGroupStrategyOptions
  { policyV1beta1FSGroupStrategyOptionsRanges = Nothing
  , policyV1beta1FSGroupStrategyOptionsRule = Nothing
  }

-- ** PolicyV1beta1HostPortRange
-- | PolicyV1beta1HostPortRange
-- HostPortRange defines a range of host ports that will be enabled by a policy for pods to use.  It requires both the start and end to be defined.
data PolicyV1beta1HostPortRange = PolicyV1beta1HostPortRange
  { policyV1beta1HostPortRangeMax :: !(Int) -- ^ /Required/ "max" - max is the end of the range, inclusive.
  , policyV1beta1HostPortRangeMin :: !(Int) -- ^ /Required/ "min" - min is the start of the range, inclusive.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON PolicyV1beta1HostPortRange
instance A.FromJSON PolicyV1beta1HostPortRange where
  parseJSON = A.withObject "PolicyV1beta1HostPortRange" $ \o ->
    PolicyV1beta1HostPortRange
      <$> (o .:  "max")
      <*> (o .:  "min")

-- | ToJSON PolicyV1beta1HostPortRange
instance A.ToJSON PolicyV1beta1HostPortRange where
  toJSON PolicyV1beta1HostPortRange {..} =
   _omitNulls
      [ "max" .= policyV1beta1HostPortRangeMax
      , "min" .= policyV1beta1HostPortRangeMin
      ]


-- | Construct a value of type 'PolicyV1beta1HostPortRange' (by applying it's required fields, if any)
mkPolicyV1beta1HostPortRange
  :: Int -- ^ 'policyV1beta1HostPortRangeMax': max is the end of the range, inclusive.
  -> Int -- ^ 'policyV1beta1HostPortRangeMin': min is the start of the range, inclusive.
  -> PolicyV1beta1HostPortRange
mkPolicyV1beta1HostPortRange policyV1beta1HostPortRangeMax policyV1beta1HostPortRangeMin =
  PolicyV1beta1HostPortRange
  { policyV1beta1HostPortRangeMax
  , policyV1beta1HostPortRangeMin
  }

-- ** PolicyV1beta1IDRange
-- | PolicyV1beta1IDRange
-- IDRange provides a min/max of an allowed range of IDs.
data PolicyV1beta1IDRange = PolicyV1beta1IDRange
  { policyV1beta1IDRangeMax :: !(Integer) -- ^ /Required/ "max" - max is the end of the range, inclusive.
  , policyV1beta1IDRangeMin :: !(Integer) -- ^ /Required/ "min" - min is the start of the range, inclusive.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON PolicyV1beta1IDRange
instance A.FromJSON PolicyV1beta1IDRange where
  parseJSON = A.withObject "PolicyV1beta1IDRange" $ \o ->
    PolicyV1beta1IDRange
      <$> (o .:  "max")
      <*> (o .:  "min")

-- | ToJSON PolicyV1beta1IDRange
instance A.ToJSON PolicyV1beta1IDRange where
  toJSON PolicyV1beta1IDRange {..} =
   _omitNulls
      [ "max" .= policyV1beta1IDRangeMax
      , "min" .= policyV1beta1IDRangeMin
      ]


-- | Construct a value of type 'PolicyV1beta1IDRange' (by applying it's required fields, if any)
mkPolicyV1beta1IDRange
  :: Integer -- ^ 'policyV1beta1IDRangeMax': max is the end of the range, inclusive.
  -> Integer -- ^ 'policyV1beta1IDRangeMin': min is the start of the range, inclusive.
  -> PolicyV1beta1IDRange
mkPolicyV1beta1IDRange policyV1beta1IDRangeMax policyV1beta1IDRangeMin =
  PolicyV1beta1IDRange
  { policyV1beta1IDRangeMax
  , policyV1beta1IDRangeMin
  }

-- ** PolicyV1beta1PodSecurityPolicy
-- | PolicyV1beta1PodSecurityPolicy
-- PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container.
data PolicyV1beta1PodSecurityPolicy = PolicyV1beta1PodSecurityPolicy
  { policyV1beta1PodSecurityPolicyApiVersion :: !(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/api-conventions.md#resources
  , policyV1beta1PodSecurityPolicyKind :: !(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/api-conventions.md#types-kinds
  , policyV1beta1PodSecurityPolicyMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , policyV1beta1PodSecurityPolicySpec :: !(Maybe PolicyV1beta1PodSecurityPolicySpec) -- ^ "spec"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON PolicyV1beta1PodSecurityPolicy
instance A.FromJSON PolicyV1beta1PodSecurityPolicy where
  parseJSON = A.withObject "PolicyV1beta1PodSecurityPolicy" $ \o ->
    PolicyV1beta1PodSecurityPolicy
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")

-- | ToJSON PolicyV1beta1PodSecurityPolicy
instance A.ToJSON PolicyV1beta1PodSecurityPolicy where
  toJSON PolicyV1beta1PodSecurityPolicy {..} =
   _omitNulls
      [ "apiVersion" .= policyV1beta1PodSecurityPolicyApiVersion
      , "kind" .= policyV1beta1PodSecurityPolicyKind
      , "metadata" .= policyV1beta1PodSecurityPolicyMetadata
      , "spec" .= policyV1beta1PodSecurityPolicySpec
      ]


-- | Construct a value of type 'PolicyV1beta1PodSecurityPolicy' (by applying it's required fields, if any)
mkPolicyV1beta1PodSecurityPolicy
  :: PolicyV1beta1PodSecurityPolicy
mkPolicyV1beta1PodSecurityPolicy =
  PolicyV1beta1PodSecurityPolicy
  { policyV1beta1PodSecurityPolicyApiVersion = Nothing
  , policyV1beta1PodSecurityPolicyKind = Nothing
  , policyV1beta1PodSecurityPolicyMetadata = Nothing
  , policyV1beta1PodSecurityPolicySpec = Nothing
  }

-- ** PolicyV1beta1PodSecurityPolicyList
-- | PolicyV1beta1PodSecurityPolicyList
-- PodSecurityPolicyList is a list of PodSecurityPolicy objects.
data PolicyV1beta1PodSecurityPolicyList = PolicyV1beta1PodSecurityPolicyList
  { policyV1beta1PodSecurityPolicyListApiVersion :: !(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/api-conventions.md#resources
  , policyV1beta1PodSecurityPolicyListItems :: !([PolicyV1beta1PodSecurityPolicy]) -- ^ /Required/ "items" - items is a list of schema objects.
  , policyV1beta1PodSecurityPolicyListKind :: !(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/api-conventions.md#types-kinds
  , policyV1beta1PodSecurityPolicyListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON PolicyV1beta1PodSecurityPolicyList
instance A.FromJSON PolicyV1beta1PodSecurityPolicyList where
  parseJSON = A.withObject "PolicyV1beta1PodSecurityPolicyList" $ \o ->
    PolicyV1beta1PodSecurityPolicyList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON PolicyV1beta1PodSecurityPolicyList
instance A.ToJSON PolicyV1beta1PodSecurityPolicyList where
  toJSON PolicyV1beta1PodSecurityPolicyList {..} =
   _omitNulls
      [ "apiVersion" .= policyV1beta1PodSecurityPolicyListApiVersion
      , "items" .= policyV1beta1PodSecurityPolicyListItems
      , "kind" .= policyV1beta1PodSecurityPolicyListKind
      , "metadata" .= policyV1beta1PodSecurityPolicyListMetadata
      ]


-- | Construct a value of type 'PolicyV1beta1PodSecurityPolicyList' (by applying it's required fields, if any)
mkPolicyV1beta1PodSecurityPolicyList
  :: [PolicyV1beta1PodSecurityPolicy] -- ^ 'policyV1beta1PodSecurityPolicyListItems': items is a list of schema objects.
  -> PolicyV1beta1PodSecurityPolicyList
mkPolicyV1beta1PodSecurityPolicyList policyV1beta1PodSecurityPolicyListItems =
  PolicyV1beta1PodSecurityPolicyList
  { policyV1beta1PodSecurityPolicyListApiVersion = Nothing
  , policyV1beta1PodSecurityPolicyListItems
  , policyV1beta1PodSecurityPolicyListKind = Nothing
  , policyV1beta1PodSecurityPolicyListMetadata = Nothing
  }

-- ** PolicyV1beta1PodSecurityPolicySpec
-- | PolicyV1beta1PodSecurityPolicySpec
-- PodSecurityPolicySpec defines the policy enforced.
data PolicyV1beta1PodSecurityPolicySpec = PolicyV1beta1PodSecurityPolicySpec
  { policyV1beta1PodSecurityPolicySpecAllowPrivilegeEscalation :: !(Maybe Bool) -- ^ "allowPrivilegeEscalation" - allowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true.
  , policyV1beta1PodSecurityPolicySpecAllowedCsiDrivers :: !(Maybe [PolicyV1beta1AllowedCSIDriver]) -- ^ "allowedCSIDrivers" - AllowedCSIDrivers is a whitelist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. An empty value means no CSI drivers can run inline within a pod spec.
  , policyV1beta1PodSecurityPolicySpecAllowedCapabilities :: !(Maybe [Text]) -- ^ "allowedCapabilities" - allowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author&#39;s discretion. You must not list a capability in both allowedCapabilities and requiredDropCapabilities.
  , policyV1beta1PodSecurityPolicySpecAllowedFlexVolumes :: !(Maybe [PolicyV1beta1AllowedFlexVolume]) -- ^ "allowedFlexVolumes" - allowedFlexVolumes is a whitelist of allowed Flexvolumes.  Empty or nil indicates that all Flexvolumes may be used.  This parameter is effective only when the usage of the Flexvolumes is allowed in the \&quot;volumes\&quot; field.
  , policyV1beta1PodSecurityPolicySpecAllowedHostPaths :: !(Maybe [PolicyV1beta1AllowedHostPath]) -- ^ "allowedHostPaths" - allowedHostPaths is a white list of allowed host paths. Empty indicates that all host paths may be used.
  , policyV1beta1PodSecurityPolicySpecAllowedProcMountTypes :: !(Maybe [Text]) -- ^ "allowedProcMountTypes" - AllowedProcMountTypes is a whitelist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled.
  , policyV1beta1PodSecurityPolicySpecAllowedUnsafeSysctls :: !(Maybe [Text]) -- ^ "allowedUnsafeSysctls" - allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \&quot;*\&quot; in which case it is considered as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. Kubelet has to whitelist all allowed unsafe sysctls explicitly to avoid rejection.  Examples: e.g. \&quot;foo/*\&quot; allows \&quot;foo/bar\&quot;, \&quot;foo/baz\&quot;, etc. e.g. \&quot;foo.*\&quot; allows \&quot;foo.bar\&quot;, \&quot;foo.baz\&quot;, etc.
  , policyV1beta1PodSecurityPolicySpecDefaultAddCapabilities :: !(Maybe [Text]) -- ^ "defaultAddCapabilities" - defaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability.  You may not list a capability in both defaultAddCapabilities and requiredDropCapabilities. Capabilities added here are implicitly allowed, and need not be included in the allowedCapabilities list.
  , policyV1beta1PodSecurityPolicySpecDefaultAllowPrivilegeEscalation :: !(Maybe Bool) -- ^ "defaultAllowPrivilegeEscalation" - defaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process.
  , policyV1beta1PodSecurityPolicySpecForbiddenSysctls :: !(Maybe [Text]) -- ^ "forbiddenSysctls" - forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \&quot;*\&quot; in which case it is considered as a prefix of forbidden sysctls. Single * means all sysctls are forbidden.  Examples: e.g. \&quot;foo/*\&quot; forbids \&quot;foo/bar\&quot;, \&quot;foo/baz\&quot;, etc. e.g. \&quot;foo.*\&quot; forbids \&quot;foo.bar\&quot;, \&quot;foo.baz\&quot;, etc.
  , policyV1beta1PodSecurityPolicySpecFsGroup :: !(PolicyV1beta1FSGroupStrategyOptions) -- ^ /Required/ "fsGroup"
  , policyV1beta1PodSecurityPolicySpecHostIpc :: !(Maybe Bool) -- ^ "hostIPC" - hostIPC determines if the policy allows the use of HostIPC in the pod spec.
  , policyV1beta1PodSecurityPolicySpecHostNetwork :: !(Maybe Bool) -- ^ "hostNetwork" - hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.
  , policyV1beta1PodSecurityPolicySpecHostPid :: !(Maybe Bool) -- ^ "hostPID" - hostPID determines if the policy allows the use of HostPID in the pod spec.
  , policyV1beta1PodSecurityPolicySpecHostPorts :: !(Maybe [PolicyV1beta1HostPortRange]) -- ^ "hostPorts" - hostPorts determines which host port ranges are allowed to be exposed.
  , policyV1beta1PodSecurityPolicySpecPrivileged :: !(Maybe Bool) -- ^ "privileged" - privileged determines if a pod can request to be run as privileged.
  , policyV1beta1PodSecurityPolicySpecReadOnlyRootFilesystem :: !(Maybe Bool) -- ^ "readOnlyRootFilesystem" - readOnlyRootFilesystem when set to true will force containers to run with a read only root file system.  If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to.
  , policyV1beta1PodSecurityPolicySpecRequiredDropCapabilities :: !(Maybe [Text]) -- ^ "requiredDropCapabilities" - requiredDropCapabilities are the capabilities that will be dropped from the container.  These are required to be dropped and cannot be added.
  , policyV1beta1PodSecurityPolicySpecRunAsGroup :: !(Maybe PolicyV1beta1RunAsGroupStrategyOptions) -- ^ "runAsGroup"
  , policyV1beta1PodSecurityPolicySpecRunAsUser :: !(PolicyV1beta1RunAsUserStrategyOptions) -- ^ /Required/ "runAsUser"
  , policyV1beta1PodSecurityPolicySpecSeLinux :: !(PolicyV1beta1SELinuxStrategyOptions) -- ^ /Required/ "seLinux"
  , policyV1beta1PodSecurityPolicySpecSupplementalGroups :: !(PolicyV1beta1SupplementalGroupsStrategyOptions) -- ^ /Required/ "supplementalGroups"
  , policyV1beta1PodSecurityPolicySpecVolumes :: !(Maybe [Text]) -- ^ "volumes" - volumes is a white list of allowed volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use &#39;*&#39;.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON PolicyV1beta1PodSecurityPolicySpec
instance A.FromJSON PolicyV1beta1PodSecurityPolicySpec where
  parseJSON = A.withObject "PolicyV1beta1PodSecurityPolicySpec" $ \o ->
    PolicyV1beta1PodSecurityPolicySpec
      <$> (o .:? "allowPrivilegeEscalation")
      <*> (o .:? "allowedCSIDrivers")
      <*> (o .:? "allowedCapabilities")
      <*> (o .:? "allowedFlexVolumes")
      <*> (o .:? "allowedHostPaths")
      <*> (o .:? "allowedProcMountTypes")
      <*> (o .:? "allowedUnsafeSysctls")
      <*> (o .:? "defaultAddCapabilities")
      <*> (o .:? "defaultAllowPrivilegeEscalation")
      <*> (o .:? "forbiddenSysctls")
      <*> (o .:  "fsGroup")
      <*> (o .:? "hostIPC")
      <*> (o .:? "hostNetwork")
      <*> (o .:? "hostPID")
      <*> (o .:? "hostPorts")
      <*> (o .:? "privileged")
      <*> (o .:? "readOnlyRootFilesystem")
      <*> (o .:? "requiredDropCapabilities")
      <*> (o .:? "runAsGroup")
      <*> (o .:  "runAsUser")
      <*> (o .:  "seLinux")
      <*> (o .:  "supplementalGroups")
      <*> (o .:? "volumes")

-- | ToJSON PolicyV1beta1PodSecurityPolicySpec
instance A.ToJSON PolicyV1beta1PodSecurityPolicySpec where
  toJSON PolicyV1beta1PodSecurityPolicySpec {..} =
   _omitNulls
      [ "allowPrivilegeEscalation" .= policyV1beta1PodSecurityPolicySpecAllowPrivilegeEscalation
      , "allowedCSIDrivers" .= policyV1beta1PodSecurityPolicySpecAllowedCsiDrivers
      , "allowedCapabilities" .= policyV1beta1PodSecurityPolicySpecAllowedCapabilities
      , "allowedFlexVolumes" .= policyV1beta1PodSecurityPolicySpecAllowedFlexVolumes
      , "allowedHostPaths" .= policyV1beta1PodSecurityPolicySpecAllowedHostPaths
      , "allowedProcMountTypes" .= policyV1beta1PodSecurityPolicySpecAllowedProcMountTypes
      , "allowedUnsafeSysctls" .= policyV1beta1PodSecurityPolicySpecAllowedUnsafeSysctls
      , "defaultAddCapabilities" .= policyV1beta1PodSecurityPolicySpecDefaultAddCapabilities
      , "defaultAllowPrivilegeEscalation" .= policyV1beta1PodSecurityPolicySpecDefaultAllowPrivilegeEscalation
      , "forbiddenSysctls" .= policyV1beta1PodSecurityPolicySpecForbiddenSysctls
      , "fsGroup" .= policyV1beta1PodSecurityPolicySpecFsGroup
      , "hostIPC" .= policyV1beta1PodSecurityPolicySpecHostIpc
      , "hostNetwork" .= policyV1beta1PodSecurityPolicySpecHostNetwork
      , "hostPID" .= policyV1beta1PodSecurityPolicySpecHostPid
      , "hostPorts" .= policyV1beta1PodSecurityPolicySpecHostPorts
      , "privileged" .= policyV1beta1PodSecurityPolicySpecPrivileged
      , "readOnlyRootFilesystem" .= policyV1beta1PodSecurityPolicySpecReadOnlyRootFilesystem
      , "requiredDropCapabilities" .= policyV1beta1PodSecurityPolicySpecRequiredDropCapabilities
      , "runAsGroup" .= policyV1beta1PodSecurityPolicySpecRunAsGroup
      , "runAsUser" .= policyV1beta1PodSecurityPolicySpecRunAsUser
      , "seLinux" .= policyV1beta1PodSecurityPolicySpecSeLinux
      , "supplementalGroups" .= policyV1beta1PodSecurityPolicySpecSupplementalGroups
      , "volumes" .= policyV1beta1PodSecurityPolicySpecVolumes
      ]


-- | Construct a value of type 'PolicyV1beta1PodSecurityPolicySpec' (by applying it's required fields, if any)
mkPolicyV1beta1PodSecurityPolicySpec
  :: PolicyV1beta1FSGroupStrategyOptions -- ^ 'policyV1beta1PodSecurityPolicySpecFsGroup' 
  -> PolicyV1beta1RunAsUserStrategyOptions -- ^ 'policyV1beta1PodSecurityPolicySpecRunAsUser' 
  -> PolicyV1beta1SELinuxStrategyOptions -- ^ 'policyV1beta1PodSecurityPolicySpecSeLinux' 
  -> PolicyV1beta1SupplementalGroupsStrategyOptions -- ^ 'policyV1beta1PodSecurityPolicySpecSupplementalGroups' 
  -> PolicyV1beta1PodSecurityPolicySpec
mkPolicyV1beta1PodSecurityPolicySpec policyV1beta1PodSecurityPolicySpecFsGroup policyV1beta1PodSecurityPolicySpecRunAsUser policyV1beta1PodSecurityPolicySpecSeLinux policyV1beta1PodSecurityPolicySpecSupplementalGroups =
  PolicyV1beta1PodSecurityPolicySpec
  { policyV1beta1PodSecurityPolicySpecAllowPrivilegeEscalation = Nothing
  , policyV1beta1PodSecurityPolicySpecAllowedCsiDrivers = Nothing
  , policyV1beta1PodSecurityPolicySpecAllowedCapabilities = Nothing
  , policyV1beta1PodSecurityPolicySpecAllowedFlexVolumes = Nothing
  , policyV1beta1PodSecurityPolicySpecAllowedHostPaths = Nothing
  , policyV1beta1PodSecurityPolicySpecAllowedProcMountTypes = Nothing
  , policyV1beta1PodSecurityPolicySpecAllowedUnsafeSysctls = Nothing
  , policyV1beta1PodSecurityPolicySpecDefaultAddCapabilities = Nothing
  , policyV1beta1PodSecurityPolicySpecDefaultAllowPrivilegeEscalation = Nothing
  , policyV1beta1PodSecurityPolicySpecForbiddenSysctls = Nothing
  , policyV1beta1PodSecurityPolicySpecFsGroup
  , policyV1beta1PodSecurityPolicySpecHostIpc = Nothing
  , policyV1beta1PodSecurityPolicySpecHostNetwork = Nothing
  , policyV1beta1PodSecurityPolicySpecHostPid = Nothing
  , policyV1beta1PodSecurityPolicySpecHostPorts = Nothing
  , policyV1beta1PodSecurityPolicySpecPrivileged = Nothing
  , policyV1beta1PodSecurityPolicySpecReadOnlyRootFilesystem = Nothing
  , policyV1beta1PodSecurityPolicySpecRequiredDropCapabilities = Nothing
  , policyV1beta1PodSecurityPolicySpecRunAsGroup = Nothing
  , policyV1beta1PodSecurityPolicySpecRunAsUser
  , policyV1beta1PodSecurityPolicySpecSeLinux
  , policyV1beta1PodSecurityPolicySpecSupplementalGroups
  , policyV1beta1PodSecurityPolicySpecVolumes = Nothing
  }

-- ** PolicyV1beta1RunAsGroupStrategyOptions
-- | PolicyV1beta1RunAsGroupStrategyOptions
-- RunAsGroupStrategyOptions defines the strategy type and any options used to create the strategy.
data PolicyV1beta1RunAsGroupStrategyOptions = PolicyV1beta1RunAsGroupStrategyOptions
  { policyV1beta1RunAsGroupStrategyOptionsRanges :: !(Maybe [PolicyV1beta1IDRange]) -- ^ "ranges" - ranges are the allowed ranges of gids that may be used. If you would like to force a single gid then supply a single range with the same start and end. Required for MustRunAs.
  , policyV1beta1RunAsGroupStrategyOptionsRule :: !(Text) -- ^ /Required/ "rule" - rule is the strategy that will dictate the allowable RunAsGroup values that may be set.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON PolicyV1beta1RunAsGroupStrategyOptions
instance A.FromJSON PolicyV1beta1RunAsGroupStrategyOptions where
  parseJSON = A.withObject "PolicyV1beta1RunAsGroupStrategyOptions" $ \o ->
    PolicyV1beta1RunAsGroupStrategyOptions
      <$> (o .:? "ranges")
      <*> (o .:  "rule")

-- | ToJSON PolicyV1beta1RunAsGroupStrategyOptions
instance A.ToJSON PolicyV1beta1RunAsGroupStrategyOptions where
  toJSON PolicyV1beta1RunAsGroupStrategyOptions {..} =
   _omitNulls
      [ "ranges" .= policyV1beta1RunAsGroupStrategyOptionsRanges
      , "rule" .= policyV1beta1RunAsGroupStrategyOptionsRule
      ]


-- | Construct a value of type 'PolicyV1beta1RunAsGroupStrategyOptions' (by applying it's required fields, if any)
mkPolicyV1beta1RunAsGroupStrategyOptions
  :: Text -- ^ 'policyV1beta1RunAsGroupStrategyOptionsRule': rule is the strategy that will dictate the allowable RunAsGroup values that may be set.
  -> PolicyV1beta1RunAsGroupStrategyOptions
mkPolicyV1beta1RunAsGroupStrategyOptions policyV1beta1RunAsGroupStrategyOptionsRule =
  PolicyV1beta1RunAsGroupStrategyOptions
  { policyV1beta1RunAsGroupStrategyOptionsRanges = Nothing
  , policyV1beta1RunAsGroupStrategyOptionsRule
  }

-- ** PolicyV1beta1RunAsUserStrategyOptions
-- | PolicyV1beta1RunAsUserStrategyOptions
-- RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy.
data PolicyV1beta1RunAsUserStrategyOptions = PolicyV1beta1RunAsUserStrategyOptions
  { policyV1beta1RunAsUserStrategyOptionsRanges :: !(Maybe [PolicyV1beta1IDRange]) -- ^ "ranges" - ranges are the allowed ranges of uids that may be used. If you would like to force a single uid then supply a single range with the same start and end. Required for MustRunAs.
  , policyV1beta1RunAsUserStrategyOptionsRule :: !(Text) -- ^ /Required/ "rule" - rule is the strategy that will dictate the allowable RunAsUser values that may be set.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON PolicyV1beta1RunAsUserStrategyOptions
instance A.FromJSON PolicyV1beta1RunAsUserStrategyOptions where
  parseJSON = A.withObject "PolicyV1beta1RunAsUserStrategyOptions" $ \o ->
    PolicyV1beta1RunAsUserStrategyOptions
      <$> (o .:? "ranges")
      <*> (o .:  "rule")

-- | ToJSON PolicyV1beta1RunAsUserStrategyOptions
instance A.ToJSON PolicyV1beta1RunAsUserStrategyOptions where
  toJSON PolicyV1beta1RunAsUserStrategyOptions {..} =
   _omitNulls
      [ "ranges" .= policyV1beta1RunAsUserStrategyOptionsRanges
      , "rule" .= policyV1beta1RunAsUserStrategyOptionsRule
      ]


-- | Construct a value of type 'PolicyV1beta1RunAsUserStrategyOptions' (by applying it's required fields, if any)
mkPolicyV1beta1RunAsUserStrategyOptions
  :: Text -- ^ 'policyV1beta1RunAsUserStrategyOptionsRule': rule is the strategy that will dictate the allowable RunAsUser values that may be set.
  -> PolicyV1beta1RunAsUserStrategyOptions
mkPolicyV1beta1RunAsUserStrategyOptions policyV1beta1RunAsUserStrategyOptionsRule =
  PolicyV1beta1RunAsUserStrategyOptions
  { policyV1beta1RunAsUserStrategyOptionsRanges = Nothing
  , policyV1beta1RunAsUserStrategyOptionsRule
  }

-- ** PolicyV1beta1SELinuxStrategyOptions
-- | PolicyV1beta1SELinuxStrategyOptions
-- SELinuxStrategyOptions defines the strategy type and any options used to create the strategy.
data PolicyV1beta1SELinuxStrategyOptions = PolicyV1beta1SELinuxStrategyOptions
  { policyV1beta1SELinuxStrategyOptionsRule :: !(Text) -- ^ /Required/ "rule" - rule is the strategy that will dictate the allowable labels that may be set.
  , policyV1beta1SELinuxStrategyOptionsSeLinuxOptions :: !(Maybe V1SELinuxOptions) -- ^ "seLinuxOptions"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON PolicyV1beta1SELinuxStrategyOptions
instance A.FromJSON PolicyV1beta1SELinuxStrategyOptions where
  parseJSON = A.withObject "PolicyV1beta1SELinuxStrategyOptions" $ \o ->
    PolicyV1beta1SELinuxStrategyOptions
      <$> (o .:  "rule")
      <*> (o .:? "seLinuxOptions")

-- | ToJSON PolicyV1beta1SELinuxStrategyOptions
instance A.ToJSON PolicyV1beta1SELinuxStrategyOptions where
  toJSON PolicyV1beta1SELinuxStrategyOptions {..} =
   _omitNulls
      [ "rule" .= policyV1beta1SELinuxStrategyOptionsRule
      , "seLinuxOptions" .= policyV1beta1SELinuxStrategyOptionsSeLinuxOptions
      ]


-- | Construct a value of type 'PolicyV1beta1SELinuxStrategyOptions' (by applying it's required fields, if any)
mkPolicyV1beta1SELinuxStrategyOptions
  :: Text -- ^ 'policyV1beta1SELinuxStrategyOptionsRule': rule is the strategy that will dictate the allowable labels that may be set.
  -> PolicyV1beta1SELinuxStrategyOptions
mkPolicyV1beta1SELinuxStrategyOptions policyV1beta1SELinuxStrategyOptionsRule =
  PolicyV1beta1SELinuxStrategyOptions
  { policyV1beta1SELinuxStrategyOptionsRule
  , policyV1beta1SELinuxStrategyOptionsSeLinuxOptions = Nothing
  }

-- ** PolicyV1beta1SupplementalGroupsStrategyOptions
-- | PolicyV1beta1SupplementalGroupsStrategyOptions
-- SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.
data PolicyV1beta1SupplementalGroupsStrategyOptions = PolicyV1beta1SupplementalGroupsStrategyOptions
  { policyV1beta1SupplementalGroupsStrategyOptionsRanges :: !(Maybe [PolicyV1beta1IDRange]) -- ^ "ranges" - ranges are the allowed ranges of supplemental groups.  If you would like to force a single supplemental group then supply a single range with the same start and end. Required for MustRunAs.
  , policyV1beta1SupplementalGroupsStrategyOptionsRule :: !(Maybe Text) -- ^ "rule" - rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON PolicyV1beta1SupplementalGroupsStrategyOptions
instance A.FromJSON PolicyV1beta1SupplementalGroupsStrategyOptions where
  parseJSON = A.withObject "PolicyV1beta1SupplementalGroupsStrategyOptions" $ \o ->
    PolicyV1beta1SupplementalGroupsStrategyOptions
      <$> (o .:? "ranges")
      <*> (o .:? "rule")

-- | ToJSON PolicyV1beta1SupplementalGroupsStrategyOptions
instance A.ToJSON PolicyV1beta1SupplementalGroupsStrategyOptions where
  toJSON PolicyV1beta1SupplementalGroupsStrategyOptions {..} =
   _omitNulls
      [ "ranges" .= policyV1beta1SupplementalGroupsStrategyOptionsRanges
      , "rule" .= policyV1beta1SupplementalGroupsStrategyOptionsRule
      ]


-- | Construct a value of type 'PolicyV1beta1SupplementalGroupsStrategyOptions' (by applying it's required fields, if any)
mkPolicyV1beta1SupplementalGroupsStrategyOptions
  :: PolicyV1beta1SupplementalGroupsStrategyOptions
mkPolicyV1beta1SupplementalGroupsStrategyOptions =
  PolicyV1beta1SupplementalGroupsStrategyOptions
  { policyV1beta1SupplementalGroupsStrategyOptionsRanges = Nothing
  , policyV1beta1SupplementalGroupsStrategyOptionsRule = Nothing
  }

-- ** RuntimeRawExtension
-- | RuntimeRawExtension
-- RawExtension is used to hold extensions in external versions.  To use this, make a field which has RawExtension as its type in your external, versioned struct, and Object in your internal struct. You also need to register your various plugin types.  // Internal package: type MyAPIObject struct {  runtime.TypeMeta `json:\",inline\"`  MyPlugin runtime.Object `json:\"myPlugin\"` } type PluginA struct {  AOption string `json:\"aOption\"` }  // External package: type MyAPIObject struct {  runtime.TypeMeta `json:\",inline\"`  MyPlugin runtime.RawExtension `json:\"myPlugin\"` } type PluginA struct {  AOption string `json:\"aOption\"` }  // On the wire, the JSON will look something like this: {  \"kind\":\"MyAPIObject\",  \"apiVersion\":\"v1\",  \"myPlugin\": {   \"kind\":\"PluginA\",   \"aOption\":\"foo\",  }, }  So what happens? Decode first uses json or yaml to unmarshal the serialized data into your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked. The next step is to copy (using pkg/conversion) into the internal struct. The runtime package's DefaultScheme has conversion functions installed which will unpack the JSON stored in RawExtension, turning it into the correct object type, and storing it in the Object. (TODO: In the case where the object is of an unknown type, a runtime.Unknown object will be created and stored.)
data RuntimeRawExtension = RuntimeRawExtension
  { runtimeRawExtensionRaw :: !(ByteArray) -- ^ /Required/ "Raw" - Raw is the underlying serialization of this object.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON RuntimeRawExtension
instance A.FromJSON RuntimeRawExtension where
  parseJSON = A.withObject "RuntimeRawExtension" $ \o ->
    RuntimeRawExtension
      <$> (o .:  "Raw")

-- | ToJSON RuntimeRawExtension
instance A.ToJSON RuntimeRawExtension where
  toJSON RuntimeRawExtension {..} =
   _omitNulls
      [ "Raw" .= runtimeRawExtensionRaw
      ]


-- | Construct a value of type 'RuntimeRawExtension' (by applying it's required fields, if any)
mkRuntimeRawExtension
  :: ByteArray -- ^ 'runtimeRawExtensionRaw': Raw is the underlying serialization of this object.
  -> RuntimeRawExtension
mkRuntimeRawExtension runtimeRawExtensionRaw =
  RuntimeRawExtension
  { runtimeRawExtensionRaw
  }

-- ** V1APIGroup
-- | V1APIGroup
-- APIGroup contains the name, the supported versions, and the preferred version of a group.
data V1APIGroup = V1APIGroup
  { 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1APIGroupName :: !(Text) -- ^ /Required/ "name" - name is the name of the group.
  , v1APIGroupPreferredVersion :: !(Maybe V1GroupVersionForDiscovery) -- ^ "preferredVersion"
  , 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.
  , v1APIGroupVersions :: !([V1GroupVersionForDiscovery]) -- ^ /Required/ "versions" - versions are the versions supported in this group.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1APIGroup
instance A.FromJSON V1APIGroup where
  parseJSON = A.withObject "V1APIGroup" $ \o ->
    V1APIGroup
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:  "name")
      <*> (o .:? "preferredVersion")
      <*> (o .:? "serverAddressByClientCIDRs")
      <*> (o .:  "versions")

-- | ToJSON V1APIGroup
instance A.ToJSON V1APIGroup where
  toJSON V1APIGroup {..} =
   _omitNulls
      [ "apiVersion" .= v1APIGroupApiVersion
      , "kind" .= v1APIGroupKind
      , "name" .= v1APIGroupName
      , "preferredVersion" .= v1APIGroupPreferredVersion
      , "serverAddressByClientCIDRs" .= v1APIGroupServerAddressByClientCidRs
      , "versions" .= 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 v1APIGroupName v1APIGroupVersions =
  V1APIGroup
  { v1APIGroupApiVersion = Nothing
  , v1APIGroupKind = Nothing
  , v1APIGroupName
  , v1APIGroupPreferredVersion = Nothing
  , v1APIGroupServerAddressByClientCidRs = Nothing
  , v1APIGroupVersions
  }

-- ** V1APIGroupList
-- | V1APIGroupList
-- APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis.
data V1APIGroupList = V1APIGroupList
  { 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/api-conventions.md#resources
  , v1APIGroupListGroups :: !([V1APIGroup]) -- ^ /Required/ "groups" - groups is a list of APIGroup.
  , 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/api-conventions.md#types-kinds
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1APIGroupList
instance A.FromJSON V1APIGroupList where
  parseJSON = A.withObject "V1APIGroupList" $ \o ->
    V1APIGroupList
      <$> (o .:? "apiVersion")
      <*> (o .:  "groups")
      <*> (o .:? "kind")

-- | ToJSON V1APIGroupList
instance A.ToJSON V1APIGroupList where
  toJSON V1APIGroupList {..} =
   _omitNulls
      [ "apiVersion" .= v1APIGroupListApiVersion
      , "groups" .= v1APIGroupListGroups
      , "kind" .= 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 v1APIGroupListGroups =
  V1APIGroupList
  { v1APIGroupListApiVersion = Nothing
  , v1APIGroupListGroups
  , v1APIGroupListKind = Nothing
  }

-- ** V1APIResource
-- | V1APIResource
-- APIResource specifies the name of a resource and whether it is namespaced.
data V1APIResource = V1APIResource
  { v1APIResourceCategories :: !(Maybe [Text]) -- ^ "categories" - categories is a list of the grouped resources this resource belongs to (e.g. &#39;all&#39;)
  , 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;.
  , 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;)
  , v1APIResourceName :: !(Text) -- ^ /Required/ "name" - name is the plural name of the resource.
  , v1APIResourceNamespaced :: !(Bool) -- ^ /Required/ "namespaced" - namespaced indicates if a resource is namespaced or not.
  , v1APIResourceShortNames :: !(Maybe [Text]) -- ^ "shortNames" - shortNames is a list of suggested short names of the resource.
  , 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.
  , 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.
  , v1APIResourceVerbs :: !([Text]) -- ^ /Required/ "verbs" - verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1APIResource
instance A.FromJSON V1APIResource where
  parseJSON = A.withObject "V1APIResource" $ \o ->
    V1APIResource
      <$> (o .:? "categories")
      <*> (o .:? "group")
      <*> (o .:  "kind")
      <*> (o .:  "name")
      <*> (o .:  "namespaced")
      <*> (o .:? "shortNames")
      <*> (o .:  "singularName")
      <*> (o .:? "storageVersionHash")
      <*> (o .:  "verbs")
      <*> (o .:? "version")

-- | ToJSON V1APIResource
instance A.ToJSON V1APIResource where
  toJSON V1APIResource {..} =
   _omitNulls
      [ "categories" .= v1APIResourceCategories
      , "group" .= v1APIResourceGroup
      , "kind" .= v1APIResourceKind
      , "name" .= v1APIResourceName
      , "namespaced" .= v1APIResourceNamespaced
      , "shortNames" .= v1APIResourceShortNames
      , "singularName" .= v1APIResourceSingularName
      , "storageVersionHash" .= v1APIResourceStorageVersionHash
      , "verbs" .= v1APIResourceVerbs
      , "version" .= 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 v1APIResourceKind v1APIResourceName v1APIResourceNamespaced v1APIResourceSingularName v1APIResourceVerbs =
  V1APIResource
  { v1APIResourceCategories = Nothing
  , v1APIResourceGroup = Nothing
  , v1APIResourceKind
  , v1APIResourceName
  , v1APIResourceNamespaced
  , v1APIResourceShortNames = Nothing
  , v1APIResourceSingularName
  , v1APIResourceStorageVersionHash = Nothing
  , v1APIResourceVerbs
  , v1APIResourceVersion = 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
  { 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/api-conventions.md#resources
  , v1APIResourceListGroupVersion :: !(Text) -- ^ /Required/ "groupVersion" - groupVersion is the group and version this APIResourceList is for.
  , 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/api-conventions.md#types-kinds
  , v1APIResourceListResources :: !([V1APIResource]) -- ^ /Required/ "resources" - resources contains the name of the resources and if they are namespaced.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1APIResourceList
instance A.FromJSON V1APIResourceList where
  parseJSON = A.withObject "V1APIResourceList" $ \o ->
    V1APIResourceList
      <$> (o .:? "apiVersion")
      <*> (o .:  "groupVersion")
      <*> (o .:? "kind")
      <*> (o .:  "resources")

-- | ToJSON V1APIResourceList
instance A.ToJSON V1APIResourceList where
  toJSON V1APIResourceList {..} =
   _omitNulls
      [ "apiVersion" .= v1APIResourceListApiVersion
      , "groupVersion" .= v1APIResourceListGroupVersion
      , "kind" .= v1APIResourceListKind
      , "resources" .= 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 v1APIResourceListGroupVersion v1APIResourceListResources =
  V1APIResourceList
  { v1APIResourceListApiVersion = Nothing
  , v1APIResourceListGroupVersion
  , v1APIResourceListKind = Nothing
  , v1APIResourceListResources
  }

-- ** V1APIService
-- | V1APIService
-- APIService represents a server for a particular GroupVersion. Name must be \"version.group\".
data V1APIService = V1APIService
  { 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1APIServiceMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1APIServiceSpec :: !(Maybe V1APIServiceSpec) -- ^ "spec"
  , v1APIServiceStatus :: !(Maybe V1APIServiceStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1APIService
instance A.FromJSON V1APIService where
  parseJSON = A.withObject "V1APIService" $ \o ->
    V1APIService
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON V1APIService
instance A.ToJSON V1APIService where
  toJSON V1APIService {..} =
   _omitNulls
      [ "apiVersion" .= v1APIServiceApiVersion
      , "kind" .= v1APIServiceKind
      , "metadata" .= v1APIServiceMetadata
      , "spec" .= v1APIServiceSpec
      , "status" .= v1APIServiceStatus
      ]


-- | Construct a value of type 'V1APIService' (by applying it's required fields, if any)
mkV1APIService
  :: V1APIService
mkV1APIService =
  V1APIService
  { v1APIServiceApiVersion = Nothing
  , v1APIServiceKind = Nothing
  , v1APIServiceMetadata = Nothing
  , v1APIServiceSpec = Nothing
  , v1APIServiceStatus = Nothing
  }

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

-- | FromJSON V1APIServiceCondition
instance A.FromJSON V1APIServiceCondition where
  parseJSON = A.withObject "V1APIServiceCondition" $ \o ->
    V1APIServiceCondition
      <$> (o .:? "lastTransitionTime")
      <*> (o .:? "message")
      <*> (o .:? "reason")
      <*> (o .:  "status")
      <*> (o .:  "type")

-- | ToJSON V1APIServiceCondition
instance A.ToJSON V1APIServiceCondition where
  toJSON V1APIServiceCondition {..} =
   _omitNulls
      [ "lastTransitionTime" .= v1APIServiceConditionLastTransitionTime
      , "message" .= v1APIServiceConditionMessage
      , "reason" .= v1APIServiceConditionReason
      , "status" .= v1APIServiceConditionStatus
      , "type" .= 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 v1APIServiceConditionStatus v1APIServiceConditionType =
  V1APIServiceCondition
  { v1APIServiceConditionLastTransitionTime = Nothing
  , v1APIServiceConditionMessage = Nothing
  , v1APIServiceConditionReason = Nothing
  , v1APIServiceConditionStatus
  , v1APIServiceConditionType
  }

-- ** V1APIServiceList
-- | V1APIServiceList
-- APIServiceList is a list of APIService objects.
data V1APIServiceList = V1APIServiceList
  { 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/api-conventions.md#resources
  , v1APIServiceListItems :: !([V1APIService]) -- ^ /Required/ "items"
  , 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/api-conventions.md#types-kinds
  , v1APIServiceListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1APIServiceList
instance A.FromJSON V1APIServiceList where
  parseJSON = A.withObject "V1APIServiceList" $ \o ->
    V1APIServiceList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1APIServiceList
instance A.ToJSON V1APIServiceList where
  toJSON V1APIServiceList {..} =
   _omitNulls
      [ "apiVersion" .= v1APIServiceListApiVersion
      , "items" .= v1APIServiceListItems
      , "kind" .= v1APIServiceListKind
      , "metadata" .= v1APIServiceListMetadata
      ]


-- | Construct a value of type 'V1APIServiceList' (by applying it's required fields, if any)
mkV1APIServiceList
  :: [V1APIService] -- ^ 'v1APIServiceListItems' 
  -> V1APIServiceList
mkV1APIServiceList v1APIServiceListItems =
  V1APIServiceList
  { v1APIServiceListApiVersion = Nothing
  , v1APIServiceListItems
  , v1APIServiceListKind = Nothing
  , v1APIServiceListMetadata = 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
  { 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.
  , v1APIServiceSpecGroup :: !(Maybe Text) -- ^ "group" - Group is the API group name this server hosts
  , v1APIServiceSpecGroupPriorityMinimum :: !(Int) -- ^ /Required/ "groupPriorityMinimum" - GroupPriorityMininum 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 GroupPriorityMininum 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
  , v1APIServiceSpecInsecureSkipTlsVerify :: !(Maybe Bool) -- ^ "insecureSkipTLSVerify" - InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged.  You should use the CABundle instead.
  , v1APIServiceSpecService :: !(V1ServiceReference) -- ^ /Required/ "service"
  , v1APIServiceSpecVersion :: !(Maybe Text) -- ^ "version" - Version is the API version this server hosts.  For example, \&quot;v1\&quot;
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1APIServiceSpec
instance A.FromJSON V1APIServiceSpec where
  parseJSON = A.withObject "V1APIServiceSpec" $ \o ->
    V1APIServiceSpec
      <$> (o .:? "caBundle")
      <*> (o .:? "group")
      <*> (o .:  "groupPriorityMinimum")
      <*> (o .:? "insecureSkipTLSVerify")
      <*> (o .:  "service")
      <*> (o .:? "version")
      <*> (o .:  "versionPriority")

-- | ToJSON V1APIServiceSpec
instance A.ToJSON V1APIServiceSpec where
  toJSON V1APIServiceSpec {..} =
   _omitNulls
      [ "caBundle" .= v1APIServiceSpecCaBundle
      , "group" .= v1APIServiceSpecGroup
      , "groupPriorityMinimum" .= v1APIServiceSpecGroupPriorityMinimum
      , "insecureSkipTLSVerify" .= v1APIServiceSpecInsecureSkipTlsVerify
      , "service" .= v1APIServiceSpecService
      , "version" .= v1APIServiceSpecVersion
      , "versionPriority" .= v1APIServiceSpecVersionPriority
      ]


-- | Construct a value of type 'V1APIServiceSpec' (by applying it's required fields, if any)
mkV1APIServiceSpec
  :: Int -- ^ 'v1APIServiceSpecGroupPriorityMinimum': GroupPriorityMininum 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 GroupPriorityMininum 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
  -> V1ServiceReference -- ^ 'v1APIServiceSpecService' 
  -> 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 v1APIServiceSpecGroupPriorityMinimum v1APIServiceSpecService v1APIServiceSpecVersionPriority =
  V1APIServiceSpec
  { v1APIServiceSpecCaBundle = Nothing
  , v1APIServiceSpecGroup = Nothing
  , v1APIServiceSpecGroupPriorityMinimum
  , v1APIServiceSpecInsecureSkipTlsVerify = Nothing
  , v1APIServiceSpecService
  , v1APIServiceSpecVersion = Nothing
  , v1APIServiceSpecVersionPriority
  }

-- ** V1APIServiceStatus
-- | V1APIServiceStatus
-- APIServiceStatus contains derived information about an API server
data V1APIServiceStatus = V1APIServiceStatus
  { v1APIServiceStatusConditions :: !(Maybe [V1APIServiceCondition]) -- ^ "conditions" - Current service state of apiService.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1APIServiceStatus
instance A.FromJSON V1APIServiceStatus where
  parseJSON = A.withObject "V1APIServiceStatus" $ \o ->
    V1APIServiceStatus
      <$> (o .:? "conditions")

-- | ToJSON V1APIServiceStatus
instance A.ToJSON V1APIServiceStatus where
  toJSON V1APIServiceStatus {..} =
   _omitNulls
      [ "conditions" .= v1APIServiceStatusConditions
      ]


-- | Construct a value of type 'V1APIServiceStatus' (by applying it's required fields, if any)
mkV1APIServiceStatus
  :: V1APIServiceStatus
mkV1APIServiceStatus =
  V1APIServiceStatus
  { v1APIServiceStatusConditions = 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
  { 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , 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.
  , v1APIVersionsVersions :: !([Text]) -- ^ /Required/ "versions" - versions are the api versions that are available.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1APIVersions
instance A.FromJSON V1APIVersions where
  parseJSON = A.withObject "V1APIVersions" $ \o ->
    V1APIVersions
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:  "serverAddressByClientCIDRs")
      <*> (o .:  "versions")

-- | ToJSON V1APIVersions
instance A.ToJSON V1APIVersions where
  toJSON V1APIVersions {..} =
   _omitNulls
      [ "apiVersion" .= v1APIVersionsApiVersion
      , "kind" .= v1APIVersionsKind
      , "serverAddressByClientCIDRs" .= v1APIVersionsServerAddressByClientCidRs
      , "versions" .= 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 v1APIVersionsServerAddressByClientCidRs v1APIVersionsVersions =
  V1APIVersions
  { v1APIVersionsApiVersion = Nothing
  , v1APIVersionsKind = Nothing
  , v1APIVersionsServerAddressByClientCidRs
  , 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
  { v1AWSElasticBlockStoreVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - 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
  , v1AWSElasticBlockStoreVolumeSourcePartition :: !(Maybe Int) -- ^ "partition" - 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).
  , v1AWSElasticBlockStoreVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - Specify \&quot;true\&quot; to force and set the ReadOnly property in VolumeMounts to \&quot;true\&quot;. If omitted, the default is \&quot;false\&quot;. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
  , v1AWSElasticBlockStoreVolumeSourceVolumeId :: !(Text) -- ^ /Required/ "volumeID" - Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1AWSElasticBlockStoreVolumeSource
instance A.FromJSON V1AWSElasticBlockStoreVolumeSource where
  parseJSON = A.withObject "V1AWSElasticBlockStoreVolumeSource" $ \o ->
    V1AWSElasticBlockStoreVolumeSource
      <$> (o .:? "fsType")
      <*> (o .:? "partition")
      <*> (o .:? "readOnly")
      <*> (o .:  "volumeID")

-- | ToJSON V1AWSElasticBlockStoreVolumeSource
instance A.ToJSON V1AWSElasticBlockStoreVolumeSource where
  toJSON V1AWSElasticBlockStoreVolumeSource {..} =
   _omitNulls
      [ "fsType" .= v1AWSElasticBlockStoreVolumeSourceFsType
      , "partition" .= v1AWSElasticBlockStoreVolumeSourcePartition
      , "readOnly" .= v1AWSElasticBlockStoreVolumeSourceReadOnly
      , "volumeID" .= v1AWSElasticBlockStoreVolumeSourceVolumeId
      ]


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

-- ** V1Affinity
-- | V1Affinity
-- Affinity is a group of affinity scheduling rules.
data V1Affinity = V1Affinity
  { v1AffinityNodeAffinity :: !(Maybe V1NodeAffinity) -- ^ "nodeAffinity"
  , v1AffinityPodAffinity :: !(Maybe V1PodAffinity) -- ^ "podAffinity"
  , v1AffinityPodAntiAffinity :: !(Maybe V1PodAntiAffinity) -- ^ "podAntiAffinity"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1Affinity
instance A.FromJSON V1Affinity where
  parseJSON = A.withObject "V1Affinity" $ \o ->
    V1Affinity
      <$> (o .:? "nodeAffinity")
      <*> (o .:? "podAffinity")
      <*> (o .:? "podAntiAffinity")

-- | ToJSON V1Affinity
instance A.ToJSON V1Affinity where
  toJSON V1Affinity {..} =
   _omitNulls
      [ "nodeAffinity" .= v1AffinityNodeAffinity
      , "podAffinity" .= v1AffinityPodAffinity
      , "podAntiAffinity" .= v1AffinityPodAntiAffinity
      ]


-- | Construct a value of type 'V1Affinity' (by applying it's required fields, if any)
mkV1Affinity
  :: V1Affinity
mkV1Affinity =
  V1Affinity
  { v1AffinityNodeAffinity = Nothing
  , v1AffinityPodAffinity = Nothing
  , v1AffinityPodAntiAffinity = Nothing
  }

-- ** V1AggregationRule
-- | V1AggregationRule
-- AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole
data V1AggregationRule = V1AggregationRule
  { 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1AggregationRule
instance A.FromJSON V1AggregationRule where
  parseJSON = A.withObject "V1AggregationRule" $ \o ->
    V1AggregationRule
      <$> (o .:? "clusterRoleSelectors")

-- | ToJSON V1AggregationRule
instance A.ToJSON V1AggregationRule where
  toJSON V1AggregationRule {..} =
   _omitNulls
      [ "clusterRoleSelectors" .= v1AggregationRuleClusterRoleSelectors
      ]


-- | Construct a value of type 'V1AggregationRule' (by applying it's required fields, if any)
mkV1AggregationRule
  :: V1AggregationRule
mkV1AggregationRule =
  V1AggregationRule
  { v1AggregationRuleClusterRoleSelectors = Nothing
  }

-- ** V1AttachedVolume
-- | V1AttachedVolume
-- AttachedVolume describes a volume attached to a node
data V1AttachedVolume = V1AttachedVolume
  { v1AttachedVolumeDevicePath :: !(Text) -- ^ /Required/ "devicePath" - DevicePath represents the device path where the volume should be available
  , v1AttachedVolumeName :: !(Text) -- ^ /Required/ "name" - Name of the attached volume
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1AttachedVolume
instance A.FromJSON V1AttachedVolume where
  parseJSON = A.withObject "V1AttachedVolume" $ \o ->
    V1AttachedVolume
      <$> (o .:  "devicePath")
      <*> (o .:  "name")

-- | ToJSON V1AttachedVolume
instance A.ToJSON V1AttachedVolume where
  toJSON V1AttachedVolume {..} =
   _omitNulls
      [ "devicePath" .= v1AttachedVolumeDevicePath
      , "name" .= 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 v1AttachedVolumeDevicePath v1AttachedVolumeName =
  V1AttachedVolume
  { v1AttachedVolumeDevicePath
  , v1AttachedVolumeName
  }

-- ** V1AzureDiskVolumeSource
-- | V1AzureDiskVolumeSource
-- AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
data V1AzureDiskVolumeSource = V1AzureDiskVolumeSource
  { v1AzureDiskVolumeSourceCachingMode :: !(Maybe Text) -- ^ "cachingMode" - Host Caching mode: None, Read Only, Read Write.
  , v1AzureDiskVolumeSourceDiskName :: !(Text) -- ^ /Required/ "diskName" - The Name of the data disk in the blob storage
  , v1AzureDiskVolumeSourceDiskUri :: !(Text) -- ^ /Required/ "diskURI" - The URI the data disk in the blob storage
  , v1AzureDiskVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - 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.
  , v1AzureDiskVolumeSourceKind :: !(Maybe Text) -- ^ "kind" - Expected values 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
  , v1AzureDiskVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1AzureDiskVolumeSource
instance A.FromJSON V1AzureDiskVolumeSource where
  parseJSON = A.withObject "V1AzureDiskVolumeSource" $ \o ->
    V1AzureDiskVolumeSource
      <$> (o .:? "cachingMode")
      <*> (o .:  "diskName")
      <*> (o .:  "diskURI")
      <*> (o .:? "fsType")
      <*> (o .:? "kind")
      <*> (o .:? "readOnly")

-- | ToJSON V1AzureDiskVolumeSource
instance A.ToJSON V1AzureDiskVolumeSource where
  toJSON V1AzureDiskVolumeSource {..} =
   _omitNulls
      [ "cachingMode" .= v1AzureDiskVolumeSourceCachingMode
      , "diskName" .= v1AzureDiskVolumeSourceDiskName
      , "diskURI" .= v1AzureDiskVolumeSourceDiskUri
      , "fsType" .= v1AzureDiskVolumeSourceFsType
      , "kind" .= v1AzureDiskVolumeSourceKind
      , "readOnly" .= v1AzureDiskVolumeSourceReadOnly
      ]


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

-- ** V1AzureFilePersistentVolumeSource
-- | V1AzureFilePersistentVolumeSource
-- AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
data V1AzureFilePersistentVolumeSource = V1AzureFilePersistentVolumeSource
  { v1AzureFilePersistentVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
  , v1AzureFilePersistentVolumeSourceSecretName :: !(Text) -- ^ /Required/ "secretName" - the name of secret that contains Azure Storage Account Name and Key
  , v1AzureFilePersistentVolumeSourceSecretNamespace :: !(Maybe Text) -- ^ "secretNamespace" - the namespace of the secret that contains Azure Storage Account Name and Key default is the same as the Pod
  , v1AzureFilePersistentVolumeSourceShareName :: !(Text) -- ^ /Required/ "shareName" - Share Name
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1AzureFilePersistentVolumeSource
instance A.FromJSON V1AzureFilePersistentVolumeSource where
  parseJSON = A.withObject "V1AzureFilePersistentVolumeSource" $ \o ->
    V1AzureFilePersistentVolumeSource
      <$> (o .:? "readOnly")
      <*> (o .:  "secretName")
      <*> (o .:? "secretNamespace")
      <*> (o .:  "shareName")

-- | ToJSON V1AzureFilePersistentVolumeSource
instance A.ToJSON V1AzureFilePersistentVolumeSource where
  toJSON V1AzureFilePersistentVolumeSource {..} =
   _omitNulls
      [ "readOnly" .= v1AzureFilePersistentVolumeSourceReadOnly
      , "secretName" .= v1AzureFilePersistentVolumeSourceSecretName
      , "secretNamespace" .= v1AzureFilePersistentVolumeSourceSecretNamespace
      , "shareName" .= v1AzureFilePersistentVolumeSourceShareName
      ]


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

-- ** V1AzureFileVolumeSource
-- | V1AzureFileVolumeSource
-- AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
data V1AzureFileVolumeSource = V1AzureFileVolumeSource
  { v1AzureFileVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
  , v1AzureFileVolumeSourceSecretName :: !(Text) -- ^ /Required/ "secretName" - the name of secret that contains Azure Storage Account Name and Key
  , v1AzureFileVolumeSourceShareName :: !(Text) -- ^ /Required/ "shareName" - Share Name
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1AzureFileVolumeSource
instance A.FromJSON V1AzureFileVolumeSource where
  parseJSON = A.withObject "V1AzureFileVolumeSource" $ \o ->
    V1AzureFileVolumeSource
      <$> (o .:? "readOnly")
      <*> (o .:  "secretName")
      <*> (o .:  "shareName")

-- | ToJSON V1AzureFileVolumeSource
instance A.ToJSON V1AzureFileVolumeSource where
  toJSON V1AzureFileVolumeSource {..} =
   _omitNulls
      [ "readOnly" .= v1AzureFileVolumeSourceReadOnly
      , "secretName" .= v1AzureFileVolumeSourceSecretName
      , "shareName" .= v1AzureFileVolumeSourceShareName
      ]


-- | Construct a value of type 'V1AzureFileVolumeSource' (by applying it's required fields, if any)
mkV1AzureFileVolumeSource
  :: Text -- ^ 'v1AzureFileVolumeSourceSecretName': the name of secret that contains Azure Storage Account Name and Key
  -> Text -- ^ 'v1AzureFileVolumeSourceShareName': Share Name
  -> V1AzureFileVolumeSource
mkV1AzureFileVolumeSource v1AzureFileVolumeSourceSecretName v1AzureFileVolumeSourceShareName =
  V1AzureFileVolumeSource
  { v1AzureFileVolumeSourceReadOnly = Nothing
  , v1AzureFileVolumeSourceSecretName
  , v1AzureFileVolumeSourceShareName
  }

-- ** V1Binding
-- | V1Binding
-- Binding ties one object to another; for example, a pod is bound to a node by a scheduler. Deprecated in 1.7, please use the bindings subresource of pods instead.
data V1Binding = V1Binding
  { 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1BindingMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1BindingTarget :: !(V1ObjectReference) -- ^ /Required/ "target"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1Binding
instance A.FromJSON V1Binding where
  parseJSON = A.withObject "V1Binding" $ \o ->
    V1Binding
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:  "target")

-- | ToJSON V1Binding
instance A.ToJSON V1Binding where
  toJSON V1Binding {..} =
   _omitNulls
      [ "apiVersion" .= v1BindingApiVersion
      , "kind" .= v1BindingKind
      , "metadata" .= v1BindingMetadata
      , "target" .= v1BindingTarget
      ]


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

-- ** V1CSIPersistentVolumeSource
-- | V1CSIPersistentVolumeSource
-- Represents storage that is managed by an external CSI volume driver (Beta feature)
data V1CSIPersistentVolumeSource = V1CSIPersistentVolumeSource
  { v1CSIPersistentVolumeSourceControllerPublishSecretRef :: !(Maybe V1SecretReference) -- ^ "controllerPublishSecretRef"
  , v1CSIPersistentVolumeSourceDriver :: !(Text) -- ^ /Required/ "driver" - Driver is the name of the driver to use for this volume. Required.
  , v1CSIPersistentVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - 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;.
  , v1CSIPersistentVolumeSourceNodePublishSecretRef :: !(Maybe V1SecretReference) -- ^ "nodePublishSecretRef"
  , v1CSIPersistentVolumeSourceNodeStageSecretRef :: !(Maybe V1SecretReference) -- ^ "nodeStageSecretRef"
  , v1CSIPersistentVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - Optional: The value to pass to ControllerPublishVolumeRequest. Defaults to false (read/write).
  , v1CSIPersistentVolumeSourceVolumeAttributes :: !(Maybe (Map.Map String Text)) -- ^ "volumeAttributes" - Attributes of the volume to publish.
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1CSIPersistentVolumeSource
instance A.FromJSON V1CSIPersistentVolumeSource where
  parseJSON = A.withObject "V1CSIPersistentVolumeSource" $ \o ->
    V1CSIPersistentVolumeSource
      <$> (o .:? "controllerPublishSecretRef")
      <*> (o .:  "driver")
      <*> (o .:? "fsType")
      <*> (o .:? "nodePublishSecretRef")
      <*> (o .:? "nodeStageSecretRef")
      <*> (o .:? "readOnly")
      <*> (o .:? "volumeAttributes")
      <*> (o .:  "volumeHandle")

-- | ToJSON V1CSIPersistentVolumeSource
instance A.ToJSON V1CSIPersistentVolumeSource where
  toJSON V1CSIPersistentVolumeSource {..} =
   _omitNulls
      [ "controllerPublishSecretRef" .= v1CSIPersistentVolumeSourceControllerPublishSecretRef
      , "driver" .= v1CSIPersistentVolumeSourceDriver
      , "fsType" .= v1CSIPersistentVolumeSourceFsType
      , "nodePublishSecretRef" .= v1CSIPersistentVolumeSourceNodePublishSecretRef
      , "nodeStageSecretRef" .= v1CSIPersistentVolumeSourceNodeStageSecretRef
      , "readOnly" .= v1CSIPersistentVolumeSourceReadOnly
      , "volumeAttributes" .= v1CSIPersistentVolumeSourceVolumeAttributes
      , "volumeHandle" .= 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 v1CSIPersistentVolumeSourceDriver v1CSIPersistentVolumeSourceVolumeHandle =
  V1CSIPersistentVolumeSource
  { v1CSIPersistentVolumeSourceControllerPublishSecretRef = Nothing
  , v1CSIPersistentVolumeSourceDriver
  , v1CSIPersistentVolumeSourceFsType = Nothing
  , v1CSIPersistentVolumeSourceNodePublishSecretRef = Nothing
  , v1CSIPersistentVolumeSourceNodeStageSecretRef = Nothing
  , v1CSIPersistentVolumeSourceReadOnly = Nothing
  , v1CSIPersistentVolumeSourceVolumeAttributes = Nothing
  , v1CSIPersistentVolumeSourceVolumeHandle
  }

-- ** V1CSIVolumeSource
-- | V1CSIVolumeSource
-- Represents a source location of a volume to mount, managed by an external CSI driver
data V1CSIVolumeSource = V1CSIVolumeSource
  { 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.
  , v1CSIVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - Filesystem type 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.
  , v1CSIVolumeSourceNodePublishSecretRef :: !(Maybe V1LocalObjectReference) -- ^ "nodePublishSecretRef"
  , v1CSIVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - Specifies a read-only configuration for the volume. Defaults to false (read/write).
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1CSIVolumeSource
instance A.FromJSON V1CSIVolumeSource where
  parseJSON = A.withObject "V1CSIVolumeSource" $ \o ->
    V1CSIVolumeSource
      <$> (o .:  "driver")
      <*> (o .:? "fsType")
      <*> (o .:? "nodePublishSecretRef")
      <*> (o .:? "readOnly")
      <*> (o .:? "volumeAttributes")

-- | ToJSON V1CSIVolumeSource
instance A.ToJSON V1CSIVolumeSource where
  toJSON V1CSIVolumeSource {..} =
   _omitNulls
      [ "driver" .= v1CSIVolumeSourceDriver
      , "fsType" .= v1CSIVolumeSourceFsType
      , "nodePublishSecretRef" .= v1CSIVolumeSourceNodePublishSecretRef
      , "readOnly" .= v1CSIVolumeSourceReadOnly
      , "volumeAttributes" .= 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 v1CSIVolumeSourceDriver =
  V1CSIVolumeSource
  { v1CSIVolumeSourceDriver
  , v1CSIVolumeSourceFsType = Nothing
  , v1CSIVolumeSourceNodePublishSecretRef = Nothing
  , v1CSIVolumeSourceReadOnly = Nothing
  , v1CSIVolumeSourceVolumeAttributes = Nothing
  }

-- ** V1Capabilities
-- | V1Capabilities
-- Adds and removes POSIX capabilities from running containers.
data V1Capabilities = V1Capabilities
  { v1CapabilitiesAdd :: !(Maybe [Text]) -- ^ "add" - Added capabilities
  , v1CapabilitiesDrop :: !(Maybe [Text]) -- ^ "drop" - Removed capabilities
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1Capabilities
instance A.FromJSON V1Capabilities where
  parseJSON = A.withObject "V1Capabilities" $ \o ->
    V1Capabilities
      <$> (o .:? "add")
      <*> (o .:? "drop")

-- | ToJSON V1Capabilities
instance A.ToJSON V1Capabilities where
  toJSON V1Capabilities {..} =
   _omitNulls
      [ "add" .= v1CapabilitiesAdd
      , "drop" .= v1CapabilitiesDrop
      ]


-- | Construct a value of type 'V1Capabilities' (by applying it's required fields, if any)
mkV1Capabilities
  :: V1Capabilities
mkV1Capabilities =
  V1Capabilities
  { v1CapabilitiesAdd = Nothing
  , v1CapabilitiesDrop = 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
  { v1CephFSPersistentVolumeSourceMonitors :: !([Text]) -- ^ /Required/ "monitors" - Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
  , v1CephFSPersistentVolumeSourcePath :: !(Maybe Text) -- ^ "path" - Optional: Used as the mounted root, rather than the full Ceph tree, default is /
  , v1CephFSPersistentVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
  , v1CephFSPersistentVolumeSourceSecretFile :: !(Maybe Text) -- ^ "secretFile" - Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
  , v1CephFSPersistentVolumeSourceSecretRef :: !(Maybe V1SecretReference) -- ^ "secretRef"
  , v1CephFSPersistentVolumeSourceUser :: !(Maybe Text) -- ^ "user" - Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1CephFSPersistentVolumeSource
instance A.FromJSON V1CephFSPersistentVolumeSource where
  parseJSON = A.withObject "V1CephFSPersistentVolumeSource" $ \o ->
    V1CephFSPersistentVolumeSource
      <$> (o .:  "monitors")
      <*> (o .:? "path")
      <*> (o .:? "readOnly")
      <*> (o .:? "secretFile")
      <*> (o .:? "secretRef")
      <*> (o .:? "user")

-- | ToJSON V1CephFSPersistentVolumeSource
instance A.ToJSON V1CephFSPersistentVolumeSource where
  toJSON V1CephFSPersistentVolumeSource {..} =
   _omitNulls
      [ "monitors" .= v1CephFSPersistentVolumeSourceMonitors
      , "path" .= v1CephFSPersistentVolumeSourcePath
      , "readOnly" .= v1CephFSPersistentVolumeSourceReadOnly
      , "secretFile" .= v1CephFSPersistentVolumeSourceSecretFile
      , "secretRef" .= v1CephFSPersistentVolumeSourceSecretRef
      , "user" .= v1CephFSPersistentVolumeSourceUser
      ]


-- | Construct a value of type 'V1CephFSPersistentVolumeSource' (by applying it's required fields, if any)
mkV1CephFSPersistentVolumeSource
  :: [Text] -- ^ 'v1CephFSPersistentVolumeSourceMonitors': Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
  -> V1CephFSPersistentVolumeSource
mkV1CephFSPersistentVolumeSource v1CephFSPersistentVolumeSourceMonitors =
  V1CephFSPersistentVolumeSource
  { v1CephFSPersistentVolumeSourceMonitors
  , v1CephFSPersistentVolumeSourcePath = Nothing
  , v1CephFSPersistentVolumeSourceReadOnly = Nothing
  , v1CephFSPersistentVolumeSourceSecretFile = Nothing
  , v1CephFSPersistentVolumeSourceSecretRef = Nothing
  , v1CephFSPersistentVolumeSourceUser = 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
  { v1CephFSVolumeSourceMonitors :: !([Text]) -- ^ /Required/ "monitors" - Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
  , v1CephFSVolumeSourcePath :: !(Maybe Text) -- ^ "path" - Optional: Used as the mounted root, rather than the full Ceph tree, default is /
  , v1CephFSVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
  , v1CephFSVolumeSourceSecretFile :: !(Maybe Text) -- ^ "secretFile" - Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
  , v1CephFSVolumeSourceSecretRef :: !(Maybe V1LocalObjectReference) -- ^ "secretRef"
  , v1CephFSVolumeSourceUser :: !(Maybe Text) -- ^ "user" - Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1CephFSVolumeSource
instance A.FromJSON V1CephFSVolumeSource where
  parseJSON = A.withObject "V1CephFSVolumeSource" $ \o ->
    V1CephFSVolumeSource
      <$> (o .:  "monitors")
      <*> (o .:? "path")
      <*> (o .:? "readOnly")
      <*> (o .:? "secretFile")
      <*> (o .:? "secretRef")
      <*> (o .:? "user")

-- | ToJSON V1CephFSVolumeSource
instance A.ToJSON V1CephFSVolumeSource where
  toJSON V1CephFSVolumeSource {..} =
   _omitNulls
      [ "monitors" .= v1CephFSVolumeSourceMonitors
      , "path" .= v1CephFSVolumeSourcePath
      , "readOnly" .= v1CephFSVolumeSourceReadOnly
      , "secretFile" .= v1CephFSVolumeSourceSecretFile
      , "secretRef" .= v1CephFSVolumeSourceSecretRef
      , "user" .= v1CephFSVolumeSourceUser
      ]


-- | Construct a value of type 'V1CephFSVolumeSource' (by applying it's required fields, if any)
mkV1CephFSVolumeSource
  :: [Text] -- ^ 'v1CephFSVolumeSourceMonitors': Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
  -> V1CephFSVolumeSource
mkV1CephFSVolumeSource v1CephFSVolumeSourceMonitors =
  V1CephFSVolumeSource
  { v1CephFSVolumeSourceMonitors
  , v1CephFSVolumeSourcePath = Nothing
  , v1CephFSVolumeSourceReadOnly = Nothing
  , v1CephFSVolumeSourceSecretFile = Nothing
  , v1CephFSVolumeSourceSecretRef = Nothing
  , v1CephFSVolumeSourceUser = 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
  { v1CinderPersistentVolumeSourceFsType :: !(Maybe Text) -- ^ "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://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
  , v1CinderPersistentVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
  , v1CinderPersistentVolumeSourceSecretRef :: !(Maybe V1SecretReference) -- ^ "secretRef"
  , v1CinderPersistentVolumeSourceVolumeId :: !(Text) -- ^ /Required/ "volumeID" - volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1CinderPersistentVolumeSource
instance A.FromJSON V1CinderPersistentVolumeSource where
  parseJSON = A.withObject "V1CinderPersistentVolumeSource" $ \o ->
    V1CinderPersistentVolumeSource
      <$> (o .:? "fsType")
      <*> (o .:? "readOnly")
      <*> (o .:? "secretRef")
      <*> (o .:  "volumeID")

-- | ToJSON V1CinderPersistentVolumeSource
instance A.ToJSON V1CinderPersistentVolumeSource where
  toJSON V1CinderPersistentVolumeSource {..} =
   _omitNulls
      [ "fsType" .= v1CinderPersistentVolumeSourceFsType
      , "readOnly" .= v1CinderPersistentVolumeSourceReadOnly
      , "secretRef" .= v1CinderPersistentVolumeSourceSecretRef
      , "volumeID" .= v1CinderPersistentVolumeSourceVolumeId
      ]


-- | Construct a value of type 'V1CinderPersistentVolumeSource' (by applying it's required fields, if any)
mkV1CinderPersistentVolumeSource
  :: Text -- ^ 'v1CinderPersistentVolumeSourceVolumeId': volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
  -> V1CinderPersistentVolumeSource
mkV1CinderPersistentVolumeSource v1CinderPersistentVolumeSourceVolumeId =
  V1CinderPersistentVolumeSource
  { v1CinderPersistentVolumeSourceFsType = Nothing
  , v1CinderPersistentVolumeSourceReadOnly = Nothing
  , v1CinderPersistentVolumeSourceSecretRef = Nothing
  , 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
  { v1CinderVolumeSourceFsType :: !(Maybe Text) -- ^ "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://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
  , v1CinderVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
  , v1CinderVolumeSourceSecretRef :: !(Maybe V1LocalObjectReference) -- ^ "secretRef"
  , v1CinderVolumeSourceVolumeId :: !(Text) -- ^ /Required/ "volumeID" - volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1CinderVolumeSource
instance A.FromJSON V1CinderVolumeSource where
  parseJSON = A.withObject "V1CinderVolumeSource" $ \o ->
    V1CinderVolumeSource
      <$> (o .:? "fsType")
      <*> (o .:? "readOnly")
      <*> (o .:? "secretRef")
      <*> (o .:  "volumeID")

-- | ToJSON V1CinderVolumeSource
instance A.ToJSON V1CinderVolumeSource where
  toJSON V1CinderVolumeSource {..} =
   _omitNulls
      [ "fsType" .= v1CinderVolumeSourceFsType
      , "readOnly" .= v1CinderVolumeSourceReadOnly
      , "secretRef" .= v1CinderVolumeSourceSecretRef
      , "volumeID" .= v1CinderVolumeSourceVolumeId
      ]


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

-- ** V1ClientIPConfig
-- | V1ClientIPConfig
-- ClientIPConfig represents the configurations of Client IP based session affinity.
data V1ClientIPConfig = V1ClientIPConfig
  { 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ClientIPConfig
instance A.FromJSON V1ClientIPConfig where
  parseJSON = A.withObject "V1ClientIPConfig" $ \o ->
    V1ClientIPConfig
      <$> (o .:? "timeoutSeconds")

-- | ToJSON V1ClientIPConfig
instance A.ToJSON V1ClientIPConfig where
  toJSON V1ClientIPConfig {..} =
   _omitNulls
      [ "timeoutSeconds" .= v1ClientIPConfigTimeoutSeconds
      ]


-- | Construct a value of type 'V1ClientIPConfig' (by applying it's required fields, if any)
mkV1ClientIPConfig
  :: V1ClientIPConfig
mkV1ClientIPConfig =
  V1ClientIPConfig
  { v1ClientIPConfigTimeoutSeconds = 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
  { v1ClusterRoleAggregationRule :: !(Maybe V1AggregationRule) -- ^ "aggregationRule"
  , 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1ClusterRoleMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1ClusterRoleRules :: !(Maybe [V1PolicyRule]) -- ^ "rules" - Rules holds all the PolicyRules for this ClusterRole
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ClusterRole
instance A.FromJSON V1ClusterRole where
  parseJSON = A.withObject "V1ClusterRole" $ \o ->
    V1ClusterRole
      <$> (o .:? "aggregationRule")
      <*> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "rules")

-- | ToJSON V1ClusterRole
instance A.ToJSON V1ClusterRole where
  toJSON V1ClusterRole {..} =
   _omitNulls
      [ "aggregationRule" .= v1ClusterRoleAggregationRule
      , "apiVersion" .= v1ClusterRoleApiVersion
      , "kind" .= v1ClusterRoleKind
      , "metadata" .= v1ClusterRoleMetadata
      , "rules" .= v1ClusterRoleRules
      ]


-- | Construct a value of type 'V1ClusterRole' (by applying it's required fields, if any)
mkV1ClusterRole
  :: V1ClusterRole
mkV1ClusterRole =
  V1ClusterRole
  { v1ClusterRoleAggregationRule = Nothing
  , v1ClusterRoleApiVersion = Nothing
  , v1ClusterRoleKind = Nothing
  , v1ClusterRoleMetadata = Nothing
  , v1ClusterRoleRules = 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
  { 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1ClusterRoleBindingMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1ClusterRoleBindingRoleRef :: !(V1RoleRef) -- ^ /Required/ "roleRef"
  , v1ClusterRoleBindingSubjects :: !(Maybe [V1Subject]) -- ^ "subjects" - Subjects holds references to the objects the role applies to.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ClusterRoleBinding
instance A.FromJSON V1ClusterRoleBinding where
  parseJSON = A.withObject "V1ClusterRoleBinding" $ \o ->
    V1ClusterRoleBinding
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:  "roleRef")
      <*> (o .:? "subjects")

-- | ToJSON V1ClusterRoleBinding
instance A.ToJSON V1ClusterRoleBinding where
  toJSON V1ClusterRoleBinding {..} =
   _omitNulls
      [ "apiVersion" .= v1ClusterRoleBindingApiVersion
      , "kind" .= v1ClusterRoleBindingKind
      , "metadata" .= v1ClusterRoleBindingMetadata
      , "roleRef" .= v1ClusterRoleBindingRoleRef
      , "subjects" .= v1ClusterRoleBindingSubjects
      ]


-- | Construct a value of type 'V1ClusterRoleBinding' (by applying it's required fields, if any)
mkV1ClusterRoleBinding
  :: V1RoleRef -- ^ 'v1ClusterRoleBindingRoleRef' 
  -> V1ClusterRoleBinding
mkV1ClusterRoleBinding v1ClusterRoleBindingRoleRef =
  V1ClusterRoleBinding
  { v1ClusterRoleBindingApiVersion = Nothing
  , v1ClusterRoleBindingKind = Nothing
  , v1ClusterRoleBindingMetadata = Nothing
  , v1ClusterRoleBindingRoleRef
  , v1ClusterRoleBindingSubjects = Nothing
  }

-- ** V1ClusterRoleBindingList
-- | V1ClusterRoleBindingList
-- ClusterRoleBindingList is a collection of ClusterRoleBindings
data V1ClusterRoleBindingList = V1ClusterRoleBindingList
  { 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/api-conventions.md#resources
  , v1ClusterRoleBindingListItems :: !([V1ClusterRoleBinding]) -- ^ /Required/ "items" - Items is a list of ClusterRoleBindings
  , 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/api-conventions.md#types-kinds
  , v1ClusterRoleBindingListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ClusterRoleBindingList
instance A.FromJSON V1ClusterRoleBindingList where
  parseJSON = A.withObject "V1ClusterRoleBindingList" $ \o ->
    V1ClusterRoleBindingList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1ClusterRoleBindingList
instance A.ToJSON V1ClusterRoleBindingList where
  toJSON V1ClusterRoleBindingList {..} =
   _omitNulls
      [ "apiVersion" .= v1ClusterRoleBindingListApiVersion
      , "items" .= v1ClusterRoleBindingListItems
      , "kind" .= v1ClusterRoleBindingListKind
      , "metadata" .= 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 v1ClusterRoleBindingListItems =
  V1ClusterRoleBindingList
  { v1ClusterRoleBindingListApiVersion = Nothing
  , v1ClusterRoleBindingListItems
  , v1ClusterRoleBindingListKind = Nothing
  , v1ClusterRoleBindingListMetadata = Nothing
  }

-- ** V1ClusterRoleList
-- | V1ClusterRoleList
-- ClusterRoleList is a collection of ClusterRoles
data V1ClusterRoleList = V1ClusterRoleList
  { 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/api-conventions.md#resources
  , v1ClusterRoleListItems :: !([V1ClusterRole]) -- ^ /Required/ "items" - Items is a list of ClusterRoles
  , 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/api-conventions.md#types-kinds
  , v1ClusterRoleListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ClusterRoleList
instance A.FromJSON V1ClusterRoleList where
  parseJSON = A.withObject "V1ClusterRoleList" $ \o ->
    V1ClusterRoleList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1ClusterRoleList
instance A.ToJSON V1ClusterRoleList where
  toJSON V1ClusterRoleList {..} =
   _omitNulls
      [ "apiVersion" .= v1ClusterRoleListApiVersion
      , "items" .= v1ClusterRoleListItems
      , "kind" .= v1ClusterRoleListKind
      , "metadata" .= 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 v1ClusterRoleListItems =
  V1ClusterRoleList
  { v1ClusterRoleListApiVersion = Nothing
  , v1ClusterRoleListItems
  , v1ClusterRoleListKind = Nothing
  , v1ClusterRoleListMetadata = Nothing
  }

-- ** V1ComponentCondition
-- | V1ComponentCondition
-- Information about the condition of a component.
data V1ComponentCondition = V1ComponentCondition
  { v1ComponentConditionError :: !(Maybe Text) -- ^ "error" - Condition error code for a component. For example, a health check error code.
  , v1ComponentConditionMessage :: !(Maybe Text) -- ^ "message" - Message about the condition for a component. For example, information about a health check.
  , 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;.
  , v1ComponentConditionType :: !(Text) -- ^ /Required/ "type" - Type of condition for a component. Valid value: \&quot;Healthy\&quot;
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ComponentCondition
instance A.FromJSON V1ComponentCondition where
  parseJSON = A.withObject "V1ComponentCondition" $ \o ->
    V1ComponentCondition
      <$> (o .:? "error")
      <*> (o .:? "message")
      <*> (o .:  "status")
      <*> (o .:  "type")

-- | ToJSON V1ComponentCondition
instance A.ToJSON V1ComponentCondition where
  toJSON V1ComponentCondition {..} =
   _omitNulls
      [ "error" .= v1ComponentConditionError
      , "message" .= v1ComponentConditionMessage
      , "status" .= v1ComponentConditionStatus
      , "type" .= 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 v1ComponentConditionStatus v1ComponentConditionType =
  V1ComponentCondition
  { v1ComponentConditionError = Nothing
  , v1ComponentConditionMessage = Nothing
  , v1ComponentConditionStatus
  , v1ComponentConditionType
  }

-- ** V1ComponentStatus
-- | V1ComponentStatus
-- ComponentStatus (and ComponentStatusList) holds the cluster validation info.
data V1ComponentStatus = V1ComponentStatus
  { 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/api-conventions.md#resources
  , v1ComponentStatusConditions :: !(Maybe [V1ComponentCondition]) -- ^ "conditions" - List of component conditions observed
  , 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/api-conventions.md#types-kinds
  , v1ComponentStatusMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ComponentStatus
instance A.FromJSON V1ComponentStatus where
  parseJSON = A.withObject "V1ComponentStatus" $ \o ->
    V1ComponentStatus
      <$> (o .:? "apiVersion")
      <*> (o .:? "conditions")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1ComponentStatus
instance A.ToJSON V1ComponentStatus where
  toJSON V1ComponentStatus {..} =
   _omitNulls
      [ "apiVersion" .= v1ComponentStatusApiVersion
      , "conditions" .= v1ComponentStatusConditions
      , "kind" .= v1ComponentStatusKind
      , "metadata" .= v1ComponentStatusMetadata
      ]


-- | Construct a value of type 'V1ComponentStatus' (by applying it's required fields, if any)
mkV1ComponentStatus
  :: V1ComponentStatus
mkV1ComponentStatus =
  V1ComponentStatus
  { v1ComponentStatusApiVersion = Nothing
  , v1ComponentStatusConditions = Nothing
  , v1ComponentStatusKind = Nothing
  , v1ComponentStatusMetadata = Nothing
  }

-- ** V1ComponentStatusList
-- | V1ComponentStatusList
-- Status of all the conditions for the component as a list of ComponentStatus objects.
data V1ComponentStatusList = V1ComponentStatusList
  { 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/api-conventions.md#resources
  , v1ComponentStatusListItems :: !([V1ComponentStatus]) -- ^ /Required/ "items" - List of ComponentStatus objects.
  , 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/api-conventions.md#types-kinds
  , v1ComponentStatusListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ComponentStatusList
instance A.FromJSON V1ComponentStatusList where
  parseJSON = A.withObject "V1ComponentStatusList" $ \o ->
    V1ComponentStatusList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1ComponentStatusList
instance A.ToJSON V1ComponentStatusList where
  toJSON V1ComponentStatusList {..} =
   _omitNulls
      [ "apiVersion" .= v1ComponentStatusListApiVersion
      , "items" .= v1ComponentStatusListItems
      , "kind" .= v1ComponentStatusListKind
      , "metadata" .= v1ComponentStatusListMetadata
      ]


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

-- ** V1ConfigMap
-- | V1ConfigMap
-- ConfigMap holds configuration data for pods to consume.
data V1ConfigMap = V1ConfigMap
  { 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/api-conventions.md#resources
  , 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.
  , 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.
  , 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/api-conventions.md#types-kinds
  , v1ConfigMapMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ConfigMap
instance A.FromJSON V1ConfigMap where
  parseJSON = A.withObject "V1ConfigMap" $ \o ->
    V1ConfigMap
      <$> (o .:? "apiVersion")
      <*> (o .:? "binaryData")
      <*> (o .:? "data")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1ConfigMap
instance A.ToJSON V1ConfigMap where
  toJSON V1ConfigMap {..} =
   _omitNulls
      [ "apiVersion" .= v1ConfigMapApiVersion
      , "binaryData" .= v1ConfigMapBinaryData
      , "data" .= v1ConfigMapData
      , "kind" .= v1ConfigMapKind
      , "metadata" .= v1ConfigMapMetadata
      ]


-- | Construct a value of type 'V1ConfigMap' (by applying it's required fields, if any)
mkV1ConfigMap
  :: V1ConfigMap
mkV1ConfigMap =
  V1ConfigMap
  { v1ConfigMapApiVersion = Nothing
  , v1ConfigMapBinaryData = Nothing
  , v1ConfigMapData = Nothing
  , v1ConfigMapKind = Nothing
  , v1ConfigMapMetadata = 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
  { v1ConfigMapEnvSourceName :: !(Maybe Text) -- ^ "name" - Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  , v1ConfigMapEnvSourceOptional :: !(Maybe Bool) -- ^ "optional" - Specify whether the ConfigMap must be defined
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ConfigMapEnvSource
instance A.FromJSON V1ConfigMapEnvSource where
  parseJSON = A.withObject "V1ConfigMapEnvSource" $ \o ->
    V1ConfigMapEnvSource
      <$> (o .:? "name")
      <*> (o .:? "optional")

-- | ToJSON V1ConfigMapEnvSource
instance A.ToJSON V1ConfigMapEnvSource where
  toJSON V1ConfigMapEnvSource {..} =
   _omitNulls
      [ "name" .= v1ConfigMapEnvSourceName
      , "optional" .= v1ConfigMapEnvSourceOptional
      ]


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

-- ** V1ConfigMapKeySelector
-- | V1ConfigMapKeySelector
-- Selects a key from a ConfigMap.
data V1ConfigMapKeySelector = V1ConfigMapKeySelector
  { v1ConfigMapKeySelectorKey :: !(Text) -- ^ /Required/ "key" - The key to select.
  , v1ConfigMapKeySelectorName :: !(Maybe Text) -- ^ "name" - Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  , v1ConfigMapKeySelectorOptional :: !(Maybe Bool) -- ^ "optional" - Specify whether the ConfigMap or it&#39;s key must be defined
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ConfigMapKeySelector
instance A.FromJSON V1ConfigMapKeySelector where
  parseJSON = A.withObject "V1ConfigMapKeySelector" $ \o ->
    V1ConfigMapKeySelector
      <$> (o .:  "key")
      <*> (o .:? "name")
      <*> (o .:? "optional")

-- | ToJSON V1ConfigMapKeySelector
instance A.ToJSON V1ConfigMapKeySelector where
  toJSON V1ConfigMapKeySelector {..} =
   _omitNulls
      [ "key" .= v1ConfigMapKeySelectorKey
      , "name" .= v1ConfigMapKeySelectorName
      , "optional" .= v1ConfigMapKeySelectorOptional
      ]


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

-- ** V1ConfigMapList
-- | V1ConfigMapList
-- ConfigMapList is a resource containing a list of ConfigMap objects.
data V1ConfigMapList = V1ConfigMapList
  { 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/api-conventions.md#resources
  , v1ConfigMapListItems :: !([V1ConfigMap]) -- ^ /Required/ "items" - Items is the list of ConfigMaps.
  , 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/api-conventions.md#types-kinds
  , v1ConfigMapListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ConfigMapList
instance A.FromJSON V1ConfigMapList where
  parseJSON = A.withObject "V1ConfigMapList" $ \o ->
    V1ConfigMapList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1ConfigMapList
instance A.ToJSON V1ConfigMapList where
  toJSON V1ConfigMapList {..} =
   _omitNulls
      [ "apiVersion" .= v1ConfigMapListApiVersion
      , "items" .= v1ConfigMapListItems
      , "kind" .= v1ConfigMapListKind
      , "metadata" .= 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 v1ConfigMapListItems =
  V1ConfigMapList
  { v1ConfigMapListApiVersion = Nothing
  , v1ConfigMapListItems
  , v1ConfigMapListKind = Nothing
  , v1ConfigMapListMetadata = Nothing
  }

-- ** V1ConfigMapNodeConfigSource
-- | V1ConfigMapNodeConfigSource
-- ConfigMapNodeConfigSource contains the information to reference a ConfigMap as a config source for the Node.
data V1ConfigMapNodeConfigSource = V1ConfigMapNodeConfigSource
  { v1ConfigMapNodeConfigSourceKubeletConfigKey :: !(Text) -- ^ /Required/ "kubeletConfigKey" - KubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure This field is required in all cases.
  , v1ConfigMapNodeConfigSourceName :: !(Text) -- ^ /Required/ "name" - Name is the metadata.name of the referenced ConfigMap. This field is required in all cases.
  , v1ConfigMapNodeConfigSourceNamespace :: !(Text) -- ^ /Required/ "namespace" - Namespace is the metadata.namespace of the referenced ConfigMap. This field is required in all cases.
  , 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.
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ConfigMapNodeConfigSource
instance A.FromJSON V1ConfigMapNodeConfigSource where
  parseJSON = A.withObject "V1ConfigMapNodeConfigSource" $ \o ->
    V1ConfigMapNodeConfigSource
      <$> (o .:  "kubeletConfigKey")
      <*> (o .:  "name")
      <*> (o .:  "namespace")
      <*> (o .:? "resourceVersion")
      <*> (o .:? "uid")

-- | ToJSON V1ConfigMapNodeConfigSource
instance A.ToJSON V1ConfigMapNodeConfigSource where
  toJSON V1ConfigMapNodeConfigSource {..} =
   _omitNulls
      [ "kubeletConfigKey" .= v1ConfigMapNodeConfigSourceKubeletConfigKey
      , "name" .= v1ConfigMapNodeConfigSourceName
      , "namespace" .= v1ConfigMapNodeConfigSourceNamespace
      , "resourceVersion" .= v1ConfigMapNodeConfigSourceResourceVersion
      , "uid" .= 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 v1ConfigMapNodeConfigSourceKubeletConfigKey v1ConfigMapNodeConfigSourceName v1ConfigMapNodeConfigSourceNamespace =
  V1ConfigMapNodeConfigSource
  { v1ConfigMapNodeConfigSourceKubeletConfigKey
  , v1ConfigMapNodeConfigSourceName
  , v1ConfigMapNodeConfigSourceNamespace
  , v1ConfigMapNodeConfigSourceResourceVersion = Nothing
  , v1ConfigMapNodeConfigSourceUid = 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
  { v1ConfigMapProjectionItems :: !(Maybe [V1KeyToPath]) -- ^ "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;.
  , v1ConfigMapProjectionName :: !(Maybe Text) -- ^ "name" - Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  , v1ConfigMapProjectionOptional :: !(Maybe Bool) -- ^ "optional" - Specify whether the ConfigMap or it&#39;s keys must be defined
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ConfigMapProjection
instance A.FromJSON V1ConfigMapProjection where
  parseJSON = A.withObject "V1ConfigMapProjection" $ \o ->
    V1ConfigMapProjection
      <$> (o .:? "items")
      <*> (o .:? "name")
      <*> (o .:? "optional")

-- | ToJSON V1ConfigMapProjection
instance A.ToJSON V1ConfigMapProjection where
  toJSON V1ConfigMapProjection {..} =
   _omitNulls
      [ "items" .= v1ConfigMapProjectionItems
      , "name" .= v1ConfigMapProjectionName
      , "optional" .= v1ConfigMapProjectionOptional
      ]


-- | Construct a value of type 'V1ConfigMapProjection' (by applying it's required fields, if any)
mkV1ConfigMapProjection
  :: V1ConfigMapProjection
mkV1ConfigMapProjection =
  V1ConfigMapProjection
  { v1ConfigMapProjectionItems = Nothing
  , v1ConfigMapProjectionName = Nothing
  , v1ConfigMapProjectionOptional = 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
  { v1ConfigMapVolumeSourceDefaultMode :: !(Maybe Int) -- ^ "defaultMode" - Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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.
  , v1ConfigMapVolumeSourceItems :: !(Maybe [V1KeyToPath]) -- ^ "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;.
  , v1ConfigMapVolumeSourceName :: !(Maybe Text) -- ^ "name" - Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  , v1ConfigMapVolumeSourceOptional :: !(Maybe Bool) -- ^ "optional" - Specify whether the ConfigMap or it&#39;s keys must be defined
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ConfigMapVolumeSource
instance A.FromJSON V1ConfigMapVolumeSource where
  parseJSON = A.withObject "V1ConfigMapVolumeSource" $ \o ->
    V1ConfigMapVolumeSource
      <$> (o .:? "defaultMode")
      <*> (o .:? "items")
      <*> (o .:? "name")
      <*> (o .:? "optional")

-- | ToJSON V1ConfigMapVolumeSource
instance A.ToJSON V1ConfigMapVolumeSource where
  toJSON V1ConfigMapVolumeSource {..} =
   _omitNulls
      [ "defaultMode" .= v1ConfigMapVolumeSourceDefaultMode
      , "items" .= v1ConfigMapVolumeSourceItems
      , "name" .= v1ConfigMapVolumeSourceName
      , "optional" .= v1ConfigMapVolumeSourceOptional
      ]


-- | Construct a value of type 'V1ConfigMapVolumeSource' (by applying it's required fields, if any)
mkV1ConfigMapVolumeSource
  :: V1ConfigMapVolumeSource
mkV1ConfigMapVolumeSource =
  V1ConfigMapVolumeSource
  { v1ConfigMapVolumeSourceDefaultMode = Nothing
  , v1ConfigMapVolumeSourceItems = Nothing
  , v1ConfigMapVolumeSourceName = Nothing
  , v1ConfigMapVolumeSourceOptional = Nothing
  }

-- ** V1Container
-- | V1Container
-- A single application container that you want to run within a pod.
data V1Container = V1Container
  { v1ContainerArgs :: !(Maybe [Text]) -- ^ "args" - Arguments to the entrypoint. The docker 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). 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
  , v1ContainerCommand :: !(Maybe [Text]) -- ^ "command" - Entrypoint array. Not executed within a shell. The docker 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). 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
  , v1ContainerEnv :: !(Maybe [V1EnvVar]) -- ^ "env" - List of environment variables to set in the container. Cannot be updated.
  , 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.
  , v1ContainerImage :: !(Maybe Text) -- ^ "image" - Docker 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.
  , 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
  , v1ContainerLifecycle :: !(Maybe V1Lifecycle) -- ^ "lifecycle"
  , v1ContainerLivenessProbe :: !(Maybe V1Probe) -- ^ "livenessProbe"
  , 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.
  , v1ContainerPorts :: !(Maybe [V1ContainerPort]) -- ^ "ports" - List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. 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. Cannot be updated.
  , v1ContainerReadinessProbe :: !(Maybe V1Probe) -- ^ "readinessProbe"
  , v1ContainerResources :: !(Maybe V1ResourceRequirements) -- ^ "resources"
  , v1ContainerSecurityContext :: !(Maybe V1SecurityContext) -- ^ "securityContext"
  , 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.
  , 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
  , 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.
  , 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.
  , v1ContainerTty :: !(Maybe Bool) -- ^ "tty" - Whether this container should allocate a TTY for itself, also requires &#39;stdin&#39; to be true. Default is false.
  , v1ContainerVolumeDevices :: !(Maybe [V1VolumeDevice]) -- ^ "volumeDevices" - volumeDevices is the list of block devices to be used by the container. This is a beta feature.
  , v1ContainerVolumeMounts :: !(Maybe [V1VolumeMount]) -- ^ "volumeMounts" - Pod volumes to mount into the container&#39;s filesystem. Cannot be updated.
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1Container
instance A.FromJSON V1Container where
  parseJSON = A.withObject "V1Container" $ \o ->
    V1Container
      <$> (o .:? "args")
      <*> (o .:? "command")
      <*> (o .:? "env")
      <*> (o .:? "envFrom")
      <*> (o .:? "image")
      <*> (o .:? "imagePullPolicy")
      <*> (o .:? "lifecycle")
      <*> (o .:? "livenessProbe")
      <*> (o .:  "name")
      <*> (o .:? "ports")
      <*> (o .:? "readinessProbe")
      <*> (o .:? "resources")
      <*> (o .:? "securityContext")
      <*> (o .:? "stdin")
      <*> (o .:? "stdinOnce")
      <*> (o .:? "terminationMessagePath")
      <*> (o .:? "terminationMessagePolicy")
      <*> (o .:? "tty")
      <*> (o .:? "volumeDevices")
      <*> (o .:? "volumeMounts")
      <*> (o .:? "workingDir")

-- | ToJSON V1Container
instance A.ToJSON V1Container where
  toJSON V1Container {..} =
   _omitNulls
      [ "args" .= v1ContainerArgs
      , "command" .= v1ContainerCommand
      , "env" .= v1ContainerEnv
      , "envFrom" .= v1ContainerEnvFrom
      , "image" .= v1ContainerImage
      , "imagePullPolicy" .= v1ContainerImagePullPolicy
      , "lifecycle" .= v1ContainerLifecycle
      , "livenessProbe" .= v1ContainerLivenessProbe
      , "name" .= v1ContainerName
      , "ports" .= v1ContainerPorts
      , "readinessProbe" .= v1ContainerReadinessProbe
      , "resources" .= v1ContainerResources
      , "securityContext" .= v1ContainerSecurityContext
      , "stdin" .= v1ContainerStdin
      , "stdinOnce" .= v1ContainerStdinOnce
      , "terminationMessagePath" .= v1ContainerTerminationMessagePath
      , "terminationMessagePolicy" .= v1ContainerTerminationMessagePolicy
      , "tty" .= v1ContainerTty
      , "volumeDevices" .= v1ContainerVolumeDevices
      , "volumeMounts" .= v1ContainerVolumeMounts
      , "workingDir" .= 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 v1ContainerName =
  V1Container
  { v1ContainerArgs = Nothing
  , v1ContainerCommand = Nothing
  , v1ContainerEnv = Nothing
  , v1ContainerEnvFrom = Nothing
  , v1ContainerImage = Nothing
  , v1ContainerImagePullPolicy = Nothing
  , v1ContainerLifecycle = Nothing
  , v1ContainerLivenessProbe = Nothing
  , v1ContainerName
  , v1ContainerPorts = Nothing
  , v1ContainerReadinessProbe = Nothing
  , v1ContainerResources = Nothing
  , v1ContainerSecurityContext = Nothing
  , v1ContainerStdin = Nothing
  , v1ContainerStdinOnce = Nothing
  , v1ContainerTerminationMessagePath = Nothing
  , v1ContainerTerminationMessagePolicy = Nothing
  , v1ContainerTty = Nothing
  , v1ContainerVolumeDevices = Nothing
  , v1ContainerVolumeMounts = Nothing
  , v1ContainerWorkingDir = Nothing
  }

-- ** V1ContainerImage
-- | V1ContainerImage
-- Describe a container image
data V1ContainerImage = V1ContainerImage
  { v1ContainerImageNames :: !([Text]) -- ^ /Required/ "names" - Names by which this image is known. e.g. [\&quot;k8s.gcr.io/hyperkube:v1.0.7\&quot;, \&quot;dockerhub.io/google_containers/hyperkube:v1.0.7\&quot;]
  , v1ContainerImageSizeBytes :: !(Maybe Integer) -- ^ "sizeBytes" - The size of the image in bytes.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ContainerImage
instance A.FromJSON V1ContainerImage where
  parseJSON = A.withObject "V1ContainerImage" $ \o ->
    V1ContainerImage
      <$> (o .:  "names")
      <*> (o .:? "sizeBytes")

-- | ToJSON V1ContainerImage
instance A.ToJSON V1ContainerImage where
  toJSON V1ContainerImage {..} =
   _omitNulls
      [ "names" .= v1ContainerImageNames
      , "sizeBytes" .= v1ContainerImageSizeBytes
      ]


-- | Construct a value of type 'V1ContainerImage' (by applying it's required fields, if any)
mkV1ContainerImage
  :: [Text] -- ^ 'v1ContainerImageNames': Names by which this image is known. e.g. [\"k8s.gcr.io/hyperkube:v1.0.7\", \"dockerhub.io/google_containers/hyperkube:v1.0.7\"]
  -> V1ContainerImage
mkV1ContainerImage v1ContainerImageNames =
  V1ContainerImage
  { v1ContainerImageNames
  , v1ContainerImageSizeBytes = Nothing
  }

-- ** V1ContainerPort
-- | V1ContainerPort
-- ContainerPort represents a network port in a single container.
data V1ContainerPort = V1ContainerPort
  { 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.
  , v1ContainerPortHostIp :: !(Maybe Text) -- ^ "hostIP" - What host IP to bind the external port to.
  , 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.
  , 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.
  , v1ContainerPortProtocol :: !(Maybe Text) -- ^ "protocol" - Protocol for port. Must be UDP, TCP, or SCTP. Defaults to \&quot;TCP\&quot;.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ContainerPort
instance A.FromJSON V1ContainerPort where
  parseJSON = A.withObject "V1ContainerPort" $ \o ->
    V1ContainerPort
      <$> (o .:  "containerPort")
      <*> (o .:? "hostIP")
      <*> (o .:? "hostPort")
      <*> (o .:? "name")
      <*> (o .:? "protocol")

-- | ToJSON V1ContainerPort
instance A.ToJSON V1ContainerPort where
  toJSON V1ContainerPort {..} =
   _omitNulls
      [ "containerPort" .= v1ContainerPortContainerPort
      , "hostIP" .= v1ContainerPortHostIp
      , "hostPort" .= v1ContainerPortHostPort
      , "name" .= v1ContainerPortName
      , "protocol" .= 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 v1ContainerPortContainerPort =
  V1ContainerPort
  { v1ContainerPortContainerPort
  , v1ContainerPortHostIp = Nothing
  , v1ContainerPortHostPort = Nothing
  , v1ContainerPortName = Nothing
  , v1ContainerPortProtocol = Nothing
  }

-- ** 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
  { v1ContainerStateRunning :: !(Maybe V1ContainerStateRunning) -- ^ "running"
  , v1ContainerStateTerminated :: !(Maybe V1ContainerStateTerminated) -- ^ "terminated"
  , v1ContainerStateWaiting :: !(Maybe V1ContainerStateWaiting) -- ^ "waiting"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ContainerState
instance A.FromJSON V1ContainerState where
  parseJSON = A.withObject "V1ContainerState" $ \o ->
    V1ContainerState
      <$> (o .:? "running")
      <*> (o .:? "terminated")
      <*> (o .:? "waiting")

-- | ToJSON V1ContainerState
instance A.ToJSON V1ContainerState where
  toJSON V1ContainerState {..} =
   _omitNulls
      [ "running" .= v1ContainerStateRunning
      , "terminated" .= v1ContainerStateTerminated
      , "waiting" .= v1ContainerStateWaiting
      ]


-- | Construct a value of type 'V1ContainerState' (by applying it's required fields, if any)
mkV1ContainerState
  :: V1ContainerState
mkV1ContainerState =
  V1ContainerState
  { v1ContainerStateRunning = Nothing
  , v1ContainerStateTerminated = Nothing
  , v1ContainerStateWaiting = Nothing
  }

-- ** V1ContainerStateRunning
-- | V1ContainerStateRunning
-- ContainerStateRunning is a running state of a container.
data V1ContainerStateRunning = V1ContainerStateRunning
  { v1ContainerStateRunningStartedAt :: !(Maybe DateTime) -- ^ "startedAt" - Time at which the container was last (re-)started
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ContainerStateRunning
instance A.FromJSON V1ContainerStateRunning where
  parseJSON = A.withObject "V1ContainerStateRunning" $ \o ->
    V1ContainerStateRunning
      <$> (o .:? "startedAt")

-- | ToJSON V1ContainerStateRunning
instance A.ToJSON V1ContainerStateRunning where
  toJSON V1ContainerStateRunning {..} =
   _omitNulls
      [ "startedAt" .= v1ContainerStateRunningStartedAt
      ]


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

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

-- | FromJSON V1ContainerStateTerminated
instance A.FromJSON V1ContainerStateTerminated where
  parseJSON = A.withObject "V1ContainerStateTerminated" $ \o ->
    V1ContainerStateTerminated
      <$> (o .:? "containerID")
      <*> (o .:  "exitCode")
      <*> (o .:? "finishedAt")
      <*> (o .:? "message")
      <*> (o .:? "reason")
      <*> (o .:? "signal")
      <*> (o .:? "startedAt")

-- | ToJSON V1ContainerStateTerminated
instance A.ToJSON V1ContainerStateTerminated where
  toJSON V1ContainerStateTerminated {..} =
   _omitNulls
      [ "containerID" .= v1ContainerStateTerminatedContainerId
      , "exitCode" .= v1ContainerStateTerminatedExitCode
      , "finishedAt" .= v1ContainerStateTerminatedFinishedAt
      , "message" .= v1ContainerStateTerminatedMessage
      , "reason" .= v1ContainerStateTerminatedReason
      , "signal" .= v1ContainerStateTerminatedSignal
      , "startedAt" .= 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 v1ContainerStateTerminatedExitCode =
  V1ContainerStateTerminated
  { v1ContainerStateTerminatedContainerId = Nothing
  , v1ContainerStateTerminatedExitCode
  , v1ContainerStateTerminatedFinishedAt = Nothing
  , v1ContainerStateTerminatedMessage = Nothing
  , v1ContainerStateTerminatedReason = Nothing
  , v1ContainerStateTerminatedSignal = Nothing
  , v1ContainerStateTerminatedStartedAt = Nothing
  }

-- ** V1ContainerStateWaiting
-- | V1ContainerStateWaiting
-- ContainerStateWaiting is a waiting state of a container.
data V1ContainerStateWaiting = V1ContainerStateWaiting
  { v1ContainerStateWaitingMessage :: !(Maybe Text) -- ^ "message" - Message regarding why the container is not yet running.
  , v1ContainerStateWaitingReason :: !(Maybe Text) -- ^ "reason" - (brief) reason the container is not yet running.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ContainerStateWaiting
instance A.FromJSON V1ContainerStateWaiting where
  parseJSON = A.withObject "V1ContainerStateWaiting" $ \o ->
    V1ContainerStateWaiting
      <$> (o .:? "message")
      <*> (o .:? "reason")

-- | ToJSON V1ContainerStateWaiting
instance A.ToJSON V1ContainerStateWaiting where
  toJSON V1ContainerStateWaiting {..} =
   _omitNulls
      [ "message" .= v1ContainerStateWaitingMessage
      , "reason" .= v1ContainerStateWaitingReason
      ]


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

-- ** V1ContainerStatus
-- | V1ContainerStatus
-- ContainerStatus contains details for the current status of this container.
data V1ContainerStatus = V1ContainerStatus
  { v1ContainerStatusContainerId :: !(Maybe Text) -- ^ "containerID" - Container&#39;s ID in the format &#39;docker://&lt;container_id&gt;&#39;.
  , v1ContainerStatusImage :: !(Text) -- ^ /Required/ "image" - The image the container is running. More info: https://kubernetes.io/docs/concepts/containers/images
  , v1ContainerStatusImageId :: !(Text) -- ^ /Required/ "imageID" - ImageID of the container&#39;s image.
  , v1ContainerStatusLastState :: !(Maybe V1ContainerState) -- ^ "lastState"
  , v1ContainerStatusName :: !(Text) -- ^ /Required/ "name" - This must be a DNS_LABEL. Each container in a pod must have a unique name. Cannot be updated.
  , v1ContainerStatusReady :: !(Bool) -- ^ /Required/ "ready" - Specifies whether the container has passed its readiness probe.
  , v1ContainerStatusRestartCount :: !(Int) -- ^ /Required/ "restartCount" - The number of times the container has been restarted, currently based on the number of dead containers that have not yet been removed. Note that this is calculated from dead containers. But those containers are subject to garbage collection. This value will get capped at 5 by GC.
  , v1ContainerStatusState :: !(Maybe V1ContainerState) -- ^ "state"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ContainerStatus
instance A.FromJSON V1ContainerStatus where
  parseJSON = A.withObject "V1ContainerStatus" $ \o ->
    V1ContainerStatus
      <$> (o .:? "containerID")
      <*> (o .:  "image")
      <*> (o .:  "imageID")
      <*> (o .:? "lastState")
      <*> (o .:  "name")
      <*> (o .:  "ready")
      <*> (o .:  "restartCount")
      <*> (o .:? "state")

-- | ToJSON V1ContainerStatus
instance A.ToJSON V1ContainerStatus where
  toJSON V1ContainerStatus {..} =
   _omitNulls
      [ "containerID" .= v1ContainerStatusContainerId
      , "image" .= v1ContainerStatusImage
      , "imageID" .= v1ContainerStatusImageId
      , "lastState" .= v1ContainerStatusLastState
      , "name" .= v1ContainerStatusName
      , "ready" .= v1ContainerStatusReady
      , "restartCount" .= v1ContainerStatusRestartCount
      , "state" .= v1ContainerStatusState
      ]


-- | Construct a value of type 'V1ContainerStatus' (by applying it's required fields, if any)
mkV1ContainerStatus
  :: Text -- ^ 'v1ContainerStatusImage': The image the container is running. More info: https://kubernetes.io/docs/concepts/containers/images
  -> Text -- ^ 'v1ContainerStatusImageId': ImageID of the container's image.
  -> Text -- ^ 'v1ContainerStatusName': This must be a DNS_LABEL. Each container in a pod must have a unique name. Cannot be updated.
  -> Bool -- ^ 'v1ContainerStatusReady': Specifies whether the container has passed its readiness probe.
  -> Int -- ^ 'v1ContainerStatusRestartCount': The number of times the container has been restarted, currently based on the number of dead containers that have not yet been removed. Note that this is calculated from dead containers. But those containers are subject to garbage collection. This value will get capped at 5 by GC.
  -> V1ContainerStatus
mkV1ContainerStatus v1ContainerStatusImage v1ContainerStatusImageId v1ContainerStatusName v1ContainerStatusReady v1ContainerStatusRestartCount =
  V1ContainerStatus
  { v1ContainerStatusContainerId = Nothing
  , v1ContainerStatusImage
  , v1ContainerStatusImageId
  , v1ContainerStatusLastState = Nothing
  , v1ContainerStatusName
  , v1ContainerStatusReady
  , v1ContainerStatusRestartCount
  , v1ContainerStatusState = 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
  { 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/api-conventions.md#resources
  , v1ControllerRevisionData :: !(Maybe RuntimeRawExtension) -- ^ "data"
  , 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/api-conventions.md#types-kinds
  , v1ControllerRevisionMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1ControllerRevisionRevision :: !(Integer) -- ^ /Required/ "revision" - Revision indicates the revision of the state represented by Data.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ControllerRevision
instance A.FromJSON V1ControllerRevision where
  parseJSON = A.withObject "V1ControllerRevision" $ \o ->
    V1ControllerRevision
      <$> (o .:? "apiVersion")
      <*> (o .:? "data")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:  "revision")

-- | ToJSON V1ControllerRevision
instance A.ToJSON V1ControllerRevision where
  toJSON V1ControllerRevision {..} =
   _omitNulls
      [ "apiVersion" .= v1ControllerRevisionApiVersion
      , "data" .= v1ControllerRevisionData
      , "kind" .= v1ControllerRevisionKind
      , "metadata" .= v1ControllerRevisionMetadata
      , "revision" .= 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 v1ControllerRevisionRevision =
  V1ControllerRevision
  { v1ControllerRevisionApiVersion = Nothing
  , v1ControllerRevisionData = Nothing
  , v1ControllerRevisionKind = Nothing
  , v1ControllerRevisionMetadata = Nothing
  , v1ControllerRevisionRevision
  }

-- ** V1ControllerRevisionList
-- | V1ControllerRevisionList
-- ControllerRevisionList is a resource containing a list of ControllerRevision objects.
data V1ControllerRevisionList = V1ControllerRevisionList
  { 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/api-conventions.md#resources
  , v1ControllerRevisionListItems :: !([V1ControllerRevision]) -- ^ /Required/ "items" - Items is the list of ControllerRevisions
  , 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/api-conventions.md#types-kinds
  , v1ControllerRevisionListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ControllerRevisionList
instance A.FromJSON V1ControllerRevisionList where
  parseJSON = A.withObject "V1ControllerRevisionList" $ \o ->
    V1ControllerRevisionList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1ControllerRevisionList
instance A.ToJSON V1ControllerRevisionList where
  toJSON V1ControllerRevisionList {..} =
   _omitNulls
      [ "apiVersion" .= v1ControllerRevisionListApiVersion
      , "items" .= v1ControllerRevisionListItems
      , "kind" .= v1ControllerRevisionListKind
      , "metadata" .= 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 v1ControllerRevisionListItems =
  V1ControllerRevisionList
  { v1ControllerRevisionListApiVersion = Nothing
  , v1ControllerRevisionListItems
  , v1ControllerRevisionListKind = Nothing
  , v1ControllerRevisionListMetadata = Nothing
  }

-- ** V1CrossVersionObjectReference
-- | V1CrossVersionObjectReference
-- CrossVersionObjectReference contains enough information to let you identify the referred resource.
data V1CrossVersionObjectReference = V1CrossVersionObjectReference
  { v1CrossVersionObjectReferenceApiVersion :: !(Maybe Text) -- ^ "apiVersion" - API version of the referent
  , v1CrossVersionObjectReferenceKind :: !(Text) -- ^ /Required/ "kind" - Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds\&quot;
  , v1CrossVersionObjectReferenceName :: !(Text) -- ^ /Required/ "name" - Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1CrossVersionObjectReference
instance A.FromJSON V1CrossVersionObjectReference where
  parseJSON = A.withObject "V1CrossVersionObjectReference" $ \o ->
    V1CrossVersionObjectReference
      <$> (o .:? "apiVersion")
      <*> (o .:  "kind")
      <*> (o .:  "name")

-- | ToJSON V1CrossVersionObjectReference
instance A.ToJSON V1CrossVersionObjectReference where
  toJSON V1CrossVersionObjectReference {..} =
   _omitNulls
      [ "apiVersion" .= v1CrossVersionObjectReferenceApiVersion
      , "kind" .= v1CrossVersionObjectReferenceKind
      , "name" .= v1CrossVersionObjectReferenceName
      ]


-- | Construct a value of type 'V1CrossVersionObjectReference' (by applying it's required fields, if any)
mkV1CrossVersionObjectReference
  :: Text -- ^ 'v1CrossVersionObjectReferenceKind': Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds\"
  -> Text -- ^ 'v1CrossVersionObjectReferenceName': Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
  -> V1CrossVersionObjectReference
mkV1CrossVersionObjectReference v1CrossVersionObjectReferenceKind v1CrossVersionObjectReferenceName =
  V1CrossVersionObjectReference
  { v1CrossVersionObjectReferenceApiVersion = Nothing
  , v1CrossVersionObjectReferenceKind
  , v1CrossVersionObjectReferenceName
  }

-- ** V1DaemonEndpoint
-- | V1DaemonEndpoint
-- DaemonEndpoint contains information about a single Daemon endpoint.
data V1DaemonEndpoint = V1DaemonEndpoint
  { v1DaemonEndpointPort :: !(Int) -- ^ /Required/ "Port" - Port number of the given endpoint.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1DaemonEndpoint
instance A.FromJSON V1DaemonEndpoint where
  parseJSON = A.withObject "V1DaemonEndpoint" $ \o ->
    V1DaemonEndpoint
      <$> (o .:  "Port")

-- | ToJSON V1DaemonEndpoint
instance A.ToJSON V1DaemonEndpoint where
  toJSON V1DaemonEndpoint {..} =
   _omitNulls
      [ "Port" .= 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 v1DaemonEndpointPort =
  V1DaemonEndpoint
  { v1DaemonEndpointPort
  }

-- ** V1DaemonSet
-- | V1DaemonSet
-- DaemonSet represents the configuration of a daemon set.
data V1DaemonSet = V1DaemonSet
  { 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1DaemonSetMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1DaemonSetSpec :: !(Maybe V1DaemonSetSpec) -- ^ "spec"
  , v1DaemonSetStatus :: !(Maybe V1DaemonSetStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1DaemonSet
instance A.FromJSON V1DaemonSet where
  parseJSON = A.withObject "V1DaemonSet" $ \o ->
    V1DaemonSet
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON V1DaemonSet
instance A.ToJSON V1DaemonSet where
  toJSON V1DaemonSet {..} =
   _omitNulls
      [ "apiVersion" .= v1DaemonSetApiVersion
      , "kind" .= v1DaemonSetKind
      , "metadata" .= v1DaemonSetMetadata
      , "spec" .= v1DaemonSetSpec
      , "status" .= v1DaemonSetStatus
      ]


-- | Construct a value of type 'V1DaemonSet' (by applying it's required fields, if any)
mkV1DaemonSet
  :: V1DaemonSet
mkV1DaemonSet =
  V1DaemonSet
  { v1DaemonSetApiVersion = Nothing
  , v1DaemonSetKind = Nothing
  , v1DaemonSetMetadata = Nothing
  , v1DaemonSetSpec = Nothing
  , v1DaemonSetStatus = Nothing
  }

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

-- | FromJSON V1DaemonSetCondition
instance A.FromJSON V1DaemonSetCondition where
  parseJSON = A.withObject "V1DaemonSetCondition" $ \o ->
    V1DaemonSetCondition
      <$> (o .:? "lastTransitionTime")
      <*> (o .:? "message")
      <*> (o .:? "reason")
      <*> (o .:  "status")
      <*> (o .:  "type")

-- | ToJSON V1DaemonSetCondition
instance A.ToJSON V1DaemonSetCondition where
  toJSON V1DaemonSetCondition {..} =
   _omitNulls
      [ "lastTransitionTime" .= v1DaemonSetConditionLastTransitionTime
      , "message" .= v1DaemonSetConditionMessage
      , "reason" .= v1DaemonSetConditionReason
      , "status" .= v1DaemonSetConditionStatus
      , "type" .= 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 v1DaemonSetConditionStatus v1DaemonSetConditionType =
  V1DaemonSetCondition
  { v1DaemonSetConditionLastTransitionTime = Nothing
  , v1DaemonSetConditionMessage = Nothing
  , v1DaemonSetConditionReason = Nothing
  , v1DaemonSetConditionStatus
  , v1DaemonSetConditionType
  }

-- ** V1DaemonSetList
-- | V1DaemonSetList
-- DaemonSetList is a collection of daemon sets.
data V1DaemonSetList = V1DaemonSetList
  { 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/api-conventions.md#resources
  , v1DaemonSetListItems :: !([V1DaemonSet]) -- ^ /Required/ "items" - A list of daemon sets.
  , 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/api-conventions.md#types-kinds
  , v1DaemonSetListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1DaemonSetList
instance A.FromJSON V1DaemonSetList where
  parseJSON = A.withObject "V1DaemonSetList" $ \o ->
    V1DaemonSetList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1DaemonSetList
instance A.ToJSON V1DaemonSetList where
  toJSON V1DaemonSetList {..} =
   _omitNulls
      [ "apiVersion" .= v1DaemonSetListApiVersion
      , "items" .= v1DaemonSetListItems
      , "kind" .= v1DaemonSetListKind
      , "metadata" .= 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 v1DaemonSetListItems =
  V1DaemonSetList
  { v1DaemonSetListApiVersion = Nothing
  , v1DaemonSetListItems
  , v1DaemonSetListKind = Nothing
  , v1DaemonSetListMetadata = Nothing
  }

-- ** V1DaemonSetSpec
-- | V1DaemonSetSpec
-- DaemonSetSpec is the specification of a daemon set.
data V1DaemonSetSpec = V1DaemonSetSpec
  { 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).
  , 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.
  , v1DaemonSetSpecSelector :: !(V1LabelSelector) -- ^ /Required/ "selector"
  , v1DaemonSetSpecTemplate :: !(V1PodTemplateSpec) -- ^ /Required/ "template"
  , v1DaemonSetSpecUpdateStrategy :: !(Maybe V1DaemonSetUpdateStrategy) -- ^ "updateStrategy"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1DaemonSetSpec
instance A.FromJSON V1DaemonSetSpec where
  parseJSON = A.withObject "V1DaemonSetSpec" $ \o ->
    V1DaemonSetSpec
      <$> (o .:? "minReadySeconds")
      <*> (o .:? "revisionHistoryLimit")
      <*> (o .:  "selector")
      <*> (o .:  "template")
      <*> (o .:? "updateStrategy")

-- | ToJSON V1DaemonSetSpec
instance A.ToJSON V1DaemonSetSpec where
  toJSON V1DaemonSetSpec {..} =
   _omitNulls
      [ "minReadySeconds" .= v1DaemonSetSpecMinReadySeconds
      , "revisionHistoryLimit" .= v1DaemonSetSpecRevisionHistoryLimit
      , "selector" .= v1DaemonSetSpecSelector
      , "template" .= v1DaemonSetSpecTemplate
      , "updateStrategy" .= v1DaemonSetSpecUpdateStrategy
      ]


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

-- ** V1DaemonSetStatus
-- | V1DaemonSetStatus
-- DaemonSetStatus represents the current status of a daemon set.
data V1DaemonSetStatus = V1DaemonSetStatus
  { 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.
  , v1DaemonSetStatusConditions :: !(Maybe [V1DaemonSetCondition]) -- ^ "conditions" - Represents the latest available observations of a DaemonSet&#39;s current state.
  , 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/
  , 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/
  , 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)
  , 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/
  , v1DaemonSetStatusNumberReady :: !(Int) -- ^ /Required/ "numberReady" - The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready.
  , 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)
  , v1DaemonSetStatusObservedGeneration :: !(Maybe Integer) -- ^ "observedGeneration" - The most recent generation observed by the daemon set controller.
  , v1DaemonSetStatusUpdatedNumberScheduled :: !(Maybe Int) -- ^ "updatedNumberScheduled" - The total number of nodes that are running updated daemon pod
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1DaemonSetStatus
instance A.FromJSON V1DaemonSetStatus where
  parseJSON = A.withObject "V1DaemonSetStatus" $ \o ->
    V1DaemonSetStatus
      <$> (o .:? "collisionCount")
      <*> (o .:? "conditions")
      <*> (o .:  "currentNumberScheduled")
      <*> (o .:  "desiredNumberScheduled")
      <*> (o .:? "numberAvailable")
      <*> (o .:  "numberMisscheduled")
      <*> (o .:  "numberReady")
      <*> (o .:? "numberUnavailable")
      <*> (o .:? "observedGeneration")
      <*> (o .:? "updatedNumberScheduled")

-- | ToJSON V1DaemonSetStatus
instance A.ToJSON V1DaemonSetStatus where
  toJSON V1DaemonSetStatus {..} =
   _omitNulls
      [ "collisionCount" .= v1DaemonSetStatusCollisionCount
      , "conditions" .= v1DaemonSetStatusConditions
      , "currentNumberScheduled" .= v1DaemonSetStatusCurrentNumberScheduled
      , "desiredNumberScheduled" .= v1DaemonSetStatusDesiredNumberScheduled
      , "numberAvailable" .= v1DaemonSetStatusNumberAvailable
      , "numberMisscheduled" .= v1DaemonSetStatusNumberMisscheduled
      , "numberReady" .= v1DaemonSetStatusNumberReady
      , "numberUnavailable" .= v1DaemonSetStatusNumberUnavailable
      , "observedGeneration" .= v1DaemonSetStatusObservedGeneration
      , "updatedNumberScheduled" .= 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': The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready.
  -> V1DaemonSetStatus
mkV1DaemonSetStatus v1DaemonSetStatusCurrentNumberScheduled v1DaemonSetStatusDesiredNumberScheduled v1DaemonSetStatusNumberMisscheduled v1DaemonSetStatusNumberReady =
  V1DaemonSetStatus
  { v1DaemonSetStatusCollisionCount = Nothing
  , v1DaemonSetStatusConditions = Nothing
  , v1DaemonSetStatusCurrentNumberScheduled
  , v1DaemonSetStatusDesiredNumberScheduled
  , v1DaemonSetStatusNumberAvailable = Nothing
  , v1DaemonSetStatusNumberMisscheduled
  , v1DaemonSetStatusNumberReady
  , v1DaemonSetStatusNumberUnavailable = Nothing
  , v1DaemonSetStatusObservedGeneration = Nothing
  , v1DaemonSetStatusUpdatedNumberScheduled = Nothing
  }

-- ** V1DaemonSetUpdateStrategy
-- | V1DaemonSetUpdateStrategy
-- DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.
data V1DaemonSetUpdateStrategy = V1DaemonSetUpdateStrategy
  { v1DaemonSetUpdateStrategyRollingUpdate :: !(Maybe V1RollingUpdateDaemonSet) -- ^ "rollingUpdate"
  , v1DaemonSetUpdateStrategyType :: !(Maybe Text) -- ^ "type" - Type of daemon set update. Can be \&quot;RollingUpdate\&quot; or \&quot;OnDelete\&quot;. Default is RollingUpdate.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1DaemonSetUpdateStrategy
instance A.FromJSON V1DaemonSetUpdateStrategy where
  parseJSON = A.withObject "V1DaemonSetUpdateStrategy" $ \o ->
    V1DaemonSetUpdateStrategy
      <$> (o .:? "rollingUpdate")
      <*> (o .:? "type")

-- | ToJSON V1DaemonSetUpdateStrategy
instance A.ToJSON V1DaemonSetUpdateStrategy where
  toJSON V1DaemonSetUpdateStrategy {..} =
   _omitNulls
      [ "rollingUpdate" .= v1DaemonSetUpdateStrategyRollingUpdate
      , "type" .= v1DaemonSetUpdateStrategyType
      ]


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

-- ** V1DeleteOptions
-- | V1DeleteOptions
-- DeleteOptions may be provided when deleting an API object.
data V1DeleteOptions = V1DeleteOptions
  { 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/api-conventions.md#resources
  , 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
  , 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.
  , 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/api-conventions.md#types-kinds
  , 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.
  , v1DeleteOptionsPreconditions :: !(Maybe V1Preconditions) -- ^ "preconditions"
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1DeleteOptions
instance A.FromJSON V1DeleteOptions where
  parseJSON = A.withObject "V1DeleteOptions" $ \o ->
    V1DeleteOptions
      <$> (o .:? "apiVersion")
      <*> (o .:? "dryRun")
      <*> (o .:? "gracePeriodSeconds")
      <*> (o .:? "kind")
      <*> (o .:? "orphanDependents")
      <*> (o .:? "preconditions")
      <*> (o .:? "propagationPolicy")

-- | ToJSON V1DeleteOptions
instance A.ToJSON V1DeleteOptions where
  toJSON V1DeleteOptions {..} =
   _omitNulls
      [ "apiVersion" .= v1DeleteOptionsApiVersion
      , "dryRun" .= v1DeleteOptionsDryRun
      , "gracePeriodSeconds" .= v1DeleteOptionsGracePeriodSeconds
      , "kind" .= v1DeleteOptionsKind
      , "orphanDependents" .= v1DeleteOptionsOrphanDependents
      , "preconditions" .= v1DeleteOptionsPreconditions
      , "propagationPolicy" .= v1DeleteOptionsPropagationPolicy
      ]


-- | Construct a value of type 'V1DeleteOptions' (by applying it's required fields, if any)
mkV1DeleteOptions
  :: V1DeleteOptions
mkV1DeleteOptions =
  V1DeleteOptions
  { v1DeleteOptionsApiVersion = Nothing
  , v1DeleteOptionsDryRun = Nothing
  , v1DeleteOptionsGracePeriodSeconds = Nothing
  , v1DeleteOptionsKind = Nothing
  , v1DeleteOptionsOrphanDependents = Nothing
  , v1DeleteOptionsPreconditions = Nothing
  , v1DeleteOptionsPropagationPolicy = Nothing
  }

-- ** V1Deployment
-- | V1Deployment
-- Deployment enables declarative updates for Pods and ReplicaSets.
data V1Deployment = V1Deployment
  { 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1DeploymentMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1DeploymentSpec :: !(Maybe V1DeploymentSpec) -- ^ "spec"
  , v1DeploymentStatus :: !(Maybe V1DeploymentStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1Deployment
instance A.FromJSON V1Deployment where
  parseJSON = A.withObject "V1Deployment" $ \o ->
    V1Deployment
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON V1Deployment
instance A.ToJSON V1Deployment where
  toJSON V1Deployment {..} =
   _omitNulls
      [ "apiVersion" .= v1DeploymentApiVersion
      , "kind" .= v1DeploymentKind
      , "metadata" .= v1DeploymentMetadata
      , "spec" .= v1DeploymentSpec
      , "status" .= v1DeploymentStatus
      ]


-- | Construct a value of type 'V1Deployment' (by applying it's required fields, if any)
mkV1Deployment
  :: V1Deployment
mkV1Deployment =
  V1Deployment
  { v1DeploymentApiVersion = Nothing
  , v1DeploymentKind = Nothing
  , v1DeploymentMetadata = Nothing
  , v1DeploymentSpec = Nothing
  , v1DeploymentStatus = Nothing
  }

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

-- | FromJSON V1DeploymentCondition
instance A.FromJSON V1DeploymentCondition where
  parseJSON = A.withObject "V1DeploymentCondition" $ \o ->
    V1DeploymentCondition
      <$> (o .:? "lastTransitionTime")
      <*> (o .:? "lastUpdateTime")
      <*> (o .:? "message")
      <*> (o .:? "reason")
      <*> (o .:  "status")
      <*> (o .:  "type")

-- | ToJSON V1DeploymentCondition
instance A.ToJSON V1DeploymentCondition where
  toJSON V1DeploymentCondition {..} =
   _omitNulls
      [ "lastTransitionTime" .= v1DeploymentConditionLastTransitionTime
      , "lastUpdateTime" .= v1DeploymentConditionLastUpdateTime
      , "message" .= v1DeploymentConditionMessage
      , "reason" .= v1DeploymentConditionReason
      , "status" .= v1DeploymentConditionStatus
      , "type" .= 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 v1DeploymentConditionStatus v1DeploymentConditionType =
  V1DeploymentCondition
  { v1DeploymentConditionLastTransitionTime = Nothing
  , v1DeploymentConditionLastUpdateTime = Nothing
  , v1DeploymentConditionMessage = Nothing
  , v1DeploymentConditionReason = Nothing
  , v1DeploymentConditionStatus
  , v1DeploymentConditionType
  }

-- ** V1DeploymentList
-- | V1DeploymentList
-- DeploymentList is a list of Deployments.
data V1DeploymentList = V1DeploymentList
  { 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/api-conventions.md#resources
  , v1DeploymentListItems :: !([V1Deployment]) -- ^ /Required/ "items" - Items is the list of Deployments.
  , 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/api-conventions.md#types-kinds
  , v1DeploymentListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1DeploymentList
instance A.FromJSON V1DeploymentList where
  parseJSON = A.withObject "V1DeploymentList" $ \o ->
    V1DeploymentList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1DeploymentList
instance A.ToJSON V1DeploymentList where
  toJSON V1DeploymentList {..} =
   _omitNulls
      [ "apiVersion" .= v1DeploymentListApiVersion
      , "items" .= v1DeploymentListItems
      , "kind" .= v1DeploymentListKind
      , "metadata" .= 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 v1DeploymentListItems =
  V1DeploymentList
  { v1DeploymentListApiVersion = Nothing
  , v1DeploymentListItems
  , v1DeploymentListKind = Nothing
  , v1DeploymentListMetadata = Nothing
  }

-- ** V1DeploymentSpec
-- | V1DeploymentSpec
-- DeploymentSpec is the specification of the desired behavior of the Deployment.
data V1DeploymentSpec = V1DeploymentSpec
  { 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)
  , v1DeploymentSpecPaused :: !(Maybe Bool) -- ^ "paused" - Indicates that the deployment is paused.
  , 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.
  , v1DeploymentSpecReplicas :: !(Maybe Int) -- ^ "replicas" - Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.
  , 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.
  , v1DeploymentSpecSelector :: !(V1LabelSelector) -- ^ /Required/ "selector"
  , v1DeploymentSpecStrategy :: !(Maybe V1DeploymentStrategy) -- ^ "strategy"
  , v1DeploymentSpecTemplate :: !(V1PodTemplateSpec) -- ^ /Required/ "template"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1DeploymentSpec
instance A.FromJSON V1DeploymentSpec where
  parseJSON = A.withObject "V1DeploymentSpec" $ \o ->
    V1DeploymentSpec
      <$> (o .:? "minReadySeconds")
      <*> (o .:? "paused")
      <*> (o .:? "progressDeadlineSeconds")
      <*> (o .:? "replicas")
      <*> (o .:? "revisionHistoryLimit")
      <*> (o .:  "selector")
      <*> (o .:? "strategy")
      <*> (o .:  "template")

-- | ToJSON V1DeploymentSpec
instance A.ToJSON V1DeploymentSpec where
  toJSON V1DeploymentSpec {..} =
   _omitNulls
      [ "minReadySeconds" .= v1DeploymentSpecMinReadySeconds
      , "paused" .= v1DeploymentSpecPaused
      , "progressDeadlineSeconds" .= v1DeploymentSpecProgressDeadlineSeconds
      , "replicas" .= v1DeploymentSpecReplicas
      , "revisionHistoryLimit" .= v1DeploymentSpecRevisionHistoryLimit
      , "selector" .= v1DeploymentSpecSelector
      , "strategy" .= v1DeploymentSpecStrategy
      , "template" .= v1DeploymentSpecTemplate
      ]


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

-- ** V1DeploymentStatus
-- | V1DeploymentStatus
-- DeploymentStatus is the most recently observed status of the Deployment.
data V1DeploymentStatus = V1DeploymentStatus
  { v1DeploymentStatusAvailableReplicas :: !(Maybe Int) -- ^ "availableReplicas" - Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
  , 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.
  , v1DeploymentStatusConditions :: !(Maybe [V1DeploymentCondition]) -- ^ "conditions" - Represents the latest available observations of a deployment&#39;s current state.
  , v1DeploymentStatusObservedGeneration :: !(Maybe Integer) -- ^ "observedGeneration" - The generation observed by the deployment controller.
  , v1DeploymentStatusReadyReplicas :: !(Maybe Int) -- ^ "readyReplicas" - Total number of ready pods targeted by this deployment.
  , v1DeploymentStatusReplicas :: !(Maybe Int) -- ^ "replicas" - Total number of non-terminated pods targeted by this deployment (their labels match the selector).
  , 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.
  , v1DeploymentStatusUpdatedReplicas :: !(Maybe Int) -- ^ "updatedReplicas" - Total number of non-terminated pods targeted by this deployment that have the desired template spec.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1DeploymentStatus
instance A.FromJSON V1DeploymentStatus where
  parseJSON = A.withObject "V1DeploymentStatus" $ \o ->
    V1DeploymentStatus
      <$> (o .:? "availableReplicas")
      <*> (o .:? "collisionCount")
      <*> (o .:? "conditions")
      <*> (o .:? "observedGeneration")
      <*> (o .:? "readyReplicas")
      <*> (o .:? "replicas")
      <*> (o .:? "unavailableReplicas")
      <*> (o .:? "updatedReplicas")

-- | ToJSON V1DeploymentStatus
instance A.ToJSON V1DeploymentStatus where
  toJSON V1DeploymentStatus {..} =
   _omitNulls
      [ "availableReplicas" .= v1DeploymentStatusAvailableReplicas
      , "collisionCount" .= v1DeploymentStatusCollisionCount
      , "conditions" .= v1DeploymentStatusConditions
      , "observedGeneration" .= v1DeploymentStatusObservedGeneration
      , "readyReplicas" .= v1DeploymentStatusReadyReplicas
      , "replicas" .= v1DeploymentStatusReplicas
      , "unavailableReplicas" .= v1DeploymentStatusUnavailableReplicas
      , "updatedReplicas" .= v1DeploymentStatusUpdatedReplicas
      ]


-- | Construct a value of type 'V1DeploymentStatus' (by applying it's required fields, if any)
mkV1DeploymentStatus
  :: V1DeploymentStatus
mkV1DeploymentStatus =
  V1DeploymentStatus
  { v1DeploymentStatusAvailableReplicas = Nothing
  , v1DeploymentStatusCollisionCount = Nothing
  , v1DeploymentStatusConditions = Nothing
  , v1DeploymentStatusObservedGeneration = Nothing
  , v1DeploymentStatusReadyReplicas = Nothing
  , v1DeploymentStatusReplicas = Nothing
  , v1DeploymentStatusUnavailableReplicas = Nothing
  , v1DeploymentStatusUpdatedReplicas = Nothing
  }

-- ** V1DeploymentStrategy
-- | V1DeploymentStrategy
-- DeploymentStrategy describes how to replace existing pods with new ones.
data V1DeploymentStrategy = V1DeploymentStrategy
  { v1DeploymentStrategyRollingUpdate :: !(Maybe V1RollingUpdateDeployment) -- ^ "rollingUpdate"
  , v1DeploymentStrategyType :: !(Maybe Text) -- ^ "type" - Type of deployment. Can be \&quot;Recreate\&quot; or \&quot;RollingUpdate\&quot;. Default is RollingUpdate.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1DeploymentStrategy
instance A.FromJSON V1DeploymentStrategy where
  parseJSON = A.withObject "V1DeploymentStrategy" $ \o ->
    V1DeploymentStrategy
      <$> (o .:? "rollingUpdate")
      <*> (o .:? "type")

-- | ToJSON V1DeploymentStrategy
instance A.ToJSON V1DeploymentStrategy where
  toJSON V1DeploymentStrategy {..} =
   _omitNulls
      [ "rollingUpdate" .= v1DeploymentStrategyRollingUpdate
      , "type" .= v1DeploymentStrategyType
      ]


-- | Construct a value of type 'V1DeploymentStrategy' (by applying it's required fields, if any)
mkV1DeploymentStrategy
  :: V1DeploymentStrategy
mkV1DeploymentStrategy =
  V1DeploymentStrategy
  { v1DeploymentStrategyRollingUpdate = Nothing
  , v1DeploymentStrategyType = 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
  { v1DownwardAPIProjectionItems :: !(Maybe [V1DownwardAPIVolumeFile]) -- ^ "items" - Items is a list of DownwardAPIVolume file
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1DownwardAPIProjection
instance A.FromJSON V1DownwardAPIProjection where
  parseJSON = A.withObject "V1DownwardAPIProjection" $ \o ->
    V1DownwardAPIProjection
      <$> (o .:? "items")

-- | ToJSON V1DownwardAPIProjection
instance A.ToJSON V1DownwardAPIProjection where
  toJSON V1DownwardAPIProjection {..} =
   _omitNulls
      [ "items" .= v1DownwardAPIProjectionItems
      ]


-- | Construct a value of type 'V1DownwardAPIProjection' (by applying it's required fields, if any)
mkV1DownwardAPIProjection
  :: V1DownwardAPIProjection
mkV1DownwardAPIProjection =
  V1DownwardAPIProjection
  { v1DownwardAPIProjectionItems = Nothing
  }

-- ** V1DownwardAPIVolumeFile
-- | V1DownwardAPIVolumeFile
-- DownwardAPIVolumeFile represents information to create the file containing the pod field
data V1DownwardAPIVolumeFile = V1DownwardAPIVolumeFile
  { v1DownwardAPIVolumeFileFieldRef :: !(Maybe V1ObjectFieldSelector) -- ^ "fieldRef"
  , v1DownwardAPIVolumeFileMode :: !(Maybe Int) -- ^ "mode" - Optional: mode bits to use on this file, must be a value between 0 and 0777. 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.
  , 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;
  , v1DownwardAPIVolumeFileResourceFieldRef :: !(Maybe V1ResourceFieldSelector) -- ^ "resourceFieldRef"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1DownwardAPIVolumeFile
instance A.FromJSON V1DownwardAPIVolumeFile where
  parseJSON = A.withObject "V1DownwardAPIVolumeFile" $ \o ->
    V1DownwardAPIVolumeFile
      <$> (o .:? "fieldRef")
      <*> (o .:? "mode")
      <*> (o .:  "path")
      <*> (o .:? "resourceFieldRef")

-- | ToJSON V1DownwardAPIVolumeFile
instance A.ToJSON V1DownwardAPIVolumeFile where
  toJSON V1DownwardAPIVolumeFile {..} =
   _omitNulls
      [ "fieldRef" .= v1DownwardAPIVolumeFileFieldRef
      , "mode" .= v1DownwardAPIVolumeFileMode
      , "path" .= v1DownwardAPIVolumeFilePath
      , "resourceFieldRef" .= 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 v1DownwardAPIVolumeFilePath =
  V1DownwardAPIVolumeFile
  { v1DownwardAPIVolumeFileFieldRef = Nothing
  , v1DownwardAPIVolumeFileMode = Nothing
  , v1DownwardAPIVolumeFilePath
  , v1DownwardAPIVolumeFileResourceFieldRef = Nothing
  }

-- ** V1DownwardAPIVolumeSource
-- | V1DownwardAPIVolumeSource
-- DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.
data V1DownwardAPIVolumeSource = V1DownwardAPIVolumeSource
  { v1DownwardAPIVolumeSourceDefaultMode :: !(Maybe Int) -- ^ "defaultMode" - Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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.
  , v1DownwardAPIVolumeSourceItems :: !(Maybe [V1DownwardAPIVolumeFile]) -- ^ "items" - Items is a list of downward API volume file
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1DownwardAPIVolumeSource
instance A.FromJSON V1DownwardAPIVolumeSource where
  parseJSON = A.withObject "V1DownwardAPIVolumeSource" $ \o ->
    V1DownwardAPIVolumeSource
      <$> (o .:? "defaultMode")
      <*> (o .:? "items")

-- | ToJSON V1DownwardAPIVolumeSource
instance A.ToJSON V1DownwardAPIVolumeSource where
  toJSON V1DownwardAPIVolumeSource {..} =
   _omitNulls
      [ "defaultMode" .= v1DownwardAPIVolumeSourceDefaultMode
      , "items" .= v1DownwardAPIVolumeSourceItems
      ]


-- | Construct a value of type 'V1DownwardAPIVolumeSource' (by applying it's required fields, if any)
mkV1DownwardAPIVolumeSource
  :: V1DownwardAPIVolumeSource
mkV1DownwardAPIVolumeSource =
  V1DownwardAPIVolumeSource
  { v1DownwardAPIVolumeSourceDefaultMode = Nothing
  , v1DownwardAPIVolumeSourceItems = Nothing
  }

-- ** V1EmptyDirVolumeSource
-- | V1EmptyDirVolumeSource
-- Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling.
data V1EmptyDirVolumeSource = V1EmptyDirVolumeSource
  { v1EmptyDirVolumeSourceMedium :: !(Maybe Text) -- ^ "medium" - 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
  , v1EmptyDirVolumeSourceSizeLimit :: !(Maybe Quantity) -- ^ "sizeLimit"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1EmptyDirVolumeSource
instance A.FromJSON V1EmptyDirVolumeSource where
  parseJSON = A.withObject "V1EmptyDirVolumeSource" $ \o ->
    V1EmptyDirVolumeSource
      <$> (o .:? "medium")
      <*> (o .:? "sizeLimit")

-- | ToJSON V1EmptyDirVolumeSource
instance A.ToJSON V1EmptyDirVolumeSource where
  toJSON V1EmptyDirVolumeSource {..} =
   _omitNulls
      [ "medium" .= v1EmptyDirVolumeSourceMedium
      , "sizeLimit" .= v1EmptyDirVolumeSourceSizeLimit
      ]


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

-- ** V1EndpointAddress
-- | V1EndpointAddress
-- EndpointAddress is a tuple that describes single IP address.
data V1EndpointAddress = V1EndpointAddress
  { v1EndpointAddressHostname :: !(Maybe Text) -- ^ "hostname" - The Hostname of this endpoint
  , v1EndpointAddressIp :: !(Text) -- ^ /Required/ "ip" - The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). IPv6 is also accepted but not fully supported on all platforms. Also, certain kubernetes components, like kube-proxy, are not IPv6 ready.
  , v1EndpointAddressNodeName :: !(Maybe Text) -- ^ "nodeName" - Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.
  , v1EndpointAddressTargetRef :: !(Maybe V1ObjectReference) -- ^ "targetRef"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1EndpointAddress
instance A.FromJSON V1EndpointAddress where
  parseJSON = A.withObject "V1EndpointAddress" $ \o ->
    V1EndpointAddress
      <$> (o .:? "hostname")
      <*> (o .:  "ip")
      <*> (o .:? "nodeName")
      <*> (o .:? "targetRef")

-- | ToJSON V1EndpointAddress
instance A.ToJSON V1EndpointAddress where
  toJSON V1EndpointAddress {..} =
   _omitNulls
      [ "hostname" .= v1EndpointAddressHostname
      , "ip" .= v1EndpointAddressIp
      , "nodeName" .= v1EndpointAddressNodeName
      , "targetRef" .= 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), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). IPv6 is also accepted but not fully supported on all platforms. Also, certain kubernetes components, like kube-proxy, are not IPv6 ready.
  -> V1EndpointAddress
mkV1EndpointAddress v1EndpointAddressIp =
  V1EndpointAddress
  { v1EndpointAddressHostname = Nothing
  , v1EndpointAddressIp
  , v1EndpointAddressNodeName = Nothing
  , v1EndpointAddressTargetRef = Nothing
  }

-- ** V1EndpointPort
-- | V1EndpointPort
-- EndpointPort is a tuple that describes a single port.
data V1EndpointPort = V1EndpointPort
  { v1EndpointPortName :: !(Maybe Text) -- ^ "name" - The name of this port (corresponds to ServicePort.Name). Must be a DNS_LABEL. Optional only if one port is defined.
  , v1EndpointPortPort :: !(Int) -- ^ /Required/ "port" - The port number of the endpoint.
  , v1EndpointPortProtocol :: !(Maybe Text) -- ^ "protocol" - The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1EndpointPort
instance A.FromJSON V1EndpointPort where
  parseJSON = A.withObject "V1EndpointPort" $ \o ->
    V1EndpointPort
      <$> (o .:? "name")
      <*> (o .:  "port")
      <*> (o .:? "protocol")

-- | ToJSON V1EndpointPort
instance A.ToJSON V1EndpointPort where
  toJSON V1EndpointPort {..} =
   _omitNulls
      [ "name" .= v1EndpointPortName
      , "port" .= v1EndpointPortPort
      , "protocol" .= v1EndpointPortProtocol
      ]


-- | Construct a value of type 'V1EndpointPort' (by applying it's required fields, if any)
mkV1EndpointPort
  :: Int -- ^ 'v1EndpointPortPort': The port number of the endpoint.
  -> V1EndpointPort
mkV1EndpointPort v1EndpointPortPort =
  V1EndpointPort
  { v1EndpointPortName = Nothing
  , v1EndpointPortPort
  , v1EndpointPortProtocol = 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
  { 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.
  , 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.
  , v1EndpointSubsetPorts :: !(Maybe [V1EndpointPort]) -- ^ "ports" - Port numbers available on the related IP addresses.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1EndpointSubset
instance A.FromJSON V1EndpointSubset where
  parseJSON = A.withObject "V1EndpointSubset" $ \o ->
    V1EndpointSubset
      <$> (o .:? "addresses")
      <*> (o .:? "notReadyAddresses")
      <*> (o .:? "ports")

-- | ToJSON V1EndpointSubset
instance A.ToJSON V1EndpointSubset where
  toJSON V1EndpointSubset {..} =
   _omitNulls
      [ "addresses" .= v1EndpointSubsetAddresses
      , "notReadyAddresses" .= v1EndpointSubsetNotReadyAddresses
      , "ports" .= v1EndpointSubsetPorts
      ]


-- | Construct a value of type 'V1EndpointSubset' (by applying it's required fields, if any)
mkV1EndpointSubset
  :: V1EndpointSubset
mkV1EndpointSubset =
  V1EndpointSubset
  { v1EndpointSubsetAddresses = Nothing
  , v1EndpointSubsetNotReadyAddresses = Nothing
  , v1EndpointSubsetPorts = 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
  { 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1EndpointsMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1Endpoints
instance A.FromJSON V1Endpoints where
  parseJSON = A.withObject "V1Endpoints" $ \o ->
    V1Endpoints
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "subsets")

-- | ToJSON V1Endpoints
instance A.ToJSON V1Endpoints where
  toJSON V1Endpoints {..} =
   _omitNulls
      [ "apiVersion" .= v1EndpointsApiVersion
      , "kind" .= v1EndpointsKind
      , "metadata" .= v1EndpointsMetadata
      , "subsets" .= v1EndpointsSubsets
      ]


-- | Construct a value of type 'V1Endpoints' (by applying it's required fields, if any)
mkV1Endpoints
  :: V1Endpoints
mkV1Endpoints =
  V1Endpoints
  { v1EndpointsApiVersion = Nothing
  , v1EndpointsKind = Nothing
  , v1EndpointsMetadata = Nothing
  , v1EndpointsSubsets = Nothing
  }

-- ** V1EndpointsList
-- | V1EndpointsList
-- EndpointsList is a list of endpoints.
data V1EndpointsList = V1EndpointsList
  { 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/api-conventions.md#resources
  , v1EndpointsListItems :: !([V1Endpoints]) -- ^ /Required/ "items" - List of endpoints.
  , 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/api-conventions.md#types-kinds
  , v1EndpointsListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1EndpointsList
instance A.FromJSON V1EndpointsList where
  parseJSON = A.withObject "V1EndpointsList" $ \o ->
    V1EndpointsList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1EndpointsList
instance A.ToJSON V1EndpointsList where
  toJSON V1EndpointsList {..} =
   _omitNulls
      [ "apiVersion" .= v1EndpointsListApiVersion
      , "items" .= v1EndpointsListItems
      , "kind" .= v1EndpointsListKind
      , "metadata" .= v1EndpointsListMetadata
      ]


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

-- ** V1EnvFromSource
-- | V1EnvFromSource
-- EnvFromSource represents the source of a set of ConfigMaps
data V1EnvFromSource = V1EnvFromSource
  { v1EnvFromSourceConfigMapRef :: !(Maybe V1ConfigMapEnvSource) -- ^ "configMapRef"
  , v1EnvFromSourcePrefix :: !(Maybe Text) -- ^ "prefix" - An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.
  , v1EnvFromSourceSecretRef :: !(Maybe V1SecretEnvSource) -- ^ "secretRef"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1EnvFromSource
instance A.FromJSON V1EnvFromSource where
  parseJSON = A.withObject "V1EnvFromSource" $ \o ->
    V1EnvFromSource
      <$> (o .:? "configMapRef")
      <*> (o .:? "prefix")
      <*> (o .:? "secretRef")

-- | ToJSON V1EnvFromSource
instance A.ToJSON V1EnvFromSource where
  toJSON V1EnvFromSource {..} =
   _omitNulls
      [ "configMapRef" .= v1EnvFromSourceConfigMapRef
      , "prefix" .= v1EnvFromSourcePrefix
      , "secretRef" .= v1EnvFromSourceSecretRef
      ]


-- | Construct a value of type 'V1EnvFromSource' (by applying it's required fields, if any)
mkV1EnvFromSource
  :: V1EnvFromSource
mkV1EnvFromSource =
  V1EnvFromSource
  { v1EnvFromSourceConfigMapRef = Nothing
  , v1EnvFromSourcePrefix = Nothing
  , v1EnvFromSourceSecretRef = Nothing
  }

-- ** V1EnvVar
-- | V1EnvVar
-- EnvVar represents an environment variable present in a Container.
data V1EnvVar = V1EnvVar
  { v1EnvVarName :: !(Text) -- ^ /Required/ "name" - Name of the environment variable. Must be a C_IDENTIFIER.
  , v1EnvVarValue :: !(Maybe Text) -- ^ "value" - Variable references $(VAR_NAME) are expanded using the previous 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \&quot;\&quot;.
  , v1EnvVarValueFrom :: !(Maybe V1EnvVarSource) -- ^ "valueFrom"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1EnvVar
instance A.FromJSON V1EnvVar where
  parseJSON = A.withObject "V1EnvVar" $ \o ->
    V1EnvVar
      <$> (o .:  "name")
      <*> (o .:? "value")
      <*> (o .:? "valueFrom")

-- | ToJSON V1EnvVar
instance A.ToJSON V1EnvVar where
  toJSON V1EnvVar {..} =
   _omitNulls
      [ "name" .= v1EnvVarName
      , "value" .= v1EnvVarValue
      , "valueFrom" .= 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 v1EnvVarName =
  V1EnvVar
  { v1EnvVarName
  , v1EnvVarValue = Nothing
  , v1EnvVarValueFrom = Nothing
  }

-- ** V1EnvVarSource
-- | V1EnvVarSource
-- EnvVarSource represents a source for the value of an EnvVar.
data V1EnvVarSource = V1EnvVarSource
  { v1EnvVarSourceConfigMapKeyRef :: !(Maybe V1ConfigMapKeySelector) -- ^ "configMapKeyRef"
  , v1EnvVarSourceFieldRef :: !(Maybe V1ObjectFieldSelector) -- ^ "fieldRef"
  , v1EnvVarSourceResourceFieldRef :: !(Maybe V1ResourceFieldSelector) -- ^ "resourceFieldRef"
  , v1EnvVarSourceSecretKeyRef :: !(Maybe V1SecretKeySelector) -- ^ "secretKeyRef"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1EnvVarSource
instance A.FromJSON V1EnvVarSource where
  parseJSON = A.withObject "V1EnvVarSource" $ \o ->
    V1EnvVarSource
      <$> (o .:? "configMapKeyRef")
      <*> (o .:? "fieldRef")
      <*> (o .:? "resourceFieldRef")
      <*> (o .:? "secretKeyRef")

-- | ToJSON V1EnvVarSource
instance A.ToJSON V1EnvVarSource where
  toJSON V1EnvVarSource {..} =
   _omitNulls
      [ "configMapKeyRef" .= v1EnvVarSourceConfigMapKeyRef
      , "fieldRef" .= v1EnvVarSourceFieldRef
      , "resourceFieldRef" .= v1EnvVarSourceResourceFieldRef
      , "secretKeyRef" .= v1EnvVarSourceSecretKeyRef
      ]


-- | Construct a value of type 'V1EnvVarSource' (by applying it's required fields, if any)
mkV1EnvVarSource
  :: V1EnvVarSource
mkV1EnvVarSource =
  V1EnvVarSource
  { v1EnvVarSourceConfigMapKeyRef = Nothing
  , v1EnvVarSourceFieldRef = Nothing
  , v1EnvVarSourceResourceFieldRef = Nothing
  , v1EnvVarSourceSecretKeyRef = Nothing
  }

-- ** V1Event
-- | V1Event
-- Event is a report of an event somewhere in the cluster.
data V1Event = V1Event
  { v1EventAction :: !(Maybe Text) -- ^ "action" - What action was taken/failed regarding to the Regarding object.
  , v1EventApiVersion :: !(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/api-conventions.md#resources
  , v1EventCount :: !(Maybe Int) -- ^ "count" - The number of times this event has occurred.
  , v1EventEventTime :: !(Maybe DateTime) -- ^ "eventTime" - Time when this Event was first observed.
  , v1EventFirstTimestamp :: !(Maybe DateTime) -- ^ "firstTimestamp" - The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)
  , v1EventInvolvedObject :: !(V1ObjectReference) -- ^ /Required/ "involvedObject"
  , v1EventKind :: !(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/api-conventions.md#types-kinds
  , v1EventLastTimestamp :: !(Maybe DateTime) -- ^ "lastTimestamp" - The time at which the most recent occurrence of this event was recorded.
  , v1EventMessage :: !(Maybe Text) -- ^ "message" - A human-readable description of the status of this operation.
  , v1EventMetadata :: !(V1ObjectMeta) -- ^ /Required/ "metadata"
  , v1EventReason :: !(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.
  , v1EventRelated :: !(Maybe V1ObjectReference) -- ^ "related"
  , v1EventReportingComponent :: !(Maybe Text) -- ^ "reportingComponent" - Name of the controller that emitted this Event, e.g. &#x60;kubernetes.io/kubelet&#x60;.
  , v1EventReportingInstance :: !(Maybe Text) -- ^ "reportingInstance" - ID of the controller instance, e.g. &#x60;kubelet-xyzf&#x60;.
  , v1EventSeries :: !(Maybe V1EventSeries) -- ^ "series"
  , v1EventSource :: !(Maybe V1EventSource) -- ^ "source"
  , v1EventType :: !(Maybe Text) -- ^ "type" - Type of this event (Normal, Warning), new types could be added in the future
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1Event
instance A.FromJSON V1Event where
  parseJSON = A.withObject "V1Event" $ \o ->
    V1Event
      <$> (o .:? "action")
      <*> (o .:? "apiVersion")
      <*> (o .:? "count")
      <*> (o .:? "eventTime")
      <*> (o .:? "firstTimestamp")
      <*> (o .:  "involvedObject")
      <*> (o .:? "kind")
      <*> (o .:? "lastTimestamp")
      <*> (o .:? "message")
      <*> (o .:  "metadata")
      <*> (o .:? "reason")
      <*> (o .:? "related")
      <*> (o .:? "reportingComponent")
      <*> (o .:? "reportingInstance")
      <*> (o .:? "series")
      <*> (o .:? "source")
      <*> (o .:? "type")

-- | ToJSON V1Event
instance A.ToJSON V1Event where
  toJSON V1Event {..} =
   _omitNulls
      [ "action" .= v1EventAction
      , "apiVersion" .= v1EventApiVersion
      , "count" .= v1EventCount
      , "eventTime" .= v1EventEventTime
      , "firstTimestamp" .= v1EventFirstTimestamp
      , "involvedObject" .= v1EventInvolvedObject
      , "kind" .= v1EventKind
      , "lastTimestamp" .= v1EventLastTimestamp
      , "message" .= v1EventMessage
      , "metadata" .= v1EventMetadata
      , "reason" .= v1EventReason
      , "related" .= v1EventRelated
      , "reportingComponent" .= v1EventReportingComponent
      , "reportingInstance" .= v1EventReportingInstance
      , "series" .= v1EventSeries
      , "source" .= v1EventSource
      , "type" .= v1EventType
      ]


-- | Construct a value of type 'V1Event' (by applying it's required fields, if any)
mkV1Event
  :: V1ObjectReference -- ^ 'v1EventInvolvedObject' 
  -> V1ObjectMeta -- ^ 'v1EventMetadata' 
  -> V1Event
mkV1Event v1EventInvolvedObject v1EventMetadata =
  V1Event
  { v1EventAction = Nothing
  , v1EventApiVersion = Nothing
  , v1EventCount = Nothing
  , v1EventEventTime = Nothing
  , v1EventFirstTimestamp = Nothing
  , v1EventInvolvedObject
  , v1EventKind = Nothing
  , v1EventLastTimestamp = Nothing
  , v1EventMessage = Nothing
  , v1EventMetadata
  , v1EventReason = Nothing
  , v1EventRelated = Nothing
  , v1EventReportingComponent = Nothing
  , v1EventReportingInstance = Nothing
  , v1EventSeries = Nothing
  , v1EventSource = Nothing
  , v1EventType = Nothing
  }

-- ** V1EventList
-- | V1EventList
-- EventList is a list of events.
data V1EventList = V1EventList
  { v1EventListApiVersion :: !(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/api-conventions.md#resources
  , v1EventListItems :: !([V1Event]) -- ^ /Required/ "items" - List of events
  , v1EventListKind :: !(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/api-conventions.md#types-kinds
  , v1EventListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1EventList
instance A.FromJSON V1EventList where
  parseJSON = A.withObject "V1EventList" $ \o ->
    V1EventList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1EventList
instance A.ToJSON V1EventList where
  toJSON V1EventList {..} =
   _omitNulls
      [ "apiVersion" .= v1EventListApiVersion
      , "items" .= v1EventListItems
      , "kind" .= v1EventListKind
      , "metadata" .= v1EventListMetadata
      ]


-- | Construct a value of type 'V1EventList' (by applying it's required fields, if any)
mkV1EventList
  :: [V1Event] -- ^ 'v1EventListItems': List of events
  -> V1EventList
mkV1EventList v1EventListItems =
  V1EventList
  { v1EventListApiVersion = Nothing
  , v1EventListItems
  , v1EventListKind = Nothing
  , v1EventListMetadata = Nothing
  }

-- ** V1EventSeries
-- | V1EventSeries
-- EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time.
data V1EventSeries = V1EventSeries
  { v1EventSeriesCount :: !(Maybe Int) -- ^ "count" - Number of occurrences in this series up to the last heartbeat time
  , v1EventSeriesLastObservedTime :: !(Maybe DateTime) -- ^ "lastObservedTime" - Time of the last occurrence observed
  , v1EventSeriesState :: !(Maybe Text) -- ^ "state" - State of this Series: Ongoing or Finished
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1EventSeries
instance A.FromJSON V1EventSeries where
  parseJSON = A.withObject "V1EventSeries" $ \o ->
    V1EventSeries
      <$> (o .:? "count")
      <*> (o .:? "lastObservedTime")
      <*> (o .:? "state")

-- | ToJSON V1EventSeries
instance A.ToJSON V1EventSeries where
  toJSON V1EventSeries {..} =
   _omitNulls
      [ "count" .= v1EventSeriesCount
      , "lastObservedTime" .= v1EventSeriesLastObservedTime
      , "state" .= v1EventSeriesState
      ]


-- | Construct a value of type 'V1EventSeries' (by applying it's required fields, if any)
mkV1EventSeries
  :: V1EventSeries
mkV1EventSeries =
  V1EventSeries
  { v1EventSeriesCount = Nothing
  , v1EventSeriesLastObservedTime = Nothing
  , v1EventSeriesState = Nothing
  }

-- ** V1EventSource
-- | V1EventSource
-- EventSource contains information for an event.
data V1EventSource = V1EventSource
  { v1EventSourceComponent :: !(Maybe Text) -- ^ "component" - Component from which the event is generated.
  , v1EventSourceHost :: !(Maybe Text) -- ^ "host" - Node name on which the event is generated.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1EventSource
instance A.FromJSON V1EventSource where
  parseJSON = A.withObject "V1EventSource" $ \o ->
    V1EventSource
      <$> (o .:? "component")
      <*> (o .:? "host")

-- | ToJSON V1EventSource
instance A.ToJSON V1EventSource where
  toJSON V1EventSource {..} =
   _omitNulls
      [ "component" .= v1EventSourceComponent
      , "host" .= v1EventSourceHost
      ]


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

-- ** V1ExecAction
-- | V1ExecAction
-- ExecAction describes a \"run in container\" action.
data V1ExecAction = V1ExecAction
  { 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ExecAction
instance A.FromJSON V1ExecAction where
  parseJSON = A.withObject "V1ExecAction" $ \o ->
    V1ExecAction
      <$> (o .:? "command")

-- | ToJSON V1ExecAction
instance A.ToJSON V1ExecAction where
  toJSON V1ExecAction {..} =
   _omitNulls
      [ "command" .= v1ExecActionCommand
      ]


-- | Construct a value of type 'V1ExecAction' (by applying it's required fields, if any)
mkV1ExecAction
  :: V1ExecAction
mkV1ExecAction =
  V1ExecAction
  { v1ExecActionCommand = 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
  { v1FCVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - 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.
  , v1FCVolumeSourceLun :: !(Maybe Int) -- ^ "lun" - Optional: FC target lun number
  , v1FCVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
  , v1FCVolumeSourceTargetWwNs :: !(Maybe [Text]) -- ^ "targetWWNs" - Optional: FC target worldwide names (WWNs)
  , v1FCVolumeSourceWwids :: !(Maybe [Text]) -- ^ "wwids" - Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1FCVolumeSource
instance A.FromJSON V1FCVolumeSource where
  parseJSON = A.withObject "V1FCVolumeSource" $ \o ->
    V1FCVolumeSource
      <$> (o .:? "fsType")
      <*> (o .:? "lun")
      <*> (o .:? "readOnly")
      <*> (o .:? "targetWWNs")
      <*> (o .:? "wwids")

-- | ToJSON V1FCVolumeSource
instance A.ToJSON V1FCVolumeSource where
  toJSON V1FCVolumeSource {..} =
   _omitNulls
      [ "fsType" .= v1FCVolumeSourceFsType
      , "lun" .= v1FCVolumeSourceLun
      , "readOnly" .= v1FCVolumeSourceReadOnly
      , "targetWWNs" .= v1FCVolumeSourceTargetWwNs
      , "wwids" .= v1FCVolumeSourceWwids
      ]


-- | Construct a value of type 'V1FCVolumeSource' (by applying it's required fields, if any)
mkV1FCVolumeSource
  :: V1FCVolumeSource
mkV1FCVolumeSource =
  V1FCVolumeSource
  { v1FCVolumeSourceFsType = Nothing
  , v1FCVolumeSourceLun = Nothing
  , v1FCVolumeSourceReadOnly = Nothing
  , v1FCVolumeSourceTargetWwNs = Nothing
  , v1FCVolumeSourceWwids = Nothing
  }

-- ** V1FlexPersistentVolumeSource
-- | V1FlexPersistentVolumeSource
-- FlexPersistentVolumeSource represents a generic persistent volume resource that is provisioned/attached using an exec based plugin.
data V1FlexPersistentVolumeSource = V1FlexPersistentVolumeSource
  { v1FlexPersistentVolumeSourceDriver :: !(Text) -- ^ /Required/ "driver" - Driver is the name of the driver to use for this volume.
  , v1FlexPersistentVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - 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.
  , v1FlexPersistentVolumeSourceOptions :: !(Maybe (Map.Map String Text)) -- ^ "options" - Optional: Extra command options if any.
  , v1FlexPersistentVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
  , v1FlexPersistentVolumeSourceSecretRef :: !(Maybe V1SecretReference) -- ^ "secretRef"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1FlexPersistentVolumeSource
instance A.FromJSON V1FlexPersistentVolumeSource where
  parseJSON = A.withObject "V1FlexPersistentVolumeSource" $ \o ->
    V1FlexPersistentVolumeSource
      <$> (o .:  "driver")
      <*> (o .:? "fsType")
      <*> (o .:? "options")
      <*> (o .:? "readOnly")
      <*> (o .:? "secretRef")

-- | ToJSON V1FlexPersistentVolumeSource
instance A.ToJSON V1FlexPersistentVolumeSource where
  toJSON V1FlexPersistentVolumeSource {..} =
   _omitNulls
      [ "driver" .= v1FlexPersistentVolumeSourceDriver
      , "fsType" .= v1FlexPersistentVolumeSourceFsType
      , "options" .= v1FlexPersistentVolumeSourceOptions
      , "readOnly" .= v1FlexPersistentVolumeSourceReadOnly
      , "secretRef" .= 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 v1FlexPersistentVolumeSourceDriver =
  V1FlexPersistentVolumeSource
  { v1FlexPersistentVolumeSourceDriver
  , v1FlexPersistentVolumeSourceFsType = Nothing
  , v1FlexPersistentVolumeSourceOptions = Nothing
  , v1FlexPersistentVolumeSourceReadOnly = Nothing
  , v1FlexPersistentVolumeSourceSecretRef = Nothing
  }

-- ** V1FlexVolumeSource
-- | V1FlexVolumeSource
-- FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.
data V1FlexVolumeSource = V1FlexVolumeSource
  { v1FlexVolumeSourceDriver :: !(Text) -- ^ /Required/ "driver" - Driver is the name of the driver to use for this volume.
  , v1FlexVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - 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.
  , v1FlexVolumeSourceOptions :: !(Maybe (Map.Map String Text)) -- ^ "options" - Optional: Extra command options if any.
  , v1FlexVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
  , v1FlexVolumeSourceSecretRef :: !(Maybe V1LocalObjectReference) -- ^ "secretRef"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1FlexVolumeSource
instance A.FromJSON V1FlexVolumeSource where
  parseJSON = A.withObject "V1FlexVolumeSource" $ \o ->
    V1FlexVolumeSource
      <$> (o .:  "driver")
      <*> (o .:? "fsType")
      <*> (o .:? "options")
      <*> (o .:? "readOnly")
      <*> (o .:? "secretRef")

-- | ToJSON V1FlexVolumeSource
instance A.ToJSON V1FlexVolumeSource where
  toJSON V1FlexVolumeSource {..} =
   _omitNulls
      [ "driver" .= v1FlexVolumeSourceDriver
      , "fsType" .= v1FlexVolumeSourceFsType
      , "options" .= v1FlexVolumeSourceOptions
      , "readOnly" .= v1FlexVolumeSourceReadOnly
      , "secretRef" .= 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 v1FlexVolumeSourceDriver =
  V1FlexVolumeSource
  { v1FlexVolumeSourceDriver
  , v1FlexVolumeSourceFsType = Nothing
  , v1FlexVolumeSourceOptions = Nothing
  , v1FlexVolumeSourceReadOnly = Nothing
  , v1FlexVolumeSourceSecretRef = 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
  { v1FlockerVolumeSourceDatasetName :: !(Maybe Text) -- ^ "datasetName" - Name of the dataset stored as metadata -&gt; name on the dataset for Flocker should be considered as deprecated
  , v1FlockerVolumeSourceDatasetUuid :: !(Maybe Text) -- ^ "datasetUUID" - UUID of the dataset. This is unique identifier of a Flocker dataset
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1FlockerVolumeSource
instance A.FromJSON V1FlockerVolumeSource where
  parseJSON = A.withObject "V1FlockerVolumeSource" $ \o ->
    V1FlockerVolumeSource
      <$> (o .:? "datasetName")
      <*> (o .:? "datasetUUID")

-- | ToJSON V1FlockerVolumeSource
instance A.ToJSON V1FlockerVolumeSource where
  toJSON V1FlockerVolumeSource {..} =
   _omitNulls
      [ "datasetName" .= v1FlockerVolumeSourceDatasetName
      , "datasetUUID" .= v1FlockerVolumeSourceDatasetUuid
      ]


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

-- ** 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
  { v1GCEPersistentDiskVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - 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
  , v1GCEPersistentDiskVolumeSourcePartition :: !(Maybe Int) -- ^ "partition" - 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
  , v1GCEPersistentDiskVolumeSourcePdName :: !(Text) -- ^ /Required/ "pdName" - 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
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1GCEPersistentDiskVolumeSource
instance A.FromJSON V1GCEPersistentDiskVolumeSource where
  parseJSON = A.withObject "V1GCEPersistentDiskVolumeSource" $ \o ->
    V1GCEPersistentDiskVolumeSource
      <$> (o .:? "fsType")
      <*> (o .:? "partition")
      <*> (o .:  "pdName")
      <*> (o .:? "readOnly")

-- | ToJSON V1GCEPersistentDiskVolumeSource
instance A.ToJSON V1GCEPersistentDiskVolumeSource where
  toJSON V1GCEPersistentDiskVolumeSource {..} =
   _omitNulls
      [ "fsType" .= v1GCEPersistentDiskVolumeSourceFsType
      , "partition" .= v1GCEPersistentDiskVolumeSourcePartition
      , "pdName" .= v1GCEPersistentDiskVolumeSourcePdName
      , "readOnly" .= v1GCEPersistentDiskVolumeSourceReadOnly
      ]


-- | Construct a value of type 'V1GCEPersistentDiskVolumeSource' (by applying it's required fields, if any)
mkV1GCEPersistentDiskVolumeSource
  :: Text -- ^ 'v1GCEPersistentDiskVolumeSourcePdName': 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 v1GCEPersistentDiskVolumeSourcePdName =
  V1GCEPersistentDiskVolumeSource
  { v1GCEPersistentDiskVolumeSourceFsType = Nothing
  , v1GCEPersistentDiskVolumeSourcePartition = Nothing
  , v1GCEPersistentDiskVolumeSourcePdName
  , v1GCEPersistentDiskVolumeSourceReadOnly = 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
  { v1GitRepoVolumeSourceDirectory :: !(Maybe Text) -- ^ "directory" - 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.
  , v1GitRepoVolumeSourceRepository :: !(Text) -- ^ /Required/ "repository" - Repository URL
  , v1GitRepoVolumeSourceRevision :: !(Maybe Text) -- ^ "revision" - Commit hash for the specified revision.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1GitRepoVolumeSource
instance A.FromJSON V1GitRepoVolumeSource where
  parseJSON = A.withObject "V1GitRepoVolumeSource" $ \o ->
    V1GitRepoVolumeSource
      <$> (o .:? "directory")
      <*> (o .:  "repository")
      <*> (o .:? "revision")

-- | ToJSON V1GitRepoVolumeSource
instance A.ToJSON V1GitRepoVolumeSource where
  toJSON V1GitRepoVolumeSource {..} =
   _omitNulls
      [ "directory" .= v1GitRepoVolumeSourceDirectory
      , "repository" .= v1GitRepoVolumeSourceRepository
      , "revision" .= v1GitRepoVolumeSourceRevision
      ]


-- | Construct a value of type 'V1GitRepoVolumeSource' (by applying it's required fields, if any)
mkV1GitRepoVolumeSource
  :: Text -- ^ 'v1GitRepoVolumeSourceRepository': Repository URL
  -> V1GitRepoVolumeSource
mkV1GitRepoVolumeSource v1GitRepoVolumeSourceRepository =
  V1GitRepoVolumeSource
  { v1GitRepoVolumeSourceDirectory = Nothing
  , v1GitRepoVolumeSourceRepository
  , v1GitRepoVolumeSourceRevision = 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
  { v1GlusterfsPersistentVolumeSourceEndpoints :: !(Text) -- ^ /Required/ "endpoints" - EndpointsName is the endpoint name that details Glusterfs topology. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
  , 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://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
  , v1GlusterfsPersistentVolumeSourcePath :: !(Text) -- ^ /Required/ "path" - Path is the Glusterfs volume path. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
  , v1GlusterfsPersistentVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1GlusterfsPersistentVolumeSource
instance A.FromJSON V1GlusterfsPersistentVolumeSource where
  parseJSON = A.withObject "V1GlusterfsPersistentVolumeSource" $ \o ->
    V1GlusterfsPersistentVolumeSource
      <$> (o .:  "endpoints")
      <*> (o .:? "endpointsNamespace")
      <*> (o .:  "path")
      <*> (o .:? "readOnly")

-- | ToJSON V1GlusterfsPersistentVolumeSource
instance A.ToJSON V1GlusterfsPersistentVolumeSource where
  toJSON V1GlusterfsPersistentVolumeSource {..} =
   _omitNulls
      [ "endpoints" .= v1GlusterfsPersistentVolumeSourceEndpoints
      , "endpointsNamespace" .= v1GlusterfsPersistentVolumeSourceEndpointsNamespace
      , "path" .= v1GlusterfsPersistentVolumeSourcePath
      , "readOnly" .= v1GlusterfsPersistentVolumeSourceReadOnly
      ]


-- | Construct a value of type 'V1GlusterfsPersistentVolumeSource' (by applying it's required fields, if any)
mkV1GlusterfsPersistentVolumeSource
  :: Text -- ^ 'v1GlusterfsPersistentVolumeSourceEndpoints': EndpointsName is the endpoint name that details Glusterfs topology. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
  -> Text -- ^ 'v1GlusterfsPersistentVolumeSourcePath': Path is the Glusterfs volume path. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
  -> V1GlusterfsPersistentVolumeSource
mkV1GlusterfsPersistentVolumeSource v1GlusterfsPersistentVolumeSourceEndpoints v1GlusterfsPersistentVolumeSourcePath =
  V1GlusterfsPersistentVolumeSource
  { v1GlusterfsPersistentVolumeSourceEndpoints
  , v1GlusterfsPersistentVolumeSourceEndpointsNamespace = Nothing
  , v1GlusterfsPersistentVolumeSourcePath
  , v1GlusterfsPersistentVolumeSourceReadOnly = 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
  { v1GlusterfsVolumeSourceEndpoints :: !(Text) -- ^ /Required/ "endpoints" - EndpointsName is the endpoint name that details Glusterfs topology. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
  , v1GlusterfsVolumeSourcePath :: !(Text) -- ^ /Required/ "path" - Path is the Glusterfs volume path. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
  , v1GlusterfsVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1GlusterfsVolumeSource
instance A.FromJSON V1GlusterfsVolumeSource where
  parseJSON = A.withObject "V1GlusterfsVolumeSource" $ \o ->
    V1GlusterfsVolumeSource
      <$> (o .:  "endpoints")
      <*> (o .:  "path")
      <*> (o .:? "readOnly")

-- | ToJSON V1GlusterfsVolumeSource
instance A.ToJSON V1GlusterfsVolumeSource where
  toJSON V1GlusterfsVolumeSource {..} =
   _omitNulls
      [ "endpoints" .= v1GlusterfsVolumeSourceEndpoints
      , "path" .= v1GlusterfsVolumeSourcePath
      , "readOnly" .= v1GlusterfsVolumeSourceReadOnly
      ]


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

-- ** V1GroupVersionForDiscovery
-- | V1GroupVersionForDiscovery
-- GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility.
data V1GroupVersionForDiscovery = V1GroupVersionForDiscovery
  { v1GroupVersionForDiscoveryGroupVersion :: !(Text) -- ^ /Required/ "groupVersion" - groupVersion specifies the API group and version in the form \&quot;group/version\&quot;
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1GroupVersionForDiscovery
instance A.FromJSON V1GroupVersionForDiscovery where
  parseJSON = A.withObject "V1GroupVersionForDiscovery" $ \o ->
    V1GroupVersionForDiscovery
      <$> (o .:  "groupVersion")
      <*> (o .:  "version")

-- | ToJSON V1GroupVersionForDiscovery
instance A.ToJSON V1GroupVersionForDiscovery where
  toJSON V1GroupVersionForDiscovery {..} =
   _omitNulls
      [ "groupVersion" .= v1GroupVersionForDiscoveryGroupVersion
      , "version" .= 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 v1GroupVersionForDiscoveryGroupVersion v1GroupVersionForDiscoveryVersion =
  V1GroupVersionForDiscovery
  { v1GroupVersionForDiscoveryGroupVersion
  , v1GroupVersionForDiscoveryVersion
  }

-- ** V1HTTPGetAction
-- | V1HTTPGetAction
-- HTTPGetAction describes an action based on HTTP Get requests.
data V1HTTPGetAction = V1HTTPGetAction
  { 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.
  , v1HTTPGetActionHttpHeaders :: !(Maybe [V1HTTPHeader]) -- ^ "httpHeaders" - Custom headers to set in the request. HTTP allows repeated headers.
  , v1HTTPGetActionPath :: !(Maybe Text) -- ^ "path" - Path to access on the HTTP server.
  , v1HTTPGetActionPort :: !(IntOrString) -- ^ /Required/ "port"
  , v1HTTPGetActionScheme :: !(Maybe Text) -- ^ "scheme" - Scheme to use for connecting to the host. Defaults to HTTP.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1HTTPGetAction
instance A.FromJSON V1HTTPGetAction where
  parseJSON = A.withObject "V1HTTPGetAction" $ \o ->
    V1HTTPGetAction
      <$> (o .:? "host")
      <*> (o .:? "httpHeaders")
      <*> (o .:? "path")
      <*> (o .:  "port")
      <*> (o .:? "scheme")

-- | ToJSON V1HTTPGetAction
instance A.ToJSON V1HTTPGetAction where
  toJSON V1HTTPGetAction {..} =
   _omitNulls
      [ "host" .= v1HTTPGetActionHost
      , "httpHeaders" .= v1HTTPGetActionHttpHeaders
      , "path" .= v1HTTPGetActionPath
      , "port" .= v1HTTPGetActionPort
      , "scheme" .= v1HTTPGetActionScheme
      ]


-- | Construct a value of type 'V1HTTPGetAction' (by applying it's required fields, if any)
mkV1HTTPGetAction
  :: IntOrString -- ^ 'v1HTTPGetActionPort' 
  -> V1HTTPGetAction
mkV1HTTPGetAction v1HTTPGetActionPort =
  V1HTTPGetAction
  { v1HTTPGetActionHost = Nothing
  , v1HTTPGetActionHttpHeaders = Nothing
  , v1HTTPGetActionPath = Nothing
  , v1HTTPGetActionPort
  , v1HTTPGetActionScheme = Nothing
  }

-- ** V1HTTPHeader
-- | V1HTTPHeader
-- HTTPHeader describes a custom header to be used in HTTP probes
data V1HTTPHeader = V1HTTPHeader
  { v1HTTPHeaderName :: !(Text) -- ^ /Required/ "name" - The header field name
  , v1HTTPHeaderValue :: !(Text) -- ^ /Required/ "value" - The header field value
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1HTTPHeader
instance A.FromJSON V1HTTPHeader where
  parseJSON = A.withObject "V1HTTPHeader" $ \o ->
    V1HTTPHeader
      <$> (o .:  "name")
      <*> (o .:  "value")

-- | ToJSON V1HTTPHeader
instance A.ToJSON V1HTTPHeader where
  toJSON V1HTTPHeader {..} =
   _omitNulls
      [ "name" .= v1HTTPHeaderName
      , "value" .= v1HTTPHeaderValue
      ]


-- | Construct a value of type 'V1HTTPHeader' (by applying it's required fields, if any)
mkV1HTTPHeader
  :: Text -- ^ 'v1HTTPHeaderName': The header field name
  -> Text -- ^ 'v1HTTPHeaderValue': The header field value
  -> V1HTTPHeader
mkV1HTTPHeader v1HTTPHeaderName v1HTTPHeaderValue =
  V1HTTPHeader
  { v1HTTPHeaderName
  , v1HTTPHeaderValue
  }

-- ** V1Handler
-- | V1Handler
-- Handler defines a specific action that should be taken
data V1Handler = V1Handler
  { v1HandlerExec :: !(Maybe V1ExecAction) -- ^ "exec"
  , v1HandlerHttpGet :: !(Maybe V1HTTPGetAction) -- ^ "httpGet"
  , v1HandlerTcpSocket :: !(Maybe V1TCPSocketAction) -- ^ "tcpSocket"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1Handler
instance A.FromJSON V1Handler where
  parseJSON = A.withObject "V1Handler" $ \o ->
    V1Handler
      <$> (o .:? "exec")
      <*> (o .:? "httpGet")
      <*> (o .:? "tcpSocket")

-- | ToJSON V1Handler
instance A.ToJSON V1Handler where
  toJSON V1Handler {..} =
   _omitNulls
      [ "exec" .= v1HandlerExec
      , "httpGet" .= v1HandlerHttpGet
      , "tcpSocket" .= v1HandlerTcpSocket
      ]


-- | Construct a value of type 'V1Handler' (by applying it's required fields, if any)
mkV1Handler
  :: V1Handler
mkV1Handler =
  V1Handler
  { v1HandlerExec = Nothing
  , v1HandlerHttpGet = Nothing
  , v1HandlerTcpSocket = Nothing
  }

-- ** V1HorizontalPodAutoscaler
-- | V1HorizontalPodAutoscaler
-- configuration of a horizontal pod autoscaler.
data V1HorizontalPodAutoscaler = V1HorizontalPodAutoscaler
  { 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1HorizontalPodAutoscalerMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1HorizontalPodAutoscalerSpec :: !(Maybe V1HorizontalPodAutoscalerSpec) -- ^ "spec"
  , v1HorizontalPodAutoscalerStatus :: !(Maybe V1HorizontalPodAutoscalerStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1HorizontalPodAutoscaler
instance A.FromJSON V1HorizontalPodAutoscaler where
  parseJSON = A.withObject "V1HorizontalPodAutoscaler" $ \o ->
    V1HorizontalPodAutoscaler
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON V1HorizontalPodAutoscaler
instance A.ToJSON V1HorizontalPodAutoscaler where
  toJSON V1HorizontalPodAutoscaler {..} =
   _omitNulls
      [ "apiVersion" .= v1HorizontalPodAutoscalerApiVersion
      , "kind" .= v1HorizontalPodAutoscalerKind
      , "metadata" .= v1HorizontalPodAutoscalerMetadata
      , "spec" .= v1HorizontalPodAutoscalerSpec
      , "status" .= v1HorizontalPodAutoscalerStatus
      ]


-- | Construct a value of type 'V1HorizontalPodAutoscaler' (by applying it's required fields, if any)
mkV1HorizontalPodAutoscaler
  :: V1HorizontalPodAutoscaler
mkV1HorizontalPodAutoscaler =
  V1HorizontalPodAutoscaler
  { v1HorizontalPodAutoscalerApiVersion = Nothing
  , v1HorizontalPodAutoscalerKind = Nothing
  , v1HorizontalPodAutoscalerMetadata = Nothing
  , v1HorizontalPodAutoscalerSpec = Nothing
  , v1HorizontalPodAutoscalerStatus = Nothing
  }

-- ** V1HorizontalPodAutoscalerList
-- | V1HorizontalPodAutoscalerList
-- list of horizontal pod autoscaler objects.
data V1HorizontalPodAutoscalerList = V1HorizontalPodAutoscalerList
  { 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/api-conventions.md#resources
  , v1HorizontalPodAutoscalerListItems :: !([V1HorizontalPodAutoscaler]) -- ^ /Required/ "items" - list of horizontal pod autoscaler objects.
  , 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/api-conventions.md#types-kinds
  , v1HorizontalPodAutoscalerListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1HorizontalPodAutoscalerList
instance A.FromJSON V1HorizontalPodAutoscalerList where
  parseJSON = A.withObject "V1HorizontalPodAutoscalerList" $ \o ->
    V1HorizontalPodAutoscalerList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1HorizontalPodAutoscalerList
instance A.ToJSON V1HorizontalPodAutoscalerList where
  toJSON V1HorizontalPodAutoscalerList {..} =
   _omitNulls
      [ "apiVersion" .= v1HorizontalPodAutoscalerListApiVersion
      , "items" .= v1HorizontalPodAutoscalerListItems
      , "kind" .= v1HorizontalPodAutoscalerListKind
      , "metadata" .= v1HorizontalPodAutoscalerListMetadata
      ]


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

-- ** V1HorizontalPodAutoscalerSpec
-- | V1HorizontalPodAutoscalerSpec
-- specification of a horizontal pod autoscaler.
data V1HorizontalPodAutoscalerSpec = V1HorizontalPodAutoscalerSpec
  { v1HorizontalPodAutoscalerSpecMaxReplicas :: !(Int) -- ^ /Required/ "maxReplicas" - upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.
  , v1HorizontalPodAutoscalerSpecMinReplicas :: !(Maybe Int) -- ^ "minReplicas" - lower limit for the number of pods that can be set by the autoscaler, default 1.
  , v1HorizontalPodAutoscalerSpecScaleTargetRef :: !(V1CrossVersionObjectReference) -- ^ /Required/ "scaleTargetRef"
  , v1HorizontalPodAutoscalerSpecTargetCpuUtilizationPercentage :: !(Maybe Int) -- ^ "targetCPUUtilizationPercentage" - 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1HorizontalPodAutoscalerSpec
instance A.FromJSON V1HorizontalPodAutoscalerSpec where
  parseJSON = A.withObject "V1HorizontalPodAutoscalerSpec" $ \o ->
    V1HorizontalPodAutoscalerSpec
      <$> (o .:  "maxReplicas")
      <*> (o .:? "minReplicas")
      <*> (o .:  "scaleTargetRef")
      <*> (o .:? "targetCPUUtilizationPercentage")

-- | ToJSON V1HorizontalPodAutoscalerSpec
instance A.ToJSON V1HorizontalPodAutoscalerSpec where
  toJSON V1HorizontalPodAutoscalerSpec {..} =
   _omitNulls
      [ "maxReplicas" .= v1HorizontalPodAutoscalerSpecMaxReplicas
      , "minReplicas" .= v1HorizontalPodAutoscalerSpecMinReplicas
      , "scaleTargetRef" .= v1HorizontalPodAutoscalerSpecScaleTargetRef
      , "targetCPUUtilizationPercentage" .= v1HorizontalPodAutoscalerSpecTargetCpuUtilizationPercentage
      ]


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

-- ** V1HorizontalPodAutoscalerStatus
-- | V1HorizontalPodAutoscalerStatus
-- current status of a horizontal pod autoscaler
data V1HorizontalPodAutoscalerStatus = V1HorizontalPodAutoscalerStatus
  { v1HorizontalPodAutoscalerStatusCurrentCpuUtilizationPercentage :: !(Maybe Int) -- ^ "currentCPUUtilizationPercentage" - 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.
  , v1HorizontalPodAutoscalerStatusCurrentReplicas :: !(Int) -- ^ /Required/ "currentReplicas" - current number of replicas of pods managed by this autoscaler.
  , v1HorizontalPodAutoscalerStatusDesiredReplicas :: !(Int) -- ^ /Required/ "desiredReplicas" - desired number of replicas of pods managed by this autoscaler.
  , v1HorizontalPodAutoscalerStatusLastScaleTime :: !(Maybe DateTime) -- ^ "lastScaleTime" - last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed.
  , v1HorizontalPodAutoscalerStatusObservedGeneration :: !(Maybe Integer) -- ^ "observedGeneration" - most recent generation observed by this autoscaler.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1HorizontalPodAutoscalerStatus
instance A.FromJSON V1HorizontalPodAutoscalerStatus where
  parseJSON = A.withObject "V1HorizontalPodAutoscalerStatus" $ \o ->
    V1HorizontalPodAutoscalerStatus
      <$> (o .:? "currentCPUUtilizationPercentage")
      <*> (o .:  "currentReplicas")
      <*> (o .:  "desiredReplicas")
      <*> (o .:? "lastScaleTime")
      <*> (o .:? "observedGeneration")

-- | ToJSON V1HorizontalPodAutoscalerStatus
instance A.ToJSON V1HorizontalPodAutoscalerStatus where
  toJSON V1HorizontalPodAutoscalerStatus {..} =
   _omitNulls
      [ "currentCPUUtilizationPercentage" .= v1HorizontalPodAutoscalerStatusCurrentCpuUtilizationPercentage
      , "currentReplicas" .= v1HorizontalPodAutoscalerStatusCurrentReplicas
      , "desiredReplicas" .= v1HorizontalPodAutoscalerStatusDesiredReplicas
      , "lastScaleTime" .= v1HorizontalPodAutoscalerStatusLastScaleTime
      , "observedGeneration" .= v1HorizontalPodAutoscalerStatusObservedGeneration
      ]


-- | Construct a value of type 'V1HorizontalPodAutoscalerStatus' (by applying it's required fields, if any)
mkV1HorizontalPodAutoscalerStatus
  :: Int -- ^ 'v1HorizontalPodAutoscalerStatusCurrentReplicas': current number of replicas of pods managed by this autoscaler.
  -> Int -- ^ 'v1HorizontalPodAutoscalerStatusDesiredReplicas': desired number of replicas of pods managed by this autoscaler.
  -> V1HorizontalPodAutoscalerStatus
mkV1HorizontalPodAutoscalerStatus v1HorizontalPodAutoscalerStatusCurrentReplicas v1HorizontalPodAutoscalerStatusDesiredReplicas =
  V1HorizontalPodAutoscalerStatus
  { v1HorizontalPodAutoscalerStatusCurrentCpuUtilizationPercentage = Nothing
  , v1HorizontalPodAutoscalerStatusCurrentReplicas
  , v1HorizontalPodAutoscalerStatusDesiredReplicas
  , v1HorizontalPodAutoscalerStatusLastScaleTime = Nothing
  , v1HorizontalPodAutoscalerStatusObservedGeneration = 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
  { v1HostAliasHostnames :: !(Maybe [Text]) -- ^ "hostnames" - Hostnames for the above IP address.
  , v1HostAliasIp :: !(Maybe Text) -- ^ "ip" - IP address of the host file entry.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1HostAlias
instance A.FromJSON V1HostAlias where
  parseJSON = A.withObject "V1HostAlias" $ \o ->
    V1HostAlias
      <$> (o .:? "hostnames")
      <*> (o .:? "ip")

-- | ToJSON V1HostAlias
instance A.ToJSON V1HostAlias where
  toJSON V1HostAlias {..} =
   _omitNulls
      [ "hostnames" .= v1HostAliasHostnames
      , "ip" .= v1HostAliasIp
      ]


-- | Construct a value of type 'V1HostAlias' (by applying it's required fields, if any)
mkV1HostAlias
  :: V1HostAlias
mkV1HostAlias =
  V1HostAlias
  { v1HostAliasHostnames = Nothing
  , v1HostAliasIp = Nothing
  }

-- ** V1HostPathVolumeSource
-- | V1HostPathVolumeSource
-- Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.
data V1HostPathVolumeSource = V1HostPathVolumeSource
  { 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
  , v1HostPathVolumeSourceType :: !(Maybe Text) -- ^ "type" - Type for HostPath Volume Defaults to \&quot;\&quot; More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1HostPathVolumeSource
instance A.FromJSON V1HostPathVolumeSource where
  parseJSON = A.withObject "V1HostPathVolumeSource" $ \o ->
    V1HostPathVolumeSource
      <$> (o .:  "path")
      <*> (o .:? "type")

-- | ToJSON V1HostPathVolumeSource
instance A.ToJSON V1HostPathVolumeSource where
  toJSON V1HostPathVolumeSource {..} =
   _omitNulls
      [ "path" .= v1HostPathVolumeSourcePath
      , "type" .= 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 v1HostPathVolumeSourcePath =
  V1HostPathVolumeSource
  { v1HostPathVolumeSourcePath
  , v1HostPathVolumeSourceType = Nothing
  }

-- ** V1IPBlock
-- | V1IPBlock
-- IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\") 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
  { v1IPBlockCidr :: !(Text) -- ^ /Required/ "cidr" - CIDR is a string representing the IP Block Valid examples are \&quot;192.168.1.1/24\&quot;
  , v1IPBlockExcept :: !(Maybe [Text]) -- ^ "except" - Except is a slice of CIDRs that should not be included within an IP Block Valid examples are \&quot;192.168.1.1/24\&quot; Except values will be rejected if they are outside the CIDR range
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1IPBlock
instance A.FromJSON V1IPBlock where
  parseJSON = A.withObject "V1IPBlock" $ \o ->
    V1IPBlock
      <$> (o .:  "cidr")
      <*> (o .:? "except")

-- | ToJSON V1IPBlock
instance A.ToJSON V1IPBlock where
  toJSON V1IPBlock {..} =
   _omitNulls
      [ "cidr" .= v1IPBlockCidr
      , "except" .= v1IPBlockExcept
      ]


-- | Construct a value of type 'V1IPBlock' (by applying it's required fields, if any)
mkV1IPBlock
  :: Text -- ^ 'v1IPBlockCidr': CIDR is a string representing the IP Block Valid examples are \"192.168.1.1/24\"
  -> V1IPBlock
mkV1IPBlock v1IPBlockCidr =
  V1IPBlock
  { v1IPBlockCidr
  , v1IPBlockExcept = 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
  { v1ISCSIPersistentVolumeSourceChapAuthDiscovery :: !(Maybe Bool) -- ^ "chapAuthDiscovery" - whether support iSCSI Discovery CHAP authentication
  , v1ISCSIPersistentVolumeSourceChapAuthSession :: !(Maybe Bool) -- ^ "chapAuthSession" - whether support iSCSI Session CHAP authentication
  , v1ISCSIPersistentVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - 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
  , v1ISCSIPersistentVolumeSourceInitiatorName :: !(Maybe Text) -- ^ "initiatorName" - 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.
  , v1ISCSIPersistentVolumeSourceIqn :: !(Text) -- ^ /Required/ "iqn" - Target iSCSI Qualified Name.
  , v1ISCSIPersistentVolumeSourceIscsiInterface :: !(Maybe Text) -- ^ "iscsiInterface" - iSCSI Interface Name that uses an iSCSI transport. Defaults to &#39;default&#39; (tcp).
  , v1ISCSIPersistentVolumeSourceLun :: !(Int) -- ^ /Required/ "lun" - iSCSI Target Lun number.
  , v1ISCSIPersistentVolumeSourcePortals :: !(Maybe [Text]) -- ^ "portals" - 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).
  , v1ISCSIPersistentVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.
  , v1ISCSIPersistentVolumeSourceSecretRef :: !(Maybe V1SecretReference) -- ^ "secretRef"
  , v1ISCSIPersistentVolumeSourceTargetPortal :: !(Text) -- ^ /Required/ "targetPortal" - 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ISCSIPersistentVolumeSource
instance A.FromJSON V1ISCSIPersistentVolumeSource where
  parseJSON = A.withObject "V1ISCSIPersistentVolumeSource" $ \o ->
    V1ISCSIPersistentVolumeSource
      <$> (o .:? "chapAuthDiscovery")
      <*> (o .:? "chapAuthSession")
      <*> (o .:? "fsType")
      <*> (o .:? "initiatorName")
      <*> (o .:  "iqn")
      <*> (o .:? "iscsiInterface")
      <*> (o .:  "lun")
      <*> (o .:? "portals")
      <*> (o .:? "readOnly")
      <*> (o .:? "secretRef")
      <*> (o .:  "targetPortal")

-- | ToJSON V1ISCSIPersistentVolumeSource
instance A.ToJSON V1ISCSIPersistentVolumeSource where
  toJSON V1ISCSIPersistentVolumeSource {..} =
   _omitNulls
      [ "chapAuthDiscovery" .= v1ISCSIPersistentVolumeSourceChapAuthDiscovery
      , "chapAuthSession" .= v1ISCSIPersistentVolumeSourceChapAuthSession
      , "fsType" .= v1ISCSIPersistentVolumeSourceFsType
      , "initiatorName" .= v1ISCSIPersistentVolumeSourceInitiatorName
      , "iqn" .= v1ISCSIPersistentVolumeSourceIqn
      , "iscsiInterface" .= v1ISCSIPersistentVolumeSourceIscsiInterface
      , "lun" .= v1ISCSIPersistentVolumeSourceLun
      , "portals" .= v1ISCSIPersistentVolumeSourcePortals
      , "readOnly" .= v1ISCSIPersistentVolumeSourceReadOnly
      , "secretRef" .= v1ISCSIPersistentVolumeSourceSecretRef
      , "targetPortal" .= v1ISCSIPersistentVolumeSourceTargetPortal
      ]


-- | Construct a value of type 'V1ISCSIPersistentVolumeSource' (by applying it's required fields, if any)
mkV1ISCSIPersistentVolumeSource
  :: Text -- ^ 'v1ISCSIPersistentVolumeSourceIqn': Target iSCSI Qualified Name.
  -> Int -- ^ 'v1ISCSIPersistentVolumeSourceLun': iSCSI Target Lun number.
  -> Text -- ^ 'v1ISCSIPersistentVolumeSourceTargetPortal': 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 v1ISCSIPersistentVolumeSourceIqn v1ISCSIPersistentVolumeSourceLun v1ISCSIPersistentVolumeSourceTargetPortal =
  V1ISCSIPersistentVolumeSource
  { v1ISCSIPersistentVolumeSourceChapAuthDiscovery = Nothing
  , v1ISCSIPersistentVolumeSourceChapAuthSession = Nothing
  , v1ISCSIPersistentVolumeSourceFsType = Nothing
  , v1ISCSIPersistentVolumeSourceInitiatorName = Nothing
  , v1ISCSIPersistentVolumeSourceIqn
  , v1ISCSIPersistentVolumeSourceIscsiInterface = Nothing
  , v1ISCSIPersistentVolumeSourceLun
  , v1ISCSIPersistentVolumeSourcePortals = Nothing
  , v1ISCSIPersistentVolumeSourceReadOnly = Nothing
  , v1ISCSIPersistentVolumeSourceSecretRef = Nothing
  , 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
  { v1ISCSIVolumeSourceChapAuthDiscovery :: !(Maybe Bool) -- ^ "chapAuthDiscovery" - whether support iSCSI Discovery CHAP authentication
  , v1ISCSIVolumeSourceChapAuthSession :: !(Maybe Bool) -- ^ "chapAuthSession" - whether support iSCSI Session CHAP authentication
  , v1ISCSIVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - 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
  , v1ISCSIVolumeSourceInitiatorName :: !(Maybe Text) -- ^ "initiatorName" - 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.
  , v1ISCSIVolumeSourceIqn :: !(Text) -- ^ /Required/ "iqn" - Target iSCSI Qualified Name.
  , v1ISCSIVolumeSourceIscsiInterface :: !(Maybe Text) -- ^ "iscsiInterface" - iSCSI Interface Name that uses an iSCSI transport. Defaults to &#39;default&#39; (tcp).
  , v1ISCSIVolumeSourceLun :: !(Int) -- ^ /Required/ "lun" - iSCSI Target Lun number.
  , v1ISCSIVolumeSourcePortals :: !(Maybe [Text]) -- ^ "portals" - 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).
  , v1ISCSIVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.
  , v1ISCSIVolumeSourceSecretRef :: !(Maybe V1LocalObjectReference) -- ^ "secretRef"
  , v1ISCSIVolumeSourceTargetPortal :: !(Text) -- ^ /Required/ "targetPortal" - 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ISCSIVolumeSource
instance A.FromJSON V1ISCSIVolumeSource where
  parseJSON = A.withObject "V1ISCSIVolumeSource" $ \o ->
    V1ISCSIVolumeSource
      <$> (o .:? "chapAuthDiscovery")
      <*> (o .:? "chapAuthSession")
      <*> (o .:? "fsType")
      <*> (o .:? "initiatorName")
      <*> (o .:  "iqn")
      <*> (o .:? "iscsiInterface")
      <*> (o .:  "lun")
      <*> (o .:? "portals")
      <*> (o .:? "readOnly")
      <*> (o .:? "secretRef")
      <*> (o .:  "targetPortal")

-- | ToJSON V1ISCSIVolumeSource
instance A.ToJSON V1ISCSIVolumeSource where
  toJSON V1ISCSIVolumeSource {..} =
   _omitNulls
      [ "chapAuthDiscovery" .= v1ISCSIVolumeSourceChapAuthDiscovery
      , "chapAuthSession" .= v1ISCSIVolumeSourceChapAuthSession
      , "fsType" .= v1ISCSIVolumeSourceFsType
      , "initiatorName" .= v1ISCSIVolumeSourceInitiatorName
      , "iqn" .= v1ISCSIVolumeSourceIqn
      , "iscsiInterface" .= v1ISCSIVolumeSourceIscsiInterface
      , "lun" .= v1ISCSIVolumeSourceLun
      , "portals" .= v1ISCSIVolumeSourcePortals
      , "readOnly" .= v1ISCSIVolumeSourceReadOnly
      , "secretRef" .= v1ISCSIVolumeSourceSecretRef
      , "targetPortal" .= v1ISCSIVolumeSourceTargetPortal
      ]


-- | Construct a value of type 'V1ISCSIVolumeSource' (by applying it's required fields, if any)
mkV1ISCSIVolumeSource
  :: Text -- ^ 'v1ISCSIVolumeSourceIqn': Target iSCSI Qualified Name.
  -> Int -- ^ 'v1ISCSIVolumeSourceLun': iSCSI Target Lun number.
  -> Text -- ^ 'v1ISCSIVolumeSourceTargetPortal': 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 v1ISCSIVolumeSourceIqn v1ISCSIVolumeSourceLun v1ISCSIVolumeSourceTargetPortal =
  V1ISCSIVolumeSource
  { v1ISCSIVolumeSourceChapAuthDiscovery = Nothing
  , v1ISCSIVolumeSourceChapAuthSession = Nothing
  , v1ISCSIVolumeSourceFsType = Nothing
  , v1ISCSIVolumeSourceInitiatorName = Nothing
  , v1ISCSIVolumeSourceIqn
  , v1ISCSIVolumeSourceIscsiInterface = Nothing
  , v1ISCSIVolumeSourceLun
  , v1ISCSIVolumeSourcePortals = Nothing
  , v1ISCSIVolumeSourceReadOnly = Nothing
  , v1ISCSIVolumeSourceSecretRef = Nothing
  , v1ISCSIVolumeSourceTargetPortal
  }

-- ** V1Initializer
-- | V1Initializer
-- Initializer is information about an initializer that has not yet completed.
data V1Initializer = V1Initializer
  { v1InitializerName :: !(Text) -- ^ /Required/ "name" - name of the process that is responsible for initializing this object.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1Initializer
instance A.FromJSON V1Initializer where
  parseJSON = A.withObject "V1Initializer" $ \o ->
    V1Initializer
      <$> (o .:  "name")

-- | ToJSON V1Initializer
instance A.ToJSON V1Initializer where
  toJSON V1Initializer {..} =
   _omitNulls
      [ "name" .= v1InitializerName
      ]


-- | Construct a value of type 'V1Initializer' (by applying it's required fields, if any)
mkV1Initializer
  :: Text -- ^ 'v1InitializerName': name of the process that is responsible for initializing this object.
  -> V1Initializer
mkV1Initializer v1InitializerName =
  V1Initializer
  { v1InitializerName
  }

-- ** V1Initializers
-- | V1Initializers
-- Initializers tracks the progress of initialization.
data V1Initializers = V1Initializers
  { v1InitializersPending :: !([V1Initializer]) -- ^ /Required/ "pending" - Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients.
  , v1InitializersResult :: !(Maybe V1Status) -- ^ "result"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1Initializers
instance A.FromJSON V1Initializers where
  parseJSON = A.withObject "V1Initializers" $ \o ->
    V1Initializers
      <$> (o .:  "pending")
      <*> (o .:? "result")

-- | ToJSON V1Initializers
instance A.ToJSON V1Initializers where
  toJSON V1Initializers {..} =
   _omitNulls
      [ "pending" .= v1InitializersPending
      , "result" .= v1InitializersResult
      ]


-- | Construct a value of type 'V1Initializers' (by applying it's required fields, if any)
mkV1Initializers
  :: [V1Initializer] -- ^ 'v1InitializersPending': Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients.
  -> V1Initializers
mkV1Initializers v1InitializersPending =
  V1Initializers
  { v1InitializersPending
  , v1InitializersResult = Nothing
  }

-- ** V1Job
-- | V1Job
-- Job represents the configuration of a single job.
data V1Job = V1Job
  { 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1JobMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1JobSpec :: !(Maybe V1JobSpec) -- ^ "spec"
  , v1JobStatus :: !(Maybe V1JobStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1Job
instance A.FromJSON V1Job where
  parseJSON = A.withObject "V1Job" $ \o ->
    V1Job
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON V1Job
instance A.ToJSON V1Job where
  toJSON V1Job {..} =
   _omitNulls
      [ "apiVersion" .= v1JobApiVersion
      , "kind" .= v1JobKind
      , "metadata" .= v1JobMetadata
      , "spec" .= v1JobSpec
      , "status" .= v1JobStatus
      ]


-- | Construct a value of type 'V1Job' (by applying it's required fields, if any)
mkV1Job
  :: V1Job
mkV1Job =
  V1Job
  { v1JobApiVersion = Nothing
  , v1JobKind = Nothing
  , v1JobMetadata = Nothing
  , v1JobSpec = Nothing
  , v1JobStatus = Nothing
  }

-- ** V1JobCondition
-- | V1JobCondition
-- JobCondition describes current state of a job.
data V1JobCondition = V1JobCondition
  { v1JobConditionLastProbeTime :: !(Maybe DateTime) -- ^ "lastProbeTime" - Last time the condition was checked.
  , v1JobConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - Last time the condition transit from one status to another.
  , v1JobConditionMessage :: !(Maybe Text) -- ^ "message" - Human readable message indicating details about last transition.
  , v1JobConditionReason :: !(Maybe Text) -- ^ "reason" - (brief) reason for the condition&#39;s last transition.
  , v1JobConditionStatus :: !(Text) -- ^ /Required/ "status" - Status of the condition, one of True, False, Unknown.
  , v1JobConditionType :: !(Text) -- ^ /Required/ "type" - Type of job condition, Complete or Failed.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1JobCondition
instance A.FromJSON V1JobCondition where
  parseJSON = A.withObject "V1JobCondition" $ \o ->
    V1JobCondition
      <$> (o .:? "lastProbeTime")
      <*> (o .:? "lastTransitionTime")
      <*> (o .:? "message")
      <*> (o .:? "reason")
      <*> (o .:  "status")
      <*> (o .:  "type")

-- | ToJSON V1JobCondition
instance A.ToJSON V1JobCondition where
  toJSON V1JobCondition {..} =
   _omitNulls
      [ "lastProbeTime" .= v1JobConditionLastProbeTime
      , "lastTransitionTime" .= v1JobConditionLastTransitionTime
      , "message" .= v1JobConditionMessage
      , "reason" .= v1JobConditionReason
      , "status" .= v1JobConditionStatus
      , "type" .= 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 v1JobConditionStatus v1JobConditionType =
  V1JobCondition
  { v1JobConditionLastProbeTime = Nothing
  , v1JobConditionLastTransitionTime = Nothing
  , v1JobConditionMessage = Nothing
  , v1JobConditionReason = Nothing
  , v1JobConditionStatus
  , v1JobConditionType
  }

-- ** V1JobList
-- | V1JobList
-- JobList is a collection of jobs.
data V1JobList = V1JobList
  { 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/api-conventions.md#resources
  , v1JobListItems :: !([V1Job]) -- ^ /Required/ "items" - items is the list of Jobs.
  , 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/api-conventions.md#types-kinds
  , v1JobListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1JobList
instance A.FromJSON V1JobList where
  parseJSON = A.withObject "V1JobList" $ \o ->
    V1JobList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1JobList
instance A.ToJSON V1JobList where
  toJSON V1JobList {..} =
   _omitNulls
      [ "apiVersion" .= v1JobListApiVersion
      , "items" .= v1JobListItems
      , "kind" .= v1JobListKind
      , "metadata" .= 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 v1JobListItems =
  V1JobList
  { v1JobListApiVersion = Nothing
  , v1JobListItems
  , v1JobListKind = Nothing
  , v1JobListMetadata = Nothing
  }

-- ** V1JobSpec
-- | V1JobSpec
-- JobSpec describes how the job execution will look like.
data V1JobSpec = V1JobSpec
  { v1JobSpecActiveDeadlineSeconds :: !(Maybe Integer) -- ^ "activeDeadlineSeconds" - Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer
  , v1JobSpecBackoffLimit :: !(Maybe Int) -- ^ "backoffLimit" - Specifies the number of retries before marking this job failed. Defaults to 6
  , v1JobSpecCompletions :: !(Maybe Int) -- ^ "completions" - Specifies the desired number of successfully finished pods the job should be run with.  Setting to nil 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/
  , 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
  , 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/
  , v1JobSpecSelector :: !(Maybe V1LabelSelector) -- ^ "selector"
  , v1JobSpecTemplate :: !(V1PodTemplateSpec) -- ^ /Required/ "template"
  , 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. This field is alpha-level and is only honored by servers that enable the TTLAfterFinished feature.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1JobSpec
instance A.FromJSON V1JobSpec where
  parseJSON = A.withObject "V1JobSpec" $ \o ->
    V1JobSpec
      <$> (o .:? "activeDeadlineSeconds")
      <*> (o .:? "backoffLimit")
      <*> (o .:? "completions")
      <*> (o .:? "manualSelector")
      <*> (o .:? "parallelism")
      <*> (o .:? "selector")
      <*> (o .:  "template")
      <*> (o .:? "ttlSecondsAfterFinished")

-- | ToJSON V1JobSpec
instance A.ToJSON V1JobSpec where
  toJSON V1JobSpec {..} =
   _omitNulls
      [ "activeDeadlineSeconds" .= v1JobSpecActiveDeadlineSeconds
      , "backoffLimit" .= v1JobSpecBackoffLimit
      , "completions" .= v1JobSpecCompletions
      , "manualSelector" .= v1JobSpecManualSelector
      , "parallelism" .= v1JobSpecParallelism
      , "selector" .= v1JobSpecSelector
      , "template" .= v1JobSpecTemplate
      , "ttlSecondsAfterFinished" .= v1JobSpecTtlSecondsAfterFinished
      ]


-- | Construct a value of type 'V1JobSpec' (by applying it's required fields, if any)
mkV1JobSpec
  :: V1PodTemplateSpec -- ^ 'v1JobSpecTemplate' 
  -> V1JobSpec
mkV1JobSpec v1JobSpecTemplate =
  V1JobSpec
  { v1JobSpecActiveDeadlineSeconds = Nothing
  , v1JobSpecBackoffLimit = Nothing
  , v1JobSpecCompletions = Nothing
  , v1JobSpecManualSelector = Nothing
  , v1JobSpecParallelism = Nothing
  , v1JobSpecSelector = Nothing
  , v1JobSpecTemplate
  , v1JobSpecTtlSecondsAfterFinished = Nothing
  }

-- ** V1JobStatus
-- | V1JobStatus
-- JobStatus represents the current state of a Job.
data V1JobStatus = V1JobStatus
  { v1JobStatusActive :: !(Maybe Int) -- ^ "active" - The number of actively running pods.
  , 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.
  , v1JobStatusConditions :: !(Maybe [V1JobCondition]) -- ^ "conditions" - The latest available observations of an object&#39;s current state. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
  , v1JobStatusFailed :: !(Maybe Int) -- ^ "failed" - The number of pods which reached phase Failed.
  , v1JobStatusStartTime :: !(Maybe DateTime) -- ^ "startTime" - Represents time when the job was acknowledged by the job controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.
  , v1JobStatusSucceeded :: !(Maybe Int) -- ^ "succeeded" - The number of pods which reached phase Succeeded.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1JobStatus
instance A.FromJSON V1JobStatus where
  parseJSON = A.withObject "V1JobStatus" $ \o ->
    V1JobStatus
      <$> (o .:? "active")
      <*> (o .:? "completionTime")
      <*> (o .:? "conditions")
      <*> (o .:? "failed")
      <*> (o .:? "startTime")
      <*> (o .:? "succeeded")

-- | ToJSON V1JobStatus
instance A.ToJSON V1JobStatus where
  toJSON V1JobStatus {..} =
   _omitNulls
      [ "active" .= v1JobStatusActive
      , "completionTime" .= v1JobStatusCompletionTime
      , "conditions" .= v1JobStatusConditions
      , "failed" .= v1JobStatusFailed
      , "startTime" .= v1JobStatusStartTime
      , "succeeded" .= v1JobStatusSucceeded
      ]


-- | Construct a value of type 'V1JobStatus' (by applying it's required fields, if any)
mkV1JobStatus
  :: V1JobStatus
mkV1JobStatus =
  V1JobStatus
  { v1JobStatusActive = Nothing
  , v1JobStatusCompletionTime = Nothing
  , v1JobStatusConditions = Nothing
  , v1JobStatusFailed = Nothing
  , v1JobStatusStartTime = Nothing
  , v1JobStatusSucceeded = Nothing
  }

-- ** V1KeyToPath
-- | V1KeyToPath
-- Maps a string key to a path within a volume.
data V1KeyToPath = V1KeyToPath
  { v1KeyToPathKey :: !(Text) -- ^ /Required/ "key" - The key to project.
  , v1KeyToPathMode :: !(Maybe Int) -- ^ "mode" - Optional: mode bits to use on this file, must be a value between 0 and 0777. 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.
  , v1KeyToPathPath :: !(Text) -- ^ /Required/ "path" - 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1KeyToPath
instance A.FromJSON V1KeyToPath where
  parseJSON = A.withObject "V1KeyToPath" $ \o ->
    V1KeyToPath
      <$> (o .:  "key")
      <*> (o .:? "mode")
      <*> (o .:  "path")

-- | ToJSON V1KeyToPath
instance A.ToJSON V1KeyToPath where
  toJSON V1KeyToPath {..} =
   _omitNulls
      [ "key" .= v1KeyToPathKey
      , "mode" .= v1KeyToPathMode
      , "path" .= v1KeyToPathPath
      ]


-- | Construct a value of type 'V1KeyToPath' (by applying it's required fields, if any)
mkV1KeyToPath
  :: Text -- ^ 'v1KeyToPathKey': The key to project.
  -> Text -- ^ 'v1KeyToPathPath': 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 v1KeyToPathKey v1KeyToPathPath =
  V1KeyToPath
  { v1KeyToPathKey
  , v1KeyToPathMode = Nothing
  , 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
  { v1LabelSelectorMatchExpressions :: !(Maybe [V1LabelSelectorRequirement]) -- ^ "matchExpressions" - matchExpressions is a list of label selector requirements. The requirements are ANDed.
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1LabelSelector
instance A.FromJSON V1LabelSelector where
  parseJSON = A.withObject "V1LabelSelector" $ \o ->
    V1LabelSelector
      <$> (o .:? "matchExpressions")
      <*> (o .:? "matchLabels")

-- | ToJSON V1LabelSelector
instance A.ToJSON V1LabelSelector where
  toJSON V1LabelSelector {..} =
   _omitNulls
      [ "matchExpressions" .= v1LabelSelectorMatchExpressions
      , "matchLabels" .= v1LabelSelectorMatchLabels
      ]


-- | Construct a value of type 'V1LabelSelector' (by applying it's required fields, if any)
mkV1LabelSelector
  :: V1LabelSelector
mkV1LabelSelector =
  V1LabelSelector
  { v1LabelSelectorMatchExpressions = Nothing
  , v1LabelSelectorMatchLabels = 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
  { v1LabelSelectorRequirementKey :: !(Text) -- ^ /Required/ "key" - key is the label key that the selector applies to.
  , v1LabelSelectorRequirementOperator :: !(Text) -- ^ /Required/ "operator" - operator represents a key&#39;s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1LabelSelectorRequirement
instance A.FromJSON V1LabelSelectorRequirement where
  parseJSON = A.withObject "V1LabelSelectorRequirement" $ \o ->
    V1LabelSelectorRequirement
      <$> (o .:  "key")
      <*> (o .:  "operator")
      <*> (o .:? "values")

-- | ToJSON V1LabelSelectorRequirement
instance A.ToJSON V1LabelSelectorRequirement where
  toJSON V1LabelSelectorRequirement {..} =
   _omitNulls
      [ "key" .= v1LabelSelectorRequirementKey
      , "operator" .= v1LabelSelectorRequirementOperator
      , "values" .= 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 v1LabelSelectorRequirementKey v1LabelSelectorRequirementOperator =
  V1LabelSelectorRequirement
  { v1LabelSelectorRequirementKey
  , v1LabelSelectorRequirementOperator
  , v1LabelSelectorRequirementValues = Nothing
  }

-- ** V1Lease
-- | V1Lease
-- Lease defines a lease concept.
data V1Lease = V1Lease
  { 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1LeaseMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1LeaseSpec :: !(Maybe V1LeaseSpec) -- ^ "spec"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1Lease
instance A.FromJSON V1Lease where
  parseJSON = A.withObject "V1Lease" $ \o ->
    V1Lease
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")

-- | ToJSON V1Lease
instance A.ToJSON V1Lease where
  toJSON V1Lease {..} =
   _omitNulls
      [ "apiVersion" .= v1LeaseApiVersion
      , "kind" .= v1LeaseKind
      , "metadata" .= v1LeaseMetadata
      , "spec" .= v1LeaseSpec
      ]


-- | Construct a value of type 'V1Lease' (by applying it's required fields, if any)
mkV1Lease
  :: V1Lease
mkV1Lease =
  V1Lease
  { v1LeaseApiVersion = Nothing
  , v1LeaseKind = Nothing
  , v1LeaseMetadata = Nothing
  , v1LeaseSpec = Nothing
  }

-- ** V1LeaseList
-- | V1LeaseList
-- LeaseList is a list of Lease objects.
data V1LeaseList = V1LeaseList
  { 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/api-conventions.md#resources
  , v1LeaseListItems :: !([V1Lease]) -- ^ /Required/ "items" - Items is a list of schema objects.
  , 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/api-conventions.md#types-kinds
  , v1LeaseListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1LeaseList
instance A.FromJSON V1LeaseList where
  parseJSON = A.withObject "V1LeaseList" $ \o ->
    V1LeaseList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1LeaseList
instance A.ToJSON V1LeaseList where
  toJSON V1LeaseList {..} =
   _omitNulls
      [ "apiVersion" .= v1LeaseListApiVersion
      , "items" .= v1LeaseListItems
      , "kind" .= v1LeaseListKind
      , "metadata" .= 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 v1LeaseListItems =
  V1LeaseList
  { v1LeaseListApiVersion = Nothing
  , v1LeaseListItems
  , v1LeaseListKind = Nothing
  , v1LeaseListMetadata = Nothing
  }

-- ** V1LeaseSpec
-- | V1LeaseSpec
-- LeaseSpec is a specification of a Lease.
data V1LeaseSpec = V1LeaseSpec
  { v1LeaseSpecAcquireTime :: !(Maybe DateTime) -- ^ "acquireTime" - acquireTime is a time when the current lease was acquired.
  , v1LeaseSpecHolderIdentity :: !(Maybe Text) -- ^ "holderIdentity" - holderIdentity contains the identity of the holder of a current lease.
  , v1LeaseSpecLeaseDurationSeconds :: !(Maybe Int) -- ^ "leaseDurationSeconds" - leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measure against time of last observed RenewTime.
  , v1LeaseSpecLeaseTransitions :: !(Maybe Int) -- ^ "leaseTransitions" - leaseTransitions is the number of transitions of a lease between holders.
  , v1LeaseSpecRenewTime :: !(Maybe DateTime) -- ^ "renewTime" - renewTime is a time when the current holder of a lease has last updated the lease.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1LeaseSpec
instance A.FromJSON V1LeaseSpec where
  parseJSON = A.withObject "V1LeaseSpec" $ \o ->
    V1LeaseSpec
      <$> (o .:? "acquireTime")
      <*> (o .:? "holderIdentity")
      <*> (o .:? "leaseDurationSeconds")
      <*> (o .:? "leaseTransitions")
      <*> (o .:? "renewTime")

-- | ToJSON V1LeaseSpec
instance A.ToJSON V1LeaseSpec where
  toJSON V1LeaseSpec {..} =
   _omitNulls
      [ "acquireTime" .= v1LeaseSpecAcquireTime
      , "holderIdentity" .= v1LeaseSpecHolderIdentity
      , "leaseDurationSeconds" .= v1LeaseSpecLeaseDurationSeconds
      , "leaseTransitions" .= v1LeaseSpecLeaseTransitions
      , "renewTime" .= v1LeaseSpecRenewTime
      ]


-- | Construct a value of type 'V1LeaseSpec' (by applying it's required fields, if any)
mkV1LeaseSpec
  :: V1LeaseSpec
mkV1LeaseSpec =
  V1LeaseSpec
  { v1LeaseSpecAcquireTime = Nothing
  , v1LeaseSpecHolderIdentity = Nothing
  , v1LeaseSpecLeaseDurationSeconds = Nothing
  , v1LeaseSpecLeaseTransitions = Nothing
  , v1LeaseSpecRenewTime = 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
  { v1LifecyclePostStart :: !(Maybe V1Handler) -- ^ "postStart"
  , v1LifecyclePreStop :: !(Maybe V1Handler) -- ^ "preStop"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1Lifecycle
instance A.FromJSON V1Lifecycle where
  parseJSON = A.withObject "V1Lifecycle" $ \o ->
    V1Lifecycle
      <$> (o .:? "postStart")
      <*> (o .:? "preStop")

-- | ToJSON V1Lifecycle
instance A.ToJSON V1Lifecycle where
  toJSON V1Lifecycle {..} =
   _omitNulls
      [ "postStart" .= v1LifecyclePostStart
      , "preStop" .= v1LifecyclePreStop
      ]


-- | Construct a value of type 'V1Lifecycle' (by applying it's required fields, if any)
mkV1Lifecycle
  :: V1Lifecycle
mkV1Lifecycle =
  V1Lifecycle
  { v1LifecyclePostStart = Nothing
  , v1LifecyclePreStop = Nothing
  }

-- ** V1LimitRange
-- | V1LimitRange
-- LimitRange sets resource usage limits for each kind of resource in a Namespace.
data V1LimitRange = V1LimitRange
  { 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1LimitRangeMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1LimitRangeSpec :: !(Maybe V1LimitRangeSpec) -- ^ "spec"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1LimitRange
instance A.FromJSON V1LimitRange where
  parseJSON = A.withObject "V1LimitRange" $ \o ->
    V1LimitRange
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")

-- | ToJSON V1LimitRange
instance A.ToJSON V1LimitRange where
  toJSON V1LimitRange {..} =
   _omitNulls
      [ "apiVersion" .= v1LimitRangeApiVersion
      , "kind" .= v1LimitRangeKind
      , "metadata" .= v1LimitRangeMetadata
      , "spec" .= v1LimitRangeSpec
      ]


-- | Construct a value of type 'V1LimitRange' (by applying it's required fields, if any)
mkV1LimitRange
  :: V1LimitRange
mkV1LimitRange =
  V1LimitRange
  { v1LimitRangeApiVersion = Nothing
  , v1LimitRangeKind = Nothing
  , v1LimitRangeMetadata = Nothing
  , v1LimitRangeSpec = Nothing
  }

-- ** V1LimitRangeItem
-- | V1LimitRangeItem
-- LimitRangeItem defines a min/max usage limit for any resource that matches on kind.
data V1LimitRangeItem = V1LimitRangeItem
  { v1LimitRangeItemDefault :: !(Maybe (Map.Map String Quantity)) -- ^ "default" - Default resource requirement limit value by resource name if resource limit is omitted.
  , v1LimitRangeItemDefaultRequest :: !(Maybe (Map.Map String Quantity)) -- ^ "defaultRequest" - DefaultRequest is the default resource requirement request value by resource name if resource request is omitted.
  , v1LimitRangeItemMax :: !(Maybe (Map.Map String Quantity)) -- ^ "max" - Max usage constraints on this kind by resource name.
  , 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.
  , v1LimitRangeItemMin :: !(Maybe (Map.Map String Quantity)) -- ^ "min" - Min usage constraints on this kind by resource name.
  , v1LimitRangeItemType :: !(Maybe Text) -- ^ "type" - Type of resource that this limit applies to.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1LimitRangeItem
instance A.FromJSON V1LimitRangeItem where
  parseJSON = A.withObject "V1LimitRangeItem" $ \o ->
    V1LimitRangeItem
      <$> (o .:? "default")
      <*> (o .:? "defaultRequest")
      <*> (o .:? "max")
      <*> (o .:? "maxLimitRequestRatio")
      <*> (o .:? "min")
      <*> (o .:? "type")

-- | ToJSON V1LimitRangeItem
instance A.ToJSON V1LimitRangeItem where
  toJSON V1LimitRangeItem {..} =
   _omitNulls
      [ "default" .= v1LimitRangeItemDefault
      , "defaultRequest" .= v1LimitRangeItemDefaultRequest
      , "max" .= v1LimitRangeItemMax
      , "maxLimitRequestRatio" .= v1LimitRangeItemMaxLimitRequestRatio
      , "min" .= v1LimitRangeItemMin
      , "type" .= v1LimitRangeItemType
      ]


-- | Construct a value of type 'V1LimitRangeItem' (by applying it's required fields, if any)
mkV1LimitRangeItem
  :: V1LimitRangeItem
mkV1LimitRangeItem =
  V1LimitRangeItem
  { v1LimitRangeItemDefault = Nothing
  , v1LimitRangeItemDefaultRequest = Nothing
  , v1LimitRangeItemMax = Nothing
  , v1LimitRangeItemMaxLimitRequestRatio = Nothing
  , v1LimitRangeItemMin = Nothing
  , v1LimitRangeItemType = Nothing
  }

-- ** V1LimitRangeList
-- | V1LimitRangeList
-- LimitRangeList is a list of LimitRange items.
data V1LimitRangeList = V1LimitRangeList
  { 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/api-conventions.md#resources
  , v1LimitRangeListItems :: !([V1LimitRange]) -- ^ /Required/ "items" - Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
  , 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/api-conventions.md#types-kinds
  , v1LimitRangeListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1LimitRangeList
instance A.FromJSON V1LimitRangeList where
  parseJSON = A.withObject "V1LimitRangeList" $ \o ->
    V1LimitRangeList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1LimitRangeList
instance A.ToJSON V1LimitRangeList where
  toJSON V1LimitRangeList {..} =
   _omitNulls
      [ "apiVersion" .= v1LimitRangeListApiVersion
      , "items" .= v1LimitRangeListItems
      , "kind" .= v1LimitRangeListKind
      , "metadata" .= 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-compute-resources-container/
  -> V1LimitRangeList
mkV1LimitRangeList v1LimitRangeListItems =
  V1LimitRangeList
  { v1LimitRangeListApiVersion = Nothing
  , v1LimitRangeListItems
  , v1LimitRangeListKind = Nothing
  , v1LimitRangeListMetadata = Nothing
  }

-- ** V1LimitRangeSpec
-- | V1LimitRangeSpec
-- LimitRangeSpec defines a min/max usage limit for resources that match on kind.
data V1LimitRangeSpec = V1LimitRangeSpec
  { v1LimitRangeSpecLimits :: !([V1LimitRangeItem]) -- ^ /Required/ "limits" - Limits is the list of LimitRangeItem objects that are enforced.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1LimitRangeSpec
instance A.FromJSON V1LimitRangeSpec where
  parseJSON = A.withObject "V1LimitRangeSpec" $ \o ->
    V1LimitRangeSpec
      <$> (o .:  "limits")

-- | ToJSON V1LimitRangeSpec
instance A.ToJSON V1LimitRangeSpec where
  toJSON V1LimitRangeSpec {..} =
   _omitNulls
      [ "limits" .= 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 v1LimitRangeSpecLimits =
  V1LimitRangeSpec
  { v1LimitRangeSpecLimits
  }

-- ** 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
  { 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.
  , 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/api-conventions.md#concurrency-control-and-consistency
  , v1ListMetaSelfLink :: !(Maybe Text) -- ^ "selfLink" - selfLink is a URL representing this object. Populated by the system. Read-only.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ListMeta
instance A.FromJSON V1ListMeta where
  parseJSON = A.withObject "V1ListMeta" $ \o ->
    V1ListMeta
      <$> (o .:? "continue")
      <*> (o .:? "resourceVersion")
      <*> (o .:? "selfLink")

-- | ToJSON V1ListMeta
instance A.ToJSON V1ListMeta where
  toJSON V1ListMeta {..} =
   _omitNulls
      [ "continue" .= v1ListMetaContinue
      , "resourceVersion" .= v1ListMetaResourceVersion
      , "selfLink" .= v1ListMetaSelfLink
      ]


-- | Construct a value of type 'V1ListMeta' (by applying it's required fields, if any)
mkV1ListMeta
  :: V1ListMeta
mkV1ListMeta =
  V1ListMeta
  { v1ListMetaContinue = Nothing
  , v1ListMetaResourceVersion = Nothing
  , v1ListMetaSelfLink = 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
  { v1LoadBalancerIngressHostname :: !(Maybe Text) -- ^ "hostname" - Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers)
  , v1LoadBalancerIngressIp :: !(Maybe Text) -- ^ "ip" - IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers)
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1LoadBalancerIngress
instance A.FromJSON V1LoadBalancerIngress where
  parseJSON = A.withObject "V1LoadBalancerIngress" $ \o ->
    V1LoadBalancerIngress
      <$> (o .:? "hostname")
      <*> (o .:? "ip")

-- | ToJSON V1LoadBalancerIngress
instance A.ToJSON V1LoadBalancerIngress where
  toJSON V1LoadBalancerIngress {..} =
   _omitNulls
      [ "hostname" .= v1LoadBalancerIngressHostname
      , "ip" .= v1LoadBalancerIngressIp
      ]


-- | Construct a value of type 'V1LoadBalancerIngress' (by applying it's required fields, if any)
mkV1LoadBalancerIngress
  :: V1LoadBalancerIngress
mkV1LoadBalancerIngress =
  V1LoadBalancerIngress
  { v1LoadBalancerIngressHostname = Nothing
  , v1LoadBalancerIngressIp = Nothing
  }

-- ** V1LoadBalancerStatus
-- | V1LoadBalancerStatus
-- LoadBalancerStatus represents the status of a load-balancer.
data V1LoadBalancerStatus = V1LoadBalancerStatus
  { 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1LoadBalancerStatus
instance A.FromJSON V1LoadBalancerStatus where
  parseJSON = A.withObject "V1LoadBalancerStatus" $ \o ->
    V1LoadBalancerStatus
      <$> (o .:? "ingress")

-- | ToJSON V1LoadBalancerStatus
instance A.ToJSON V1LoadBalancerStatus where
  toJSON V1LoadBalancerStatus {..} =
   _omitNulls
      [ "ingress" .= v1LoadBalancerStatusIngress
      ]


-- | Construct a value of type 'V1LoadBalancerStatus' (by applying it's required fields, if any)
mkV1LoadBalancerStatus
  :: V1LoadBalancerStatus
mkV1LoadBalancerStatus =
  V1LoadBalancerStatus
  { v1LoadBalancerStatusIngress = Nothing
  }

-- ** V1LocalObjectReference
-- | V1LocalObjectReference
-- LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.
data V1LocalObjectReference = V1LocalObjectReference
  { v1LocalObjectReferenceName :: !(Maybe Text) -- ^ "name" - Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1LocalObjectReference
instance A.FromJSON V1LocalObjectReference where
  parseJSON = A.withObject "V1LocalObjectReference" $ \o ->
    V1LocalObjectReference
      <$> (o .:? "name")

-- | ToJSON V1LocalObjectReference
instance A.ToJSON V1LocalObjectReference where
  toJSON V1LocalObjectReference {..} =
   _omitNulls
      [ "name" .= v1LocalObjectReferenceName
      ]


-- | Construct a value of type 'V1LocalObjectReference' (by applying it's required fields, if any)
mkV1LocalObjectReference
  :: V1LocalObjectReference
mkV1LocalObjectReference =
  V1LocalObjectReference
  { v1LocalObjectReferenceName = 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
  { 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1LocalSubjectAccessReviewMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1LocalSubjectAccessReviewSpec :: !(V1SubjectAccessReviewSpec) -- ^ /Required/ "spec"
  , v1LocalSubjectAccessReviewStatus :: !(Maybe V1SubjectAccessReviewStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1LocalSubjectAccessReview
instance A.FromJSON V1LocalSubjectAccessReview where
  parseJSON = A.withObject "V1LocalSubjectAccessReview" $ \o ->
    V1LocalSubjectAccessReview
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:  "spec")
      <*> (o .:? "status")

-- | ToJSON V1LocalSubjectAccessReview
instance A.ToJSON V1LocalSubjectAccessReview where
  toJSON V1LocalSubjectAccessReview {..} =
   _omitNulls
      [ "apiVersion" .= v1LocalSubjectAccessReviewApiVersion
      , "kind" .= v1LocalSubjectAccessReviewKind
      , "metadata" .= v1LocalSubjectAccessReviewMetadata
      , "spec" .= v1LocalSubjectAccessReviewSpec
      , "status" .= v1LocalSubjectAccessReviewStatus
      ]


-- | Construct a value of type 'V1LocalSubjectAccessReview' (by applying it's required fields, if any)
mkV1LocalSubjectAccessReview
  :: V1SubjectAccessReviewSpec -- ^ 'v1LocalSubjectAccessReviewSpec' 
  -> V1LocalSubjectAccessReview
mkV1LocalSubjectAccessReview v1LocalSubjectAccessReviewSpec =
  V1LocalSubjectAccessReview
  { v1LocalSubjectAccessReviewApiVersion = Nothing
  , v1LocalSubjectAccessReviewKind = Nothing
  , v1LocalSubjectAccessReviewMetadata = Nothing
  , v1LocalSubjectAccessReviewSpec
  , v1LocalSubjectAccessReviewStatus = Nothing
  }

-- ** V1LocalVolumeSource
-- | V1LocalVolumeSource
-- Local represents directly-attached storage with node affinity (Beta feature)
data V1LocalVolumeSource = V1LocalVolumeSource
  { v1LocalVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - 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 fileystem if unspecified.
  , v1LocalVolumeSourcePath :: !(Text) -- ^ /Required/ "path" - The full path to the volume on the node. It can be either a directory or block device (disk, partition, ...).
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1LocalVolumeSource
instance A.FromJSON V1LocalVolumeSource where
  parseJSON = A.withObject "V1LocalVolumeSource" $ \o ->
    V1LocalVolumeSource
      <$> (o .:? "fsType")
      <*> (o .:  "path")

-- | ToJSON V1LocalVolumeSource
instance A.ToJSON V1LocalVolumeSource where
  toJSON V1LocalVolumeSource {..} =
   _omitNulls
      [ "fsType" .= v1LocalVolumeSourceFsType
      , "path" .= v1LocalVolumeSourcePath
      ]


-- | Construct a value of type 'V1LocalVolumeSource' (by applying it's required fields, if any)
mkV1LocalVolumeSource
  :: Text -- ^ 'v1LocalVolumeSourcePath': The full path to the volume on the node. It can be either a directory or block device (disk, partition, ...).
  -> V1LocalVolumeSource
mkV1LocalVolumeSource v1LocalVolumeSourcePath =
  V1LocalVolumeSource
  { v1LocalVolumeSourceFsType = Nothing
  , 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
  { 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.
  , v1ManagedFieldsEntryFields :: !(Maybe A.Value) -- ^ "fields" - Fields identifies a set of fields.
  , v1ManagedFieldsEntryManager :: !(Maybe Text) -- ^ "manager" - Manager is an identifier of the workflow managing these fields.
  , 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;.
  , v1ManagedFieldsEntryTime :: !(Maybe DateTime) -- ^ "time" - Time is timestamp of when these fields were set. It should always be empty if Operation is &#39;Apply&#39;
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ManagedFieldsEntry
instance A.FromJSON V1ManagedFieldsEntry where
  parseJSON = A.withObject "V1ManagedFieldsEntry" $ \o ->
    V1ManagedFieldsEntry
      <$> (o .:? "apiVersion")
      <*> (o .:? "fields")
      <*> (o .:? "manager")
      <*> (o .:? "operation")
      <*> (o .:? "time")

-- | ToJSON V1ManagedFieldsEntry
instance A.ToJSON V1ManagedFieldsEntry where
  toJSON V1ManagedFieldsEntry {..} =
   _omitNulls
      [ "apiVersion" .= v1ManagedFieldsEntryApiVersion
      , "fields" .= v1ManagedFieldsEntryFields
      , "manager" .= v1ManagedFieldsEntryManager
      , "operation" .= v1ManagedFieldsEntryOperation
      , "time" .= v1ManagedFieldsEntryTime
      ]


-- | Construct a value of type 'V1ManagedFieldsEntry' (by applying it's required fields, if any)
mkV1ManagedFieldsEntry
  :: V1ManagedFieldsEntry
mkV1ManagedFieldsEntry =
  V1ManagedFieldsEntry
  { v1ManagedFieldsEntryApiVersion = Nothing
  , v1ManagedFieldsEntryFields = Nothing
  , v1ManagedFieldsEntryManager = Nothing
  , v1ManagedFieldsEntryOperation = Nothing
  , v1ManagedFieldsEntryTime = 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
  { v1NFSVolumeSourcePath :: !(Text) -- ^ /Required/ "path" - Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
  , 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
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1NFSVolumeSource
instance A.FromJSON V1NFSVolumeSource where
  parseJSON = A.withObject "V1NFSVolumeSource" $ \o ->
    V1NFSVolumeSource
      <$> (o .:  "path")
      <*> (o .:? "readOnly")
      <*> (o .:  "server")

-- | ToJSON V1NFSVolumeSource
instance A.ToJSON V1NFSVolumeSource where
  toJSON V1NFSVolumeSource {..} =
   _omitNulls
      [ "path" .= v1NFSVolumeSourcePath
      , "readOnly" .= v1NFSVolumeSourceReadOnly
      , "server" .= 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 v1NFSVolumeSourcePath v1NFSVolumeSourceServer =
  V1NFSVolumeSource
  { v1NFSVolumeSourcePath
  , v1NFSVolumeSourceReadOnly = Nothing
  , v1NFSVolumeSourceServer
  }

-- ** V1Namespace
-- | V1Namespace
-- Namespace provides a scope for Names. Use of multiple namespaces is optional.
data V1Namespace = V1Namespace
  { 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1NamespaceMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1NamespaceSpec :: !(Maybe V1NamespaceSpec) -- ^ "spec"
  , v1NamespaceStatus :: !(Maybe V1NamespaceStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1Namespace
instance A.FromJSON V1Namespace where
  parseJSON = A.withObject "V1Namespace" $ \o ->
    V1Namespace
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON V1Namespace
instance A.ToJSON V1Namespace where
  toJSON V1Namespace {..} =
   _omitNulls
      [ "apiVersion" .= v1NamespaceApiVersion
      , "kind" .= v1NamespaceKind
      , "metadata" .= v1NamespaceMetadata
      , "spec" .= v1NamespaceSpec
      , "status" .= v1NamespaceStatus
      ]


-- | Construct a value of type 'V1Namespace' (by applying it's required fields, if any)
mkV1Namespace
  :: V1Namespace
mkV1Namespace =
  V1Namespace
  { v1NamespaceApiVersion = Nothing
  , v1NamespaceKind = Nothing
  , v1NamespaceMetadata = Nothing
  , v1NamespaceSpec = Nothing
  , v1NamespaceStatus = Nothing
  }

-- ** V1NamespaceList
-- | V1NamespaceList
-- NamespaceList is a list of Namespaces.
data V1NamespaceList = V1NamespaceList
  { 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/api-conventions.md#resources
  , 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/
  , 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/api-conventions.md#types-kinds
  , v1NamespaceListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1NamespaceList
instance A.FromJSON V1NamespaceList where
  parseJSON = A.withObject "V1NamespaceList" $ \o ->
    V1NamespaceList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1NamespaceList
instance A.ToJSON V1NamespaceList where
  toJSON V1NamespaceList {..} =
   _omitNulls
      [ "apiVersion" .= v1NamespaceListApiVersion
      , "items" .= v1NamespaceListItems
      , "kind" .= v1NamespaceListKind
      , "metadata" .= 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 v1NamespaceListItems =
  V1NamespaceList
  { v1NamespaceListApiVersion = Nothing
  , v1NamespaceListItems
  , v1NamespaceListKind = Nothing
  , v1NamespaceListMetadata = Nothing
  }

-- ** V1NamespaceSpec
-- | V1NamespaceSpec
-- NamespaceSpec describes the attributes on a Namespace.
data V1NamespaceSpec = V1NamespaceSpec
  { 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1NamespaceSpec
instance A.FromJSON V1NamespaceSpec where
  parseJSON = A.withObject "V1NamespaceSpec" $ \o ->
    V1NamespaceSpec
      <$> (o .:? "finalizers")

-- | ToJSON V1NamespaceSpec
instance A.ToJSON V1NamespaceSpec where
  toJSON V1NamespaceSpec {..} =
   _omitNulls
      [ "finalizers" .= v1NamespaceSpecFinalizers
      ]


-- | Construct a value of type 'V1NamespaceSpec' (by applying it's required fields, if any)
mkV1NamespaceSpec
  :: V1NamespaceSpec
mkV1NamespaceSpec =
  V1NamespaceSpec
  { v1NamespaceSpecFinalizers = Nothing
  }

-- ** V1NamespaceStatus
-- | V1NamespaceStatus
-- NamespaceStatus is information about the current status of a Namespace.
data V1NamespaceStatus = V1NamespaceStatus
  { v1NamespaceStatusPhase :: !(Maybe Text) -- ^ "phase" - Phase is the current lifecycle phase of the namespace. More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1NamespaceStatus
instance A.FromJSON V1NamespaceStatus where
  parseJSON = A.withObject "V1NamespaceStatus" $ \o ->
    V1NamespaceStatus
      <$> (o .:? "phase")

-- | ToJSON V1NamespaceStatus
instance A.ToJSON V1NamespaceStatus where
  toJSON V1NamespaceStatus {..} =
   _omitNulls
      [ "phase" .= v1NamespaceStatusPhase
      ]


-- | Construct a value of type 'V1NamespaceStatus' (by applying it's required fields, if any)
mkV1NamespaceStatus
  :: V1NamespaceStatus
mkV1NamespaceStatus =
  V1NamespaceStatus
  { v1NamespaceStatusPhase = Nothing
  }

-- ** V1NetworkPolicy
-- | V1NetworkPolicy
-- NetworkPolicy describes what network traffic is allowed for a set of Pods
data V1NetworkPolicy = V1NetworkPolicy
  { 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1NetworkPolicyMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1NetworkPolicySpec :: !(Maybe V1NetworkPolicySpec) -- ^ "spec"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1NetworkPolicy
instance A.FromJSON V1NetworkPolicy where
  parseJSON = A.withObject "V1NetworkPolicy" $ \o ->
    V1NetworkPolicy
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")

-- | ToJSON V1NetworkPolicy
instance A.ToJSON V1NetworkPolicy where
  toJSON V1NetworkPolicy {..} =
   _omitNulls
      [ "apiVersion" .= v1NetworkPolicyApiVersion
      , "kind" .= v1NetworkPolicyKind
      , "metadata" .= v1NetworkPolicyMetadata
      , "spec" .= v1NetworkPolicySpec
      ]


-- | Construct a value of type 'V1NetworkPolicy' (by applying it's required fields, if any)
mkV1NetworkPolicy
  :: V1NetworkPolicy
mkV1NetworkPolicy =
  V1NetworkPolicy
  { v1NetworkPolicyApiVersion = Nothing
  , v1NetworkPolicyKind = Nothing
  , v1NetworkPolicyMetadata = Nothing
  , v1NetworkPolicySpec = 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
  { v1NetworkPolicyEgressRulePorts :: !(Maybe [V1NetworkPolicyPort]) -- ^ "ports" - 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.
  , v1NetworkPolicyEgressRuleTo :: !(Maybe [V1NetworkPolicyPeer]) -- ^ "to" - 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1NetworkPolicyEgressRule
instance A.FromJSON V1NetworkPolicyEgressRule where
  parseJSON = A.withObject "V1NetworkPolicyEgressRule" $ \o ->
    V1NetworkPolicyEgressRule
      <$> (o .:? "ports")
      <*> (o .:? "to")

-- | ToJSON V1NetworkPolicyEgressRule
instance A.ToJSON V1NetworkPolicyEgressRule where
  toJSON V1NetworkPolicyEgressRule {..} =
   _omitNulls
      [ "ports" .= v1NetworkPolicyEgressRulePorts
      , "to" .= v1NetworkPolicyEgressRuleTo
      ]


-- | Construct a value of type 'V1NetworkPolicyEgressRule' (by applying it's required fields, if any)
mkV1NetworkPolicyEgressRule
  :: V1NetworkPolicyEgressRule
mkV1NetworkPolicyEgressRule =
  V1NetworkPolicyEgressRule
  { v1NetworkPolicyEgressRulePorts = Nothing
  , v1NetworkPolicyEgressRuleTo = 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
  { v1NetworkPolicyIngressRuleFrom :: !(Maybe [V1NetworkPolicyPeer]) -- ^ "from" - 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 on item, this rule allows traffic only if the traffic matches at least one item in the from list.
  , v1NetworkPolicyIngressRulePorts :: !(Maybe [V1NetworkPolicyPort]) -- ^ "ports" - 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1NetworkPolicyIngressRule
instance A.FromJSON V1NetworkPolicyIngressRule where
  parseJSON = A.withObject "V1NetworkPolicyIngressRule" $ \o ->
    V1NetworkPolicyIngressRule
      <$> (o .:? "from")
      <*> (o .:? "ports")

-- | ToJSON V1NetworkPolicyIngressRule
instance A.ToJSON V1NetworkPolicyIngressRule where
  toJSON V1NetworkPolicyIngressRule {..} =
   _omitNulls
      [ "from" .= v1NetworkPolicyIngressRuleFrom
      , "ports" .= v1NetworkPolicyIngressRulePorts
      ]


-- | Construct a value of type 'V1NetworkPolicyIngressRule' (by applying it's required fields, if any)
mkV1NetworkPolicyIngressRule
  :: V1NetworkPolicyIngressRule
mkV1NetworkPolicyIngressRule =
  V1NetworkPolicyIngressRule
  { v1NetworkPolicyIngressRuleFrom = Nothing
  , v1NetworkPolicyIngressRulePorts = Nothing
  }

-- ** V1NetworkPolicyList
-- | V1NetworkPolicyList
-- NetworkPolicyList is a list of NetworkPolicy objects.
data V1NetworkPolicyList = V1NetworkPolicyList
  { 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/api-conventions.md#resources
  , v1NetworkPolicyListItems :: !([V1NetworkPolicy]) -- ^ /Required/ "items" - Items is a list of schema objects.
  , 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/api-conventions.md#types-kinds
  , v1NetworkPolicyListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1NetworkPolicyList
instance A.FromJSON V1NetworkPolicyList where
  parseJSON = A.withObject "V1NetworkPolicyList" $ \o ->
    V1NetworkPolicyList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1NetworkPolicyList
instance A.ToJSON V1NetworkPolicyList where
  toJSON V1NetworkPolicyList {..} =
   _omitNulls
      [ "apiVersion" .= v1NetworkPolicyListApiVersion
      , "items" .= v1NetworkPolicyListItems
      , "kind" .= v1NetworkPolicyListKind
      , "metadata" .= 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 v1NetworkPolicyListItems =
  V1NetworkPolicyList
  { v1NetworkPolicyListApiVersion = Nothing
  , v1NetworkPolicyListItems
  , v1NetworkPolicyListKind = Nothing
  , v1NetworkPolicyListMetadata = Nothing
  }

-- ** V1NetworkPolicyPeer
-- | V1NetworkPolicyPeer
-- NetworkPolicyPeer describes a peer to allow traffic from. Only certain combinations of fields are allowed
data V1NetworkPolicyPeer = V1NetworkPolicyPeer
  { v1NetworkPolicyPeerIpBlock :: !(Maybe V1IPBlock) -- ^ "ipBlock"
  , v1NetworkPolicyPeerNamespaceSelector :: !(Maybe V1LabelSelector) -- ^ "namespaceSelector"
  , v1NetworkPolicyPeerPodSelector :: !(Maybe V1LabelSelector) -- ^ "podSelector"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1NetworkPolicyPeer
instance A.FromJSON V1NetworkPolicyPeer where
  parseJSON = A.withObject "V1NetworkPolicyPeer" $ \o ->
    V1NetworkPolicyPeer
      <$> (o .:? "ipBlock")
      <*> (o .:? "namespaceSelector")
      <*> (o .:? "podSelector")

-- | ToJSON V1NetworkPolicyPeer
instance A.ToJSON V1NetworkPolicyPeer where
  toJSON V1NetworkPolicyPeer {..} =
   _omitNulls
      [ "ipBlock" .= v1NetworkPolicyPeerIpBlock
      , "namespaceSelector" .= v1NetworkPolicyPeerNamespaceSelector
      , "podSelector" .= v1NetworkPolicyPeerPodSelector
      ]


-- | Construct a value of type 'V1NetworkPolicyPeer' (by applying it's required fields, if any)
mkV1NetworkPolicyPeer
  :: V1NetworkPolicyPeer
mkV1NetworkPolicyPeer =
  V1NetworkPolicyPeer
  { v1NetworkPolicyPeerIpBlock = Nothing
  , v1NetworkPolicyPeerNamespaceSelector = Nothing
  , v1NetworkPolicyPeerPodSelector = Nothing
  }

-- ** V1NetworkPolicyPort
-- | V1NetworkPolicyPort
-- NetworkPolicyPort describes a port to allow traffic on
data V1NetworkPolicyPort = V1NetworkPolicyPort
  { v1NetworkPolicyPortPort :: !(Maybe IntOrString) -- ^ "port"
  , v1NetworkPolicyPortProtocol :: !(Maybe Text) -- ^ "protocol" - The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1NetworkPolicyPort
instance A.FromJSON V1NetworkPolicyPort where
  parseJSON = A.withObject "V1NetworkPolicyPort" $ \o ->
    V1NetworkPolicyPort
      <$> (o .:? "port")
      <*> (o .:? "protocol")

-- | ToJSON V1NetworkPolicyPort
instance A.ToJSON V1NetworkPolicyPort where
  toJSON V1NetworkPolicyPort {..} =
   _omitNulls
      [ "port" .= v1NetworkPolicyPortPort
      , "protocol" .= v1NetworkPolicyPortProtocol
      ]


-- | Construct a value of type 'V1NetworkPolicyPort' (by applying it's required fields, if any)
mkV1NetworkPolicyPort
  :: V1NetworkPolicyPort
mkV1NetworkPolicyPort =
  V1NetworkPolicyPort
  { v1NetworkPolicyPortPort = Nothing
  , v1NetworkPolicyPortProtocol = Nothing
  }

-- ** V1NetworkPolicySpec
-- | V1NetworkPolicySpec
-- NetworkPolicySpec provides the specification of a NetworkPolicy
data V1NetworkPolicySpec = V1NetworkPolicySpec
  { v1NetworkPolicySpecEgress :: !(Maybe [V1NetworkPolicyEgressRule]) -- ^ "egress" - 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
  , v1NetworkPolicySpecIngress :: !(Maybe [V1NetworkPolicyIngressRule]) -- ^ "ingress" - 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)
  , v1NetworkPolicySpecPodSelector :: !(V1LabelSelector) -- ^ /Required/ "podSelector"
  , v1NetworkPolicySpecPolicyTypes :: !(Maybe [Text]) -- ^ "policyTypes" - List of rule types that the NetworkPolicy relates to. Valid options are \&quot;Ingress\&quot;, \&quot;Egress\&quot;, or \&quot;Ingress,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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1NetworkPolicySpec
instance A.FromJSON V1NetworkPolicySpec where
  parseJSON = A.withObject "V1NetworkPolicySpec" $ \o ->
    V1NetworkPolicySpec
      <$> (o .:? "egress")
      <*> (o .:? "ingress")
      <*> (o .:  "podSelector")
      <*> (o .:? "policyTypes")

-- | ToJSON V1NetworkPolicySpec
instance A.ToJSON V1NetworkPolicySpec where
  toJSON V1NetworkPolicySpec {..} =
   _omitNulls
      [ "egress" .= v1NetworkPolicySpecEgress
      , "ingress" .= v1NetworkPolicySpecIngress
      , "podSelector" .= v1NetworkPolicySpecPodSelector
      , "policyTypes" .= v1NetworkPolicySpecPolicyTypes
      ]


-- | Construct a value of type 'V1NetworkPolicySpec' (by applying it's required fields, if any)
mkV1NetworkPolicySpec
  :: V1LabelSelector -- ^ 'v1NetworkPolicySpecPodSelector' 
  -> V1NetworkPolicySpec
mkV1NetworkPolicySpec v1NetworkPolicySpecPodSelector =
  V1NetworkPolicySpec
  { v1NetworkPolicySpecEgress = Nothing
  , v1NetworkPolicySpecIngress = Nothing
  , v1NetworkPolicySpecPodSelector
  , v1NetworkPolicySpecPolicyTypes = 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
  { 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1NodeMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1NodeSpec :: !(Maybe V1NodeSpec) -- ^ "spec"
  , v1NodeStatus :: !(Maybe V1NodeStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1Node
instance A.FromJSON V1Node where
  parseJSON = A.withObject "V1Node" $ \o ->
    V1Node
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON V1Node
instance A.ToJSON V1Node where
  toJSON V1Node {..} =
   _omitNulls
      [ "apiVersion" .= v1NodeApiVersion
      , "kind" .= v1NodeKind
      , "metadata" .= v1NodeMetadata
      , "spec" .= v1NodeSpec
      , "status" .= v1NodeStatus
      ]


-- | Construct a value of type 'V1Node' (by applying it's required fields, if any)
mkV1Node
  :: V1Node
mkV1Node =
  V1Node
  { v1NodeApiVersion = Nothing
  , v1NodeKind = Nothing
  , v1NodeMetadata = Nothing
  , v1NodeSpec = Nothing
  , v1NodeStatus = Nothing
  }

-- ** V1NodeAddress
-- | V1NodeAddress
-- NodeAddress contains information for the node's address.
data V1NodeAddress = V1NodeAddress
  { v1NodeAddressAddress :: !(Text) -- ^ /Required/ "address" - The node address.
  , v1NodeAddressType :: !(Text) -- ^ /Required/ "type" - Node address type, one of Hostname, ExternalIP or InternalIP.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1NodeAddress
instance A.FromJSON V1NodeAddress where
  parseJSON = A.withObject "V1NodeAddress" $ \o ->
    V1NodeAddress
      <$> (o .:  "address")
      <*> (o .:  "type")

-- | ToJSON V1NodeAddress
instance A.ToJSON V1NodeAddress where
  toJSON V1NodeAddress {..} =
   _omitNulls
      [ "address" .= v1NodeAddressAddress
      , "type" .= 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 v1NodeAddressAddress v1NodeAddressType =
  V1NodeAddress
  { v1NodeAddressAddress
  , v1NodeAddressType
  }

-- ** V1NodeAffinity
-- | V1NodeAffinity
-- Node affinity is a group of node affinity scheduling rules.
data V1NodeAffinity = V1NodeAffinity
  { 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.
  , v1NodeAffinityRequiredDuringSchedulingIgnoredDuringExecution :: !(Maybe V1NodeSelector) -- ^ "requiredDuringSchedulingIgnoredDuringExecution"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1NodeAffinity
instance A.FromJSON V1NodeAffinity where
  parseJSON = A.withObject "V1NodeAffinity" $ \o ->
    V1NodeAffinity
      <$> (o .:? "preferredDuringSchedulingIgnoredDuringExecution")
      <*> (o .:? "requiredDuringSchedulingIgnoredDuringExecution")

-- | ToJSON V1NodeAffinity
instance A.ToJSON V1NodeAffinity where
  toJSON V1NodeAffinity {..} =
   _omitNulls
      [ "preferredDuringSchedulingIgnoredDuringExecution" .= v1NodeAffinityPreferredDuringSchedulingIgnoredDuringExecution
      , "requiredDuringSchedulingIgnoredDuringExecution" .= v1NodeAffinityRequiredDuringSchedulingIgnoredDuringExecution
      ]


-- | Construct a value of type 'V1NodeAffinity' (by applying it's required fields, if any)
mkV1NodeAffinity
  :: V1NodeAffinity
mkV1NodeAffinity =
  V1NodeAffinity
  { v1NodeAffinityPreferredDuringSchedulingIgnoredDuringExecution = Nothing
  , v1NodeAffinityRequiredDuringSchedulingIgnoredDuringExecution = Nothing
  }

-- ** V1NodeCondition
-- | V1NodeCondition
-- NodeCondition contains condition information for a node.
data V1NodeCondition = V1NodeCondition
  { v1NodeConditionLastHeartbeatTime :: !(Maybe DateTime) -- ^ "lastHeartbeatTime" - Last time we got an update on a given condition.
  , v1NodeConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - Last time the condition transit from one status to another.
  , v1NodeConditionMessage :: !(Maybe Text) -- ^ "message" - Human readable message indicating details about last transition.
  , v1NodeConditionReason :: !(Maybe Text) -- ^ "reason" - (brief) reason for the condition&#39;s last transition.
  , v1NodeConditionStatus :: !(Text) -- ^ /Required/ "status" - Status of the condition, one of True, False, Unknown.
  , v1NodeConditionType :: !(Text) -- ^ /Required/ "type" - Type of node condition.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1NodeCondition
instance A.FromJSON V1NodeCondition where
  parseJSON = A.withObject "V1NodeCondition" $ \o ->
    V1NodeCondition
      <$> (o .:? "lastHeartbeatTime")
      <*> (o .:? "lastTransitionTime")
      <*> (o .:? "message")
      <*> (o .:? "reason")
      <*> (o .:  "status")
      <*> (o .:  "type")

-- | ToJSON V1NodeCondition
instance A.ToJSON V1NodeCondition where
  toJSON V1NodeCondition {..} =
   _omitNulls
      [ "lastHeartbeatTime" .= v1NodeConditionLastHeartbeatTime
      , "lastTransitionTime" .= v1NodeConditionLastTransitionTime
      , "message" .= v1NodeConditionMessage
      , "reason" .= v1NodeConditionReason
      , "status" .= v1NodeConditionStatus
      , "type" .= 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 v1NodeConditionStatus v1NodeConditionType =
  V1NodeCondition
  { v1NodeConditionLastHeartbeatTime = Nothing
  , v1NodeConditionLastTransitionTime = Nothing
  , v1NodeConditionMessage = Nothing
  , v1NodeConditionReason = Nothing
  , v1NodeConditionStatus
  , v1NodeConditionType
  }

-- ** V1NodeConfigSource
-- | V1NodeConfigSource
-- NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil.
data V1NodeConfigSource = V1NodeConfigSource
  { v1NodeConfigSourceConfigMap :: !(Maybe V1ConfigMapNodeConfigSource) -- ^ "configMap"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1NodeConfigSource
instance A.FromJSON V1NodeConfigSource where
  parseJSON = A.withObject "V1NodeConfigSource" $ \o ->
    V1NodeConfigSource
      <$> (o .:? "configMap")

-- | ToJSON V1NodeConfigSource
instance A.ToJSON V1NodeConfigSource where
  toJSON V1NodeConfigSource {..} =
   _omitNulls
      [ "configMap" .= v1NodeConfigSourceConfigMap
      ]


-- | Construct a value of type 'V1NodeConfigSource' (by applying it's required fields, if any)
mkV1NodeConfigSource
  :: V1NodeConfigSource
mkV1NodeConfigSource =
  V1NodeConfigSource
  { v1NodeConfigSourceConfigMap = Nothing
  }

-- ** V1NodeConfigStatus
-- | V1NodeConfigStatus
-- NodeConfigStatus describes the status of the config assigned by Node.Spec.ConfigSource.
data V1NodeConfigStatus = V1NodeConfigStatus
  { v1NodeConfigStatusActive :: !(Maybe V1NodeConfigSource) -- ^ "active"
  , v1NodeConfigStatusAssigned :: !(Maybe V1NodeConfigSource) -- ^ "assigned"
  , 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.
  , v1NodeConfigStatusLastKnownGood :: !(Maybe V1NodeConfigSource) -- ^ "lastKnownGood"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1NodeConfigStatus
instance A.FromJSON V1NodeConfigStatus where
  parseJSON = A.withObject "V1NodeConfigStatus" $ \o ->
    V1NodeConfigStatus
      <$> (o .:? "active")
      <*> (o .:? "assigned")
      <*> (o .:? "error")
      <*> (o .:? "lastKnownGood")

-- | ToJSON V1NodeConfigStatus
instance A.ToJSON V1NodeConfigStatus where
  toJSON V1NodeConfigStatus {..} =
   _omitNulls
      [ "active" .= v1NodeConfigStatusActive
      , "assigned" .= v1NodeConfigStatusAssigned
      , "error" .= v1NodeConfigStatusError
      , "lastKnownGood" .= v1NodeConfigStatusLastKnownGood
      ]


-- | Construct a value of type 'V1NodeConfigStatus' (by applying it's required fields, if any)
mkV1NodeConfigStatus
  :: V1NodeConfigStatus
mkV1NodeConfigStatus =
  V1NodeConfigStatus
  { v1NodeConfigStatusActive = Nothing
  , v1NodeConfigStatusAssigned = Nothing
  , v1NodeConfigStatusError = Nothing
  , v1NodeConfigStatusLastKnownGood = Nothing
  }

-- ** V1NodeDaemonEndpoints
-- | V1NodeDaemonEndpoints
-- NodeDaemonEndpoints lists ports opened by daemons running on the Node.
data V1NodeDaemonEndpoints = V1NodeDaemonEndpoints
  { v1NodeDaemonEndpointsKubeletEndpoint :: !(Maybe V1DaemonEndpoint) -- ^ "kubeletEndpoint"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1NodeDaemonEndpoints
instance A.FromJSON V1NodeDaemonEndpoints where
  parseJSON = A.withObject "V1NodeDaemonEndpoints" $ \o ->
    V1NodeDaemonEndpoints
      <$> (o .:? "kubeletEndpoint")

-- | ToJSON V1NodeDaemonEndpoints
instance A.ToJSON V1NodeDaemonEndpoints where
  toJSON V1NodeDaemonEndpoints {..} =
   _omitNulls
      [ "kubeletEndpoint" .= v1NodeDaemonEndpointsKubeletEndpoint
      ]


-- | Construct a value of type 'V1NodeDaemonEndpoints' (by applying it's required fields, if any)
mkV1NodeDaemonEndpoints
  :: V1NodeDaemonEndpoints
mkV1NodeDaemonEndpoints =
  V1NodeDaemonEndpoints
  { v1NodeDaemonEndpointsKubeletEndpoint = Nothing
  }

-- ** V1NodeList
-- | V1NodeList
-- NodeList is the whole list of all Nodes which have been registered with master.
data V1NodeList = V1NodeList
  { 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/api-conventions.md#resources
  , v1NodeListItems :: !([V1Node]) -- ^ /Required/ "items" - List of nodes
  , 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/api-conventions.md#types-kinds
  , v1NodeListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1NodeList
instance A.FromJSON V1NodeList where
  parseJSON = A.withObject "V1NodeList" $ \o ->
    V1NodeList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1NodeList
instance A.ToJSON V1NodeList where
  toJSON V1NodeList {..} =
   _omitNulls
      [ "apiVersion" .= v1NodeListApiVersion
      , "items" .= v1NodeListItems
      , "kind" .= v1NodeListKind
      , "metadata" .= v1NodeListMetadata
      ]


-- | Construct a value of type 'V1NodeList' (by applying it's required fields, if any)
mkV1NodeList
  :: [V1Node] -- ^ 'v1NodeListItems': List of nodes
  -> V1NodeList
mkV1NodeList v1NodeListItems =
  V1NodeList
  { v1NodeListApiVersion = Nothing
  , v1NodeListItems
  , v1NodeListKind = Nothing
  , v1NodeListMetadata = 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
  { v1NodeSelectorNodeSelectorTerms :: !([V1NodeSelectorTerm]) -- ^ /Required/ "nodeSelectorTerms" - Required. A list of node selector terms. The terms are ORed.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1NodeSelector
instance A.FromJSON V1NodeSelector where
  parseJSON = A.withObject "V1NodeSelector" $ \o ->
    V1NodeSelector
      <$> (o .:  "nodeSelectorTerms")

-- | ToJSON V1NodeSelector
instance A.ToJSON V1NodeSelector where
  toJSON V1NodeSelector {..} =
   _omitNulls
      [ "nodeSelectorTerms" .= 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 v1NodeSelectorNodeSelectorTerms =
  V1NodeSelector
  { 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
  { v1NodeSelectorRequirementKey :: !(Text) -- ^ /Required/ "key" - The label key that the selector applies to.
  , 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.
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1NodeSelectorRequirement
instance A.FromJSON V1NodeSelectorRequirement where
  parseJSON = A.withObject "V1NodeSelectorRequirement" $ \o ->
    V1NodeSelectorRequirement
      <$> (o .:  "key")
      <*> (o .:  "operator")
      <*> (o .:? "values")

-- | ToJSON V1NodeSelectorRequirement
instance A.ToJSON V1NodeSelectorRequirement where
  toJSON V1NodeSelectorRequirement {..} =
   _omitNulls
      [ "key" .= v1NodeSelectorRequirementKey
      , "operator" .= v1NodeSelectorRequirementOperator
      , "values" .= 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 v1NodeSelectorRequirementKey v1NodeSelectorRequirementOperator =
  V1NodeSelectorRequirement
  { v1NodeSelectorRequirementKey
  , v1NodeSelectorRequirementOperator
  , v1NodeSelectorRequirementValues = 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
  { v1NodeSelectorTermMatchExpressions :: !(Maybe [V1NodeSelectorRequirement]) -- ^ "matchExpressions" - A list of node selector requirements by node&#39;s labels.
  , v1NodeSelectorTermMatchFields :: !(Maybe [V1NodeSelectorRequirement]) -- ^ "matchFields" - A list of node selector requirements by node&#39;s fields.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1NodeSelectorTerm
instance A.FromJSON V1NodeSelectorTerm where
  parseJSON = A.withObject "V1NodeSelectorTerm" $ \o ->
    V1NodeSelectorTerm
      <$> (o .:? "matchExpressions")
      <*> (o .:? "matchFields")

-- | ToJSON V1NodeSelectorTerm
instance A.ToJSON V1NodeSelectorTerm where
  toJSON V1NodeSelectorTerm {..} =
   _omitNulls
      [ "matchExpressions" .= v1NodeSelectorTermMatchExpressions
      , "matchFields" .= v1NodeSelectorTermMatchFields
      ]


-- | Construct a value of type 'V1NodeSelectorTerm' (by applying it's required fields, if any)
mkV1NodeSelectorTerm
  :: V1NodeSelectorTerm
mkV1NodeSelectorTerm =
  V1NodeSelectorTerm
  { v1NodeSelectorTermMatchExpressions = Nothing
  , v1NodeSelectorTermMatchFields = Nothing
  }

-- ** V1NodeSpec
-- | V1NodeSpec
-- NodeSpec describes the attributes that a node is created with.
data V1NodeSpec = V1NodeSpec
  { v1NodeSpecConfigSource :: !(Maybe V1NodeConfigSource) -- ^ "configSource"
  , v1NodeSpecExternalId :: !(Maybe Text) -- ^ "externalID" - Deprecated. Not all kubelets will set this field. Remove field after 1.13. see: https://issues.k8s.io/61966
  , v1NodeSpecPodCidr :: !(Maybe Text) -- ^ "podCIDR" - PodCIDR represents the pod IP range assigned to the node.
  , v1NodeSpecProviderId :: !(Maybe Text) -- ^ "providerID" - ID of the node assigned by the cloud provider in the format: &lt;ProviderName&gt;://&lt;ProviderSpecificNodeID&gt;
  , v1NodeSpecTaints :: !(Maybe [V1Taint]) -- ^ "taints" - If specified, the node&#39;s taints.
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1NodeSpec
instance A.FromJSON V1NodeSpec where
  parseJSON = A.withObject "V1NodeSpec" $ \o ->
    V1NodeSpec
      <$> (o .:? "configSource")
      <*> (o .:? "externalID")
      <*> (o .:? "podCIDR")
      <*> (o .:? "providerID")
      <*> (o .:? "taints")
      <*> (o .:? "unschedulable")

-- | ToJSON V1NodeSpec
instance A.ToJSON V1NodeSpec where
  toJSON V1NodeSpec {..} =
   _omitNulls
      [ "configSource" .= v1NodeSpecConfigSource
      , "externalID" .= v1NodeSpecExternalId
      , "podCIDR" .= v1NodeSpecPodCidr
      , "providerID" .= v1NodeSpecProviderId
      , "taints" .= v1NodeSpecTaints
      , "unschedulable" .= v1NodeSpecUnschedulable
      ]


-- | Construct a value of type 'V1NodeSpec' (by applying it's required fields, if any)
mkV1NodeSpec
  :: V1NodeSpec
mkV1NodeSpec =
  V1NodeSpec
  { v1NodeSpecConfigSource = Nothing
  , v1NodeSpecExternalId = Nothing
  , v1NodeSpecPodCidr = Nothing
  , v1NodeSpecProviderId = Nothing
  , v1NodeSpecTaints = Nothing
  , v1NodeSpecUnschedulable = Nothing
  }

-- ** V1NodeStatus
-- | V1NodeStatus
-- NodeStatus is information about the current status of a node.
data V1NodeStatus = V1NodeStatus
  { v1NodeStatusAddresses :: !(Maybe [V1NodeAddress]) -- ^ "addresses" - List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses
  , v1NodeStatusAllocatable :: !(Maybe (Map.Map String Quantity)) -- ^ "allocatable" - Allocatable represents the resources of a node that are available for scheduling. Defaults to Capacity.
  , v1NodeStatusCapacity :: !(Maybe (Map.Map String Quantity)) -- ^ "capacity" - Capacity represents the total resources of a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity
  , v1NodeStatusConditions :: !(Maybe [V1NodeCondition]) -- ^ "conditions" - Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/concepts/nodes/node/#condition
  , v1NodeStatusConfig :: !(Maybe V1NodeConfigStatus) -- ^ "config"
  , v1NodeStatusDaemonEndpoints :: !(Maybe V1NodeDaemonEndpoints) -- ^ "daemonEndpoints"
  , v1NodeStatusImages :: !(Maybe [V1ContainerImage]) -- ^ "images" - List of container images on this node
  , v1NodeStatusNodeInfo :: !(Maybe V1NodeSystemInfo) -- ^ "nodeInfo"
  , 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.
  , v1NodeStatusVolumesAttached :: !(Maybe [V1AttachedVolume]) -- ^ "volumesAttached" - List of volumes that are attached to the node.
  , v1NodeStatusVolumesInUse :: !(Maybe [Text]) -- ^ "volumesInUse" - List of attachable volumes in use (mounted) by the node.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1NodeStatus
instance A.FromJSON V1NodeStatus where
  parseJSON = A.withObject "V1NodeStatus" $ \o ->
    V1NodeStatus
      <$> (o .:? "addresses")
      <*> (o .:? "allocatable")
      <*> (o .:? "capacity")
      <*> (o .:? "conditions")
      <*> (o .:? "config")
      <*> (o .:? "daemonEndpoints")
      <*> (o .:? "images")
      <*> (o .:? "nodeInfo")
      <*> (o .:? "phase")
      <*> (o .:? "volumesAttached")
      <*> (o .:? "volumesInUse")

-- | ToJSON V1NodeStatus
instance A.ToJSON V1NodeStatus where
  toJSON V1NodeStatus {..} =
   _omitNulls
      [ "addresses" .= v1NodeStatusAddresses
      , "allocatable" .= v1NodeStatusAllocatable
      , "capacity" .= v1NodeStatusCapacity
      , "conditions" .= v1NodeStatusConditions
      , "config" .= v1NodeStatusConfig
      , "daemonEndpoints" .= v1NodeStatusDaemonEndpoints
      , "images" .= v1NodeStatusImages
      , "nodeInfo" .= v1NodeStatusNodeInfo
      , "phase" .= v1NodeStatusPhase
      , "volumesAttached" .= v1NodeStatusVolumesAttached
      , "volumesInUse" .= v1NodeStatusVolumesInUse
      ]


-- | Construct a value of type 'V1NodeStatus' (by applying it's required fields, if any)
mkV1NodeStatus
  :: V1NodeStatus
mkV1NodeStatus =
  V1NodeStatus
  { v1NodeStatusAddresses = Nothing
  , v1NodeStatusAllocatable = Nothing
  , v1NodeStatusCapacity = Nothing
  , v1NodeStatusConditions = Nothing
  , v1NodeStatusConfig = Nothing
  , v1NodeStatusDaemonEndpoints = Nothing
  , v1NodeStatusImages = Nothing
  , v1NodeStatusNodeInfo = Nothing
  , v1NodeStatusPhase = Nothing
  , v1NodeStatusVolumesAttached = Nothing
  , v1NodeStatusVolumesInUse = Nothing
  }

-- ** V1NodeSystemInfo
-- | V1NodeSystemInfo
-- NodeSystemInfo is a set of ids/uuids to uniquely identify the node.
data V1NodeSystemInfo = V1NodeSystemInfo
  { v1NodeSystemInfoArchitecture :: !(Text) -- ^ /Required/ "architecture" - The Architecture reported by the node
  , v1NodeSystemInfoBootId :: !(Text) -- ^ /Required/ "bootID" - Boot ID reported by the node.
  , v1NodeSystemInfoContainerRuntimeVersion :: !(Text) -- ^ /Required/ "containerRuntimeVersion" - ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0).
  , v1NodeSystemInfoKernelVersion :: !(Text) -- ^ /Required/ "kernelVersion" - Kernel Version reported by the node from &#39;uname -r&#39; (e.g. 3.16.0-0.bpo.4-amd64).
  , v1NodeSystemInfoKubeProxyVersion :: !(Text) -- ^ /Required/ "kubeProxyVersion" - KubeProxy Version reported by the node.
  , v1NodeSystemInfoKubeletVersion :: !(Text) -- ^ /Required/ "kubeletVersion" - Kubelet Version reported by the node.
  , 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
  , v1NodeSystemInfoOperatingSystem :: !(Text) -- ^ /Required/ "operatingSystem" - The Operating System reported by the node
  , v1NodeSystemInfoOsImage :: !(Text) -- ^ /Required/ "osImage" - OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).
  , 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/getting-system-uuid.html
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1NodeSystemInfo
instance A.FromJSON V1NodeSystemInfo where
  parseJSON = A.withObject "V1NodeSystemInfo" $ \o ->
    V1NodeSystemInfo
      <$> (o .:  "architecture")
      <*> (o .:  "bootID")
      <*> (o .:  "containerRuntimeVersion")
      <*> (o .:  "kernelVersion")
      <*> (o .:  "kubeProxyVersion")
      <*> (o .:  "kubeletVersion")
      <*> (o .:  "machineID")
      <*> (o .:  "operatingSystem")
      <*> (o .:  "osImage")
      <*> (o .:  "systemUUID")

-- | ToJSON V1NodeSystemInfo
instance A.ToJSON V1NodeSystemInfo where
  toJSON V1NodeSystemInfo {..} =
   _omitNulls
      [ "architecture" .= v1NodeSystemInfoArchitecture
      , "bootID" .= v1NodeSystemInfoBootId
      , "containerRuntimeVersion" .= v1NodeSystemInfoContainerRuntimeVersion
      , "kernelVersion" .= v1NodeSystemInfoKernelVersion
      , "kubeProxyVersion" .= v1NodeSystemInfoKubeProxyVersion
      , "kubeletVersion" .= v1NodeSystemInfoKubeletVersion
      , "machineID" .= v1NodeSystemInfoMachineId
      , "operatingSystem" .= v1NodeSystemInfoOperatingSystem
      , "osImage" .= v1NodeSystemInfoOsImage
      , "systemUUID" .= 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. docker://1.5.0).
  -> Text -- ^ 'v1NodeSystemInfoKernelVersion': Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).
  -> Text -- ^ 'v1NodeSystemInfoKubeProxyVersion': 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/getting-system-uuid.html
  -> V1NodeSystemInfo
mkV1NodeSystemInfo v1NodeSystemInfoArchitecture v1NodeSystemInfoBootId v1NodeSystemInfoContainerRuntimeVersion v1NodeSystemInfoKernelVersion v1NodeSystemInfoKubeProxyVersion v1NodeSystemInfoKubeletVersion v1NodeSystemInfoMachineId v1NodeSystemInfoOperatingSystem v1NodeSystemInfoOsImage v1NodeSystemInfoSystemUuid =
  V1NodeSystemInfo
  { v1NodeSystemInfoArchitecture
  , v1NodeSystemInfoBootId
  , v1NodeSystemInfoContainerRuntimeVersion
  , v1NodeSystemInfoKernelVersion
  , v1NodeSystemInfoKubeProxyVersion
  , v1NodeSystemInfoKubeletVersion
  , v1NodeSystemInfoMachineId
  , v1NodeSystemInfoOperatingSystem
  , v1NodeSystemInfoOsImage
  , v1NodeSystemInfoSystemUuid
  }

-- ** V1NonResourceAttributes
-- | V1NonResourceAttributes
-- NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface
data V1NonResourceAttributes = V1NonResourceAttributes
  { v1NonResourceAttributesPath :: !(Maybe Text) -- ^ "path" - Path is the URL path of the request
  , v1NonResourceAttributesVerb :: !(Maybe Text) -- ^ "verb" - Verb is the standard HTTP verb
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1NonResourceAttributes
instance A.FromJSON V1NonResourceAttributes where
  parseJSON = A.withObject "V1NonResourceAttributes" $ \o ->
    V1NonResourceAttributes
      <$> (o .:? "path")
      <*> (o .:? "verb")

-- | ToJSON V1NonResourceAttributes
instance A.ToJSON V1NonResourceAttributes where
  toJSON V1NonResourceAttributes {..} =
   _omitNulls
      [ "path" .= v1NonResourceAttributesPath
      , "verb" .= v1NonResourceAttributesVerb
      ]


-- | Construct a value of type 'V1NonResourceAttributes' (by applying it's required fields, if any)
mkV1NonResourceAttributes
  :: V1NonResourceAttributes
mkV1NonResourceAttributes =
  V1NonResourceAttributes
  { v1NonResourceAttributesPath = Nothing
  , v1NonResourceAttributesVerb = Nothing
  }

-- ** V1NonResourceRule
-- | V1NonResourceRule
-- NonResourceRule holds information that describes a rule for the non-resource
data V1NonResourceRule = V1NonResourceRule
  { 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.
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1NonResourceRule
instance A.FromJSON V1NonResourceRule where
  parseJSON = A.withObject "V1NonResourceRule" $ \o ->
    V1NonResourceRule
      <$> (o .:? "nonResourceURLs")
      <*> (o .:  "verbs")

-- | ToJSON V1NonResourceRule
instance A.ToJSON V1NonResourceRule where
  toJSON V1NonResourceRule {..} =
   _omitNulls
      [ "nonResourceURLs" .= v1NonResourceRuleNonResourceUrLs
      , "verbs" .= 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 v1NonResourceRuleVerbs =
  V1NonResourceRule
  { v1NonResourceRuleNonResourceUrLs = Nothing
  , v1NonResourceRuleVerbs
  }

-- ** V1ObjectFieldSelector
-- | V1ObjectFieldSelector
-- ObjectFieldSelector selects an APIVersioned field of an object.
data V1ObjectFieldSelector = V1ObjectFieldSelector
  { v1ObjectFieldSelectorApiVersion :: !(Maybe Text) -- ^ "apiVersion" - Version of the schema the FieldPath is written in terms of, defaults to \&quot;v1\&quot;.
  , v1ObjectFieldSelectorFieldPath :: !(Text) -- ^ /Required/ "fieldPath" - Path of the field to select in the specified API version.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ObjectFieldSelector
instance A.FromJSON V1ObjectFieldSelector where
  parseJSON = A.withObject "V1ObjectFieldSelector" $ \o ->
    V1ObjectFieldSelector
      <$> (o .:? "apiVersion")
      <*> (o .:  "fieldPath")

-- | ToJSON V1ObjectFieldSelector
instance A.ToJSON V1ObjectFieldSelector where
  toJSON V1ObjectFieldSelector {..} =
   _omitNulls
      [ "apiVersion" .= v1ObjectFieldSelectorApiVersion
      , "fieldPath" .= 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 v1ObjectFieldSelectorFieldPath =
  V1ObjectFieldSelector
  { v1ObjectFieldSelectorApiVersion = Nothing
  , v1ObjectFieldSelectorFieldPath
  }

-- ** V1ObjectMeta
-- | V1ObjectMeta
-- ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.
data V1ObjectMeta = V1ObjectMeta
  { 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: http://kubernetes.io/docs/user-guide/annotations
  , v1ObjectMetaClusterName :: !(Maybe Text) -- ^ "clusterName" - The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.
  , 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/api-conventions.md#metadata
  , 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.
  , 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/api-conventions.md#metadata
  , 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.
  , 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).  Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency
  , v1ObjectMetaGeneration :: !(Maybe Integer) -- ^ "generation" - A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.
  , v1ObjectMetaInitializers :: !(Maybe V1Initializers) -- ^ "initializers"
  , 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: http://kubernetes.io/docs/user-guide/labels
  , 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.  This field is alpha and can be changed or removed without notice.
  , 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: http://kubernetes.io/docs/user-guide/identifiers#names
  , v1ObjectMetaNamespace :: !(Maybe Text) -- ^ "namespace" - Namespace defines the space within 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: http://kubernetes.io/docs/user-guide/namespaces
  , 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.
  , 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/api-conventions.md#concurrency-control-and-consistency
  , v1ObjectMetaSelfLink :: !(Maybe Text) -- ^ "selfLink" - SelfLink is a URL representing this object. Populated by the system. Read-only.
  , 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: http://kubernetes.io/docs/user-guide/identifiers#uids
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ObjectMeta
instance A.FromJSON V1ObjectMeta where
  parseJSON = A.withObject "V1ObjectMeta" $ \o ->
    V1ObjectMeta
      <$> (o .:? "annotations")
      <*> (o .:? "clusterName")
      <*> (o .:? "creationTimestamp")
      <*> (o .:? "deletionGracePeriodSeconds")
      <*> (o .:? "deletionTimestamp")
      <*> (o .:? "finalizers")
      <*> (o .:? "generateName")
      <*> (o .:? "generation")
      <*> (o .:? "initializers")
      <*> (o .:? "labels")
      <*> (o .:? "managedFields")
      <*> (o .:? "name")
      <*> (o .:? "namespace")
      <*> (o .:? "ownerReferences")
      <*> (o .:? "resourceVersion")
      <*> (o .:? "selfLink")
      <*> (o .:? "uid")

-- | ToJSON V1ObjectMeta
instance A.ToJSON V1ObjectMeta where
  toJSON V1ObjectMeta {..} =
   _omitNulls
      [ "annotations" .= v1ObjectMetaAnnotations
      , "clusterName" .= v1ObjectMetaClusterName
      , "creationTimestamp" .= v1ObjectMetaCreationTimestamp
      , "deletionGracePeriodSeconds" .= v1ObjectMetaDeletionGracePeriodSeconds
      , "deletionTimestamp" .= v1ObjectMetaDeletionTimestamp
      , "finalizers" .= v1ObjectMetaFinalizers
      , "generateName" .= v1ObjectMetaGenerateName
      , "generation" .= v1ObjectMetaGeneration
      , "initializers" .= v1ObjectMetaInitializers
      , "labels" .= v1ObjectMetaLabels
      , "managedFields" .= v1ObjectMetaManagedFields
      , "name" .= v1ObjectMetaName
      , "namespace" .= v1ObjectMetaNamespace
      , "ownerReferences" .= v1ObjectMetaOwnerReferences
      , "resourceVersion" .= v1ObjectMetaResourceVersion
      , "selfLink" .= v1ObjectMetaSelfLink
      , "uid" .= v1ObjectMetaUid
      ]


-- | Construct a value of type 'V1ObjectMeta' (by applying it's required fields, if any)
mkV1ObjectMeta
  :: V1ObjectMeta
mkV1ObjectMeta =
  V1ObjectMeta
  { v1ObjectMetaAnnotations = Nothing
  , v1ObjectMetaClusterName = Nothing
  , v1ObjectMetaCreationTimestamp = Nothing
  , v1ObjectMetaDeletionGracePeriodSeconds = Nothing
  , v1ObjectMetaDeletionTimestamp = Nothing
  , v1ObjectMetaFinalizers = Nothing
  , v1ObjectMetaGenerateName = Nothing
  , v1ObjectMetaGeneration = Nothing
  , v1ObjectMetaInitializers = Nothing
  , v1ObjectMetaLabels = Nothing
  , v1ObjectMetaManagedFields = Nothing
  , v1ObjectMetaName = Nothing
  , v1ObjectMetaNamespace = Nothing
  , v1ObjectMetaOwnerReferences = Nothing
  , v1ObjectMetaResourceVersion = Nothing
  , v1ObjectMetaSelfLink = Nothing
  , v1ObjectMetaUid = Nothing
  }

-- ** V1ObjectReference
-- | V1ObjectReference
-- ObjectReference contains enough information to let you inspect or modify the referred object.
data V1ObjectReference = V1ObjectReference
  { v1ObjectReferenceApiVersion :: !(Maybe Text) -- ^ "apiVersion" - API version of the referent.
  , 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.
  , v1ObjectReferenceKind :: !(Maybe Text) -- ^ "kind" - Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
  , v1ObjectReferenceName :: !(Maybe Text) -- ^ "name" - Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  , v1ObjectReferenceNamespace :: !(Maybe Text) -- ^ "namespace" - Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
  , v1ObjectReferenceResourceVersion :: !(Maybe Text) -- ^ "resourceVersion" - Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency
  , v1ObjectReferenceUid :: !(Maybe Text) -- ^ "uid" - UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ObjectReference
instance A.FromJSON V1ObjectReference where
  parseJSON = A.withObject "V1ObjectReference" $ \o ->
    V1ObjectReference
      <$> (o .:? "apiVersion")
      <*> (o .:? "fieldPath")
      <*> (o .:? "kind")
      <*> (o .:? "name")
      <*> (o .:? "namespace")
      <*> (o .:? "resourceVersion")
      <*> (o .:? "uid")

-- | ToJSON V1ObjectReference
instance A.ToJSON V1ObjectReference where
  toJSON V1ObjectReference {..} =
   _omitNulls
      [ "apiVersion" .= v1ObjectReferenceApiVersion
      , "fieldPath" .= v1ObjectReferenceFieldPath
      , "kind" .= v1ObjectReferenceKind
      , "name" .= v1ObjectReferenceName
      , "namespace" .= v1ObjectReferenceNamespace
      , "resourceVersion" .= v1ObjectReferenceResourceVersion
      , "uid" .= v1ObjectReferenceUid
      ]


-- | Construct a value of type 'V1ObjectReference' (by applying it's required fields, if any)
mkV1ObjectReference
  :: V1ObjectReference
mkV1ObjectReference =
  V1ObjectReference
  { v1ObjectReferenceApiVersion = Nothing
  , v1ObjectReferenceFieldPath = Nothing
  , v1ObjectReferenceKind = Nothing
  , v1ObjectReferenceName = Nothing
  , v1ObjectReferenceNamespace = Nothing
  , v1ObjectReferenceResourceVersion = Nothing
  , v1ObjectReferenceUid = 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
  { v1OwnerReferenceApiVersion :: !(Text) -- ^ /Required/ "apiVersion" - API version of the referent.
  , 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. Defaults to false. To set this field, a user needs \&quot;delete\&quot; permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.
  , v1OwnerReferenceController :: !(Maybe Bool) -- ^ "controller" - If true, this reference points to the managing controller.
  , v1OwnerReferenceKind :: !(Text) -- ^ /Required/ "kind" - Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
  , v1OwnerReferenceName :: !(Text) -- ^ /Required/ "name" - Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names
  , v1OwnerReferenceUid :: !(Text) -- ^ /Required/ "uid" - UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1OwnerReference
instance A.FromJSON V1OwnerReference where
  parseJSON = A.withObject "V1OwnerReference" $ \o ->
    V1OwnerReference
      <$> (o .:  "apiVersion")
      <*> (o .:? "blockOwnerDeletion")
      <*> (o .:? "controller")
      <*> (o .:  "kind")
      <*> (o .:  "name")
      <*> (o .:  "uid")

-- | ToJSON V1OwnerReference
instance A.ToJSON V1OwnerReference where
  toJSON V1OwnerReference {..} =
   _omitNulls
      [ "apiVersion" .= v1OwnerReferenceApiVersion
      , "blockOwnerDeletion" .= v1OwnerReferenceBlockOwnerDeletion
      , "controller" .= v1OwnerReferenceController
      , "kind" .= v1OwnerReferenceKind
      , "name" .= v1OwnerReferenceName
      , "uid" .= 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/api-conventions.md#types-kinds
  -> Text -- ^ 'v1OwnerReferenceName': Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names
  -> Text -- ^ 'v1OwnerReferenceUid': UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids
  -> V1OwnerReference
mkV1OwnerReference v1OwnerReferenceApiVersion v1OwnerReferenceKind v1OwnerReferenceName v1OwnerReferenceUid =
  V1OwnerReference
  { v1OwnerReferenceApiVersion
  , v1OwnerReferenceBlockOwnerDeletion = Nothing
  , v1OwnerReferenceController = Nothing
  , v1OwnerReferenceKind
  , v1OwnerReferenceName
  , v1OwnerReferenceUid
  }

-- ** 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
  { 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1PersistentVolumeMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1PersistentVolumeSpec :: !(Maybe V1PersistentVolumeSpec) -- ^ "spec"
  , v1PersistentVolumeStatus :: !(Maybe V1PersistentVolumeStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1PersistentVolume
instance A.FromJSON V1PersistentVolume where
  parseJSON = A.withObject "V1PersistentVolume" $ \o ->
    V1PersistentVolume
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON V1PersistentVolume
instance A.ToJSON V1PersistentVolume where
  toJSON V1PersistentVolume {..} =
   _omitNulls
      [ "apiVersion" .= v1PersistentVolumeApiVersion
      , "kind" .= v1PersistentVolumeKind
      , "metadata" .= v1PersistentVolumeMetadata
      , "spec" .= v1PersistentVolumeSpec
      , "status" .= v1PersistentVolumeStatus
      ]


-- | Construct a value of type 'V1PersistentVolume' (by applying it's required fields, if any)
mkV1PersistentVolume
  :: V1PersistentVolume
mkV1PersistentVolume =
  V1PersistentVolume
  { v1PersistentVolumeApiVersion = Nothing
  , v1PersistentVolumeKind = Nothing
  , v1PersistentVolumeMetadata = Nothing
  , v1PersistentVolumeSpec = Nothing
  , v1PersistentVolumeStatus = Nothing
  }

-- ** V1PersistentVolumeClaim
-- | V1PersistentVolumeClaim
-- PersistentVolumeClaim is a user's request for and claim to a persistent volume
data V1PersistentVolumeClaim = V1PersistentVolumeClaim
  { 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1PersistentVolumeClaimMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1PersistentVolumeClaimSpec :: !(Maybe V1PersistentVolumeClaimSpec) -- ^ "spec"
  , v1PersistentVolumeClaimStatus :: !(Maybe V1PersistentVolumeClaimStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1PersistentVolumeClaim
instance A.FromJSON V1PersistentVolumeClaim where
  parseJSON = A.withObject "V1PersistentVolumeClaim" $ \o ->
    V1PersistentVolumeClaim
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON V1PersistentVolumeClaim
instance A.ToJSON V1PersistentVolumeClaim where
  toJSON V1PersistentVolumeClaim {..} =
   _omitNulls
      [ "apiVersion" .= v1PersistentVolumeClaimApiVersion
      , "kind" .= v1PersistentVolumeClaimKind
      , "metadata" .= v1PersistentVolumeClaimMetadata
      , "spec" .= v1PersistentVolumeClaimSpec
      , "status" .= v1PersistentVolumeClaimStatus
      ]


-- | Construct a value of type 'V1PersistentVolumeClaim' (by applying it's required fields, if any)
mkV1PersistentVolumeClaim
  :: V1PersistentVolumeClaim
mkV1PersistentVolumeClaim =
  V1PersistentVolumeClaim
  { v1PersistentVolumeClaimApiVersion = Nothing
  , v1PersistentVolumeClaimKind = Nothing
  , v1PersistentVolumeClaimMetadata = Nothing
  , v1PersistentVolumeClaimSpec = Nothing
  , v1PersistentVolumeClaimStatus = Nothing
  }

-- ** V1PersistentVolumeClaimCondition
-- | V1PersistentVolumeClaimCondition
-- PersistentVolumeClaimCondition contails details about state of pvc
data V1PersistentVolumeClaimCondition = V1PersistentVolumeClaimCondition
  { v1PersistentVolumeClaimConditionLastProbeTime :: !(Maybe DateTime) -- ^ "lastProbeTime" - Last time we probed the condition.
  , v1PersistentVolumeClaimConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - Last time the condition transitioned from one status to another.
  , v1PersistentVolumeClaimConditionMessage :: !(Maybe Text) -- ^ "message" - Human-readable message indicating details about last transition.
  , v1PersistentVolumeClaimConditionReason :: !(Maybe Text) -- ^ "reason" - Unique, this should be a short, machine understandable string that gives the reason for condition&#39;s last transition. If it reports \&quot;ResizeStarted\&quot; that means the underlying persistent volume is being resized.
  , v1PersistentVolumeClaimConditionStatus :: !(Text) -- ^ /Required/ "status"
  , v1PersistentVolumeClaimConditionType :: !(Text) -- ^ /Required/ "type"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1PersistentVolumeClaimCondition
instance A.FromJSON V1PersistentVolumeClaimCondition where
  parseJSON = A.withObject "V1PersistentVolumeClaimCondition" $ \o ->
    V1PersistentVolumeClaimCondition
      <$> (o .:? "lastProbeTime")
      <*> (o .:? "lastTransitionTime")
      <*> (o .:? "message")
      <*> (o .:? "reason")
      <*> (o .:  "status")
      <*> (o .:  "type")

-- | ToJSON V1PersistentVolumeClaimCondition
instance A.ToJSON V1PersistentVolumeClaimCondition where
  toJSON V1PersistentVolumeClaimCondition {..} =
   _omitNulls
      [ "lastProbeTime" .= v1PersistentVolumeClaimConditionLastProbeTime
      , "lastTransitionTime" .= v1PersistentVolumeClaimConditionLastTransitionTime
      , "message" .= v1PersistentVolumeClaimConditionMessage
      , "reason" .= v1PersistentVolumeClaimConditionReason
      , "status" .= v1PersistentVolumeClaimConditionStatus
      , "type" .= v1PersistentVolumeClaimConditionType
      ]


-- | Construct a value of type 'V1PersistentVolumeClaimCondition' (by applying it's required fields, if any)
mkV1PersistentVolumeClaimCondition
  :: Text -- ^ 'v1PersistentVolumeClaimConditionStatus' 
  -> Text -- ^ 'v1PersistentVolumeClaimConditionType' 
  -> V1PersistentVolumeClaimCondition
mkV1PersistentVolumeClaimCondition v1PersistentVolumeClaimConditionStatus v1PersistentVolumeClaimConditionType =
  V1PersistentVolumeClaimCondition
  { v1PersistentVolumeClaimConditionLastProbeTime = Nothing
  , v1PersistentVolumeClaimConditionLastTransitionTime = Nothing
  , v1PersistentVolumeClaimConditionMessage = Nothing
  , v1PersistentVolumeClaimConditionReason = Nothing
  , v1PersistentVolumeClaimConditionStatus
  , v1PersistentVolumeClaimConditionType
  }

-- ** V1PersistentVolumeClaimList
-- | V1PersistentVolumeClaimList
-- PersistentVolumeClaimList is a list of PersistentVolumeClaim items.
data V1PersistentVolumeClaimList = V1PersistentVolumeClaimList
  { 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/api-conventions.md#resources
  , v1PersistentVolumeClaimListItems :: !([V1PersistentVolumeClaim]) -- ^ /Required/ "items" - A list of persistent volume claims. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
  , 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/api-conventions.md#types-kinds
  , v1PersistentVolumeClaimListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1PersistentVolumeClaimList
instance A.FromJSON V1PersistentVolumeClaimList where
  parseJSON = A.withObject "V1PersistentVolumeClaimList" $ \o ->
    V1PersistentVolumeClaimList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1PersistentVolumeClaimList
instance A.ToJSON V1PersistentVolumeClaimList where
  toJSON V1PersistentVolumeClaimList {..} =
   _omitNulls
      [ "apiVersion" .= v1PersistentVolumeClaimListApiVersion
      , "items" .= v1PersistentVolumeClaimListItems
      , "kind" .= v1PersistentVolumeClaimListKind
      , "metadata" .= v1PersistentVolumeClaimListMetadata
      ]


-- | Construct a value of type 'V1PersistentVolumeClaimList' (by applying it's required fields, if any)
mkV1PersistentVolumeClaimList
  :: [V1PersistentVolumeClaim] -- ^ 'v1PersistentVolumeClaimListItems': A list of persistent volume claims. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
  -> V1PersistentVolumeClaimList
mkV1PersistentVolumeClaimList v1PersistentVolumeClaimListItems =
  V1PersistentVolumeClaimList
  { v1PersistentVolumeClaimListApiVersion = Nothing
  , v1PersistentVolumeClaimListItems
  , v1PersistentVolumeClaimListKind = Nothing
  , v1PersistentVolumeClaimListMetadata = Nothing
  }

-- ** V1PersistentVolumeClaimSpec
-- | V1PersistentVolumeClaimSpec
-- PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes
data V1PersistentVolumeClaimSpec = V1PersistentVolumeClaimSpec
  { 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
  , v1PersistentVolumeClaimSpecDataSource :: !(Maybe V1TypedLocalObjectReference) -- ^ "dataSource"
  , v1PersistentVolumeClaimSpecResources :: !(Maybe V1ResourceRequirements) -- ^ "resources"
  , v1PersistentVolumeClaimSpecSelector :: !(Maybe V1LabelSelector) -- ^ "selector"
  , v1PersistentVolumeClaimSpecStorageClassName :: !(Maybe Text) -- ^ "storageClassName" - Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
  , 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. This is a beta feature.
  , v1PersistentVolumeClaimSpecVolumeName :: !(Maybe Text) -- ^ "volumeName" - VolumeName is the binding reference to the PersistentVolume backing this claim.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1PersistentVolumeClaimSpec
instance A.FromJSON V1PersistentVolumeClaimSpec where
  parseJSON = A.withObject "V1PersistentVolumeClaimSpec" $ \o ->
    V1PersistentVolumeClaimSpec
      <$> (o .:? "accessModes")
      <*> (o .:? "dataSource")
      <*> (o .:? "resources")
      <*> (o .:? "selector")
      <*> (o .:? "storageClassName")
      <*> (o .:? "volumeMode")
      <*> (o .:? "volumeName")

-- | ToJSON V1PersistentVolumeClaimSpec
instance A.ToJSON V1PersistentVolumeClaimSpec where
  toJSON V1PersistentVolumeClaimSpec {..} =
   _omitNulls
      [ "accessModes" .= v1PersistentVolumeClaimSpecAccessModes
      , "dataSource" .= v1PersistentVolumeClaimSpecDataSource
      , "resources" .= v1PersistentVolumeClaimSpecResources
      , "selector" .= v1PersistentVolumeClaimSpecSelector
      , "storageClassName" .= v1PersistentVolumeClaimSpecStorageClassName
      , "volumeMode" .= v1PersistentVolumeClaimSpecVolumeMode
      , "volumeName" .= v1PersistentVolumeClaimSpecVolumeName
      ]


-- | Construct a value of type 'V1PersistentVolumeClaimSpec' (by applying it's required fields, if any)
mkV1PersistentVolumeClaimSpec
  :: V1PersistentVolumeClaimSpec
mkV1PersistentVolumeClaimSpec =
  V1PersistentVolumeClaimSpec
  { v1PersistentVolumeClaimSpecAccessModes = Nothing
  , v1PersistentVolumeClaimSpecDataSource = Nothing
  , v1PersistentVolumeClaimSpecResources = Nothing
  , v1PersistentVolumeClaimSpecSelector = Nothing
  , v1PersistentVolumeClaimSpecStorageClassName = Nothing
  , v1PersistentVolumeClaimSpecVolumeMode = Nothing
  , v1PersistentVolumeClaimSpecVolumeName = Nothing
  }

-- ** V1PersistentVolumeClaimStatus
-- | V1PersistentVolumeClaimStatus
-- PersistentVolumeClaimStatus is the current status of a persistent volume claim.
data V1PersistentVolumeClaimStatus = V1PersistentVolumeClaimStatus
  { 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
  , v1PersistentVolumeClaimStatusCapacity :: !(Maybe (Map.Map String Quantity)) -- ^ "capacity" - Represents the actual resources of the underlying volume.
  , v1PersistentVolumeClaimStatusConditions :: !(Maybe [V1PersistentVolumeClaimCondition]) -- ^ "conditions" - Current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to &#39;ResizeStarted&#39;.
  , v1PersistentVolumeClaimStatusPhase :: !(Maybe Text) -- ^ "phase" - Phase represents the current phase of PersistentVolumeClaim.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1PersistentVolumeClaimStatus
instance A.FromJSON V1PersistentVolumeClaimStatus where
  parseJSON = A.withObject "V1PersistentVolumeClaimStatus" $ \o ->
    V1PersistentVolumeClaimStatus
      <$> (o .:? "accessModes")
      <*> (o .:? "capacity")
      <*> (o .:? "conditions")
      <*> (o .:? "phase")

-- | ToJSON V1PersistentVolumeClaimStatus
instance A.ToJSON V1PersistentVolumeClaimStatus where
  toJSON V1PersistentVolumeClaimStatus {..} =
   _omitNulls
      [ "accessModes" .= v1PersistentVolumeClaimStatusAccessModes
      , "capacity" .= v1PersistentVolumeClaimStatusCapacity
      , "conditions" .= v1PersistentVolumeClaimStatusConditions
      , "phase" .= v1PersistentVolumeClaimStatusPhase
      ]


-- | Construct a value of type 'V1PersistentVolumeClaimStatus' (by applying it's required fields, if any)
mkV1PersistentVolumeClaimStatus
  :: V1PersistentVolumeClaimStatus
mkV1PersistentVolumeClaimStatus =
  V1PersistentVolumeClaimStatus
  { v1PersistentVolumeClaimStatusAccessModes = Nothing
  , v1PersistentVolumeClaimStatusCapacity = Nothing
  , v1PersistentVolumeClaimStatusConditions = Nothing
  , v1PersistentVolumeClaimStatusPhase = Nothing
  }

-- ** 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
  { 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
  , v1PersistentVolumeClaimVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - Will force the ReadOnly setting in VolumeMounts. Default false.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1PersistentVolumeClaimVolumeSource
instance A.FromJSON V1PersistentVolumeClaimVolumeSource where
  parseJSON = A.withObject "V1PersistentVolumeClaimVolumeSource" $ \o ->
    V1PersistentVolumeClaimVolumeSource
      <$> (o .:  "claimName")
      <*> (o .:? "readOnly")

-- | ToJSON V1PersistentVolumeClaimVolumeSource
instance A.ToJSON V1PersistentVolumeClaimVolumeSource where
  toJSON V1PersistentVolumeClaimVolumeSource {..} =
   _omitNulls
      [ "claimName" .= v1PersistentVolumeClaimVolumeSourceClaimName
      , "readOnly" .= 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 v1PersistentVolumeClaimVolumeSourceClaimName =
  V1PersistentVolumeClaimVolumeSource
  { v1PersistentVolumeClaimVolumeSourceClaimName
  , v1PersistentVolumeClaimVolumeSourceReadOnly = Nothing
  }

-- ** V1PersistentVolumeList
-- | V1PersistentVolumeList
-- PersistentVolumeList is a list of PersistentVolume items.
data V1PersistentVolumeList = V1PersistentVolumeList
  { 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/api-conventions.md#resources
  , v1PersistentVolumeListItems :: !([V1PersistentVolume]) -- ^ /Required/ "items" - List of persistent volumes. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes
  , 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/api-conventions.md#types-kinds
  , v1PersistentVolumeListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1PersistentVolumeList
instance A.FromJSON V1PersistentVolumeList where
  parseJSON = A.withObject "V1PersistentVolumeList" $ \o ->
    V1PersistentVolumeList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1PersistentVolumeList
instance A.ToJSON V1PersistentVolumeList where
  toJSON V1PersistentVolumeList {..} =
   _omitNulls
      [ "apiVersion" .= v1PersistentVolumeListApiVersion
      , "items" .= v1PersistentVolumeListItems
      , "kind" .= v1PersistentVolumeListKind
      , "metadata" .= v1PersistentVolumeListMetadata
      ]


-- | Construct a value of type 'V1PersistentVolumeList' (by applying it's required fields, if any)
mkV1PersistentVolumeList
  :: [V1PersistentVolume] -- ^ 'v1PersistentVolumeListItems': List of persistent volumes. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes
  -> V1PersistentVolumeList
mkV1PersistentVolumeList v1PersistentVolumeListItems =
  V1PersistentVolumeList
  { v1PersistentVolumeListApiVersion = Nothing
  , v1PersistentVolumeListItems
  , v1PersistentVolumeListKind = Nothing
  , v1PersistentVolumeListMetadata = Nothing
  }

-- ** V1PersistentVolumeSpec
-- | V1PersistentVolumeSpec
-- PersistentVolumeSpec is the specification of a persistent volume.
data V1PersistentVolumeSpec = V1PersistentVolumeSpec
  { 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
  , v1PersistentVolumeSpecAwsElasticBlockStore :: !(Maybe V1AWSElasticBlockStoreVolumeSource) -- ^ "awsElasticBlockStore"
  , v1PersistentVolumeSpecAzureDisk :: !(Maybe V1AzureDiskVolumeSource) -- ^ "azureDisk"
  , v1PersistentVolumeSpecAzureFile :: !(Maybe V1AzureFilePersistentVolumeSource) -- ^ "azureFile"
  , v1PersistentVolumeSpecCapacity :: !(Maybe (Map.Map String Quantity)) -- ^ "capacity" - A description of the persistent volume&#39;s resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity
  , v1PersistentVolumeSpecCephfs :: !(Maybe V1CephFSPersistentVolumeSource) -- ^ "cephfs"
  , v1PersistentVolumeSpecCinder :: !(Maybe V1CinderPersistentVolumeSource) -- ^ "cinder"
  , v1PersistentVolumeSpecClaimRef :: !(Maybe V1ObjectReference) -- ^ "claimRef"
  , v1PersistentVolumeSpecCsi :: !(Maybe V1CSIPersistentVolumeSource) -- ^ "csi"
  , v1PersistentVolumeSpecFc :: !(Maybe V1FCVolumeSource) -- ^ "fc"
  , v1PersistentVolumeSpecFlexVolume :: !(Maybe V1FlexPersistentVolumeSource) -- ^ "flexVolume"
  , v1PersistentVolumeSpecFlocker :: !(Maybe V1FlockerVolumeSource) -- ^ "flocker"
  , v1PersistentVolumeSpecGcePersistentDisk :: !(Maybe V1GCEPersistentDiskVolumeSource) -- ^ "gcePersistentDisk"
  , v1PersistentVolumeSpecGlusterfs :: !(Maybe V1GlusterfsPersistentVolumeSource) -- ^ "glusterfs"
  , v1PersistentVolumeSpecHostPath :: !(Maybe V1HostPathVolumeSource) -- ^ "hostPath"
  , v1PersistentVolumeSpecIscsi :: !(Maybe V1ISCSIPersistentVolumeSource) -- ^ "iscsi"
  , v1PersistentVolumeSpecLocal :: !(Maybe V1LocalVolumeSource) -- ^ "local"
  , v1PersistentVolumeSpecMountOptions :: !(Maybe [Text]) -- ^ "mountOptions" - A 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
  , v1PersistentVolumeSpecNfs :: !(Maybe V1NFSVolumeSource) -- ^ "nfs"
  , v1PersistentVolumeSpecNodeAffinity :: !(Maybe V1VolumeNodeAffinity) -- ^ "nodeAffinity"
  , v1PersistentVolumeSpecPersistentVolumeReclaimPolicy :: !(Maybe Text) -- ^ "persistentVolumeReclaimPolicy" - 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
  , v1PersistentVolumeSpecPhotonPersistentDisk :: !(Maybe V1PhotonPersistentDiskVolumeSource) -- ^ "photonPersistentDisk"
  , v1PersistentVolumeSpecPortworxVolume :: !(Maybe V1PortworxVolumeSource) -- ^ "portworxVolume"
  , v1PersistentVolumeSpecQuobyte :: !(Maybe V1QuobyteVolumeSource) -- ^ "quobyte"
  , v1PersistentVolumeSpecRbd :: !(Maybe V1RBDPersistentVolumeSource) -- ^ "rbd"
  , v1PersistentVolumeSpecScaleIo :: !(Maybe V1ScaleIOPersistentVolumeSource) -- ^ "scaleIO"
  , v1PersistentVolumeSpecStorageClassName :: !(Maybe Text) -- ^ "storageClassName" - Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.
  , v1PersistentVolumeSpecStorageos :: !(Maybe V1StorageOSPersistentVolumeSource) -- ^ "storageos"
  , 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. This is a beta feature.
  , v1PersistentVolumeSpecVsphereVolume :: !(Maybe V1VsphereVirtualDiskVolumeSource) -- ^ "vsphereVolume"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1PersistentVolumeSpec
instance A.FromJSON V1PersistentVolumeSpec where
  parseJSON = A.withObject "V1PersistentVolumeSpec" $ \o ->
    V1PersistentVolumeSpec
      <$> (o .:? "accessModes")
      <*> (o .:? "awsElasticBlockStore")
      <*> (o .:? "azureDisk")
      <*> (o .:? "azureFile")
      <*> (o .:? "capacity")
      <*> (o .:? "cephfs")
      <*> (o .:? "cinder")
      <*> (o .:? "claimRef")
      <*> (o .:? "csi")
      <*> (o .:? "fc")
      <*> (o .:? "flexVolume")
      <*> (o .:? "flocker")
      <*> (o .:? "gcePersistentDisk")
      <*> (o .:? "glusterfs")
      <*> (o .:? "hostPath")
      <*> (o .:? "iscsi")
      <*> (o .:? "local")
      <*> (o .:? "mountOptions")
      <*> (o .:? "nfs")
      <*> (o .:? "nodeAffinity")
      <*> (o .:? "persistentVolumeReclaimPolicy")
      <*> (o .:? "photonPersistentDisk")
      <*> (o .:? "portworxVolume")
      <*> (o .:? "quobyte")
      <*> (o .:? "rbd")
      <*> (o .:? "scaleIO")
      <*> (o .:? "storageClassName")
      <*> (o .:? "storageos")
      <*> (o .:? "volumeMode")
      <*> (o .:? "vsphereVolume")

-- | ToJSON V1PersistentVolumeSpec
instance A.ToJSON V1PersistentVolumeSpec where
  toJSON V1PersistentVolumeSpec {..} =
   _omitNulls
      [ "accessModes" .= v1PersistentVolumeSpecAccessModes
      , "awsElasticBlockStore" .= v1PersistentVolumeSpecAwsElasticBlockStore
      , "azureDisk" .= v1PersistentVolumeSpecAzureDisk
      , "azureFile" .= v1PersistentVolumeSpecAzureFile
      , "capacity" .= v1PersistentVolumeSpecCapacity
      , "cephfs" .= v1PersistentVolumeSpecCephfs
      , "cinder" .= v1PersistentVolumeSpecCinder
      , "claimRef" .= v1PersistentVolumeSpecClaimRef
      , "csi" .= v1PersistentVolumeSpecCsi
      , "fc" .= v1PersistentVolumeSpecFc
      , "flexVolume" .= v1PersistentVolumeSpecFlexVolume
      , "flocker" .= v1PersistentVolumeSpecFlocker
      , "gcePersistentDisk" .= v1PersistentVolumeSpecGcePersistentDisk
      , "glusterfs" .= v1PersistentVolumeSpecGlusterfs
      , "hostPath" .= v1PersistentVolumeSpecHostPath
      , "iscsi" .= v1PersistentVolumeSpecIscsi
      , "local" .= v1PersistentVolumeSpecLocal
      , "mountOptions" .= v1PersistentVolumeSpecMountOptions
      , "nfs" .= v1PersistentVolumeSpecNfs
      , "nodeAffinity" .= v1PersistentVolumeSpecNodeAffinity
      , "persistentVolumeReclaimPolicy" .= v1PersistentVolumeSpecPersistentVolumeReclaimPolicy
      , "photonPersistentDisk" .= v1PersistentVolumeSpecPhotonPersistentDisk
      , "portworxVolume" .= v1PersistentVolumeSpecPortworxVolume
      , "quobyte" .= v1PersistentVolumeSpecQuobyte
      , "rbd" .= v1PersistentVolumeSpecRbd
      , "scaleIO" .= v1PersistentVolumeSpecScaleIo
      , "storageClassName" .= v1PersistentVolumeSpecStorageClassName
      , "storageos" .= v1PersistentVolumeSpecStorageos
      , "volumeMode" .= v1PersistentVolumeSpecVolumeMode
      , "vsphereVolume" .= v1PersistentVolumeSpecVsphereVolume
      ]


-- | Construct a value of type 'V1PersistentVolumeSpec' (by applying it's required fields, if any)
mkV1PersistentVolumeSpec
  :: V1PersistentVolumeSpec
mkV1PersistentVolumeSpec =
  V1PersistentVolumeSpec
  { v1PersistentVolumeSpecAccessModes = Nothing
  , v1PersistentVolumeSpecAwsElasticBlockStore = Nothing
  , v1PersistentVolumeSpecAzureDisk = Nothing
  , v1PersistentVolumeSpecAzureFile = Nothing
  , v1PersistentVolumeSpecCapacity = Nothing
  , v1PersistentVolumeSpecCephfs = Nothing
  , v1PersistentVolumeSpecCinder = Nothing
  , v1PersistentVolumeSpecClaimRef = Nothing
  , v1PersistentVolumeSpecCsi = Nothing
  , v1PersistentVolumeSpecFc = Nothing
  , v1PersistentVolumeSpecFlexVolume = Nothing
  , v1PersistentVolumeSpecFlocker = Nothing
  , v1PersistentVolumeSpecGcePersistentDisk = Nothing
  , v1PersistentVolumeSpecGlusterfs = Nothing
  , v1PersistentVolumeSpecHostPath = Nothing
  , v1PersistentVolumeSpecIscsi = Nothing
  , v1PersistentVolumeSpecLocal = Nothing
  , v1PersistentVolumeSpecMountOptions = Nothing
  , v1PersistentVolumeSpecNfs = Nothing
  , v1PersistentVolumeSpecNodeAffinity = Nothing
  , v1PersistentVolumeSpecPersistentVolumeReclaimPolicy = Nothing
  , v1PersistentVolumeSpecPhotonPersistentDisk = Nothing
  , v1PersistentVolumeSpecPortworxVolume = Nothing
  , v1PersistentVolumeSpecQuobyte = Nothing
  , v1PersistentVolumeSpecRbd = Nothing
  , v1PersistentVolumeSpecScaleIo = Nothing
  , v1PersistentVolumeSpecStorageClassName = Nothing
  , v1PersistentVolumeSpecStorageos = Nothing
  , v1PersistentVolumeSpecVolumeMode = Nothing
  , v1PersistentVolumeSpecVsphereVolume = Nothing
  }

-- ** V1PersistentVolumeStatus
-- | V1PersistentVolumeStatus
-- PersistentVolumeStatus is the current status of a persistent volume.
data V1PersistentVolumeStatus = V1PersistentVolumeStatus
  { v1PersistentVolumeStatusMessage :: !(Maybe Text) -- ^ "message" - A human-readable message indicating details about why the volume is in this state.
  , 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
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1PersistentVolumeStatus
instance A.FromJSON V1PersistentVolumeStatus where
  parseJSON = A.withObject "V1PersistentVolumeStatus" $ \o ->
    V1PersistentVolumeStatus
      <$> (o .:? "message")
      <*> (o .:? "phase")
      <*> (o .:? "reason")

-- | ToJSON V1PersistentVolumeStatus
instance A.ToJSON V1PersistentVolumeStatus where
  toJSON V1PersistentVolumeStatus {..} =
   _omitNulls
      [ "message" .= v1PersistentVolumeStatusMessage
      , "phase" .= v1PersistentVolumeStatusPhase
      , "reason" .= v1PersistentVolumeStatusReason
      ]


-- | Construct a value of type 'V1PersistentVolumeStatus' (by applying it's required fields, if any)
mkV1PersistentVolumeStatus
  :: V1PersistentVolumeStatus
mkV1PersistentVolumeStatus =
  V1PersistentVolumeStatus
  { v1PersistentVolumeStatusMessage = Nothing
  , v1PersistentVolumeStatusPhase = Nothing
  , v1PersistentVolumeStatusReason = Nothing
  }

-- ** V1PhotonPersistentDiskVolumeSource
-- | V1PhotonPersistentDiskVolumeSource
-- Represents a Photon Controller persistent disk resource.
data V1PhotonPersistentDiskVolumeSource = V1PhotonPersistentDiskVolumeSource
  { v1PhotonPersistentDiskVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - 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.
  , v1PhotonPersistentDiskVolumeSourcePdId :: !(Text) -- ^ /Required/ "pdID" - ID that identifies Photon Controller persistent disk
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1PhotonPersistentDiskVolumeSource
instance A.FromJSON V1PhotonPersistentDiskVolumeSource where
  parseJSON = A.withObject "V1PhotonPersistentDiskVolumeSource" $ \o ->
    V1PhotonPersistentDiskVolumeSource
      <$> (o .:? "fsType")
      <*> (o .:  "pdID")

-- | ToJSON V1PhotonPersistentDiskVolumeSource
instance A.ToJSON V1PhotonPersistentDiskVolumeSource where
  toJSON V1PhotonPersistentDiskVolumeSource {..} =
   _omitNulls
      [ "fsType" .= v1PhotonPersistentDiskVolumeSourceFsType
      , "pdID" .= v1PhotonPersistentDiskVolumeSourcePdId
      ]


-- | Construct a value of type 'V1PhotonPersistentDiskVolumeSource' (by applying it's required fields, if any)
mkV1PhotonPersistentDiskVolumeSource
  :: Text -- ^ 'v1PhotonPersistentDiskVolumeSourcePdId': ID that identifies Photon Controller persistent disk
  -> V1PhotonPersistentDiskVolumeSource
mkV1PhotonPersistentDiskVolumeSource v1PhotonPersistentDiskVolumeSourcePdId =
  V1PhotonPersistentDiskVolumeSource
  { v1PhotonPersistentDiskVolumeSourceFsType = Nothing
  , 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
  { 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1PodMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1PodSpec :: !(Maybe V1PodSpec) -- ^ "spec"
  , v1PodStatus :: !(Maybe V1PodStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1Pod
instance A.FromJSON V1Pod where
  parseJSON = A.withObject "V1Pod" $ \o ->
    V1Pod
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON V1Pod
instance A.ToJSON V1Pod where
  toJSON V1Pod {..} =
   _omitNulls
      [ "apiVersion" .= v1PodApiVersion
      , "kind" .= v1PodKind
      , "metadata" .= v1PodMetadata
      , "spec" .= v1PodSpec
      , "status" .= v1PodStatus
      ]


-- | Construct a value of type 'V1Pod' (by applying it's required fields, if any)
mkV1Pod
  :: V1Pod
mkV1Pod =
  V1Pod
  { v1PodApiVersion = Nothing
  , v1PodKind = Nothing
  , v1PodMetadata = Nothing
  , v1PodSpec = Nothing
  , v1PodStatus = Nothing
  }

-- ** V1PodAffinity
-- | V1PodAffinity
-- Pod affinity is a group of inter pod affinity scheduling rules.
data V1PodAffinity = V1PodAffinity
  { 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.
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1PodAffinity
instance A.FromJSON V1PodAffinity where
  parseJSON = A.withObject "V1PodAffinity" $ \o ->
    V1PodAffinity
      <$> (o .:? "preferredDuringSchedulingIgnoredDuringExecution")
      <*> (o .:? "requiredDuringSchedulingIgnoredDuringExecution")

-- | ToJSON V1PodAffinity
instance A.ToJSON V1PodAffinity where
  toJSON V1PodAffinity {..} =
   _omitNulls
      [ "preferredDuringSchedulingIgnoredDuringExecution" .= v1PodAffinityPreferredDuringSchedulingIgnoredDuringExecution
      , "requiredDuringSchedulingIgnoredDuringExecution" .= v1PodAffinityRequiredDuringSchedulingIgnoredDuringExecution
      ]


-- | Construct a value of type 'V1PodAffinity' (by applying it's required fields, if any)
mkV1PodAffinity
  :: V1PodAffinity
mkV1PodAffinity =
  V1PodAffinity
  { v1PodAffinityPreferredDuringSchedulingIgnoredDuringExecution = Nothing
  , v1PodAffinityRequiredDuringSchedulingIgnoredDuringExecution = 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
  { v1PodAffinityTermLabelSelector :: !(Maybe V1LabelSelector) -- ^ "labelSelector"
  , v1PodAffinityTermNamespaces :: !(Maybe [Text]) -- ^ "namespaces" - namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \&quot;this pod&#39;s namespace\&quot;
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1PodAffinityTerm
instance A.FromJSON V1PodAffinityTerm where
  parseJSON = A.withObject "V1PodAffinityTerm" $ \o ->
    V1PodAffinityTerm
      <$> (o .:? "labelSelector")
      <*> (o .:? "namespaces")
      <*> (o .:  "topologyKey")

-- | ToJSON V1PodAffinityTerm
instance A.ToJSON V1PodAffinityTerm where
  toJSON V1PodAffinityTerm {..} =
   _omitNulls
      [ "labelSelector" .= v1PodAffinityTermLabelSelector
      , "namespaces" .= v1PodAffinityTermNamespaces
      , "topologyKey" .= 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 v1PodAffinityTermTopologyKey =
  V1PodAffinityTerm
  { v1PodAffinityTermLabelSelector = Nothing
  , v1PodAffinityTermNamespaces = Nothing
  , v1PodAffinityTermTopologyKey
  }

-- ** V1PodAntiAffinity
-- | V1PodAntiAffinity
-- Pod anti affinity is a group of inter pod anti affinity scheduling rules.
data V1PodAntiAffinity = V1PodAntiAffinity
  { 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.
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1PodAntiAffinity
instance A.FromJSON V1PodAntiAffinity where
  parseJSON = A.withObject "V1PodAntiAffinity" $ \o ->
    V1PodAntiAffinity
      <$> (o .:? "preferredDuringSchedulingIgnoredDuringExecution")
      <*> (o .:? "requiredDuringSchedulingIgnoredDuringExecution")

-- | ToJSON V1PodAntiAffinity
instance A.ToJSON V1PodAntiAffinity where
  toJSON V1PodAntiAffinity {..} =
   _omitNulls
      [ "preferredDuringSchedulingIgnoredDuringExecution" .= v1PodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecution
      , "requiredDuringSchedulingIgnoredDuringExecution" .= v1PodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecution
      ]


-- | Construct a value of type 'V1PodAntiAffinity' (by applying it's required fields, if any)
mkV1PodAntiAffinity
  :: V1PodAntiAffinity
mkV1PodAntiAffinity =
  V1PodAntiAffinity
  { v1PodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecution = Nothing
  , v1PodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecution = Nothing
  }

-- ** V1PodCondition
-- | V1PodCondition
-- PodCondition contains details for the current condition of this pod.
data V1PodCondition = V1PodCondition
  { v1PodConditionLastProbeTime :: !(Maybe DateTime) -- ^ "lastProbeTime" - Last time we probed the condition.
  , v1PodConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - Last time the condition transitioned from one status to another.
  , v1PodConditionMessage :: !(Maybe Text) -- ^ "message" - Human-readable message indicating details about last transition.
  , v1PodConditionReason :: !(Maybe Text) -- ^ "reason" - Unique, one-word, CamelCase reason for the condition&#39;s last transition.
  , 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
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1PodCondition
instance A.FromJSON V1PodCondition where
  parseJSON = A.withObject "V1PodCondition" $ \o ->
    V1PodCondition
      <$> (o .:? "lastProbeTime")
      <*> (o .:? "lastTransitionTime")
      <*> (o .:? "message")
      <*> (o .:? "reason")
      <*> (o .:  "status")
      <*> (o .:  "type")

-- | ToJSON V1PodCondition
instance A.ToJSON V1PodCondition where
  toJSON V1PodCondition {..} =
   _omitNulls
      [ "lastProbeTime" .= v1PodConditionLastProbeTime
      , "lastTransitionTime" .= v1PodConditionLastTransitionTime
      , "message" .= v1PodConditionMessage
      , "reason" .= v1PodConditionReason
      , "status" .= v1PodConditionStatus
      , "type" .= 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 v1PodConditionStatus v1PodConditionType =
  V1PodCondition
  { v1PodConditionLastProbeTime = Nothing
  , v1PodConditionLastTransitionTime = Nothing
  , v1PodConditionMessage = Nothing
  , v1PodConditionReason = Nothing
  , v1PodConditionStatus
  , v1PodConditionType
  }

-- ** V1PodDNSConfig
-- | V1PodDNSConfig
-- PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy.
data V1PodDNSConfig = V1PodDNSConfig
  { 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.
  , 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.
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1PodDNSConfig
instance A.FromJSON V1PodDNSConfig where
  parseJSON = A.withObject "V1PodDNSConfig" $ \o ->
    V1PodDNSConfig
      <$> (o .:? "nameservers")
      <*> (o .:? "options")
      <*> (o .:? "searches")

-- | ToJSON V1PodDNSConfig
instance A.ToJSON V1PodDNSConfig where
  toJSON V1PodDNSConfig {..} =
   _omitNulls
      [ "nameservers" .= v1PodDNSConfigNameservers
      , "options" .= v1PodDNSConfigOptions
      , "searches" .= v1PodDNSConfigSearches
      ]


-- | Construct a value of type 'V1PodDNSConfig' (by applying it's required fields, if any)
mkV1PodDNSConfig
  :: V1PodDNSConfig
mkV1PodDNSConfig =
  V1PodDNSConfig
  { v1PodDNSConfigNameservers = Nothing
  , v1PodDNSConfigOptions = Nothing
  , v1PodDNSConfigSearches = Nothing
  }

-- ** V1PodDNSConfigOption
-- | V1PodDNSConfigOption
-- PodDNSConfigOption defines DNS resolver options of a pod.
data V1PodDNSConfigOption = V1PodDNSConfigOption
  { v1PodDNSConfigOptionName :: !(Maybe Text) -- ^ "name" - Required.
  , v1PodDNSConfigOptionValue :: !(Maybe Text) -- ^ "value"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1PodDNSConfigOption
instance A.FromJSON V1PodDNSConfigOption where
  parseJSON = A.withObject "V1PodDNSConfigOption" $ \o ->
    V1PodDNSConfigOption
      <$> (o .:? "name")
      <*> (o .:? "value")

-- | ToJSON V1PodDNSConfigOption
instance A.ToJSON V1PodDNSConfigOption where
  toJSON V1PodDNSConfigOption {..} =
   _omitNulls
      [ "name" .= v1PodDNSConfigOptionName
      , "value" .= v1PodDNSConfigOptionValue
      ]


-- | Construct a value of type 'V1PodDNSConfigOption' (by applying it's required fields, if any)
mkV1PodDNSConfigOption
  :: V1PodDNSConfigOption
mkV1PodDNSConfigOption =
  V1PodDNSConfigOption
  { v1PodDNSConfigOptionName = Nothing
  , v1PodDNSConfigOptionValue = Nothing
  }

-- ** V1PodList
-- | V1PodList
-- PodList is a list of Pods.
data V1PodList = V1PodList
  { 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/api-conventions.md#resources
  , v1PodListItems :: !([V1Pod]) -- ^ /Required/ "items" - List of pods. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md
  , 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/api-conventions.md#types-kinds
  , v1PodListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1PodList
instance A.FromJSON V1PodList where
  parseJSON = A.withObject "V1PodList" $ \o ->
    V1PodList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1PodList
instance A.ToJSON V1PodList where
  toJSON V1PodList {..} =
   _omitNulls
      [ "apiVersion" .= v1PodListApiVersion
      , "items" .= v1PodListItems
      , "kind" .= v1PodListKind
      , "metadata" .= 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/api-conventions.md
  -> V1PodList
mkV1PodList v1PodListItems =
  V1PodList
  { v1PodListApiVersion = Nothing
  , v1PodListItems
  , v1PodListKind = Nothing
  , v1PodListMetadata = Nothing
  }

-- ** V1PodReadinessGate
-- | V1PodReadinessGate
-- PodReadinessGate contains the reference to a pod condition
data V1PodReadinessGate = V1PodReadinessGate
  { v1PodReadinessGateConditionType :: !(Text) -- ^ /Required/ "conditionType" - ConditionType refers to a condition in the pod&#39;s condition list with matching type.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1PodReadinessGate
instance A.FromJSON V1PodReadinessGate where
  parseJSON = A.withObject "V1PodReadinessGate" $ \o ->
    V1PodReadinessGate
      <$> (o .:  "conditionType")

-- | ToJSON V1PodReadinessGate
instance A.ToJSON V1PodReadinessGate where
  toJSON V1PodReadinessGate {..} =
   _omitNulls
      [ "conditionType" .= 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 v1PodReadinessGateConditionType =
  V1PodReadinessGate
  { v1PodReadinessGateConditionType
  }

-- ** 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
  { 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.
  , 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.
  , 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.
  , 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.
  , v1PodSecurityContextSeLinuxOptions :: !(Maybe V1SELinuxOptions) -- ^ "seLinuxOptions"
  , 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.  If unspecified, no groups will be added to any container.
  , 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.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1PodSecurityContext
instance A.FromJSON V1PodSecurityContext where
  parseJSON = A.withObject "V1PodSecurityContext" $ \o ->
    V1PodSecurityContext
      <$> (o .:? "fsGroup")
      <*> (o .:? "runAsGroup")
      <*> (o .:? "runAsNonRoot")
      <*> (o .:? "runAsUser")
      <*> (o .:? "seLinuxOptions")
      <*> (o .:? "supplementalGroups")
      <*> (o .:? "sysctls")

-- | ToJSON V1PodSecurityContext
instance A.ToJSON V1PodSecurityContext where
  toJSON V1PodSecurityContext {..} =
   _omitNulls
      [ "fsGroup" .= v1PodSecurityContextFsGroup
      , "runAsGroup" .= v1PodSecurityContextRunAsGroup
      , "runAsNonRoot" .= v1PodSecurityContextRunAsNonRoot
      , "runAsUser" .= v1PodSecurityContextRunAsUser
      , "seLinuxOptions" .= v1PodSecurityContextSeLinuxOptions
      , "supplementalGroups" .= v1PodSecurityContextSupplementalGroups
      , "sysctls" .= v1PodSecurityContextSysctls
      ]


-- | Construct a value of type 'V1PodSecurityContext' (by applying it's required fields, if any)
mkV1PodSecurityContext
  :: V1PodSecurityContext
mkV1PodSecurityContext =
  V1PodSecurityContext
  { v1PodSecurityContextFsGroup = Nothing
  , v1PodSecurityContextRunAsGroup = Nothing
  , v1PodSecurityContextRunAsNonRoot = Nothing
  , v1PodSecurityContextRunAsUser = Nothing
  , v1PodSecurityContextSeLinuxOptions = Nothing
  , v1PodSecurityContextSupplementalGroups = Nothing
  , v1PodSecurityContextSysctls = Nothing
  }

-- ** V1PodSpec
-- | V1PodSpec
-- PodSpec is a description of a pod.
data V1PodSpec = V1PodSpec
  { 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.
  , v1PodSpecAffinity :: !(Maybe V1Affinity) -- ^ "affinity"
  , v1PodSpecAutomountServiceAccountToken :: !(Maybe Bool) -- ^ "automountServiceAccountToken" - AutomountServiceAccountToken indicates whether a service account token should be automatically mounted.
  , 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.
  , v1PodSpecDnsConfig :: !(Maybe V1PodDNSConfig) -- ^ "dnsConfig"
  , 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;.
  , 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.
  , 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. This is only valid for non-hostNetwork pods.
  , v1PodSpecHostIpc :: !(Maybe Bool) -- ^ "hostIPC" - Use the host&#39;s ipc namespace. Optional: Default to false.
  , 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.
  , v1PodSpecHostPid :: !(Maybe Bool) -- ^ "hostPID" - Use the host&#39;s pid namespace. Optional: Default to false.
  , 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.
  , 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. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod
  , 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, or Liveness 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/
  , v1PodSpecNodeName :: !(Maybe Text) -- ^ "nodeName" - NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements.
  , 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/
  , 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.
  , 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.
  , 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/0007-pod-ready%2B%2B.md
  , v1PodSpecRestartPolicy :: !(Maybe Text) -- ^ "restartPolicy" - Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy
  , 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/runtime-class.md This is an alpha feature and may change in the future.
  , 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.
  , v1PodSpecSecurityContext :: !(Maybe V1PodSecurityContext) -- ^ "securityContext"
  , v1PodSpecServiceAccount :: !(Maybe Text) -- ^ "serviceAccount" - DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.
  , 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/
  , 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature.
  , 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.
  , 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 delete immediately. 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.
  , v1PodSpecTolerations :: !(Maybe [V1Toleration]) -- ^ "tolerations" - If specified, the pod&#39;s tolerations.
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1PodSpec
instance A.FromJSON V1PodSpec where
  parseJSON = A.withObject "V1PodSpec" $ \o ->
    V1PodSpec
      <$> (o .:? "activeDeadlineSeconds")
      <*> (o .:? "affinity")
      <*> (o .:? "automountServiceAccountToken")
      <*> (o .:  "containers")
      <*> (o .:? "dnsConfig")
      <*> (o .:? "dnsPolicy")
      <*> (o .:? "enableServiceLinks")
      <*> (o .:? "hostAliases")
      <*> (o .:? "hostIPC")
      <*> (o .:? "hostNetwork")
      <*> (o .:? "hostPID")
      <*> (o .:? "hostname")
      <*> (o .:? "imagePullSecrets")
      <*> (o .:? "initContainers")
      <*> (o .:? "nodeName")
      <*> (o .:? "nodeSelector")
      <*> (o .:? "priority")
      <*> (o .:? "priorityClassName")
      <*> (o .:? "readinessGates")
      <*> (o .:? "restartPolicy")
      <*> (o .:? "runtimeClassName")
      <*> (o .:? "schedulerName")
      <*> (o .:? "securityContext")
      <*> (o .:? "serviceAccount")
      <*> (o .:? "serviceAccountName")
      <*> (o .:? "shareProcessNamespace")
      <*> (o .:? "subdomain")
      <*> (o .:? "terminationGracePeriodSeconds")
      <*> (o .:? "tolerations")
      <*> (o .:? "volumes")

-- | ToJSON V1PodSpec
instance A.ToJSON V1PodSpec where
  toJSON V1PodSpec {..} =
   _omitNulls
      [ "activeDeadlineSeconds" .= v1PodSpecActiveDeadlineSeconds
      , "affinity" .= v1PodSpecAffinity
      , "automountServiceAccountToken" .= v1PodSpecAutomountServiceAccountToken
      , "containers" .= v1PodSpecContainers
      , "dnsConfig" .= v1PodSpecDnsConfig
      , "dnsPolicy" .= v1PodSpecDnsPolicy
      , "enableServiceLinks" .= v1PodSpecEnableServiceLinks
      , "hostAliases" .= v1PodSpecHostAliases
      , "hostIPC" .= v1PodSpecHostIpc
      , "hostNetwork" .= v1PodSpecHostNetwork
      , "hostPID" .= v1PodSpecHostPid
      , "hostname" .= v1PodSpecHostname
      , "imagePullSecrets" .= v1PodSpecImagePullSecrets
      , "initContainers" .= v1PodSpecInitContainers
      , "nodeName" .= v1PodSpecNodeName
      , "nodeSelector" .= v1PodSpecNodeSelector
      , "priority" .= v1PodSpecPriority
      , "priorityClassName" .= v1PodSpecPriorityClassName
      , "readinessGates" .= v1PodSpecReadinessGates
      , "restartPolicy" .= v1PodSpecRestartPolicy
      , "runtimeClassName" .= v1PodSpecRuntimeClassName
      , "schedulerName" .= v1PodSpecSchedulerName
      , "securityContext" .= v1PodSpecSecurityContext
      , "serviceAccount" .= v1PodSpecServiceAccount
      , "serviceAccountName" .= v1PodSpecServiceAccountName
      , "shareProcessNamespace" .= v1PodSpecShareProcessNamespace
      , "subdomain" .= v1PodSpecSubdomain
      , "terminationGracePeriodSeconds" .= v1PodSpecTerminationGracePeriodSeconds
      , "tolerations" .= v1PodSpecTolerations
      , "volumes" .= 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 v1PodSpecContainers =
  V1PodSpec
  { v1PodSpecActiveDeadlineSeconds = Nothing
  , v1PodSpecAffinity = Nothing
  , v1PodSpecAutomountServiceAccountToken = Nothing
  , v1PodSpecContainers
  , v1PodSpecDnsConfig = Nothing
  , v1PodSpecDnsPolicy = Nothing
  , v1PodSpecEnableServiceLinks = Nothing
  , v1PodSpecHostAliases = Nothing
  , v1PodSpecHostIpc = Nothing
  , v1PodSpecHostNetwork = Nothing
  , v1PodSpecHostPid = Nothing
  , v1PodSpecHostname = Nothing
  , v1PodSpecImagePullSecrets = Nothing
  , v1PodSpecInitContainers = Nothing
  , v1PodSpecNodeName = Nothing
  , v1PodSpecNodeSelector = Nothing
  , v1PodSpecPriority = Nothing
  , v1PodSpecPriorityClassName = Nothing
  , v1PodSpecReadinessGates = Nothing
  , v1PodSpecRestartPolicy = Nothing
  , v1PodSpecRuntimeClassName = Nothing
  , v1PodSpecSchedulerName = Nothing
  , v1PodSpecSecurityContext = Nothing
  , v1PodSpecServiceAccount = Nothing
  , v1PodSpecServiceAccountName = Nothing
  , v1PodSpecShareProcessNamespace = Nothing
  , v1PodSpecSubdomain = Nothing
  , v1PodSpecTerminationGracePeriodSeconds = Nothing
  , v1PodSpecTolerations = Nothing
  , v1PodSpecVolumes = 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
  { v1PodStatusConditions :: !(Maybe [V1PodCondition]) -- ^ "conditions" - Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions
  , v1PodStatusContainerStatuses :: !(Maybe [V1ContainerStatus]) -- ^ "containerStatuses" - The list has one entry per container in the manifest. Each entry is currently the output of &#x60;docker inspect&#x60;. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status
  , v1PodStatusHostIp :: !(Maybe Text) -- ^ "hostIP" - IP address of the host to which the pod is assigned. Empty if not yet scheduled.
  , v1PodStatusInitContainerStatuses :: !(Maybe [V1ContainerStatus]) -- ^ "initContainerStatuses" - The list has one entry per init container in the manifest. The most recent successful init container will have ready &#x3D; true, the most recently started container will have startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status
  , v1PodStatusMessage :: !(Maybe Text) -- ^ "message" - A human readable message indicating details about why the pod is in this condition.
  , 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.
  , 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
  , v1PodStatusPodIp :: !(Maybe Text) -- ^ "podIP" - IP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated.
  , 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://git.k8s.io/community/contributors/design-proposals/node/resource-qos.md
  , v1PodStatusReason :: !(Maybe Text) -- ^ "reason" - A brief CamelCase message indicating details about why the pod is in this state. e.g. &#39;Evicted&#39;
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1PodStatus
instance A.FromJSON V1PodStatus where
  parseJSON = A.withObject "V1PodStatus" $ \o ->
    V1PodStatus
      <$> (o .:? "conditions")
      <*> (o .:? "containerStatuses")
      <*> (o .:? "hostIP")
      <*> (o .:? "initContainerStatuses")
      <*> (o .:? "message")
      <*> (o .:? "nominatedNodeName")
      <*> (o .:? "phase")
      <*> (o .:? "podIP")
      <*> (o .:? "qosClass")
      <*> (o .:? "reason")
      <*> (o .:? "startTime")

-- | ToJSON V1PodStatus
instance A.ToJSON V1PodStatus where
  toJSON V1PodStatus {..} =
   _omitNulls
      [ "conditions" .= v1PodStatusConditions
      , "containerStatuses" .= v1PodStatusContainerStatuses
      , "hostIP" .= v1PodStatusHostIp
      , "initContainerStatuses" .= v1PodStatusInitContainerStatuses
      , "message" .= v1PodStatusMessage
      , "nominatedNodeName" .= v1PodStatusNominatedNodeName
      , "phase" .= v1PodStatusPhase
      , "podIP" .= v1PodStatusPodIp
      , "qosClass" .= v1PodStatusQosClass
      , "reason" .= v1PodStatusReason
      , "startTime" .= v1PodStatusStartTime
      ]


-- | Construct a value of type 'V1PodStatus' (by applying it's required fields, if any)
mkV1PodStatus
  :: V1PodStatus
mkV1PodStatus =
  V1PodStatus
  { v1PodStatusConditions = Nothing
  , v1PodStatusContainerStatuses = Nothing
  , v1PodStatusHostIp = Nothing
  , v1PodStatusInitContainerStatuses = Nothing
  , v1PodStatusMessage = Nothing
  , v1PodStatusNominatedNodeName = Nothing
  , v1PodStatusPhase = Nothing
  , v1PodStatusPodIp = Nothing
  , v1PodStatusQosClass = Nothing
  , v1PodStatusReason = Nothing
  , v1PodStatusStartTime = Nothing
  }

-- ** V1PodTemplate
-- | V1PodTemplate
-- PodTemplate describes a template for creating copies of a predefined pod.
data V1PodTemplate = V1PodTemplate
  { 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1PodTemplateMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1PodTemplateTemplate :: !(Maybe V1PodTemplateSpec) -- ^ "template"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1PodTemplate
instance A.FromJSON V1PodTemplate where
  parseJSON = A.withObject "V1PodTemplate" $ \o ->
    V1PodTemplate
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "template")

-- | ToJSON V1PodTemplate
instance A.ToJSON V1PodTemplate where
  toJSON V1PodTemplate {..} =
   _omitNulls
      [ "apiVersion" .= v1PodTemplateApiVersion
      , "kind" .= v1PodTemplateKind
      , "metadata" .= v1PodTemplateMetadata
      , "template" .= v1PodTemplateTemplate
      ]


-- | Construct a value of type 'V1PodTemplate' (by applying it's required fields, if any)
mkV1PodTemplate
  :: V1PodTemplate
mkV1PodTemplate =
  V1PodTemplate
  { v1PodTemplateApiVersion = Nothing
  , v1PodTemplateKind = Nothing
  , v1PodTemplateMetadata = Nothing
  , v1PodTemplateTemplate = Nothing
  }

-- ** V1PodTemplateList
-- | V1PodTemplateList
-- PodTemplateList is a list of PodTemplates.
data V1PodTemplateList = V1PodTemplateList
  { 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/api-conventions.md#resources
  , v1PodTemplateListItems :: !([V1PodTemplate]) -- ^ /Required/ "items" - List of pod templates
  , 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/api-conventions.md#types-kinds
  , v1PodTemplateListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1PodTemplateList
instance A.FromJSON V1PodTemplateList where
  parseJSON = A.withObject "V1PodTemplateList" $ \o ->
    V1PodTemplateList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1PodTemplateList
instance A.ToJSON V1PodTemplateList where
  toJSON V1PodTemplateList {..} =
   _omitNulls
      [ "apiVersion" .= v1PodTemplateListApiVersion
      , "items" .= v1PodTemplateListItems
      , "kind" .= v1PodTemplateListKind
      , "metadata" .= v1PodTemplateListMetadata
      ]


-- | Construct a value of type 'V1PodTemplateList' (by applying it's required fields, if any)
mkV1PodTemplateList
  :: [V1PodTemplate] -- ^ 'v1PodTemplateListItems': List of pod templates
  -> V1PodTemplateList
mkV1PodTemplateList v1PodTemplateListItems =
  V1PodTemplateList
  { v1PodTemplateListApiVersion = Nothing
  , v1PodTemplateListItems
  , v1PodTemplateListKind = Nothing
  , v1PodTemplateListMetadata = Nothing
  }

-- ** V1PodTemplateSpec
-- | V1PodTemplateSpec
-- PodTemplateSpec describes the data a pod should have when created from a template
data V1PodTemplateSpec = V1PodTemplateSpec
  { v1PodTemplateSpecMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1PodTemplateSpecSpec :: !(Maybe V1PodSpec) -- ^ "spec"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1PodTemplateSpec
instance A.FromJSON V1PodTemplateSpec where
  parseJSON = A.withObject "V1PodTemplateSpec" $ \o ->
    V1PodTemplateSpec
      <$> (o .:? "metadata")
      <*> (o .:? "spec")

-- | ToJSON V1PodTemplateSpec
instance A.ToJSON V1PodTemplateSpec where
  toJSON V1PodTemplateSpec {..} =
   _omitNulls
      [ "metadata" .= v1PodTemplateSpecMetadata
      , "spec" .= v1PodTemplateSpecSpec
      ]


-- | Construct a value of type 'V1PodTemplateSpec' (by applying it's required fields, if any)
mkV1PodTemplateSpec
  :: V1PodTemplateSpec
mkV1PodTemplateSpec =
  V1PodTemplateSpec
  { v1PodTemplateSpecMetadata = Nothing
  , v1PodTemplateSpecSpec = 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
  { 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.
  , 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.
  , 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.
  , v1PolicyRuleResources :: !(Maybe [Text]) -- ^ "resources" - Resources is a list of resources this rule applies to.  ResourceAll represents all resources.
  , v1PolicyRuleVerbs :: !([Text]) -- ^ /Required/ "verbs" - Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule.  VerbAll represents all kinds.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1PolicyRule
instance A.FromJSON V1PolicyRule where
  parseJSON = A.withObject "V1PolicyRule" $ \o ->
    V1PolicyRule
      <$> (o .:? "apiGroups")
      <*> (o .:? "nonResourceURLs")
      <*> (o .:? "resourceNames")
      <*> (o .:? "resources")
      <*> (o .:  "verbs")

-- | ToJSON V1PolicyRule
instance A.ToJSON V1PolicyRule where
  toJSON V1PolicyRule {..} =
   _omitNulls
      [ "apiGroups" .= v1PolicyRuleApiGroups
      , "nonResourceURLs" .= v1PolicyRuleNonResourceUrLs
      , "resourceNames" .= v1PolicyRuleResourceNames
      , "resources" .= v1PolicyRuleResources
      , "verbs" .= 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 and AttributeRestrictions contained in this rule.  VerbAll represents all kinds.
  -> V1PolicyRule
mkV1PolicyRule v1PolicyRuleVerbs =
  V1PolicyRule
  { v1PolicyRuleApiGroups = Nothing
  , v1PolicyRuleNonResourceUrLs = Nothing
  , v1PolicyRuleResourceNames = Nothing
  , v1PolicyRuleResources = Nothing
  , v1PolicyRuleVerbs
  }

-- ** V1PortworxVolumeSource
-- | V1PortworxVolumeSource
-- PortworxVolumeSource represents a Portworx volume resource.
data V1PortworxVolumeSource = V1PortworxVolumeSource
  { 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.
  , v1PortworxVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
  , v1PortworxVolumeSourceVolumeId :: !(Text) -- ^ /Required/ "volumeID" - VolumeID uniquely identifies a Portworx volume
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1PortworxVolumeSource
instance A.FromJSON V1PortworxVolumeSource where
  parseJSON = A.withObject "V1PortworxVolumeSource" $ \o ->
    V1PortworxVolumeSource
      <$> (o .:? "fsType")
      <*> (o .:? "readOnly")
      <*> (o .:  "volumeID")

-- | ToJSON V1PortworxVolumeSource
instance A.ToJSON V1PortworxVolumeSource where
  toJSON V1PortworxVolumeSource {..} =
   _omitNulls
      [ "fsType" .= v1PortworxVolumeSourceFsType
      , "readOnly" .= v1PortworxVolumeSourceReadOnly
      , "volumeID" .= 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 v1PortworxVolumeSourceVolumeId =
  V1PortworxVolumeSource
  { v1PortworxVolumeSourceFsType = Nothing
  , v1PortworxVolumeSourceReadOnly = Nothing
  , v1PortworxVolumeSourceVolumeId
  }

-- ** V1Preconditions
-- | V1Preconditions
-- Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.
data V1Preconditions = V1Preconditions
  { v1PreconditionsResourceVersion :: !(Maybe Text) -- ^ "resourceVersion" - Specifies the target ResourceVersion
  , v1PreconditionsUid :: !(Maybe Text) -- ^ "uid" - Specifies the target UID.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1Preconditions
instance A.FromJSON V1Preconditions where
  parseJSON = A.withObject "V1Preconditions" $ \o ->
    V1Preconditions
      <$> (o .:? "resourceVersion")
      <*> (o .:? "uid")

-- | ToJSON V1Preconditions
instance A.ToJSON V1Preconditions where
  toJSON V1Preconditions {..} =
   _omitNulls
      [ "resourceVersion" .= v1PreconditionsResourceVersion
      , "uid" .= v1PreconditionsUid
      ]


-- | Construct a value of type 'V1Preconditions' (by applying it's required fields, if any)
mkV1Preconditions
  :: V1Preconditions
mkV1Preconditions =
  V1Preconditions
  { v1PreconditionsResourceVersion = Nothing
  , v1PreconditionsUid = 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
  { v1PreferredSchedulingTermPreference :: !(V1NodeSelectorTerm) -- ^ /Required/ "preference"
  , v1PreferredSchedulingTermWeight :: !(Int) -- ^ /Required/ "weight" - Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1PreferredSchedulingTerm
instance A.FromJSON V1PreferredSchedulingTerm where
  parseJSON = A.withObject "V1PreferredSchedulingTerm" $ \o ->
    V1PreferredSchedulingTerm
      <$> (o .:  "preference")
      <*> (o .:  "weight")

-- | ToJSON V1PreferredSchedulingTerm
instance A.ToJSON V1PreferredSchedulingTerm where
  toJSON V1PreferredSchedulingTerm {..} =
   _omitNulls
      [ "preference" .= v1PreferredSchedulingTermPreference
      , "weight" .= 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 v1PreferredSchedulingTermPreference v1PreferredSchedulingTermWeight =
  V1PreferredSchedulingTerm
  { v1PreferredSchedulingTermPreference
  , 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
  { 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/api-conventions.md#resources
  , v1PriorityClassDescription :: !(Maybe Text) -- ^ "description" - description is an arbitrary string that usually provides guidelines on when this priority class should be used.
  , 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.
  , 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/api-conventions.md#types-kinds
  , v1PriorityClassMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1PriorityClassValue :: !(Int) -- ^ /Required/ "value" - The 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1PriorityClass
instance A.FromJSON V1PriorityClass where
  parseJSON = A.withObject "V1PriorityClass" $ \o ->
    V1PriorityClass
      <$> (o .:? "apiVersion")
      <*> (o .:? "description")
      <*> (o .:? "globalDefault")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:  "value")

-- | ToJSON V1PriorityClass
instance A.ToJSON V1PriorityClass where
  toJSON V1PriorityClass {..} =
   _omitNulls
      [ "apiVersion" .= v1PriorityClassApiVersion
      , "description" .= v1PriorityClassDescription
      , "globalDefault" .= v1PriorityClassGlobalDefault
      , "kind" .= v1PriorityClassKind
      , "metadata" .= v1PriorityClassMetadata
      , "value" .= v1PriorityClassValue
      ]


-- | Construct a value of type 'V1PriorityClass' (by applying it's required fields, if any)
mkV1PriorityClass
  :: Int -- ^ 'v1PriorityClassValue': The 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 v1PriorityClassValue =
  V1PriorityClass
  { v1PriorityClassApiVersion = Nothing
  , v1PriorityClassDescription = Nothing
  , v1PriorityClassGlobalDefault = Nothing
  , v1PriorityClassKind = Nothing
  , v1PriorityClassMetadata = Nothing
  , v1PriorityClassValue
  }

-- ** V1PriorityClassList
-- | V1PriorityClassList
-- PriorityClassList is a collection of priority classes.
data V1PriorityClassList = V1PriorityClassList
  { 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/api-conventions.md#resources
  , v1PriorityClassListItems :: !([V1PriorityClass]) -- ^ /Required/ "items" - items is the list of PriorityClasses
  , 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/api-conventions.md#types-kinds
  , v1PriorityClassListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1PriorityClassList
instance A.FromJSON V1PriorityClassList where
  parseJSON = A.withObject "V1PriorityClassList" $ \o ->
    V1PriorityClassList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1PriorityClassList
instance A.ToJSON V1PriorityClassList where
  toJSON V1PriorityClassList {..} =
   _omitNulls
      [ "apiVersion" .= v1PriorityClassListApiVersion
      , "items" .= v1PriorityClassListItems
      , "kind" .= v1PriorityClassListKind
      , "metadata" .= 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 v1PriorityClassListItems =
  V1PriorityClassList
  { v1PriorityClassListApiVersion = Nothing
  , v1PriorityClassListItems
  , v1PriorityClassListKind = Nothing
  , v1PriorityClassListMetadata = 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
  { v1ProbeExec :: !(Maybe V1ExecAction) -- ^ "exec"
  , v1ProbeFailureThreshold :: !(Maybe Int) -- ^ "failureThreshold" - Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.
  , v1ProbeHttpGet :: !(Maybe V1HTTPGetAction) -- ^ "httpGet"
  , 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
  , v1ProbePeriodSeconds :: !(Maybe Int) -- ^ "periodSeconds" - How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.
  , 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. Minimum value is 1.
  , v1ProbeTcpSocket :: !(Maybe V1TCPSocketAction) -- ^ "tcpSocket"
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1Probe
instance A.FromJSON V1Probe where
  parseJSON = A.withObject "V1Probe" $ \o ->
    V1Probe
      <$> (o .:? "exec")
      <*> (o .:? "failureThreshold")
      <*> (o .:? "httpGet")
      <*> (o .:? "initialDelaySeconds")
      <*> (o .:? "periodSeconds")
      <*> (o .:? "successThreshold")
      <*> (o .:? "tcpSocket")
      <*> (o .:? "timeoutSeconds")

-- | ToJSON V1Probe
instance A.ToJSON V1Probe where
  toJSON V1Probe {..} =
   _omitNulls
      [ "exec" .= v1ProbeExec
      , "failureThreshold" .= v1ProbeFailureThreshold
      , "httpGet" .= v1ProbeHttpGet
      , "initialDelaySeconds" .= v1ProbeInitialDelaySeconds
      , "periodSeconds" .= v1ProbePeriodSeconds
      , "successThreshold" .= v1ProbeSuccessThreshold
      , "tcpSocket" .= v1ProbeTcpSocket
      , "timeoutSeconds" .= v1ProbeTimeoutSeconds
      ]


-- | Construct a value of type 'V1Probe' (by applying it's required fields, if any)
mkV1Probe
  :: V1Probe
mkV1Probe =
  V1Probe
  { v1ProbeExec = Nothing
  , v1ProbeFailureThreshold = Nothing
  , v1ProbeHttpGet = Nothing
  , v1ProbeInitialDelaySeconds = Nothing
  , v1ProbePeriodSeconds = Nothing
  , v1ProbeSuccessThreshold = Nothing
  , v1ProbeTcpSocket = Nothing
  , v1ProbeTimeoutSeconds = Nothing
  }

-- ** V1ProjectedVolumeSource
-- | V1ProjectedVolumeSource
-- Represents a projected volume source
data V1ProjectedVolumeSource = V1ProjectedVolumeSource
  { v1ProjectedVolumeSourceDefaultMode :: !(Maybe Int) -- ^ "defaultMode" - Mode bits to use on created files by default. Must be a value between 0 and 0777. 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.
  , v1ProjectedVolumeSourceSources :: !([V1VolumeProjection]) -- ^ /Required/ "sources" - list of volume projections
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ProjectedVolumeSource
instance A.FromJSON V1ProjectedVolumeSource where
  parseJSON = A.withObject "V1ProjectedVolumeSource" $ \o ->
    V1ProjectedVolumeSource
      <$> (o .:? "defaultMode")
      <*> (o .:  "sources")

-- | ToJSON V1ProjectedVolumeSource
instance A.ToJSON V1ProjectedVolumeSource where
  toJSON V1ProjectedVolumeSource {..} =
   _omitNulls
      [ "defaultMode" .= v1ProjectedVolumeSourceDefaultMode
      , "sources" .= v1ProjectedVolumeSourceSources
      ]


-- | Construct a value of type 'V1ProjectedVolumeSource' (by applying it's required fields, if any)
mkV1ProjectedVolumeSource
  :: [V1VolumeProjection] -- ^ 'v1ProjectedVolumeSourceSources': list of volume projections
  -> V1ProjectedVolumeSource
mkV1ProjectedVolumeSource v1ProjectedVolumeSourceSources =
  V1ProjectedVolumeSource
  { v1ProjectedVolumeSourceDefaultMode = Nothing
  , v1ProjectedVolumeSourceSources
  }

-- ** 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
  { v1QuobyteVolumeSourceGroup :: !(Maybe Text) -- ^ "group" - Group to map volume access to Default is no group
  , v1QuobyteVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false.
  , 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
  , 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
  , v1QuobyteVolumeSourceUser :: !(Maybe Text) -- ^ "user" - User to map volume access to Defaults to serivceaccount user
  , v1QuobyteVolumeSourceVolume :: !(Text) -- ^ /Required/ "volume" - Volume is a string that references an already created Quobyte volume by name.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1QuobyteVolumeSource
instance A.FromJSON V1QuobyteVolumeSource where
  parseJSON = A.withObject "V1QuobyteVolumeSource" $ \o ->
    V1QuobyteVolumeSource
      <$> (o .:? "group")
      <*> (o .:? "readOnly")
      <*> (o .:  "registry")
      <*> (o .:? "tenant")
      <*> (o .:? "user")
      <*> (o .:  "volume")

-- | ToJSON V1QuobyteVolumeSource
instance A.ToJSON V1QuobyteVolumeSource where
  toJSON V1QuobyteVolumeSource {..} =
   _omitNulls
      [ "group" .= v1QuobyteVolumeSourceGroup
      , "readOnly" .= v1QuobyteVolumeSourceReadOnly
      , "registry" .= v1QuobyteVolumeSourceRegistry
      , "tenant" .= v1QuobyteVolumeSourceTenant
      , "user" .= v1QuobyteVolumeSourceUser
      , "volume" .= 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 v1QuobyteVolumeSourceRegistry v1QuobyteVolumeSourceVolume =
  V1QuobyteVolumeSource
  { v1QuobyteVolumeSourceGroup = Nothing
  , v1QuobyteVolumeSourceReadOnly = Nothing
  , v1QuobyteVolumeSourceRegistry
  , v1QuobyteVolumeSourceTenant = Nothing
  , v1QuobyteVolumeSourceUser = Nothing
  , 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
  { v1RBDPersistentVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - 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
  , v1RBDPersistentVolumeSourceImage :: !(Text) -- ^ /Required/ "image" - The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
  , v1RBDPersistentVolumeSourceKeyring :: !(Maybe Text) -- ^ "keyring" - Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
  , v1RBDPersistentVolumeSourceMonitors :: !([Text]) -- ^ /Required/ "monitors" - A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
  , v1RBDPersistentVolumeSourcePool :: !(Maybe Text) -- ^ "pool" - The rados pool name. Default is rbd. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
  , v1RBDPersistentVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
  , v1RBDPersistentVolumeSourceSecretRef :: !(Maybe V1SecretReference) -- ^ "secretRef"
  , v1RBDPersistentVolumeSourceUser :: !(Maybe Text) -- ^ "user" - The rados user name. Default is admin. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1RBDPersistentVolumeSource
instance A.FromJSON V1RBDPersistentVolumeSource where
  parseJSON = A.withObject "V1RBDPersistentVolumeSource" $ \o ->
    V1RBDPersistentVolumeSource
      <$> (o .:? "fsType")
      <*> (o .:  "image")
      <*> (o .:? "keyring")
      <*> (o .:  "monitors")
      <*> (o .:? "pool")
      <*> (o .:? "readOnly")
      <*> (o .:? "secretRef")
      <*> (o .:? "user")

-- | ToJSON V1RBDPersistentVolumeSource
instance A.ToJSON V1RBDPersistentVolumeSource where
  toJSON V1RBDPersistentVolumeSource {..} =
   _omitNulls
      [ "fsType" .= v1RBDPersistentVolumeSourceFsType
      , "image" .= v1RBDPersistentVolumeSourceImage
      , "keyring" .= v1RBDPersistentVolumeSourceKeyring
      , "monitors" .= v1RBDPersistentVolumeSourceMonitors
      , "pool" .= v1RBDPersistentVolumeSourcePool
      , "readOnly" .= v1RBDPersistentVolumeSourceReadOnly
      , "secretRef" .= v1RBDPersistentVolumeSourceSecretRef
      , "user" .= v1RBDPersistentVolumeSourceUser
      ]


-- | Construct a value of type 'V1RBDPersistentVolumeSource' (by applying it's required fields, if any)
mkV1RBDPersistentVolumeSource
  :: Text -- ^ 'v1RBDPersistentVolumeSourceImage': The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
  -> [Text] -- ^ 'v1RBDPersistentVolumeSourceMonitors': A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
  -> V1RBDPersistentVolumeSource
mkV1RBDPersistentVolumeSource v1RBDPersistentVolumeSourceImage v1RBDPersistentVolumeSourceMonitors =
  V1RBDPersistentVolumeSource
  { v1RBDPersistentVolumeSourceFsType = Nothing
  , v1RBDPersistentVolumeSourceImage
  , v1RBDPersistentVolumeSourceKeyring = Nothing
  , v1RBDPersistentVolumeSourceMonitors
  , v1RBDPersistentVolumeSourcePool = Nothing
  , v1RBDPersistentVolumeSourceReadOnly = Nothing
  , v1RBDPersistentVolumeSourceSecretRef = Nothing
  , v1RBDPersistentVolumeSourceUser = 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
  { v1RBDVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - 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
  , v1RBDVolumeSourceImage :: !(Text) -- ^ /Required/ "image" - The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
  , v1RBDVolumeSourceKeyring :: !(Maybe Text) -- ^ "keyring" - Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
  , v1RBDVolumeSourceMonitors :: !([Text]) -- ^ /Required/ "monitors" - A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
  , v1RBDVolumeSourcePool :: !(Maybe Text) -- ^ "pool" - The rados pool name. Default is rbd. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
  , v1RBDVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
  , v1RBDVolumeSourceSecretRef :: !(Maybe V1LocalObjectReference) -- ^ "secretRef"
  , v1RBDVolumeSourceUser :: !(Maybe Text) -- ^ "user" - The rados user name. Default is admin. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1RBDVolumeSource
instance A.FromJSON V1RBDVolumeSource where
  parseJSON = A.withObject "V1RBDVolumeSource" $ \o ->
    V1RBDVolumeSource
      <$> (o .:? "fsType")
      <*> (o .:  "image")
      <*> (o .:? "keyring")
      <*> (o .:  "monitors")
      <*> (o .:? "pool")
      <*> (o .:? "readOnly")
      <*> (o .:? "secretRef")
      <*> (o .:? "user")

-- | ToJSON V1RBDVolumeSource
instance A.ToJSON V1RBDVolumeSource where
  toJSON V1RBDVolumeSource {..} =
   _omitNulls
      [ "fsType" .= v1RBDVolumeSourceFsType
      , "image" .= v1RBDVolumeSourceImage
      , "keyring" .= v1RBDVolumeSourceKeyring
      , "monitors" .= v1RBDVolumeSourceMonitors
      , "pool" .= v1RBDVolumeSourcePool
      , "readOnly" .= v1RBDVolumeSourceReadOnly
      , "secretRef" .= v1RBDVolumeSourceSecretRef
      , "user" .= v1RBDVolumeSourceUser
      ]


-- | Construct a value of type 'V1RBDVolumeSource' (by applying it's required fields, if any)
mkV1RBDVolumeSource
  :: Text -- ^ 'v1RBDVolumeSourceImage': The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
  -> [Text] -- ^ 'v1RBDVolumeSourceMonitors': A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
  -> V1RBDVolumeSource
mkV1RBDVolumeSource v1RBDVolumeSourceImage v1RBDVolumeSourceMonitors =
  V1RBDVolumeSource
  { v1RBDVolumeSourceFsType = Nothing
  , v1RBDVolumeSourceImage
  , v1RBDVolumeSourceKeyring = Nothing
  , v1RBDVolumeSourceMonitors
  , v1RBDVolumeSourcePool = Nothing
  , v1RBDVolumeSourceReadOnly = Nothing
  , v1RBDVolumeSourceSecretRef = Nothing
  , v1RBDVolumeSourceUser = Nothing
  }

-- ** V1ReplicaSet
-- | V1ReplicaSet
-- ReplicaSet ensures that a specified number of pod replicas are running at any given time.
data V1ReplicaSet = V1ReplicaSet
  { 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1ReplicaSetMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1ReplicaSetSpec :: !(Maybe V1ReplicaSetSpec) -- ^ "spec"
  , v1ReplicaSetStatus :: !(Maybe V1ReplicaSetStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ReplicaSet
instance A.FromJSON V1ReplicaSet where
  parseJSON = A.withObject "V1ReplicaSet" $ \o ->
    V1ReplicaSet
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON V1ReplicaSet
instance A.ToJSON V1ReplicaSet where
  toJSON V1ReplicaSet {..} =
   _omitNulls
      [ "apiVersion" .= v1ReplicaSetApiVersion
      , "kind" .= v1ReplicaSetKind
      , "metadata" .= v1ReplicaSetMetadata
      , "spec" .= v1ReplicaSetSpec
      , "status" .= v1ReplicaSetStatus
      ]


-- | Construct a value of type 'V1ReplicaSet' (by applying it's required fields, if any)
mkV1ReplicaSet
  :: V1ReplicaSet
mkV1ReplicaSet =
  V1ReplicaSet
  { v1ReplicaSetApiVersion = Nothing
  , v1ReplicaSetKind = Nothing
  , v1ReplicaSetMetadata = Nothing
  , v1ReplicaSetSpec = Nothing
  , v1ReplicaSetStatus = Nothing
  }

-- ** V1ReplicaSetCondition
-- | V1ReplicaSetCondition
-- ReplicaSetCondition describes the state of a replica set at a certain point.
data V1ReplicaSetCondition = V1ReplicaSetCondition
  { v1ReplicaSetConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - The last time the condition transitioned from one status to another.
  , v1ReplicaSetConditionMessage :: !(Maybe Text) -- ^ "message" - A human readable message indicating details about the transition.
  , v1ReplicaSetConditionReason :: !(Maybe Text) -- ^ "reason" - The reason for the condition&#39;s last transition.
  , v1ReplicaSetConditionStatus :: !(Text) -- ^ /Required/ "status" - Status of the condition, one of True, False, Unknown.
  , v1ReplicaSetConditionType :: !(Text) -- ^ /Required/ "type" - Type of replica set condition.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ReplicaSetCondition
instance A.FromJSON V1ReplicaSetCondition where
  parseJSON = A.withObject "V1ReplicaSetCondition" $ \o ->
    V1ReplicaSetCondition
      <$> (o .:? "lastTransitionTime")
      <*> (o .:? "message")
      <*> (o .:? "reason")
      <*> (o .:  "status")
      <*> (o .:  "type")

-- | ToJSON V1ReplicaSetCondition
instance A.ToJSON V1ReplicaSetCondition where
  toJSON V1ReplicaSetCondition {..} =
   _omitNulls
      [ "lastTransitionTime" .= v1ReplicaSetConditionLastTransitionTime
      , "message" .= v1ReplicaSetConditionMessage
      , "reason" .= v1ReplicaSetConditionReason
      , "status" .= v1ReplicaSetConditionStatus
      , "type" .= 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 v1ReplicaSetConditionStatus v1ReplicaSetConditionType =
  V1ReplicaSetCondition
  { v1ReplicaSetConditionLastTransitionTime = Nothing
  , v1ReplicaSetConditionMessage = Nothing
  , v1ReplicaSetConditionReason = Nothing
  , v1ReplicaSetConditionStatus
  , v1ReplicaSetConditionType
  }

-- ** V1ReplicaSetList
-- | V1ReplicaSetList
-- ReplicaSetList is a collection of ReplicaSets.
data V1ReplicaSetList = V1ReplicaSetList
  { 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/api-conventions.md#resources
  , v1ReplicaSetListItems :: !([V1ReplicaSet]) -- ^ /Required/ "items" - List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
  , 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/api-conventions.md#types-kinds
  , v1ReplicaSetListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ReplicaSetList
instance A.FromJSON V1ReplicaSetList where
  parseJSON = A.withObject "V1ReplicaSetList" $ \o ->
    V1ReplicaSetList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1ReplicaSetList
instance A.ToJSON V1ReplicaSetList where
  toJSON V1ReplicaSetList {..} =
   _omitNulls
      [ "apiVersion" .= v1ReplicaSetListApiVersion
      , "items" .= v1ReplicaSetListItems
      , "kind" .= v1ReplicaSetListKind
      , "metadata" .= 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 v1ReplicaSetListItems =
  V1ReplicaSetList
  { v1ReplicaSetListApiVersion = Nothing
  , v1ReplicaSetListItems
  , v1ReplicaSetListKind = Nothing
  , v1ReplicaSetListMetadata = Nothing
  }

-- ** V1ReplicaSetSpec
-- | V1ReplicaSetSpec
-- ReplicaSetSpec is the specification of a ReplicaSet.
data V1ReplicaSetSpec = V1ReplicaSetSpec
  { 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)
  , 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
  , v1ReplicaSetSpecSelector :: !(V1LabelSelector) -- ^ /Required/ "selector"
  , v1ReplicaSetSpecTemplate :: !(Maybe V1PodTemplateSpec) -- ^ "template"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ReplicaSetSpec
instance A.FromJSON V1ReplicaSetSpec where
  parseJSON = A.withObject "V1ReplicaSetSpec" $ \o ->
    V1ReplicaSetSpec
      <$> (o .:? "minReadySeconds")
      <*> (o .:? "replicas")
      <*> (o .:  "selector")
      <*> (o .:? "template")

-- | ToJSON V1ReplicaSetSpec
instance A.ToJSON V1ReplicaSetSpec where
  toJSON V1ReplicaSetSpec {..} =
   _omitNulls
      [ "minReadySeconds" .= v1ReplicaSetSpecMinReadySeconds
      , "replicas" .= v1ReplicaSetSpecReplicas
      , "selector" .= v1ReplicaSetSpecSelector
      , "template" .= v1ReplicaSetSpecTemplate
      ]


-- | Construct a value of type 'V1ReplicaSetSpec' (by applying it's required fields, if any)
mkV1ReplicaSetSpec
  :: V1LabelSelector -- ^ 'v1ReplicaSetSpecSelector' 
  -> V1ReplicaSetSpec
mkV1ReplicaSetSpec v1ReplicaSetSpecSelector =
  V1ReplicaSetSpec
  { v1ReplicaSetSpecMinReadySeconds = Nothing
  , v1ReplicaSetSpecReplicas = Nothing
  , v1ReplicaSetSpecSelector
  , v1ReplicaSetSpecTemplate = Nothing
  }

-- ** V1ReplicaSetStatus
-- | V1ReplicaSetStatus
-- ReplicaSetStatus represents the current status of a ReplicaSet.
data V1ReplicaSetStatus = V1ReplicaSetStatus
  { v1ReplicaSetStatusAvailableReplicas :: !(Maybe Int) -- ^ "availableReplicas" - The number of available replicas (ready for at least minReadySeconds) for this replica set.
  , v1ReplicaSetStatusConditions :: !(Maybe [V1ReplicaSetCondition]) -- ^ "conditions" - Represents the latest available observations of a replica set&#39;s current state.
  , v1ReplicaSetStatusFullyLabeledReplicas :: !(Maybe Int) -- ^ "fullyLabeledReplicas" - The number of pods that have labels matching the labels of the pod template of the replicaset.
  , v1ReplicaSetStatusObservedGeneration :: !(Maybe Integer) -- ^ "observedGeneration" - ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
  , v1ReplicaSetStatusReadyReplicas :: !(Maybe Int) -- ^ "readyReplicas" - The number of ready replicas for this replica set.
  , v1ReplicaSetStatusReplicas :: !(Int) -- ^ /Required/ "replicas" - Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ReplicaSetStatus
instance A.FromJSON V1ReplicaSetStatus where
  parseJSON = A.withObject "V1ReplicaSetStatus" $ \o ->
    V1ReplicaSetStatus
      <$> (o .:? "availableReplicas")
      <*> (o .:? "conditions")
      <*> (o .:? "fullyLabeledReplicas")
      <*> (o .:? "observedGeneration")
      <*> (o .:? "readyReplicas")
      <*> (o .:  "replicas")

-- | ToJSON V1ReplicaSetStatus
instance A.ToJSON V1ReplicaSetStatus where
  toJSON V1ReplicaSetStatus {..} =
   _omitNulls
      [ "availableReplicas" .= v1ReplicaSetStatusAvailableReplicas
      , "conditions" .= v1ReplicaSetStatusConditions
      , "fullyLabeledReplicas" .= v1ReplicaSetStatusFullyLabeledReplicas
      , "observedGeneration" .= v1ReplicaSetStatusObservedGeneration
      , "readyReplicas" .= v1ReplicaSetStatusReadyReplicas
      , "replicas" .= v1ReplicaSetStatusReplicas
      ]


-- | Construct a value of type 'V1ReplicaSetStatus' (by applying it's required fields, if any)
mkV1ReplicaSetStatus
  :: Int -- ^ 'v1ReplicaSetStatusReplicas': Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
  -> V1ReplicaSetStatus
mkV1ReplicaSetStatus v1ReplicaSetStatusReplicas =
  V1ReplicaSetStatus
  { v1ReplicaSetStatusAvailableReplicas = Nothing
  , v1ReplicaSetStatusConditions = Nothing
  , v1ReplicaSetStatusFullyLabeledReplicas = Nothing
  , v1ReplicaSetStatusObservedGeneration = Nothing
  , v1ReplicaSetStatusReadyReplicas = Nothing
  , v1ReplicaSetStatusReplicas
  }

-- ** V1ReplicationController
-- | V1ReplicationController
-- ReplicationController represents the configuration of a replication controller.
data V1ReplicationController = V1ReplicationController
  { 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1ReplicationControllerMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1ReplicationControllerSpec :: !(Maybe V1ReplicationControllerSpec) -- ^ "spec"
  , v1ReplicationControllerStatus :: !(Maybe V1ReplicationControllerStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ReplicationController
instance A.FromJSON V1ReplicationController where
  parseJSON = A.withObject "V1ReplicationController" $ \o ->
    V1ReplicationController
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON V1ReplicationController
instance A.ToJSON V1ReplicationController where
  toJSON V1ReplicationController {..} =
   _omitNulls
      [ "apiVersion" .= v1ReplicationControllerApiVersion
      , "kind" .= v1ReplicationControllerKind
      , "metadata" .= v1ReplicationControllerMetadata
      , "spec" .= v1ReplicationControllerSpec
      , "status" .= v1ReplicationControllerStatus
      ]


-- | Construct a value of type 'V1ReplicationController' (by applying it's required fields, if any)
mkV1ReplicationController
  :: V1ReplicationController
mkV1ReplicationController =
  V1ReplicationController
  { v1ReplicationControllerApiVersion = Nothing
  , v1ReplicationControllerKind = Nothing
  , v1ReplicationControllerMetadata = Nothing
  , v1ReplicationControllerSpec = Nothing
  , v1ReplicationControllerStatus = Nothing
  }

-- ** V1ReplicationControllerCondition
-- | V1ReplicationControllerCondition
-- ReplicationControllerCondition describes the state of a replication controller at a certain point.
data V1ReplicationControllerCondition = V1ReplicationControllerCondition
  { v1ReplicationControllerConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - The last time the condition transitioned from one status to another.
  , v1ReplicationControllerConditionMessage :: !(Maybe Text) -- ^ "message" - A human readable message indicating details about the transition.
  , v1ReplicationControllerConditionReason :: !(Maybe Text) -- ^ "reason" - The reason for the condition&#39;s last transition.
  , v1ReplicationControllerConditionStatus :: !(Text) -- ^ /Required/ "status" - Status of the condition, one of True, False, Unknown.
  , v1ReplicationControllerConditionType :: !(Text) -- ^ /Required/ "type" - Type of replication controller condition.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ReplicationControllerCondition
instance A.FromJSON V1ReplicationControllerCondition where
  parseJSON = A.withObject "V1ReplicationControllerCondition" $ \o ->
    V1ReplicationControllerCondition
      <$> (o .:? "lastTransitionTime")
      <*> (o .:? "message")
      <*> (o .:? "reason")
      <*> (o .:  "status")
      <*> (o .:  "type")

-- | ToJSON V1ReplicationControllerCondition
instance A.ToJSON V1ReplicationControllerCondition where
  toJSON V1ReplicationControllerCondition {..} =
   _omitNulls
      [ "lastTransitionTime" .= v1ReplicationControllerConditionLastTransitionTime
      , "message" .= v1ReplicationControllerConditionMessage
      , "reason" .= v1ReplicationControllerConditionReason
      , "status" .= v1ReplicationControllerConditionStatus
      , "type" .= 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 v1ReplicationControllerConditionStatus v1ReplicationControllerConditionType =
  V1ReplicationControllerCondition
  { v1ReplicationControllerConditionLastTransitionTime = Nothing
  , v1ReplicationControllerConditionMessage = Nothing
  , v1ReplicationControllerConditionReason = Nothing
  , v1ReplicationControllerConditionStatus
  , v1ReplicationControllerConditionType
  }

-- ** V1ReplicationControllerList
-- | V1ReplicationControllerList
-- ReplicationControllerList is a collection of replication controllers.
data V1ReplicationControllerList = V1ReplicationControllerList
  { 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/api-conventions.md#resources
  , v1ReplicationControllerListItems :: !([V1ReplicationController]) -- ^ /Required/ "items" - List of replication controllers. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
  , 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/api-conventions.md#types-kinds
  , v1ReplicationControllerListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ReplicationControllerList
instance A.FromJSON V1ReplicationControllerList where
  parseJSON = A.withObject "V1ReplicationControllerList" $ \o ->
    V1ReplicationControllerList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1ReplicationControllerList
instance A.ToJSON V1ReplicationControllerList where
  toJSON V1ReplicationControllerList {..} =
   _omitNulls
      [ "apiVersion" .= v1ReplicationControllerListApiVersion
      , "items" .= v1ReplicationControllerListItems
      , "kind" .= v1ReplicationControllerListKind
      , "metadata" .= 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 v1ReplicationControllerListItems =
  V1ReplicationControllerList
  { v1ReplicationControllerListApiVersion = Nothing
  , v1ReplicationControllerListItems
  , v1ReplicationControllerListKind = Nothing
  , v1ReplicationControllerListMetadata = Nothing
  }

-- ** V1ReplicationControllerSpec
-- | V1ReplicationControllerSpec
-- ReplicationControllerSpec is the specification of a replication controller.
data V1ReplicationControllerSpec = V1ReplicationControllerSpec
  { 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)
  , 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
  , 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
  , v1ReplicationControllerSpecTemplate :: !(Maybe V1PodTemplateSpec) -- ^ "template"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ReplicationControllerSpec
instance A.FromJSON V1ReplicationControllerSpec where
  parseJSON = A.withObject "V1ReplicationControllerSpec" $ \o ->
    V1ReplicationControllerSpec
      <$> (o .:? "minReadySeconds")
      <*> (o .:? "replicas")
      <*> (o .:? "selector")
      <*> (o .:? "template")

-- | ToJSON V1ReplicationControllerSpec
instance A.ToJSON V1ReplicationControllerSpec where
  toJSON V1ReplicationControllerSpec {..} =
   _omitNulls
      [ "minReadySeconds" .= v1ReplicationControllerSpecMinReadySeconds
      , "replicas" .= v1ReplicationControllerSpecReplicas
      , "selector" .= v1ReplicationControllerSpecSelector
      , "template" .= v1ReplicationControllerSpecTemplate
      ]


-- | Construct a value of type 'V1ReplicationControllerSpec' (by applying it's required fields, if any)
mkV1ReplicationControllerSpec
  :: V1ReplicationControllerSpec
mkV1ReplicationControllerSpec =
  V1ReplicationControllerSpec
  { v1ReplicationControllerSpecMinReadySeconds = Nothing
  , v1ReplicationControllerSpecReplicas = Nothing
  , v1ReplicationControllerSpecSelector = Nothing
  , v1ReplicationControllerSpecTemplate = Nothing
  }

-- ** V1ReplicationControllerStatus
-- | V1ReplicationControllerStatus
-- ReplicationControllerStatus represents the current status of a replication controller.
data V1ReplicationControllerStatus = V1ReplicationControllerStatus
  { v1ReplicationControllerStatusAvailableReplicas :: !(Maybe Int) -- ^ "availableReplicas" - The number of available replicas (ready for at least minReadySeconds) for this replication controller.
  , v1ReplicationControllerStatusConditions :: !(Maybe [V1ReplicationControllerCondition]) -- ^ "conditions" - Represents the latest available observations of a replication controller&#39;s current state.
  , v1ReplicationControllerStatusFullyLabeledReplicas :: !(Maybe Int) -- ^ "fullyLabeledReplicas" - The number of pods that have labels matching the labels of the pod template of the replication controller.
  , v1ReplicationControllerStatusObservedGeneration :: !(Maybe Integer) -- ^ "observedGeneration" - ObservedGeneration reflects the generation of the most recently observed replication controller.
  , v1ReplicationControllerStatusReadyReplicas :: !(Maybe Int) -- ^ "readyReplicas" - The number of ready replicas for this replication controller.
  , v1ReplicationControllerStatusReplicas :: !(Int) -- ^ /Required/ "replicas" - Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ReplicationControllerStatus
instance A.FromJSON V1ReplicationControllerStatus where
  parseJSON = A.withObject "V1ReplicationControllerStatus" $ \o ->
    V1ReplicationControllerStatus
      <$> (o .:? "availableReplicas")
      <*> (o .:? "conditions")
      <*> (o .:? "fullyLabeledReplicas")
      <*> (o .:? "observedGeneration")
      <*> (o .:? "readyReplicas")
      <*> (o .:  "replicas")

-- | ToJSON V1ReplicationControllerStatus
instance A.ToJSON V1ReplicationControllerStatus where
  toJSON V1ReplicationControllerStatus {..} =
   _omitNulls
      [ "availableReplicas" .= v1ReplicationControllerStatusAvailableReplicas
      , "conditions" .= v1ReplicationControllerStatusConditions
      , "fullyLabeledReplicas" .= v1ReplicationControllerStatusFullyLabeledReplicas
      , "observedGeneration" .= v1ReplicationControllerStatusObservedGeneration
      , "readyReplicas" .= v1ReplicationControllerStatusReadyReplicas
      , "replicas" .= v1ReplicationControllerStatusReplicas
      ]


-- | Construct a value of type 'V1ReplicationControllerStatus' (by applying it's required fields, if any)
mkV1ReplicationControllerStatus
  :: Int -- ^ 'v1ReplicationControllerStatusReplicas': Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller
  -> V1ReplicationControllerStatus
mkV1ReplicationControllerStatus v1ReplicationControllerStatusReplicas =
  V1ReplicationControllerStatus
  { v1ReplicationControllerStatusAvailableReplicas = Nothing
  , v1ReplicationControllerStatusConditions = Nothing
  , v1ReplicationControllerStatusFullyLabeledReplicas = Nothing
  , v1ReplicationControllerStatusObservedGeneration = Nothing
  , v1ReplicationControllerStatusReadyReplicas = Nothing
  , v1ReplicationControllerStatusReplicas
  }

-- ** V1ResourceAttributes
-- | V1ResourceAttributes
-- ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface
data V1ResourceAttributes = V1ResourceAttributes
  { v1ResourceAttributesGroup :: !(Maybe Text) -- ^ "group" - Group is the API Group of the Resource.  \&quot;*\&quot; means all.
  , 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.
  , 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
  , v1ResourceAttributesResource :: !(Maybe Text) -- ^ "resource" - Resource is one of the existing resource types.  \&quot;*\&quot; means all.
  , v1ResourceAttributesSubresource :: !(Maybe Text) -- ^ "subresource" - Subresource is one of the existing resource types.  \&quot;\&quot; means none.
  , v1ResourceAttributesVerb :: !(Maybe Text) -- ^ "verb" - Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy.  \&quot;*\&quot; means all.
  , v1ResourceAttributesVersion :: !(Maybe Text) -- ^ "version" - Version is the API Version of the Resource.  \&quot;*\&quot; means all.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ResourceAttributes
instance A.FromJSON V1ResourceAttributes where
  parseJSON = A.withObject "V1ResourceAttributes" $ \o ->
    V1ResourceAttributes
      <$> (o .:? "group")
      <*> (o .:? "name")
      <*> (o .:? "namespace")
      <*> (o .:? "resource")
      <*> (o .:? "subresource")
      <*> (o .:? "verb")
      <*> (o .:? "version")

-- | ToJSON V1ResourceAttributes
instance A.ToJSON V1ResourceAttributes where
  toJSON V1ResourceAttributes {..} =
   _omitNulls
      [ "group" .= v1ResourceAttributesGroup
      , "name" .= v1ResourceAttributesName
      , "namespace" .= v1ResourceAttributesNamespace
      , "resource" .= v1ResourceAttributesResource
      , "subresource" .= v1ResourceAttributesSubresource
      , "verb" .= v1ResourceAttributesVerb
      , "version" .= v1ResourceAttributesVersion
      ]


-- | Construct a value of type 'V1ResourceAttributes' (by applying it's required fields, if any)
mkV1ResourceAttributes
  :: V1ResourceAttributes
mkV1ResourceAttributes =
  V1ResourceAttributes
  { v1ResourceAttributesGroup = Nothing
  , v1ResourceAttributesName = Nothing
  , v1ResourceAttributesNamespace = Nothing
  , v1ResourceAttributesResource = Nothing
  , v1ResourceAttributesSubresource = Nothing
  , v1ResourceAttributesVerb = Nothing
  , v1ResourceAttributesVersion = Nothing
  }

-- ** V1ResourceFieldSelector
-- | V1ResourceFieldSelector
-- ResourceFieldSelector represents container resources (cpu, memory) and their output format
data V1ResourceFieldSelector = V1ResourceFieldSelector
  { v1ResourceFieldSelectorContainerName :: !(Maybe Text) -- ^ "containerName" - Container name: required for volumes, optional for env vars
  , v1ResourceFieldSelectorDivisor :: !(Maybe Quantity) -- ^ "divisor"
  , v1ResourceFieldSelectorResource :: !(Text) -- ^ /Required/ "resource" - Required: resource to select
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ResourceFieldSelector
instance A.FromJSON V1ResourceFieldSelector where
  parseJSON = A.withObject "V1ResourceFieldSelector" $ \o ->
    V1ResourceFieldSelector
      <$> (o .:? "containerName")
      <*> (o .:? "divisor")
      <*> (o .:  "resource")

-- | ToJSON V1ResourceFieldSelector
instance A.ToJSON V1ResourceFieldSelector where
  toJSON V1ResourceFieldSelector {..} =
   _omitNulls
      [ "containerName" .= v1ResourceFieldSelectorContainerName
      , "divisor" .= v1ResourceFieldSelectorDivisor
      , "resource" .= v1ResourceFieldSelectorResource
      ]


-- | Construct a value of type 'V1ResourceFieldSelector' (by applying it's required fields, if any)
mkV1ResourceFieldSelector
  :: Text -- ^ 'v1ResourceFieldSelectorResource': Required: resource to select
  -> V1ResourceFieldSelector
mkV1ResourceFieldSelector v1ResourceFieldSelectorResource =
  V1ResourceFieldSelector
  { v1ResourceFieldSelectorContainerName = Nothing
  , v1ResourceFieldSelectorDivisor = Nothing
  , v1ResourceFieldSelectorResource
  }

-- ** V1ResourceQuota
-- | V1ResourceQuota
-- ResourceQuota sets aggregate quota restrictions enforced per namespace
data V1ResourceQuota = V1ResourceQuota
  { 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1ResourceQuotaMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1ResourceQuotaSpec :: !(Maybe V1ResourceQuotaSpec) -- ^ "spec"
  , v1ResourceQuotaStatus :: !(Maybe V1ResourceQuotaStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ResourceQuota
instance A.FromJSON V1ResourceQuota where
  parseJSON = A.withObject "V1ResourceQuota" $ \o ->
    V1ResourceQuota
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON V1ResourceQuota
instance A.ToJSON V1ResourceQuota where
  toJSON V1ResourceQuota {..} =
   _omitNulls
      [ "apiVersion" .= v1ResourceQuotaApiVersion
      , "kind" .= v1ResourceQuotaKind
      , "metadata" .= v1ResourceQuotaMetadata
      , "spec" .= v1ResourceQuotaSpec
      , "status" .= v1ResourceQuotaStatus
      ]


-- | Construct a value of type 'V1ResourceQuota' (by applying it's required fields, if any)
mkV1ResourceQuota
  :: V1ResourceQuota
mkV1ResourceQuota =
  V1ResourceQuota
  { v1ResourceQuotaApiVersion = Nothing
  , v1ResourceQuotaKind = Nothing
  , v1ResourceQuotaMetadata = Nothing
  , v1ResourceQuotaSpec = Nothing
  , v1ResourceQuotaStatus = Nothing
  }

-- ** V1ResourceQuotaList
-- | V1ResourceQuotaList
-- ResourceQuotaList is a list of ResourceQuota items.
data V1ResourceQuotaList = V1ResourceQuotaList
  { 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/api-conventions.md#resources
  , v1ResourceQuotaListItems :: !([V1ResourceQuota]) -- ^ /Required/ "items" - Items is a list of ResourceQuota objects. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/
  , 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/api-conventions.md#types-kinds
  , v1ResourceQuotaListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ResourceQuotaList
instance A.FromJSON V1ResourceQuotaList where
  parseJSON = A.withObject "V1ResourceQuotaList" $ \o ->
    V1ResourceQuotaList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1ResourceQuotaList
instance A.ToJSON V1ResourceQuotaList where
  toJSON V1ResourceQuotaList {..} =
   _omitNulls
      [ "apiVersion" .= v1ResourceQuotaListApiVersion
      , "items" .= v1ResourceQuotaListItems
      , "kind" .= v1ResourceQuotaListKind
      , "metadata" .= 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 v1ResourceQuotaListItems =
  V1ResourceQuotaList
  { v1ResourceQuotaListApiVersion = Nothing
  , v1ResourceQuotaListItems
  , v1ResourceQuotaListKind = Nothing
  , v1ResourceQuotaListMetadata = Nothing
  }

-- ** V1ResourceQuotaSpec
-- | V1ResourceQuotaSpec
-- ResourceQuotaSpec defines the desired hard limits to enforce for Quota.
data V1ResourceQuotaSpec = V1ResourceQuotaSpec
  { 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/
  , v1ResourceQuotaSpecScopeSelector :: !(Maybe V1ScopeSelector) -- ^ "scopeSelector"
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ResourceQuotaSpec
instance A.FromJSON V1ResourceQuotaSpec where
  parseJSON = A.withObject "V1ResourceQuotaSpec" $ \o ->
    V1ResourceQuotaSpec
      <$> (o .:? "hard")
      <*> (o .:? "scopeSelector")
      <*> (o .:? "scopes")

-- | ToJSON V1ResourceQuotaSpec
instance A.ToJSON V1ResourceQuotaSpec where
  toJSON V1ResourceQuotaSpec {..} =
   _omitNulls
      [ "hard" .= v1ResourceQuotaSpecHard
      , "scopeSelector" .= v1ResourceQuotaSpecScopeSelector
      , "scopes" .= v1ResourceQuotaSpecScopes
      ]


-- | Construct a value of type 'V1ResourceQuotaSpec' (by applying it's required fields, if any)
mkV1ResourceQuotaSpec
  :: V1ResourceQuotaSpec
mkV1ResourceQuotaSpec =
  V1ResourceQuotaSpec
  { v1ResourceQuotaSpecHard = Nothing
  , v1ResourceQuotaSpecScopeSelector = Nothing
  , v1ResourceQuotaSpecScopes = Nothing
  }

-- ** V1ResourceQuotaStatus
-- | V1ResourceQuotaStatus
-- ResourceQuotaStatus defines the enforced hard limits and observed use.
data V1ResourceQuotaStatus = V1ResourceQuotaStatus
  { 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/
  , v1ResourceQuotaStatusUsed :: !(Maybe (Map.Map String Quantity)) -- ^ "used" - Used is the current observed total usage of the resource in the namespace.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ResourceQuotaStatus
instance A.FromJSON V1ResourceQuotaStatus where
  parseJSON = A.withObject "V1ResourceQuotaStatus" $ \o ->
    V1ResourceQuotaStatus
      <$> (o .:? "hard")
      <*> (o .:? "used")

-- | ToJSON V1ResourceQuotaStatus
instance A.ToJSON V1ResourceQuotaStatus where
  toJSON V1ResourceQuotaStatus {..} =
   _omitNulls
      [ "hard" .= v1ResourceQuotaStatusHard
      , "used" .= v1ResourceQuotaStatusUsed
      ]


-- | Construct a value of type 'V1ResourceQuotaStatus' (by applying it's required fields, if any)
mkV1ResourceQuotaStatus
  :: V1ResourceQuotaStatus
mkV1ResourceQuotaStatus =
  V1ResourceQuotaStatus
  { v1ResourceQuotaStatusHard = Nothing
  , v1ResourceQuotaStatusUsed = Nothing
  }

-- ** V1ResourceRequirements
-- | V1ResourceRequirements
-- ResourceRequirements describes the compute resource requirements.
data V1ResourceRequirements = V1ResourceRequirements
  { 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-compute-resources-container/
  , 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. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ResourceRequirements
instance A.FromJSON V1ResourceRequirements where
  parseJSON = A.withObject "V1ResourceRequirements" $ \o ->
    V1ResourceRequirements
      <$> (o .:? "limits")
      <*> (o .:? "requests")

-- | ToJSON V1ResourceRequirements
instance A.ToJSON V1ResourceRequirements where
  toJSON V1ResourceRequirements {..} =
   _omitNulls
      [ "limits" .= v1ResourceRequirementsLimits
      , "requests" .= v1ResourceRequirementsRequests
      ]


-- | Construct a value of type 'V1ResourceRequirements' (by applying it's required fields, if any)
mkV1ResourceRequirements
  :: V1ResourceRequirements
mkV1ResourceRequirements =
  V1ResourceRequirements
  { v1ResourceRequirementsLimits = Nothing
  , v1ResourceRequirementsRequests = 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
  { 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.
  , 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.
  , 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.
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ResourceRule
instance A.FromJSON V1ResourceRule where
  parseJSON = A.withObject "V1ResourceRule" $ \o ->
    V1ResourceRule
      <$> (o .:? "apiGroups")
      <*> (o .:? "resourceNames")
      <*> (o .:? "resources")
      <*> (o .:  "verbs")

-- | ToJSON V1ResourceRule
instance A.ToJSON V1ResourceRule where
  toJSON V1ResourceRule {..} =
   _omitNulls
      [ "apiGroups" .= v1ResourceRuleApiGroups
      , "resourceNames" .= v1ResourceRuleResourceNames
      , "resources" .= v1ResourceRuleResources
      , "verbs" .= 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 v1ResourceRuleVerbs =
  V1ResourceRule
  { v1ResourceRuleApiGroups = Nothing
  , v1ResourceRuleResourceNames = Nothing
  , v1ResourceRuleResources = Nothing
  , v1ResourceRuleVerbs
  }

-- ** V1Role
-- | V1Role
-- Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
data V1Role = V1Role
  { 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1RoleMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1RoleRules :: !(Maybe [V1PolicyRule]) -- ^ "rules" - Rules holds all the PolicyRules for this Role
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1Role
instance A.FromJSON V1Role where
  parseJSON = A.withObject "V1Role" $ \o ->
    V1Role
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "rules")

-- | ToJSON V1Role
instance A.ToJSON V1Role where
  toJSON V1Role {..} =
   _omitNulls
      [ "apiVersion" .= v1RoleApiVersion
      , "kind" .= v1RoleKind
      , "metadata" .= v1RoleMetadata
      , "rules" .= v1RoleRules
      ]


-- | Construct a value of type 'V1Role' (by applying it's required fields, if any)
mkV1Role
  :: V1Role
mkV1Role =
  V1Role
  { v1RoleApiVersion = Nothing
  , v1RoleKind = Nothing
  , v1RoleMetadata = Nothing
  , v1RoleRules = 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
  { 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1RoleBindingMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1RoleBindingRoleRef :: !(V1RoleRef) -- ^ /Required/ "roleRef"
  , v1RoleBindingSubjects :: !(Maybe [V1Subject]) -- ^ "subjects" - Subjects holds references to the objects the role applies to.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1RoleBinding
instance A.FromJSON V1RoleBinding where
  parseJSON = A.withObject "V1RoleBinding" $ \o ->
    V1RoleBinding
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:  "roleRef")
      <*> (o .:? "subjects")

-- | ToJSON V1RoleBinding
instance A.ToJSON V1RoleBinding where
  toJSON V1RoleBinding {..} =
   _omitNulls
      [ "apiVersion" .= v1RoleBindingApiVersion
      , "kind" .= v1RoleBindingKind
      , "metadata" .= v1RoleBindingMetadata
      , "roleRef" .= v1RoleBindingRoleRef
      , "subjects" .= v1RoleBindingSubjects
      ]


-- | Construct a value of type 'V1RoleBinding' (by applying it's required fields, if any)
mkV1RoleBinding
  :: V1RoleRef -- ^ 'v1RoleBindingRoleRef' 
  -> V1RoleBinding
mkV1RoleBinding v1RoleBindingRoleRef =
  V1RoleBinding
  { v1RoleBindingApiVersion = Nothing
  , v1RoleBindingKind = Nothing
  , v1RoleBindingMetadata = Nothing
  , v1RoleBindingRoleRef
  , v1RoleBindingSubjects = Nothing
  }

-- ** V1RoleBindingList
-- | V1RoleBindingList
-- RoleBindingList is a collection of RoleBindings
data V1RoleBindingList = V1RoleBindingList
  { 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/api-conventions.md#resources
  , v1RoleBindingListItems :: !([V1RoleBinding]) -- ^ /Required/ "items" - Items is a list of RoleBindings
  , 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/api-conventions.md#types-kinds
  , v1RoleBindingListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1RoleBindingList
instance A.FromJSON V1RoleBindingList where
  parseJSON = A.withObject "V1RoleBindingList" $ \o ->
    V1RoleBindingList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1RoleBindingList
instance A.ToJSON V1RoleBindingList where
  toJSON V1RoleBindingList {..} =
   _omitNulls
      [ "apiVersion" .= v1RoleBindingListApiVersion
      , "items" .= v1RoleBindingListItems
      , "kind" .= v1RoleBindingListKind
      , "metadata" .= 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 v1RoleBindingListItems =
  V1RoleBindingList
  { v1RoleBindingListApiVersion = Nothing
  , v1RoleBindingListItems
  , v1RoleBindingListKind = Nothing
  , v1RoleBindingListMetadata = Nothing
  }

-- ** V1RoleList
-- | V1RoleList
-- RoleList is a collection of Roles
data V1RoleList = V1RoleList
  { 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/api-conventions.md#resources
  , v1RoleListItems :: !([V1Role]) -- ^ /Required/ "items" - Items is a list of Roles
  , 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/api-conventions.md#types-kinds
  , v1RoleListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1RoleList
instance A.FromJSON V1RoleList where
  parseJSON = A.withObject "V1RoleList" $ \o ->
    V1RoleList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1RoleList
instance A.ToJSON V1RoleList where
  toJSON V1RoleList {..} =
   _omitNulls
      [ "apiVersion" .= v1RoleListApiVersion
      , "items" .= v1RoleListItems
      , "kind" .= v1RoleListKind
      , "metadata" .= 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 v1RoleListItems =
  V1RoleList
  { v1RoleListApiVersion = Nothing
  , v1RoleListItems
  , v1RoleListKind = Nothing
  , v1RoleListMetadata = Nothing
  }

-- ** V1RoleRef
-- | V1RoleRef
-- RoleRef contains information that points to the role being used
data V1RoleRef = V1RoleRef
  { v1RoleRefApiGroup :: !(Text) -- ^ /Required/ "apiGroup" - APIGroup is the group for the resource being referenced
  , v1RoleRefKind :: !(Text) -- ^ /Required/ "kind" - Kind is the type of resource being referenced
  , v1RoleRefName :: !(Text) -- ^ /Required/ "name" - Name is the name of resource being referenced
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1RoleRef
instance A.FromJSON V1RoleRef where
  parseJSON = A.withObject "V1RoleRef" $ \o ->
    V1RoleRef
      <$> (o .:  "apiGroup")
      <*> (o .:  "kind")
      <*> (o .:  "name")

-- | ToJSON V1RoleRef
instance A.ToJSON V1RoleRef where
  toJSON V1RoleRef {..} =
   _omitNulls
      [ "apiGroup" .= v1RoleRefApiGroup
      , "kind" .= v1RoleRefKind
      , "name" .= 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 v1RoleRefApiGroup v1RoleRefKind v1RoleRefName =
  V1RoleRef
  { v1RoleRefApiGroup
  , v1RoleRefKind
  , v1RoleRefName
  }

-- ** V1RollingUpdateDaemonSet
-- | V1RollingUpdateDaemonSet
-- Spec to control the desired behavior of daemon set rolling update.
data V1RollingUpdateDaemonSet = V1RollingUpdateDaemonSet
  { v1RollingUpdateDaemonSetMaxUnavailable :: !(Maybe IntOrString) -- ^ "maxUnavailable"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1RollingUpdateDaemonSet
instance A.FromJSON V1RollingUpdateDaemonSet where
  parseJSON = A.withObject "V1RollingUpdateDaemonSet" $ \o ->
    V1RollingUpdateDaemonSet
      <$> (o .:? "maxUnavailable")

-- | ToJSON V1RollingUpdateDaemonSet
instance A.ToJSON V1RollingUpdateDaemonSet where
  toJSON V1RollingUpdateDaemonSet {..} =
   _omitNulls
      [ "maxUnavailable" .= v1RollingUpdateDaemonSetMaxUnavailable
      ]


-- | Construct a value of type 'V1RollingUpdateDaemonSet' (by applying it's required fields, if any)
mkV1RollingUpdateDaemonSet
  :: V1RollingUpdateDaemonSet
mkV1RollingUpdateDaemonSet =
  V1RollingUpdateDaemonSet
  { v1RollingUpdateDaemonSetMaxUnavailable = Nothing
  }

-- ** V1RollingUpdateDeployment
-- | V1RollingUpdateDeployment
-- Spec to control the desired behavior of rolling update.
data V1RollingUpdateDeployment = V1RollingUpdateDeployment
  { v1RollingUpdateDeploymentMaxSurge :: !(Maybe IntOrString) -- ^ "maxSurge"
  , v1RollingUpdateDeploymentMaxUnavailable :: !(Maybe IntOrString) -- ^ "maxUnavailable"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1RollingUpdateDeployment
instance A.FromJSON V1RollingUpdateDeployment where
  parseJSON = A.withObject "V1RollingUpdateDeployment" $ \o ->
    V1RollingUpdateDeployment
      <$> (o .:? "maxSurge")
      <*> (o .:? "maxUnavailable")

-- | ToJSON V1RollingUpdateDeployment
instance A.ToJSON V1RollingUpdateDeployment where
  toJSON V1RollingUpdateDeployment {..} =
   _omitNulls
      [ "maxSurge" .= v1RollingUpdateDeploymentMaxSurge
      , "maxUnavailable" .= v1RollingUpdateDeploymentMaxUnavailable
      ]


-- | Construct a value of type 'V1RollingUpdateDeployment' (by applying it's required fields, if any)
mkV1RollingUpdateDeployment
  :: V1RollingUpdateDeployment
mkV1RollingUpdateDeployment =
  V1RollingUpdateDeployment
  { v1RollingUpdateDeploymentMaxSurge = Nothing
  , v1RollingUpdateDeploymentMaxUnavailable = Nothing
  }

-- ** V1RollingUpdateStatefulSetStrategy
-- | V1RollingUpdateStatefulSetStrategy
-- RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.
data V1RollingUpdateStatefulSetStrategy = V1RollingUpdateStatefulSetStrategy
  { v1RollingUpdateStatefulSetStrategyPartition :: !(Maybe Int) -- ^ "partition" - Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1RollingUpdateStatefulSetStrategy
instance A.FromJSON V1RollingUpdateStatefulSetStrategy where
  parseJSON = A.withObject "V1RollingUpdateStatefulSetStrategy" $ \o ->
    V1RollingUpdateStatefulSetStrategy
      <$> (o .:? "partition")

-- | ToJSON V1RollingUpdateStatefulSetStrategy
instance A.ToJSON V1RollingUpdateStatefulSetStrategy where
  toJSON V1RollingUpdateStatefulSetStrategy {..} =
   _omitNulls
      [ "partition" .= v1RollingUpdateStatefulSetStrategyPartition
      ]


-- | Construct a value of type 'V1RollingUpdateStatefulSetStrategy' (by applying it's required fields, if any)
mkV1RollingUpdateStatefulSetStrategy
  :: V1RollingUpdateStatefulSetStrategy
mkV1RollingUpdateStatefulSetStrategy =
  V1RollingUpdateStatefulSetStrategy
  { v1RollingUpdateStatefulSetStrategyPartition = Nothing
  }

-- ** V1SELinuxOptions
-- | V1SELinuxOptions
-- SELinuxOptions are the labels to be applied to the container
data V1SELinuxOptions = V1SELinuxOptions
  { v1SELinuxOptionsLevel :: !(Maybe Text) -- ^ "level" - Level is SELinux level label that applies to the container.
  , v1SELinuxOptionsRole :: !(Maybe Text) -- ^ "role" - Role is a SELinux role label that applies to the container.
  , v1SELinuxOptionsType :: !(Maybe Text) -- ^ "type" - Type is a SELinux type label that applies to the container.
  , v1SELinuxOptionsUser :: !(Maybe Text) -- ^ "user" - User is a SELinux user label that applies to the container.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1SELinuxOptions
instance A.FromJSON V1SELinuxOptions where
  parseJSON = A.withObject "V1SELinuxOptions" $ \o ->
    V1SELinuxOptions
      <$> (o .:? "level")
      <*> (o .:? "role")
      <*> (o .:? "type")
      <*> (o .:? "user")

-- | ToJSON V1SELinuxOptions
instance A.ToJSON V1SELinuxOptions where
  toJSON V1SELinuxOptions {..} =
   _omitNulls
      [ "level" .= v1SELinuxOptionsLevel
      , "role" .= v1SELinuxOptionsRole
      , "type" .= v1SELinuxOptionsType
      , "user" .= v1SELinuxOptionsUser
      ]


-- | Construct a value of type 'V1SELinuxOptions' (by applying it's required fields, if any)
mkV1SELinuxOptions
  :: V1SELinuxOptions
mkV1SELinuxOptions =
  V1SELinuxOptions
  { v1SELinuxOptionsLevel = Nothing
  , v1SELinuxOptionsRole = Nothing
  , v1SELinuxOptionsType = Nothing
  , v1SELinuxOptionsUser = Nothing
  }

-- ** V1Scale
-- | V1Scale
-- Scale represents a scaling request for a resource.
data V1Scale = V1Scale
  { 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1ScaleMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1ScaleSpec :: !(Maybe V1ScaleSpec) -- ^ "spec"
  , v1ScaleStatus :: !(Maybe V1ScaleStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1Scale
instance A.FromJSON V1Scale where
  parseJSON = A.withObject "V1Scale" $ \o ->
    V1Scale
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON V1Scale
instance A.ToJSON V1Scale where
  toJSON V1Scale {..} =
   _omitNulls
      [ "apiVersion" .= v1ScaleApiVersion
      , "kind" .= v1ScaleKind
      , "metadata" .= v1ScaleMetadata
      , "spec" .= v1ScaleSpec
      , "status" .= v1ScaleStatus
      ]


-- | Construct a value of type 'V1Scale' (by applying it's required fields, if any)
mkV1Scale
  :: V1Scale
mkV1Scale =
  V1Scale
  { v1ScaleApiVersion = Nothing
  , v1ScaleKind = Nothing
  , v1ScaleMetadata = Nothing
  , v1ScaleSpec = Nothing
  , v1ScaleStatus = Nothing
  }

-- ** V1ScaleIOPersistentVolumeSource
-- | V1ScaleIOPersistentVolumeSource
-- ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume
data V1ScaleIOPersistentVolumeSource = V1ScaleIOPersistentVolumeSource
  { v1ScaleIOPersistentVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - 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;
  , v1ScaleIOPersistentVolumeSourceGateway :: !(Text) -- ^ /Required/ "gateway" - The host address of the ScaleIO API Gateway.
  , v1ScaleIOPersistentVolumeSourceProtectionDomain :: !(Maybe Text) -- ^ "protectionDomain" - The name of the ScaleIO Protection Domain for the configured storage.
  , v1ScaleIOPersistentVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
  , v1ScaleIOPersistentVolumeSourceSecretRef :: !(V1SecretReference) -- ^ /Required/ "secretRef"
  , v1ScaleIOPersistentVolumeSourceSslEnabled :: !(Maybe Bool) -- ^ "sslEnabled" - Flag to enable/disable SSL communication with Gateway, default false
  , v1ScaleIOPersistentVolumeSourceStorageMode :: !(Maybe Text) -- ^ "storageMode" - Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.
  , v1ScaleIOPersistentVolumeSourceStoragePool :: !(Maybe Text) -- ^ "storagePool" - The ScaleIO Storage Pool associated with the protection domain.
  , v1ScaleIOPersistentVolumeSourceSystem :: !(Text) -- ^ /Required/ "system" - The name of the storage system as configured in ScaleIO.
  , v1ScaleIOPersistentVolumeSourceVolumeName :: !(Maybe Text) -- ^ "volumeName" - The name of a volume already created in the ScaleIO system that is associated with this volume source.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ScaleIOPersistentVolumeSource
instance A.FromJSON V1ScaleIOPersistentVolumeSource where
  parseJSON = A.withObject "V1ScaleIOPersistentVolumeSource" $ \o ->
    V1ScaleIOPersistentVolumeSource
      <$> (o .:? "fsType")
      <*> (o .:  "gateway")
      <*> (o .:? "protectionDomain")
      <*> (o .:? "readOnly")
      <*> (o .:  "secretRef")
      <*> (o .:? "sslEnabled")
      <*> (o .:? "storageMode")
      <*> (o .:? "storagePool")
      <*> (o .:  "system")
      <*> (o .:? "volumeName")

-- | ToJSON V1ScaleIOPersistentVolumeSource
instance A.ToJSON V1ScaleIOPersistentVolumeSource where
  toJSON V1ScaleIOPersistentVolumeSource {..} =
   _omitNulls
      [ "fsType" .= v1ScaleIOPersistentVolumeSourceFsType
      , "gateway" .= v1ScaleIOPersistentVolumeSourceGateway
      , "protectionDomain" .= v1ScaleIOPersistentVolumeSourceProtectionDomain
      , "readOnly" .= v1ScaleIOPersistentVolumeSourceReadOnly
      , "secretRef" .= v1ScaleIOPersistentVolumeSourceSecretRef
      , "sslEnabled" .= v1ScaleIOPersistentVolumeSourceSslEnabled
      , "storageMode" .= v1ScaleIOPersistentVolumeSourceStorageMode
      , "storagePool" .= v1ScaleIOPersistentVolumeSourceStoragePool
      , "system" .= v1ScaleIOPersistentVolumeSourceSystem
      , "volumeName" .= v1ScaleIOPersistentVolumeSourceVolumeName
      ]


-- | Construct a value of type 'V1ScaleIOPersistentVolumeSource' (by applying it's required fields, if any)
mkV1ScaleIOPersistentVolumeSource
  :: Text -- ^ 'v1ScaleIOPersistentVolumeSourceGateway': The host address of the ScaleIO API Gateway.
  -> V1SecretReference -- ^ 'v1ScaleIOPersistentVolumeSourceSecretRef' 
  -> Text -- ^ 'v1ScaleIOPersistentVolumeSourceSystem': The name of the storage system as configured in ScaleIO.
  -> V1ScaleIOPersistentVolumeSource
mkV1ScaleIOPersistentVolumeSource v1ScaleIOPersistentVolumeSourceGateway v1ScaleIOPersistentVolumeSourceSecretRef v1ScaleIOPersistentVolumeSourceSystem =
  V1ScaleIOPersistentVolumeSource
  { v1ScaleIOPersistentVolumeSourceFsType = Nothing
  , v1ScaleIOPersistentVolumeSourceGateway
  , v1ScaleIOPersistentVolumeSourceProtectionDomain = Nothing
  , v1ScaleIOPersistentVolumeSourceReadOnly = Nothing
  , v1ScaleIOPersistentVolumeSourceSecretRef
  , v1ScaleIOPersistentVolumeSourceSslEnabled = Nothing
  , v1ScaleIOPersistentVolumeSourceStorageMode = Nothing
  , v1ScaleIOPersistentVolumeSourceStoragePool = Nothing
  , v1ScaleIOPersistentVolumeSourceSystem
  , v1ScaleIOPersistentVolumeSourceVolumeName = Nothing
  }

-- ** V1ScaleIOVolumeSource
-- | V1ScaleIOVolumeSource
-- ScaleIOVolumeSource represents a persistent ScaleIO volume
data V1ScaleIOVolumeSource = V1ScaleIOVolumeSource
  { v1ScaleIOVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - 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;.
  , v1ScaleIOVolumeSourceGateway :: !(Text) -- ^ /Required/ "gateway" - The host address of the ScaleIO API Gateway.
  , v1ScaleIOVolumeSourceProtectionDomain :: !(Maybe Text) -- ^ "protectionDomain" - The name of the ScaleIO Protection Domain for the configured storage.
  , v1ScaleIOVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
  , v1ScaleIOVolumeSourceSecretRef :: !(V1LocalObjectReference) -- ^ /Required/ "secretRef"
  , v1ScaleIOVolumeSourceSslEnabled :: !(Maybe Bool) -- ^ "sslEnabled" - Flag to enable/disable SSL communication with Gateway, default false
  , v1ScaleIOVolumeSourceStorageMode :: !(Maybe Text) -- ^ "storageMode" - Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.
  , v1ScaleIOVolumeSourceStoragePool :: !(Maybe Text) -- ^ "storagePool" - The ScaleIO Storage Pool associated with the protection domain.
  , v1ScaleIOVolumeSourceSystem :: !(Text) -- ^ /Required/ "system" - The name of the storage system as configured in ScaleIO.
  , v1ScaleIOVolumeSourceVolumeName :: !(Maybe Text) -- ^ "volumeName" - The name of a volume already created in the ScaleIO system that is associated with this volume source.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ScaleIOVolumeSource
instance A.FromJSON V1ScaleIOVolumeSource where
  parseJSON = A.withObject "V1ScaleIOVolumeSource" $ \o ->
    V1ScaleIOVolumeSource
      <$> (o .:? "fsType")
      <*> (o .:  "gateway")
      <*> (o .:? "protectionDomain")
      <*> (o .:? "readOnly")
      <*> (o .:  "secretRef")
      <*> (o .:? "sslEnabled")
      <*> (o .:? "storageMode")
      <*> (o .:? "storagePool")
      <*> (o .:  "system")
      <*> (o .:? "volumeName")

-- | ToJSON V1ScaleIOVolumeSource
instance A.ToJSON V1ScaleIOVolumeSource where
  toJSON V1ScaleIOVolumeSource {..} =
   _omitNulls
      [ "fsType" .= v1ScaleIOVolumeSourceFsType
      , "gateway" .= v1ScaleIOVolumeSourceGateway
      , "protectionDomain" .= v1ScaleIOVolumeSourceProtectionDomain
      , "readOnly" .= v1ScaleIOVolumeSourceReadOnly
      , "secretRef" .= v1ScaleIOVolumeSourceSecretRef
      , "sslEnabled" .= v1ScaleIOVolumeSourceSslEnabled
      , "storageMode" .= v1ScaleIOVolumeSourceStorageMode
      , "storagePool" .= v1ScaleIOVolumeSourceStoragePool
      , "system" .= v1ScaleIOVolumeSourceSystem
      , "volumeName" .= v1ScaleIOVolumeSourceVolumeName
      ]


-- | Construct a value of type 'V1ScaleIOVolumeSource' (by applying it's required fields, if any)
mkV1ScaleIOVolumeSource
  :: Text -- ^ 'v1ScaleIOVolumeSourceGateway': The host address of the ScaleIO API Gateway.
  -> V1LocalObjectReference -- ^ 'v1ScaleIOVolumeSourceSecretRef' 
  -> Text -- ^ 'v1ScaleIOVolumeSourceSystem': The name of the storage system as configured in ScaleIO.
  -> V1ScaleIOVolumeSource
mkV1ScaleIOVolumeSource v1ScaleIOVolumeSourceGateway v1ScaleIOVolumeSourceSecretRef v1ScaleIOVolumeSourceSystem =
  V1ScaleIOVolumeSource
  { v1ScaleIOVolumeSourceFsType = Nothing
  , v1ScaleIOVolumeSourceGateway
  , v1ScaleIOVolumeSourceProtectionDomain = Nothing
  , v1ScaleIOVolumeSourceReadOnly = Nothing
  , v1ScaleIOVolumeSourceSecretRef
  , v1ScaleIOVolumeSourceSslEnabled = Nothing
  , v1ScaleIOVolumeSourceStorageMode = Nothing
  , v1ScaleIOVolumeSourceStoragePool = Nothing
  , v1ScaleIOVolumeSourceSystem
  , v1ScaleIOVolumeSourceVolumeName = Nothing
  }

-- ** V1ScaleSpec
-- | V1ScaleSpec
-- ScaleSpec describes the attributes of a scale subresource.
data V1ScaleSpec = V1ScaleSpec
  { v1ScaleSpecReplicas :: !(Maybe Int) -- ^ "replicas" - desired number of instances for the scaled object.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ScaleSpec
instance A.FromJSON V1ScaleSpec where
  parseJSON = A.withObject "V1ScaleSpec" $ \o ->
    V1ScaleSpec
      <$> (o .:? "replicas")

-- | ToJSON V1ScaleSpec
instance A.ToJSON V1ScaleSpec where
  toJSON V1ScaleSpec {..} =
   _omitNulls
      [ "replicas" .= v1ScaleSpecReplicas
      ]


-- | Construct a value of type 'V1ScaleSpec' (by applying it's required fields, if any)
mkV1ScaleSpec
  :: V1ScaleSpec
mkV1ScaleSpec =
  V1ScaleSpec
  { v1ScaleSpecReplicas = Nothing
  }

-- ** V1ScaleStatus
-- | V1ScaleStatus
-- ScaleStatus represents the current status of a scale subresource.
data V1ScaleStatus = V1ScaleStatus
  { v1ScaleStatusReplicas :: !(Int) -- ^ /Required/ "replicas" - actual number of observed instances of the scaled object.
  , v1ScaleStatusSelector :: !(Maybe Text) -- ^ "selector" - 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: http://kubernetes.io/docs/user-guide/labels#label-selectors
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ScaleStatus
instance A.FromJSON V1ScaleStatus where
  parseJSON = A.withObject "V1ScaleStatus" $ \o ->
    V1ScaleStatus
      <$> (o .:  "replicas")
      <*> (o .:? "selector")

-- | ToJSON V1ScaleStatus
instance A.ToJSON V1ScaleStatus where
  toJSON V1ScaleStatus {..} =
   _omitNulls
      [ "replicas" .= v1ScaleStatusReplicas
      , "selector" .= v1ScaleStatusSelector
      ]


-- | Construct a value of type 'V1ScaleStatus' (by applying it's required fields, if any)
mkV1ScaleStatus
  :: Int -- ^ 'v1ScaleStatusReplicas': actual number of observed instances of the scaled object.
  -> V1ScaleStatus
mkV1ScaleStatus v1ScaleStatusReplicas =
  V1ScaleStatus
  { v1ScaleStatusReplicas
  , v1ScaleStatusSelector = Nothing
  }

-- ** V1ScopeSelector
-- | V1ScopeSelector
-- A scope selector represents the AND of the selectors represented by the scoped-resource selector requirements.
data V1ScopeSelector = V1ScopeSelector
  { v1ScopeSelectorMatchExpressions :: !(Maybe [V1ScopedResourceSelectorRequirement]) -- ^ "matchExpressions" - A list of scope selector requirements by scope of the resources.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ScopeSelector
instance A.FromJSON V1ScopeSelector where
  parseJSON = A.withObject "V1ScopeSelector" $ \o ->
    V1ScopeSelector
      <$> (o .:? "matchExpressions")

-- | ToJSON V1ScopeSelector
instance A.ToJSON V1ScopeSelector where
  toJSON V1ScopeSelector {..} =
   _omitNulls
      [ "matchExpressions" .= v1ScopeSelectorMatchExpressions
      ]


-- | Construct a value of type 'V1ScopeSelector' (by applying it's required fields, if any)
mkV1ScopeSelector
  :: V1ScopeSelector
mkV1ScopeSelector =
  V1ScopeSelector
  { v1ScopeSelectorMatchExpressions = 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
  { v1ScopedResourceSelectorRequirementOperator :: !(Text) -- ^ /Required/ "operator" - Represents a scope&#39;s relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist.
  , v1ScopedResourceSelectorRequirementScopeName :: !(Text) -- ^ /Required/ "scopeName" - The name of the scope that the selector applies to.
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ScopedResourceSelectorRequirement
instance A.FromJSON V1ScopedResourceSelectorRequirement where
  parseJSON = A.withObject "V1ScopedResourceSelectorRequirement" $ \o ->
    V1ScopedResourceSelectorRequirement
      <$> (o .:  "operator")
      <*> (o .:  "scopeName")
      <*> (o .:? "values")

-- | ToJSON V1ScopedResourceSelectorRequirement
instance A.ToJSON V1ScopedResourceSelectorRequirement where
  toJSON V1ScopedResourceSelectorRequirement {..} =
   _omitNulls
      [ "operator" .= v1ScopedResourceSelectorRequirementOperator
      , "scopeName" .= v1ScopedResourceSelectorRequirementScopeName
      , "values" .= 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 v1ScopedResourceSelectorRequirementOperator v1ScopedResourceSelectorRequirementScopeName =
  V1ScopedResourceSelectorRequirement
  { v1ScopedResourceSelectorRequirementOperator
  , v1ScopedResourceSelectorRequirementScopeName
  , v1ScopedResourceSelectorRequirementValues = Nothing
  }

-- ** 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
  { 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/api-conventions.md#resources
  , 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
  , 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/api-conventions.md#types-kinds
  , v1SecretMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1SecretStringData :: !(Maybe (Map.Map String Text)) -- ^ "stringData" - stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API.
  , v1SecretType :: !(Maybe Text) -- ^ "type" - Used to facilitate programmatic handling of secret data.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1Secret
instance A.FromJSON V1Secret where
  parseJSON = A.withObject "V1Secret" $ \o ->
    V1Secret
      <$> (o .:? "apiVersion")
      <*> (o .:? "data")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "stringData")
      <*> (o .:? "type")

-- | ToJSON V1Secret
instance A.ToJSON V1Secret where
  toJSON V1Secret {..} =
   _omitNulls
      [ "apiVersion" .= v1SecretApiVersion
      , "data" .= v1SecretData
      , "kind" .= v1SecretKind
      , "metadata" .= v1SecretMetadata
      , "stringData" .= v1SecretStringData
      , "type" .= v1SecretType
      ]


-- | Construct a value of type 'V1Secret' (by applying it's required fields, if any)
mkV1Secret
  :: V1Secret
mkV1Secret =
  V1Secret
  { v1SecretApiVersion = Nothing
  , v1SecretData = Nothing
  , v1SecretKind = Nothing
  , v1SecretMetadata = Nothing
  , v1SecretStringData = Nothing
  , v1SecretType = 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
  { v1SecretEnvSourceName :: !(Maybe Text) -- ^ "name" - Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  , v1SecretEnvSourceOptional :: !(Maybe Bool) -- ^ "optional" - Specify whether the Secret must be defined
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1SecretEnvSource
instance A.FromJSON V1SecretEnvSource where
  parseJSON = A.withObject "V1SecretEnvSource" $ \o ->
    V1SecretEnvSource
      <$> (o .:? "name")
      <*> (o .:? "optional")

-- | ToJSON V1SecretEnvSource
instance A.ToJSON V1SecretEnvSource where
  toJSON V1SecretEnvSource {..} =
   _omitNulls
      [ "name" .= v1SecretEnvSourceName
      , "optional" .= v1SecretEnvSourceOptional
      ]


-- | Construct a value of type 'V1SecretEnvSource' (by applying it's required fields, if any)
mkV1SecretEnvSource
  :: V1SecretEnvSource
mkV1SecretEnvSource =
  V1SecretEnvSource
  { v1SecretEnvSourceName = Nothing
  , v1SecretEnvSourceOptional = Nothing
  }

-- ** V1SecretKeySelector
-- | V1SecretKeySelector
-- SecretKeySelector selects a key of a Secret.
data V1SecretKeySelector = V1SecretKeySelector
  { v1SecretKeySelectorKey :: !(Text) -- ^ /Required/ "key" - The key of the secret to select from.  Must be a valid secret key.
  , v1SecretKeySelectorName :: !(Maybe Text) -- ^ "name" - Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  , v1SecretKeySelectorOptional :: !(Maybe Bool) -- ^ "optional" - Specify whether the Secret or it&#39;s key must be defined
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1SecretKeySelector
instance A.FromJSON V1SecretKeySelector where
  parseJSON = A.withObject "V1SecretKeySelector" $ \o ->
    V1SecretKeySelector
      <$> (o .:  "key")
      <*> (o .:? "name")
      <*> (o .:? "optional")

-- | ToJSON V1SecretKeySelector
instance A.ToJSON V1SecretKeySelector where
  toJSON V1SecretKeySelector {..} =
   _omitNulls
      [ "key" .= v1SecretKeySelectorKey
      , "name" .= v1SecretKeySelectorName
      , "optional" .= 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 v1SecretKeySelectorKey =
  V1SecretKeySelector
  { v1SecretKeySelectorKey
  , v1SecretKeySelectorName = Nothing
  , v1SecretKeySelectorOptional = Nothing
  }

-- ** V1SecretList
-- | V1SecretList
-- SecretList is a list of Secret.
data V1SecretList = V1SecretList
  { 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/api-conventions.md#resources
  , v1SecretListItems :: !([V1Secret]) -- ^ /Required/ "items" - Items is a list of secret objects. More info: https://kubernetes.io/docs/concepts/configuration/secret
  , 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/api-conventions.md#types-kinds
  , v1SecretListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1SecretList
instance A.FromJSON V1SecretList where
  parseJSON = A.withObject "V1SecretList" $ \o ->
    V1SecretList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1SecretList
instance A.ToJSON V1SecretList where
  toJSON V1SecretList {..} =
   _omitNulls
      [ "apiVersion" .= v1SecretListApiVersion
      , "items" .= v1SecretListItems
      , "kind" .= v1SecretListKind
      , "metadata" .= 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 v1SecretListItems =
  V1SecretList
  { v1SecretListApiVersion = Nothing
  , v1SecretListItems
  , v1SecretListKind = Nothing
  , v1SecretListMetadata = 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
  { v1SecretProjectionItems :: !(Maybe [V1KeyToPath]) -- ^ "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;.
  , v1SecretProjectionName :: !(Maybe Text) -- ^ "name" - Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  , v1SecretProjectionOptional :: !(Maybe Bool) -- ^ "optional" - Specify whether the Secret or its key must be defined
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1SecretProjection
instance A.FromJSON V1SecretProjection where
  parseJSON = A.withObject "V1SecretProjection" $ \o ->
    V1SecretProjection
      <$> (o .:? "items")
      <*> (o .:? "name")
      <*> (o .:? "optional")

-- | ToJSON V1SecretProjection
instance A.ToJSON V1SecretProjection where
  toJSON V1SecretProjection {..} =
   _omitNulls
      [ "items" .= v1SecretProjectionItems
      , "name" .= v1SecretProjectionName
      , "optional" .= v1SecretProjectionOptional
      ]


-- | Construct a value of type 'V1SecretProjection' (by applying it's required fields, if any)
mkV1SecretProjection
  :: V1SecretProjection
mkV1SecretProjection =
  V1SecretProjection
  { v1SecretProjectionItems = Nothing
  , v1SecretProjectionName = Nothing
  , v1SecretProjectionOptional = Nothing
  }

-- ** V1SecretReference
-- | V1SecretReference
-- SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace
data V1SecretReference = V1SecretReference
  { v1SecretReferenceName :: !(Maybe Text) -- ^ "name" - Name is unique within a namespace to reference a secret resource.
  , v1SecretReferenceNamespace :: !(Maybe Text) -- ^ "namespace" - Namespace defines the space within which the secret name must be unique.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1SecretReference
instance A.FromJSON V1SecretReference where
  parseJSON = A.withObject "V1SecretReference" $ \o ->
    V1SecretReference
      <$> (o .:? "name")
      <*> (o .:? "namespace")

-- | ToJSON V1SecretReference
instance A.ToJSON V1SecretReference where
  toJSON V1SecretReference {..} =
   _omitNulls
      [ "name" .= v1SecretReferenceName
      , "namespace" .= v1SecretReferenceNamespace
      ]


-- | Construct a value of type 'V1SecretReference' (by applying it's required fields, if any)
mkV1SecretReference
  :: V1SecretReference
mkV1SecretReference =
  V1SecretReference
  { v1SecretReferenceName = Nothing
  , v1SecretReferenceNamespace = 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
  { v1SecretVolumeSourceDefaultMode :: !(Maybe Int) -- ^ "defaultMode" - Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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.
  , v1SecretVolumeSourceItems :: !(Maybe [V1KeyToPath]) -- ^ "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;.
  , v1SecretVolumeSourceOptional :: !(Maybe Bool) -- ^ "optional" - Specify whether the Secret or it&#39;s keys must be defined
  , v1SecretVolumeSourceSecretName :: !(Maybe Text) -- ^ "secretName" - Name of the secret in the pod&#39;s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1SecretVolumeSource
instance A.FromJSON V1SecretVolumeSource where
  parseJSON = A.withObject "V1SecretVolumeSource" $ \o ->
    V1SecretVolumeSource
      <$> (o .:? "defaultMode")
      <*> (o .:? "items")
      <*> (o .:? "optional")
      <*> (o .:? "secretName")

-- | ToJSON V1SecretVolumeSource
instance A.ToJSON V1SecretVolumeSource where
  toJSON V1SecretVolumeSource {..} =
   _omitNulls
      [ "defaultMode" .= v1SecretVolumeSourceDefaultMode
      , "items" .= v1SecretVolumeSourceItems
      , "optional" .= v1SecretVolumeSourceOptional
      , "secretName" .= v1SecretVolumeSourceSecretName
      ]


-- | Construct a value of type 'V1SecretVolumeSource' (by applying it's required fields, if any)
mkV1SecretVolumeSource
  :: V1SecretVolumeSource
mkV1SecretVolumeSource =
  V1SecretVolumeSource
  { v1SecretVolumeSourceDefaultMode = Nothing
  , v1SecretVolumeSourceItems = Nothing
  , v1SecretVolumeSourceOptional = Nothing
  , v1SecretVolumeSourceSecretName = 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
  { 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
  , v1SecurityContextCapabilities :: !(Maybe V1Capabilities) -- ^ "capabilities"
  , v1SecurityContextPrivileged :: !(Maybe Bool) -- ^ "privileged" - Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false.
  , v1SecurityContextProcMount :: !(Maybe Text) -- ^ "procMount" - procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled.
  , v1SecurityContextReadOnlyRootFilesystem :: !(Maybe Bool) -- ^ "readOnlyRootFilesystem" - Whether this container has a read-only root filesystem. Default is false.
  , 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.
  , 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.
  , 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.
  , v1SecurityContextSeLinuxOptions :: !(Maybe V1SELinuxOptions) -- ^ "seLinuxOptions"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1SecurityContext
instance A.FromJSON V1SecurityContext where
  parseJSON = A.withObject "V1SecurityContext" $ \o ->
    V1SecurityContext
      <$> (o .:? "allowPrivilegeEscalation")
      <*> (o .:? "capabilities")
      <*> (o .:? "privileged")
      <*> (o .:? "procMount")
      <*> (o .:? "readOnlyRootFilesystem")
      <*> (o .:? "runAsGroup")
      <*> (o .:? "runAsNonRoot")
      <*> (o .:? "runAsUser")
      <*> (o .:? "seLinuxOptions")

-- | ToJSON V1SecurityContext
instance A.ToJSON V1SecurityContext where
  toJSON V1SecurityContext {..} =
   _omitNulls
      [ "allowPrivilegeEscalation" .= v1SecurityContextAllowPrivilegeEscalation
      , "capabilities" .= v1SecurityContextCapabilities
      , "privileged" .= v1SecurityContextPrivileged
      , "procMount" .= v1SecurityContextProcMount
      , "readOnlyRootFilesystem" .= v1SecurityContextReadOnlyRootFilesystem
      , "runAsGroup" .= v1SecurityContextRunAsGroup
      , "runAsNonRoot" .= v1SecurityContextRunAsNonRoot
      , "runAsUser" .= v1SecurityContextRunAsUser
      , "seLinuxOptions" .= v1SecurityContextSeLinuxOptions
      ]


-- | Construct a value of type 'V1SecurityContext' (by applying it's required fields, if any)
mkV1SecurityContext
  :: V1SecurityContext
mkV1SecurityContext =
  V1SecurityContext
  { v1SecurityContextAllowPrivilegeEscalation = Nothing
  , v1SecurityContextCapabilities = Nothing
  , v1SecurityContextPrivileged = Nothing
  , v1SecurityContextProcMount = Nothing
  , v1SecurityContextReadOnlyRootFilesystem = Nothing
  , v1SecurityContextRunAsGroup = Nothing
  , v1SecurityContextRunAsNonRoot = Nothing
  , v1SecurityContextRunAsUser = Nothing
  , v1SecurityContextSeLinuxOptions = Nothing
  }

-- ** 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
  { 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1SelfSubjectAccessReviewMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1SelfSubjectAccessReviewSpec :: !(V1SelfSubjectAccessReviewSpec) -- ^ /Required/ "spec"
  , v1SelfSubjectAccessReviewStatus :: !(Maybe V1SubjectAccessReviewStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1SelfSubjectAccessReview
instance A.FromJSON V1SelfSubjectAccessReview where
  parseJSON = A.withObject "V1SelfSubjectAccessReview" $ \o ->
    V1SelfSubjectAccessReview
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:  "spec")
      <*> (o .:? "status")

-- | ToJSON V1SelfSubjectAccessReview
instance A.ToJSON V1SelfSubjectAccessReview where
  toJSON V1SelfSubjectAccessReview {..} =
   _omitNulls
      [ "apiVersion" .= v1SelfSubjectAccessReviewApiVersion
      , "kind" .= v1SelfSubjectAccessReviewKind
      , "metadata" .= v1SelfSubjectAccessReviewMetadata
      , "spec" .= v1SelfSubjectAccessReviewSpec
      , "status" .= v1SelfSubjectAccessReviewStatus
      ]


-- | Construct a value of type 'V1SelfSubjectAccessReview' (by applying it's required fields, if any)
mkV1SelfSubjectAccessReview
  :: V1SelfSubjectAccessReviewSpec -- ^ 'v1SelfSubjectAccessReviewSpec' 
  -> V1SelfSubjectAccessReview
mkV1SelfSubjectAccessReview v1SelfSubjectAccessReviewSpec =
  V1SelfSubjectAccessReview
  { v1SelfSubjectAccessReviewApiVersion = Nothing
  , v1SelfSubjectAccessReviewKind = Nothing
  , v1SelfSubjectAccessReviewMetadata = Nothing
  , v1SelfSubjectAccessReviewSpec
  , v1SelfSubjectAccessReviewStatus = Nothing
  }

-- ** V1SelfSubjectAccessReviewSpec
-- | V1SelfSubjectAccessReviewSpec
-- SelfSubjectAccessReviewSpec is a description of the access request.  Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set
data V1SelfSubjectAccessReviewSpec = V1SelfSubjectAccessReviewSpec
  { v1SelfSubjectAccessReviewSpecNonResourceAttributes :: !(Maybe V1NonResourceAttributes) -- ^ "nonResourceAttributes"
  , v1SelfSubjectAccessReviewSpecResourceAttributes :: !(Maybe V1ResourceAttributes) -- ^ "resourceAttributes"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1SelfSubjectAccessReviewSpec
instance A.FromJSON V1SelfSubjectAccessReviewSpec where
  parseJSON = A.withObject "V1SelfSubjectAccessReviewSpec" $ \o ->
    V1SelfSubjectAccessReviewSpec
      <$> (o .:? "nonResourceAttributes")
      <*> (o .:? "resourceAttributes")

-- | ToJSON V1SelfSubjectAccessReviewSpec
instance A.ToJSON V1SelfSubjectAccessReviewSpec where
  toJSON V1SelfSubjectAccessReviewSpec {..} =
   _omitNulls
      [ "nonResourceAttributes" .= v1SelfSubjectAccessReviewSpecNonResourceAttributes
      , "resourceAttributes" .= v1SelfSubjectAccessReviewSpecResourceAttributes
      ]


-- | Construct a value of type 'V1SelfSubjectAccessReviewSpec' (by applying it's required fields, if any)
mkV1SelfSubjectAccessReviewSpec
  :: V1SelfSubjectAccessReviewSpec
mkV1SelfSubjectAccessReviewSpec =
  V1SelfSubjectAccessReviewSpec
  { v1SelfSubjectAccessReviewSpecNonResourceAttributes = Nothing
  , v1SelfSubjectAccessReviewSpecResourceAttributes = 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
  { 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1SelfSubjectRulesReviewMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1SelfSubjectRulesReviewSpec :: !(V1SelfSubjectRulesReviewSpec) -- ^ /Required/ "spec"
  , v1SelfSubjectRulesReviewStatus :: !(Maybe V1SubjectRulesReviewStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1SelfSubjectRulesReview
instance A.FromJSON V1SelfSubjectRulesReview where
  parseJSON = A.withObject "V1SelfSubjectRulesReview" $ \o ->
    V1SelfSubjectRulesReview
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:  "spec")
      <*> (o .:? "status")

-- | ToJSON V1SelfSubjectRulesReview
instance A.ToJSON V1SelfSubjectRulesReview where
  toJSON V1SelfSubjectRulesReview {..} =
   _omitNulls
      [ "apiVersion" .= v1SelfSubjectRulesReviewApiVersion
      , "kind" .= v1SelfSubjectRulesReviewKind
      , "metadata" .= v1SelfSubjectRulesReviewMetadata
      , "spec" .= v1SelfSubjectRulesReviewSpec
      , "status" .= v1SelfSubjectRulesReviewStatus
      ]


-- | Construct a value of type 'V1SelfSubjectRulesReview' (by applying it's required fields, if any)
mkV1SelfSubjectRulesReview
  :: V1SelfSubjectRulesReviewSpec -- ^ 'v1SelfSubjectRulesReviewSpec' 
  -> V1SelfSubjectRulesReview
mkV1SelfSubjectRulesReview v1SelfSubjectRulesReviewSpec =
  V1SelfSubjectRulesReview
  { v1SelfSubjectRulesReviewApiVersion = Nothing
  , v1SelfSubjectRulesReviewKind = Nothing
  , v1SelfSubjectRulesReviewMetadata = Nothing
  , v1SelfSubjectRulesReviewSpec
  , v1SelfSubjectRulesReviewStatus = Nothing
  }

-- ** V1SelfSubjectRulesReviewSpec
-- | V1SelfSubjectRulesReviewSpec
data V1SelfSubjectRulesReviewSpec = V1SelfSubjectRulesReviewSpec
  { v1SelfSubjectRulesReviewSpecNamespace :: !(Maybe Text) -- ^ "namespace" - Namespace to evaluate rules for. Required.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1SelfSubjectRulesReviewSpec
instance A.FromJSON V1SelfSubjectRulesReviewSpec where
  parseJSON = A.withObject "V1SelfSubjectRulesReviewSpec" $ \o ->
    V1SelfSubjectRulesReviewSpec
      <$> (o .:? "namespace")

-- | ToJSON V1SelfSubjectRulesReviewSpec
instance A.ToJSON V1SelfSubjectRulesReviewSpec where
  toJSON V1SelfSubjectRulesReviewSpec {..} =
   _omitNulls
      [ "namespace" .= v1SelfSubjectRulesReviewSpecNamespace
      ]


-- | Construct a value of type 'V1SelfSubjectRulesReviewSpec' (by applying it's required fields, if any)
mkV1SelfSubjectRulesReviewSpec
  :: V1SelfSubjectRulesReviewSpec
mkV1SelfSubjectRulesReviewSpec =
  V1SelfSubjectRulesReviewSpec
  { v1SelfSubjectRulesReviewSpecNamespace = 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
  { v1ServerAddressByClientCIDRClientCidr :: !(Text) -- ^ /Required/ "clientCIDR" - The CIDR with which clients can match their IP to figure out the server address that they should use.
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ServerAddressByClientCIDR
instance A.FromJSON V1ServerAddressByClientCIDR where
  parseJSON = A.withObject "V1ServerAddressByClientCIDR" $ \o ->
    V1ServerAddressByClientCIDR
      <$> (o .:  "clientCIDR")
      <*> (o .:  "serverAddress")

-- | ToJSON V1ServerAddressByClientCIDR
instance A.ToJSON V1ServerAddressByClientCIDR where
  toJSON V1ServerAddressByClientCIDR {..} =
   _omitNulls
      [ "clientCIDR" .= v1ServerAddressByClientCIDRClientCidr
      , "serverAddress" .= 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 v1ServerAddressByClientCIDRClientCidr v1ServerAddressByClientCIDRServerAddress =
  V1ServerAddressByClientCIDR
  { v1ServerAddressByClientCIDRClientCidr
  , 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
  { 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1ServiceMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1ServiceSpec :: !(Maybe V1ServiceSpec) -- ^ "spec"
  , v1ServiceStatus :: !(Maybe V1ServiceStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1Service
instance A.FromJSON V1Service where
  parseJSON = A.withObject "V1Service" $ \o ->
    V1Service
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON V1Service
instance A.ToJSON V1Service where
  toJSON V1Service {..} =
   _omitNulls
      [ "apiVersion" .= v1ServiceApiVersion
      , "kind" .= v1ServiceKind
      , "metadata" .= v1ServiceMetadata
      , "spec" .= v1ServiceSpec
      , "status" .= v1ServiceStatus
      ]


-- | Construct a value of type 'V1Service' (by applying it's required fields, if any)
mkV1Service
  :: V1Service
mkV1Service =
  V1Service
  { v1ServiceApiVersion = Nothing
  , v1ServiceKind = Nothing
  , v1ServiceMetadata = Nothing
  , v1ServiceSpec = Nothing
  , v1ServiceStatus = 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
  { 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/api-conventions.md#resources
  , 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.
  , 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
  , 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/api-conventions.md#types-kinds
  , v1ServiceAccountMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1ServiceAccountSecrets :: !(Maybe [V1ObjectReference]) -- ^ "secrets" - Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount. More info: https://kubernetes.io/docs/concepts/configuration/secret
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ServiceAccount
instance A.FromJSON V1ServiceAccount where
  parseJSON = A.withObject "V1ServiceAccount" $ \o ->
    V1ServiceAccount
      <$> (o .:? "apiVersion")
      <*> (o .:? "automountServiceAccountToken")
      <*> (o .:? "imagePullSecrets")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "secrets")

-- | ToJSON V1ServiceAccount
instance A.ToJSON V1ServiceAccount where
  toJSON V1ServiceAccount {..} =
   _omitNulls
      [ "apiVersion" .= v1ServiceAccountApiVersion
      , "automountServiceAccountToken" .= v1ServiceAccountAutomountServiceAccountToken
      , "imagePullSecrets" .= v1ServiceAccountImagePullSecrets
      , "kind" .= v1ServiceAccountKind
      , "metadata" .= v1ServiceAccountMetadata
      , "secrets" .= v1ServiceAccountSecrets
      ]


-- | Construct a value of type 'V1ServiceAccount' (by applying it's required fields, if any)
mkV1ServiceAccount
  :: V1ServiceAccount
mkV1ServiceAccount =
  V1ServiceAccount
  { v1ServiceAccountApiVersion = Nothing
  , v1ServiceAccountAutomountServiceAccountToken = Nothing
  , v1ServiceAccountImagePullSecrets = Nothing
  , v1ServiceAccountKind = Nothing
  , v1ServiceAccountMetadata = Nothing
  , v1ServiceAccountSecrets = Nothing
  }

-- ** V1ServiceAccountList
-- | V1ServiceAccountList
-- ServiceAccountList is a list of ServiceAccount objects
data V1ServiceAccountList = V1ServiceAccountList
  { 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/api-conventions.md#resources
  , v1ServiceAccountListItems :: !([V1ServiceAccount]) -- ^ /Required/ "items" - List of ServiceAccounts. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
  , 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/api-conventions.md#types-kinds
  , v1ServiceAccountListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ServiceAccountList
instance A.FromJSON V1ServiceAccountList where
  parseJSON = A.withObject "V1ServiceAccountList" $ \o ->
    V1ServiceAccountList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1ServiceAccountList
instance A.ToJSON V1ServiceAccountList where
  toJSON V1ServiceAccountList {..} =
   _omitNulls
      [ "apiVersion" .= v1ServiceAccountListApiVersion
      , "items" .= v1ServiceAccountListItems
      , "kind" .= v1ServiceAccountListKind
      , "metadata" .= 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 v1ServiceAccountListItems =
  V1ServiceAccountList
  { v1ServiceAccountListApiVersion = Nothing
  , v1ServiceAccountListItems
  , v1ServiceAccountListKind = Nothing
  , v1ServiceAccountListMetadata = Nothing
  }

-- ** 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
  { 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.
  , 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.
  , v1ServiceAccountTokenProjectionPath :: !(Text) -- ^ /Required/ "path" - Path is the path relative to the mount point of the file to project the token into.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ServiceAccountTokenProjection
instance A.FromJSON V1ServiceAccountTokenProjection where
  parseJSON = A.withObject "V1ServiceAccountTokenProjection" $ \o ->
    V1ServiceAccountTokenProjection
      <$> (o .:? "audience")
      <*> (o .:? "expirationSeconds")
      <*> (o .:  "path")

-- | ToJSON V1ServiceAccountTokenProjection
instance A.ToJSON V1ServiceAccountTokenProjection where
  toJSON V1ServiceAccountTokenProjection {..} =
   _omitNulls
      [ "audience" .= v1ServiceAccountTokenProjectionAudience
      , "expirationSeconds" .= v1ServiceAccountTokenProjectionExpirationSeconds
      , "path" .= 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 v1ServiceAccountTokenProjectionPath =
  V1ServiceAccountTokenProjection
  { v1ServiceAccountTokenProjectionAudience = Nothing
  , v1ServiceAccountTokenProjectionExpirationSeconds = Nothing
  , v1ServiceAccountTokenProjectionPath
  }

-- ** V1ServiceList
-- | V1ServiceList
-- ServiceList holds a list of services.
data V1ServiceList = V1ServiceList
  { 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/api-conventions.md#resources
  , v1ServiceListItems :: !([V1Service]) -- ^ /Required/ "items" - List of services
  , 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/api-conventions.md#types-kinds
  , v1ServiceListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ServiceList
instance A.FromJSON V1ServiceList where
  parseJSON = A.withObject "V1ServiceList" $ \o ->
    V1ServiceList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1ServiceList
instance A.ToJSON V1ServiceList where
  toJSON V1ServiceList {..} =
   _omitNulls
      [ "apiVersion" .= v1ServiceListApiVersion
      , "items" .= v1ServiceListItems
      , "kind" .= v1ServiceListKind
      , "metadata" .= v1ServiceListMetadata
      ]


-- | Construct a value of type 'V1ServiceList' (by applying it's required fields, if any)
mkV1ServiceList
  :: [V1Service] -- ^ 'v1ServiceListItems': List of services
  -> V1ServiceList
mkV1ServiceList v1ServiceListItems =
  V1ServiceList
  { v1ServiceListApiVersion = Nothing
  , v1ServiceListItems
  , v1ServiceListKind = Nothing
  , v1ServiceListMetadata = Nothing
  }

-- ** V1ServicePort
-- | V1ServicePort
-- ServicePort contains information on service's port.
data V1ServicePort = V1ServicePort
  { 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. This maps to the &#39;Name&#39; field in EndpointPort objects. Optional if only one ServicePort is defined on this service.
  , v1ServicePortNodePort :: !(Maybe Int) -- ^ "nodePort" - The port on each node on which this service is exposed when type&#x3D;NodePort or LoadBalancer. Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the ServiceType of this Service requires one. More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
  , v1ServicePortPort :: !(Int) -- ^ /Required/ "port" - The port that will be exposed by this service.
  , v1ServicePortProtocol :: !(Maybe Text) -- ^ "protocol" - The IP protocol for this port. Supports \&quot;TCP\&quot;, \&quot;UDP\&quot;, and \&quot;SCTP\&quot;. Default is TCP.
  , v1ServicePortTargetPort :: !(Maybe IntOrString) -- ^ "targetPort"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ServicePort
instance A.FromJSON V1ServicePort where
  parseJSON = A.withObject "V1ServicePort" $ \o ->
    V1ServicePort
      <$> (o .:? "name")
      <*> (o .:? "nodePort")
      <*> (o .:  "port")
      <*> (o .:? "protocol")
      <*> (o .:? "targetPort")

-- | ToJSON V1ServicePort
instance A.ToJSON V1ServicePort where
  toJSON V1ServicePort {..} =
   _omitNulls
      [ "name" .= v1ServicePortName
      , "nodePort" .= v1ServicePortNodePort
      , "port" .= v1ServicePortPort
      , "protocol" .= v1ServicePortProtocol
      , "targetPort" .= 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 v1ServicePortPort =
  V1ServicePort
  { v1ServicePortName = Nothing
  , v1ServicePortNodePort = Nothing
  , v1ServicePortPort
  , v1ServicePortProtocol = Nothing
  , v1ServicePortTargetPort = Nothing
  }

-- ** V1ServiceReference
-- | V1ServiceReference
-- ServiceReference holds a reference to Service.legacy.k8s.io
data V1ServiceReference = V1ServiceReference
  { v1ServiceReferenceName :: !(Maybe Text) -- ^ "name" - Name is the name of the service
  , v1ServiceReferenceNamespace :: !(Maybe Text) -- ^ "namespace" - Namespace is the namespace of the service
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ServiceReference
instance A.FromJSON V1ServiceReference where
  parseJSON = A.withObject "V1ServiceReference" $ \o ->
    V1ServiceReference
      <$> (o .:? "name")
      <*> (o .:? "namespace")

-- | ToJSON V1ServiceReference
instance A.ToJSON V1ServiceReference where
  toJSON V1ServiceReference {..} =
   _omitNulls
      [ "name" .= v1ServiceReferenceName
      , "namespace" .= v1ServiceReferenceNamespace
      ]


-- | Construct a value of type 'V1ServiceReference' (by applying it's required fields, if any)
mkV1ServiceReference
  :: V1ServiceReference
mkV1ServiceReference =
  V1ServiceReference
  { v1ServiceReferenceName = Nothing
  , v1ServiceReferenceNamespace = Nothing
  }

-- ** V1ServiceSpec
-- | V1ServiceSpec
-- ServiceSpec describes the attributes that a user creates on a service.
data V1ServiceSpec = V1ServiceSpec
  { v1ServiceSpecClusterIp :: !(Maybe Text) -- ^ "clusterIP" - clusterIP is the IP address of the service and is usually assigned randomly by the master. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. This field can not be changed through updates. Valid values are \&quot;None\&quot;, empty string (\&quot;\&quot;), or a valid IP address. \&quot;None\&quot; can be specified for headless services when proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
  , 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.
  , v1ServiceSpecExternalName :: !(Maybe Text) -- ^ "externalName" - externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires Type to be ExternalName.
  , v1ServiceSpecExternalTrafficPolicy :: !(Maybe Text) -- ^ "externalTrafficPolicy" - externalTrafficPolicy denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. \&quot;Local\&quot; preserves the client source IP and avoids a second hop for LoadBalancer and Nodeport type services, but risks potentially imbalanced traffic spreading. \&quot;Cluster\&quot; obscures the client source IP and may cause a second hop to another node, but should have good overall load-spreading.
  , v1ServiceSpecHealthCheckNodePort :: !(Maybe Int) -- ^ "healthCheckNodePort" - healthCheckNodePort specifies the healthcheck nodePort for the service. If not specified, HealthCheckNodePort is created by the service api backend with the allocated nodePort. Will use user-specified nodePort value if specified by the client. Only effects when Type is set to LoadBalancer and ExternalTrafficPolicy is set to Local.
  , v1ServiceSpecLoadBalancerIp :: !(Maybe Text) -- ^ "loadBalancerIP" - Only applies to Service Type: LoadBalancer LoadBalancer will get created with the IP specified in this field. 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.
  , 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/configure-cloud-provider-firewall/
  , 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
  , v1ServiceSpecPublishNotReadyAddresses :: !(Maybe Bool) -- ^ "publishNotReadyAddresses" - publishNotReadyAddresses, when set to true, indicates that DNS implementations must publish the notReadyAddresses of subsets for the Endpoints associated with the Service. The default value is false. The primary use case for setting this field is to use a StatefulSet&#39;s Headless Service to propagate SRV records for its Pods without respect to their readiness for purpose of peer discovery.
  , 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/
  , 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
  , v1ServiceSpecSessionAffinityConfig :: !(Maybe V1SessionAffinityConfig) -- ^ "sessionAffinityConfig"
  , v1ServiceSpecType :: !(Maybe Text) -- ^ "type" - type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. \&quot;ExternalName\&quot; maps to the specified externalName. \&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. If clusterIP is \&quot;None\&quot;, no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a stable IP. \&quot;NodePort\&quot; builds on ClusterIP and allocates a port on every node which routes to the clusterIP. \&quot;LoadBalancer\&quot; builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the clusterIP. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ServiceSpec
instance A.FromJSON V1ServiceSpec where
  parseJSON = A.withObject "V1ServiceSpec" $ \o ->
    V1ServiceSpec
      <$> (o .:? "clusterIP")
      <*> (o .:? "externalIPs")
      <*> (o .:? "externalName")
      <*> (o .:? "externalTrafficPolicy")
      <*> (o .:? "healthCheckNodePort")
      <*> (o .:? "loadBalancerIP")
      <*> (o .:? "loadBalancerSourceRanges")
      <*> (o .:? "ports")
      <*> (o .:? "publishNotReadyAddresses")
      <*> (o .:? "selector")
      <*> (o .:? "sessionAffinity")
      <*> (o .:? "sessionAffinityConfig")
      <*> (o .:? "type")

-- | ToJSON V1ServiceSpec
instance A.ToJSON V1ServiceSpec where
  toJSON V1ServiceSpec {..} =
   _omitNulls
      [ "clusterIP" .= v1ServiceSpecClusterIp
      , "externalIPs" .= v1ServiceSpecExternalIPs
      , "externalName" .= v1ServiceSpecExternalName
      , "externalTrafficPolicy" .= v1ServiceSpecExternalTrafficPolicy
      , "healthCheckNodePort" .= v1ServiceSpecHealthCheckNodePort
      , "loadBalancerIP" .= v1ServiceSpecLoadBalancerIp
      , "loadBalancerSourceRanges" .= v1ServiceSpecLoadBalancerSourceRanges
      , "ports" .= v1ServiceSpecPorts
      , "publishNotReadyAddresses" .= v1ServiceSpecPublishNotReadyAddresses
      , "selector" .= v1ServiceSpecSelector
      , "sessionAffinity" .= v1ServiceSpecSessionAffinity
      , "sessionAffinityConfig" .= v1ServiceSpecSessionAffinityConfig
      , "type" .= v1ServiceSpecType
      ]


-- | Construct a value of type 'V1ServiceSpec' (by applying it's required fields, if any)
mkV1ServiceSpec
  :: V1ServiceSpec
mkV1ServiceSpec =
  V1ServiceSpec
  { v1ServiceSpecClusterIp = Nothing
  , v1ServiceSpecExternalIPs = Nothing
  , v1ServiceSpecExternalName = Nothing
  , v1ServiceSpecExternalTrafficPolicy = Nothing
  , v1ServiceSpecHealthCheckNodePort = Nothing
  , v1ServiceSpecLoadBalancerIp = Nothing
  , v1ServiceSpecLoadBalancerSourceRanges = Nothing
  , v1ServiceSpecPorts = Nothing
  , v1ServiceSpecPublishNotReadyAddresses = Nothing
  , v1ServiceSpecSelector = Nothing
  , v1ServiceSpecSessionAffinity = Nothing
  , v1ServiceSpecSessionAffinityConfig = Nothing
  , v1ServiceSpecType = Nothing
  }

-- ** V1ServiceStatus
-- | V1ServiceStatus
-- ServiceStatus represents the current status of a service.
data V1ServiceStatus = V1ServiceStatus
  { v1ServiceStatusLoadBalancer :: !(Maybe V1LoadBalancerStatus) -- ^ "loadBalancer"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1ServiceStatus
instance A.FromJSON V1ServiceStatus where
  parseJSON = A.withObject "V1ServiceStatus" $ \o ->
    V1ServiceStatus
      <$> (o .:? "loadBalancer")

-- | ToJSON V1ServiceStatus
instance A.ToJSON V1ServiceStatus where
  toJSON V1ServiceStatus {..} =
   _omitNulls
      [ "loadBalancer" .= v1ServiceStatusLoadBalancer
      ]


-- | Construct a value of type 'V1ServiceStatus' (by applying it's required fields, if any)
mkV1ServiceStatus
  :: V1ServiceStatus
mkV1ServiceStatus =
  V1ServiceStatus
  { v1ServiceStatusLoadBalancer = Nothing
  }

-- ** V1SessionAffinityConfig
-- | V1SessionAffinityConfig
-- SessionAffinityConfig represents the configurations of session affinity.
data V1SessionAffinityConfig = V1SessionAffinityConfig
  { v1SessionAffinityConfigClientIp :: !(Maybe V1ClientIPConfig) -- ^ "clientIP"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1SessionAffinityConfig
instance A.FromJSON V1SessionAffinityConfig where
  parseJSON = A.withObject "V1SessionAffinityConfig" $ \o ->
    V1SessionAffinityConfig
      <$> (o .:? "clientIP")

-- | ToJSON V1SessionAffinityConfig
instance A.ToJSON V1SessionAffinityConfig where
  toJSON V1SessionAffinityConfig {..} =
   _omitNulls
      [ "clientIP" .= v1SessionAffinityConfigClientIp
      ]


-- | Construct a value of type 'V1SessionAffinityConfig' (by applying it's required fields, if any)
mkV1SessionAffinityConfig
  :: V1SessionAffinityConfig
mkV1SessionAffinityConfig =
  V1SessionAffinityConfig
  { v1SessionAffinityConfigClientIp = Nothing
  }

-- ** 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
  { 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1StatefulSetMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1StatefulSetSpec :: !(Maybe V1StatefulSetSpec) -- ^ "spec"
  , v1StatefulSetStatus :: !(Maybe V1StatefulSetStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1StatefulSet
instance A.FromJSON V1StatefulSet where
  parseJSON = A.withObject "V1StatefulSet" $ \o ->
    V1StatefulSet
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON V1StatefulSet
instance A.ToJSON V1StatefulSet where
  toJSON V1StatefulSet {..} =
   _omitNulls
      [ "apiVersion" .= v1StatefulSetApiVersion
      , "kind" .= v1StatefulSetKind
      , "metadata" .= v1StatefulSetMetadata
      , "spec" .= v1StatefulSetSpec
      , "status" .= v1StatefulSetStatus
      ]


-- | Construct a value of type 'V1StatefulSet' (by applying it's required fields, if any)
mkV1StatefulSet
  :: V1StatefulSet
mkV1StatefulSet =
  V1StatefulSet
  { v1StatefulSetApiVersion = Nothing
  , v1StatefulSetKind = Nothing
  , v1StatefulSetMetadata = Nothing
  , v1StatefulSetSpec = Nothing
  , v1StatefulSetStatus = Nothing
  }

-- ** V1StatefulSetCondition
-- | V1StatefulSetCondition
-- StatefulSetCondition describes the state of a statefulset at a certain point.
data V1StatefulSetCondition = V1StatefulSetCondition
  { v1StatefulSetConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - Last time the condition transitioned from one status to another.
  , v1StatefulSetConditionMessage :: !(Maybe Text) -- ^ "message" - A human readable message indicating details about the transition.
  , v1StatefulSetConditionReason :: !(Maybe Text) -- ^ "reason" - The reason for the condition&#39;s last transition.
  , v1StatefulSetConditionStatus :: !(Text) -- ^ /Required/ "status" - Status of the condition, one of True, False, Unknown.
  , v1StatefulSetConditionType :: !(Text) -- ^ /Required/ "type" - Type of statefulset condition.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1StatefulSetCondition
instance A.FromJSON V1StatefulSetCondition where
  parseJSON = A.withObject "V1StatefulSetCondition" $ \o ->
    V1StatefulSetCondition
      <$> (o .:? "lastTransitionTime")
      <*> (o .:? "message")
      <*> (o .:? "reason")
      <*> (o .:  "status")
      <*> (o .:  "type")

-- | ToJSON V1StatefulSetCondition
instance A.ToJSON V1StatefulSetCondition where
  toJSON V1StatefulSetCondition {..} =
   _omitNulls
      [ "lastTransitionTime" .= v1StatefulSetConditionLastTransitionTime
      , "message" .= v1StatefulSetConditionMessage
      , "reason" .= v1StatefulSetConditionReason
      , "status" .= v1StatefulSetConditionStatus
      , "type" .= 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 v1StatefulSetConditionStatus v1StatefulSetConditionType =
  V1StatefulSetCondition
  { v1StatefulSetConditionLastTransitionTime = Nothing
  , v1StatefulSetConditionMessage = Nothing
  , v1StatefulSetConditionReason = Nothing
  , v1StatefulSetConditionStatus
  , v1StatefulSetConditionType
  }

-- ** V1StatefulSetList
-- | V1StatefulSetList
-- StatefulSetList is a collection of StatefulSets.
data V1StatefulSetList = V1StatefulSetList
  { 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/api-conventions.md#resources
  , v1StatefulSetListItems :: !([V1StatefulSet]) -- ^ /Required/ "items"
  , 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/api-conventions.md#types-kinds
  , v1StatefulSetListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1StatefulSetList
instance A.FromJSON V1StatefulSetList where
  parseJSON = A.withObject "V1StatefulSetList" $ \o ->
    V1StatefulSetList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1StatefulSetList
instance A.ToJSON V1StatefulSetList where
  toJSON V1StatefulSetList {..} =
   _omitNulls
      [ "apiVersion" .= v1StatefulSetListApiVersion
      , "items" .= v1StatefulSetListItems
      , "kind" .= v1StatefulSetListKind
      , "metadata" .= v1StatefulSetListMetadata
      ]


-- | Construct a value of type 'V1StatefulSetList' (by applying it's required fields, if any)
mkV1StatefulSetList
  :: [V1StatefulSet] -- ^ 'v1StatefulSetListItems' 
  -> V1StatefulSetList
mkV1StatefulSetList v1StatefulSetListItems =
  V1StatefulSetList
  { v1StatefulSetListApiVersion = Nothing
  , v1StatefulSetListItems
  , v1StatefulSetListKind = Nothing
  , v1StatefulSetListMetadata = Nothing
  }

-- ** V1StatefulSetSpec
-- | V1StatefulSetSpec
-- A StatefulSetSpec is the specification of a StatefulSet.
data V1StatefulSetSpec = V1StatefulSetSpec
  { 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.
  , 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.
  , 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.
  , v1StatefulSetSpecSelector :: !(V1LabelSelector) -- ^ /Required/ "selector"
  , 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.
  , v1StatefulSetSpecTemplate :: !(V1PodTemplateSpec) -- ^ /Required/ "template"
  , v1StatefulSetSpecUpdateStrategy :: !(Maybe V1StatefulSetUpdateStrategy) -- ^ "updateStrategy"
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1StatefulSetSpec
instance A.FromJSON V1StatefulSetSpec where
  parseJSON = A.withObject "V1StatefulSetSpec" $ \o ->
    V1StatefulSetSpec
      <$> (o .:? "podManagementPolicy")
      <*> (o .:? "replicas")
      <*> (o .:? "revisionHistoryLimit")
      <*> (o .:  "selector")
      <*> (o .:  "serviceName")
      <*> (o .:  "template")
      <*> (o .:? "updateStrategy")
      <*> (o .:? "volumeClaimTemplates")

-- | ToJSON V1StatefulSetSpec
instance A.ToJSON V1StatefulSetSpec where
  toJSON V1StatefulSetSpec {..} =
   _omitNulls
      [ "podManagementPolicy" .= v1StatefulSetSpecPodManagementPolicy
      , "replicas" .= v1StatefulSetSpecReplicas
      , "revisionHistoryLimit" .= v1StatefulSetSpecRevisionHistoryLimit
      , "selector" .= v1StatefulSetSpecSelector
      , "serviceName" .= v1StatefulSetSpecServiceName
      , "template" .= v1StatefulSetSpecTemplate
      , "updateStrategy" .= v1StatefulSetSpecUpdateStrategy
      , "volumeClaimTemplates" .= 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 v1StatefulSetSpecSelector v1StatefulSetSpecServiceName v1StatefulSetSpecTemplate =
  V1StatefulSetSpec
  { v1StatefulSetSpecPodManagementPolicy = Nothing
  , v1StatefulSetSpecReplicas = Nothing
  , v1StatefulSetSpecRevisionHistoryLimit = Nothing
  , v1StatefulSetSpecSelector
  , v1StatefulSetSpecServiceName
  , v1StatefulSetSpecTemplate
  , v1StatefulSetSpecUpdateStrategy = Nothing
  , v1StatefulSetSpecVolumeClaimTemplates = Nothing
  }

-- ** V1StatefulSetStatus
-- | V1StatefulSetStatus
-- StatefulSetStatus represents the current state of a StatefulSet.
data V1StatefulSetStatus = V1StatefulSetStatus
  { 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.
  , v1StatefulSetStatusConditions :: !(Maybe [V1StatefulSetCondition]) -- ^ "conditions" - Represents the latest available observations of a statefulset&#39;s current state.
  , v1StatefulSetStatusCurrentReplicas :: !(Maybe Int) -- ^ "currentReplicas" - currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision.
  , v1StatefulSetStatusCurrentRevision :: !(Maybe Text) -- ^ "currentRevision" - currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas).
  , 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.
  , v1StatefulSetStatusReadyReplicas :: !(Maybe Int) -- ^ "readyReplicas" - readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.
  , v1StatefulSetStatusReplicas :: !(Int) -- ^ /Required/ "replicas" - replicas is the number of Pods created by the StatefulSet controller.
  , v1StatefulSetStatusUpdateRevision :: !(Maybe Text) -- ^ "updateRevision" - updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)
  , v1StatefulSetStatusUpdatedReplicas :: !(Maybe Int) -- ^ "updatedReplicas" - updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1StatefulSetStatus
instance A.FromJSON V1StatefulSetStatus where
  parseJSON = A.withObject "V1StatefulSetStatus" $ \o ->
    V1StatefulSetStatus
      <$> (o .:? "collisionCount")
      <*> (o .:? "conditions")
      <*> (o .:? "currentReplicas")
      <*> (o .:? "currentRevision")
      <*> (o .:? "observedGeneration")
      <*> (o .:? "readyReplicas")
      <*> (o .:  "replicas")
      <*> (o .:? "updateRevision")
      <*> (o .:? "updatedReplicas")

-- | ToJSON V1StatefulSetStatus
instance A.ToJSON V1StatefulSetStatus where
  toJSON V1StatefulSetStatus {..} =
   _omitNulls
      [ "collisionCount" .= v1StatefulSetStatusCollisionCount
      , "conditions" .= v1StatefulSetStatusConditions
      , "currentReplicas" .= v1StatefulSetStatusCurrentReplicas
      , "currentRevision" .= v1StatefulSetStatusCurrentRevision
      , "observedGeneration" .= v1StatefulSetStatusObservedGeneration
      , "readyReplicas" .= v1StatefulSetStatusReadyReplicas
      , "replicas" .= v1StatefulSetStatusReplicas
      , "updateRevision" .= v1StatefulSetStatusUpdateRevision
      , "updatedReplicas" .= 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 v1StatefulSetStatusReplicas =
  V1StatefulSetStatus
  { v1StatefulSetStatusCollisionCount = Nothing
  , v1StatefulSetStatusConditions = Nothing
  , v1StatefulSetStatusCurrentReplicas = Nothing
  , v1StatefulSetStatusCurrentRevision = Nothing
  , v1StatefulSetStatusObservedGeneration = Nothing
  , v1StatefulSetStatusReadyReplicas = Nothing
  , v1StatefulSetStatusReplicas
  , v1StatefulSetStatusUpdateRevision = Nothing
  , v1StatefulSetStatusUpdatedReplicas = 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
  { v1StatefulSetUpdateStrategyRollingUpdate :: !(Maybe V1RollingUpdateStatefulSetStrategy) -- ^ "rollingUpdate"
  , v1StatefulSetUpdateStrategyType :: !(Maybe Text) -- ^ "type" - Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1StatefulSetUpdateStrategy
instance A.FromJSON V1StatefulSetUpdateStrategy where
  parseJSON = A.withObject "V1StatefulSetUpdateStrategy" $ \o ->
    V1StatefulSetUpdateStrategy
      <$> (o .:? "rollingUpdate")
      <*> (o .:? "type")

-- | ToJSON V1StatefulSetUpdateStrategy
instance A.ToJSON V1StatefulSetUpdateStrategy where
  toJSON V1StatefulSetUpdateStrategy {..} =
   _omitNulls
      [ "rollingUpdate" .= v1StatefulSetUpdateStrategyRollingUpdate
      , "type" .= v1StatefulSetUpdateStrategyType
      ]


-- | Construct a value of type 'V1StatefulSetUpdateStrategy' (by applying it's required fields, if any)
mkV1StatefulSetUpdateStrategy
  :: V1StatefulSetUpdateStrategy
mkV1StatefulSetUpdateStrategy =
  V1StatefulSetUpdateStrategy
  { v1StatefulSetUpdateStrategyRollingUpdate = Nothing
  , v1StatefulSetUpdateStrategyType = Nothing
  }

-- ** V1Status
-- | V1Status
-- Status is a return value for calls that don't return other objects.
data V1Status = V1Status
  { 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/api-conventions.md#resources
  , v1StatusCode :: !(Maybe Int) -- ^ "code" - Suggested HTTP return code for this status, 0 if not set.
  , v1StatusDetails :: !(Maybe V1StatusDetails) -- ^ "details"
  , 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/api-conventions.md#types-kinds
  , v1StatusMessage :: !(Maybe Text) -- ^ "message" - A human-readable description of the status of this operation.
  , v1StatusMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  , 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.
  , 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/api-conventions.md#spec-and-status
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1Status
instance A.FromJSON V1Status where
  parseJSON = A.withObject "V1Status" $ \o ->
    V1Status
      <$> (o .:? "apiVersion")
      <*> (o .:? "code")
      <*> (o .:? "details")
      <*> (o .:? "kind")
      <*> (o .:? "message")
      <*> (o .:? "metadata")
      <*> (o .:? "reason")
      <*> (o .:? "status")

-- | ToJSON V1Status
instance A.ToJSON V1Status where
  toJSON V1Status {..} =
   _omitNulls
      [ "apiVersion" .= v1StatusApiVersion
      , "code" .= v1StatusCode
      , "details" .= v1StatusDetails
      , "kind" .= v1StatusKind
      , "message" .= v1StatusMessage
      , "metadata" .= v1StatusMetadata
      , "reason" .= v1StatusReason
      , "status" .= v1StatusStatus
      ]


-- | Construct a value of type 'V1Status' (by applying it's required fields, if any)
mkV1Status
  :: V1Status
mkV1Status =
  V1Status
  { v1StatusApiVersion = Nothing
  , v1StatusCode = Nothing
  , v1StatusDetails = Nothing
  , v1StatusKind = Nothing
  , v1StatusMessage = Nothing
  , v1StatusMetadata = Nothing
  , v1StatusReason = Nothing
  , v1StatusStatus = Nothing
  }

-- ** V1StatusCause
-- | V1StatusCause
-- StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.
data V1StatusCause = V1StatusCause
  { 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;
  , v1StatusCauseMessage :: !(Maybe Text) -- ^ "message" - A human-readable description of the cause of the error.  This field may be presented as-is to a reader.
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1StatusCause
instance A.FromJSON V1StatusCause where
  parseJSON = A.withObject "V1StatusCause" $ \o ->
    V1StatusCause
      <$> (o .:? "field")
      <*> (o .:? "message")
      <*> (o .:? "reason")

-- | ToJSON V1StatusCause
instance A.ToJSON V1StatusCause where
  toJSON V1StatusCause {..} =
   _omitNulls
      [ "field" .= v1StatusCauseField
      , "message" .= v1StatusCauseMessage
      , "reason" .= v1StatusCauseReason
      ]


-- | Construct a value of type 'V1StatusCause' (by applying it's required fields, if any)
mkV1StatusCause
  :: V1StatusCause
mkV1StatusCause =
  V1StatusCause
  { v1StatusCauseField = Nothing
  , v1StatusCauseMessage = Nothing
  , v1StatusCauseReason = 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
  { v1StatusDetailsCauses :: !(Maybe [V1StatusCause]) -- ^ "causes" - The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.
  , v1StatusDetailsGroup :: !(Maybe Text) -- ^ "group" - The group attribute of the resource associated with the status StatusReason.
  , 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/api-conventions.md#types-kinds
  , 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).
  , 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.
  , v1StatusDetailsUid :: !(Maybe Text) -- ^ "uid" - UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1StatusDetails
instance A.FromJSON V1StatusDetails where
  parseJSON = A.withObject "V1StatusDetails" $ \o ->
    V1StatusDetails
      <$> (o .:? "causes")
      <*> (o .:? "group")
      <*> (o .:? "kind")
      <*> (o .:? "name")
      <*> (o .:? "retryAfterSeconds")
      <*> (o .:? "uid")

-- | ToJSON V1StatusDetails
instance A.ToJSON V1StatusDetails where
  toJSON V1StatusDetails {..} =
   _omitNulls
      [ "causes" .= v1StatusDetailsCauses
      , "group" .= v1StatusDetailsGroup
      , "kind" .= v1StatusDetailsKind
      , "name" .= v1StatusDetailsName
      , "retryAfterSeconds" .= v1StatusDetailsRetryAfterSeconds
      , "uid" .= v1StatusDetailsUid
      ]


-- | Construct a value of type 'V1StatusDetails' (by applying it's required fields, if any)
mkV1StatusDetails
  :: V1StatusDetails
mkV1StatusDetails =
  V1StatusDetails
  { v1StatusDetailsCauses = Nothing
  , v1StatusDetailsGroup = Nothing
  , v1StatusDetailsKind = Nothing
  , v1StatusDetailsName = Nothing
  , v1StatusDetailsRetryAfterSeconds = Nothing
  , v1StatusDetailsUid = 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
  { v1StorageClassAllowVolumeExpansion :: !(Maybe Bool) -- ^ "allowVolumeExpansion" - AllowVolumeExpansion shows whether the storage class allow volume expand
  , v1StorageClassAllowedTopologies :: !(Maybe [V1TopologySelectorTerm]) -- ^ "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.
  , 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1StorageClassMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1StorageClassMountOptions :: !(Maybe [Text]) -- ^ "mountOptions" - Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. [\&quot;ro\&quot;, \&quot;soft\&quot;]. Not validated - mount of the PVs will simply fail if one is invalid.
  , v1StorageClassParameters :: !(Maybe (Map.Map String Text)) -- ^ "parameters" - Parameters holds the parameters for the provisioner that should create volumes of this storage class.
  , v1StorageClassProvisioner :: !(Text) -- ^ /Required/ "provisioner" - Provisioner indicates the type of the provisioner.
  , v1StorageClassReclaimPolicy :: !(Maybe Text) -- ^ "reclaimPolicy" - Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1StorageClass
instance A.FromJSON V1StorageClass where
  parseJSON = A.withObject "V1StorageClass" $ \o ->
    V1StorageClass
      <$> (o .:? "allowVolumeExpansion")
      <*> (o .:? "allowedTopologies")
      <*> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "mountOptions")
      <*> (o .:? "parameters")
      <*> (o .:  "provisioner")
      <*> (o .:? "reclaimPolicy")
      <*> (o .:? "volumeBindingMode")

-- | ToJSON V1StorageClass
instance A.ToJSON V1StorageClass where
  toJSON V1StorageClass {..} =
   _omitNulls
      [ "allowVolumeExpansion" .= v1StorageClassAllowVolumeExpansion
      , "allowedTopologies" .= v1StorageClassAllowedTopologies
      , "apiVersion" .= v1StorageClassApiVersion
      , "kind" .= v1StorageClassKind
      , "metadata" .= v1StorageClassMetadata
      , "mountOptions" .= v1StorageClassMountOptions
      , "parameters" .= v1StorageClassParameters
      , "provisioner" .= v1StorageClassProvisioner
      , "reclaimPolicy" .= v1StorageClassReclaimPolicy
      , "volumeBindingMode" .= 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 v1StorageClassProvisioner =
  V1StorageClass
  { v1StorageClassAllowVolumeExpansion = Nothing
  , v1StorageClassAllowedTopologies = Nothing
  , v1StorageClassApiVersion = Nothing
  , v1StorageClassKind = Nothing
  , v1StorageClassMetadata = Nothing
  , v1StorageClassMountOptions = Nothing
  , v1StorageClassParameters = Nothing
  , v1StorageClassProvisioner
  , v1StorageClassReclaimPolicy = Nothing
  , v1StorageClassVolumeBindingMode = Nothing
  }

-- ** V1StorageClassList
-- | V1StorageClassList
-- StorageClassList is a collection of storage classes.
data V1StorageClassList = V1StorageClassList
  { 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/api-conventions.md#resources
  , v1StorageClassListItems :: !([V1StorageClass]) -- ^ /Required/ "items" - Items is the list of StorageClasses
  , 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/api-conventions.md#types-kinds
  , v1StorageClassListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1StorageClassList
instance A.FromJSON V1StorageClassList where
  parseJSON = A.withObject "V1StorageClassList" $ \o ->
    V1StorageClassList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1StorageClassList
instance A.ToJSON V1StorageClassList where
  toJSON V1StorageClassList {..} =
   _omitNulls
      [ "apiVersion" .= v1StorageClassListApiVersion
      , "items" .= v1StorageClassListItems
      , "kind" .= v1StorageClassListKind
      , "metadata" .= 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 v1StorageClassListItems =
  V1StorageClassList
  { v1StorageClassListApiVersion = Nothing
  , v1StorageClassListItems
  , v1StorageClassListKind = Nothing
  , v1StorageClassListMetadata = Nothing
  }

-- ** V1StorageOSPersistentVolumeSource
-- | V1StorageOSPersistentVolumeSource
-- Represents a StorageOS persistent volume resource.
data V1StorageOSPersistentVolumeSource = V1StorageOSPersistentVolumeSource
  { v1StorageOSPersistentVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - 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.
  , v1StorageOSPersistentVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
  , v1StorageOSPersistentVolumeSourceSecretRef :: !(Maybe V1ObjectReference) -- ^ "secretRef"
  , v1StorageOSPersistentVolumeSourceVolumeName :: !(Maybe Text) -- ^ "volumeName" - VolumeName is the human-readable name of the StorageOS volume.  Volume names are only unique within a namespace.
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1StorageOSPersistentVolumeSource
instance A.FromJSON V1StorageOSPersistentVolumeSource where
  parseJSON = A.withObject "V1StorageOSPersistentVolumeSource" $ \o ->
    V1StorageOSPersistentVolumeSource
      <$> (o .:? "fsType")
      <*> (o .:? "readOnly")
      <*> (o .:? "secretRef")
      <*> (o .:? "volumeName")
      <*> (o .:? "volumeNamespace")

-- | ToJSON V1StorageOSPersistentVolumeSource
instance A.ToJSON V1StorageOSPersistentVolumeSource where
  toJSON V1StorageOSPersistentVolumeSource {..} =
   _omitNulls
      [ "fsType" .= v1StorageOSPersistentVolumeSourceFsType
      , "readOnly" .= v1StorageOSPersistentVolumeSourceReadOnly
      , "secretRef" .= v1StorageOSPersistentVolumeSourceSecretRef
      , "volumeName" .= v1StorageOSPersistentVolumeSourceVolumeName
      , "volumeNamespace" .= v1StorageOSPersistentVolumeSourceVolumeNamespace
      ]


-- | Construct a value of type 'V1StorageOSPersistentVolumeSource' (by applying it's required fields, if any)
mkV1StorageOSPersistentVolumeSource
  :: V1StorageOSPersistentVolumeSource
mkV1StorageOSPersistentVolumeSource =
  V1StorageOSPersistentVolumeSource
  { v1StorageOSPersistentVolumeSourceFsType = Nothing
  , v1StorageOSPersistentVolumeSourceReadOnly = Nothing
  , v1StorageOSPersistentVolumeSourceSecretRef = Nothing
  , v1StorageOSPersistentVolumeSourceVolumeName = Nothing
  , v1StorageOSPersistentVolumeSourceVolumeNamespace = Nothing
  }

-- ** V1StorageOSVolumeSource
-- | V1StorageOSVolumeSource
-- Represents a StorageOS persistent volume resource.
data V1StorageOSVolumeSource = V1StorageOSVolumeSource
  { v1StorageOSVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - 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.
  , v1StorageOSVolumeSourceReadOnly :: !(Maybe Bool) -- ^ "readOnly" - Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
  , v1StorageOSVolumeSourceSecretRef :: !(Maybe V1LocalObjectReference) -- ^ "secretRef"
  , v1StorageOSVolumeSourceVolumeName :: !(Maybe Text) -- ^ "volumeName" - VolumeName is the human-readable name of the StorageOS volume.  Volume names are only unique within a namespace.
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1StorageOSVolumeSource
instance A.FromJSON V1StorageOSVolumeSource where
  parseJSON = A.withObject "V1StorageOSVolumeSource" $ \o ->
    V1StorageOSVolumeSource
      <$> (o .:? "fsType")
      <*> (o .:? "readOnly")
      <*> (o .:? "secretRef")
      <*> (o .:? "volumeName")
      <*> (o .:? "volumeNamespace")

-- | ToJSON V1StorageOSVolumeSource
instance A.ToJSON V1StorageOSVolumeSource where
  toJSON V1StorageOSVolumeSource {..} =
   _omitNulls
      [ "fsType" .= v1StorageOSVolumeSourceFsType
      , "readOnly" .= v1StorageOSVolumeSourceReadOnly
      , "secretRef" .= v1StorageOSVolumeSourceSecretRef
      , "volumeName" .= v1StorageOSVolumeSourceVolumeName
      , "volumeNamespace" .= v1StorageOSVolumeSourceVolumeNamespace
      ]


-- | Construct a value of type 'V1StorageOSVolumeSource' (by applying it's required fields, if any)
mkV1StorageOSVolumeSource
  :: V1StorageOSVolumeSource
mkV1StorageOSVolumeSource =
  V1StorageOSVolumeSource
  { v1StorageOSVolumeSourceFsType = Nothing
  , v1StorageOSVolumeSourceReadOnly = Nothing
  , v1StorageOSVolumeSourceSecretRef = Nothing
  , v1StorageOSVolumeSourceVolumeName = Nothing
  , v1StorageOSVolumeSourceVolumeNamespace = Nothing
  }

-- ** V1Subject
-- | V1Subject
-- 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 V1Subject = V1Subject
  { v1SubjectApiGroup :: !(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.
  , v1SubjectKind :: !(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.
  , v1SubjectName :: !(Text) -- ^ /Required/ "name" - Name of the object being referenced.
  , v1SubjectNamespace :: !(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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1Subject
instance A.FromJSON V1Subject where
  parseJSON = A.withObject "V1Subject" $ \o ->
    V1Subject
      <$> (o .:? "apiGroup")
      <*> (o .:  "kind")
      <*> (o .:  "name")
      <*> (o .:? "namespace")

-- | ToJSON V1Subject
instance A.ToJSON V1Subject where
  toJSON V1Subject {..} =
   _omitNulls
      [ "apiGroup" .= v1SubjectApiGroup
      , "kind" .= v1SubjectKind
      , "name" .= v1SubjectName
      , "namespace" .= v1SubjectNamespace
      ]


-- | Construct a value of type 'V1Subject' (by applying it's required fields, if any)
mkV1Subject
  :: Text -- ^ 'v1SubjectKind': 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 -- ^ 'v1SubjectName': Name of the object being referenced.
  -> V1Subject
mkV1Subject v1SubjectKind v1SubjectName =
  V1Subject
  { v1SubjectApiGroup = Nothing
  , v1SubjectKind
  , v1SubjectName
  , v1SubjectNamespace = Nothing
  }

-- ** V1SubjectAccessReview
-- | V1SubjectAccessReview
-- SubjectAccessReview checks whether or not a user or group can perform an action.
data V1SubjectAccessReview = V1SubjectAccessReview
  { 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1SubjectAccessReviewMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1SubjectAccessReviewSpec :: !(V1SubjectAccessReviewSpec) -- ^ /Required/ "spec"
  , v1SubjectAccessReviewStatus :: !(Maybe V1SubjectAccessReviewStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1SubjectAccessReview
instance A.FromJSON V1SubjectAccessReview where
  parseJSON = A.withObject "V1SubjectAccessReview" $ \o ->
    V1SubjectAccessReview
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:  "spec")
      <*> (o .:? "status")

-- | ToJSON V1SubjectAccessReview
instance A.ToJSON V1SubjectAccessReview where
  toJSON V1SubjectAccessReview {..} =
   _omitNulls
      [ "apiVersion" .= v1SubjectAccessReviewApiVersion
      , "kind" .= v1SubjectAccessReviewKind
      , "metadata" .= v1SubjectAccessReviewMetadata
      , "spec" .= v1SubjectAccessReviewSpec
      , "status" .= v1SubjectAccessReviewStatus
      ]


-- | Construct a value of type 'V1SubjectAccessReview' (by applying it's required fields, if any)
mkV1SubjectAccessReview
  :: V1SubjectAccessReviewSpec -- ^ 'v1SubjectAccessReviewSpec' 
  -> V1SubjectAccessReview
mkV1SubjectAccessReview v1SubjectAccessReviewSpec =
  V1SubjectAccessReview
  { v1SubjectAccessReviewApiVersion = Nothing
  , v1SubjectAccessReviewKind = Nothing
  , v1SubjectAccessReviewMetadata = Nothing
  , v1SubjectAccessReviewSpec
  , v1SubjectAccessReviewStatus = Nothing
  }

-- ** V1SubjectAccessReviewSpec
-- | V1SubjectAccessReviewSpec
-- SubjectAccessReviewSpec is a description of the access request.  Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set
data V1SubjectAccessReviewSpec = V1SubjectAccessReviewSpec
  { 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.
  , v1SubjectAccessReviewSpecGroups :: !(Maybe [Text]) -- ^ "groups" - Groups is the groups you&#39;re testing for.
  , v1SubjectAccessReviewSpecNonResourceAttributes :: !(Maybe V1NonResourceAttributes) -- ^ "nonResourceAttributes"
  , v1SubjectAccessReviewSpecResourceAttributes :: !(Maybe V1ResourceAttributes) -- ^ "resourceAttributes"
  , v1SubjectAccessReviewSpecUid :: !(Maybe Text) -- ^ "uid" - UID information about the requesting user.
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1SubjectAccessReviewSpec
instance A.FromJSON V1SubjectAccessReviewSpec where
  parseJSON = A.withObject "V1SubjectAccessReviewSpec" $ \o ->
    V1SubjectAccessReviewSpec
      <$> (o .:? "extra")
      <*> (o .:? "groups")
      <*> (o .:? "nonResourceAttributes")
      <*> (o .:? "resourceAttributes")
      <*> (o .:? "uid")
      <*> (o .:? "user")

-- | ToJSON V1SubjectAccessReviewSpec
instance A.ToJSON V1SubjectAccessReviewSpec where
  toJSON V1SubjectAccessReviewSpec {..} =
   _omitNulls
      [ "extra" .= v1SubjectAccessReviewSpecExtra
      , "groups" .= v1SubjectAccessReviewSpecGroups
      , "nonResourceAttributes" .= v1SubjectAccessReviewSpecNonResourceAttributes
      , "resourceAttributes" .= v1SubjectAccessReviewSpecResourceAttributes
      , "uid" .= v1SubjectAccessReviewSpecUid
      , "user" .= v1SubjectAccessReviewSpecUser
      ]


-- | Construct a value of type 'V1SubjectAccessReviewSpec' (by applying it's required fields, if any)
mkV1SubjectAccessReviewSpec
  :: V1SubjectAccessReviewSpec
mkV1SubjectAccessReviewSpec =
  V1SubjectAccessReviewSpec
  { v1SubjectAccessReviewSpecExtra = Nothing
  , v1SubjectAccessReviewSpecGroups = Nothing
  , v1SubjectAccessReviewSpecNonResourceAttributes = Nothing
  , v1SubjectAccessReviewSpecResourceAttributes = Nothing
  , v1SubjectAccessReviewSpecUid = Nothing
  , v1SubjectAccessReviewSpecUser = Nothing
  }

-- ** V1SubjectAccessReviewStatus
-- | V1SubjectAccessReviewStatus
-- SubjectAccessReviewStatus
data V1SubjectAccessReviewStatus = V1SubjectAccessReviewStatus
  { v1SubjectAccessReviewStatusAllowed :: !(Bool) -- ^ /Required/ "allowed" - Allowed is required. True if the action would be allowed, false otherwise.
  , 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.
  , 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.
  , v1SubjectAccessReviewStatusReason :: !(Maybe Text) -- ^ "reason" - Reason is optional.  It indicates why a request was allowed or denied.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1SubjectAccessReviewStatus
instance A.FromJSON V1SubjectAccessReviewStatus where
  parseJSON = A.withObject "V1SubjectAccessReviewStatus" $ \o ->
    V1SubjectAccessReviewStatus
      <$> (o .:  "allowed")
      <*> (o .:? "denied")
      <*> (o .:? "evaluationError")
      <*> (o .:? "reason")

-- | ToJSON V1SubjectAccessReviewStatus
instance A.ToJSON V1SubjectAccessReviewStatus where
  toJSON V1SubjectAccessReviewStatus {..} =
   _omitNulls
      [ "allowed" .= v1SubjectAccessReviewStatusAllowed
      , "denied" .= v1SubjectAccessReviewStatusDenied
      , "evaluationError" .= v1SubjectAccessReviewStatusEvaluationError
      , "reason" .= 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 v1SubjectAccessReviewStatusAllowed =
  V1SubjectAccessReviewStatus
  { v1SubjectAccessReviewStatusAllowed
  , v1SubjectAccessReviewStatusDenied = Nothing
  , v1SubjectAccessReviewStatusEvaluationError = Nothing
  , v1SubjectAccessReviewStatusReason = 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
  { 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.
  , 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.
  , 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.
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1SubjectRulesReviewStatus
instance A.FromJSON V1SubjectRulesReviewStatus where
  parseJSON = A.withObject "V1SubjectRulesReviewStatus" $ \o ->
    V1SubjectRulesReviewStatus
      <$> (o .:? "evaluationError")
      <*> (o .:  "incomplete")
      <*> (o .:  "nonResourceRules")
      <*> (o .:  "resourceRules")

-- | ToJSON V1SubjectRulesReviewStatus
instance A.ToJSON V1SubjectRulesReviewStatus where
  toJSON V1SubjectRulesReviewStatus {..} =
   _omitNulls
      [ "evaluationError" .= v1SubjectRulesReviewStatusEvaluationError
      , "incomplete" .= v1SubjectRulesReviewStatusIncomplete
      , "nonResourceRules" .= v1SubjectRulesReviewStatusNonResourceRules
      , "resourceRules" .= 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 v1SubjectRulesReviewStatusIncomplete v1SubjectRulesReviewStatusNonResourceRules v1SubjectRulesReviewStatusResourceRules =
  V1SubjectRulesReviewStatus
  { v1SubjectRulesReviewStatusEvaluationError = Nothing
  , v1SubjectRulesReviewStatusIncomplete
  , v1SubjectRulesReviewStatusNonResourceRules
  , v1SubjectRulesReviewStatusResourceRules
  }

-- ** V1Sysctl
-- | V1Sysctl
-- Sysctl defines a kernel parameter to be set
data V1Sysctl = V1Sysctl
  { v1SysctlName :: !(Text) -- ^ /Required/ "name" - Name of a property to set
  , v1SysctlValue :: !(Text) -- ^ /Required/ "value" - Value of a property to set
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1Sysctl
instance A.FromJSON V1Sysctl where
  parseJSON = A.withObject "V1Sysctl" $ \o ->
    V1Sysctl
      <$> (o .:  "name")
      <*> (o .:  "value")

-- | ToJSON V1Sysctl
instance A.ToJSON V1Sysctl where
  toJSON V1Sysctl {..} =
   _omitNulls
      [ "name" .= v1SysctlName
      , "value" .= 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 v1SysctlName v1SysctlValue =
  V1Sysctl
  { v1SysctlName
  , v1SysctlValue
  }

-- ** V1TCPSocketAction
-- | V1TCPSocketAction
-- TCPSocketAction describes an action based on opening a socket
data V1TCPSocketAction = V1TCPSocketAction
  { v1TCPSocketActionHost :: !(Maybe Text) -- ^ "host" - Optional: Host name to connect to, defaults to the pod IP.
  , v1TCPSocketActionPort :: !(IntOrString) -- ^ /Required/ "port"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1TCPSocketAction
instance A.FromJSON V1TCPSocketAction where
  parseJSON = A.withObject "V1TCPSocketAction" $ \o ->
    V1TCPSocketAction
      <$> (o .:? "host")
      <*> (o .:  "port")

-- | ToJSON V1TCPSocketAction
instance A.ToJSON V1TCPSocketAction where
  toJSON V1TCPSocketAction {..} =
   _omitNulls
      [ "host" .= v1TCPSocketActionHost
      , "port" .= v1TCPSocketActionPort
      ]


-- | Construct a value of type 'V1TCPSocketAction' (by applying it's required fields, if any)
mkV1TCPSocketAction
  :: IntOrString -- ^ 'v1TCPSocketActionPort' 
  -> V1TCPSocketAction
mkV1TCPSocketAction v1TCPSocketActionPort =
  V1TCPSocketAction
  { v1TCPSocketActionHost = Nothing
  , 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
  { 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.
  , v1TaintKey :: !(Text) -- ^ /Required/ "key" - Required. The taint key to be applied to a node.
  , v1TaintTimeAdded :: !(Maybe DateTime) -- ^ "timeAdded" - TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints.
  , v1TaintValue :: !(Maybe Text) -- ^ "value" - Required. The taint value corresponding to the taint key.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1Taint
instance A.FromJSON V1Taint where
  parseJSON = A.withObject "V1Taint" $ \o ->
    V1Taint
      <$> (o .:  "effect")
      <*> (o .:  "key")
      <*> (o .:? "timeAdded")
      <*> (o .:? "value")

-- | ToJSON V1Taint
instance A.ToJSON V1Taint where
  toJSON V1Taint {..} =
   _omitNulls
      [ "effect" .= v1TaintEffect
      , "key" .= v1TaintKey
      , "timeAdded" .= v1TaintTimeAdded
      , "value" .= 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 v1TaintEffect v1TaintKey =
  V1Taint
  { v1TaintEffect
  , v1TaintKey
  , v1TaintTimeAdded = Nothing
  , v1TaintValue = Nothing
  }

-- ** 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
  { 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1TokenReviewMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1TokenReviewSpec :: !(V1TokenReviewSpec) -- ^ /Required/ "spec"
  , v1TokenReviewStatus :: !(Maybe V1TokenReviewStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1TokenReview
instance A.FromJSON V1TokenReview where
  parseJSON = A.withObject "V1TokenReview" $ \o ->
    V1TokenReview
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:  "spec")
      <*> (o .:? "status")

-- | ToJSON V1TokenReview
instance A.ToJSON V1TokenReview where
  toJSON V1TokenReview {..} =
   _omitNulls
      [ "apiVersion" .= v1TokenReviewApiVersion
      , "kind" .= v1TokenReviewKind
      , "metadata" .= v1TokenReviewMetadata
      , "spec" .= v1TokenReviewSpec
      , "status" .= v1TokenReviewStatus
      ]


-- | Construct a value of type 'V1TokenReview' (by applying it's required fields, if any)
mkV1TokenReview
  :: V1TokenReviewSpec -- ^ 'v1TokenReviewSpec' 
  -> V1TokenReview
mkV1TokenReview v1TokenReviewSpec =
  V1TokenReview
  { v1TokenReviewApiVersion = Nothing
  , v1TokenReviewKind = Nothing
  , v1TokenReviewMetadata = Nothing
  , v1TokenReviewSpec
  , v1TokenReviewStatus = Nothing
  }

-- ** V1TokenReviewSpec
-- | V1TokenReviewSpec
-- TokenReviewSpec is a description of the token authentication request.
data V1TokenReviewSpec = V1TokenReviewSpec
  { 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.
  , v1TokenReviewSpecToken :: !(Maybe Text) -- ^ "token" - Token is the opaque bearer token.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1TokenReviewSpec
instance A.FromJSON V1TokenReviewSpec where
  parseJSON = A.withObject "V1TokenReviewSpec" $ \o ->
    V1TokenReviewSpec
      <$> (o .:? "audiences")
      <*> (o .:? "token")

-- | ToJSON V1TokenReviewSpec
instance A.ToJSON V1TokenReviewSpec where
  toJSON V1TokenReviewSpec {..} =
   _omitNulls
      [ "audiences" .= v1TokenReviewSpecAudiences
      , "token" .= v1TokenReviewSpecToken
      ]


-- | Construct a value of type 'V1TokenReviewSpec' (by applying it's required fields, if any)
mkV1TokenReviewSpec
  :: V1TokenReviewSpec
mkV1TokenReviewSpec =
  V1TokenReviewSpec
  { v1TokenReviewSpecAudiences = Nothing
  , v1TokenReviewSpecToken = Nothing
  }

-- ** V1TokenReviewStatus
-- | V1TokenReviewStatus
-- TokenReviewStatus is the result of the token authentication request.
data V1TokenReviewStatus = V1TokenReviewStatus
  { 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.
  , v1TokenReviewStatusAuthenticated :: !(Maybe Bool) -- ^ "authenticated" - Authenticated indicates that the token was associated with a known user.
  , v1TokenReviewStatusError :: !(Maybe Text) -- ^ "error" - Error indicates that the token couldn&#39;t be checked
  , v1TokenReviewStatusUser :: !(Maybe V1UserInfo) -- ^ "user"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1TokenReviewStatus
instance A.FromJSON V1TokenReviewStatus where
  parseJSON = A.withObject "V1TokenReviewStatus" $ \o ->
    V1TokenReviewStatus
      <$> (o .:? "audiences")
      <*> (o .:? "authenticated")
      <*> (o .:? "error")
      <*> (o .:? "user")

-- | ToJSON V1TokenReviewStatus
instance A.ToJSON V1TokenReviewStatus where
  toJSON V1TokenReviewStatus {..} =
   _omitNulls
      [ "audiences" .= v1TokenReviewStatusAudiences
      , "authenticated" .= v1TokenReviewStatusAuthenticated
      , "error" .= v1TokenReviewStatusError
      , "user" .= v1TokenReviewStatusUser
      ]


-- | Construct a value of type 'V1TokenReviewStatus' (by applying it's required fields, if any)
mkV1TokenReviewStatus
  :: V1TokenReviewStatus
mkV1TokenReviewStatus =
  V1TokenReviewStatus
  { v1TokenReviewStatusAudiences = Nothing
  , v1TokenReviewStatusAuthenticated = Nothing
  , v1TokenReviewStatusError = Nothing
  , v1TokenReviewStatusUser = 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
  { 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.
  , 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.
  , 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.
  , 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.
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1Toleration
instance A.FromJSON V1Toleration where
  parseJSON = A.withObject "V1Toleration" $ \o ->
    V1Toleration
      <$> (o .:? "effect")
      <*> (o .:? "key")
      <*> (o .:? "operator")
      <*> (o .:? "tolerationSeconds")
      <*> (o .:? "value")

-- | ToJSON V1Toleration
instance A.ToJSON V1Toleration where
  toJSON V1Toleration {..} =
   _omitNulls
      [ "effect" .= v1TolerationEffect
      , "key" .= v1TolerationKey
      , "operator" .= v1TolerationOperator
      , "tolerationSeconds" .= v1TolerationTolerationSeconds
      , "value" .= v1TolerationValue
      ]


-- | Construct a value of type 'V1Toleration' (by applying it's required fields, if any)
mkV1Toleration
  :: V1Toleration
mkV1Toleration =
  V1Toleration
  { v1TolerationEffect = Nothing
  , v1TolerationKey = Nothing
  , v1TolerationOperator = Nothing
  , v1TolerationTolerationSeconds = Nothing
  , v1TolerationValue = 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
  { v1TopologySelectorLabelRequirementKey :: !(Text) -- ^ /Required/ "key" - The label key that the selector applies to.
  , 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1TopologySelectorLabelRequirement
instance A.FromJSON V1TopologySelectorLabelRequirement where
  parseJSON = A.withObject "V1TopologySelectorLabelRequirement" $ \o ->
    V1TopologySelectorLabelRequirement
      <$> (o .:  "key")
      <*> (o .:  "values")

-- | ToJSON V1TopologySelectorLabelRequirement
instance A.ToJSON V1TopologySelectorLabelRequirement where
  toJSON V1TopologySelectorLabelRequirement {..} =
   _omitNulls
      [ "key" .= v1TopologySelectorLabelRequirementKey
      , "values" .= 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 v1TopologySelectorLabelRequirementKey v1TopologySelectorLabelRequirementValues =
  V1TopologySelectorLabelRequirement
  { v1TopologySelectorLabelRequirementKey
  , 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
  { v1TopologySelectorTermMatchLabelExpressions :: !(Maybe [V1TopologySelectorLabelRequirement]) -- ^ "matchLabelExpressions" - A list of topology selector requirements by labels.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1TopologySelectorTerm
instance A.FromJSON V1TopologySelectorTerm where
  parseJSON = A.withObject "V1TopologySelectorTerm" $ \o ->
    V1TopologySelectorTerm
      <$> (o .:? "matchLabelExpressions")

-- | ToJSON V1TopologySelectorTerm
instance A.ToJSON V1TopologySelectorTerm where
  toJSON V1TopologySelectorTerm {..} =
   _omitNulls
      [ "matchLabelExpressions" .= v1TopologySelectorTermMatchLabelExpressions
      ]


-- | Construct a value of type 'V1TopologySelectorTerm' (by applying it's required fields, if any)
mkV1TopologySelectorTerm
  :: V1TopologySelectorTerm
mkV1TopologySelectorTerm =
  V1TopologySelectorTerm
  { v1TopologySelectorTermMatchLabelExpressions = Nothing
  }

-- ** V1TypedLocalObjectReference
-- | V1TypedLocalObjectReference
-- TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace.
data V1TypedLocalObjectReference = V1TypedLocalObjectReference
  { 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.
  , v1TypedLocalObjectReferenceKind :: !(Text) -- ^ /Required/ "kind" - Kind is the type of resource being referenced
  , v1TypedLocalObjectReferenceName :: !(Text) -- ^ /Required/ "name" - Name is the name of resource being referenced
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1TypedLocalObjectReference
instance A.FromJSON V1TypedLocalObjectReference where
  parseJSON = A.withObject "V1TypedLocalObjectReference" $ \o ->
    V1TypedLocalObjectReference
      <$> (o .:? "apiGroup")
      <*> (o .:  "kind")
      <*> (o .:  "name")

-- | ToJSON V1TypedLocalObjectReference
instance A.ToJSON V1TypedLocalObjectReference where
  toJSON V1TypedLocalObjectReference {..} =
   _omitNulls
      [ "apiGroup" .= v1TypedLocalObjectReferenceApiGroup
      , "kind" .= v1TypedLocalObjectReferenceKind
      , "name" .= 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 v1TypedLocalObjectReferenceKind v1TypedLocalObjectReferenceName =
  V1TypedLocalObjectReference
  { v1TypedLocalObjectReferenceApiGroup = Nothing
  , v1TypedLocalObjectReferenceKind
  , v1TypedLocalObjectReferenceName
  }

-- ** V1UserInfo
-- | V1UserInfo
-- UserInfo holds the information about the user needed to implement the user.Info interface.
data V1UserInfo = V1UserInfo
  { v1UserInfoExtra :: !(Maybe (Map.Map String [Text])) -- ^ "extra" - Any additional information provided by the authenticator.
  , v1UserInfoGroups :: !(Maybe [Text]) -- ^ "groups" - The names of groups this user is a part of.
  , 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.
  , v1UserInfoUsername :: !(Maybe Text) -- ^ "username" - The name that uniquely identifies this user among all active users.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1UserInfo
instance A.FromJSON V1UserInfo where
  parseJSON = A.withObject "V1UserInfo" $ \o ->
    V1UserInfo
      <$> (o .:? "extra")
      <*> (o .:? "groups")
      <*> (o .:? "uid")
      <*> (o .:? "username")

-- | ToJSON V1UserInfo
instance A.ToJSON V1UserInfo where
  toJSON V1UserInfo {..} =
   _omitNulls
      [ "extra" .= v1UserInfoExtra
      , "groups" .= v1UserInfoGroups
      , "uid" .= v1UserInfoUid
      , "username" .= v1UserInfoUsername
      ]


-- | Construct a value of type 'V1UserInfo' (by applying it's required fields, if any)
mkV1UserInfo
  :: V1UserInfo
mkV1UserInfo =
  V1UserInfo
  { v1UserInfoExtra = Nothing
  , v1UserInfoGroups = Nothing
  , v1UserInfoUid = Nothing
  , v1UserInfoUsername = Nothing
  }

-- ** V1Volume
-- | V1Volume
-- Volume represents a named volume in a pod that may be accessed by any container in the pod.
data V1Volume = V1Volume
  { v1VolumeAwsElasticBlockStore :: !(Maybe V1AWSElasticBlockStoreVolumeSource) -- ^ "awsElasticBlockStore"
  , v1VolumeAzureDisk :: !(Maybe V1AzureDiskVolumeSource) -- ^ "azureDisk"
  , v1VolumeAzureFile :: !(Maybe V1AzureFileVolumeSource) -- ^ "azureFile"
  , v1VolumeCephfs :: !(Maybe V1CephFSVolumeSource) -- ^ "cephfs"
  , v1VolumeCinder :: !(Maybe V1CinderVolumeSource) -- ^ "cinder"
  , v1VolumeConfigMap :: !(Maybe V1ConfigMapVolumeSource) -- ^ "configMap"
  , v1VolumeCsi :: !(Maybe V1CSIVolumeSource) -- ^ "csi"
  , v1VolumeDownwardApi :: !(Maybe V1DownwardAPIVolumeSource) -- ^ "downwardAPI"
  , v1VolumeEmptyDir :: !(Maybe V1EmptyDirVolumeSource) -- ^ "emptyDir"
  , v1VolumeFc :: !(Maybe V1FCVolumeSource) -- ^ "fc"
  , v1VolumeFlexVolume :: !(Maybe V1FlexVolumeSource) -- ^ "flexVolume"
  , v1VolumeFlocker :: !(Maybe V1FlockerVolumeSource) -- ^ "flocker"
  , v1VolumeGcePersistentDisk :: !(Maybe V1GCEPersistentDiskVolumeSource) -- ^ "gcePersistentDisk"
  , v1VolumeGitRepo :: !(Maybe V1GitRepoVolumeSource) -- ^ "gitRepo"
  , v1VolumeGlusterfs :: !(Maybe V1GlusterfsVolumeSource) -- ^ "glusterfs"
  , v1VolumeHostPath :: !(Maybe V1HostPathVolumeSource) -- ^ "hostPath"
  , v1VolumeIscsi :: !(Maybe V1ISCSIVolumeSource) -- ^ "iscsi"
  , v1VolumeName :: !(Text) -- ^ /Required/ "name" - Volume&#39;s name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  , v1VolumeNfs :: !(Maybe V1NFSVolumeSource) -- ^ "nfs"
  , v1VolumePersistentVolumeClaim :: !(Maybe V1PersistentVolumeClaimVolumeSource) -- ^ "persistentVolumeClaim"
  , v1VolumePhotonPersistentDisk :: !(Maybe V1PhotonPersistentDiskVolumeSource) -- ^ "photonPersistentDisk"
  , v1VolumePortworxVolume :: !(Maybe V1PortworxVolumeSource) -- ^ "portworxVolume"
  , v1VolumeProjected :: !(Maybe V1ProjectedVolumeSource) -- ^ "projected"
  , v1VolumeQuobyte :: !(Maybe V1QuobyteVolumeSource) -- ^ "quobyte"
  , v1VolumeRbd :: !(Maybe V1RBDVolumeSource) -- ^ "rbd"
  , v1VolumeScaleIo :: !(Maybe V1ScaleIOVolumeSource) -- ^ "scaleIO"
  , v1VolumeSecret :: !(Maybe V1SecretVolumeSource) -- ^ "secret"
  , v1VolumeStorageos :: !(Maybe V1StorageOSVolumeSource) -- ^ "storageos"
  , v1VolumeVsphereVolume :: !(Maybe V1VsphereVirtualDiskVolumeSource) -- ^ "vsphereVolume"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1Volume
instance A.FromJSON V1Volume where
  parseJSON = A.withObject "V1Volume" $ \o ->
    V1Volume
      <$> (o .:? "awsElasticBlockStore")
      <*> (o .:? "azureDisk")
      <*> (o .:? "azureFile")
      <*> (o .:? "cephfs")
      <*> (o .:? "cinder")
      <*> (o .:? "configMap")
      <*> (o .:? "csi")
      <*> (o .:? "downwardAPI")
      <*> (o .:? "emptyDir")
      <*> (o .:? "fc")
      <*> (o .:? "flexVolume")
      <*> (o .:? "flocker")
      <*> (o .:? "gcePersistentDisk")
      <*> (o .:? "gitRepo")
      <*> (o .:? "glusterfs")
      <*> (o .:? "hostPath")
      <*> (o .:? "iscsi")
      <*> (o .:  "name")
      <*> (o .:? "nfs")
      <*> (o .:? "persistentVolumeClaim")
      <*> (o .:? "photonPersistentDisk")
      <*> (o .:? "portworxVolume")
      <*> (o .:? "projected")
      <*> (o .:? "quobyte")
      <*> (o .:? "rbd")
      <*> (o .:? "scaleIO")
      <*> (o .:? "secret")
      <*> (o .:? "storageos")
      <*> (o .:? "vsphereVolume")

-- | ToJSON V1Volume
instance A.ToJSON V1Volume where
  toJSON V1Volume {..} =
   _omitNulls
      [ "awsElasticBlockStore" .= v1VolumeAwsElasticBlockStore
      , "azureDisk" .= v1VolumeAzureDisk
      , "azureFile" .= v1VolumeAzureFile
      , "cephfs" .= v1VolumeCephfs
      , "cinder" .= v1VolumeCinder
      , "configMap" .= v1VolumeConfigMap
      , "csi" .= v1VolumeCsi
      , "downwardAPI" .= v1VolumeDownwardApi
      , "emptyDir" .= v1VolumeEmptyDir
      , "fc" .= v1VolumeFc
      , "flexVolume" .= v1VolumeFlexVolume
      , "flocker" .= v1VolumeFlocker
      , "gcePersistentDisk" .= v1VolumeGcePersistentDisk
      , "gitRepo" .= v1VolumeGitRepo
      , "glusterfs" .= v1VolumeGlusterfs
      , "hostPath" .= v1VolumeHostPath
      , "iscsi" .= v1VolumeIscsi
      , "name" .= v1VolumeName
      , "nfs" .= v1VolumeNfs
      , "persistentVolumeClaim" .= v1VolumePersistentVolumeClaim
      , "photonPersistentDisk" .= v1VolumePhotonPersistentDisk
      , "portworxVolume" .= v1VolumePortworxVolume
      , "projected" .= v1VolumeProjected
      , "quobyte" .= v1VolumeQuobyte
      , "rbd" .= v1VolumeRbd
      , "scaleIO" .= v1VolumeScaleIo
      , "secret" .= v1VolumeSecret
      , "storageos" .= v1VolumeStorageos
      , "vsphereVolume" .= v1VolumeVsphereVolume
      ]


-- | Construct a value of type 'V1Volume' (by applying it's required fields, if any)
mkV1Volume
  :: Text -- ^ 'v1VolumeName': Volume's name. 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 v1VolumeName =
  V1Volume
  { v1VolumeAwsElasticBlockStore = Nothing
  , v1VolumeAzureDisk = Nothing
  , v1VolumeAzureFile = Nothing
  , v1VolumeCephfs = Nothing
  , v1VolumeCinder = Nothing
  , v1VolumeConfigMap = Nothing
  , v1VolumeCsi = Nothing
  , v1VolumeDownwardApi = Nothing
  , v1VolumeEmptyDir = Nothing
  , v1VolumeFc = Nothing
  , v1VolumeFlexVolume = Nothing
  , v1VolumeFlocker = Nothing
  , v1VolumeGcePersistentDisk = Nothing
  , v1VolumeGitRepo = Nothing
  , v1VolumeGlusterfs = Nothing
  , v1VolumeHostPath = Nothing
  , v1VolumeIscsi = Nothing
  , v1VolumeName
  , v1VolumeNfs = Nothing
  , v1VolumePersistentVolumeClaim = Nothing
  , v1VolumePhotonPersistentDisk = Nothing
  , v1VolumePortworxVolume = Nothing
  , v1VolumeProjected = Nothing
  , v1VolumeQuobyte = Nothing
  , v1VolumeRbd = Nothing
  , v1VolumeScaleIo = Nothing
  , v1VolumeSecret = Nothing
  , v1VolumeStorageos = Nothing
  , v1VolumeVsphereVolume = 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
  { 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/api-conventions.md#resources
  , 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/api-conventions.md#types-kinds
  , v1VolumeAttachmentMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1VolumeAttachmentSpec :: !(V1VolumeAttachmentSpec) -- ^ /Required/ "spec"
  , v1VolumeAttachmentStatus :: !(Maybe V1VolumeAttachmentStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1VolumeAttachment
instance A.FromJSON V1VolumeAttachment where
  parseJSON = A.withObject "V1VolumeAttachment" $ \o ->
    V1VolumeAttachment
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:  "spec")
      <*> (o .:? "status")

-- | ToJSON V1VolumeAttachment
instance A.ToJSON V1VolumeAttachment where
  toJSON V1VolumeAttachment {..} =
   _omitNulls
      [ "apiVersion" .= v1VolumeAttachmentApiVersion
      , "kind" .= v1VolumeAttachmentKind
      , "metadata" .= v1VolumeAttachmentMetadata
      , "spec" .= v1VolumeAttachmentSpec
      , "status" .= v1VolumeAttachmentStatus
      ]


-- | Construct a value of type 'V1VolumeAttachment' (by applying it's required fields, if any)
mkV1VolumeAttachment
  :: V1VolumeAttachmentSpec -- ^ 'v1VolumeAttachmentSpec' 
  -> V1VolumeAttachment
mkV1VolumeAttachment v1VolumeAttachmentSpec =
  V1VolumeAttachment
  { v1VolumeAttachmentApiVersion = Nothing
  , v1VolumeAttachmentKind = Nothing
  , v1VolumeAttachmentMetadata = Nothing
  , v1VolumeAttachmentSpec
  , v1VolumeAttachmentStatus = Nothing
  }

-- ** V1VolumeAttachmentList
-- | V1VolumeAttachmentList
-- VolumeAttachmentList is a collection of VolumeAttachment objects.
data V1VolumeAttachmentList = V1VolumeAttachmentList
  { 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/api-conventions.md#resources
  , v1VolumeAttachmentListItems :: !([V1VolumeAttachment]) -- ^ /Required/ "items" - Items is the list of VolumeAttachments
  , 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/api-conventions.md#types-kinds
  , v1VolumeAttachmentListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1VolumeAttachmentList
instance A.FromJSON V1VolumeAttachmentList where
  parseJSON = A.withObject "V1VolumeAttachmentList" $ \o ->
    V1VolumeAttachmentList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1VolumeAttachmentList
instance A.ToJSON V1VolumeAttachmentList where
  toJSON V1VolumeAttachmentList {..} =
   _omitNulls
      [ "apiVersion" .= v1VolumeAttachmentListApiVersion
      , "items" .= v1VolumeAttachmentListItems
      , "kind" .= v1VolumeAttachmentListKind
      , "metadata" .= 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 v1VolumeAttachmentListItems =
  V1VolumeAttachmentList
  { v1VolumeAttachmentListApiVersion = Nothing
  , v1VolumeAttachmentListItems
  , v1VolumeAttachmentListKind = Nothing
  , v1VolumeAttachmentListMetadata = Nothing
  }

-- ** V1VolumeAttachmentSource
-- | V1VolumeAttachmentSource
-- VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.
data V1VolumeAttachmentSource = V1VolumeAttachmentSource
  { v1VolumeAttachmentSourcePersistentVolumeName :: !(Maybe Text) -- ^ "persistentVolumeName" - Name of the persistent volume to attach.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1VolumeAttachmentSource
instance A.FromJSON V1VolumeAttachmentSource where
  parseJSON = A.withObject "V1VolumeAttachmentSource" $ \o ->
    V1VolumeAttachmentSource
      <$> (o .:? "persistentVolumeName")

-- | ToJSON V1VolumeAttachmentSource
instance A.ToJSON V1VolumeAttachmentSource where
  toJSON V1VolumeAttachmentSource {..} =
   _omitNulls
      [ "persistentVolumeName" .= v1VolumeAttachmentSourcePersistentVolumeName
      ]


-- | Construct a value of type 'V1VolumeAttachmentSource' (by applying it's required fields, if any)
mkV1VolumeAttachmentSource
  :: V1VolumeAttachmentSource
mkV1VolumeAttachmentSource =
  V1VolumeAttachmentSource
  { v1VolumeAttachmentSourcePersistentVolumeName = Nothing
  }

-- ** V1VolumeAttachmentSpec
-- | V1VolumeAttachmentSpec
-- VolumeAttachmentSpec is the specification of a VolumeAttachment request.
data V1VolumeAttachmentSpec = V1VolumeAttachmentSpec
  { v1VolumeAttachmentSpecAttacher :: !(Text) -- ^ /Required/ "attacher" - Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().
  , v1VolumeAttachmentSpecNodeName :: !(Text) -- ^ /Required/ "nodeName" - The node that the volume should be attached to.
  , v1VolumeAttachmentSpecSource :: !(V1VolumeAttachmentSource) -- ^ /Required/ "source"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1VolumeAttachmentSpec
instance A.FromJSON V1VolumeAttachmentSpec where
  parseJSON = A.withObject "V1VolumeAttachmentSpec" $ \o ->
    V1VolumeAttachmentSpec
      <$> (o .:  "attacher")
      <*> (o .:  "nodeName")
      <*> (o .:  "source")

-- | ToJSON V1VolumeAttachmentSpec
instance A.ToJSON V1VolumeAttachmentSpec where
  toJSON V1VolumeAttachmentSpec {..} =
   _omitNulls
      [ "attacher" .= v1VolumeAttachmentSpecAttacher
      , "nodeName" .= v1VolumeAttachmentSpecNodeName
      , "source" .= 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': The node that the volume should be attached to.
  -> V1VolumeAttachmentSource -- ^ 'v1VolumeAttachmentSpecSource' 
  -> V1VolumeAttachmentSpec
mkV1VolumeAttachmentSpec v1VolumeAttachmentSpecAttacher v1VolumeAttachmentSpecNodeName v1VolumeAttachmentSpecSource =
  V1VolumeAttachmentSpec
  { v1VolumeAttachmentSpecAttacher
  , v1VolumeAttachmentSpecNodeName
  , v1VolumeAttachmentSpecSource
  }

-- ** V1VolumeAttachmentStatus
-- | V1VolumeAttachmentStatus
-- VolumeAttachmentStatus is the status of a VolumeAttachment request.
data V1VolumeAttachmentStatus = V1VolumeAttachmentStatus
  { v1VolumeAttachmentStatusAttachError :: !(Maybe V1VolumeError) -- ^ "attachError"
  , v1VolumeAttachmentStatusAttached :: !(Bool) -- ^ /Required/ "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.
  , v1VolumeAttachmentStatusAttachmentMetadata :: !(Maybe (Map.Map String Text)) -- ^ "attachmentMetadata" - Upon successful attach, this field is populated with any information returned by the attach operation 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.
  , v1VolumeAttachmentStatusDetachError :: !(Maybe V1VolumeError) -- ^ "detachError"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1VolumeAttachmentStatus
instance A.FromJSON V1VolumeAttachmentStatus where
  parseJSON = A.withObject "V1VolumeAttachmentStatus" $ \o ->
    V1VolumeAttachmentStatus
      <$> (o .:? "attachError")
      <*> (o .:  "attached")
      <*> (o .:? "attachmentMetadata")
      <*> (o .:? "detachError")

-- | ToJSON V1VolumeAttachmentStatus
instance A.ToJSON V1VolumeAttachmentStatus where
  toJSON V1VolumeAttachmentStatus {..} =
   _omitNulls
      [ "attachError" .= v1VolumeAttachmentStatusAttachError
      , "attached" .= v1VolumeAttachmentStatusAttached
      , "attachmentMetadata" .= v1VolumeAttachmentStatusAttachmentMetadata
      , "detachError" .= v1VolumeAttachmentStatusDetachError
      ]


-- | Construct a value of type 'V1VolumeAttachmentStatus' (by applying it's required fields, if any)
mkV1VolumeAttachmentStatus
  :: Bool -- ^ 'v1VolumeAttachmentStatusAttached': 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 v1VolumeAttachmentStatusAttached =
  V1VolumeAttachmentStatus
  { v1VolumeAttachmentStatusAttachError = Nothing
  , v1VolumeAttachmentStatusAttached
  , v1VolumeAttachmentStatusAttachmentMetadata = Nothing
  , v1VolumeAttachmentStatusDetachError = Nothing
  }

-- ** V1VolumeDevice
-- | V1VolumeDevice
-- volumeDevice describes a mapping of a raw block device within a container.
data V1VolumeDevice = V1VolumeDevice
  { v1VolumeDeviceDevicePath :: !(Text) -- ^ /Required/ "devicePath" - devicePath is the path inside of the container that the device will be mapped to.
  , v1VolumeDeviceName :: !(Text) -- ^ /Required/ "name" - name must match the name of a persistentVolumeClaim in the pod
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1VolumeDevice
instance A.FromJSON V1VolumeDevice where
  parseJSON = A.withObject "V1VolumeDevice" $ \o ->
    V1VolumeDevice
      <$> (o .:  "devicePath")
      <*> (o .:  "name")

-- | ToJSON V1VolumeDevice
instance A.ToJSON V1VolumeDevice where
  toJSON V1VolumeDevice {..} =
   _omitNulls
      [ "devicePath" .= v1VolumeDeviceDevicePath
      , "name" .= 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 v1VolumeDeviceDevicePath v1VolumeDeviceName =
  V1VolumeDevice
  { v1VolumeDeviceDevicePath
  , v1VolumeDeviceName
  }

-- ** V1VolumeError
-- | V1VolumeError
-- VolumeError captures an error encountered during a volume operation.
data V1VolumeError = V1VolumeError
  { v1VolumeErrorMessage :: !(Maybe Text) -- ^ "message" - String detailing the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information.
  , v1VolumeErrorTime :: !(Maybe DateTime) -- ^ "time" - Time the error was encountered.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1VolumeError
instance A.FromJSON V1VolumeError where
  parseJSON = A.withObject "V1VolumeError" $ \o ->
    V1VolumeError
      <$> (o .:? "message")
      <*> (o .:? "time")

-- | ToJSON V1VolumeError
instance A.ToJSON V1VolumeError where
  toJSON V1VolumeError {..} =
   _omitNulls
      [ "message" .= v1VolumeErrorMessage
      , "time" .= v1VolumeErrorTime
      ]


-- | Construct a value of type 'V1VolumeError' (by applying it's required fields, if any)
mkV1VolumeError
  :: V1VolumeError
mkV1VolumeError =
  V1VolumeError
  { v1VolumeErrorMessage = Nothing
  , v1VolumeErrorTime = Nothing
  }

-- ** V1VolumeMount
-- | V1VolumeMount
-- VolumeMount describes a mounting of a Volume within a container.
data V1VolumeMount = V1VolumeMount
  { v1VolumeMountMountPath :: !(Text) -- ^ /Required/ "mountPath" - Path within the container at which the volume should be mounted.  Must not contain &#39;:&#39;.
  , 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.
  , v1VolumeMountName :: !(Text) -- ^ /Required/ "name" - This must match the Name of a Volume.
  , v1VolumeMountReadOnly :: !(Maybe Bool) -- ^ "readOnly" - Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
  , 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).
  , 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. This field is alpha in 1.14.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1VolumeMount
instance A.FromJSON V1VolumeMount where
  parseJSON = A.withObject "V1VolumeMount" $ \o ->
    V1VolumeMount
      <$> (o .:  "mountPath")
      <*> (o .:? "mountPropagation")
      <*> (o .:  "name")
      <*> (o .:? "readOnly")
      <*> (o .:? "subPath")
      <*> (o .:? "subPathExpr")

-- | ToJSON V1VolumeMount
instance A.ToJSON V1VolumeMount where
  toJSON V1VolumeMount {..} =
   _omitNulls
      [ "mountPath" .= v1VolumeMountMountPath
      , "mountPropagation" .= v1VolumeMountMountPropagation
      , "name" .= v1VolumeMountName
      , "readOnly" .= v1VolumeMountReadOnly
      , "subPath" .= v1VolumeMountSubPath
      , "subPathExpr" .= 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 v1VolumeMountMountPath v1VolumeMountName =
  V1VolumeMount
  { v1VolumeMountMountPath
  , v1VolumeMountMountPropagation = Nothing
  , v1VolumeMountName
  , v1VolumeMountReadOnly = Nothing
  , v1VolumeMountSubPath = Nothing
  , v1VolumeMountSubPathExpr = Nothing
  }

-- ** V1VolumeNodeAffinity
-- | V1VolumeNodeAffinity
-- VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from.
data V1VolumeNodeAffinity = V1VolumeNodeAffinity
  { v1VolumeNodeAffinityRequired :: !(Maybe V1NodeSelector) -- ^ "required"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1VolumeNodeAffinity
instance A.FromJSON V1VolumeNodeAffinity where
  parseJSON = A.withObject "V1VolumeNodeAffinity" $ \o ->
    V1VolumeNodeAffinity
      <$> (o .:? "required")

-- | ToJSON V1VolumeNodeAffinity
instance A.ToJSON V1VolumeNodeAffinity where
  toJSON V1VolumeNodeAffinity {..} =
   _omitNulls
      [ "required" .= v1VolumeNodeAffinityRequired
      ]


-- | Construct a value of type 'V1VolumeNodeAffinity' (by applying it's required fields, if any)
mkV1VolumeNodeAffinity
  :: V1VolumeNodeAffinity
mkV1VolumeNodeAffinity =
  V1VolumeNodeAffinity
  { v1VolumeNodeAffinityRequired = Nothing
  }

-- ** V1VolumeProjection
-- | V1VolumeProjection
-- Projection that may be projected along with other supported volume types
data V1VolumeProjection = V1VolumeProjection
  { v1VolumeProjectionConfigMap :: !(Maybe V1ConfigMapProjection) -- ^ "configMap"
  , v1VolumeProjectionDownwardApi :: !(Maybe V1DownwardAPIProjection) -- ^ "downwardAPI"
  , v1VolumeProjectionSecret :: !(Maybe V1SecretProjection) -- ^ "secret"
  , v1VolumeProjectionServiceAccountToken :: !(Maybe V1ServiceAccountTokenProjection) -- ^ "serviceAccountToken"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1VolumeProjection
instance A.FromJSON V1VolumeProjection where
  parseJSON = A.withObject "V1VolumeProjection" $ \o ->
    V1VolumeProjection
      <$> (o .:? "configMap")
      <*> (o .:? "downwardAPI")
      <*> (o .:? "secret")
      <*> (o .:? "serviceAccountToken")

-- | ToJSON V1VolumeProjection
instance A.ToJSON V1VolumeProjection where
  toJSON V1VolumeProjection {..} =
   _omitNulls
      [ "configMap" .= v1VolumeProjectionConfigMap
      , "downwardAPI" .= v1VolumeProjectionDownwardApi
      , "secret" .= v1VolumeProjectionSecret
      , "serviceAccountToken" .= v1VolumeProjectionServiceAccountToken
      ]


-- | Construct a value of type 'V1VolumeProjection' (by applying it's required fields, if any)
mkV1VolumeProjection
  :: V1VolumeProjection
mkV1VolumeProjection =
  V1VolumeProjection
  { v1VolumeProjectionConfigMap = Nothing
  , v1VolumeProjectionDownwardApi = Nothing
  , v1VolumeProjectionSecret = Nothing
  , v1VolumeProjectionServiceAccountToken = Nothing
  }

-- ** V1VsphereVirtualDiskVolumeSource
-- | V1VsphereVirtualDiskVolumeSource
-- Represents a vSphere volume resource.
data V1VsphereVirtualDiskVolumeSource = V1VsphereVirtualDiskVolumeSource
  { v1VsphereVirtualDiskVolumeSourceFsType :: !(Maybe Text) -- ^ "fsType" - 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.
  , v1VsphereVirtualDiskVolumeSourceStoragePolicyId :: !(Maybe Text) -- ^ "storagePolicyID" - Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.
  , v1VsphereVirtualDiskVolumeSourceStoragePolicyName :: !(Maybe Text) -- ^ "storagePolicyName" - Storage Policy Based Management (SPBM) profile name.
  , v1VsphereVirtualDiskVolumeSourceVolumePath :: !(Text) -- ^ /Required/ "volumePath" - Path that identifies vSphere volume vmdk
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1VsphereVirtualDiskVolumeSource
instance A.FromJSON V1VsphereVirtualDiskVolumeSource where
  parseJSON = A.withObject "V1VsphereVirtualDiskVolumeSource" $ \o ->
    V1VsphereVirtualDiskVolumeSource
      <$> (o .:? "fsType")
      <*> (o .:? "storagePolicyID")
      <*> (o .:? "storagePolicyName")
      <*> (o .:  "volumePath")

-- | ToJSON V1VsphereVirtualDiskVolumeSource
instance A.ToJSON V1VsphereVirtualDiskVolumeSource where
  toJSON V1VsphereVirtualDiskVolumeSource {..} =
   _omitNulls
      [ "fsType" .= v1VsphereVirtualDiskVolumeSourceFsType
      , "storagePolicyID" .= v1VsphereVirtualDiskVolumeSourceStoragePolicyId
      , "storagePolicyName" .= v1VsphereVirtualDiskVolumeSourceStoragePolicyName
      , "volumePath" .= v1VsphereVirtualDiskVolumeSourceVolumePath
      ]


-- | Construct a value of type 'V1VsphereVirtualDiskVolumeSource' (by applying it's required fields, if any)
mkV1VsphereVirtualDiskVolumeSource
  :: Text -- ^ 'v1VsphereVirtualDiskVolumeSourceVolumePath': Path that identifies vSphere volume vmdk
  -> V1VsphereVirtualDiskVolumeSource
mkV1VsphereVirtualDiskVolumeSource v1VsphereVirtualDiskVolumeSourceVolumePath =
  V1VsphereVirtualDiskVolumeSource
  { v1VsphereVirtualDiskVolumeSourceFsType = Nothing
  , v1VsphereVirtualDiskVolumeSourceStoragePolicyId = Nothing
  , v1VsphereVirtualDiskVolumeSourceStoragePolicyName = Nothing
  , v1VsphereVirtualDiskVolumeSourceVolumePath
  }

-- ** V1WatchEvent
-- | V1WatchEvent
-- Event represents a single event to a watched resource.
data V1WatchEvent = V1WatchEvent
  { v1WatchEventObject :: !(RuntimeRawExtension) -- ^ /Required/ "object"
  , v1WatchEventType :: !(Text) -- ^ /Required/ "type"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1WatchEvent
instance A.FromJSON V1WatchEvent where
  parseJSON = A.withObject "V1WatchEvent" $ \o ->
    V1WatchEvent
      <$> (o .:  "object")
      <*> (o .:  "type")

-- | ToJSON V1WatchEvent
instance A.ToJSON V1WatchEvent where
  toJSON V1WatchEvent {..} =
   _omitNulls
      [ "object" .= v1WatchEventObject
      , "type" .= v1WatchEventType
      ]


-- | Construct a value of type 'V1WatchEvent' (by applying it's required fields, if any)
mkV1WatchEvent
  :: RuntimeRawExtension -- ^ 'v1WatchEventObject' 
  -> Text -- ^ 'v1WatchEventType' 
  -> V1WatchEvent
mkV1WatchEvent v1WatchEventObject v1WatchEventType =
  V1WatchEvent
  { v1WatchEventObject
  , v1WatchEventType
  }

-- ** 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
  { v1WeightedPodAffinityTermPodAffinityTerm :: !(V1PodAffinityTerm) -- ^ /Required/ "podAffinityTerm"
  , v1WeightedPodAffinityTermWeight :: !(Int) -- ^ /Required/ "weight" - weight associated with matching the corresponding podAffinityTerm, in the range 1-100.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1WeightedPodAffinityTerm
instance A.FromJSON V1WeightedPodAffinityTerm where
  parseJSON = A.withObject "V1WeightedPodAffinityTerm" $ \o ->
    V1WeightedPodAffinityTerm
      <$> (o .:  "podAffinityTerm")
      <*> (o .:  "weight")

-- | ToJSON V1WeightedPodAffinityTerm
instance A.ToJSON V1WeightedPodAffinityTerm where
  toJSON V1WeightedPodAffinityTerm {..} =
   _omitNulls
      [ "podAffinityTerm" .= v1WeightedPodAffinityTermPodAffinityTerm
      , "weight" .= 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 v1WeightedPodAffinityTermPodAffinityTerm v1WeightedPodAffinityTermWeight =
  V1WeightedPodAffinityTerm
  { v1WeightedPodAffinityTermPodAffinityTerm
  , v1WeightedPodAffinityTermWeight
  }

-- ** V1alpha1AggregationRule
-- | V1alpha1AggregationRule
-- AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole
data V1alpha1AggregationRule = V1alpha1AggregationRule
  { v1alpha1AggregationRuleClusterRoleSelectors :: !(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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1AggregationRule
instance A.FromJSON V1alpha1AggregationRule where
  parseJSON = A.withObject "V1alpha1AggregationRule" $ \o ->
    V1alpha1AggregationRule
      <$> (o .:? "clusterRoleSelectors")

-- | ToJSON V1alpha1AggregationRule
instance A.ToJSON V1alpha1AggregationRule where
  toJSON V1alpha1AggregationRule {..} =
   _omitNulls
      [ "clusterRoleSelectors" .= v1alpha1AggregationRuleClusterRoleSelectors
      ]


-- | Construct a value of type 'V1alpha1AggregationRule' (by applying it's required fields, if any)
mkV1alpha1AggregationRule
  :: V1alpha1AggregationRule
mkV1alpha1AggregationRule =
  V1alpha1AggregationRule
  { v1alpha1AggregationRuleClusterRoleSelectors = Nothing
  }

-- ** V1alpha1AuditSink
-- | V1alpha1AuditSink
-- AuditSink represents a cluster level audit sink
data V1alpha1AuditSink = V1alpha1AuditSink
  { v1alpha1AuditSinkApiVersion :: !(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/api-conventions.md#resources
  , v1alpha1AuditSinkKind :: !(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/api-conventions.md#types-kinds
  , v1alpha1AuditSinkMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1alpha1AuditSinkSpec :: !(Maybe V1alpha1AuditSinkSpec) -- ^ "spec"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1AuditSink
instance A.FromJSON V1alpha1AuditSink where
  parseJSON = A.withObject "V1alpha1AuditSink" $ \o ->
    V1alpha1AuditSink
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")

-- | ToJSON V1alpha1AuditSink
instance A.ToJSON V1alpha1AuditSink where
  toJSON V1alpha1AuditSink {..} =
   _omitNulls
      [ "apiVersion" .= v1alpha1AuditSinkApiVersion
      , "kind" .= v1alpha1AuditSinkKind
      , "metadata" .= v1alpha1AuditSinkMetadata
      , "spec" .= v1alpha1AuditSinkSpec
      ]


-- | Construct a value of type 'V1alpha1AuditSink' (by applying it's required fields, if any)
mkV1alpha1AuditSink
  :: V1alpha1AuditSink
mkV1alpha1AuditSink =
  V1alpha1AuditSink
  { v1alpha1AuditSinkApiVersion = Nothing
  , v1alpha1AuditSinkKind = Nothing
  , v1alpha1AuditSinkMetadata = Nothing
  , v1alpha1AuditSinkSpec = Nothing
  }

-- ** V1alpha1AuditSinkList
-- | V1alpha1AuditSinkList
-- AuditSinkList is a list of AuditSink items.
data V1alpha1AuditSinkList = V1alpha1AuditSinkList
  { v1alpha1AuditSinkListApiVersion :: !(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/api-conventions.md#resources
  , v1alpha1AuditSinkListItems :: !([V1alpha1AuditSink]) -- ^ /Required/ "items" - List of audit configurations.
  , v1alpha1AuditSinkListKind :: !(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/api-conventions.md#types-kinds
  , v1alpha1AuditSinkListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1AuditSinkList
instance A.FromJSON V1alpha1AuditSinkList where
  parseJSON = A.withObject "V1alpha1AuditSinkList" $ \o ->
    V1alpha1AuditSinkList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1alpha1AuditSinkList
instance A.ToJSON V1alpha1AuditSinkList where
  toJSON V1alpha1AuditSinkList {..} =
   _omitNulls
      [ "apiVersion" .= v1alpha1AuditSinkListApiVersion
      , "items" .= v1alpha1AuditSinkListItems
      , "kind" .= v1alpha1AuditSinkListKind
      , "metadata" .= v1alpha1AuditSinkListMetadata
      ]


-- | Construct a value of type 'V1alpha1AuditSinkList' (by applying it's required fields, if any)
mkV1alpha1AuditSinkList
  :: [V1alpha1AuditSink] -- ^ 'v1alpha1AuditSinkListItems': List of audit configurations.
  -> V1alpha1AuditSinkList
mkV1alpha1AuditSinkList v1alpha1AuditSinkListItems =
  V1alpha1AuditSinkList
  { v1alpha1AuditSinkListApiVersion = Nothing
  , v1alpha1AuditSinkListItems
  , v1alpha1AuditSinkListKind = Nothing
  , v1alpha1AuditSinkListMetadata = Nothing
  }

-- ** V1alpha1AuditSinkSpec
-- | V1alpha1AuditSinkSpec
-- AuditSinkSpec holds the spec for the audit sink
data V1alpha1AuditSinkSpec = V1alpha1AuditSinkSpec
  { v1alpha1AuditSinkSpecPolicy :: !(V1alpha1Policy) -- ^ /Required/ "policy"
  , v1alpha1AuditSinkSpecWebhook :: !(V1alpha1Webhook) -- ^ /Required/ "webhook"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1AuditSinkSpec
instance A.FromJSON V1alpha1AuditSinkSpec where
  parseJSON = A.withObject "V1alpha1AuditSinkSpec" $ \o ->
    V1alpha1AuditSinkSpec
      <$> (o .:  "policy")
      <*> (o .:  "webhook")

-- | ToJSON V1alpha1AuditSinkSpec
instance A.ToJSON V1alpha1AuditSinkSpec where
  toJSON V1alpha1AuditSinkSpec {..} =
   _omitNulls
      [ "policy" .= v1alpha1AuditSinkSpecPolicy
      , "webhook" .= v1alpha1AuditSinkSpecWebhook
      ]


-- | Construct a value of type 'V1alpha1AuditSinkSpec' (by applying it's required fields, if any)
mkV1alpha1AuditSinkSpec
  :: V1alpha1Policy -- ^ 'v1alpha1AuditSinkSpecPolicy' 
  -> V1alpha1Webhook -- ^ 'v1alpha1AuditSinkSpecWebhook' 
  -> V1alpha1AuditSinkSpec
mkV1alpha1AuditSinkSpec v1alpha1AuditSinkSpecPolicy v1alpha1AuditSinkSpecWebhook =
  V1alpha1AuditSinkSpec
  { v1alpha1AuditSinkSpecPolicy
  , v1alpha1AuditSinkSpecWebhook
  }

-- ** V1alpha1ClusterRole
-- | V1alpha1ClusterRole
-- ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
data V1alpha1ClusterRole = V1alpha1ClusterRole
  { v1alpha1ClusterRoleAggregationRule :: !(Maybe V1alpha1AggregationRule) -- ^ "aggregationRule"
  , v1alpha1ClusterRoleApiVersion :: !(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/api-conventions.md#resources
  , v1alpha1ClusterRoleKind :: !(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/api-conventions.md#types-kinds
  , v1alpha1ClusterRoleMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1alpha1ClusterRoleRules :: !(Maybe [V1alpha1PolicyRule]) -- ^ "rules" - Rules holds all the PolicyRules for this ClusterRole
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1ClusterRole
instance A.FromJSON V1alpha1ClusterRole where
  parseJSON = A.withObject "V1alpha1ClusterRole" $ \o ->
    V1alpha1ClusterRole
      <$> (o .:? "aggregationRule")
      <*> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "rules")

-- | ToJSON V1alpha1ClusterRole
instance A.ToJSON V1alpha1ClusterRole where
  toJSON V1alpha1ClusterRole {..} =
   _omitNulls
      [ "aggregationRule" .= v1alpha1ClusterRoleAggregationRule
      , "apiVersion" .= v1alpha1ClusterRoleApiVersion
      , "kind" .= v1alpha1ClusterRoleKind
      , "metadata" .= v1alpha1ClusterRoleMetadata
      , "rules" .= v1alpha1ClusterRoleRules
      ]


-- | Construct a value of type 'V1alpha1ClusterRole' (by applying it's required fields, if any)
mkV1alpha1ClusterRole
  :: V1alpha1ClusterRole
mkV1alpha1ClusterRole =
  V1alpha1ClusterRole
  { v1alpha1ClusterRoleAggregationRule = Nothing
  , v1alpha1ClusterRoleApiVersion = Nothing
  , v1alpha1ClusterRoleKind = Nothing
  , v1alpha1ClusterRoleMetadata = Nothing
  , v1alpha1ClusterRoleRules = Nothing
  }

-- ** V1alpha1ClusterRoleBinding
-- | V1alpha1ClusterRoleBinding
-- ClusterRoleBinding references a ClusterRole, but not contain it.  It can reference a ClusterRole in the global namespace, and adds who information via Subject.
data V1alpha1ClusterRoleBinding = V1alpha1ClusterRoleBinding
  { v1alpha1ClusterRoleBindingApiVersion :: !(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/api-conventions.md#resources
  , v1alpha1ClusterRoleBindingKind :: !(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/api-conventions.md#types-kinds
  , v1alpha1ClusterRoleBindingMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1alpha1ClusterRoleBindingRoleRef :: !(V1alpha1RoleRef) -- ^ /Required/ "roleRef"
  , v1alpha1ClusterRoleBindingSubjects :: !(Maybe [V1alpha1Subject]) -- ^ "subjects" - Subjects holds references to the objects the role applies to.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1ClusterRoleBinding
instance A.FromJSON V1alpha1ClusterRoleBinding where
  parseJSON = A.withObject "V1alpha1ClusterRoleBinding" $ \o ->
    V1alpha1ClusterRoleBinding
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:  "roleRef")
      <*> (o .:? "subjects")

-- | ToJSON V1alpha1ClusterRoleBinding
instance A.ToJSON V1alpha1ClusterRoleBinding where
  toJSON V1alpha1ClusterRoleBinding {..} =
   _omitNulls
      [ "apiVersion" .= v1alpha1ClusterRoleBindingApiVersion
      , "kind" .= v1alpha1ClusterRoleBindingKind
      , "metadata" .= v1alpha1ClusterRoleBindingMetadata
      , "roleRef" .= v1alpha1ClusterRoleBindingRoleRef
      , "subjects" .= v1alpha1ClusterRoleBindingSubjects
      ]


-- | Construct a value of type 'V1alpha1ClusterRoleBinding' (by applying it's required fields, if any)
mkV1alpha1ClusterRoleBinding
  :: V1alpha1RoleRef -- ^ 'v1alpha1ClusterRoleBindingRoleRef' 
  -> V1alpha1ClusterRoleBinding
mkV1alpha1ClusterRoleBinding v1alpha1ClusterRoleBindingRoleRef =
  V1alpha1ClusterRoleBinding
  { v1alpha1ClusterRoleBindingApiVersion = Nothing
  , v1alpha1ClusterRoleBindingKind = Nothing
  , v1alpha1ClusterRoleBindingMetadata = Nothing
  , v1alpha1ClusterRoleBindingRoleRef
  , v1alpha1ClusterRoleBindingSubjects = Nothing
  }

-- ** V1alpha1ClusterRoleBindingList
-- | V1alpha1ClusterRoleBindingList
-- ClusterRoleBindingList is a collection of ClusterRoleBindings
data V1alpha1ClusterRoleBindingList = V1alpha1ClusterRoleBindingList
  { v1alpha1ClusterRoleBindingListApiVersion :: !(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/api-conventions.md#resources
  , v1alpha1ClusterRoleBindingListItems :: !([V1alpha1ClusterRoleBinding]) -- ^ /Required/ "items" - Items is a list of ClusterRoleBindings
  , v1alpha1ClusterRoleBindingListKind :: !(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/api-conventions.md#types-kinds
  , v1alpha1ClusterRoleBindingListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1ClusterRoleBindingList
instance A.FromJSON V1alpha1ClusterRoleBindingList where
  parseJSON = A.withObject "V1alpha1ClusterRoleBindingList" $ \o ->
    V1alpha1ClusterRoleBindingList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1alpha1ClusterRoleBindingList
instance A.ToJSON V1alpha1ClusterRoleBindingList where
  toJSON V1alpha1ClusterRoleBindingList {..} =
   _omitNulls
      [ "apiVersion" .= v1alpha1ClusterRoleBindingListApiVersion
      , "items" .= v1alpha1ClusterRoleBindingListItems
      , "kind" .= v1alpha1ClusterRoleBindingListKind
      , "metadata" .= v1alpha1ClusterRoleBindingListMetadata
      ]


-- | Construct a value of type 'V1alpha1ClusterRoleBindingList' (by applying it's required fields, if any)
mkV1alpha1ClusterRoleBindingList
  :: [V1alpha1ClusterRoleBinding] -- ^ 'v1alpha1ClusterRoleBindingListItems': Items is a list of ClusterRoleBindings
  -> V1alpha1ClusterRoleBindingList
mkV1alpha1ClusterRoleBindingList v1alpha1ClusterRoleBindingListItems =
  V1alpha1ClusterRoleBindingList
  { v1alpha1ClusterRoleBindingListApiVersion = Nothing
  , v1alpha1ClusterRoleBindingListItems
  , v1alpha1ClusterRoleBindingListKind = Nothing
  , v1alpha1ClusterRoleBindingListMetadata = Nothing
  }

-- ** V1alpha1ClusterRoleList
-- | V1alpha1ClusterRoleList
-- ClusterRoleList is a collection of ClusterRoles
data V1alpha1ClusterRoleList = V1alpha1ClusterRoleList
  { v1alpha1ClusterRoleListApiVersion :: !(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/api-conventions.md#resources
  , v1alpha1ClusterRoleListItems :: !([V1alpha1ClusterRole]) -- ^ /Required/ "items" - Items is a list of ClusterRoles
  , v1alpha1ClusterRoleListKind :: !(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/api-conventions.md#types-kinds
  , v1alpha1ClusterRoleListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1ClusterRoleList
instance A.FromJSON V1alpha1ClusterRoleList where
  parseJSON = A.withObject "V1alpha1ClusterRoleList" $ \o ->
    V1alpha1ClusterRoleList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1alpha1ClusterRoleList
instance A.ToJSON V1alpha1ClusterRoleList where
  toJSON V1alpha1ClusterRoleList {..} =
   _omitNulls
      [ "apiVersion" .= v1alpha1ClusterRoleListApiVersion
      , "items" .= v1alpha1ClusterRoleListItems
      , "kind" .= v1alpha1ClusterRoleListKind
      , "metadata" .= v1alpha1ClusterRoleListMetadata
      ]


-- | Construct a value of type 'V1alpha1ClusterRoleList' (by applying it's required fields, if any)
mkV1alpha1ClusterRoleList
  :: [V1alpha1ClusterRole] -- ^ 'v1alpha1ClusterRoleListItems': Items is a list of ClusterRoles
  -> V1alpha1ClusterRoleList
mkV1alpha1ClusterRoleList v1alpha1ClusterRoleListItems =
  V1alpha1ClusterRoleList
  { v1alpha1ClusterRoleListApiVersion = Nothing
  , v1alpha1ClusterRoleListItems
  , v1alpha1ClusterRoleListKind = Nothing
  , v1alpha1ClusterRoleListMetadata = Nothing
  }

-- ** V1alpha1PodPreset
-- | V1alpha1PodPreset
-- PodPreset is a policy resource that defines additional runtime requirements for a Pod.
data V1alpha1PodPreset = V1alpha1PodPreset
  { v1alpha1PodPresetApiVersion :: !(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/api-conventions.md#resources
  , v1alpha1PodPresetKind :: !(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/api-conventions.md#types-kinds
  , v1alpha1PodPresetMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1alpha1PodPresetSpec :: !(Maybe V1alpha1PodPresetSpec) -- ^ "spec"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1PodPreset
instance A.FromJSON V1alpha1PodPreset where
  parseJSON = A.withObject "V1alpha1PodPreset" $ \o ->
    V1alpha1PodPreset
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")

-- | ToJSON V1alpha1PodPreset
instance A.ToJSON V1alpha1PodPreset where
  toJSON V1alpha1PodPreset {..} =
   _omitNulls
      [ "apiVersion" .= v1alpha1PodPresetApiVersion
      , "kind" .= v1alpha1PodPresetKind
      , "metadata" .= v1alpha1PodPresetMetadata
      , "spec" .= v1alpha1PodPresetSpec
      ]


-- | Construct a value of type 'V1alpha1PodPreset' (by applying it's required fields, if any)
mkV1alpha1PodPreset
  :: V1alpha1PodPreset
mkV1alpha1PodPreset =
  V1alpha1PodPreset
  { v1alpha1PodPresetApiVersion = Nothing
  , v1alpha1PodPresetKind = Nothing
  , v1alpha1PodPresetMetadata = Nothing
  , v1alpha1PodPresetSpec = Nothing
  }

-- ** V1alpha1PodPresetList
-- | V1alpha1PodPresetList
-- PodPresetList is a list of PodPreset objects.
data V1alpha1PodPresetList = V1alpha1PodPresetList
  { v1alpha1PodPresetListApiVersion :: !(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/api-conventions.md#resources
  , v1alpha1PodPresetListItems :: !([V1alpha1PodPreset]) -- ^ /Required/ "items" - Items is a list of schema objects.
  , v1alpha1PodPresetListKind :: !(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/api-conventions.md#types-kinds
  , v1alpha1PodPresetListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1PodPresetList
instance A.FromJSON V1alpha1PodPresetList where
  parseJSON = A.withObject "V1alpha1PodPresetList" $ \o ->
    V1alpha1PodPresetList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1alpha1PodPresetList
instance A.ToJSON V1alpha1PodPresetList where
  toJSON V1alpha1PodPresetList {..} =
   _omitNulls
      [ "apiVersion" .= v1alpha1PodPresetListApiVersion
      , "items" .= v1alpha1PodPresetListItems
      , "kind" .= v1alpha1PodPresetListKind
      , "metadata" .= v1alpha1PodPresetListMetadata
      ]


-- | Construct a value of type 'V1alpha1PodPresetList' (by applying it's required fields, if any)
mkV1alpha1PodPresetList
  :: [V1alpha1PodPreset] -- ^ 'v1alpha1PodPresetListItems': Items is a list of schema objects.
  -> V1alpha1PodPresetList
mkV1alpha1PodPresetList v1alpha1PodPresetListItems =
  V1alpha1PodPresetList
  { v1alpha1PodPresetListApiVersion = Nothing
  , v1alpha1PodPresetListItems
  , v1alpha1PodPresetListKind = Nothing
  , v1alpha1PodPresetListMetadata = Nothing
  }

-- ** V1alpha1PodPresetSpec
-- | V1alpha1PodPresetSpec
-- PodPresetSpec is a description of a pod preset.
data V1alpha1PodPresetSpec = V1alpha1PodPresetSpec
  { v1alpha1PodPresetSpecEnv :: !(Maybe [V1EnvVar]) -- ^ "env" - Env defines the collection of EnvVar to inject into containers.
  , v1alpha1PodPresetSpecEnvFrom :: !(Maybe [V1EnvFromSource]) -- ^ "envFrom" - EnvFrom defines the collection of EnvFromSource to inject into containers.
  , v1alpha1PodPresetSpecSelector :: !(Maybe V1LabelSelector) -- ^ "selector"
  , v1alpha1PodPresetSpecVolumeMounts :: !(Maybe [V1VolumeMount]) -- ^ "volumeMounts" - VolumeMounts defines the collection of VolumeMount to inject into containers.
  , v1alpha1PodPresetSpecVolumes :: !(Maybe [V1Volume]) -- ^ "volumes" - Volumes defines the collection of Volume to inject into the pod.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1PodPresetSpec
instance A.FromJSON V1alpha1PodPresetSpec where
  parseJSON = A.withObject "V1alpha1PodPresetSpec" $ \o ->
    V1alpha1PodPresetSpec
      <$> (o .:? "env")
      <*> (o .:? "envFrom")
      <*> (o .:? "selector")
      <*> (o .:? "volumeMounts")
      <*> (o .:? "volumes")

-- | ToJSON V1alpha1PodPresetSpec
instance A.ToJSON V1alpha1PodPresetSpec where
  toJSON V1alpha1PodPresetSpec {..} =
   _omitNulls
      [ "env" .= v1alpha1PodPresetSpecEnv
      , "envFrom" .= v1alpha1PodPresetSpecEnvFrom
      , "selector" .= v1alpha1PodPresetSpecSelector
      , "volumeMounts" .= v1alpha1PodPresetSpecVolumeMounts
      , "volumes" .= v1alpha1PodPresetSpecVolumes
      ]


-- | Construct a value of type 'V1alpha1PodPresetSpec' (by applying it's required fields, if any)
mkV1alpha1PodPresetSpec
  :: V1alpha1PodPresetSpec
mkV1alpha1PodPresetSpec =
  V1alpha1PodPresetSpec
  { v1alpha1PodPresetSpecEnv = Nothing
  , v1alpha1PodPresetSpecEnvFrom = Nothing
  , v1alpha1PodPresetSpecSelector = Nothing
  , v1alpha1PodPresetSpecVolumeMounts = Nothing
  , v1alpha1PodPresetSpecVolumes = Nothing
  }

-- ** V1alpha1Policy
-- | V1alpha1Policy
-- Policy defines the configuration of how audit events are logged
data V1alpha1Policy = V1alpha1Policy
  { v1alpha1PolicyLevel :: !(Text) -- ^ /Required/ "level" - The Level that all requests are recorded at. available options: None, Metadata, Request, RequestResponse required
  , v1alpha1PolicyStages :: !(Maybe [Text]) -- ^ "stages" - Stages is a list of stages for which events are created.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1Policy
instance A.FromJSON V1alpha1Policy where
  parseJSON = A.withObject "V1alpha1Policy" $ \o ->
    V1alpha1Policy
      <$> (o .:  "level")
      <*> (o .:? "stages")

-- | ToJSON V1alpha1Policy
instance A.ToJSON V1alpha1Policy where
  toJSON V1alpha1Policy {..} =
   _omitNulls
      [ "level" .= v1alpha1PolicyLevel
      , "stages" .= v1alpha1PolicyStages
      ]


-- | Construct a value of type 'V1alpha1Policy' (by applying it's required fields, if any)
mkV1alpha1Policy
  :: Text -- ^ 'v1alpha1PolicyLevel': The Level that all requests are recorded at. available options: None, Metadata, Request, RequestResponse required
  -> V1alpha1Policy
mkV1alpha1Policy v1alpha1PolicyLevel =
  V1alpha1Policy
  { v1alpha1PolicyLevel
  , v1alpha1PolicyStages = Nothing
  }

-- ** V1alpha1PolicyRule
-- | V1alpha1PolicyRule
-- 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 V1alpha1PolicyRule = V1alpha1PolicyRule
  { v1alpha1PolicyRuleApiGroups :: !(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.
  , v1alpha1PolicyRuleNonResourceUrLs :: !(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 This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different. 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.
  , v1alpha1PolicyRuleResourceNames :: !(Maybe [Text]) -- ^ "resourceNames" - ResourceNames is an optional white list of names that the rule applies to.  An empty set means that everything is allowed.
  , v1alpha1PolicyRuleResources :: !(Maybe [Text]) -- ^ "resources" - Resources is a list of resources this rule applies to.  ResourceAll represents all resources.
  , v1alpha1PolicyRuleVerbs :: !([Text]) -- ^ /Required/ "verbs" - Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule.  VerbAll represents all kinds.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1PolicyRule
instance A.FromJSON V1alpha1PolicyRule where
  parseJSON = A.withObject "V1alpha1PolicyRule" $ \o ->
    V1alpha1PolicyRule
      <$> (o .:? "apiGroups")
      <*> (o .:? "nonResourceURLs")
      <*> (o .:? "resourceNames")
      <*> (o .:? "resources")
      <*> (o .:  "verbs")

-- | ToJSON V1alpha1PolicyRule
instance A.ToJSON V1alpha1PolicyRule where
  toJSON V1alpha1PolicyRule {..} =
   _omitNulls
      [ "apiGroups" .= v1alpha1PolicyRuleApiGroups
      , "nonResourceURLs" .= v1alpha1PolicyRuleNonResourceUrLs
      , "resourceNames" .= v1alpha1PolicyRuleResourceNames
      , "resources" .= v1alpha1PolicyRuleResources
      , "verbs" .= v1alpha1PolicyRuleVerbs
      ]


-- | Construct a value of type 'V1alpha1PolicyRule' (by applying it's required fields, if any)
mkV1alpha1PolicyRule
  :: [Text] -- ^ 'v1alpha1PolicyRuleVerbs': Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule.  VerbAll represents all kinds.
  -> V1alpha1PolicyRule
mkV1alpha1PolicyRule v1alpha1PolicyRuleVerbs =
  V1alpha1PolicyRule
  { v1alpha1PolicyRuleApiGroups = Nothing
  , v1alpha1PolicyRuleNonResourceUrLs = Nothing
  , v1alpha1PolicyRuleResourceNames = Nothing
  , v1alpha1PolicyRuleResources = Nothing
  , v1alpha1PolicyRuleVerbs
  }

-- ** V1alpha1PriorityClass
-- | V1alpha1PriorityClass
-- DEPRECATED - This group version of PriorityClass is deprecated by scheduling.k8s.io/v1/PriorityClass. PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.
data V1alpha1PriorityClass = V1alpha1PriorityClass
  { v1alpha1PriorityClassApiVersion :: !(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/api-conventions.md#resources
  , v1alpha1PriorityClassDescription :: !(Maybe Text) -- ^ "description" - description is an arbitrary string that usually provides guidelines on when this priority class should be used.
  , v1alpha1PriorityClassGlobalDefault :: !(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.
  , v1alpha1PriorityClassKind :: !(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/api-conventions.md#types-kinds
  , v1alpha1PriorityClassMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1alpha1PriorityClassValue :: !(Int) -- ^ /Required/ "value" - The 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1PriorityClass
instance A.FromJSON V1alpha1PriorityClass where
  parseJSON = A.withObject "V1alpha1PriorityClass" $ \o ->
    V1alpha1PriorityClass
      <$> (o .:? "apiVersion")
      <*> (o .:? "description")
      <*> (o .:? "globalDefault")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:  "value")

-- | ToJSON V1alpha1PriorityClass
instance A.ToJSON V1alpha1PriorityClass where
  toJSON V1alpha1PriorityClass {..} =
   _omitNulls
      [ "apiVersion" .= v1alpha1PriorityClassApiVersion
      , "description" .= v1alpha1PriorityClassDescription
      , "globalDefault" .= v1alpha1PriorityClassGlobalDefault
      , "kind" .= v1alpha1PriorityClassKind
      , "metadata" .= v1alpha1PriorityClassMetadata
      , "value" .= v1alpha1PriorityClassValue
      ]


-- | Construct a value of type 'V1alpha1PriorityClass' (by applying it's required fields, if any)
mkV1alpha1PriorityClass
  :: Int -- ^ 'v1alpha1PriorityClassValue': The 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.
  -> V1alpha1PriorityClass
mkV1alpha1PriorityClass v1alpha1PriorityClassValue =
  V1alpha1PriorityClass
  { v1alpha1PriorityClassApiVersion = Nothing
  , v1alpha1PriorityClassDescription = Nothing
  , v1alpha1PriorityClassGlobalDefault = Nothing
  , v1alpha1PriorityClassKind = Nothing
  , v1alpha1PriorityClassMetadata = Nothing
  , v1alpha1PriorityClassValue
  }

-- ** V1alpha1PriorityClassList
-- | V1alpha1PriorityClassList
-- PriorityClassList is a collection of priority classes.
data V1alpha1PriorityClassList = V1alpha1PriorityClassList
  { v1alpha1PriorityClassListApiVersion :: !(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/api-conventions.md#resources
  , v1alpha1PriorityClassListItems :: !([V1alpha1PriorityClass]) -- ^ /Required/ "items" - items is the list of PriorityClasses
  , v1alpha1PriorityClassListKind :: !(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/api-conventions.md#types-kinds
  , v1alpha1PriorityClassListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1PriorityClassList
instance A.FromJSON V1alpha1PriorityClassList where
  parseJSON = A.withObject "V1alpha1PriorityClassList" $ \o ->
    V1alpha1PriorityClassList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1alpha1PriorityClassList
instance A.ToJSON V1alpha1PriorityClassList where
  toJSON V1alpha1PriorityClassList {..} =
   _omitNulls
      [ "apiVersion" .= v1alpha1PriorityClassListApiVersion
      , "items" .= v1alpha1PriorityClassListItems
      , "kind" .= v1alpha1PriorityClassListKind
      , "metadata" .= v1alpha1PriorityClassListMetadata
      ]


-- | Construct a value of type 'V1alpha1PriorityClassList' (by applying it's required fields, if any)
mkV1alpha1PriorityClassList
  :: [V1alpha1PriorityClass] -- ^ 'v1alpha1PriorityClassListItems': items is the list of PriorityClasses
  -> V1alpha1PriorityClassList
mkV1alpha1PriorityClassList v1alpha1PriorityClassListItems =
  V1alpha1PriorityClassList
  { v1alpha1PriorityClassListApiVersion = Nothing
  , v1alpha1PriorityClassListItems
  , v1alpha1PriorityClassListKind = Nothing
  , v1alpha1PriorityClassListMetadata = Nothing
  }

-- ** V1alpha1Role
-- | V1alpha1Role
-- Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
data V1alpha1Role = V1alpha1Role
  { v1alpha1RoleApiVersion :: !(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/api-conventions.md#resources
  , v1alpha1RoleKind :: !(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/api-conventions.md#types-kinds
  , v1alpha1RoleMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1alpha1RoleRules :: !(Maybe [V1alpha1PolicyRule]) -- ^ "rules" - Rules holds all the PolicyRules for this Role
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1Role
instance A.FromJSON V1alpha1Role where
  parseJSON = A.withObject "V1alpha1Role" $ \o ->
    V1alpha1Role
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "rules")

-- | ToJSON V1alpha1Role
instance A.ToJSON V1alpha1Role where
  toJSON V1alpha1Role {..} =
   _omitNulls
      [ "apiVersion" .= v1alpha1RoleApiVersion
      , "kind" .= v1alpha1RoleKind
      , "metadata" .= v1alpha1RoleMetadata
      , "rules" .= v1alpha1RoleRules
      ]


-- | Construct a value of type 'V1alpha1Role' (by applying it's required fields, if any)
mkV1alpha1Role
  :: V1alpha1Role
mkV1alpha1Role =
  V1alpha1Role
  { v1alpha1RoleApiVersion = Nothing
  , v1alpha1RoleKind = Nothing
  , v1alpha1RoleMetadata = Nothing
  , v1alpha1RoleRules = Nothing
  }

-- ** V1alpha1RoleBinding
-- | V1alpha1RoleBinding
-- 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 V1alpha1RoleBinding = V1alpha1RoleBinding
  { v1alpha1RoleBindingApiVersion :: !(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/api-conventions.md#resources
  , v1alpha1RoleBindingKind :: !(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/api-conventions.md#types-kinds
  , v1alpha1RoleBindingMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1alpha1RoleBindingRoleRef :: !(V1alpha1RoleRef) -- ^ /Required/ "roleRef"
  , v1alpha1RoleBindingSubjects :: !(Maybe [V1alpha1Subject]) -- ^ "subjects" - Subjects holds references to the objects the role applies to.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1RoleBinding
instance A.FromJSON V1alpha1RoleBinding where
  parseJSON = A.withObject "V1alpha1RoleBinding" $ \o ->
    V1alpha1RoleBinding
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:  "roleRef")
      <*> (o .:? "subjects")

-- | ToJSON V1alpha1RoleBinding
instance A.ToJSON V1alpha1RoleBinding where
  toJSON V1alpha1RoleBinding {..} =
   _omitNulls
      [ "apiVersion" .= v1alpha1RoleBindingApiVersion
      , "kind" .= v1alpha1RoleBindingKind
      , "metadata" .= v1alpha1RoleBindingMetadata
      , "roleRef" .= v1alpha1RoleBindingRoleRef
      , "subjects" .= v1alpha1RoleBindingSubjects
      ]


-- | Construct a value of type 'V1alpha1RoleBinding' (by applying it's required fields, if any)
mkV1alpha1RoleBinding
  :: V1alpha1RoleRef -- ^ 'v1alpha1RoleBindingRoleRef' 
  -> V1alpha1RoleBinding
mkV1alpha1RoleBinding v1alpha1RoleBindingRoleRef =
  V1alpha1RoleBinding
  { v1alpha1RoleBindingApiVersion = Nothing
  , v1alpha1RoleBindingKind = Nothing
  , v1alpha1RoleBindingMetadata = Nothing
  , v1alpha1RoleBindingRoleRef
  , v1alpha1RoleBindingSubjects = Nothing
  }

-- ** V1alpha1RoleBindingList
-- | V1alpha1RoleBindingList
-- RoleBindingList is a collection of RoleBindings
data V1alpha1RoleBindingList = V1alpha1RoleBindingList
  { v1alpha1RoleBindingListApiVersion :: !(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/api-conventions.md#resources
  , v1alpha1RoleBindingListItems :: !([V1alpha1RoleBinding]) -- ^ /Required/ "items" - Items is a list of RoleBindings
  , v1alpha1RoleBindingListKind :: !(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/api-conventions.md#types-kinds
  , v1alpha1RoleBindingListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1RoleBindingList
instance A.FromJSON V1alpha1RoleBindingList where
  parseJSON = A.withObject "V1alpha1RoleBindingList" $ \o ->
    V1alpha1RoleBindingList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1alpha1RoleBindingList
instance A.ToJSON V1alpha1RoleBindingList where
  toJSON V1alpha1RoleBindingList {..} =
   _omitNulls
      [ "apiVersion" .= v1alpha1RoleBindingListApiVersion
      , "items" .= v1alpha1RoleBindingListItems
      , "kind" .= v1alpha1RoleBindingListKind
      , "metadata" .= v1alpha1RoleBindingListMetadata
      ]


-- | Construct a value of type 'V1alpha1RoleBindingList' (by applying it's required fields, if any)
mkV1alpha1RoleBindingList
  :: [V1alpha1RoleBinding] -- ^ 'v1alpha1RoleBindingListItems': Items is a list of RoleBindings
  -> V1alpha1RoleBindingList
mkV1alpha1RoleBindingList v1alpha1RoleBindingListItems =
  V1alpha1RoleBindingList
  { v1alpha1RoleBindingListApiVersion = Nothing
  , v1alpha1RoleBindingListItems
  , v1alpha1RoleBindingListKind = Nothing
  , v1alpha1RoleBindingListMetadata = Nothing
  }

-- ** V1alpha1RoleList
-- | V1alpha1RoleList
-- RoleList is a collection of Roles
data V1alpha1RoleList = V1alpha1RoleList
  { v1alpha1RoleListApiVersion :: !(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/api-conventions.md#resources
  , v1alpha1RoleListItems :: !([V1alpha1Role]) -- ^ /Required/ "items" - Items is a list of Roles
  , v1alpha1RoleListKind :: !(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/api-conventions.md#types-kinds
  , v1alpha1RoleListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1RoleList
instance A.FromJSON V1alpha1RoleList where
  parseJSON = A.withObject "V1alpha1RoleList" $ \o ->
    V1alpha1RoleList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1alpha1RoleList
instance A.ToJSON V1alpha1RoleList where
  toJSON V1alpha1RoleList {..} =
   _omitNulls
      [ "apiVersion" .= v1alpha1RoleListApiVersion
      , "items" .= v1alpha1RoleListItems
      , "kind" .= v1alpha1RoleListKind
      , "metadata" .= v1alpha1RoleListMetadata
      ]


-- | Construct a value of type 'V1alpha1RoleList' (by applying it's required fields, if any)
mkV1alpha1RoleList
  :: [V1alpha1Role] -- ^ 'v1alpha1RoleListItems': Items is a list of Roles
  -> V1alpha1RoleList
mkV1alpha1RoleList v1alpha1RoleListItems =
  V1alpha1RoleList
  { v1alpha1RoleListApiVersion = Nothing
  , v1alpha1RoleListItems
  , v1alpha1RoleListKind = Nothing
  , v1alpha1RoleListMetadata = Nothing
  }

-- ** V1alpha1RoleRef
-- | V1alpha1RoleRef
-- RoleRef contains information that points to the role being used
data V1alpha1RoleRef = V1alpha1RoleRef
  { v1alpha1RoleRefApiGroup :: !(Text) -- ^ /Required/ "apiGroup" - APIGroup is the group for the resource being referenced
  , v1alpha1RoleRefKind :: !(Text) -- ^ /Required/ "kind" - Kind is the type of resource being referenced
  , v1alpha1RoleRefName :: !(Text) -- ^ /Required/ "name" - Name is the name of resource being referenced
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1RoleRef
instance A.FromJSON V1alpha1RoleRef where
  parseJSON = A.withObject "V1alpha1RoleRef" $ \o ->
    V1alpha1RoleRef
      <$> (o .:  "apiGroup")
      <*> (o .:  "kind")
      <*> (o .:  "name")

-- | ToJSON V1alpha1RoleRef
instance A.ToJSON V1alpha1RoleRef where
  toJSON V1alpha1RoleRef {..} =
   _omitNulls
      [ "apiGroup" .= v1alpha1RoleRefApiGroup
      , "kind" .= v1alpha1RoleRefKind
      , "name" .= v1alpha1RoleRefName
      ]


-- | Construct a value of type 'V1alpha1RoleRef' (by applying it's required fields, if any)
mkV1alpha1RoleRef
  :: Text -- ^ 'v1alpha1RoleRefApiGroup': APIGroup is the group for the resource being referenced
  -> Text -- ^ 'v1alpha1RoleRefKind': Kind is the type of resource being referenced
  -> Text -- ^ 'v1alpha1RoleRefName': Name is the name of resource being referenced
  -> V1alpha1RoleRef
mkV1alpha1RoleRef v1alpha1RoleRefApiGroup v1alpha1RoleRefKind v1alpha1RoleRefName =
  V1alpha1RoleRef
  { v1alpha1RoleRefApiGroup
  , v1alpha1RoleRefKind
  , v1alpha1RoleRefName
  }

-- ** V1alpha1RuntimeClass
-- | V1alpha1RuntimeClass
-- 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 (currently) 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://git.k8s.io/enhancements/keps/sig-node/runtime-class.md
data V1alpha1RuntimeClass = V1alpha1RuntimeClass
  { v1alpha1RuntimeClassApiVersion :: !(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/api-conventions.md#resources
  , v1alpha1RuntimeClassKind :: !(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/api-conventions.md#types-kinds
  , v1alpha1RuntimeClassMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1alpha1RuntimeClassSpec :: !(V1alpha1RuntimeClassSpec) -- ^ /Required/ "spec"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1RuntimeClass
instance A.FromJSON V1alpha1RuntimeClass where
  parseJSON = A.withObject "V1alpha1RuntimeClass" $ \o ->
    V1alpha1RuntimeClass
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:  "spec")

-- | ToJSON V1alpha1RuntimeClass
instance A.ToJSON V1alpha1RuntimeClass where
  toJSON V1alpha1RuntimeClass {..} =
   _omitNulls
      [ "apiVersion" .= v1alpha1RuntimeClassApiVersion
      , "kind" .= v1alpha1RuntimeClassKind
      , "metadata" .= v1alpha1RuntimeClassMetadata
      , "spec" .= v1alpha1RuntimeClassSpec
      ]


-- | Construct a value of type 'V1alpha1RuntimeClass' (by applying it's required fields, if any)
mkV1alpha1RuntimeClass
  :: V1alpha1RuntimeClassSpec -- ^ 'v1alpha1RuntimeClassSpec' 
  -> V1alpha1RuntimeClass
mkV1alpha1RuntimeClass v1alpha1RuntimeClassSpec =
  V1alpha1RuntimeClass
  { v1alpha1RuntimeClassApiVersion = Nothing
  , v1alpha1RuntimeClassKind = Nothing
  , v1alpha1RuntimeClassMetadata = Nothing
  , v1alpha1RuntimeClassSpec
  }

-- ** V1alpha1RuntimeClassList
-- | V1alpha1RuntimeClassList
-- RuntimeClassList is a list of RuntimeClass objects.
data V1alpha1RuntimeClassList = V1alpha1RuntimeClassList
  { v1alpha1RuntimeClassListApiVersion :: !(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/api-conventions.md#resources
  , v1alpha1RuntimeClassListItems :: !([V1alpha1RuntimeClass]) -- ^ /Required/ "items" - Items is a list of schema objects.
  , v1alpha1RuntimeClassListKind :: !(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/api-conventions.md#types-kinds
  , v1alpha1RuntimeClassListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1RuntimeClassList
instance A.FromJSON V1alpha1RuntimeClassList where
  parseJSON = A.withObject "V1alpha1RuntimeClassList" $ \o ->
    V1alpha1RuntimeClassList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1alpha1RuntimeClassList
instance A.ToJSON V1alpha1RuntimeClassList where
  toJSON V1alpha1RuntimeClassList {..} =
   _omitNulls
      [ "apiVersion" .= v1alpha1RuntimeClassListApiVersion
      , "items" .= v1alpha1RuntimeClassListItems
      , "kind" .= v1alpha1RuntimeClassListKind
      , "metadata" .= v1alpha1RuntimeClassListMetadata
      ]


-- | Construct a value of type 'V1alpha1RuntimeClassList' (by applying it's required fields, if any)
mkV1alpha1RuntimeClassList
  :: [V1alpha1RuntimeClass] -- ^ 'v1alpha1RuntimeClassListItems': Items is a list of schema objects.
  -> V1alpha1RuntimeClassList
mkV1alpha1RuntimeClassList v1alpha1RuntimeClassListItems =
  V1alpha1RuntimeClassList
  { v1alpha1RuntimeClassListApiVersion = Nothing
  , v1alpha1RuntimeClassListItems
  , v1alpha1RuntimeClassListKind = Nothing
  , v1alpha1RuntimeClassListMetadata = Nothing
  }

-- ** V1alpha1RuntimeClassSpec
-- | V1alpha1RuntimeClassSpec
-- RuntimeClassSpec is a specification of a RuntimeClass. It contains parameters that are required to describe the RuntimeClass to the Container Runtime Interface (CRI) implementation, as well as any other components that need to understand how the pod will be run. The RuntimeClassSpec is immutable.
data V1alpha1RuntimeClassSpec = V1alpha1RuntimeClassSpec
  { v1alpha1RuntimeClassSpecRuntimeHandler :: !(Text) -- ^ /Required/ "runtimeHandler" - RuntimeHandler 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 RuntimeHandler must conform to the DNS Label (RFC 1123) requirements and is immutable.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1RuntimeClassSpec
instance A.FromJSON V1alpha1RuntimeClassSpec where
  parseJSON = A.withObject "V1alpha1RuntimeClassSpec" $ \o ->
    V1alpha1RuntimeClassSpec
      <$> (o .:  "runtimeHandler")

-- | ToJSON V1alpha1RuntimeClassSpec
instance A.ToJSON V1alpha1RuntimeClassSpec where
  toJSON V1alpha1RuntimeClassSpec {..} =
   _omitNulls
      [ "runtimeHandler" .= v1alpha1RuntimeClassSpecRuntimeHandler
      ]


-- | Construct a value of type 'V1alpha1RuntimeClassSpec' (by applying it's required fields, if any)
mkV1alpha1RuntimeClassSpec
  :: Text -- ^ 'v1alpha1RuntimeClassSpecRuntimeHandler': RuntimeHandler 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 RuntimeHandler must conform to the DNS Label (RFC 1123) requirements and is immutable.
  -> V1alpha1RuntimeClassSpec
mkV1alpha1RuntimeClassSpec v1alpha1RuntimeClassSpecRuntimeHandler =
  V1alpha1RuntimeClassSpec
  { v1alpha1RuntimeClassSpecRuntimeHandler
  }

-- ** V1alpha1ServiceReference
-- | V1alpha1ServiceReference
-- ServiceReference holds a reference to Service.legacy.k8s.io
data V1alpha1ServiceReference = V1alpha1ServiceReference
  { v1alpha1ServiceReferenceName :: !(Text) -- ^ /Required/ "name" - &#x60;name&#x60; is the name of the service. Required
  , v1alpha1ServiceReferenceNamespace :: !(Text) -- ^ /Required/ "namespace" - &#x60;namespace&#x60; is the namespace of the service. Required
  , v1alpha1ServiceReferencePath :: !(Maybe Text) -- ^ "path" - &#x60;path&#x60; is an optional URL path which will be sent in any request to this service.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1ServiceReference
instance A.FromJSON V1alpha1ServiceReference where
  parseJSON = A.withObject "V1alpha1ServiceReference" $ \o ->
    V1alpha1ServiceReference
      <$> (o .:  "name")
      <*> (o .:  "namespace")
      <*> (o .:? "path")

-- | ToJSON V1alpha1ServiceReference
instance A.ToJSON V1alpha1ServiceReference where
  toJSON V1alpha1ServiceReference {..} =
   _omitNulls
      [ "name" .= v1alpha1ServiceReferenceName
      , "namespace" .= v1alpha1ServiceReferenceNamespace
      , "path" .= v1alpha1ServiceReferencePath
      ]


-- | Construct a value of type 'V1alpha1ServiceReference' (by applying it's required fields, if any)
mkV1alpha1ServiceReference
  :: Text -- ^ 'v1alpha1ServiceReferenceName': `name` is the name of the service. Required
  -> Text -- ^ 'v1alpha1ServiceReferenceNamespace': `namespace` is the namespace of the service. Required
  -> V1alpha1ServiceReference
mkV1alpha1ServiceReference v1alpha1ServiceReferenceName v1alpha1ServiceReferenceNamespace =
  V1alpha1ServiceReference
  { v1alpha1ServiceReferenceName
  , v1alpha1ServiceReferenceNamespace
  , v1alpha1ServiceReferencePath = Nothing
  }

-- ** V1alpha1Subject
-- | V1alpha1Subject
-- 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 V1alpha1Subject = V1alpha1Subject
  { v1alpha1SubjectApiVersion :: !(Maybe Text) -- ^ "apiVersion" - APIVersion holds the API group and version of the referenced subject. Defaults to \&quot;v1\&quot; for ServiceAccount subjects. Defaults to \&quot;rbac.authorization.k8s.io/v1alpha1\&quot; for User and Group subjects.
  , v1alpha1SubjectKind :: !(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.
  , v1alpha1SubjectName :: !(Text) -- ^ /Required/ "name" - Name of the object being referenced.
  , v1alpha1SubjectNamespace :: !(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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1Subject
instance A.FromJSON V1alpha1Subject where
  parseJSON = A.withObject "V1alpha1Subject" $ \o ->
    V1alpha1Subject
      <$> (o .:? "apiVersion")
      <*> (o .:  "kind")
      <*> (o .:  "name")
      <*> (o .:? "namespace")

-- | ToJSON V1alpha1Subject
instance A.ToJSON V1alpha1Subject where
  toJSON V1alpha1Subject {..} =
   _omitNulls
      [ "apiVersion" .= v1alpha1SubjectApiVersion
      , "kind" .= v1alpha1SubjectKind
      , "name" .= v1alpha1SubjectName
      , "namespace" .= v1alpha1SubjectNamespace
      ]


-- | Construct a value of type 'V1alpha1Subject' (by applying it's required fields, if any)
mkV1alpha1Subject
  :: Text -- ^ 'v1alpha1SubjectKind': 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 -- ^ 'v1alpha1SubjectName': Name of the object being referenced.
  -> V1alpha1Subject
mkV1alpha1Subject v1alpha1SubjectKind v1alpha1SubjectName =
  V1alpha1Subject
  { v1alpha1SubjectApiVersion = Nothing
  , v1alpha1SubjectKind
  , v1alpha1SubjectName
  , v1alpha1SubjectNamespace = Nothing
  }

-- ** V1alpha1VolumeAttachment
-- | V1alpha1VolumeAttachment
-- VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.  VolumeAttachment objects are non-namespaced.
data V1alpha1VolumeAttachment = V1alpha1VolumeAttachment
  { v1alpha1VolumeAttachmentApiVersion :: !(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/api-conventions.md#resources
  , v1alpha1VolumeAttachmentKind :: !(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/api-conventions.md#types-kinds
  , v1alpha1VolumeAttachmentMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1alpha1VolumeAttachmentSpec :: !(V1alpha1VolumeAttachmentSpec) -- ^ /Required/ "spec"
  , v1alpha1VolumeAttachmentStatus :: !(Maybe V1alpha1VolumeAttachmentStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1VolumeAttachment
instance A.FromJSON V1alpha1VolumeAttachment where
  parseJSON = A.withObject "V1alpha1VolumeAttachment" $ \o ->
    V1alpha1VolumeAttachment
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:  "spec")
      <*> (o .:? "status")

-- | ToJSON V1alpha1VolumeAttachment
instance A.ToJSON V1alpha1VolumeAttachment where
  toJSON V1alpha1VolumeAttachment {..} =
   _omitNulls
      [ "apiVersion" .= v1alpha1VolumeAttachmentApiVersion
      , "kind" .= v1alpha1VolumeAttachmentKind
      , "metadata" .= v1alpha1VolumeAttachmentMetadata
      , "spec" .= v1alpha1VolumeAttachmentSpec
      , "status" .= v1alpha1VolumeAttachmentStatus
      ]


-- | Construct a value of type 'V1alpha1VolumeAttachment' (by applying it's required fields, if any)
mkV1alpha1VolumeAttachment
  :: V1alpha1VolumeAttachmentSpec -- ^ 'v1alpha1VolumeAttachmentSpec' 
  -> V1alpha1VolumeAttachment
mkV1alpha1VolumeAttachment v1alpha1VolumeAttachmentSpec =
  V1alpha1VolumeAttachment
  { v1alpha1VolumeAttachmentApiVersion = Nothing
  , v1alpha1VolumeAttachmentKind = Nothing
  , v1alpha1VolumeAttachmentMetadata = Nothing
  , v1alpha1VolumeAttachmentSpec
  , v1alpha1VolumeAttachmentStatus = Nothing
  }

-- ** V1alpha1VolumeAttachmentList
-- | V1alpha1VolumeAttachmentList
-- VolumeAttachmentList is a collection of VolumeAttachment objects.
data V1alpha1VolumeAttachmentList = V1alpha1VolumeAttachmentList
  { v1alpha1VolumeAttachmentListApiVersion :: !(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/api-conventions.md#resources
  , v1alpha1VolumeAttachmentListItems :: !([V1alpha1VolumeAttachment]) -- ^ /Required/ "items" - Items is the list of VolumeAttachments
  , v1alpha1VolumeAttachmentListKind :: !(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/api-conventions.md#types-kinds
  , v1alpha1VolumeAttachmentListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1VolumeAttachmentList
instance A.FromJSON V1alpha1VolumeAttachmentList where
  parseJSON = A.withObject "V1alpha1VolumeAttachmentList" $ \o ->
    V1alpha1VolumeAttachmentList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1alpha1VolumeAttachmentList
instance A.ToJSON V1alpha1VolumeAttachmentList where
  toJSON V1alpha1VolumeAttachmentList {..} =
   _omitNulls
      [ "apiVersion" .= v1alpha1VolumeAttachmentListApiVersion
      , "items" .= v1alpha1VolumeAttachmentListItems
      , "kind" .= v1alpha1VolumeAttachmentListKind
      , "metadata" .= v1alpha1VolumeAttachmentListMetadata
      ]


-- | Construct a value of type 'V1alpha1VolumeAttachmentList' (by applying it's required fields, if any)
mkV1alpha1VolumeAttachmentList
  :: [V1alpha1VolumeAttachment] -- ^ 'v1alpha1VolumeAttachmentListItems': Items is the list of VolumeAttachments
  -> V1alpha1VolumeAttachmentList
mkV1alpha1VolumeAttachmentList v1alpha1VolumeAttachmentListItems =
  V1alpha1VolumeAttachmentList
  { v1alpha1VolumeAttachmentListApiVersion = Nothing
  , v1alpha1VolumeAttachmentListItems
  , v1alpha1VolumeAttachmentListKind = Nothing
  , v1alpha1VolumeAttachmentListMetadata = Nothing
  }

-- ** V1alpha1VolumeAttachmentSource
-- | V1alpha1VolumeAttachmentSource
-- VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.
data V1alpha1VolumeAttachmentSource = V1alpha1VolumeAttachmentSource
  { v1alpha1VolumeAttachmentSourcePersistentVolumeName :: !(Maybe Text) -- ^ "persistentVolumeName" - Name of the persistent volume to attach.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1VolumeAttachmentSource
instance A.FromJSON V1alpha1VolumeAttachmentSource where
  parseJSON = A.withObject "V1alpha1VolumeAttachmentSource" $ \o ->
    V1alpha1VolumeAttachmentSource
      <$> (o .:? "persistentVolumeName")

-- | ToJSON V1alpha1VolumeAttachmentSource
instance A.ToJSON V1alpha1VolumeAttachmentSource where
  toJSON V1alpha1VolumeAttachmentSource {..} =
   _omitNulls
      [ "persistentVolumeName" .= v1alpha1VolumeAttachmentSourcePersistentVolumeName
      ]


-- | Construct a value of type 'V1alpha1VolumeAttachmentSource' (by applying it's required fields, if any)
mkV1alpha1VolumeAttachmentSource
  :: V1alpha1VolumeAttachmentSource
mkV1alpha1VolumeAttachmentSource =
  V1alpha1VolumeAttachmentSource
  { v1alpha1VolumeAttachmentSourcePersistentVolumeName = Nothing
  }

-- ** V1alpha1VolumeAttachmentSpec
-- | V1alpha1VolumeAttachmentSpec
-- VolumeAttachmentSpec is the specification of a VolumeAttachment request.
data V1alpha1VolumeAttachmentSpec = V1alpha1VolumeAttachmentSpec
  { v1alpha1VolumeAttachmentSpecAttacher :: !(Text) -- ^ /Required/ "attacher" - Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().
  , v1alpha1VolumeAttachmentSpecNodeName :: !(Text) -- ^ /Required/ "nodeName" - The node that the volume should be attached to.
  , v1alpha1VolumeAttachmentSpecSource :: !(V1alpha1VolumeAttachmentSource) -- ^ /Required/ "source"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1VolumeAttachmentSpec
instance A.FromJSON V1alpha1VolumeAttachmentSpec where
  parseJSON = A.withObject "V1alpha1VolumeAttachmentSpec" $ \o ->
    V1alpha1VolumeAttachmentSpec
      <$> (o .:  "attacher")
      <*> (o .:  "nodeName")
      <*> (o .:  "source")

-- | ToJSON V1alpha1VolumeAttachmentSpec
instance A.ToJSON V1alpha1VolumeAttachmentSpec where
  toJSON V1alpha1VolumeAttachmentSpec {..} =
   _omitNulls
      [ "attacher" .= v1alpha1VolumeAttachmentSpecAttacher
      , "nodeName" .= v1alpha1VolumeAttachmentSpecNodeName
      , "source" .= v1alpha1VolumeAttachmentSpecSource
      ]


-- | Construct a value of type 'V1alpha1VolumeAttachmentSpec' (by applying it's required fields, if any)
mkV1alpha1VolumeAttachmentSpec
  :: Text -- ^ 'v1alpha1VolumeAttachmentSpecAttacher': Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().
  -> Text -- ^ 'v1alpha1VolumeAttachmentSpecNodeName': The node that the volume should be attached to.
  -> V1alpha1VolumeAttachmentSource -- ^ 'v1alpha1VolumeAttachmentSpecSource' 
  -> V1alpha1VolumeAttachmentSpec
mkV1alpha1VolumeAttachmentSpec v1alpha1VolumeAttachmentSpecAttacher v1alpha1VolumeAttachmentSpecNodeName v1alpha1VolumeAttachmentSpecSource =
  V1alpha1VolumeAttachmentSpec
  { v1alpha1VolumeAttachmentSpecAttacher
  , v1alpha1VolumeAttachmentSpecNodeName
  , v1alpha1VolumeAttachmentSpecSource
  }

-- ** V1alpha1VolumeAttachmentStatus
-- | V1alpha1VolumeAttachmentStatus
-- VolumeAttachmentStatus is the status of a VolumeAttachment request.
data V1alpha1VolumeAttachmentStatus = V1alpha1VolumeAttachmentStatus
  { v1alpha1VolumeAttachmentStatusAttachError :: !(Maybe V1alpha1VolumeError) -- ^ "attachError"
  , v1alpha1VolumeAttachmentStatusAttached :: !(Bool) -- ^ /Required/ "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.
  , v1alpha1VolumeAttachmentStatusAttachmentMetadata :: !(Maybe (Map.Map String Text)) -- ^ "attachmentMetadata" - Upon successful attach, this field is populated with any information returned by the attach operation 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.
  , v1alpha1VolumeAttachmentStatusDetachError :: !(Maybe V1alpha1VolumeError) -- ^ "detachError"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1VolumeAttachmentStatus
instance A.FromJSON V1alpha1VolumeAttachmentStatus where
  parseJSON = A.withObject "V1alpha1VolumeAttachmentStatus" $ \o ->
    V1alpha1VolumeAttachmentStatus
      <$> (o .:? "attachError")
      <*> (o .:  "attached")
      <*> (o .:? "attachmentMetadata")
      <*> (o .:? "detachError")

-- | ToJSON V1alpha1VolumeAttachmentStatus
instance A.ToJSON V1alpha1VolumeAttachmentStatus where
  toJSON V1alpha1VolumeAttachmentStatus {..} =
   _omitNulls
      [ "attachError" .= v1alpha1VolumeAttachmentStatusAttachError
      , "attached" .= v1alpha1VolumeAttachmentStatusAttached
      , "attachmentMetadata" .= v1alpha1VolumeAttachmentStatusAttachmentMetadata
      , "detachError" .= v1alpha1VolumeAttachmentStatusDetachError
      ]


-- | Construct a value of type 'V1alpha1VolumeAttachmentStatus' (by applying it's required fields, if any)
mkV1alpha1VolumeAttachmentStatus
  :: Bool -- ^ 'v1alpha1VolumeAttachmentStatusAttached': Indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.
  -> V1alpha1VolumeAttachmentStatus
mkV1alpha1VolumeAttachmentStatus v1alpha1VolumeAttachmentStatusAttached =
  V1alpha1VolumeAttachmentStatus
  { v1alpha1VolumeAttachmentStatusAttachError = Nothing
  , v1alpha1VolumeAttachmentStatusAttached
  , v1alpha1VolumeAttachmentStatusAttachmentMetadata = Nothing
  , v1alpha1VolumeAttachmentStatusDetachError = Nothing
  }

-- ** V1alpha1VolumeError
-- | V1alpha1VolumeError
-- VolumeError captures an error encountered during a volume operation.
data V1alpha1VolumeError = V1alpha1VolumeError
  { v1alpha1VolumeErrorMessage :: !(Maybe Text) -- ^ "message" - String detailing the error encountered during Attach or Detach operation. This string maybe logged, so it should not contain sensitive information.
  , v1alpha1VolumeErrorTime :: !(Maybe DateTime) -- ^ "time" - Time the error was encountered.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1VolumeError
instance A.FromJSON V1alpha1VolumeError where
  parseJSON = A.withObject "V1alpha1VolumeError" $ \o ->
    V1alpha1VolumeError
      <$> (o .:? "message")
      <*> (o .:? "time")

-- | ToJSON V1alpha1VolumeError
instance A.ToJSON V1alpha1VolumeError where
  toJSON V1alpha1VolumeError {..} =
   _omitNulls
      [ "message" .= v1alpha1VolumeErrorMessage
      , "time" .= v1alpha1VolumeErrorTime
      ]


-- | Construct a value of type 'V1alpha1VolumeError' (by applying it's required fields, if any)
mkV1alpha1VolumeError
  :: V1alpha1VolumeError
mkV1alpha1VolumeError =
  V1alpha1VolumeError
  { v1alpha1VolumeErrorMessage = Nothing
  , v1alpha1VolumeErrorTime = Nothing
  }

-- ** V1alpha1Webhook
-- | V1alpha1Webhook
-- Webhook holds the configuration of the webhook
data V1alpha1Webhook = V1alpha1Webhook
  { v1alpha1WebhookClientConfig :: !(V1alpha1WebhookClientConfig) -- ^ /Required/ "clientConfig"
  , v1alpha1WebhookThrottle :: !(Maybe V1alpha1WebhookThrottleConfig) -- ^ "throttle"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1Webhook
instance A.FromJSON V1alpha1Webhook where
  parseJSON = A.withObject "V1alpha1Webhook" $ \o ->
    V1alpha1Webhook
      <$> (o .:  "clientConfig")
      <*> (o .:? "throttle")

-- | ToJSON V1alpha1Webhook
instance A.ToJSON V1alpha1Webhook where
  toJSON V1alpha1Webhook {..} =
   _omitNulls
      [ "clientConfig" .= v1alpha1WebhookClientConfig
      , "throttle" .= v1alpha1WebhookThrottle
      ]


-- | Construct a value of type 'V1alpha1Webhook' (by applying it's required fields, if any)
mkV1alpha1Webhook
  :: V1alpha1WebhookClientConfig -- ^ 'v1alpha1WebhookClientConfig' 
  -> V1alpha1Webhook
mkV1alpha1Webhook v1alpha1WebhookClientConfig =
  V1alpha1Webhook
  { v1alpha1WebhookClientConfig
  , v1alpha1WebhookThrottle = Nothing
  }

-- ** V1alpha1WebhookClientConfig
-- | V1alpha1WebhookClientConfig
-- WebhookClientConfig contains the information to make a connection with the webhook
data V1alpha1WebhookClientConfig = V1alpha1WebhookClientConfig
  { v1alpha1WebhookClientConfigCaBundle :: !(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.
  , v1alpha1WebhookClientConfigService :: !(Maybe V1alpha1ServiceReference) -- ^ "service"
  , v1alpha1WebhookClientConfigUrl :: !(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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1WebhookClientConfig
instance A.FromJSON V1alpha1WebhookClientConfig where
  parseJSON = A.withObject "V1alpha1WebhookClientConfig" $ \o ->
    V1alpha1WebhookClientConfig
      <$> (o .:? "caBundle")
      <*> (o .:? "service")
      <*> (o .:? "url")

-- | ToJSON V1alpha1WebhookClientConfig
instance A.ToJSON V1alpha1WebhookClientConfig where
  toJSON V1alpha1WebhookClientConfig {..} =
   _omitNulls
      [ "caBundle" .= v1alpha1WebhookClientConfigCaBundle
      , "service" .= v1alpha1WebhookClientConfigService
      , "url" .= v1alpha1WebhookClientConfigUrl
      ]


-- | Construct a value of type 'V1alpha1WebhookClientConfig' (by applying it's required fields, if any)
mkV1alpha1WebhookClientConfig
  :: V1alpha1WebhookClientConfig
mkV1alpha1WebhookClientConfig =
  V1alpha1WebhookClientConfig
  { v1alpha1WebhookClientConfigCaBundle = Nothing
  , v1alpha1WebhookClientConfigService = Nothing
  , v1alpha1WebhookClientConfigUrl = Nothing
  }

-- ** V1alpha1WebhookThrottleConfig
-- | V1alpha1WebhookThrottleConfig
-- WebhookThrottleConfig holds the configuration for throttling events
data V1alpha1WebhookThrottleConfig = V1alpha1WebhookThrottleConfig
  { v1alpha1WebhookThrottleConfigBurst :: !(Maybe Integer) -- ^ "burst" - ThrottleBurst is the maximum number of events sent at the same moment default 15 QPS
  , v1alpha1WebhookThrottleConfigQps :: !(Maybe Integer) -- ^ "qps" - ThrottleQPS maximum number of batches per second default 10 QPS
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1alpha1WebhookThrottleConfig
instance A.FromJSON V1alpha1WebhookThrottleConfig where
  parseJSON = A.withObject "V1alpha1WebhookThrottleConfig" $ \o ->
    V1alpha1WebhookThrottleConfig
      <$> (o .:? "burst")
      <*> (o .:? "qps")

-- | ToJSON V1alpha1WebhookThrottleConfig
instance A.ToJSON V1alpha1WebhookThrottleConfig where
  toJSON V1alpha1WebhookThrottleConfig {..} =
   _omitNulls
      [ "burst" .= v1alpha1WebhookThrottleConfigBurst
      , "qps" .= v1alpha1WebhookThrottleConfigQps
      ]


-- | Construct a value of type 'V1alpha1WebhookThrottleConfig' (by applying it's required fields, if any)
mkV1alpha1WebhookThrottleConfig
  :: V1alpha1WebhookThrottleConfig
mkV1alpha1WebhookThrottleConfig =
  V1alpha1WebhookThrottleConfig
  { v1alpha1WebhookThrottleConfigBurst = Nothing
  , v1alpha1WebhookThrottleConfigQps = Nothing
  }

-- ** V1beta1APIService
-- | V1beta1APIService
-- APIService represents a server for a particular GroupVersion. Name must be \"version.group\".
data V1beta1APIService = V1beta1APIService
  { v1beta1APIServiceApiVersion :: !(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/api-conventions.md#resources
  , v1beta1APIServiceKind :: !(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/api-conventions.md#types-kinds
  , v1beta1APIServiceMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta1APIServiceSpec :: !(Maybe V1beta1APIServiceSpec) -- ^ "spec"
  , v1beta1APIServiceStatus :: !(Maybe V1beta1APIServiceStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1APIService
instance A.FromJSON V1beta1APIService where
  parseJSON = A.withObject "V1beta1APIService" $ \o ->
    V1beta1APIService
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON V1beta1APIService
instance A.ToJSON V1beta1APIService where
  toJSON V1beta1APIService {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1APIServiceApiVersion
      , "kind" .= v1beta1APIServiceKind
      , "metadata" .= v1beta1APIServiceMetadata
      , "spec" .= v1beta1APIServiceSpec
      , "status" .= v1beta1APIServiceStatus
      ]


-- | Construct a value of type 'V1beta1APIService' (by applying it's required fields, if any)
mkV1beta1APIService
  :: V1beta1APIService
mkV1beta1APIService =
  V1beta1APIService
  { v1beta1APIServiceApiVersion = Nothing
  , v1beta1APIServiceKind = Nothing
  , v1beta1APIServiceMetadata = Nothing
  , v1beta1APIServiceSpec = Nothing
  , v1beta1APIServiceStatus = Nothing
  }

-- ** V1beta1APIServiceCondition
-- | V1beta1APIServiceCondition
-- APIServiceCondition describes the state of an APIService at a particular point
data V1beta1APIServiceCondition = V1beta1APIServiceCondition
  { v1beta1APIServiceConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - Last time the condition transitioned from one status to another.
  , v1beta1APIServiceConditionMessage :: !(Maybe Text) -- ^ "message" - Human-readable message indicating details about last transition.
  , v1beta1APIServiceConditionReason :: !(Maybe Text) -- ^ "reason" - Unique, one-word, CamelCase reason for the condition&#39;s last transition.
  , v1beta1APIServiceConditionStatus :: !(Text) -- ^ /Required/ "status" - Status is the status of the condition. Can be True, False, Unknown.
  , v1beta1APIServiceConditionType :: !(Text) -- ^ /Required/ "type" - Type is the type of the condition.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1APIServiceCondition
instance A.FromJSON V1beta1APIServiceCondition where
  parseJSON = A.withObject "V1beta1APIServiceCondition" $ \o ->
    V1beta1APIServiceCondition
      <$> (o .:? "lastTransitionTime")
      <*> (o .:? "message")
      <*> (o .:? "reason")
      <*> (o .:  "status")
      <*> (o .:  "type")

-- | ToJSON V1beta1APIServiceCondition
instance A.ToJSON V1beta1APIServiceCondition where
  toJSON V1beta1APIServiceCondition {..} =
   _omitNulls
      [ "lastTransitionTime" .= v1beta1APIServiceConditionLastTransitionTime
      , "message" .= v1beta1APIServiceConditionMessage
      , "reason" .= v1beta1APIServiceConditionReason
      , "status" .= v1beta1APIServiceConditionStatus
      , "type" .= v1beta1APIServiceConditionType
      ]


-- | Construct a value of type 'V1beta1APIServiceCondition' (by applying it's required fields, if any)
mkV1beta1APIServiceCondition
  :: Text -- ^ 'v1beta1APIServiceConditionStatus': Status is the status of the condition. Can be True, False, Unknown.
  -> Text -- ^ 'v1beta1APIServiceConditionType': Type is the type of the condition.
  -> V1beta1APIServiceCondition
mkV1beta1APIServiceCondition v1beta1APIServiceConditionStatus v1beta1APIServiceConditionType =
  V1beta1APIServiceCondition
  { v1beta1APIServiceConditionLastTransitionTime = Nothing
  , v1beta1APIServiceConditionMessage = Nothing
  , v1beta1APIServiceConditionReason = Nothing
  , v1beta1APIServiceConditionStatus
  , v1beta1APIServiceConditionType
  }

-- ** V1beta1APIServiceList
-- | V1beta1APIServiceList
-- APIServiceList is a list of APIService objects.
data V1beta1APIServiceList = V1beta1APIServiceList
  { v1beta1APIServiceListApiVersion :: !(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/api-conventions.md#resources
  , v1beta1APIServiceListItems :: !([V1beta1APIService]) -- ^ /Required/ "items"
  , v1beta1APIServiceListKind :: !(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/api-conventions.md#types-kinds
  , v1beta1APIServiceListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1APIServiceList
instance A.FromJSON V1beta1APIServiceList where
  parseJSON = A.withObject "V1beta1APIServiceList" $ \o ->
    V1beta1APIServiceList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1beta1APIServiceList
instance A.ToJSON V1beta1APIServiceList where
  toJSON V1beta1APIServiceList {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1APIServiceListApiVersion
      , "items" .= v1beta1APIServiceListItems
      , "kind" .= v1beta1APIServiceListKind
      , "metadata" .= v1beta1APIServiceListMetadata
      ]


-- | Construct a value of type 'V1beta1APIServiceList' (by applying it's required fields, if any)
mkV1beta1APIServiceList
  :: [V1beta1APIService] -- ^ 'v1beta1APIServiceListItems' 
  -> V1beta1APIServiceList
mkV1beta1APIServiceList v1beta1APIServiceListItems =
  V1beta1APIServiceList
  { v1beta1APIServiceListApiVersion = Nothing
  , v1beta1APIServiceListItems
  , v1beta1APIServiceListKind = Nothing
  , v1beta1APIServiceListMetadata = Nothing
  }

-- ** V1beta1APIServiceSpec
-- | V1beta1APIServiceSpec
-- APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification.
data V1beta1APIServiceSpec = V1beta1APIServiceSpec
  { v1beta1APIServiceSpecCaBundle :: !(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.
  , v1beta1APIServiceSpecGroup :: !(Maybe Text) -- ^ "group" - Group is the API group name this server hosts
  , v1beta1APIServiceSpecGroupPriorityMinimum :: !(Int) -- ^ /Required/ "groupPriorityMinimum" - GroupPriorityMininum 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 GroupPriorityMininum 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
  , v1beta1APIServiceSpecInsecureSkipTlsVerify :: !(Maybe Bool) -- ^ "insecureSkipTLSVerify" - InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged.  You should use the CABundle instead.
  , v1beta1APIServiceSpecService :: !(ApiregistrationV1beta1ServiceReference) -- ^ /Required/ "service"
  , v1beta1APIServiceSpecVersion :: !(Maybe Text) -- ^ "version" - Version is the API version this server hosts.  For example, \&quot;v1\&quot;
  , v1beta1APIServiceSpecVersionPriority :: !(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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1APIServiceSpec
instance A.FromJSON V1beta1APIServiceSpec where
  parseJSON = A.withObject "V1beta1APIServiceSpec" $ \o ->
    V1beta1APIServiceSpec
      <$> (o .:? "caBundle")
      <*> (o .:? "group")
      <*> (o .:  "groupPriorityMinimum")
      <*> (o .:? "insecureSkipTLSVerify")
      <*> (o .:  "service")
      <*> (o .:? "version")
      <*> (o .:  "versionPriority")

-- | ToJSON V1beta1APIServiceSpec
instance A.ToJSON V1beta1APIServiceSpec where
  toJSON V1beta1APIServiceSpec {..} =
   _omitNulls
      [ "caBundle" .= v1beta1APIServiceSpecCaBundle
      , "group" .= v1beta1APIServiceSpecGroup
      , "groupPriorityMinimum" .= v1beta1APIServiceSpecGroupPriorityMinimum
      , "insecureSkipTLSVerify" .= v1beta1APIServiceSpecInsecureSkipTlsVerify
      , "service" .= v1beta1APIServiceSpecService
      , "version" .= v1beta1APIServiceSpecVersion
      , "versionPriority" .= v1beta1APIServiceSpecVersionPriority
      ]


-- | Construct a value of type 'V1beta1APIServiceSpec' (by applying it's required fields, if any)
mkV1beta1APIServiceSpec
  :: Int -- ^ 'v1beta1APIServiceSpecGroupPriorityMinimum': GroupPriorityMininum 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 GroupPriorityMininum 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
  -> ApiregistrationV1beta1ServiceReference -- ^ 'v1beta1APIServiceSpecService' 
  -> Int -- ^ 'v1beta1APIServiceSpecVersionPriority': 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.
  -> V1beta1APIServiceSpec
mkV1beta1APIServiceSpec v1beta1APIServiceSpecGroupPriorityMinimum v1beta1APIServiceSpecService v1beta1APIServiceSpecVersionPriority =
  V1beta1APIServiceSpec
  { v1beta1APIServiceSpecCaBundle = Nothing
  , v1beta1APIServiceSpecGroup = Nothing
  , v1beta1APIServiceSpecGroupPriorityMinimum
  , v1beta1APIServiceSpecInsecureSkipTlsVerify = Nothing
  , v1beta1APIServiceSpecService
  , v1beta1APIServiceSpecVersion = Nothing
  , v1beta1APIServiceSpecVersionPriority
  }

-- ** V1beta1APIServiceStatus
-- | V1beta1APIServiceStatus
-- APIServiceStatus contains derived information about an API server
data V1beta1APIServiceStatus = V1beta1APIServiceStatus
  { v1beta1APIServiceStatusConditions :: !(Maybe [V1beta1APIServiceCondition]) -- ^ "conditions" - Current service state of apiService.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1APIServiceStatus
instance A.FromJSON V1beta1APIServiceStatus where
  parseJSON = A.withObject "V1beta1APIServiceStatus" $ \o ->
    V1beta1APIServiceStatus
      <$> (o .:? "conditions")

-- | ToJSON V1beta1APIServiceStatus
instance A.ToJSON V1beta1APIServiceStatus where
  toJSON V1beta1APIServiceStatus {..} =
   _omitNulls
      [ "conditions" .= v1beta1APIServiceStatusConditions
      ]


-- | Construct a value of type 'V1beta1APIServiceStatus' (by applying it's required fields, if any)
mkV1beta1APIServiceStatus
  :: V1beta1APIServiceStatus
mkV1beta1APIServiceStatus =
  V1beta1APIServiceStatus
  { v1beta1APIServiceStatusConditions = Nothing
  }

-- ** V1beta1AggregationRule
-- | V1beta1AggregationRule
-- AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole
data V1beta1AggregationRule = V1beta1AggregationRule
  { v1beta1AggregationRuleClusterRoleSelectors :: !(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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1AggregationRule
instance A.FromJSON V1beta1AggregationRule where
  parseJSON = A.withObject "V1beta1AggregationRule" $ \o ->
    V1beta1AggregationRule
      <$> (o .:? "clusterRoleSelectors")

-- | ToJSON V1beta1AggregationRule
instance A.ToJSON V1beta1AggregationRule where
  toJSON V1beta1AggregationRule {..} =
   _omitNulls
      [ "clusterRoleSelectors" .= v1beta1AggregationRuleClusterRoleSelectors
      ]


-- | Construct a value of type 'V1beta1AggregationRule' (by applying it's required fields, if any)
mkV1beta1AggregationRule
  :: V1beta1AggregationRule
mkV1beta1AggregationRule =
  V1beta1AggregationRule
  { v1beta1AggregationRuleClusterRoleSelectors = Nothing
  }

-- ** V1beta1CSIDriver
-- | V1beta1CSIDriver
-- CSIDriver captures information about a Container Storage Interface (CSI) volume driver deployed on the cluster. CSI drivers do not need to create the CSIDriver object directly. Instead they may use the cluster-driver-registrar sidecar container. When deployed with a CSI driver it automatically creates a CSIDriver object representing the driver. 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 V1beta1CSIDriver = V1beta1CSIDriver
  { v1beta1CSIDriverApiVersion :: !(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/api-conventions.md#resources
  , v1beta1CSIDriverKind :: !(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/api-conventions.md#types-kinds
  , v1beta1CSIDriverMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta1CSIDriverSpec :: !(V1beta1CSIDriverSpec) -- ^ /Required/ "spec"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1CSIDriver
instance A.FromJSON V1beta1CSIDriver where
  parseJSON = A.withObject "V1beta1CSIDriver" $ \o ->
    V1beta1CSIDriver
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:  "spec")

-- | ToJSON V1beta1CSIDriver
instance A.ToJSON V1beta1CSIDriver where
  toJSON V1beta1CSIDriver {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1CSIDriverApiVersion
      , "kind" .= v1beta1CSIDriverKind
      , "metadata" .= v1beta1CSIDriverMetadata
      , "spec" .= v1beta1CSIDriverSpec
      ]


-- | Construct a value of type 'V1beta1CSIDriver' (by applying it's required fields, if any)
mkV1beta1CSIDriver
  :: V1beta1CSIDriverSpec -- ^ 'v1beta1CSIDriverSpec' 
  -> V1beta1CSIDriver
mkV1beta1CSIDriver v1beta1CSIDriverSpec =
  V1beta1CSIDriver
  { v1beta1CSIDriverApiVersion = Nothing
  , v1beta1CSIDriverKind = Nothing
  , v1beta1CSIDriverMetadata = Nothing
  , v1beta1CSIDriverSpec
  }

-- ** V1beta1CSIDriverList
-- | V1beta1CSIDriverList
-- CSIDriverList is a collection of CSIDriver objects.
data V1beta1CSIDriverList = V1beta1CSIDriverList
  { v1beta1CSIDriverListApiVersion :: !(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/api-conventions.md#resources
  , v1beta1CSIDriverListItems :: !([V1beta1CSIDriver]) -- ^ /Required/ "items" - items is the list of CSIDriver
  , v1beta1CSIDriverListKind :: !(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/api-conventions.md#types-kinds
  , v1beta1CSIDriverListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1CSIDriverList
instance A.FromJSON V1beta1CSIDriverList where
  parseJSON = A.withObject "V1beta1CSIDriverList" $ \o ->
    V1beta1CSIDriverList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1beta1CSIDriverList
instance A.ToJSON V1beta1CSIDriverList where
  toJSON V1beta1CSIDriverList {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1CSIDriverListApiVersion
      , "items" .= v1beta1CSIDriverListItems
      , "kind" .= v1beta1CSIDriverListKind
      , "metadata" .= v1beta1CSIDriverListMetadata
      ]


-- | Construct a value of type 'V1beta1CSIDriverList' (by applying it's required fields, if any)
mkV1beta1CSIDriverList
  :: [V1beta1CSIDriver] -- ^ 'v1beta1CSIDriverListItems': items is the list of CSIDriver
  -> V1beta1CSIDriverList
mkV1beta1CSIDriverList v1beta1CSIDriverListItems =
  V1beta1CSIDriverList
  { v1beta1CSIDriverListApiVersion = Nothing
  , v1beta1CSIDriverListItems
  , v1beta1CSIDriverListKind = Nothing
  , v1beta1CSIDriverListMetadata = Nothing
  }

-- ** V1beta1CSIDriverSpec
-- | V1beta1CSIDriverSpec
-- CSIDriverSpec is the specification of a CSIDriver.
data V1beta1CSIDriverSpec = V1beta1CSIDriverSpec
  { v1beta1CSIDriverSpecAttachRequired :: !(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.
  , v1beta1CSIDriverSpecPodInfoOnMount :: !(Maybe Bool) -- ^ "podInfoOnMount" - If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. 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 VolumeConext 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)
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1CSIDriverSpec
instance A.FromJSON V1beta1CSIDriverSpec where
  parseJSON = A.withObject "V1beta1CSIDriverSpec" $ \o ->
    V1beta1CSIDriverSpec
      <$> (o .:? "attachRequired")
      <*> (o .:? "podInfoOnMount")

-- | ToJSON V1beta1CSIDriverSpec
instance A.ToJSON V1beta1CSIDriverSpec where
  toJSON V1beta1CSIDriverSpec {..} =
   _omitNulls
      [ "attachRequired" .= v1beta1CSIDriverSpecAttachRequired
      , "podInfoOnMount" .= v1beta1CSIDriverSpecPodInfoOnMount
      ]


-- | Construct a value of type 'V1beta1CSIDriverSpec' (by applying it's required fields, if any)
mkV1beta1CSIDriverSpec
  :: V1beta1CSIDriverSpec
mkV1beta1CSIDriverSpec =
  V1beta1CSIDriverSpec
  { v1beta1CSIDriverSpecAttachRequired = Nothing
  , v1beta1CSIDriverSpecPodInfoOnMount = Nothing
  }

-- ** V1beta1CSINode
-- | V1beta1CSINode
-- 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 V1beta1CSINode = V1beta1CSINode
  { v1beta1CSINodeApiVersion :: !(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/api-conventions.md#resources
  , v1beta1CSINodeKind :: !(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/api-conventions.md#types-kinds
  , v1beta1CSINodeMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta1CSINodeSpec :: !(V1beta1CSINodeSpec) -- ^ /Required/ "spec"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1CSINode
instance A.FromJSON V1beta1CSINode where
  parseJSON = A.withObject "V1beta1CSINode" $ \o ->
    V1beta1CSINode
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:  "spec")

-- | ToJSON V1beta1CSINode
instance A.ToJSON V1beta1CSINode where
  toJSON V1beta1CSINode {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1CSINodeApiVersion
      , "kind" .= v1beta1CSINodeKind
      , "metadata" .= v1beta1CSINodeMetadata
      , "spec" .= v1beta1CSINodeSpec
      ]


-- | Construct a value of type 'V1beta1CSINode' (by applying it's required fields, if any)
mkV1beta1CSINode
  :: V1beta1CSINodeSpec -- ^ 'v1beta1CSINodeSpec' 
  -> V1beta1CSINode
mkV1beta1CSINode v1beta1CSINodeSpec =
  V1beta1CSINode
  { v1beta1CSINodeApiVersion = Nothing
  , v1beta1CSINodeKind = Nothing
  , v1beta1CSINodeMetadata = Nothing
  , v1beta1CSINodeSpec
  }

-- ** V1beta1CSINodeDriver
-- | V1beta1CSINodeDriver
-- CSINodeDriver holds information about the specification of one CSI driver installed on a node
data V1beta1CSINodeDriver = V1beta1CSINodeDriver
  { v1beta1CSINodeDriverName :: !(Text) -- ^ /Required/ "name" - This is 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.
  , v1beta1CSINodeDriverNodeId :: !(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.
  , v1beta1CSINodeDriverTopologyKeys :: !(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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1CSINodeDriver
instance A.FromJSON V1beta1CSINodeDriver where
  parseJSON = A.withObject "V1beta1CSINodeDriver" $ \o ->
    V1beta1CSINodeDriver
      <$> (o .:  "name")
      <*> (o .:  "nodeID")
      <*> (o .:? "topologyKeys")

-- | ToJSON V1beta1CSINodeDriver
instance A.ToJSON V1beta1CSINodeDriver where
  toJSON V1beta1CSINodeDriver {..} =
   _omitNulls
      [ "name" .= v1beta1CSINodeDriverName
      , "nodeID" .= v1beta1CSINodeDriverNodeId
      , "topologyKeys" .= v1beta1CSINodeDriverTopologyKeys
      ]


-- | Construct a value of type 'V1beta1CSINodeDriver' (by applying it's required fields, if any)
mkV1beta1CSINodeDriver
  :: Text -- ^ 'v1beta1CSINodeDriverName': This is 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 -- ^ 'v1beta1CSINodeDriverNodeId': 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.
  -> V1beta1CSINodeDriver
mkV1beta1CSINodeDriver v1beta1CSINodeDriverName v1beta1CSINodeDriverNodeId =
  V1beta1CSINodeDriver
  { v1beta1CSINodeDriverName
  , v1beta1CSINodeDriverNodeId
  , v1beta1CSINodeDriverTopologyKeys = Nothing
  }

-- ** V1beta1CSINodeList
-- | V1beta1CSINodeList
-- CSINodeList is a collection of CSINode objects.
data V1beta1CSINodeList = V1beta1CSINodeList
  { v1beta1CSINodeListApiVersion :: !(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/api-conventions.md#resources
  , v1beta1CSINodeListItems :: !([V1beta1CSINode]) -- ^ /Required/ "items" - items is the list of CSINode
  , v1beta1CSINodeListKind :: !(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/api-conventions.md#types-kinds
  , v1beta1CSINodeListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1CSINodeList
instance A.FromJSON V1beta1CSINodeList where
  parseJSON = A.withObject "V1beta1CSINodeList" $ \o ->
    V1beta1CSINodeList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1beta1CSINodeList
instance A.ToJSON V1beta1CSINodeList where
  toJSON V1beta1CSINodeList {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1CSINodeListApiVersion
      , "items" .= v1beta1CSINodeListItems
      , "kind" .= v1beta1CSINodeListKind
      , "metadata" .= v1beta1CSINodeListMetadata
      ]


-- | Construct a value of type 'V1beta1CSINodeList' (by applying it's required fields, if any)
mkV1beta1CSINodeList
  :: [V1beta1CSINode] -- ^ 'v1beta1CSINodeListItems': items is the list of CSINode
  -> V1beta1CSINodeList
mkV1beta1CSINodeList v1beta1CSINodeListItems =
  V1beta1CSINodeList
  { v1beta1CSINodeListApiVersion = Nothing
  , v1beta1CSINodeListItems
  , v1beta1CSINodeListKind = Nothing
  , v1beta1CSINodeListMetadata = Nothing
  }

-- ** V1beta1CSINodeSpec
-- | V1beta1CSINodeSpec
-- CSINodeSpec holds information about the specification of all CSI drivers installed on a node
data V1beta1CSINodeSpec = V1beta1CSINodeSpec
  { v1beta1CSINodeSpecDrivers :: !([V1beta1CSINodeDriver]) -- ^ /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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1CSINodeSpec
instance A.FromJSON V1beta1CSINodeSpec where
  parseJSON = A.withObject "V1beta1CSINodeSpec" $ \o ->
    V1beta1CSINodeSpec
      <$> (o .:  "drivers")

-- | ToJSON V1beta1CSINodeSpec
instance A.ToJSON V1beta1CSINodeSpec where
  toJSON V1beta1CSINodeSpec {..} =
   _omitNulls
      [ "drivers" .= v1beta1CSINodeSpecDrivers
      ]


-- | Construct a value of type 'V1beta1CSINodeSpec' (by applying it's required fields, if any)
mkV1beta1CSINodeSpec
  :: [V1beta1CSINodeDriver] -- ^ 'v1beta1CSINodeSpecDrivers': 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.
  -> V1beta1CSINodeSpec
mkV1beta1CSINodeSpec v1beta1CSINodeSpecDrivers =
  V1beta1CSINodeSpec
  { v1beta1CSINodeSpecDrivers
  }

-- ** V1beta1CertificateSigningRequest
-- | V1beta1CertificateSigningRequest
-- Describes a certificate signing request
data V1beta1CertificateSigningRequest = V1beta1CertificateSigningRequest
  { v1beta1CertificateSigningRequestApiVersion :: !(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/api-conventions.md#resources
  , v1beta1CertificateSigningRequestKind :: !(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/api-conventions.md#types-kinds
  , v1beta1CertificateSigningRequestMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta1CertificateSigningRequestSpec :: !(Maybe V1beta1CertificateSigningRequestSpec) -- ^ "spec"
  , v1beta1CertificateSigningRequestStatus :: !(Maybe V1beta1CertificateSigningRequestStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1CertificateSigningRequest
instance A.FromJSON V1beta1CertificateSigningRequest where
  parseJSON = A.withObject "V1beta1CertificateSigningRequest" $ \o ->
    V1beta1CertificateSigningRequest
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON V1beta1CertificateSigningRequest
instance A.ToJSON V1beta1CertificateSigningRequest where
  toJSON V1beta1CertificateSigningRequest {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1CertificateSigningRequestApiVersion
      , "kind" .= v1beta1CertificateSigningRequestKind
      , "metadata" .= v1beta1CertificateSigningRequestMetadata
      , "spec" .= v1beta1CertificateSigningRequestSpec
      , "status" .= v1beta1CertificateSigningRequestStatus
      ]


-- | Construct a value of type 'V1beta1CertificateSigningRequest' (by applying it's required fields, if any)
mkV1beta1CertificateSigningRequest
  :: V1beta1CertificateSigningRequest
mkV1beta1CertificateSigningRequest =
  V1beta1CertificateSigningRequest
  { v1beta1CertificateSigningRequestApiVersion = Nothing
  , v1beta1CertificateSigningRequestKind = Nothing
  , v1beta1CertificateSigningRequestMetadata = Nothing
  , v1beta1CertificateSigningRequestSpec = Nothing
  , v1beta1CertificateSigningRequestStatus = Nothing
  }

-- ** V1beta1CertificateSigningRequestCondition
-- | V1beta1CertificateSigningRequestCondition
data V1beta1CertificateSigningRequestCondition = V1beta1CertificateSigningRequestCondition
  { v1beta1CertificateSigningRequestConditionLastUpdateTime :: !(Maybe DateTime) -- ^ "lastUpdateTime" - timestamp for the last update to this condition
  , v1beta1CertificateSigningRequestConditionMessage :: !(Maybe Text) -- ^ "message" - human readable message with details about the request state
  , v1beta1CertificateSigningRequestConditionReason :: !(Maybe Text) -- ^ "reason" - brief reason for the request state
  , v1beta1CertificateSigningRequestConditionType :: !(Text) -- ^ /Required/ "type" - request approval state, currently Approved or Denied.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1CertificateSigningRequestCondition
instance A.FromJSON V1beta1CertificateSigningRequestCondition where
  parseJSON = A.withObject "V1beta1CertificateSigningRequestCondition" $ \o ->
    V1beta1CertificateSigningRequestCondition
      <$> (o .:? "lastUpdateTime")
      <*> (o .:? "message")
      <*> (o .:? "reason")
      <*> (o .:  "type")

-- | ToJSON V1beta1CertificateSigningRequestCondition
instance A.ToJSON V1beta1CertificateSigningRequestCondition where
  toJSON V1beta1CertificateSigningRequestCondition {..} =
   _omitNulls
      [ "lastUpdateTime" .= v1beta1CertificateSigningRequestConditionLastUpdateTime
      , "message" .= v1beta1CertificateSigningRequestConditionMessage
      , "reason" .= v1beta1CertificateSigningRequestConditionReason
      , "type" .= v1beta1CertificateSigningRequestConditionType
      ]


-- | Construct a value of type 'V1beta1CertificateSigningRequestCondition' (by applying it's required fields, if any)
mkV1beta1CertificateSigningRequestCondition
  :: Text -- ^ 'v1beta1CertificateSigningRequestConditionType': request approval state, currently Approved or Denied.
  -> V1beta1CertificateSigningRequestCondition
mkV1beta1CertificateSigningRequestCondition v1beta1CertificateSigningRequestConditionType =
  V1beta1CertificateSigningRequestCondition
  { v1beta1CertificateSigningRequestConditionLastUpdateTime = Nothing
  , v1beta1CertificateSigningRequestConditionMessage = Nothing
  , v1beta1CertificateSigningRequestConditionReason = Nothing
  , v1beta1CertificateSigningRequestConditionType
  }

-- ** V1beta1CertificateSigningRequestList
-- | V1beta1CertificateSigningRequestList
data V1beta1CertificateSigningRequestList = V1beta1CertificateSigningRequestList
  { v1beta1CertificateSigningRequestListApiVersion :: !(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/api-conventions.md#resources
  , v1beta1CertificateSigningRequestListItems :: !([V1beta1CertificateSigningRequest]) -- ^ /Required/ "items"
  , v1beta1CertificateSigningRequestListKind :: !(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/api-conventions.md#types-kinds
  , v1beta1CertificateSigningRequestListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1CertificateSigningRequestList
instance A.FromJSON V1beta1CertificateSigningRequestList where
  parseJSON = A.withObject "V1beta1CertificateSigningRequestList" $ \o ->
    V1beta1CertificateSigningRequestList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1beta1CertificateSigningRequestList
instance A.ToJSON V1beta1CertificateSigningRequestList where
  toJSON V1beta1CertificateSigningRequestList {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1CertificateSigningRequestListApiVersion
      , "items" .= v1beta1CertificateSigningRequestListItems
      , "kind" .= v1beta1CertificateSigningRequestListKind
      , "metadata" .= v1beta1CertificateSigningRequestListMetadata
      ]


-- | Construct a value of type 'V1beta1CertificateSigningRequestList' (by applying it's required fields, if any)
mkV1beta1CertificateSigningRequestList
  :: [V1beta1CertificateSigningRequest] -- ^ 'v1beta1CertificateSigningRequestListItems' 
  -> V1beta1CertificateSigningRequestList
mkV1beta1CertificateSigningRequestList v1beta1CertificateSigningRequestListItems =
  V1beta1CertificateSigningRequestList
  { v1beta1CertificateSigningRequestListApiVersion = Nothing
  , v1beta1CertificateSigningRequestListItems
  , v1beta1CertificateSigningRequestListKind = Nothing
  , v1beta1CertificateSigningRequestListMetadata = Nothing
  }

-- ** V1beta1CertificateSigningRequestSpec
-- | V1beta1CertificateSigningRequestSpec
-- This information is immutable after the request is created. Only the Request and Usages fields can be set on creation, other fields are derived by Kubernetes and cannot be modified by users.
data V1beta1CertificateSigningRequestSpec = V1beta1CertificateSigningRequestSpec
  { v1beta1CertificateSigningRequestSpecExtra :: !(Maybe (Map.Map String [Text])) -- ^ "extra" - Extra information about the requesting user. See user.Info interface for details.
  , v1beta1CertificateSigningRequestSpecGroups :: !(Maybe [Text]) -- ^ "groups" - Group information about the requesting user. See user.Info interface for details.
  , v1beta1CertificateSigningRequestSpecRequest :: !(ByteArray) -- ^ /Required/ "request" - Base64-encoded PKCS#10 CSR data
  , v1beta1CertificateSigningRequestSpecUid :: !(Maybe Text) -- ^ "uid" - UID information about the requesting user. See user.Info interface for details.
  , v1beta1CertificateSigningRequestSpecUsages :: !(Maybe [Text]) -- ^ "usages" - allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3      https://tools.ietf.org/html/rfc5280#section-4.2.1.12
  , v1beta1CertificateSigningRequestSpecUsername :: !(Maybe Text) -- ^ "username" - Information about the requesting user. See user.Info interface for details.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1CertificateSigningRequestSpec
instance A.FromJSON V1beta1CertificateSigningRequestSpec where
  parseJSON = A.withObject "V1beta1CertificateSigningRequestSpec" $ \o ->
    V1beta1CertificateSigningRequestSpec
      <$> (o .:? "extra")
      <*> (o .:? "groups")
      <*> (o .:  "request")
      <*> (o .:? "uid")
      <*> (o .:? "usages")
      <*> (o .:? "username")

-- | ToJSON V1beta1CertificateSigningRequestSpec
instance A.ToJSON V1beta1CertificateSigningRequestSpec where
  toJSON V1beta1CertificateSigningRequestSpec {..} =
   _omitNulls
      [ "extra" .= v1beta1CertificateSigningRequestSpecExtra
      , "groups" .= v1beta1CertificateSigningRequestSpecGroups
      , "request" .= v1beta1CertificateSigningRequestSpecRequest
      , "uid" .= v1beta1CertificateSigningRequestSpecUid
      , "usages" .= v1beta1CertificateSigningRequestSpecUsages
      , "username" .= v1beta1CertificateSigningRequestSpecUsername
      ]


-- | Construct a value of type 'V1beta1CertificateSigningRequestSpec' (by applying it's required fields, if any)
mkV1beta1CertificateSigningRequestSpec
  :: ByteArray -- ^ 'v1beta1CertificateSigningRequestSpecRequest': Base64-encoded PKCS#10 CSR data
  -> V1beta1CertificateSigningRequestSpec
mkV1beta1CertificateSigningRequestSpec v1beta1CertificateSigningRequestSpecRequest =
  V1beta1CertificateSigningRequestSpec
  { v1beta1CertificateSigningRequestSpecExtra = Nothing
  , v1beta1CertificateSigningRequestSpecGroups = Nothing
  , v1beta1CertificateSigningRequestSpecRequest
  , v1beta1CertificateSigningRequestSpecUid = Nothing
  , v1beta1CertificateSigningRequestSpecUsages = Nothing
  , v1beta1CertificateSigningRequestSpecUsername = Nothing
  }

-- ** V1beta1CertificateSigningRequestStatus
-- | V1beta1CertificateSigningRequestStatus
data V1beta1CertificateSigningRequestStatus = V1beta1CertificateSigningRequestStatus
  { v1beta1CertificateSigningRequestStatusCertificate :: !(Maybe ByteArray) -- ^ "certificate" - If request was approved, the controller will place the issued certificate here.
  , v1beta1CertificateSigningRequestStatusConditions :: !(Maybe [V1beta1CertificateSigningRequestCondition]) -- ^ "conditions" - Conditions applied to the request, such as approval or denial.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1CertificateSigningRequestStatus
instance A.FromJSON V1beta1CertificateSigningRequestStatus where
  parseJSON = A.withObject "V1beta1CertificateSigningRequestStatus" $ \o ->
    V1beta1CertificateSigningRequestStatus
      <$> (o .:? "certificate")
      <*> (o .:? "conditions")

-- | ToJSON V1beta1CertificateSigningRequestStatus
instance A.ToJSON V1beta1CertificateSigningRequestStatus where
  toJSON V1beta1CertificateSigningRequestStatus {..} =
   _omitNulls
      [ "certificate" .= v1beta1CertificateSigningRequestStatusCertificate
      , "conditions" .= v1beta1CertificateSigningRequestStatusConditions
      ]


-- | Construct a value of type 'V1beta1CertificateSigningRequestStatus' (by applying it's required fields, if any)
mkV1beta1CertificateSigningRequestStatus
  :: V1beta1CertificateSigningRequestStatus
mkV1beta1CertificateSigningRequestStatus =
  V1beta1CertificateSigningRequestStatus
  { v1beta1CertificateSigningRequestStatusCertificate = Nothing
  , v1beta1CertificateSigningRequestStatusConditions = Nothing
  }

-- ** V1beta1ClusterRole
-- | V1beta1ClusterRole
-- ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
data V1beta1ClusterRole = V1beta1ClusterRole
  { v1beta1ClusterRoleAggregationRule :: !(Maybe V1beta1AggregationRule) -- ^ "aggregationRule"
  , v1beta1ClusterRoleApiVersion :: !(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/api-conventions.md#resources
  , v1beta1ClusterRoleKind :: !(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/api-conventions.md#types-kinds
  , v1beta1ClusterRoleMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta1ClusterRoleRules :: !(Maybe [V1beta1PolicyRule]) -- ^ "rules" - Rules holds all the PolicyRules for this ClusterRole
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1ClusterRole
instance A.FromJSON V1beta1ClusterRole where
  parseJSON = A.withObject "V1beta1ClusterRole" $ \o ->
    V1beta1ClusterRole
      <$> (o .:? "aggregationRule")
      <*> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "rules")

-- | ToJSON V1beta1ClusterRole
instance A.ToJSON V1beta1ClusterRole where
  toJSON V1beta1ClusterRole {..} =
   _omitNulls
      [ "aggregationRule" .= v1beta1ClusterRoleAggregationRule
      , "apiVersion" .= v1beta1ClusterRoleApiVersion
      , "kind" .= v1beta1ClusterRoleKind
      , "metadata" .= v1beta1ClusterRoleMetadata
      , "rules" .= v1beta1ClusterRoleRules
      ]


-- | Construct a value of type 'V1beta1ClusterRole' (by applying it's required fields, if any)
mkV1beta1ClusterRole
  :: V1beta1ClusterRole
mkV1beta1ClusterRole =
  V1beta1ClusterRole
  { v1beta1ClusterRoleAggregationRule = Nothing
  , v1beta1ClusterRoleApiVersion = Nothing
  , v1beta1ClusterRoleKind = Nothing
  , v1beta1ClusterRoleMetadata = Nothing
  , v1beta1ClusterRoleRules = Nothing
  }

-- ** V1beta1ClusterRoleBinding
-- | V1beta1ClusterRoleBinding
-- ClusterRoleBinding references a ClusterRole, but not contain it.  It can reference a ClusterRole in the global namespace, and adds who information via Subject.
data V1beta1ClusterRoleBinding = V1beta1ClusterRoleBinding
  { v1beta1ClusterRoleBindingApiVersion :: !(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/api-conventions.md#resources
  , v1beta1ClusterRoleBindingKind :: !(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/api-conventions.md#types-kinds
  , v1beta1ClusterRoleBindingMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta1ClusterRoleBindingRoleRef :: !(V1beta1RoleRef) -- ^ /Required/ "roleRef"
  , v1beta1ClusterRoleBindingSubjects :: !(Maybe [V1beta1Subject]) -- ^ "subjects" - Subjects holds references to the objects the role applies to.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1ClusterRoleBinding
instance A.FromJSON V1beta1ClusterRoleBinding where
  parseJSON = A.withObject "V1beta1ClusterRoleBinding" $ \o ->
    V1beta1ClusterRoleBinding
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:  "roleRef")
      <*> (o .:? "subjects")

-- | ToJSON V1beta1ClusterRoleBinding
instance A.ToJSON V1beta1ClusterRoleBinding where
  toJSON V1beta1ClusterRoleBinding {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1ClusterRoleBindingApiVersion
      , "kind" .= v1beta1ClusterRoleBindingKind
      , "metadata" .= v1beta1ClusterRoleBindingMetadata
      , "roleRef" .= v1beta1ClusterRoleBindingRoleRef
      , "subjects" .= v1beta1ClusterRoleBindingSubjects
      ]


-- | Construct a value of type 'V1beta1ClusterRoleBinding' (by applying it's required fields, if any)
mkV1beta1ClusterRoleBinding
  :: V1beta1RoleRef -- ^ 'v1beta1ClusterRoleBindingRoleRef' 
  -> V1beta1ClusterRoleBinding
mkV1beta1ClusterRoleBinding v1beta1ClusterRoleBindingRoleRef =
  V1beta1ClusterRoleBinding
  { v1beta1ClusterRoleBindingApiVersion = Nothing
  , v1beta1ClusterRoleBindingKind = Nothing
  , v1beta1ClusterRoleBindingMetadata = Nothing
  , v1beta1ClusterRoleBindingRoleRef
  , v1beta1ClusterRoleBindingSubjects = Nothing
  }

-- ** V1beta1ClusterRoleBindingList
-- | V1beta1ClusterRoleBindingList
-- ClusterRoleBindingList is a collection of ClusterRoleBindings
data V1beta1ClusterRoleBindingList = V1beta1ClusterRoleBindingList
  { v1beta1ClusterRoleBindingListApiVersion :: !(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/api-conventions.md#resources
  , v1beta1ClusterRoleBindingListItems :: !([V1beta1ClusterRoleBinding]) -- ^ /Required/ "items" - Items is a list of ClusterRoleBindings
  , v1beta1ClusterRoleBindingListKind :: !(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/api-conventions.md#types-kinds
  , v1beta1ClusterRoleBindingListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1ClusterRoleBindingList
instance A.FromJSON V1beta1ClusterRoleBindingList where
  parseJSON = A.withObject "V1beta1ClusterRoleBindingList" $ \o ->
    V1beta1ClusterRoleBindingList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1beta1ClusterRoleBindingList
instance A.ToJSON V1beta1ClusterRoleBindingList where
  toJSON V1beta1ClusterRoleBindingList {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1ClusterRoleBindingListApiVersion
      , "items" .= v1beta1ClusterRoleBindingListItems
      , "kind" .= v1beta1ClusterRoleBindingListKind
      , "metadata" .= v1beta1ClusterRoleBindingListMetadata
      ]


-- | Construct a value of type 'V1beta1ClusterRoleBindingList' (by applying it's required fields, if any)
mkV1beta1ClusterRoleBindingList
  :: [V1beta1ClusterRoleBinding] -- ^ 'v1beta1ClusterRoleBindingListItems': Items is a list of ClusterRoleBindings
  -> V1beta1ClusterRoleBindingList
mkV1beta1ClusterRoleBindingList v1beta1ClusterRoleBindingListItems =
  V1beta1ClusterRoleBindingList
  { v1beta1ClusterRoleBindingListApiVersion = Nothing
  , v1beta1ClusterRoleBindingListItems
  , v1beta1ClusterRoleBindingListKind = Nothing
  , v1beta1ClusterRoleBindingListMetadata = Nothing
  }

-- ** V1beta1ClusterRoleList
-- | V1beta1ClusterRoleList
-- ClusterRoleList is a collection of ClusterRoles
data V1beta1ClusterRoleList = V1beta1ClusterRoleList
  { v1beta1ClusterRoleListApiVersion :: !(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/api-conventions.md#resources
  , v1beta1ClusterRoleListItems :: !([V1beta1ClusterRole]) -- ^ /Required/ "items" - Items is a list of ClusterRoles
  , v1beta1ClusterRoleListKind :: !(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/api-conventions.md#types-kinds
  , v1beta1ClusterRoleListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1ClusterRoleList
instance A.FromJSON V1beta1ClusterRoleList where
  parseJSON = A.withObject "V1beta1ClusterRoleList" $ \o ->
    V1beta1ClusterRoleList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1beta1ClusterRoleList
instance A.ToJSON V1beta1ClusterRoleList where
  toJSON V1beta1ClusterRoleList {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1ClusterRoleListApiVersion
      , "items" .= v1beta1ClusterRoleListItems
      , "kind" .= v1beta1ClusterRoleListKind
      , "metadata" .= v1beta1ClusterRoleListMetadata
      ]


-- | Construct a value of type 'V1beta1ClusterRoleList' (by applying it's required fields, if any)
mkV1beta1ClusterRoleList
  :: [V1beta1ClusterRole] -- ^ 'v1beta1ClusterRoleListItems': Items is a list of ClusterRoles
  -> V1beta1ClusterRoleList
mkV1beta1ClusterRoleList v1beta1ClusterRoleListItems =
  V1beta1ClusterRoleList
  { v1beta1ClusterRoleListApiVersion = Nothing
  , v1beta1ClusterRoleListItems
  , v1beta1ClusterRoleListKind = Nothing
  , v1beta1ClusterRoleListMetadata = Nothing
  }

-- ** V1beta1ControllerRevision
-- | V1beta1ControllerRevision
-- DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1beta2/ControllerRevision. See the release notes for more information. 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 V1beta1ControllerRevision = V1beta1ControllerRevision
  { v1beta1ControllerRevisionApiVersion :: !(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/api-conventions.md#resources
  , v1beta1ControllerRevisionData :: !(Maybe RuntimeRawExtension) -- ^ "data"
  , v1beta1ControllerRevisionKind :: !(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/api-conventions.md#types-kinds
  , v1beta1ControllerRevisionMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta1ControllerRevisionRevision :: !(Integer) -- ^ /Required/ "revision" - Revision indicates the revision of the state represented by Data.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1ControllerRevision
instance A.FromJSON V1beta1ControllerRevision where
  parseJSON = A.withObject "V1beta1ControllerRevision" $ \o ->
    V1beta1ControllerRevision
      <$> (o .:? "apiVersion")
      <*> (o .:? "data")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:  "revision")

-- | ToJSON V1beta1ControllerRevision
instance A.ToJSON V1beta1ControllerRevision where
  toJSON V1beta1ControllerRevision {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1ControllerRevisionApiVersion
      , "data" .= v1beta1ControllerRevisionData
      , "kind" .= v1beta1ControllerRevisionKind
      , "metadata" .= v1beta1ControllerRevisionMetadata
      , "revision" .= v1beta1ControllerRevisionRevision
      ]


-- | Construct a value of type 'V1beta1ControllerRevision' (by applying it's required fields, if any)
mkV1beta1ControllerRevision
  :: Integer -- ^ 'v1beta1ControllerRevisionRevision': Revision indicates the revision of the state represented by Data.
  -> V1beta1ControllerRevision
mkV1beta1ControllerRevision v1beta1ControllerRevisionRevision =
  V1beta1ControllerRevision
  { v1beta1ControllerRevisionApiVersion = Nothing
  , v1beta1ControllerRevisionData = Nothing
  , v1beta1ControllerRevisionKind = Nothing
  , v1beta1ControllerRevisionMetadata = Nothing
  , v1beta1ControllerRevisionRevision
  }

-- ** V1beta1ControllerRevisionList
-- | V1beta1ControllerRevisionList
-- ControllerRevisionList is a resource containing a list of ControllerRevision objects.
data V1beta1ControllerRevisionList = V1beta1ControllerRevisionList
  { v1beta1ControllerRevisionListApiVersion :: !(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/api-conventions.md#resources
  , v1beta1ControllerRevisionListItems :: !([V1beta1ControllerRevision]) -- ^ /Required/ "items" - Items is the list of ControllerRevisions
  , v1beta1ControllerRevisionListKind :: !(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/api-conventions.md#types-kinds
  , v1beta1ControllerRevisionListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1ControllerRevisionList
instance A.FromJSON V1beta1ControllerRevisionList where
  parseJSON = A.withObject "V1beta1ControllerRevisionList" $ \o ->
    V1beta1ControllerRevisionList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1beta1ControllerRevisionList
instance A.ToJSON V1beta1ControllerRevisionList where
  toJSON V1beta1ControllerRevisionList {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1ControllerRevisionListApiVersion
      , "items" .= v1beta1ControllerRevisionListItems
      , "kind" .= v1beta1ControllerRevisionListKind
      , "metadata" .= v1beta1ControllerRevisionListMetadata
      ]


-- | Construct a value of type 'V1beta1ControllerRevisionList' (by applying it's required fields, if any)
mkV1beta1ControllerRevisionList
  :: [V1beta1ControllerRevision] -- ^ 'v1beta1ControllerRevisionListItems': Items is the list of ControllerRevisions
  -> V1beta1ControllerRevisionList
mkV1beta1ControllerRevisionList v1beta1ControllerRevisionListItems =
  V1beta1ControllerRevisionList
  { v1beta1ControllerRevisionListApiVersion = Nothing
  , v1beta1ControllerRevisionListItems
  , v1beta1ControllerRevisionListKind = Nothing
  , v1beta1ControllerRevisionListMetadata = Nothing
  }

-- ** V1beta1CronJob
-- | V1beta1CronJob
-- CronJob represents the configuration of a single cron job.
data V1beta1CronJob = V1beta1CronJob
  { v1beta1CronJobApiVersion :: !(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/api-conventions.md#resources
  , v1beta1CronJobKind :: !(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/api-conventions.md#types-kinds
  , v1beta1CronJobMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta1CronJobSpec :: !(Maybe V1beta1CronJobSpec) -- ^ "spec"
  , v1beta1CronJobStatus :: !(Maybe V1beta1CronJobStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1CronJob
instance A.FromJSON V1beta1CronJob where
  parseJSON = A.withObject "V1beta1CronJob" $ \o ->
    V1beta1CronJob
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON V1beta1CronJob
instance A.ToJSON V1beta1CronJob where
  toJSON V1beta1CronJob {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1CronJobApiVersion
      , "kind" .= v1beta1CronJobKind
      , "metadata" .= v1beta1CronJobMetadata
      , "spec" .= v1beta1CronJobSpec
      , "status" .= v1beta1CronJobStatus
      ]


-- | Construct a value of type 'V1beta1CronJob' (by applying it's required fields, if any)
mkV1beta1CronJob
  :: V1beta1CronJob
mkV1beta1CronJob =
  V1beta1CronJob
  { v1beta1CronJobApiVersion = Nothing
  , v1beta1CronJobKind = Nothing
  , v1beta1CronJobMetadata = Nothing
  , v1beta1CronJobSpec = Nothing
  , v1beta1CronJobStatus = Nothing
  }

-- ** V1beta1CronJobList
-- | V1beta1CronJobList
-- CronJobList is a collection of cron jobs.
data V1beta1CronJobList = V1beta1CronJobList
  { v1beta1CronJobListApiVersion :: !(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/api-conventions.md#resources
  , v1beta1CronJobListItems :: !([V1beta1CronJob]) -- ^ /Required/ "items" - items is the list of CronJobs.
  , v1beta1CronJobListKind :: !(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/api-conventions.md#types-kinds
  , v1beta1CronJobListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1CronJobList
instance A.FromJSON V1beta1CronJobList where
  parseJSON = A.withObject "V1beta1CronJobList" $ \o ->
    V1beta1CronJobList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1beta1CronJobList
instance A.ToJSON V1beta1CronJobList where
  toJSON V1beta1CronJobList {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1CronJobListApiVersion
      , "items" .= v1beta1CronJobListItems
      , "kind" .= v1beta1CronJobListKind
      , "metadata" .= v1beta1CronJobListMetadata
      ]


-- | Construct a value of type 'V1beta1CronJobList' (by applying it's required fields, if any)
mkV1beta1CronJobList
  :: [V1beta1CronJob] -- ^ 'v1beta1CronJobListItems': items is the list of CronJobs.
  -> V1beta1CronJobList
mkV1beta1CronJobList v1beta1CronJobListItems =
  V1beta1CronJobList
  { v1beta1CronJobListApiVersion = Nothing
  , v1beta1CronJobListItems
  , v1beta1CronJobListKind = Nothing
  , v1beta1CronJobListMetadata = Nothing
  }

-- ** V1beta1CronJobSpec
-- | V1beta1CronJobSpec
-- CronJobSpec describes how the job execution will look like and when it will actually run.
data V1beta1CronJobSpec = V1beta1CronJobSpec
  { v1beta1CronJobSpecConcurrencyPolicy :: !(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
  , v1beta1CronJobSpecFailedJobsHistoryLimit :: !(Maybe Int) -- ^ "failedJobsHistoryLimit" - The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.
  , v1beta1CronJobSpecJobTemplate :: !(V1beta1JobTemplateSpec) -- ^ /Required/ "jobTemplate"
  , v1beta1CronJobSpecSchedule :: !(Text) -- ^ /Required/ "schedule" - The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
  , v1beta1CronJobSpecStartingDeadlineSeconds :: !(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.
  , v1beta1CronJobSpecSuccessfulJobsHistoryLimit :: !(Maybe Int) -- ^ "successfulJobsHistoryLimit" - The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 3.
  , v1beta1CronJobSpecSuspend :: !(Maybe Bool) -- ^ "suspend" - This flag tells the controller to suspend subsequent executions, it does not apply to already started executions.  Defaults to false.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1CronJobSpec
instance A.FromJSON V1beta1CronJobSpec where
  parseJSON = A.withObject "V1beta1CronJobSpec" $ \o ->
    V1beta1CronJobSpec
      <$> (o .:? "concurrencyPolicy")
      <*> (o .:? "failedJobsHistoryLimit")
      <*> (o .:  "jobTemplate")
      <*> (o .:  "schedule")
      <*> (o .:? "startingDeadlineSeconds")
      <*> (o .:? "successfulJobsHistoryLimit")
      <*> (o .:? "suspend")

-- | ToJSON V1beta1CronJobSpec
instance A.ToJSON V1beta1CronJobSpec where
  toJSON V1beta1CronJobSpec {..} =
   _omitNulls
      [ "concurrencyPolicy" .= v1beta1CronJobSpecConcurrencyPolicy
      , "failedJobsHistoryLimit" .= v1beta1CronJobSpecFailedJobsHistoryLimit
      , "jobTemplate" .= v1beta1CronJobSpecJobTemplate
      , "schedule" .= v1beta1CronJobSpecSchedule
      , "startingDeadlineSeconds" .= v1beta1CronJobSpecStartingDeadlineSeconds
      , "successfulJobsHistoryLimit" .= v1beta1CronJobSpecSuccessfulJobsHistoryLimit
      , "suspend" .= v1beta1CronJobSpecSuspend
      ]


-- | Construct a value of type 'V1beta1CronJobSpec' (by applying it's required fields, if any)
mkV1beta1CronJobSpec
  :: V1beta1JobTemplateSpec -- ^ 'v1beta1CronJobSpecJobTemplate' 
  -> Text -- ^ 'v1beta1CronJobSpecSchedule': The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
  -> V1beta1CronJobSpec
mkV1beta1CronJobSpec v1beta1CronJobSpecJobTemplate v1beta1CronJobSpecSchedule =
  V1beta1CronJobSpec
  { v1beta1CronJobSpecConcurrencyPolicy = Nothing
  , v1beta1CronJobSpecFailedJobsHistoryLimit = Nothing
  , v1beta1CronJobSpecJobTemplate
  , v1beta1CronJobSpecSchedule
  , v1beta1CronJobSpecStartingDeadlineSeconds = Nothing
  , v1beta1CronJobSpecSuccessfulJobsHistoryLimit = Nothing
  , v1beta1CronJobSpecSuspend = Nothing
  }

-- ** V1beta1CronJobStatus
-- | V1beta1CronJobStatus
-- CronJobStatus represents the current state of a cron job.
data V1beta1CronJobStatus = V1beta1CronJobStatus
  { v1beta1CronJobStatusActive :: !(Maybe [V1ObjectReference]) -- ^ "active" - A list of pointers to currently running jobs.
  , v1beta1CronJobStatusLastScheduleTime :: !(Maybe DateTime) -- ^ "lastScheduleTime" - Information when was the last time the job was successfully scheduled.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1CronJobStatus
instance A.FromJSON V1beta1CronJobStatus where
  parseJSON = A.withObject "V1beta1CronJobStatus" $ \o ->
    V1beta1CronJobStatus
      <$> (o .:? "active")
      <*> (o .:? "lastScheduleTime")

-- | ToJSON V1beta1CronJobStatus
instance A.ToJSON V1beta1CronJobStatus where
  toJSON V1beta1CronJobStatus {..} =
   _omitNulls
      [ "active" .= v1beta1CronJobStatusActive
      , "lastScheduleTime" .= v1beta1CronJobStatusLastScheduleTime
      ]


-- | Construct a value of type 'V1beta1CronJobStatus' (by applying it's required fields, if any)
mkV1beta1CronJobStatus
  :: V1beta1CronJobStatus
mkV1beta1CronJobStatus =
  V1beta1CronJobStatus
  { v1beta1CronJobStatusActive = Nothing
  , v1beta1CronJobStatusLastScheduleTime = Nothing
  }

-- ** V1beta1CustomResourceColumnDefinition
-- | V1beta1CustomResourceColumnDefinition
-- CustomResourceColumnDefinition specifies a column for server side printing.
data V1beta1CustomResourceColumnDefinition = V1beta1CustomResourceColumnDefinition
  { v1beta1CustomResourceColumnDefinitionJsonPath :: !(Text) -- ^ /Required/ "JSONPath" - JSONPath is a simple JSON path, i.e. with array notation.
  , v1beta1CustomResourceColumnDefinitionDescription :: !(Maybe Text) -- ^ "description" - description is a human readable description of this column.
  , v1beta1CustomResourceColumnDefinitionFormat :: !(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 more.
  , v1beta1CustomResourceColumnDefinitionName :: !(Text) -- ^ /Required/ "name" - name is a human readable name for the column.
  , v1beta1CustomResourceColumnDefinitionPriority :: !(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 higher priority.
  , v1beta1CustomResourceColumnDefinitionType :: !(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 more.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1CustomResourceColumnDefinition
instance A.FromJSON V1beta1CustomResourceColumnDefinition where
  parseJSON = A.withObject "V1beta1CustomResourceColumnDefinition" $ \o ->
    V1beta1CustomResourceColumnDefinition
      <$> (o .:  "JSONPath")
      <*> (o .:? "description")
      <*> (o .:? "format")
      <*> (o .:  "name")
      <*> (o .:? "priority")
      <*> (o .:  "type")

-- | ToJSON V1beta1CustomResourceColumnDefinition
instance A.ToJSON V1beta1CustomResourceColumnDefinition where
  toJSON V1beta1CustomResourceColumnDefinition {..} =
   _omitNulls
      [ "JSONPath" .= v1beta1CustomResourceColumnDefinitionJsonPath
      , "description" .= v1beta1CustomResourceColumnDefinitionDescription
      , "format" .= v1beta1CustomResourceColumnDefinitionFormat
      , "name" .= v1beta1CustomResourceColumnDefinitionName
      , "priority" .= v1beta1CustomResourceColumnDefinitionPriority
      , "type" .= v1beta1CustomResourceColumnDefinitionType
      ]


-- | Construct a value of type 'V1beta1CustomResourceColumnDefinition' (by applying it's required fields, if any)
mkV1beta1CustomResourceColumnDefinition
  :: Text -- ^ 'v1beta1CustomResourceColumnDefinitionJsonPath': JSONPath is a simple JSON path, i.e. with array notation.
  -> Text -- ^ 'v1beta1CustomResourceColumnDefinitionName': name is a human readable name for the column.
  -> Text -- ^ 'v1beta1CustomResourceColumnDefinitionType': 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 more.
  -> V1beta1CustomResourceColumnDefinition
mkV1beta1CustomResourceColumnDefinition v1beta1CustomResourceColumnDefinitionJsonPath v1beta1CustomResourceColumnDefinitionName v1beta1CustomResourceColumnDefinitionType =
  V1beta1CustomResourceColumnDefinition
  { v1beta1CustomResourceColumnDefinitionJsonPath
  , v1beta1CustomResourceColumnDefinitionDescription = Nothing
  , v1beta1CustomResourceColumnDefinitionFormat = Nothing
  , v1beta1CustomResourceColumnDefinitionName
  , v1beta1CustomResourceColumnDefinitionPriority = Nothing
  , v1beta1CustomResourceColumnDefinitionType
  }

-- ** V1beta1CustomResourceConversion
-- | V1beta1CustomResourceConversion
-- CustomResourceConversion describes how to convert different versions of a CR.
data V1beta1CustomResourceConversion = V1beta1CustomResourceConversion
  { v1beta1CustomResourceConversionConversionReviewVersions :: !(Maybe [Text]) -- ^ "conversionReviewVersions" - ConversionReviewVersions is an ordered list of preferred &#x60;ConversionReview&#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, conversion 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. Default to &#x60;[&#39;v1beta1&#39;]&#x60;.
  , v1beta1CustomResourceConversionStrategy :: !(Text) -- ^ /Required/ "strategy" - &#x60;strategy&#x60; specifies the conversion strategy. Allowed values are: - &#x60;None&#x60;: The converter only change the apiVersion and would not touch any other field in the CR. - &#x60;Webhook&#x60;: API Server will call to an external webhook to do the conversion. Additional information is needed for this option.
  , v1beta1CustomResourceConversionWebhookClientConfig :: !(Maybe ApiextensionsV1beta1WebhookClientConfig) -- ^ "webhookClientConfig"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1CustomResourceConversion
instance A.FromJSON V1beta1CustomResourceConversion where
  parseJSON = A.withObject "V1beta1CustomResourceConversion" $ \o ->
    V1beta1CustomResourceConversion
      <$> (o .:? "conversionReviewVersions")
      <*> (o .:  "strategy")
      <*> (o .:? "webhookClientConfig")

-- | ToJSON V1beta1CustomResourceConversion
instance A.ToJSON V1beta1CustomResourceConversion where
  toJSON V1beta1CustomResourceConversion {..} =
   _omitNulls
      [ "conversionReviewVersions" .= v1beta1CustomResourceConversionConversionReviewVersions
      , "strategy" .= v1beta1CustomResourceConversionStrategy
      , "webhookClientConfig" .= v1beta1CustomResourceConversionWebhookClientConfig
      ]


-- | Construct a value of type 'V1beta1CustomResourceConversion' (by applying it's required fields, if any)
mkV1beta1CustomResourceConversion
  :: Text -- ^ 'v1beta1CustomResourceConversionStrategy': `strategy` specifies the conversion strategy. Allowed values are: - `None`: The converter only change the apiVersion and would not touch any other field in the CR. - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information is needed for this option.
  -> V1beta1CustomResourceConversion
mkV1beta1CustomResourceConversion v1beta1CustomResourceConversionStrategy =
  V1beta1CustomResourceConversion
  { v1beta1CustomResourceConversionConversionReviewVersions = Nothing
  , v1beta1CustomResourceConversionStrategy
  , v1beta1CustomResourceConversionWebhookClientConfig = Nothing
  }

-- ** V1beta1CustomResourceDefinition
-- | V1beta1CustomResourceDefinition
-- CustomResourceDefinition represents a resource that should be exposed on the API server.  Its name MUST be in the format <.spec.name>.<.spec.group>.
data V1beta1CustomResourceDefinition = V1beta1CustomResourceDefinition
  { v1beta1CustomResourceDefinitionApiVersion :: !(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/api-conventions.md#resources
  , v1beta1CustomResourceDefinitionKind :: !(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/api-conventions.md#types-kinds
  , v1beta1CustomResourceDefinitionMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta1CustomResourceDefinitionSpec :: !(V1beta1CustomResourceDefinitionSpec) -- ^ /Required/ "spec"
  , v1beta1CustomResourceDefinitionStatus :: !(Maybe V1beta1CustomResourceDefinitionStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1CustomResourceDefinition
instance A.FromJSON V1beta1CustomResourceDefinition where
  parseJSON = A.withObject "V1beta1CustomResourceDefinition" $ \o ->
    V1beta1CustomResourceDefinition
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:  "spec")
      <*> (o .:? "status")

-- | ToJSON V1beta1CustomResourceDefinition
instance A.ToJSON V1beta1CustomResourceDefinition where
  toJSON V1beta1CustomResourceDefinition {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1CustomResourceDefinitionApiVersion
      , "kind" .= v1beta1CustomResourceDefinitionKind
      , "metadata" .= v1beta1CustomResourceDefinitionMetadata
      , "spec" .= v1beta1CustomResourceDefinitionSpec
      , "status" .= v1beta1CustomResourceDefinitionStatus
      ]


-- | Construct a value of type 'V1beta1CustomResourceDefinition' (by applying it's required fields, if any)
mkV1beta1CustomResourceDefinition
  :: V1beta1CustomResourceDefinitionSpec -- ^ 'v1beta1CustomResourceDefinitionSpec' 
  -> V1beta1CustomResourceDefinition
mkV1beta1CustomResourceDefinition v1beta1CustomResourceDefinitionSpec =
  V1beta1CustomResourceDefinition
  { v1beta1CustomResourceDefinitionApiVersion = Nothing
  , v1beta1CustomResourceDefinitionKind = Nothing
  , v1beta1CustomResourceDefinitionMetadata = Nothing
  , v1beta1CustomResourceDefinitionSpec
  , v1beta1CustomResourceDefinitionStatus = Nothing
  }

-- ** V1beta1CustomResourceDefinitionCondition
-- | V1beta1CustomResourceDefinitionCondition
-- CustomResourceDefinitionCondition contains details for the current condition of this pod.
data V1beta1CustomResourceDefinitionCondition = V1beta1CustomResourceDefinitionCondition
  { v1beta1CustomResourceDefinitionConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - Last time the condition transitioned from one status to another.
  , v1beta1CustomResourceDefinitionConditionMessage :: !(Maybe Text) -- ^ "message" - Human-readable message indicating details about last transition.
  , v1beta1CustomResourceDefinitionConditionReason :: !(Maybe Text) -- ^ "reason" - Unique, one-word, CamelCase reason for the condition&#39;s last transition.
  , v1beta1CustomResourceDefinitionConditionStatus :: !(Text) -- ^ /Required/ "status" - Status is the status of the condition. Can be True, False, Unknown.
  , v1beta1CustomResourceDefinitionConditionType :: !(Text) -- ^ /Required/ "type" - Type is the type of the condition.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1CustomResourceDefinitionCondition
instance A.FromJSON V1beta1CustomResourceDefinitionCondition where
  parseJSON = A.withObject "V1beta1CustomResourceDefinitionCondition" $ \o ->
    V1beta1CustomResourceDefinitionCondition
      <$> (o .:? "lastTransitionTime")
      <*> (o .:? "message")
      <*> (o .:? "reason")
      <*> (o .:  "status")
      <*> (o .:  "type")

-- | ToJSON V1beta1CustomResourceDefinitionCondition
instance A.ToJSON V1beta1CustomResourceDefinitionCondition where
  toJSON V1beta1CustomResourceDefinitionCondition {..} =
   _omitNulls
      [ "lastTransitionTime" .= v1beta1CustomResourceDefinitionConditionLastTransitionTime
      , "message" .= v1beta1CustomResourceDefinitionConditionMessage
      , "reason" .= v1beta1CustomResourceDefinitionConditionReason
      , "status" .= v1beta1CustomResourceDefinitionConditionStatus
      , "type" .= v1beta1CustomResourceDefinitionConditionType
      ]


-- | Construct a value of type 'V1beta1CustomResourceDefinitionCondition' (by applying it's required fields, if any)
mkV1beta1CustomResourceDefinitionCondition
  :: Text -- ^ 'v1beta1CustomResourceDefinitionConditionStatus': Status is the status of the condition. Can be True, False, Unknown.
  -> Text -- ^ 'v1beta1CustomResourceDefinitionConditionType': Type is the type of the condition.
  -> V1beta1CustomResourceDefinitionCondition
mkV1beta1CustomResourceDefinitionCondition v1beta1CustomResourceDefinitionConditionStatus v1beta1CustomResourceDefinitionConditionType =
  V1beta1CustomResourceDefinitionCondition
  { v1beta1CustomResourceDefinitionConditionLastTransitionTime = Nothing
  , v1beta1CustomResourceDefinitionConditionMessage = Nothing
  , v1beta1CustomResourceDefinitionConditionReason = Nothing
  , v1beta1CustomResourceDefinitionConditionStatus
  , v1beta1CustomResourceDefinitionConditionType
  }

-- ** V1beta1CustomResourceDefinitionList
-- | V1beta1CustomResourceDefinitionList
-- CustomResourceDefinitionList is a list of CustomResourceDefinition objects.
data V1beta1CustomResourceDefinitionList = V1beta1CustomResourceDefinitionList
  { v1beta1CustomResourceDefinitionListApiVersion :: !(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/api-conventions.md#resources
  , v1beta1CustomResourceDefinitionListItems :: !([V1beta1CustomResourceDefinition]) -- ^ /Required/ "items" - Items individual CustomResourceDefinitions
  , v1beta1CustomResourceDefinitionListKind :: !(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/api-conventions.md#types-kinds
  , v1beta1CustomResourceDefinitionListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1CustomResourceDefinitionList
instance A.FromJSON V1beta1CustomResourceDefinitionList where
  parseJSON = A.withObject "V1beta1CustomResourceDefinitionList" $ \o ->
    V1beta1CustomResourceDefinitionList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1beta1CustomResourceDefinitionList
instance A.ToJSON V1beta1CustomResourceDefinitionList where
  toJSON V1beta1CustomResourceDefinitionList {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1CustomResourceDefinitionListApiVersion
      , "items" .= v1beta1CustomResourceDefinitionListItems
      , "kind" .= v1beta1CustomResourceDefinitionListKind
      , "metadata" .= v1beta1CustomResourceDefinitionListMetadata
      ]


-- | Construct a value of type 'V1beta1CustomResourceDefinitionList' (by applying it's required fields, if any)
mkV1beta1CustomResourceDefinitionList
  :: [V1beta1CustomResourceDefinition] -- ^ 'v1beta1CustomResourceDefinitionListItems': Items individual CustomResourceDefinitions
  -> V1beta1CustomResourceDefinitionList
mkV1beta1CustomResourceDefinitionList v1beta1CustomResourceDefinitionListItems =
  V1beta1CustomResourceDefinitionList
  { v1beta1CustomResourceDefinitionListApiVersion = Nothing
  , v1beta1CustomResourceDefinitionListItems
  , v1beta1CustomResourceDefinitionListKind = Nothing
  , v1beta1CustomResourceDefinitionListMetadata = Nothing
  }

-- ** V1beta1CustomResourceDefinitionNames
-- | V1beta1CustomResourceDefinitionNames
-- CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition
data V1beta1CustomResourceDefinitionNames = V1beta1CustomResourceDefinitionNames
  { v1beta1CustomResourceDefinitionNamesCategories :: !(Maybe [Text]) -- ^ "categories" - Categories is a list of grouped resources custom resources belong to (e.g. &#39;all&#39;)
  , v1beta1CustomResourceDefinitionNamesKind :: !(Text) -- ^ /Required/ "kind" - Kind is the serialized kind of the resource.  It is normally CamelCase and singular.
  , v1beta1CustomResourceDefinitionNamesListKind :: !(Maybe Text) -- ^ "listKind" - ListKind is the serialized kind of the list for this resource.  Defaults to &lt;kind&gt;List.
  , v1beta1CustomResourceDefinitionNamesPlural :: !(Text) -- ^ /Required/ "plural" - Plural is the plural name of the resource to serve.  It must match the name of the CustomResourceDefinition-registration too: plural.group and it must be all lowercase.
  , v1beta1CustomResourceDefinitionNamesShortNames :: !(Maybe [Text]) -- ^ "shortNames" - ShortNames are short names for the resource.  It must be all lowercase.
  , v1beta1CustomResourceDefinitionNamesSingular :: !(Maybe Text) -- ^ "singular" - Singular is the singular name of the resource.  It must be all lowercase  Defaults to lowercased &lt;kind&gt;
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1CustomResourceDefinitionNames
instance A.FromJSON V1beta1CustomResourceDefinitionNames where
  parseJSON = A.withObject "V1beta1CustomResourceDefinitionNames" $ \o ->
    V1beta1CustomResourceDefinitionNames
      <$> (o .:? "categories")
      <*> (o .:  "kind")
      <*> (o .:? "listKind")
      <*> (o .:  "plural")
      <*> (o .:? "shortNames")
      <*> (o .:? "singular")

-- | ToJSON V1beta1CustomResourceDefinitionNames
instance A.ToJSON V1beta1CustomResourceDefinitionNames where
  toJSON V1beta1CustomResourceDefinitionNames {..} =
   _omitNulls
      [ "categories" .= v1beta1CustomResourceDefinitionNamesCategories
      , "kind" .= v1beta1CustomResourceDefinitionNamesKind
      , "listKind" .= v1beta1CustomResourceDefinitionNamesListKind
      , "plural" .= v1beta1CustomResourceDefinitionNamesPlural
      , "shortNames" .= v1beta1CustomResourceDefinitionNamesShortNames
      , "singular" .= v1beta1CustomResourceDefinitionNamesSingular
      ]


-- | Construct a value of type 'V1beta1CustomResourceDefinitionNames' (by applying it's required fields, if any)
mkV1beta1CustomResourceDefinitionNames
  :: Text -- ^ 'v1beta1CustomResourceDefinitionNamesKind': Kind is the serialized kind of the resource.  It is normally CamelCase and singular.
  -> Text -- ^ 'v1beta1CustomResourceDefinitionNamesPlural': Plural is the plural name of the resource to serve.  It must match the name of the CustomResourceDefinition-registration too: plural.group and it must be all lowercase.
  -> V1beta1CustomResourceDefinitionNames
mkV1beta1CustomResourceDefinitionNames v1beta1CustomResourceDefinitionNamesKind v1beta1CustomResourceDefinitionNamesPlural =
  V1beta1CustomResourceDefinitionNames
  { v1beta1CustomResourceDefinitionNamesCategories = Nothing
  , v1beta1CustomResourceDefinitionNamesKind
  , v1beta1CustomResourceDefinitionNamesListKind = Nothing
  , v1beta1CustomResourceDefinitionNamesPlural
  , v1beta1CustomResourceDefinitionNamesShortNames = Nothing
  , v1beta1CustomResourceDefinitionNamesSingular = Nothing
  }

-- ** V1beta1CustomResourceDefinitionSpec
-- | V1beta1CustomResourceDefinitionSpec
-- CustomResourceDefinitionSpec describes how a user wants their resource to appear
data V1beta1CustomResourceDefinitionSpec = V1beta1CustomResourceDefinitionSpec
  { v1beta1CustomResourceDefinitionSpecAdditionalPrinterColumns :: !(Maybe [V1beta1CustomResourceColumnDefinition]) -- ^ "additionalPrinterColumns" - AdditionalPrinterColumns are additional columns shown e.g. in kubectl next to the name. Defaults to a created-at column. Optional, the global columns for all versions. Top-level and per-version columns are mutually exclusive.
  , v1beta1CustomResourceDefinitionSpecConversion :: !(Maybe V1beta1CustomResourceConversion) -- ^ "conversion"
  , v1beta1CustomResourceDefinitionSpecGroup :: !(Text) -- ^ /Required/ "group" - Group is the group this resource belongs in
  , v1beta1CustomResourceDefinitionSpecNames :: !(V1beta1CustomResourceDefinitionNames) -- ^ /Required/ "names"
  , v1beta1CustomResourceDefinitionSpecScope :: !(Text) -- ^ /Required/ "scope" - Scope indicates whether this resource is cluster or namespace scoped.  Default is namespaced
  , v1beta1CustomResourceDefinitionSpecSubresources :: !(Maybe V1beta1CustomResourceSubresources) -- ^ "subresources"
  , v1beta1CustomResourceDefinitionSpecValidation :: !(Maybe V1beta1CustomResourceValidation) -- ^ "validation"
  , v1beta1CustomResourceDefinitionSpecVersion :: !(Maybe Text) -- ^ "version" - Version is the version this resource belongs in Should be always first item in Versions field if provided. Optional, but at least one of Version or Versions must be set. Deprecated: Please use &#x60;Versions&#x60;.
  , v1beta1CustomResourceDefinitionSpecVersions :: !(Maybe [V1beta1CustomResourceDefinitionVersion]) -- ^ "versions" - Versions is the list of all supported versions for this resource. If Version field is provided, this field is optional. Validation: All versions must use the same validation schema for now. i.e., top level Validation field is applied to all of these versions. Order: The version name will be used to compute the order. 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1CustomResourceDefinitionSpec
instance A.FromJSON V1beta1CustomResourceDefinitionSpec where
  parseJSON = A.withObject "V1beta1CustomResourceDefinitionSpec" $ \o ->
    V1beta1CustomResourceDefinitionSpec
      <$> (o .:? "additionalPrinterColumns")
      <*> (o .:? "conversion")
      <*> (o .:  "group")
      <*> (o .:  "names")
      <*> (o .:  "scope")
      <*> (o .:? "subresources")
      <*> (o .:? "validation")
      <*> (o .:? "version")
      <*> (o .:? "versions")

-- | ToJSON V1beta1CustomResourceDefinitionSpec
instance A.ToJSON V1beta1CustomResourceDefinitionSpec where
  toJSON V1beta1CustomResourceDefinitionSpec {..} =
   _omitNulls
      [ "additionalPrinterColumns" .= v1beta1CustomResourceDefinitionSpecAdditionalPrinterColumns
      , "conversion" .= v1beta1CustomResourceDefinitionSpecConversion
      , "group" .= v1beta1CustomResourceDefinitionSpecGroup
      , "names" .= v1beta1CustomResourceDefinitionSpecNames
      , "scope" .= v1beta1CustomResourceDefinitionSpecScope
      , "subresources" .= v1beta1CustomResourceDefinitionSpecSubresources
      , "validation" .= v1beta1CustomResourceDefinitionSpecValidation
      , "version" .= v1beta1CustomResourceDefinitionSpecVersion
      , "versions" .= v1beta1CustomResourceDefinitionSpecVersions
      ]


-- | Construct a value of type 'V1beta1CustomResourceDefinitionSpec' (by applying it's required fields, if any)
mkV1beta1CustomResourceDefinitionSpec
  :: Text -- ^ 'v1beta1CustomResourceDefinitionSpecGroup': Group is the group this resource belongs in
  -> V1beta1CustomResourceDefinitionNames -- ^ 'v1beta1CustomResourceDefinitionSpecNames' 
  -> Text -- ^ 'v1beta1CustomResourceDefinitionSpecScope': Scope indicates whether this resource is cluster or namespace scoped.  Default is namespaced
  -> V1beta1CustomResourceDefinitionSpec
mkV1beta1CustomResourceDefinitionSpec v1beta1CustomResourceDefinitionSpecGroup v1beta1CustomResourceDefinitionSpecNames v1beta1CustomResourceDefinitionSpecScope =
  V1beta1CustomResourceDefinitionSpec
  { v1beta1CustomResourceDefinitionSpecAdditionalPrinterColumns = Nothing
  , v1beta1CustomResourceDefinitionSpecConversion = Nothing
  , v1beta1CustomResourceDefinitionSpecGroup
  , v1beta1CustomResourceDefinitionSpecNames
  , v1beta1CustomResourceDefinitionSpecScope
  , v1beta1CustomResourceDefinitionSpecSubresources = Nothing
  , v1beta1CustomResourceDefinitionSpecValidation = Nothing
  , v1beta1CustomResourceDefinitionSpecVersion = Nothing
  , v1beta1CustomResourceDefinitionSpecVersions = Nothing
  }

-- ** V1beta1CustomResourceDefinitionStatus
-- | V1beta1CustomResourceDefinitionStatus
-- CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition
data V1beta1CustomResourceDefinitionStatus = V1beta1CustomResourceDefinitionStatus
  { v1beta1CustomResourceDefinitionStatusAcceptedNames :: !(V1beta1CustomResourceDefinitionNames) -- ^ /Required/ "acceptedNames"
  , v1beta1CustomResourceDefinitionStatusConditions :: !([V1beta1CustomResourceDefinitionCondition]) -- ^ /Required/ "conditions" - Conditions indicate state for particular aspects of a CustomResourceDefinition
  , v1beta1CustomResourceDefinitionStatusStoredVersions :: !([Text]) -- ^ /Required/ "storedVersions" - StoredVersions are 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 the migration controller can first finish a migration to another version (i.e. that no old objects are left in the storage), and then remove the rest of the versions from this list. None of the versions in this list can be removed from the spec.Versions field.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1CustomResourceDefinitionStatus
instance A.FromJSON V1beta1CustomResourceDefinitionStatus where
  parseJSON = A.withObject "V1beta1CustomResourceDefinitionStatus" $ \o ->
    V1beta1CustomResourceDefinitionStatus
      <$> (o .:  "acceptedNames")
      <*> (o .:  "conditions")
      <*> (o .:  "storedVersions")

-- | ToJSON V1beta1CustomResourceDefinitionStatus
instance A.ToJSON V1beta1CustomResourceDefinitionStatus where
  toJSON V1beta1CustomResourceDefinitionStatus {..} =
   _omitNulls
      [ "acceptedNames" .= v1beta1CustomResourceDefinitionStatusAcceptedNames
      , "conditions" .= v1beta1CustomResourceDefinitionStatusConditions
      , "storedVersions" .= v1beta1CustomResourceDefinitionStatusStoredVersions
      ]


-- | Construct a value of type 'V1beta1CustomResourceDefinitionStatus' (by applying it's required fields, if any)
mkV1beta1CustomResourceDefinitionStatus
  :: V1beta1CustomResourceDefinitionNames -- ^ 'v1beta1CustomResourceDefinitionStatusAcceptedNames' 
  -> [V1beta1CustomResourceDefinitionCondition] -- ^ 'v1beta1CustomResourceDefinitionStatusConditions': Conditions indicate state for particular aspects of a CustomResourceDefinition
  -> [Text] -- ^ 'v1beta1CustomResourceDefinitionStatusStoredVersions': StoredVersions are 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 the migration controller can first finish a migration to another version (i.e. that no old objects are left in the storage), and then remove the rest of the versions from this list. None of the versions in this list can be removed from the spec.Versions field.
  -> V1beta1CustomResourceDefinitionStatus
mkV1beta1CustomResourceDefinitionStatus v1beta1CustomResourceDefinitionStatusAcceptedNames v1beta1CustomResourceDefinitionStatusConditions v1beta1CustomResourceDefinitionStatusStoredVersions =
  V1beta1CustomResourceDefinitionStatus
  { v1beta1CustomResourceDefinitionStatusAcceptedNames
  , v1beta1CustomResourceDefinitionStatusConditions
  , v1beta1CustomResourceDefinitionStatusStoredVersions
  }

-- ** V1beta1CustomResourceDefinitionVersion
-- | V1beta1CustomResourceDefinitionVersion
-- CustomResourceDefinitionVersion describes a version for CRD.
data V1beta1CustomResourceDefinitionVersion = V1beta1CustomResourceDefinitionVersion
  { v1beta1CustomResourceDefinitionVersionAdditionalPrinterColumns :: !(Maybe [V1beta1CustomResourceColumnDefinition]) -- ^ "additionalPrinterColumns" - AdditionalPrinterColumns are additional columns shown e.g. in kubectl next to the name. Defaults to a created-at column. Top-level and per-version columns are mutually exclusive. Per-version columns must not all be set to identical values (top-level columns should be used instead) This field is alpha-level and is only honored by servers that enable the CustomResourceWebhookConversion feature. NOTE: CRDs created prior to 1.13 populated the top-level additionalPrinterColumns field by default. To apply an update that changes to per-version additionalPrinterColumns, the top-level additionalPrinterColumns field must be explicitly set to null
  , v1beta1CustomResourceDefinitionVersionName :: !(Text) -- ^ /Required/ "name" - Name is the version name, e.g. “v1”, “v2beta1”, etc.
  , v1beta1CustomResourceDefinitionVersionSchema :: !(Maybe V1beta1CustomResourceValidation) -- ^ "schema"
  , v1beta1CustomResourceDefinitionVersionServed :: !(Bool) -- ^ /Required/ "served" - Served is a flag enabling/disabling this version from being served via REST APIs
  , v1beta1CustomResourceDefinitionVersionStorage :: !(Bool) -- ^ /Required/ "storage" - Storage flags the version as storage version. There must be exactly one flagged as storage version.
  , v1beta1CustomResourceDefinitionVersionSubresources :: !(Maybe V1beta1CustomResourceSubresources) -- ^ "subresources"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1CustomResourceDefinitionVersion
instance A.FromJSON V1beta1CustomResourceDefinitionVersion where
  parseJSON = A.withObject "V1beta1CustomResourceDefinitionVersion" $ \o ->
    V1beta1CustomResourceDefinitionVersion
      <$> (o .:? "additionalPrinterColumns")
      <*> (o .:  "name")
      <*> (o .:? "schema")
      <*> (o .:  "served")
      <*> (o .:  "storage")
      <*> (o .:? "subresources")

-- | ToJSON V1beta1CustomResourceDefinitionVersion
instance A.ToJSON V1beta1CustomResourceDefinitionVersion where
  toJSON V1beta1CustomResourceDefinitionVersion {..} =
   _omitNulls
      [ "additionalPrinterColumns" .= v1beta1CustomResourceDefinitionVersionAdditionalPrinterColumns
      , "name" .= v1beta1CustomResourceDefinitionVersionName
      , "schema" .= v1beta1CustomResourceDefinitionVersionSchema
      , "served" .= v1beta1CustomResourceDefinitionVersionServed
      , "storage" .= v1beta1CustomResourceDefinitionVersionStorage
      , "subresources" .= v1beta1CustomResourceDefinitionVersionSubresources
      ]


-- | Construct a value of type 'V1beta1CustomResourceDefinitionVersion' (by applying it's required fields, if any)
mkV1beta1CustomResourceDefinitionVersion
  :: Text -- ^ 'v1beta1CustomResourceDefinitionVersionName': Name is the version name, e.g. “v1”, “v2beta1”, etc.
  -> Bool -- ^ 'v1beta1CustomResourceDefinitionVersionServed': Served is a flag enabling/disabling this version from being served via REST APIs
  -> Bool -- ^ 'v1beta1CustomResourceDefinitionVersionStorage': Storage flags the version as storage version. There must be exactly one flagged as storage version.
  -> V1beta1CustomResourceDefinitionVersion
mkV1beta1CustomResourceDefinitionVersion v1beta1CustomResourceDefinitionVersionName v1beta1CustomResourceDefinitionVersionServed v1beta1CustomResourceDefinitionVersionStorage =
  V1beta1CustomResourceDefinitionVersion
  { v1beta1CustomResourceDefinitionVersionAdditionalPrinterColumns = Nothing
  , v1beta1CustomResourceDefinitionVersionName
  , v1beta1CustomResourceDefinitionVersionSchema = Nothing
  , v1beta1CustomResourceDefinitionVersionServed
  , v1beta1CustomResourceDefinitionVersionStorage
  , v1beta1CustomResourceDefinitionVersionSubresources = Nothing
  }

-- ** V1beta1CustomResourceSubresourceScale
-- | V1beta1CustomResourceSubresourceScale
-- CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources.
data V1beta1CustomResourceSubresourceScale = V1beta1CustomResourceSubresourceScale
  { v1beta1CustomResourceSubresourceScaleLabelSelectorPath :: !(Maybe Text) -- ^ "labelSelectorPath" - LabelSelectorPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Selector. Only JSON paths without the array notation are allowed. Must be a JSON Path under .status. Must be set to work with HPA. If there is no value under the given path in the CustomResource, the status label selector value in the /scale subresource will default to the empty string.
  , v1beta1CustomResourceSubresourceScaleSpecReplicasPath :: !(Text) -- ^ /Required/ "specReplicasPath" - SpecReplicasPath defines the JSON path inside of a CustomResource 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 CustomResource, the /scale subresource will return an error on GET.
  , v1beta1CustomResourceSubresourceScaleStatusReplicasPath :: !(Text) -- ^ /Required/ "statusReplicasPath" - StatusReplicasPath defines the JSON path inside of a CustomResource 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 CustomResource, the status replica value in the /scale subresource will default to 0.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1CustomResourceSubresourceScale
instance A.FromJSON V1beta1CustomResourceSubresourceScale where
  parseJSON = A.withObject "V1beta1CustomResourceSubresourceScale" $ \o ->
    V1beta1CustomResourceSubresourceScale
      <$> (o .:? "labelSelectorPath")
      <*> (o .:  "specReplicasPath")
      <*> (o .:  "statusReplicasPath")

-- | ToJSON V1beta1CustomResourceSubresourceScale
instance A.ToJSON V1beta1CustomResourceSubresourceScale where
  toJSON V1beta1CustomResourceSubresourceScale {..} =
   _omitNulls
      [ "labelSelectorPath" .= v1beta1CustomResourceSubresourceScaleLabelSelectorPath
      , "specReplicasPath" .= v1beta1CustomResourceSubresourceScaleSpecReplicasPath
      , "statusReplicasPath" .= v1beta1CustomResourceSubresourceScaleStatusReplicasPath
      ]


-- | Construct a value of type 'V1beta1CustomResourceSubresourceScale' (by applying it's required fields, if any)
mkV1beta1CustomResourceSubresourceScale
  :: Text -- ^ 'v1beta1CustomResourceSubresourceScaleSpecReplicasPath': SpecReplicasPath defines the JSON path inside of a CustomResource 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 CustomResource, the /scale subresource will return an error on GET.
  -> Text -- ^ 'v1beta1CustomResourceSubresourceScaleStatusReplicasPath': StatusReplicasPath defines the JSON path inside of a CustomResource 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 CustomResource, the status replica value in the /scale subresource will default to 0.
  -> V1beta1CustomResourceSubresourceScale
mkV1beta1CustomResourceSubresourceScale v1beta1CustomResourceSubresourceScaleSpecReplicasPath v1beta1CustomResourceSubresourceScaleStatusReplicasPath =
  V1beta1CustomResourceSubresourceScale
  { v1beta1CustomResourceSubresourceScaleLabelSelectorPath = Nothing
  , v1beta1CustomResourceSubresourceScaleSpecReplicasPath
  , v1beta1CustomResourceSubresourceScaleStatusReplicasPath
  }

-- ** V1beta1CustomResourceSubresources
-- | V1beta1CustomResourceSubresources
-- CustomResourceSubresources defines the status and scale subresources for CustomResources.
data V1beta1CustomResourceSubresources = V1beta1CustomResourceSubresources
  { v1beta1CustomResourceSubresourcesScale :: !(Maybe V1beta1CustomResourceSubresourceScale) -- ^ "scale"
  , v1beta1CustomResourceSubresourcesStatus :: !(Maybe A.Value) -- ^ "status" - Status denotes the status subresource for CustomResources
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1CustomResourceSubresources
instance A.FromJSON V1beta1CustomResourceSubresources where
  parseJSON = A.withObject "V1beta1CustomResourceSubresources" $ \o ->
    V1beta1CustomResourceSubresources
      <$> (o .:? "scale")
      <*> (o .:? "status")

-- | ToJSON V1beta1CustomResourceSubresources
instance A.ToJSON V1beta1CustomResourceSubresources where
  toJSON V1beta1CustomResourceSubresources {..} =
   _omitNulls
      [ "scale" .= v1beta1CustomResourceSubresourcesScale
      , "status" .= v1beta1CustomResourceSubresourcesStatus
      ]


-- | Construct a value of type 'V1beta1CustomResourceSubresources' (by applying it's required fields, if any)
mkV1beta1CustomResourceSubresources
  :: V1beta1CustomResourceSubresources
mkV1beta1CustomResourceSubresources =
  V1beta1CustomResourceSubresources
  { v1beta1CustomResourceSubresourcesScale = Nothing
  , v1beta1CustomResourceSubresourcesStatus = Nothing
  }

-- ** V1beta1CustomResourceValidation
-- | V1beta1CustomResourceValidation
-- CustomResourceValidation is a list of validation methods for CustomResources.
data V1beta1CustomResourceValidation = V1beta1CustomResourceValidation
  { v1beta1CustomResourceValidationOpenApiv3Schema :: !(Maybe V1beta1JSONSchemaProps) -- ^ "openAPIV3Schema"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1CustomResourceValidation
instance A.FromJSON V1beta1CustomResourceValidation where
  parseJSON = A.withObject "V1beta1CustomResourceValidation" $ \o ->
    V1beta1CustomResourceValidation
      <$> (o .:? "openAPIV3Schema")

-- | ToJSON V1beta1CustomResourceValidation
instance A.ToJSON V1beta1CustomResourceValidation where
  toJSON V1beta1CustomResourceValidation {..} =
   _omitNulls
      [ "openAPIV3Schema" .= v1beta1CustomResourceValidationOpenApiv3Schema
      ]


-- | Construct a value of type 'V1beta1CustomResourceValidation' (by applying it's required fields, if any)
mkV1beta1CustomResourceValidation
  :: V1beta1CustomResourceValidation
mkV1beta1CustomResourceValidation =
  V1beta1CustomResourceValidation
  { v1beta1CustomResourceValidationOpenApiv3Schema = Nothing
  }

-- ** V1beta1DaemonSet
-- | V1beta1DaemonSet
-- DEPRECATED - This group version of DaemonSet is deprecated by apps/v1beta2/DaemonSet. See the release notes for more information. DaemonSet represents the configuration of a daemon set.
data V1beta1DaemonSet = V1beta1DaemonSet
  { v1beta1DaemonSetApiVersion :: !(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/api-conventions.md#resources
  , v1beta1DaemonSetKind :: !(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/api-conventions.md#types-kinds
  , v1beta1DaemonSetMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta1DaemonSetSpec :: !(Maybe V1beta1DaemonSetSpec) -- ^ "spec"
  , v1beta1DaemonSetStatus :: !(Maybe V1beta1DaemonSetStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1DaemonSet
instance A.FromJSON V1beta1DaemonSet where
  parseJSON = A.withObject "V1beta1DaemonSet" $ \o ->
    V1beta1DaemonSet
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON V1beta1DaemonSet
instance A.ToJSON V1beta1DaemonSet where
  toJSON V1beta1DaemonSet {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1DaemonSetApiVersion
      , "kind" .= v1beta1DaemonSetKind
      , "metadata" .= v1beta1DaemonSetMetadata
      , "spec" .= v1beta1DaemonSetSpec
      , "status" .= v1beta1DaemonSetStatus
      ]


-- | Construct a value of type 'V1beta1DaemonSet' (by applying it's required fields, if any)
mkV1beta1DaemonSet
  :: V1beta1DaemonSet
mkV1beta1DaemonSet =
  V1beta1DaemonSet
  { v1beta1DaemonSetApiVersion = Nothing
  , v1beta1DaemonSetKind = Nothing
  , v1beta1DaemonSetMetadata = Nothing
  , v1beta1DaemonSetSpec = Nothing
  , v1beta1DaemonSetStatus = Nothing
  }

-- ** V1beta1DaemonSetCondition
-- | V1beta1DaemonSetCondition
-- DaemonSetCondition describes the state of a DaemonSet at a certain point.
data V1beta1DaemonSetCondition = V1beta1DaemonSetCondition
  { v1beta1DaemonSetConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - Last time the condition transitioned from one status to another.
  , v1beta1DaemonSetConditionMessage :: !(Maybe Text) -- ^ "message" - A human readable message indicating details about the transition.
  , v1beta1DaemonSetConditionReason :: !(Maybe Text) -- ^ "reason" - The reason for the condition&#39;s last transition.
  , v1beta1DaemonSetConditionStatus :: !(Text) -- ^ /Required/ "status" - Status of the condition, one of True, False, Unknown.
  , v1beta1DaemonSetConditionType :: !(Text) -- ^ /Required/ "type" - Type of DaemonSet condition.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1DaemonSetCondition
instance A.FromJSON V1beta1DaemonSetCondition where
  parseJSON = A.withObject "V1beta1DaemonSetCondition" $ \o ->
    V1beta1DaemonSetCondition
      <$> (o .:? "lastTransitionTime")
      <*> (o .:? "message")
      <*> (o .:? "reason")
      <*> (o .:  "status")
      <*> (o .:  "type")

-- | ToJSON V1beta1DaemonSetCondition
instance A.ToJSON V1beta1DaemonSetCondition where
  toJSON V1beta1DaemonSetCondition {..} =
   _omitNulls
      [ "lastTransitionTime" .= v1beta1DaemonSetConditionLastTransitionTime
      , "message" .= v1beta1DaemonSetConditionMessage
      , "reason" .= v1beta1DaemonSetConditionReason
      , "status" .= v1beta1DaemonSetConditionStatus
      , "type" .= v1beta1DaemonSetConditionType
      ]


-- | Construct a value of type 'V1beta1DaemonSetCondition' (by applying it's required fields, if any)
mkV1beta1DaemonSetCondition
  :: Text -- ^ 'v1beta1DaemonSetConditionStatus': Status of the condition, one of True, False, Unknown.
  -> Text -- ^ 'v1beta1DaemonSetConditionType': Type of DaemonSet condition.
  -> V1beta1DaemonSetCondition
mkV1beta1DaemonSetCondition v1beta1DaemonSetConditionStatus v1beta1DaemonSetConditionType =
  V1beta1DaemonSetCondition
  { v1beta1DaemonSetConditionLastTransitionTime = Nothing
  , v1beta1DaemonSetConditionMessage = Nothing
  , v1beta1DaemonSetConditionReason = Nothing
  , v1beta1DaemonSetConditionStatus
  , v1beta1DaemonSetConditionType
  }

-- ** V1beta1DaemonSetList
-- | V1beta1DaemonSetList
-- DaemonSetList is a collection of daemon sets.
data V1beta1DaemonSetList = V1beta1DaemonSetList
  { v1beta1DaemonSetListApiVersion :: !(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/api-conventions.md#resources
  , v1beta1DaemonSetListItems :: !([V1beta1DaemonSet]) -- ^ /Required/ "items" - A list of daemon sets.
  , v1beta1DaemonSetListKind :: !(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/api-conventions.md#types-kinds
  , v1beta1DaemonSetListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1DaemonSetList
instance A.FromJSON V1beta1DaemonSetList where
  parseJSON = A.withObject "V1beta1DaemonSetList" $ \o ->
    V1beta1DaemonSetList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1beta1DaemonSetList
instance A.ToJSON V1beta1DaemonSetList where
  toJSON V1beta1DaemonSetList {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1DaemonSetListApiVersion
      , "items" .= v1beta1DaemonSetListItems
      , "kind" .= v1beta1DaemonSetListKind
      , "metadata" .= v1beta1DaemonSetListMetadata
      ]


-- | Construct a value of type 'V1beta1DaemonSetList' (by applying it's required fields, if any)
mkV1beta1DaemonSetList
  :: [V1beta1DaemonSet] -- ^ 'v1beta1DaemonSetListItems': A list of daemon sets.
  -> V1beta1DaemonSetList
mkV1beta1DaemonSetList v1beta1DaemonSetListItems =
  V1beta1DaemonSetList
  { v1beta1DaemonSetListApiVersion = Nothing
  , v1beta1DaemonSetListItems
  , v1beta1DaemonSetListKind = Nothing
  , v1beta1DaemonSetListMetadata = Nothing
  }

-- ** V1beta1DaemonSetSpec
-- | V1beta1DaemonSetSpec
-- DaemonSetSpec is the specification of a daemon set.
data V1beta1DaemonSetSpec = V1beta1DaemonSetSpec
  { v1beta1DaemonSetSpecMinReadySeconds :: !(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).
  , v1beta1DaemonSetSpecRevisionHistoryLimit :: !(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.
  , v1beta1DaemonSetSpecSelector :: !(Maybe V1LabelSelector) -- ^ "selector"
  , v1beta1DaemonSetSpecTemplate :: !(V1PodTemplateSpec) -- ^ /Required/ "template"
  , v1beta1DaemonSetSpecTemplateGeneration :: !(Maybe Integer) -- ^ "templateGeneration" - DEPRECATED. A sequence number representing a specific generation of the template. Populated by the system. It can be set only during the creation.
  , v1beta1DaemonSetSpecUpdateStrategy :: !(Maybe V1beta1DaemonSetUpdateStrategy) -- ^ "updateStrategy"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1DaemonSetSpec
instance A.FromJSON V1beta1DaemonSetSpec where
  parseJSON = A.withObject "V1beta1DaemonSetSpec" $ \o ->
    V1beta1DaemonSetSpec
      <$> (o .:? "minReadySeconds")
      <*> (o .:? "revisionHistoryLimit")
      <*> (o .:? "selector")
      <*> (o .:  "template")
      <*> (o .:? "templateGeneration")
      <*> (o .:? "updateStrategy")

-- | ToJSON V1beta1DaemonSetSpec
instance A.ToJSON V1beta1DaemonSetSpec where
  toJSON V1beta1DaemonSetSpec {..} =
   _omitNulls
      [ "minReadySeconds" .= v1beta1DaemonSetSpecMinReadySeconds
      , "revisionHistoryLimit" .= v1beta1DaemonSetSpecRevisionHistoryLimit
      , "selector" .= v1beta1DaemonSetSpecSelector
      , "template" .= v1beta1DaemonSetSpecTemplate
      , "templateGeneration" .= v1beta1DaemonSetSpecTemplateGeneration
      , "updateStrategy" .= v1beta1DaemonSetSpecUpdateStrategy
      ]


-- | Construct a value of type 'V1beta1DaemonSetSpec' (by applying it's required fields, if any)
mkV1beta1DaemonSetSpec
  :: V1PodTemplateSpec -- ^ 'v1beta1DaemonSetSpecTemplate' 
  -> V1beta1DaemonSetSpec
mkV1beta1DaemonSetSpec v1beta1DaemonSetSpecTemplate =
  V1beta1DaemonSetSpec
  { v1beta1DaemonSetSpecMinReadySeconds = Nothing
  , v1beta1DaemonSetSpecRevisionHistoryLimit = Nothing
  , v1beta1DaemonSetSpecSelector = Nothing
  , v1beta1DaemonSetSpecTemplate
  , v1beta1DaemonSetSpecTemplateGeneration = Nothing
  , v1beta1DaemonSetSpecUpdateStrategy = Nothing
  }

-- ** V1beta1DaemonSetStatus
-- | V1beta1DaemonSetStatus
-- DaemonSetStatus represents the current status of a daemon set.
data V1beta1DaemonSetStatus = V1beta1DaemonSetStatus
  { v1beta1DaemonSetStatusCollisionCount :: !(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.
  , v1beta1DaemonSetStatusConditions :: !(Maybe [V1beta1DaemonSetCondition]) -- ^ "conditions" - Represents the latest available observations of a DaemonSet&#39;s current state.
  , v1beta1DaemonSetStatusCurrentNumberScheduled :: !(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/
  , v1beta1DaemonSetStatusDesiredNumberScheduled :: !(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/
  , v1beta1DaemonSetStatusNumberAvailable :: !(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)
  , v1beta1DaemonSetStatusNumberMisscheduled :: !(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/
  , v1beta1DaemonSetStatusNumberReady :: !(Int) -- ^ /Required/ "numberReady" - The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready.
  , v1beta1DaemonSetStatusNumberUnavailable :: !(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)
  , v1beta1DaemonSetStatusObservedGeneration :: !(Maybe Integer) -- ^ "observedGeneration" - The most recent generation observed by the daemon set controller.
  , v1beta1DaemonSetStatusUpdatedNumberScheduled :: !(Maybe Int) -- ^ "updatedNumberScheduled" - The total number of nodes that are running updated daemon pod
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1DaemonSetStatus
instance A.FromJSON V1beta1DaemonSetStatus where
  parseJSON = A.withObject "V1beta1DaemonSetStatus" $ \o ->
    V1beta1DaemonSetStatus
      <$> (o .:? "collisionCount")
      <*> (o .:? "conditions")
      <*> (o .:  "currentNumberScheduled")
      <*> (o .:  "desiredNumberScheduled")
      <*> (o .:? "numberAvailable")
      <*> (o .:  "numberMisscheduled")
      <*> (o .:  "numberReady")
      <*> (o .:? "numberUnavailable")
      <*> (o .:? "observedGeneration")
      <*> (o .:? "updatedNumberScheduled")

-- | ToJSON V1beta1DaemonSetStatus
instance A.ToJSON V1beta1DaemonSetStatus where
  toJSON V1beta1DaemonSetStatus {..} =
   _omitNulls
      [ "collisionCount" .= v1beta1DaemonSetStatusCollisionCount
      , "conditions" .= v1beta1DaemonSetStatusConditions
      , "currentNumberScheduled" .= v1beta1DaemonSetStatusCurrentNumberScheduled
      , "desiredNumberScheduled" .= v1beta1DaemonSetStatusDesiredNumberScheduled
      , "numberAvailable" .= v1beta1DaemonSetStatusNumberAvailable
      , "numberMisscheduled" .= v1beta1DaemonSetStatusNumberMisscheduled
      , "numberReady" .= v1beta1DaemonSetStatusNumberReady
      , "numberUnavailable" .= v1beta1DaemonSetStatusNumberUnavailable
      , "observedGeneration" .= v1beta1DaemonSetStatusObservedGeneration
      , "updatedNumberScheduled" .= v1beta1DaemonSetStatusUpdatedNumberScheduled
      ]


-- | Construct a value of type 'V1beta1DaemonSetStatus' (by applying it's required fields, if any)
mkV1beta1DaemonSetStatus
  :: Int -- ^ 'v1beta1DaemonSetStatusCurrentNumberScheduled': 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 -- ^ 'v1beta1DaemonSetStatusDesiredNumberScheduled': 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 -- ^ 'v1beta1DaemonSetStatusNumberMisscheduled': 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 -- ^ 'v1beta1DaemonSetStatusNumberReady': The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready.
  -> V1beta1DaemonSetStatus
mkV1beta1DaemonSetStatus v1beta1DaemonSetStatusCurrentNumberScheduled v1beta1DaemonSetStatusDesiredNumberScheduled v1beta1DaemonSetStatusNumberMisscheduled v1beta1DaemonSetStatusNumberReady =
  V1beta1DaemonSetStatus
  { v1beta1DaemonSetStatusCollisionCount = Nothing
  , v1beta1DaemonSetStatusConditions = Nothing
  , v1beta1DaemonSetStatusCurrentNumberScheduled
  , v1beta1DaemonSetStatusDesiredNumberScheduled
  , v1beta1DaemonSetStatusNumberAvailable = Nothing
  , v1beta1DaemonSetStatusNumberMisscheduled
  , v1beta1DaemonSetStatusNumberReady
  , v1beta1DaemonSetStatusNumberUnavailable = Nothing
  , v1beta1DaemonSetStatusObservedGeneration = Nothing
  , v1beta1DaemonSetStatusUpdatedNumberScheduled = Nothing
  }

-- ** V1beta1DaemonSetUpdateStrategy
-- | V1beta1DaemonSetUpdateStrategy
data V1beta1DaemonSetUpdateStrategy = V1beta1DaemonSetUpdateStrategy
  { v1beta1DaemonSetUpdateStrategyRollingUpdate :: !(Maybe V1beta1RollingUpdateDaemonSet) -- ^ "rollingUpdate"
  , v1beta1DaemonSetUpdateStrategyType :: !(Maybe Text) -- ^ "type" - Type of daemon set update. Can be \&quot;RollingUpdate\&quot; or \&quot;OnDelete\&quot;. Default is OnDelete.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1DaemonSetUpdateStrategy
instance A.FromJSON V1beta1DaemonSetUpdateStrategy where
  parseJSON = A.withObject "V1beta1DaemonSetUpdateStrategy" $ \o ->
    V1beta1DaemonSetUpdateStrategy
      <$> (o .:? "rollingUpdate")
      <*> (o .:? "type")

-- | ToJSON V1beta1DaemonSetUpdateStrategy
instance A.ToJSON V1beta1DaemonSetUpdateStrategy where
  toJSON V1beta1DaemonSetUpdateStrategy {..} =
   _omitNulls
      [ "rollingUpdate" .= v1beta1DaemonSetUpdateStrategyRollingUpdate
      , "type" .= v1beta1DaemonSetUpdateStrategyType
      ]


-- | Construct a value of type 'V1beta1DaemonSetUpdateStrategy' (by applying it's required fields, if any)
mkV1beta1DaemonSetUpdateStrategy
  :: V1beta1DaemonSetUpdateStrategy
mkV1beta1DaemonSetUpdateStrategy =
  V1beta1DaemonSetUpdateStrategy
  { v1beta1DaemonSetUpdateStrategyRollingUpdate = Nothing
  , v1beta1DaemonSetUpdateStrategyType = Nothing
  }

-- ** V1beta1Event
-- | V1beta1Event
-- Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.
data V1beta1Event = V1beta1Event
  { v1beta1EventAction :: !(Maybe Text) -- ^ "action" - What action was taken/failed regarding to the regarding object.
  , v1beta1EventApiVersion :: !(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/api-conventions.md#resources
  , v1beta1EventDeprecatedCount :: !(Maybe Int) -- ^ "deprecatedCount" - Deprecated field assuring backward compatibility with core.v1 Event type
  , v1beta1EventDeprecatedFirstTimestamp :: !(Maybe DateTime) -- ^ "deprecatedFirstTimestamp" - Deprecated field assuring backward compatibility with core.v1 Event type
  , v1beta1EventDeprecatedLastTimestamp :: !(Maybe DateTime) -- ^ "deprecatedLastTimestamp" - Deprecated field assuring backward compatibility with core.v1 Event type
  , v1beta1EventDeprecatedSource :: !(Maybe V1EventSource) -- ^ "deprecatedSource"
  , v1beta1EventEventTime :: !(DateTime) -- ^ /Required/ "eventTime" - Required. Time when this Event was first observed.
  , v1beta1EventKind :: !(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/api-conventions.md#types-kinds
  , v1beta1EventMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta1EventNote :: !(Maybe Text) -- ^ "note" - Optional. 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.
  , v1beta1EventReason :: !(Maybe Text) -- ^ "reason" - Why the action was taken.
  , v1beta1EventRegarding :: !(Maybe V1ObjectReference) -- ^ "regarding"
  , v1beta1EventRelated :: !(Maybe V1ObjectReference) -- ^ "related"
  , v1beta1EventReportingController :: !(Maybe Text) -- ^ "reportingController" - Name of the controller that emitted this Event, e.g. &#x60;kubernetes.io/kubelet&#x60;.
  , v1beta1EventReportingInstance :: !(Maybe Text) -- ^ "reportingInstance" - ID of the controller instance, e.g. &#x60;kubelet-xyzf&#x60;.
  , v1beta1EventSeries :: !(Maybe V1beta1EventSeries) -- ^ "series"
  , v1beta1EventType :: !(Maybe Text) -- ^ "type" - Type of this event (Normal, Warning), new types could be added in the future.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1Event
instance A.FromJSON V1beta1Event where
  parseJSON = A.withObject "V1beta1Event" $ \o ->
    V1beta1Event
      <$> (o .:? "action")
      <*> (o .:? "apiVersion")
      <*> (o .:? "deprecatedCount")
      <*> (o .:? "deprecatedFirstTimestamp")
      <*> (o .:? "deprecatedLastTimestamp")
      <*> (o .:? "deprecatedSource")
      <*> (o .:  "eventTime")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "note")
      <*> (o .:? "reason")
      <*> (o .:? "regarding")
      <*> (o .:? "related")
      <*> (o .:? "reportingController")
      <*> (o .:? "reportingInstance")
      <*> (o .:? "series")
      <*> (o .:? "type")

-- | ToJSON V1beta1Event
instance A.ToJSON V1beta1Event where
  toJSON V1beta1Event {..} =
   _omitNulls
      [ "action" .= v1beta1EventAction
      , "apiVersion" .= v1beta1EventApiVersion
      , "deprecatedCount" .= v1beta1EventDeprecatedCount
      , "deprecatedFirstTimestamp" .= v1beta1EventDeprecatedFirstTimestamp
      , "deprecatedLastTimestamp" .= v1beta1EventDeprecatedLastTimestamp
      , "deprecatedSource" .= v1beta1EventDeprecatedSource
      , "eventTime" .= v1beta1EventEventTime
      , "kind" .= v1beta1EventKind
      , "metadata" .= v1beta1EventMetadata
      , "note" .= v1beta1EventNote
      , "reason" .= v1beta1EventReason
      , "regarding" .= v1beta1EventRegarding
      , "related" .= v1beta1EventRelated
      , "reportingController" .= v1beta1EventReportingController
      , "reportingInstance" .= v1beta1EventReportingInstance
      , "series" .= v1beta1EventSeries
      , "type" .= v1beta1EventType
      ]


-- | Construct a value of type 'V1beta1Event' (by applying it's required fields, if any)
mkV1beta1Event
  :: DateTime -- ^ 'v1beta1EventEventTime': Required. Time when this Event was first observed.
  -> V1beta1Event
mkV1beta1Event v1beta1EventEventTime =
  V1beta1Event
  { v1beta1EventAction = Nothing
  , v1beta1EventApiVersion = Nothing
  , v1beta1EventDeprecatedCount = Nothing
  , v1beta1EventDeprecatedFirstTimestamp = Nothing
  , v1beta1EventDeprecatedLastTimestamp = Nothing
  , v1beta1EventDeprecatedSource = Nothing
  , v1beta1EventEventTime
  , v1beta1EventKind = Nothing
  , v1beta1EventMetadata = Nothing
  , v1beta1EventNote = Nothing
  , v1beta1EventReason = Nothing
  , v1beta1EventRegarding = Nothing
  , v1beta1EventRelated = Nothing
  , v1beta1EventReportingController = Nothing
  , v1beta1EventReportingInstance = Nothing
  , v1beta1EventSeries = Nothing
  , v1beta1EventType = Nothing
  }

-- ** V1beta1EventList
-- | V1beta1EventList
-- EventList is a list of Event objects.
data V1beta1EventList = V1beta1EventList
  { v1beta1EventListApiVersion :: !(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/api-conventions.md#resources
  , v1beta1EventListItems :: !([V1beta1Event]) -- ^ /Required/ "items" - Items is a list of schema objects.
  , v1beta1EventListKind :: !(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/api-conventions.md#types-kinds
  , v1beta1EventListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1EventList
instance A.FromJSON V1beta1EventList where
  parseJSON = A.withObject "V1beta1EventList" $ \o ->
    V1beta1EventList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1beta1EventList
instance A.ToJSON V1beta1EventList where
  toJSON V1beta1EventList {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1EventListApiVersion
      , "items" .= v1beta1EventListItems
      , "kind" .= v1beta1EventListKind
      , "metadata" .= v1beta1EventListMetadata
      ]


-- | Construct a value of type 'V1beta1EventList' (by applying it's required fields, if any)
mkV1beta1EventList
  :: [V1beta1Event] -- ^ 'v1beta1EventListItems': Items is a list of schema objects.
  -> V1beta1EventList
mkV1beta1EventList v1beta1EventListItems =
  V1beta1EventList
  { v1beta1EventListApiVersion = Nothing
  , v1beta1EventListItems
  , v1beta1EventListKind = Nothing
  , v1beta1EventListMetadata = Nothing
  }

-- ** V1beta1EventSeries
-- | V1beta1EventSeries
-- EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time.
data V1beta1EventSeries = V1beta1EventSeries
  { v1beta1EventSeriesCount :: !(Int) -- ^ /Required/ "count" - Number of occurrences in this series up to the last heartbeat time
  , v1beta1EventSeriesLastObservedTime :: !(DateTime) -- ^ /Required/ "lastObservedTime" - Time when last Event from the series was seen before last heartbeat.
  , v1beta1EventSeriesState :: !(Text) -- ^ /Required/ "state" - Information whether this series is ongoing or finished.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1EventSeries
instance A.FromJSON V1beta1EventSeries where
  parseJSON = A.withObject "V1beta1EventSeries" $ \o ->
    V1beta1EventSeries
      <$> (o .:  "count")
      <*> (o .:  "lastObservedTime")
      <*> (o .:  "state")

-- | ToJSON V1beta1EventSeries
instance A.ToJSON V1beta1EventSeries where
  toJSON V1beta1EventSeries {..} =
   _omitNulls
      [ "count" .= v1beta1EventSeriesCount
      , "lastObservedTime" .= v1beta1EventSeriesLastObservedTime
      , "state" .= v1beta1EventSeriesState
      ]


-- | Construct a value of type 'V1beta1EventSeries' (by applying it's required fields, if any)
mkV1beta1EventSeries
  :: Int -- ^ 'v1beta1EventSeriesCount': Number of occurrences in this series up to the last heartbeat time
  -> DateTime -- ^ 'v1beta1EventSeriesLastObservedTime': Time when last Event from the series was seen before last heartbeat.
  -> Text -- ^ 'v1beta1EventSeriesState': Information whether this series is ongoing or finished.
  -> V1beta1EventSeries
mkV1beta1EventSeries v1beta1EventSeriesCount v1beta1EventSeriesLastObservedTime v1beta1EventSeriesState =
  V1beta1EventSeries
  { v1beta1EventSeriesCount
  , v1beta1EventSeriesLastObservedTime
  , v1beta1EventSeriesState
  }

-- ** V1beta1Eviction
-- | V1beta1Eviction
-- 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 V1beta1Eviction = V1beta1Eviction
  { v1beta1EvictionApiVersion :: !(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/api-conventions.md#resources
  , v1beta1EvictionDeleteOptions :: !(Maybe V1DeleteOptions) -- ^ "deleteOptions"
  , v1beta1EvictionKind :: !(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/api-conventions.md#types-kinds
  , v1beta1EvictionMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1Eviction
instance A.FromJSON V1beta1Eviction where
  parseJSON = A.withObject "V1beta1Eviction" $ \o ->
    V1beta1Eviction
      <$> (o .:? "apiVersion")
      <*> (o .:? "deleteOptions")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1beta1Eviction
instance A.ToJSON V1beta1Eviction where
  toJSON V1beta1Eviction {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1EvictionApiVersion
      , "deleteOptions" .= v1beta1EvictionDeleteOptions
      , "kind" .= v1beta1EvictionKind
      , "metadata" .= v1beta1EvictionMetadata
      ]


-- | Construct a value of type 'V1beta1Eviction' (by applying it's required fields, if any)
mkV1beta1Eviction
  :: V1beta1Eviction
mkV1beta1Eviction =
  V1beta1Eviction
  { v1beta1EvictionApiVersion = Nothing
  , v1beta1EvictionDeleteOptions = Nothing
  , v1beta1EvictionKind = Nothing
  , v1beta1EvictionMetadata = Nothing
  }

-- ** V1beta1ExternalDocumentation
-- | V1beta1ExternalDocumentation
-- ExternalDocumentation allows referencing an external resource for extended documentation.
data V1beta1ExternalDocumentation = V1beta1ExternalDocumentation
  { v1beta1ExternalDocumentationDescription :: !(Maybe Text) -- ^ "description"
  , v1beta1ExternalDocumentationUrl :: !(Maybe Text) -- ^ "url"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1ExternalDocumentation
instance A.FromJSON V1beta1ExternalDocumentation where
  parseJSON = A.withObject "V1beta1ExternalDocumentation" $ \o ->
    V1beta1ExternalDocumentation
      <$> (o .:? "description")
      <*> (o .:? "url")

-- | ToJSON V1beta1ExternalDocumentation
instance A.ToJSON V1beta1ExternalDocumentation where
  toJSON V1beta1ExternalDocumentation {..} =
   _omitNulls
      [ "description" .= v1beta1ExternalDocumentationDescription
      , "url" .= v1beta1ExternalDocumentationUrl
      ]


-- | Construct a value of type 'V1beta1ExternalDocumentation' (by applying it's required fields, if any)
mkV1beta1ExternalDocumentation
  :: V1beta1ExternalDocumentation
mkV1beta1ExternalDocumentation =
  V1beta1ExternalDocumentation
  { v1beta1ExternalDocumentationDescription = Nothing
  , v1beta1ExternalDocumentationUrl = Nothing
  }

-- ** V1beta1IPBlock
-- | V1beta1IPBlock
-- DEPRECATED 1.9 - This group version of IPBlock is deprecated by networking/v1/IPBlock. IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\") 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 V1beta1IPBlock = V1beta1IPBlock
  { v1beta1IPBlockCidr :: !(Text) -- ^ /Required/ "cidr" - CIDR is a string representing the IP Block Valid examples are \&quot;192.168.1.1/24\&quot;
  , v1beta1IPBlockExcept :: !(Maybe [Text]) -- ^ "except" - Except is a slice of CIDRs that should not be included within an IP Block Valid examples are \&quot;192.168.1.1/24\&quot; Except values will be rejected if they are outside the CIDR range
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1IPBlock
instance A.FromJSON V1beta1IPBlock where
  parseJSON = A.withObject "V1beta1IPBlock" $ \o ->
    V1beta1IPBlock
      <$> (o .:  "cidr")
      <*> (o .:? "except")

-- | ToJSON V1beta1IPBlock
instance A.ToJSON V1beta1IPBlock where
  toJSON V1beta1IPBlock {..} =
   _omitNulls
      [ "cidr" .= v1beta1IPBlockCidr
      , "except" .= v1beta1IPBlockExcept
      ]


-- | Construct a value of type 'V1beta1IPBlock' (by applying it's required fields, if any)
mkV1beta1IPBlock
  :: Text -- ^ 'v1beta1IPBlockCidr': CIDR is a string representing the IP Block Valid examples are \"192.168.1.1/24\"
  -> V1beta1IPBlock
mkV1beta1IPBlock v1beta1IPBlockCidr =
  V1beta1IPBlock
  { v1beta1IPBlockCidr
  , v1beta1IPBlockExcept = Nothing
  }

-- ** V1beta1JSONSchemaProps
-- | V1beta1JSONSchemaProps
-- JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/).
data V1beta1JSONSchemaProps = V1beta1JSONSchemaProps
  { v1beta1JSONSchemaPropsRef :: !(Maybe Text) -- ^ "$ref"
  , v1beta1JSONSchemaPropsSchema :: !(Maybe Text) -- ^ "$schema"
  , v1beta1JSONSchemaPropsAdditionalItems :: !(Maybe A.Value) -- ^ "additionalItems" - JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. Defaults to true for the boolean property.
  , v1beta1JSONSchemaPropsAdditionalProperties :: !(Maybe A.Value) -- ^ "additionalProperties" - JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. Defaults to true for the boolean property.
  , v1beta1JSONSchemaPropsAllOf :: !(Maybe [V1beta1JSONSchemaProps]) -- ^ "allOf"
  , v1beta1JSONSchemaPropsAnyOf :: !(Maybe [V1beta1JSONSchemaProps]) -- ^ "anyOf"
  , v1beta1JSONSchemaPropsDefault :: !(Maybe A.Value) -- ^ "default" - JSON represents any valid JSON value. These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.
  , v1beta1JSONSchemaPropsDefinitions :: !(Maybe (Map.Map String V1beta1JSONSchemaProps)) -- ^ "definitions"
  , v1beta1JSONSchemaPropsDependencies :: !(Maybe (Map.Map String A.Value)) -- ^ "dependencies"
  , v1beta1JSONSchemaPropsDescription :: !(Maybe Text) -- ^ "description"
  , v1beta1JSONSchemaPropsEnum :: !(Maybe [A.Value]) -- ^ "enum"
  , v1beta1JSONSchemaPropsExample :: !(Maybe A.Value) -- ^ "example" - JSON represents any valid JSON value. These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.
  , v1beta1JSONSchemaPropsExclusiveMaximum :: !(Maybe Bool) -- ^ "exclusiveMaximum"
  , v1beta1JSONSchemaPropsExclusiveMinimum :: !(Maybe Bool) -- ^ "exclusiveMinimum"
  , v1beta1JSONSchemaPropsExternalDocs :: !(Maybe V1beta1ExternalDocumentation) -- ^ "externalDocs"
  , v1beta1JSONSchemaPropsFormat :: !(Maybe Text) -- ^ "format"
  , v1beta1JSONSchemaPropsId :: !(Maybe Text) -- ^ "id"
  , v1beta1JSONSchemaPropsItems :: !(Maybe A.Value) -- ^ "items" - JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps or an array of JSONSchemaProps. Mainly here for serialization purposes.
  , v1beta1JSONSchemaPropsMaxItems :: !(Maybe Integer) -- ^ "maxItems"
  , v1beta1JSONSchemaPropsMaxLength :: !(Maybe Integer) -- ^ "maxLength"
  , v1beta1JSONSchemaPropsMaxProperties :: !(Maybe Integer) -- ^ "maxProperties"
  , v1beta1JSONSchemaPropsMaximum :: !(Maybe Double) -- ^ "maximum"
  , v1beta1JSONSchemaPropsMinItems :: !(Maybe Integer) -- ^ "minItems"
  , v1beta1JSONSchemaPropsMinLength :: !(Maybe Integer) -- ^ "minLength"
  , v1beta1JSONSchemaPropsMinProperties :: !(Maybe Integer) -- ^ "minProperties"
  , v1beta1JSONSchemaPropsMinimum :: !(Maybe Double) -- ^ "minimum"
  , v1beta1JSONSchemaPropsMultipleOf :: !(Maybe Double) -- ^ "multipleOf"
  , v1beta1JSONSchemaPropsNot :: !(Maybe V1beta1JSONSchemaProps) -- ^ "not"
  , v1beta1JSONSchemaPropsNullable :: !(Maybe Bool) -- ^ "nullable"
  , v1beta1JSONSchemaPropsOneOf :: !(Maybe [V1beta1JSONSchemaProps]) -- ^ "oneOf"
  , v1beta1JSONSchemaPropsPattern :: !(Maybe Text) -- ^ "pattern"
  , v1beta1JSONSchemaPropsPatternProperties :: !(Maybe (Map.Map String V1beta1JSONSchemaProps)) -- ^ "patternProperties"
  , v1beta1JSONSchemaPropsProperties :: !(Maybe (Map.Map String V1beta1JSONSchemaProps)) -- ^ "properties"
  , v1beta1JSONSchemaPropsRequired :: !(Maybe [Text]) -- ^ "required"
  , v1beta1JSONSchemaPropsTitle :: !(Maybe Text) -- ^ "title"
  , v1beta1JSONSchemaPropsType :: !(Maybe Text) -- ^ "type"
  , v1beta1JSONSchemaPropsUniqueItems :: !(Maybe Bool) -- ^ "uniqueItems"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1JSONSchemaProps
instance A.FromJSON V1beta1JSONSchemaProps where
  parseJSON = A.withObject "V1beta1JSONSchemaProps" $ \o ->
    V1beta1JSONSchemaProps
      <$> (o .:? "$ref")
      <*> (o .:? "$schema")
      <*> (o .:? "additionalItems")
      <*> (o .:? "additionalProperties")
      <*> (o .:? "allOf")
      <*> (o .:? "anyOf")
      <*> (o .:? "default")
      <*> (o .:? "definitions")
      <*> (o .:? "dependencies")
      <*> (o .:? "description")
      <*> (o .:? "enum")
      <*> (o .:? "example")
      <*> (o .:? "exclusiveMaximum")
      <*> (o .:? "exclusiveMinimum")
      <*> (o .:? "externalDocs")
      <*> (o .:? "format")
      <*> (o .:? "id")
      <*> (o .:? "items")
      <*> (o .:? "maxItems")
      <*> (o .:? "maxLength")
      <*> (o .:? "maxProperties")
      <*> (o .:? "maximum")
      <*> (o .:? "minItems")
      <*> (o .:? "minLength")
      <*> (o .:? "minProperties")
      <*> (o .:? "minimum")
      <*> (o .:? "multipleOf")
      <*> (o .:? "not")
      <*> (o .:? "nullable")
      <*> (o .:? "oneOf")
      <*> (o .:? "pattern")
      <*> (o .:? "patternProperties")
      <*> (o .:? "properties")
      <*> (o .:? "required")
      <*> (o .:? "title")
      <*> (o .:? "type")
      <*> (o .:? "uniqueItems")

-- | ToJSON V1beta1JSONSchemaProps
instance A.ToJSON V1beta1JSONSchemaProps where
  toJSON V1beta1JSONSchemaProps {..} =
   _omitNulls
      [ "$ref" .= v1beta1JSONSchemaPropsRef
      , "$schema" .= v1beta1JSONSchemaPropsSchema
      , "additionalItems" .= v1beta1JSONSchemaPropsAdditionalItems
      , "additionalProperties" .= v1beta1JSONSchemaPropsAdditionalProperties
      , "allOf" .= v1beta1JSONSchemaPropsAllOf
      , "anyOf" .= v1beta1JSONSchemaPropsAnyOf
      , "default" .= v1beta1JSONSchemaPropsDefault
      , "definitions" .= v1beta1JSONSchemaPropsDefinitions
      , "dependencies" .= v1beta1JSONSchemaPropsDependencies
      , "description" .= v1beta1JSONSchemaPropsDescription
      , "enum" .= v1beta1JSONSchemaPropsEnum
      , "example" .= v1beta1JSONSchemaPropsExample
      , "exclusiveMaximum" .= v1beta1JSONSchemaPropsExclusiveMaximum
      , "exclusiveMinimum" .= v1beta1JSONSchemaPropsExclusiveMinimum
      , "externalDocs" .= v1beta1JSONSchemaPropsExternalDocs
      , "format" .= v1beta1JSONSchemaPropsFormat
      , "id" .= v1beta1JSONSchemaPropsId
      , "items" .= v1beta1JSONSchemaPropsItems
      , "maxItems" .= v1beta1JSONSchemaPropsMaxItems
      , "maxLength" .= v1beta1JSONSchemaPropsMaxLength
      , "maxProperties" .= v1beta1JSONSchemaPropsMaxProperties
      , "maximum" .= v1beta1JSONSchemaPropsMaximum
      , "minItems" .= v1beta1JSONSchemaPropsMinItems
      , "minLength" .= v1beta1JSONSchemaPropsMinLength
      , "minProperties" .= v1beta1JSONSchemaPropsMinProperties
      , "minimum" .= v1beta1JSONSchemaPropsMinimum
      , "multipleOf" .= v1beta1JSONSchemaPropsMultipleOf
      , "not" .= v1beta1JSONSchemaPropsNot
      , "nullable" .= v1beta1JSONSchemaPropsNullable
      , "oneOf" .= v1beta1JSONSchemaPropsOneOf
      , "pattern" .= v1beta1JSONSchemaPropsPattern
      , "patternProperties" .= v1beta1JSONSchemaPropsPatternProperties
      , "properties" .= v1beta1JSONSchemaPropsProperties
      , "required" .= v1beta1JSONSchemaPropsRequired
      , "title" .= v1beta1JSONSchemaPropsTitle
      , "type" .= v1beta1JSONSchemaPropsType
      , "uniqueItems" .= v1beta1JSONSchemaPropsUniqueItems
      ]


-- | Construct a value of type 'V1beta1JSONSchemaProps' (by applying it's required fields, if any)
mkV1beta1JSONSchemaProps
  :: V1beta1JSONSchemaProps
mkV1beta1JSONSchemaProps =
  V1beta1JSONSchemaProps
  { v1beta1JSONSchemaPropsRef = Nothing
  , v1beta1JSONSchemaPropsSchema = Nothing
  , v1beta1JSONSchemaPropsAdditionalItems = Nothing
  , v1beta1JSONSchemaPropsAdditionalProperties = Nothing
  , v1beta1JSONSchemaPropsAllOf = Nothing
  , v1beta1JSONSchemaPropsAnyOf = Nothing
  , v1beta1JSONSchemaPropsDefault = Nothing
  , v1beta1JSONSchemaPropsDefinitions = Nothing
  , v1beta1JSONSchemaPropsDependencies = Nothing
  , v1beta1JSONSchemaPropsDescription = Nothing
  , v1beta1JSONSchemaPropsEnum = Nothing
  , v1beta1JSONSchemaPropsExample = Nothing
  , v1beta1JSONSchemaPropsExclusiveMaximum = Nothing
  , v1beta1JSONSchemaPropsExclusiveMinimum = Nothing
  , v1beta1JSONSchemaPropsExternalDocs = Nothing
  , v1beta1JSONSchemaPropsFormat = Nothing
  , v1beta1JSONSchemaPropsId = Nothing
  , v1beta1JSONSchemaPropsItems = Nothing
  , v1beta1JSONSchemaPropsMaxItems = Nothing
  , v1beta1JSONSchemaPropsMaxLength = Nothing
  , v1beta1JSONSchemaPropsMaxProperties = Nothing
  , v1beta1JSONSchemaPropsMaximum = Nothing
  , v1beta1JSONSchemaPropsMinItems = Nothing
  , v1beta1JSONSchemaPropsMinLength = Nothing
  , v1beta1JSONSchemaPropsMinProperties = Nothing
  , v1beta1JSONSchemaPropsMinimum = Nothing
  , v1beta1JSONSchemaPropsMultipleOf = Nothing
  , v1beta1JSONSchemaPropsNot = Nothing
  , v1beta1JSONSchemaPropsNullable = Nothing
  , v1beta1JSONSchemaPropsOneOf = Nothing
  , v1beta1JSONSchemaPropsPattern = Nothing
  , v1beta1JSONSchemaPropsPatternProperties = Nothing
  , v1beta1JSONSchemaPropsProperties = Nothing
  , v1beta1JSONSchemaPropsRequired = Nothing
  , v1beta1JSONSchemaPropsTitle = Nothing
  , v1beta1JSONSchemaPropsType = Nothing
  , v1beta1JSONSchemaPropsUniqueItems = Nothing
  }

-- ** V1beta1JobTemplateSpec
-- | V1beta1JobTemplateSpec
-- JobTemplateSpec describes the data a Job should have when created from a template
data V1beta1JobTemplateSpec = V1beta1JobTemplateSpec
  { v1beta1JobTemplateSpecMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta1JobTemplateSpecSpec :: !(Maybe V1JobSpec) -- ^ "spec"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1JobTemplateSpec
instance A.FromJSON V1beta1JobTemplateSpec where
  parseJSON = A.withObject "V1beta1JobTemplateSpec" $ \o ->
    V1beta1JobTemplateSpec
      <$> (o .:? "metadata")
      <*> (o .:? "spec")

-- | ToJSON V1beta1JobTemplateSpec
instance A.ToJSON V1beta1JobTemplateSpec where
  toJSON V1beta1JobTemplateSpec {..} =
   _omitNulls
      [ "metadata" .= v1beta1JobTemplateSpecMetadata
      , "spec" .= v1beta1JobTemplateSpecSpec
      ]


-- | Construct a value of type 'V1beta1JobTemplateSpec' (by applying it's required fields, if any)
mkV1beta1JobTemplateSpec
  :: V1beta1JobTemplateSpec
mkV1beta1JobTemplateSpec =
  V1beta1JobTemplateSpec
  { v1beta1JobTemplateSpecMetadata = Nothing
  , v1beta1JobTemplateSpecSpec = Nothing
  }

-- ** V1beta1Lease
-- | V1beta1Lease
-- Lease defines a lease concept.
data V1beta1Lease = V1beta1Lease
  { v1beta1LeaseApiVersion :: !(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/api-conventions.md#resources
  , v1beta1LeaseKind :: !(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/api-conventions.md#types-kinds
  , v1beta1LeaseMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta1LeaseSpec :: !(Maybe V1beta1LeaseSpec) -- ^ "spec"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1Lease
instance A.FromJSON V1beta1Lease where
  parseJSON = A.withObject "V1beta1Lease" $ \o ->
    V1beta1Lease
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")

-- | ToJSON V1beta1Lease
instance A.ToJSON V1beta1Lease where
  toJSON V1beta1Lease {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1LeaseApiVersion
      , "kind" .= v1beta1LeaseKind
      , "metadata" .= v1beta1LeaseMetadata
      , "spec" .= v1beta1LeaseSpec
      ]


-- | Construct a value of type 'V1beta1Lease' (by applying it's required fields, if any)
mkV1beta1Lease
  :: V1beta1Lease
mkV1beta1Lease =
  V1beta1Lease
  { v1beta1LeaseApiVersion = Nothing
  , v1beta1LeaseKind = Nothing
  , v1beta1LeaseMetadata = Nothing
  , v1beta1LeaseSpec = Nothing
  }

-- ** V1beta1LeaseList
-- | V1beta1LeaseList
-- LeaseList is a list of Lease objects.
data V1beta1LeaseList = V1beta1LeaseList
  { v1beta1LeaseListApiVersion :: !(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/api-conventions.md#resources
  , v1beta1LeaseListItems :: !([V1beta1Lease]) -- ^ /Required/ "items" - Items is a list of schema objects.
  , v1beta1LeaseListKind :: !(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/api-conventions.md#types-kinds
  , v1beta1LeaseListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1LeaseList
instance A.FromJSON V1beta1LeaseList where
  parseJSON = A.withObject "V1beta1LeaseList" $ \o ->
    V1beta1LeaseList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1beta1LeaseList
instance A.ToJSON V1beta1LeaseList where
  toJSON V1beta1LeaseList {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1LeaseListApiVersion
      , "items" .= v1beta1LeaseListItems
      , "kind" .= v1beta1LeaseListKind
      , "metadata" .= v1beta1LeaseListMetadata
      ]


-- | Construct a value of type 'V1beta1LeaseList' (by applying it's required fields, if any)
mkV1beta1LeaseList
  :: [V1beta1Lease] -- ^ 'v1beta1LeaseListItems': Items is a list of schema objects.
  -> V1beta1LeaseList
mkV1beta1LeaseList v1beta1LeaseListItems =
  V1beta1LeaseList
  { v1beta1LeaseListApiVersion = Nothing
  , v1beta1LeaseListItems
  , v1beta1LeaseListKind = Nothing
  , v1beta1LeaseListMetadata = Nothing
  }

-- ** V1beta1LeaseSpec
-- | V1beta1LeaseSpec
-- LeaseSpec is a specification of a Lease.
data V1beta1LeaseSpec = V1beta1LeaseSpec
  { v1beta1LeaseSpecAcquireTime :: !(Maybe DateTime) -- ^ "acquireTime" - acquireTime is a time when the current lease was acquired.
  , v1beta1LeaseSpecHolderIdentity :: !(Maybe Text) -- ^ "holderIdentity" - holderIdentity contains the identity of the holder of a current lease.
  , v1beta1LeaseSpecLeaseDurationSeconds :: !(Maybe Int) -- ^ "leaseDurationSeconds" - leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measure against time of last observed RenewTime.
  , v1beta1LeaseSpecLeaseTransitions :: !(Maybe Int) -- ^ "leaseTransitions" - leaseTransitions is the number of transitions of a lease between holders.
  , v1beta1LeaseSpecRenewTime :: !(Maybe DateTime) -- ^ "renewTime" - renewTime is a time when the current holder of a lease has last updated the lease.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1LeaseSpec
instance A.FromJSON V1beta1LeaseSpec where
  parseJSON = A.withObject "V1beta1LeaseSpec" $ \o ->
    V1beta1LeaseSpec
      <$> (o .:? "acquireTime")
      <*> (o .:? "holderIdentity")
      <*> (o .:? "leaseDurationSeconds")
      <*> (o .:? "leaseTransitions")
      <*> (o .:? "renewTime")

-- | ToJSON V1beta1LeaseSpec
instance A.ToJSON V1beta1LeaseSpec where
  toJSON V1beta1LeaseSpec {..} =
   _omitNulls
      [ "acquireTime" .= v1beta1LeaseSpecAcquireTime
      , "holderIdentity" .= v1beta1LeaseSpecHolderIdentity
      , "leaseDurationSeconds" .= v1beta1LeaseSpecLeaseDurationSeconds
      , "leaseTransitions" .= v1beta1LeaseSpecLeaseTransitions
      , "renewTime" .= v1beta1LeaseSpecRenewTime
      ]


-- | Construct a value of type 'V1beta1LeaseSpec' (by applying it's required fields, if any)
mkV1beta1LeaseSpec
  :: V1beta1LeaseSpec
mkV1beta1LeaseSpec =
  V1beta1LeaseSpec
  { v1beta1LeaseSpecAcquireTime = Nothing
  , v1beta1LeaseSpecHolderIdentity = Nothing
  , v1beta1LeaseSpecLeaseDurationSeconds = Nothing
  , v1beta1LeaseSpecLeaseTransitions = Nothing
  , v1beta1LeaseSpecRenewTime = Nothing
  }

-- ** V1beta1LocalSubjectAccessReview
-- | V1beta1LocalSubjectAccessReview
-- 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 V1beta1LocalSubjectAccessReview = V1beta1LocalSubjectAccessReview
  { v1beta1LocalSubjectAccessReviewApiVersion :: !(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/api-conventions.md#resources
  , v1beta1LocalSubjectAccessReviewKind :: !(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/api-conventions.md#types-kinds
  , v1beta1LocalSubjectAccessReviewMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta1LocalSubjectAccessReviewSpec :: !(V1beta1SubjectAccessReviewSpec) -- ^ /Required/ "spec"
  , v1beta1LocalSubjectAccessReviewStatus :: !(Maybe V1beta1SubjectAccessReviewStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1LocalSubjectAccessReview
instance A.FromJSON V1beta1LocalSubjectAccessReview where
  parseJSON = A.withObject "V1beta1LocalSubjectAccessReview" $ \o ->
    V1beta1LocalSubjectAccessReview
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:  "spec")
      <*> (o .:? "status")

-- | ToJSON V1beta1LocalSubjectAccessReview
instance A.ToJSON V1beta1LocalSubjectAccessReview where
  toJSON V1beta1LocalSubjectAccessReview {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1LocalSubjectAccessReviewApiVersion
      , "kind" .= v1beta1LocalSubjectAccessReviewKind
      , "metadata" .= v1beta1LocalSubjectAccessReviewMetadata
      , "spec" .= v1beta1LocalSubjectAccessReviewSpec
      , "status" .= v1beta1LocalSubjectAccessReviewStatus
      ]


-- | Construct a value of type 'V1beta1LocalSubjectAccessReview' (by applying it's required fields, if any)
mkV1beta1LocalSubjectAccessReview
  :: V1beta1SubjectAccessReviewSpec -- ^ 'v1beta1LocalSubjectAccessReviewSpec' 
  -> V1beta1LocalSubjectAccessReview
mkV1beta1LocalSubjectAccessReview v1beta1LocalSubjectAccessReviewSpec =
  V1beta1LocalSubjectAccessReview
  { v1beta1LocalSubjectAccessReviewApiVersion = Nothing
  , v1beta1LocalSubjectAccessReviewKind = Nothing
  , v1beta1LocalSubjectAccessReviewMetadata = Nothing
  , v1beta1LocalSubjectAccessReviewSpec
  , v1beta1LocalSubjectAccessReviewStatus = Nothing
  }

-- ** V1beta1MutatingWebhookConfiguration
-- | V1beta1MutatingWebhookConfiguration
-- MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.
data V1beta1MutatingWebhookConfiguration = V1beta1MutatingWebhookConfiguration
  { v1beta1MutatingWebhookConfigurationApiVersion :: !(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/api-conventions.md#resources
  , v1beta1MutatingWebhookConfigurationKind :: !(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/api-conventions.md#types-kinds
  , v1beta1MutatingWebhookConfigurationMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta1MutatingWebhookConfigurationWebhooks :: !(Maybe [V1beta1Webhook]) -- ^ "webhooks" - Webhooks is a list of webhooks and the affected resources and operations.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1MutatingWebhookConfiguration
instance A.FromJSON V1beta1MutatingWebhookConfiguration where
  parseJSON = A.withObject "V1beta1MutatingWebhookConfiguration" $ \o ->
    V1beta1MutatingWebhookConfiguration
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "webhooks")

-- | ToJSON V1beta1MutatingWebhookConfiguration
instance A.ToJSON V1beta1MutatingWebhookConfiguration where
  toJSON V1beta1MutatingWebhookConfiguration {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1MutatingWebhookConfigurationApiVersion
      , "kind" .= v1beta1MutatingWebhookConfigurationKind
      , "metadata" .= v1beta1MutatingWebhookConfigurationMetadata
      , "webhooks" .= v1beta1MutatingWebhookConfigurationWebhooks
      ]


-- | Construct a value of type 'V1beta1MutatingWebhookConfiguration' (by applying it's required fields, if any)
mkV1beta1MutatingWebhookConfiguration
  :: V1beta1MutatingWebhookConfiguration
mkV1beta1MutatingWebhookConfiguration =
  V1beta1MutatingWebhookConfiguration
  { v1beta1MutatingWebhookConfigurationApiVersion = Nothing
  , v1beta1MutatingWebhookConfigurationKind = Nothing
  , v1beta1MutatingWebhookConfigurationMetadata = Nothing
  , v1beta1MutatingWebhookConfigurationWebhooks = Nothing
  }

-- ** V1beta1MutatingWebhookConfigurationList
-- | V1beta1MutatingWebhookConfigurationList
-- MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration.
data V1beta1MutatingWebhookConfigurationList = V1beta1MutatingWebhookConfigurationList
  { v1beta1MutatingWebhookConfigurationListApiVersion :: !(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/api-conventions.md#resources
  , v1beta1MutatingWebhookConfigurationListItems :: !([V1beta1MutatingWebhookConfiguration]) -- ^ /Required/ "items" - List of MutatingWebhookConfiguration.
  , v1beta1MutatingWebhookConfigurationListKind :: !(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/api-conventions.md#types-kinds
  , v1beta1MutatingWebhookConfigurationListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1MutatingWebhookConfigurationList
instance A.FromJSON V1beta1MutatingWebhookConfigurationList where
  parseJSON = A.withObject "V1beta1MutatingWebhookConfigurationList" $ \o ->
    V1beta1MutatingWebhookConfigurationList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1beta1MutatingWebhookConfigurationList
instance A.ToJSON V1beta1MutatingWebhookConfigurationList where
  toJSON V1beta1MutatingWebhookConfigurationList {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1MutatingWebhookConfigurationListApiVersion
      , "items" .= v1beta1MutatingWebhookConfigurationListItems
      , "kind" .= v1beta1MutatingWebhookConfigurationListKind
      , "metadata" .= v1beta1MutatingWebhookConfigurationListMetadata
      ]


-- | Construct a value of type 'V1beta1MutatingWebhookConfigurationList' (by applying it's required fields, if any)
mkV1beta1MutatingWebhookConfigurationList
  :: [V1beta1MutatingWebhookConfiguration] -- ^ 'v1beta1MutatingWebhookConfigurationListItems': List of MutatingWebhookConfiguration.
  -> V1beta1MutatingWebhookConfigurationList
mkV1beta1MutatingWebhookConfigurationList v1beta1MutatingWebhookConfigurationListItems =
  V1beta1MutatingWebhookConfigurationList
  { v1beta1MutatingWebhookConfigurationListApiVersion = Nothing
  , v1beta1MutatingWebhookConfigurationListItems
  , v1beta1MutatingWebhookConfigurationListKind = Nothing
  , v1beta1MutatingWebhookConfigurationListMetadata = Nothing
  }

-- ** V1beta1NetworkPolicy
-- | V1beta1NetworkPolicy
-- DEPRECATED 1.9 - This group version of NetworkPolicy is deprecated by networking/v1/NetworkPolicy. NetworkPolicy describes what network traffic is allowed for a set of Pods
data V1beta1NetworkPolicy = V1beta1NetworkPolicy
  { v1beta1NetworkPolicyApiVersion :: !(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/api-conventions.md#resources
  , v1beta1NetworkPolicyKind :: !(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/api-conventions.md#types-kinds
  , v1beta1NetworkPolicyMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta1NetworkPolicySpec :: !(Maybe V1beta1NetworkPolicySpec) -- ^ "spec"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1NetworkPolicy
instance A.FromJSON V1beta1NetworkPolicy where
  parseJSON = A.withObject "V1beta1NetworkPolicy" $ \o ->
    V1beta1NetworkPolicy
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")

-- | ToJSON V1beta1NetworkPolicy
instance A.ToJSON V1beta1NetworkPolicy where
  toJSON V1beta1NetworkPolicy {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1NetworkPolicyApiVersion
      , "kind" .= v1beta1NetworkPolicyKind
      , "metadata" .= v1beta1NetworkPolicyMetadata
      , "spec" .= v1beta1NetworkPolicySpec
      ]


-- | Construct a value of type 'V1beta1NetworkPolicy' (by applying it's required fields, if any)
mkV1beta1NetworkPolicy
  :: V1beta1NetworkPolicy
mkV1beta1NetworkPolicy =
  V1beta1NetworkPolicy
  { v1beta1NetworkPolicyApiVersion = Nothing
  , v1beta1NetworkPolicyKind = Nothing
  , v1beta1NetworkPolicyMetadata = Nothing
  , v1beta1NetworkPolicySpec = Nothing
  }

-- ** V1beta1NetworkPolicyEgressRule
-- | V1beta1NetworkPolicyEgressRule
-- DEPRECATED 1.9 - This group version of NetworkPolicyEgressRule is deprecated by networking/v1/NetworkPolicyEgressRule. 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 V1beta1NetworkPolicyEgressRule = V1beta1NetworkPolicyEgressRule
  { v1beta1NetworkPolicyEgressRulePorts :: !(Maybe [V1beta1NetworkPolicyPort]) -- ^ "ports" - 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.
  , v1beta1NetworkPolicyEgressRuleTo :: !(Maybe [V1beta1NetworkPolicyPeer]) -- ^ "to" - 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1NetworkPolicyEgressRule
instance A.FromJSON V1beta1NetworkPolicyEgressRule where
  parseJSON = A.withObject "V1beta1NetworkPolicyEgressRule" $ \o ->
    V1beta1NetworkPolicyEgressRule
      <$> (o .:? "ports")
      <*> (o .:? "to")

-- | ToJSON V1beta1NetworkPolicyEgressRule
instance A.ToJSON V1beta1NetworkPolicyEgressRule where
  toJSON V1beta1NetworkPolicyEgressRule {..} =
   _omitNulls
      [ "ports" .= v1beta1NetworkPolicyEgressRulePorts
      , "to" .= v1beta1NetworkPolicyEgressRuleTo
      ]


-- | Construct a value of type 'V1beta1NetworkPolicyEgressRule' (by applying it's required fields, if any)
mkV1beta1NetworkPolicyEgressRule
  :: V1beta1NetworkPolicyEgressRule
mkV1beta1NetworkPolicyEgressRule =
  V1beta1NetworkPolicyEgressRule
  { v1beta1NetworkPolicyEgressRulePorts = Nothing
  , v1beta1NetworkPolicyEgressRuleTo = Nothing
  }

-- ** V1beta1NetworkPolicyIngressRule
-- | V1beta1NetworkPolicyIngressRule
-- DEPRECATED 1.9 - This group version of NetworkPolicyIngressRule is deprecated by networking/v1/NetworkPolicyIngressRule. This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.
data V1beta1NetworkPolicyIngressRule = V1beta1NetworkPolicyIngressRule
  { v1beta1NetworkPolicyIngressRuleFrom :: !(Maybe [V1beta1NetworkPolicyPeer]) -- ^ "from" - 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 on item, this rule allows traffic only if the traffic matches at least one item in the from list.
  , v1beta1NetworkPolicyIngressRulePorts :: !(Maybe [V1beta1NetworkPolicyPort]) -- ^ "ports" - 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1NetworkPolicyIngressRule
instance A.FromJSON V1beta1NetworkPolicyIngressRule where
  parseJSON = A.withObject "V1beta1NetworkPolicyIngressRule" $ \o ->
    V1beta1NetworkPolicyIngressRule
      <$> (o .:? "from")
      <*> (o .:? "ports")

-- | ToJSON V1beta1NetworkPolicyIngressRule
instance A.ToJSON V1beta1NetworkPolicyIngressRule where
  toJSON V1beta1NetworkPolicyIngressRule {..} =
   _omitNulls
      [ "from" .= v1beta1NetworkPolicyIngressRuleFrom
      , "ports" .= v1beta1NetworkPolicyIngressRulePorts
      ]


-- | Construct a value of type 'V1beta1NetworkPolicyIngressRule' (by applying it's required fields, if any)
mkV1beta1NetworkPolicyIngressRule
  :: V1beta1NetworkPolicyIngressRule
mkV1beta1NetworkPolicyIngressRule =
  V1beta1NetworkPolicyIngressRule
  { v1beta1NetworkPolicyIngressRuleFrom = Nothing
  , v1beta1NetworkPolicyIngressRulePorts = Nothing
  }

-- ** V1beta1NetworkPolicyList
-- | V1beta1NetworkPolicyList
-- DEPRECATED 1.9 - This group version of NetworkPolicyList is deprecated by networking/v1/NetworkPolicyList. Network Policy List is a list of NetworkPolicy objects.
data V1beta1NetworkPolicyList = V1beta1NetworkPolicyList
  { v1beta1NetworkPolicyListApiVersion :: !(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/api-conventions.md#resources
  , v1beta1NetworkPolicyListItems :: !([V1beta1NetworkPolicy]) -- ^ /Required/ "items" - Items is a list of schema objects.
  , v1beta1NetworkPolicyListKind :: !(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/api-conventions.md#types-kinds
  , v1beta1NetworkPolicyListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1NetworkPolicyList
instance A.FromJSON V1beta1NetworkPolicyList where
  parseJSON = A.withObject "V1beta1NetworkPolicyList" $ \o ->
    V1beta1NetworkPolicyList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1beta1NetworkPolicyList
instance A.ToJSON V1beta1NetworkPolicyList where
  toJSON V1beta1NetworkPolicyList {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1NetworkPolicyListApiVersion
      , "items" .= v1beta1NetworkPolicyListItems
      , "kind" .= v1beta1NetworkPolicyListKind
      , "metadata" .= v1beta1NetworkPolicyListMetadata
      ]


-- | Construct a value of type 'V1beta1NetworkPolicyList' (by applying it's required fields, if any)
mkV1beta1NetworkPolicyList
  :: [V1beta1NetworkPolicy] -- ^ 'v1beta1NetworkPolicyListItems': Items is a list of schema objects.
  -> V1beta1NetworkPolicyList
mkV1beta1NetworkPolicyList v1beta1NetworkPolicyListItems =
  V1beta1NetworkPolicyList
  { v1beta1NetworkPolicyListApiVersion = Nothing
  , v1beta1NetworkPolicyListItems
  , v1beta1NetworkPolicyListKind = Nothing
  , v1beta1NetworkPolicyListMetadata = Nothing
  }

-- ** V1beta1NetworkPolicyPeer
-- | V1beta1NetworkPolicyPeer
-- DEPRECATED 1.9 - This group version of NetworkPolicyPeer is deprecated by networking/v1/NetworkPolicyPeer.
data V1beta1NetworkPolicyPeer = V1beta1NetworkPolicyPeer
  { v1beta1NetworkPolicyPeerIpBlock :: !(Maybe V1beta1IPBlock) -- ^ "ipBlock"
  , v1beta1NetworkPolicyPeerNamespaceSelector :: !(Maybe V1LabelSelector) -- ^ "namespaceSelector"
  , v1beta1NetworkPolicyPeerPodSelector :: !(Maybe V1LabelSelector) -- ^ "podSelector"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1NetworkPolicyPeer
instance A.FromJSON V1beta1NetworkPolicyPeer where
  parseJSON = A.withObject "V1beta1NetworkPolicyPeer" $ \o ->
    V1beta1NetworkPolicyPeer
      <$> (o .:? "ipBlock")
      <*> (o .:? "namespaceSelector")
      <*> (o .:? "podSelector")

-- | ToJSON V1beta1NetworkPolicyPeer
instance A.ToJSON V1beta1NetworkPolicyPeer where
  toJSON V1beta1NetworkPolicyPeer {..} =
   _omitNulls
      [ "ipBlock" .= v1beta1NetworkPolicyPeerIpBlock
      , "namespaceSelector" .= v1beta1NetworkPolicyPeerNamespaceSelector
      , "podSelector" .= v1beta1NetworkPolicyPeerPodSelector
      ]


-- | Construct a value of type 'V1beta1NetworkPolicyPeer' (by applying it's required fields, if any)
mkV1beta1NetworkPolicyPeer
  :: V1beta1NetworkPolicyPeer
mkV1beta1NetworkPolicyPeer =
  V1beta1NetworkPolicyPeer
  { v1beta1NetworkPolicyPeerIpBlock = Nothing
  , v1beta1NetworkPolicyPeerNamespaceSelector = Nothing
  , v1beta1NetworkPolicyPeerPodSelector = Nothing
  }

-- ** V1beta1NetworkPolicyPort
-- | V1beta1NetworkPolicyPort
-- DEPRECATED 1.9 - This group version of NetworkPolicyPort is deprecated by networking/v1/NetworkPolicyPort.
data V1beta1NetworkPolicyPort = V1beta1NetworkPolicyPort
  { v1beta1NetworkPolicyPortPort :: !(Maybe IntOrString) -- ^ "port"
  , v1beta1NetworkPolicyPortProtocol :: !(Maybe Text) -- ^ "protocol" - Optional.  The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1NetworkPolicyPort
instance A.FromJSON V1beta1NetworkPolicyPort where
  parseJSON = A.withObject "V1beta1NetworkPolicyPort" $ \o ->
    V1beta1NetworkPolicyPort
      <$> (o .:? "port")
      <*> (o .:? "protocol")

-- | ToJSON V1beta1NetworkPolicyPort
instance A.ToJSON V1beta1NetworkPolicyPort where
  toJSON V1beta1NetworkPolicyPort {..} =
   _omitNulls
      [ "port" .= v1beta1NetworkPolicyPortPort
      , "protocol" .= v1beta1NetworkPolicyPortProtocol
      ]


-- | Construct a value of type 'V1beta1NetworkPolicyPort' (by applying it's required fields, if any)
mkV1beta1NetworkPolicyPort
  :: V1beta1NetworkPolicyPort
mkV1beta1NetworkPolicyPort =
  V1beta1NetworkPolicyPort
  { v1beta1NetworkPolicyPortPort = Nothing
  , v1beta1NetworkPolicyPortProtocol = Nothing
  }

-- ** V1beta1NetworkPolicySpec
-- | V1beta1NetworkPolicySpec
-- DEPRECATED 1.9 - This group version of NetworkPolicySpec is deprecated by networking/v1/NetworkPolicySpec.
data V1beta1NetworkPolicySpec = V1beta1NetworkPolicySpec
  { v1beta1NetworkPolicySpecEgress :: !(Maybe [V1beta1NetworkPolicyEgressRule]) -- ^ "egress" - 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
  , v1beta1NetworkPolicySpecIngress :: !(Maybe [V1beta1NetworkPolicyIngressRule]) -- ^ "ingress" - 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 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).
  , v1beta1NetworkPolicySpecPodSelector :: !(V1LabelSelector) -- ^ /Required/ "podSelector"
  , v1beta1NetworkPolicySpecPolicyTypes :: !(Maybe [Text]) -- ^ "policyTypes" - List of rule types that the NetworkPolicy relates to. Valid options are \&quot;Ingress\&quot;, \&quot;Egress\&quot;, or \&quot;Ingress,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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1NetworkPolicySpec
instance A.FromJSON V1beta1NetworkPolicySpec where
  parseJSON = A.withObject "V1beta1NetworkPolicySpec" $ \o ->
    V1beta1NetworkPolicySpec
      <$> (o .:? "egress")
      <*> (o .:? "ingress")
      <*> (o .:  "podSelector")
      <*> (o .:? "policyTypes")

-- | ToJSON V1beta1NetworkPolicySpec
instance A.ToJSON V1beta1NetworkPolicySpec where
  toJSON V1beta1NetworkPolicySpec {..} =
   _omitNulls
      [ "egress" .= v1beta1NetworkPolicySpecEgress
      , "ingress" .= v1beta1NetworkPolicySpecIngress
      , "podSelector" .= v1beta1NetworkPolicySpecPodSelector
      , "policyTypes" .= v1beta1NetworkPolicySpecPolicyTypes
      ]


-- | Construct a value of type 'V1beta1NetworkPolicySpec' (by applying it's required fields, if any)
mkV1beta1NetworkPolicySpec
  :: V1LabelSelector -- ^ 'v1beta1NetworkPolicySpecPodSelector' 
  -> V1beta1NetworkPolicySpec
mkV1beta1NetworkPolicySpec v1beta1NetworkPolicySpecPodSelector =
  V1beta1NetworkPolicySpec
  { v1beta1NetworkPolicySpecEgress = Nothing
  , v1beta1NetworkPolicySpecIngress = Nothing
  , v1beta1NetworkPolicySpecPodSelector
  , v1beta1NetworkPolicySpecPolicyTypes = Nothing
  }

-- ** V1beta1NonResourceAttributes
-- | V1beta1NonResourceAttributes
-- NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface
data V1beta1NonResourceAttributes = V1beta1NonResourceAttributes
  { v1beta1NonResourceAttributesPath :: !(Maybe Text) -- ^ "path" - Path is the URL path of the request
  , v1beta1NonResourceAttributesVerb :: !(Maybe Text) -- ^ "verb" - Verb is the standard HTTP verb
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1NonResourceAttributes
instance A.FromJSON V1beta1NonResourceAttributes where
  parseJSON = A.withObject "V1beta1NonResourceAttributes" $ \o ->
    V1beta1NonResourceAttributes
      <$> (o .:? "path")
      <*> (o .:? "verb")

-- | ToJSON V1beta1NonResourceAttributes
instance A.ToJSON V1beta1NonResourceAttributes where
  toJSON V1beta1NonResourceAttributes {..} =
   _omitNulls
      [ "path" .= v1beta1NonResourceAttributesPath
      , "verb" .= v1beta1NonResourceAttributesVerb
      ]


-- | Construct a value of type 'V1beta1NonResourceAttributes' (by applying it's required fields, if any)
mkV1beta1NonResourceAttributes
  :: V1beta1NonResourceAttributes
mkV1beta1NonResourceAttributes =
  V1beta1NonResourceAttributes
  { v1beta1NonResourceAttributesPath = Nothing
  , v1beta1NonResourceAttributesVerb = Nothing
  }

-- ** V1beta1NonResourceRule
-- | V1beta1NonResourceRule
-- NonResourceRule holds information that describes a rule for the non-resource
data V1beta1NonResourceRule = V1beta1NonResourceRule
  { v1beta1NonResourceRuleNonResourceUrLs :: !(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.
  , v1beta1NonResourceRuleVerbs :: !([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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1NonResourceRule
instance A.FromJSON V1beta1NonResourceRule where
  parseJSON = A.withObject "V1beta1NonResourceRule" $ \o ->
    V1beta1NonResourceRule
      <$> (o .:? "nonResourceURLs")
      <*> (o .:  "verbs")

-- | ToJSON V1beta1NonResourceRule
instance A.ToJSON V1beta1NonResourceRule where
  toJSON V1beta1NonResourceRule {..} =
   _omitNulls
      [ "nonResourceURLs" .= v1beta1NonResourceRuleNonResourceUrLs
      , "verbs" .= v1beta1NonResourceRuleVerbs
      ]


-- | Construct a value of type 'V1beta1NonResourceRule' (by applying it's required fields, if any)
mkV1beta1NonResourceRule
  :: [Text] -- ^ 'v1beta1NonResourceRuleVerbs': Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options.  \"*\" means all.
  -> V1beta1NonResourceRule
mkV1beta1NonResourceRule v1beta1NonResourceRuleVerbs =
  V1beta1NonResourceRule
  { v1beta1NonResourceRuleNonResourceUrLs = Nothing
  , v1beta1NonResourceRuleVerbs
  }

-- ** V1beta1PodDisruptionBudget
-- | V1beta1PodDisruptionBudget
-- PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods
data V1beta1PodDisruptionBudget = V1beta1PodDisruptionBudget
  { v1beta1PodDisruptionBudgetApiVersion :: !(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/api-conventions.md#resources
  , v1beta1PodDisruptionBudgetKind :: !(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/api-conventions.md#types-kinds
  , v1beta1PodDisruptionBudgetMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta1PodDisruptionBudgetSpec :: !(Maybe V1beta1PodDisruptionBudgetSpec) -- ^ "spec"
  , v1beta1PodDisruptionBudgetStatus :: !(Maybe V1beta1PodDisruptionBudgetStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1PodDisruptionBudget
instance A.FromJSON V1beta1PodDisruptionBudget where
  parseJSON = A.withObject "V1beta1PodDisruptionBudget" $ \o ->
    V1beta1PodDisruptionBudget
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON V1beta1PodDisruptionBudget
instance A.ToJSON V1beta1PodDisruptionBudget where
  toJSON V1beta1PodDisruptionBudget {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1PodDisruptionBudgetApiVersion
      , "kind" .= v1beta1PodDisruptionBudgetKind
      , "metadata" .= v1beta1PodDisruptionBudgetMetadata
      , "spec" .= v1beta1PodDisruptionBudgetSpec
      , "status" .= v1beta1PodDisruptionBudgetStatus
      ]


-- | Construct a value of type 'V1beta1PodDisruptionBudget' (by applying it's required fields, if any)
mkV1beta1PodDisruptionBudget
  :: V1beta1PodDisruptionBudget
mkV1beta1PodDisruptionBudget =
  V1beta1PodDisruptionBudget
  { v1beta1PodDisruptionBudgetApiVersion = Nothing
  , v1beta1PodDisruptionBudgetKind = Nothing
  , v1beta1PodDisruptionBudgetMetadata = Nothing
  , v1beta1PodDisruptionBudgetSpec = Nothing
  , v1beta1PodDisruptionBudgetStatus = Nothing
  }

-- ** V1beta1PodDisruptionBudgetList
-- | V1beta1PodDisruptionBudgetList
-- PodDisruptionBudgetList is a collection of PodDisruptionBudgets.
data V1beta1PodDisruptionBudgetList = V1beta1PodDisruptionBudgetList
  { v1beta1PodDisruptionBudgetListApiVersion :: !(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/api-conventions.md#resources
  , v1beta1PodDisruptionBudgetListItems :: !([V1beta1PodDisruptionBudget]) -- ^ /Required/ "items"
  , v1beta1PodDisruptionBudgetListKind :: !(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/api-conventions.md#types-kinds
  , v1beta1PodDisruptionBudgetListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1PodDisruptionBudgetList
instance A.FromJSON V1beta1PodDisruptionBudgetList where
  parseJSON = A.withObject "V1beta1PodDisruptionBudgetList" $ \o ->
    V1beta1PodDisruptionBudgetList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1beta1PodDisruptionBudgetList
instance A.ToJSON V1beta1PodDisruptionBudgetList where
  toJSON V1beta1PodDisruptionBudgetList {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1PodDisruptionBudgetListApiVersion
      , "items" .= v1beta1PodDisruptionBudgetListItems
      , "kind" .= v1beta1PodDisruptionBudgetListKind
      , "metadata" .= v1beta1PodDisruptionBudgetListMetadata
      ]


-- | Construct a value of type 'V1beta1PodDisruptionBudgetList' (by applying it's required fields, if any)
mkV1beta1PodDisruptionBudgetList
  :: [V1beta1PodDisruptionBudget] -- ^ 'v1beta1PodDisruptionBudgetListItems' 
  -> V1beta1PodDisruptionBudgetList
mkV1beta1PodDisruptionBudgetList v1beta1PodDisruptionBudgetListItems =
  V1beta1PodDisruptionBudgetList
  { v1beta1PodDisruptionBudgetListApiVersion = Nothing
  , v1beta1PodDisruptionBudgetListItems
  , v1beta1PodDisruptionBudgetListKind = Nothing
  , v1beta1PodDisruptionBudgetListMetadata = Nothing
  }

-- ** V1beta1PodDisruptionBudgetSpec
-- | V1beta1PodDisruptionBudgetSpec
-- PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.
data V1beta1PodDisruptionBudgetSpec = V1beta1PodDisruptionBudgetSpec
  { v1beta1PodDisruptionBudgetSpecMaxUnavailable :: !(Maybe IntOrString) -- ^ "maxUnavailable"
  , v1beta1PodDisruptionBudgetSpecMinAvailable :: !(Maybe IntOrString) -- ^ "minAvailable"
  , v1beta1PodDisruptionBudgetSpecSelector :: !(Maybe V1LabelSelector) -- ^ "selector"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1PodDisruptionBudgetSpec
instance A.FromJSON V1beta1PodDisruptionBudgetSpec where
  parseJSON = A.withObject "V1beta1PodDisruptionBudgetSpec" $ \o ->
    V1beta1PodDisruptionBudgetSpec
      <$> (o .:? "maxUnavailable")
      <*> (o .:? "minAvailable")
      <*> (o .:? "selector")

-- | ToJSON V1beta1PodDisruptionBudgetSpec
instance A.ToJSON V1beta1PodDisruptionBudgetSpec where
  toJSON V1beta1PodDisruptionBudgetSpec {..} =
   _omitNulls
      [ "maxUnavailable" .= v1beta1PodDisruptionBudgetSpecMaxUnavailable
      , "minAvailable" .= v1beta1PodDisruptionBudgetSpecMinAvailable
      , "selector" .= v1beta1PodDisruptionBudgetSpecSelector
      ]


-- | Construct a value of type 'V1beta1PodDisruptionBudgetSpec' (by applying it's required fields, if any)
mkV1beta1PodDisruptionBudgetSpec
  :: V1beta1PodDisruptionBudgetSpec
mkV1beta1PodDisruptionBudgetSpec =
  V1beta1PodDisruptionBudgetSpec
  { v1beta1PodDisruptionBudgetSpecMaxUnavailable = Nothing
  , v1beta1PodDisruptionBudgetSpecMinAvailable = Nothing
  , v1beta1PodDisruptionBudgetSpecSelector = Nothing
  }

-- ** V1beta1PodDisruptionBudgetStatus
-- | V1beta1PodDisruptionBudgetStatus
-- PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.
data V1beta1PodDisruptionBudgetStatus = V1beta1PodDisruptionBudgetStatus
  { v1beta1PodDisruptionBudgetStatusCurrentHealthy :: !(Int) -- ^ /Required/ "currentHealthy" - current number of healthy pods
  , v1beta1PodDisruptionBudgetStatusDesiredHealthy :: !(Int) -- ^ /Required/ "desiredHealthy" - minimum desired number of healthy pods
  , v1beta1PodDisruptionBudgetStatusDisruptedPods :: !(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.
  , v1beta1PodDisruptionBudgetStatusDisruptionsAllowed :: !(Int) -- ^ /Required/ "disruptionsAllowed" - Number of pod disruptions that are currently allowed.
  , v1beta1PodDisruptionBudgetStatusExpectedPods :: !(Int) -- ^ /Required/ "expectedPods" - total number of pods counted by this disruption budget
  , v1beta1PodDisruptionBudgetStatusObservedGeneration :: !(Maybe Integer) -- ^ "observedGeneration" - Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other status informatio is valid only if observedGeneration equals to PDB&#39;s object generation.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1PodDisruptionBudgetStatus
instance A.FromJSON V1beta1PodDisruptionBudgetStatus where
  parseJSON = A.withObject "V1beta1PodDisruptionBudgetStatus" $ \o ->
    V1beta1PodDisruptionBudgetStatus
      <$> (o .:  "currentHealthy")
      <*> (o .:  "desiredHealthy")
      <*> (o .:? "disruptedPods")
      <*> (o .:  "disruptionsAllowed")
      <*> (o .:  "expectedPods")
      <*> (o .:? "observedGeneration")

-- | ToJSON V1beta1PodDisruptionBudgetStatus
instance A.ToJSON V1beta1PodDisruptionBudgetStatus where
  toJSON V1beta1PodDisruptionBudgetStatus {..} =
   _omitNulls
      [ "currentHealthy" .= v1beta1PodDisruptionBudgetStatusCurrentHealthy
      , "desiredHealthy" .= v1beta1PodDisruptionBudgetStatusDesiredHealthy
      , "disruptedPods" .= v1beta1PodDisruptionBudgetStatusDisruptedPods
      , "disruptionsAllowed" .= v1beta1PodDisruptionBudgetStatusDisruptionsAllowed
      , "expectedPods" .= v1beta1PodDisruptionBudgetStatusExpectedPods
      , "observedGeneration" .= v1beta1PodDisruptionBudgetStatusObservedGeneration
      ]


-- | Construct a value of type 'V1beta1PodDisruptionBudgetStatus' (by applying it's required fields, if any)
mkV1beta1PodDisruptionBudgetStatus
  :: Int -- ^ 'v1beta1PodDisruptionBudgetStatusCurrentHealthy': current number of healthy pods
  -> Int -- ^ 'v1beta1PodDisruptionBudgetStatusDesiredHealthy': minimum desired number of healthy pods
  -> Int -- ^ 'v1beta1PodDisruptionBudgetStatusDisruptionsAllowed': Number of pod disruptions that are currently allowed.
  -> Int -- ^ 'v1beta1PodDisruptionBudgetStatusExpectedPods': total number of pods counted by this disruption budget
  -> V1beta1PodDisruptionBudgetStatus
mkV1beta1PodDisruptionBudgetStatus v1beta1PodDisruptionBudgetStatusCurrentHealthy v1beta1PodDisruptionBudgetStatusDesiredHealthy v1beta1PodDisruptionBudgetStatusDisruptionsAllowed v1beta1PodDisruptionBudgetStatusExpectedPods =
  V1beta1PodDisruptionBudgetStatus
  { v1beta1PodDisruptionBudgetStatusCurrentHealthy
  , v1beta1PodDisruptionBudgetStatusDesiredHealthy
  , v1beta1PodDisruptionBudgetStatusDisruptedPods = Nothing
  , v1beta1PodDisruptionBudgetStatusDisruptionsAllowed
  , v1beta1PodDisruptionBudgetStatusExpectedPods
  , v1beta1PodDisruptionBudgetStatusObservedGeneration = Nothing
  }

-- ** V1beta1PolicyRule
-- | V1beta1PolicyRule
-- 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 V1beta1PolicyRule = V1beta1PolicyRule
  { v1beta1PolicyRuleApiGroups :: !(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.
  , v1beta1PolicyRuleNonResourceUrLs :: !(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.
  , v1beta1PolicyRuleResourceNames :: !(Maybe [Text]) -- ^ "resourceNames" - ResourceNames is an optional white list of names that the rule applies to.  An empty set means that everything is allowed.
  , v1beta1PolicyRuleResources :: !(Maybe [Text]) -- ^ "resources" - Resources is a list of resources this rule applies to.  &#39;*&#39; represents all resources in the specified apiGroups. &#39;*/foo&#39; represents the subresource &#39;foo&#39; for all resources in the specified apiGroups.
  , v1beta1PolicyRuleVerbs :: !([Text]) -- ^ /Required/ "verbs" - Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule.  VerbAll represents all kinds.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1PolicyRule
instance A.FromJSON V1beta1PolicyRule where
  parseJSON = A.withObject "V1beta1PolicyRule" $ \o ->
    V1beta1PolicyRule
      <$> (o .:? "apiGroups")
      <*> (o .:? "nonResourceURLs")
      <*> (o .:? "resourceNames")
      <*> (o .:? "resources")
      <*> (o .:  "verbs")

-- | ToJSON V1beta1PolicyRule
instance A.ToJSON V1beta1PolicyRule where
  toJSON V1beta1PolicyRule {..} =
   _omitNulls
      [ "apiGroups" .= v1beta1PolicyRuleApiGroups
      , "nonResourceURLs" .= v1beta1PolicyRuleNonResourceUrLs
      , "resourceNames" .= v1beta1PolicyRuleResourceNames
      , "resources" .= v1beta1PolicyRuleResources
      , "verbs" .= v1beta1PolicyRuleVerbs
      ]


-- | Construct a value of type 'V1beta1PolicyRule' (by applying it's required fields, if any)
mkV1beta1PolicyRule
  :: [Text] -- ^ 'v1beta1PolicyRuleVerbs': Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule.  VerbAll represents all kinds.
  -> V1beta1PolicyRule
mkV1beta1PolicyRule v1beta1PolicyRuleVerbs =
  V1beta1PolicyRule
  { v1beta1PolicyRuleApiGroups = Nothing
  , v1beta1PolicyRuleNonResourceUrLs = Nothing
  , v1beta1PolicyRuleResourceNames = Nothing
  , v1beta1PolicyRuleResources = Nothing
  , v1beta1PolicyRuleVerbs
  }

-- ** V1beta1PriorityClass
-- | V1beta1PriorityClass
-- DEPRECATED - This group version of PriorityClass is deprecated by scheduling.k8s.io/v1/PriorityClass. PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.
data V1beta1PriorityClass = V1beta1PriorityClass
  { v1beta1PriorityClassApiVersion :: !(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/api-conventions.md#resources
  , v1beta1PriorityClassDescription :: !(Maybe Text) -- ^ "description" - description is an arbitrary string that usually provides guidelines on when this priority class should be used.
  , v1beta1PriorityClassGlobalDefault :: !(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.
  , v1beta1PriorityClassKind :: !(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/api-conventions.md#types-kinds
  , v1beta1PriorityClassMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta1PriorityClassValue :: !(Int) -- ^ /Required/ "value" - The 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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1PriorityClass
instance A.FromJSON V1beta1PriorityClass where
  parseJSON = A.withObject "V1beta1PriorityClass" $ \o ->
    V1beta1PriorityClass
      <$> (o .:? "apiVersion")
      <*> (o .:? "description")
      <*> (o .:? "globalDefault")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:  "value")

-- | ToJSON V1beta1PriorityClass
instance A.ToJSON V1beta1PriorityClass where
  toJSON V1beta1PriorityClass {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1PriorityClassApiVersion
      , "description" .= v1beta1PriorityClassDescription
      , "globalDefault" .= v1beta1PriorityClassGlobalDefault
      , "kind" .= v1beta1PriorityClassKind
      , "metadata" .= v1beta1PriorityClassMetadata
      , "value" .= v1beta1PriorityClassValue
      ]


-- | Construct a value of type 'V1beta1PriorityClass' (by applying it's required fields, if any)
mkV1beta1PriorityClass
  :: Int -- ^ 'v1beta1PriorityClassValue': The 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.
  -> V1beta1PriorityClass
mkV1beta1PriorityClass v1beta1PriorityClassValue =
  V1beta1PriorityClass
  { v1beta1PriorityClassApiVersion = Nothing
  , v1beta1PriorityClassDescription = Nothing
  , v1beta1PriorityClassGlobalDefault = Nothing
  , v1beta1PriorityClassKind = Nothing
  , v1beta1PriorityClassMetadata = Nothing
  , v1beta1PriorityClassValue
  }

-- ** V1beta1PriorityClassList
-- | V1beta1PriorityClassList
-- PriorityClassList is a collection of priority classes.
data V1beta1PriorityClassList = V1beta1PriorityClassList
  { v1beta1PriorityClassListApiVersion :: !(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/api-conventions.md#resources
  , v1beta1PriorityClassListItems :: !([V1beta1PriorityClass]) -- ^ /Required/ "items" - items is the list of PriorityClasses
  , v1beta1PriorityClassListKind :: !(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/api-conventions.md#types-kinds
  , v1beta1PriorityClassListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1PriorityClassList
instance A.FromJSON V1beta1PriorityClassList where
  parseJSON = A.withObject "V1beta1PriorityClassList" $ \o ->
    V1beta1PriorityClassList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1beta1PriorityClassList
instance A.ToJSON V1beta1PriorityClassList where
  toJSON V1beta1PriorityClassList {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1PriorityClassListApiVersion
      , "items" .= v1beta1PriorityClassListItems
      , "kind" .= v1beta1PriorityClassListKind
      , "metadata" .= v1beta1PriorityClassListMetadata
      ]


-- | Construct a value of type 'V1beta1PriorityClassList' (by applying it's required fields, if any)
mkV1beta1PriorityClassList
  :: [V1beta1PriorityClass] -- ^ 'v1beta1PriorityClassListItems': items is the list of PriorityClasses
  -> V1beta1PriorityClassList
mkV1beta1PriorityClassList v1beta1PriorityClassListItems =
  V1beta1PriorityClassList
  { v1beta1PriorityClassListApiVersion = Nothing
  , v1beta1PriorityClassListItems
  , v1beta1PriorityClassListKind = Nothing
  , v1beta1PriorityClassListMetadata = Nothing
  }

-- ** V1beta1ReplicaSet
-- | V1beta1ReplicaSet
-- DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1beta2/ReplicaSet. See the release notes for more information. ReplicaSet ensures that a specified number of pod replicas are running at any given time.
data V1beta1ReplicaSet = V1beta1ReplicaSet
  { v1beta1ReplicaSetApiVersion :: !(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/api-conventions.md#resources
  , v1beta1ReplicaSetKind :: !(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/api-conventions.md#types-kinds
  , v1beta1ReplicaSetMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta1ReplicaSetSpec :: !(Maybe V1beta1ReplicaSetSpec) -- ^ "spec"
  , v1beta1ReplicaSetStatus :: !(Maybe V1beta1ReplicaSetStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1ReplicaSet
instance A.FromJSON V1beta1ReplicaSet where
  parseJSON = A.withObject "V1beta1ReplicaSet" $ \o ->
    V1beta1ReplicaSet
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON V1beta1ReplicaSet
instance A.ToJSON V1beta1ReplicaSet where
  toJSON V1beta1ReplicaSet {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1ReplicaSetApiVersion
      , "kind" .= v1beta1ReplicaSetKind
      , "metadata" .= v1beta1ReplicaSetMetadata
      , "spec" .= v1beta1ReplicaSetSpec
      , "status" .= v1beta1ReplicaSetStatus
      ]


-- | Construct a value of type 'V1beta1ReplicaSet' (by applying it's required fields, if any)
mkV1beta1ReplicaSet
  :: V1beta1ReplicaSet
mkV1beta1ReplicaSet =
  V1beta1ReplicaSet
  { v1beta1ReplicaSetApiVersion = Nothing
  , v1beta1ReplicaSetKind = Nothing
  , v1beta1ReplicaSetMetadata = Nothing
  , v1beta1ReplicaSetSpec = Nothing
  , v1beta1ReplicaSetStatus = Nothing
  }

-- ** V1beta1ReplicaSetCondition
-- | V1beta1ReplicaSetCondition
-- ReplicaSetCondition describes the state of a replica set at a certain point.
data V1beta1ReplicaSetCondition = V1beta1ReplicaSetCondition
  { v1beta1ReplicaSetConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - The last time the condition transitioned from one status to another.
  , v1beta1ReplicaSetConditionMessage :: !(Maybe Text) -- ^ "message" - A human readable message indicating details about the transition.
  , v1beta1ReplicaSetConditionReason :: !(Maybe Text) -- ^ "reason" - The reason for the condition&#39;s last transition.
  , v1beta1ReplicaSetConditionStatus :: !(Text) -- ^ /Required/ "status" - Status of the condition, one of True, False, Unknown.
  , v1beta1ReplicaSetConditionType :: !(Text) -- ^ /Required/ "type" - Type of replica set condition.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1ReplicaSetCondition
instance A.FromJSON V1beta1ReplicaSetCondition where
  parseJSON = A.withObject "V1beta1ReplicaSetCondition" $ \o ->
    V1beta1ReplicaSetCondition
      <$> (o .:? "lastTransitionTime")
      <*> (o .:? "message")
      <*> (o .:? "reason")
      <*> (o .:  "status")
      <*> (o .:  "type")

-- | ToJSON V1beta1ReplicaSetCondition
instance A.ToJSON V1beta1ReplicaSetCondition where
  toJSON V1beta1ReplicaSetCondition {..} =
   _omitNulls
      [ "lastTransitionTime" .= v1beta1ReplicaSetConditionLastTransitionTime
      , "message" .= v1beta1ReplicaSetConditionMessage
      , "reason" .= v1beta1ReplicaSetConditionReason
      , "status" .= v1beta1ReplicaSetConditionStatus
      , "type" .= v1beta1ReplicaSetConditionType
      ]


-- | Construct a value of type 'V1beta1ReplicaSetCondition' (by applying it's required fields, if any)
mkV1beta1ReplicaSetCondition
  :: Text -- ^ 'v1beta1ReplicaSetConditionStatus': Status of the condition, one of True, False, Unknown.
  -> Text -- ^ 'v1beta1ReplicaSetConditionType': Type of replica set condition.
  -> V1beta1ReplicaSetCondition
mkV1beta1ReplicaSetCondition v1beta1ReplicaSetConditionStatus v1beta1ReplicaSetConditionType =
  V1beta1ReplicaSetCondition
  { v1beta1ReplicaSetConditionLastTransitionTime = Nothing
  , v1beta1ReplicaSetConditionMessage = Nothing
  , v1beta1ReplicaSetConditionReason = Nothing
  , v1beta1ReplicaSetConditionStatus
  , v1beta1ReplicaSetConditionType
  }

-- ** V1beta1ReplicaSetList
-- | V1beta1ReplicaSetList
-- ReplicaSetList is a collection of ReplicaSets.
data V1beta1ReplicaSetList = V1beta1ReplicaSetList
  { v1beta1ReplicaSetListApiVersion :: !(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/api-conventions.md#resources
  , v1beta1ReplicaSetListItems :: !([V1beta1ReplicaSet]) -- ^ /Required/ "items" - List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
  , v1beta1ReplicaSetListKind :: !(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/api-conventions.md#types-kinds
  , v1beta1ReplicaSetListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1ReplicaSetList
instance A.FromJSON V1beta1ReplicaSetList where
  parseJSON = A.withObject "V1beta1ReplicaSetList" $ \o ->
    V1beta1ReplicaSetList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1beta1ReplicaSetList
instance A.ToJSON V1beta1ReplicaSetList where
  toJSON V1beta1ReplicaSetList {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1ReplicaSetListApiVersion
      , "items" .= v1beta1ReplicaSetListItems
      , "kind" .= v1beta1ReplicaSetListKind
      , "metadata" .= v1beta1ReplicaSetListMetadata
      ]


-- | Construct a value of type 'V1beta1ReplicaSetList' (by applying it's required fields, if any)
mkV1beta1ReplicaSetList
  :: [V1beta1ReplicaSet] -- ^ 'v1beta1ReplicaSetListItems': List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
  -> V1beta1ReplicaSetList
mkV1beta1ReplicaSetList v1beta1ReplicaSetListItems =
  V1beta1ReplicaSetList
  { v1beta1ReplicaSetListApiVersion = Nothing
  , v1beta1ReplicaSetListItems
  , v1beta1ReplicaSetListKind = Nothing
  , v1beta1ReplicaSetListMetadata = Nothing
  }

-- ** V1beta1ReplicaSetSpec
-- | V1beta1ReplicaSetSpec
-- ReplicaSetSpec is the specification of a ReplicaSet.
data V1beta1ReplicaSetSpec = V1beta1ReplicaSetSpec
  { v1beta1ReplicaSetSpecMinReadySeconds :: !(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)
  , v1beta1ReplicaSetSpecReplicas :: !(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
  , v1beta1ReplicaSetSpecSelector :: !(Maybe V1LabelSelector) -- ^ "selector"
  , v1beta1ReplicaSetSpecTemplate :: !(Maybe V1PodTemplateSpec) -- ^ "template"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1ReplicaSetSpec
instance A.FromJSON V1beta1ReplicaSetSpec where
  parseJSON = A.withObject "V1beta1ReplicaSetSpec" $ \o ->
    V1beta1ReplicaSetSpec
      <$> (o .:? "minReadySeconds")
      <*> (o .:? "replicas")
      <*> (o .:? "selector")
      <*> (o .:? "template")

-- | ToJSON V1beta1ReplicaSetSpec
instance A.ToJSON V1beta1ReplicaSetSpec where
  toJSON V1beta1ReplicaSetSpec {..} =
   _omitNulls
      [ "minReadySeconds" .= v1beta1ReplicaSetSpecMinReadySeconds
      , "replicas" .= v1beta1ReplicaSetSpecReplicas
      , "selector" .= v1beta1ReplicaSetSpecSelector
      , "template" .= v1beta1ReplicaSetSpecTemplate
      ]


-- | Construct a value of type 'V1beta1ReplicaSetSpec' (by applying it's required fields, if any)
mkV1beta1ReplicaSetSpec
  :: V1beta1ReplicaSetSpec
mkV1beta1ReplicaSetSpec =
  V1beta1ReplicaSetSpec
  { v1beta1ReplicaSetSpecMinReadySeconds = Nothing
  , v1beta1ReplicaSetSpecReplicas = Nothing
  , v1beta1ReplicaSetSpecSelector = Nothing
  , v1beta1ReplicaSetSpecTemplate = Nothing
  }

-- ** V1beta1ReplicaSetStatus
-- | V1beta1ReplicaSetStatus
-- ReplicaSetStatus represents the current status of a ReplicaSet.
data V1beta1ReplicaSetStatus = V1beta1ReplicaSetStatus
  { v1beta1ReplicaSetStatusAvailableReplicas :: !(Maybe Int) -- ^ "availableReplicas" - The number of available replicas (ready for at least minReadySeconds) for this replica set.
  , v1beta1ReplicaSetStatusConditions :: !(Maybe [V1beta1ReplicaSetCondition]) -- ^ "conditions" - Represents the latest available observations of a replica set&#39;s current state.
  , v1beta1ReplicaSetStatusFullyLabeledReplicas :: !(Maybe Int) -- ^ "fullyLabeledReplicas" - The number of pods that have labels matching the labels of the pod template of the replicaset.
  , v1beta1ReplicaSetStatusObservedGeneration :: !(Maybe Integer) -- ^ "observedGeneration" - ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
  , v1beta1ReplicaSetStatusReadyReplicas :: !(Maybe Int) -- ^ "readyReplicas" - The number of ready replicas for this replica set.
  , v1beta1ReplicaSetStatusReplicas :: !(Int) -- ^ /Required/ "replicas" - Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1ReplicaSetStatus
instance A.FromJSON V1beta1ReplicaSetStatus where
  parseJSON = A.withObject "V1beta1ReplicaSetStatus" $ \o ->
    V1beta1ReplicaSetStatus
      <$> (o .:? "availableReplicas")
      <*> (o .:? "conditions")
      <*> (o .:? "fullyLabeledReplicas")
      <*> (o .:? "observedGeneration")
      <*> (o .:? "readyReplicas")
      <*> (o .:  "replicas")

-- | ToJSON V1beta1ReplicaSetStatus
instance A.ToJSON V1beta1ReplicaSetStatus where
  toJSON V1beta1ReplicaSetStatus {..} =
   _omitNulls
      [ "availableReplicas" .= v1beta1ReplicaSetStatusAvailableReplicas
      , "conditions" .= v1beta1ReplicaSetStatusConditions
      , "fullyLabeledReplicas" .= v1beta1ReplicaSetStatusFullyLabeledReplicas
      , "observedGeneration" .= v1beta1ReplicaSetStatusObservedGeneration
      , "readyReplicas" .= v1beta1ReplicaSetStatusReadyReplicas
      , "replicas" .= v1beta1ReplicaSetStatusReplicas
      ]


-- | Construct a value of type 'V1beta1ReplicaSetStatus' (by applying it's required fields, if any)
mkV1beta1ReplicaSetStatus
  :: Int -- ^ 'v1beta1ReplicaSetStatusReplicas': Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
  -> V1beta1ReplicaSetStatus
mkV1beta1ReplicaSetStatus v1beta1ReplicaSetStatusReplicas =
  V1beta1ReplicaSetStatus
  { v1beta1ReplicaSetStatusAvailableReplicas = Nothing
  , v1beta1ReplicaSetStatusConditions = Nothing
  , v1beta1ReplicaSetStatusFullyLabeledReplicas = Nothing
  , v1beta1ReplicaSetStatusObservedGeneration = Nothing
  , v1beta1ReplicaSetStatusReadyReplicas = Nothing
  , v1beta1ReplicaSetStatusReplicas
  }

-- ** V1beta1ResourceAttributes
-- | V1beta1ResourceAttributes
-- ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface
data V1beta1ResourceAttributes = V1beta1ResourceAttributes
  { v1beta1ResourceAttributesGroup :: !(Maybe Text) -- ^ "group" - Group is the API Group of the Resource.  \&quot;*\&quot; means all.
  , v1beta1ResourceAttributesName :: !(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.
  , v1beta1ResourceAttributesNamespace :: !(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
  , v1beta1ResourceAttributesResource :: !(Maybe Text) -- ^ "resource" - Resource is one of the existing resource types.  \&quot;*\&quot; means all.
  , v1beta1ResourceAttributesSubresource :: !(Maybe Text) -- ^ "subresource" - Subresource is one of the existing resource types.  \&quot;\&quot; means none.
  , v1beta1ResourceAttributesVerb :: !(Maybe Text) -- ^ "verb" - Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy.  \&quot;*\&quot; means all.
  , v1beta1ResourceAttributesVersion :: !(Maybe Text) -- ^ "version" - Version is the API Version of the Resource.  \&quot;*\&quot; means all.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1ResourceAttributes
instance A.FromJSON V1beta1ResourceAttributes where
  parseJSON = A.withObject "V1beta1ResourceAttributes" $ \o ->
    V1beta1ResourceAttributes
      <$> (o .:? "group")
      <*> (o .:? "name")
      <*> (o .:? "namespace")
      <*> (o .:? "resource")
      <*> (o .:? "subresource")
      <*> (o .:? "verb")
      <*> (o .:? "version")

-- | ToJSON V1beta1ResourceAttributes
instance A.ToJSON V1beta1ResourceAttributes where
  toJSON V1beta1ResourceAttributes {..} =
   _omitNulls
      [ "group" .= v1beta1ResourceAttributesGroup
      , "name" .= v1beta1ResourceAttributesName
      , "namespace" .= v1beta1ResourceAttributesNamespace
      , "resource" .= v1beta1ResourceAttributesResource
      , "subresource" .= v1beta1ResourceAttributesSubresource
      , "verb" .= v1beta1ResourceAttributesVerb
      , "version" .= v1beta1ResourceAttributesVersion
      ]


-- | Construct a value of type 'V1beta1ResourceAttributes' (by applying it's required fields, if any)
mkV1beta1ResourceAttributes
  :: V1beta1ResourceAttributes
mkV1beta1ResourceAttributes =
  V1beta1ResourceAttributes
  { v1beta1ResourceAttributesGroup = Nothing
  , v1beta1ResourceAttributesName = Nothing
  , v1beta1ResourceAttributesNamespace = Nothing
  , v1beta1ResourceAttributesResource = Nothing
  , v1beta1ResourceAttributesSubresource = Nothing
  , v1beta1ResourceAttributesVerb = Nothing
  , v1beta1ResourceAttributesVersion = Nothing
  }

-- ** V1beta1ResourceRule
-- | V1beta1ResourceRule
-- 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 V1beta1ResourceRule = V1beta1ResourceRule
  { v1beta1ResourceRuleApiGroups :: !(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.
  , v1beta1ResourceRuleResourceNames :: !(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.
  , v1beta1ResourceRuleResources :: !(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.
  , v1beta1ResourceRuleVerbs :: !([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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1ResourceRule
instance A.FromJSON V1beta1ResourceRule where
  parseJSON = A.withObject "V1beta1ResourceRule" $ \o ->
    V1beta1ResourceRule
      <$> (o .:? "apiGroups")
      <*> (o .:? "resourceNames")
      <*> (o .:? "resources")
      <*> (o .:  "verbs")

-- | ToJSON V1beta1ResourceRule
instance A.ToJSON V1beta1ResourceRule where
  toJSON V1beta1ResourceRule {..} =
   _omitNulls
      [ "apiGroups" .= v1beta1ResourceRuleApiGroups
      , "resourceNames" .= v1beta1ResourceRuleResourceNames
      , "resources" .= v1beta1ResourceRuleResources
      , "verbs" .= v1beta1ResourceRuleVerbs
      ]


-- | Construct a value of type 'V1beta1ResourceRule' (by applying it's required fields, if any)
mkV1beta1ResourceRule
  :: [Text] -- ^ 'v1beta1ResourceRuleVerbs': Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy.  \"*\" means all.
  -> V1beta1ResourceRule
mkV1beta1ResourceRule v1beta1ResourceRuleVerbs =
  V1beta1ResourceRule
  { v1beta1ResourceRuleApiGroups = Nothing
  , v1beta1ResourceRuleResourceNames = Nothing
  , v1beta1ResourceRuleResources = Nothing
  , v1beta1ResourceRuleVerbs
  }

-- ** V1beta1Role
-- | V1beta1Role
-- Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
data V1beta1Role = V1beta1Role
  { v1beta1RoleApiVersion :: !(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/api-conventions.md#resources
  , v1beta1RoleKind :: !(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/api-conventions.md#types-kinds
  , v1beta1RoleMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta1RoleRules :: !(Maybe [V1beta1PolicyRule]) -- ^ "rules" - Rules holds all the PolicyRules for this Role
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1Role
instance A.FromJSON V1beta1Role where
  parseJSON = A.withObject "V1beta1Role" $ \o ->
    V1beta1Role
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "rules")

-- | ToJSON V1beta1Role
instance A.ToJSON V1beta1Role where
  toJSON V1beta1Role {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1RoleApiVersion
      , "kind" .= v1beta1RoleKind
      , "metadata" .= v1beta1RoleMetadata
      , "rules" .= v1beta1RoleRules
      ]


-- | Construct a value of type 'V1beta1Role' (by applying it's required fields, if any)
mkV1beta1Role
  :: V1beta1Role
mkV1beta1Role =
  V1beta1Role
  { v1beta1RoleApiVersion = Nothing
  , v1beta1RoleKind = Nothing
  , v1beta1RoleMetadata = Nothing
  , v1beta1RoleRules = Nothing
  }

-- ** V1beta1RoleBinding
-- | V1beta1RoleBinding
-- 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 V1beta1RoleBinding = V1beta1RoleBinding
  { v1beta1RoleBindingApiVersion :: !(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/api-conventions.md#resources
  , v1beta1RoleBindingKind :: !(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/api-conventions.md#types-kinds
  , v1beta1RoleBindingMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta1RoleBindingRoleRef :: !(V1beta1RoleRef) -- ^ /Required/ "roleRef"
  , v1beta1RoleBindingSubjects :: !(Maybe [V1beta1Subject]) -- ^ "subjects" - Subjects holds references to the objects the role applies to.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1RoleBinding
instance A.FromJSON V1beta1RoleBinding where
  parseJSON = A.withObject "V1beta1RoleBinding" $ \o ->
    V1beta1RoleBinding
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:  "roleRef")
      <*> (o .:? "subjects")

-- | ToJSON V1beta1RoleBinding
instance A.ToJSON V1beta1RoleBinding where
  toJSON V1beta1RoleBinding {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1RoleBindingApiVersion
      , "kind" .= v1beta1RoleBindingKind
      , "metadata" .= v1beta1RoleBindingMetadata
      , "roleRef" .= v1beta1RoleBindingRoleRef
      , "subjects" .= v1beta1RoleBindingSubjects
      ]


-- | Construct a value of type 'V1beta1RoleBinding' (by applying it's required fields, if any)
mkV1beta1RoleBinding
  :: V1beta1RoleRef -- ^ 'v1beta1RoleBindingRoleRef' 
  -> V1beta1RoleBinding
mkV1beta1RoleBinding v1beta1RoleBindingRoleRef =
  V1beta1RoleBinding
  { v1beta1RoleBindingApiVersion = Nothing
  , v1beta1RoleBindingKind = Nothing
  , v1beta1RoleBindingMetadata = Nothing
  , v1beta1RoleBindingRoleRef
  , v1beta1RoleBindingSubjects = Nothing
  }

-- ** V1beta1RoleBindingList
-- | V1beta1RoleBindingList
-- RoleBindingList is a collection of RoleBindings
data V1beta1RoleBindingList = V1beta1RoleBindingList
  { v1beta1RoleBindingListApiVersion :: !(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/api-conventions.md#resources
  , v1beta1RoleBindingListItems :: !([V1beta1RoleBinding]) -- ^ /Required/ "items" - Items is a list of RoleBindings
  , v1beta1RoleBindingListKind :: !(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/api-conventions.md#types-kinds
  , v1beta1RoleBindingListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1RoleBindingList
instance A.FromJSON V1beta1RoleBindingList where
  parseJSON = A.withObject "V1beta1RoleBindingList" $ \o ->
    V1beta1RoleBindingList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1beta1RoleBindingList
instance A.ToJSON V1beta1RoleBindingList where
  toJSON V1beta1RoleBindingList {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1RoleBindingListApiVersion
      , "items" .= v1beta1RoleBindingListItems
      , "kind" .= v1beta1RoleBindingListKind
      , "metadata" .= v1beta1RoleBindingListMetadata
      ]


-- | Construct a value of type 'V1beta1RoleBindingList' (by applying it's required fields, if any)
mkV1beta1RoleBindingList
  :: [V1beta1RoleBinding] -- ^ 'v1beta1RoleBindingListItems': Items is a list of RoleBindings
  -> V1beta1RoleBindingList
mkV1beta1RoleBindingList v1beta1RoleBindingListItems =
  V1beta1RoleBindingList
  { v1beta1RoleBindingListApiVersion = Nothing
  , v1beta1RoleBindingListItems
  , v1beta1RoleBindingListKind = Nothing
  , v1beta1RoleBindingListMetadata = Nothing
  }

-- ** V1beta1RoleList
-- | V1beta1RoleList
-- RoleList is a collection of Roles
data V1beta1RoleList = V1beta1RoleList
  { v1beta1RoleListApiVersion :: !(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/api-conventions.md#resources
  , v1beta1RoleListItems :: !([V1beta1Role]) -- ^ /Required/ "items" - Items is a list of Roles
  , v1beta1RoleListKind :: !(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/api-conventions.md#types-kinds
  , v1beta1RoleListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1RoleList
instance A.FromJSON V1beta1RoleList where
  parseJSON = A.withObject "V1beta1RoleList" $ \o ->
    V1beta1RoleList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1beta1RoleList
instance A.ToJSON V1beta1RoleList where
  toJSON V1beta1RoleList {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1RoleListApiVersion
      , "items" .= v1beta1RoleListItems
      , "kind" .= v1beta1RoleListKind
      , "metadata" .= v1beta1RoleListMetadata
      ]


-- | Construct a value of type 'V1beta1RoleList' (by applying it's required fields, if any)
mkV1beta1RoleList
  :: [V1beta1Role] -- ^ 'v1beta1RoleListItems': Items is a list of Roles
  -> V1beta1RoleList
mkV1beta1RoleList v1beta1RoleListItems =
  V1beta1RoleList
  { v1beta1RoleListApiVersion = Nothing
  , v1beta1RoleListItems
  , v1beta1RoleListKind = Nothing
  , v1beta1RoleListMetadata = Nothing
  }

-- ** V1beta1RoleRef
-- | V1beta1RoleRef
-- RoleRef contains information that points to the role being used
data V1beta1RoleRef = V1beta1RoleRef
  { v1beta1RoleRefApiGroup :: !(Text) -- ^ /Required/ "apiGroup" - APIGroup is the group for the resource being referenced
  , v1beta1RoleRefKind :: !(Text) -- ^ /Required/ "kind" - Kind is the type of resource being referenced
  , v1beta1RoleRefName :: !(Text) -- ^ /Required/ "name" - Name is the name of resource being referenced
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1RoleRef
instance A.FromJSON V1beta1RoleRef where
  parseJSON = A.withObject "V1beta1RoleRef" $ \o ->
    V1beta1RoleRef
      <$> (o .:  "apiGroup")
      <*> (o .:  "kind")
      <*> (o .:  "name")

-- | ToJSON V1beta1RoleRef
instance A.ToJSON V1beta1RoleRef where
  toJSON V1beta1RoleRef {..} =
   _omitNulls
      [ "apiGroup" .= v1beta1RoleRefApiGroup
      , "kind" .= v1beta1RoleRefKind
      , "name" .= v1beta1RoleRefName
      ]


-- | Construct a value of type 'V1beta1RoleRef' (by applying it's required fields, if any)
mkV1beta1RoleRef
  :: Text -- ^ 'v1beta1RoleRefApiGroup': APIGroup is the group for the resource being referenced
  -> Text -- ^ 'v1beta1RoleRefKind': Kind is the type of resource being referenced
  -> Text -- ^ 'v1beta1RoleRefName': Name is the name of resource being referenced
  -> V1beta1RoleRef
mkV1beta1RoleRef v1beta1RoleRefApiGroup v1beta1RoleRefKind v1beta1RoleRefName =
  V1beta1RoleRef
  { v1beta1RoleRefApiGroup
  , v1beta1RoleRefKind
  , v1beta1RoleRefName
  }

-- ** V1beta1RollingUpdateDaemonSet
-- | V1beta1RollingUpdateDaemonSet
-- Spec to control the desired behavior of daemon set rolling update.
data V1beta1RollingUpdateDaemonSet = V1beta1RollingUpdateDaemonSet
  { v1beta1RollingUpdateDaemonSetMaxUnavailable :: !(Maybe IntOrString) -- ^ "maxUnavailable"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1RollingUpdateDaemonSet
instance A.FromJSON V1beta1RollingUpdateDaemonSet where
  parseJSON = A.withObject "V1beta1RollingUpdateDaemonSet" $ \o ->
    V1beta1RollingUpdateDaemonSet
      <$> (o .:? "maxUnavailable")

-- | ToJSON V1beta1RollingUpdateDaemonSet
instance A.ToJSON V1beta1RollingUpdateDaemonSet where
  toJSON V1beta1RollingUpdateDaemonSet {..} =
   _omitNulls
      [ "maxUnavailable" .= v1beta1RollingUpdateDaemonSetMaxUnavailable
      ]


-- | Construct a value of type 'V1beta1RollingUpdateDaemonSet' (by applying it's required fields, if any)
mkV1beta1RollingUpdateDaemonSet
  :: V1beta1RollingUpdateDaemonSet
mkV1beta1RollingUpdateDaemonSet =
  V1beta1RollingUpdateDaemonSet
  { v1beta1RollingUpdateDaemonSetMaxUnavailable = Nothing
  }

-- ** V1beta1RollingUpdateStatefulSetStrategy
-- | V1beta1RollingUpdateStatefulSetStrategy
-- RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.
data V1beta1RollingUpdateStatefulSetStrategy = V1beta1RollingUpdateStatefulSetStrategy
  { v1beta1RollingUpdateStatefulSetStrategyPartition :: !(Maybe Int) -- ^ "partition" - Partition indicates the ordinal at which the StatefulSet should be partitioned.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1RollingUpdateStatefulSetStrategy
instance A.FromJSON V1beta1RollingUpdateStatefulSetStrategy where
  parseJSON = A.withObject "V1beta1RollingUpdateStatefulSetStrategy" $ \o ->
    V1beta1RollingUpdateStatefulSetStrategy
      <$> (o .:? "partition")

-- | ToJSON V1beta1RollingUpdateStatefulSetStrategy
instance A.ToJSON V1beta1RollingUpdateStatefulSetStrategy where
  toJSON V1beta1RollingUpdateStatefulSetStrategy {..} =
   _omitNulls
      [ "partition" .= v1beta1RollingUpdateStatefulSetStrategyPartition
      ]


-- | Construct a value of type 'V1beta1RollingUpdateStatefulSetStrategy' (by applying it's required fields, if any)
mkV1beta1RollingUpdateStatefulSetStrategy
  :: V1beta1RollingUpdateStatefulSetStrategy
mkV1beta1RollingUpdateStatefulSetStrategy =
  V1beta1RollingUpdateStatefulSetStrategy
  { v1beta1RollingUpdateStatefulSetStrategyPartition = Nothing
  }

-- ** V1beta1RuleWithOperations
-- | V1beta1RuleWithOperations
-- RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.
data V1beta1RuleWithOperations = V1beta1RuleWithOperations
  { v1beta1RuleWithOperationsApiGroups :: !(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.
  , v1beta1RuleWithOperationsApiVersions :: !(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.
  , v1beta1RuleWithOperationsOperations :: !(Maybe [Text]) -- ^ "operations" - Operations is the operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If &#39;*&#39; is present, the length of the slice must be one. Required.
  , v1beta1RuleWithOperationsResources :: !(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.
  , v1beta1RuleWithOperationsScope :: !(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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1RuleWithOperations
instance A.FromJSON V1beta1RuleWithOperations where
  parseJSON = A.withObject "V1beta1RuleWithOperations" $ \o ->
    V1beta1RuleWithOperations
      <$> (o .:? "apiGroups")
      <*> (o .:? "apiVersions")
      <*> (o .:? "operations")
      <*> (o .:? "resources")
      <*> (o .:? "scope")

-- | ToJSON V1beta1RuleWithOperations
instance A.ToJSON V1beta1RuleWithOperations where
  toJSON V1beta1RuleWithOperations {..} =
   _omitNulls
      [ "apiGroups" .= v1beta1RuleWithOperationsApiGroups
      , "apiVersions" .= v1beta1RuleWithOperationsApiVersions
      , "operations" .= v1beta1RuleWithOperationsOperations
      , "resources" .= v1beta1RuleWithOperationsResources
      , "scope" .= v1beta1RuleWithOperationsScope
      ]


-- | Construct a value of type 'V1beta1RuleWithOperations' (by applying it's required fields, if any)
mkV1beta1RuleWithOperations
  :: V1beta1RuleWithOperations
mkV1beta1RuleWithOperations =
  V1beta1RuleWithOperations
  { v1beta1RuleWithOperationsApiGroups = Nothing
  , v1beta1RuleWithOperationsApiVersions = Nothing
  , v1beta1RuleWithOperationsOperations = Nothing
  , v1beta1RuleWithOperationsResources = Nothing
  , v1beta1RuleWithOperationsScope = Nothing
  }

-- ** V1beta1RuntimeClass
-- | V1beta1RuntimeClass
-- 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 (currently) 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://git.k8s.io/enhancements/keps/sig-node/runtime-class.md
data V1beta1RuntimeClass = V1beta1RuntimeClass
  { v1beta1RuntimeClassApiVersion :: !(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/api-conventions.md#resources
  , v1beta1RuntimeClassHandler :: !(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 conform to the DNS Label (RFC 1123) requirements, and is immutable.
  , v1beta1RuntimeClassKind :: !(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/api-conventions.md#types-kinds
  , v1beta1RuntimeClassMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1RuntimeClass
instance A.FromJSON V1beta1RuntimeClass where
  parseJSON = A.withObject "V1beta1RuntimeClass" $ \o ->
    V1beta1RuntimeClass
      <$> (o .:? "apiVersion")
      <*> (o .:  "handler")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1beta1RuntimeClass
instance A.ToJSON V1beta1RuntimeClass where
  toJSON V1beta1RuntimeClass {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1RuntimeClassApiVersion
      , "handler" .= v1beta1RuntimeClassHandler
      , "kind" .= v1beta1RuntimeClassKind
      , "metadata" .= v1beta1RuntimeClassMetadata
      ]


-- | Construct a value of type 'V1beta1RuntimeClass' (by applying it's required fields, if any)
mkV1beta1RuntimeClass
  :: Text -- ^ 'v1beta1RuntimeClassHandler': 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 conform to the DNS Label (RFC 1123) requirements, and is immutable.
  -> V1beta1RuntimeClass
mkV1beta1RuntimeClass v1beta1RuntimeClassHandler =
  V1beta1RuntimeClass
  { v1beta1RuntimeClassApiVersion = Nothing
  , v1beta1RuntimeClassHandler
  , v1beta1RuntimeClassKind = Nothing
  , v1beta1RuntimeClassMetadata = Nothing
  }

-- ** V1beta1RuntimeClassList
-- | V1beta1RuntimeClassList
-- RuntimeClassList is a list of RuntimeClass objects.
data V1beta1RuntimeClassList = V1beta1RuntimeClassList
  { v1beta1RuntimeClassListApiVersion :: !(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/api-conventions.md#resources
  , v1beta1RuntimeClassListItems :: !([V1beta1RuntimeClass]) -- ^ /Required/ "items" - Items is a list of schema objects.
  , v1beta1RuntimeClassListKind :: !(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/api-conventions.md#types-kinds
  , v1beta1RuntimeClassListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1RuntimeClassList
instance A.FromJSON V1beta1RuntimeClassList where
  parseJSON = A.withObject "V1beta1RuntimeClassList" $ \o ->
    V1beta1RuntimeClassList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1beta1RuntimeClassList
instance A.ToJSON V1beta1RuntimeClassList where
  toJSON V1beta1RuntimeClassList {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1RuntimeClassListApiVersion
      , "items" .= v1beta1RuntimeClassListItems
      , "kind" .= v1beta1RuntimeClassListKind
      , "metadata" .= v1beta1RuntimeClassListMetadata
      ]


-- | Construct a value of type 'V1beta1RuntimeClassList' (by applying it's required fields, if any)
mkV1beta1RuntimeClassList
  :: [V1beta1RuntimeClass] -- ^ 'v1beta1RuntimeClassListItems': Items is a list of schema objects.
  -> V1beta1RuntimeClassList
mkV1beta1RuntimeClassList v1beta1RuntimeClassListItems =
  V1beta1RuntimeClassList
  { v1beta1RuntimeClassListApiVersion = Nothing
  , v1beta1RuntimeClassListItems
  , v1beta1RuntimeClassListKind = Nothing
  , v1beta1RuntimeClassListMetadata = Nothing
  }

-- ** V1beta1SelfSubjectAccessReview
-- | V1beta1SelfSubjectAccessReview
-- 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 V1beta1SelfSubjectAccessReview = V1beta1SelfSubjectAccessReview
  { v1beta1SelfSubjectAccessReviewApiVersion :: !(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/api-conventions.md#resources
  , v1beta1SelfSubjectAccessReviewKind :: !(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/api-conventions.md#types-kinds
  , v1beta1SelfSubjectAccessReviewMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta1SelfSubjectAccessReviewSpec :: !(V1beta1SelfSubjectAccessReviewSpec) -- ^ /Required/ "spec"
  , v1beta1SelfSubjectAccessReviewStatus :: !(Maybe V1beta1SubjectAccessReviewStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1SelfSubjectAccessReview
instance A.FromJSON V1beta1SelfSubjectAccessReview where
  parseJSON = A.withObject "V1beta1SelfSubjectAccessReview" $ \o ->
    V1beta1SelfSubjectAccessReview
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:  "spec")
      <*> (o .:? "status")

-- | ToJSON V1beta1SelfSubjectAccessReview
instance A.ToJSON V1beta1SelfSubjectAccessReview where
  toJSON V1beta1SelfSubjectAccessReview {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1SelfSubjectAccessReviewApiVersion
      , "kind" .= v1beta1SelfSubjectAccessReviewKind
      , "metadata" .= v1beta1SelfSubjectAccessReviewMetadata
      , "spec" .= v1beta1SelfSubjectAccessReviewSpec
      , "status" .= v1beta1SelfSubjectAccessReviewStatus
      ]


-- | Construct a value of type 'V1beta1SelfSubjectAccessReview' (by applying it's required fields, if any)
mkV1beta1SelfSubjectAccessReview
  :: V1beta1SelfSubjectAccessReviewSpec -- ^ 'v1beta1SelfSubjectAccessReviewSpec' 
  -> V1beta1SelfSubjectAccessReview
mkV1beta1SelfSubjectAccessReview v1beta1SelfSubjectAccessReviewSpec =
  V1beta1SelfSubjectAccessReview
  { v1beta1SelfSubjectAccessReviewApiVersion = Nothing
  , v1beta1SelfSubjectAccessReviewKind = Nothing
  , v1beta1SelfSubjectAccessReviewMetadata = Nothing
  , v1beta1SelfSubjectAccessReviewSpec
  , v1beta1SelfSubjectAccessReviewStatus = Nothing
  }

-- ** V1beta1SelfSubjectAccessReviewSpec
-- | V1beta1SelfSubjectAccessReviewSpec
-- SelfSubjectAccessReviewSpec is a description of the access request.  Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set
data V1beta1SelfSubjectAccessReviewSpec = V1beta1SelfSubjectAccessReviewSpec
  { v1beta1SelfSubjectAccessReviewSpecNonResourceAttributes :: !(Maybe V1beta1NonResourceAttributes) -- ^ "nonResourceAttributes"
  , v1beta1SelfSubjectAccessReviewSpecResourceAttributes :: !(Maybe V1beta1ResourceAttributes) -- ^ "resourceAttributes"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1SelfSubjectAccessReviewSpec
instance A.FromJSON V1beta1SelfSubjectAccessReviewSpec where
  parseJSON = A.withObject "V1beta1SelfSubjectAccessReviewSpec" $ \o ->
    V1beta1SelfSubjectAccessReviewSpec
      <$> (o .:? "nonResourceAttributes")
      <*> (o .:? "resourceAttributes")

-- | ToJSON V1beta1SelfSubjectAccessReviewSpec
instance A.ToJSON V1beta1SelfSubjectAccessReviewSpec where
  toJSON V1beta1SelfSubjectAccessReviewSpec {..} =
   _omitNulls
      [ "nonResourceAttributes" .= v1beta1SelfSubjectAccessReviewSpecNonResourceAttributes
      , "resourceAttributes" .= v1beta1SelfSubjectAccessReviewSpecResourceAttributes
      ]


-- | Construct a value of type 'V1beta1SelfSubjectAccessReviewSpec' (by applying it's required fields, if any)
mkV1beta1SelfSubjectAccessReviewSpec
  :: V1beta1SelfSubjectAccessReviewSpec
mkV1beta1SelfSubjectAccessReviewSpec =
  V1beta1SelfSubjectAccessReviewSpec
  { v1beta1SelfSubjectAccessReviewSpecNonResourceAttributes = Nothing
  , v1beta1SelfSubjectAccessReviewSpecResourceAttributes = Nothing
  }

-- ** V1beta1SelfSubjectRulesReview
-- | V1beta1SelfSubjectRulesReview
-- 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 V1beta1SelfSubjectRulesReview = V1beta1SelfSubjectRulesReview
  { v1beta1SelfSubjectRulesReviewApiVersion :: !(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/api-conventions.md#resources
  , v1beta1SelfSubjectRulesReviewKind :: !(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/api-conventions.md#types-kinds
  , v1beta1SelfSubjectRulesReviewMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta1SelfSubjectRulesReviewSpec :: !(V1beta1SelfSubjectRulesReviewSpec) -- ^ /Required/ "spec"
  , v1beta1SelfSubjectRulesReviewStatus :: !(Maybe V1beta1SubjectRulesReviewStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1SelfSubjectRulesReview
instance A.FromJSON V1beta1SelfSubjectRulesReview where
  parseJSON = A.withObject "V1beta1SelfSubjectRulesReview" $ \o ->
    V1beta1SelfSubjectRulesReview
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:  "spec")
      <*> (o .:? "status")

-- | ToJSON V1beta1SelfSubjectRulesReview
instance A.ToJSON V1beta1SelfSubjectRulesReview where
  toJSON V1beta1SelfSubjectRulesReview {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1SelfSubjectRulesReviewApiVersion
      , "kind" .= v1beta1SelfSubjectRulesReviewKind
      , "metadata" .= v1beta1SelfSubjectRulesReviewMetadata
      , "spec" .= v1beta1SelfSubjectRulesReviewSpec
      , "status" .= v1beta1SelfSubjectRulesReviewStatus
      ]


-- | Construct a value of type 'V1beta1SelfSubjectRulesReview' (by applying it's required fields, if any)
mkV1beta1SelfSubjectRulesReview
  :: V1beta1SelfSubjectRulesReviewSpec -- ^ 'v1beta1SelfSubjectRulesReviewSpec' 
  -> V1beta1SelfSubjectRulesReview
mkV1beta1SelfSubjectRulesReview v1beta1SelfSubjectRulesReviewSpec =
  V1beta1SelfSubjectRulesReview
  { v1beta1SelfSubjectRulesReviewApiVersion = Nothing
  , v1beta1SelfSubjectRulesReviewKind = Nothing
  , v1beta1SelfSubjectRulesReviewMetadata = Nothing
  , v1beta1SelfSubjectRulesReviewSpec
  , v1beta1SelfSubjectRulesReviewStatus = Nothing
  }

-- ** V1beta1SelfSubjectRulesReviewSpec
-- | V1beta1SelfSubjectRulesReviewSpec
data V1beta1SelfSubjectRulesReviewSpec = V1beta1SelfSubjectRulesReviewSpec
  { v1beta1SelfSubjectRulesReviewSpecNamespace :: !(Maybe Text) -- ^ "namespace" - Namespace to evaluate rules for. Required.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1SelfSubjectRulesReviewSpec
instance A.FromJSON V1beta1SelfSubjectRulesReviewSpec where
  parseJSON = A.withObject "V1beta1SelfSubjectRulesReviewSpec" $ \o ->
    V1beta1SelfSubjectRulesReviewSpec
      <$> (o .:? "namespace")

-- | ToJSON V1beta1SelfSubjectRulesReviewSpec
instance A.ToJSON V1beta1SelfSubjectRulesReviewSpec where
  toJSON V1beta1SelfSubjectRulesReviewSpec {..} =
   _omitNulls
      [ "namespace" .= v1beta1SelfSubjectRulesReviewSpecNamespace
      ]


-- | Construct a value of type 'V1beta1SelfSubjectRulesReviewSpec' (by applying it's required fields, if any)
mkV1beta1SelfSubjectRulesReviewSpec
  :: V1beta1SelfSubjectRulesReviewSpec
mkV1beta1SelfSubjectRulesReviewSpec =
  V1beta1SelfSubjectRulesReviewSpec
  { v1beta1SelfSubjectRulesReviewSpecNamespace = Nothing
  }

-- ** V1beta1StatefulSet
-- | V1beta1StatefulSet
-- DEPRECATED - This group version of StatefulSet is deprecated by apps/v1beta2/StatefulSet. See the release notes for more information. 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 V1beta1StatefulSet = V1beta1StatefulSet
  { v1beta1StatefulSetApiVersion :: !(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/api-conventions.md#resources
  , v1beta1StatefulSetKind :: !(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/api-conventions.md#types-kinds
  , v1beta1StatefulSetMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta1StatefulSetSpec :: !(Maybe V1beta1StatefulSetSpec) -- ^ "spec"
  , v1beta1StatefulSetStatus :: !(Maybe V1beta1StatefulSetStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1StatefulSet
instance A.FromJSON V1beta1StatefulSet where
  parseJSON = A.withObject "V1beta1StatefulSet" $ \o ->
    V1beta1StatefulSet
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON V1beta1StatefulSet
instance A.ToJSON V1beta1StatefulSet where
  toJSON V1beta1StatefulSet {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1StatefulSetApiVersion
      , "kind" .= v1beta1StatefulSetKind
      , "metadata" .= v1beta1StatefulSetMetadata
      , "spec" .= v1beta1StatefulSetSpec
      , "status" .= v1beta1StatefulSetStatus
      ]


-- | Construct a value of type 'V1beta1StatefulSet' (by applying it's required fields, if any)
mkV1beta1StatefulSet
  :: V1beta1StatefulSet
mkV1beta1StatefulSet =
  V1beta1StatefulSet
  { v1beta1StatefulSetApiVersion = Nothing
  , v1beta1StatefulSetKind = Nothing
  , v1beta1StatefulSetMetadata = Nothing
  , v1beta1StatefulSetSpec = Nothing
  , v1beta1StatefulSetStatus = Nothing
  }

-- ** V1beta1StatefulSetCondition
-- | V1beta1StatefulSetCondition
-- StatefulSetCondition describes the state of a statefulset at a certain point.
data V1beta1StatefulSetCondition = V1beta1StatefulSetCondition
  { v1beta1StatefulSetConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - Last time the condition transitioned from one status to another.
  , v1beta1StatefulSetConditionMessage :: !(Maybe Text) -- ^ "message" - A human readable message indicating details about the transition.
  , v1beta1StatefulSetConditionReason :: !(Maybe Text) -- ^ "reason" - The reason for the condition&#39;s last transition.
  , v1beta1StatefulSetConditionStatus :: !(Text) -- ^ /Required/ "status" - Status of the condition, one of True, False, Unknown.
  , v1beta1StatefulSetConditionType :: !(Text) -- ^ /Required/ "type" - Type of statefulset condition.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1StatefulSetCondition
instance A.FromJSON V1beta1StatefulSetCondition where
  parseJSON = A.withObject "V1beta1StatefulSetCondition" $ \o ->
    V1beta1StatefulSetCondition
      <$> (o .:? "lastTransitionTime")
      <*> (o .:? "message")
      <*> (o .:? "reason")
      <*> (o .:  "status")
      <*> (o .:  "type")

-- | ToJSON V1beta1StatefulSetCondition
instance A.ToJSON V1beta1StatefulSetCondition where
  toJSON V1beta1StatefulSetCondition {..} =
   _omitNulls
      [ "lastTransitionTime" .= v1beta1StatefulSetConditionLastTransitionTime
      , "message" .= v1beta1StatefulSetConditionMessage
      , "reason" .= v1beta1StatefulSetConditionReason
      , "status" .= v1beta1StatefulSetConditionStatus
      , "type" .= v1beta1StatefulSetConditionType
      ]


-- | Construct a value of type 'V1beta1StatefulSetCondition' (by applying it's required fields, if any)
mkV1beta1StatefulSetCondition
  :: Text -- ^ 'v1beta1StatefulSetConditionStatus': Status of the condition, one of True, False, Unknown.
  -> Text -- ^ 'v1beta1StatefulSetConditionType': Type of statefulset condition.
  -> V1beta1StatefulSetCondition
mkV1beta1StatefulSetCondition v1beta1StatefulSetConditionStatus v1beta1StatefulSetConditionType =
  V1beta1StatefulSetCondition
  { v1beta1StatefulSetConditionLastTransitionTime = Nothing
  , v1beta1StatefulSetConditionMessage = Nothing
  , v1beta1StatefulSetConditionReason = Nothing
  , v1beta1StatefulSetConditionStatus
  , v1beta1StatefulSetConditionType
  }

-- ** V1beta1StatefulSetList
-- | V1beta1StatefulSetList
-- StatefulSetList is a collection of StatefulSets.
data V1beta1StatefulSetList = V1beta1StatefulSetList
  { v1beta1StatefulSetListApiVersion :: !(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/api-conventions.md#resources
  , v1beta1StatefulSetListItems :: !([V1beta1StatefulSet]) -- ^ /Required/ "items"
  , v1beta1StatefulSetListKind :: !(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/api-conventions.md#types-kinds
  , v1beta1StatefulSetListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1StatefulSetList
instance A.FromJSON V1beta1StatefulSetList where
  parseJSON = A.withObject "V1beta1StatefulSetList" $ \o ->
    V1beta1StatefulSetList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1beta1StatefulSetList
instance A.ToJSON V1beta1StatefulSetList where
  toJSON V1beta1StatefulSetList {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1StatefulSetListApiVersion
      , "items" .= v1beta1StatefulSetListItems
      , "kind" .= v1beta1StatefulSetListKind
      , "metadata" .= v1beta1StatefulSetListMetadata
      ]


-- | Construct a value of type 'V1beta1StatefulSetList' (by applying it's required fields, if any)
mkV1beta1StatefulSetList
  :: [V1beta1StatefulSet] -- ^ 'v1beta1StatefulSetListItems' 
  -> V1beta1StatefulSetList
mkV1beta1StatefulSetList v1beta1StatefulSetListItems =
  V1beta1StatefulSetList
  { v1beta1StatefulSetListApiVersion = Nothing
  , v1beta1StatefulSetListItems
  , v1beta1StatefulSetListKind = Nothing
  , v1beta1StatefulSetListMetadata = Nothing
  }

-- ** V1beta1StatefulSetSpec
-- | V1beta1StatefulSetSpec
-- A StatefulSetSpec is the specification of a StatefulSet.
data V1beta1StatefulSetSpec = V1beta1StatefulSetSpec
  { v1beta1StatefulSetSpecPodManagementPolicy :: !(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.
  , v1beta1StatefulSetSpecReplicas :: !(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.
  , v1beta1StatefulSetSpecRevisionHistoryLimit :: !(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.
  , v1beta1StatefulSetSpecSelector :: !(Maybe V1LabelSelector) -- ^ "selector"
  , v1beta1StatefulSetSpecServiceName :: !(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.
  , v1beta1StatefulSetSpecTemplate :: !(V1PodTemplateSpec) -- ^ /Required/ "template"
  , v1beta1StatefulSetSpecUpdateStrategy :: !(Maybe V1beta1StatefulSetUpdateStrategy) -- ^ "updateStrategy"
  , v1beta1StatefulSetSpecVolumeClaimTemplates :: !(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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1StatefulSetSpec
instance A.FromJSON V1beta1StatefulSetSpec where
  parseJSON = A.withObject "V1beta1StatefulSetSpec" $ \o ->
    V1beta1StatefulSetSpec
      <$> (o .:? "podManagementPolicy")
      <*> (o .:? "replicas")
      <*> (o .:? "revisionHistoryLimit")
      <*> (o .:? "selector")
      <*> (o .:  "serviceName")
      <*> (o .:  "template")
      <*> (o .:? "updateStrategy")
      <*> (o .:? "volumeClaimTemplates")

-- | ToJSON V1beta1StatefulSetSpec
instance A.ToJSON V1beta1StatefulSetSpec where
  toJSON V1beta1StatefulSetSpec {..} =
   _omitNulls
      [ "podManagementPolicy" .= v1beta1StatefulSetSpecPodManagementPolicy
      , "replicas" .= v1beta1StatefulSetSpecReplicas
      , "revisionHistoryLimit" .= v1beta1StatefulSetSpecRevisionHistoryLimit
      , "selector" .= v1beta1StatefulSetSpecSelector
      , "serviceName" .= v1beta1StatefulSetSpecServiceName
      , "template" .= v1beta1StatefulSetSpecTemplate
      , "updateStrategy" .= v1beta1StatefulSetSpecUpdateStrategy
      , "volumeClaimTemplates" .= v1beta1StatefulSetSpecVolumeClaimTemplates
      ]


-- | Construct a value of type 'V1beta1StatefulSetSpec' (by applying it's required fields, if any)
mkV1beta1StatefulSetSpec
  :: Text -- ^ 'v1beta1StatefulSetSpecServiceName': 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 -- ^ 'v1beta1StatefulSetSpecTemplate' 
  -> V1beta1StatefulSetSpec
mkV1beta1StatefulSetSpec v1beta1StatefulSetSpecServiceName v1beta1StatefulSetSpecTemplate =
  V1beta1StatefulSetSpec
  { v1beta1StatefulSetSpecPodManagementPolicy = Nothing
  , v1beta1StatefulSetSpecReplicas = Nothing
  , v1beta1StatefulSetSpecRevisionHistoryLimit = Nothing
  , v1beta1StatefulSetSpecSelector = Nothing
  , v1beta1StatefulSetSpecServiceName
  , v1beta1StatefulSetSpecTemplate
  , v1beta1StatefulSetSpecUpdateStrategy = Nothing
  , v1beta1StatefulSetSpecVolumeClaimTemplates = Nothing
  }

-- ** V1beta1StatefulSetStatus
-- | V1beta1StatefulSetStatus
-- StatefulSetStatus represents the current state of a StatefulSet.
data V1beta1StatefulSetStatus = V1beta1StatefulSetStatus
  { v1beta1StatefulSetStatusCollisionCount :: !(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.
  , v1beta1StatefulSetStatusConditions :: !(Maybe [V1beta1StatefulSetCondition]) -- ^ "conditions" - Represents the latest available observations of a statefulset&#39;s current state.
  , v1beta1StatefulSetStatusCurrentReplicas :: !(Maybe Int) -- ^ "currentReplicas" - currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision.
  , v1beta1StatefulSetStatusCurrentRevision :: !(Maybe Text) -- ^ "currentRevision" - currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas).
  , v1beta1StatefulSetStatusObservedGeneration :: !(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.
  , v1beta1StatefulSetStatusReadyReplicas :: !(Maybe Int) -- ^ "readyReplicas" - readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.
  , v1beta1StatefulSetStatusReplicas :: !(Int) -- ^ /Required/ "replicas" - replicas is the number of Pods created by the StatefulSet controller.
  , v1beta1StatefulSetStatusUpdateRevision :: !(Maybe Text) -- ^ "updateRevision" - updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)
  , v1beta1StatefulSetStatusUpdatedReplicas :: !(Maybe Int) -- ^ "updatedReplicas" - updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1StatefulSetStatus
instance A.FromJSON V1beta1StatefulSetStatus where
  parseJSON = A.withObject "V1beta1StatefulSetStatus" $ \o ->
    V1beta1StatefulSetStatus
      <$> (o .:? "collisionCount")
      <*> (o .:? "conditions")
      <*> (o .:? "currentReplicas")
      <*> (o .:? "currentRevision")
      <*> (o .:? "observedGeneration")
      <*> (o .:? "readyReplicas")
      <*> (o .:  "replicas")
      <*> (o .:? "updateRevision")
      <*> (o .:? "updatedReplicas")

-- | ToJSON V1beta1StatefulSetStatus
instance A.ToJSON V1beta1StatefulSetStatus where
  toJSON V1beta1StatefulSetStatus {..} =
   _omitNulls
      [ "collisionCount" .= v1beta1StatefulSetStatusCollisionCount
      , "conditions" .= v1beta1StatefulSetStatusConditions
      , "currentReplicas" .= v1beta1StatefulSetStatusCurrentReplicas
      , "currentRevision" .= v1beta1StatefulSetStatusCurrentRevision
      , "observedGeneration" .= v1beta1StatefulSetStatusObservedGeneration
      , "readyReplicas" .= v1beta1StatefulSetStatusReadyReplicas
      , "replicas" .= v1beta1StatefulSetStatusReplicas
      , "updateRevision" .= v1beta1StatefulSetStatusUpdateRevision
      , "updatedReplicas" .= v1beta1StatefulSetStatusUpdatedReplicas
      ]


-- | Construct a value of type 'V1beta1StatefulSetStatus' (by applying it's required fields, if any)
mkV1beta1StatefulSetStatus
  :: Int -- ^ 'v1beta1StatefulSetStatusReplicas': replicas is the number of Pods created by the StatefulSet controller.
  -> V1beta1StatefulSetStatus
mkV1beta1StatefulSetStatus v1beta1StatefulSetStatusReplicas =
  V1beta1StatefulSetStatus
  { v1beta1StatefulSetStatusCollisionCount = Nothing
  , v1beta1StatefulSetStatusConditions = Nothing
  , v1beta1StatefulSetStatusCurrentReplicas = Nothing
  , v1beta1StatefulSetStatusCurrentRevision = Nothing
  , v1beta1StatefulSetStatusObservedGeneration = Nothing
  , v1beta1StatefulSetStatusReadyReplicas = Nothing
  , v1beta1StatefulSetStatusReplicas
  , v1beta1StatefulSetStatusUpdateRevision = Nothing
  , v1beta1StatefulSetStatusUpdatedReplicas = Nothing
  }

-- ** V1beta1StatefulSetUpdateStrategy
-- | V1beta1StatefulSetUpdateStrategy
-- 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 V1beta1StatefulSetUpdateStrategy = V1beta1StatefulSetUpdateStrategy
  { v1beta1StatefulSetUpdateStrategyRollingUpdate :: !(Maybe V1beta1RollingUpdateStatefulSetStrategy) -- ^ "rollingUpdate"
  , v1beta1StatefulSetUpdateStrategyType :: !(Maybe Text) -- ^ "type" - Type indicates the type of the StatefulSetUpdateStrategy.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1StatefulSetUpdateStrategy
instance A.FromJSON V1beta1StatefulSetUpdateStrategy where
  parseJSON = A.withObject "V1beta1StatefulSetUpdateStrategy" $ \o ->
    V1beta1StatefulSetUpdateStrategy
      <$> (o .:? "rollingUpdate")
      <*> (o .:? "type")

-- | ToJSON V1beta1StatefulSetUpdateStrategy
instance A.ToJSON V1beta1StatefulSetUpdateStrategy where
  toJSON V1beta1StatefulSetUpdateStrategy {..} =
   _omitNulls
      [ "rollingUpdate" .= v1beta1StatefulSetUpdateStrategyRollingUpdate
      , "type" .= v1beta1StatefulSetUpdateStrategyType
      ]


-- | Construct a value of type 'V1beta1StatefulSetUpdateStrategy' (by applying it's required fields, if any)
mkV1beta1StatefulSetUpdateStrategy
  :: V1beta1StatefulSetUpdateStrategy
mkV1beta1StatefulSetUpdateStrategy =
  V1beta1StatefulSetUpdateStrategy
  { v1beta1StatefulSetUpdateStrategyRollingUpdate = Nothing
  , v1beta1StatefulSetUpdateStrategyType = Nothing
  }

-- ** V1beta1StorageClass
-- | V1beta1StorageClass
-- 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 V1beta1StorageClass = V1beta1StorageClass
  { v1beta1StorageClassAllowVolumeExpansion :: !(Maybe Bool) -- ^ "allowVolumeExpansion" - AllowVolumeExpansion shows whether the storage class allow volume expand
  , v1beta1StorageClassAllowedTopologies :: !(Maybe [V1TopologySelectorTerm]) -- ^ "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.
  , v1beta1StorageClassApiVersion :: !(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/api-conventions.md#resources
  , v1beta1StorageClassKind :: !(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/api-conventions.md#types-kinds
  , v1beta1StorageClassMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta1StorageClassMountOptions :: !(Maybe [Text]) -- ^ "mountOptions" - Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. [\&quot;ro\&quot;, \&quot;soft\&quot;]. Not validated - mount of the PVs will simply fail if one is invalid.
  , v1beta1StorageClassParameters :: !(Maybe (Map.Map String Text)) -- ^ "parameters" - Parameters holds the parameters for the provisioner that should create volumes of this storage class.
  , v1beta1StorageClassProvisioner :: !(Text) -- ^ /Required/ "provisioner" - Provisioner indicates the type of the provisioner.
  , v1beta1StorageClassReclaimPolicy :: !(Maybe Text) -- ^ "reclaimPolicy" - Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.
  , v1beta1StorageClassVolumeBindingMode :: !(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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1StorageClass
instance A.FromJSON V1beta1StorageClass where
  parseJSON = A.withObject "V1beta1StorageClass" $ \o ->
    V1beta1StorageClass
      <$> (o .:? "allowVolumeExpansion")
      <*> (o .:? "allowedTopologies")
      <*> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "mountOptions")
      <*> (o .:? "parameters")
      <*> (o .:  "provisioner")
      <*> (o .:? "reclaimPolicy")
      <*> (o .:? "volumeBindingMode")

-- | ToJSON V1beta1StorageClass
instance A.ToJSON V1beta1StorageClass where
  toJSON V1beta1StorageClass {..} =
   _omitNulls
      [ "allowVolumeExpansion" .= v1beta1StorageClassAllowVolumeExpansion
      , "allowedTopologies" .= v1beta1StorageClassAllowedTopologies
      , "apiVersion" .= v1beta1StorageClassApiVersion
      , "kind" .= v1beta1StorageClassKind
      , "metadata" .= v1beta1StorageClassMetadata
      , "mountOptions" .= v1beta1StorageClassMountOptions
      , "parameters" .= v1beta1StorageClassParameters
      , "provisioner" .= v1beta1StorageClassProvisioner
      , "reclaimPolicy" .= v1beta1StorageClassReclaimPolicy
      , "volumeBindingMode" .= v1beta1StorageClassVolumeBindingMode
      ]


-- | Construct a value of type 'V1beta1StorageClass' (by applying it's required fields, if any)
mkV1beta1StorageClass
  :: Text -- ^ 'v1beta1StorageClassProvisioner': Provisioner indicates the type of the provisioner.
  -> V1beta1StorageClass
mkV1beta1StorageClass v1beta1StorageClassProvisioner =
  V1beta1StorageClass
  { v1beta1StorageClassAllowVolumeExpansion = Nothing
  , v1beta1StorageClassAllowedTopologies = Nothing
  , v1beta1StorageClassApiVersion = Nothing
  , v1beta1StorageClassKind = Nothing
  , v1beta1StorageClassMetadata = Nothing
  , v1beta1StorageClassMountOptions = Nothing
  , v1beta1StorageClassParameters = Nothing
  , v1beta1StorageClassProvisioner
  , v1beta1StorageClassReclaimPolicy = Nothing
  , v1beta1StorageClassVolumeBindingMode = Nothing
  }

-- ** V1beta1StorageClassList
-- | V1beta1StorageClassList
-- StorageClassList is a collection of storage classes.
data V1beta1StorageClassList = V1beta1StorageClassList
  { v1beta1StorageClassListApiVersion :: !(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/api-conventions.md#resources
  , v1beta1StorageClassListItems :: !([V1beta1StorageClass]) -- ^ /Required/ "items" - Items is the list of StorageClasses
  , v1beta1StorageClassListKind :: !(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/api-conventions.md#types-kinds
  , v1beta1StorageClassListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1StorageClassList
instance A.FromJSON V1beta1StorageClassList where
  parseJSON = A.withObject "V1beta1StorageClassList" $ \o ->
    V1beta1StorageClassList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1beta1StorageClassList
instance A.ToJSON V1beta1StorageClassList where
  toJSON V1beta1StorageClassList {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1StorageClassListApiVersion
      , "items" .= v1beta1StorageClassListItems
      , "kind" .= v1beta1StorageClassListKind
      , "metadata" .= v1beta1StorageClassListMetadata
      ]


-- | Construct a value of type 'V1beta1StorageClassList' (by applying it's required fields, if any)
mkV1beta1StorageClassList
  :: [V1beta1StorageClass] -- ^ 'v1beta1StorageClassListItems': Items is the list of StorageClasses
  -> V1beta1StorageClassList
mkV1beta1StorageClassList v1beta1StorageClassListItems =
  V1beta1StorageClassList
  { v1beta1StorageClassListApiVersion = Nothing
  , v1beta1StorageClassListItems
  , v1beta1StorageClassListKind = Nothing
  , v1beta1StorageClassListMetadata = Nothing
  }

-- ** V1beta1Subject
-- | V1beta1Subject
-- 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 V1beta1Subject = V1beta1Subject
  { v1beta1SubjectApiGroup :: !(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.
  , v1beta1SubjectKind :: !(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.
  , v1beta1SubjectName :: !(Text) -- ^ /Required/ "name" - Name of the object being referenced.
  , v1beta1SubjectNamespace :: !(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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1Subject
instance A.FromJSON V1beta1Subject where
  parseJSON = A.withObject "V1beta1Subject" $ \o ->
    V1beta1Subject
      <$> (o .:? "apiGroup")
      <*> (o .:  "kind")
      <*> (o .:  "name")
      <*> (o .:? "namespace")

-- | ToJSON V1beta1Subject
instance A.ToJSON V1beta1Subject where
  toJSON V1beta1Subject {..} =
   _omitNulls
      [ "apiGroup" .= v1beta1SubjectApiGroup
      , "kind" .= v1beta1SubjectKind
      , "name" .= v1beta1SubjectName
      , "namespace" .= v1beta1SubjectNamespace
      ]


-- | Construct a value of type 'V1beta1Subject' (by applying it's required fields, if any)
mkV1beta1Subject
  :: Text -- ^ 'v1beta1SubjectKind': 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 -- ^ 'v1beta1SubjectName': Name of the object being referenced.
  -> V1beta1Subject
mkV1beta1Subject v1beta1SubjectKind v1beta1SubjectName =
  V1beta1Subject
  { v1beta1SubjectApiGroup = Nothing
  , v1beta1SubjectKind
  , v1beta1SubjectName
  , v1beta1SubjectNamespace = Nothing
  }

-- ** V1beta1SubjectAccessReview
-- | V1beta1SubjectAccessReview
-- SubjectAccessReview checks whether or not a user or group can perform an action.
data V1beta1SubjectAccessReview = V1beta1SubjectAccessReview
  { v1beta1SubjectAccessReviewApiVersion :: !(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/api-conventions.md#resources
  , v1beta1SubjectAccessReviewKind :: !(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/api-conventions.md#types-kinds
  , v1beta1SubjectAccessReviewMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta1SubjectAccessReviewSpec :: !(V1beta1SubjectAccessReviewSpec) -- ^ /Required/ "spec"
  , v1beta1SubjectAccessReviewStatus :: !(Maybe V1beta1SubjectAccessReviewStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1SubjectAccessReview
instance A.FromJSON V1beta1SubjectAccessReview where
  parseJSON = A.withObject "V1beta1SubjectAccessReview" $ \o ->
    V1beta1SubjectAccessReview
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:  "spec")
      <*> (o .:? "status")

-- | ToJSON V1beta1SubjectAccessReview
instance A.ToJSON V1beta1SubjectAccessReview where
  toJSON V1beta1SubjectAccessReview {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1SubjectAccessReviewApiVersion
      , "kind" .= v1beta1SubjectAccessReviewKind
      , "metadata" .= v1beta1SubjectAccessReviewMetadata
      , "spec" .= v1beta1SubjectAccessReviewSpec
      , "status" .= v1beta1SubjectAccessReviewStatus
      ]


-- | Construct a value of type 'V1beta1SubjectAccessReview' (by applying it's required fields, if any)
mkV1beta1SubjectAccessReview
  :: V1beta1SubjectAccessReviewSpec -- ^ 'v1beta1SubjectAccessReviewSpec' 
  -> V1beta1SubjectAccessReview
mkV1beta1SubjectAccessReview v1beta1SubjectAccessReviewSpec =
  V1beta1SubjectAccessReview
  { v1beta1SubjectAccessReviewApiVersion = Nothing
  , v1beta1SubjectAccessReviewKind = Nothing
  , v1beta1SubjectAccessReviewMetadata = Nothing
  , v1beta1SubjectAccessReviewSpec
  , v1beta1SubjectAccessReviewStatus = Nothing
  }

-- ** V1beta1SubjectAccessReviewSpec
-- | V1beta1SubjectAccessReviewSpec
-- SubjectAccessReviewSpec is a description of the access request.  Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set
data V1beta1SubjectAccessReviewSpec = V1beta1SubjectAccessReviewSpec
  { v1beta1SubjectAccessReviewSpecExtra :: !(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.
  , v1beta1SubjectAccessReviewSpecGroup :: !(Maybe [Text]) -- ^ "group" - Groups is the groups you&#39;re testing for.
  , v1beta1SubjectAccessReviewSpecNonResourceAttributes :: !(Maybe V1beta1NonResourceAttributes) -- ^ "nonResourceAttributes"
  , v1beta1SubjectAccessReviewSpecResourceAttributes :: !(Maybe V1beta1ResourceAttributes) -- ^ "resourceAttributes"
  , v1beta1SubjectAccessReviewSpecUid :: !(Maybe Text) -- ^ "uid" - UID information about the requesting user.
  , v1beta1SubjectAccessReviewSpecUser :: !(Maybe Text) -- ^ "user" - User is the user you&#39;re testing for. If you specify \&quot;User\&quot; but not \&quot;Group\&quot;, then is it interpreted as \&quot;What if User were not a member of any groups
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1SubjectAccessReviewSpec
instance A.FromJSON V1beta1SubjectAccessReviewSpec where
  parseJSON = A.withObject "V1beta1SubjectAccessReviewSpec" $ \o ->
    V1beta1SubjectAccessReviewSpec
      <$> (o .:? "extra")
      <*> (o .:? "group")
      <*> (o .:? "nonResourceAttributes")
      <*> (o .:? "resourceAttributes")
      <*> (o .:? "uid")
      <*> (o .:? "user")

-- | ToJSON V1beta1SubjectAccessReviewSpec
instance A.ToJSON V1beta1SubjectAccessReviewSpec where
  toJSON V1beta1SubjectAccessReviewSpec {..} =
   _omitNulls
      [ "extra" .= v1beta1SubjectAccessReviewSpecExtra
      , "group" .= v1beta1SubjectAccessReviewSpecGroup
      , "nonResourceAttributes" .= v1beta1SubjectAccessReviewSpecNonResourceAttributes
      , "resourceAttributes" .= v1beta1SubjectAccessReviewSpecResourceAttributes
      , "uid" .= v1beta1SubjectAccessReviewSpecUid
      , "user" .= v1beta1SubjectAccessReviewSpecUser
      ]


-- | Construct a value of type 'V1beta1SubjectAccessReviewSpec' (by applying it's required fields, if any)
mkV1beta1SubjectAccessReviewSpec
  :: V1beta1SubjectAccessReviewSpec
mkV1beta1SubjectAccessReviewSpec =
  V1beta1SubjectAccessReviewSpec
  { v1beta1SubjectAccessReviewSpecExtra = Nothing
  , v1beta1SubjectAccessReviewSpecGroup = Nothing
  , v1beta1SubjectAccessReviewSpecNonResourceAttributes = Nothing
  , v1beta1SubjectAccessReviewSpecResourceAttributes = Nothing
  , v1beta1SubjectAccessReviewSpecUid = Nothing
  , v1beta1SubjectAccessReviewSpecUser = Nothing
  }

-- ** V1beta1SubjectAccessReviewStatus
-- | V1beta1SubjectAccessReviewStatus
-- SubjectAccessReviewStatus
data V1beta1SubjectAccessReviewStatus = V1beta1SubjectAccessReviewStatus
  { v1beta1SubjectAccessReviewStatusAllowed :: !(Bool) -- ^ /Required/ "allowed" - Allowed is required. True if the action would be allowed, false otherwise.
  , v1beta1SubjectAccessReviewStatusDenied :: !(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.
  , v1beta1SubjectAccessReviewStatusEvaluationError :: !(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.
  , v1beta1SubjectAccessReviewStatusReason :: !(Maybe Text) -- ^ "reason" - Reason is optional.  It indicates why a request was allowed or denied.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1SubjectAccessReviewStatus
instance A.FromJSON V1beta1SubjectAccessReviewStatus where
  parseJSON = A.withObject "V1beta1SubjectAccessReviewStatus" $ \o ->
    V1beta1SubjectAccessReviewStatus
      <$> (o .:  "allowed")
      <*> (o .:? "denied")
      <*> (o .:? "evaluationError")
      <*> (o .:? "reason")

-- | ToJSON V1beta1SubjectAccessReviewStatus
instance A.ToJSON V1beta1SubjectAccessReviewStatus where
  toJSON V1beta1SubjectAccessReviewStatus {..} =
   _omitNulls
      [ "allowed" .= v1beta1SubjectAccessReviewStatusAllowed
      , "denied" .= v1beta1SubjectAccessReviewStatusDenied
      , "evaluationError" .= v1beta1SubjectAccessReviewStatusEvaluationError
      , "reason" .= v1beta1SubjectAccessReviewStatusReason
      ]


-- | Construct a value of type 'V1beta1SubjectAccessReviewStatus' (by applying it's required fields, if any)
mkV1beta1SubjectAccessReviewStatus
  :: Bool -- ^ 'v1beta1SubjectAccessReviewStatusAllowed': Allowed is required. True if the action would be allowed, false otherwise.
  -> V1beta1SubjectAccessReviewStatus
mkV1beta1SubjectAccessReviewStatus v1beta1SubjectAccessReviewStatusAllowed =
  V1beta1SubjectAccessReviewStatus
  { v1beta1SubjectAccessReviewStatusAllowed
  , v1beta1SubjectAccessReviewStatusDenied = Nothing
  , v1beta1SubjectAccessReviewStatusEvaluationError = Nothing
  , v1beta1SubjectAccessReviewStatusReason = Nothing
  }

-- ** V1beta1SubjectRulesReviewStatus
-- | V1beta1SubjectRulesReviewStatus
-- 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 V1beta1SubjectRulesReviewStatus = V1beta1SubjectRulesReviewStatus
  { v1beta1SubjectRulesReviewStatusEvaluationError :: !(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.
  , v1beta1SubjectRulesReviewStatusIncomplete :: !(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.
  , v1beta1SubjectRulesReviewStatusNonResourceRules :: !([V1beta1NonResourceRule]) -- ^ /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.
  , v1beta1SubjectRulesReviewStatusResourceRules :: !([V1beta1ResourceRule]) -- ^ /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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1SubjectRulesReviewStatus
instance A.FromJSON V1beta1SubjectRulesReviewStatus where
  parseJSON = A.withObject "V1beta1SubjectRulesReviewStatus" $ \o ->
    V1beta1SubjectRulesReviewStatus
      <$> (o .:? "evaluationError")
      <*> (o .:  "incomplete")
      <*> (o .:  "nonResourceRules")
      <*> (o .:  "resourceRules")

-- | ToJSON V1beta1SubjectRulesReviewStatus
instance A.ToJSON V1beta1SubjectRulesReviewStatus where
  toJSON V1beta1SubjectRulesReviewStatus {..} =
   _omitNulls
      [ "evaluationError" .= v1beta1SubjectRulesReviewStatusEvaluationError
      , "incomplete" .= v1beta1SubjectRulesReviewStatusIncomplete
      , "nonResourceRules" .= v1beta1SubjectRulesReviewStatusNonResourceRules
      , "resourceRules" .= v1beta1SubjectRulesReviewStatusResourceRules
      ]


-- | Construct a value of type 'V1beta1SubjectRulesReviewStatus' (by applying it's required fields, if any)
mkV1beta1SubjectRulesReviewStatus
  :: Bool -- ^ 'v1beta1SubjectRulesReviewStatusIncomplete': 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.
  -> [V1beta1NonResourceRule] -- ^ 'v1beta1SubjectRulesReviewStatusNonResourceRules': 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.
  -> [V1beta1ResourceRule] -- ^ 'v1beta1SubjectRulesReviewStatusResourceRules': 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.
  -> V1beta1SubjectRulesReviewStatus
mkV1beta1SubjectRulesReviewStatus v1beta1SubjectRulesReviewStatusIncomplete v1beta1SubjectRulesReviewStatusNonResourceRules v1beta1SubjectRulesReviewStatusResourceRules =
  V1beta1SubjectRulesReviewStatus
  { v1beta1SubjectRulesReviewStatusEvaluationError = Nothing
  , v1beta1SubjectRulesReviewStatusIncomplete
  , v1beta1SubjectRulesReviewStatusNonResourceRules
  , v1beta1SubjectRulesReviewStatusResourceRules
  }

-- ** V1beta1TokenReview
-- | V1beta1TokenReview
-- 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 V1beta1TokenReview = V1beta1TokenReview
  { v1beta1TokenReviewApiVersion :: !(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/api-conventions.md#resources
  , v1beta1TokenReviewKind :: !(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/api-conventions.md#types-kinds
  , v1beta1TokenReviewMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta1TokenReviewSpec :: !(V1beta1TokenReviewSpec) -- ^ /Required/ "spec"
  , v1beta1TokenReviewStatus :: !(Maybe V1beta1TokenReviewStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1TokenReview
instance A.FromJSON V1beta1TokenReview where
  parseJSON = A.withObject "V1beta1TokenReview" $ \o ->
    V1beta1TokenReview
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:  "spec")
      <*> (o .:? "status")

-- | ToJSON V1beta1TokenReview
instance A.ToJSON V1beta1TokenReview where
  toJSON V1beta1TokenReview {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1TokenReviewApiVersion
      , "kind" .= v1beta1TokenReviewKind
      , "metadata" .= v1beta1TokenReviewMetadata
      , "spec" .= v1beta1TokenReviewSpec
      , "status" .= v1beta1TokenReviewStatus
      ]


-- | Construct a value of type 'V1beta1TokenReview' (by applying it's required fields, if any)
mkV1beta1TokenReview
  :: V1beta1TokenReviewSpec -- ^ 'v1beta1TokenReviewSpec' 
  -> V1beta1TokenReview
mkV1beta1TokenReview v1beta1TokenReviewSpec =
  V1beta1TokenReview
  { v1beta1TokenReviewApiVersion = Nothing
  , v1beta1TokenReviewKind = Nothing
  , v1beta1TokenReviewMetadata = Nothing
  , v1beta1TokenReviewSpec
  , v1beta1TokenReviewStatus = Nothing
  }

-- ** V1beta1TokenReviewSpec
-- | V1beta1TokenReviewSpec
-- TokenReviewSpec is a description of the token authentication request.
data V1beta1TokenReviewSpec = V1beta1TokenReviewSpec
  { v1beta1TokenReviewSpecAudiences :: !(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.
  , v1beta1TokenReviewSpecToken :: !(Maybe Text) -- ^ "token" - Token is the opaque bearer token.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1TokenReviewSpec
instance A.FromJSON V1beta1TokenReviewSpec where
  parseJSON = A.withObject "V1beta1TokenReviewSpec" $ \o ->
    V1beta1TokenReviewSpec
      <$> (o .:? "audiences")
      <*> (o .:? "token")

-- | ToJSON V1beta1TokenReviewSpec
instance A.ToJSON V1beta1TokenReviewSpec where
  toJSON V1beta1TokenReviewSpec {..} =
   _omitNulls
      [ "audiences" .= v1beta1TokenReviewSpecAudiences
      , "token" .= v1beta1TokenReviewSpecToken
      ]


-- | Construct a value of type 'V1beta1TokenReviewSpec' (by applying it's required fields, if any)
mkV1beta1TokenReviewSpec
  :: V1beta1TokenReviewSpec
mkV1beta1TokenReviewSpec =
  V1beta1TokenReviewSpec
  { v1beta1TokenReviewSpecAudiences = Nothing
  , v1beta1TokenReviewSpecToken = Nothing
  }

-- ** V1beta1TokenReviewStatus
-- | V1beta1TokenReviewStatus
-- TokenReviewStatus is the result of the token authentication request.
data V1beta1TokenReviewStatus = V1beta1TokenReviewStatus
  { v1beta1TokenReviewStatusAudiences :: !(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.
  , v1beta1TokenReviewStatusAuthenticated :: !(Maybe Bool) -- ^ "authenticated" - Authenticated indicates that the token was associated with a known user.
  , v1beta1TokenReviewStatusError :: !(Maybe Text) -- ^ "error" - Error indicates that the token couldn&#39;t be checked
  , v1beta1TokenReviewStatusUser :: !(Maybe V1beta1UserInfo) -- ^ "user"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1TokenReviewStatus
instance A.FromJSON V1beta1TokenReviewStatus where
  parseJSON = A.withObject "V1beta1TokenReviewStatus" $ \o ->
    V1beta1TokenReviewStatus
      <$> (o .:? "audiences")
      <*> (o .:? "authenticated")
      <*> (o .:? "error")
      <*> (o .:? "user")

-- | ToJSON V1beta1TokenReviewStatus
instance A.ToJSON V1beta1TokenReviewStatus where
  toJSON V1beta1TokenReviewStatus {..} =
   _omitNulls
      [ "audiences" .= v1beta1TokenReviewStatusAudiences
      , "authenticated" .= v1beta1TokenReviewStatusAuthenticated
      , "error" .= v1beta1TokenReviewStatusError
      , "user" .= v1beta1TokenReviewStatusUser
      ]


-- | Construct a value of type 'V1beta1TokenReviewStatus' (by applying it's required fields, if any)
mkV1beta1TokenReviewStatus
  :: V1beta1TokenReviewStatus
mkV1beta1TokenReviewStatus =
  V1beta1TokenReviewStatus
  { v1beta1TokenReviewStatusAudiences = Nothing
  , v1beta1TokenReviewStatusAuthenticated = Nothing
  , v1beta1TokenReviewStatusError = Nothing
  , v1beta1TokenReviewStatusUser = Nothing
  }

-- ** V1beta1UserInfo
-- | V1beta1UserInfo
-- UserInfo holds the information about the user needed to implement the user.Info interface.
data V1beta1UserInfo = V1beta1UserInfo
  { v1beta1UserInfoExtra :: !(Maybe (Map.Map String [Text])) -- ^ "extra" - Any additional information provided by the authenticator.
  , v1beta1UserInfoGroups :: !(Maybe [Text]) -- ^ "groups" - The names of groups this user is a part of.
  , v1beta1UserInfoUid :: !(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.
  , v1beta1UserInfoUsername :: !(Maybe Text) -- ^ "username" - The name that uniquely identifies this user among all active users.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1UserInfo
instance A.FromJSON V1beta1UserInfo where
  parseJSON = A.withObject "V1beta1UserInfo" $ \o ->
    V1beta1UserInfo
      <$> (o .:? "extra")
      <*> (o .:? "groups")
      <*> (o .:? "uid")
      <*> (o .:? "username")

-- | ToJSON V1beta1UserInfo
instance A.ToJSON V1beta1UserInfo where
  toJSON V1beta1UserInfo {..} =
   _omitNulls
      [ "extra" .= v1beta1UserInfoExtra
      , "groups" .= v1beta1UserInfoGroups
      , "uid" .= v1beta1UserInfoUid
      , "username" .= v1beta1UserInfoUsername
      ]


-- | Construct a value of type 'V1beta1UserInfo' (by applying it's required fields, if any)
mkV1beta1UserInfo
  :: V1beta1UserInfo
mkV1beta1UserInfo =
  V1beta1UserInfo
  { v1beta1UserInfoExtra = Nothing
  , v1beta1UserInfoGroups = Nothing
  , v1beta1UserInfoUid = Nothing
  , v1beta1UserInfoUsername = Nothing
  }

-- ** V1beta1ValidatingWebhookConfiguration
-- | V1beta1ValidatingWebhookConfiguration
-- ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it.
data V1beta1ValidatingWebhookConfiguration = V1beta1ValidatingWebhookConfiguration
  { v1beta1ValidatingWebhookConfigurationApiVersion :: !(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/api-conventions.md#resources
  , v1beta1ValidatingWebhookConfigurationKind :: !(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/api-conventions.md#types-kinds
  , v1beta1ValidatingWebhookConfigurationMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta1ValidatingWebhookConfigurationWebhooks :: !(Maybe [V1beta1Webhook]) -- ^ "webhooks" - Webhooks is a list of webhooks and the affected resources and operations.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1ValidatingWebhookConfiguration
instance A.FromJSON V1beta1ValidatingWebhookConfiguration where
  parseJSON = A.withObject "V1beta1ValidatingWebhookConfiguration" $ \o ->
    V1beta1ValidatingWebhookConfiguration
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "webhooks")

-- | ToJSON V1beta1ValidatingWebhookConfiguration
instance A.ToJSON V1beta1ValidatingWebhookConfiguration where
  toJSON V1beta1ValidatingWebhookConfiguration {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1ValidatingWebhookConfigurationApiVersion
      , "kind" .= v1beta1ValidatingWebhookConfigurationKind
      , "metadata" .= v1beta1ValidatingWebhookConfigurationMetadata
      , "webhooks" .= v1beta1ValidatingWebhookConfigurationWebhooks
      ]


-- | Construct a value of type 'V1beta1ValidatingWebhookConfiguration' (by applying it's required fields, if any)
mkV1beta1ValidatingWebhookConfiguration
  :: V1beta1ValidatingWebhookConfiguration
mkV1beta1ValidatingWebhookConfiguration =
  V1beta1ValidatingWebhookConfiguration
  { v1beta1ValidatingWebhookConfigurationApiVersion = Nothing
  , v1beta1ValidatingWebhookConfigurationKind = Nothing
  , v1beta1ValidatingWebhookConfigurationMetadata = Nothing
  , v1beta1ValidatingWebhookConfigurationWebhooks = Nothing
  }

-- ** V1beta1ValidatingWebhookConfigurationList
-- | V1beta1ValidatingWebhookConfigurationList
-- ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration.
data V1beta1ValidatingWebhookConfigurationList = V1beta1ValidatingWebhookConfigurationList
  { v1beta1ValidatingWebhookConfigurationListApiVersion :: !(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/api-conventions.md#resources
  , v1beta1ValidatingWebhookConfigurationListItems :: !([V1beta1ValidatingWebhookConfiguration]) -- ^ /Required/ "items" - List of ValidatingWebhookConfiguration.
  , v1beta1ValidatingWebhookConfigurationListKind :: !(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/api-conventions.md#types-kinds
  , v1beta1ValidatingWebhookConfigurationListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1ValidatingWebhookConfigurationList
instance A.FromJSON V1beta1ValidatingWebhookConfigurationList where
  parseJSON = A.withObject "V1beta1ValidatingWebhookConfigurationList" $ \o ->
    V1beta1ValidatingWebhookConfigurationList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1beta1ValidatingWebhookConfigurationList
instance A.ToJSON V1beta1ValidatingWebhookConfigurationList where
  toJSON V1beta1ValidatingWebhookConfigurationList {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1ValidatingWebhookConfigurationListApiVersion
      , "items" .= v1beta1ValidatingWebhookConfigurationListItems
      , "kind" .= v1beta1ValidatingWebhookConfigurationListKind
      , "metadata" .= v1beta1ValidatingWebhookConfigurationListMetadata
      ]


-- | Construct a value of type 'V1beta1ValidatingWebhookConfigurationList' (by applying it's required fields, if any)
mkV1beta1ValidatingWebhookConfigurationList
  :: [V1beta1ValidatingWebhookConfiguration] -- ^ 'v1beta1ValidatingWebhookConfigurationListItems': List of ValidatingWebhookConfiguration.
  -> V1beta1ValidatingWebhookConfigurationList
mkV1beta1ValidatingWebhookConfigurationList v1beta1ValidatingWebhookConfigurationListItems =
  V1beta1ValidatingWebhookConfigurationList
  { v1beta1ValidatingWebhookConfigurationListApiVersion = Nothing
  , v1beta1ValidatingWebhookConfigurationListItems
  , v1beta1ValidatingWebhookConfigurationListKind = Nothing
  , v1beta1ValidatingWebhookConfigurationListMetadata = Nothing
  }

-- ** V1beta1VolumeAttachment
-- | V1beta1VolumeAttachment
-- VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.  VolumeAttachment objects are non-namespaced.
data V1beta1VolumeAttachment = V1beta1VolumeAttachment
  { v1beta1VolumeAttachmentApiVersion :: !(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/api-conventions.md#resources
  , v1beta1VolumeAttachmentKind :: !(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/api-conventions.md#types-kinds
  , v1beta1VolumeAttachmentMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta1VolumeAttachmentSpec :: !(V1beta1VolumeAttachmentSpec) -- ^ /Required/ "spec"
  , v1beta1VolumeAttachmentStatus :: !(Maybe V1beta1VolumeAttachmentStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1VolumeAttachment
instance A.FromJSON V1beta1VolumeAttachment where
  parseJSON = A.withObject "V1beta1VolumeAttachment" $ \o ->
    V1beta1VolumeAttachment
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:  "spec")
      <*> (o .:? "status")

-- | ToJSON V1beta1VolumeAttachment
instance A.ToJSON V1beta1VolumeAttachment where
  toJSON V1beta1VolumeAttachment {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1VolumeAttachmentApiVersion
      , "kind" .= v1beta1VolumeAttachmentKind
      , "metadata" .= v1beta1VolumeAttachmentMetadata
      , "spec" .= v1beta1VolumeAttachmentSpec
      , "status" .= v1beta1VolumeAttachmentStatus
      ]


-- | Construct a value of type 'V1beta1VolumeAttachment' (by applying it's required fields, if any)
mkV1beta1VolumeAttachment
  :: V1beta1VolumeAttachmentSpec -- ^ 'v1beta1VolumeAttachmentSpec' 
  -> V1beta1VolumeAttachment
mkV1beta1VolumeAttachment v1beta1VolumeAttachmentSpec =
  V1beta1VolumeAttachment
  { v1beta1VolumeAttachmentApiVersion = Nothing
  , v1beta1VolumeAttachmentKind = Nothing
  , v1beta1VolumeAttachmentMetadata = Nothing
  , v1beta1VolumeAttachmentSpec
  , v1beta1VolumeAttachmentStatus = Nothing
  }

-- ** V1beta1VolumeAttachmentList
-- | V1beta1VolumeAttachmentList
-- VolumeAttachmentList is a collection of VolumeAttachment objects.
data V1beta1VolumeAttachmentList = V1beta1VolumeAttachmentList
  { v1beta1VolumeAttachmentListApiVersion :: !(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/api-conventions.md#resources
  , v1beta1VolumeAttachmentListItems :: !([V1beta1VolumeAttachment]) -- ^ /Required/ "items" - Items is the list of VolumeAttachments
  , v1beta1VolumeAttachmentListKind :: !(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/api-conventions.md#types-kinds
  , v1beta1VolumeAttachmentListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1VolumeAttachmentList
instance A.FromJSON V1beta1VolumeAttachmentList where
  parseJSON = A.withObject "V1beta1VolumeAttachmentList" $ \o ->
    V1beta1VolumeAttachmentList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1beta1VolumeAttachmentList
instance A.ToJSON V1beta1VolumeAttachmentList where
  toJSON V1beta1VolumeAttachmentList {..} =
   _omitNulls
      [ "apiVersion" .= v1beta1VolumeAttachmentListApiVersion
      , "items" .= v1beta1VolumeAttachmentListItems
      , "kind" .= v1beta1VolumeAttachmentListKind
      , "metadata" .= v1beta1VolumeAttachmentListMetadata
      ]


-- | Construct a value of type 'V1beta1VolumeAttachmentList' (by applying it's required fields, if any)
mkV1beta1VolumeAttachmentList
  :: [V1beta1VolumeAttachment] -- ^ 'v1beta1VolumeAttachmentListItems': Items is the list of VolumeAttachments
  -> V1beta1VolumeAttachmentList
mkV1beta1VolumeAttachmentList v1beta1VolumeAttachmentListItems =
  V1beta1VolumeAttachmentList
  { v1beta1VolumeAttachmentListApiVersion = Nothing
  , v1beta1VolumeAttachmentListItems
  , v1beta1VolumeAttachmentListKind = Nothing
  , v1beta1VolumeAttachmentListMetadata = Nothing
  }

-- ** V1beta1VolumeAttachmentSource
-- | V1beta1VolumeAttachmentSource
-- VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.
data V1beta1VolumeAttachmentSource = V1beta1VolumeAttachmentSource
  { v1beta1VolumeAttachmentSourcePersistentVolumeName :: !(Maybe Text) -- ^ "persistentVolumeName" - Name of the persistent volume to attach.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1VolumeAttachmentSource
instance A.FromJSON V1beta1VolumeAttachmentSource where
  parseJSON = A.withObject "V1beta1VolumeAttachmentSource" $ \o ->
    V1beta1VolumeAttachmentSource
      <$> (o .:? "persistentVolumeName")

-- | ToJSON V1beta1VolumeAttachmentSource
instance A.ToJSON V1beta1VolumeAttachmentSource where
  toJSON V1beta1VolumeAttachmentSource {..} =
   _omitNulls
      [ "persistentVolumeName" .= v1beta1VolumeAttachmentSourcePersistentVolumeName
      ]


-- | Construct a value of type 'V1beta1VolumeAttachmentSource' (by applying it's required fields, if any)
mkV1beta1VolumeAttachmentSource
  :: V1beta1VolumeAttachmentSource
mkV1beta1VolumeAttachmentSource =
  V1beta1VolumeAttachmentSource
  { v1beta1VolumeAttachmentSourcePersistentVolumeName = Nothing
  }

-- ** V1beta1VolumeAttachmentSpec
-- | V1beta1VolumeAttachmentSpec
-- VolumeAttachmentSpec is the specification of a VolumeAttachment request.
data V1beta1VolumeAttachmentSpec = V1beta1VolumeAttachmentSpec
  { v1beta1VolumeAttachmentSpecAttacher :: !(Text) -- ^ /Required/ "attacher" - Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().
  , v1beta1VolumeAttachmentSpecNodeName :: !(Text) -- ^ /Required/ "nodeName" - The node that the volume should be attached to.
  , v1beta1VolumeAttachmentSpecSource :: !(V1beta1VolumeAttachmentSource) -- ^ /Required/ "source"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1VolumeAttachmentSpec
instance A.FromJSON V1beta1VolumeAttachmentSpec where
  parseJSON = A.withObject "V1beta1VolumeAttachmentSpec" $ \o ->
    V1beta1VolumeAttachmentSpec
      <$> (o .:  "attacher")
      <*> (o .:  "nodeName")
      <*> (o .:  "source")

-- | ToJSON V1beta1VolumeAttachmentSpec
instance A.ToJSON V1beta1VolumeAttachmentSpec where
  toJSON V1beta1VolumeAttachmentSpec {..} =
   _omitNulls
      [ "attacher" .= v1beta1VolumeAttachmentSpecAttacher
      , "nodeName" .= v1beta1VolumeAttachmentSpecNodeName
      , "source" .= v1beta1VolumeAttachmentSpecSource
      ]


-- | Construct a value of type 'V1beta1VolumeAttachmentSpec' (by applying it's required fields, if any)
mkV1beta1VolumeAttachmentSpec
  :: Text -- ^ 'v1beta1VolumeAttachmentSpecAttacher': Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().
  -> Text -- ^ 'v1beta1VolumeAttachmentSpecNodeName': The node that the volume should be attached to.
  -> V1beta1VolumeAttachmentSource -- ^ 'v1beta1VolumeAttachmentSpecSource' 
  -> V1beta1VolumeAttachmentSpec
mkV1beta1VolumeAttachmentSpec v1beta1VolumeAttachmentSpecAttacher v1beta1VolumeAttachmentSpecNodeName v1beta1VolumeAttachmentSpecSource =
  V1beta1VolumeAttachmentSpec
  { v1beta1VolumeAttachmentSpecAttacher
  , v1beta1VolumeAttachmentSpecNodeName
  , v1beta1VolumeAttachmentSpecSource
  }

-- ** V1beta1VolumeAttachmentStatus
-- | V1beta1VolumeAttachmentStatus
-- VolumeAttachmentStatus is the status of a VolumeAttachment request.
data V1beta1VolumeAttachmentStatus = V1beta1VolumeAttachmentStatus
  { v1beta1VolumeAttachmentStatusAttachError :: !(Maybe V1beta1VolumeError) -- ^ "attachError"
  , v1beta1VolumeAttachmentStatusAttached :: !(Bool) -- ^ /Required/ "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.
  , v1beta1VolumeAttachmentStatusAttachmentMetadata :: !(Maybe (Map.Map String Text)) -- ^ "attachmentMetadata" - Upon successful attach, this field is populated with any information returned by the attach operation 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.
  , v1beta1VolumeAttachmentStatusDetachError :: !(Maybe V1beta1VolumeError) -- ^ "detachError"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1VolumeAttachmentStatus
instance A.FromJSON V1beta1VolumeAttachmentStatus where
  parseJSON = A.withObject "V1beta1VolumeAttachmentStatus" $ \o ->
    V1beta1VolumeAttachmentStatus
      <$> (o .:? "attachError")
      <*> (o .:  "attached")
      <*> (o .:? "attachmentMetadata")
      <*> (o .:? "detachError")

-- | ToJSON V1beta1VolumeAttachmentStatus
instance A.ToJSON V1beta1VolumeAttachmentStatus where
  toJSON V1beta1VolumeAttachmentStatus {..} =
   _omitNulls
      [ "attachError" .= v1beta1VolumeAttachmentStatusAttachError
      , "attached" .= v1beta1VolumeAttachmentStatusAttached
      , "attachmentMetadata" .= v1beta1VolumeAttachmentStatusAttachmentMetadata
      , "detachError" .= v1beta1VolumeAttachmentStatusDetachError
      ]


-- | Construct a value of type 'V1beta1VolumeAttachmentStatus' (by applying it's required fields, if any)
mkV1beta1VolumeAttachmentStatus
  :: Bool -- ^ 'v1beta1VolumeAttachmentStatusAttached': Indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.
  -> V1beta1VolumeAttachmentStatus
mkV1beta1VolumeAttachmentStatus v1beta1VolumeAttachmentStatusAttached =
  V1beta1VolumeAttachmentStatus
  { v1beta1VolumeAttachmentStatusAttachError = Nothing
  , v1beta1VolumeAttachmentStatusAttached
  , v1beta1VolumeAttachmentStatusAttachmentMetadata = Nothing
  , v1beta1VolumeAttachmentStatusDetachError = Nothing
  }

-- ** V1beta1VolumeError
-- | V1beta1VolumeError
-- VolumeError captures an error encountered during a volume operation.
data V1beta1VolumeError = V1beta1VolumeError
  { v1beta1VolumeErrorMessage :: !(Maybe Text) -- ^ "message" - String detailing the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information.
  , v1beta1VolumeErrorTime :: !(Maybe DateTime) -- ^ "time" - Time the error was encountered.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1VolumeError
instance A.FromJSON V1beta1VolumeError where
  parseJSON = A.withObject "V1beta1VolumeError" $ \o ->
    V1beta1VolumeError
      <$> (o .:? "message")
      <*> (o .:? "time")

-- | ToJSON V1beta1VolumeError
instance A.ToJSON V1beta1VolumeError where
  toJSON V1beta1VolumeError {..} =
   _omitNulls
      [ "message" .= v1beta1VolumeErrorMessage
      , "time" .= v1beta1VolumeErrorTime
      ]


-- | Construct a value of type 'V1beta1VolumeError' (by applying it's required fields, if any)
mkV1beta1VolumeError
  :: V1beta1VolumeError
mkV1beta1VolumeError =
  V1beta1VolumeError
  { v1beta1VolumeErrorMessage = Nothing
  , v1beta1VolumeErrorTime = Nothing
  }

-- ** V1beta1Webhook
-- | V1beta1Webhook
-- Webhook describes an admission webhook and the resources and operations it applies to.
data V1beta1Webhook = V1beta1Webhook
  { v1beta1WebhookAdmissionReviewVersions :: !(Maybe [Text]) -- ^ "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. Default to &#x60;[&#39;v1beta1&#39;]&#x60;.
  , v1beta1WebhookClientConfig :: !(AdmissionregistrationV1beta1WebhookClientConfig) -- ^ /Required/ "clientConfig"
  , v1beta1WebhookFailurePolicy :: !(Maybe Text) -- ^ "failurePolicy" - FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Ignore.
  , v1beta1WebhookName :: !(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.
  , v1beta1WebhookNamespaceSelector :: !(Maybe V1LabelSelector) -- ^ "namespaceSelector"
  , v1beta1WebhookRules :: !(Maybe [V1beta1RuleWithOperations]) -- ^ "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.
  , v1beta1WebhookSideEffects :: !(Maybe Text) -- ^ "sideEffects" - SideEffects states whether this webhookk has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change 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. Defaults to Unknown.
  , v1beta1WebhookTimeoutSeconds :: !(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 30 seconds.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta1Webhook
instance A.FromJSON V1beta1Webhook where
  parseJSON = A.withObject "V1beta1Webhook" $ \o ->
    V1beta1Webhook
      <$> (o .:? "admissionReviewVersions")
      <*> (o .:  "clientConfig")
      <*> (o .:? "failurePolicy")
      <*> (o .:  "name")
      <*> (o .:? "namespaceSelector")
      <*> (o .:? "rules")
      <*> (o .:? "sideEffects")
      <*> (o .:? "timeoutSeconds")

-- | ToJSON V1beta1Webhook
instance A.ToJSON V1beta1Webhook where
  toJSON V1beta1Webhook {..} =
   _omitNulls
      [ "admissionReviewVersions" .= v1beta1WebhookAdmissionReviewVersions
      , "clientConfig" .= v1beta1WebhookClientConfig
      , "failurePolicy" .= v1beta1WebhookFailurePolicy
      , "name" .= v1beta1WebhookName
      , "namespaceSelector" .= v1beta1WebhookNamespaceSelector
      , "rules" .= v1beta1WebhookRules
      , "sideEffects" .= v1beta1WebhookSideEffects
      , "timeoutSeconds" .= v1beta1WebhookTimeoutSeconds
      ]


-- | Construct a value of type 'V1beta1Webhook' (by applying it's required fields, if any)
mkV1beta1Webhook
  :: AdmissionregistrationV1beta1WebhookClientConfig -- ^ 'v1beta1WebhookClientConfig' 
  -> Text -- ^ 'v1beta1WebhookName': 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.
  -> V1beta1Webhook
mkV1beta1Webhook v1beta1WebhookClientConfig v1beta1WebhookName =
  V1beta1Webhook
  { v1beta1WebhookAdmissionReviewVersions = Nothing
  , v1beta1WebhookClientConfig
  , v1beta1WebhookFailurePolicy = Nothing
  , v1beta1WebhookName
  , v1beta1WebhookNamespaceSelector = Nothing
  , v1beta1WebhookRules = Nothing
  , v1beta1WebhookSideEffects = Nothing
  , v1beta1WebhookTimeoutSeconds = Nothing
  }

-- ** V1beta2ControllerRevision
-- | V1beta2ControllerRevision
-- DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1/ControllerRevision. See the release notes for more information. 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 V1beta2ControllerRevision = V1beta2ControllerRevision
  { v1beta2ControllerRevisionApiVersion :: !(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/api-conventions.md#resources
  , v1beta2ControllerRevisionData :: !(Maybe RuntimeRawExtension) -- ^ "data"
  , v1beta2ControllerRevisionKind :: !(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/api-conventions.md#types-kinds
  , v1beta2ControllerRevisionMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta2ControllerRevisionRevision :: !(Integer) -- ^ /Required/ "revision" - Revision indicates the revision of the state represented by Data.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta2ControllerRevision
instance A.FromJSON V1beta2ControllerRevision where
  parseJSON = A.withObject "V1beta2ControllerRevision" $ \o ->
    V1beta2ControllerRevision
      <$> (o .:? "apiVersion")
      <*> (o .:? "data")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:  "revision")

-- | ToJSON V1beta2ControllerRevision
instance A.ToJSON V1beta2ControllerRevision where
  toJSON V1beta2ControllerRevision {..} =
   _omitNulls
      [ "apiVersion" .= v1beta2ControllerRevisionApiVersion
      , "data" .= v1beta2ControllerRevisionData
      , "kind" .= v1beta2ControllerRevisionKind
      , "metadata" .= v1beta2ControllerRevisionMetadata
      , "revision" .= v1beta2ControllerRevisionRevision
      ]


-- | Construct a value of type 'V1beta2ControllerRevision' (by applying it's required fields, if any)
mkV1beta2ControllerRevision
  :: Integer -- ^ 'v1beta2ControllerRevisionRevision': Revision indicates the revision of the state represented by Data.
  -> V1beta2ControllerRevision
mkV1beta2ControllerRevision v1beta2ControllerRevisionRevision =
  V1beta2ControllerRevision
  { v1beta2ControllerRevisionApiVersion = Nothing
  , v1beta2ControllerRevisionData = Nothing
  , v1beta2ControllerRevisionKind = Nothing
  , v1beta2ControllerRevisionMetadata = Nothing
  , v1beta2ControllerRevisionRevision
  }

-- ** V1beta2ControllerRevisionList
-- | V1beta2ControllerRevisionList
-- ControllerRevisionList is a resource containing a list of ControllerRevision objects.
data V1beta2ControllerRevisionList = V1beta2ControllerRevisionList
  { v1beta2ControllerRevisionListApiVersion :: !(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/api-conventions.md#resources
  , v1beta2ControllerRevisionListItems :: !([V1beta2ControllerRevision]) -- ^ /Required/ "items" - Items is the list of ControllerRevisions
  , v1beta2ControllerRevisionListKind :: !(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/api-conventions.md#types-kinds
  , v1beta2ControllerRevisionListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta2ControllerRevisionList
instance A.FromJSON V1beta2ControllerRevisionList where
  parseJSON = A.withObject "V1beta2ControllerRevisionList" $ \o ->
    V1beta2ControllerRevisionList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1beta2ControllerRevisionList
instance A.ToJSON V1beta2ControllerRevisionList where
  toJSON V1beta2ControllerRevisionList {..} =
   _omitNulls
      [ "apiVersion" .= v1beta2ControllerRevisionListApiVersion
      , "items" .= v1beta2ControllerRevisionListItems
      , "kind" .= v1beta2ControllerRevisionListKind
      , "metadata" .= v1beta2ControllerRevisionListMetadata
      ]


-- | Construct a value of type 'V1beta2ControllerRevisionList' (by applying it's required fields, if any)
mkV1beta2ControllerRevisionList
  :: [V1beta2ControllerRevision] -- ^ 'v1beta2ControllerRevisionListItems': Items is the list of ControllerRevisions
  -> V1beta2ControllerRevisionList
mkV1beta2ControllerRevisionList v1beta2ControllerRevisionListItems =
  V1beta2ControllerRevisionList
  { v1beta2ControllerRevisionListApiVersion = Nothing
  , v1beta2ControllerRevisionListItems
  , v1beta2ControllerRevisionListKind = Nothing
  , v1beta2ControllerRevisionListMetadata = Nothing
  }

-- ** V1beta2DaemonSet
-- | V1beta2DaemonSet
-- DEPRECATED - This group version of DaemonSet is deprecated by apps/v1/DaemonSet. See the release notes for more information. DaemonSet represents the configuration of a daemon set.
data V1beta2DaemonSet = V1beta2DaemonSet
  { v1beta2DaemonSetApiVersion :: !(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/api-conventions.md#resources
  , v1beta2DaemonSetKind :: !(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/api-conventions.md#types-kinds
  , v1beta2DaemonSetMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta2DaemonSetSpec :: !(Maybe V1beta2DaemonSetSpec) -- ^ "spec"
  , v1beta2DaemonSetStatus :: !(Maybe V1beta2DaemonSetStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta2DaemonSet
instance A.FromJSON V1beta2DaemonSet where
  parseJSON = A.withObject "V1beta2DaemonSet" $ \o ->
    V1beta2DaemonSet
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON V1beta2DaemonSet
instance A.ToJSON V1beta2DaemonSet where
  toJSON V1beta2DaemonSet {..} =
   _omitNulls
      [ "apiVersion" .= v1beta2DaemonSetApiVersion
      , "kind" .= v1beta2DaemonSetKind
      , "metadata" .= v1beta2DaemonSetMetadata
      , "spec" .= v1beta2DaemonSetSpec
      , "status" .= v1beta2DaemonSetStatus
      ]


-- | Construct a value of type 'V1beta2DaemonSet' (by applying it's required fields, if any)
mkV1beta2DaemonSet
  :: V1beta2DaemonSet
mkV1beta2DaemonSet =
  V1beta2DaemonSet
  { v1beta2DaemonSetApiVersion = Nothing
  , v1beta2DaemonSetKind = Nothing
  , v1beta2DaemonSetMetadata = Nothing
  , v1beta2DaemonSetSpec = Nothing
  , v1beta2DaemonSetStatus = Nothing
  }

-- ** V1beta2DaemonSetCondition
-- | V1beta2DaemonSetCondition
-- DaemonSetCondition describes the state of a DaemonSet at a certain point.
data V1beta2DaemonSetCondition = V1beta2DaemonSetCondition
  { v1beta2DaemonSetConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - Last time the condition transitioned from one status to another.
  , v1beta2DaemonSetConditionMessage :: !(Maybe Text) -- ^ "message" - A human readable message indicating details about the transition.
  , v1beta2DaemonSetConditionReason :: !(Maybe Text) -- ^ "reason" - The reason for the condition&#39;s last transition.
  , v1beta2DaemonSetConditionStatus :: !(Text) -- ^ /Required/ "status" - Status of the condition, one of True, False, Unknown.
  , v1beta2DaemonSetConditionType :: !(Text) -- ^ /Required/ "type" - Type of DaemonSet condition.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta2DaemonSetCondition
instance A.FromJSON V1beta2DaemonSetCondition where
  parseJSON = A.withObject "V1beta2DaemonSetCondition" $ \o ->
    V1beta2DaemonSetCondition
      <$> (o .:? "lastTransitionTime")
      <*> (o .:? "message")
      <*> (o .:? "reason")
      <*> (o .:  "status")
      <*> (o .:  "type")

-- | ToJSON V1beta2DaemonSetCondition
instance A.ToJSON V1beta2DaemonSetCondition where
  toJSON V1beta2DaemonSetCondition {..} =
   _omitNulls
      [ "lastTransitionTime" .= v1beta2DaemonSetConditionLastTransitionTime
      , "message" .= v1beta2DaemonSetConditionMessage
      , "reason" .= v1beta2DaemonSetConditionReason
      , "status" .= v1beta2DaemonSetConditionStatus
      , "type" .= v1beta2DaemonSetConditionType
      ]


-- | Construct a value of type 'V1beta2DaemonSetCondition' (by applying it's required fields, if any)
mkV1beta2DaemonSetCondition
  :: Text -- ^ 'v1beta2DaemonSetConditionStatus': Status of the condition, one of True, False, Unknown.
  -> Text -- ^ 'v1beta2DaemonSetConditionType': Type of DaemonSet condition.
  -> V1beta2DaemonSetCondition
mkV1beta2DaemonSetCondition v1beta2DaemonSetConditionStatus v1beta2DaemonSetConditionType =
  V1beta2DaemonSetCondition
  { v1beta2DaemonSetConditionLastTransitionTime = Nothing
  , v1beta2DaemonSetConditionMessage = Nothing
  , v1beta2DaemonSetConditionReason = Nothing
  , v1beta2DaemonSetConditionStatus
  , v1beta2DaemonSetConditionType
  }

-- ** V1beta2DaemonSetList
-- | V1beta2DaemonSetList
-- DaemonSetList is a collection of daemon sets.
data V1beta2DaemonSetList = V1beta2DaemonSetList
  { v1beta2DaemonSetListApiVersion :: !(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/api-conventions.md#resources
  , v1beta2DaemonSetListItems :: !([V1beta2DaemonSet]) -- ^ /Required/ "items" - A list of daemon sets.
  , v1beta2DaemonSetListKind :: !(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/api-conventions.md#types-kinds
  , v1beta2DaemonSetListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta2DaemonSetList
instance A.FromJSON V1beta2DaemonSetList where
  parseJSON = A.withObject "V1beta2DaemonSetList" $ \o ->
    V1beta2DaemonSetList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1beta2DaemonSetList
instance A.ToJSON V1beta2DaemonSetList where
  toJSON V1beta2DaemonSetList {..} =
   _omitNulls
      [ "apiVersion" .= v1beta2DaemonSetListApiVersion
      , "items" .= v1beta2DaemonSetListItems
      , "kind" .= v1beta2DaemonSetListKind
      , "metadata" .= v1beta2DaemonSetListMetadata
      ]


-- | Construct a value of type 'V1beta2DaemonSetList' (by applying it's required fields, if any)
mkV1beta2DaemonSetList
  :: [V1beta2DaemonSet] -- ^ 'v1beta2DaemonSetListItems': A list of daemon sets.
  -> V1beta2DaemonSetList
mkV1beta2DaemonSetList v1beta2DaemonSetListItems =
  V1beta2DaemonSetList
  { v1beta2DaemonSetListApiVersion = Nothing
  , v1beta2DaemonSetListItems
  , v1beta2DaemonSetListKind = Nothing
  , v1beta2DaemonSetListMetadata = Nothing
  }

-- ** V1beta2DaemonSetSpec
-- | V1beta2DaemonSetSpec
-- DaemonSetSpec is the specification of a daemon set.
data V1beta2DaemonSetSpec = V1beta2DaemonSetSpec
  { v1beta2DaemonSetSpecMinReadySeconds :: !(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).
  , v1beta2DaemonSetSpecRevisionHistoryLimit :: !(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.
  , v1beta2DaemonSetSpecSelector :: !(V1LabelSelector) -- ^ /Required/ "selector"
  , v1beta2DaemonSetSpecTemplate :: !(V1PodTemplateSpec) -- ^ /Required/ "template"
  , v1beta2DaemonSetSpecUpdateStrategy :: !(Maybe V1beta2DaemonSetUpdateStrategy) -- ^ "updateStrategy"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta2DaemonSetSpec
instance A.FromJSON V1beta2DaemonSetSpec where
  parseJSON = A.withObject "V1beta2DaemonSetSpec" $ \o ->
    V1beta2DaemonSetSpec
      <$> (o .:? "minReadySeconds")
      <*> (o .:? "revisionHistoryLimit")
      <*> (o .:  "selector")
      <*> (o .:  "template")
      <*> (o .:? "updateStrategy")

-- | ToJSON V1beta2DaemonSetSpec
instance A.ToJSON V1beta2DaemonSetSpec where
  toJSON V1beta2DaemonSetSpec {..} =
   _omitNulls
      [ "minReadySeconds" .= v1beta2DaemonSetSpecMinReadySeconds
      , "revisionHistoryLimit" .= v1beta2DaemonSetSpecRevisionHistoryLimit
      , "selector" .= v1beta2DaemonSetSpecSelector
      , "template" .= v1beta2DaemonSetSpecTemplate
      , "updateStrategy" .= v1beta2DaemonSetSpecUpdateStrategy
      ]


-- | Construct a value of type 'V1beta2DaemonSetSpec' (by applying it's required fields, if any)
mkV1beta2DaemonSetSpec
  :: V1LabelSelector -- ^ 'v1beta2DaemonSetSpecSelector' 
  -> V1PodTemplateSpec -- ^ 'v1beta2DaemonSetSpecTemplate' 
  -> V1beta2DaemonSetSpec
mkV1beta2DaemonSetSpec v1beta2DaemonSetSpecSelector v1beta2DaemonSetSpecTemplate =
  V1beta2DaemonSetSpec
  { v1beta2DaemonSetSpecMinReadySeconds = Nothing
  , v1beta2DaemonSetSpecRevisionHistoryLimit = Nothing
  , v1beta2DaemonSetSpecSelector
  , v1beta2DaemonSetSpecTemplate
  , v1beta2DaemonSetSpecUpdateStrategy = Nothing
  }

-- ** V1beta2DaemonSetStatus
-- | V1beta2DaemonSetStatus
-- DaemonSetStatus represents the current status of a daemon set.
data V1beta2DaemonSetStatus = V1beta2DaemonSetStatus
  { v1beta2DaemonSetStatusCollisionCount :: !(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.
  , v1beta2DaemonSetStatusConditions :: !(Maybe [V1beta2DaemonSetCondition]) -- ^ "conditions" - Represents the latest available observations of a DaemonSet&#39;s current state.
  , v1beta2DaemonSetStatusCurrentNumberScheduled :: !(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/
  , v1beta2DaemonSetStatusDesiredNumberScheduled :: !(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/
  , v1beta2DaemonSetStatusNumberAvailable :: !(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)
  , v1beta2DaemonSetStatusNumberMisscheduled :: !(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/
  , v1beta2DaemonSetStatusNumberReady :: !(Int) -- ^ /Required/ "numberReady" - The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready.
  , v1beta2DaemonSetStatusNumberUnavailable :: !(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)
  , v1beta2DaemonSetStatusObservedGeneration :: !(Maybe Integer) -- ^ "observedGeneration" - The most recent generation observed by the daemon set controller.
  , v1beta2DaemonSetStatusUpdatedNumberScheduled :: !(Maybe Int) -- ^ "updatedNumberScheduled" - The total number of nodes that are running updated daemon pod
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta2DaemonSetStatus
instance A.FromJSON V1beta2DaemonSetStatus where
  parseJSON = A.withObject "V1beta2DaemonSetStatus" $ \o ->
    V1beta2DaemonSetStatus
      <$> (o .:? "collisionCount")
      <*> (o .:? "conditions")
      <*> (o .:  "currentNumberScheduled")
      <*> (o .:  "desiredNumberScheduled")
      <*> (o .:? "numberAvailable")
      <*> (o .:  "numberMisscheduled")
      <*> (o .:  "numberReady")
      <*> (o .:? "numberUnavailable")
      <*> (o .:? "observedGeneration")
      <*> (o .:? "updatedNumberScheduled")

-- | ToJSON V1beta2DaemonSetStatus
instance A.ToJSON V1beta2DaemonSetStatus where
  toJSON V1beta2DaemonSetStatus {..} =
   _omitNulls
      [ "collisionCount" .= v1beta2DaemonSetStatusCollisionCount
      , "conditions" .= v1beta2DaemonSetStatusConditions
      , "currentNumberScheduled" .= v1beta2DaemonSetStatusCurrentNumberScheduled
      , "desiredNumberScheduled" .= v1beta2DaemonSetStatusDesiredNumberScheduled
      , "numberAvailable" .= v1beta2DaemonSetStatusNumberAvailable
      , "numberMisscheduled" .= v1beta2DaemonSetStatusNumberMisscheduled
      , "numberReady" .= v1beta2DaemonSetStatusNumberReady
      , "numberUnavailable" .= v1beta2DaemonSetStatusNumberUnavailable
      , "observedGeneration" .= v1beta2DaemonSetStatusObservedGeneration
      , "updatedNumberScheduled" .= v1beta2DaemonSetStatusUpdatedNumberScheduled
      ]


-- | Construct a value of type 'V1beta2DaemonSetStatus' (by applying it's required fields, if any)
mkV1beta2DaemonSetStatus
  :: Int -- ^ 'v1beta2DaemonSetStatusCurrentNumberScheduled': 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 -- ^ 'v1beta2DaemonSetStatusDesiredNumberScheduled': 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 -- ^ 'v1beta2DaemonSetStatusNumberMisscheduled': 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 -- ^ 'v1beta2DaemonSetStatusNumberReady': The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready.
  -> V1beta2DaemonSetStatus
mkV1beta2DaemonSetStatus v1beta2DaemonSetStatusCurrentNumberScheduled v1beta2DaemonSetStatusDesiredNumberScheduled v1beta2DaemonSetStatusNumberMisscheduled v1beta2DaemonSetStatusNumberReady =
  V1beta2DaemonSetStatus
  { v1beta2DaemonSetStatusCollisionCount = Nothing
  , v1beta2DaemonSetStatusConditions = Nothing
  , v1beta2DaemonSetStatusCurrentNumberScheduled
  , v1beta2DaemonSetStatusDesiredNumberScheduled
  , v1beta2DaemonSetStatusNumberAvailable = Nothing
  , v1beta2DaemonSetStatusNumberMisscheduled
  , v1beta2DaemonSetStatusNumberReady
  , v1beta2DaemonSetStatusNumberUnavailable = Nothing
  , v1beta2DaemonSetStatusObservedGeneration = Nothing
  , v1beta2DaemonSetStatusUpdatedNumberScheduled = Nothing
  }

-- ** V1beta2DaemonSetUpdateStrategy
-- | V1beta2DaemonSetUpdateStrategy
-- DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.
data V1beta2DaemonSetUpdateStrategy = V1beta2DaemonSetUpdateStrategy
  { v1beta2DaemonSetUpdateStrategyRollingUpdate :: !(Maybe V1beta2RollingUpdateDaemonSet) -- ^ "rollingUpdate"
  , v1beta2DaemonSetUpdateStrategyType :: !(Maybe Text) -- ^ "type" - Type of daemon set update. Can be \&quot;RollingUpdate\&quot; or \&quot;OnDelete\&quot;. Default is RollingUpdate.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta2DaemonSetUpdateStrategy
instance A.FromJSON V1beta2DaemonSetUpdateStrategy where
  parseJSON = A.withObject "V1beta2DaemonSetUpdateStrategy" $ \o ->
    V1beta2DaemonSetUpdateStrategy
      <$> (o .:? "rollingUpdate")
      <*> (o .:? "type")

-- | ToJSON V1beta2DaemonSetUpdateStrategy
instance A.ToJSON V1beta2DaemonSetUpdateStrategy where
  toJSON V1beta2DaemonSetUpdateStrategy {..} =
   _omitNulls
      [ "rollingUpdate" .= v1beta2DaemonSetUpdateStrategyRollingUpdate
      , "type" .= v1beta2DaemonSetUpdateStrategyType
      ]


-- | Construct a value of type 'V1beta2DaemonSetUpdateStrategy' (by applying it's required fields, if any)
mkV1beta2DaemonSetUpdateStrategy
  :: V1beta2DaemonSetUpdateStrategy
mkV1beta2DaemonSetUpdateStrategy =
  V1beta2DaemonSetUpdateStrategy
  { v1beta2DaemonSetUpdateStrategyRollingUpdate = Nothing
  , v1beta2DaemonSetUpdateStrategyType = Nothing
  }

-- ** V1beta2Deployment
-- | V1beta2Deployment
-- DEPRECATED - This group version of Deployment is deprecated by apps/v1/Deployment. See the release notes for more information. Deployment enables declarative updates for Pods and ReplicaSets.
data V1beta2Deployment = V1beta2Deployment
  { v1beta2DeploymentApiVersion :: !(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/api-conventions.md#resources
  , v1beta2DeploymentKind :: !(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/api-conventions.md#types-kinds
  , v1beta2DeploymentMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta2DeploymentSpec :: !(Maybe V1beta2DeploymentSpec) -- ^ "spec"
  , v1beta2DeploymentStatus :: !(Maybe V1beta2DeploymentStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta2Deployment
instance A.FromJSON V1beta2Deployment where
  parseJSON = A.withObject "V1beta2Deployment" $ \o ->
    V1beta2Deployment
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON V1beta2Deployment
instance A.ToJSON V1beta2Deployment where
  toJSON V1beta2Deployment {..} =
   _omitNulls
      [ "apiVersion" .= v1beta2DeploymentApiVersion
      , "kind" .= v1beta2DeploymentKind
      , "metadata" .= v1beta2DeploymentMetadata
      , "spec" .= v1beta2DeploymentSpec
      , "status" .= v1beta2DeploymentStatus
      ]


-- | Construct a value of type 'V1beta2Deployment' (by applying it's required fields, if any)
mkV1beta2Deployment
  :: V1beta2Deployment
mkV1beta2Deployment =
  V1beta2Deployment
  { v1beta2DeploymentApiVersion = Nothing
  , v1beta2DeploymentKind = Nothing
  , v1beta2DeploymentMetadata = Nothing
  , v1beta2DeploymentSpec = Nothing
  , v1beta2DeploymentStatus = Nothing
  }

-- ** V1beta2DeploymentCondition
-- | V1beta2DeploymentCondition
-- DeploymentCondition describes the state of a deployment at a certain point.
data V1beta2DeploymentCondition = V1beta2DeploymentCondition
  { v1beta2DeploymentConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - Last time the condition transitioned from one status to another.
  , v1beta2DeploymentConditionLastUpdateTime :: !(Maybe DateTime) -- ^ "lastUpdateTime" - The last time this condition was updated.
  , v1beta2DeploymentConditionMessage :: !(Maybe Text) -- ^ "message" - A human readable message indicating details about the transition.
  , v1beta2DeploymentConditionReason :: !(Maybe Text) -- ^ "reason" - The reason for the condition&#39;s last transition.
  , v1beta2DeploymentConditionStatus :: !(Text) -- ^ /Required/ "status" - Status of the condition, one of True, False, Unknown.
  , v1beta2DeploymentConditionType :: !(Text) -- ^ /Required/ "type" - Type of deployment condition.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta2DeploymentCondition
instance A.FromJSON V1beta2DeploymentCondition where
  parseJSON = A.withObject "V1beta2DeploymentCondition" $ \o ->
    V1beta2DeploymentCondition
      <$> (o .:? "lastTransitionTime")
      <*> (o .:? "lastUpdateTime")
      <*> (o .:? "message")
      <*> (o .:? "reason")
      <*> (o .:  "status")
      <*> (o .:  "type")

-- | ToJSON V1beta2DeploymentCondition
instance A.ToJSON V1beta2DeploymentCondition where
  toJSON V1beta2DeploymentCondition {..} =
   _omitNulls
      [ "lastTransitionTime" .= v1beta2DeploymentConditionLastTransitionTime
      , "lastUpdateTime" .= v1beta2DeploymentConditionLastUpdateTime
      , "message" .= v1beta2DeploymentConditionMessage
      , "reason" .= v1beta2DeploymentConditionReason
      , "status" .= v1beta2DeploymentConditionStatus
      , "type" .= v1beta2DeploymentConditionType
      ]


-- | Construct a value of type 'V1beta2DeploymentCondition' (by applying it's required fields, if any)
mkV1beta2DeploymentCondition
  :: Text -- ^ 'v1beta2DeploymentConditionStatus': Status of the condition, one of True, False, Unknown.
  -> Text -- ^ 'v1beta2DeploymentConditionType': Type of deployment condition.
  -> V1beta2DeploymentCondition
mkV1beta2DeploymentCondition v1beta2DeploymentConditionStatus v1beta2DeploymentConditionType =
  V1beta2DeploymentCondition
  { v1beta2DeploymentConditionLastTransitionTime = Nothing
  , v1beta2DeploymentConditionLastUpdateTime = Nothing
  , v1beta2DeploymentConditionMessage = Nothing
  , v1beta2DeploymentConditionReason = Nothing
  , v1beta2DeploymentConditionStatus
  , v1beta2DeploymentConditionType
  }

-- ** V1beta2DeploymentList
-- | V1beta2DeploymentList
-- DeploymentList is a list of Deployments.
data V1beta2DeploymentList = V1beta2DeploymentList
  { v1beta2DeploymentListApiVersion :: !(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/api-conventions.md#resources
  , v1beta2DeploymentListItems :: !([V1beta2Deployment]) -- ^ /Required/ "items" - Items is the list of Deployments.
  , v1beta2DeploymentListKind :: !(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/api-conventions.md#types-kinds
  , v1beta2DeploymentListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta2DeploymentList
instance A.FromJSON V1beta2DeploymentList where
  parseJSON = A.withObject "V1beta2DeploymentList" $ \o ->
    V1beta2DeploymentList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1beta2DeploymentList
instance A.ToJSON V1beta2DeploymentList where
  toJSON V1beta2DeploymentList {..} =
   _omitNulls
      [ "apiVersion" .= v1beta2DeploymentListApiVersion
      , "items" .= v1beta2DeploymentListItems
      , "kind" .= v1beta2DeploymentListKind
      , "metadata" .= v1beta2DeploymentListMetadata
      ]


-- | Construct a value of type 'V1beta2DeploymentList' (by applying it's required fields, if any)
mkV1beta2DeploymentList
  :: [V1beta2Deployment] -- ^ 'v1beta2DeploymentListItems': Items is the list of Deployments.
  -> V1beta2DeploymentList
mkV1beta2DeploymentList v1beta2DeploymentListItems =
  V1beta2DeploymentList
  { v1beta2DeploymentListApiVersion = Nothing
  , v1beta2DeploymentListItems
  , v1beta2DeploymentListKind = Nothing
  , v1beta2DeploymentListMetadata = Nothing
  }

-- ** V1beta2DeploymentSpec
-- | V1beta2DeploymentSpec
-- DeploymentSpec is the specification of the desired behavior of the Deployment.
data V1beta2DeploymentSpec = V1beta2DeploymentSpec
  { v1beta2DeploymentSpecMinReadySeconds :: !(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)
  , v1beta2DeploymentSpecPaused :: !(Maybe Bool) -- ^ "paused" - Indicates that the deployment is paused.
  , v1beta2DeploymentSpecProgressDeadlineSeconds :: !(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.
  , v1beta2DeploymentSpecReplicas :: !(Maybe Int) -- ^ "replicas" - Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.
  , v1beta2DeploymentSpecRevisionHistoryLimit :: !(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.
  , v1beta2DeploymentSpecSelector :: !(V1LabelSelector) -- ^ /Required/ "selector"
  , v1beta2DeploymentSpecStrategy :: !(Maybe V1beta2DeploymentStrategy) -- ^ "strategy"
  , v1beta2DeploymentSpecTemplate :: !(V1PodTemplateSpec) -- ^ /Required/ "template"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta2DeploymentSpec
instance A.FromJSON V1beta2DeploymentSpec where
  parseJSON = A.withObject "V1beta2DeploymentSpec" $ \o ->
    V1beta2DeploymentSpec
      <$> (o .:? "minReadySeconds")
      <*> (o .:? "paused")
      <*> (o .:? "progressDeadlineSeconds")
      <*> (o .:? "replicas")
      <*> (o .:? "revisionHistoryLimit")
      <*> (o .:  "selector")
      <*> (o .:? "strategy")
      <*> (o .:  "template")

-- | ToJSON V1beta2DeploymentSpec
instance A.ToJSON V1beta2DeploymentSpec where
  toJSON V1beta2DeploymentSpec {..} =
   _omitNulls
      [ "minReadySeconds" .= v1beta2DeploymentSpecMinReadySeconds
      , "paused" .= v1beta2DeploymentSpecPaused
      , "progressDeadlineSeconds" .= v1beta2DeploymentSpecProgressDeadlineSeconds
      , "replicas" .= v1beta2DeploymentSpecReplicas
      , "revisionHistoryLimit" .= v1beta2DeploymentSpecRevisionHistoryLimit
      , "selector" .= v1beta2DeploymentSpecSelector
      , "strategy" .= v1beta2DeploymentSpecStrategy
      , "template" .= v1beta2DeploymentSpecTemplate
      ]


-- | Construct a value of type 'V1beta2DeploymentSpec' (by applying it's required fields, if any)
mkV1beta2DeploymentSpec
  :: V1LabelSelector -- ^ 'v1beta2DeploymentSpecSelector' 
  -> V1PodTemplateSpec -- ^ 'v1beta2DeploymentSpecTemplate' 
  -> V1beta2DeploymentSpec
mkV1beta2DeploymentSpec v1beta2DeploymentSpecSelector v1beta2DeploymentSpecTemplate =
  V1beta2DeploymentSpec
  { v1beta2DeploymentSpecMinReadySeconds = Nothing
  , v1beta2DeploymentSpecPaused = Nothing
  , v1beta2DeploymentSpecProgressDeadlineSeconds = Nothing
  , v1beta2DeploymentSpecReplicas = Nothing
  , v1beta2DeploymentSpecRevisionHistoryLimit = Nothing
  , v1beta2DeploymentSpecSelector
  , v1beta2DeploymentSpecStrategy = Nothing
  , v1beta2DeploymentSpecTemplate
  }

-- ** V1beta2DeploymentStatus
-- | V1beta2DeploymentStatus
-- DeploymentStatus is the most recently observed status of the Deployment.
data V1beta2DeploymentStatus = V1beta2DeploymentStatus
  { v1beta2DeploymentStatusAvailableReplicas :: !(Maybe Int) -- ^ "availableReplicas" - Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
  , v1beta2DeploymentStatusCollisionCount :: !(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.
  , v1beta2DeploymentStatusConditions :: !(Maybe [V1beta2DeploymentCondition]) -- ^ "conditions" - Represents the latest available observations of a deployment&#39;s current state.
  , v1beta2DeploymentStatusObservedGeneration :: !(Maybe Integer) -- ^ "observedGeneration" - The generation observed by the deployment controller.
  , v1beta2DeploymentStatusReadyReplicas :: !(Maybe Int) -- ^ "readyReplicas" - Total number of ready pods targeted by this deployment.
  , v1beta2DeploymentStatusReplicas :: !(Maybe Int) -- ^ "replicas" - Total number of non-terminated pods targeted by this deployment (their labels match the selector).
  , v1beta2DeploymentStatusUnavailableReplicas :: !(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.
  , v1beta2DeploymentStatusUpdatedReplicas :: !(Maybe Int) -- ^ "updatedReplicas" - Total number of non-terminated pods targeted by this deployment that have the desired template spec.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta2DeploymentStatus
instance A.FromJSON V1beta2DeploymentStatus where
  parseJSON = A.withObject "V1beta2DeploymentStatus" $ \o ->
    V1beta2DeploymentStatus
      <$> (o .:? "availableReplicas")
      <*> (o .:? "collisionCount")
      <*> (o .:? "conditions")
      <*> (o .:? "observedGeneration")
      <*> (o .:? "readyReplicas")
      <*> (o .:? "replicas")
      <*> (o .:? "unavailableReplicas")
      <*> (o .:? "updatedReplicas")

-- | ToJSON V1beta2DeploymentStatus
instance A.ToJSON V1beta2DeploymentStatus where
  toJSON V1beta2DeploymentStatus {..} =
   _omitNulls
      [ "availableReplicas" .= v1beta2DeploymentStatusAvailableReplicas
      , "collisionCount" .= v1beta2DeploymentStatusCollisionCount
      , "conditions" .= v1beta2DeploymentStatusConditions
      , "observedGeneration" .= v1beta2DeploymentStatusObservedGeneration
      , "readyReplicas" .= v1beta2DeploymentStatusReadyReplicas
      , "replicas" .= v1beta2DeploymentStatusReplicas
      , "unavailableReplicas" .= v1beta2DeploymentStatusUnavailableReplicas
      , "updatedReplicas" .= v1beta2DeploymentStatusUpdatedReplicas
      ]


-- | Construct a value of type 'V1beta2DeploymentStatus' (by applying it's required fields, if any)
mkV1beta2DeploymentStatus
  :: V1beta2DeploymentStatus
mkV1beta2DeploymentStatus =
  V1beta2DeploymentStatus
  { v1beta2DeploymentStatusAvailableReplicas = Nothing
  , v1beta2DeploymentStatusCollisionCount = Nothing
  , v1beta2DeploymentStatusConditions = Nothing
  , v1beta2DeploymentStatusObservedGeneration = Nothing
  , v1beta2DeploymentStatusReadyReplicas = Nothing
  , v1beta2DeploymentStatusReplicas = Nothing
  , v1beta2DeploymentStatusUnavailableReplicas = Nothing
  , v1beta2DeploymentStatusUpdatedReplicas = Nothing
  }

-- ** V1beta2DeploymentStrategy
-- | V1beta2DeploymentStrategy
-- DeploymentStrategy describes how to replace existing pods with new ones.
data V1beta2DeploymentStrategy = V1beta2DeploymentStrategy
  { v1beta2DeploymentStrategyRollingUpdate :: !(Maybe V1beta2RollingUpdateDeployment) -- ^ "rollingUpdate"
  , v1beta2DeploymentStrategyType :: !(Maybe Text) -- ^ "type" - Type of deployment. Can be \&quot;Recreate\&quot; or \&quot;RollingUpdate\&quot;. Default is RollingUpdate.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta2DeploymentStrategy
instance A.FromJSON V1beta2DeploymentStrategy where
  parseJSON = A.withObject "V1beta2DeploymentStrategy" $ \o ->
    V1beta2DeploymentStrategy
      <$> (o .:? "rollingUpdate")
      <*> (o .:? "type")

-- | ToJSON V1beta2DeploymentStrategy
instance A.ToJSON V1beta2DeploymentStrategy where
  toJSON V1beta2DeploymentStrategy {..} =
   _omitNulls
      [ "rollingUpdate" .= v1beta2DeploymentStrategyRollingUpdate
      , "type" .= v1beta2DeploymentStrategyType
      ]


-- | Construct a value of type 'V1beta2DeploymentStrategy' (by applying it's required fields, if any)
mkV1beta2DeploymentStrategy
  :: V1beta2DeploymentStrategy
mkV1beta2DeploymentStrategy =
  V1beta2DeploymentStrategy
  { v1beta2DeploymentStrategyRollingUpdate = Nothing
  , v1beta2DeploymentStrategyType = Nothing
  }

-- ** V1beta2ReplicaSet
-- | V1beta2ReplicaSet
-- DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1/ReplicaSet. See the release notes for more information. ReplicaSet ensures that a specified number of pod replicas are running at any given time.
data V1beta2ReplicaSet = V1beta2ReplicaSet
  { v1beta2ReplicaSetApiVersion :: !(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/api-conventions.md#resources
  , v1beta2ReplicaSetKind :: !(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/api-conventions.md#types-kinds
  , v1beta2ReplicaSetMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta2ReplicaSetSpec :: !(Maybe V1beta2ReplicaSetSpec) -- ^ "spec"
  , v1beta2ReplicaSetStatus :: !(Maybe V1beta2ReplicaSetStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta2ReplicaSet
instance A.FromJSON V1beta2ReplicaSet where
  parseJSON = A.withObject "V1beta2ReplicaSet" $ \o ->
    V1beta2ReplicaSet
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON V1beta2ReplicaSet
instance A.ToJSON V1beta2ReplicaSet where
  toJSON V1beta2ReplicaSet {..} =
   _omitNulls
      [ "apiVersion" .= v1beta2ReplicaSetApiVersion
      , "kind" .= v1beta2ReplicaSetKind
      , "metadata" .= v1beta2ReplicaSetMetadata
      , "spec" .= v1beta2ReplicaSetSpec
      , "status" .= v1beta2ReplicaSetStatus
      ]


-- | Construct a value of type 'V1beta2ReplicaSet' (by applying it's required fields, if any)
mkV1beta2ReplicaSet
  :: V1beta2ReplicaSet
mkV1beta2ReplicaSet =
  V1beta2ReplicaSet
  { v1beta2ReplicaSetApiVersion = Nothing
  , v1beta2ReplicaSetKind = Nothing
  , v1beta2ReplicaSetMetadata = Nothing
  , v1beta2ReplicaSetSpec = Nothing
  , v1beta2ReplicaSetStatus = Nothing
  }

-- ** V1beta2ReplicaSetCondition
-- | V1beta2ReplicaSetCondition
-- ReplicaSetCondition describes the state of a replica set at a certain point.
data V1beta2ReplicaSetCondition = V1beta2ReplicaSetCondition
  { v1beta2ReplicaSetConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - The last time the condition transitioned from one status to another.
  , v1beta2ReplicaSetConditionMessage :: !(Maybe Text) -- ^ "message" - A human readable message indicating details about the transition.
  , v1beta2ReplicaSetConditionReason :: !(Maybe Text) -- ^ "reason" - The reason for the condition&#39;s last transition.
  , v1beta2ReplicaSetConditionStatus :: !(Text) -- ^ /Required/ "status" - Status of the condition, one of True, False, Unknown.
  , v1beta2ReplicaSetConditionType :: !(Text) -- ^ /Required/ "type" - Type of replica set condition.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta2ReplicaSetCondition
instance A.FromJSON V1beta2ReplicaSetCondition where
  parseJSON = A.withObject "V1beta2ReplicaSetCondition" $ \o ->
    V1beta2ReplicaSetCondition
      <$> (o .:? "lastTransitionTime")
      <*> (o .:? "message")
      <*> (o .:? "reason")
      <*> (o .:  "status")
      <*> (o .:  "type")

-- | ToJSON V1beta2ReplicaSetCondition
instance A.ToJSON V1beta2ReplicaSetCondition where
  toJSON V1beta2ReplicaSetCondition {..} =
   _omitNulls
      [ "lastTransitionTime" .= v1beta2ReplicaSetConditionLastTransitionTime
      , "message" .= v1beta2ReplicaSetConditionMessage
      , "reason" .= v1beta2ReplicaSetConditionReason
      , "status" .= v1beta2ReplicaSetConditionStatus
      , "type" .= v1beta2ReplicaSetConditionType
      ]


-- | Construct a value of type 'V1beta2ReplicaSetCondition' (by applying it's required fields, if any)
mkV1beta2ReplicaSetCondition
  :: Text -- ^ 'v1beta2ReplicaSetConditionStatus': Status of the condition, one of True, False, Unknown.
  -> Text -- ^ 'v1beta2ReplicaSetConditionType': Type of replica set condition.
  -> V1beta2ReplicaSetCondition
mkV1beta2ReplicaSetCondition v1beta2ReplicaSetConditionStatus v1beta2ReplicaSetConditionType =
  V1beta2ReplicaSetCondition
  { v1beta2ReplicaSetConditionLastTransitionTime = Nothing
  , v1beta2ReplicaSetConditionMessage = Nothing
  , v1beta2ReplicaSetConditionReason = Nothing
  , v1beta2ReplicaSetConditionStatus
  , v1beta2ReplicaSetConditionType
  }

-- ** V1beta2ReplicaSetList
-- | V1beta2ReplicaSetList
-- ReplicaSetList is a collection of ReplicaSets.
data V1beta2ReplicaSetList = V1beta2ReplicaSetList
  { v1beta2ReplicaSetListApiVersion :: !(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/api-conventions.md#resources
  , v1beta2ReplicaSetListItems :: !([V1beta2ReplicaSet]) -- ^ /Required/ "items" - List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
  , v1beta2ReplicaSetListKind :: !(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/api-conventions.md#types-kinds
  , v1beta2ReplicaSetListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta2ReplicaSetList
instance A.FromJSON V1beta2ReplicaSetList where
  parseJSON = A.withObject "V1beta2ReplicaSetList" $ \o ->
    V1beta2ReplicaSetList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1beta2ReplicaSetList
instance A.ToJSON V1beta2ReplicaSetList where
  toJSON V1beta2ReplicaSetList {..} =
   _omitNulls
      [ "apiVersion" .= v1beta2ReplicaSetListApiVersion
      , "items" .= v1beta2ReplicaSetListItems
      , "kind" .= v1beta2ReplicaSetListKind
      , "metadata" .= v1beta2ReplicaSetListMetadata
      ]


-- | Construct a value of type 'V1beta2ReplicaSetList' (by applying it's required fields, if any)
mkV1beta2ReplicaSetList
  :: [V1beta2ReplicaSet] -- ^ 'v1beta2ReplicaSetListItems': List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
  -> V1beta2ReplicaSetList
mkV1beta2ReplicaSetList v1beta2ReplicaSetListItems =
  V1beta2ReplicaSetList
  { v1beta2ReplicaSetListApiVersion = Nothing
  , v1beta2ReplicaSetListItems
  , v1beta2ReplicaSetListKind = Nothing
  , v1beta2ReplicaSetListMetadata = Nothing
  }

-- ** V1beta2ReplicaSetSpec
-- | V1beta2ReplicaSetSpec
-- ReplicaSetSpec is the specification of a ReplicaSet.
data V1beta2ReplicaSetSpec = V1beta2ReplicaSetSpec
  { v1beta2ReplicaSetSpecMinReadySeconds :: !(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)
  , v1beta2ReplicaSetSpecReplicas :: !(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
  , v1beta2ReplicaSetSpecSelector :: !(V1LabelSelector) -- ^ /Required/ "selector"
  , v1beta2ReplicaSetSpecTemplate :: !(Maybe V1PodTemplateSpec) -- ^ "template"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta2ReplicaSetSpec
instance A.FromJSON V1beta2ReplicaSetSpec where
  parseJSON = A.withObject "V1beta2ReplicaSetSpec" $ \o ->
    V1beta2ReplicaSetSpec
      <$> (o .:? "minReadySeconds")
      <*> (o .:? "replicas")
      <*> (o .:  "selector")
      <*> (o .:? "template")

-- | ToJSON V1beta2ReplicaSetSpec
instance A.ToJSON V1beta2ReplicaSetSpec where
  toJSON V1beta2ReplicaSetSpec {..} =
   _omitNulls
      [ "minReadySeconds" .= v1beta2ReplicaSetSpecMinReadySeconds
      , "replicas" .= v1beta2ReplicaSetSpecReplicas
      , "selector" .= v1beta2ReplicaSetSpecSelector
      , "template" .= v1beta2ReplicaSetSpecTemplate
      ]


-- | Construct a value of type 'V1beta2ReplicaSetSpec' (by applying it's required fields, if any)
mkV1beta2ReplicaSetSpec
  :: V1LabelSelector -- ^ 'v1beta2ReplicaSetSpecSelector' 
  -> V1beta2ReplicaSetSpec
mkV1beta2ReplicaSetSpec v1beta2ReplicaSetSpecSelector =
  V1beta2ReplicaSetSpec
  { v1beta2ReplicaSetSpecMinReadySeconds = Nothing
  , v1beta2ReplicaSetSpecReplicas = Nothing
  , v1beta2ReplicaSetSpecSelector
  , v1beta2ReplicaSetSpecTemplate = Nothing
  }

-- ** V1beta2ReplicaSetStatus
-- | V1beta2ReplicaSetStatus
-- ReplicaSetStatus represents the current status of a ReplicaSet.
data V1beta2ReplicaSetStatus = V1beta2ReplicaSetStatus
  { v1beta2ReplicaSetStatusAvailableReplicas :: !(Maybe Int) -- ^ "availableReplicas" - The number of available replicas (ready for at least minReadySeconds) for this replica set.
  , v1beta2ReplicaSetStatusConditions :: !(Maybe [V1beta2ReplicaSetCondition]) -- ^ "conditions" - Represents the latest available observations of a replica set&#39;s current state.
  , v1beta2ReplicaSetStatusFullyLabeledReplicas :: !(Maybe Int) -- ^ "fullyLabeledReplicas" - The number of pods that have labels matching the labels of the pod template of the replicaset.
  , v1beta2ReplicaSetStatusObservedGeneration :: !(Maybe Integer) -- ^ "observedGeneration" - ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
  , v1beta2ReplicaSetStatusReadyReplicas :: !(Maybe Int) -- ^ "readyReplicas" - The number of ready replicas for this replica set.
  , v1beta2ReplicaSetStatusReplicas :: !(Int) -- ^ /Required/ "replicas" - Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta2ReplicaSetStatus
instance A.FromJSON V1beta2ReplicaSetStatus where
  parseJSON = A.withObject "V1beta2ReplicaSetStatus" $ \o ->
    V1beta2ReplicaSetStatus
      <$> (o .:? "availableReplicas")
      <*> (o .:? "conditions")
      <*> (o .:? "fullyLabeledReplicas")
      <*> (o .:? "observedGeneration")
      <*> (o .:? "readyReplicas")
      <*> (o .:  "replicas")

-- | ToJSON V1beta2ReplicaSetStatus
instance A.ToJSON V1beta2ReplicaSetStatus where
  toJSON V1beta2ReplicaSetStatus {..} =
   _omitNulls
      [ "availableReplicas" .= v1beta2ReplicaSetStatusAvailableReplicas
      , "conditions" .= v1beta2ReplicaSetStatusConditions
      , "fullyLabeledReplicas" .= v1beta2ReplicaSetStatusFullyLabeledReplicas
      , "observedGeneration" .= v1beta2ReplicaSetStatusObservedGeneration
      , "readyReplicas" .= v1beta2ReplicaSetStatusReadyReplicas
      , "replicas" .= v1beta2ReplicaSetStatusReplicas
      ]


-- | Construct a value of type 'V1beta2ReplicaSetStatus' (by applying it's required fields, if any)
mkV1beta2ReplicaSetStatus
  :: Int -- ^ 'v1beta2ReplicaSetStatusReplicas': Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
  -> V1beta2ReplicaSetStatus
mkV1beta2ReplicaSetStatus v1beta2ReplicaSetStatusReplicas =
  V1beta2ReplicaSetStatus
  { v1beta2ReplicaSetStatusAvailableReplicas = Nothing
  , v1beta2ReplicaSetStatusConditions = Nothing
  , v1beta2ReplicaSetStatusFullyLabeledReplicas = Nothing
  , v1beta2ReplicaSetStatusObservedGeneration = Nothing
  , v1beta2ReplicaSetStatusReadyReplicas = Nothing
  , v1beta2ReplicaSetStatusReplicas
  }

-- ** V1beta2RollingUpdateDaemonSet
-- | V1beta2RollingUpdateDaemonSet
-- Spec to control the desired behavior of daemon set rolling update.
data V1beta2RollingUpdateDaemonSet = V1beta2RollingUpdateDaemonSet
  { v1beta2RollingUpdateDaemonSetMaxUnavailable :: !(Maybe IntOrString) -- ^ "maxUnavailable"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta2RollingUpdateDaemonSet
instance A.FromJSON V1beta2RollingUpdateDaemonSet where
  parseJSON = A.withObject "V1beta2RollingUpdateDaemonSet" $ \o ->
    V1beta2RollingUpdateDaemonSet
      <$> (o .:? "maxUnavailable")

-- | ToJSON V1beta2RollingUpdateDaemonSet
instance A.ToJSON V1beta2RollingUpdateDaemonSet where
  toJSON V1beta2RollingUpdateDaemonSet {..} =
   _omitNulls
      [ "maxUnavailable" .= v1beta2RollingUpdateDaemonSetMaxUnavailable
      ]


-- | Construct a value of type 'V1beta2RollingUpdateDaemonSet' (by applying it's required fields, if any)
mkV1beta2RollingUpdateDaemonSet
  :: V1beta2RollingUpdateDaemonSet
mkV1beta2RollingUpdateDaemonSet =
  V1beta2RollingUpdateDaemonSet
  { v1beta2RollingUpdateDaemonSetMaxUnavailable = Nothing
  }

-- ** V1beta2RollingUpdateDeployment
-- | V1beta2RollingUpdateDeployment
-- Spec to control the desired behavior of rolling update.
data V1beta2RollingUpdateDeployment = V1beta2RollingUpdateDeployment
  { v1beta2RollingUpdateDeploymentMaxSurge :: !(Maybe IntOrString) -- ^ "maxSurge"
  , v1beta2RollingUpdateDeploymentMaxUnavailable :: !(Maybe IntOrString) -- ^ "maxUnavailable"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta2RollingUpdateDeployment
instance A.FromJSON V1beta2RollingUpdateDeployment where
  parseJSON = A.withObject "V1beta2RollingUpdateDeployment" $ \o ->
    V1beta2RollingUpdateDeployment
      <$> (o .:? "maxSurge")
      <*> (o .:? "maxUnavailable")

-- | ToJSON V1beta2RollingUpdateDeployment
instance A.ToJSON V1beta2RollingUpdateDeployment where
  toJSON V1beta2RollingUpdateDeployment {..} =
   _omitNulls
      [ "maxSurge" .= v1beta2RollingUpdateDeploymentMaxSurge
      , "maxUnavailable" .= v1beta2RollingUpdateDeploymentMaxUnavailable
      ]


-- | Construct a value of type 'V1beta2RollingUpdateDeployment' (by applying it's required fields, if any)
mkV1beta2RollingUpdateDeployment
  :: V1beta2RollingUpdateDeployment
mkV1beta2RollingUpdateDeployment =
  V1beta2RollingUpdateDeployment
  { v1beta2RollingUpdateDeploymentMaxSurge = Nothing
  , v1beta2RollingUpdateDeploymentMaxUnavailable = Nothing
  }

-- ** V1beta2RollingUpdateStatefulSetStrategy
-- | V1beta2RollingUpdateStatefulSetStrategy
-- RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.
data V1beta2RollingUpdateStatefulSetStrategy = V1beta2RollingUpdateStatefulSetStrategy
  { v1beta2RollingUpdateStatefulSetStrategyPartition :: !(Maybe Int) -- ^ "partition" - Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta2RollingUpdateStatefulSetStrategy
instance A.FromJSON V1beta2RollingUpdateStatefulSetStrategy where
  parseJSON = A.withObject "V1beta2RollingUpdateStatefulSetStrategy" $ \o ->
    V1beta2RollingUpdateStatefulSetStrategy
      <$> (o .:? "partition")

-- | ToJSON V1beta2RollingUpdateStatefulSetStrategy
instance A.ToJSON V1beta2RollingUpdateStatefulSetStrategy where
  toJSON V1beta2RollingUpdateStatefulSetStrategy {..} =
   _omitNulls
      [ "partition" .= v1beta2RollingUpdateStatefulSetStrategyPartition
      ]


-- | Construct a value of type 'V1beta2RollingUpdateStatefulSetStrategy' (by applying it's required fields, if any)
mkV1beta2RollingUpdateStatefulSetStrategy
  :: V1beta2RollingUpdateStatefulSetStrategy
mkV1beta2RollingUpdateStatefulSetStrategy =
  V1beta2RollingUpdateStatefulSetStrategy
  { v1beta2RollingUpdateStatefulSetStrategyPartition = Nothing
  }

-- ** V1beta2Scale
-- | V1beta2Scale
-- Scale represents a scaling request for a resource.
data V1beta2Scale = V1beta2Scale
  { v1beta2ScaleApiVersion :: !(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/api-conventions.md#resources
  , v1beta2ScaleKind :: !(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/api-conventions.md#types-kinds
  , v1beta2ScaleMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta2ScaleSpec :: !(Maybe V1beta2ScaleSpec) -- ^ "spec"
  , v1beta2ScaleStatus :: !(Maybe V1beta2ScaleStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta2Scale
instance A.FromJSON V1beta2Scale where
  parseJSON = A.withObject "V1beta2Scale" $ \o ->
    V1beta2Scale
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON V1beta2Scale
instance A.ToJSON V1beta2Scale where
  toJSON V1beta2Scale {..} =
   _omitNulls
      [ "apiVersion" .= v1beta2ScaleApiVersion
      , "kind" .= v1beta2ScaleKind
      , "metadata" .= v1beta2ScaleMetadata
      , "spec" .= v1beta2ScaleSpec
      , "status" .= v1beta2ScaleStatus
      ]


-- | Construct a value of type 'V1beta2Scale' (by applying it's required fields, if any)
mkV1beta2Scale
  :: V1beta2Scale
mkV1beta2Scale =
  V1beta2Scale
  { v1beta2ScaleApiVersion = Nothing
  , v1beta2ScaleKind = Nothing
  , v1beta2ScaleMetadata = Nothing
  , v1beta2ScaleSpec = Nothing
  , v1beta2ScaleStatus = Nothing
  }

-- ** V1beta2ScaleSpec
-- | V1beta2ScaleSpec
-- ScaleSpec describes the attributes of a scale subresource
data V1beta2ScaleSpec = V1beta2ScaleSpec
  { v1beta2ScaleSpecReplicas :: !(Maybe Int) -- ^ "replicas" - desired number of instances for the scaled object.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta2ScaleSpec
instance A.FromJSON V1beta2ScaleSpec where
  parseJSON = A.withObject "V1beta2ScaleSpec" $ \o ->
    V1beta2ScaleSpec
      <$> (o .:? "replicas")

-- | ToJSON V1beta2ScaleSpec
instance A.ToJSON V1beta2ScaleSpec where
  toJSON V1beta2ScaleSpec {..} =
   _omitNulls
      [ "replicas" .= v1beta2ScaleSpecReplicas
      ]


-- | Construct a value of type 'V1beta2ScaleSpec' (by applying it's required fields, if any)
mkV1beta2ScaleSpec
  :: V1beta2ScaleSpec
mkV1beta2ScaleSpec =
  V1beta2ScaleSpec
  { v1beta2ScaleSpecReplicas = Nothing
  }

-- ** V1beta2ScaleStatus
-- | V1beta2ScaleStatus
-- ScaleStatus represents the current status of a scale subresource.
data V1beta2ScaleStatus = V1beta2ScaleStatus
  { v1beta2ScaleStatusReplicas :: !(Int) -- ^ /Required/ "replicas" - actual number of observed instances of the scaled object.
  , v1beta2ScaleStatusSelector :: !(Maybe (Map.Map String Text)) -- ^ "selector" - label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
  , v1beta2ScaleStatusTargetSelector :: !(Maybe Text) -- ^ "targetSelector" - label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta2ScaleStatus
instance A.FromJSON V1beta2ScaleStatus where
  parseJSON = A.withObject "V1beta2ScaleStatus" $ \o ->
    V1beta2ScaleStatus
      <$> (o .:  "replicas")
      <*> (o .:? "selector")
      <*> (o .:? "targetSelector")

-- | ToJSON V1beta2ScaleStatus
instance A.ToJSON V1beta2ScaleStatus where
  toJSON V1beta2ScaleStatus {..} =
   _omitNulls
      [ "replicas" .= v1beta2ScaleStatusReplicas
      , "selector" .= v1beta2ScaleStatusSelector
      , "targetSelector" .= v1beta2ScaleStatusTargetSelector
      ]


-- | Construct a value of type 'V1beta2ScaleStatus' (by applying it's required fields, if any)
mkV1beta2ScaleStatus
  :: Int -- ^ 'v1beta2ScaleStatusReplicas': actual number of observed instances of the scaled object.
  -> V1beta2ScaleStatus
mkV1beta2ScaleStatus v1beta2ScaleStatusReplicas =
  V1beta2ScaleStatus
  { v1beta2ScaleStatusReplicas
  , v1beta2ScaleStatusSelector = Nothing
  , v1beta2ScaleStatusTargetSelector = Nothing
  }

-- ** V1beta2StatefulSet
-- | V1beta2StatefulSet
-- DEPRECATED - This group version of StatefulSet is deprecated by apps/v1/StatefulSet. See the release notes for more information. 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 V1beta2StatefulSet = V1beta2StatefulSet
  { v1beta2StatefulSetApiVersion :: !(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/api-conventions.md#resources
  , v1beta2StatefulSetKind :: !(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/api-conventions.md#types-kinds
  , v1beta2StatefulSetMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v1beta2StatefulSetSpec :: !(Maybe V1beta2StatefulSetSpec) -- ^ "spec"
  , v1beta2StatefulSetStatus :: !(Maybe V1beta2StatefulSetStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta2StatefulSet
instance A.FromJSON V1beta2StatefulSet where
  parseJSON = A.withObject "V1beta2StatefulSet" $ \o ->
    V1beta2StatefulSet
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON V1beta2StatefulSet
instance A.ToJSON V1beta2StatefulSet where
  toJSON V1beta2StatefulSet {..} =
   _omitNulls
      [ "apiVersion" .= v1beta2StatefulSetApiVersion
      , "kind" .= v1beta2StatefulSetKind
      , "metadata" .= v1beta2StatefulSetMetadata
      , "spec" .= v1beta2StatefulSetSpec
      , "status" .= v1beta2StatefulSetStatus
      ]


-- | Construct a value of type 'V1beta2StatefulSet' (by applying it's required fields, if any)
mkV1beta2StatefulSet
  :: V1beta2StatefulSet
mkV1beta2StatefulSet =
  V1beta2StatefulSet
  { v1beta2StatefulSetApiVersion = Nothing
  , v1beta2StatefulSetKind = Nothing
  , v1beta2StatefulSetMetadata = Nothing
  , v1beta2StatefulSetSpec = Nothing
  , v1beta2StatefulSetStatus = Nothing
  }

-- ** V1beta2StatefulSetCondition
-- | V1beta2StatefulSetCondition
-- StatefulSetCondition describes the state of a statefulset at a certain point.
data V1beta2StatefulSetCondition = V1beta2StatefulSetCondition
  { v1beta2StatefulSetConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - Last time the condition transitioned from one status to another.
  , v1beta2StatefulSetConditionMessage :: !(Maybe Text) -- ^ "message" - A human readable message indicating details about the transition.
  , v1beta2StatefulSetConditionReason :: !(Maybe Text) -- ^ "reason" - The reason for the condition&#39;s last transition.
  , v1beta2StatefulSetConditionStatus :: !(Text) -- ^ /Required/ "status" - Status of the condition, one of True, False, Unknown.
  , v1beta2StatefulSetConditionType :: !(Text) -- ^ /Required/ "type" - Type of statefulset condition.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta2StatefulSetCondition
instance A.FromJSON V1beta2StatefulSetCondition where
  parseJSON = A.withObject "V1beta2StatefulSetCondition" $ \o ->
    V1beta2StatefulSetCondition
      <$> (o .:? "lastTransitionTime")
      <*> (o .:? "message")
      <*> (o .:? "reason")
      <*> (o .:  "status")
      <*> (o .:  "type")

-- | ToJSON V1beta2StatefulSetCondition
instance A.ToJSON V1beta2StatefulSetCondition where
  toJSON V1beta2StatefulSetCondition {..} =
   _omitNulls
      [ "lastTransitionTime" .= v1beta2StatefulSetConditionLastTransitionTime
      , "message" .= v1beta2StatefulSetConditionMessage
      , "reason" .= v1beta2StatefulSetConditionReason
      , "status" .= v1beta2StatefulSetConditionStatus
      , "type" .= v1beta2StatefulSetConditionType
      ]


-- | Construct a value of type 'V1beta2StatefulSetCondition' (by applying it's required fields, if any)
mkV1beta2StatefulSetCondition
  :: Text -- ^ 'v1beta2StatefulSetConditionStatus': Status of the condition, one of True, False, Unknown.
  -> Text -- ^ 'v1beta2StatefulSetConditionType': Type of statefulset condition.
  -> V1beta2StatefulSetCondition
mkV1beta2StatefulSetCondition v1beta2StatefulSetConditionStatus v1beta2StatefulSetConditionType =
  V1beta2StatefulSetCondition
  { v1beta2StatefulSetConditionLastTransitionTime = Nothing
  , v1beta2StatefulSetConditionMessage = Nothing
  , v1beta2StatefulSetConditionReason = Nothing
  , v1beta2StatefulSetConditionStatus
  , v1beta2StatefulSetConditionType
  }

-- ** V1beta2StatefulSetList
-- | V1beta2StatefulSetList
-- StatefulSetList is a collection of StatefulSets.
data V1beta2StatefulSetList = V1beta2StatefulSetList
  { v1beta2StatefulSetListApiVersion :: !(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/api-conventions.md#resources
  , v1beta2StatefulSetListItems :: !([V1beta2StatefulSet]) -- ^ /Required/ "items"
  , v1beta2StatefulSetListKind :: !(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/api-conventions.md#types-kinds
  , v1beta2StatefulSetListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta2StatefulSetList
instance A.FromJSON V1beta2StatefulSetList where
  parseJSON = A.withObject "V1beta2StatefulSetList" $ \o ->
    V1beta2StatefulSetList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V1beta2StatefulSetList
instance A.ToJSON V1beta2StatefulSetList where
  toJSON V1beta2StatefulSetList {..} =
   _omitNulls
      [ "apiVersion" .= v1beta2StatefulSetListApiVersion
      , "items" .= v1beta2StatefulSetListItems
      , "kind" .= v1beta2StatefulSetListKind
      , "metadata" .= v1beta2StatefulSetListMetadata
      ]


-- | Construct a value of type 'V1beta2StatefulSetList' (by applying it's required fields, if any)
mkV1beta2StatefulSetList
  :: [V1beta2StatefulSet] -- ^ 'v1beta2StatefulSetListItems' 
  -> V1beta2StatefulSetList
mkV1beta2StatefulSetList v1beta2StatefulSetListItems =
  V1beta2StatefulSetList
  { v1beta2StatefulSetListApiVersion = Nothing
  , v1beta2StatefulSetListItems
  , v1beta2StatefulSetListKind = Nothing
  , v1beta2StatefulSetListMetadata = Nothing
  }

-- ** V1beta2StatefulSetSpec
-- | V1beta2StatefulSetSpec
-- A StatefulSetSpec is the specification of a StatefulSet.
data V1beta2StatefulSetSpec = V1beta2StatefulSetSpec
  { v1beta2StatefulSetSpecPodManagementPolicy :: !(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.
  , v1beta2StatefulSetSpecReplicas :: !(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.
  , v1beta2StatefulSetSpecRevisionHistoryLimit :: !(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.
  , v1beta2StatefulSetSpecSelector :: !(V1LabelSelector) -- ^ /Required/ "selector"
  , v1beta2StatefulSetSpecServiceName :: !(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.
  , v1beta2StatefulSetSpecTemplate :: !(V1PodTemplateSpec) -- ^ /Required/ "template"
  , v1beta2StatefulSetSpecUpdateStrategy :: !(Maybe V1beta2StatefulSetUpdateStrategy) -- ^ "updateStrategy"
  , v1beta2StatefulSetSpecVolumeClaimTemplates :: !(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 (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta2StatefulSetSpec
instance A.FromJSON V1beta2StatefulSetSpec where
  parseJSON = A.withObject "V1beta2StatefulSetSpec" $ \o ->
    V1beta2StatefulSetSpec
      <$> (o .:? "podManagementPolicy")
      <*> (o .:? "replicas")
      <*> (o .:? "revisionHistoryLimit")
      <*> (o .:  "selector")
      <*> (o .:  "serviceName")
      <*> (o .:  "template")
      <*> (o .:? "updateStrategy")
      <*> (o .:? "volumeClaimTemplates")

-- | ToJSON V1beta2StatefulSetSpec
instance A.ToJSON V1beta2StatefulSetSpec where
  toJSON V1beta2StatefulSetSpec {..} =
   _omitNulls
      [ "podManagementPolicy" .= v1beta2StatefulSetSpecPodManagementPolicy
      , "replicas" .= v1beta2StatefulSetSpecReplicas
      , "revisionHistoryLimit" .= v1beta2StatefulSetSpecRevisionHistoryLimit
      , "selector" .= v1beta2StatefulSetSpecSelector
      , "serviceName" .= v1beta2StatefulSetSpecServiceName
      , "template" .= v1beta2StatefulSetSpecTemplate
      , "updateStrategy" .= v1beta2StatefulSetSpecUpdateStrategy
      , "volumeClaimTemplates" .= v1beta2StatefulSetSpecVolumeClaimTemplates
      ]


-- | Construct a value of type 'V1beta2StatefulSetSpec' (by applying it's required fields, if any)
mkV1beta2StatefulSetSpec
  :: V1LabelSelector -- ^ 'v1beta2StatefulSetSpecSelector' 
  -> Text -- ^ 'v1beta2StatefulSetSpecServiceName': 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 -- ^ 'v1beta2StatefulSetSpecTemplate' 
  -> V1beta2StatefulSetSpec
mkV1beta2StatefulSetSpec v1beta2StatefulSetSpecSelector v1beta2StatefulSetSpecServiceName v1beta2StatefulSetSpecTemplate =
  V1beta2StatefulSetSpec
  { v1beta2StatefulSetSpecPodManagementPolicy = Nothing
  , v1beta2StatefulSetSpecReplicas = Nothing
  , v1beta2StatefulSetSpecRevisionHistoryLimit = Nothing
  , v1beta2StatefulSetSpecSelector
  , v1beta2StatefulSetSpecServiceName
  , v1beta2StatefulSetSpecTemplate
  , v1beta2StatefulSetSpecUpdateStrategy = Nothing
  , v1beta2StatefulSetSpecVolumeClaimTemplates = Nothing
  }

-- ** V1beta2StatefulSetStatus
-- | V1beta2StatefulSetStatus
-- StatefulSetStatus represents the current state of a StatefulSet.
data V1beta2StatefulSetStatus = V1beta2StatefulSetStatus
  { v1beta2StatefulSetStatusCollisionCount :: !(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.
  , v1beta2StatefulSetStatusConditions :: !(Maybe [V1beta2StatefulSetCondition]) -- ^ "conditions" - Represents the latest available observations of a statefulset&#39;s current state.
  , v1beta2StatefulSetStatusCurrentReplicas :: !(Maybe Int) -- ^ "currentReplicas" - currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision.
  , v1beta2StatefulSetStatusCurrentRevision :: !(Maybe Text) -- ^ "currentRevision" - currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas).
  , v1beta2StatefulSetStatusObservedGeneration :: !(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.
  , v1beta2StatefulSetStatusReadyReplicas :: !(Maybe Int) -- ^ "readyReplicas" - readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.
  , v1beta2StatefulSetStatusReplicas :: !(Int) -- ^ /Required/ "replicas" - replicas is the number of Pods created by the StatefulSet controller.
  , v1beta2StatefulSetStatusUpdateRevision :: !(Maybe Text) -- ^ "updateRevision" - updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)
  , v1beta2StatefulSetStatusUpdatedReplicas :: !(Maybe Int) -- ^ "updatedReplicas" - updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta2StatefulSetStatus
instance A.FromJSON V1beta2StatefulSetStatus where
  parseJSON = A.withObject "V1beta2StatefulSetStatus" $ \o ->
    V1beta2StatefulSetStatus
      <$> (o .:? "collisionCount")
      <*> (o .:? "conditions")
      <*> (o .:? "currentReplicas")
      <*> (o .:? "currentRevision")
      <*> (o .:? "observedGeneration")
      <*> (o .:? "readyReplicas")
      <*> (o .:  "replicas")
      <*> (o .:? "updateRevision")
      <*> (o .:? "updatedReplicas")

-- | ToJSON V1beta2StatefulSetStatus
instance A.ToJSON V1beta2StatefulSetStatus where
  toJSON V1beta2StatefulSetStatus {..} =
   _omitNulls
      [ "collisionCount" .= v1beta2StatefulSetStatusCollisionCount
      , "conditions" .= v1beta2StatefulSetStatusConditions
      , "currentReplicas" .= v1beta2StatefulSetStatusCurrentReplicas
      , "currentRevision" .= v1beta2StatefulSetStatusCurrentRevision
      , "observedGeneration" .= v1beta2StatefulSetStatusObservedGeneration
      , "readyReplicas" .= v1beta2StatefulSetStatusReadyReplicas
      , "replicas" .= v1beta2StatefulSetStatusReplicas
      , "updateRevision" .= v1beta2StatefulSetStatusUpdateRevision
      , "updatedReplicas" .= v1beta2StatefulSetStatusUpdatedReplicas
      ]


-- | Construct a value of type 'V1beta2StatefulSetStatus' (by applying it's required fields, if any)
mkV1beta2StatefulSetStatus
  :: Int -- ^ 'v1beta2StatefulSetStatusReplicas': replicas is the number of Pods created by the StatefulSet controller.
  -> V1beta2StatefulSetStatus
mkV1beta2StatefulSetStatus v1beta2StatefulSetStatusReplicas =
  V1beta2StatefulSetStatus
  { v1beta2StatefulSetStatusCollisionCount = Nothing
  , v1beta2StatefulSetStatusConditions = Nothing
  , v1beta2StatefulSetStatusCurrentReplicas = Nothing
  , v1beta2StatefulSetStatusCurrentRevision = Nothing
  , v1beta2StatefulSetStatusObservedGeneration = Nothing
  , v1beta2StatefulSetStatusReadyReplicas = Nothing
  , v1beta2StatefulSetStatusReplicas
  , v1beta2StatefulSetStatusUpdateRevision = Nothing
  , v1beta2StatefulSetStatusUpdatedReplicas = Nothing
  }

-- ** V1beta2StatefulSetUpdateStrategy
-- | V1beta2StatefulSetUpdateStrategy
-- 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 V1beta2StatefulSetUpdateStrategy = V1beta2StatefulSetUpdateStrategy
  { v1beta2StatefulSetUpdateStrategyRollingUpdate :: !(Maybe V1beta2RollingUpdateStatefulSetStrategy) -- ^ "rollingUpdate"
  , v1beta2StatefulSetUpdateStrategyType :: !(Maybe Text) -- ^ "type" - Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V1beta2StatefulSetUpdateStrategy
instance A.FromJSON V1beta2StatefulSetUpdateStrategy where
  parseJSON = A.withObject "V1beta2StatefulSetUpdateStrategy" $ \o ->
    V1beta2StatefulSetUpdateStrategy
      <$> (o .:? "rollingUpdate")
      <*> (o .:? "type")

-- | ToJSON V1beta2StatefulSetUpdateStrategy
instance A.ToJSON V1beta2StatefulSetUpdateStrategy where
  toJSON V1beta2StatefulSetUpdateStrategy {..} =
   _omitNulls
      [ "rollingUpdate" .= v1beta2StatefulSetUpdateStrategyRollingUpdate
      , "type" .= v1beta2StatefulSetUpdateStrategyType
      ]


-- | Construct a value of type 'V1beta2StatefulSetUpdateStrategy' (by applying it's required fields, if any)
mkV1beta2StatefulSetUpdateStrategy
  :: V1beta2StatefulSetUpdateStrategy
mkV1beta2StatefulSetUpdateStrategy =
  V1beta2StatefulSetUpdateStrategy
  { v1beta2StatefulSetUpdateStrategyRollingUpdate = Nothing
  , v1beta2StatefulSetUpdateStrategyType = Nothing
  }

-- ** V2alpha1CronJob
-- | V2alpha1CronJob
-- CronJob represents the configuration of a single cron job.
data V2alpha1CronJob = V2alpha1CronJob
  { v2alpha1CronJobApiVersion :: !(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/api-conventions.md#resources
  , v2alpha1CronJobKind :: !(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/api-conventions.md#types-kinds
  , v2alpha1CronJobMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v2alpha1CronJobSpec :: !(Maybe V2alpha1CronJobSpec) -- ^ "spec"
  , v2alpha1CronJobStatus :: !(Maybe V2alpha1CronJobStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2alpha1CronJob
instance A.FromJSON V2alpha1CronJob where
  parseJSON = A.withObject "V2alpha1CronJob" $ \o ->
    V2alpha1CronJob
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON V2alpha1CronJob
instance A.ToJSON V2alpha1CronJob where
  toJSON V2alpha1CronJob {..} =
   _omitNulls
      [ "apiVersion" .= v2alpha1CronJobApiVersion
      , "kind" .= v2alpha1CronJobKind
      , "metadata" .= v2alpha1CronJobMetadata
      , "spec" .= v2alpha1CronJobSpec
      , "status" .= v2alpha1CronJobStatus
      ]


-- | Construct a value of type 'V2alpha1CronJob' (by applying it's required fields, if any)
mkV2alpha1CronJob
  :: V2alpha1CronJob
mkV2alpha1CronJob =
  V2alpha1CronJob
  { v2alpha1CronJobApiVersion = Nothing
  , v2alpha1CronJobKind = Nothing
  , v2alpha1CronJobMetadata = Nothing
  , v2alpha1CronJobSpec = Nothing
  , v2alpha1CronJobStatus = Nothing
  }

-- ** V2alpha1CronJobList
-- | V2alpha1CronJobList
-- CronJobList is a collection of cron jobs.
data V2alpha1CronJobList = V2alpha1CronJobList
  { v2alpha1CronJobListApiVersion :: !(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/api-conventions.md#resources
  , v2alpha1CronJobListItems :: !([V2alpha1CronJob]) -- ^ /Required/ "items" - items is the list of CronJobs.
  , v2alpha1CronJobListKind :: !(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/api-conventions.md#types-kinds
  , v2alpha1CronJobListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2alpha1CronJobList
instance A.FromJSON V2alpha1CronJobList where
  parseJSON = A.withObject "V2alpha1CronJobList" $ \o ->
    V2alpha1CronJobList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V2alpha1CronJobList
instance A.ToJSON V2alpha1CronJobList where
  toJSON V2alpha1CronJobList {..} =
   _omitNulls
      [ "apiVersion" .= v2alpha1CronJobListApiVersion
      , "items" .= v2alpha1CronJobListItems
      , "kind" .= v2alpha1CronJobListKind
      , "metadata" .= v2alpha1CronJobListMetadata
      ]


-- | Construct a value of type 'V2alpha1CronJobList' (by applying it's required fields, if any)
mkV2alpha1CronJobList
  :: [V2alpha1CronJob] -- ^ 'v2alpha1CronJobListItems': items is the list of CronJobs.
  -> V2alpha1CronJobList
mkV2alpha1CronJobList v2alpha1CronJobListItems =
  V2alpha1CronJobList
  { v2alpha1CronJobListApiVersion = Nothing
  , v2alpha1CronJobListItems
  , v2alpha1CronJobListKind = Nothing
  , v2alpha1CronJobListMetadata = Nothing
  }

-- ** V2alpha1CronJobSpec
-- | V2alpha1CronJobSpec
-- CronJobSpec describes how the job execution will look like and when it will actually run.
data V2alpha1CronJobSpec = V2alpha1CronJobSpec
  { v2alpha1CronJobSpecConcurrencyPolicy :: !(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
  , v2alpha1CronJobSpecFailedJobsHistoryLimit :: !(Maybe Int) -- ^ "failedJobsHistoryLimit" - The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified.
  , v2alpha1CronJobSpecJobTemplate :: !(V2alpha1JobTemplateSpec) -- ^ /Required/ "jobTemplate"
  , v2alpha1CronJobSpecSchedule :: !(Text) -- ^ /Required/ "schedule" - The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
  , v2alpha1CronJobSpecStartingDeadlineSeconds :: !(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.
  , v2alpha1CronJobSpecSuccessfulJobsHistoryLimit :: !(Maybe Int) -- ^ "successfulJobsHistoryLimit" - The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified.
  , v2alpha1CronJobSpecSuspend :: !(Maybe Bool) -- ^ "suspend" - This flag tells the controller to suspend subsequent executions, it does not apply to already started executions.  Defaults to false.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2alpha1CronJobSpec
instance A.FromJSON V2alpha1CronJobSpec where
  parseJSON = A.withObject "V2alpha1CronJobSpec" $ \o ->
    V2alpha1CronJobSpec
      <$> (o .:? "concurrencyPolicy")
      <*> (o .:? "failedJobsHistoryLimit")
      <*> (o .:  "jobTemplate")
      <*> (o .:  "schedule")
      <*> (o .:? "startingDeadlineSeconds")
      <*> (o .:? "successfulJobsHistoryLimit")
      <*> (o .:? "suspend")

-- | ToJSON V2alpha1CronJobSpec
instance A.ToJSON V2alpha1CronJobSpec where
  toJSON V2alpha1CronJobSpec {..} =
   _omitNulls
      [ "concurrencyPolicy" .= v2alpha1CronJobSpecConcurrencyPolicy
      , "failedJobsHistoryLimit" .= v2alpha1CronJobSpecFailedJobsHistoryLimit
      , "jobTemplate" .= v2alpha1CronJobSpecJobTemplate
      , "schedule" .= v2alpha1CronJobSpecSchedule
      , "startingDeadlineSeconds" .= v2alpha1CronJobSpecStartingDeadlineSeconds
      , "successfulJobsHistoryLimit" .= v2alpha1CronJobSpecSuccessfulJobsHistoryLimit
      , "suspend" .= v2alpha1CronJobSpecSuspend
      ]


-- | Construct a value of type 'V2alpha1CronJobSpec' (by applying it's required fields, if any)
mkV2alpha1CronJobSpec
  :: V2alpha1JobTemplateSpec -- ^ 'v2alpha1CronJobSpecJobTemplate' 
  -> Text -- ^ 'v2alpha1CronJobSpecSchedule': The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
  -> V2alpha1CronJobSpec
mkV2alpha1CronJobSpec v2alpha1CronJobSpecJobTemplate v2alpha1CronJobSpecSchedule =
  V2alpha1CronJobSpec
  { v2alpha1CronJobSpecConcurrencyPolicy = Nothing
  , v2alpha1CronJobSpecFailedJobsHistoryLimit = Nothing
  , v2alpha1CronJobSpecJobTemplate
  , v2alpha1CronJobSpecSchedule
  , v2alpha1CronJobSpecStartingDeadlineSeconds = Nothing
  , v2alpha1CronJobSpecSuccessfulJobsHistoryLimit = Nothing
  , v2alpha1CronJobSpecSuspend = Nothing
  }

-- ** V2alpha1CronJobStatus
-- | V2alpha1CronJobStatus
-- CronJobStatus represents the current state of a cron job.
data V2alpha1CronJobStatus = V2alpha1CronJobStatus
  { v2alpha1CronJobStatusActive :: !(Maybe [V1ObjectReference]) -- ^ "active" - A list of pointers to currently running jobs.
  , v2alpha1CronJobStatusLastScheduleTime :: !(Maybe DateTime) -- ^ "lastScheduleTime" - Information when was the last time the job was successfully scheduled.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2alpha1CronJobStatus
instance A.FromJSON V2alpha1CronJobStatus where
  parseJSON = A.withObject "V2alpha1CronJobStatus" $ \o ->
    V2alpha1CronJobStatus
      <$> (o .:? "active")
      <*> (o .:? "lastScheduleTime")

-- | ToJSON V2alpha1CronJobStatus
instance A.ToJSON V2alpha1CronJobStatus where
  toJSON V2alpha1CronJobStatus {..} =
   _omitNulls
      [ "active" .= v2alpha1CronJobStatusActive
      , "lastScheduleTime" .= v2alpha1CronJobStatusLastScheduleTime
      ]


-- | Construct a value of type 'V2alpha1CronJobStatus' (by applying it's required fields, if any)
mkV2alpha1CronJobStatus
  :: V2alpha1CronJobStatus
mkV2alpha1CronJobStatus =
  V2alpha1CronJobStatus
  { v2alpha1CronJobStatusActive = Nothing
  , v2alpha1CronJobStatusLastScheduleTime = Nothing
  }

-- ** V2alpha1JobTemplateSpec
-- | V2alpha1JobTemplateSpec
-- JobTemplateSpec describes the data a Job should have when created from a template
data V2alpha1JobTemplateSpec = V2alpha1JobTemplateSpec
  { v2alpha1JobTemplateSpecMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v2alpha1JobTemplateSpecSpec :: !(Maybe V1JobSpec) -- ^ "spec"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2alpha1JobTemplateSpec
instance A.FromJSON V2alpha1JobTemplateSpec where
  parseJSON = A.withObject "V2alpha1JobTemplateSpec" $ \o ->
    V2alpha1JobTemplateSpec
      <$> (o .:? "metadata")
      <*> (o .:? "spec")

-- | ToJSON V2alpha1JobTemplateSpec
instance A.ToJSON V2alpha1JobTemplateSpec where
  toJSON V2alpha1JobTemplateSpec {..} =
   _omitNulls
      [ "metadata" .= v2alpha1JobTemplateSpecMetadata
      , "spec" .= v2alpha1JobTemplateSpecSpec
      ]


-- | Construct a value of type 'V2alpha1JobTemplateSpec' (by applying it's required fields, if any)
mkV2alpha1JobTemplateSpec
  :: V2alpha1JobTemplateSpec
mkV2alpha1JobTemplateSpec =
  V2alpha1JobTemplateSpec
  { v2alpha1JobTemplateSpecMetadata = Nothing
  , v2alpha1JobTemplateSpecSpec = Nothing
  }

-- ** V2beta1CrossVersionObjectReference
-- | V2beta1CrossVersionObjectReference
-- CrossVersionObjectReference contains enough information to let you identify the referred resource.
data V2beta1CrossVersionObjectReference = V2beta1CrossVersionObjectReference
  { v2beta1CrossVersionObjectReferenceApiVersion :: !(Maybe Text) -- ^ "apiVersion" - API version of the referent
  , v2beta1CrossVersionObjectReferenceKind :: !(Text) -- ^ /Required/ "kind" - Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds\&quot;
  , v2beta1CrossVersionObjectReferenceName :: !(Text) -- ^ /Required/ "name" - Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta1CrossVersionObjectReference
instance A.FromJSON V2beta1CrossVersionObjectReference where
  parseJSON = A.withObject "V2beta1CrossVersionObjectReference" $ \o ->
    V2beta1CrossVersionObjectReference
      <$> (o .:? "apiVersion")
      <*> (o .:  "kind")
      <*> (o .:  "name")

-- | ToJSON V2beta1CrossVersionObjectReference
instance A.ToJSON V2beta1CrossVersionObjectReference where
  toJSON V2beta1CrossVersionObjectReference {..} =
   _omitNulls
      [ "apiVersion" .= v2beta1CrossVersionObjectReferenceApiVersion
      , "kind" .= v2beta1CrossVersionObjectReferenceKind
      , "name" .= v2beta1CrossVersionObjectReferenceName
      ]


-- | Construct a value of type 'V2beta1CrossVersionObjectReference' (by applying it's required fields, if any)
mkV2beta1CrossVersionObjectReference
  :: Text -- ^ 'v2beta1CrossVersionObjectReferenceKind': Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds\"
  -> Text -- ^ 'v2beta1CrossVersionObjectReferenceName': Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
  -> V2beta1CrossVersionObjectReference
mkV2beta1CrossVersionObjectReference v2beta1CrossVersionObjectReferenceKind v2beta1CrossVersionObjectReferenceName =
  V2beta1CrossVersionObjectReference
  { v2beta1CrossVersionObjectReferenceApiVersion = Nothing
  , v2beta1CrossVersionObjectReferenceKind
  , v2beta1CrossVersionObjectReferenceName
  }

-- ** V2beta1ExternalMetricSource
-- | V2beta1ExternalMetricSource
-- 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). Exactly one \"target\" type should be set.
data V2beta1ExternalMetricSource = V2beta1ExternalMetricSource
  { v2beta1ExternalMetricSourceMetricName :: !(Text) -- ^ /Required/ "metricName" - metricName is the name of the metric in question.
  , v2beta1ExternalMetricSourceMetricSelector :: !(Maybe V1LabelSelector) -- ^ "metricSelector"
  , v2beta1ExternalMetricSourceTargetAverageValue :: !(Maybe Quantity) -- ^ "targetAverageValue"
  , v2beta1ExternalMetricSourceTargetValue :: !(Maybe Quantity) -- ^ "targetValue"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta1ExternalMetricSource
instance A.FromJSON V2beta1ExternalMetricSource where
  parseJSON = A.withObject "V2beta1ExternalMetricSource" $ \o ->
    V2beta1ExternalMetricSource
      <$> (o .:  "metricName")
      <*> (o .:? "metricSelector")
      <*> (o .:? "targetAverageValue")
      <*> (o .:? "targetValue")

-- | ToJSON V2beta1ExternalMetricSource
instance A.ToJSON V2beta1ExternalMetricSource where
  toJSON V2beta1ExternalMetricSource {..} =
   _omitNulls
      [ "metricName" .= v2beta1ExternalMetricSourceMetricName
      , "metricSelector" .= v2beta1ExternalMetricSourceMetricSelector
      , "targetAverageValue" .= v2beta1ExternalMetricSourceTargetAverageValue
      , "targetValue" .= v2beta1ExternalMetricSourceTargetValue
      ]


-- | Construct a value of type 'V2beta1ExternalMetricSource' (by applying it's required fields, if any)
mkV2beta1ExternalMetricSource
  :: Text -- ^ 'v2beta1ExternalMetricSourceMetricName': metricName is the name of the metric in question.
  -> V2beta1ExternalMetricSource
mkV2beta1ExternalMetricSource v2beta1ExternalMetricSourceMetricName =
  V2beta1ExternalMetricSource
  { v2beta1ExternalMetricSourceMetricName
  , v2beta1ExternalMetricSourceMetricSelector = Nothing
  , v2beta1ExternalMetricSourceTargetAverageValue = Nothing
  , v2beta1ExternalMetricSourceTargetValue = Nothing
  }

-- ** V2beta1ExternalMetricStatus
-- | V2beta1ExternalMetricStatus
-- ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.
data V2beta1ExternalMetricStatus = V2beta1ExternalMetricStatus
  { v2beta1ExternalMetricStatusCurrentAverageValue :: !(Maybe Quantity) -- ^ "currentAverageValue"
  , v2beta1ExternalMetricStatusCurrentValue :: !(Quantity) -- ^ /Required/ "currentValue"
  , v2beta1ExternalMetricStatusMetricName :: !(Text) -- ^ /Required/ "metricName" - metricName is the name of a metric used for autoscaling in metric system.
  , v2beta1ExternalMetricStatusMetricSelector :: !(Maybe V1LabelSelector) -- ^ "metricSelector"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta1ExternalMetricStatus
instance A.FromJSON V2beta1ExternalMetricStatus where
  parseJSON = A.withObject "V2beta1ExternalMetricStatus" $ \o ->
    V2beta1ExternalMetricStatus
      <$> (o .:? "currentAverageValue")
      <*> (o .:  "currentValue")
      <*> (o .:  "metricName")
      <*> (o .:? "metricSelector")

-- | ToJSON V2beta1ExternalMetricStatus
instance A.ToJSON V2beta1ExternalMetricStatus where
  toJSON V2beta1ExternalMetricStatus {..} =
   _omitNulls
      [ "currentAverageValue" .= v2beta1ExternalMetricStatusCurrentAverageValue
      , "currentValue" .= v2beta1ExternalMetricStatusCurrentValue
      , "metricName" .= v2beta1ExternalMetricStatusMetricName
      , "metricSelector" .= v2beta1ExternalMetricStatusMetricSelector
      ]


-- | Construct a value of type 'V2beta1ExternalMetricStatus' (by applying it's required fields, if any)
mkV2beta1ExternalMetricStatus
  :: Quantity -- ^ 'v2beta1ExternalMetricStatusCurrentValue' 
  -> Text -- ^ 'v2beta1ExternalMetricStatusMetricName': metricName is the name of a metric used for autoscaling in metric system.
  -> V2beta1ExternalMetricStatus
mkV2beta1ExternalMetricStatus v2beta1ExternalMetricStatusCurrentValue v2beta1ExternalMetricStatusMetricName =
  V2beta1ExternalMetricStatus
  { v2beta1ExternalMetricStatusCurrentAverageValue = Nothing
  , v2beta1ExternalMetricStatusCurrentValue
  , v2beta1ExternalMetricStatusMetricName
  , v2beta1ExternalMetricStatusMetricSelector = Nothing
  }

-- ** V2beta1HorizontalPodAutoscaler
-- | V2beta1HorizontalPodAutoscaler
-- 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 V2beta1HorizontalPodAutoscaler = V2beta1HorizontalPodAutoscaler
  { v2beta1HorizontalPodAutoscalerApiVersion :: !(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/api-conventions.md#resources
  , v2beta1HorizontalPodAutoscalerKind :: !(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/api-conventions.md#types-kinds
  , v2beta1HorizontalPodAutoscalerMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v2beta1HorizontalPodAutoscalerSpec :: !(Maybe V2beta1HorizontalPodAutoscalerSpec) -- ^ "spec"
  , v2beta1HorizontalPodAutoscalerStatus :: !(Maybe V2beta1HorizontalPodAutoscalerStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta1HorizontalPodAutoscaler
instance A.FromJSON V2beta1HorizontalPodAutoscaler where
  parseJSON = A.withObject "V2beta1HorizontalPodAutoscaler" $ \o ->
    V2beta1HorizontalPodAutoscaler
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON V2beta1HorizontalPodAutoscaler
instance A.ToJSON V2beta1HorizontalPodAutoscaler where
  toJSON V2beta1HorizontalPodAutoscaler {..} =
   _omitNulls
      [ "apiVersion" .= v2beta1HorizontalPodAutoscalerApiVersion
      , "kind" .= v2beta1HorizontalPodAutoscalerKind
      , "metadata" .= v2beta1HorizontalPodAutoscalerMetadata
      , "spec" .= v2beta1HorizontalPodAutoscalerSpec
      , "status" .= v2beta1HorizontalPodAutoscalerStatus
      ]


-- | Construct a value of type 'V2beta1HorizontalPodAutoscaler' (by applying it's required fields, if any)
mkV2beta1HorizontalPodAutoscaler
  :: V2beta1HorizontalPodAutoscaler
mkV2beta1HorizontalPodAutoscaler =
  V2beta1HorizontalPodAutoscaler
  { v2beta1HorizontalPodAutoscalerApiVersion = Nothing
  , v2beta1HorizontalPodAutoscalerKind = Nothing
  , v2beta1HorizontalPodAutoscalerMetadata = Nothing
  , v2beta1HorizontalPodAutoscalerSpec = Nothing
  , v2beta1HorizontalPodAutoscalerStatus = Nothing
  }

-- ** V2beta1HorizontalPodAutoscalerCondition
-- | V2beta1HorizontalPodAutoscalerCondition
-- HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.
data V2beta1HorizontalPodAutoscalerCondition = V2beta1HorizontalPodAutoscalerCondition
  { v2beta1HorizontalPodAutoscalerConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - lastTransitionTime is the last time the condition transitioned from one status to another
  , v2beta1HorizontalPodAutoscalerConditionMessage :: !(Maybe Text) -- ^ "message" - message is a human-readable explanation containing details about the transition
  , v2beta1HorizontalPodAutoscalerConditionReason :: !(Maybe Text) -- ^ "reason" - reason is the reason for the condition&#39;s last transition.
  , v2beta1HorizontalPodAutoscalerConditionStatus :: !(Text) -- ^ /Required/ "status" - status is the status of the condition (True, False, Unknown)
  , v2beta1HorizontalPodAutoscalerConditionType :: !(Text) -- ^ /Required/ "type" - type describes the current condition
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta1HorizontalPodAutoscalerCondition
instance A.FromJSON V2beta1HorizontalPodAutoscalerCondition where
  parseJSON = A.withObject "V2beta1HorizontalPodAutoscalerCondition" $ \o ->
    V2beta1HorizontalPodAutoscalerCondition
      <$> (o .:? "lastTransitionTime")
      <*> (o .:? "message")
      <*> (o .:? "reason")
      <*> (o .:  "status")
      <*> (o .:  "type")

-- | ToJSON V2beta1HorizontalPodAutoscalerCondition
instance A.ToJSON V2beta1HorizontalPodAutoscalerCondition where
  toJSON V2beta1HorizontalPodAutoscalerCondition {..} =
   _omitNulls
      [ "lastTransitionTime" .= v2beta1HorizontalPodAutoscalerConditionLastTransitionTime
      , "message" .= v2beta1HorizontalPodAutoscalerConditionMessage
      , "reason" .= v2beta1HorizontalPodAutoscalerConditionReason
      , "status" .= v2beta1HorizontalPodAutoscalerConditionStatus
      , "type" .= v2beta1HorizontalPodAutoscalerConditionType
      ]


-- | Construct a value of type 'V2beta1HorizontalPodAutoscalerCondition' (by applying it's required fields, if any)
mkV2beta1HorizontalPodAutoscalerCondition
  :: Text -- ^ 'v2beta1HorizontalPodAutoscalerConditionStatus': status is the status of the condition (True, False, Unknown)
  -> Text -- ^ 'v2beta1HorizontalPodAutoscalerConditionType': type describes the current condition
  -> V2beta1HorizontalPodAutoscalerCondition
mkV2beta1HorizontalPodAutoscalerCondition v2beta1HorizontalPodAutoscalerConditionStatus v2beta1HorizontalPodAutoscalerConditionType =
  V2beta1HorizontalPodAutoscalerCondition
  { v2beta1HorizontalPodAutoscalerConditionLastTransitionTime = Nothing
  , v2beta1HorizontalPodAutoscalerConditionMessage = Nothing
  , v2beta1HorizontalPodAutoscalerConditionReason = Nothing
  , v2beta1HorizontalPodAutoscalerConditionStatus
  , v2beta1HorizontalPodAutoscalerConditionType
  }

-- ** V2beta1HorizontalPodAutoscalerList
-- | V2beta1HorizontalPodAutoscalerList
-- HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects.
data V2beta1HorizontalPodAutoscalerList = V2beta1HorizontalPodAutoscalerList
  { v2beta1HorizontalPodAutoscalerListApiVersion :: !(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/api-conventions.md#resources
  , v2beta1HorizontalPodAutoscalerListItems :: !([V2beta1HorizontalPodAutoscaler]) -- ^ /Required/ "items" - items is the list of horizontal pod autoscaler objects.
  , v2beta1HorizontalPodAutoscalerListKind :: !(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/api-conventions.md#types-kinds
  , v2beta1HorizontalPodAutoscalerListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta1HorizontalPodAutoscalerList
instance A.FromJSON V2beta1HorizontalPodAutoscalerList where
  parseJSON = A.withObject "V2beta1HorizontalPodAutoscalerList" $ \o ->
    V2beta1HorizontalPodAutoscalerList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V2beta1HorizontalPodAutoscalerList
instance A.ToJSON V2beta1HorizontalPodAutoscalerList where
  toJSON V2beta1HorizontalPodAutoscalerList {..} =
   _omitNulls
      [ "apiVersion" .= v2beta1HorizontalPodAutoscalerListApiVersion
      , "items" .= v2beta1HorizontalPodAutoscalerListItems
      , "kind" .= v2beta1HorizontalPodAutoscalerListKind
      , "metadata" .= v2beta1HorizontalPodAutoscalerListMetadata
      ]


-- | Construct a value of type 'V2beta1HorizontalPodAutoscalerList' (by applying it's required fields, if any)
mkV2beta1HorizontalPodAutoscalerList
  :: [V2beta1HorizontalPodAutoscaler] -- ^ 'v2beta1HorizontalPodAutoscalerListItems': items is the list of horizontal pod autoscaler objects.
  -> V2beta1HorizontalPodAutoscalerList
mkV2beta1HorizontalPodAutoscalerList v2beta1HorizontalPodAutoscalerListItems =
  V2beta1HorizontalPodAutoscalerList
  { v2beta1HorizontalPodAutoscalerListApiVersion = Nothing
  , v2beta1HorizontalPodAutoscalerListItems
  , v2beta1HorizontalPodAutoscalerListKind = Nothing
  , v2beta1HorizontalPodAutoscalerListMetadata = Nothing
  }

-- ** V2beta1HorizontalPodAutoscalerSpec
-- | V2beta1HorizontalPodAutoscalerSpec
-- HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.
data V2beta1HorizontalPodAutoscalerSpec = V2beta1HorizontalPodAutoscalerSpec
  { v2beta1HorizontalPodAutoscalerSpecMaxReplicas :: !(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.
  , v2beta1HorizontalPodAutoscalerSpecMetrics :: !(Maybe [V2beta1MetricSpec]) -- ^ "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.
  , v2beta1HorizontalPodAutoscalerSpecMinReplicas :: !(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.
  , v2beta1HorizontalPodAutoscalerSpecScaleTargetRef :: !(V2beta1CrossVersionObjectReference) -- ^ /Required/ "scaleTargetRef"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta1HorizontalPodAutoscalerSpec
instance A.FromJSON V2beta1HorizontalPodAutoscalerSpec where
  parseJSON = A.withObject "V2beta1HorizontalPodAutoscalerSpec" $ \o ->
    V2beta1HorizontalPodAutoscalerSpec
      <$> (o .:  "maxReplicas")
      <*> (o .:? "metrics")
      <*> (o .:? "minReplicas")
      <*> (o .:  "scaleTargetRef")

-- | ToJSON V2beta1HorizontalPodAutoscalerSpec
instance A.ToJSON V2beta1HorizontalPodAutoscalerSpec where
  toJSON V2beta1HorizontalPodAutoscalerSpec {..} =
   _omitNulls
      [ "maxReplicas" .= v2beta1HorizontalPodAutoscalerSpecMaxReplicas
      , "metrics" .= v2beta1HorizontalPodAutoscalerSpecMetrics
      , "minReplicas" .= v2beta1HorizontalPodAutoscalerSpecMinReplicas
      , "scaleTargetRef" .= v2beta1HorizontalPodAutoscalerSpecScaleTargetRef
      ]


-- | Construct a value of type 'V2beta1HorizontalPodAutoscalerSpec' (by applying it's required fields, if any)
mkV2beta1HorizontalPodAutoscalerSpec
  :: Int -- ^ 'v2beta1HorizontalPodAutoscalerSpecMaxReplicas': maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas.
  -> V2beta1CrossVersionObjectReference -- ^ 'v2beta1HorizontalPodAutoscalerSpecScaleTargetRef' 
  -> V2beta1HorizontalPodAutoscalerSpec
mkV2beta1HorizontalPodAutoscalerSpec v2beta1HorizontalPodAutoscalerSpecMaxReplicas v2beta1HorizontalPodAutoscalerSpecScaleTargetRef =
  V2beta1HorizontalPodAutoscalerSpec
  { v2beta1HorizontalPodAutoscalerSpecMaxReplicas
  , v2beta1HorizontalPodAutoscalerSpecMetrics = Nothing
  , v2beta1HorizontalPodAutoscalerSpecMinReplicas = Nothing
  , v2beta1HorizontalPodAutoscalerSpecScaleTargetRef
  }

-- ** V2beta1HorizontalPodAutoscalerStatus
-- | V2beta1HorizontalPodAutoscalerStatus
-- HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.
data V2beta1HorizontalPodAutoscalerStatus = V2beta1HorizontalPodAutoscalerStatus
  { v2beta1HorizontalPodAutoscalerStatusConditions :: !([V2beta1HorizontalPodAutoscalerCondition]) -- ^ /Required/ "conditions" - conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met.
  , v2beta1HorizontalPodAutoscalerStatusCurrentMetrics :: !(Maybe [V2beta1MetricStatus]) -- ^ "currentMetrics" - currentMetrics is the last read state of the metrics used by this autoscaler.
  , v2beta1HorizontalPodAutoscalerStatusCurrentReplicas :: !(Int) -- ^ /Required/ "currentReplicas" - currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler.
  , v2beta1HorizontalPodAutoscalerStatusDesiredReplicas :: !(Int) -- ^ /Required/ "desiredReplicas" - desiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler.
  , v2beta1HorizontalPodAutoscalerStatusLastScaleTime :: !(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.
  , v2beta1HorizontalPodAutoscalerStatusObservedGeneration :: !(Maybe Integer) -- ^ "observedGeneration" - observedGeneration is the most recent generation observed by this autoscaler.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta1HorizontalPodAutoscalerStatus
instance A.FromJSON V2beta1HorizontalPodAutoscalerStatus where
  parseJSON = A.withObject "V2beta1HorizontalPodAutoscalerStatus" $ \o ->
    V2beta1HorizontalPodAutoscalerStatus
      <$> (o .:  "conditions")
      <*> (o .:? "currentMetrics")
      <*> (o .:  "currentReplicas")
      <*> (o .:  "desiredReplicas")
      <*> (o .:? "lastScaleTime")
      <*> (o .:? "observedGeneration")

-- | ToJSON V2beta1HorizontalPodAutoscalerStatus
instance A.ToJSON V2beta1HorizontalPodAutoscalerStatus where
  toJSON V2beta1HorizontalPodAutoscalerStatus {..} =
   _omitNulls
      [ "conditions" .= v2beta1HorizontalPodAutoscalerStatusConditions
      , "currentMetrics" .= v2beta1HorizontalPodAutoscalerStatusCurrentMetrics
      , "currentReplicas" .= v2beta1HorizontalPodAutoscalerStatusCurrentReplicas
      , "desiredReplicas" .= v2beta1HorizontalPodAutoscalerStatusDesiredReplicas
      , "lastScaleTime" .= v2beta1HorizontalPodAutoscalerStatusLastScaleTime
      , "observedGeneration" .= v2beta1HorizontalPodAutoscalerStatusObservedGeneration
      ]


-- | Construct a value of type 'V2beta1HorizontalPodAutoscalerStatus' (by applying it's required fields, if any)
mkV2beta1HorizontalPodAutoscalerStatus
  :: [V2beta1HorizontalPodAutoscalerCondition] -- ^ 'v2beta1HorizontalPodAutoscalerStatusConditions': conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met.
  -> Int -- ^ 'v2beta1HorizontalPodAutoscalerStatusCurrentReplicas': currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler.
  -> Int -- ^ 'v2beta1HorizontalPodAutoscalerStatusDesiredReplicas': desiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler.
  -> V2beta1HorizontalPodAutoscalerStatus
mkV2beta1HorizontalPodAutoscalerStatus v2beta1HorizontalPodAutoscalerStatusConditions v2beta1HorizontalPodAutoscalerStatusCurrentReplicas v2beta1HorizontalPodAutoscalerStatusDesiredReplicas =
  V2beta1HorizontalPodAutoscalerStatus
  { v2beta1HorizontalPodAutoscalerStatusConditions
  , v2beta1HorizontalPodAutoscalerStatusCurrentMetrics = Nothing
  , v2beta1HorizontalPodAutoscalerStatusCurrentReplicas
  , v2beta1HorizontalPodAutoscalerStatusDesiredReplicas
  , v2beta1HorizontalPodAutoscalerStatusLastScaleTime = Nothing
  , v2beta1HorizontalPodAutoscalerStatusObservedGeneration = Nothing
  }

-- ** V2beta1MetricSpec
-- | V2beta1MetricSpec
-- MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).
data V2beta1MetricSpec = V2beta1MetricSpec
  { v2beta1MetricSpecExternal :: !(Maybe V2beta1ExternalMetricSource) -- ^ "external"
  , v2beta1MetricSpecObject :: !(Maybe V2beta1ObjectMetricSource) -- ^ "object"
  , v2beta1MetricSpecPods :: !(Maybe V2beta1PodsMetricSource) -- ^ "pods"
  , v2beta1MetricSpecResource :: !(Maybe V2beta1ResourceMetricSource) -- ^ "resource"
  , v2beta1MetricSpecType :: !(Text) -- ^ /Required/ "type" - type is the type of metric source.  It should be one of \&quot;Object\&quot;, \&quot;Pods\&quot; or \&quot;Resource\&quot;, each mapping to a matching field in the object.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta1MetricSpec
instance A.FromJSON V2beta1MetricSpec where
  parseJSON = A.withObject "V2beta1MetricSpec" $ \o ->
    V2beta1MetricSpec
      <$> (o .:? "external")
      <*> (o .:? "object")
      <*> (o .:? "pods")
      <*> (o .:? "resource")
      <*> (o .:  "type")

-- | ToJSON V2beta1MetricSpec
instance A.ToJSON V2beta1MetricSpec where
  toJSON V2beta1MetricSpec {..} =
   _omitNulls
      [ "external" .= v2beta1MetricSpecExternal
      , "object" .= v2beta1MetricSpecObject
      , "pods" .= v2beta1MetricSpecPods
      , "resource" .= v2beta1MetricSpecResource
      , "type" .= v2beta1MetricSpecType
      ]


-- | Construct a value of type 'V2beta1MetricSpec' (by applying it's required fields, if any)
mkV2beta1MetricSpec
  :: Text -- ^ 'v2beta1MetricSpecType': type is the type of metric source.  It should be one of \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object.
  -> V2beta1MetricSpec
mkV2beta1MetricSpec v2beta1MetricSpecType =
  V2beta1MetricSpec
  { v2beta1MetricSpecExternal = Nothing
  , v2beta1MetricSpecObject = Nothing
  , v2beta1MetricSpecPods = Nothing
  , v2beta1MetricSpecResource = Nothing
  , v2beta1MetricSpecType
  }

-- ** V2beta1MetricStatus
-- | V2beta1MetricStatus
-- MetricStatus describes the last-read state of a single metric.
data V2beta1MetricStatus = V2beta1MetricStatus
  { v2beta1MetricStatusExternal :: !(Maybe V2beta1ExternalMetricStatus) -- ^ "external"
  , v2beta1MetricStatusObject :: !(Maybe V2beta1ObjectMetricStatus) -- ^ "object"
  , v2beta1MetricStatusPods :: !(Maybe V2beta1PodsMetricStatus) -- ^ "pods"
  , v2beta1MetricStatusResource :: !(Maybe V2beta1ResourceMetricStatus) -- ^ "resource"
  , v2beta1MetricStatusType :: !(Text) -- ^ /Required/ "type" - type is the type of metric source.  It will be one of \&quot;Object\&quot;, \&quot;Pods\&quot; or \&quot;Resource\&quot;, each corresponds to a matching field in the object.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta1MetricStatus
instance A.FromJSON V2beta1MetricStatus where
  parseJSON = A.withObject "V2beta1MetricStatus" $ \o ->
    V2beta1MetricStatus
      <$> (o .:? "external")
      <*> (o .:? "object")
      <*> (o .:? "pods")
      <*> (o .:? "resource")
      <*> (o .:  "type")

-- | ToJSON V2beta1MetricStatus
instance A.ToJSON V2beta1MetricStatus where
  toJSON V2beta1MetricStatus {..} =
   _omitNulls
      [ "external" .= v2beta1MetricStatusExternal
      , "object" .= v2beta1MetricStatusObject
      , "pods" .= v2beta1MetricStatusPods
      , "resource" .= v2beta1MetricStatusResource
      , "type" .= v2beta1MetricStatusType
      ]


-- | Construct a value of type 'V2beta1MetricStatus' (by applying it's required fields, if any)
mkV2beta1MetricStatus
  :: Text -- ^ 'v2beta1MetricStatusType': type is the type of metric source.  It will be one of \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object.
  -> V2beta1MetricStatus
mkV2beta1MetricStatus v2beta1MetricStatusType =
  V2beta1MetricStatus
  { v2beta1MetricStatusExternal = Nothing
  , v2beta1MetricStatusObject = Nothing
  , v2beta1MetricStatusPods = Nothing
  , v2beta1MetricStatusResource = Nothing
  , v2beta1MetricStatusType
  }

-- ** V2beta1ObjectMetricSource
-- | V2beta1ObjectMetricSource
-- ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).
data V2beta1ObjectMetricSource = V2beta1ObjectMetricSource
  { v2beta1ObjectMetricSourceAverageValue :: !(Maybe Quantity) -- ^ "averageValue"
  , v2beta1ObjectMetricSourceMetricName :: !(Text) -- ^ /Required/ "metricName" - metricName is the name of the metric in question.
  , v2beta1ObjectMetricSourceSelector :: !(Maybe V1LabelSelector) -- ^ "selector"
  , v2beta1ObjectMetricSourceTarget :: !(V2beta1CrossVersionObjectReference) -- ^ /Required/ "target"
  , v2beta1ObjectMetricSourceTargetValue :: !(Quantity) -- ^ /Required/ "targetValue"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta1ObjectMetricSource
instance A.FromJSON V2beta1ObjectMetricSource where
  parseJSON = A.withObject "V2beta1ObjectMetricSource" $ \o ->
    V2beta1ObjectMetricSource
      <$> (o .:? "averageValue")
      <*> (o .:  "metricName")
      <*> (o .:? "selector")
      <*> (o .:  "target")
      <*> (o .:  "targetValue")

-- | ToJSON V2beta1ObjectMetricSource
instance A.ToJSON V2beta1ObjectMetricSource where
  toJSON V2beta1ObjectMetricSource {..} =
   _omitNulls
      [ "averageValue" .= v2beta1ObjectMetricSourceAverageValue
      , "metricName" .= v2beta1ObjectMetricSourceMetricName
      , "selector" .= v2beta1ObjectMetricSourceSelector
      , "target" .= v2beta1ObjectMetricSourceTarget
      , "targetValue" .= v2beta1ObjectMetricSourceTargetValue
      ]


-- | Construct a value of type 'V2beta1ObjectMetricSource' (by applying it's required fields, if any)
mkV2beta1ObjectMetricSource
  :: Text -- ^ 'v2beta1ObjectMetricSourceMetricName': metricName is the name of the metric in question.
  -> V2beta1CrossVersionObjectReference -- ^ 'v2beta1ObjectMetricSourceTarget' 
  -> Quantity -- ^ 'v2beta1ObjectMetricSourceTargetValue' 
  -> V2beta1ObjectMetricSource
mkV2beta1ObjectMetricSource v2beta1ObjectMetricSourceMetricName v2beta1ObjectMetricSourceTarget v2beta1ObjectMetricSourceTargetValue =
  V2beta1ObjectMetricSource
  { v2beta1ObjectMetricSourceAverageValue = Nothing
  , v2beta1ObjectMetricSourceMetricName
  , v2beta1ObjectMetricSourceSelector = Nothing
  , v2beta1ObjectMetricSourceTarget
  , v2beta1ObjectMetricSourceTargetValue
  }

-- ** V2beta1ObjectMetricStatus
-- | V2beta1ObjectMetricStatus
-- ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).
data V2beta1ObjectMetricStatus = V2beta1ObjectMetricStatus
  { v2beta1ObjectMetricStatusAverageValue :: !(Maybe Quantity) -- ^ "averageValue"
  , v2beta1ObjectMetricStatusCurrentValue :: !(Quantity) -- ^ /Required/ "currentValue"
  , v2beta1ObjectMetricStatusMetricName :: !(Text) -- ^ /Required/ "metricName" - metricName is the name of the metric in question.
  , v2beta1ObjectMetricStatusSelector :: !(Maybe V1LabelSelector) -- ^ "selector"
  , v2beta1ObjectMetricStatusTarget :: !(V2beta1CrossVersionObjectReference) -- ^ /Required/ "target"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta1ObjectMetricStatus
instance A.FromJSON V2beta1ObjectMetricStatus where
  parseJSON = A.withObject "V2beta1ObjectMetricStatus" $ \o ->
    V2beta1ObjectMetricStatus
      <$> (o .:? "averageValue")
      <*> (o .:  "currentValue")
      <*> (o .:  "metricName")
      <*> (o .:? "selector")
      <*> (o .:  "target")

-- | ToJSON V2beta1ObjectMetricStatus
instance A.ToJSON V2beta1ObjectMetricStatus where
  toJSON V2beta1ObjectMetricStatus {..} =
   _omitNulls
      [ "averageValue" .= v2beta1ObjectMetricStatusAverageValue
      , "currentValue" .= v2beta1ObjectMetricStatusCurrentValue
      , "metricName" .= v2beta1ObjectMetricStatusMetricName
      , "selector" .= v2beta1ObjectMetricStatusSelector
      , "target" .= v2beta1ObjectMetricStatusTarget
      ]


-- | Construct a value of type 'V2beta1ObjectMetricStatus' (by applying it's required fields, if any)
mkV2beta1ObjectMetricStatus
  :: Quantity -- ^ 'v2beta1ObjectMetricStatusCurrentValue' 
  -> Text -- ^ 'v2beta1ObjectMetricStatusMetricName': metricName is the name of the metric in question.
  -> V2beta1CrossVersionObjectReference -- ^ 'v2beta1ObjectMetricStatusTarget' 
  -> V2beta1ObjectMetricStatus
mkV2beta1ObjectMetricStatus v2beta1ObjectMetricStatusCurrentValue v2beta1ObjectMetricStatusMetricName v2beta1ObjectMetricStatusTarget =
  V2beta1ObjectMetricStatus
  { v2beta1ObjectMetricStatusAverageValue = Nothing
  , v2beta1ObjectMetricStatusCurrentValue
  , v2beta1ObjectMetricStatusMetricName
  , v2beta1ObjectMetricStatusSelector = Nothing
  , v2beta1ObjectMetricStatusTarget
  }

-- ** V2beta1PodsMetricSource
-- | V2beta1PodsMetricSource
-- 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 V2beta1PodsMetricSource = V2beta1PodsMetricSource
  { v2beta1PodsMetricSourceMetricName :: !(Text) -- ^ /Required/ "metricName" - metricName is the name of the metric in question
  , v2beta1PodsMetricSourceSelector :: !(Maybe V1LabelSelector) -- ^ "selector"
  , v2beta1PodsMetricSourceTargetAverageValue :: !(Quantity) -- ^ /Required/ "targetAverageValue"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta1PodsMetricSource
instance A.FromJSON V2beta1PodsMetricSource where
  parseJSON = A.withObject "V2beta1PodsMetricSource" $ \o ->
    V2beta1PodsMetricSource
      <$> (o .:  "metricName")
      <*> (o .:? "selector")
      <*> (o .:  "targetAverageValue")

-- | ToJSON V2beta1PodsMetricSource
instance A.ToJSON V2beta1PodsMetricSource where
  toJSON V2beta1PodsMetricSource {..} =
   _omitNulls
      [ "metricName" .= v2beta1PodsMetricSourceMetricName
      , "selector" .= v2beta1PodsMetricSourceSelector
      , "targetAverageValue" .= v2beta1PodsMetricSourceTargetAverageValue
      ]


-- | Construct a value of type 'V2beta1PodsMetricSource' (by applying it's required fields, if any)
mkV2beta1PodsMetricSource
  :: Text -- ^ 'v2beta1PodsMetricSourceMetricName': metricName is the name of the metric in question
  -> Quantity -- ^ 'v2beta1PodsMetricSourceTargetAverageValue' 
  -> V2beta1PodsMetricSource
mkV2beta1PodsMetricSource v2beta1PodsMetricSourceMetricName v2beta1PodsMetricSourceTargetAverageValue =
  V2beta1PodsMetricSource
  { v2beta1PodsMetricSourceMetricName
  , v2beta1PodsMetricSourceSelector = Nothing
  , v2beta1PodsMetricSourceTargetAverageValue
  }

-- ** V2beta1PodsMetricStatus
-- | V2beta1PodsMetricStatus
-- PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).
data V2beta1PodsMetricStatus = V2beta1PodsMetricStatus
  { v2beta1PodsMetricStatusCurrentAverageValue :: !(Quantity) -- ^ /Required/ "currentAverageValue"
  , v2beta1PodsMetricStatusMetricName :: !(Text) -- ^ /Required/ "metricName" - metricName is the name of the metric in question
  , v2beta1PodsMetricStatusSelector :: !(Maybe V1LabelSelector) -- ^ "selector"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta1PodsMetricStatus
instance A.FromJSON V2beta1PodsMetricStatus where
  parseJSON = A.withObject "V2beta1PodsMetricStatus" $ \o ->
    V2beta1PodsMetricStatus
      <$> (o .:  "currentAverageValue")
      <*> (o .:  "metricName")
      <*> (o .:? "selector")

-- | ToJSON V2beta1PodsMetricStatus
instance A.ToJSON V2beta1PodsMetricStatus where
  toJSON V2beta1PodsMetricStatus {..} =
   _omitNulls
      [ "currentAverageValue" .= v2beta1PodsMetricStatusCurrentAverageValue
      , "metricName" .= v2beta1PodsMetricStatusMetricName
      , "selector" .= v2beta1PodsMetricStatusSelector
      ]


-- | Construct a value of type 'V2beta1PodsMetricStatus' (by applying it's required fields, if any)
mkV2beta1PodsMetricStatus
  :: Quantity -- ^ 'v2beta1PodsMetricStatusCurrentAverageValue' 
  -> Text -- ^ 'v2beta1PodsMetricStatusMetricName': metricName is the name of the metric in question
  -> V2beta1PodsMetricStatus
mkV2beta1PodsMetricStatus v2beta1PodsMetricStatusCurrentAverageValue v2beta1PodsMetricStatusMetricName =
  V2beta1PodsMetricStatus
  { v2beta1PodsMetricStatusCurrentAverageValue
  , v2beta1PodsMetricStatusMetricName
  , v2beta1PodsMetricStatusSelector = Nothing
  }

-- ** V2beta1ResourceMetricSource
-- | V2beta1ResourceMetricSource
-- 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 V2beta1ResourceMetricSource = V2beta1ResourceMetricSource
  { v2beta1ResourceMetricSourceName :: !(Text) -- ^ /Required/ "name" - name is the name of the resource in question.
  , v2beta1ResourceMetricSourceTargetAverageUtilization :: !(Maybe Int) -- ^ "targetAverageUtilization" - targetAverageUtilization 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.
  , v2beta1ResourceMetricSourceTargetAverageValue :: !(Maybe Quantity) -- ^ "targetAverageValue"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta1ResourceMetricSource
instance A.FromJSON V2beta1ResourceMetricSource where
  parseJSON = A.withObject "V2beta1ResourceMetricSource" $ \o ->
    V2beta1ResourceMetricSource
      <$> (o .:  "name")
      <*> (o .:? "targetAverageUtilization")
      <*> (o .:? "targetAverageValue")

-- | ToJSON V2beta1ResourceMetricSource
instance A.ToJSON V2beta1ResourceMetricSource where
  toJSON V2beta1ResourceMetricSource {..} =
   _omitNulls
      [ "name" .= v2beta1ResourceMetricSourceName
      , "targetAverageUtilization" .= v2beta1ResourceMetricSourceTargetAverageUtilization
      , "targetAverageValue" .= v2beta1ResourceMetricSourceTargetAverageValue
      ]


-- | Construct a value of type 'V2beta1ResourceMetricSource' (by applying it's required fields, if any)
mkV2beta1ResourceMetricSource
  :: Text -- ^ 'v2beta1ResourceMetricSourceName': name is the name of the resource in question.
  -> V2beta1ResourceMetricSource
mkV2beta1ResourceMetricSource v2beta1ResourceMetricSourceName =
  V2beta1ResourceMetricSource
  { v2beta1ResourceMetricSourceName
  , v2beta1ResourceMetricSourceTargetAverageUtilization = Nothing
  , v2beta1ResourceMetricSourceTargetAverageValue = Nothing
  }

-- ** V2beta1ResourceMetricStatus
-- | V2beta1ResourceMetricStatus
-- 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 V2beta1ResourceMetricStatus = V2beta1ResourceMetricStatus
  { v2beta1ResourceMetricStatusCurrentAverageUtilization :: !(Maybe Int) -- ^ "currentAverageUtilization" - 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.  It will only be present if &#x60;targetAverageValue&#x60; was set in the corresponding metric specification.
  , v2beta1ResourceMetricStatusCurrentAverageValue :: !(Quantity) -- ^ /Required/ "currentAverageValue"
  , v2beta1ResourceMetricStatusName :: !(Text) -- ^ /Required/ "name" - name is the name of the resource in question.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta1ResourceMetricStatus
instance A.FromJSON V2beta1ResourceMetricStatus where
  parseJSON = A.withObject "V2beta1ResourceMetricStatus" $ \o ->
    V2beta1ResourceMetricStatus
      <$> (o .:? "currentAverageUtilization")
      <*> (o .:  "currentAverageValue")
      <*> (o .:  "name")

-- | ToJSON V2beta1ResourceMetricStatus
instance A.ToJSON V2beta1ResourceMetricStatus where
  toJSON V2beta1ResourceMetricStatus {..} =
   _omitNulls
      [ "currentAverageUtilization" .= v2beta1ResourceMetricStatusCurrentAverageUtilization
      , "currentAverageValue" .= v2beta1ResourceMetricStatusCurrentAverageValue
      , "name" .= v2beta1ResourceMetricStatusName
      ]


-- | Construct a value of type 'V2beta1ResourceMetricStatus' (by applying it's required fields, if any)
mkV2beta1ResourceMetricStatus
  :: Quantity -- ^ 'v2beta1ResourceMetricStatusCurrentAverageValue' 
  -> Text -- ^ 'v2beta1ResourceMetricStatusName': name is the name of the resource in question.
  -> V2beta1ResourceMetricStatus
mkV2beta1ResourceMetricStatus v2beta1ResourceMetricStatusCurrentAverageValue v2beta1ResourceMetricStatusName =
  V2beta1ResourceMetricStatus
  { v2beta1ResourceMetricStatusCurrentAverageUtilization = Nothing
  , v2beta1ResourceMetricStatusCurrentAverageValue
  , v2beta1ResourceMetricStatusName
  }

-- ** V2beta2CrossVersionObjectReference
-- | V2beta2CrossVersionObjectReference
-- CrossVersionObjectReference contains enough information to let you identify the referred resource.
data V2beta2CrossVersionObjectReference = V2beta2CrossVersionObjectReference
  { v2beta2CrossVersionObjectReferenceApiVersion :: !(Maybe Text) -- ^ "apiVersion" - API version of the referent
  , v2beta2CrossVersionObjectReferenceKind :: !(Text) -- ^ /Required/ "kind" - Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds\&quot;
  , v2beta2CrossVersionObjectReferenceName :: !(Text) -- ^ /Required/ "name" - Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta2CrossVersionObjectReference
instance A.FromJSON V2beta2CrossVersionObjectReference where
  parseJSON = A.withObject "V2beta2CrossVersionObjectReference" $ \o ->
    V2beta2CrossVersionObjectReference
      <$> (o .:? "apiVersion")
      <*> (o .:  "kind")
      <*> (o .:  "name")

-- | ToJSON V2beta2CrossVersionObjectReference
instance A.ToJSON V2beta2CrossVersionObjectReference where
  toJSON V2beta2CrossVersionObjectReference {..} =
   _omitNulls
      [ "apiVersion" .= v2beta2CrossVersionObjectReferenceApiVersion
      , "kind" .= v2beta2CrossVersionObjectReferenceKind
      , "name" .= v2beta2CrossVersionObjectReferenceName
      ]


-- | Construct a value of type 'V2beta2CrossVersionObjectReference' (by applying it's required fields, if any)
mkV2beta2CrossVersionObjectReference
  :: Text -- ^ 'v2beta2CrossVersionObjectReferenceKind': Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds\"
  -> Text -- ^ 'v2beta2CrossVersionObjectReferenceName': Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
  -> V2beta2CrossVersionObjectReference
mkV2beta2CrossVersionObjectReference v2beta2CrossVersionObjectReferenceKind v2beta2CrossVersionObjectReferenceName =
  V2beta2CrossVersionObjectReference
  { v2beta2CrossVersionObjectReferenceApiVersion = Nothing
  , v2beta2CrossVersionObjectReferenceKind
  , v2beta2CrossVersionObjectReferenceName
  }

-- ** V2beta2ExternalMetricSource
-- | V2beta2ExternalMetricSource
-- 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 V2beta2ExternalMetricSource = V2beta2ExternalMetricSource
  { v2beta2ExternalMetricSourceMetric :: !(V2beta2MetricIdentifier) -- ^ /Required/ "metric"
  , v2beta2ExternalMetricSourceTarget :: !(V2beta2MetricTarget) -- ^ /Required/ "target"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta2ExternalMetricSource
instance A.FromJSON V2beta2ExternalMetricSource where
  parseJSON = A.withObject "V2beta2ExternalMetricSource" $ \o ->
    V2beta2ExternalMetricSource
      <$> (o .:  "metric")
      <*> (o .:  "target")

-- | ToJSON V2beta2ExternalMetricSource
instance A.ToJSON V2beta2ExternalMetricSource where
  toJSON V2beta2ExternalMetricSource {..} =
   _omitNulls
      [ "metric" .= v2beta2ExternalMetricSourceMetric
      , "target" .= v2beta2ExternalMetricSourceTarget
      ]


-- | Construct a value of type 'V2beta2ExternalMetricSource' (by applying it's required fields, if any)
mkV2beta2ExternalMetricSource
  :: V2beta2MetricIdentifier -- ^ 'v2beta2ExternalMetricSourceMetric' 
  -> V2beta2MetricTarget -- ^ 'v2beta2ExternalMetricSourceTarget' 
  -> V2beta2ExternalMetricSource
mkV2beta2ExternalMetricSource v2beta2ExternalMetricSourceMetric v2beta2ExternalMetricSourceTarget =
  V2beta2ExternalMetricSource
  { v2beta2ExternalMetricSourceMetric
  , v2beta2ExternalMetricSourceTarget
  }

-- ** V2beta2ExternalMetricStatus
-- | V2beta2ExternalMetricStatus
-- ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.
data V2beta2ExternalMetricStatus = V2beta2ExternalMetricStatus
  { v2beta2ExternalMetricStatusCurrent :: !(V2beta2MetricValueStatus) -- ^ /Required/ "current"
  , v2beta2ExternalMetricStatusMetric :: !(V2beta2MetricIdentifier) -- ^ /Required/ "metric"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta2ExternalMetricStatus
instance A.FromJSON V2beta2ExternalMetricStatus where
  parseJSON = A.withObject "V2beta2ExternalMetricStatus" $ \o ->
    V2beta2ExternalMetricStatus
      <$> (o .:  "current")
      <*> (o .:  "metric")

-- | ToJSON V2beta2ExternalMetricStatus
instance A.ToJSON V2beta2ExternalMetricStatus where
  toJSON V2beta2ExternalMetricStatus {..} =
   _omitNulls
      [ "current" .= v2beta2ExternalMetricStatusCurrent
      , "metric" .= v2beta2ExternalMetricStatusMetric
      ]


-- | Construct a value of type 'V2beta2ExternalMetricStatus' (by applying it's required fields, if any)
mkV2beta2ExternalMetricStatus
  :: V2beta2MetricValueStatus -- ^ 'v2beta2ExternalMetricStatusCurrent' 
  -> V2beta2MetricIdentifier -- ^ 'v2beta2ExternalMetricStatusMetric' 
  -> V2beta2ExternalMetricStatus
mkV2beta2ExternalMetricStatus v2beta2ExternalMetricStatusCurrent v2beta2ExternalMetricStatusMetric =
  V2beta2ExternalMetricStatus
  { v2beta2ExternalMetricStatusCurrent
  , v2beta2ExternalMetricStatusMetric
  }

-- ** V2beta2HorizontalPodAutoscaler
-- | V2beta2HorizontalPodAutoscaler
-- 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 V2beta2HorizontalPodAutoscaler = V2beta2HorizontalPodAutoscaler
  { v2beta2HorizontalPodAutoscalerApiVersion :: !(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/api-conventions.md#resources
  , v2beta2HorizontalPodAutoscalerKind :: !(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/api-conventions.md#types-kinds
  , v2beta2HorizontalPodAutoscalerMetadata :: !(Maybe V1ObjectMeta) -- ^ "metadata"
  , v2beta2HorizontalPodAutoscalerSpec :: !(Maybe V2beta2HorizontalPodAutoscalerSpec) -- ^ "spec"
  , v2beta2HorizontalPodAutoscalerStatus :: !(Maybe V2beta2HorizontalPodAutoscalerStatus) -- ^ "status"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta2HorizontalPodAutoscaler
instance A.FromJSON V2beta2HorizontalPodAutoscaler where
  parseJSON = A.withObject "V2beta2HorizontalPodAutoscaler" $ \o ->
    V2beta2HorizontalPodAutoscaler
      <$> (o .:? "apiVersion")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")
      <*> (o .:? "spec")
      <*> (o .:? "status")

-- | ToJSON V2beta2HorizontalPodAutoscaler
instance A.ToJSON V2beta2HorizontalPodAutoscaler where
  toJSON V2beta2HorizontalPodAutoscaler {..} =
   _omitNulls
      [ "apiVersion" .= v2beta2HorizontalPodAutoscalerApiVersion
      , "kind" .= v2beta2HorizontalPodAutoscalerKind
      , "metadata" .= v2beta2HorizontalPodAutoscalerMetadata
      , "spec" .= v2beta2HorizontalPodAutoscalerSpec
      , "status" .= v2beta2HorizontalPodAutoscalerStatus
      ]


-- | Construct a value of type 'V2beta2HorizontalPodAutoscaler' (by applying it's required fields, if any)
mkV2beta2HorizontalPodAutoscaler
  :: V2beta2HorizontalPodAutoscaler
mkV2beta2HorizontalPodAutoscaler =
  V2beta2HorizontalPodAutoscaler
  { v2beta2HorizontalPodAutoscalerApiVersion = Nothing
  , v2beta2HorizontalPodAutoscalerKind = Nothing
  , v2beta2HorizontalPodAutoscalerMetadata = Nothing
  , v2beta2HorizontalPodAutoscalerSpec = Nothing
  , v2beta2HorizontalPodAutoscalerStatus = Nothing
  }

-- ** V2beta2HorizontalPodAutoscalerCondition
-- | V2beta2HorizontalPodAutoscalerCondition
-- HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.
data V2beta2HorizontalPodAutoscalerCondition = V2beta2HorizontalPodAutoscalerCondition
  { v2beta2HorizontalPodAutoscalerConditionLastTransitionTime :: !(Maybe DateTime) -- ^ "lastTransitionTime" - lastTransitionTime is the last time the condition transitioned from one status to another
  , v2beta2HorizontalPodAutoscalerConditionMessage :: !(Maybe Text) -- ^ "message" - message is a human-readable explanation containing details about the transition
  , v2beta2HorizontalPodAutoscalerConditionReason :: !(Maybe Text) -- ^ "reason" - reason is the reason for the condition&#39;s last transition.
  , v2beta2HorizontalPodAutoscalerConditionStatus :: !(Text) -- ^ /Required/ "status" - status is the status of the condition (True, False, Unknown)
  , v2beta2HorizontalPodAutoscalerConditionType :: !(Text) -- ^ /Required/ "type" - type describes the current condition
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta2HorizontalPodAutoscalerCondition
instance A.FromJSON V2beta2HorizontalPodAutoscalerCondition where
  parseJSON = A.withObject "V2beta2HorizontalPodAutoscalerCondition" $ \o ->
    V2beta2HorizontalPodAutoscalerCondition
      <$> (o .:? "lastTransitionTime")
      <*> (o .:? "message")
      <*> (o .:? "reason")
      <*> (o .:  "status")
      <*> (o .:  "type")

-- | ToJSON V2beta2HorizontalPodAutoscalerCondition
instance A.ToJSON V2beta2HorizontalPodAutoscalerCondition where
  toJSON V2beta2HorizontalPodAutoscalerCondition {..} =
   _omitNulls
      [ "lastTransitionTime" .= v2beta2HorizontalPodAutoscalerConditionLastTransitionTime
      , "message" .= v2beta2HorizontalPodAutoscalerConditionMessage
      , "reason" .= v2beta2HorizontalPodAutoscalerConditionReason
      , "status" .= v2beta2HorizontalPodAutoscalerConditionStatus
      , "type" .= v2beta2HorizontalPodAutoscalerConditionType
      ]


-- | Construct a value of type 'V2beta2HorizontalPodAutoscalerCondition' (by applying it's required fields, if any)
mkV2beta2HorizontalPodAutoscalerCondition
  :: Text -- ^ 'v2beta2HorizontalPodAutoscalerConditionStatus': status is the status of the condition (True, False, Unknown)
  -> Text -- ^ 'v2beta2HorizontalPodAutoscalerConditionType': type describes the current condition
  -> V2beta2HorizontalPodAutoscalerCondition
mkV2beta2HorizontalPodAutoscalerCondition v2beta2HorizontalPodAutoscalerConditionStatus v2beta2HorizontalPodAutoscalerConditionType =
  V2beta2HorizontalPodAutoscalerCondition
  { v2beta2HorizontalPodAutoscalerConditionLastTransitionTime = Nothing
  , v2beta2HorizontalPodAutoscalerConditionMessage = Nothing
  , v2beta2HorizontalPodAutoscalerConditionReason = Nothing
  , v2beta2HorizontalPodAutoscalerConditionStatus
  , v2beta2HorizontalPodAutoscalerConditionType
  }

-- ** V2beta2HorizontalPodAutoscalerList
-- | V2beta2HorizontalPodAutoscalerList
-- HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects.
data V2beta2HorizontalPodAutoscalerList = V2beta2HorizontalPodAutoscalerList
  { v2beta2HorizontalPodAutoscalerListApiVersion :: !(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/api-conventions.md#resources
  , v2beta2HorizontalPodAutoscalerListItems :: !([V2beta2HorizontalPodAutoscaler]) -- ^ /Required/ "items" - items is the list of horizontal pod autoscaler objects.
  , v2beta2HorizontalPodAutoscalerListKind :: !(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/api-conventions.md#types-kinds
  , v2beta2HorizontalPodAutoscalerListMetadata :: !(Maybe V1ListMeta) -- ^ "metadata"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta2HorizontalPodAutoscalerList
instance A.FromJSON V2beta2HorizontalPodAutoscalerList where
  parseJSON = A.withObject "V2beta2HorizontalPodAutoscalerList" $ \o ->
    V2beta2HorizontalPodAutoscalerList
      <$> (o .:? "apiVersion")
      <*> (o .:  "items")
      <*> (o .:? "kind")
      <*> (o .:? "metadata")

-- | ToJSON V2beta2HorizontalPodAutoscalerList
instance A.ToJSON V2beta2HorizontalPodAutoscalerList where
  toJSON V2beta2HorizontalPodAutoscalerList {..} =
   _omitNulls
      [ "apiVersion" .= v2beta2HorizontalPodAutoscalerListApiVersion
      , "items" .= v2beta2HorizontalPodAutoscalerListItems
      , "kind" .= v2beta2HorizontalPodAutoscalerListKind
      , "metadata" .= v2beta2HorizontalPodAutoscalerListMetadata
      ]


-- | Construct a value of type 'V2beta2HorizontalPodAutoscalerList' (by applying it's required fields, if any)
mkV2beta2HorizontalPodAutoscalerList
  :: [V2beta2HorizontalPodAutoscaler] -- ^ 'v2beta2HorizontalPodAutoscalerListItems': items is the list of horizontal pod autoscaler objects.
  -> V2beta2HorizontalPodAutoscalerList
mkV2beta2HorizontalPodAutoscalerList v2beta2HorizontalPodAutoscalerListItems =
  V2beta2HorizontalPodAutoscalerList
  { v2beta2HorizontalPodAutoscalerListApiVersion = Nothing
  , v2beta2HorizontalPodAutoscalerListItems
  , v2beta2HorizontalPodAutoscalerListKind = Nothing
  , v2beta2HorizontalPodAutoscalerListMetadata = Nothing
  }

-- ** V2beta2HorizontalPodAutoscalerSpec
-- | V2beta2HorizontalPodAutoscalerSpec
-- HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.
data V2beta2HorizontalPodAutoscalerSpec = V2beta2HorizontalPodAutoscalerSpec
  { v2beta2HorizontalPodAutoscalerSpecMaxReplicas :: !(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.
  , v2beta2HorizontalPodAutoscalerSpecMetrics :: !(Maybe [V2beta2MetricSpec]) -- ^ "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.
  , v2beta2HorizontalPodAutoscalerSpecMinReplicas :: !(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.
  , v2beta2HorizontalPodAutoscalerSpecScaleTargetRef :: !(V2beta2CrossVersionObjectReference) -- ^ /Required/ "scaleTargetRef"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta2HorizontalPodAutoscalerSpec
instance A.FromJSON V2beta2HorizontalPodAutoscalerSpec where
  parseJSON = A.withObject "V2beta2HorizontalPodAutoscalerSpec" $ \o ->
    V2beta2HorizontalPodAutoscalerSpec
      <$> (o .:  "maxReplicas")
      <*> (o .:? "metrics")
      <*> (o .:? "minReplicas")
      <*> (o .:  "scaleTargetRef")

-- | ToJSON V2beta2HorizontalPodAutoscalerSpec
instance A.ToJSON V2beta2HorizontalPodAutoscalerSpec where
  toJSON V2beta2HorizontalPodAutoscalerSpec {..} =
   _omitNulls
      [ "maxReplicas" .= v2beta2HorizontalPodAutoscalerSpecMaxReplicas
      , "metrics" .= v2beta2HorizontalPodAutoscalerSpecMetrics
      , "minReplicas" .= v2beta2HorizontalPodAutoscalerSpecMinReplicas
      , "scaleTargetRef" .= v2beta2HorizontalPodAutoscalerSpecScaleTargetRef
      ]


-- | Construct a value of type 'V2beta2HorizontalPodAutoscalerSpec' (by applying it's required fields, if any)
mkV2beta2HorizontalPodAutoscalerSpec
  :: Int -- ^ 'v2beta2HorizontalPodAutoscalerSpecMaxReplicas': maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas.
  -> V2beta2CrossVersionObjectReference -- ^ 'v2beta2HorizontalPodAutoscalerSpecScaleTargetRef' 
  -> V2beta2HorizontalPodAutoscalerSpec
mkV2beta2HorizontalPodAutoscalerSpec v2beta2HorizontalPodAutoscalerSpecMaxReplicas v2beta2HorizontalPodAutoscalerSpecScaleTargetRef =
  V2beta2HorizontalPodAutoscalerSpec
  { v2beta2HorizontalPodAutoscalerSpecMaxReplicas
  , v2beta2HorizontalPodAutoscalerSpecMetrics = Nothing
  , v2beta2HorizontalPodAutoscalerSpecMinReplicas = Nothing
  , v2beta2HorizontalPodAutoscalerSpecScaleTargetRef
  }

-- ** V2beta2HorizontalPodAutoscalerStatus
-- | V2beta2HorizontalPodAutoscalerStatus
-- HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.
data V2beta2HorizontalPodAutoscalerStatus = V2beta2HorizontalPodAutoscalerStatus
  { v2beta2HorizontalPodAutoscalerStatusConditions :: !([V2beta2HorizontalPodAutoscalerCondition]) -- ^ /Required/ "conditions" - conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met.
  , v2beta2HorizontalPodAutoscalerStatusCurrentMetrics :: !(Maybe [V2beta2MetricStatus]) -- ^ "currentMetrics" - currentMetrics is the last read state of the metrics used by this autoscaler.
  , v2beta2HorizontalPodAutoscalerStatusCurrentReplicas :: !(Int) -- ^ /Required/ "currentReplicas" - currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler.
  , v2beta2HorizontalPodAutoscalerStatusDesiredReplicas :: !(Int) -- ^ /Required/ "desiredReplicas" - desiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler.
  , v2beta2HorizontalPodAutoscalerStatusLastScaleTime :: !(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.
  , v2beta2HorizontalPodAutoscalerStatusObservedGeneration :: !(Maybe Integer) -- ^ "observedGeneration" - observedGeneration is the most recent generation observed by this autoscaler.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta2HorizontalPodAutoscalerStatus
instance A.FromJSON V2beta2HorizontalPodAutoscalerStatus where
  parseJSON = A.withObject "V2beta2HorizontalPodAutoscalerStatus" $ \o ->
    V2beta2HorizontalPodAutoscalerStatus
      <$> (o .:  "conditions")
      <*> (o .:? "currentMetrics")
      <*> (o .:  "currentReplicas")
      <*> (o .:  "desiredReplicas")
      <*> (o .:? "lastScaleTime")
      <*> (o .:? "observedGeneration")

-- | ToJSON V2beta2HorizontalPodAutoscalerStatus
instance A.ToJSON V2beta2HorizontalPodAutoscalerStatus where
  toJSON V2beta2HorizontalPodAutoscalerStatus {..} =
   _omitNulls
      [ "conditions" .= v2beta2HorizontalPodAutoscalerStatusConditions
      , "currentMetrics" .= v2beta2HorizontalPodAutoscalerStatusCurrentMetrics
      , "currentReplicas" .= v2beta2HorizontalPodAutoscalerStatusCurrentReplicas
      , "desiredReplicas" .= v2beta2HorizontalPodAutoscalerStatusDesiredReplicas
      , "lastScaleTime" .= v2beta2HorizontalPodAutoscalerStatusLastScaleTime
      , "observedGeneration" .= v2beta2HorizontalPodAutoscalerStatusObservedGeneration
      ]


-- | Construct a value of type 'V2beta2HorizontalPodAutoscalerStatus' (by applying it's required fields, if any)
mkV2beta2HorizontalPodAutoscalerStatus
  :: [V2beta2HorizontalPodAutoscalerCondition] -- ^ 'v2beta2HorizontalPodAutoscalerStatusConditions': conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met.
  -> Int -- ^ 'v2beta2HorizontalPodAutoscalerStatusCurrentReplicas': currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler.
  -> Int -- ^ 'v2beta2HorizontalPodAutoscalerStatusDesiredReplicas': desiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler.
  -> V2beta2HorizontalPodAutoscalerStatus
mkV2beta2HorizontalPodAutoscalerStatus v2beta2HorizontalPodAutoscalerStatusConditions v2beta2HorizontalPodAutoscalerStatusCurrentReplicas v2beta2HorizontalPodAutoscalerStatusDesiredReplicas =
  V2beta2HorizontalPodAutoscalerStatus
  { v2beta2HorizontalPodAutoscalerStatusConditions
  , v2beta2HorizontalPodAutoscalerStatusCurrentMetrics = Nothing
  , v2beta2HorizontalPodAutoscalerStatusCurrentReplicas
  , v2beta2HorizontalPodAutoscalerStatusDesiredReplicas
  , v2beta2HorizontalPodAutoscalerStatusLastScaleTime = Nothing
  , v2beta2HorizontalPodAutoscalerStatusObservedGeneration = Nothing
  }

-- ** V2beta2MetricIdentifier
-- | V2beta2MetricIdentifier
-- MetricIdentifier defines the name and optionally selector for a metric
data V2beta2MetricIdentifier = V2beta2MetricIdentifier
  { v2beta2MetricIdentifierName :: !(Text) -- ^ /Required/ "name" - name is the name of the given metric
  , v2beta2MetricIdentifierSelector :: !(Maybe V1LabelSelector) -- ^ "selector"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta2MetricIdentifier
instance A.FromJSON V2beta2MetricIdentifier where
  parseJSON = A.withObject "V2beta2MetricIdentifier" $ \o ->
    V2beta2MetricIdentifier
      <$> (o .:  "name")
      <*> (o .:? "selector")

-- | ToJSON V2beta2MetricIdentifier
instance A.ToJSON V2beta2MetricIdentifier where
  toJSON V2beta2MetricIdentifier {..} =
   _omitNulls
      [ "name" .= v2beta2MetricIdentifierName
      , "selector" .= v2beta2MetricIdentifierSelector
      ]


-- | Construct a value of type 'V2beta2MetricIdentifier' (by applying it's required fields, if any)
mkV2beta2MetricIdentifier
  :: Text -- ^ 'v2beta2MetricIdentifierName': name is the name of the given metric
  -> V2beta2MetricIdentifier
mkV2beta2MetricIdentifier v2beta2MetricIdentifierName =
  V2beta2MetricIdentifier
  { v2beta2MetricIdentifierName
  , v2beta2MetricIdentifierSelector = Nothing
  }

-- ** V2beta2MetricSpec
-- | V2beta2MetricSpec
-- MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).
data V2beta2MetricSpec = V2beta2MetricSpec
  { v2beta2MetricSpecExternal :: !(Maybe V2beta2ExternalMetricSource) -- ^ "external"
  , v2beta2MetricSpecObject :: !(Maybe V2beta2ObjectMetricSource) -- ^ "object"
  , v2beta2MetricSpecPods :: !(Maybe V2beta2PodsMetricSource) -- ^ "pods"
  , v2beta2MetricSpecResource :: !(Maybe V2beta2ResourceMetricSource) -- ^ "resource"
  , v2beta2MetricSpecType :: !(Text) -- ^ /Required/ "type" - type is the type of metric source.  It should be one of \&quot;Object\&quot;, \&quot;Pods\&quot; or \&quot;Resource\&quot;, each mapping to a matching field in the object.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta2MetricSpec
instance A.FromJSON V2beta2MetricSpec where
  parseJSON = A.withObject "V2beta2MetricSpec" $ \o ->
    V2beta2MetricSpec
      <$> (o .:? "external")
      <*> (o .:? "object")
      <*> (o .:? "pods")
      <*> (o .:? "resource")
      <*> (o .:  "type")

-- | ToJSON V2beta2MetricSpec
instance A.ToJSON V2beta2MetricSpec where
  toJSON V2beta2MetricSpec {..} =
   _omitNulls
      [ "external" .= v2beta2MetricSpecExternal
      , "object" .= v2beta2MetricSpecObject
      , "pods" .= v2beta2MetricSpecPods
      , "resource" .= v2beta2MetricSpecResource
      , "type" .= v2beta2MetricSpecType
      ]


-- | Construct a value of type 'V2beta2MetricSpec' (by applying it's required fields, if any)
mkV2beta2MetricSpec
  :: Text -- ^ 'v2beta2MetricSpecType': type is the type of metric source.  It should be one of \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object.
  -> V2beta2MetricSpec
mkV2beta2MetricSpec v2beta2MetricSpecType =
  V2beta2MetricSpec
  { v2beta2MetricSpecExternal = Nothing
  , v2beta2MetricSpecObject = Nothing
  , v2beta2MetricSpecPods = Nothing
  , v2beta2MetricSpecResource = Nothing
  , v2beta2MetricSpecType
  }

-- ** V2beta2MetricStatus
-- | V2beta2MetricStatus
-- MetricStatus describes the last-read state of a single metric.
data V2beta2MetricStatus = V2beta2MetricStatus
  { v2beta2MetricStatusExternal :: !(Maybe V2beta2ExternalMetricStatus) -- ^ "external"
  , v2beta2MetricStatusObject :: !(Maybe V2beta2ObjectMetricStatus) -- ^ "object"
  , v2beta2MetricStatusPods :: !(Maybe V2beta2PodsMetricStatus) -- ^ "pods"
  , v2beta2MetricStatusResource :: !(Maybe V2beta2ResourceMetricStatus) -- ^ "resource"
  , v2beta2MetricStatusType :: !(Text) -- ^ /Required/ "type" - type is the type of metric source.  It will be one of \&quot;Object\&quot;, \&quot;Pods\&quot; or \&quot;Resource\&quot;, each corresponds to a matching field in the object.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta2MetricStatus
instance A.FromJSON V2beta2MetricStatus where
  parseJSON = A.withObject "V2beta2MetricStatus" $ \o ->
    V2beta2MetricStatus
      <$> (o .:? "external")
      <*> (o .:? "object")
      <*> (o .:? "pods")
      <*> (o .:? "resource")
      <*> (o .:  "type")

-- | ToJSON V2beta2MetricStatus
instance A.ToJSON V2beta2MetricStatus where
  toJSON V2beta2MetricStatus {..} =
   _omitNulls
      [ "external" .= v2beta2MetricStatusExternal
      , "object" .= v2beta2MetricStatusObject
      , "pods" .= v2beta2MetricStatusPods
      , "resource" .= v2beta2MetricStatusResource
      , "type" .= v2beta2MetricStatusType
      ]


-- | Construct a value of type 'V2beta2MetricStatus' (by applying it's required fields, if any)
mkV2beta2MetricStatus
  :: Text -- ^ 'v2beta2MetricStatusType': type is the type of metric source.  It will be one of \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object.
  -> V2beta2MetricStatus
mkV2beta2MetricStatus v2beta2MetricStatusType =
  V2beta2MetricStatus
  { v2beta2MetricStatusExternal = Nothing
  , v2beta2MetricStatusObject = Nothing
  , v2beta2MetricStatusPods = Nothing
  , v2beta2MetricStatusResource = Nothing
  , v2beta2MetricStatusType
  }

-- ** V2beta2MetricTarget
-- | V2beta2MetricTarget
-- MetricTarget defines the target value, average value, or average utilization of a specific metric
data V2beta2MetricTarget = V2beta2MetricTarget
  { v2beta2MetricTargetAverageUtilization :: !(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
  , v2beta2MetricTargetAverageValue :: !(Maybe Quantity) -- ^ "averageValue"
  , v2beta2MetricTargetType :: !(Text) -- ^ /Required/ "type" - type represents whether the metric type is Utilization, Value, or AverageValue
  , v2beta2MetricTargetValue :: !(Maybe Quantity) -- ^ "value"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta2MetricTarget
instance A.FromJSON V2beta2MetricTarget where
  parseJSON = A.withObject "V2beta2MetricTarget" $ \o ->
    V2beta2MetricTarget
      <$> (o .:? "averageUtilization")
      <*> (o .:? "averageValue")
      <*> (o .:  "type")
      <*> (o .:? "value")

-- | ToJSON V2beta2MetricTarget
instance A.ToJSON V2beta2MetricTarget where
  toJSON V2beta2MetricTarget {..} =
   _omitNulls
      [ "averageUtilization" .= v2beta2MetricTargetAverageUtilization
      , "averageValue" .= v2beta2MetricTargetAverageValue
      , "type" .= v2beta2MetricTargetType
      , "value" .= v2beta2MetricTargetValue
      ]


-- | Construct a value of type 'V2beta2MetricTarget' (by applying it's required fields, if any)
mkV2beta2MetricTarget
  :: Text -- ^ 'v2beta2MetricTargetType': type represents whether the metric type is Utilization, Value, or AverageValue
  -> V2beta2MetricTarget
mkV2beta2MetricTarget v2beta2MetricTargetType =
  V2beta2MetricTarget
  { v2beta2MetricTargetAverageUtilization = Nothing
  , v2beta2MetricTargetAverageValue = Nothing
  , v2beta2MetricTargetType
  , v2beta2MetricTargetValue = Nothing
  }

-- ** V2beta2MetricValueStatus
-- | V2beta2MetricValueStatus
-- MetricValueStatus holds the current value for a metric
data V2beta2MetricValueStatus = V2beta2MetricValueStatus
  { v2beta2MetricValueStatusAverageUtilization :: !(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.
  , v2beta2MetricValueStatusAverageValue :: !(Maybe Quantity) -- ^ "averageValue"
  , v2beta2MetricValueStatusValue :: !(Maybe Quantity) -- ^ "value"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta2MetricValueStatus
instance A.FromJSON V2beta2MetricValueStatus where
  parseJSON = A.withObject "V2beta2MetricValueStatus" $ \o ->
    V2beta2MetricValueStatus
      <$> (o .:? "averageUtilization")
      <*> (o .:? "averageValue")
      <*> (o .:? "value")

-- | ToJSON V2beta2MetricValueStatus
instance A.ToJSON V2beta2MetricValueStatus where
  toJSON V2beta2MetricValueStatus {..} =
   _omitNulls
      [ "averageUtilization" .= v2beta2MetricValueStatusAverageUtilization
      , "averageValue" .= v2beta2MetricValueStatusAverageValue
      , "value" .= v2beta2MetricValueStatusValue
      ]


-- | Construct a value of type 'V2beta2MetricValueStatus' (by applying it's required fields, if any)
mkV2beta2MetricValueStatus
  :: V2beta2MetricValueStatus
mkV2beta2MetricValueStatus =
  V2beta2MetricValueStatus
  { v2beta2MetricValueStatusAverageUtilization = Nothing
  , v2beta2MetricValueStatusAverageValue = Nothing
  , v2beta2MetricValueStatusValue = Nothing
  }

-- ** V2beta2ObjectMetricSource
-- | V2beta2ObjectMetricSource
-- ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).
data V2beta2ObjectMetricSource = V2beta2ObjectMetricSource
  { v2beta2ObjectMetricSourceDescribedObject :: !(V2beta2CrossVersionObjectReference) -- ^ /Required/ "describedObject"
  , v2beta2ObjectMetricSourceMetric :: !(V2beta2MetricIdentifier) -- ^ /Required/ "metric"
  , v2beta2ObjectMetricSourceTarget :: !(V2beta2MetricTarget) -- ^ /Required/ "target"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta2ObjectMetricSource
instance A.FromJSON V2beta2ObjectMetricSource where
  parseJSON = A.withObject "V2beta2ObjectMetricSource" $ \o ->
    V2beta2ObjectMetricSource
      <$> (o .:  "describedObject")
      <*> (o .:  "metric")
      <*> (o .:  "target")

-- | ToJSON V2beta2ObjectMetricSource
instance A.ToJSON V2beta2ObjectMetricSource where
  toJSON V2beta2ObjectMetricSource {..} =
   _omitNulls
      [ "describedObject" .= v2beta2ObjectMetricSourceDescribedObject
      , "metric" .= v2beta2ObjectMetricSourceMetric
      , "target" .= v2beta2ObjectMetricSourceTarget
      ]


-- | Construct a value of type 'V2beta2ObjectMetricSource' (by applying it's required fields, if any)
mkV2beta2ObjectMetricSource
  :: V2beta2CrossVersionObjectReference -- ^ 'v2beta2ObjectMetricSourceDescribedObject' 
  -> V2beta2MetricIdentifier -- ^ 'v2beta2ObjectMetricSourceMetric' 
  -> V2beta2MetricTarget -- ^ 'v2beta2ObjectMetricSourceTarget' 
  -> V2beta2ObjectMetricSource
mkV2beta2ObjectMetricSource v2beta2ObjectMetricSourceDescribedObject v2beta2ObjectMetricSourceMetric v2beta2ObjectMetricSourceTarget =
  V2beta2ObjectMetricSource
  { v2beta2ObjectMetricSourceDescribedObject
  , v2beta2ObjectMetricSourceMetric
  , v2beta2ObjectMetricSourceTarget
  }

-- ** V2beta2ObjectMetricStatus
-- | V2beta2ObjectMetricStatus
-- ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).
data V2beta2ObjectMetricStatus = V2beta2ObjectMetricStatus
  { v2beta2ObjectMetricStatusCurrent :: !(V2beta2MetricValueStatus) -- ^ /Required/ "current"
  , v2beta2ObjectMetricStatusDescribedObject :: !(V2beta2CrossVersionObjectReference) -- ^ /Required/ "describedObject"
  , v2beta2ObjectMetricStatusMetric :: !(V2beta2MetricIdentifier) -- ^ /Required/ "metric"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta2ObjectMetricStatus
instance A.FromJSON V2beta2ObjectMetricStatus where
  parseJSON = A.withObject "V2beta2ObjectMetricStatus" $ \o ->
    V2beta2ObjectMetricStatus
      <$> (o .:  "current")
      <*> (o .:  "describedObject")
      <*> (o .:  "metric")

-- | ToJSON V2beta2ObjectMetricStatus
instance A.ToJSON V2beta2ObjectMetricStatus where
  toJSON V2beta2ObjectMetricStatus {..} =
   _omitNulls
      [ "current" .= v2beta2ObjectMetricStatusCurrent
      , "describedObject" .= v2beta2ObjectMetricStatusDescribedObject
      , "metric" .= v2beta2ObjectMetricStatusMetric
      ]


-- | Construct a value of type 'V2beta2ObjectMetricStatus' (by applying it's required fields, if any)
mkV2beta2ObjectMetricStatus
  :: V2beta2MetricValueStatus -- ^ 'v2beta2ObjectMetricStatusCurrent' 
  -> V2beta2CrossVersionObjectReference -- ^ 'v2beta2ObjectMetricStatusDescribedObject' 
  -> V2beta2MetricIdentifier -- ^ 'v2beta2ObjectMetricStatusMetric' 
  -> V2beta2ObjectMetricStatus
mkV2beta2ObjectMetricStatus v2beta2ObjectMetricStatusCurrent v2beta2ObjectMetricStatusDescribedObject v2beta2ObjectMetricStatusMetric =
  V2beta2ObjectMetricStatus
  { v2beta2ObjectMetricStatusCurrent
  , v2beta2ObjectMetricStatusDescribedObject
  , v2beta2ObjectMetricStatusMetric
  }

-- ** V2beta2PodsMetricSource
-- | V2beta2PodsMetricSource
-- 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 V2beta2PodsMetricSource = V2beta2PodsMetricSource
  { v2beta2PodsMetricSourceMetric :: !(V2beta2MetricIdentifier) -- ^ /Required/ "metric"
  , v2beta2PodsMetricSourceTarget :: !(V2beta2MetricTarget) -- ^ /Required/ "target"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta2PodsMetricSource
instance A.FromJSON V2beta2PodsMetricSource where
  parseJSON = A.withObject "V2beta2PodsMetricSource" $ \o ->
    V2beta2PodsMetricSource
      <$> (o .:  "metric")
      <*> (o .:  "target")

-- | ToJSON V2beta2PodsMetricSource
instance A.ToJSON V2beta2PodsMetricSource where
  toJSON V2beta2PodsMetricSource {..} =
   _omitNulls
      [ "metric" .= v2beta2PodsMetricSourceMetric
      , "target" .= v2beta2PodsMetricSourceTarget
      ]


-- | Construct a value of type 'V2beta2PodsMetricSource' (by applying it's required fields, if any)
mkV2beta2PodsMetricSource
  :: V2beta2MetricIdentifier -- ^ 'v2beta2PodsMetricSourceMetric' 
  -> V2beta2MetricTarget -- ^ 'v2beta2PodsMetricSourceTarget' 
  -> V2beta2PodsMetricSource
mkV2beta2PodsMetricSource v2beta2PodsMetricSourceMetric v2beta2PodsMetricSourceTarget =
  V2beta2PodsMetricSource
  { v2beta2PodsMetricSourceMetric
  , v2beta2PodsMetricSourceTarget
  }

-- ** V2beta2PodsMetricStatus
-- | V2beta2PodsMetricStatus
-- PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).
data V2beta2PodsMetricStatus = V2beta2PodsMetricStatus
  { v2beta2PodsMetricStatusCurrent :: !(V2beta2MetricValueStatus) -- ^ /Required/ "current"
  , v2beta2PodsMetricStatusMetric :: !(V2beta2MetricIdentifier) -- ^ /Required/ "metric"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta2PodsMetricStatus
instance A.FromJSON V2beta2PodsMetricStatus where
  parseJSON = A.withObject "V2beta2PodsMetricStatus" $ \o ->
    V2beta2PodsMetricStatus
      <$> (o .:  "current")
      <*> (o .:  "metric")

-- | ToJSON V2beta2PodsMetricStatus
instance A.ToJSON V2beta2PodsMetricStatus where
  toJSON V2beta2PodsMetricStatus {..} =
   _omitNulls
      [ "current" .= v2beta2PodsMetricStatusCurrent
      , "metric" .= v2beta2PodsMetricStatusMetric
      ]


-- | Construct a value of type 'V2beta2PodsMetricStatus' (by applying it's required fields, if any)
mkV2beta2PodsMetricStatus
  :: V2beta2MetricValueStatus -- ^ 'v2beta2PodsMetricStatusCurrent' 
  -> V2beta2MetricIdentifier -- ^ 'v2beta2PodsMetricStatusMetric' 
  -> V2beta2PodsMetricStatus
mkV2beta2PodsMetricStatus v2beta2PodsMetricStatusCurrent v2beta2PodsMetricStatusMetric =
  V2beta2PodsMetricStatus
  { v2beta2PodsMetricStatusCurrent
  , v2beta2PodsMetricStatusMetric
  }

-- ** V2beta2ResourceMetricSource
-- | V2beta2ResourceMetricSource
-- 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 V2beta2ResourceMetricSource = V2beta2ResourceMetricSource
  { v2beta2ResourceMetricSourceName :: !(Text) -- ^ /Required/ "name" - name is the name of the resource in question.
  , v2beta2ResourceMetricSourceTarget :: !(V2beta2MetricTarget) -- ^ /Required/ "target"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta2ResourceMetricSource
instance A.FromJSON V2beta2ResourceMetricSource where
  parseJSON = A.withObject "V2beta2ResourceMetricSource" $ \o ->
    V2beta2ResourceMetricSource
      <$> (o .:  "name")
      <*> (o .:  "target")

-- | ToJSON V2beta2ResourceMetricSource
instance A.ToJSON V2beta2ResourceMetricSource where
  toJSON V2beta2ResourceMetricSource {..} =
   _omitNulls
      [ "name" .= v2beta2ResourceMetricSourceName
      , "target" .= v2beta2ResourceMetricSourceTarget
      ]


-- | Construct a value of type 'V2beta2ResourceMetricSource' (by applying it's required fields, if any)
mkV2beta2ResourceMetricSource
  :: Text -- ^ 'v2beta2ResourceMetricSourceName': name is the name of the resource in question.
  -> V2beta2MetricTarget -- ^ 'v2beta2ResourceMetricSourceTarget' 
  -> V2beta2ResourceMetricSource
mkV2beta2ResourceMetricSource v2beta2ResourceMetricSourceName v2beta2ResourceMetricSourceTarget =
  V2beta2ResourceMetricSource
  { v2beta2ResourceMetricSourceName
  , v2beta2ResourceMetricSourceTarget
  }

-- ** V2beta2ResourceMetricStatus
-- | V2beta2ResourceMetricStatus
-- 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 V2beta2ResourceMetricStatus = V2beta2ResourceMetricStatus
  { v2beta2ResourceMetricStatusCurrent :: !(V2beta2MetricValueStatus) -- ^ /Required/ "current"
  , v2beta2ResourceMetricStatusName :: !(Text) -- ^ /Required/ "name" - Name is the name of the resource in question.
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON V2beta2ResourceMetricStatus
instance A.FromJSON V2beta2ResourceMetricStatus where
  parseJSON = A.withObject "V2beta2ResourceMetricStatus" $ \o ->
    V2beta2ResourceMetricStatus
      <$> (o .:  "current")
      <*> (o .:  "name")

-- | ToJSON V2beta2ResourceMetricStatus
instance A.ToJSON V2beta2ResourceMetricStatus where
  toJSON V2beta2ResourceMetricStatus {..} =
   _omitNulls
      [ "current" .= v2beta2ResourceMetricStatusCurrent
      , "name" .= v2beta2ResourceMetricStatusName
      ]


-- | Construct a value of type 'V2beta2ResourceMetricStatus' (by applying it's required fields, if any)
mkV2beta2ResourceMetricStatus
  :: V2beta2MetricValueStatus -- ^ 'v2beta2ResourceMetricStatusCurrent' 
  -> Text -- ^ 'v2beta2ResourceMetricStatusName': Name is the name of the resource in question.
  -> V2beta2ResourceMetricStatus
mkV2beta2ResourceMetricStatus v2beta2ResourceMetricStatusCurrent v2beta2ResourceMetricStatusName =
  V2beta2ResourceMetricStatus
  { v2beta2ResourceMetricStatusCurrent
  , v2beta2ResourceMetricStatusName
  }

-- ** VersionInfo
-- | VersionInfo
-- Info contains versioning information. how we'll want to distribute that information.
data VersionInfo = VersionInfo
  { versionInfoBuildDate :: !(Text) -- ^ /Required/ "buildDate"
  , versionInfoCompiler :: !(Text) -- ^ /Required/ "compiler"
  , versionInfoGitCommit :: !(Text) -- ^ /Required/ "gitCommit"
  , versionInfoGitTreeState :: !(Text) -- ^ /Required/ "gitTreeState"
  , versionInfoGitVersion :: !(Text) -- ^ /Required/ "gitVersion"
  , versionInfoGoVersion :: !(Text) -- ^ /Required/ "goVersion"
  , versionInfoMajor :: !(Text) -- ^ /Required/ "major"
  , versionInfoMinor :: !(Text) -- ^ /Required/ "minor"
  , versionInfoPlatform :: !(Text) -- ^ /Required/ "platform"
  } deriving (P.Show, P.Eq, P.Typeable)

-- | FromJSON VersionInfo
instance A.FromJSON VersionInfo where
  parseJSON = A.withObject "VersionInfo" $ \o ->
    VersionInfo
      <$> (o .:  "buildDate")
      <*> (o .:  "compiler")
      <*> (o .:  "gitCommit")
      <*> (o .:  "gitTreeState")
      <*> (o .:  "gitVersion")
      <*> (o .:  "goVersion")
      <*> (o .:  "major")
      <*> (o .:  "minor")
      <*> (o .:  "platform")

-- | ToJSON VersionInfo
instance A.ToJSON VersionInfo where
  toJSON VersionInfo {..} =
   _omitNulls
      [ "buildDate" .= versionInfoBuildDate
      , "compiler" .= versionInfoCompiler
      , "gitCommit" .= versionInfoGitCommit
      , "gitTreeState" .= versionInfoGitTreeState
      , "gitVersion" .= versionInfoGitVersion
      , "goVersion" .= versionInfoGoVersion
      , "major" .= versionInfoMajor
      , "minor" .= versionInfoMinor
      , "platform" .= 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 versionInfoBuildDate versionInfoCompiler versionInfoGitCommit versionInfoGitTreeState versionInfoGitVersion versionInfoGoVersion versionInfoMajor versionInfoMinor versionInfoPlatform =
  VersionInfo
  { versionInfoBuildDate
  , versionInfoCompiler
  , versionInfoGitCommit
  , versionInfoGitTreeState
  , versionInfoGitVersion
  , versionInfoGoVersion
  , versionInfoMajor
  , versionInfoMinor
  , versionInfoPlatform
  }




-- * Auth Methods

-- ** AuthApiKeyBearerToken
data AuthApiKeyBearerToken =
  AuthApiKeyBearerToken Text -- ^ secret
  deriving (P.Eq, P.Show, P.Typeable)

instance AuthMethod AuthApiKeyBearerToken where
  applyAuthMethod _ a@(AuthApiKeyBearerToken secret) req =
    P.pure $
    if (P.typeOf a `P.elem` rAuthTypes req)
      then req `setHeader` toHeader ("authorization", secret)
           & L.over rAuthTypesL (P.filter (/= P.typeOf a))
      else req