module Stratosphere.DataSync.LocationObjectStorage ( module Exports, LocationObjectStorage(..), mkLocationObjectStorage ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import {-# SOURCE #-} Stratosphere.DataSync.LocationObjectStorage.CmkSecretConfigProperty as Exports import {-# SOURCE #-} Stratosphere.DataSync.LocationObjectStorage.CustomSecretConfigProperty as Exports import Stratosphere.ResourceProperties import Stratosphere.Tag import Stratosphere.Value data LocationObjectStorage = -- | See: LocationObjectStorage {haddock_workaround_ :: (), -- | See: accessKey :: (Prelude.Maybe (Value Prelude.Text)), -- | See: agentArns :: (Prelude.Maybe (ValueList Prelude.Text)), -- | See: bucketName :: (Prelude.Maybe (Value Prelude.Text)), -- | See: cmkSecretConfig :: (Prelude.Maybe CmkSecretConfigProperty), -- | See: customSecretConfig :: (Prelude.Maybe CustomSecretConfigProperty), -- | See: secretKey :: (Prelude.Maybe (Value Prelude.Text)), -- | See: serverCertificate :: (Prelude.Maybe (Value Prelude.Text)), -- | See: serverHostname :: (Prelude.Maybe (Value Prelude.Text)), -- | See: serverPort :: (Prelude.Maybe (Value Prelude.Integer)), -- | See: serverProtocol :: (Prelude.Maybe (Value Prelude.Text)), -- | See: subdirectory :: (Prelude.Maybe (Value Prelude.Text)), -- | See: tags :: (Prelude.Maybe [Tag])} deriving stock (Prelude.Eq, Prelude.Show) mkLocationObjectStorage :: LocationObjectStorage mkLocationObjectStorage = LocationObjectStorage {haddock_workaround_ = (), accessKey = Prelude.Nothing, agentArns = Prelude.Nothing, bucketName = Prelude.Nothing, cmkSecretConfig = Prelude.Nothing, customSecretConfig = Prelude.Nothing, secretKey = Prelude.Nothing, serverCertificate = Prelude.Nothing, serverHostname = Prelude.Nothing, serverPort = Prelude.Nothing, serverProtocol = Prelude.Nothing, subdirectory = Prelude.Nothing, tags = Prelude.Nothing} instance ToResourceProperties LocationObjectStorage where toResourceProperties LocationObjectStorage {..} = ResourceProperties {awsType = "AWS::DataSync::LocationObjectStorage", supportsTags = Prelude.True, properties = Prelude.fromList (Prelude.catMaybes [(JSON..=) "AccessKey" Prelude.<$> accessKey, (JSON..=) "AgentArns" Prelude.<$> agentArns, (JSON..=) "BucketName" Prelude.<$> bucketName, (JSON..=) "CmkSecretConfig" Prelude.<$> cmkSecretConfig, (JSON..=) "CustomSecretConfig" Prelude.<$> customSecretConfig, (JSON..=) "SecretKey" Prelude.<$> secretKey, (JSON..=) "ServerCertificate" Prelude.<$> serverCertificate, (JSON..=) "ServerHostname" Prelude.<$> serverHostname, (JSON..=) "ServerPort" Prelude.<$> serverPort, (JSON..=) "ServerProtocol" Prelude.<$> serverProtocol, (JSON..=) "Subdirectory" Prelude.<$> subdirectory, (JSON..=) "Tags" Prelude.<$> tags])} instance JSON.ToJSON LocationObjectStorage where toJSON LocationObjectStorage {..} = JSON.object (Prelude.fromList (Prelude.catMaybes [(JSON..=) "AccessKey" Prelude.<$> accessKey, (JSON..=) "AgentArns" Prelude.<$> agentArns, (JSON..=) "BucketName" Prelude.<$> bucketName, (JSON..=) "CmkSecretConfig" Prelude.<$> cmkSecretConfig, (JSON..=) "CustomSecretConfig" Prelude.<$> customSecretConfig, (JSON..=) "SecretKey" Prelude.<$> secretKey, (JSON..=) "ServerCertificate" Prelude.<$> serverCertificate, (JSON..=) "ServerHostname" Prelude.<$> serverHostname, (JSON..=) "ServerPort" Prelude.<$> serverPort, (JSON..=) "ServerProtocol" Prelude.<$> serverProtocol, (JSON..=) "Subdirectory" Prelude.<$> subdirectory, (JSON..=) "Tags" Prelude.<$> tags])) instance Property "AccessKey" LocationObjectStorage where type PropertyType "AccessKey" LocationObjectStorage = Value Prelude.Text set newValue LocationObjectStorage {..} = LocationObjectStorage {accessKey = Prelude.pure newValue, ..} instance Property "AgentArns" LocationObjectStorage where type PropertyType "AgentArns" LocationObjectStorage = ValueList Prelude.Text set newValue LocationObjectStorage {..} = LocationObjectStorage {agentArns = Prelude.pure newValue, ..} instance Property "BucketName" LocationObjectStorage where type PropertyType "BucketName" LocationObjectStorage = Value Prelude.Text set newValue LocationObjectStorage {..} = LocationObjectStorage {bucketName = Prelude.pure newValue, ..} instance Property "CmkSecretConfig" LocationObjectStorage where type PropertyType "CmkSecretConfig" LocationObjectStorage = CmkSecretConfigProperty set newValue LocationObjectStorage {..} = LocationObjectStorage {cmkSecretConfig = Prelude.pure newValue, ..} instance Property "CustomSecretConfig" LocationObjectStorage where type PropertyType "CustomSecretConfig" LocationObjectStorage = CustomSecretConfigProperty set newValue LocationObjectStorage {..} = LocationObjectStorage {customSecretConfig = Prelude.pure newValue, ..} instance Property "SecretKey" LocationObjectStorage where type PropertyType "SecretKey" LocationObjectStorage = Value Prelude.Text set newValue LocationObjectStorage {..} = LocationObjectStorage {secretKey = Prelude.pure newValue, ..} instance Property "ServerCertificate" LocationObjectStorage where type PropertyType "ServerCertificate" LocationObjectStorage = Value Prelude.Text set newValue LocationObjectStorage {..} = LocationObjectStorage {serverCertificate = Prelude.pure newValue, ..} instance Property "ServerHostname" LocationObjectStorage where type PropertyType "ServerHostname" LocationObjectStorage = Value Prelude.Text set newValue LocationObjectStorage {..} = LocationObjectStorage {serverHostname = Prelude.pure newValue, ..} instance Property "ServerPort" LocationObjectStorage where type PropertyType "ServerPort" LocationObjectStorage = Value Prelude.Integer set newValue LocationObjectStorage {..} = LocationObjectStorage {serverPort = Prelude.pure newValue, ..} instance Property "ServerProtocol" LocationObjectStorage where type PropertyType "ServerProtocol" LocationObjectStorage = Value Prelude.Text set newValue LocationObjectStorage {..} = LocationObjectStorage {serverProtocol = Prelude.pure newValue, ..} instance Property "Subdirectory" LocationObjectStorage where type PropertyType "Subdirectory" LocationObjectStorage = Value Prelude.Text set newValue LocationObjectStorage {..} = LocationObjectStorage {subdirectory = Prelude.pure newValue, ..} instance Property "Tags" LocationObjectStorage where type PropertyType "Tags" LocationObjectStorage = [Tag] set newValue LocationObjectStorage {..} = LocationObjectStorage {tags = Prelude.pure newValue, ..}