{-# 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.Placement
-- 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.Placement 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.Tenancy
import qualified Amazonka.Prelude as Prelude

-- | Describes the placement of an instance.
--
-- /See:/ 'newPlacement' smart constructor.
data Placement = Placement'
  { -- | The affinity setting for the instance on the Dedicated Host.
    --
    -- This parameter is not supported for
    -- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet CreateFleet>
    -- or
    -- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html ImportInstance>.
    Placement -> Maybe Text
affinity :: Prelude.Maybe Prelude.Text,
    -- | The Availability Zone of the instance.
    --
    -- If not specified, an Availability Zone will be automatically chosen for
    -- you based on the load balancing criteria for the Region.
    --
    -- This parameter is not supported for
    -- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet CreateFleet>.
    Placement -> Maybe Text
availabilityZone :: Prelude.Maybe Prelude.Text,
    -- | The ID of the placement group that the instance is in. If you specify
    -- @GroupId@, you can\'t specify @GroupName@.
    Placement -> Maybe Text
groupId :: Prelude.Maybe Prelude.Text,
    -- | The name of the placement group that the instance is in. If you specify
    -- @GroupName@, you can\'t specify @GroupId@.
    Placement -> Maybe Text
groupName :: Prelude.Maybe Prelude.Text,
    -- | The ID of the Dedicated Host on which the instance resides.
    --
    -- This parameter is not supported for
    -- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet CreateFleet>
    -- or
    -- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html ImportInstance>.
    Placement -> Maybe Text
hostId :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the host resource group in which to launch the instances.
    --
    -- If you specify this parameter, either omit the __Tenancy__ parameter or
    -- set it to @host@.
    --
    -- This parameter is not supported for
    -- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet CreateFleet>.
    Placement -> Maybe Text
hostResourceGroupArn :: Prelude.Maybe Prelude.Text,
    -- | The number of the partition that the instance is in. Valid only if the
    -- placement group strategy is set to @partition@.
    --
    -- This parameter is not supported for
    -- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet CreateFleet>.
    Placement -> Maybe Int
partitionNumber :: Prelude.Maybe Prelude.Int,
    -- | Reserved for future use.
    Placement -> Maybe Text
spreadDomain :: Prelude.Maybe Prelude.Text,
    -- | The tenancy of the instance (if the instance is running in a VPC). An
    -- instance with a tenancy of @dedicated@ runs on single-tenant hardware.
    --
    -- This parameter is not supported for
    -- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet CreateFleet>.
    -- The @host@ tenancy is not supported for
    -- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html ImportInstance>
    -- or for T3 instances that are configured for the @unlimited@ CPU credit
    -- option.
    Placement -> Maybe Tenancy
tenancy :: Prelude.Maybe Tenancy
  }
  deriving (Placement -> Placement -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Placement -> Placement -> Bool
$c/= :: Placement -> Placement -> Bool
== :: Placement -> Placement -> Bool
$c== :: Placement -> Placement -> Bool
Prelude.Eq, ReadPrec [Placement]
ReadPrec Placement
Int -> ReadS Placement
ReadS [Placement]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Placement]
$creadListPrec :: ReadPrec [Placement]
readPrec :: ReadPrec Placement
$creadPrec :: ReadPrec Placement
readList :: ReadS [Placement]
$creadList :: ReadS [Placement]
readsPrec :: Int -> ReadS Placement
$creadsPrec :: Int -> ReadS Placement
Prelude.Read, Int -> Placement -> ShowS
[Placement] -> ShowS
Placement -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Placement] -> ShowS
$cshowList :: [Placement] -> ShowS
show :: Placement -> String
$cshow :: Placement -> String
showsPrec :: Int -> Placement -> ShowS
$cshowsPrec :: Int -> Placement -> ShowS
Prelude.Show, forall x. Rep Placement x -> Placement
forall x. Placement -> Rep Placement x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Placement x -> Placement
$cfrom :: forall x. Placement -> Rep Placement x
Prelude.Generic)

