module Stratosphere.DataZone.Connection.BasicAuthenticationCredentialsProperty ( BasicAuthenticationCredentialsProperty(..), mkBasicAuthenticationCredentialsProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Value data BasicAuthenticationCredentialsProperty = -- | See: BasicAuthenticationCredentialsProperty {haddock_workaround_ :: (), -- | See: password :: (Prelude.Maybe (Value Prelude.Text)), -- | See: userName :: (Prelude.Maybe (Value Prelude.Text))} deriving stock (Prelude.Eq, Prelude.Show) mkBasicAuthenticationCredentialsProperty :: BasicAuthenticationCredentialsProperty mkBasicAuthenticationCredentialsProperty = BasicAuthenticationCredentialsProperty {haddock_workaround_ = (), password = Prelude.Nothing, userName = Prelude.Nothing} instance ToResourceProperties BasicAuthenticationCredentialsProperty where toResourceProperties BasicAuthenticationCredentialsProperty {..} = ResourceProperties {awsType = "AWS::DataZone::Connection.BasicAuthenticationCredentials", supportsTags = Prelude.False, properties = Prelude.fromList (Prelude.catMaybes [(JSON..=) "Password" Prelude.<$> password, (JSON..=) "UserName" Prelude.<$> userName])} instance JSON.ToJSON BasicAuthenticationCredentialsProperty where toJSON BasicAuthenticationCredentialsProperty {..} = JSON.object (Prelude.fromList (Prelude.catMaybes [(JSON..=) "Password" Prelude.<$> password, (JSON..=) "UserName" Prelude.<$> userName])) instance Property "Password" BasicAuthenticationCredentialsProperty where type PropertyType "Password" BasicAuthenticationCredentialsProperty = Value Prelude.Text set newValue BasicAuthenticationCredentialsProperty {..} = BasicAuthenticationCredentialsProperty {password = Prelude.pure newValue, ..} instance Property "UserName" BasicAuthenticationCredentialsProperty where type PropertyType "UserName" BasicAuthenticationCredentialsProperty = Value Prelude.Text set newValue BasicAuthenticationCredentialsProperty {..} = BasicAuthenticationCredentialsProperty {userName = Prelude.pure newValue, ..}