{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.EC2.Types.ScheduledInstancesNetworkInterface
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.EC2.Types.ScheduledInstancesNetworkInterface where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Internal
import Amazonka.EC2.Types.ScheduledInstancesIpv6Address
import Amazonka.EC2.Types.ScheduledInstancesPrivateIpAddressConfig
import qualified Amazonka.Prelude as Prelude

-- | Describes a network interface for a Scheduled Instance.
--
-- /See:/ 'newScheduledInstancesNetworkInterface' smart constructor.
data ScheduledInstancesNetworkInterface = ScheduledInstancesNetworkInterface'
  { -- | Indicates whether to assign a public IPv4 address to instances launched
    -- in a VPC. The public IPv4 address can only be assigned to a network
    -- interface for eth0, and can only be assigned to a new network interface,
    -- not an existing one. You cannot specify more than one network interface
    -- in the request. If launching into a default subnet, the default value is
    -- @true@.
    ScheduledInstancesNetworkInterface -> Maybe Bool
associatePublicIpAddress :: Prelude.Maybe Prelude.Bool,
    -- | Indicates whether to delete the interface when the instance is
    -- terminated.
    ScheduledInstancesNetworkInterface -> Maybe Bool
deleteOnTermination :: Prelude.Maybe Prelude.Bool,
    -- | The description.
    ScheduledInstancesNetworkInterface -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The index of the device for the network interface attachment.
    ScheduledInstancesNetworkInterface -> Maybe Int
deviceIndex :: Prelude.Maybe Prelude.Int,
    -- | The IDs of the security groups.
    ScheduledInstancesNetworkInterface -> Maybe [Text]
groups :: Prelude.Maybe [Prelude.Text],
    -- | The number of IPv6 addresses to assign to the network interface. The
    -- IPv6 addresses are automatically selected from the subnet range.
    ScheduledInstancesNetworkInterface -> Maybe Int
ipv6AddressCount :: Prelude.Maybe Prelude.Int,
    -- | The specific IPv6 addresses from the subnet range.
    ScheduledInstancesNetworkInterface
-> Maybe [ScheduledInstancesIpv6Address]
ipv6Addresses :: Prelude.Maybe [ScheduledInstancesIpv6Address],
    -- | The ID of the network interface.
    ScheduledInstancesNetworkInterface -> Maybe Text
networkInterfaceId :: Prelude.Maybe Prelude.Text,
    -- | The IPv4 address of the network interface within the subnet.
    ScheduledInstancesNetworkInterface -> Maybe Text
privateIpAddress :: Prelude.Maybe Prelude.Text,
    -- | The private IPv4 addresses.
    ScheduledInstancesNetworkInterface
-> Maybe [ScheduledInstancesPrivateIpAddressConfig]
privateIpAddressConfigs :: Prelude.Maybe [ScheduledInstancesPrivateIpAddressConfig],
    -- | The number of secondary private IPv4 addresses.
    ScheduledInstancesNetworkInterface -> Maybe Int
secondaryPrivateIpAddressCount :: Prelude.Maybe Prelude.Int,
    -- | The ID of the subnet.
    ScheduledInstancesNetworkInterface -> Maybe Text
subnetId :: Prelude.Maybe Prelude.Text
  }
  deriving (ScheduledInstancesNetworkInterface
-> ScheduledInstancesNetworkInterface -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ScheduledInstancesNetworkInterface
-> ScheduledInstancesNetworkInterface -> Bool
$c/= :: ScheduledInstancesNetworkInterface
-> ScheduledInstancesNetworkInterface -> Bool
== :: ScheduledInstancesNetworkInterface
-> ScheduledInstancesNetworkInterface -> Bool
$c== :: ScheduledInstancesNetworkInterface
-> ScheduledInstancesNetworkInterface -> Bool
Prelude.Eq, ReadPrec [ScheduledInstancesNetworkInterface]
ReadPrec ScheduledInstancesNetworkInterface
Int -> ReadS ScheduledInstancesNetworkInterface
ReadS [ScheduledInstancesNetworkInterface]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ScheduledInstancesNetworkInterface]
$creadListPrec :: ReadPrec [ScheduledInstancesNetworkInterface]
readPrec :: ReadPrec ScheduledInstancesNetworkInterface
$creadPrec :: ReadPrec ScheduledInstancesNetworkInterface
readList :: ReadS [ScheduledInstancesNetworkInterface]
$creadList :: ReadS [ScheduledInstancesNetworkInterface]
readsPrec :: Int -> ReadS ScheduledInstancesNetworkInterface
$creadsPrec :: Int -> ReadS ScheduledInstancesNetworkInterface
Prelude.Read, Int -> ScheduledInstancesNetworkInterface -> ShowS
[ScheduledInstancesNetworkInterface] -> ShowS
ScheduledInstancesNetworkInterface -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ScheduledInstancesNetworkInterface] -> ShowS
$cshowList :: [ScheduledInstancesNetworkInterface] -> ShowS
show :: ScheduledInstancesNetworkInterface -> String
$cshow :: ScheduledInstancesNetworkInterface -> String
showsPrec :: Int -> ScheduledInstancesNetworkInterface -> ShowS
$cshowsPrec :: Int -> ScheduledInstancesNetworkInterface -> ShowS
Prelude.Show, forall x.
Rep ScheduledInstancesNetworkInterface x
-> ScheduledInstancesNetworkInterface
forall x.
ScheduledInstancesNetworkInterface
-> Rep ScheduledInstancesNetworkInterface x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ScheduledInstancesNetworkInterface x
-> ScheduledInstancesNetworkInterface
$cfrom :: forall x.
ScheduledInstancesNetworkInterface
-> Rep ScheduledInstancesNetworkInterface x
Prelude.Generic)