-- |
-- Create a value of 'Placement' 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:
--
-- 'affinity', 'placement_affinity' - The affinity setting for the instance on the Dedicated Host.
--
-- This parameter is not supported for
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet CreateFleet>
-- or
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html ImportInstance>.
--
-- 'availabilityZone', 'placement_availabilityZone' - The Availability Zone of the instance.
--
-- If not specified, an Availability Zone will be automatically chosen for
-- you based on the load balancing criteria for the Region.
--
-- This parameter is not supported for
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet CreateFleet>.
--
-- 'groupId', 'placement_groupId' - The ID of the placement group that the instance is in. If you specify
-- @GroupId@, you can\'t specify @GroupName@.
--
-- 'groupName', 'placement_groupName' - The name of the placement group that the instance is in. If you specify
-- @GroupName@, you can\'t specify @GroupId@.
--
-- 'hostId', 'placement_hostId' - The ID of the Dedicated Host on which the instance resides.
--
-- This parameter is not supported for
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet CreateFleet>
-- or
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html ImportInstance>.
--
-- 'hostResourceGroupArn', 'placement_hostResourceGroupArn' - The ARN of the host resource group in which to launch the instances.
--
-- If you specify this parameter, either omit the __Tenancy__ parameter or
-- set it to @host@.
--
-- This parameter is not supported for
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet CreateFleet>.
--
-- 'partitionNumber', 'placement_partitionNumber' - The number of the partition that the instance is in. Valid only if the
-- placement group strategy is set to @partition@.
--
-- This parameter is not supported for
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet CreateFleet>.
--
-- 'spreadDomain', 'placement_spreadDomain' - Reserved for future use.
--
-- 'tenancy', 'placement_tenancy' - The tenancy of the instance (if the instance is running in a VPC). An
-- instance with a tenancy of @dedicated@ runs on single-tenant hardware.
--
-- This parameter is not supported for
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet CreateFleet>.
-- The @host@ tenancy is not supported for
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html ImportInstance>
-- or for T3 instances that are configured for the @unlimited@ CPU credit
-- option.
newPlacement ::
  Placement
newPlacement :: Placement
newPlacement =
  Placement'
    { $sel:affinity:Placement' :: Maybe Text
affinity = forall a. Maybe a
Prelude.Nothing,
      $sel:availabilityZone:Placement' :: Maybe Text
availabilityZone = forall a. Maybe a
Prelude.Nothing,
      $sel:groupId:Placement' :: Maybe Text
groupId = forall a. Maybe a
Prelude.Nothing,
      $sel:groupName:Placement' :: Maybe Text
groupName = forall a. Maybe a
Prelude.Nothing,
      $sel:hostId:Placement' :: Maybe Text
hostId = forall a. Maybe a
Prelude.Nothing,
      $sel:hostResourceGroupArn:Placement' :: Maybe Text
hostResourceGroupArn = forall a. Maybe a
Prelude.Nothing,
      $sel:partitionNumber:Placement' :: Maybe Int
partitionNumber = forall a. Maybe a
Prelude.Nothing,
      $sel:spreadDomain:Placement' :: Maybe Text
spreadDomain = forall a. Maybe a
Prelude.Nothing,
      $sel:tenancy:Placement' :: Maybe Tenancy
tenancy = forall a. Maybe a
Prelude.Nothing
    }

-- | The affinity setting for the instance on the Dedicated Host.
--
-- This parameter is not supported for
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet CreateFleet>
-- or
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html ImportInstance>.
placement_affinity :: Lens.Lens' Placement (Prelude.Maybe Prelude.Text)
placement_affinity :: Lens' Placement (Maybe Text)
placement_affinity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Placement' {Maybe Text
affinity :: Maybe Text
$sel:affinity:Placement' :: Placement -> Maybe Text
affinity} -> Maybe Text
affinity) (\s :: Placement
s@Placement' {} Maybe Text
a -> Placement
s {$sel:affinity:Placement' :: Maybe Text
affinity = Maybe Text
a} :: Placement)

-- | The Availability Zone of the instance.
--
-- If not specified, an Availability Zone will be automatically chosen for
-- you based on the load balancing criteria for the Region.
--
-- This parameter is not supported for
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet CreateFleet>.
placement_availabilityZone :: Lens.Lens' Placement (Prelude.Maybe Prelude.Text)
placement_availabilityZone :: Lens' Placement (Maybe Text)
placement_availabilityZone = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Placement' {Maybe Text
availabilityZone :: Maybe Text
$sel:availabilityZone:Placement' :: Placement -> Maybe Text
availabilityZone} -> Maybe Text
availabilityZone) (\s :: Placement
s@Placement' {} Maybe Text
a -> Placement
s {$sel:availabilityZone:Placement' :: Maybe Text
availabilityZone = Maybe Text
a} :: Placement)

-- | The ID of the placement group that the instance is in. If you specify
-- @GroupId@, you can\'t specify @GroupName@.
placement_groupId :: Lens.Lens' Placement (Prelude.Maybe Prelude.Text)
placement_groupId :: Lens' Placement (Maybe Text)
placement_groupId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Placement' {Maybe Text
groupId :: Maybe Text
$sel:groupId:Placement' :: Placement -> Maybe Text
groupId} -> Maybe Text
groupId) (\s :: Placement
s@Placement' {} Maybe Text
a -> Placement
s {$sel:groupId:Placement' :: Maybe Text
groupId = Maybe Text
a} :: Placement)

