module Network.AWS.APIGateway.Types.Product where
import Network.AWS.APIGateway.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
data APIKey = APIKey'
{ _akEnabled :: !(Maybe Bool)
, _akCreatedDate :: !(Maybe POSIX)
, _akName :: !(Maybe Text)
, _akId :: !(Maybe Text)
, _akStageKeys :: !(Maybe [Text])
, _akLastUpdatedDate :: !(Maybe POSIX)
, _akDescription :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
apiKey
:: APIKey
apiKey =
APIKey'
{ _akEnabled = Nothing
, _akCreatedDate = Nothing
, _akName = Nothing
, _akId = Nothing
, _akStageKeys = Nothing
, _akLastUpdatedDate = Nothing
, _akDescription = Nothing
}
akEnabled :: Lens' APIKey (Maybe Bool)
akEnabled = lens _akEnabled (\ s a -> s{_akEnabled = a});
akCreatedDate :: Lens' APIKey (Maybe UTCTime)
akCreatedDate = lens _akCreatedDate (\ s a -> s{_akCreatedDate = a}) . mapping _Time;
akName :: Lens' APIKey (Maybe Text)
akName = lens _akName (\ s a -> s{_akName = a});
akId :: Lens' APIKey (Maybe Text)
akId = lens _akId (\ s a -> s{_akId = a});
akStageKeys :: Lens' APIKey [Text]
akStageKeys = lens _akStageKeys (\ s a -> s{_akStageKeys = a}) . _Default . _Coerce;
akLastUpdatedDate :: Lens' APIKey (Maybe UTCTime)
akLastUpdatedDate = lens _akLastUpdatedDate (\ s a -> s{_akLastUpdatedDate = a}) . mapping _Time;
akDescription :: Lens' APIKey (Maybe Text)
akDescription = lens _akDescription (\ s a -> s{_akDescription = a});
instance FromJSON APIKey where
parseJSON
= withObject "APIKey"
(\ x ->
APIKey' <$>
(x .:? "enabled") <*> (x .:? "createdDate") <*>
(x .:? "name")
<*> (x .:? "id")
<*> (x .:? "stageKeys" .!= mempty)
<*> (x .:? "lastUpdatedDate")
<*> (x .:? "description"))
instance Hashable APIKey
data Account = Account'
{ _aCloudwatchRoleARN :: !(Maybe Text)
, _aThrottleSettings :: !(Maybe ThrottleSettings)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
account
:: Account
account =
Account'
{ _aCloudwatchRoleARN = Nothing
, _aThrottleSettings = Nothing
}
aCloudwatchRoleARN :: Lens' Account (Maybe Text)
aCloudwatchRoleARN = lens _aCloudwatchRoleARN (\ s a -> s{_aCloudwatchRoleARN = a});
aThrottleSettings :: Lens' Account (Maybe ThrottleSettings)
aThrottleSettings = lens _aThrottleSettings (\ s a -> s{_aThrottleSettings = a});
instance FromJSON Account where
parseJSON
= withObject "Account"
(\ x ->
Account' <$>
(x .:? "cloudwatchRoleArn") <*>
(x .:? "throttleSettings"))
instance Hashable Account
data Authorizer = Authorizer'
{ _aAuthorizerURI :: !(Maybe Text)
, _aIdentityValidationExpression :: !(Maybe Text)
, _aName :: !(Maybe Text)
, _aId :: !(Maybe Text)
, _aAuthorizerResultTtlInSeconds :: !(Maybe Int)
, _aType :: !(Maybe AuthorizerType)
, _aIdentitySource :: !(Maybe Text)
, _aAuthorizerCredentials :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
authorizer
:: Authorizer
authorizer =
Authorizer'
{ _aAuthorizerURI = Nothing
, _aIdentityValidationExpression = Nothing
, _aName = Nothing
, _aId = Nothing
, _aAuthorizerResultTtlInSeconds = Nothing
, _aType = Nothing
, _aIdentitySource = Nothing
, _aAuthorizerCredentials = Nothing
}
aAuthorizerURI :: Lens' Authorizer (Maybe Text)
aAuthorizerURI = lens _aAuthorizerURI (\ s a -> s{_aAuthorizerURI = a});
aIdentityValidationExpression :: Lens' Authorizer (Maybe Text)
aIdentityValidationExpression = lens _aIdentityValidationExpression (\ s a -> s{_aIdentityValidationExpression = a});
aName :: Lens' Authorizer (Maybe Text)
aName = lens _aName (\ s a -> s{_aName = a});
aId :: Lens' Authorizer (Maybe Text)
aId = lens _aId (\ s a -> s{_aId = a});
aAuthorizerResultTtlInSeconds :: Lens' Authorizer (Maybe Int)
aAuthorizerResultTtlInSeconds = lens _aAuthorizerResultTtlInSeconds (\ s a -> s{_aAuthorizerResultTtlInSeconds = a});
aType :: Lens' Authorizer (Maybe AuthorizerType)
aType = lens _aType (\ s a -> s{_aType = a});
aIdentitySource :: Lens' Authorizer (Maybe Text)
aIdentitySource = lens _aIdentitySource (\ s a -> s{_aIdentitySource = a});
aAuthorizerCredentials :: Lens' Authorizer (Maybe Text)
aAuthorizerCredentials = lens _aAuthorizerCredentials (\ s a -> s{_aAuthorizerCredentials = a});
instance FromJSON Authorizer where
parseJSON
= withObject "Authorizer"
(\ x ->
Authorizer' <$>
(x .:? "authorizerUri") <*>
(x .:? "identityValidationExpression")
<*> (x .:? "name")
<*> (x .:? "id")
<*> (x .:? "authorizerResultTtlInSeconds")
<*> (x .:? "type")
<*> (x .:? "identitySource")
<*> (x .:? "authorizerCredentials"))
instance Hashable Authorizer
data BasePathMapping = BasePathMapping'
{ _bpmStage :: !(Maybe Text)
, _bpmBasePath :: !(Maybe Text)
, _bpmRestAPIId :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
basePathMapping
:: BasePathMapping
basePathMapping =
BasePathMapping'
{ _bpmStage = Nothing
, _bpmBasePath = Nothing
, _bpmRestAPIId = Nothing
}
bpmStage :: Lens' BasePathMapping (Maybe Text)
bpmStage = lens _bpmStage (\ s a -> s{_bpmStage = a});
bpmBasePath :: Lens' BasePathMapping (Maybe Text)
bpmBasePath = lens _bpmBasePath (\ s a -> s{_bpmBasePath = a});
bpmRestAPIId :: Lens' BasePathMapping (Maybe Text)
bpmRestAPIId = lens _bpmRestAPIId (\ s a -> s{_bpmRestAPIId = a});
instance FromJSON BasePathMapping where
parseJSON
= withObject "BasePathMapping"
(\ x ->
BasePathMapping' <$>
(x .:? "stage") <*> (x .:? "basePath") <*>
(x .:? "restApiId"))
instance Hashable BasePathMapping
data ClientCertificate = ClientCertificate'
{ _ccPemEncodedCertificate :: !(Maybe Text)
, _ccClientCertificateId :: !(Maybe Text)
, _ccCreatedDate :: !(Maybe POSIX)
, _ccExpirationDate :: !(Maybe POSIX)
, _ccDescription :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
clientCertificate
:: ClientCertificate
clientCertificate =
ClientCertificate'
{ _ccPemEncodedCertificate = Nothing
, _ccClientCertificateId = Nothing
, _ccCreatedDate = Nothing
, _ccExpirationDate = Nothing
, _ccDescription = Nothing
}
ccPemEncodedCertificate :: Lens' ClientCertificate (Maybe Text)
ccPemEncodedCertificate = lens _ccPemEncodedCertificate (\ s a -> s{_ccPemEncodedCertificate = a});
ccClientCertificateId :: Lens' ClientCertificate (Maybe Text)
ccClientCertificateId = lens _ccClientCertificateId (\ s a -> s{_ccClientCertificateId = a});
ccCreatedDate :: Lens' ClientCertificate (Maybe UTCTime)
ccCreatedDate = lens _ccCreatedDate (\ s a -> s{_ccCreatedDate = a}) . mapping _Time;
ccExpirationDate :: Lens' ClientCertificate (Maybe UTCTime)
ccExpirationDate = lens _ccExpirationDate (\ s a -> s{_ccExpirationDate = a}) . mapping _Time;
ccDescription :: Lens' ClientCertificate (Maybe Text)
ccDescription = lens _ccDescription (\ s a -> s{_ccDescription = a});
instance FromJSON ClientCertificate where
parseJSON
= withObject "ClientCertificate"
(\ x ->
ClientCertificate' <$>
(x .:? "pemEncodedCertificate") <*>
(x .:? "clientCertificateId")
<*> (x .:? "createdDate")
<*> (x .:? "expirationDate")
<*> (x .:? "description"))
instance Hashable ClientCertificate
data Deployment = Deployment'
{ _dApiSummary :: !(Maybe (Map Text (Map Text MethodSnapshot)))
, _dCreatedDate :: !(Maybe POSIX)
, _dId :: !(Maybe Text)
, _dDescription :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deployment
:: Deployment
deployment =
Deployment'
{ _dApiSummary = Nothing
, _dCreatedDate = Nothing
, _dId = Nothing
, _dDescription = Nothing
}
dApiSummary :: Lens' Deployment (HashMap Text (HashMap Text MethodSnapshot))
dApiSummary = lens _dApiSummary (\ s a -> s{_dApiSummary = a}) . _Default . _Map;
dCreatedDate :: Lens' Deployment (Maybe UTCTime)
dCreatedDate = lens _dCreatedDate (\ s a -> s{_dCreatedDate = a}) . mapping _Time;
dId :: Lens' Deployment (Maybe Text)
dId = lens _dId (\ s a -> s{_dId = a});
dDescription :: Lens' Deployment (Maybe Text)
dDescription = lens _dDescription (\ s a -> s{_dDescription = a});
instance FromJSON Deployment where
parseJSON
= withObject "Deployment"
(\ x ->
Deployment' <$>
(x .:? "apiSummary" .!= mempty) <*>
(x .:? "createdDate")
<*> (x .:? "id")
<*> (x .:? "description"))
instance Hashable Deployment
data DomainName = DomainName'
{ _dnCertificateName :: !(Maybe Text)
, _dnDomainName :: !(Maybe Text)
, _dnCertificateUploadDate :: !(Maybe POSIX)
, _dnDistributionDomainName :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
domainName
:: DomainName
domainName =
DomainName'
{ _dnCertificateName = Nothing
, _dnDomainName = Nothing
, _dnCertificateUploadDate = Nothing
, _dnDistributionDomainName = Nothing
}
dnCertificateName :: Lens' DomainName (Maybe Text)
dnCertificateName = lens _dnCertificateName (\ s a -> s{_dnCertificateName = a});
dnDomainName :: Lens' DomainName (Maybe Text)
dnDomainName = lens _dnDomainName (\ s a -> s{_dnDomainName = a});
dnCertificateUploadDate :: Lens' DomainName (Maybe UTCTime)
dnCertificateUploadDate = lens _dnCertificateUploadDate (\ s a -> s{_dnCertificateUploadDate = a}) . mapping _Time;
dnDistributionDomainName :: Lens' DomainName (Maybe Text)
dnDistributionDomainName = lens _dnDistributionDomainName (\ s a -> s{_dnDistributionDomainName = a});
instance FromJSON DomainName where
parseJSON
= withObject "DomainName"
(\ x ->
DomainName' <$>
(x .:? "certificateName") <*> (x .:? "domainName")
<*> (x .:? "certificateUploadDate")
<*> (x .:? "distributionDomainName"))
instance Hashable DomainName
data Integration = Integration'
{ _iHttpMethod :: !(Maybe Text)
, _iRequestTemplates :: !(Maybe (Map Text Text))
, _iCredentials :: !(Maybe Text)
, _iRequestParameters :: !(Maybe (Map Text Text))
, _iUri :: !(Maybe Text)
, _iIntegrationResponses :: !(Maybe (Map Text IntegrationResponse))
, _iCacheNamespace :: !(Maybe Text)
, _iType :: !(Maybe IntegrationType)
, _iCacheKeyParameters :: !(Maybe [Text])
} deriving (Eq,Read,Show,Data,Typeable,Generic)
integration
:: Integration
integration =
Integration'
{ _iHttpMethod = Nothing
, _iRequestTemplates = Nothing
, _iCredentials = Nothing
, _iRequestParameters = Nothing
, _iUri = Nothing
, _iIntegrationResponses = Nothing
, _iCacheNamespace = Nothing
, _iType = Nothing
, _iCacheKeyParameters = Nothing
}
iHttpMethod :: Lens' Integration (Maybe Text)
iHttpMethod = lens _iHttpMethod (\ s a -> s{_iHttpMethod = a});
iRequestTemplates :: Lens' Integration (HashMap Text Text)
iRequestTemplates = lens _iRequestTemplates (\ s a -> s{_iRequestTemplates = a}) . _Default . _Map;
iCredentials :: Lens' Integration (Maybe Text)
iCredentials = lens _iCredentials (\ s a -> s{_iCredentials = a});
iRequestParameters :: Lens' Integration (HashMap Text Text)
iRequestParameters = lens _iRequestParameters (\ s a -> s{_iRequestParameters = a}) . _Default . _Map;
iUri :: Lens' Integration (Maybe Text)
iUri = lens _iUri (\ s a -> s{_iUri = a});
iIntegrationResponses :: Lens' Integration (HashMap Text IntegrationResponse)
iIntegrationResponses = lens _iIntegrationResponses (\ s a -> s{_iIntegrationResponses = a}) . _Default . _Map;
iCacheNamespace :: Lens' Integration (Maybe Text)
iCacheNamespace = lens _iCacheNamespace (\ s a -> s{_iCacheNamespace = a});
iType :: Lens' Integration (Maybe IntegrationType)
iType = lens _iType (\ s a -> s{_iType = a});
iCacheKeyParameters :: Lens' Integration [Text]
iCacheKeyParameters = lens _iCacheKeyParameters (\ s a -> s{_iCacheKeyParameters = a}) . _Default . _Coerce;
instance FromJSON Integration where
parseJSON
= withObject "Integration"
(\ x ->
Integration' <$>
(x .:? "httpMethod") <*>
(x .:? "requestTemplates" .!= mempty)
<*> (x .:? "credentials")
<*> (x .:? "requestParameters" .!= mempty)
<*> (x .:? "uri")
<*> (x .:? "integrationResponses" .!= mempty)
<*> (x .:? "cacheNamespace")
<*> (x .:? "type")
<*> (x .:? "cacheKeyParameters" .!= mempty))
instance Hashable Integration
data IntegrationResponse = IntegrationResponse'
{ _iResponseTemplates :: !(Maybe (Map Text Text))
, _iSelectionPattern :: !(Maybe Text)
, _iStatusCode :: !(Maybe Text)
, _iResponseParameters :: !(Maybe (Map Text Text))
} deriving (Eq,Read,Show,Data,Typeable,Generic)
integrationResponse
:: IntegrationResponse
integrationResponse =
IntegrationResponse'
{ _iResponseTemplates = Nothing
, _iSelectionPattern = Nothing
, _iStatusCode = Nothing
, _iResponseParameters = Nothing
}
iResponseTemplates :: Lens' IntegrationResponse (HashMap Text Text)
iResponseTemplates = lens _iResponseTemplates (\ s a -> s{_iResponseTemplates = a}) . _Default . _Map;
iSelectionPattern :: Lens' IntegrationResponse (Maybe Text)
iSelectionPattern = lens _iSelectionPattern (\ s a -> s{_iSelectionPattern = a});
iStatusCode :: Lens' IntegrationResponse (Maybe Text)
iStatusCode = lens _iStatusCode (\ s a -> s{_iStatusCode = a});
iResponseParameters :: Lens' IntegrationResponse (HashMap Text Text)
iResponseParameters = lens _iResponseParameters (\ s a -> s{_iResponseParameters = a}) . _Default . _Map;
instance FromJSON IntegrationResponse where
parseJSON
= withObject "IntegrationResponse"
(\ x ->
IntegrationResponse' <$>
(x .:? "responseTemplates" .!= mempty) <*>
(x .:? "selectionPattern")
<*> (x .:? "statusCode")
<*> (x .:? "responseParameters" .!= mempty))
instance Hashable IntegrationResponse
data Method = Method'
{ _mMethodResponses :: !(Maybe (Map Text MethodResponse))
, _mHttpMethod :: !(Maybe Text)
, _mRequestModels :: !(Maybe (Map Text Text))
, _mRequestParameters :: !(Maybe (Map Text Bool))
, _mAuthorizerId :: !(Maybe Text)
, _mAuthorizationType :: !(Maybe Text)
, _mApiKeyRequired :: !(Maybe Bool)
, _mMethodIntegration :: !(Maybe Integration)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
method
:: Method
method =
Method'
{ _mMethodResponses = Nothing
, _mHttpMethod = Nothing
, _mRequestModels = Nothing
, _mRequestParameters = Nothing
, _mAuthorizerId = Nothing
, _mAuthorizationType = Nothing
, _mApiKeyRequired = Nothing
, _mMethodIntegration = Nothing
}
mMethodResponses :: Lens' Method (HashMap Text MethodResponse)
mMethodResponses = lens _mMethodResponses (\ s a -> s{_mMethodResponses = a}) . _Default . _Map;
mHttpMethod :: Lens' Method (Maybe Text)
mHttpMethod = lens _mHttpMethod (\ s a -> s{_mHttpMethod = a});
mRequestModels :: Lens' Method (HashMap Text Text)
mRequestModels = lens _mRequestModels (\ s a -> s{_mRequestModels = a}) . _Default . _Map;
mRequestParameters :: Lens' Method (HashMap Text Bool)
mRequestParameters = lens _mRequestParameters (\ s a -> s{_mRequestParameters = a}) . _Default . _Map;
mAuthorizerId :: Lens' Method (Maybe Text)
mAuthorizerId = lens _mAuthorizerId (\ s a -> s{_mAuthorizerId = a});
mAuthorizationType :: Lens' Method (Maybe Text)
mAuthorizationType = lens _mAuthorizationType (\ s a -> s{_mAuthorizationType = a});
mApiKeyRequired :: Lens' Method (Maybe Bool)
mApiKeyRequired = lens _mApiKeyRequired (\ s a -> s{_mApiKeyRequired = a});
mMethodIntegration :: Lens' Method (Maybe Integration)
mMethodIntegration = lens _mMethodIntegration (\ s a -> s{_mMethodIntegration = a});
instance FromJSON Method where
parseJSON
= withObject "Method"
(\ x ->
Method' <$>
(x .:? "methodResponses" .!= mempty) <*>
(x .:? "httpMethod")
<*> (x .:? "requestModels" .!= mempty)
<*> (x .:? "requestParameters" .!= mempty)
<*> (x .:? "authorizerId")
<*> (x .:? "authorizationType")
<*> (x .:? "apiKeyRequired")
<*> (x .:? "methodIntegration"))
instance Hashable Method
data MethodResponse = MethodResponse'
{ _mResponseModels :: !(Maybe (Map Text Text))
, _mStatusCode :: !(Maybe Text)
, _mResponseParameters :: !(Maybe (Map Text Bool))
} deriving (Eq,Read,Show,Data,Typeable,Generic)
methodResponse
:: MethodResponse
methodResponse =
MethodResponse'
{ _mResponseModels = Nothing
, _mStatusCode = Nothing
, _mResponseParameters = Nothing
}
mResponseModels :: Lens' MethodResponse (HashMap Text Text)
mResponseModels = lens _mResponseModels (\ s a -> s{_mResponseModels = a}) . _Default . _Map;
mStatusCode :: Lens' MethodResponse (Maybe Text)
mStatusCode = lens _mStatusCode (\ s a -> s{_mStatusCode = a});
mResponseParameters :: Lens' MethodResponse (HashMap Text Bool)
mResponseParameters = lens _mResponseParameters (\ s a -> s{_mResponseParameters = a}) . _Default . _Map;
instance FromJSON MethodResponse where
parseJSON
= withObject "MethodResponse"
(\ x ->
MethodResponse' <$>
(x .:? "responseModels" .!= mempty) <*>
(x .:? "statusCode")
<*> (x .:? "responseParameters" .!= mempty))
instance Hashable MethodResponse
data MethodSetting = MethodSetting'
{ _msCacheTtlInSeconds :: !(Maybe Int)
, _msDataTraceEnabled :: !(Maybe Bool)
, _msThrottlingBurstLimit :: !(Maybe Int)
, _msCacheDataEncrypted :: !(Maybe Bool)
, _msLoggingLevel :: !(Maybe Text)
, _msRequireAuthorizationForCacheControl :: !(Maybe Bool)
, _msCachingEnabled :: !(Maybe Bool)
, _msMetricsEnabled :: !(Maybe Bool)
, _msThrottlingRateLimit :: !(Maybe Double)
, _msUnauthorizedCacheControlHeaderStrategy :: !(Maybe UnauthorizedCacheControlHeaderStrategy)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
methodSetting
:: MethodSetting
methodSetting =
MethodSetting'
{ _msCacheTtlInSeconds = Nothing
, _msDataTraceEnabled = Nothing
, _msThrottlingBurstLimit = Nothing
, _msCacheDataEncrypted = Nothing
, _msLoggingLevel = Nothing
, _msRequireAuthorizationForCacheControl = Nothing
, _msCachingEnabled = Nothing
, _msMetricsEnabled = Nothing
, _msThrottlingRateLimit = Nothing
, _msUnauthorizedCacheControlHeaderStrategy = Nothing
}
msCacheTtlInSeconds :: Lens' MethodSetting (Maybe Int)
msCacheTtlInSeconds = lens _msCacheTtlInSeconds (\ s a -> s{_msCacheTtlInSeconds = a});
msDataTraceEnabled :: Lens' MethodSetting (Maybe Bool)
msDataTraceEnabled = lens _msDataTraceEnabled (\ s a -> s{_msDataTraceEnabled = a});
msThrottlingBurstLimit :: Lens' MethodSetting (Maybe Int)
msThrottlingBurstLimit = lens _msThrottlingBurstLimit (\ s a -> s{_msThrottlingBurstLimit = a});
msCacheDataEncrypted :: Lens' MethodSetting (Maybe Bool)
msCacheDataEncrypted = lens _msCacheDataEncrypted (\ s a -> s{_msCacheDataEncrypted = a});
msLoggingLevel :: Lens' MethodSetting (Maybe Text)
msLoggingLevel = lens _msLoggingLevel (\ s a -> s{_msLoggingLevel = a});
msRequireAuthorizationForCacheControl :: Lens' MethodSetting (Maybe Bool)
msRequireAuthorizationForCacheControl = lens _msRequireAuthorizationForCacheControl (\ s a -> s{_msRequireAuthorizationForCacheControl = a});
msCachingEnabled :: Lens' MethodSetting (Maybe Bool)
msCachingEnabled = lens _msCachingEnabled (\ s a -> s{_msCachingEnabled = a});
msMetricsEnabled :: Lens' MethodSetting (Maybe Bool)
msMetricsEnabled = lens _msMetricsEnabled (\ s a -> s{_msMetricsEnabled = a});
msThrottlingRateLimit :: Lens' MethodSetting (Maybe Double)
msThrottlingRateLimit = lens _msThrottlingRateLimit (\ s a -> s{_msThrottlingRateLimit = a});
msUnauthorizedCacheControlHeaderStrategy :: Lens' MethodSetting (Maybe UnauthorizedCacheControlHeaderStrategy)
msUnauthorizedCacheControlHeaderStrategy = lens _msUnauthorizedCacheControlHeaderStrategy (\ s a -> s{_msUnauthorizedCacheControlHeaderStrategy = a});
instance FromJSON MethodSetting where
parseJSON
= withObject "MethodSetting"
(\ x ->
MethodSetting' <$>
(x .:? "cacheTtlInSeconds") <*>
(x .:? "dataTraceEnabled")
<*> (x .:? "throttlingBurstLimit")
<*> (x .:? "cacheDataEncrypted")
<*> (x .:? "loggingLevel")
<*> (x .:? "requireAuthorizationForCacheControl")
<*> (x .:? "cachingEnabled")
<*> (x .:? "metricsEnabled")
<*> (x .:? "throttlingRateLimit")
<*> (x .:? "unauthorizedCacheControlHeaderStrategy"))
instance Hashable MethodSetting
data MethodSnapshot = MethodSnapshot'
{ _msAuthorizationType :: !(Maybe Text)
, _msApiKeyRequired :: !(Maybe Bool)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
methodSnapshot
:: MethodSnapshot
methodSnapshot =
MethodSnapshot'
{ _msAuthorizationType = Nothing
, _msApiKeyRequired = Nothing
}
msAuthorizationType :: Lens' MethodSnapshot (Maybe Text)
msAuthorizationType = lens _msAuthorizationType (\ s a -> s{_msAuthorizationType = a});
msApiKeyRequired :: Lens' MethodSnapshot (Maybe Bool)
msApiKeyRequired = lens _msApiKeyRequired (\ s a -> s{_msApiKeyRequired = a});
instance FromJSON MethodSnapshot where
parseJSON
= withObject "MethodSnapshot"
(\ x ->
MethodSnapshot' <$>
(x .:? "authorizationType") <*>
(x .:? "apiKeyRequired"))
instance Hashable MethodSnapshot
data Model = Model'
{ _mSchema :: !(Maybe Text)
, _mName :: !(Maybe Text)
, _mId :: !(Maybe Text)
, _mDescription :: !(Maybe Text)
, _mContentType :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
model
:: Model
model =
Model'
{ _mSchema = Nothing
, _mName = Nothing
, _mId = Nothing
, _mDescription = Nothing
, _mContentType = Nothing
}
mSchema :: Lens' Model (Maybe Text)
mSchema = lens _mSchema (\ s a -> s{_mSchema = a});
mName :: Lens' Model (Maybe Text)
mName = lens _mName (\ s a -> s{_mName = a});
mId :: Lens' Model (Maybe Text)
mId = lens _mId (\ s a -> s{_mId = a});
mDescription :: Lens' Model (Maybe Text)
mDescription = lens _mDescription (\ s a -> s{_mDescription = a});
mContentType :: Lens' Model (Maybe Text)
mContentType = lens _mContentType (\ s a -> s{_mContentType = a});
instance FromJSON Model where
parseJSON
= withObject "Model"
(\ x ->
Model' <$>
(x .:? "schema") <*> (x .:? "name") <*> (x .:? "id")
<*> (x .:? "description")
<*> (x .:? "contentType"))
instance Hashable Model
data PatchOperation = PatchOperation'
{ _poOp :: !(Maybe Op)
, _poPath :: !(Maybe Text)
, _poValue :: !(Maybe Text)
, _poFrom :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
patchOperation
:: PatchOperation
patchOperation =
PatchOperation'
{ _poOp = Nothing
, _poPath = Nothing
, _poValue = Nothing
, _poFrom = Nothing
}
poOp :: Lens' PatchOperation (Maybe Op)
poOp = lens _poOp (\ s a -> s{_poOp = a});
poPath :: Lens' PatchOperation (Maybe Text)
poPath = lens _poPath (\ s a -> s{_poPath = a});
poValue :: Lens' PatchOperation (Maybe Text)
poValue = lens _poValue (\ s a -> s{_poValue = a});
poFrom :: Lens' PatchOperation (Maybe Text)
poFrom = lens _poFrom (\ s a -> s{_poFrom = a});
instance Hashable PatchOperation
instance ToJSON PatchOperation where
toJSON PatchOperation'{..}
= object
(catMaybes
[("op" .=) <$> _poOp, ("path" .=) <$> _poPath,
("value" .=) <$> _poValue, ("from" .=) <$> _poFrom])
data Resource = Resource'
{ _rPathPart :: !(Maybe Text)
, _rPath :: !(Maybe Text)
, _rId :: !(Maybe Text)
, _rResourceMethods :: !(Maybe (Map Text Method))
, _rParentId :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
resource
:: Resource
resource =
Resource'
{ _rPathPart = Nothing
, _rPath = Nothing
, _rId = Nothing
, _rResourceMethods = Nothing
, _rParentId = Nothing
}
rPathPart :: Lens' Resource (Maybe Text)
rPathPart = lens _rPathPart (\ s a -> s{_rPathPart = a});
rPath :: Lens' Resource (Maybe Text)
rPath = lens _rPath (\ s a -> s{_rPath = a});
rId :: Lens' Resource (Maybe Text)
rId = lens _rId (\ s a -> s{_rId = a});
rResourceMethods :: Lens' Resource (HashMap Text Method)
rResourceMethods = lens _rResourceMethods (\ s a -> s{_rResourceMethods = a}) . _Default . _Map;
rParentId :: Lens' Resource (Maybe Text)
rParentId = lens _rParentId (\ s a -> s{_rParentId = a});
instance FromJSON Resource where
parseJSON
= withObject "Resource"
(\ x ->
Resource' <$>
(x .:? "pathPart") <*> (x .:? "path") <*>
(x .:? "id")
<*> (x .:? "resourceMethods" .!= mempty)
<*> (x .:? "parentId"))
instance Hashable Resource
data RestAPI = RestAPI'
{ _raCreatedDate :: !(Maybe POSIX)
, _raName :: !(Maybe Text)
, _raId :: !(Maybe Text)
, _raDescription :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
restAPI
:: RestAPI
restAPI =
RestAPI'
{ _raCreatedDate = Nothing
, _raName = Nothing
, _raId = Nothing
, _raDescription = Nothing
}
raCreatedDate :: Lens' RestAPI (Maybe UTCTime)
raCreatedDate = lens _raCreatedDate (\ s a -> s{_raCreatedDate = a}) . mapping _Time;
raName :: Lens' RestAPI (Maybe Text)
raName = lens _raName (\ s a -> s{_raName = a});
raId :: Lens' RestAPI (Maybe Text)
raId = lens _raId (\ s a -> s{_raId = a});
raDescription :: Lens' RestAPI (Maybe Text)
raDescription = lens _raDescription (\ s a -> s{_raDescription = a});
instance FromJSON RestAPI where
parseJSON
= withObject "RestAPI"
(\ x ->
RestAPI' <$>
(x .:? "createdDate") <*> (x .:? "name") <*>
(x .:? "id")
<*> (x .:? "description"))
instance Hashable RestAPI
data Stage = Stage'
{ _sDeploymentId :: !(Maybe Text)
, _sVariables :: !(Maybe (Map Text Text))
, _sClientCertificateId :: !(Maybe Text)
, _sCreatedDate :: !(Maybe POSIX)
, _sCacheClusterStatus :: !(Maybe CacheClusterStatus)
, _sMethodSettings :: !(Maybe (Map Text MethodSetting))
, _sLastUpdatedDate :: !(Maybe POSIX)
, _sCacheClusterSize :: !(Maybe CacheClusterSize)
, _sCacheClusterEnabled :: !(Maybe Bool)
, _sStageName :: !(Maybe Text)
, _sDescription :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
stage
:: Stage
stage =
Stage'
{ _sDeploymentId = Nothing
, _sVariables = Nothing
, _sClientCertificateId = Nothing
, _sCreatedDate = Nothing
, _sCacheClusterStatus = Nothing
, _sMethodSettings = Nothing
, _sLastUpdatedDate = Nothing
, _sCacheClusterSize = Nothing
, _sCacheClusterEnabled = Nothing
, _sStageName = Nothing
, _sDescription = Nothing
}
sDeploymentId :: Lens' Stage (Maybe Text)
sDeploymentId = lens _sDeploymentId (\ s a -> s{_sDeploymentId = a});
sVariables :: Lens' Stage (HashMap Text Text)
sVariables = lens _sVariables (\ s a -> s{_sVariables = a}) . _Default . _Map;
sClientCertificateId :: Lens' Stage (Maybe Text)
sClientCertificateId = lens _sClientCertificateId (\ s a -> s{_sClientCertificateId = a});
sCreatedDate :: Lens' Stage (Maybe UTCTime)
sCreatedDate = lens _sCreatedDate (\ s a -> s{_sCreatedDate = a}) . mapping _Time;
sCacheClusterStatus :: Lens' Stage (Maybe CacheClusterStatus)
sCacheClusterStatus = lens _sCacheClusterStatus (\ s a -> s{_sCacheClusterStatus = a});
sMethodSettings :: Lens' Stage (HashMap Text MethodSetting)
sMethodSettings = lens _sMethodSettings (\ s a -> s{_sMethodSettings = a}) . _Default . _Map;
sLastUpdatedDate :: Lens' Stage (Maybe UTCTime)
sLastUpdatedDate = lens _sLastUpdatedDate (\ s a -> s{_sLastUpdatedDate = a}) . mapping _Time;
sCacheClusterSize :: Lens' Stage (Maybe CacheClusterSize)
sCacheClusterSize = lens _sCacheClusterSize (\ s a -> s{_sCacheClusterSize = a});
sCacheClusterEnabled :: Lens' Stage (Maybe Bool)
sCacheClusterEnabled = lens _sCacheClusterEnabled (\ s a -> s{_sCacheClusterEnabled = a});
sStageName :: Lens' Stage (Maybe Text)
sStageName = lens _sStageName (\ s a -> s{_sStageName = a});
sDescription :: Lens' Stage (Maybe Text)
sDescription = lens _sDescription (\ s a -> s{_sDescription = a});
instance FromJSON Stage where
parseJSON
= withObject "Stage"
(\ x ->
Stage' <$>
(x .:? "deploymentId") <*>
(x .:? "variables" .!= mempty)
<*> (x .:? "clientCertificateId")
<*> (x .:? "createdDate")
<*> (x .:? "cacheClusterStatus")
<*> (x .:? "methodSettings" .!= mempty)
<*> (x .:? "lastUpdatedDate")
<*> (x .:? "cacheClusterSize")
<*> (x .:? "cacheClusterEnabled")
<*> (x .:? "stageName")
<*> (x .:? "description"))
instance Hashable Stage
data StageKey = StageKey'
{ _skRestAPIId :: !(Maybe Text)
, _skStageName :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
stageKey
:: StageKey
stageKey =
StageKey'
{ _skRestAPIId = Nothing
, _skStageName = Nothing
}
skRestAPIId :: Lens' StageKey (Maybe Text)
skRestAPIId = lens _skRestAPIId (\ s a -> s{_skRestAPIId = a});
skStageName :: Lens' StageKey (Maybe Text)
skStageName = lens _skStageName (\ s a -> s{_skStageName = a});
instance Hashable StageKey
instance ToJSON StageKey where
toJSON StageKey'{..}
= object
(catMaybes
[("restApiId" .=) <$> _skRestAPIId,
("stageName" .=) <$> _skStageName])
data ThrottleSettings = ThrottleSettings'
{ _tsBurstLimit :: !(Maybe Int)
, _tsRateLimit :: !(Maybe Double)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
throttleSettings
:: ThrottleSettings
throttleSettings =
ThrottleSettings'
{ _tsBurstLimit = Nothing
, _tsRateLimit = Nothing
}
tsBurstLimit :: Lens' ThrottleSettings (Maybe Int)
tsBurstLimit = lens _tsBurstLimit (\ s a -> s{_tsBurstLimit = a});
tsRateLimit :: Lens' ThrottleSettings (Maybe Double)
tsRateLimit = lens _tsRateLimit (\ s a -> s{_tsRateLimit = a});
instance FromJSON ThrottleSettings where
parseJSON
= withObject "ThrottleSettings"
(\ x ->
ThrottleSettings' <$>
(x .:? "burstLimit") <*> (x .:? "rateLimit"))
instance Hashable ThrottleSettings