-- |
-- Create a value of 'ScheduledInstancesNetworkInterface' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'associatePublicIpAddress', 'scheduledInstancesNetworkInterface_associatePublicIpAddress' - Indicates whether to assign a public IPv4 address to instances launched
-- in a VPC. The public IPv4 address can only be assigned to a network
-- interface for eth0, and can only be assigned to a new network interface,
-- not an existing one. You cannot specify more than one network interface
-- in the request. If launching into a default subnet, the default value is
-- @true@.
--
-- 'deleteOnTermination', 'scheduledInstancesNetworkInterface_deleteOnTermination' - Indicates whether to delete the interface when the instance is
-- terminated.
--
-- 'description', 'scheduledInstancesNetworkInterface_description' - The description.
--
-- 'deviceIndex', 'scheduledInstancesNetworkInterface_deviceIndex' - The index of the device for the network interface attachment.
--
-- 'groups', 'scheduledInstancesNetworkInterface_groups' - The IDs of the security groups.
--
-- 'ipv6AddressCount', 'scheduledInstancesNetworkInterface_ipv6AddressCount' - The number of IPv6 addresses to assign to the network interface. The
-- IPv6 addresses are automatically selected from the subnet range.
--
-- 'ipv6Addresses', 'scheduledInstancesNetworkInterface_ipv6Addresses' - The specific IPv6 addresses from the subnet range.
--
-- 'networkInterfaceId', 'scheduledInstancesNetworkInterface_networkInterfaceId' - The ID of the network interface.
--
-- 'privateIpAddress', 'scheduledInstancesNetworkInterface_privateIpAddress' - The IPv4 address of the network interface within the subnet.
--
-- 'privateIpAddressConfigs', 'scheduledInstancesNetworkInterface_privateIpAddressConfigs' - The private IPv4 addresses.
--
-- 'secondaryPrivateIpAddressCount', 'scheduledInstancesNetworkInterface_secondaryPrivateIpAddressCount' - The number of secondary private IPv4 addresses.
--
-- 'subnetId', 'scheduledInstancesNetworkInterface_subnetId' - The ID of the subnet.
newScheduledInstancesNetworkInterface ::
  ScheduledInstancesNetworkInterface
