module Stratosphere.DataZone.Connection.GlueOAuth2CredentialsProperty ( GlueOAuth2CredentialsProperty(..), mkGlueOAuth2CredentialsProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Value data GlueOAuth2CredentialsProperty = -- | See: GlueOAuth2CredentialsProperty {haddock_workaround_ :: (), -- | See: accessToken :: (Prelude.Maybe (Value Prelude.Text)), -- | See: jwtToken :: (Prelude.Maybe (Value Prelude.Text)), -- | See: refreshToken :: (Prelude.Maybe (Value Prelude.Text)), -- | See: userManagedClientApplicationClientSecret :: (Prelude.Maybe (Value Prelude.Text))} deriving stock (Prelude.Eq, Prelude.Show) mkGlueOAuth2CredentialsProperty :: GlueOAuth2CredentialsProperty mkGlueOAuth2CredentialsProperty = GlueOAuth2CredentialsProperty {haddock_workaround_ = (), accessToken = Prelude.Nothing, jwtToken = Prelude.Nothing, refreshToken = Prelude.Nothing, userManagedClientApplicationClientSecret = Prelude.Nothing} instance ToResourceProperties GlueOAuth2CredentialsProperty where toResourceProperties GlueOAuth2CredentialsProperty {..} = ResourceProperties {awsType = "AWS::DataZone::Connection.GlueOAuth2Credentials", supportsTags = Prelude.False, properties = Prelude.fromList (Prelude.catMaybes [(JSON..=) "AccessToken" Prelude.<$> accessToken, (JSON..=) "JwtToken" Prelude.<$> jwtToken, (JSON..=) "RefreshToken" Prelude.<$> refreshToken, (JSON..=) "UserManagedClientApplicationClientSecret" Prelude.<$> userManagedClientApplicationClientSecret])} instance JSON.ToJSON GlueOAuth2CredentialsProperty where toJSON GlueOAuth2CredentialsProperty {..} = JSON.object (Prelude.fromList (Prelude.catMaybes [(JSON..=) "AccessToken" Prelude.<$> accessToken, (JSON..=) "JwtToken" Prelude.<$> jwtToken, (JSON..=) "RefreshToken" Prelude.<$> refreshToken, (JSON..=) "UserManagedClientApplicationClientSecret" Prelude.<$> userManagedClientApplicationClientSecret])) instance Property "AccessToken" GlueOAuth2CredentialsProperty where type PropertyType "AccessToken" GlueOAuth2CredentialsProperty = Value Prelude.Text set newValue GlueOAuth2CredentialsProperty {..} = GlueOAuth2CredentialsProperty {accessToken = Prelude.pure newValue, ..} instance Property "JwtToken" GlueOAuth2CredentialsProperty where type PropertyType "JwtToken" GlueOAuth2CredentialsProperty = Value Prelude.Text set newValue GlueOAuth2CredentialsProperty {..} = GlueOAuth2CredentialsProperty {jwtToken = Prelude.pure newValue, ..} instance Property "RefreshToken" GlueOAuth2CredentialsProperty where type PropertyType "RefreshToken" GlueOAuth2CredentialsProperty = Value Prelude.Text set newValue GlueOAuth2CredentialsProperty {..} = GlueOAuth2CredentialsProperty {refreshToken = Prelude.pure newValue, ..} instance Property "UserManagedClientApplicationClientSecret" GlueOAuth2CredentialsProperty where type PropertyType "UserManagedClientApplicationClientSecret" GlueOAuth2CredentialsProperty = Value Prelude.Text set newValue GlueOAuth2CredentialsProperty {..} = GlueOAuth2CredentialsProperty {userManagedClientApplicationClientSecret = Prelude.pure newValue, ..}