module Network.Google.ResourceViews.Types.Product where
import Network.Google.Prelude
import Network.Google.ResourceViews.Types.Sum
data OperationWarningsItemDataItem = OperationWarningsItemDataItem'
{ _owidiValue :: !(Maybe Text)
, _owidiKey :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
operationWarningsItemDataItem
:: OperationWarningsItemDataItem
operationWarningsItemDataItem =
OperationWarningsItemDataItem'
{ _owidiValue = Nothing
, _owidiKey = Nothing
}
owidiValue :: Lens' OperationWarningsItemDataItem (Maybe Text)
owidiValue
= lens _owidiValue (\ s a -> s{_owidiValue = a})
owidiKey :: Lens' OperationWarningsItemDataItem (Maybe Text)
owidiKey = lens _owidiKey (\ s a -> s{_owidiKey = a})
instance FromJSON OperationWarningsItemDataItem where
parseJSON
= withObject "OperationWarningsItemDataItem"
(\ o ->
OperationWarningsItemDataItem' <$>
(o .:? "value") <*> (o .:? "key"))
instance ToJSON OperationWarningsItemDataItem where
toJSON OperationWarningsItemDataItem'{..}
= object
(catMaybes
[("value" .=) <$> _owidiValue,
("key" .=) <$> _owidiKey])
data OperationList = OperationList'
{ _olNextPageToken :: !(Maybe Text)
, _olKind :: !Text
, _olItems :: !(Maybe [Operation])
, _olSelfLink :: !(Maybe Text)
, _olId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
operationList
:: OperationList
operationList =
OperationList'
{ _olNextPageToken = Nothing
, _olKind = "resourceviews#operationList"
, _olItems = Nothing
, _olSelfLink = Nothing
, _olId = Nothing
}
olNextPageToken :: Lens' OperationList (Maybe Text)
olNextPageToken
= lens _olNextPageToken
(\ s a -> s{_olNextPageToken = a})
olKind :: Lens' OperationList Text
olKind = lens _olKind (\ s a -> s{_olKind = a})
olItems :: Lens' OperationList [Operation]
olItems
= lens _olItems (\ s a -> s{_olItems = a}) . _Default
. _Coerce
olSelfLink :: Lens' OperationList (Maybe Text)
olSelfLink
= lens _olSelfLink (\ s a -> s{_olSelfLink = a})
olId :: Lens' OperationList (Maybe Text)
olId = lens _olId (\ s a -> s{_olId = a})
instance FromJSON OperationList where
parseJSON
= withObject "OperationList"
(\ o ->
OperationList' <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!= "resourceviews#operationList")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "selfLink")
<*> (o .:? "id"))
instance ToJSON OperationList where
toJSON OperationList'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _olNextPageToken,
Just ("kind" .= _olKind), ("items" .=) <$> _olItems,
("selfLink" .=) <$> _olSelfLink,
("id" .=) <$> _olId])
data ResourceView = ResourceView'
{ _rvSize :: !(Maybe (Textual Word32))
, _rvKind :: !Text
, _rvFingerprint :: !(Maybe Text)
, _rvNetwork :: !(Maybe Text)
, _rvResources :: !(Maybe [Text])
, _rvSelfLink :: !(Maybe Text)
, _rvName :: !(Maybe Text)
, _rvCreationTimestamp :: !(Maybe Text)
, _rvId :: !(Maybe Text)
, _rvLabels :: !(Maybe [Label])
, _rvEndpoints :: !(Maybe [ServiceEndpoint])
, _rvDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
resourceView
:: ResourceView
resourceView =
ResourceView'
{ _rvSize = Nothing
, _rvKind = "resourceviews#resourceView"
, _rvFingerprint = Nothing
, _rvNetwork = Nothing
, _rvResources = Nothing
, _rvSelfLink = Nothing
, _rvName = Nothing
, _rvCreationTimestamp = Nothing
, _rvId = Nothing
, _rvLabels = Nothing
, _rvEndpoints = Nothing
, _rvDescription = Nothing
}
rvSize :: Lens' ResourceView (Maybe Word32)
rvSize
= lens _rvSize (\ s a -> s{_rvSize = a}) .
mapping _Coerce
rvKind :: Lens' ResourceView Text
rvKind = lens _rvKind (\ s a -> s{_rvKind = a})
rvFingerprint :: Lens' ResourceView (Maybe Text)
rvFingerprint
= lens _rvFingerprint
(\ s a -> s{_rvFingerprint = a})
rvNetwork :: Lens' ResourceView (Maybe Text)
rvNetwork
= lens _rvNetwork (\ s a -> s{_rvNetwork = a})
rvResources :: Lens' ResourceView [Text]
rvResources
= lens _rvResources (\ s a -> s{_rvResources = a}) .
_Default
. _Coerce
rvSelfLink :: Lens' ResourceView (Maybe Text)
rvSelfLink
= lens _rvSelfLink (\ s a -> s{_rvSelfLink = a})
rvName :: Lens' ResourceView (Maybe Text)
rvName = lens _rvName (\ s a -> s{_rvName = a})
rvCreationTimestamp :: Lens' ResourceView (Maybe Text)
rvCreationTimestamp
= lens _rvCreationTimestamp
(\ s a -> s{_rvCreationTimestamp = a})
rvId :: Lens' ResourceView (Maybe Text)
rvId = lens _rvId (\ s a -> s{_rvId = a})
rvLabels :: Lens' ResourceView [Label]
rvLabels
= lens _rvLabels (\ s a -> s{_rvLabels = a}) .
_Default
. _Coerce
rvEndpoints :: Lens' ResourceView [ServiceEndpoint]
rvEndpoints
= lens _rvEndpoints (\ s a -> s{_rvEndpoints = a}) .
_Default
. _Coerce
rvDescription :: Lens' ResourceView (Maybe Text)
rvDescription
= lens _rvDescription
(\ s a -> s{_rvDescription = a})
instance FromJSON ResourceView where
parseJSON
= withObject "ResourceView"
(\ o ->
ResourceView' <$>
(o .:? "size") <*>
(o .:? "kind" .!= "resourceviews#resourceView")
<*> (o .:? "fingerprint")
<*> (o .:? "network")
<*> (o .:? "resources" .!= mempty)
<*> (o .:? "selfLink")
<*> (o .:? "name")
<*> (o .:? "creationTimestamp")
<*> (o .:? "id")
<*> (o .:? "labels" .!= mempty)
<*> (o .:? "endpoints" .!= mempty)
<*> (o .:? "description"))
instance ToJSON ResourceView where
toJSON ResourceView'{..}
= object
(catMaybes
[("size" .=) <$> _rvSize, Just ("kind" .= _rvKind),
("fingerprint" .=) <$> _rvFingerprint,
("network" .=) <$> _rvNetwork,
("resources" .=) <$> _rvResources,
("selfLink" .=) <$> _rvSelfLink,
("name" .=) <$> _rvName,
("creationTimestamp" .=) <$> _rvCreationTimestamp,
("id" .=) <$> _rvId, ("labels" .=) <$> _rvLabels,
("endpoints" .=) <$> _rvEndpoints,
("description" .=) <$> _rvDescription])
data ZoneViewsList = ZoneViewsList'
{ _zvlNextPageToken :: !(Maybe Text)
, _zvlKind :: !Text
, _zvlItems :: !(Maybe [ResourceView])
, _zvlSelfLink :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
zoneViewsList
:: ZoneViewsList
zoneViewsList =
ZoneViewsList'
{ _zvlNextPageToken = Nothing
, _zvlKind = "resourceviews#zoneViewsList"
, _zvlItems = Nothing
, _zvlSelfLink = Nothing
}
zvlNextPageToken :: Lens' ZoneViewsList (Maybe Text)
zvlNextPageToken
= lens _zvlNextPageToken
(\ s a -> s{_zvlNextPageToken = a})
zvlKind :: Lens' ZoneViewsList Text
zvlKind = lens _zvlKind (\ s a -> s{_zvlKind = a})
zvlItems :: Lens' ZoneViewsList [ResourceView]
zvlItems
= lens _zvlItems (\ s a -> s{_zvlItems = a}) .
_Default
. _Coerce
zvlSelfLink :: Lens' ZoneViewsList (Maybe Text)
zvlSelfLink
= lens _zvlSelfLink (\ s a -> s{_zvlSelfLink = a})
instance FromJSON ZoneViewsList where
parseJSON
= withObject "ZoneViewsList"
(\ o ->
ZoneViewsList' <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!= "resourceviews#zoneViewsList")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "selfLink"))
instance ToJSON ZoneViewsList where
toJSON ZoneViewsList'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _zvlNextPageToken,
Just ("kind" .= _zvlKind),
("items" .=) <$> _zvlItems,
("selfLink" .=) <$> _zvlSelfLink])
data Operation = Operation'
{ _oTargetId :: !(Maybe (Textual Word64))
, _oStatus :: !(Maybe Text)
, _oInsertTime :: !(Maybe Text)
, _oProgress :: !(Maybe (Textual Int32))
, _oStartTime :: !(Maybe Text)
, _oKind :: !Text
, _oError :: !(Maybe OperationError)
, _oHTTPErrorMessage :: !(Maybe Text)
, _oZone :: !(Maybe Text)
, _oWarnings :: !(Maybe [OperationWarningsItem])
, _oHTTPErrorStatusCode :: !(Maybe (Textual Int32))
, _oUser :: !(Maybe Text)
, _oSelfLink :: !(Maybe Text)
, _oName :: !(Maybe Text)
, _oStatusMessage :: !(Maybe Text)
, _oCreationTimestamp :: !(Maybe Text)
, _oEndTime :: !(Maybe Text)
, _oId :: !(Maybe (Textual Word64))
, _oOperationType :: !(Maybe Text)
, _oRegion :: !(Maybe Text)
, _oTargetLink :: !(Maybe Text)
, _oClientOperationId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
operation
:: Operation
operation =
Operation'
{ _oTargetId = Nothing
, _oStatus = Nothing
, _oInsertTime = Nothing
, _oProgress = Nothing
, _oStartTime = Nothing
, _oKind = "resourceviews#operation"
, _oError = Nothing
, _oHTTPErrorMessage = Nothing
, _oZone = Nothing
, _oWarnings = Nothing
, _oHTTPErrorStatusCode = Nothing
, _oUser = Nothing
, _oSelfLink = Nothing
, _oName = Nothing
, _oStatusMessage = Nothing
, _oCreationTimestamp = Nothing
, _oEndTime = Nothing
, _oId = Nothing
, _oOperationType = Nothing
, _oRegion = Nothing
, _oTargetLink = Nothing
, _oClientOperationId = Nothing
}
oTargetId :: Lens' Operation (Maybe Word64)
oTargetId
= lens _oTargetId (\ s a -> s{_oTargetId = a}) .
mapping _Coerce
oStatus :: Lens' Operation (Maybe Text)
oStatus = lens _oStatus (\ s a -> s{_oStatus = a})
oInsertTime :: Lens' Operation (Maybe Text)
oInsertTime
= lens _oInsertTime (\ s a -> s{_oInsertTime = a})
oProgress :: Lens' Operation (Maybe Int32)
oProgress
= lens _oProgress (\ s a -> s{_oProgress = a}) .
mapping _Coerce
oStartTime :: Lens' Operation (Maybe Text)
oStartTime
= lens _oStartTime (\ s a -> s{_oStartTime = a})
oKind :: Lens' Operation Text
oKind = lens _oKind (\ s a -> s{_oKind = a})
oError :: Lens' Operation (Maybe OperationError)
oError = lens _oError (\ s a -> s{_oError = a})
oHTTPErrorMessage :: Lens' Operation (Maybe Text)
oHTTPErrorMessage
= lens _oHTTPErrorMessage
(\ s a -> s{_oHTTPErrorMessage = a})
oZone :: Lens' Operation (Maybe Text)
oZone = lens _oZone (\ s a -> s{_oZone = a})
oWarnings :: Lens' Operation [OperationWarningsItem]
oWarnings
= lens _oWarnings (\ s a -> s{_oWarnings = a}) .
_Default
. _Coerce
oHTTPErrorStatusCode :: Lens' Operation (Maybe Int32)
oHTTPErrorStatusCode
= lens _oHTTPErrorStatusCode
(\ s a -> s{_oHTTPErrorStatusCode = a})
. mapping _Coerce
oUser :: Lens' Operation (Maybe Text)
oUser = lens _oUser (\ s a -> s{_oUser = a})
oSelfLink :: Lens' Operation (Maybe Text)
oSelfLink
= lens _oSelfLink (\ s a -> s{_oSelfLink = a})
oName :: Lens' Operation (Maybe Text)
oName = lens _oName (\ s a -> s{_oName = a})
oStatusMessage :: Lens' Operation (Maybe Text)
oStatusMessage
= lens _oStatusMessage
(\ s a -> s{_oStatusMessage = a})
oCreationTimestamp :: Lens' Operation (Maybe Text)
oCreationTimestamp
= lens _oCreationTimestamp
(\ s a -> s{_oCreationTimestamp = a})
oEndTime :: Lens' Operation (Maybe Text)
oEndTime = lens _oEndTime (\ s a -> s{_oEndTime = a})
oId :: Lens' Operation (Maybe Word64)
oId
= lens _oId (\ s a -> s{_oId = a}) . mapping _Coerce
oOperationType :: Lens' Operation (Maybe Text)
oOperationType
= lens _oOperationType
(\ s a -> s{_oOperationType = a})
oRegion :: Lens' Operation (Maybe Text)
oRegion = lens _oRegion (\ s a -> s{_oRegion = a})
oTargetLink :: Lens' Operation (Maybe Text)
oTargetLink
= lens _oTargetLink (\ s a -> s{_oTargetLink = a})
oClientOperationId :: Lens' Operation (Maybe Text)
oClientOperationId
= lens _oClientOperationId
(\ s a -> s{_oClientOperationId = a})
instance FromJSON Operation where
parseJSON
= withObject "Operation"
(\ o ->
Operation' <$>
(o .:? "targetId") <*> (o .:? "status") <*>
(o .:? "insertTime")
<*> (o .:? "progress")
<*> (o .:? "startTime")
<*> (o .:? "kind" .!= "resourceviews#operation")
<*> (o .:? "error")
<*> (o .:? "httpErrorMessage")
<*> (o .:? "zone")
<*> (o .:? "warnings" .!= mempty)
<*> (o .:? "httpErrorStatusCode")
<*> (o .:? "user")
<*> (o .:? "selfLink")
<*> (o .:? "name")
<*> (o .:? "statusMessage")
<*> (o .:? "creationTimestamp")
<*> (o .:? "endTime")
<*> (o .:? "id")
<*> (o .:? "operationType")
<*> (o .:? "region")
<*> (o .:? "targetLink")
<*> (o .:? "clientOperationId"))
instance ToJSON Operation where
toJSON Operation'{..}
= object
(catMaybes
[("targetId" .=) <$> _oTargetId,
("status" .=) <$> _oStatus,
("insertTime" .=) <$> _oInsertTime,
("progress" .=) <$> _oProgress,
("startTime" .=) <$> _oStartTime,
Just ("kind" .= _oKind), ("error" .=) <$> _oError,
("httpErrorMessage" .=) <$> _oHTTPErrorMessage,
("zone" .=) <$> _oZone,
("warnings" .=) <$> _oWarnings,
("httpErrorStatusCode" .=) <$> _oHTTPErrorStatusCode,
("user" .=) <$> _oUser,
("selfLink" .=) <$> _oSelfLink,
("name" .=) <$> _oName,
("statusMessage" .=) <$> _oStatusMessage,
("creationTimestamp" .=) <$> _oCreationTimestamp,
("endTime" .=) <$> _oEndTime, ("id" .=) <$> _oId,
("operationType" .=) <$> _oOperationType,
("region" .=) <$> _oRegion,
("targetLink" .=) <$> _oTargetLink,
("clientOperationId" .=) <$> _oClientOperationId])
data ZoneViewsListResourcesResponse = ZoneViewsListResourcesResponse'
{ _zvlrrNextPageToken :: !(Maybe Text)
, _zvlrrItems :: !(Maybe [ListResourceResponseItem])
, _zvlrrNetwork :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
zoneViewsListResourcesResponse
:: ZoneViewsListResourcesResponse
zoneViewsListResourcesResponse =
ZoneViewsListResourcesResponse'
{ _zvlrrNextPageToken = Nothing
, _zvlrrItems = Nothing
, _zvlrrNetwork = Nothing
}
zvlrrNextPageToken :: Lens' ZoneViewsListResourcesResponse (Maybe Text)
zvlrrNextPageToken
= lens _zvlrrNextPageToken
(\ s a -> s{_zvlrrNextPageToken = a})
zvlrrItems :: Lens' ZoneViewsListResourcesResponse [ListResourceResponseItem]
zvlrrItems
= lens _zvlrrItems (\ s a -> s{_zvlrrItems = a}) .
_Default
. _Coerce
zvlrrNetwork :: Lens' ZoneViewsListResourcesResponse (Maybe Text)
zvlrrNetwork
= lens _zvlrrNetwork (\ s a -> s{_zvlrrNetwork = a})
instance FromJSON ZoneViewsListResourcesResponse
where
parseJSON
= withObject "ZoneViewsListResourcesResponse"
(\ o ->
ZoneViewsListResourcesResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "items" .!= mempty)
<*> (o .:? "network"))
instance ToJSON ZoneViewsListResourcesResponse where
toJSON ZoneViewsListResourcesResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _zvlrrNextPageToken,
("items" .=) <$> _zvlrrItems,
("network" .=) <$> _zvlrrNetwork])
data ServiceEndpoint = ServiceEndpoint'
{ _seName :: !(Maybe Text)
, _sePort :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
serviceEndpoint
:: ServiceEndpoint
serviceEndpoint =
ServiceEndpoint'
{ _seName = Nothing
, _sePort = Nothing
}
seName :: Lens' ServiceEndpoint (Maybe Text)
seName = lens _seName (\ s a -> s{_seName = a})
sePort :: Lens' ServiceEndpoint (Maybe Int32)
sePort
= lens _sePort (\ s a -> s{_sePort = a}) .
mapping _Coerce
instance FromJSON ServiceEndpoint where
parseJSON
= withObject "ServiceEndpoint"
(\ o ->
ServiceEndpoint' <$>
(o .:? "name") <*> (o .:? "port"))
instance ToJSON ServiceEndpoint where
toJSON ServiceEndpoint'{..}
= object
(catMaybes
[("name" .=) <$> _seName, ("port" .=) <$> _sePort])
newtype ZoneViewsRemoveResourcesRequest = ZoneViewsRemoveResourcesRequest'
{ _zvrrrResources :: Maybe [Text]
} deriving (Eq,Show,Data,Typeable,Generic)
zoneViewsRemoveResourcesRequest
:: ZoneViewsRemoveResourcesRequest
zoneViewsRemoveResourcesRequest =
ZoneViewsRemoveResourcesRequest'
{ _zvrrrResources = Nothing
}
zvrrrResources :: Lens' ZoneViewsRemoveResourcesRequest [Text]
zvrrrResources
= lens _zvrrrResources
(\ s a -> s{_zvrrrResources = a})
. _Default
. _Coerce
instance FromJSON ZoneViewsRemoveResourcesRequest
where
parseJSON
= withObject "ZoneViewsRemoveResourcesRequest"
(\ o ->
ZoneViewsRemoveResourcesRequest' <$>
(o .:? "resources" .!= mempty))
instance ToJSON ZoneViewsRemoveResourcesRequest where
toJSON ZoneViewsRemoveResourcesRequest'{..}
= object
(catMaybes [("resources" .=) <$> _zvrrrResources])
newtype ListResourceResponseItemEndpoints = ListResourceResponseItemEndpoints'
{ _lrrieAddtional :: HashMap Text [Textual Int32]
} deriving (Eq,Show,Data,Typeable,Generic)
listResourceResponseItemEndpoints
:: HashMap Text [Int32]
-> ListResourceResponseItemEndpoints
listResourceResponseItemEndpoints pLrrieAddtional_ =
ListResourceResponseItemEndpoints'
{ _lrrieAddtional = _Coerce # pLrrieAddtional_
}
lrrieAddtional :: Lens' ListResourceResponseItemEndpoints (HashMap Text [Int32])
lrrieAddtional
= lens _lrrieAddtional
(\ s a -> s{_lrrieAddtional = a})
. _Coerce
instance FromJSON ListResourceResponseItemEndpoints
where
parseJSON
= withObject "ListResourceResponseItemEndpoints"
(\ o ->
ListResourceResponseItemEndpoints' <$>
(parseJSONObject o))
instance ToJSON ListResourceResponseItemEndpoints
where
toJSON = toJSON . _lrrieAddtional
newtype ZoneViewsAddResourcesRequest = ZoneViewsAddResourcesRequest'
{ _zvarrResources :: Maybe [Text]
} deriving (Eq,Show,Data,Typeable,Generic)
zoneViewsAddResourcesRequest
:: ZoneViewsAddResourcesRequest
zoneViewsAddResourcesRequest =
ZoneViewsAddResourcesRequest'
{ _zvarrResources = Nothing
}
zvarrResources :: Lens' ZoneViewsAddResourcesRequest [Text]
zvarrResources
= lens _zvarrResources
(\ s a -> s{_zvarrResources = a})
. _Default
. _Coerce
instance FromJSON ZoneViewsAddResourcesRequest where
parseJSON
= withObject "ZoneViewsAddResourcesRequest"
(\ o ->
ZoneViewsAddResourcesRequest' <$>
(o .:? "resources" .!= mempty))
instance ToJSON ZoneViewsAddResourcesRequest where
toJSON ZoneViewsAddResourcesRequest'{..}
= object
(catMaybes [("resources" .=) <$> _zvarrResources])
newtype OperationError = OperationError'
{ _oeErrors :: Maybe [OperationErrorErrorsItem]
} deriving (Eq,Show,Data,Typeable,Generic)
operationError
:: OperationError
operationError =
OperationError'
{ _oeErrors = Nothing
}
oeErrors :: Lens' OperationError [OperationErrorErrorsItem]
oeErrors
= lens _oeErrors (\ s a -> s{_oeErrors = a}) .
_Default
. _Coerce
instance FromJSON OperationError where
parseJSON
= withObject "OperationError"
(\ o ->
OperationError' <$> (o .:? "errors" .!= mempty))
instance ToJSON OperationError where
toJSON OperationError'{..}
= object (catMaybes [("errors" .=) <$> _oeErrors])
data ZoneViewsGetServiceResponse = ZoneViewsGetServiceResponse'
{ _zvgsrFingerprint :: !(Maybe Text)
, _zvgsrEndpoints :: !(Maybe [ServiceEndpoint])
} deriving (Eq,Show,Data,Typeable,Generic)
zoneViewsGetServiceResponse
:: ZoneViewsGetServiceResponse
zoneViewsGetServiceResponse =
ZoneViewsGetServiceResponse'
{ _zvgsrFingerprint = Nothing
, _zvgsrEndpoints = Nothing
}
zvgsrFingerprint :: Lens' ZoneViewsGetServiceResponse (Maybe Text)
zvgsrFingerprint
= lens _zvgsrFingerprint
(\ s a -> s{_zvgsrFingerprint = a})
zvgsrEndpoints :: Lens' ZoneViewsGetServiceResponse [ServiceEndpoint]
zvgsrEndpoints
= lens _zvgsrEndpoints
(\ s a -> s{_zvgsrEndpoints = a})
. _Default
. _Coerce
instance FromJSON ZoneViewsGetServiceResponse where
parseJSON
= withObject "ZoneViewsGetServiceResponse"
(\ o ->
ZoneViewsGetServiceResponse' <$>
(o .:? "fingerprint") <*>
(o .:? "endpoints" .!= mempty))
instance ToJSON ZoneViewsGetServiceResponse where
toJSON ZoneViewsGetServiceResponse'{..}
= object
(catMaybes
[("fingerprint" .=) <$> _zvgsrFingerprint,
("endpoints" .=) <$> _zvgsrEndpoints])
data OperationErrorErrorsItem = OperationErrorErrorsItem'
{ _oeeiLocation :: !(Maybe Text)
, _oeeiCode :: !(Maybe Text)
, _oeeiMessage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
operationErrorErrorsItem
:: OperationErrorErrorsItem
operationErrorErrorsItem =
OperationErrorErrorsItem'
{ _oeeiLocation = Nothing
, _oeeiCode = Nothing
, _oeeiMessage = Nothing
}
oeeiLocation :: Lens' OperationErrorErrorsItem (Maybe Text)
oeeiLocation
= lens _oeeiLocation (\ s a -> s{_oeeiLocation = a})
oeeiCode :: Lens' OperationErrorErrorsItem (Maybe Text)
oeeiCode = lens _oeeiCode (\ s a -> s{_oeeiCode = a})
oeeiMessage :: Lens' OperationErrorErrorsItem (Maybe Text)
oeeiMessage
= lens _oeeiMessage (\ s a -> s{_oeeiMessage = a})
instance FromJSON OperationErrorErrorsItem where
parseJSON
= withObject "OperationErrorErrorsItem"
(\ o ->
OperationErrorErrorsItem' <$>
(o .:? "location") <*> (o .:? "code") <*>
(o .:? "message"))
instance ToJSON OperationErrorErrorsItem where
toJSON OperationErrorErrorsItem'{..}
= object
(catMaybes
[("location" .=) <$> _oeeiLocation,
("code" .=) <$> _oeeiCode,
("message" .=) <$> _oeeiMessage])
data ZoneViewsSetServiceRequest = ZoneViewsSetServiceRequest'
{ _zvssrResourceName :: !(Maybe Text)
, _zvssrFingerprint :: !(Maybe Text)
, _zvssrEndpoints :: !(Maybe [ServiceEndpoint])
} deriving (Eq,Show,Data,Typeable,Generic)
zoneViewsSetServiceRequest
:: ZoneViewsSetServiceRequest
zoneViewsSetServiceRequest =
ZoneViewsSetServiceRequest'
{ _zvssrResourceName = Nothing
, _zvssrFingerprint = Nothing
, _zvssrEndpoints = Nothing
}
zvssrResourceName :: Lens' ZoneViewsSetServiceRequest (Maybe Text)
zvssrResourceName
= lens _zvssrResourceName
(\ s a -> s{_zvssrResourceName = a})
zvssrFingerprint :: Lens' ZoneViewsSetServiceRequest (Maybe Text)
zvssrFingerprint
= lens _zvssrFingerprint
(\ s a -> s{_zvssrFingerprint = a})
zvssrEndpoints :: Lens' ZoneViewsSetServiceRequest [ServiceEndpoint]
zvssrEndpoints
= lens _zvssrEndpoints
(\ s a -> s{_zvssrEndpoints = a})
. _Default
. _Coerce
instance FromJSON ZoneViewsSetServiceRequest where
parseJSON
= withObject "ZoneViewsSetServiceRequest"
(\ o ->
ZoneViewsSetServiceRequest' <$>
(o .:? "resourceName") <*> (o .:? "fingerprint") <*>
(o .:? "endpoints" .!= mempty))
instance ToJSON ZoneViewsSetServiceRequest where
toJSON ZoneViewsSetServiceRequest'{..}
= object
(catMaybes
[("resourceName" .=) <$> _zvssrResourceName,
("fingerprint" .=) <$> _zvssrFingerprint,
("endpoints" .=) <$> _zvssrEndpoints])
data ListResourceResponseItem = ListResourceResponseItem'
{ _lrriResource :: !(Maybe Text)
, _lrriEndpoints :: !(Maybe ListResourceResponseItemEndpoints)
} deriving (Eq,Show,Data,Typeable,Generic)
listResourceResponseItem
:: ListResourceResponseItem
listResourceResponseItem =
ListResourceResponseItem'
{ _lrriResource = Nothing
, _lrriEndpoints = Nothing
}
lrriResource :: Lens' ListResourceResponseItem (Maybe Text)
lrriResource
= lens _lrriResource (\ s a -> s{_lrriResource = a})
lrriEndpoints :: Lens' ListResourceResponseItem (Maybe ListResourceResponseItemEndpoints)
lrriEndpoints
= lens _lrriEndpoints
(\ s a -> s{_lrriEndpoints = a})
instance FromJSON ListResourceResponseItem where
parseJSON
= withObject "ListResourceResponseItem"
(\ o ->
ListResourceResponseItem' <$>
(o .:? "resource") <*> (o .:? "endpoints"))
instance ToJSON ListResourceResponseItem where
toJSON ListResourceResponseItem'{..}
= object
(catMaybes
[("resource" .=) <$> _lrriResource,
("endpoints" .=) <$> _lrriEndpoints])
data Label = Label'
{ _lValue :: !(Maybe Text)
, _lKey :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
label
:: Label
label =
Label'
{ _lValue = Nothing
, _lKey = Nothing
}
lValue :: Lens' Label (Maybe Text)
lValue = lens _lValue (\ s a -> s{_lValue = a})
lKey :: Lens' Label (Maybe Text)
lKey = lens _lKey (\ s a -> s{_lKey = a})
instance FromJSON Label where
parseJSON
= withObject "Label"
(\ o -> Label' <$> (o .:? "value") <*> (o .:? "key"))
instance ToJSON Label where
toJSON Label'{..}
= object
(catMaybes
[("value" .=) <$> _lValue, ("key" .=) <$> _lKey])
data OperationWarningsItem = OperationWarningsItem'
{ _owiData :: !(Maybe [OperationWarningsItemDataItem])
, _owiCode :: !(Maybe Text)
, _owiMessage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
operationWarningsItem
:: OperationWarningsItem
operationWarningsItem =
OperationWarningsItem'
{ _owiData = Nothing
, _owiCode = Nothing
, _owiMessage = Nothing
}
owiData :: Lens' OperationWarningsItem [OperationWarningsItemDataItem]
owiData
= lens _owiData (\ s a -> s{_owiData = a}) . _Default
. _Coerce
owiCode :: Lens' OperationWarningsItem (Maybe Text)
owiCode = lens _owiCode (\ s a -> s{_owiCode = a})
owiMessage :: Lens' OperationWarningsItem (Maybe Text)
owiMessage
= lens _owiMessage (\ s a -> s{_owiMessage = a})
instance FromJSON OperationWarningsItem where
parseJSON
= withObject "OperationWarningsItem"
(\ o ->
OperationWarningsItem' <$>
(o .:? "data" .!= mempty) <*> (o .:? "code") <*>
(o .:? "message"))
instance ToJSON OperationWarningsItem where
toJSON OperationWarningsItem'{..}
= object
(catMaybes
[("data" .=) <$> _owiData, ("code" .=) <$> _owiCode,
("message" .=) <$> _owiMessage])