newScheduledInstancesNetworkInterface :: ScheduledInstancesNetworkInterface
newScheduledInstancesNetworkInterface =
  ScheduledInstancesNetworkInterface'
    { $sel:associatePublicIpAddress:ScheduledInstancesNetworkInterface' :: Maybe Bool
associatePublicIpAddress =
        forall a. Maybe a
Prelude.Nothing,
      $sel:deleteOnTermination:ScheduledInstancesNetworkInterface' :: Maybe Bool
deleteOnTermination = forall a. Maybe a
Prelude.Nothing,
      $sel:description:ScheduledInstancesNetworkInterface' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:deviceIndex:ScheduledInstancesNetworkInterface' :: Maybe Int
deviceIndex = forall a. Maybe a
Prelude.Nothing,
      $sel:groups:ScheduledInstancesNetworkInterface' :: Maybe [Text]
groups = forall a. Maybe a
Prelude.Nothing,
      $sel:ipv6AddressCount:ScheduledInstancesNetworkInterface' :: Maybe Int
ipv6AddressCount = forall a. Maybe a
Prelude.Nothing,
      $sel:ipv6Addresses:ScheduledInstancesNetworkInterface' :: Maybe [ScheduledInstancesIpv6Address]
ipv6Addresses = forall a. Maybe a
Prelude.Nothing,
      $sel:networkInterfaceId:ScheduledInstancesNetworkInterface' :: Maybe Text
networkInterfaceId = forall a. Maybe a
Prelude.Nothing,
      $sel:privateIpAddress:ScheduledInstancesNetworkInterface' :: Maybe Text
privateIpAddress = forall a. Maybe a
Prelude.Nothing,
      $sel:privateIpAddressConfigs:ScheduledInstancesNetworkInterface' :: Maybe [ScheduledInstancesPrivateIpAddressConfig]
privateIpAddressConfigs =
        forall a. Maybe a
Prelude.Nothing,
      $sel:secondaryPrivateIpAddressCount:ScheduledInstancesNetworkInterface' :: Maybe Int
secondaryPrivateIpAddressCount =
        forall a. Maybe a
Prelude.Nothing,
      $sel:subnetId:ScheduledInstancesNetworkInterface' :: Maybe Text
subnetId = forall a. Maybe a
Prelude.Nothing
    }

-- | Indicates whether to assign a public IPv4 address to instances launched
-- in a VPC. The public IPv4 address can only be assigned to a network
-- interface for eth0, and can only be assigned to a new network interface,
-- not an existing one. You cannot specify more than one network interface
-- in the request. If launching into a default subnet, the default value is
-- @true@.
scheduledInstancesNetworkInterface_associatePublicIpAddress :: Lens.Lens' ScheduledInstancesNetworkInterface (Prelude.Maybe Prelude.Bool)
scheduledInstancesNetworkInterface_associatePublicIpAddress :: Lens' ScheduledInstancesNetworkInterface (Maybe Bool)
scheduledInstancesNetworkInterface_associatePublicIpAddress = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledInstancesNetworkInterface' {Maybe Bool
associatePublicIpAddress :: Maybe Bool
$sel:associatePublicIpAddress:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Bool
associatePublicIpAddress} -> Maybe Bool
associatePublicIpAddress) (\s :: ScheduledInstancesNetworkInterface
s@ScheduledInstancesNetworkInterface' {} Maybe Bool
a -> ScheduledInstancesNetworkInterface
s {$sel:associatePublicIpAddress:ScheduledInstancesNetworkInterface' :: Maybe Bool
associatePublicIpAddress = Maybe Bool
a} :: ScheduledInstancesNetworkInterface)

-- | Indicates whether to delete the interface when the instance is
-- terminated.
scheduledInstancesNetworkInterface_deleteOnTermination :: Lens.Lens' ScheduledInstancesNetworkInterface (Prelude.Maybe Prelude.Bool)
scheduledInstancesNetworkInterface_deleteOnTermination :: Lens' ScheduledInstancesNetworkInterface (Maybe Bool)
scheduledInstancesNetworkInterface_deleteOnTermination = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledInstancesNetworkInterface' {Maybe Bool
deleteOnTermination :: Maybe Bool
$sel:deleteOnTermination:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Bool
deleteOnTermination} -> Maybe Bool
deleteOnTermination) (\s :: ScheduledInstancesNetworkInterface
s@ScheduledInstancesNetworkInterface' {} Maybe Bool
a -> ScheduledInstancesNetworkInterface
s {$sel:deleteOnTermination:ScheduledInstancesNetworkInterface' :: Maybe Bool
deleteOnTermination = Maybe Bool
a} :: ScheduledInstancesNetworkInterface)

