{-# 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.Monitoring.Types.Product where
import Network.Google.Monitoring.Types.Sum
import Network.Google.Prelude
data MonitoredResourceDescriptor =
MonitoredResourceDescriptor'
{ _mrdName :: !(Maybe Text)
, _mrdDisplayName :: !(Maybe Text)
, _mrdLabels :: !(Maybe [LabelDescriptor])
, _mrdType :: !(Maybe Text)
, _mrdDescription :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
monitoredResourceDescriptor
:: MonitoredResourceDescriptor
monitoredResourceDescriptor =
MonitoredResourceDescriptor'
{ _mrdName = Nothing
, _mrdDisplayName = Nothing
, _mrdLabels = Nothing
, _mrdType = Nothing
, _mrdDescription = Nothing
}
mrdName :: Lens' MonitoredResourceDescriptor (Maybe Text)
mrdName = lens _mrdName (\ s a -> s{_mrdName = a})
mrdDisplayName :: Lens' MonitoredResourceDescriptor (Maybe Text)
mrdDisplayName
= lens _mrdDisplayName
(\ s a -> s{_mrdDisplayName = a})
mrdLabels :: Lens' MonitoredResourceDescriptor [LabelDescriptor]
mrdLabels
= lens _mrdLabels (\ s a -> s{_mrdLabels = a}) .
_Default
. _Coerce
mrdType :: Lens' MonitoredResourceDescriptor (Maybe Text)
mrdType = lens _mrdType (\ s a -> s{_mrdType = a})
mrdDescription :: Lens' MonitoredResourceDescriptor (Maybe Text)
mrdDescription
= lens _mrdDescription
(\ s a -> s{_mrdDescription = a})
instance FromJSON MonitoredResourceDescriptor where
parseJSON
= withObject "MonitoredResourceDescriptor"
(\ o ->
MonitoredResourceDescriptor' <$>
(o .:? "name") <*> (o .:? "displayName") <*>
(o .:? "labels" .!= mempty)
<*> (o .:? "type")
<*> (o .:? "description"))
instance ToJSON MonitoredResourceDescriptor where
toJSON MonitoredResourceDescriptor'{..}
= object
(catMaybes
[("name" .=) <$> _mrdName,
("displayName" .=) <$> _mrdDisplayName,
("labels" .=) <$> _mrdLabels,
("type" .=) <$> _mrdType,
("description" .=) <$> _mrdDescription])
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 ListNotificationChannelsResponse =
ListNotificationChannelsResponse'
{ _lncrNextPageToken :: !(Maybe Text)
, _lncrNotificationChannels :: !(Maybe [NotificationChannel])
}
deriving (Eq, Show, Data, Typeable, Generic)
listNotificationChannelsResponse
:: ListNotificationChannelsResponse
listNotificationChannelsResponse =
ListNotificationChannelsResponse'
{_lncrNextPageToken = Nothing, _lncrNotificationChannels = Nothing}
lncrNextPageToken :: Lens' ListNotificationChannelsResponse (Maybe Text)
lncrNextPageToken
= lens _lncrNextPageToken
(\ s a -> s{_lncrNextPageToken = a})
lncrNotificationChannels :: Lens' ListNotificationChannelsResponse [NotificationChannel]
lncrNotificationChannels
= lens _lncrNotificationChannels
(\ s a -> s{_lncrNotificationChannels = a})
. _Default
. _Coerce
instance FromJSON ListNotificationChannelsResponse
where
parseJSON
= withObject "ListNotificationChannelsResponse"
(\ o ->
ListNotificationChannelsResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "notificationChannels" .!= mempty))
instance ToJSON ListNotificationChannelsResponse
where
toJSON ListNotificationChannelsResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lncrNextPageToken,
("notificationChannels" .=) <$>
_lncrNotificationChannels])
data ListTimeSeriesResponse =
ListTimeSeriesResponse'
{ _ltsrNextPageToken :: !(Maybe Text)
, _ltsrExecutionErrors :: !(Maybe [Status])
, _ltsrTimeSeries :: !(Maybe [TimeSeries])
}
deriving (Eq, Show, Data, Typeable, Generic)
listTimeSeriesResponse
:: ListTimeSeriesResponse
listTimeSeriesResponse =
ListTimeSeriesResponse'
{ _ltsrNextPageToken = Nothing
, _ltsrExecutionErrors = Nothing
, _ltsrTimeSeries = Nothing
}
ltsrNextPageToken :: Lens' ListTimeSeriesResponse (Maybe Text)
ltsrNextPageToken
= lens _ltsrNextPageToken
(\ s a -> s{_ltsrNextPageToken = a})
ltsrExecutionErrors :: Lens' ListTimeSeriesResponse [Status]
ltsrExecutionErrors
= lens _ltsrExecutionErrors
(\ s a -> s{_ltsrExecutionErrors = a})
. _Default
. _Coerce
ltsrTimeSeries :: Lens' ListTimeSeriesResponse [TimeSeries]
ltsrTimeSeries
= lens _ltsrTimeSeries
(\ s a -> s{_ltsrTimeSeries = a})
. _Default
. _Coerce
instance FromJSON ListTimeSeriesResponse where
parseJSON
= withObject "ListTimeSeriesResponse"
(\ o ->
ListTimeSeriesResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "executionErrors" .!= mempty)
<*> (o .:? "timeSeries" .!= mempty))
instance ToJSON ListTimeSeriesResponse where
toJSON ListTimeSeriesResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _ltsrNextPageToken,
("executionErrors" .=) <$> _ltsrExecutionErrors,
("timeSeries" .=) <$> _ltsrTimeSeries])
data GetNotificationChannelVerificationCodeResponse =
GetNotificationChannelVerificationCodeResponse'
{ _gncvcrCode :: !(Maybe Text)
, _gncvcrExpireTime :: !(Maybe DateTime')
}
deriving (Eq, Show, Data, Typeable, Generic)
getNotificationChannelVerificationCodeResponse
:: GetNotificationChannelVerificationCodeResponse
getNotificationChannelVerificationCodeResponse =
GetNotificationChannelVerificationCodeResponse'
{_gncvcrCode = Nothing, _gncvcrExpireTime = Nothing}
gncvcrCode :: Lens' GetNotificationChannelVerificationCodeResponse (Maybe Text)
gncvcrCode
= lens _gncvcrCode (\ s a -> s{_gncvcrCode = a})
gncvcrExpireTime :: Lens' GetNotificationChannelVerificationCodeResponse (Maybe UTCTime)
gncvcrExpireTime
= lens _gncvcrExpireTime
(\ s a -> s{_gncvcrExpireTime = a})
. mapping _DateTime
instance FromJSON
GetNotificationChannelVerificationCodeResponse
where
parseJSON
= withObject
"GetNotificationChannelVerificationCodeResponse"
(\ o ->
GetNotificationChannelVerificationCodeResponse' <$>
(o .:? "code") <*> (o .:? "expireTime"))
instance ToJSON
GetNotificationChannelVerificationCodeResponse
where
toJSON
GetNotificationChannelVerificationCodeResponse'{..}
= object
(catMaybes
[("code" .=) <$> _gncvcrCode,
("expireTime" .=) <$> _gncvcrExpireTime])
data ListNotificationChannelDescriptorsResponse =
ListNotificationChannelDescriptorsResponse'
{ _lncdrNextPageToken :: !(Maybe Text)
, _lncdrChannelDescriptors :: !(Maybe [NotificationChannelDescriptor])
}
deriving (Eq, Show, Data, Typeable, Generic)
listNotificationChannelDescriptorsResponse
:: ListNotificationChannelDescriptorsResponse
listNotificationChannelDescriptorsResponse =
ListNotificationChannelDescriptorsResponse'
{_lncdrNextPageToken = Nothing, _lncdrChannelDescriptors = Nothing}
lncdrNextPageToken :: Lens' ListNotificationChannelDescriptorsResponse (Maybe Text)
lncdrNextPageToken
= lens _lncdrNextPageToken
(\ s a -> s{_lncdrNextPageToken = a})
lncdrChannelDescriptors :: Lens' ListNotificationChannelDescriptorsResponse [NotificationChannelDescriptor]
lncdrChannelDescriptors
= lens _lncdrChannelDescriptors
(\ s a -> s{_lncdrChannelDescriptors = a})
. _Default
. _Coerce
instance FromJSON
ListNotificationChannelDescriptorsResponse
where
parseJSON
= withObject
"ListNotificationChannelDescriptorsResponse"
(\ o ->
ListNotificationChannelDescriptorsResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "channelDescriptors" .!= mempty))
instance ToJSON
ListNotificationChannelDescriptorsResponse
where
toJSON
ListNotificationChannelDescriptorsResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lncdrNextPageToken,
("channelDescriptors" .=) <$>
_lncdrChannelDescriptors])
data MetricDescriptor =
MetricDescriptor'
{ _mdMetricKind :: !(Maybe MetricDescriptorMetricKind)
, _mdName :: !(Maybe Text)
, _mdMetadata :: !(Maybe MetricDescriptorMetadata)
, _mdDisplayName :: !(Maybe Text)
, _mdLabels :: !(Maybe [LabelDescriptor])
, _mdType :: !(Maybe Text)
, _mdValueType :: !(Maybe MetricDescriptorValueType)
, _mdDescription :: !(Maybe Text)
, _mdUnit :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
metricDescriptor
:: MetricDescriptor
metricDescriptor =
MetricDescriptor'
{ _mdMetricKind = Nothing
, _mdName = Nothing
, _mdMetadata = Nothing
, _mdDisplayName = Nothing
, _mdLabels = Nothing
, _mdType = Nothing
, _mdValueType = Nothing
, _mdDescription = Nothing
, _mdUnit = Nothing
}
mdMetricKind :: Lens' MetricDescriptor (Maybe MetricDescriptorMetricKind)
mdMetricKind
= lens _mdMetricKind (\ s a -> s{_mdMetricKind = a})
mdName :: Lens' MetricDescriptor (Maybe Text)
mdName = lens _mdName (\ s a -> s{_mdName = a})
mdMetadata :: Lens' MetricDescriptor (Maybe MetricDescriptorMetadata)
mdMetadata
= lens _mdMetadata (\ s a -> s{_mdMetadata = a})
mdDisplayName :: Lens' MetricDescriptor (Maybe Text)
mdDisplayName
= lens _mdDisplayName
(\ s a -> s{_mdDisplayName = a})
mdLabels :: Lens' MetricDescriptor [LabelDescriptor]
mdLabels
= lens _mdLabels (\ s a -> s{_mdLabels = a}) .
_Default
. _Coerce
mdType :: Lens' MetricDescriptor (Maybe Text)
mdType = lens _mdType (\ s a -> s{_mdType = a})
mdValueType :: Lens' MetricDescriptor (Maybe MetricDescriptorValueType)
mdValueType
= lens _mdValueType (\ s a -> s{_mdValueType = a})
mdDescription :: Lens' MetricDescriptor (Maybe Text)
mdDescription
= lens _mdDescription
(\ s a -> s{_mdDescription = a})
mdUnit :: Lens' MetricDescriptor (Maybe Text)
mdUnit = lens _mdUnit (\ s a -> s{_mdUnit = a})
instance FromJSON MetricDescriptor where
parseJSON
= withObject "MetricDescriptor"
(\ o ->
MetricDescriptor' <$>
(o .:? "metricKind") <*> (o .:? "name") <*>
(o .:? "metadata")
<*> (o .:? "displayName")
<*> (o .:? "labels" .!= mempty)
<*> (o .:? "type")
<*> (o .:? "valueType")
<*> (o .:? "description")
<*> (o .:? "unit"))
instance ToJSON MetricDescriptor where
toJSON MetricDescriptor'{..}
= object
(catMaybes
[("metricKind" .=) <$> _mdMetricKind,
("name" .=) <$> _mdName,
("metadata" .=) <$> _mdMetadata,
("displayName" .=) <$> _mdDisplayName,
("labels" .=) <$> _mdLabels, ("type" .=) <$> _mdType,
("valueType" .=) <$> _mdValueType,
("description" .=) <$> _mdDescription,
("unit" .=) <$> _mdUnit])
data Group =
Group'
{ _gName :: !(Maybe Text)
, _gDisplayName :: !(Maybe Text)
, _gFilter :: !(Maybe Text)
, _gIsCluster :: !(Maybe Bool)
, _gParentName :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
group'
:: Group
group' =
Group'
{ _gName = Nothing
, _gDisplayName = Nothing
, _gFilter = Nothing
, _gIsCluster = Nothing
, _gParentName = Nothing
}
gName :: Lens' Group (Maybe Text)
gName = lens _gName (\ s a -> s{_gName = a})
gDisplayName :: Lens' Group (Maybe Text)
gDisplayName
= lens _gDisplayName (\ s a -> s{_gDisplayName = a})
gFilter :: Lens' Group (Maybe Text)
gFilter = lens _gFilter (\ s a -> s{_gFilter = a})
gIsCluster :: Lens' Group (Maybe Bool)
gIsCluster
= lens _gIsCluster (\ s a -> s{_gIsCluster = a})
gParentName :: Lens' Group (Maybe Text)
gParentName
= lens _gParentName (\ s a -> s{_gParentName = a})
instance FromJSON Group where
parseJSON
= withObject "Group"
(\ o ->
Group' <$>
(o .:? "name") <*> (o .:? "displayName") <*>
(o .:? "filter")
<*> (o .:? "isCluster")
<*> (o .:? "parentName"))
instance ToJSON Group where
toJSON Group'{..}
= object
(catMaybes
[("name" .=) <$> _gName,
("displayName" .=) <$> _gDisplayName,
("filter" .=) <$> _gFilter,
("isCluster" .=) <$> _gIsCluster,
("parentName" .=) <$> _gParentName])
data TypedValue =
TypedValue'
{ _tvBoolValue :: !(Maybe Bool)
, _tvDoubleValue :: !(Maybe (Textual Double))
, _tvStringValue :: !(Maybe Text)
, _tvDistributionValue :: !(Maybe Distribution)
, _tvInt64Value :: !(Maybe (Textual Int64))
}
deriving (Eq, Show, Data, Typeable, Generic)
typedValue
:: TypedValue
typedValue =
TypedValue'
{ _tvBoolValue = Nothing
, _tvDoubleValue = Nothing
, _tvStringValue = Nothing
, _tvDistributionValue = Nothing
, _tvInt64Value = Nothing
}
tvBoolValue :: Lens' TypedValue (Maybe Bool)
tvBoolValue
= lens _tvBoolValue (\ s a -> s{_tvBoolValue = a})
tvDoubleValue :: Lens' TypedValue (Maybe Double)
tvDoubleValue
= lens _tvDoubleValue
(\ s a -> s{_tvDoubleValue = a})
. mapping _Coerce
tvStringValue :: Lens' TypedValue (Maybe Text)
tvStringValue
= lens _tvStringValue
(\ s a -> s{_tvStringValue = a})
tvDistributionValue :: Lens' TypedValue (Maybe Distribution)
tvDistributionValue
= lens _tvDistributionValue
(\ s a -> s{_tvDistributionValue = a})
tvInt64Value :: Lens' TypedValue (Maybe Int64)
tvInt64Value
= lens _tvInt64Value (\ s a -> s{_tvInt64Value = a})
. mapping _Coerce
instance FromJSON TypedValue where
parseJSON
= withObject "TypedValue"
(\ o ->
TypedValue' <$>
(o .:? "boolValue") <*> (o .:? "doubleValue") <*>
(o .:? "stringValue")
<*> (o .:? "distributionValue")
<*> (o .:? "int64Value"))
instance ToJSON TypedValue where
toJSON TypedValue'{..}
= object
(catMaybes
[("boolValue" .=) <$> _tvBoolValue,
("doubleValue" .=) <$> _tvDoubleValue,
("stringValue" .=) <$> _tvStringValue,
("distributionValue" .=) <$> _tvDistributionValue,
("int64Value" .=) <$> _tvInt64Value])
newtype MonitoredResourceLabels =
MonitoredResourceLabels'
{ _mrlAddtional :: HashMap Text Text
}
deriving (Eq, Show, Data, Typeable, Generic)
monitoredResourceLabels
:: HashMap Text Text
-> MonitoredResourceLabels
monitoredResourceLabels pMrlAddtional_ =
MonitoredResourceLabels' {_mrlAddtional = _Coerce # pMrlAddtional_}
mrlAddtional :: Lens' MonitoredResourceLabels (HashMap Text Text)
mrlAddtional
= lens _mrlAddtional (\ s a -> s{_mrlAddtional = a})
. _Coerce
instance FromJSON MonitoredResourceLabels where
parseJSON
= withObject "MonitoredResourceLabels"
(\ o ->
MonitoredResourceLabels' <$> (parseJSONObject o))
instance ToJSON MonitoredResourceLabels where
toJSON = toJSON . _mrlAddtional
data MonitoredResourceMetadata =
MonitoredResourceMetadata'
{ _mrmUserLabels :: !(Maybe MonitoredResourceMetadataUserLabels)
, _mrmSystemLabels :: !(Maybe MonitoredResourceMetadataSystemLabels)
}
deriving (Eq, Show, Data, Typeable, Generic)
monitoredResourceMetadata
:: MonitoredResourceMetadata
monitoredResourceMetadata =
MonitoredResourceMetadata'
{_mrmUserLabels = Nothing, _mrmSystemLabels = Nothing}
mrmUserLabels :: Lens' MonitoredResourceMetadata (Maybe MonitoredResourceMetadataUserLabels)
mrmUserLabels
= lens _mrmUserLabels
(\ s a -> s{_mrmUserLabels = a})
mrmSystemLabels :: Lens' MonitoredResourceMetadata (Maybe MonitoredResourceMetadataSystemLabels)
mrmSystemLabels
= lens _mrmSystemLabels
(\ s a -> s{_mrmSystemLabels = a})
instance FromJSON MonitoredResourceMetadata where
parseJSON
= withObject "MonitoredResourceMetadata"
(\ o ->
MonitoredResourceMetadata' <$>
(o .:? "userLabels") <*> (o .:? "systemLabels"))
instance ToJSON MonitoredResourceMetadata where
toJSON MonitoredResourceMetadata'{..}
= object
(catMaybes
[("userLabels" .=) <$> _mrmUserLabels,
("systemLabels" .=) <$> _mrmSystemLabels])
newtype NotificationChannelUserLabels =
NotificationChannelUserLabels'
{ _nculAddtional :: HashMap Text Text
}
deriving (Eq, Show, Data, Typeable, Generic)
notificationChannelUserLabels
:: HashMap Text Text
-> NotificationChannelUserLabels
notificationChannelUserLabels pNculAddtional_ =
NotificationChannelUserLabels' {_nculAddtional = _Coerce # pNculAddtional_}
nculAddtional :: Lens' NotificationChannelUserLabels (HashMap Text Text)
nculAddtional
= lens _nculAddtional
(\ s a -> s{_nculAddtional = a})
. _Coerce
instance FromJSON NotificationChannelUserLabels where
parseJSON
= withObject "NotificationChannelUserLabels"
(\ o ->
NotificationChannelUserLabels' <$>
(parseJSONObject o))
instance ToJSON NotificationChannelUserLabels where
toJSON = toJSON . _nculAddtional
newtype SourceContext =
SourceContext'
{ _scFileName :: Maybe Text
}
deriving (Eq, Show, Data, Typeable, Generic)
sourceContext
:: SourceContext
sourceContext = SourceContext' {_scFileName = Nothing}
scFileName :: Lens' SourceContext (Maybe Text)
scFileName
= lens _scFileName (\ s a -> s{_scFileName = a})
instance FromJSON SourceContext where
parseJSON
= withObject "SourceContext"
(\ o -> SourceContext' <$> (o .:? "fileName"))
instance ToJSON SourceContext where
toJSON SourceContext'{..}
= object
(catMaybes [("fileName" .=) <$> _scFileName])
data BasicAuthentication =
BasicAuthentication'
{ _baUsername :: !(Maybe Text)
, _baPassword :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
basicAuthentication
:: BasicAuthentication
basicAuthentication =
BasicAuthentication' {_baUsername = Nothing, _baPassword = Nothing}
baUsername :: Lens' BasicAuthentication (Maybe Text)
baUsername
= lens _baUsername (\ s a -> s{_baUsername = a})
baPassword :: Lens' BasicAuthentication (Maybe Text)
baPassword
= lens _baPassword (\ s a -> s{_baPassword = a})
instance FromJSON BasicAuthentication where
parseJSON
= withObject "BasicAuthentication"
(\ o ->
BasicAuthentication' <$>
(o .:? "username") <*> (o .:? "password"))
instance ToJSON BasicAuthentication where
toJSON BasicAuthentication'{..}
= object
(catMaybes
[("username" .=) <$> _baUsername,
("password" .=) <$> _baPassword])
data Distribution =
Distribution'
{ _dSumOfSquaredDeviation :: !(Maybe (Textual Double))
, _dMean :: !(Maybe (Textual Double))
, _dCount :: !(Maybe (Textual Int64))
, _dBucketCounts :: !(Maybe [Textual Int64])
, _dExemplars :: !(Maybe [Exemplar])
, _dRange :: !(Maybe Range)
, _dBucketOptions :: !(Maybe BucketOptions)
}
deriving (Eq, Show, Data, Typeable, Generic)
distribution
:: Distribution
distribution =
Distribution'
{ _dSumOfSquaredDeviation = Nothing
, _dMean = Nothing
, _dCount = Nothing
, _dBucketCounts = Nothing
, _dExemplars = Nothing
, _dRange = Nothing
, _dBucketOptions = 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
dCount :: Lens' Distribution (Maybe Int64)
dCount
= lens _dCount (\ s a -> s{_dCount = a}) .
mapping _Coerce
dBucketCounts :: Lens' Distribution [Int64]
dBucketCounts
= lens _dBucketCounts
(\ s a -> s{_dBucketCounts = a})
. _Default
. _Coerce
dExemplars :: Lens' Distribution [Exemplar]
dExemplars
= lens _dExemplars (\ s a -> s{_dExemplars = a}) .
_Default
. _Coerce
dRange :: Lens' Distribution (Maybe Range)
dRange = lens _dRange (\ s a -> s{_dRange = a})
dBucketOptions :: Lens' Distribution (Maybe BucketOptions)
dBucketOptions
= lens _dBucketOptions
(\ s a -> s{_dBucketOptions = a})
instance FromJSON Distribution where
parseJSON
= withObject "Distribution"
(\ o ->
Distribution' <$>
(o .:? "sumOfSquaredDeviation") <*> (o .:? "mean")
<*> (o .:? "count")
<*> (o .:? "bucketCounts" .!= mempty)
<*> (o .:? "exemplars" .!= mempty)
<*> (o .:? "range")
<*> (o .:? "bucketOptions"))
instance ToJSON Distribution where
toJSON Distribution'{..}
= object
(catMaybes
[("sumOfSquaredDeviation" .=) <$>
_dSumOfSquaredDeviation,
("mean" .=) <$> _dMean, ("count" .=) <$> _dCount,
("bucketCounts" .=) <$> _dBucketCounts,
("exemplars" .=) <$> _dExemplars,
("range" .=) <$> _dRange,
("bucketOptions" .=) <$> _dBucketOptions])
data Field =
Field'
{ _fKind :: !(Maybe FieldKind)
, _fOneofIndex :: !(Maybe (Textual Int32))
, _fName :: !(Maybe Text)
, _fJSONName :: !(Maybe Text)
, _fCardinality :: !(Maybe FieldCardinality)
, _fOptions :: !(Maybe [Option])
, _fPacked :: !(Maybe Bool)
, _fDefaultValue :: !(Maybe Text)
, _fNumber :: !(Maybe (Textual Int32))
, _fTypeURL :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
field
:: Field
field =
Field'
{ _fKind = Nothing
, _fOneofIndex = Nothing
, _fName = Nothing
, _fJSONName = Nothing
, _fCardinality = Nothing
, _fOptions = Nothing
, _fPacked = Nothing
, _fDefaultValue = Nothing
, _fNumber = Nothing
, _fTypeURL = Nothing
}
fKind :: Lens' Field (Maybe FieldKind)
fKind = lens _fKind (\ s a -> s{_fKind = a})
fOneofIndex :: Lens' Field (Maybe Int32)
fOneofIndex
= lens _fOneofIndex (\ s a -> s{_fOneofIndex = a}) .
mapping _Coerce
fName :: Lens' Field (Maybe Text)
fName = lens _fName (\ s a -> s{_fName = a})
fJSONName :: Lens' Field (Maybe Text)
fJSONName
= lens _fJSONName (\ s a -> s{_fJSONName = a})
fCardinality :: Lens' Field (Maybe FieldCardinality)
fCardinality
= lens _fCardinality (\ s a -> s{_fCardinality = a})
fOptions :: Lens' Field [Option]
fOptions
= lens _fOptions (\ s a -> s{_fOptions = a}) .
_Default
. _Coerce
fPacked :: Lens' Field (Maybe Bool)
fPacked = lens _fPacked (\ s a -> s{_fPacked = a})
fDefaultValue :: Lens' Field (Maybe Text)
fDefaultValue
= lens _fDefaultValue
(\ s a -> s{_fDefaultValue = a})
fNumber :: Lens' Field (Maybe Int32)
fNumber
= lens _fNumber (\ s a -> s{_fNumber = a}) .
mapping _Coerce
fTypeURL :: Lens' Field (Maybe Text)
fTypeURL = lens _fTypeURL (\ s a -> s{_fTypeURL = a})
instance FromJSON Field where
parseJSON
= withObject "Field"
(\ o ->
Field' <$>
(o .:? "kind") <*> (o .:? "oneofIndex") <*>
(o .:? "name")
<*> (o .:? "jsonName")
<*> (o .:? "cardinality")
<*> (o .:? "options" .!= mempty)
<*> (o .:? "packed")
<*> (o .:? "defaultValue")
<*> (o .:? "number")
<*> (o .:? "typeUrl"))
instance ToJSON Field where
toJSON Field'{..}
= object
(catMaybes
[("kind" .=) <$> _fKind,
("oneofIndex" .=) <$> _fOneofIndex,
("name" .=) <$> _fName,
("jsonName" .=) <$> _fJSONName,
("cardinality" .=) <$> _fCardinality,
("options" .=) <$> _fOptions,
("packed" .=) <$> _fPacked,
("defaultValue" .=) <$> _fDefaultValue,
("number" .=) <$> _fNumber,
("typeUrl" .=) <$> _fTypeURL])
newtype ExemplarAttachmentsItem =
ExemplarAttachmentsItem'
{ _eaiAddtional :: HashMap Text JSONValue
}
deriving (Eq, Show, Data, Typeable, Generic)
exemplarAttachmentsItem
:: HashMap Text JSONValue
-> ExemplarAttachmentsItem
exemplarAttachmentsItem pEaiAddtional_ =
ExemplarAttachmentsItem' {_eaiAddtional = _Coerce # pEaiAddtional_}
eaiAddtional :: Lens' ExemplarAttachmentsItem (HashMap Text JSONValue)
eaiAddtional
= lens _eaiAddtional (\ s a -> s{_eaiAddtional = a})
. _Coerce
instance FromJSON ExemplarAttachmentsItem where
parseJSON
= withObject "ExemplarAttachmentsItem"
(\ o ->
ExemplarAttachmentsItem' <$> (parseJSONObject o))
instance ToJSON ExemplarAttachmentsItem where
toJSON = toJSON . _eaiAddtional
data NotificationChannelDescriptor =
NotificationChannelDescriptor'
{ _ncdName :: !(Maybe Text)
, _ncdSupportedTiers :: !(Maybe [Text])
, _ncdDisplayName :: !(Maybe Text)
, _ncdLabels :: !(Maybe [LabelDescriptor])
, _ncdType :: !(Maybe Text)
, _ncdDescription :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
notificationChannelDescriptor
:: NotificationChannelDescriptor
notificationChannelDescriptor =
NotificationChannelDescriptor'
{ _ncdName = Nothing
, _ncdSupportedTiers = Nothing
, _ncdDisplayName = Nothing
, _ncdLabels = Nothing
, _ncdType = Nothing
, _ncdDescription = Nothing
}
ncdName :: Lens' NotificationChannelDescriptor (Maybe Text)
ncdName = lens _ncdName (\ s a -> s{_ncdName = a})
ncdSupportedTiers :: Lens' NotificationChannelDescriptor [Text]
ncdSupportedTiers
= lens _ncdSupportedTiers
(\ s a -> s{_ncdSupportedTiers = a})
. _Default
. _Coerce
ncdDisplayName :: Lens' NotificationChannelDescriptor (Maybe Text)
ncdDisplayName
= lens _ncdDisplayName
(\ s a -> s{_ncdDisplayName = a})
ncdLabels :: Lens' NotificationChannelDescriptor [LabelDescriptor]
ncdLabels
= lens _ncdLabels (\ s a -> s{_ncdLabels = a}) .
_Default
. _Coerce
ncdType :: Lens' NotificationChannelDescriptor (Maybe Text)
ncdType = lens _ncdType (\ s a -> s{_ncdType = a})
ncdDescription :: Lens' NotificationChannelDescriptor (Maybe Text)
ncdDescription
= lens _ncdDescription
(\ s a -> s{_ncdDescription = a})
instance FromJSON NotificationChannelDescriptor where
parseJSON
= withObject "NotificationChannelDescriptor"
(\ o ->
NotificationChannelDescriptor' <$>
(o .:? "name") <*>
(o .:? "supportedTiers" .!= mempty)
<*> (o .:? "displayName")
<*> (o .:? "labels" .!= mempty)
<*> (o .:? "type")
<*> (o .:? "description"))
instance ToJSON NotificationChannelDescriptor where
toJSON NotificationChannelDescriptor'{..}
= object
(catMaybes
[("name" .=) <$> _ncdName,
("supportedTiers" .=) <$> _ncdSupportedTiers,
("displayName" .=) <$> _ncdDisplayName,
("labels" .=) <$> _ncdLabels,
("type" .=) <$> _ncdType,
("description" .=) <$> _ncdDescription])
data Empty =
Empty'
deriving (Eq, Show, Data, Typeable, Generic)
empty
:: Empty
empty = Empty'
instance FromJSON Empty where
parseJSON = withObject "Empty" (\ o -> pure Empty')
instance ToJSON Empty where
toJSON = const emptyObject
data ListGroupsResponse =
ListGroupsResponse'
{ _lgrNextPageToken :: !(Maybe Text)
, _lgrGroup :: !(Maybe [Group])
}
deriving (Eq, Show, Data, Typeable, Generic)
listGroupsResponse
:: ListGroupsResponse
listGroupsResponse =
ListGroupsResponse' {_lgrNextPageToken = Nothing, _lgrGroup = Nothing}
lgrNextPageToken :: Lens' ListGroupsResponse (Maybe Text)
lgrNextPageToken
= lens _lgrNextPageToken
(\ s a -> s{_lgrNextPageToken = a})
lgrGroup :: Lens' ListGroupsResponse [Group]
lgrGroup
= lens _lgrGroup (\ s a -> s{_lgrGroup = a}) .
_Default
. _Coerce
instance FromJSON ListGroupsResponse where
parseJSON
= withObject "ListGroupsResponse"
(\ o ->
ListGroupsResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "group" .!= mempty))
instance ToJSON ListGroupsResponse where
toJSON ListGroupsResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lgrNextPageToken,
("group" .=) <$> _lgrGroup])
data ListMetricDescriptorsResponse =
ListMetricDescriptorsResponse'
{ _lmdrMetricDescriptors :: !(Maybe [MetricDescriptor])
, _lmdrNextPageToken :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
listMetricDescriptorsResponse
:: ListMetricDescriptorsResponse
listMetricDescriptorsResponse =
ListMetricDescriptorsResponse'
{_lmdrMetricDescriptors = Nothing, _lmdrNextPageToken = Nothing}
lmdrMetricDescriptors :: Lens' ListMetricDescriptorsResponse [MetricDescriptor]
lmdrMetricDescriptors
= lens _lmdrMetricDescriptors
(\ s a -> s{_lmdrMetricDescriptors = a})
. _Default
. _Coerce
lmdrNextPageToken :: Lens' ListMetricDescriptorsResponse (Maybe Text)
lmdrNextPageToken
= lens _lmdrNextPageToken
(\ s a -> s{_lmdrNextPageToken = a})
instance FromJSON ListMetricDescriptorsResponse where
parseJSON
= withObject "ListMetricDescriptorsResponse"
(\ o ->
ListMetricDescriptorsResponse' <$>
(o .:? "metricDescriptors" .!= mempty) <*>
(o .:? "nextPageToken"))
instance ToJSON ListMetricDescriptorsResponse where
toJSON ListMetricDescriptorsResponse'{..}
= object
(catMaybes
[("metricDescriptors" .=) <$> _lmdrMetricDescriptors,
("nextPageToken" .=) <$> _lmdrNextPageToken])
newtype VerifyNotificationChannelRequest =
VerifyNotificationChannelRequest'
{ _vncrCode :: Maybe Text
}
deriving (Eq, Show, Data, Typeable, Generic)
verifyNotificationChannelRequest
:: VerifyNotificationChannelRequest
verifyNotificationChannelRequest =
VerifyNotificationChannelRequest' {_vncrCode = Nothing}
vncrCode :: Lens' VerifyNotificationChannelRequest (Maybe Text)
vncrCode = lens _vncrCode (\ s a -> s{_vncrCode = a})
instance FromJSON VerifyNotificationChannelRequest
where
parseJSON
= withObject "VerifyNotificationChannelRequest"
(\ o ->
VerifyNotificationChannelRequest' <$> (o .:? "code"))
instance ToJSON VerifyNotificationChannelRequest
where
toJSON VerifyNotificationChannelRequest'{..}
= object (catMaybes [("code" .=) <$> _vncrCode])
newtype OptionValue =
OptionValue'
{ _ovAddtional :: HashMap Text JSONValue
}
deriving (Eq, Show, Data, Typeable, Generic)
optionValue
:: HashMap Text JSONValue
-> OptionValue
optionValue pOvAddtional_ =
OptionValue' {_ovAddtional = _Coerce # pOvAddtional_}
ovAddtional :: Lens' OptionValue (HashMap Text JSONValue)
ovAddtional
= lens _ovAddtional (\ s a -> s{_ovAddtional = a}) .
_Coerce
instance FromJSON OptionValue where
parseJSON
= withObject "OptionValue"
(\ o -> OptionValue' <$> (parseJSONObject o))
instance ToJSON OptionValue where
toJSON = toJSON . _ovAddtional
newtype NotificationChannelLabels =
NotificationChannelLabels'
{ _nclAddtional :: HashMap Text Text
}
deriving (Eq, Show, Data, Typeable, Generic)
notificationChannelLabels
:: HashMap Text Text
-> NotificationChannelLabels
notificationChannelLabels pNclAddtional_ =
NotificationChannelLabels' {_nclAddtional = _Coerce # pNclAddtional_}
nclAddtional :: Lens' NotificationChannelLabels (HashMap Text Text)
nclAddtional
= lens _nclAddtional (\ s a -> s{_nclAddtional = a})
. _Coerce
instance FromJSON NotificationChannelLabels where
parseJSON
= withObject "NotificationChannelLabels"
(\ o ->
NotificationChannelLabels' <$> (parseJSONObject o))
instance ToJSON NotificationChannelLabels where
toJSON = toJSON . _nclAddtional
newtype CreateTimeSeriesRequest =
CreateTimeSeriesRequest'
{ _ctsrTimeSeries :: Maybe [TimeSeries]
}
deriving (Eq, Show, Data, Typeable, Generic)
createTimeSeriesRequest
:: CreateTimeSeriesRequest
createTimeSeriesRequest = CreateTimeSeriesRequest' {_ctsrTimeSeries = Nothing}
ctsrTimeSeries :: Lens' CreateTimeSeriesRequest [TimeSeries]
ctsrTimeSeries
= lens _ctsrTimeSeries
(\ s a -> s{_ctsrTimeSeries = a})
. _Default
. _Coerce
instance FromJSON CreateTimeSeriesRequest where
parseJSON
= withObject "CreateTimeSeriesRequest"
(\ o ->
CreateTimeSeriesRequest' <$>
(o .:? "timeSeries" .!= mempty))
instance ToJSON CreateTimeSeriesRequest where
toJSON CreateTimeSeriesRequest'{..}
= object
(catMaybes [("timeSeries" .=) <$> _ctsrTimeSeries])
newtype DroppedLabelsLabel =
DroppedLabelsLabel'
{ _dllAddtional :: HashMap Text Text
}
deriving (Eq, Show, Data, Typeable, Generic)
droppedLabelsLabel
:: HashMap Text Text
-> DroppedLabelsLabel
droppedLabelsLabel pDllAddtional_ =
DroppedLabelsLabel' {_dllAddtional = _Coerce # pDllAddtional_}
dllAddtional :: Lens' DroppedLabelsLabel (HashMap Text Text)
dllAddtional
= lens _dllAddtional (\ s a -> s{_dllAddtional = a})
. _Coerce
instance FromJSON DroppedLabelsLabel where
parseJSON
= withObject "DroppedLabelsLabel"
(\ o -> DroppedLabelsLabel' <$> (parseJSONObject o))
instance ToJSON DroppedLabelsLabel where
toJSON = toJSON . _dllAddtional
data MetricThreshold =
MetricThreshold'
{ _mtThresholdValue :: !(Maybe (Textual Double))
, _mtAggregations :: !(Maybe [Aggregation])
, _mtDenominatorAggregations :: !(Maybe [Aggregation])
, _mtComparison :: !(Maybe MetricThresholdComparison)
, _mtDenominatorFilter :: !(Maybe Text)
, _mtFilter :: !(Maybe Text)
, _mtTrigger :: !(Maybe Trigger)
, _mtDuration :: !(Maybe GDuration)
}
deriving (Eq, Show, Data, Typeable, Generic)
metricThreshold
:: MetricThreshold
metricThreshold =
MetricThreshold'
{ _mtThresholdValue = Nothing
, _mtAggregations = Nothing
, _mtDenominatorAggregations = Nothing
, _mtComparison = Nothing
, _mtDenominatorFilter = Nothing
, _mtFilter = Nothing
, _mtTrigger = Nothing
, _mtDuration = Nothing
}
mtThresholdValue :: Lens' MetricThreshold (Maybe Double)
mtThresholdValue
= lens _mtThresholdValue
(\ s a -> s{_mtThresholdValue = a})
. mapping _Coerce
mtAggregations :: Lens' MetricThreshold [Aggregation]
mtAggregations
= lens _mtAggregations
(\ s a -> s{_mtAggregations = a})
. _Default
. _Coerce
mtDenominatorAggregations :: Lens' MetricThreshold [Aggregation]
mtDenominatorAggregations
= lens _mtDenominatorAggregations
(\ s a -> s{_mtDenominatorAggregations = a})
. _Default
. _Coerce
mtComparison :: Lens' MetricThreshold (Maybe MetricThresholdComparison)
mtComparison
= lens _mtComparison (\ s a -> s{_mtComparison = a})
mtDenominatorFilter :: Lens' MetricThreshold (Maybe Text)
mtDenominatorFilter
= lens _mtDenominatorFilter
(\ s a -> s{_mtDenominatorFilter = a})
mtFilter :: Lens' MetricThreshold (Maybe Text)
mtFilter = lens _mtFilter (\ s a -> s{_mtFilter = a})
mtTrigger :: Lens' MetricThreshold (Maybe Trigger)
mtTrigger
= lens _mtTrigger (\ s a -> s{_mtTrigger = a})
mtDuration :: Lens' MetricThreshold (Maybe Scientific)
mtDuration
= lens _mtDuration (\ s a -> s{_mtDuration = a}) .
mapping _GDuration
instance FromJSON MetricThreshold where
parseJSON
= withObject "MetricThreshold"
(\ o ->
MetricThreshold' <$>
(o .:? "thresholdValue") <*>
(o .:? "aggregations" .!= mempty)
<*> (o .:? "denominatorAggregations" .!= mempty)
<*> (o .:? "comparison")
<*> (o .:? "denominatorFilter")
<*> (o .:? "filter")
<*> (o .:? "trigger")
<*> (o .:? "duration"))
instance ToJSON MetricThreshold where
toJSON MetricThreshold'{..}
= object
(catMaybes
[("thresholdValue" .=) <$> _mtThresholdValue,
("aggregations" .=) <$> _mtAggregations,
("denominatorAggregations" .=) <$>
_mtDenominatorAggregations,
("comparison" .=) <$> _mtComparison,
("denominatorFilter" .=) <$> _mtDenominatorFilter,
("filter" .=) <$> _mtFilter,
("trigger" .=) <$> _mtTrigger,
("duration" .=) <$> _mtDuration])
newtype SpanContext =
SpanContext'
{ _scSpanName :: Maybe Text
}
deriving (Eq, Show, Data, Typeable, Generic)
spanContext
:: SpanContext
spanContext = SpanContext' {_scSpanName = Nothing}
scSpanName :: Lens' SpanContext (Maybe Text)
scSpanName
= lens _scSpanName (\ s a -> s{_scSpanName = a})
instance FromJSON SpanContext where
parseJSON
= withObject "SpanContext"
(\ o -> SpanContext' <$> (o .:? "spanName"))
instance ToJSON SpanContext where
toJSON SpanContext'{..}
= object
(catMaybes [("spanName" .=) <$> _scSpanName])
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
newtype MonitoredResourceMetadataUserLabels =
MonitoredResourceMetadataUserLabels'
{ _mrmulAddtional :: HashMap Text Text
}
deriving (Eq, Show, Data, Typeable, Generic)
monitoredResourceMetadataUserLabels
:: HashMap Text Text
-> MonitoredResourceMetadataUserLabels
monitoredResourceMetadataUserLabels pMrmulAddtional_ =
MonitoredResourceMetadataUserLabels'
{_mrmulAddtional = _Coerce # pMrmulAddtional_}
mrmulAddtional :: Lens' MonitoredResourceMetadataUserLabels (HashMap Text Text)
mrmulAddtional
= lens _mrmulAddtional
(\ s a -> s{_mrmulAddtional = a})
. _Coerce
instance FromJSON MonitoredResourceMetadataUserLabels
where
parseJSON
= withObject "MonitoredResourceMetadataUserLabels"
(\ o ->
MonitoredResourceMetadataUserLabels' <$>
(parseJSONObject o))
instance ToJSON MonitoredResourceMetadataUserLabels
where
toJSON = toJSON . _mrmulAddtional
data InternalChecker =
InternalChecker'
{ _icState :: !(Maybe InternalCheckerState)
, _icNetwork :: !(Maybe Text)
, _icName :: !(Maybe Text)
, _icPeerProjectId :: !(Maybe Text)
, _icGcpZone :: !(Maybe Text)
, _icDisplayName :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
internalChecker
:: InternalChecker
internalChecker =
InternalChecker'
{ _icState = Nothing
, _icNetwork = Nothing
, _icName = Nothing
, _icPeerProjectId = Nothing
, _icGcpZone = Nothing
, _icDisplayName = Nothing
}
icState :: Lens' InternalChecker (Maybe InternalCheckerState)
icState = lens _icState (\ s a -> s{_icState = a})
icNetwork :: Lens' InternalChecker (Maybe Text)
icNetwork
= lens _icNetwork (\ s a -> s{_icNetwork = a})
icName :: Lens' InternalChecker (Maybe Text)
icName = lens _icName (\ s a -> s{_icName = a})
icPeerProjectId :: Lens' InternalChecker (Maybe Text)
icPeerProjectId
= lens _icPeerProjectId
(\ s a -> s{_icPeerProjectId = a})
icGcpZone :: Lens' InternalChecker (Maybe Text)
icGcpZone
= lens _icGcpZone (\ s a -> s{_icGcpZone = a})
icDisplayName :: Lens' InternalChecker (Maybe Text)
icDisplayName
= lens _icDisplayName
(\ s a -> s{_icDisplayName = a})
instance FromJSON InternalChecker where
parseJSON
= withObject "InternalChecker"
(\ o ->
InternalChecker' <$>
(o .:? "state") <*> (o .:? "network") <*>
(o .:? "name")
<*> (o .:? "peerProjectId")
<*> (o .:? "gcpZone")
<*> (o .:? "displayName"))
instance ToJSON InternalChecker where
toJSON InternalChecker'{..}
= object
(catMaybes
[("state" .=) <$> _icState,
("network" .=) <$> _icNetwork,
("name" .=) <$> _icName,
("peerProjectId" .=) <$> _icPeerProjectId,
("gcpZone" .=) <$> _icGcpZone,
("displayName" .=) <$> _icDisplayName])
data NotificationChannel =
NotificationChannel'
{ _ncEnabled :: !(Maybe Bool)
, _ncUserLabels :: !(Maybe NotificationChannelUserLabels)
, _ncName :: !(Maybe Text)
, _ncDisplayName :: !(Maybe Text)
, _ncVerificationStatus :: !(Maybe NotificationChannelVerificationStatus)
, _ncLabels :: !(Maybe NotificationChannelLabels)
, _ncType :: !(Maybe Text)
, _ncDescription :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
notificationChannel
:: NotificationChannel
notificationChannel =
NotificationChannel'
{ _ncEnabled = Nothing
, _ncUserLabels = Nothing
, _ncName = Nothing
, _ncDisplayName = Nothing
, _ncVerificationStatus = Nothing
, _ncLabels = Nothing
, _ncType = Nothing
, _ncDescription = Nothing
}
ncEnabled :: Lens' NotificationChannel (Maybe Bool)
ncEnabled
= lens _ncEnabled (\ s a -> s{_ncEnabled = a})
ncUserLabels :: Lens' NotificationChannel (Maybe NotificationChannelUserLabels)
ncUserLabels
= lens _ncUserLabels (\ s a -> s{_ncUserLabels = a})
ncName :: Lens' NotificationChannel (Maybe Text)
ncName = lens _ncName (\ s a -> s{_ncName = a})
ncDisplayName :: Lens' NotificationChannel (Maybe Text)
ncDisplayName
= lens _ncDisplayName
(\ s a -> s{_ncDisplayName = a})
ncVerificationStatus :: Lens' NotificationChannel (Maybe NotificationChannelVerificationStatus)
ncVerificationStatus
= lens _ncVerificationStatus
(\ s a -> s{_ncVerificationStatus = a})
ncLabels :: Lens' NotificationChannel (Maybe NotificationChannelLabels)
ncLabels = lens _ncLabels (\ s a -> s{_ncLabels = a})
ncType :: Lens' NotificationChannel (Maybe Text)
ncType = lens _ncType (\ s a -> s{_ncType = a})
ncDescription :: Lens' NotificationChannel (Maybe Text)
ncDescription
= lens _ncDescription
(\ s a -> s{_ncDescription = a})
instance FromJSON NotificationChannel where
parseJSON
= withObject "NotificationChannel"
(\ o ->
NotificationChannel' <$>
(o .:? "enabled") <*> (o .:? "userLabels") <*>
(o .:? "name")
<*> (o .:? "displayName")
<*> (o .:? "verificationStatus")
<*> (o .:? "labels")
<*> (o .:? "type")
<*> (o .:? "description"))
instance ToJSON NotificationChannel where
toJSON NotificationChannel'{..}
= object
(catMaybes
[("enabled" .=) <$> _ncEnabled,
("userLabels" .=) <$> _ncUserLabels,
("name" .=) <$> _ncName,
("displayName" .=) <$> _ncDisplayName,
("verificationStatus" .=) <$> _ncVerificationStatus,
("labels" .=) <$> _ncLabels, ("type" .=) <$> _ncType,
("description" .=) <$> _ncDescription])
data ListMonitoredResourceDescriptorsResponse =
ListMonitoredResourceDescriptorsResponse'
{ _lmrdrNextPageToken :: !(Maybe Text)
, _lmrdrResourceDescriptors :: !(Maybe [MonitoredResourceDescriptor])
}
deriving (Eq, Show, Data, Typeable, Generic)
listMonitoredResourceDescriptorsResponse
:: ListMonitoredResourceDescriptorsResponse
listMonitoredResourceDescriptorsResponse =
ListMonitoredResourceDescriptorsResponse'
{_lmrdrNextPageToken = Nothing, _lmrdrResourceDescriptors = Nothing}
lmrdrNextPageToken :: Lens' ListMonitoredResourceDescriptorsResponse (Maybe Text)
lmrdrNextPageToken
= lens _lmrdrNextPageToken
(\ s a -> s{_lmrdrNextPageToken = a})
lmrdrResourceDescriptors :: Lens' ListMonitoredResourceDescriptorsResponse [MonitoredResourceDescriptor]
lmrdrResourceDescriptors
= lens _lmrdrResourceDescriptors
(\ s a -> s{_lmrdrResourceDescriptors = a})
. _Default
. _Coerce
instance FromJSON
ListMonitoredResourceDescriptorsResponse
where
parseJSON
= withObject
"ListMonitoredResourceDescriptorsResponse"
(\ o ->
ListMonitoredResourceDescriptorsResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "resourceDescriptors" .!= mempty))
instance ToJSON
ListMonitoredResourceDescriptorsResponse
where
toJSON ListMonitoredResourceDescriptorsResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lmrdrNextPageToken,
("resourceDescriptors" .=) <$>
_lmrdrResourceDescriptors])
newtype Explicit =
Explicit'
{ _eBounds :: Maybe [Textual Double]
}
deriving (Eq, Show, Data, Typeable, Generic)
explicit
:: Explicit
explicit = Explicit' {_eBounds = Nothing}
eBounds :: Lens' Explicit [Double]
eBounds
= lens _eBounds (\ s a -> s{_eBounds = a}) . _Default
. _Coerce
instance FromJSON Explicit where
parseJSON
= withObject "Explicit"
(\ o -> Explicit' <$> (o .:? "bounds" .!= mempty))
instance ToJSON Explicit where
toJSON Explicit'{..}
= object (catMaybes [("bounds" .=) <$> _eBounds])
newtype MetricLabels =
MetricLabels'
{ _mlAddtional :: HashMap Text Text
}
deriving (Eq, Show, Data, Typeable, Generic)
metricLabels
:: HashMap Text Text
-> MetricLabels
metricLabels pMlAddtional_ =
MetricLabels' {_mlAddtional = _Coerce # pMlAddtional_}
mlAddtional :: Lens' MetricLabels (HashMap Text Text)
mlAddtional
= lens _mlAddtional (\ s a -> s{_mlAddtional = a}) .
_Coerce
instance FromJSON MetricLabels where
parseJSON
= withObject "MetricLabels"
(\ o -> MetricLabels' <$> (parseJSONObject o))
instance ToJSON MetricLabels where
toJSON = toJSON . _mlAddtional
newtype CollectdPayloadMetadata =
CollectdPayloadMetadata'
{ _cpmAddtional :: HashMap Text TypedValue
}
deriving (Eq, Show, Data, Typeable, Generic)
collectdPayloadMetadata
:: HashMap Text TypedValue
-> CollectdPayloadMetadata
collectdPayloadMetadata pCpmAddtional_ =
CollectdPayloadMetadata' {_cpmAddtional = _Coerce # pCpmAddtional_}
cpmAddtional :: Lens' CollectdPayloadMetadata (HashMap Text TypedValue)
cpmAddtional
= lens _cpmAddtional (\ s a -> s{_cpmAddtional = a})
. _Coerce
instance FromJSON CollectdPayloadMetadata where
parseJSON
= withObject "CollectdPayloadMetadata"
(\ o ->
CollectdPayloadMetadata' <$> (parseJSONObject o))
instance ToJSON CollectdPayloadMetadata where
toJSON = toJSON . _cpmAddtional
data CollectdValue =
CollectdValue'
{ _cvDataSourceName :: !(Maybe Text)
, _cvDataSourceType :: !(Maybe CollectdValueDataSourceType)
, _cvValue :: !(Maybe TypedValue)
}
deriving (Eq, Show, Data, Typeable, Generic)
collectdValue
:: CollectdValue
collectdValue =
CollectdValue'
{ _cvDataSourceName = Nothing
, _cvDataSourceType = Nothing
, _cvValue = Nothing
}
cvDataSourceName :: Lens' CollectdValue (Maybe Text)
cvDataSourceName
= lens _cvDataSourceName
(\ s a -> s{_cvDataSourceName = a})
cvDataSourceType :: Lens' CollectdValue (Maybe CollectdValueDataSourceType)
cvDataSourceType
= lens _cvDataSourceType
(\ s a -> s{_cvDataSourceType = a})
cvValue :: Lens' CollectdValue (Maybe TypedValue)
cvValue = lens _cvValue (\ s a -> s{_cvValue = a})
instance FromJSON CollectdValue where
parseJSON
= withObject "CollectdValue"
(\ o ->
CollectdValue' <$>
(o .:? "dataSourceName") <*> (o .:? "dataSourceType")
<*> (o .:? "value"))
instance ToJSON CollectdValue where
toJSON CollectdValue'{..}
= object
(catMaybes
[("dataSourceName" .=) <$> _cvDataSourceName,
("dataSourceType" .=) <$> _cvDataSourceType,
("value" .=) <$> _cvValue])
data CreateCollectdTimeSeriesRequest =
CreateCollectdTimeSeriesRequest'
{ _cctsrCollectdPayloads :: !(Maybe [CollectdPayload])
, _cctsrResource :: !(Maybe MonitoredResource)
, _cctsrCollectdVersion :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
createCollectdTimeSeriesRequest
:: CreateCollectdTimeSeriesRequest
createCollectdTimeSeriesRequest =
CreateCollectdTimeSeriesRequest'
{ _cctsrCollectdPayloads = Nothing
, _cctsrResource = Nothing
, _cctsrCollectdVersion = Nothing
}
cctsrCollectdPayloads :: Lens' CreateCollectdTimeSeriesRequest [CollectdPayload]
cctsrCollectdPayloads
= lens _cctsrCollectdPayloads
(\ s a -> s{_cctsrCollectdPayloads = a})
. _Default
. _Coerce
cctsrResource :: Lens' CreateCollectdTimeSeriesRequest (Maybe MonitoredResource)
cctsrResource
= lens _cctsrResource
(\ s a -> s{_cctsrResource = a})
cctsrCollectdVersion :: Lens' CreateCollectdTimeSeriesRequest (Maybe Text)
cctsrCollectdVersion
= lens _cctsrCollectdVersion
(\ s a -> s{_cctsrCollectdVersion = a})
instance FromJSON CreateCollectdTimeSeriesRequest
where
parseJSON
= withObject "CreateCollectdTimeSeriesRequest"
(\ o ->
CreateCollectdTimeSeriesRequest' <$>
(o .:? "collectdPayloads" .!= mempty) <*>
(o .:? "resource")
<*> (o .:? "collectdVersion"))
instance ToJSON CreateCollectdTimeSeriesRequest where
toJSON CreateCollectdTimeSeriesRequest'{..}
= object
(catMaybes
[("collectdPayloads" .=) <$> _cctsrCollectdPayloads,
("resource" .=) <$> _cctsrResource,
("collectdVersion" .=) <$> _cctsrCollectdVersion])
data Aggregation =
Aggregation'
{ _aPerSeriesAligner :: !(Maybe AggregationPerSeriesAligner)
, _aCrossSeriesReducer :: !(Maybe AggregationCrossSeriesReducer)
, _aAlignmentPeriod :: !(Maybe GDuration)
, _aGroupByFields :: !(Maybe [Text])
}
deriving (Eq, Show, Data, Typeable, Generic)
aggregation
:: Aggregation
aggregation =
Aggregation'
{ _aPerSeriesAligner = Nothing
, _aCrossSeriesReducer = Nothing
, _aAlignmentPeriod = Nothing
, _aGroupByFields = Nothing
}
aPerSeriesAligner :: Lens' Aggregation (Maybe AggregationPerSeriesAligner)
aPerSeriesAligner
= lens _aPerSeriesAligner
(\ s a -> s{_aPerSeriesAligner = a})
aCrossSeriesReducer :: Lens' Aggregation (Maybe AggregationCrossSeriesReducer)
aCrossSeriesReducer
= lens _aCrossSeriesReducer
(\ s a -> s{_aCrossSeriesReducer = a})
aAlignmentPeriod :: Lens' Aggregation (Maybe Scientific)
aAlignmentPeriod
= lens _aAlignmentPeriod
(\ s a -> s{_aAlignmentPeriod = a})
. mapping _GDuration
aGroupByFields :: Lens' Aggregation [Text]
aGroupByFields
= lens _aGroupByFields
(\ s a -> s{_aGroupByFields = a})
. _Default
. _Coerce
instance FromJSON Aggregation where
parseJSON
= withObject "Aggregation"
(\ o ->
Aggregation' <$>
(o .:? "perSeriesAligner") <*>
(o .:? "crossSeriesReducer")
<*> (o .:? "alignmentPeriod")
<*> (o .:? "groupByFields" .!= mempty))
instance ToJSON Aggregation where
toJSON Aggregation'{..}
= object
(catMaybes
[("perSeriesAligner" .=) <$> _aPerSeriesAligner,
("crossSeriesReducer" .=) <$> _aCrossSeriesReducer,
("alignmentPeriod" .=) <$> _aAlignmentPeriod,
("groupByFields" .=) <$> _aGroupByFields])
data UptimeCheckConfig =
UptimeCheckConfig'
{ _uccInternalCheckers :: !(Maybe [InternalChecker])
, _uccPeriod :: !(Maybe GDuration)
, _uccContentMatchers :: !(Maybe [ContentMatcher])
, _uccName :: !(Maybe Text)
, _uccMonitoredResource :: !(Maybe MonitoredResource)
, _uccSelectedRegions :: !(Maybe [Text])
, _uccDisplayName :: !(Maybe Text)
, _uccResourceGroup :: !(Maybe ResourceGroup)
, _uccTimeout :: !(Maybe GDuration)
, _uccHTTPCheck :: !(Maybe HTTPCheck)
, _uccTCPCheck :: !(Maybe TCPCheck)
}
deriving (Eq, Show, Data, Typeable, Generic)
uptimeCheckConfig
:: UptimeCheckConfig
uptimeCheckConfig =
UptimeCheckConfig'
{ _uccInternalCheckers = Nothing
, _uccPeriod = Nothing
, _uccContentMatchers = Nothing
, _uccName = Nothing
, _uccMonitoredResource = Nothing
, _uccSelectedRegions = Nothing
, _uccDisplayName = Nothing
, _uccResourceGroup = Nothing
, _uccTimeout = Nothing
, _uccHTTPCheck = Nothing
, _uccTCPCheck = Nothing
}
uccInternalCheckers :: Lens' UptimeCheckConfig [InternalChecker]
uccInternalCheckers
= lens _uccInternalCheckers
(\ s a -> s{_uccInternalCheckers = a})
. _Default
. _Coerce
uccPeriod :: Lens' UptimeCheckConfig (Maybe Scientific)
uccPeriod
= lens _uccPeriod (\ s a -> s{_uccPeriod = a}) .
mapping _GDuration
uccContentMatchers :: Lens' UptimeCheckConfig [ContentMatcher]
uccContentMatchers
= lens _uccContentMatchers
(\ s a -> s{_uccContentMatchers = a})
. _Default
. _Coerce
uccName :: Lens' UptimeCheckConfig (Maybe Text)
uccName = lens _uccName (\ s a -> s{_uccName = a})
uccMonitoredResource :: Lens' UptimeCheckConfig (Maybe MonitoredResource)
uccMonitoredResource
= lens _uccMonitoredResource
(\ s a -> s{_uccMonitoredResource = a})
uccSelectedRegions :: Lens' UptimeCheckConfig [Text]
uccSelectedRegions
= lens _uccSelectedRegions
(\ s a -> s{_uccSelectedRegions = a})
. _Default
. _Coerce
uccDisplayName :: Lens' UptimeCheckConfig (Maybe Text)
uccDisplayName
= lens _uccDisplayName
(\ s a -> s{_uccDisplayName = a})
uccResourceGroup :: Lens' UptimeCheckConfig (Maybe ResourceGroup)
uccResourceGroup
= lens _uccResourceGroup
(\ s a -> s{_uccResourceGroup = a})
uccTimeout :: Lens' UptimeCheckConfig (Maybe Scientific)
uccTimeout
= lens _uccTimeout (\ s a -> s{_uccTimeout = a}) .
mapping _GDuration
uccHTTPCheck :: Lens' UptimeCheckConfig (Maybe HTTPCheck)
uccHTTPCheck
= lens _uccHTTPCheck (\ s a -> s{_uccHTTPCheck = a})
uccTCPCheck :: Lens' UptimeCheckConfig (Maybe TCPCheck)
uccTCPCheck
= lens _uccTCPCheck (\ s a -> s{_uccTCPCheck = a})
instance FromJSON UptimeCheckConfig where
parseJSON
= withObject "UptimeCheckConfig"
(\ o ->
UptimeCheckConfig' <$>
(o .:? "internalCheckers" .!= mempty) <*>
(o .:? "period")
<*> (o .:? "contentMatchers" .!= mempty)
<*> (o .:? "name")
<*> (o .:? "monitoredResource")
<*> (o .:? "selectedRegions" .!= mempty)
<*> (o .:? "displayName")
<*> (o .:? "resourceGroup")
<*> (o .:? "timeout")
<*> (o .:? "httpCheck")
<*> (o .:? "tcpCheck"))
instance ToJSON UptimeCheckConfig where
toJSON UptimeCheckConfig'{..}
= object
(catMaybes
[("internalCheckers" .=) <$> _uccInternalCheckers,
("period" .=) <$> _uccPeriod,
("contentMatchers" .=) <$> _uccContentMatchers,
("name" .=) <$> _uccName,
("monitoredResource" .=) <$> _uccMonitoredResource,
("selectedRegions" .=) <$> _uccSelectedRegions,
("displayName" .=) <$> _uccDisplayName,
("resourceGroup" .=) <$> _uccResourceGroup,
("timeout" .=) <$> _uccTimeout,
("httpCheck" .=) <$> _uccHTTPCheck,
("tcpCheck" .=) <$> _uccTCPCheck])
data Point =
Point'
{ _pValue :: !(Maybe TypedValue)
, _pInterval :: !(Maybe TimeInterval)
}
deriving (Eq, Show, Data, Typeable, Generic)
point
:: Point
point = Point' {_pValue = Nothing, _pInterval = Nothing}
pValue :: Lens' Point (Maybe TypedValue)
pValue = lens _pValue (\ s a -> s{_pValue = a})
pInterval :: Lens' Point (Maybe TimeInterval)
pInterval
= lens _pInterval (\ s a -> s{_pInterval = a})
instance FromJSON Point where
parseJSON
= withObject "Point"
(\ o ->
Point' <$> (o .:? "value") <*> (o .:? "interval"))
instance ToJSON Point where
toJSON Point'{..}
= object
(catMaybes
[("value" .=) <$> _pValue,
("interval" .=) <$> _pInterval])
data CollectdPayload =
CollectdPayload'
{ _cpStartTime :: !(Maybe DateTime')
, _cpPluginInstance :: !(Maybe Text)
, _cpValues :: !(Maybe [CollectdValue])
, _cpTypeInstance :: !(Maybe Text)
, _cpEndTime :: !(Maybe DateTime')
, _cpMetadata :: !(Maybe CollectdPayloadMetadata)
, _cpType :: !(Maybe Text)
, _cpPlugin :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
collectdPayload
:: CollectdPayload
collectdPayload =
CollectdPayload'
{ _cpStartTime = Nothing
, _cpPluginInstance = Nothing
, _cpValues = Nothing
, _cpTypeInstance = Nothing
, _cpEndTime = Nothing
, _cpMetadata = Nothing
, _cpType = Nothing
, _cpPlugin = Nothing
}
cpStartTime :: Lens' CollectdPayload (Maybe UTCTime)
cpStartTime
= lens _cpStartTime (\ s a -> s{_cpStartTime = a}) .
mapping _DateTime
cpPluginInstance :: Lens' CollectdPayload (Maybe Text)
cpPluginInstance
= lens _cpPluginInstance
(\ s a -> s{_cpPluginInstance = a})
cpValues :: Lens' CollectdPayload [CollectdValue]
cpValues
= lens _cpValues (\ s a -> s{_cpValues = a}) .
_Default
. _Coerce
cpTypeInstance :: Lens' CollectdPayload (Maybe Text)
cpTypeInstance
= lens _cpTypeInstance
(\ s a -> s{_cpTypeInstance = a})
cpEndTime :: Lens' CollectdPayload (Maybe UTCTime)
cpEndTime
= lens _cpEndTime (\ s a -> s{_cpEndTime = a}) .
mapping _DateTime
cpMetadata :: Lens' CollectdPayload (Maybe CollectdPayloadMetadata)
cpMetadata
= lens _cpMetadata (\ s a -> s{_cpMetadata = a})
cpType :: Lens' CollectdPayload (Maybe Text)
cpType = lens _cpType (\ s a -> s{_cpType = a})
cpPlugin :: Lens' CollectdPayload (Maybe Text)
cpPlugin = lens _cpPlugin (\ s a -> s{_cpPlugin = a})
instance FromJSON CollectdPayload where
parseJSON
= withObject "CollectdPayload"
(\ o ->
CollectdPayload' <$>
(o .:? "startTime") <*> (o .:? "pluginInstance") <*>
(o .:? "values" .!= mempty)
<*> (o .:? "typeInstance")
<*> (o .:? "endTime")
<*> (o .:? "metadata")
<*> (o .:? "type")
<*> (o .:? "plugin"))
instance ToJSON CollectdPayload where
toJSON CollectdPayload'{..}
= object
(catMaybes
[("startTime" .=) <$> _cpStartTime,
("pluginInstance" .=) <$> _cpPluginInstance,
("values" .=) <$> _cpValues,
("typeInstance" .=) <$> _cpTypeInstance,
("endTime" .=) <$> _cpEndTime,
("metadata" .=) <$> _cpMetadata,
("type" .=) <$> _cpType,
("plugin" .=) <$> _cpPlugin])
data MutationRecord =
MutationRecord'
{ _mrMutatedBy :: !(Maybe Text)
, _mrMutateTime :: !(Maybe DateTime')
}
deriving (Eq, Show, Data, Typeable, Generic)
mutationRecord
:: MutationRecord
mutationRecord =
MutationRecord' {_mrMutatedBy = Nothing, _mrMutateTime = Nothing}
mrMutatedBy :: Lens' MutationRecord (Maybe Text)
mrMutatedBy
= lens _mrMutatedBy (\ s a -> s{_mrMutatedBy = a})
mrMutateTime :: Lens' MutationRecord (Maybe UTCTime)
mrMutateTime
= lens _mrMutateTime (\ s a -> s{_mrMutateTime = a})
. mapping _DateTime
instance FromJSON MutationRecord where
parseJSON
= withObject "MutationRecord"
(\ o ->
MutationRecord' <$>
(o .:? "mutatedBy") <*> (o .:? "mutateTime"))
instance ToJSON MutationRecord where
toJSON MutationRecord'{..}
= object
(catMaybes
[("mutatedBy" .=) <$> _mrMutatedBy,
("mutateTime" .=) <$> _mrMutateTime])
data Metric =
Metric'
{ _mLabels :: !(Maybe MetricLabels)
, _mType :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
metric
:: Metric
metric = Metric' {_mLabels = Nothing, _mType = Nothing}
mLabels :: Lens' Metric (Maybe MetricLabels)
mLabels = lens _mLabels (\ s a -> s{_mLabels = a})
mType :: Lens' Metric (Maybe Text)
mType = lens _mType (\ s a -> s{_mType = a})
instance FromJSON Metric where
parseJSON
= withObject "Metric"
(\ o ->
Metric' <$> (o .:? "labels") <*> (o .:? "type"))
instance ToJSON Metric where
toJSON Metric'{..}
= object
(catMaybes
[("labels" .=) <$> _mLabels, ("type" .=) <$> _mType])
data CollectdPayloadError =
CollectdPayloadError'
{ _cpeError :: !(Maybe Status)
, _cpeValueErrors :: !(Maybe [CollectdValueError])
, _cpeIndex :: !(Maybe (Textual Int32))
}
deriving (Eq, Show, Data, Typeable, Generic)
collectdPayloadError
:: CollectdPayloadError
collectdPayloadError =
CollectdPayloadError'
{_cpeError = Nothing, _cpeValueErrors = Nothing, _cpeIndex = Nothing}
cpeError :: Lens' CollectdPayloadError (Maybe Status)
cpeError = lens _cpeError (\ s a -> s{_cpeError = a})
cpeValueErrors :: Lens' CollectdPayloadError [CollectdValueError]
cpeValueErrors
= lens _cpeValueErrors
(\ s a -> s{_cpeValueErrors = a})
. _Default
. _Coerce
cpeIndex :: Lens' CollectdPayloadError (Maybe Int32)
cpeIndex
= lens _cpeIndex (\ s a -> s{_cpeIndex = a}) .
mapping _Coerce
instance FromJSON CollectdPayloadError where
parseJSON
= withObject "CollectdPayloadError"
(\ o ->
CollectdPayloadError' <$>
(o .:? "error") <*> (o .:? "valueErrors" .!= mempty)
<*> (o .:? "index"))
instance ToJSON CollectdPayloadError where
toJSON CollectdPayloadError'{..}
= object
(catMaybes
[("error" .=) <$> _cpeError,
("valueErrors" .=) <$> _cpeValueErrors,
("index" .=) <$> _cpeIndex])
data SendNotificationChannelVerificationCodeRequest =
SendNotificationChannelVerificationCodeRequest'
deriving (Eq, Show, Data, Typeable, Generic)
sendNotificationChannelVerificationCodeRequest
:: SendNotificationChannelVerificationCodeRequest
sendNotificationChannelVerificationCodeRequest =
SendNotificationChannelVerificationCodeRequest'
instance FromJSON
SendNotificationChannelVerificationCodeRequest
where
parseJSON
= withObject
"SendNotificationChannelVerificationCodeRequest"
(\ o ->
pure SendNotificationChannelVerificationCodeRequest')
instance ToJSON
SendNotificationChannelVerificationCodeRequest
where
toJSON = const emptyObject
data Exponential =
Exponential'
{ _eGrowthFactor :: !(Maybe (Textual Double))
, _eScale :: !(Maybe (Textual Double))
, _eNumFiniteBuckets :: !(Maybe (Textual Int32))
}
deriving (Eq, Show, Data, Typeable, Generic)
exponential
:: Exponential
exponential =
Exponential'
{_eGrowthFactor = Nothing, _eScale = Nothing, _eNumFiniteBuckets = Nothing}
eGrowthFactor :: Lens' Exponential (Maybe Double)
eGrowthFactor
= lens _eGrowthFactor
(\ s a -> s{_eGrowthFactor = a})
. mapping _Coerce
eScale :: Lens' Exponential (Maybe Double)
eScale
= lens _eScale (\ s a -> s{_eScale = a}) .
mapping _Coerce
eNumFiniteBuckets :: Lens' Exponential (Maybe Int32)
eNumFiniteBuckets
= lens _eNumFiniteBuckets
(\ s a -> s{_eNumFiniteBuckets = a})
. mapping _Coerce
instance FromJSON Exponential where
parseJSON
= withObject "Exponential"
(\ o ->
Exponential' <$>
(o .:? "growthFactor") <*> (o .:? "scale") <*>
(o .:? "numFiniteBuckets"))
instance ToJSON Exponential where
toJSON Exponential'{..}
= object
(catMaybes
[("growthFactor" .=) <$> _eGrowthFactor,
("scale" .=) <$> _eScale,
("numFiniteBuckets" .=) <$> _eNumFiniteBuckets])
data Range =
Range'
{ _rMax :: !(Maybe (Textual Double))
, _rMin :: !(Maybe (Textual Double))
}
deriving (Eq, Show, Data, Typeable, Generic)
range
:: Range
range = Range' {_rMax = Nothing, _rMin = Nothing}
rMax :: Lens' Range (Maybe Double)
rMax
= lens _rMax (\ s a -> s{_rMax = a}) .
mapping _Coerce
rMin :: Lens' Range (Maybe Double)
rMin
= lens _rMin (\ s a -> s{_rMin = a}) .
mapping _Coerce
instance FromJSON Range where
parseJSON
= withObject "Range"
(\ o -> Range' <$> (o .:? "max") <*> (o .:? "min"))
instance ToJSON Range where
toJSON Range'{..}
= object
(catMaybes
[("max" .=) <$> _rMax, ("min" .=) <$> _rMin])
data MonitoredResource =
MonitoredResource'
{ _mrLabels :: !(Maybe MonitoredResourceLabels)
, _mrType :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
monitoredResource
:: MonitoredResource
monitoredResource = MonitoredResource' {_mrLabels = Nothing, _mrType = Nothing}
mrLabels :: Lens' MonitoredResource (Maybe MonitoredResourceLabels)
mrLabels = lens _mrLabels (\ s a -> s{_mrLabels = a})
mrType :: Lens' MonitoredResource (Maybe Text)
mrType = lens _mrType (\ s a -> s{_mrType = a})
instance FromJSON MonitoredResource where
parseJSON
= withObject "MonitoredResource"
(\ o ->
MonitoredResource' <$>
(o .:? "labels") <*> (o .:? "type"))
instance ToJSON MonitoredResource where
toJSON MonitoredResource'{..}
= object
(catMaybes
[("labels" .=) <$> _mrLabels,
("type" .=) <$> _mrType])
data UptimeCheckIP =
UptimeCheckIP'
{ _uciIPAddress :: !(Maybe Text)
, _uciLocation :: !(Maybe Text)
, _uciRegion :: !(Maybe UptimeCheckIPRegion)
}
deriving (Eq, Show, Data, Typeable, Generic)
uptimeCheckIP
:: UptimeCheckIP
uptimeCheckIP =
UptimeCheckIP'
{_uciIPAddress = Nothing, _uciLocation = Nothing, _uciRegion = Nothing}
uciIPAddress :: Lens' UptimeCheckIP (Maybe Text)
uciIPAddress
= lens _uciIPAddress (\ s a -> s{_uciIPAddress = a})
uciLocation :: Lens' UptimeCheckIP (Maybe Text)
uciLocation
= lens _uciLocation (\ s a -> s{_uciLocation = a})
uciRegion :: Lens' UptimeCheckIP (Maybe UptimeCheckIPRegion)
uciRegion
= lens _uciRegion (\ s a -> s{_uciRegion = a})
instance FromJSON UptimeCheckIP where
parseJSON
= withObject "UptimeCheckIP"
(\ o ->
UptimeCheckIP' <$>
(o .:? "ipAddress") <*> (o .:? "location") <*>
(o .:? "region"))
instance ToJSON UptimeCheckIP where
toJSON UptimeCheckIP'{..}
= object
(catMaybes
[("ipAddress" .=) <$> _uciIPAddress,
("location" .=) <$> _uciLocation,
("region" .=) <$> _uciRegion])
newtype AlertPolicyUserLabels =
AlertPolicyUserLabels'
{ _apulAddtional :: HashMap Text Text
}
deriving (Eq, Show, Data, Typeable, Generic)
alertPolicyUserLabels
:: HashMap Text Text
-> AlertPolicyUserLabels
alertPolicyUserLabels pApulAddtional_ =
AlertPolicyUserLabels' {_apulAddtional = _Coerce # pApulAddtional_}
apulAddtional :: Lens' AlertPolicyUserLabels (HashMap Text Text)
apulAddtional
= lens _apulAddtional
(\ s a -> s{_apulAddtional = a})
. _Coerce
instance FromJSON AlertPolicyUserLabels where
parseJSON
= withObject "AlertPolicyUserLabels"
(\ o ->
AlertPolicyUserLabels' <$> (parseJSONObject o))
instance ToJSON AlertPolicyUserLabels where
toJSON = toJSON . _apulAddtional
data Documentation =
Documentation'
{ _dContent :: !(Maybe Text)
, _dMimeType :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
documentation
:: Documentation
documentation = Documentation' {_dContent = Nothing, _dMimeType = Nothing}
dContent :: Lens' Documentation (Maybe Text)
dContent = lens _dContent (\ s a -> s{_dContent = a})
dMimeType :: Lens' Documentation (Maybe Text)
dMimeType
= lens _dMimeType (\ s a -> s{_dMimeType = a})
instance FromJSON Documentation where
parseJSON
= withObject "Documentation"
(\ o ->
Documentation' <$>
(o .:? "content") <*> (o .:? "mimeType"))
instance ToJSON Documentation where
toJSON Documentation'{..}
= object
(catMaybes
[("content" .=) <$> _dContent,
("mimeType" .=) <$> _dMimeType])
data Exemplar =
Exemplar'
{ _eAttachments :: !(Maybe [ExemplarAttachmentsItem])
, _eValue :: !(Maybe (Textual Double))
, _eTimestamp :: !(Maybe DateTime')
}
deriving (Eq, Show, Data, Typeable, Generic)
exemplar
:: Exemplar
exemplar =
Exemplar' {_eAttachments = Nothing, _eValue = Nothing, _eTimestamp = Nothing}
eAttachments :: Lens' Exemplar [ExemplarAttachmentsItem]
eAttachments
= lens _eAttachments (\ s a -> s{_eAttachments = a})
. _Default
. _Coerce
eValue :: Lens' Exemplar (Maybe Double)
eValue
= lens _eValue (\ s a -> s{_eValue = a}) .
mapping _Coerce
eTimestamp :: Lens' Exemplar (Maybe UTCTime)
eTimestamp
= lens _eTimestamp (\ s a -> s{_eTimestamp = a}) .
mapping _DateTime
instance FromJSON Exemplar where
parseJSON
= withObject "Exemplar"
(\ o ->
Exemplar' <$>
(o .:? "attachments" .!= mempty) <*> (o .:? "value")
<*> (o .:? "timestamp"))
instance ToJSON Exemplar where
toJSON Exemplar'{..}
= object
(catMaybes
[("attachments" .=) <$> _eAttachments,
("value" .=) <$> _eValue,
("timestamp" .=) <$> _eTimestamp])
data MetricDescriptorMetadata =
MetricDescriptorMetadata'
{ _mdmSamplePeriod :: !(Maybe GDuration)
, _mdmIngestDelay :: !(Maybe GDuration)
, _mdmLaunchStage :: !(Maybe MetricDescriptorMetadataLaunchStage)
}
deriving (Eq, Show, Data, Typeable, Generic)
metricDescriptorMetadata
:: MetricDescriptorMetadata
metricDescriptorMetadata =
MetricDescriptorMetadata'
{ _mdmSamplePeriod = Nothing
, _mdmIngestDelay = Nothing
, _mdmLaunchStage = Nothing
}
mdmSamplePeriod :: Lens' MetricDescriptorMetadata (Maybe Scientific)
mdmSamplePeriod
= lens _mdmSamplePeriod
(\ s a -> s{_mdmSamplePeriod = a})
. mapping _GDuration
mdmIngestDelay :: Lens' MetricDescriptorMetadata (Maybe Scientific)
mdmIngestDelay
= lens _mdmIngestDelay
(\ s a -> s{_mdmIngestDelay = a})
. mapping _GDuration
mdmLaunchStage :: Lens' MetricDescriptorMetadata (Maybe MetricDescriptorMetadataLaunchStage)
mdmLaunchStage
= lens _mdmLaunchStage
(\ s a -> s{_mdmLaunchStage = a})
instance FromJSON MetricDescriptorMetadata where
parseJSON
= withObject "MetricDescriptorMetadata"
(\ o ->
MetricDescriptorMetadata' <$>
(o .:? "samplePeriod") <*> (o .:? "ingestDelay") <*>
(o .:? "launchStage"))
instance ToJSON MetricDescriptorMetadata where
toJSON MetricDescriptorMetadata'{..}
= object
(catMaybes
[("samplePeriod" .=) <$> _mdmSamplePeriod,
("ingestDelay" .=) <$> _mdmIngestDelay,
("launchStage" .=) <$> _mdmLaunchStage])
data TimeInterval =
TimeInterval'
{ _tiStartTime :: !(Maybe DateTime')
, _tiEndTime :: !(Maybe DateTime')
}
deriving (Eq, Show, Data, Typeable, Generic)
timeInterval
:: TimeInterval
timeInterval = TimeInterval' {_tiStartTime = Nothing, _tiEndTime = Nothing}
tiStartTime :: Lens' TimeInterval (Maybe UTCTime)
tiStartTime
= lens _tiStartTime (\ s a -> s{_tiStartTime = a}) .
mapping _DateTime
tiEndTime :: Lens' TimeInterval (Maybe UTCTime)
tiEndTime
= lens _tiEndTime (\ s a -> s{_tiEndTime = a}) .
mapping _DateTime
instance FromJSON TimeInterval where
parseJSON
= withObject "TimeInterval"
(\ o ->
TimeInterval' <$>
(o .:? "startTime") <*> (o .:? "endTime"))
instance ToJSON TimeInterval where
toJSON TimeInterval'{..}
= object
(catMaybes
[("startTime" .=) <$> _tiStartTime,
("endTime" .=) <$> _tiEndTime])
newtype HTTPCheckHeaders =
HTTPCheckHeaders'
{ _httpchAddtional :: HashMap Text Text
}
deriving (Eq, Show, Data, Typeable, Generic)
hTTPCheckHeaders
:: HashMap Text Text
-> HTTPCheckHeaders
hTTPCheckHeaders pHttpchAddtional_ =
HTTPCheckHeaders' {_httpchAddtional = _Coerce # pHttpchAddtional_}
httpchAddtional :: Lens' HTTPCheckHeaders (HashMap Text Text)
httpchAddtional
= lens _httpchAddtional
(\ s a -> s{_httpchAddtional = a})
. _Coerce
instance FromJSON HTTPCheckHeaders where
parseJSON
= withObject "HTTPCheckHeaders"
(\ o -> HTTPCheckHeaders' <$> (parseJSONObject o))
instance ToJSON HTTPCheckHeaders where
toJSON = toJSON . _httpchAddtional
newtype MonitoredResourceMetadataSystemLabels =
MonitoredResourceMetadataSystemLabels'
{ _mrmslAddtional :: HashMap Text JSONValue
}
deriving (Eq, Show, Data, Typeable, Generic)
monitoredResourceMetadataSystemLabels
:: HashMap Text JSONValue
-> MonitoredResourceMetadataSystemLabels
monitoredResourceMetadataSystemLabels pMrmslAddtional_ =
MonitoredResourceMetadataSystemLabels'
{_mrmslAddtional = _Coerce # pMrmslAddtional_}
mrmslAddtional :: Lens' MonitoredResourceMetadataSystemLabels (HashMap Text JSONValue)
mrmslAddtional
= lens _mrmslAddtional
(\ s a -> s{_mrmslAddtional = a})
. _Coerce
instance FromJSON
MonitoredResourceMetadataSystemLabels
where
parseJSON
= withObject "MonitoredResourceMetadataSystemLabels"
(\ o ->
MonitoredResourceMetadataSystemLabels' <$>
(parseJSONObject o))
instance ToJSON MonitoredResourceMetadataSystemLabels
where
toJSON = toJSON . _mrmslAddtional
newtype ContentMatcher =
ContentMatcher'
{ _cmContent :: Maybe Text
}
deriving (Eq, Show, Data, Typeable, Generic)
contentMatcher
:: ContentMatcher
contentMatcher = ContentMatcher' {_cmContent = Nothing}
cmContent :: Lens' ContentMatcher (Maybe Text)
cmContent
= lens _cmContent (\ s a -> s{_cmContent = a})
instance FromJSON ContentMatcher where
parseJSON
= withObject "ContentMatcher"
(\ o -> ContentMatcher' <$> (o .:? "content"))
instance ToJSON ContentMatcher where
toJSON ContentMatcher'{..}
= object (catMaybes [("content" .=) <$> _cmContent])
data ListGroupMembersResponse =
ListGroupMembersResponse'
{ _lgmrNextPageToken :: !(Maybe Text)
, _lgmrMembers :: !(Maybe [MonitoredResource])
, _lgmrTotalSize :: !(Maybe (Textual Int32))
}
deriving (Eq, Show, Data, Typeable, Generic)
listGroupMembersResponse
:: ListGroupMembersResponse
listGroupMembersResponse =
ListGroupMembersResponse'
{ _lgmrNextPageToken = Nothing
, _lgmrMembers = Nothing
, _lgmrTotalSize = Nothing
}
lgmrNextPageToken :: Lens' ListGroupMembersResponse (Maybe Text)
lgmrNextPageToken
= lens _lgmrNextPageToken
(\ s a -> s{_lgmrNextPageToken = a})
lgmrMembers :: Lens' ListGroupMembersResponse [MonitoredResource]
lgmrMembers
= lens _lgmrMembers (\ s a -> s{_lgmrMembers = a}) .
_Default
. _Coerce
lgmrTotalSize :: Lens' ListGroupMembersResponse (Maybe Int32)
lgmrTotalSize
= lens _lgmrTotalSize
(\ s a -> s{_lgmrTotalSize = a})
. mapping _Coerce
instance FromJSON ListGroupMembersResponse where
parseJSON
= withObject "ListGroupMembersResponse"
(\ o ->
ListGroupMembersResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "members" .!= mempty)
<*> (o .:? "totalSize"))
instance ToJSON ListGroupMembersResponse where
toJSON ListGroupMembersResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lgmrNextPageToken,
("members" .=) <$> _lgmrMembers,
("totalSize" .=) <$> _lgmrTotalSize])
data LabelDescriptor =
LabelDescriptor'
{ _ldKey :: !(Maybe Text)
, _ldValueType :: !(Maybe LabelDescriptorValueType)
, _ldDescription :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
labelDescriptor
:: LabelDescriptor
labelDescriptor =
LabelDescriptor'
{_ldKey = Nothing, _ldValueType = Nothing, _ldDescription = Nothing}
ldKey :: Lens' LabelDescriptor (Maybe Text)
ldKey = lens _ldKey (\ s a -> s{_ldKey = a})
ldValueType :: Lens' LabelDescriptor (Maybe LabelDescriptorValueType)
ldValueType
= lens _ldValueType (\ s a -> s{_ldValueType = a})
ldDescription :: Lens' LabelDescriptor (Maybe Text)
ldDescription
= lens _ldDescription
(\ s a -> s{_ldDescription = a})
instance FromJSON LabelDescriptor where
parseJSON
= withObject "LabelDescriptor"
(\ o ->
LabelDescriptor' <$>
(o .:? "key") <*> (o .:? "valueType") <*>
(o .:? "description"))
instance ToJSON LabelDescriptor where
toJSON LabelDescriptor'{..}
= object
(catMaybes
[("key" .=) <$> _ldKey,
("valueType" .=) <$> _ldValueType,
("description" .=) <$> _ldDescription])
data Linear =
Linear'
{ _lOffSet :: !(Maybe (Textual Double))
, _lWidth :: !(Maybe (Textual Double))
, _lNumFiniteBuckets :: !(Maybe (Textual Int32))
}
deriving (Eq, Show, Data, Typeable, Generic)
linear
:: Linear
linear =
Linear' {_lOffSet = Nothing, _lWidth = Nothing, _lNumFiniteBuckets = Nothing}
lOffSet :: Lens' Linear (Maybe Double)
lOffSet
= lens _lOffSet (\ s a -> s{_lOffSet = a}) .
mapping _Coerce
lWidth :: Lens' Linear (Maybe Double)
lWidth
= lens _lWidth (\ s a -> s{_lWidth = a}) .
mapping _Coerce
lNumFiniteBuckets :: Lens' Linear (Maybe Int32)
lNumFiniteBuckets
= lens _lNumFiniteBuckets
(\ s a -> s{_lNumFiniteBuckets = a})
. mapping _Coerce
instance FromJSON Linear where
parseJSON
= withObject "Linear"
(\ o ->
Linear' <$>
(o .:? "offset") <*> (o .:? "width") <*>
(o .:? "numFiniteBuckets"))
instance ToJSON Linear where
toJSON Linear'{..}
= object
(catMaybes
[("offset" .=) <$> _lOffSet,
("width" .=) <$> _lWidth,
("numFiniteBuckets" .=) <$> _lNumFiniteBuckets])
data ListUptimeCheckIPsResponse =
ListUptimeCheckIPsResponse'
{ _lucirNextPageToken :: !(Maybe Text)
, _lucirUptimeCheckIPs :: !(Maybe [UptimeCheckIP])
}
deriving (Eq, Show, Data, Typeable, Generic)
listUptimeCheckIPsResponse
:: ListUptimeCheckIPsResponse
listUptimeCheckIPsResponse =
ListUptimeCheckIPsResponse'
{_lucirNextPageToken = Nothing, _lucirUptimeCheckIPs = Nothing}
lucirNextPageToken :: Lens' ListUptimeCheckIPsResponse (Maybe Text)
lucirNextPageToken
= lens _lucirNextPageToken
(\ s a -> s{_lucirNextPageToken = a})
lucirUptimeCheckIPs :: Lens' ListUptimeCheckIPsResponse [UptimeCheckIP]
lucirUptimeCheckIPs
= lens _lucirUptimeCheckIPs
(\ s a -> s{_lucirUptimeCheckIPs = a})
. _Default
. _Coerce
instance FromJSON ListUptimeCheckIPsResponse where
parseJSON
= withObject "ListUptimeCheckIPsResponse"
(\ o ->
ListUptimeCheckIPsResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "uptimeCheckIps" .!= mempty))
instance ToJSON ListUptimeCheckIPsResponse where
toJSON ListUptimeCheckIPsResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lucirNextPageToken,
("uptimeCheckIps" .=) <$> _lucirUptimeCheckIPs])
newtype GetNotificationChannelVerificationCodeRequest =
GetNotificationChannelVerificationCodeRequest'
{ _gExpireTime :: Maybe DateTime'
}
deriving (Eq, Show, Data, Typeable, Generic)
getNotificationChannelVerificationCodeRequest
:: GetNotificationChannelVerificationCodeRequest
getNotificationChannelVerificationCodeRequest =
GetNotificationChannelVerificationCodeRequest' {_gExpireTime = Nothing}
gExpireTime :: Lens' GetNotificationChannelVerificationCodeRequest (Maybe UTCTime)
gExpireTime
= lens _gExpireTime (\ s a -> s{_gExpireTime = a}) .
mapping _DateTime
instance FromJSON
GetNotificationChannelVerificationCodeRequest
where
parseJSON
= withObject
"GetNotificationChannelVerificationCodeRequest"
(\ o ->
GetNotificationChannelVerificationCodeRequest' <$>
(o .:? "expireTime"))
instance ToJSON
GetNotificationChannelVerificationCodeRequest
where
toJSON
GetNotificationChannelVerificationCodeRequest'{..}
= object
(catMaybes [("expireTime" .=) <$> _gExpireTime])
data ResourceGroup =
ResourceGroup'
{ _rgResourceType :: !(Maybe ResourceGroupResourceType)
, _rgGroupId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
resourceGroup
:: ResourceGroup
resourceGroup = ResourceGroup' {_rgResourceType = Nothing, _rgGroupId = Nothing}
rgResourceType :: Lens' ResourceGroup (Maybe ResourceGroupResourceType)
rgResourceType
= lens _rgResourceType
(\ s a -> s{_rgResourceType = a})
rgGroupId :: Lens' ResourceGroup (Maybe Text)
rgGroupId
= lens _rgGroupId (\ s a -> s{_rgGroupId = a})
instance FromJSON ResourceGroup where
parseJSON
= withObject "ResourceGroup"
(\ o ->
ResourceGroup' <$>
(o .:? "resourceType") <*> (o .:? "groupId"))
instance ToJSON ResourceGroup where
toJSON ResourceGroup'{..}
= object
(catMaybes
[("resourceType" .=) <$> _rgResourceType,
("groupId" .=) <$> _rgGroupId])
newtype DroppedLabels =
DroppedLabels'
{ _dlLabel :: Maybe DroppedLabelsLabel
}
deriving (Eq, Show, Data, Typeable, Generic)
droppedLabels
:: DroppedLabels
droppedLabels = DroppedLabels' {_dlLabel = Nothing}
dlLabel :: Lens' DroppedLabels (Maybe DroppedLabelsLabel)
dlLabel = lens _dlLabel (\ s a -> s{_dlLabel = a})
instance FromJSON DroppedLabels where
parseJSON
= withObject "DroppedLabels"
(\ o -> DroppedLabels' <$> (o .:? "label"))
instance ToJSON DroppedLabels where
toJSON DroppedLabels'{..}
= object (catMaybes [("label" .=) <$> _dlLabel])
data Trigger =
Trigger'
{ _tPercent :: !(Maybe (Textual Double))
, _tCount :: !(Maybe (Textual Int32))
}
deriving (Eq, Show, Data, Typeable, Generic)
trigger
:: Trigger
trigger = Trigger' {_tPercent = Nothing, _tCount = Nothing}
tPercent :: Lens' Trigger (Maybe Double)
tPercent
= lens _tPercent (\ s a -> s{_tPercent = a}) .
mapping _Coerce
tCount :: Lens' Trigger (Maybe Int32)
tCount
= lens _tCount (\ s a -> s{_tCount = a}) .
mapping _Coerce
instance FromJSON Trigger where
parseJSON
= withObject "Trigger"
(\ o ->
Trigger' <$> (o .:? "percent") <*> (o .:? "count"))
instance ToJSON Trigger where
toJSON Trigger'{..}
= object
(catMaybes
[("percent" .=) <$> _tPercent,
("count" .=) <$> _tCount])
data Type =
Type'
{ _tSourceContext :: !(Maybe SourceContext)
, _tOneofs :: !(Maybe [Text])
, _tName :: !(Maybe Text)
, _tOptions :: !(Maybe [Option])
, _tFields :: !(Maybe [Field])
, _tSyntax :: !(Maybe TypeSyntax)
}
deriving (Eq, Show, Data, Typeable, Generic)
type'
:: Type
type' =
Type'
{ _tSourceContext = Nothing
, _tOneofs = Nothing
, _tName = Nothing
, _tOptions = Nothing
, _tFields = Nothing
, _tSyntax = Nothing
}
tSourceContext :: Lens' Type (Maybe SourceContext)
tSourceContext
= lens _tSourceContext
(\ s a -> s{_tSourceContext = a})
tOneofs :: Lens' Type [Text]
tOneofs
= lens _tOneofs (\ s a -> s{_tOneofs = a}) . _Default
. _Coerce
tName :: Lens' Type (Maybe Text)
tName = lens _tName (\ s a -> s{_tName = a})
tOptions :: Lens' Type [Option]
tOptions
= lens _tOptions (\ s a -> s{_tOptions = a}) .
_Default
. _Coerce
tFields :: Lens' Type [Field]
tFields
= lens _tFields (\ s a -> s{_tFields = a}) . _Default
. _Coerce
tSyntax :: Lens' Type (Maybe TypeSyntax)
tSyntax = lens _tSyntax (\ s a -> s{_tSyntax = a})
instance FromJSON Type where
parseJSON
= withObject "Type"
(\ o ->
Type' <$>
(o .:? "sourceContext") <*>
(o .:? "oneofs" .!= mempty)
<*> (o .:? "name")
<*> (o .:? "options" .!= mempty)
<*> (o .:? "fields" .!= mempty)
<*> (o .:? "syntax"))
instance ToJSON Type where
toJSON Type'{..}
= object
(catMaybes
[("sourceContext" .=) <$> _tSourceContext,
("oneofs" .=) <$> _tOneofs, ("name" .=) <$> _tName,
("options" .=) <$> _tOptions,
("fields" .=) <$> _tFields,
("syntax" .=) <$> _tSyntax])
newtype CreateCollectdTimeSeriesResponse =
CreateCollectdTimeSeriesResponse'
{ _cctsrPayloadErrors :: Maybe [CollectdPayloadError]
}
deriving (Eq, Show, Data, Typeable, Generic)
createCollectdTimeSeriesResponse
:: CreateCollectdTimeSeriesResponse
createCollectdTimeSeriesResponse =
CreateCollectdTimeSeriesResponse' {_cctsrPayloadErrors = Nothing}
cctsrPayloadErrors :: Lens' CreateCollectdTimeSeriesResponse [CollectdPayloadError]
cctsrPayloadErrors
= lens _cctsrPayloadErrors
(\ s a -> s{_cctsrPayloadErrors = a})
. _Default
. _Coerce
instance FromJSON CreateCollectdTimeSeriesResponse
where
parseJSON
= withObject "CreateCollectdTimeSeriesResponse"
(\ o ->
CreateCollectdTimeSeriesResponse' <$>
(o .:? "payloadErrors" .!= mempty))
instance ToJSON CreateCollectdTimeSeriesResponse
where
toJSON CreateCollectdTimeSeriesResponse'{..}
= object
(catMaybes
[("payloadErrors" .=) <$> _cctsrPayloadErrors])
data Option =
Option'
{ _oValue :: !(Maybe OptionValue)
, _oName :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
option
:: Option
option = Option' {_oValue = Nothing, _oName = Nothing}
oValue :: Lens' Option (Maybe OptionValue)
oValue = lens _oValue (\ s a -> s{_oValue = a})
oName :: Lens' Option (Maybe Text)
oName = lens _oName (\ s a -> s{_oName = a})
instance FromJSON Option where
parseJSON
= withObject "Option"
(\ o ->
Option' <$> (o .:? "value") <*> (o .:? "name"))
instance ToJSON Option where
toJSON Option'{..}
= object
(catMaybes
[("value" .=) <$> _oValue, ("name" .=) <$> _oName])
data Condition =
Condition'
{ _cConditionAbsent :: !(Maybe MetricAbsence)
, _cConditionThreshold :: !(Maybe MetricThreshold)
, _cName :: !(Maybe Text)
, _cDisplayName :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
condition
:: Condition
condition =
Condition'
{ _cConditionAbsent = Nothing
, _cConditionThreshold = Nothing
, _cName = Nothing
, _cDisplayName = Nothing
}
cConditionAbsent :: Lens' Condition (Maybe MetricAbsence)
cConditionAbsent
= lens _cConditionAbsent
(\ s a -> s{_cConditionAbsent = a})
cConditionThreshold :: Lens' Condition (Maybe MetricThreshold)
cConditionThreshold
= lens _cConditionThreshold
(\ s a -> s{_cConditionThreshold = a})
cName :: Lens' Condition (Maybe Text)
cName = lens _cName (\ s a -> s{_cName = a})
cDisplayName :: Lens' Condition (Maybe Text)
cDisplayName
= lens _cDisplayName (\ s a -> s{_cDisplayName = a})
instance FromJSON Condition where
parseJSON
= withObject "Condition"
(\ o ->
Condition' <$>
(o .:? "conditionAbsent") <*>
(o .:? "conditionThreshold")
<*> (o .:? "name")
<*> (o .:? "displayName"))
instance ToJSON Condition where
toJSON Condition'{..}
= object
(catMaybes
[("conditionAbsent" .=) <$> _cConditionAbsent,
("conditionThreshold" .=) <$> _cConditionThreshold,
("name" .=) <$> _cName,
("displayName" .=) <$> _cDisplayName])
data BucketOptions =
BucketOptions'
{ _boExponentialBuckets :: !(Maybe Exponential)
, _boLinearBuckets :: !(Maybe Linear)
, _boExplicitBuckets :: !(Maybe Explicit)
}
deriving (Eq, Show, Data, Typeable, Generic)
bucketOptions
:: BucketOptions
bucketOptions =
BucketOptions'
{ _boExponentialBuckets = Nothing
, _boLinearBuckets = Nothing
, _boExplicitBuckets = Nothing
}
boExponentialBuckets :: Lens' BucketOptions (Maybe Exponential)
boExponentialBuckets
= lens _boExponentialBuckets
(\ s a -> s{_boExponentialBuckets = a})
boLinearBuckets :: Lens' BucketOptions (Maybe Linear)
boLinearBuckets
= lens _boLinearBuckets
(\ s a -> s{_boLinearBuckets = a})
boExplicitBuckets :: Lens' BucketOptions (Maybe Explicit)
boExplicitBuckets
= lens _boExplicitBuckets
(\ s a -> s{_boExplicitBuckets = a})
instance FromJSON BucketOptions where
parseJSON
= withObject "BucketOptions"
(\ o ->
BucketOptions' <$>
(o .:? "exponentialBuckets") <*>
(o .:? "linearBuckets")
<*> (o .:? "explicitBuckets"))
instance ToJSON BucketOptions where
toJSON BucketOptions'{..}
= object
(catMaybes
[("exponentialBuckets" .=) <$> _boExponentialBuckets,
("linearBuckets" .=) <$> _boLinearBuckets,
("explicitBuckets" .=) <$> _boExplicitBuckets])
data ListUptimeCheckConfigsResponse =
ListUptimeCheckConfigsResponse'
{ _luccrUptimeCheckConfigs :: !(Maybe [UptimeCheckConfig])
, _luccrNextPageToken :: !(Maybe Text)
, _luccrTotalSize :: !(Maybe (Textual Int32))
}
deriving (Eq, Show, Data, Typeable, Generic)
listUptimeCheckConfigsResponse
:: ListUptimeCheckConfigsResponse
listUptimeCheckConfigsResponse =
ListUptimeCheckConfigsResponse'
{ _luccrUptimeCheckConfigs = Nothing
, _luccrNextPageToken = Nothing
, _luccrTotalSize = Nothing
}
luccrUptimeCheckConfigs :: Lens' ListUptimeCheckConfigsResponse [UptimeCheckConfig]
luccrUptimeCheckConfigs
= lens _luccrUptimeCheckConfigs
(\ s a -> s{_luccrUptimeCheckConfigs = a})
. _Default
. _Coerce
luccrNextPageToken :: Lens' ListUptimeCheckConfigsResponse (Maybe Text)
luccrNextPageToken
= lens _luccrNextPageToken
(\ s a -> s{_luccrNextPageToken = a})
luccrTotalSize :: Lens' ListUptimeCheckConfigsResponse (Maybe Int32)
luccrTotalSize
= lens _luccrTotalSize
(\ s a -> s{_luccrTotalSize = a})
. mapping _Coerce
instance FromJSON ListUptimeCheckConfigsResponse
where
parseJSON
= withObject "ListUptimeCheckConfigsResponse"
(\ o ->
ListUptimeCheckConfigsResponse' <$>
(o .:? "uptimeCheckConfigs" .!= mempty) <*>
(o .:? "nextPageToken")
<*> (o .:? "totalSize"))
instance ToJSON ListUptimeCheckConfigsResponse where
toJSON ListUptimeCheckConfigsResponse'{..}
= object
(catMaybes
[("uptimeCheckConfigs" .=) <$>
_luccrUptimeCheckConfigs,
("nextPageToken" .=) <$> _luccrNextPageToken,
("totalSize" .=) <$> _luccrTotalSize])
data HTTPCheck =
HTTPCheck'
{ _httpcUseSSL :: !(Maybe Bool)
, _httpcPath :: !(Maybe Text)
, _httpcMaskHeaders :: !(Maybe Bool)
, _httpcHeaders :: !(Maybe HTTPCheckHeaders)
, _httpcAuthInfo :: !(Maybe BasicAuthentication)
, _httpcPort :: !(Maybe (Textual Int32))
}
deriving (Eq, Show, Data, Typeable, Generic)
hTTPCheck
:: HTTPCheck
hTTPCheck =
HTTPCheck'
{ _httpcUseSSL = Nothing
, _httpcPath = Nothing
, _httpcMaskHeaders = Nothing
, _httpcHeaders = Nothing
, _httpcAuthInfo = Nothing
, _httpcPort = Nothing
}
httpcUseSSL :: Lens' HTTPCheck (Maybe Bool)
httpcUseSSL
= lens _httpcUseSSL (\ s a -> s{_httpcUseSSL = a})
httpcPath :: Lens' HTTPCheck (Maybe Text)
httpcPath
= lens _httpcPath (\ s a -> s{_httpcPath = a})
httpcMaskHeaders :: Lens' HTTPCheck (Maybe Bool)
httpcMaskHeaders
= lens _httpcMaskHeaders
(\ s a -> s{_httpcMaskHeaders = a})
httpcHeaders :: Lens' HTTPCheck (Maybe HTTPCheckHeaders)
httpcHeaders
= lens _httpcHeaders (\ s a -> s{_httpcHeaders = a})
httpcAuthInfo :: Lens' HTTPCheck (Maybe BasicAuthentication)
httpcAuthInfo
= lens _httpcAuthInfo
(\ s a -> s{_httpcAuthInfo = a})
httpcPort :: Lens' HTTPCheck (Maybe Int32)
httpcPort
= lens _httpcPort (\ s a -> s{_httpcPort = a}) .
mapping _Coerce
instance FromJSON HTTPCheck where
parseJSON
= withObject "HTTPCheck"
(\ o ->
HTTPCheck' <$>
(o .:? "useSsl") <*> (o .:? "path") <*>
(o .:? "maskHeaders")
<*> (o .:? "headers")
<*> (o .:? "authInfo")
<*> (o .:? "port"))
instance ToJSON HTTPCheck where
toJSON HTTPCheck'{..}
= object
(catMaybes
[("useSsl" .=) <$> _httpcUseSSL,
("path" .=) <$> _httpcPath,
("maskHeaders" .=) <$> _httpcMaskHeaders,
("headers" .=) <$> _httpcHeaders,
("authInfo" .=) <$> _httpcAuthInfo,
("port" .=) <$> _httpcPort])
data TimeSeries =
TimeSeries'
{ _tsPoints :: !(Maybe [Point])
, _tsMetricKind :: !(Maybe TimeSeriesMetricKind)
, _tsMetric :: !(Maybe Metric)
, _tsResource :: !(Maybe MonitoredResource)
, _tsMetadata :: !(Maybe MonitoredResourceMetadata)
, _tsValueType :: !(Maybe TimeSeriesValueType)
}
deriving (Eq, Show, Data, Typeable, Generic)
timeSeries
:: TimeSeries
timeSeries =
TimeSeries'
{ _tsPoints = Nothing
, _tsMetricKind = Nothing
, _tsMetric = Nothing
, _tsResource = Nothing
, _tsMetadata = Nothing
, _tsValueType = Nothing
}
tsPoints :: Lens' TimeSeries [Point]
tsPoints
= lens _tsPoints (\ s a -> s{_tsPoints = a}) .
_Default
. _Coerce
tsMetricKind :: Lens' TimeSeries (Maybe TimeSeriesMetricKind)
tsMetricKind
= lens _tsMetricKind (\ s a -> s{_tsMetricKind = a})
tsMetric :: Lens' TimeSeries (Maybe Metric)
tsMetric = lens _tsMetric (\ s a -> s{_tsMetric = a})
tsResource :: Lens' TimeSeries (Maybe MonitoredResource)
tsResource
= lens _tsResource (\ s a -> s{_tsResource = a})
tsMetadata :: Lens' TimeSeries (Maybe MonitoredResourceMetadata)
tsMetadata
= lens _tsMetadata (\ s a -> s{_tsMetadata = a})
tsValueType :: Lens' TimeSeries (Maybe TimeSeriesValueType)
tsValueType
= lens _tsValueType (\ s a -> s{_tsValueType = a})
instance FromJSON TimeSeries where
parseJSON
= withObject "TimeSeries"
(\ o ->
TimeSeries' <$>
(o .:? "points" .!= mempty) <*> (o .:? "metricKind")
<*> (o .:? "metric")
<*> (o .:? "resource")
<*> (o .:? "metadata")
<*> (o .:? "valueType"))
instance ToJSON TimeSeries where
toJSON TimeSeries'{..}
= object
(catMaybes
[("points" .=) <$> _tsPoints,
("metricKind" .=) <$> _tsMetricKind,
("metric" .=) <$> _tsMetric,
("resource" .=) <$> _tsResource,
("metadata" .=) <$> _tsMetadata,
("valueType" .=) <$> _tsValueType])
data AlertPolicy =
AlertPolicy'
{ _apEnabled :: !(Maybe Bool)
, _apNotificationChannels :: !(Maybe [Text])
, _apMutationRecord :: !(Maybe MutationRecord)
, _apCreationRecord :: !(Maybe MutationRecord)
, _apUserLabels :: !(Maybe AlertPolicyUserLabels)
, _apName :: !(Maybe Text)
, _apDocumentation :: !(Maybe Documentation)
, _apDisplayName :: !(Maybe Text)
, _apConditions :: !(Maybe [Condition])
, _apCombiner :: !(Maybe AlertPolicyCombiner)
}
deriving (Eq, Show, Data, Typeable, Generic)
alertPolicy
:: AlertPolicy
alertPolicy =
AlertPolicy'
{ _apEnabled = Nothing
, _apNotificationChannels = Nothing
, _apMutationRecord = Nothing
, _apCreationRecord = Nothing
, _apUserLabels = Nothing
, _apName = Nothing
, _apDocumentation = Nothing
, _apDisplayName = Nothing
, _apConditions = Nothing
, _apCombiner = Nothing
}
apEnabled :: Lens' AlertPolicy (Maybe Bool)
apEnabled
= lens _apEnabled (\ s a -> s{_apEnabled = a})
apNotificationChannels :: Lens' AlertPolicy [Text]
apNotificationChannels
= lens _apNotificationChannels
(\ s a -> s{_apNotificationChannels = a})
. _Default
. _Coerce
apMutationRecord :: Lens' AlertPolicy (Maybe MutationRecord)
apMutationRecord
= lens _apMutationRecord
(\ s a -> s{_apMutationRecord = a})
apCreationRecord :: Lens' AlertPolicy (Maybe MutationRecord)
apCreationRecord
= lens _apCreationRecord
(\ s a -> s{_apCreationRecord = a})
apUserLabels :: Lens' AlertPolicy (Maybe AlertPolicyUserLabels)
apUserLabels
= lens _apUserLabels (\ s a -> s{_apUserLabels = a})
apName :: Lens' AlertPolicy (Maybe Text)
apName = lens _apName (\ s a -> s{_apName = a})
apDocumentation :: Lens' AlertPolicy (Maybe Documentation)
apDocumentation
= lens _apDocumentation
(\ s a -> s{_apDocumentation = a})
apDisplayName :: Lens' AlertPolicy (Maybe Text)
apDisplayName
= lens _apDisplayName
(\ s a -> s{_apDisplayName = a})
apConditions :: Lens' AlertPolicy [Condition]
apConditions
= lens _apConditions (\ s a -> s{_apConditions = a})
. _Default
. _Coerce
apCombiner :: Lens' AlertPolicy (Maybe AlertPolicyCombiner)
apCombiner
= lens _apCombiner (\ s a -> s{_apCombiner = a})
instance FromJSON AlertPolicy where
parseJSON
= withObject "AlertPolicy"
(\ o ->
AlertPolicy' <$>
(o .:? "enabled") <*>
(o .:? "notificationChannels" .!= mempty)
<*> (o .:? "mutationRecord")
<*> (o .:? "creationRecord")
<*> (o .:? "userLabels")
<*> (o .:? "name")
<*> (o .:? "documentation")
<*> (o .:? "displayName")
<*> (o .:? "conditions" .!= mempty)
<*> (o .:? "combiner"))
instance ToJSON AlertPolicy where
toJSON AlertPolicy'{..}
= object
(catMaybes
[("enabled" .=) <$> _apEnabled,
("notificationChannels" .=) <$>
_apNotificationChannels,
("mutationRecord" .=) <$> _apMutationRecord,
("creationRecord" .=) <$> _apCreationRecord,
("userLabels" .=) <$> _apUserLabels,
("name" .=) <$> _apName,
("documentation" .=) <$> _apDocumentation,
("displayName" .=) <$> _apDisplayName,
("conditions" .=) <$> _apConditions,
("combiner" .=) <$> _apCombiner])
data ListAlertPoliciesResponse =
ListAlertPoliciesResponse'
{ _laprNextPageToken :: !(Maybe Text)
, _laprAlertPolicies :: !(Maybe [AlertPolicy])
}
deriving (Eq, Show, Data, Typeable, Generic)
listAlertPoliciesResponse
:: ListAlertPoliciesResponse
listAlertPoliciesResponse =
ListAlertPoliciesResponse'
{_laprNextPageToken = Nothing, _laprAlertPolicies = Nothing}
laprNextPageToken :: Lens' ListAlertPoliciesResponse (Maybe Text)
laprNextPageToken
= lens _laprNextPageToken
(\ s a -> s{_laprNextPageToken = a})
laprAlertPolicies :: Lens' ListAlertPoliciesResponse [AlertPolicy]
laprAlertPolicies
= lens _laprAlertPolicies
(\ s a -> s{_laprAlertPolicies = a})
. _Default
. _Coerce
instance FromJSON ListAlertPoliciesResponse where
parseJSON
= withObject "ListAlertPoliciesResponse"
(\ o ->
ListAlertPoliciesResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "alertPolicies" .!= mempty))
instance ToJSON ListAlertPoliciesResponse where
toJSON ListAlertPoliciesResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _laprNextPageToken,
("alertPolicies" .=) <$> _laprAlertPolicies])
newtype TCPCheck =
TCPCheck'
{ _tcPort :: Maybe (Textual Int32)
}
deriving (Eq, Show, Data, Typeable, Generic)
tcpCheck
:: TCPCheck
tcpCheck = TCPCheck' {_tcPort = Nothing}
tcPort :: Lens' TCPCheck (Maybe Int32)
tcPort
= lens _tcPort (\ s a -> s{_tcPort = a}) .
mapping _Coerce
instance FromJSON TCPCheck where
parseJSON
= withObject "TCPCheck"
(\ o -> TCPCheck' <$> (o .:? "port"))
instance ToJSON TCPCheck where
toJSON TCPCheck'{..}
= object (catMaybes [("port" .=) <$> _tcPort])
data MetricAbsence =
MetricAbsence'
{ _maAggregations :: !(Maybe [Aggregation])
, _maFilter :: !(Maybe Text)
, _maTrigger :: !(Maybe Trigger)
, _maDuration :: !(Maybe GDuration)
}
deriving (Eq, Show, Data, Typeable, Generic)
metricAbsence
:: MetricAbsence
metricAbsence =
MetricAbsence'
{ _maAggregations = Nothing
, _maFilter = Nothing
, _maTrigger = Nothing
, _maDuration = Nothing
}
maAggregations :: Lens' MetricAbsence [Aggregation]
maAggregations
= lens _maAggregations
(\ s a -> s{_maAggregations = a})
. _Default
. _Coerce
maFilter :: Lens' MetricAbsence (Maybe Text)
maFilter = lens _maFilter (\ s a -> s{_maFilter = a})
maTrigger :: Lens' MetricAbsence (Maybe Trigger)
maTrigger
= lens _maTrigger (\ s a -> s{_maTrigger = a})
maDuration :: Lens' MetricAbsence (Maybe Scientific)
maDuration
= lens _maDuration (\ s a -> s{_maDuration = a}) .
mapping _GDuration
instance FromJSON MetricAbsence where
parseJSON
= withObject "MetricAbsence"
(\ o ->
MetricAbsence' <$>
(o .:? "aggregations" .!= mempty) <*>
(o .:? "filter")
<*> (o .:? "trigger")
<*> (o .:? "duration"))
instance ToJSON MetricAbsence where
toJSON MetricAbsence'{..}
= object
(catMaybes
[("aggregations" .=) <$> _maAggregations,
("filter" .=) <$> _maFilter,
("trigger" .=) <$> _maTrigger,
("duration" .=) <$> _maDuration])
data CollectdValueError =
CollectdValueError'
{ _cveError :: !(Maybe Status)
, _cveIndex :: !(Maybe (Textual Int32))
}
deriving (Eq, Show, Data, Typeable, Generic)
collectdValueError
:: CollectdValueError
collectdValueError =
CollectdValueError' {_cveError = Nothing, _cveIndex = Nothing}
cveError :: Lens' CollectdValueError (Maybe Status)
cveError = lens _cveError (\ s a -> s{_cveError = a})
cveIndex :: Lens' CollectdValueError (Maybe Int32)
cveIndex
= lens _cveIndex (\ s a -> s{_cveIndex = a}) .
mapping _Coerce
instance FromJSON CollectdValueError where
parseJSON
= withObject "CollectdValueError"
(\ o ->
CollectdValueError' <$>
(o .:? "error") <*> (o .:? "index"))
instance ToJSON CollectdValueError where
toJSON CollectdValueError'{..}
= object
(catMaybes
[("error" .=) <$> _cveError,
("index" .=) <$> _cveIndex])