-- | The name of the placement group that the instance is in. If you specify
-- @GroupName@, you can\'t specify @GroupId@.
placement_groupName :: Lens.Lens' Placement (Prelude.Maybe Prelude.Text)
placement_groupName :: Lens' Placement (Maybe Text)
placement_groupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Placement' {Maybe Text
groupName :: Maybe Text
$sel:groupName:Placement' :: Placement -> Maybe Text
groupName} -> Maybe Text
groupName) (\s :: Placement
s@Placement' {} Maybe Text
a -> Placement
s {$sel:groupName:Placement' :: Maybe Text
groupName = Maybe Text
a} :: Placement)

-- | The ID of the Dedicated Host on which the instance resides.
--
-- This parameter is not supported for
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet CreateFleet>
-- or
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html ImportInstance>.
placement_hostId :: Lens.Lens' Placement (Prelude.Maybe Prelude.Text)
placement_hostId :: Lens' Placement (Maybe Text)
placement_hostId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Placement' {Maybe Text
hostId :: Maybe Text
$sel:hostId:Placement' :: Placement -> Maybe Text
hostId} -> Maybe Text
hostId) (\s :: Placement
s@Placement' {} Maybe Text
a -> Placement
s {$sel:hostId:Placement' :: Maybe Text
hostId = Maybe Text
a} :: Placement)

-- | The ARN of the host resource group in which to launch the instances.
--
-- If you specify this parameter, either omit the __Tenancy__ parameter or
-- set it to @host@.
--
-- This parameter is not supported for
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet CreateFleet>.
placement_hostResourceGroupArn :: Lens.Lens' Placement (Prelude.Maybe Prelude.Text)
placement_hostResourceGroupArn :: Lens' Placement (Maybe Text)
placement_hostResourceGroupArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Placement' {Maybe Text
hostResourceGroupArn :: Maybe Text
$sel:hostResourceGroupArn:Placement' :: Placement -> Maybe Text
hostResourceGroupArn} -> Maybe Text
hostResourceGroupArn) (\s :: Placement
s@Placement' {} Maybe Text
a -> Placement
s {$sel:hostResourceGroupArn:Placement' :: Maybe Text
hostResourceGroupArn = Maybe Text
a} :: Placement)

-- | The number of the partition that the instance is in. Valid only if the
-- placement group strategy is set to @partition@.
--
-- This parameter is not supported for
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet CreateFleet>.
placement_partitionNumber :: Lens.Lens' Placement (Prelude.Maybe Prelude.Int)
placement_partitionNumber :: Lens' Placement (Maybe Int)
placement_partitionNumber = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Placement' {Maybe Int
partitionNumber :: Maybe Int
$sel:partitionNumber:Placement' :: Placement -> Maybe Int
partitionNumber} -> Maybe Int
partitionNumber) (\s :: Placement
s@Placement' {} Maybe Int
a -> Placement
s {$sel:partitionNumber:Placement' :: Maybe Int
partitionNumber = Maybe Int
a} :: Placement)

-- | Reserved for future use.
placement_spreadDomain :: Lens.Lens' Placement (Prelude.Maybe Prelude.Text)
placement_spreadDomain :: Lens' Placement (Maybe Text)
placement_spreadDomain = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Placement' {Maybe Text
spreadDomain :: Maybe Text
$sel:spreadDomain:Placement' :: Placement -> Maybe Text
spreadDomain} -> Maybe Text
spreadDomain) (\s :: Placement
s@Placement' {} Maybe Text
a -> Placement
s {$sel:spreadDomain:Placement' :: Maybe Text
spreadDomain = Maybe Text
a} :: Placement)

-- | The tenancy of the instance (if the instance is running in a VPC). An
-- instance with a tenancy of @dedicated@ runs on single-tenant hardware.
--
-- This parameter is not supported for
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet CreateFleet>.
-- The @host@ tenancy is not supported for
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html ImportInstance>
-- or for T3 instances that are configured for the @unlimited@ CPU credit
-- option.
placement_tenancy :: Lens.Lens' Placement (Prelude.Maybe Tenancy)
placement_tenancy :: Lens' Placement (Maybe Tenancy)
placement_tenancy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Placement' {Maybe Tenancy
tenancy :: Maybe Tenancy
$sel:tenancy:Placement' :: Placement -> Maybe Tenancy
tenancy} -> Maybe Tenancy
tenancy) (\s :: Placement
s@Placement' {} Maybe Tenancy
a -> Placement
s {$sel:tenancy:Placement' :: Maybe Tenancy
tenancy = Maybe Tenancy
a} :: Placement)