-- | The description.
scheduledInstancesNetworkInterface_description :: Lens.Lens' ScheduledInstancesNetworkInterface (Prelude.Maybe Prelude.Text)
scheduledInstancesNetworkInterface_description :: Lens' ScheduledInstancesNetworkInterface (Maybe Text)
scheduledInstancesNetworkInterface_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledInstancesNetworkInterface' {Maybe Text
description :: Maybe Text
$sel:description:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Text
description} -> Maybe Text
description) (\s :: ScheduledInstancesNetworkInterface
s@ScheduledInstancesNetworkInterface' {} Maybe Text
a -> ScheduledInstancesNetworkInterface
s {$sel:description:ScheduledInstancesNetworkInterface' :: Maybe Text
description = Maybe Text
a} :: ScheduledInstancesNetworkInterface)

-- | The index of the device for the network interface attachment.
scheduledInstancesNetworkInterface_deviceIndex :: Lens.Lens' ScheduledInstancesNetworkInterface (Prelude.Maybe Prelude.Int)
scheduledInstancesNetworkInterface_deviceIndex :: Lens' ScheduledInstancesNetworkInterface (Maybe Int)
scheduledInstancesNetworkInterface_deviceIndex = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledInstancesNetworkInterface' {Maybe Int
deviceIndex :: Maybe Int
$sel:deviceIndex:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Int
deviceIndex} -> Maybe Int
deviceIndex) (\s :: ScheduledInstancesNetworkInterface
s@ScheduledInstancesNetworkInterface' {} Maybe Int
a -> ScheduledInstancesNetworkInterface
s {$sel:deviceIndex:ScheduledInstancesNetworkInterface' :: Maybe Int
deviceIndex = Maybe Int
a} :: ScheduledInstancesNetworkInterface)

-- | The IDs of the security groups.
scheduledInstancesNetworkInterface_groups :: Lens.Lens' ScheduledInstancesNetworkInterface (Prelude.Maybe [Prelude.Text])
scheduledInstancesNetworkInterface_groups :: Lens' ScheduledInstancesNetworkInterface (Maybe [Text])
scheduledInstancesNetworkInterface_groups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledInstancesNetworkInterface' {Maybe [Text]
groups :: Maybe [Text]
$sel:groups:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe [Text]
groups} -> Maybe [Text]
groups) (\s :: ScheduledInstancesNetworkInterface
s@ScheduledInstancesNetworkInterface' {} Maybe [Text]
a -> ScheduledInstancesNetworkInterface
s {$sel:groups:ScheduledInstancesNetworkInterface' :: Maybe [Text]
groups = Maybe [Text]
a} :: ScheduledInstancesNetworkInterface) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The number of IPv6 addresses to assign to the network interface. The
-- IPv6 addresses are automatically selected from the subnet range.
scheduledInstancesNetworkInterface_ipv6AddressCount :: Lens.Lens' ScheduledInstancesNetworkInterface (Prelude.Maybe Prelude.Int)
scheduledInstancesNetworkInterface_ipv6AddressCount :: Lens' ScheduledInstancesNetworkInterface (Maybe Int)
scheduledInstancesNetworkInterface_ipv6AddressCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledInstancesNetworkInterface' {Maybe Int
ipv6AddressCount :: Maybe Int
$sel:ipv6AddressCount:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Int
ipv6AddressCount} -> Maybe Int
ipv6AddressCount) (\s :: ScheduledInstancesNetworkInterface
s@ScheduledInstancesNetworkInterface' {} Maybe Int
a -> ScheduledInstancesNetworkInterface
s {$sel:ipv6AddressCount:ScheduledInstancesNetworkInterface' :: Maybe Int
ipv6AddressCount = Maybe Int
a} :: ScheduledInstancesNetworkInterface)

-- | The specific IPv6 addresses from the subnet range.
scheduledInstancesNetworkInterface_ipv6Addresses :: Lens.Lens' ScheduledInstancesNetworkInterface (Prelude.Maybe [ScheduledInstancesIpv6Address])
scheduledInstancesNetworkInterface_ipv6Addresses :: Lens'
  ScheduledInstancesNetworkInterface
  (Maybe [ScheduledInstancesIpv6Address])
