{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.ServiceControl.Types.Product where
import Network.Google.Prelude
import Network.Google.ServiceControl.Types.Sum
newtype AuditLogServiceData = AuditLogServiceData'
{ _alsdAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
auditLogServiceData
:: HashMap Text JSONValue
-> AuditLogServiceData
auditLogServiceData pAlsdAddtional_ =
AuditLogServiceData'
{ _alsdAddtional = _Coerce # pAlsdAddtional_
}
alsdAddtional :: Lens' AuditLogServiceData (HashMap Text JSONValue)
alsdAddtional
= lens _alsdAddtional
(\ s a -> s{_alsdAddtional = a})
. _Coerce
instance FromJSON AuditLogServiceData where
parseJSON
= withObject "AuditLogServiceData"
(\ o -> AuditLogServiceData' <$> (parseJSONObject o))
instance ToJSON AuditLogServiceData where
toJSON = toJSON . _alsdAddtional
newtype AuditLogMetadata = AuditLogMetadata'
{ _almAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
auditLogMetadata
:: HashMap Text JSONValue
-> AuditLogMetadata
auditLogMetadata pAlmAddtional_ =
AuditLogMetadata'
{ _almAddtional = _Coerce # pAlmAddtional_
}
almAddtional :: Lens' AuditLogMetadata (HashMap Text JSONValue)
almAddtional
= lens _almAddtional (\ s a -> s{_almAddtional = a})
. _Coerce
instance FromJSON AuditLogMetadata where
parseJSON
= withObject "AuditLogMetadata"
(\ o -> AuditLogMetadata' <$> (parseJSONObject o))
instance ToJSON AuditLogMetadata where
toJSON = toJSON . _almAddtional
data Status = Status'
{ _sDetails :: !(Maybe [StatusDetailsItem])
, _sCode :: !(Maybe (Textual Int32))
, _sMessage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
status
:: Status
status =
Status'
{ _sDetails = Nothing
, _sCode = Nothing
, _sMessage = Nothing
}
sDetails :: Lens' Status [StatusDetailsItem]
sDetails
= lens _sDetails (\ s a -> s{_sDetails = a}) .
_Default
. _Coerce
sCode :: Lens' Status (Maybe Int32)
sCode
= lens _sCode (\ s a -> s{_sCode = a}) .
mapping _Coerce
sMessage :: Lens' Status (Maybe Text)
sMessage = lens _sMessage (\ s a -> s{_sMessage = a})
instance FromJSON Status where
parseJSON
= withObject "Status"
(\ o ->
Status' <$>
(o .:? "details" .!= mempty) <*> (o .:? "code") <*>
(o .:? "message"))
instance ToJSON Status where
toJSON Status'{..}
= object
(catMaybes
[("details" .=) <$> _sDetails,
("code" .=) <$> _sCode,
("message" .=) <$> _sMessage])
data RequestMetadata = RequestMetadata'
{ _rmCallerSuppliedUserAgent :: !(Maybe Text)
, _rmCallerIP :: !(Maybe Text)
, _rmDestinationAttributes :: !(Maybe Peer)
, _rmCallerNetwork :: !(Maybe Text)
, _rmRequestAttributes :: !(Maybe Request')
} deriving (Eq,Show,Data,Typeable,Generic)
requestMetadata
:: RequestMetadata
requestMetadata =
RequestMetadata'
{ _rmCallerSuppliedUserAgent = Nothing
, _rmCallerIP = Nothing
, _rmDestinationAttributes = Nothing
, _rmCallerNetwork = Nothing
, _rmRequestAttributes = Nothing
}
rmCallerSuppliedUserAgent :: Lens' RequestMetadata (Maybe Text)
rmCallerSuppliedUserAgent
= lens _rmCallerSuppliedUserAgent
(\ s a -> s{_rmCallerSuppliedUserAgent = a})
rmCallerIP :: Lens' RequestMetadata (Maybe Text)
rmCallerIP
= lens _rmCallerIP (\ s a -> s{_rmCallerIP = a})
rmDestinationAttributes :: Lens' RequestMetadata (Maybe Peer)
rmDestinationAttributes
= lens _rmDestinationAttributes
(\ s a -> s{_rmDestinationAttributes = a})
rmCallerNetwork :: Lens' RequestMetadata (Maybe Text)
rmCallerNetwork
= lens _rmCallerNetwork
(\ s a -> s{_rmCallerNetwork = a})
rmRequestAttributes :: Lens' RequestMetadata (Maybe Request')
rmRequestAttributes
= lens _rmRequestAttributes
(\ s a -> s{_rmRequestAttributes = a})
instance FromJSON RequestMetadata where
parseJSON
= withObject "RequestMetadata"
(\ o ->
RequestMetadata' <$>
(o .:? "callerSuppliedUserAgent") <*>
(o .:? "callerIp")
<*> (o .:? "destinationAttributes")
<*> (o .:? "callerNetwork")
<*> (o .:? "requestAttributes"))
instance ToJSON RequestMetadata where
toJSON RequestMetadata'{..}
= object
(catMaybes
[("callerSuppliedUserAgent" .=) <$>
_rmCallerSuppliedUserAgent,
("callerIp" .=) <$> _rmCallerIP,
("destinationAttributes" .=) <$>
_rmDestinationAttributes,
("callerNetwork" .=) <$> _rmCallerNetwork,
("requestAttributes" .=) <$> _rmRequestAttributes])
newtype ResourceLabels = ResourceLabels'
{ _rlAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
resourceLabels
:: HashMap Text Text
-> ResourceLabels
resourceLabels pRlAddtional_ =
ResourceLabels'
{ _rlAddtional = _Coerce # pRlAddtional_
}
rlAddtional :: Lens' ResourceLabels (HashMap Text Text)
rlAddtional
= lens _rlAddtional (\ s a -> s{_rlAddtional = a}) .
_Coerce
instance FromJSON ResourceLabels where
parseJSON
= withObject "ResourceLabels"
(\ o -> ResourceLabels' <$> (parseJSONObject o))
instance ToJSON ResourceLabels where
toJSON = toJSON . _rlAddtional
data ReportRequest = ReportRequest'
{ _rrServiceConfigId :: !(Maybe Text)
, _rrOperations :: !(Maybe [Operation])
} deriving (Eq,Show,Data,Typeable,Generic)
reportRequest
:: ReportRequest
reportRequest =
ReportRequest'
{ _rrServiceConfigId = Nothing
, _rrOperations = Nothing
}
rrServiceConfigId :: Lens' ReportRequest (Maybe Text)
rrServiceConfigId
= lens _rrServiceConfigId
(\ s a -> s{_rrServiceConfigId = a})
rrOperations :: Lens' ReportRequest [Operation]
rrOperations
= lens _rrOperations (\ s a -> s{_rrOperations = a})
. _Default
. _Coerce
instance FromJSON ReportRequest where
parseJSON
= withObject "ReportRequest"
(\ o ->
ReportRequest' <$>
(o .:? "serviceConfigId") <*>
(o .:? "operations" .!= mempty))
instance ToJSON ReportRequest where
toJSON ReportRequest'{..}
= object
(catMaybes
[("serviceConfigId" .=) <$> _rrServiceConfigId,
("operations" .=) <$> _rrOperations])
data CheckRequest = CheckRequest'
{ _crOperation :: !(Maybe Operation)
, _crRequestProjectSettings :: !(Maybe Bool)
, _crServiceConfigId :: !(Maybe Text)
, _crSkipActivationCheck :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
checkRequest
:: CheckRequest
checkRequest =
CheckRequest'
{ _crOperation = Nothing
, _crRequestProjectSettings = Nothing
, _crServiceConfigId = Nothing
, _crSkipActivationCheck = Nothing
}
crOperation :: Lens' CheckRequest (Maybe Operation)
crOperation
= lens _crOperation (\ s a -> s{_crOperation = a})
crRequestProjectSettings :: Lens' CheckRequest (Maybe Bool)
crRequestProjectSettings
= lens _crRequestProjectSettings
(\ s a -> s{_crRequestProjectSettings = a})
crServiceConfigId :: Lens' CheckRequest (Maybe Text)
crServiceConfigId
= lens _crServiceConfigId
(\ s a -> s{_crServiceConfigId = a})
crSkipActivationCheck :: Lens' CheckRequest (Maybe Bool)
crSkipActivationCheck
= lens _crSkipActivationCheck
(\ s a -> s{_crSkipActivationCheck = a})
instance FromJSON CheckRequest where
parseJSON
= withObject "CheckRequest"
(\ o ->
CheckRequest' <$>
(o .:? "operation") <*>
(o .:? "requestProjectSettings")
<*> (o .:? "serviceConfigId")
<*> (o .:? "skipActivationCheck"))
instance ToJSON CheckRequest where
toJSON CheckRequest'{..}
= object
(catMaybes
[("operation" .=) <$> _crOperation,
("requestProjectSettings" .=) <$>
_crRequestProjectSettings,
("serviceConfigId" .=) <$> _crServiceConfigId,
("skipActivationCheck" .=) <$>
_crSkipActivationCheck])
newtype MetricValueLabels = MetricValueLabels'
{ _mvlAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
metricValueLabels
:: HashMap Text Text
-> MetricValueLabels
metricValueLabels pMvlAddtional_ =
MetricValueLabels'
{ _mvlAddtional = _Coerce # pMvlAddtional_
}
mvlAddtional :: Lens' MetricValueLabels (HashMap Text Text)
mvlAddtional
= lens _mvlAddtional (\ s a -> s{_mvlAddtional = a})
. _Coerce
instance FromJSON MetricValueLabels where
parseJSON
= withObject "MetricValueLabels"
(\ o -> MetricValueLabels' <$> (parseJSONObject o))
instance ToJSON MetricValueLabels where
toJSON = toJSON . _mvlAddtional
data Distribution = Distribution'
{ _dSumOfSquaredDeviation :: !(Maybe (Textual Double))
, _dMean :: !(Maybe (Textual Double))
, _dExponentialBuckets :: !(Maybe ExponentialBuckets)
, _dMaximum :: !(Maybe (Textual Double))
, _dLinearBuckets :: !(Maybe LinearBuckets)
, _dCount :: !(Maybe (Textual Int64))
, _dMinimum :: !(Maybe (Textual Double))
, _dBucketCounts :: !(Maybe [Textual Int64])
, _dExplicitBuckets :: !(Maybe ExplicitBuckets)
} deriving (Eq,Show,Data,Typeable,Generic)
distribution
:: Distribution
distribution =
Distribution'
{ _dSumOfSquaredDeviation = Nothing
, _dMean = Nothing
, _dExponentialBuckets = Nothing
, _dMaximum = Nothing
, _dLinearBuckets = Nothing
, _dCount = Nothing
, _dMinimum = Nothing
, _dBucketCounts = Nothing
, _dExplicitBuckets = Nothing
}
dSumOfSquaredDeviation :: Lens' Distribution (Maybe Double)
dSumOfSquaredDeviation
= lens _dSumOfSquaredDeviation
(\ s a -> s{_dSumOfSquaredDeviation = a})
. mapping _Coerce
dMean :: Lens' Distribution (Maybe Double)
dMean
= lens _dMean (\ s a -> s{_dMean = a}) .
mapping _Coerce
dExponentialBuckets :: Lens' Distribution (Maybe ExponentialBuckets)
dExponentialBuckets
= lens _dExponentialBuckets
(\ s a -> s{_dExponentialBuckets = a})
dMaximum :: Lens' Distribution (Maybe Double)
dMaximum
= lens _dMaximum (\ s a -> s{_dMaximum = a}) .
mapping _Coerce
dLinearBuckets :: Lens' Distribution (Maybe LinearBuckets)
dLinearBuckets
= lens _dLinearBuckets
(\ s a -> s{_dLinearBuckets = a})
dCount :: Lens' Distribution (Maybe Int64)
dCount
= lens _dCount (\ s a -> s{_dCount = a}) .
mapping _Coerce
dMinimum :: Lens' Distribution (Maybe Double)
dMinimum
= lens _dMinimum (\ s a -> s{_dMinimum = a}) .
mapping _Coerce
dBucketCounts :: Lens' Distribution [Int64]
dBucketCounts
= lens _dBucketCounts
(\ s a -> s{_dBucketCounts = a})
. _Default
. _Coerce
dExplicitBuckets :: Lens' Distribution (Maybe ExplicitBuckets)
dExplicitBuckets
= lens _dExplicitBuckets
(\ s a -> s{_dExplicitBuckets = a})
instance FromJSON Distribution where
parseJSON
= withObject "Distribution"
(\ o ->
Distribution' <$>
(o .:? "sumOfSquaredDeviation") <*> (o .:? "mean")
<*> (o .:? "exponentialBuckets")
<*> (o .:? "maximum")
<*> (o .:? "linearBuckets")
<*> (o .:? "count")
<*> (o .:? "minimum")
<*> (o .:? "bucketCounts" .!= mempty)
<*> (o .:? "explicitBuckets"))
instance ToJSON Distribution where
toJSON Distribution'{..}
= object
(catMaybes
[("sumOfSquaredDeviation" .=) <$>
_dSumOfSquaredDeviation,
("mean" .=) <$> _dMean,
("exponentialBuckets" .=) <$> _dExponentialBuckets,
("maximum" .=) <$> _dMaximum,
("linearBuckets" .=) <$> _dLinearBuckets,
("count" .=) <$> _dCount,
("minimum" .=) <$> _dMinimum,
("bucketCounts" .=) <$> _dBucketCounts,
("explicitBuckets" .=) <$> _dExplicitBuckets])
data ExponentialBuckets = ExponentialBuckets'
{ _ebGrowthFactor :: !(Maybe (Textual Double))
, _ebScale :: !(Maybe (Textual Double))
, _ebNumFiniteBuckets :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
exponentialBuckets
:: ExponentialBuckets
exponentialBuckets =
ExponentialBuckets'
{ _ebGrowthFactor = Nothing
, _ebScale = Nothing
, _ebNumFiniteBuckets = Nothing
}
ebGrowthFactor :: Lens' ExponentialBuckets (Maybe Double)
ebGrowthFactor
= lens _ebGrowthFactor
(\ s a -> s{_ebGrowthFactor = a})
. mapping _Coerce
ebScale :: Lens' ExponentialBuckets (Maybe Double)
ebScale
= lens _ebScale (\ s a -> s{_ebScale = a}) .
mapping _Coerce
ebNumFiniteBuckets :: Lens' ExponentialBuckets (Maybe Int32)
ebNumFiniteBuckets
= lens _ebNumFiniteBuckets
(\ s a -> s{_ebNumFiniteBuckets = a})
. mapping _Coerce
instance FromJSON ExponentialBuckets where
parseJSON
= withObject "ExponentialBuckets"
(\ o ->
ExponentialBuckets' <$>
(o .:? "growthFactor") <*> (o .:? "scale") <*>
(o .:? "numFiniteBuckets"))
instance ToJSON ExponentialBuckets where
toJSON ExponentialBuckets'{..}
= object
(catMaybes
[("growthFactor" .=) <$> _ebGrowthFactor,
("scale" .=) <$> _ebScale,
("numFiniteBuckets" .=) <$> _ebNumFiniteBuckets])
data Peer = Peer'
{ _pRegionCode :: !(Maybe Text)
, _pService :: !(Maybe Text)
, _pIP :: !(Maybe Text)
, _pPrincipal :: !(Maybe Text)
, _pLabels :: !(Maybe PeerLabels)
, _pPort :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
peer
:: Peer
peer =
Peer'
{ _pRegionCode = Nothing
, _pService = Nothing
, _pIP = Nothing
, _pPrincipal = Nothing
, _pLabels = Nothing
, _pPort = Nothing
}
pRegionCode :: Lens' Peer (Maybe Text)
pRegionCode
= lens _pRegionCode (\ s a -> s{_pRegionCode = a})
pService :: Lens' Peer (Maybe Text)
pService = lens _pService (\ s a -> s{_pService = a})
pIP :: Lens' Peer (Maybe Text)
pIP = lens _pIP (\ s a -> s{_pIP = a})
pPrincipal :: Lens' Peer (Maybe Text)
pPrincipal
= lens _pPrincipal (\ s a -> s{_pPrincipal = a})
pLabels :: Lens' Peer (Maybe PeerLabels)
pLabels = lens _pLabels (\ s a -> s{_pLabels = a})
pPort :: Lens' Peer (Maybe Int64)
pPort
= lens _pPort (\ s a -> s{_pPort = a}) .
mapping _Coerce
instance FromJSON Peer where
parseJSON
= withObject "Peer"
(\ o ->
Peer' <$>
(o .:? "regionCode") <*> (o .:? "service") <*>
(o .:? "ip")
<*> (o .:? "principal")
<*> (o .:? "labels")
<*> (o .:? "port"))
instance ToJSON Peer where
toJSON Peer'{..}
= object
(catMaybes
[("regionCode" .=) <$> _pRegionCode,
("service" .=) <$> _pService, ("ip" .=) <$> _pIP,
("principal" .=) <$> _pPrincipal,
("labels" .=) <$> _pLabels, ("port" .=) <$> _pPort])
data AuthorizationInfo = AuthorizationInfo'
{ _aiGranted :: !(Maybe Bool)
, _aiResourceAttributes :: !(Maybe Resource)
, _aiResource :: !(Maybe Text)
, _aiPermission :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
authorizationInfo
:: AuthorizationInfo
authorizationInfo =
AuthorizationInfo'
{ _aiGranted = Nothing
, _aiResourceAttributes = Nothing
, _aiResource = Nothing
, _aiPermission = Nothing
}
aiGranted :: Lens' AuthorizationInfo (Maybe Bool)
aiGranted
= lens _aiGranted (\ s a -> s{_aiGranted = a})
aiResourceAttributes :: Lens' AuthorizationInfo (Maybe Resource)
aiResourceAttributes
= lens _aiResourceAttributes
(\ s a -> s{_aiResourceAttributes = a})
aiResource :: Lens' AuthorizationInfo (Maybe Text)
aiResource
= lens _aiResource (\ s a -> s{_aiResource = a})
aiPermission :: Lens' AuthorizationInfo (Maybe Text)
aiPermission
= lens _aiPermission (\ s a -> s{_aiPermission = a})
instance FromJSON AuthorizationInfo where
parseJSON
= withObject "AuthorizationInfo"
(\ o ->
AuthorizationInfo' <$>
(o .:? "granted") <*> (o .:? "resourceAttributes")
<*> (o .:? "resource")
<*> (o .:? "permission"))
instance ToJSON AuthorizationInfo where
toJSON AuthorizationInfo'{..}
= object
(catMaybes
[("granted" .=) <$> _aiGranted,
("resourceAttributes" .=) <$> _aiResourceAttributes,
("resource" .=) <$> _aiResource,
("permission" .=) <$> _aiPermission])
data Operation = Operation'
{ _oImportance :: !(Maybe OperationImportance)
, _oResourceContainer :: !(Maybe Text)
, _oStartTime :: !(Maybe DateTime')
, _oResources :: !(Maybe [ResourceInfo])
, _oUserLabels :: !(Maybe OperationUserLabels)
, _oQuotaProperties :: !(Maybe QuotaProperties)
, _oEndTime :: !(Maybe DateTime')
, _oOperationName :: !(Maybe Text)
, _oLabels :: !(Maybe OperationLabels)
, _oOperationId :: !(Maybe Text)
, _oConsumerId :: !(Maybe Text)
, _oMetricValueSets :: !(Maybe [MetricValueSet])
, _oLogEntries :: !(Maybe [LogEntry])
} deriving (Eq,Show,Data,Typeable,Generic)
operation
:: Operation
operation =
Operation'
{ _oImportance = Nothing
, _oResourceContainer = Nothing
, _oStartTime = Nothing
, _oResources = Nothing
, _oUserLabels = Nothing
, _oQuotaProperties = Nothing
, _oEndTime = Nothing
, _oOperationName = Nothing
, _oLabels = Nothing
, _oOperationId = Nothing
, _oConsumerId = Nothing
, _oMetricValueSets = Nothing
, _oLogEntries = Nothing
}
oImportance :: Lens' Operation (Maybe OperationImportance)
oImportance
= lens _oImportance (\ s a -> s{_oImportance = a})
oResourceContainer :: Lens' Operation (Maybe Text)
oResourceContainer
= lens _oResourceContainer
(\ s a -> s{_oResourceContainer = a})
oStartTime :: Lens' Operation (Maybe UTCTime)
oStartTime
= lens _oStartTime (\ s a -> s{_oStartTime = a}) .
mapping _DateTime
oResources :: Lens' Operation [ResourceInfo]
oResources
= lens _oResources (\ s a -> s{_oResources = a}) .
_Default
. _Coerce
oUserLabels :: Lens' Operation (Maybe OperationUserLabels)
oUserLabels
= lens _oUserLabels (\ s a -> s{_oUserLabels = a})
oQuotaProperties :: Lens' Operation (Maybe QuotaProperties)
oQuotaProperties
= lens _oQuotaProperties
(\ s a -> s{_oQuotaProperties = a})
oEndTime :: Lens' Operation (Maybe UTCTime)
oEndTime
= lens _oEndTime (\ s a -> s{_oEndTime = a}) .
mapping _DateTime
oOperationName :: Lens' Operation (Maybe Text)
oOperationName
= lens _oOperationName
(\ s a -> s{_oOperationName = a})
oLabels :: Lens' Operation (Maybe OperationLabels)
oLabels = lens _oLabels (\ s a -> s{_oLabels = a})
oOperationId :: Lens' Operation (Maybe Text)
oOperationId
= lens _oOperationId (\ s a -> s{_oOperationId = a})
oConsumerId :: Lens' Operation (Maybe Text)
oConsumerId
= lens _oConsumerId (\ s a -> s{_oConsumerId = a})
oMetricValueSets :: Lens' Operation [MetricValueSet]
oMetricValueSets
= lens _oMetricValueSets
(\ s a -> s{_oMetricValueSets = a})
. _Default
. _Coerce
oLogEntries :: Lens' Operation [LogEntry]
oLogEntries
= lens _oLogEntries (\ s a -> s{_oLogEntries = a}) .
_Default
. _Coerce
instance FromJSON Operation where
parseJSON
= withObject "Operation"
(\ o ->
Operation' <$>
(o .:? "importance") <*> (o .:? "resourceContainer")
<*> (o .:? "startTime")
<*> (o .:? "resources" .!= mempty)
<*> (o .:? "userLabels")
<*> (o .:? "quotaProperties")
<*> (o .:? "endTime")
<*> (o .:? "operationName")
<*> (o .:? "labels")
<*> (o .:? "operationId")
<*> (o .:? "consumerId")
<*> (o .:? "metricValueSets" .!= mempty)
<*> (o .:? "logEntries" .!= mempty))
instance ToJSON Operation where
toJSON Operation'{..}
= object
(catMaybes
[("importance" .=) <$> _oImportance,
("resourceContainer" .=) <$> _oResourceContainer,
("startTime" .=) <$> _oStartTime,
("resources" .=) <$> _oResources,
("userLabels" .=) <$> _oUserLabels,
("quotaProperties" .=) <$> _oQuotaProperties,
("endTime" .=) <$> _oEndTime,
("operationName" .=) <$> _oOperationName,
("labels" .=) <$> _oLabels,
("operationId" .=) <$> _oOperationId,
("consumerId" .=) <$> _oConsumerId,
("metricValueSets" .=) <$> _oMetricValueSets,
("logEntries" .=) <$> _oLogEntries])
data MetricValueSet = MetricValueSet'
{ _mvsMetricName :: !(Maybe Text)
, _mvsMetricValues :: !(Maybe [MetricValue])
} deriving (Eq,Show,Data,Typeable,Generic)
metricValueSet
:: MetricValueSet
metricValueSet =
MetricValueSet'
{ _mvsMetricName = Nothing
, _mvsMetricValues = Nothing
}
mvsMetricName :: Lens' MetricValueSet (Maybe Text)
mvsMetricName
= lens _mvsMetricName
(\ s a -> s{_mvsMetricName = a})
mvsMetricValues :: Lens' MetricValueSet [MetricValue]
mvsMetricValues
= lens _mvsMetricValues
(\ s a -> s{_mvsMetricValues = a})
. _Default
. _Coerce
instance FromJSON MetricValueSet where
parseJSON
= withObject "MetricValueSet"
(\ o ->
MetricValueSet' <$>
(o .:? "metricName") <*>
(o .:? "metricValues" .!= mempty))
instance ToJSON MetricValueSet where
toJSON MetricValueSet'{..}
= object
(catMaybes
[("metricName" .=) <$> _mvsMetricName,
("metricValues" .=) <$> _mvsMetricValues])
newtype LogEntryLabels = LogEntryLabels'
{ _lelAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
logEntryLabels
:: HashMap Text Text
-> LogEntryLabels
logEntryLabels pLelAddtional_ =
LogEntryLabels'
{ _lelAddtional = _Coerce # pLelAddtional_
}
lelAddtional :: Lens' LogEntryLabels (HashMap Text Text)
lelAddtional
= lens _lelAddtional (\ s a -> s{_lelAddtional = a})
. _Coerce
instance FromJSON LogEntryLabels where
parseJSON
= withObject "LogEntryLabels"
(\ o -> LogEntryLabels' <$> (parseJSONObject o))
instance ToJSON LogEntryLabels where
toJSON = toJSON . _lelAddtional
newtype LogEntryProtoPayload = LogEntryProtoPayload'
{ _leppAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
logEntryProtoPayload
:: HashMap Text JSONValue
-> LogEntryProtoPayload
logEntryProtoPayload pLeppAddtional_ =
LogEntryProtoPayload'
{ _leppAddtional = _Coerce # pLeppAddtional_
}
leppAddtional :: Lens' LogEntryProtoPayload (HashMap Text JSONValue)
leppAddtional
= lens _leppAddtional
(\ s a -> s{_leppAddtional = a})
. _Coerce
instance FromJSON LogEntryProtoPayload where
parseJSON
= withObject "LogEntryProtoPayload"
(\ o ->
LogEntryProtoPayload' <$> (parseJSONObject o))
instance ToJSON LogEntryProtoPayload where
toJSON = toJSON . _leppAddtional
data LinearBuckets = LinearBuckets'
{ _lbOffSet :: !(Maybe (Textual Double))
, _lbWidth :: !(Maybe (Textual Double))
, _lbNumFiniteBuckets :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
linearBuckets
:: LinearBuckets
linearBuckets =
LinearBuckets'
{ _lbOffSet = Nothing
, _lbWidth = Nothing
, _lbNumFiniteBuckets = Nothing
}
lbOffSet :: Lens' LinearBuckets (Maybe Double)
lbOffSet
= lens _lbOffSet (\ s a -> s{_lbOffSet = a}) .
mapping _Coerce
lbWidth :: Lens' LinearBuckets (Maybe Double)
lbWidth
= lens _lbWidth (\ s a -> s{_lbWidth = a}) .
mapping _Coerce
lbNumFiniteBuckets :: Lens' LinearBuckets (Maybe Int32)
lbNumFiniteBuckets
= lens _lbNumFiniteBuckets
(\ s a -> s{_lbNumFiniteBuckets = a})
. mapping _Coerce
instance FromJSON LinearBuckets where
parseJSON
= withObject "LinearBuckets"
(\ o ->
LinearBuckets' <$>
(o .:? "offset") <*> (o .:? "width") <*>
(o .:? "numFiniteBuckets"))
instance ToJSON LinearBuckets where
toJSON LinearBuckets'{..}
= object
(catMaybes
[("offset" .=) <$> _lbOffSet,
("width" .=) <$> _lbWidth,
("numFiniteBuckets" .=) <$> _lbNumFiniteBuckets])
data Auth = Auth'
{ _aPresenter :: !(Maybe Text)
, _aClaims :: !(Maybe AuthClaims)
, _aAudiences :: !(Maybe [Text])
, _aPrincipal :: !(Maybe Text)
, _aAccessLevels :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
auth
:: Auth
auth =
Auth'
{ _aPresenter = Nothing
, _aClaims = Nothing
, _aAudiences = Nothing
, _aPrincipal = Nothing
, _aAccessLevels = Nothing
}
aPresenter :: Lens' Auth (Maybe Text)
aPresenter
= lens _aPresenter (\ s a -> s{_aPresenter = a})
aClaims :: Lens' Auth (Maybe AuthClaims)
aClaims = lens _aClaims (\ s a -> s{_aClaims = a})
aAudiences :: Lens' Auth [Text]
aAudiences
= lens _aAudiences (\ s a -> s{_aAudiences = a}) .
_Default
. _Coerce
aPrincipal :: Lens' Auth (Maybe Text)
aPrincipal
= lens _aPrincipal (\ s a -> s{_aPrincipal = a})
aAccessLevels :: Lens' Auth [Text]
aAccessLevels
= lens _aAccessLevels
(\ s a -> s{_aAccessLevels = a})
. _Default
. _Coerce
instance FromJSON Auth where
parseJSON
= withObject "Auth"
(\ o ->
Auth' <$>
(o .:? "presenter") <*> (o .:? "claims") <*>
(o .:? "audiences" .!= mempty)
<*> (o .:? "principal")
<*> (o .:? "accessLevels" .!= mempty))
instance ToJSON Auth where
toJSON Auth'{..}
= object
(catMaybes
[("presenter" .=) <$> _aPresenter,
("claims" .=) <$> _aClaims,
("audiences" .=) <$> _aAudiences,
("principal" .=) <$> _aPrincipal,
("accessLevels" .=) <$> _aAccessLevels])
data QuotaInfo = QuotaInfo'
{ _qiLimitExceeded :: !(Maybe [Text])
, _qiQuotaMetrics :: !(Maybe [MetricValueSet])
, _qiQuotaConsumed :: !(Maybe QuotaInfoQuotaConsumed)
} deriving (Eq,Show,Data,Typeable,Generic)
quotaInfo
:: QuotaInfo
quotaInfo =
QuotaInfo'
{ _qiLimitExceeded = Nothing
, _qiQuotaMetrics = Nothing
, _qiQuotaConsumed = Nothing
}
qiLimitExceeded :: Lens' QuotaInfo [Text]
qiLimitExceeded
= lens _qiLimitExceeded
(\ s a -> s{_qiLimitExceeded = a})
. _Default
. _Coerce
qiQuotaMetrics :: Lens' QuotaInfo [MetricValueSet]
qiQuotaMetrics
= lens _qiQuotaMetrics
(\ s a -> s{_qiQuotaMetrics = a})
. _Default
. _Coerce
qiQuotaConsumed :: Lens' QuotaInfo (Maybe QuotaInfoQuotaConsumed)
qiQuotaConsumed
= lens _qiQuotaConsumed
(\ s a -> s{_qiQuotaConsumed = a})
instance FromJSON QuotaInfo where
parseJSON
= withObject "QuotaInfo"
(\ o ->
QuotaInfo' <$>
(o .:? "limitExceeded" .!= mempty) <*>
(o .:? "quotaMetrics" .!= mempty)
<*> (o .:? "quotaConsumed"))
instance ToJSON QuotaInfo where
toJSON QuotaInfo'{..}
= object
(catMaybes
[("limitExceeded" .=) <$> _qiLimitExceeded,
("quotaMetrics" .=) <$> _qiQuotaMetrics,
("quotaConsumed" .=) <$> _qiQuotaConsumed])
data Money = Money'
{ _mCurrencyCode :: !(Maybe Text)
, _mNanos :: !(Maybe (Textual Int32))
, _mUnits :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
money
:: Money
money =
Money'
{ _mCurrencyCode = Nothing
, _mNanos = Nothing
, _mUnits = Nothing
}
mCurrencyCode :: Lens' Money (Maybe Text)
mCurrencyCode
= lens _mCurrencyCode
(\ s a -> s{_mCurrencyCode = a})
mNanos :: Lens' Money (Maybe Int32)
mNanos
= lens _mNanos (\ s a -> s{_mNanos = a}) .
mapping _Coerce
mUnits :: Lens' Money (Maybe Int64)
mUnits
= lens _mUnits (\ s a -> s{_mUnits = a}) .
mapping _Coerce
instance FromJSON Money where
parseJSON
= withObject "Money"
(\ o ->
Money' <$>
(o .:? "currencyCode") <*> (o .:? "nanos") <*>
(o .:? "units"))
instance ToJSON Money where
toJSON Money'{..}
= object
(catMaybes
[("currencyCode" .=) <$> _mCurrencyCode,
("nanos" .=) <$> _mNanos, ("units" .=) <$> _mUnits])
data ConsumerInfo = ConsumerInfo'
{ _ciProjectNumber :: !(Maybe (Textual Int64))
, _ciConsumerNumber :: !(Maybe (Textual Int64))
, _ciType :: !(Maybe ConsumerInfoType)
} deriving (Eq,Show,Data,Typeable,Generic)
consumerInfo
:: ConsumerInfo
consumerInfo =
ConsumerInfo'
{ _ciProjectNumber = Nothing
, _ciConsumerNumber = Nothing
, _ciType = Nothing
}
ciProjectNumber :: Lens' ConsumerInfo (Maybe Int64)
ciProjectNumber
= lens _ciProjectNumber
(\ s a -> s{_ciProjectNumber = a})
. mapping _Coerce
ciConsumerNumber :: Lens' ConsumerInfo (Maybe Int64)
ciConsumerNumber
= lens _ciConsumerNumber
(\ s a -> s{_ciConsumerNumber = a})
. mapping _Coerce
ciType :: Lens' ConsumerInfo (Maybe ConsumerInfoType)
ciType = lens _ciType (\ s a -> s{_ciType = a})
instance FromJSON ConsumerInfo where
parseJSON
= withObject "ConsumerInfo"
(\ o ->
ConsumerInfo' <$>
(o .:? "projectNumber") <*> (o .:? "consumerNumber")
<*> (o .:? "type"))
instance ToJSON ConsumerInfo where
toJSON ConsumerInfo'{..}
= object
(catMaybes
[("projectNumber" .=) <$> _ciProjectNumber,
("consumerNumber" .=) <$> _ciConsumerNumber,
("type" .=) <$> _ciType])
newtype AllocateInfo = AllocateInfo'
{ _aiUnusedArguments :: Maybe [Text]
} deriving (Eq,Show,Data,Typeable,Generic)
allocateInfo
:: AllocateInfo
allocateInfo =
AllocateInfo'
{ _aiUnusedArguments = Nothing
}
aiUnusedArguments :: Lens' AllocateInfo [Text]
aiUnusedArguments
= lens _aiUnusedArguments
(\ s a -> s{_aiUnusedArguments = a})
. _Default
. _Coerce
instance FromJSON AllocateInfo where
parseJSON
= withObject "AllocateInfo"
(\ o ->
AllocateInfo' <$>
(o .:? "unusedArguments" .!= mempty))
instance ToJSON AllocateInfo where
toJSON AllocateInfo'{..}
= object
(catMaybes
[("unusedArguments" .=) <$> _aiUnusedArguments])
data QuotaOperation = QuotaOperation'
{ _qoQuotaMode :: !(Maybe QuotaOperationQuotaMode)
, _qoMethodName :: !(Maybe Text)
, _qoQuotaMetrics :: !(Maybe [MetricValueSet])
, _qoLabels :: !(Maybe QuotaOperationLabels)
, _qoOperationId :: !(Maybe Text)
, _qoConsumerId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
quotaOperation
:: QuotaOperation
quotaOperation =
QuotaOperation'
{ _qoQuotaMode = Nothing
, _qoMethodName = Nothing
, _qoQuotaMetrics = Nothing
, _qoLabels = Nothing
, _qoOperationId = Nothing
, _qoConsumerId = Nothing
}
qoQuotaMode :: Lens' QuotaOperation (Maybe QuotaOperationQuotaMode)
qoQuotaMode
= lens _qoQuotaMode (\ s a -> s{_qoQuotaMode = a})
qoMethodName :: Lens' QuotaOperation (Maybe Text)
qoMethodName
= lens _qoMethodName (\ s a -> s{_qoMethodName = a})
qoQuotaMetrics :: Lens' QuotaOperation [MetricValueSet]
qoQuotaMetrics
= lens _qoQuotaMetrics
(\ s a -> s{_qoQuotaMetrics = a})
. _Default
. _Coerce
qoLabels :: Lens' QuotaOperation (Maybe QuotaOperationLabels)
qoLabels = lens _qoLabels (\ s a -> s{_qoLabels = a})
qoOperationId :: Lens' QuotaOperation (Maybe Text)
qoOperationId
= lens _qoOperationId
(\ s a -> s{_qoOperationId = a})
qoConsumerId :: Lens' QuotaOperation (Maybe Text)
qoConsumerId
= lens _qoConsumerId (\ s a -> s{_qoConsumerId = a})
instance FromJSON QuotaOperation where
parseJSON
= withObject "QuotaOperation"
(\ o ->
QuotaOperation' <$>
(o .:? "quotaMode") <*> (o .:? "methodName") <*>
(o .:? "quotaMetrics" .!= mempty)
<*> (o .:? "labels")
<*> (o .:? "operationId")
<*> (o .:? "consumerId"))
instance ToJSON QuotaOperation where
toJSON QuotaOperation'{..}
= object
(catMaybes
[("quotaMode" .=) <$> _qoQuotaMode,
("methodName" .=) <$> _qoMethodName,
("quotaMetrics" .=) <$> _qoQuotaMetrics,
("labels" .=) <$> _qoLabels,
("operationId" .=) <$> _qoOperationId,
("consumerId" .=) <$> _qoConsumerId])
newtype StatusDetailsItem = StatusDetailsItem'
{ _sdiAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
statusDetailsItem
:: HashMap Text JSONValue
-> StatusDetailsItem
statusDetailsItem pSdiAddtional_ =
StatusDetailsItem'
{ _sdiAddtional = _Coerce # pSdiAddtional_
}
sdiAddtional :: Lens' StatusDetailsItem (HashMap Text JSONValue)
sdiAddtional
= lens _sdiAddtional (\ s a -> s{_sdiAddtional = a})
. _Coerce
instance FromJSON StatusDetailsItem where
parseJSON
= withObject "StatusDetailsItem"
(\ o -> StatusDetailsItem' <$> (parseJSONObject o))
instance ToJSON StatusDetailsItem where
toJSON = toJSON . _sdiAddtional
data CheckError = CheckError'
{ _ceSubject :: !(Maybe Text)
, _ceCode :: !(Maybe CheckErrorCode)
, _ceDetail :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
checkError
:: CheckError
checkError =
CheckError'
{ _ceSubject = Nothing
, _ceCode = Nothing
, _ceDetail = Nothing
}
ceSubject :: Lens' CheckError (Maybe Text)
ceSubject
= lens _ceSubject (\ s a -> s{_ceSubject = a})
ceCode :: Lens' CheckError (Maybe CheckErrorCode)
ceCode = lens _ceCode (\ s a -> s{_ceCode = a})
ceDetail :: Lens' CheckError (Maybe Text)
ceDetail = lens _ceDetail (\ s a -> s{_ceDetail = a})
instance FromJSON CheckError where
parseJSON
= withObject "CheckError"
(\ o ->
CheckError' <$>
(o .:? "subject") <*> (o .:? "code") <*>
(o .:? "detail"))
instance ToJSON CheckError where
toJSON CheckError'{..}
= object
(catMaybes
[("subject" .=) <$> _ceSubject,
("code" .=) <$> _ceCode,
("detail" .=) <$> _ceDetail])
newtype QuotaOperationLabels = QuotaOperationLabels'
{ _qolAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
quotaOperationLabels
:: HashMap Text Text
-> QuotaOperationLabels
quotaOperationLabels pQolAddtional_ =
QuotaOperationLabels'
{ _qolAddtional = _Coerce # pQolAddtional_
}
qolAddtional :: Lens' QuotaOperationLabels (HashMap Text Text)
qolAddtional
= lens _qolAddtional (\ s a -> s{_qolAddtional = a})
. _Coerce
instance FromJSON QuotaOperationLabels where
parseJSON
= withObject "QuotaOperationLabels"
(\ o ->
QuotaOperationLabels' <$> (parseJSONObject o))
instance ToJSON QuotaOperationLabels where
toJSON = toJSON . _qolAddtional
data ReportError = ReportError'
{ _reStatus :: !(Maybe Status)
, _reOperationId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
reportError
:: ReportError
reportError =
ReportError'
{ _reStatus = Nothing
, _reOperationId = Nothing
}
reStatus :: Lens' ReportError (Maybe Status)
reStatus = lens _reStatus (\ s a -> s{_reStatus = a})
reOperationId :: Lens' ReportError (Maybe Text)
reOperationId
= lens _reOperationId
(\ s a -> s{_reOperationId = a})
instance FromJSON ReportError where
parseJSON
= withObject "ReportError"
(\ o ->
ReportError' <$>
(o .:? "status") <*> (o .:? "operationId"))
instance ToJSON ReportError where
toJSON ReportError'{..}
= object
(catMaybes
[("status" .=) <$> _reStatus,
("operationId" .=) <$> _reOperationId])
newtype AuthClaims = AuthClaims'
{ _acAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
authClaims
:: HashMap Text JSONValue
-> AuthClaims
authClaims pAcAddtional_ =
AuthClaims'
{ _acAddtional = _Coerce # pAcAddtional_
}
acAddtional :: Lens' AuthClaims (HashMap Text JSONValue)
acAddtional
= lens _acAddtional (\ s a -> s{_acAddtional = a}) .
_Coerce
instance FromJSON AuthClaims where
parseJSON
= withObject "AuthClaims"
(\ o -> AuthClaims' <$> (parseJSONObject o))
instance ToJSON AuthClaims where
toJSON = toJSON . _acAddtional
data HTTPRequest = HTTPRequest'
{ _httprStatus :: !(Maybe (Textual Int32))
, _httprRequestURL :: !(Maybe Text)
, _httprCacheFillBytes :: !(Maybe (Textual Int64))
, _httprRemoteIP :: !(Maybe Text)
, _httprLatency :: !(Maybe GDuration)
, _httprProtocol :: !(Maybe Text)
, _httprServerIP :: !(Maybe Text)
, _httprRequestSize :: !(Maybe (Textual Int64))
, _httprCacheValidatedWithOriginServer :: !(Maybe Bool)
, _httprUserAgent :: !(Maybe Text)
, _httprCacheLookup :: !(Maybe Bool)
, _httprResponseSize :: !(Maybe (Textual Int64))
, _httprRequestMethod :: !(Maybe Text)
, _httprCacheHit :: !(Maybe Bool)
, _httprReferer :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
hTTPRequest
:: HTTPRequest
hTTPRequest =
HTTPRequest'
{ _httprStatus = Nothing
, _httprRequestURL = Nothing
, _httprCacheFillBytes = Nothing
, _httprRemoteIP = Nothing
, _httprLatency = Nothing
, _httprProtocol = Nothing
, _httprServerIP = Nothing
, _httprRequestSize = Nothing
, _httprCacheValidatedWithOriginServer = Nothing
, _httprUserAgent = Nothing
, _httprCacheLookup = Nothing
, _httprResponseSize = Nothing
, _httprRequestMethod = Nothing
, _httprCacheHit = Nothing
, _httprReferer = Nothing
}
httprStatus :: Lens' HTTPRequest (Maybe Int32)
httprStatus
= lens _httprStatus (\ s a -> s{_httprStatus = a}) .
mapping _Coerce
httprRequestURL :: Lens' HTTPRequest (Maybe Text)
httprRequestURL
= lens _httprRequestURL
(\ s a -> s{_httprRequestURL = a})
httprCacheFillBytes :: Lens' HTTPRequest (Maybe Int64)
httprCacheFillBytes
= lens _httprCacheFillBytes
(\ s a -> s{_httprCacheFillBytes = a})
. mapping _Coerce
httprRemoteIP :: Lens' HTTPRequest (Maybe Text)
httprRemoteIP
= lens _httprRemoteIP
(\ s a -> s{_httprRemoteIP = a})
httprLatency :: Lens' HTTPRequest (Maybe Scientific)
httprLatency
= lens _httprLatency (\ s a -> s{_httprLatency = a})
. mapping _GDuration
httprProtocol :: Lens' HTTPRequest (Maybe Text)
httprProtocol
= lens _httprProtocol
(\ s a -> s{_httprProtocol = a})
httprServerIP :: Lens' HTTPRequest (Maybe Text)
httprServerIP
= lens _httprServerIP
(\ s a -> s{_httprServerIP = a})
httprRequestSize :: Lens' HTTPRequest (Maybe Int64)
httprRequestSize
= lens _httprRequestSize
(\ s a -> s{_httprRequestSize = a})
. mapping _Coerce
httprCacheValidatedWithOriginServer :: Lens' HTTPRequest (Maybe Bool)
httprCacheValidatedWithOriginServer
= lens _httprCacheValidatedWithOriginServer
(\ s a ->
s{_httprCacheValidatedWithOriginServer = a})
httprUserAgent :: Lens' HTTPRequest (Maybe Text)
httprUserAgent
= lens _httprUserAgent
(\ s a -> s{_httprUserAgent = a})
httprCacheLookup :: Lens' HTTPRequest (Maybe Bool)
httprCacheLookup
= lens _httprCacheLookup
(\ s a -> s{_httprCacheLookup = a})
httprResponseSize :: Lens' HTTPRequest (Maybe Int64)
httprResponseSize
= lens _httprResponseSize
(\ s a -> s{_httprResponseSize = a})
. mapping _Coerce
httprRequestMethod :: Lens' HTTPRequest (Maybe Text)
httprRequestMethod
= lens _httprRequestMethod
(\ s a -> s{_httprRequestMethod = a})
httprCacheHit :: Lens' HTTPRequest (Maybe Bool)
httprCacheHit
= lens _httprCacheHit
(\ s a -> s{_httprCacheHit = a})
httprReferer :: Lens' HTTPRequest (Maybe Text)
httprReferer
= lens _httprReferer (\ s a -> s{_httprReferer = a})
instance FromJSON HTTPRequest where
parseJSON
= withObject "HTTPRequest"
(\ o ->
HTTPRequest' <$>
(o .:? "status") <*> (o .:? "requestUrl") <*>
(o .:? "cacheFillBytes")
<*> (o .:? "remoteIp")
<*> (o .:? "latency")
<*> (o .:? "protocol")
<*> (o .:? "serverIp")
<*> (o .:? "requestSize")
<*> (o .:? "cacheValidatedWithOriginServer")
<*> (o .:? "userAgent")
<*> (o .:? "cacheLookup")
<*> (o .:? "responseSize")
<*> (o .:? "requestMethod")
<*> (o .:? "cacheHit")
<*> (o .:? "referer"))
instance ToJSON HTTPRequest where
toJSON HTTPRequest'{..}
= object
(catMaybes
[("status" .=) <$> _httprStatus,
("requestUrl" .=) <$> _httprRequestURL,
("cacheFillBytes" .=) <$> _httprCacheFillBytes,
("remoteIp" .=) <$> _httprRemoteIP,
("latency" .=) <$> _httprLatency,
("protocol" .=) <$> _httprProtocol,
("serverIp" .=) <$> _httprServerIP,
("requestSize" .=) <$> _httprRequestSize,
("cacheValidatedWithOriginServer" .=) <$>
_httprCacheValidatedWithOriginServer,
("userAgent" .=) <$> _httprUserAgent,
("cacheLookup" .=) <$> _httprCacheLookup,
("responseSize" .=) <$> _httprResponseSize,
("requestMethod" .=) <$> _httprRequestMethod,
("cacheHit" .=) <$> _httprCacheHit,
("referer" .=) <$> _httprReferer])
newtype AuthenticationInfoThirdPartyPrincipal = AuthenticationInfoThirdPartyPrincipal'
{ _aitppAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
authenticationInfoThirdPartyPrincipal
:: HashMap Text JSONValue
-> AuthenticationInfoThirdPartyPrincipal
authenticationInfoThirdPartyPrincipal pAitppAddtional_ =
AuthenticationInfoThirdPartyPrincipal'
{ _aitppAddtional = _Coerce # pAitppAddtional_
}
aitppAddtional :: Lens' AuthenticationInfoThirdPartyPrincipal (HashMap Text JSONValue)
aitppAddtional
= lens _aitppAddtional
(\ s a -> s{_aitppAddtional = a})
. _Coerce
instance FromJSON
AuthenticationInfoThirdPartyPrincipal where
parseJSON
= withObject "AuthenticationInfoThirdPartyPrincipal"
(\ o ->
AuthenticationInfoThirdPartyPrincipal' <$>
(parseJSONObject o))
instance ToJSON AuthenticationInfoThirdPartyPrincipal
where
toJSON = toJSON . _aitppAddtional
data ResourceInfo = ResourceInfo'
{ _riResourceName :: !(Maybe Text)
, _riResourceContainer :: !(Maybe Text)
, _riResourceLocation :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
resourceInfo
:: ResourceInfo
resourceInfo =
ResourceInfo'
{ _riResourceName = Nothing
, _riResourceContainer = Nothing
, _riResourceLocation = Nothing
}
riResourceName :: Lens' ResourceInfo (Maybe Text)
riResourceName
= lens _riResourceName
(\ s a -> s{_riResourceName = a})
riResourceContainer :: Lens' ResourceInfo (Maybe Text)
riResourceContainer
= lens _riResourceContainer
(\ s a -> s{_riResourceContainer = a})
riResourceLocation :: Lens' ResourceInfo (Maybe Text)
riResourceLocation
= lens _riResourceLocation
(\ s a -> s{_riResourceLocation = a})
instance FromJSON ResourceInfo where
parseJSON
= withObject "ResourceInfo"
(\ o ->
ResourceInfo' <$>
(o .:? "resourceName") <*>
(o .:? "resourceContainer")
<*> (o .:? "resourceLocation"))
instance ToJSON ResourceInfo where
toJSON ResourceInfo'{..}
= object
(catMaybes
[("resourceName" .=) <$> _riResourceName,
("resourceContainer" .=) <$> _riResourceContainer,
("resourceLocation" .=) <$> _riResourceLocation])
data MetricValue = MetricValue'
{ _mvBoolValue :: !(Maybe Bool)
, _mvStartTime :: !(Maybe DateTime')
, _mvMoneyValue :: !(Maybe Money)
, _mvDoubleValue :: !(Maybe (Textual Double))
, _mvStringValue :: !(Maybe Text)
, _mvDistributionValue :: !(Maybe Distribution)
, _mvEndTime :: !(Maybe DateTime')
, _mvInt64Value :: !(Maybe (Textual Int64))
, _mvLabels :: !(Maybe MetricValueLabels)
} deriving (Eq,Show,Data,Typeable,Generic)
metricValue
:: MetricValue
metricValue =
MetricValue'
{ _mvBoolValue = Nothing
, _mvStartTime = Nothing
, _mvMoneyValue = Nothing
, _mvDoubleValue = Nothing
, _mvStringValue = Nothing
, _mvDistributionValue = Nothing
, _mvEndTime = Nothing
, _mvInt64Value = Nothing
, _mvLabels = Nothing
}
mvBoolValue :: Lens' MetricValue (Maybe Bool)
mvBoolValue
= lens _mvBoolValue (\ s a -> s{_mvBoolValue = a})
mvStartTime :: Lens' MetricValue (Maybe UTCTime)
mvStartTime
= lens _mvStartTime (\ s a -> s{_mvStartTime = a}) .
mapping _DateTime
mvMoneyValue :: Lens' MetricValue (Maybe Money)
mvMoneyValue
= lens _mvMoneyValue (\ s a -> s{_mvMoneyValue = a})
mvDoubleValue :: Lens' MetricValue (Maybe Double)
mvDoubleValue
= lens _mvDoubleValue
(\ s a -> s{_mvDoubleValue = a})
. mapping _Coerce
mvStringValue :: Lens' MetricValue (Maybe Text)
mvStringValue
= lens _mvStringValue
(\ s a -> s{_mvStringValue = a})
mvDistributionValue :: Lens' MetricValue (Maybe Distribution)
mvDistributionValue
= lens _mvDistributionValue
(\ s a -> s{_mvDistributionValue = a})
mvEndTime :: Lens' MetricValue (Maybe UTCTime)
mvEndTime
= lens _mvEndTime (\ s a -> s{_mvEndTime = a}) .
mapping _DateTime
mvInt64Value :: Lens' MetricValue (Maybe Int64)
mvInt64Value
= lens _mvInt64Value (\ s a -> s{_mvInt64Value = a})
. mapping _Coerce
mvLabels :: Lens' MetricValue (Maybe MetricValueLabels)
mvLabels = lens _mvLabels (\ s a -> s{_mvLabels = a})
instance FromJSON MetricValue where
parseJSON
= withObject "MetricValue"
(\ o ->
MetricValue' <$>
(o .:? "boolValue") <*> (o .:? "startTime") <*>
(o .:? "moneyValue")
<*> (o .:? "doubleValue")
<*> (o .:? "stringValue")
<*> (o .:? "distributionValue")
<*> (o .:? "endTime")
<*> (o .:? "int64Value")
<*> (o .:? "labels"))
instance ToJSON MetricValue where
toJSON MetricValue'{..}
= object
(catMaybes
[("boolValue" .=) <$> _mvBoolValue,
("startTime" .=) <$> _mvStartTime,
("moneyValue" .=) <$> _mvMoneyValue,
("doubleValue" .=) <$> _mvDoubleValue,
("stringValue" .=) <$> _mvStringValue,
("distributionValue" .=) <$> _mvDistributionValue,
("endTime" .=) <$> _mvEndTime,
("int64Value" .=) <$> _mvInt64Value,
("labels" .=) <$> _mvLabels])
data ResourceLocation = ResourceLocation'
{ _rlOriginalLocations :: !(Maybe [Text])
, _rlCurrentLocations :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
resourceLocation
:: ResourceLocation
resourceLocation =
ResourceLocation'
{ _rlOriginalLocations = Nothing
, _rlCurrentLocations = Nothing
}
rlOriginalLocations :: Lens' ResourceLocation [Text]
rlOriginalLocations
= lens _rlOriginalLocations
(\ s a -> s{_rlOriginalLocations = a})
. _Default
. _Coerce
rlCurrentLocations :: Lens' ResourceLocation [Text]
rlCurrentLocations
= lens _rlCurrentLocations
(\ s a -> s{_rlCurrentLocations = a})
. _Default
. _Coerce
instance FromJSON ResourceLocation where
parseJSON
= withObject "ResourceLocation"
(\ o ->
ResourceLocation' <$>
(o .:? "originalLocations" .!= mempty) <*>
(o .:? "currentLocations" .!= mempty))
instance ToJSON ResourceLocation where
toJSON ResourceLocation'{..}
= object
(catMaybes
[("originalLocations" .=) <$> _rlOriginalLocations,
("currentLocations" .=) <$> _rlCurrentLocations])
newtype PeerLabels = PeerLabels'
{ _plAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
peerLabels
:: HashMap Text Text
-> PeerLabels
peerLabels pPlAddtional_ =
PeerLabels'
{ _plAddtional = _Coerce # pPlAddtional_
}
plAddtional :: Lens' PeerLabels (HashMap Text Text)
plAddtional
= lens _plAddtional (\ s a -> s{_plAddtional = a}) .
_Coerce
instance FromJSON PeerLabels where
parseJSON
= withObject "PeerLabels"
(\ o -> PeerLabels' <$> (parseJSONObject o))
instance ToJSON PeerLabels where
toJSON = toJSON . _plAddtional
newtype QuotaProperties = QuotaProperties'
{ _qpQuotaMode :: Maybe QuotaPropertiesQuotaMode
} deriving (Eq,Show,Data,Typeable,Generic)
quotaProperties
:: QuotaProperties
quotaProperties =
QuotaProperties'
{ _qpQuotaMode = Nothing
}
qpQuotaMode :: Lens' QuotaProperties (Maybe QuotaPropertiesQuotaMode)
qpQuotaMode
= lens _qpQuotaMode (\ s a -> s{_qpQuotaMode = a})
instance FromJSON QuotaProperties where
parseJSON
= withObject "QuotaProperties"
(\ o -> QuotaProperties' <$> (o .:? "quotaMode"))
instance ToJSON QuotaProperties where
toJSON QuotaProperties'{..}
= object
(catMaybes [("quotaMode" .=) <$> _qpQuotaMode])
data Resource = Resource'
{ _rService :: !(Maybe Text)
, _rName :: !(Maybe Text)
, _rLabels :: !(Maybe ResourceLabels)
, _rType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
resource
:: Resource
resource =
Resource'
{ _rService = Nothing
, _rName = Nothing
, _rLabels = Nothing
, _rType = Nothing
}
rService :: Lens' Resource (Maybe Text)
rService = lens _rService (\ s a -> s{_rService = a})
rName :: Lens' Resource (Maybe Text)
rName = lens _rName (\ s a -> s{_rName = a})
rLabels :: Lens' Resource (Maybe ResourceLabels)
rLabels = lens _rLabels (\ s a -> s{_rLabels = a})
rType :: Lens' Resource (Maybe Text)
rType = lens _rType (\ s a -> s{_rType = a})
instance FromJSON Resource where
parseJSON
= withObject "Resource"
(\ o ->
Resource' <$>
(o .:? "service") <*> (o .:? "name") <*>
(o .:? "labels")
<*> (o .:? "type"))
instance ToJSON Resource where
toJSON Resource'{..}
= object
(catMaybes
[("service" .=) <$> _rService,
("name" .=) <$> _rName, ("labels" .=) <$> _rLabels,
("type" .=) <$> _rType])
data AllocateQuotaRequest = AllocateQuotaRequest'
{ _aqrServiceConfigId :: !(Maybe Text)
, _aqrAllocateOperation :: !(Maybe QuotaOperation)
} deriving (Eq,Show,Data,Typeable,Generic)
allocateQuotaRequest
:: AllocateQuotaRequest
allocateQuotaRequest =
AllocateQuotaRequest'
{ _aqrServiceConfigId = Nothing
, _aqrAllocateOperation = Nothing
}
aqrServiceConfigId :: Lens' AllocateQuotaRequest (Maybe Text)
aqrServiceConfigId
= lens _aqrServiceConfigId
(\ s a -> s{_aqrServiceConfigId = a})
aqrAllocateOperation :: Lens' AllocateQuotaRequest (Maybe QuotaOperation)
aqrAllocateOperation
= lens _aqrAllocateOperation
(\ s a -> s{_aqrAllocateOperation = a})
instance FromJSON AllocateQuotaRequest where
parseJSON
= withObject "AllocateQuotaRequest"
(\ o ->
AllocateQuotaRequest' <$>
(o .:? "serviceConfigId") <*>
(o .:? "allocateOperation"))
instance ToJSON AllocateQuotaRequest where
toJSON AllocateQuotaRequest'{..}
= object
(catMaybes
[("serviceConfigId" .=) <$> _aqrServiceConfigId,
("allocateOperation" .=) <$> _aqrAllocateOperation])
newtype AuditLogResponse = AuditLogResponse'
{ _alrAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
auditLogResponse
:: HashMap Text JSONValue
-> AuditLogResponse
auditLogResponse pAlrAddtional_ =
AuditLogResponse'
{ _alrAddtional = _Coerce # pAlrAddtional_
}
alrAddtional :: Lens' AuditLogResponse (HashMap Text JSONValue)
alrAddtional
= lens _alrAddtional (\ s a -> s{_alrAddtional = a})
. _Coerce
instance FromJSON AuditLogResponse where
parseJSON
= withObject "AuditLogResponse"
(\ o -> AuditLogResponse' <$> (parseJSONObject o))
instance ToJSON AuditLogResponse where
toJSON = toJSON . _alrAddtional
newtype RequestHeaders = RequestHeaders'
{ _rhAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
requestHeaders
:: HashMap Text Text
-> RequestHeaders
requestHeaders pRhAddtional_ =
RequestHeaders'
{ _rhAddtional = _Coerce # pRhAddtional_
}
rhAddtional :: Lens' RequestHeaders (HashMap Text Text)
rhAddtional
= lens _rhAddtional (\ s a -> s{_rhAddtional = a}) .
_Coerce
instance FromJSON RequestHeaders where
parseJSON
= withObject "RequestHeaders"
(\ o -> RequestHeaders' <$> (parseJSONObject o))
instance ToJSON RequestHeaders where
toJSON = toJSON . _rhAddtional
data CheckResponse = CheckResponse'
{ _cCheckErrors :: !(Maybe [CheckError])
, _cQuotaInfo :: !(Maybe QuotaInfo)
, _cServiceConfigId :: !(Maybe Text)
, _cCheckInfo :: !(Maybe CheckInfo)
, _cOperationId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
checkResponse
:: CheckResponse
checkResponse =
CheckResponse'
{ _cCheckErrors = Nothing
, _cQuotaInfo = Nothing
, _cServiceConfigId = Nothing
, _cCheckInfo = Nothing
, _cOperationId = Nothing
}
cCheckErrors :: Lens' CheckResponse [CheckError]
cCheckErrors
= lens _cCheckErrors (\ s a -> s{_cCheckErrors = a})
. _Default
. _Coerce
cQuotaInfo :: Lens' CheckResponse (Maybe QuotaInfo)
cQuotaInfo
= lens _cQuotaInfo (\ s a -> s{_cQuotaInfo = a})
cServiceConfigId :: Lens' CheckResponse (Maybe Text)
cServiceConfigId
= lens _cServiceConfigId
(\ s a -> s{_cServiceConfigId = a})
cCheckInfo :: Lens' CheckResponse (Maybe CheckInfo)
cCheckInfo
= lens _cCheckInfo (\ s a -> s{_cCheckInfo = a})
cOperationId :: Lens' CheckResponse (Maybe Text)
cOperationId
= lens _cOperationId (\ s a -> s{_cOperationId = a})
instance FromJSON CheckResponse where
parseJSON
= withObject "CheckResponse"
(\ o ->
CheckResponse' <$>
(o .:? "checkErrors" .!= mempty) <*>
(o .:? "quotaInfo")
<*> (o .:? "serviceConfigId")
<*> (o .:? "checkInfo")
<*> (o .:? "operationId"))
instance ToJSON CheckResponse where
toJSON CheckResponse'{..}
= object
(catMaybes
[("checkErrors" .=) <$> _cCheckErrors,
("quotaInfo" .=) <$> _cQuotaInfo,
("serviceConfigId" .=) <$> _cServiceConfigId,
("checkInfo" .=) <$> _cCheckInfo,
("operationId" .=) <$> _cOperationId])
newtype AuditLogResourceOriginalState = AuditLogResourceOriginalState'
{ _alrosAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
auditLogResourceOriginalState
:: HashMap Text JSONValue
-> AuditLogResourceOriginalState
auditLogResourceOriginalState pAlrosAddtional_ =
AuditLogResourceOriginalState'
{ _alrosAddtional = _Coerce # pAlrosAddtional_
}
alrosAddtional :: Lens' AuditLogResourceOriginalState (HashMap Text JSONValue)
alrosAddtional
= lens _alrosAddtional
(\ s a -> s{_alrosAddtional = a})
. _Coerce
instance FromJSON AuditLogResourceOriginalState where
parseJSON
= withObject "AuditLogResourceOriginalState"
(\ o ->
AuditLogResourceOriginalState' <$>
(parseJSONObject o))
instance ToJSON AuditLogResourceOriginalState where
toJSON = toJSON . _alrosAddtional
data ReportResponse = ReportResponse'
{ _rReportErrors :: !(Maybe [ReportError])
, _rReportInfos :: !(Maybe [ReportInfo])
, _rServiceConfigId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
reportResponse
:: ReportResponse
reportResponse =
ReportResponse'
{ _rReportErrors = Nothing
, _rReportInfos = Nothing
, _rServiceConfigId = Nothing
}
rReportErrors :: Lens' ReportResponse [ReportError]
rReportErrors
= lens _rReportErrors
(\ s a -> s{_rReportErrors = a})
. _Default
. _Coerce
rReportInfos :: Lens' ReportResponse [ReportInfo]
rReportInfos
= lens _rReportInfos (\ s a -> s{_rReportInfos = a})
. _Default
. _Coerce
rServiceConfigId :: Lens' ReportResponse (Maybe Text)
rServiceConfigId
= lens _rServiceConfigId
(\ s a -> s{_rServiceConfigId = a})
instance FromJSON ReportResponse where
parseJSON
= withObject "ReportResponse"
(\ o ->
ReportResponse' <$>
(o .:? "reportErrors" .!= mempty) <*>
(o .:? "reportInfos" .!= mempty)
<*> (o .:? "serviceConfigId"))
instance ToJSON ReportResponse where
toJSON ReportResponse'{..}
= object
(catMaybes
[("reportErrors" .=) <$> _rReportErrors,
("reportInfos" .=) <$> _rReportInfos,
("serviceConfigId" .=) <$> _rServiceConfigId])
data LogEntryOperation = LogEntryOperation'
{ _leoFirst :: !(Maybe Bool)
, _leoProducer :: !(Maybe Text)
, _leoLast :: !(Maybe Bool)
, _leoId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
logEntryOperation
:: LogEntryOperation
logEntryOperation =
LogEntryOperation'
{ _leoFirst = Nothing
, _leoProducer = Nothing
, _leoLast = Nothing
, _leoId = Nothing
}
leoFirst :: Lens' LogEntryOperation (Maybe Bool)
leoFirst = lens _leoFirst (\ s a -> s{_leoFirst = a})
leoProducer :: Lens' LogEntryOperation (Maybe Text)
leoProducer
= lens _leoProducer (\ s a -> s{_leoProducer = a})
leoLast :: Lens' LogEntryOperation (Maybe Bool)
leoLast = lens _leoLast (\ s a -> s{_leoLast = a})
leoId :: Lens' LogEntryOperation (Maybe Text)
leoId = lens _leoId (\ s a -> s{_leoId = a})
instance FromJSON LogEntryOperation where
parseJSON
= withObject "LogEntryOperation"
(\ o ->
LogEntryOperation' <$>
(o .:? "first") <*> (o .:? "producer") <*>
(o .:? "last")
<*> (o .:? "id"))
instance ToJSON LogEntryOperation where
toJSON LogEntryOperation'{..}
= object
(catMaybes
[("first" .=) <$> _leoFirst,
("producer" .=) <$> _leoProducer,
("last" .=) <$> _leoLast, ("id" .=) <$> _leoId])
data ReportInfo = ReportInfo'
{ _riQuotaInfo :: !(Maybe QuotaInfo)
, _riOperationId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
reportInfo
:: ReportInfo
reportInfo =
ReportInfo'
{ _riQuotaInfo = Nothing
, _riOperationId = Nothing
}
riQuotaInfo :: Lens' ReportInfo (Maybe QuotaInfo)
riQuotaInfo
= lens _riQuotaInfo (\ s a -> s{_riQuotaInfo = a})
riOperationId :: Lens' ReportInfo (Maybe Text)
riOperationId
= lens _riOperationId
(\ s a -> s{_riOperationId = a})
instance FromJSON ReportInfo where
parseJSON
= withObject "ReportInfo"
(\ o ->
ReportInfo' <$>
(o .:? "quotaInfo") <*> (o .:? "operationId"))
instance ToJSON ReportInfo where
toJSON ReportInfo'{..}
= object
(catMaybes
[("quotaInfo" .=) <$> _riQuotaInfo,
("operationId" .=) <$> _riOperationId])
data LogEntry = LogEntry'
{ _leOperation :: !(Maybe LogEntryOperation)
, _leSeverity :: !(Maybe LogEntrySeverity)
, _leTextPayload :: !(Maybe Text)
, _leHTTPRequest :: !(Maybe HTTPRequest)
, _leStructPayload :: !(Maybe LogEntryStructPayload)
, _leName :: !(Maybe Text)
, _leInsertId :: !(Maybe Text)
, _leLabels :: !(Maybe LogEntryLabels)
, _leProtoPayload :: !(Maybe LogEntryProtoPayload)
, _leTimestamp :: !(Maybe DateTime')
, _leTrace :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
logEntry
:: LogEntry
logEntry =
LogEntry'
{ _leOperation = Nothing
, _leSeverity = Nothing
, _leTextPayload = Nothing
, _leHTTPRequest = Nothing
, _leStructPayload = Nothing
, _leName = Nothing
, _leInsertId = Nothing
, _leLabels = Nothing
, _leProtoPayload = Nothing
, _leTimestamp = Nothing
, _leTrace = Nothing
}
leOperation :: Lens' LogEntry (Maybe LogEntryOperation)
leOperation
= lens _leOperation (\ s a -> s{_leOperation = a})
leSeverity :: Lens' LogEntry (Maybe LogEntrySeverity)
leSeverity
= lens _leSeverity (\ s a -> s{_leSeverity = a})
leTextPayload :: Lens' LogEntry (Maybe Text)
leTextPayload
= lens _leTextPayload
(\ s a -> s{_leTextPayload = a})
leHTTPRequest :: Lens' LogEntry (Maybe HTTPRequest)
leHTTPRequest
= lens _leHTTPRequest
(\ s a -> s{_leHTTPRequest = a})
leStructPayload :: Lens' LogEntry (Maybe LogEntryStructPayload)
leStructPayload
= lens _leStructPayload
(\ s a -> s{_leStructPayload = a})
leName :: Lens' LogEntry (Maybe Text)
leName = lens _leName (\ s a -> s{_leName = a})
leInsertId :: Lens' LogEntry (Maybe Text)
leInsertId
= lens _leInsertId (\ s a -> s{_leInsertId = a})
leLabels :: Lens' LogEntry (Maybe LogEntryLabels)
leLabels = lens _leLabels (\ s a -> s{_leLabels = a})
leProtoPayload :: Lens' LogEntry (Maybe LogEntryProtoPayload)
leProtoPayload
= lens _leProtoPayload
(\ s a -> s{_leProtoPayload = a})
leTimestamp :: Lens' LogEntry (Maybe UTCTime)
leTimestamp
= lens _leTimestamp (\ s a -> s{_leTimestamp = a}) .
mapping _DateTime
leTrace :: Lens' LogEntry (Maybe Text)
leTrace = lens _leTrace (\ s a -> s{_leTrace = a})
instance FromJSON LogEntry where
parseJSON
= withObject "LogEntry"
(\ o ->
LogEntry' <$>
(o .:? "operation") <*> (o .:? "severity") <*>
(o .:? "textPayload")
<*> (o .:? "httpRequest")
<*> (o .:? "structPayload")
<*> (o .:? "name")
<*> (o .:? "insertId")
<*> (o .:? "labels")
<*> (o .:? "protoPayload")
<*> (o .:? "timestamp")
<*> (o .:? "trace"))
instance ToJSON LogEntry where
toJSON LogEntry'{..}
= object
(catMaybes
[("operation" .=) <$> _leOperation,
("severity" .=) <$> _leSeverity,
("textPayload" .=) <$> _leTextPayload,
("httpRequest" .=) <$> _leHTTPRequest,
("structPayload" .=) <$> _leStructPayload,
("name" .=) <$> _leName,
("insertId" .=) <$> _leInsertId,
("labels" .=) <$> _leLabels,
("protoPayload" .=) <$> _leProtoPayload,
("timestamp" .=) <$> _leTimestamp,
("trace" .=) <$> _leTrace])
newtype AuditLogRequest = AuditLogRequest'
{ _aAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
auditLogRequest
:: HashMap Text JSONValue
-> AuditLogRequest
auditLogRequest pAAddtional_ =
AuditLogRequest'
{ _aAddtional = _Coerce # pAAddtional_
}
aAddtional :: Lens' AuditLogRequest (HashMap Text JSONValue)
aAddtional
= lens _aAddtional (\ s a -> s{_aAddtional = a}) .
_Coerce
instance FromJSON AuditLogRequest where
parseJSON
= withObject "AuditLogRequest"
(\ o -> AuditLogRequest' <$> (parseJSONObject o))
instance ToJSON AuditLogRequest where
toJSON = toJSON . _aAddtional
newtype OperationLabels = OperationLabels'
{ _olAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
operationLabels
:: HashMap Text Text
-> OperationLabels
operationLabels pOlAddtional_ =
OperationLabels'
{ _olAddtional = _Coerce # pOlAddtional_
}
olAddtional :: Lens' OperationLabels (HashMap Text Text)
olAddtional
= lens _olAddtional (\ s a -> s{_olAddtional = a}) .
_Coerce
instance FromJSON OperationLabels where
parseJSON
= withObject "OperationLabels"
(\ o -> OperationLabels' <$> (parseJSONObject o))
instance ToJSON OperationLabels where
toJSON = toJSON . _olAddtional
data CheckInfo = CheckInfo'
{ _ciConsumerInfo :: !(Maybe ConsumerInfo)
, _ciUnusedArguments :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
checkInfo
:: CheckInfo
checkInfo =
CheckInfo'
{ _ciConsumerInfo = Nothing
, _ciUnusedArguments = Nothing
}
ciConsumerInfo :: Lens' CheckInfo (Maybe ConsumerInfo)
ciConsumerInfo
= lens _ciConsumerInfo
(\ s a -> s{_ciConsumerInfo = a})
ciUnusedArguments :: Lens' CheckInfo [Text]
ciUnusedArguments
= lens _ciUnusedArguments
(\ s a -> s{_ciUnusedArguments = a})
. _Default
. _Coerce
instance FromJSON CheckInfo where
parseJSON
= withObject "CheckInfo"
(\ o ->
CheckInfo' <$>
(o .:? "consumerInfo") <*>
(o .:? "unusedArguments" .!= mempty))
instance ToJSON CheckInfo where
toJSON CheckInfo'{..}
= object
(catMaybes
[("consumerInfo" .=) <$> _ciConsumerInfo,
("unusedArguments" .=) <$> _ciUnusedArguments])
data AllocateQuotaResponse = AllocateQuotaResponse'
{ _aAllocateInfo :: !(Maybe AllocateInfo)
, _aAllocateErrors :: !(Maybe [QuotaError])
, _aQuotaMetrics :: !(Maybe [MetricValueSet])
, _aServiceConfigId :: !(Maybe Text)
, _aOperationId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
allocateQuotaResponse
:: AllocateQuotaResponse
allocateQuotaResponse =
AllocateQuotaResponse'
{ _aAllocateInfo = Nothing
, _aAllocateErrors = Nothing
, _aQuotaMetrics = Nothing
, _aServiceConfigId = Nothing
, _aOperationId = Nothing
}
aAllocateInfo :: Lens' AllocateQuotaResponse (Maybe AllocateInfo)
aAllocateInfo
= lens _aAllocateInfo
(\ s a -> s{_aAllocateInfo = a})
aAllocateErrors :: Lens' AllocateQuotaResponse [QuotaError]
aAllocateErrors
= lens _aAllocateErrors
(\ s a -> s{_aAllocateErrors = a})
. _Default
. _Coerce
aQuotaMetrics :: Lens' AllocateQuotaResponse [MetricValueSet]
aQuotaMetrics
= lens _aQuotaMetrics
(\ s a -> s{_aQuotaMetrics = a})
. _Default
. _Coerce
aServiceConfigId :: Lens' AllocateQuotaResponse (Maybe Text)
aServiceConfigId
= lens _aServiceConfigId
(\ s a -> s{_aServiceConfigId = a})
aOperationId :: Lens' AllocateQuotaResponse (Maybe Text)
aOperationId
= lens _aOperationId (\ s a -> s{_aOperationId = a})
instance FromJSON AllocateQuotaResponse where
parseJSON
= withObject "AllocateQuotaResponse"
(\ o ->
AllocateQuotaResponse' <$>
(o .:? "allocateInfo") <*>
(o .:? "allocateErrors" .!= mempty)
<*> (o .:? "quotaMetrics" .!= mempty)
<*> (o .:? "serviceConfigId")
<*> (o .:? "operationId"))
instance ToJSON AllocateQuotaResponse where
toJSON AllocateQuotaResponse'{..}
= object
(catMaybes
[("allocateInfo" .=) <$> _aAllocateInfo,
("allocateErrors" .=) <$> _aAllocateErrors,
("quotaMetrics" .=) <$> _aQuotaMetrics,
("serviceConfigId" .=) <$> _aServiceConfigId,
("operationId" .=) <$> _aOperationId])
newtype ExplicitBuckets = ExplicitBuckets'
{ _ebBounds :: Maybe [Textual Double]
} deriving (Eq,Show,Data,Typeable,Generic)
explicitBuckets
:: ExplicitBuckets
explicitBuckets =
ExplicitBuckets'
{ _ebBounds = Nothing
}
ebBounds :: Lens' ExplicitBuckets [Double]
ebBounds
= lens _ebBounds (\ s a -> s{_ebBounds = a}) .
_Default
. _Coerce
instance FromJSON ExplicitBuckets where
parseJSON
= withObject "ExplicitBuckets"
(\ o ->
ExplicitBuckets' <$> (o .:? "bounds" .!= mempty))
instance ToJSON ExplicitBuckets where
toJSON ExplicitBuckets'{..}
= object (catMaybes [("bounds" .=) <$> _ebBounds])
data QuotaError = QuotaError'
{ _qeSubject :: !(Maybe Text)
, _qeCode :: !(Maybe QuotaErrorCode)
, _qeDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
quotaError
:: QuotaError
quotaError =
QuotaError'
{ _qeSubject = Nothing
, _qeCode = Nothing
, _qeDescription = Nothing
}
qeSubject :: Lens' QuotaError (Maybe Text)
qeSubject
= lens _qeSubject (\ s a -> s{_qeSubject = a})
qeCode :: Lens' QuotaError (Maybe QuotaErrorCode)
qeCode = lens _qeCode (\ s a -> s{_qeCode = a})
qeDescription :: Lens' QuotaError (Maybe Text)
qeDescription
= lens _qeDescription
(\ s a -> s{_qeDescription = a})
instance FromJSON QuotaError where
parseJSON
= withObject "QuotaError"
(\ o ->
QuotaError' <$>
(o .:? "subject") <*> (o .:? "code") <*>
(o .:? "description"))
instance ToJSON QuotaError where
toJSON QuotaError'{..}
= object
(catMaybes
[("subject" .=) <$> _qeSubject,
("code" .=) <$> _qeCode,
("description" .=) <$> _qeDescription])
data AuthenticationInfo = AuthenticationInfo'
{ _aiThirdPartyPrincipal :: !(Maybe AuthenticationInfoThirdPartyPrincipal)
, _aiPrincipalEmail :: !(Maybe Text)
, _aiAuthoritySelector :: !(Maybe Text)
, _aiServiceAccountKeyName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
authenticationInfo
:: AuthenticationInfo
authenticationInfo =
AuthenticationInfo'
{ _aiThirdPartyPrincipal = Nothing
, _aiPrincipalEmail = Nothing
, _aiAuthoritySelector = Nothing
, _aiServiceAccountKeyName = Nothing
}
aiThirdPartyPrincipal :: Lens' AuthenticationInfo (Maybe AuthenticationInfoThirdPartyPrincipal)
aiThirdPartyPrincipal
= lens _aiThirdPartyPrincipal
(\ s a -> s{_aiThirdPartyPrincipal = a})
aiPrincipalEmail :: Lens' AuthenticationInfo (Maybe Text)
aiPrincipalEmail
= lens _aiPrincipalEmail
(\ s a -> s{_aiPrincipalEmail = a})
aiAuthoritySelector :: Lens' AuthenticationInfo (Maybe Text)
aiAuthoritySelector
= lens _aiAuthoritySelector
(\ s a -> s{_aiAuthoritySelector = a})
aiServiceAccountKeyName :: Lens' AuthenticationInfo (Maybe Text)
aiServiceAccountKeyName
= lens _aiServiceAccountKeyName
(\ s a -> s{_aiServiceAccountKeyName = a})
instance FromJSON AuthenticationInfo where
parseJSON
= withObject "AuthenticationInfo"
(\ o ->
AuthenticationInfo' <$>
(o .:? "thirdPartyPrincipal") <*>
(o .:? "principalEmail")
<*> (o .:? "authoritySelector")
<*> (o .:? "serviceAccountKeyName"))
instance ToJSON AuthenticationInfo where
toJSON AuthenticationInfo'{..}
= object
(catMaybes
[("thirdPartyPrincipal" .=) <$>
_aiThirdPartyPrincipal,
("principalEmail" .=) <$> _aiPrincipalEmail,
("authoritySelector" .=) <$> _aiAuthoritySelector,
("serviceAccountKeyName" .=) <$>
_aiServiceAccountKeyName])
newtype QuotaInfoQuotaConsumed = QuotaInfoQuotaConsumed'
{ _qiqcAddtional :: HashMap Text (Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
quotaInfoQuotaConsumed
:: HashMap Text Int32
-> QuotaInfoQuotaConsumed
quotaInfoQuotaConsumed pQiqcAddtional_ =
QuotaInfoQuotaConsumed'
{ _qiqcAddtional = _Coerce # pQiqcAddtional_
}
qiqcAddtional :: Lens' QuotaInfoQuotaConsumed (HashMap Text Int32)
qiqcAddtional
= lens _qiqcAddtional
(\ s a -> s{_qiqcAddtional = a})
. _Coerce
instance FromJSON QuotaInfoQuotaConsumed where
parseJSON
= withObject "QuotaInfoQuotaConsumed"
(\ o ->
QuotaInfoQuotaConsumed' <$> (parseJSONObject o))
instance ToJSON QuotaInfoQuotaConsumed where
toJSON = toJSON . _qiqcAddtional
data AuditLog = AuditLog'
{ _alRequestMetadata :: !(Maybe RequestMetadata)
, _alStatus :: !(Maybe Status)
, _alResourceName :: !(Maybe Text)
, _alAuthorizationInfo :: !(Maybe [AuthorizationInfo])
, _alServiceData :: !(Maybe AuditLogServiceData)
, _alMethodName :: !(Maybe Text)
, _alResponse :: !(Maybe AuditLogResponse)
, _alResourceOriginalState :: !(Maybe AuditLogResourceOriginalState)
, _alResourceLocation :: !(Maybe ResourceLocation)
, _alServiceName :: !(Maybe Text)
, _alMetadata :: !(Maybe AuditLogMetadata)
, _alNumResponseItems :: !(Maybe (Textual Int64))
, _alAuthenticationInfo :: !(Maybe AuthenticationInfo)
, _alRequest :: !(Maybe AuditLogRequest)
} deriving (Eq,Show,Data,Typeable,Generic)
auditLog
:: AuditLog
auditLog =
AuditLog'
{ _alRequestMetadata = Nothing
, _alStatus = Nothing
, _alResourceName = Nothing
, _alAuthorizationInfo = Nothing
, _alServiceData = Nothing
, _alMethodName = Nothing
, _alResponse = Nothing
, _alResourceOriginalState = Nothing
, _alResourceLocation = Nothing
, _alServiceName = Nothing
, _alMetadata = Nothing
, _alNumResponseItems = Nothing
, _alAuthenticationInfo = Nothing
, _alRequest = Nothing
}
alRequestMetadata :: Lens' AuditLog (Maybe RequestMetadata)
alRequestMetadata
= lens _alRequestMetadata
(\ s a -> s{_alRequestMetadata = a})
alStatus :: Lens' AuditLog (Maybe Status)
alStatus = lens _alStatus (\ s a -> s{_alStatus = a})
alResourceName :: Lens' AuditLog (Maybe Text)
alResourceName
= lens _alResourceName
(\ s a -> s{_alResourceName = a})
alAuthorizationInfo :: Lens' AuditLog [AuthorizationInfo]
alAuthorizationInfo
= lens _alAuthorizationInfo
(\ s a -> s{_alAuthorizationInfo = a})
. _Default
. _Coerce
alServiceData :: Lens' AuditLog (Maybe AuditLogServiceData)
alServiceData
= lens _alServiceData
(\ s a -> s{_alServiceData = a})
alMethodName :: Lens' AuditLog (Maybe Text)
alMethodName
= lens _alMethodName (\ s a -> s{_alMethodName = a})
alResponse :: Lens' AuditLog (Maybe AuditLogResponse)
alResponse
= lens _alResponse (\ s a -> s{_alResponse = a})
alResourceOriginalState :: Lens' AuditLog (Maybe AuditLogResourceOriginalState)
alResourceOriginalState
= lens _alResourceOriginalState
(\ s a -> s{_alResourceOriginalState = a})
alResourceLocation :: Lens' AuditLog (Maybe ResourceLocation)
alResourceLocation
= lens _alResourceLocation
(\ s a -> s{_alResourceLocation = a})
alServiceName :: Lens' AuditLog (Maybe Text)
alServiceName
= lens _alServiceName
(\ s a -> s{_alServiceName = a})
alMetadata :: Lens' AuditLog (Maybe AuditLogMetadata)
alMetadata
= lens _alMetadata (\ s a -> s{_alMetadata = a})
alNumResponseItems :: Lens' AuditLog (Maybe Int64)
alNumResponseItems
= lens _alNumResponseItems
(\ s a -> s{_alNumResponseItems = a})
. mapping _Coerce
alAuthenticationInfo :: Lens' AuditLog (Maybe AuthenticationInfo)
alAuthenticationInfo
= lens _alAuthenticationInfo
(\ s a -> s{_alAuthenticationInfo = a})
alRequest :: Lens' AuditLog (Maybe AuditLogRequest)
alRequest
= lens _alRequest (\ s a -> s{_alRequest = a})
instance FromJSON AuditLog where
parseJSON
= withObject "AuditLog"
(\ o ->
AuditLog' <$>
(o .:? "requestMetadata") <*> (o .:? "status") <*>
(o .:? "resourceName")
<*> (o .:? "authorizationInfo" .!= mempty)
<*> (o .:? "serviceData")
<*> (o .:? "methodName")
<*> (o .:? "response")
<*> (o .:? "resourceOriginalState")
<*> (o .:? "resourceLocation")
<*> (o .:? "serviceName")
<*> (o .:? "metadata")
<*> (o .:? "numResponseItems")
<*> (o .:? "authenticationInfo")
<*> (o .:? "request"))
instance ToJSON AuditLog where
toJSON AuditLog'{..}
= object
(catMaybes
[("requestMetadata" .=) <$> _alRequestMetadata,
("status" .=) <$> _alStatus,
("resourceName" .=) <$> _alResourceName,
("authorizationInfo" .=) <$> _alAuthorizationInfo,
("serviceData" .=) <$> _alServiceData,
("methodName" .=) <$> _alMethodName,
("response" .=) <$> _alResponse,
("resourceOriginalState" .=) <$>
_alResourceOriginalState,
("resourceLocation" .=) <$> _alResourceLocation,
("serviceName" .=) <$> _alServiceName,
("metadata" .=) <$> _alMetadata,
("numResponseItems" .=) <$> _alNumResponseItems,
("authenticationInfo" .=) <$> _alAuthenticationInfo,
("request" .=) <$> _alRequest])
newtype OperationUserLabels = OperationUserLabels'
{ _oulAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
operationUserLabels
:: HashMap Text Text
-> OperationUserLabels
operationUserLabels pOulAddtional_ =
OperationUserLabels'
{ _oulAddtional = _Coerce # pOulAddtional_
}
oulAddtional :: Lens' OperationUserLabels (HashMap Text Text)
oulAddtional
= lens _oulAddtional (\ s a -> s{_oulAddtional = a})
. _Coerce
instance FromJSON OperationUserLabels where
parseJSON
= withObject "OperationUserLabels"
(\ o -> OperationUserLabels' <$> (parseJSONObject o))
instance ToJSON OperationUserLabels where
toJSON = toJSON . _oulAddtional
newtype LogEntryStructPayload = LogEntryStructPayload'
{ _lespAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
logEntryStructPayload
:: HashMap Text JSONValue
-> LogEntryStructPayload
logEntryStructPayload pLespAddtional_ =
LogEntryStructPayload'
{ _lespAddtional = _Coerce # pLespAddtional_
}
lespAddtional :: Lens' LogEntryStructPayload (HashMap Text JSONValue)
lespAddtional
= lens _lespAddtional
(\ s a -> s{_lespAddtional = a})
. _Coerce
instance FromJSON LogEntryStructPayload where
parseJSON
= withObject "LogEntryStructPayload"
(\ o ->
LogEntryStructPayload' <$> (parseJSONObject o))
instance ToJSON LogEntryStructPayload where
toJSON = toJSON . _lespAddtional
data Request' = Request''
{ _rPath :: !(Maybe Text)
, _rTime :: !(Maybe DateTime')
, _rSize :: !(Maybe (Textual Int64))
, _rAuth :: !(Maybe Auth)
, _rFragment :: !(Maybe Text)
, _rProtocol :: !(Maybe Text)
, _rReason :: !(Maybe Text)
, _rHeaders :: !(Maybe RequestHeaders)
, _rMethod :: !(Maybe Text)
, _rQuery :: !(Maybe Text)
, _rScheme :: !(Maybe Text)
, _rId :: !(Maybe Text)
, _rHost :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
request'
:: Request'
request' =
Request''
{ _rPath = Nothing
, _rTime = Nothing
, _rSize = Nothing
, _rAuth = Nothing
, _rFragment = Nothing
, _rProtocol = Nothing
, _rReason = Nothing
, _rHeaders = Nothing
, _rMethod = Nothing
, _rQuery = Nothing
, _rScheme = Nothing
, _rId = Nothing
, _rHost = Nothing
}
rPath :: Lens' Request' (Maybe Text)
rPath = lens _rPath (\ s a -> s{_rPath = a})
rTime :: Lens' Request' (Maybe UTCTime)
rTime
= lens _rTime (\ s a -> s{_rTime = a}) .
mapping _DateTime
rSize :: Lens' Request' (Maybe Int64)
rSize
= lens _rSize (\ s a -> s{_rSize = a}) .
mapping _Coerce
rAuth :: Lens' Request' (Maybe Auth)
rAuth = lens _rAuth (\ s a -> s{_rAuth = a})
rFragment :: Lens' Request' (Maybe Text)
rFragment
= lens _rFragment (\ s a -> s{_rFragment = a})
rProtocol :: Lens' Request' (Maybe Text)
rProtocol
= lens _rProtocol (\ s a -> s{_rProtocol = a})
rReason :: Lens' Request' (Maybe Text)
rReason = lens _rReason (\ s a -> s{_rReason = a})
rHeaders :: Lens' Request' (Maybe RequestHeaders)
rHeaders = lens _rHeaders (\ s a -> s{_rHeaders = a})
rMethod :: Lens' Request' (Maybe Text)
rMethod = lens _rMethod (\ s a -> s{_rMethod = a})
rQuery :: Lens' Request' (Maybe Text)
rQuery = lens _rQuery (\ s a -> s{_rQuery = a})
rScheme :: Lens' Request' (Maybe Text)
rScheme = lens _rScheme (\ s a -> s{_rScheme = a})
rId :: Lens' Request' (Maybe Text)
rId = lens _rId (\ s a -> s{_rId = a})
rHost :: Lens' Request' (Maybe Text)
rHost = lens _rHost (\ s a -> s{_rHost = a})
instance FromJSON Request' where
parseJSON
= withObject "Request"
(\ o ->
Request'' <$>
(o .:? "path") <*> (o .:? "time") <*> (o .:? "size")
<*> (o .:? "auth")
<*> (o .:? "fragment")
<*> (o .:? "protocol")
<*> (o .:? "reason")
<*> (o .:? "headers")
<*> (o .:? "method")
<*> (o .:? "query")
<*> (o .:? "scheme")
<*> (o .:? "id")
<*> (o .:? "host"))
instance ToJSON Request' where
toJSON Request''{..}
= object
(catMaybes
[("path" .=) <$> _rPath, ("time" .=) <$> _rTime,
("size" .=) <$> _rSize, ("auth" .=) <$> _rAuth,
("fragment" .=) <$> _rFragment,
("protocol" .=) <$> _rProtocol,
("reason" .=) <$> _rReason,
("headers" .=) <$> _rHeaders,
("method" .=) <$> _rMethod, ("query" .=) <$> _rQuery,
("scheme" .=) <$> _rScheme, ("id" .=) <$> _rId,
("host" .=) <$> _rHost])