instance Data.FromXML Placement where
  parseXML :: [Node] -> Either String Placement
parseXML [Node]
x =
    Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Tenancy
-> Placement
Placement'
      forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"affinity")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"availabilityZone")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"groupId")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"groupName")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"hostId")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"hostResourceGroupArn")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"partitionNumber")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"spreadDomain")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"tenancy")

instance Prelude.Hashable Placement where
  hashWithSalt :: Int -> Placement -> Int
hashWithSalt Int
_salt Placement' {Maybe Int
Maybe Text
Maybe Tenancy
tenancy :: Maybe Tenancy
spreadDomain :: Maybe Text
partitionNumber :: Maybe Int
hostResourceGroupArn :: Maybe Text
hostId :: Maybe Text
groupName :: Maybe Text
groupId :: Maybe Text
availabilityZone :: Maybe Text
affinity :: Maybe Text
$sel:tenancy:Placement' :: Placement -> Maybe Tenancy
$sel:spreadDomain:Placement' :: Placement -> Maybe Text
$sel:partitionNumber:Placement' :: Placement -> Maybe Int
$sel:hostResourceGroupArn:Placement' :: Placement -> Maybe Text
$sel:hostId:Placement' :: Placement -> Maybe Text
$sel:groupName:Placement' :: Placement -> Maybe Text
$sel:groupId:Placement' :: Placement -> Maybe Text
$sel:availabilityZone:Placement' :: Placement -> Maybe Text
$sel:affinity:Placement' :: Placement -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
affinity
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
availabilityZone
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
groupId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
groupName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
hostId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
hostResourceGroupArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
partitionNumber
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
spreadDomain
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Tenancy
tenancy

instance Prelude.NFData Placement where
  rnf :: Placement -> ()
rnf Placement' {Maybe Int
Maybe Text
Maybe Tenancy
tenancy :: Maybe Tenancy
spreadDomain :: Maybe Text
partitionNumber :: Maybe Int
hostResourceGroupArn :: Maybe Text
hostId :: Maybe Text
groupName :: Maybe Text
groupId :: Maybe Text
availabilityZone :: Maybe Text
affinity :: Maybe Text
$sel:tenancy:Placement' :: Placement -> Maybe Tenancy
$sel:spreadDomain:Placement' :: Placement -> Maybe Text
$sel:partitionNumber:Placement' :: Placement -> Maybe Int
$sel:hostResourceGroupArn:Placement' :: Placement -> Maybe Text
$sel:hostId:Placement' :: Placement -> Maybe Text
$sel:groupName:Placement' :: Placement -> Maybe Text
$sel:groupId:Placement' :: Placement -> Maybe Text
$sel:availabilityZone:Placement' :: Placement -> Maybe Text
$sel:affinity:Placement' :: Placement -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
affinity
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
availabilityZone
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
groupId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
groupName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
hostId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
hostResourceGroupArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
partitionNumber
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
spreadDomain
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Tenancy
tenancy

instance Data.ToQuery Placement where
  toQuery :: Placement -> QueryString
toQuery Placement' {Maybe Int
Maybe Text
Maybe Tenancy
tenancy :: Maybe Tenancy
spreadDomain :: Maybe Text
partitionNumber :: Maybe Int
hostResourceGroupArn :: Maybe Text
hostId :: Maybe Text
groupName :: Maybe Text
groupId :: Maybe Text
availabilityZone :: Maybe Text
affinity :: Maybe Text
$sel:tenancy:Placement' :: Placement -> Maybe Tenancy
$sel:spreadDomain:Placement' :: Placement -> Maybe Text
$sel:partitionNumber:Placement' :: Placement -> Maybe Int
$sel:hostResourceGroupArn:Placement' :: Placement -> Maybe Text
$sel:hostId:Placement' :: Placement -> Maybe Text
$sel:groupName:Placement' :: Placement -> Maybe Text
$sel:groupId:Placement' :: Placement -> Maybe Text
$sel:availabilityZone:Placement' :: Placement -> Maybe Text
$sel:affinity:Placement' :: Placement -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Affinity" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
affinity,
        ByteString
"AvailabilityZone" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
availabilityZone,
        ByteString
"GroupId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
groupId,
        ByteString
"GroupName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
groupName,
        ByteString
"HostId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
hostId,
        ByteString
"HostResourceGroupArn" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
hostResourceGroupArn,
        ByteString
"PartitionNumber" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
partitionNumber,
        ByteString
"SpreadDomain" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
spreadDomain,
        ByteString
"Tenancy" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Tenancy
tenancy
      ]