scheduledInstancesNetworkInterface_ipv6Addresses = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledInstancesNetworkInterface' {Maybe [ScheduledInstancesIpv6Address]
ipv6Addresses :: Maybe [ScheduledInstancesIpv6Address]
$sel:ipv6Addresses:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface
-> Maybe [ScheduledInstancesIpv6Address]
ipv6Addresses} -> Maybe [ScheduledInstancesIpv6Address]
ipv6Addresses) (\s :: ScheduledInstancesNetworkInterface
s@ScheduledInstancesNetworkInterface' {} Maybe [ScheduledInstancesIpv6Address]
a -> ScheduledInstancesNetworkInterface
s {$sel:ipv6Addresses:ScheduledInstancesNetworkInterface' :: Maybe [ScheduledInstancesIpv6Address]
ipv6Addresses = Maybe [ScheduledInstancesIpv6Address]
a} :: ScheduledInstancesNetworkInterface) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The ID of the network interface.
scheduledInstancesNetworkInterface_networkInterfaceId :: Lens.Lens' ScheduledInstancesNetworkInterface (Prelude.Maybe Prelude.Text)
scheduledInstancesNetworkInterface_networkInterfaceId :: Lens' ScheduledInstancesNetworkInterface (Maybe Text)
scheduledInstancesNetworkInterface_networkInterfaceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledInstancesNetworkInterface' {Maybe Text
networkInterfaceId :: Maybe Text
$sel:networkInterfaceId:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Text
networkInterfaceId} -> Maybe Text
networkInterfaceId) (\s :: ScheduledInstancesNetworkInterface
s@ScheduledInstancesNetworkInterface' {} Maybe Text
a -> ScheduledInstancesNetworkInterface
s {$sel:networkInterfaceId:ScheduledInstancesNetworkInterface' :: Maybe Text
networkInterfaceId = Maybe Text
a} :: ScheduledInstancesNetworkInterface)

-- | The IPv4 address of the network interface within the subnet.
scheduledInstancesNetworkInterface_privateIpAddress :: Lens.Lens' ScheduledInstancesNetworkInterface (Prelude.Maybe Prelude.Text)
scheduledInstancesNetworkInterface_privateIpAddress :: Lens' ScheduledInstancesNetworkInterface (Maybe Text)
scheduledInstancesNetworkInterface_privateIpAddress = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledInstancesNetworkInterface' {Maybe Text
privateIpAddress :: Maybe Text
$sel:privateIpAddress:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Text
privateIpAddress} -> Maybe Text
privateIpAddress) (\s :: ScheduledInstancesNetworkInterface
s@ScheduledInstancesNetworkInterface' {} Maybe Text
a -> ScheduledInstancesNetworkInterface
s {$sel:privateIpAddress:ScheduledInstancesNetworkInterface' :: Maybe Text
privateIpAddress = Maybe Text
a} :: ScheduledInstancesNetworkInterface)

-- | The private IPv4 addresses.
scheduledInstancesNetworkInterface_privateIpAddressConfigs :: Lens.Lens' ScheduledInstancesNetworkInterface (Prelude.Maybe [ScheduledInstancesPrivateIpAddressConfig])
scheduledInstancesNetworkInterface_privateIpAddressConfigs :: Lens'
  ScheduledInstancesNetworkInterface
  (Maybe [ScheduledInstancesPrivateIpAddressConfig])
scheduledInstancesNetworkInterface_privateIpAddressConfigs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledInstancesNetworkInterface' {Maybe [ScheduledInstancesPrivateIpAddressConfig]
privateIpAddressConfigs :: Maybe [ScheduledInstancesPrivateIpAddressConfig]
$sel:privateIpAddressConfigs:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface
-> Maybe [ScheduledInstancesPrivateIpAddressConfig]
privateIpAddressConfigs} -> Maybe [ScheduledInstancesPrivateIpAddressConfig]
privateIpAddressConfigs) (\s :: ScheduledInstancesNetworkInterface
s@ScheduledInstancesNetworkInterface' {} Maybe [ScheduledInstancesPrivateIpAddressConfig]
a -> ScheduledInstancesNetworkInterface
s {$sel:privateIpAddressConfigs:ScheduledInstancesNetworkInterface' :: Maybe [ScheduledInstancesPrivateIpAddressConfig]
privateIpAddressConfigs = Maybe [ScheduledInstancesPrivateIpAddressConfig]
a} :: ScheduledInstancesNetworkInterface) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The number of secondary private IPv4 addresses.
scheduledInstancesNetworkInterface_secondaryPrivateIpAddressCount :: Lens.Lens' ScheduledInstancesNetworkInterface (Prelude.Maybe Prelude.Int)
scheduledInstancesNetworkInterface_secondaryPrivateIpAddressCount :: Lens' ScheduledInstancesNetworkInterface (Maybe Int)
scheduledInstancesNetworkInterface_secondaryPrivateIpAddressCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledInstancesNetworkInterface' {Maybe Int
secondaryPrivateIpAddressCount :: Maybe Int
$sel:secondaryPrivateIpAddressCount:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Int
secondaryPrivateIpAddressCount} -> Maybe Int
secondaryPrivateIpAddressCount) (\s :: ScheduledInstancesNetworkInterface
s@ScheduledInstancesNetworkInterface' {} Maybe Int
a -> ScheduledInstancesNetworkInterface
s {$sel:secondaryPrivateIpAddressCount:ScheduledInstancesNetworkInterface' :: Maybe Int
secondaryPrivateIpAddressCount = Maybe Int
a} :: ScheduledInstancesNetworkInterface)

-- | The ID of the subnet.
scheduledInstancesNetworkInterface_subnetId :: Lens.Lens' ScheduledInstancesNetworkInterface (Prelude.Maybe Prelude.Text)
scheduledInstancesNetworkInterface_subnetId :: Lens' ScheduledInstancesNetworkInterface (Maybe Text)
scheduledInstancesNetworkInterface_subnetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledInstancesNetworkInterface' {Maybe Text
subnetId :: Maybe Text
$sel:subnetId:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Text
subnetId} -> Maybe Text
subnetId) (\s :: ScheduledInstancesNetworkInterface
s@ScheduledInstancesNetworkInterface' {} Maybe Text
a -> ScheduledInstancesNetworkInterface
s {$sel:subnetId:ScheduledInstancesNetworkInterface' :: Maybe Text
subnetId = Maybe Text
a} :: ScheduledInstancesNetworkInterface)

instance
  Prelude.Hashable
    ScheduledInstancesNetworkInterface
  where
  hashWithSalt :: Int -> ScheduledInstancesNetworkInterface -> Int
hashWithSalt
    Int
_salt
    ScheduledInstancesNetworkInterface' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [ScheduledInstancesIpv6Address]
Maybe [ScheduledInstancesPrivateIpAddressConfig]
Maybe Text
subnetId :: Maybe Text
secondaryPrivateIpAddressCount :: Maybe Int
privateIpAddressConfigs :: Maybe [ScheduledInstancesPrivateIpAddressConfig]
privateIpAddress :: Maybe Text
networkInterfaceId :: Maybe Text
ipv6Addresses :: Maybe [ScheduledInstancesIpv6Address]
ipv6AddressCount :: Maybe Int
groups :: Maybe [Text]
deviceIndex :: Maybe Int
description :: Maybe Text
deleteOnTermination :: Maybe Bool
associatePublicIpAddress :: Maybe Bool
$sel:subnetId:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Text
$sel:secondaryPrivateIpAddressCount:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Int
$sel:privateIpAddressConfigs:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface
-> Maybe [ScheduledInstancesPrivateIpAddressConfig]
$sel:privateIpAddress:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Text
$sel:networkInterfaceId:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Text
$sel:ipv6Addresses:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface
-> Maybe [ScheduledInstancesIpv6Address]
$sel:ipv6AddressCount:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Int
$sel:groups:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe [Text]
$sel:deviceIndex:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Int
$sel:description:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Text
$sel:deleteOnTermination:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Bool
$sel:associatePublicIpAddress:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Bool
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
associatePublicIpAddress
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
deleteOnTermination
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
deviceIndex
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
groups
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
ipv6AddressCount
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ScheduledInstancesIpv6Address]
ipv6Addresses
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
networkInterfaceId
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
privateIpAddress
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ScheduledInstancesPrivateIpAddressConfig]
privateIpAddressConfigs
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
secondaryPrivateIpAddressCount
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
subnetId

instance
  Prelude.NFData
    ScheduledInstancesNetworkInterface
  where
  rnf :: ScheduledInstancesNetworkInterface -> ()
rnf ScheduledInstancesNetworkInterface' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [ScheduledInstancesIpv6Address]
Maybe [ScheduledInstancesPrivateIpAddressConfig]
Maybe Text
subnetId :: Maybe Text
secondaryPrivateIpAddressCount :: Maybe Int
privateIpAddressConfigs :: Maybe [ScheduledInstancesPrivateIpAddressConfig]
privateIpAddress :: Maybe Text
networkInterfaceId :: Maybe Text
ipv6Addresses :: Maybe [ScheduledInstancesIpv6Address]
ipv6AddressCount :: Maybe Int
groups :: Maybe [Text]
deviceIndex :: Maybe Int
description :: Maybe Text
deleteOnTermination :: Maybe Bool
associatePublicIpAddress :: Maybe Bool
$sel:subnetId:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Text
$sel:secondaryPrivateIpAddressCount:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Int
$sel:privateIpAddressConfigs:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface
-> Maybe [ScheduledInstancesPrivateIpAddressConfig]
$sel:privateIpAddress:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Text
$sel:networkInterfaceId:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Text
$sel:ipv6Addresses:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface
-> Maybe [ScheduledInstancesIpv6Address]
$sel:ipv6AddressCount:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Int
$sel:groups:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe [Text]
$sel:deviceIndex:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Int
$sel:description:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Text
$sel:deleteOnTermination:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Bool
$sel:associatePublicIpAddress:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
associatePublicIpAddress
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
deleteOnTermination
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
deviceIndex
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
groups
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
ipv6AddressCount
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ScheduledInstancesIpv6Address]
ipv6Addresses
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
networkInterfaceId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
privateIpAddress
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ScheduledInstancesPrivateIpAddressConfig]
privateIpAddressConfigs
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
secondaryPrivateIpAddressCount
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
subnetId

instance
  Data.ToQuery
    ScheduledInstancesNetworkInterface
  where
  toQuery :: ScheduledInstancesNetworkInterface -> QueryString
toQuery ScheduledInstancesNetworkInterface' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [ScheduledInstancesIpv6Address]
Maybe [ScheduledInstancesPrivateIpAddressConfig]
Maybe Text
subnetId :: Maybe Text
secondaryPrivateIpAddressCount :: Maybe Int
privateIpAddressConfigs :: Maybe [ScheduledInstancesPrivateIpAddressConfig]
privateIpAddress :: Maybe Text
networkInterfaceId :: Maybe Text
ipv6Addresses :: Maybe [ScheduledInstancesIpv6Address]
ipv6AddressCount :: Maybe Int
groups :: Maybe [Text]
deviceIndex :: Maybe Int
description :: Maybe Text
deleteOnTermination :: Maybe Bool
associatePublicIpAddress :: Maybe Bool
$sel:subnetId:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Text
$sel:secondaryPrivateIpAddressCount:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Int
$sel:privateIpAddressConfigs:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface
-> Maybe [ScheduledInstancesPrivateIpAddressConfig]
$sel:privateIpAddress:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Text
$sel:networkInterfaceId:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Text
$sel:ipv6Addresses:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface
-> Maybe [ScheduledInstancesIpv6Address]
$sel:ipv6AddressCount:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Int
$sel:groups:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe [Text]
$sel:deviceIndex:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Int
$sel:description:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Text
$sel:deleteOnTermination:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Bool
$sel:associatePublicIpAddress:ScheduledInstancesNetworkInterface' :: ScheduledInstancesNetworkInterface -> Maybe Bool
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"AssociatePublicIpAddress"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
associatePublicIpAddress,
        ByteString
"DeleteOnTermination" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
deleteOnTermination,
        ByteString
"Description" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
description,
        ByteString
"DeviceIndex" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
deviceIndex,
        forall a. ToQuery a => a -> QueryString
Data.toQuery
          (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"Group" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
groups),
        ByteString
"Ipv6AddressCount" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
ipv6AddressCount,
        forall a. ToQuery a => a -> QueryString
Data.toQuery
          ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"Ipv6Address"
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ScheduledInstancesIpv6Address]
ipv6Addresses
          ),
        ByteString
"NetworkInterfaceId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
networkInterfaceId,
        ByteString
"PrivateIpAddress" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
privateIpAddress,
        forall a. ToQuery a => a -> QueryString
Data.toQuery
          ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"PrivateIpAddressConfig"
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ScheduledInstancesPrivateIpAddressConfig]
privateIpAddressConfigs
          ),
        ByteString
"SecondaryPrivateIpAddressCount"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
secondaryPrivateIpAddressCount,
        ByteString
"SubnetId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
subnetId
      ]