{-# 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.CloudSearch.Types.Product where
import Network.Google.CloudSearch.Types.Sum
import Network.Google.Prelude
newtype GmailFolderRestrict =
GmailFolderRestrict'
{ _gfrType :: Maybe GmailFolderRestrictType
}
deriving (Eq, Show, Data, Typeable, Generic)
gmailFolderRestrict
:: GmailFolderRestrict
gmailFolderRestrict = GmailFolderRestrict' {_gfrType = Nothing}
gfrType :: Lens' GmailFolderRestrict (Maybe GmailFolderRestrictType)
gfrType = lens _gfrType (\ s a -> s{_gfrType = a})
instance FromJSON GmailFolderRestrict where
parseJSON
= withObject "GmailFolderRestrict"
(\ o -> GmailFolderRestrict' <$> (o .:? "type"))
instance ToJSON GmailFolderRestrict where
toJSON GmailFolderRestrict'{..}
= object (catMaybes [("type" .=) <$> _gfrType])
data ItemContent =
ItemContent'
{ _icHash :: !(Maybe Text)
, _icContentFormat :: !(Maybe ItemContentContentFormat)
, _icContentDataRef :: !(Maybe UploadItemRef)
, _icInlineContent :: !(Maybe Bytes)
}
deriving (Eq, Show, Data, Typeable, Generic)
itemContent
:: ItemContent
itemContent =
ItemContent'
{ _icHash = Nothing
, _icContentFormat = Nothing
, _icContentDataRef = Nothing
, _icInlineContent = Nothing
}
icHash :: Lens' ItemContent (Maybe Text)
icHash = lens _icHash (\ s a -> s{_icHash = a})
icContentFormat :: Lens' ItemContent (Maybe ItemContentContentFormat)
icContentFormat
= lens _icContentFormat
(\ s a -> s{_icContentFormat = a})
icContentDataRef :: Lens' ItemContent (Maybe UploadItemRef)
icContentDataRef
= lens _icContentDataRef
(\ s a -> s{_icContentDataRef = a})
icInlineContent :: Lens' ItemContent (Maybe ByteString)
icInlineContent
= lens _icInlineContent
(\ s a -> s{_icInlineContent = a})
. mapping _Bytes
instance FromJSON ItemContent where
parseJSON
= withObject "ItemContent"
(\ o ->
ItemContent' <$>
(o .:? "hash") <*> (o .:? "contentFormat") <*>
(o .:? "contentDataRef")
<*> (o .:? "inlineContent"))
instance ToJSON ItemContent where
toJSON ItemContent'{..}
= object
(catMaybes
[("hash" .=) <$> _icHash,
("contentFormat" .=) <$> _icContentFormat,
("contentDataRef" .=) <$> _icContentDataRef,
("inlineContent" .=) <$> _icInlineContent])
newtype Photo =
Photo'
{ _pURL :: Maybe Text
}
deriving (Eq, Show, Data, Typeable, Generic)
photo
:: Photo
photo = Photo' {_pURL = Nothing}
pURL :: Lens' Photo (Maybe Text)
pURL = lens _pURL (\ s a -> s{_pURL = a})
instance FromJSON Photo where
parseJSON
= withObject "Photo"
(\ o -> Photo' <$> (o .:? "url"))
instance ToJSON Photo where
toJSON Photo'{..}
= object (catMaybes [("url" .=) <$> _pURL])
data SearchItemsByViewURLRequest =
SearchItemsByViewURLRequest'
{ _sibvurDebugOptions :: !(Maybe DebugOptions)
, _sibvurPageToken :: !(Maybe Text)
, _sibvurViewURL :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
searchItemsByViewURLRequest
:: SearchItemsByViewURLRequest
searchItemsByViewURLRequest =
SearchItemsByViewURLRequest'
{ _sibvurDebugOptions = Nothing
, _sibvurPageToken = Nothing
, _sibvurViewURL = Nothing
}
sibvurDebugOptions :: Lens' SearchItemsByViewURLRequest (Maybe DebugOptions)
sibvurDebugOptions
= lens _sibvurDebugOptions
(\ s a -> s{_sibvurDebugOptions = a})
sibvurPageToken :: Lens' SearchItemsByViewURLRequest (Maybe Text)
sibvurPageToken
= lens _sibvurPageToken
(\ s a -> s{_sibvurPageToken = a})
sibvurViewURL :: Lens' SearchItemsByViewURLRequest (Maybe Text)
sibvurViewURL
= lens _sibvurViewURL
(\ s a -> s{_sibvurViewURL = a})
instance FromJSON SearchItemsByViewURLRequest where
parseJSON
= withObject "SearchItemsByViewURLRequest"
(\ o ->
SearchItemsByViewURLRequest' <$>
(o .:? "debugOptions") <*> (o .:? "pageToken") <*>
(o .:? "viewUrl"))
instance ToJSON SearchItemsByViewURLRequest where
toJSON SearchItemsByViewURLRequest'{..}
= object
(catMaybes
[("debugOptions" .=) <$> _sibvurDebugOptions,
("pageToken" .=) <$> _sibvurPageToken,
("viewUrl" .=) <$> _sibvurViewURL])
data SearchApplication =
SearchApplication'
{ _saDataSourceRestrictions :: !(Maybe [DataSourceRestriction])
, _saOperationIds :: !(Maybe [Text])
, _saDefaultFacetOptions :: !(Maybe [FacetOptions])
, _saScoringConfig :: !(Maybe ScoringConfig)
, _saName :: !(Maybe Text)
, _saSourceConfig :: !(Maybe [SourceConfig])
, _saDisplayName :: !(Maybe Text)
, _saDefaultSortOptions :: !(Maybe SortOptions)
}
deriving (Eq, Show, Data, Typeable, Generic)
searchApplication
:: SearchApplication
searchApplication =
SearchApplication'
{ _saDataSourceRestrictions = Nothing
, _saOperationIds = Nothing
, _saDefaultFacetOptions = Nothing
, _saScoringConfig = Nothing
, _saName = Nothing
, _saSourceConfig = Nothing
, _saDisplayName = Nothing
, _saDefaultSortOptions = Nothing
}
saDataSourceRestrictions :: Lens' SearchApplication [DataSourceRestriction]
saDataSourceRestrictions
= lens _saDataSourceRestrictions
(\ s a -> s{_saDataSourceRestrictions = a})
. _Default
. _Coerce
saOperationIds :: Lens' SearchApplication [Text]
saOperationIds
= lens _saOperationIds
(\ s a -> s{_saOperationIds = a})
. _Default
. _Coerce
saDefaultFacetOptions :: Lens' SearchApplication [FacetOptions]
saDefaultFacetOptions
= lens _saDefaultFacetOptions
(\ s a -> s{_saDefaultFacetOptions = a})
. _Default
. _Coerce
saScoringConfig :: Lens' SearchApplication (Maybe ScoringConfig)
saScoringConfig
= lens _saScoringConfig
(\ s a -> s{_saScoringConfig = a})
saName :: Lens' SearchApplication (Maybe Text)
saName = lens _saName (\ s a -> s{_saName = a})
saSourceConfig :: Lens' SearchApplication [SourceConfig]
saSourceConfig
= lens _saSourceConfig
(\ s a -> s{_saSourceConfig = a})
. _Default
. _Coerce
saDisplayName :: Lens' SearchApplication (Maybe Text)
saDisplayName
= lens _saDisplayName
(\ s a -> s{_saDisplayName = a})
saDefaultSortOptions :: Lens' SearchApplication (Maybe SortOptions)
saDefaultSortOptions
= lens _saDefaultSortOptions
(\ s a -> s{_saDefaultSortOptions = a})
instance FromJSON SearchApplication where
parseJSON
= withObject "SearchApplication"
(\ o ->
SearchApplication' <$>
(o .:? "dataSourceRestrictions" .!= mempty) <*>
(o .:? "operationIds" .!= mempty)
<*> (o .:? "defaultFacetOptions" .!= mempty)
<*> (o .:? "scoringConfig")
<*> (o .:? "name")
<*> (o .:? "sourceConfig" .!= mempty)
<*> (o .:? "displayName")
<*> (o .:? "defaultSortOptions"))
instance ToJSON SearchApplication where
toJSON SearchApplication'{..}
= object
(catMaybes
[("dataSourceRestrictions" .=) <$>
_saDataSourceRestrictions,
("operationIds" .=) <$> _saOperationIds,
("defaultFacetOptions" .=) <$>
_saDefaultFacetOptions,
("scoringConfig" .=) <$> _saScoringConfig,
("name" .=) <$> _saName,
("sourceConfig" .=) <$> _saSourceConfig,
("displayName" .=) <$> _saDisplayName,
("defaultSortOptions" .=) <$> _saDefaultSortOptions])
newtype BooleanOperatorOptions =
BooleanOperatorOptions'
{ _booOperatorName :: Maybe Text
}
deriving (Eq, Show, Data, Typeable, Generic)
booleanOperatorOptions
:: BooleanOperatorOptions
booleanOperatorOptions = BooleanOperatorOptions' {_booOperatorName = Nothing}
booOperatorName :: Lens' BooleanOperatorOptions (Maybe Text)
booOperatorName
= lens _booOperatorName
(\ s a -> s{_booOperatorName = a})
instance FromJSON BooleanOperatorOptions where
parseJSON
= withObject "BooleanOperatorOptions"
(\ o ->
BooleanOperatorOptions' <$> (o .:? "operatorName"))
instance ToJSON BooleanOperatorOptions where
toJSON BooleanOperatorOptions'{..}
= object
(catMaybes
[("operatorName" .=) <$> _booOperatorName])
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 EnumPropertyOptions =
EnumPropertyOptions'
{ _epoPossibleValues :: !(Maybe [EnumValuePair])
, _epoOrderedRanking :: !(Maybe EnumPropertyOptionsOrderedRanking)
, _epoOperatorOptions :: !(Maybe EnumOperatorOptions)
}
deriving (Eq, Show, Data, Typeable, Generic)
enumPropertyOptions
:: EnumPropertyOptions
enumPropertyOptions =
EnumPropertyOptions'
{ _epoPossibleValues = Nothing
, _epoOrderedRanking = Nothing
, _epoOperatorOptions = Nothing
}
epoPossibleValues :: Lens' EnumPropertyOptions [EnumValuePair]
epoPossibleValues
= lens _epoPossibleValues
(\ s a -> s{_epoPossibleValues = a})
. _Default
. _Coerce
epoOrderedRanking :: Lens' EnumPropertyOptions (Maybe EnumPropertyOptionsOrderedRanking)
epoOrderedRanking
= lens _epoOrderedRanking
(\ s a -> s{_epoOrderedRanking = a})
epoOperatorOptions :: Lens' EnumPropertyOptions (Maybe EnumOperatorOptions)
epoOperatorOptions
= lens _epoOperatorOptions
(\ s a -> s{_epoOperatorOptions = a})
instance FromJSON EnumPropertyOptions where
parseJSON
= withObject "EnumPropertyOptions"
(\ o ->
EnumPropertyOptions' <$>
(o .:? "possibleValues" .!= mempty) <*>
(o .:? "orderedRanking")
<*> (o .:? "operatorOptions"))
instance ToJSON EnumPropertyOptions where
toJSON EnumPropertyOptions'{..}
= object
(catMaybes
[("possibleValues" .=) <$> _epoPossibleValues,
("orderedRanking" .=) <$> _epoOrderedRanking,
("operatorOptions" .=) <$> _epoOperatorOptions])
newtype GmailActionRestrict =
GmailActionRestrict'
{ _garType :: Maybe GmailActionRestrictType
}
deriving (Eq, Show, Data, Typeable, Generic)
gmailActionRestrict
:: GmailActionRestrict
gmailActionRestrict = GmailActionRestrict' {_garType = Nothing}
garType :: Lens' GmailActionRestrict (Maybe GmailActionRestrictType)
garType = lens _garType (\ s a -> s{_garType = a})
instance FromJSON GmailActionRestrict where
parseJSON
= withObject "GmailActionRestrict"
(\ o -> GmailActionRestrict' <$> (o .:? "type"))
instance ToJSON GmailActionRestrict where
toJSON GmailActionRestrict'{..}
= object (catMaybes [("type" .=) <$> _garType])
data UnreserveItemsRequest =
UnreserveItemsRequest'
{ _uirQueue :: !(Maybe Text)
, _uirDebugOptions :: !(Maybe DebugOptions)
, _uirConnectorName :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
unreserveItemsRequest
:: UnreserveItemsRequest
unreserveItemsRequest =
UnreserveItemsRequest'
{ _uirQueue = Nothing
, _uirDebugOptions = Nothing
, _uirConnectorName = Nothing
}
uirQueue :: Lens' UnreserveItemsRequest (Maybe Text)
uirQueue = lens _uirQueue (\ s a -> s{_uirQueue = a})
uirDebugOptions :: Lens' UnreserveItemsRequest (Maybe DebugOptions)
uirDebugOptions
= lens _uirDebugOptions
(\ s a -> s{_uirDebugOptions = a})
uirConnectorName :: Lens' UnreserveItemsRequest (Maybe Text)
uirConnectorName
= lens _uirConnectorName
(\ s a -> s{_uirConnectorName = a})
instance FromJSON UnreserveItemsRequest where
parseJSON
= withObject "UnreserveItemsRequest"
(\ o ->
UnreserveItemsRequest' <$>
(o .:? "queue") <*> (o .:? "debugOptions") <*>
(o .:? "connectorName"))
instance ToJSON UnreserveItemsRequest where
toJSON UnreserveItemsRequest'{..}
= object
(catMaybes
[("queue" .=) <$> _uirQueue,
("debugOptions" .=) <$> _uirDebugOptions,
("connectorName" .=) <$> _uirConnectorName])
data DateOperatorOptions =
DateOperatorOptions'
{ _dooOperatorName :: !(Maybe Text)
, _dooLessThanOperatorName :: !(Maybe Text)
, _dooGreaterThanOperatorName :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
dateOperatorOptions
:: DateOperatorOptions
dateOperatorOptions =
DateOperatorOptions'
{ _dooOperatorName = Nothing
, _dooLessThanOperatorName = Nothing
, _dooGreaterThanOperatorName = Nothing
}
dooOperatorName :: Lens' DateOperatorOptions (Maybe Text)
dooOperatorName
= lens _dooOperatorName
(\ s a -> s{_dooOperatorName = a})
dooLessThanOperatorName :: Lens' DateOperatorOptions (Maybe Text)
dooLessThanOperatorName
= lens _dooLessThanOperatorName
(\ s a -> s{_dooLessThanOperatorName = a})
dooGreaterThanOperatorName :: Lens' DateOperatorOptions (Maybe Text)
dooGreaterThanOperatorName
= lens _dooGreaterThanOperatorName
(\ s a -> s{_dooGreaterThanOperatorName = a})
instance FromJSON DateOperatorOptions where
parseJSON
= withObject "DateOperatorOptions"
(\ o ->
DateOperatorOptions' <$>
(o .:? "operatorName") <*>
(o .:? "lessThanOperatorName")
<*> (o .:? "greaterThanOperatorName"))
instance ToJSON DateOperatorOptions where
toJSON DateOperatorOptions'{..}
= object
(catMaybes
[("operatorName" .=) <$> _dooOperatorName,
("lessThanOperatorName" .=) <$>
_dooLessThanOperatorName,
("greaterThanOperatorName" .=) <$>
_dooGreaterThanOperatorName])
newtype GetDataSourceIndexStatsResponse =
GetDataSourceIndexStatsResponse'
{ _gdsisrStats :: Maybe [DataSourceIndexStats]
}
deriving (Eq, Show, Data, Typeable, Generic)
getDataSourceIndexStatsResponse
:: GetDataSourceIndexStatsResponse
getDataSourceIndexStatsResponse =
GetDataSourceIndexStatsResponse' {_gdsisrStats = Nothing}
gdsisrStats :: Lens' GetDataSourceIndexStatsResponse [DataSourceIndexStats]
gdsisrStats
= lens _gdsisrStats (\ s a -> s{_gdsisrStats = a}) .
_Default
. _Coerce
instance FromJSON GetDataSourceIndexStatsResponse
where
parseJSON
= withObject "GetDataSourceIndexStatsResponse"
(\ o ->
GetDataSourceIndexStatsResponse' <$>
(o .:? "stats" .!= mempty))
instance ToJSON GetDataSourceIndexStatsResponse where
toJSON GetDataSourceIndexStatsResponse'{..}
= object (catMaybes [("stats" .=) <$> _gdsisrStats])
data ObjectDisplayOptions =
ObjectDisplayOptions'
{ _odoMetalines :: !(Maybe [Metaline])
, _odoObjectDisplayLabel :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
objectDisplayOptions
:: ObjectDisplayOptions
objectDisplayOptions =
ObjectDisplayOptions'
{_odoMetalines = Nothing, _odoObjectDisplayLabel = Nothing}
odoMetalines :: Lens' ObjectDisplayOptions [Metaline]
odoMetalines
= lens _odoMetalines (\ s a -> s{_odoMetalines = a})
. _Default
. _Coerce
odoObjectDisplayLabel :: Lens' ObjectDisplayOptions (Maybe Text)
odoObjectDisplayLabel
= lens _odoObjectDisplayLabel
(\ s a -> s{_odoObjectDisplayLabel = a})
instance FromJSON ObjectDisplayOptions where
parseJSON
= withObject "ObjectDisplayOptions"
(\ o ->
ObjectDisplayOptions' <$>
(o .:? "metalines" .!= mempty) <*>
(o .:? "objectDisplayLabel"))
instance ToJSON ObjectDisplayOptions where
toJSON ObjectDisplayOptions'{..}
= object
(catMaybes
[("metalines" .=) <$> _odoMetalines,
("objectDisplayLabel" .=) <$>
_odoObjectDisplayLabel])
newtype QueryItem =
QueryItem'
{ _qiIsSynthetic :: Maybe Bool
}
deriving (Eq, Show, Data, Typeable, Generic)
queryItem
:: QueryItem
queryItem = QueryItem' {_qiIsSynthetic = Nothing}
qiIsSynthetic :: Lens' QueryItem (Maybe Bool)
qiIsSynthetic
= lens _qiIsSynthetic
(\ s a -> s{_qiIsSynthetic = a})
instance FromJSON QueryItem where
parseJSON
= withObject "QueryItem"
(\ o -> QueryItem' <$> (o .:? "isSynthetic"))
instance ToJSON QueryItem where
toJSON QueryItem'{..}
= object
(catMaybes [("isSynthetic" .=) <$> _qiIsSynthetic])
data ListUnmAppedIdentitiesResponse =
ListUnmAppedIdentitiesResponse'
{ _luairNextPageToken :: !(Maybe Text)
, _luairUnmAppedIdentities :: !(Maybe [UnmAppedIdentity])
}
deriving (Eq, Show, Data, Typeable, Generic)
listUnmAppedIdentitiesResponse
:: ListUnmAppedIdentitiesResponse
listUnmAppedIdentitiesResponse =
ListUnmAppedIdentitiesResponse'
{_luairNextPageToken = Nothing, _luairUnmAppedIdentities = Nothing}
luairNextPageToken :: Lens' ListUnmAppedIdentitiesResponse (Maybe Text)
luairNextPageToken
= lens _luairNextPageToken
(\ s a -> s{_luairNextPageToken = a})
luairUnmAppedIdentities :: Lens' ListUnmAppedIdentitiesResponse [UnmAppedIdentity]
luairUnmAppedIdentities
= lens _luairUnmAppedIdentities
(\ s a -> s{_luairUnmAppedIdentities = a})
. _Default
. _Coerce
instance FromJSON ListUnmAppedIdentitiesResponse
where
parseJSON
= withObject "ListUnmAppedIdentitiesResponse"
(\ o ->
ListUnmAppedIdentitiesResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "unmappedIdentities" .!= mempty))
instance ToJSON ListUnmAppedIdentitiesResponse where
toJSON ListUnmAppedIdentitiesResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _luairNextPageToken,
("unmappedIdentities" .=) <$>
_luairUnmAppedIdentities])
data DeleteQueueItemsRequest =
DeleteQueueItemsRequest'
{ _dqirQueue :: !(Maybe Text)
, _dqirDebugOptions :: !(Maybe DebugOptions)
, _dqirConnectorName :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
deleteQueueItemsRequest
:: DeleteQueueItemsRequest
deleteQueueItemsRequest =
DeleteQueueItemsRequest'
{ _dqirQueue = Nothing
, _dqirDebugOptions = Nothing
, _dqirConnectorName = Nothing
}
dqirQueue :: Lens' DeleteQueueItemsRequest (Maybe Text)
dqirQueue
= lens _dqirQueue (\ s a -> s{_dqirQueue = a})
dqirDebugOptions :: Lens' DeleteQueueItemsRequest (Maybe DebugOptions)
dqirDebugOptions
= lens _dqirDebugOptions
(\ s a -> s{_dqirDebugOptions = a})
dqirConnectorName :: Lens' DeleteQueueItemsRequest (Maybe Text)
dqirConnectorName
= lens _dqirConnectorName
(\ s a -> s{_dqirConnectorName = a})
instance FromJSON DeleteQueueItemsRequest where
parseJSON
= withObject "DeleteQueueItemsRequest"
(\ o ->
DeleteQueueItemsRequest' <$>
(o .:? "queue") <*> (o .:? "debugOptions") <*>
(o .:? "connectorName"))
instance ToJSON DeleteQueueItemsRequest where
toJSON DeleteQueueItemsRequest'{..}
= object
(catMaybes
[("queue" .=) <$> _dqirQueue,
("debugOptions" .=) <$> _dqirDebugOptions,
("connectorName" .=) <$> _dqirConnectorName])
data SearchResult =
SearchResult'
{ _srDebugInfo :: !(Maybe ResultDebugInfo)
, _srSnippet :: !(Maybe Snippet)
, _srURL :: !(Maybe Text)
, _srClusteredResults :: !(Maybe [SearchResult])
, _srMetadata :: !(Maybe Metadata)
, _srTitle :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
searchResult
:: SearchResult
searchResult =
SearchResult'
{ _srDebugInfo = Nothing
, _srSnippet = Nothing
, _srURL = Nothing
, _srClusteredResults = Nothing
, _srMetadata = Nothing
, _srTitle = Nothing
}
srDebugInfo :: Lens' SearchResult (Maybe ResultDebugInfo)
srDebugInfo
= lens _srDebugInfo (\ s a -> s{_srDebugInfo = a})
srSnippet :: Lens' SearchResult (Maybe Snippet)
srSnippet
= lens _srSnippet (\ s a -> s{_srSnippet = a})
srURL :: Lens' SearchResult (Maybe Text)
srURL = lens _srURL (\ s a -> s{_srURL = a})
srClusteredResults :: Lens' SearchResult [SearchResult]
srClusteredResults
= lens _srClusteredResults
(\ s a -> s{_srClusteredResults = a})
. _Default
. _Coerce
srMetadata :: Lens' SearchResult (Maybe Metadata)
srMetadata
= lens _srMetadata (\ s a -> s{_srMetadata = a})
srTitle :: Lens' SearchResult (Maybe Text)
srTitle = lens _srTitle (\ s a -> s{_srTitle = a})
instance FromJSON SearchResult where
parseJSON
= withObject "SearchResult"
(\ o ->
SearchResult' <$>
(o .:? "debugInfo") <*> (o .:? "snippet") <*>
(o .:? "url")
<*> (o .:? "clusteredResults" .!= mempty)
<*> (o .:? "metadata")
<*> (o .:? "title"))
instance ToJSON SearchResult where
toJSON SearchResult'{..}
= object
(catMaybes
[("debugInfo" .=) <$> _srDebugInfo,
("snippet" .=) <$> _srSnippet, ("url" .=) <$> _srURL,
("clusteredResults" .=) <$> _srClusteredResults,
("metadata" .=) <$> _srMetadata,
("title" .=) <$> _srTitle])
newtype SpellResult =
SpellResult'
{ _srSuggestedQuery :: Maybe Text
}
deriving (Eq, Show, Data, Typeable, Generic)
spellResult
:: SpellResult
spellResult = SpellResult' {_srSuggestedQuery = Nothing}
srSuggestedQuery :: Lens' SpellResult (Maybe Text)
srSuggestedQuery
= lens _srSuggestedQuery
(\ s a -> s{_srSuggestedQuery = a})
instance FromJSON SpellResult where
parseJSON
= withObject "SpellResult"
(\ o -> SpellResult' <$> (o .:? "suggestedQuery"))
instance ToJSON SpellResult where
toJSON SpellResult'{..}
= object
(catMaybes
[("suggestedQuery" .=) <$> _srSuggestedQuery])
newtype PeopleSuggestion =
PeopleSuggestion'
{ _psPerson :: Maybe Person
}
deriving (Eq, Show, Data, Typeable, Generic)
peopleSuggestion
:: PeopleSuggestion
peopleSuggestion = PeopleSuggestion' {_psPerson = Nothing}
psPerson :: Lens' PeopleSuggestion (Maybe Person)
psPerson = lens _psPerson (\ s a -> s{_psPerson = a})
instance FromJSON PeopleSuggestion where
parseJSON
= withObject "PeopleSuggestion"
(\ o -> PeopleSuggestion' <$> (o .:? "person"))
instance ToJSON PeopleSuggestion where
toJSON PeopleSuggestion'{..}
= object (catMaybes [("person" .=) <$> _psPerson])
data QuerySource =
QuerySource'
{ _qsShortName :: !(Maybe Text)
, _qsDisplayName :: !(Maybe Text)
, _qsSource :: !(Maybe Source)
, _qsOperators :: !(Maybe [QueryOperator])
}
deriving (Eq, Show, Data, Typeable, Generic)
querySource
:: QuerySource
querySource =
QuerySource'
{ _qsShortName = Nothing
, _qsDisplayName = Nothing
, _qsSource = Nothing
, _qsOperators = Nothing
}
qsShortName :: Lens' QuerySource (Maybe Text)
qsShortName
= lens _qsShortName (\ s a -> s{_qsShortName = a})
qsDisplayName :: Lens' QuerySource (Maybe Text)
qsDisplayName
= lens _qsDisplayName
(\ s a -> s{_qsDisplayName = a})
qsSource :: Lens' QuerySource (Maybe Source)
qsSource = lens _qsSource (\ s a -> s{_qsSource = a})
qsOperators :: Lens' QuerySource [QueryOperator]
qsOperators
= lens _qsOperators (\ s a -> s{_qsOperators = a}) .
_Default
. _Coerce
instance FromJSON QuerySource where
parseJSON
= withObject "QuerySource"
(\ o ->
QuerySource' <$>
(o .:? "shortName") <*> (o .:? "displayName") <*>
(o .:? "source")
<*> (o .:? "operators" .!= mempty))
instance ToJSON QuerySource where
toJSON QuerySource'{..}
= object
(catMaybes
[("shortName" .=) <$> _qsShortName,
("displayName" .=) <$> _qsDisplayName,
("source" .=) <$> _qsSource,
("operators" .=) <$> _qsOperators])
newtype SuggestResponse =
SuggestResponse'
{ _srSuggestResults :: Maybe [SuggestResult]
}
deriving (Eq, Show, Data, Typeable, Generic)
suggestResponse
:: SuggestResponse
suggestResponse = SuggestResponse' {_srSuggestResults = Nothing}
srSuggestResults :: Lens' SuggestResponse [SuggestResult]
srSuggestResults
= lens _srSuggestResults
(\ s a -> s{_srSuggestResults = a})
. _Default
. _Coerce
instance FromJSON SuggestResponse where
parseJSON
= withObject "SuggestResponse"
(\ o ->
SuggestResponse' <$>
(o .:? "suggestResults" .!= mempty))
instance ToJSON SuggestResponse where
toJSON SuggestResponse'{..}
= object
(catMaybes
[("suggestResults" .=) <$> _srSuggestResults])
data RepositoryError =
RepositoryError'
{ _reHTTPStatusCode :: !(Maybe (Textual Int32))
, _reType :: !(Maybe RepositoryErrorType)
, _reErrorMessage :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
repositoryError
:: RepositoryError
repositoryError =
RepositoryError'
{_reHTTPStatusCode = Nothing, _reType = Nothing, _reErrorMessage = Nothing}
reHTTPStatusCode :: Lens' RepositoryError (Maybe Int32)
reHTTPStatusCode
= lens _reHTTPStatusCode
(\ s a -> s{_reHTTPStatusCode = a})
. mapping _Coerce
reType :: Lens' RepositoryError (Maybe RepositoryErrorType)
reType = lens _reType (\ s a -> s{_reType = a})
reErrorMessage :: Lens' RepositoryError (Maybe Text)
reErrorMessage
= lens _reErrorMessage
(\ s a -> s{_reErrorMessage = a})
instance FromJSON RepositoryError where
parseJSON
= withObject "RepositoryError"
(\ o ->
RepositoryError' <$>
(o .:? "httpStatusCode") <*> (o .:? "type") <*>
(o .:? "errorMessage"))
instance ToJSON RepositoryError where
toJSON RepositoryError'{..}
= object
(catMaybes
[("httpStatusCode" .=) <$> _reHTTPStatusCode,
("type" .=) <$> _reType,
("errorMessage" .=) <$> _reErrorMessage])
data HTMLPropertyOptions =
HTMLPropertyOptions'
{ _hpoRetrievalImportance :: !(Maybe RetrievalImportance)
, _hpoOperatorOptions :: !(Maybe HTMLOperatorOptions)
}
deriving (Eq, Show, Data, Typeable, Generic)
htmlPropertyOptions
:: HTMLPropertyOptions
htmlPropertyOptions =
HTMLPropertyOptions'
{_hpoRetrievalImportance = Nothing, _hpoOperatorOptions = Nothing}
hpoRetrievalImportance :: Lens' HTMLPropertyOptions (Maybe RetrievalImportance)
hpoRetrievalImportance
= lens _hpoRetrievalImportance
(\ s a -> s{_hpoRetrievalImportance = a})
hpoOperatorOptions :: Lens' HTMLPropertyOptions (Maybe HTMLOperatorOptions)
hpoOperatorOptions
= lens _hpoOperatorOptions
(\ s a -> s{_hpoOperatorOptions = a})
instance FromJSON HTMLPropertyOptions where
parseJSON
= withObject "HTMLPropertyOptions"
(\ o ->
HTMLPropertyOptions' <$>
(o .:? "retrievalImportance") <*>
(o .:? "operatorOptions"))
instance ToJSON HTMLPropertyOptions where
toJSON HTMLPropertyOptions'{..}
= object
(catMaybes
[("retrievalImportance" .=) <$>
_hpoRetrievalImportance,
("operatorOptions" .=) <$> _hpoOperatorOptions])
data PropertyDefinition =
PropertyDefinition'
{ _pdEnumPropertyOptions :: !(Maybe EnumPropertyOptions)
, _pdHTMLPropertyOptions :: !(Maybe HTMLPropertyOptions)
, _pdObjectPropertyOptions :: !(Maybe ObjectPropertyOptions)
, _pdIsReturnable :: !(Maybe Bool)
, _pdTimestampPropertyOptions :: !(Maybe TimestampPropertyOptions)
, _pdIntegerPropertyOptions :: !(Maybe IntegerPropertyOptions)
, _pdName :: !(Maybe Text)
, _pdIsRepeatable :: !(Maybe Bool)
, _pdDoublePropertyOptions :: !(Maybe DoublePropertyOptions)
, _pdDisplayOptions :: !(Maybe PropertyDisplayOptions)
, _pdTextPropertyOptions :: !(Maybe TextPropertyOptions)
, _pdIsSortable :: !(Maybe Bool)
, _pdIsFacetable :: !(Maybe Bool)
, _pdBooleanPropertyOptions :: !(Maybe BooleanPropertyOptions)
, _pdDatePropertyOptions :: !(Maybe DatePropertyOptions)
}
deriving (Eq, Show, Data, Typeable, Generic)
propertyDefinition
:: PropertyDefinition
propertyDefinition =
PropertyDefinition'
{ _pdEnumPropertyOptions = Nothing
, _pdHTMLPropertyOptions = Nothing
, _pdObjectPropertyOptions = Nothing
, _pdIsReturnable = Nothing
, _pdTimestampPropertyOptions = Nothing
, _pdIntegerPropertyOptions = Nothing
, _pdName = Nothing
, _pdIsRepeatable = Nothing
, _pdDoublePropertyOptions = Nothing
, _pdDisplayOptions = Nothing
, _pdTextPropertyOptions = Nothing
, _pdIsSortable = Nothing
, _pdIsFacetable = Nothing
, _pdBooleanPropertyOptions = Nothing
, _pdDatePropertyOptions = Nothing
}
pdEnumPropertyOptions :: Lens' PropertyDefinition (Maybe EnumPropertyOptions)
pdEnumPropertyOptions
= lens _pdEnumPropertyOptions
(\ s a -> s{_pdEnumPropertyOptions = a})
pdHTMLPropertyOptions :: Lens' PropertyDefinition (Maybe HTMLPropertyOptions)
pdHTMLPropertyOptions
= lens _pdHTMLPropertyOptions
(\ s a -> s{_pdHTMLPropertyOptions = a})
pdObjectPropertyOptions :: Lens' PropertyDefinition (Maybe ObjectPropertyOptions)
pdObjectPropertyOptions
= lens _pdObjectPropertyOptions
(\ s a -> s{_pdObjectPropertyOptions = a})
pdIsReturnable :: Lens' PropertyDefinition (Maybe Bool)
pdIsReturnable
= lens _pdIsReturnable
(\ s a -> s{_pdIsReturnable = a})
pdTimestampPropertyOptions :: Lens' PropertyDefinition (Maybe TimestampPropertyOptions)
pdTimestampPropertyOptions
= lens _pdTimestampPropertyOptions
(\ s a -> s{_pdTimestampPropertyOptions = a})
pdIntegerPropertyOptions :: Lens' PropertyDefinition (Maybe IntegerPropertyOptions)
pdIntegerPropertyOptions
= lens _pdIntegerPropertyOptions
(\ s a -> s{_pdIntegerPropertyOptions = a})
pdName :: Lens' PropertyDefinition (Maybe Text)
pdName = lens _pdName (\ s a -> s{_pdName = a})
pdIsRepeatable :: Lens' PropertyDefinition (Maybe Bool)
pdIsRepeatable
= lens _pdIsRepeatable
(\ s a -> s{_pdIsRepeatable = a})
pdDoublePropertyOptions :: Lens' PropertyDefinition (Maybe DoublePropertyOptions)
pdDoublePropertyOptions
= lens _pdDoublePropertyOptions
(\ s a -> s{_pdDoublePropertyOptions = a})
pdDisplayOptions :: Lens' PropertyDefinition (Maybe PropertyDisplayOptions)
pdDisplayOptions
= lens _pdDisplayOptions
(\ s a -> s{_pdDisplayOptions = a})
pdTextPropertyOptions :: Lens' PropertyDefinition (Maybe TextPropertyOptions)
pdTextPropertyOptions
= lens _pdTextPropertyOptions
(\ s a -> s{_pdTextPropertyOptions = a})
pdIsSortable :: Lens' PropertyDefinition (Maybe Bool)
pdIsSortable
= lens _pdIsSortable (\ s a -> s{_pdIsSortable = a})
pdIsFacetable :: Lens' PropertyDefinition (Maybe Bool)
pdIsFacetable
= lens _pdIsFacetable
(\ s a -> s{_pdIsFacetable = a})
pdBooleanPropertyOptions :: Lens' PropertyDefinition (Maybe BooleanPropertyOptions)
pdBooleanPropertyOptions
= lens _pdBooleanPropertyOptions
(\ s a -> s{_pdBooleanPropertyOptions = a})
pdDatePropertyOptions :: Lens' PropertyDefinition (Maybe DatePropertyOptions)
pdDatePropertyOptions
= lens _pdDatePropertyOptions
(\ s a -> s{_pdDatePropertyOptions = a})
instance FromJSON PropertyDefinition where
parseJSON
= withObject "PropertyDefinition"
(\ o ->
PropertyDefinition' <$>
(o .:? "enumPropertyOptions") <*>
(o .:? "htmlPropertyOptions")
<*> (o .:? "objectPropertyOptions")
<*> (o .:? "isReturnable")
<*> (o .:? "timestampPropertyOptions")
<*> (o .:? "integerPropertyOptions")
<*> (o .:? "name")
<*> (o .:? "isRepeatable")
<*> (o .:? "doublePropertyOptions")
<*> (o .:? "displayOptions")
<*> (o .:? "textPropertyOptions")
<*> (o .:? "isSortable")
<*> (o .:? "isFacetable")
<*> (o .:? "booleanPropertyOptions")
<*> (o .:? "datePropertyOptions"))
instance ToJSON PropertyDefinition where
toJSON PropertyDefinition'{..}
= object
(catMaybes
[("enumPropertyOptions" .=) <$>
_pdEnumPropertyOptions,
("htmlPropertyOptions" .=) <$>
_pdHTMLPropertyOptions,
("objectPropertyOptions" .=) <$>
_pdObjectPropertyOptions,
("isReturnable" .=) <$> _pdIsReturnable,
("timestampPropertyOptions" .=) <$>
_pdTimestampPropertyOptions,
("integerPropertyOptions" .=) <$>
_pdIntegerPropertyOptions,
("name" .=) <$> _pdName,
("isRepeatable" .=) <$> _pdIsRepeatable,
("doublePropertyOptions" .=) <$>
_pdDoublePropertyOptions,
("displayOptions" .=) <$> _pdDisplayOptions,
("textPropertyOptions" .=) <$>
_pdTextPropertyOptions,
("isSortable" .=) <$> _pdIsSortable,
("isFacetable" .=) <$> _pdIsFacetable,
("booleanPropertyOptions" .=) <$>
_pdBooleanPropertyOptions,
("datePropertyOptions" .=) <$>
_pdDatePropertyOptions])
data SortOptions =
SortOptions'
{ _soSortOrder :: !(Maybe SortOptionsSortOrder)
, _soOperatorName :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
sortOptions
:: SortOptions
sortOptions = SortOptions' {_soSortOrder = Nothing, _soOperatorName = Nothing}
soSortOrder :: Lens' SortOptions (Maybe SortOptionsSortOrder)
soSortOrder
= lens _soSortOrder (\ s a -> s{_soSortOrder = a})
soOperatorName :: Lens' SortOptions (Maybe Text)
soOperatorName
= lens _soOperatorName
(\ s a -> s{_soOperatorName = a})
instance FromJSON SortOptions where
parseJSON
= withObject "SortOptions"
(\ o ->
SortOptions' <$>
(o .:? "sortOrder") <*> (o .:? "operatorName"))
instance ToJSON SortOptions where
toJSON SortOptions'{..}
= object
(catMaybes
[("sortOrder" .=) <$> _soSortOrder,
("operatorName" .=) <$> _soOperatorName])
newtype ObjectPropertyOptions =
ObjectPropertyOptions'
{ _opoSubobjectProperties :: Maybe [PropertyDefinition]
}
deriving (Eq, Show, Data, Typeable, Generic)
objectPropertyOptions
:: ObjectPropertyOptions
objectPropertyOptions =
ObjectPropertyOptions' {_opoSubobjectProperties = Nothing}
opoSubobjectProperties :: Lens' ObjectPropertyOptions [PropertyDefinition]
opoSubobjectProperties
= lens _opoSubobjectProperties
(\ s a -> s{_opoSubobjectProperties = a})
. _Default
. _Coerce
instance FromJSON ObjectPropertyOptions where
parseJSON
= withObject "ObjectPropertyOptions"
(\ o ->
ObjectPropertyOptions' <$>
(o .:? "subobjectProperties" .!= mempty))
instance ToJSON ObjectPropertyOptions where
toJSON ObjectPropertyOptions'{..}
= object
(catMaybes
[("subobjectProperties" .=) <$>
_opoSubobjectProperties])
data SearchResponse =
SearchResponse'
{ _sSpellResults :: !(Maybe [SpellResult])
, _sFacetResults :: !(Maybe [FacetResult])
, _sDebugInfo :: !(Maybe ResponseDebugInfo)
, _sResults :: !(Maybe [SearchResult])
, _sHasMoreResults :: !(Maybe Bool)
, _sResultCounts :: !(Maybe ResultCounts)
, _sResultCountExact :: !(Maybe (Textual Int64))
, _sResultCountEstimate :: !(Maybe (Textual Int64))
, _sQueryInterpretation :: !(Maybe QueryInterpretation)
, _sStructuredResults :: !(Maybe [StructuredResult])
, _sErrorInfo :: !(Maybe ErrorInfo)
}
deriving (Eq, Show, Data, Typeable, Generic)
searchResponse
:: SearchResponse
searchResponse =
SearchResponse'
{ _sSpellResults = Nothing
, _sFacetResults = Nothing
, _sDebugInfo = Nothing
, _sResults = Nothing
, _sHasMoreResults = Nothing
, _sResultCounts = Nothing
, _sResultCountExact = Nothing
, _sResultCountEstimate = Nothing
, _sQueryInterpretation = Nothing
, _sStructuredResults = Nothing
, _sErrorInfo = Nothing
}
sSpellResults :: Lens' SearchResponse [SpellResult]
sSpellResults
= lens _sSpellResults
(\ s a -> s{_sSpellResults = a})
. _Default
. _Coerce
sFacetResults :: Lens' SearchResponse [FacetResult]
sFacetResults
= lens _sFacetResults
(\ s a -> s{_sFacetResults = a})
. _Default
. _Coerce
sDebugInfo :: Lens' SearchResponse (Maybe ResponseDebugInfo)
sDebugInfo
= lens _sDebugInfo (\ s a -> s{_sDebugInfo = a})
sResults :: Lens' SearchResponse [SearchResult]
sResults
= lens _sResults (\ s a -> s{_sResults = a}) .
_Default
. _Coerce
sHasMoreResults :: Lens' SearchResponse (Maybe Bool)
sHasMoreResults
= lens _sHasMoreResults
(\ s a -> s{_sHasMoreResults = a})
sResultCounts :: Lens' SearchResponse (Maybe ResultCounts)
sResultCounts
= lens _sResultCounts
(\ s a -> s{_sResultCounts = a})
sResultCountExact :: Lens' SearchResponse (Maybe Int64)
sResultCountExact
= lens _sResultCountExact
(\ s a -> s{_sResultCountExact = a})
. mapping _Coerce
sResultCountEstimate :: Lens' SearchResponse (Maybe Int64)
sResultCountEstimate
= lens _sResultCountEstimate
(\ s a -> s{_sResultCountEstimate = a})
. mapping _Coerce
sQueryInterpretation :: Lens' SearchResponse (Maybe QueryInterpretation)
sQueryInterpretation
= lens _sQueryInterpretation
(\ s a -> s{_sQueryInterpretation = a})
sStructuredResults :: Lens' SearchResponse [StructuredResult]
sStructuredResults
= lens _sStructuredResults
(\ s a -> s{_sStructuredResults = a})
. _Default
. _Coerce
sErrorInfo :: Lens' SearchResponse (Maybe ErrorInfo)
sErrorInfo
= lens _sErrorInfo (\ s a -> s{_sErrorInfo = a})
instance FromJSON SearchResponse where
parseJSON
= withObject "SearchResponse"
(\ o ->
SearchResponse' <$>
(o .:? "spellResults" .!= mempty) <*>
(o .:? "facetResults" .!= mempty)
<*> (o .:? "debugInfo")
<*> (o .:? "results" .!= mempty)
<*> (o .:? "hasMoreResults")
<*> (o .:? "resultCounts")
<*> (o .:? "resultCountExact")
<*> (o .:? "resultCountEstimate")
<*> (o .:? "queryInterpretation")
<*> (o .:? "structuredResults" .!= mempty)
<*> (o .:? "errorInfo"))
instance ToJSON SearchResponse where
toJSON SearchResponse'{..}
= object
(catMaybes
[("spellResults" .=) <$> _sSpellResults,
("facetResults" .=) <$> _sFacetResults,
("debugInfo" .=) <$> _sDebugInfo,
("results" .=) <$> _sResults,
("hasMoreResults" .=) <$> _sHasMoreResults,
("resultCounts" .=) <$> _sResultCounts,
("resultCountExact" .=) <$> _sResultCountExact,
("resultCountEstimate" .=) <$> _sResultCountEstimate,
("queryInterpretation" .=) <$> _sQueryInterpretation,
("structuredResults" .=) <$> _sStructuredResults,
("errorInfo" .=) <$> _sErrorInfo])
data SuggestResult =
SuggestResult'
{ _sPeopleSuggestion :: !(Maybe PeopleSuggestion)
, _sQuerySuggestion :: !(Maybe QuerySuggestion)
, _sSuggestedQuery :: !(Maybe Text)
, _sSource :: !(Maybe Source)
}
deriving (Eq, Show, Data, Typeable, Generic)
suggestResult
:: SuggestResult
suggestResult =
SuggestResult'
{ _sPeopleSuggestion = Nothing
, _sQuerySuggestion = Nothing
, _sSuggestedQuery = Nothing
, _sSource = Nothing
}
sPeopleSuggestion :: Lens' SuggestResult (Maybe PeopleSuggestion)
sPeopleSuggestion
= lens _sPeopleSuggestion
(\ s a -> s{_sPeopleSuggestion = a})
sQuerySuggestion :: Lens' SuggestResult (Maybe QuerySuggestion)
sQuerySuggestion
= lens _sQuerySuggestion
(\ s a -> s{_sQuerySuggestion = a})
sSuggestedQuery :: Lens' SuggestResult (Maybe Text)
sSuggestedQuery
= lens _sSuggestedQuery
(\ s a -> s{_sSuggestedQuery = a})
sSource :: Lens' SuggestResult (Maybe Source)
sSource = lens _sSource (\ s a -> s{_sSource = a})
instance FromJSON SuggestResult where
parseJSON
= withObject "SuggestResult"
(\ o ->
SuggestResult' <$>
(o .:? "peopleSuggestion") <*>
(o .:? "querySuggestion")
<*> (o .:? "suggestedQuery")
<*> (o .:? "source"))
instance ToJSON SuggestResult where
toJSON SuggestResult'{..}
= object
(catMaybes
[("peopleSuggestion" .=) <$> _sPeopleSuggestion,
("querySuggestion" .=) <$> _sQuerySuggestion,
("suggestedQuery" .=) <$> _sSuggestedQuery,
("source" .=) <$> _sSource])
newtype TextValues =
TextValues'
{ _tvValues :: Maybe [Text]
}
deriving (Eq, Show, Data, Typeable, Generic)
textValues
:: TextValues
textValues = TextValues' {_tvValues = Nothing}
tvValues :: Lens' TextValues [Text]
tvValues
= lens _tvValues (\ s a -> s{_tvValues = a}) .
_Default
. _Coerce
instance FromJSON TextValues where
parseJSON
= withObject "TextValues"
(\ o -> TextValues' <$> (o .:? "values" .!= mempty))
instance ToJSON TextValues where
toJSON TextValues'{..}
= object (catMaybes [("values" .=) <$> _tvValues])
newtype DriveLocationRestrict =
DriveLocationRestrict'
{ _dlrType :: Maybe DriveLocationRestrictType
}
deriving (Eq, Show, Data, Typeable, Generic)
driveLocationRestrict
:: DriveLocationRestrict
driveLocationRestrict = DriveLocationRestrict' {_dlrType = Nothing}
dlrType :: Lens' DriveLocationRestrict (Maybe DriveLocationRestrictType)
dlrType = lens _dlrType (\ s a -> s{_dlrType = a})
instance FromJSON DriveLocationRestrict where
parseJSON
= withObject "DriveLocationRestrict"
(\ o -> DriveLocationRestrict' <$> (o .:? "type"))
instance ToJSON DriveLocationRestrict where
toJSON DriveLocationRestrict'{..}
= object (catMaybes [("type" .=) <$> _dlrType])
data ListQuerySourcesResponse =
ListQuerySourcesResponse'
{ _lqsrNextPageToken :: !(Maybe Text)
, _lqsrSources :: !(Maybe [QuerySource])
}
deriving (Eq, Show, Data, Typeable, Generic)
listQuerySourcesResponse
:: ListQuerySourcesResponse
listQuerySourcesResponse =
ListQuerySourcesResponse'
{_lqsrNextPageToken = Nothing, _lqsrSources = Nothing}
lqsrNextPageToken :: Lens' ListQuerySourcesResponse (Maybe Text)
lqsrNextPageToken
= lens _lqsrNextPageToken
(\ s a -> s{_lqsrNextPageToken = a})
lqsrSources :: Lens' ListQuerySourcesResponse [QuerySource]
lqsrSources
= lens _lqsrSources (\ s a -> s{_lqsrSources = a}) .
_Default
. _Coerce
instance FromJSON ListQuerySourcesResponse where
parseJSON
= withObject "ListQuerySourcesResponse"
(\ o ->
ListQuerySourcesResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "sources" .!= mempty))
instance ToJSON ListQuerySourcesResponse where
toJSON ListQuerySourcesResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lqsrNextPageToken,
("sources" .=) <$> _lqsrSources])
newtype DoubleOperatorOptions =
DoubleOperatorOptions'
{ _dOperatorName :: Maybe Text
}
deriving (Eq, Show, Data, Typeable, Generic)
doubleOperatorOptions
:: DoubleOperatorOptions
doubleOperatorOptions = DoubleOperatorOptions' {_dOperatorName = Nothing}
dOperatorName :: Lens' DoubleOperatorOptions (Maybe Text)
dOperatorName
= lens _dOperatorName
(\ s a -> s{_dOperatorName = a})
instance FromJSON DoubleOperatorOptions where
parseJSON
= withObject "DoubleOperatorOptions"
(\ o ->
DoubleOperatorOptions' <$> (o .:? "operatorName"))
instance ToJSON DoubleOperatorOptions where
toJSON DoubleOperatorOptions'{..}
= object
(catMaybes [("operatorName" .=) <$> _dOperatorName])
data Operation =
Operation'
{ _oDone :: !(Maybe Bool)
, _oError :: !(Maybe Status)
, _oResponse :: !(Maybe OperationResponse)
, _oName :: !(Maybe Text)
, _oMetadata :: !(Maybe OperationMetadata)
}
deriving (Eq, Show, Data, Typeable, Generic)
operation
:: Operation
operation =
Operation'
{ _oDone = Nothing
, _oError = Nothing
, _oResponse = Nothing
, _oName = Nothing
, _oMetadata = Nothing
}
oDone :: Lens' Operation (Maybe Bool)
oDone = lens _oDone (\ s a -> s{_oDone = a})
oError :: Lens' Operation (Maybe Status)
oError = lens _oError (\ s a -> s{_oError = a})
oResponse :: Lens' Operation (Maybe OperationResponse)
oResponse
= lens _oResponse (\ s a -> s{_oResponse = a})
oName :: Lens' Operation (Maybe Text)
oName = lens _oName (\ s a -> s{_oName = a})
oMetadata :: Lens' Operation (Maybe OperationMetadata)
oMetadata
= lens _oMetadata (\ s a -> s{_oMetadata = a})
instance FromJSON Operation where
parseJSON
= withObject "Operation"
(\ o ->
Operation' <$>
(o .:? "done") <*> (o .:? "error") <*>
(o .:? "response")
<*> (o .:? "name")
<*> (o .:? "metadata"))
instance ToJSON Operation where
toJSON Operation'{..}
= object
(catMaybes
[("done" .=) <$> _oDone, ("error" .=) <$> _oError,
("response" .=) <$> _oResponse,
("name" .=) <$> _oName,
("metadata" .=) <$> _oMetadata])
data Person =
Person'
{ _pEmailAddresses :: !(Maybe [EmailAddress])
, _pPersonNames :: !(Maybe [Name])
, _pPhotos :: !(Maybe [Photo])
, _pName :: !(Maybe Text)
, _pObfuscatedId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
person
:: Person
person =
Person'
{ _pEmailAddresses = Nothing
, _pPersonNames = Nothing
, _pPhotos = Nothing
, _pName = Nothing
, _pObfuscatedId = Nothing
}
pEmailAddresses :: Lens' Person [EmailAddress]
pEmailAddresses
= lens _pEmailAddresses
(\ s a -> s{_pEmailAddresses = a})
. _Default
. _Coerce
pPersonNames :: Lens' Person [Name]
pPersonNames
= lens _pPersonNames (\ s a -> s{_pPersonNames = a})
. _Default
. _Coerce
pPhotos :: Lens' Person [Photo]
pPhotos
= lens _pPhotos (\ s a -> s{_pPhotos = a}) . _Default
. _Coerce
pName :: Lens' Person (Maybe Text)
pName = lens _pName (\ s a -> s{_pName = a})
pObfuscatedId :: Lens' Person (Maybe Text)
pObfuscatedId
= lens _pObfuscatedId
(\ s a -> s{_pObfuscatedId = a})
instance FromJSON Person where
parseJSON
= withObject "Person"
(\ o ->
Person' <$>
(o .:? "emailAddresses" .!= mempty) <*>
(o .:? "personNames" .!= mempty)
<*> (o .:? "photos" .!= mempty)
<*> (o .:? "name")
<*> (o .:? "obfuscatedId"))
instance ToJSON Person where
toJSON Person'{..}
= object
(catMaybes
[("emailAddresses" .=) <$> _pEmailAddresses,
("personNames" .=) <$> _pPersonNames,
("photos" .=) <$> _pPhotos, ("name" .=) <$> _pName,
("obfuscatedId" .=) <$> _pObfuscatedId])
data CompositeFilter =
CompositeFilter'
{ _cfSubFilters :: !(Maybe [Filter])
, _cfLogicOperator :: !(Maybe CompositeFilterLogicOperator)
}
deriving (Eq, Show, Data, Typeable, Generic)
compositeFilter
:: CompositeFilter
compositeFilter =
CompositeFilter' {_cfSubFilters = Nothing, _cfLogicOperator = Nothing}
cfSubFilters :: Lens' CompositeFilter [Filter]
cfSubFilters
= lens _cfSubFilters (\ s a -> s{_cfSubFilters = a})
. _Default
. _Coerce
cfLogicOperator :: Lens' CompositeFilter (Maybe CompositeFilterLogicOperator)
cfLogicOperator
= lens _cfLogicOperator
(\ s a -> s{_cfLogicOperator = a})
instance FromJSON CompositeFilter where
parseJSON
= withObject "CompositeFilter"
(\ o ->
CompositeFilter' <$>
(o .:? "subFilters" .!= mempty) <*>
(o .:? "logicOperator"))
instance ToJSON CompositeFilter where
toJSON CompositeFilter'{..}
= object
(catMaybes
[("subFilters" .=) <$> _cfSubFilters,
("logicOperator" .=) <$> _cfLogicOperator])
newtype ResultDisplayLine =
ResultDisplayLine'
{ _rdlFields :: Maybe [ResultDisplayField]
}
deriving (Eq, Show, Data, Typeable, Generic)
resultDisplayLine
:: ResultDisplayLine
resultDisplayLine = ResultDisplayLine' {_rdlFields = Nothing}
rdlFields :: Lens' ResultDisplayLine [ResultDisplayField]
rdlFields
= lens _rdlFields (\ s a -> s{_rdlFields = a}) .
_Default
. _Coerce
instance FromJSON ResultDisplayLine where
parseJSON
= withObject "ResultDisplayLine"
(\ o ->
ResultDisplayLine' <$> (o .:? "fields" .!= mempty))
instance ToJSON ResultDisplayLine where
toJSON ResultDisplayLine'{..}
= object (catMaybes [("fields" .=) <$> _rdlFields])
newtype DoubleValues =
DoubleValues'
{ _dvValues :: Maybe [Textual Double]
}
deriving (Eq, Show, Data, Typeable, Generic)
doubleValues
:: DoubleValues
doubleValues = DoubleValues' {_dvValues = Nothing}
dvValues :: Lens' DoubleValues [Double]
dvValues
= lens _dvValues (\ s a -> s{_dvValues = a}) .
_Default
. _Coerce
instance FromJSON DoubleValues where
parseJSON
= withObject "DoubleValues"
(\ o ->
DoubleValues' <$> (o .:? "values" .!= mempty))
instance ToJSON DoubleValues where
toJSON DoubleValues'{..}
= object (catMaybes [("values" .=) <$> _dvValues])
data Snippet =
Snippet'
{ _sMatchRanges :: !(Maybe [MatchRange])
, _sSnippet :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
snippet
:: Snippet
snippet = Snippet' {_sMatchRanges = Nothing, _sSnippet = Nothing}
sMatchRanges :: Lens' Snippet [MatchRange]
sMatchRanges
= lens _sMatchRanges (\ s a -> s{_sMatchRanges = a})
. _Default
. _Coerce
sSnippet :: Lens' Snippet (Maybe Text)
sSnippet = lens _sSnippet (\ s a -> s{_sSnippet = a})
instance FromJSON Snippet where
parseJSON
= withObject "Snippet"
(\ o ->
Snippet' <$>
(o .:? "matchRanges" .!= mempty) <*>
(o .:? "snippet"))
instance ToJSON Snippet where
toJSON Snippet'{..}
= object
(catMaybes
[("matchRanges" .=) <$> _sMatchRanges,
("snippet" .=) <$> _sSnippet])
data TextOperatorOptions =
TextOperatorOptions'
{ _tooOperatorName :: !(Maybe Text)
, _tooExactMatchWithOperator :: !(Maybe Bool)
}
deriving (Eq, Show, Data, Typeable, Generic)
textOperatorOptions
:: TextOperatorOptions
textOperatorOptions =
TextOperatorOptions'
{_tooOperatorName = Nothing, _tooExactMatchWithOperator = Nothing}
tooOperatorName :: Lens' TextOperatorOptions (Maybe Text)
tooOperatorName
= lens _tooOperatorName
(\ s a -> s{_tooOperatorName = a})
tooExactMatchWithOperator :: Lens' TextOperatorOptions (Maybe Bool)
tooExactMatchWithOperator
= lens _tooExactMatchWithOperator
(\ s a -> s{_tooExactMatchWithOperator = a})
instance FromJSON TextOperatorOptions where
parseJSON
= withObject "TextOperatorOptions"
(\ o ->
TextOperatorOptions' <$>
(o .:? "operatorName") <*>
(o .:? "exactMatchWithOperator"))
instance ToJSON TextOperatorOptions where
toJSON TextOperatorOptions'{..}
= object
(catMaybes
[("operatorName" .=) <$> _tooOperatorName,
("exactMatchWithOperator" .=) <$>
_tooExactMatchWithOperator])
newtype QueryInterpretationOptions =
QueryInterpretationOptions'
{ _qioDisableNlInterpretation :: Maybe Bool
}
deriving (Eq, Show, Data, Typeable, Generic)
queryInterpretationOptions
:: QueryInterpretationOptions
queryInterpretationOptions =
QueryInterpretationOptions' {_qioDisableNlInterpretation = Nothing}
qioDisableNlInterpretation :: Lens' QueryInterpretationOptions (Maybe Bool)
qioDisableNlInterpretation
= lens _qioDisableNlInterpretation
(\ s a -> s{_qioDisableNlInterpretation = a})
instance FromJSON QueryInterpretationOptions where
parseJSON
= withObject "QueryInterpretationOptions"
(\ o ->
QueryInterpretationOptions' <$>
(o .:? "disableNlInterpretation"))
instance ToJSON QueryInterpretationOptions where
toJSON QueryInterpretationOptions'{..}
= object
(catMaybes
[("disableNlInterpretation" .=) <$>
_qioDisableNlInterpretation])
newtype ResetSearchApplicationRequest =
ResetSearchApplicationRequest'
{ _rsarDebugOptions :: Maybe DebugOptions
}
deriving (Eq, Show, Data, Typeable, Generic)
resetSearchApplicationRequest
:: ResetSearchApplicationRequest
resetSearchApplicationRequest =
ResetSearchApplicationRequest' {_rsarDebugOptions = Nothing}
rsarDebugOptions :: Lens' ResetSearchApplicationRequest (Maybe DebugOptions)
rsarDebugOptions
= lens _rsarDebugOptions
(\ s a -> s{_rsarDebugOptions = a})
instance FromJSON ResetSearchApplicationRequest where
parseJSON
= withObject "ResetSearchApplicationRequest"
(\ o ->
ResetSearchApplicationRequest' <$>
(o .:? "debugOptions"))
instance ToJSON ResetSearchApplicationRequest where
toJSON ResetSearchApplicationRequest'{..}
= object
(catMaybes
[("debugOptions" .=) <$> _rsarDebugOptions])
data ItemMetadata =
ItemMetadata'
{ _imSourceRepositoryURL :: !(Maybe Text)
, _imHash :: !(Maybe Text)
, _imObjectType :: !(Maybe Text)
, _imContainerName :: !(Maybe Text)
, _imInteractions :: !(Maybe [Interaction])
, _imMimeType :: !(Maybe Text)
, _imUpdateTime :: !(Maybe DateTime')
, _imKeywords :: !(Maybe [Text])
, _imTitle :: !(Maybe Text)
, _imContentLanguage :: !(Maybe Text)
, _imSearchQualityMetadata :: !(Maybe SearchQualityMetadata)
, _imCreateTime :: !(Maybe DateTime')
}
deriving (Eq, Show, Data, Typeable, Generic)
itemMetadata
:: ItemMetadata
itemMetadata =
ItemMetadata'
{ _imSourceRepositoryURL = Nothing
, _imHash = Nothing
, _imObjectType = Nothing
, _imContainerName = Nothing
, _imInteractions = Nothing
, _imMimeType = Nothing
, _imUpdateTime = Nothing
, _imKeywords = Nothing
, _imTitle = Nothing
, _imContentLanguage = Nothing
, _imSearchQualityMetadata = Nothing
, _imCreateTime = Nothing
}
imSourceRepositoryURL :: Lens' ItemMetadata (Maybe Text)
imSourceRepositoryURL
= lens _imSourceRepositoryURL
(\ s a -> s{_imSourceRepositoryURL = a})
imHash :: Lens' ItemMetadata (Maybe Text)
imHash = lens _imHash (\ s a -> s{_imHash = a})
imObjectType :: Lens' ItemMetadata (Maybe Text)
imObjectType
= lens _imObjectType (\ s a -> s{_imObjectType = a})
imContainerName :: Lens' ItemMetadata (Maybe Text)
imContainerName
= lens _imContainerName
(\ s a -> s{_imContainerName = a})
imInteractions :: Lens' ItemMetadata [Interaction]
imInteractions
= lens _imInteractions
(\ s a -> s{_imInteractions = a})
. _Default
. _Coerce
imMimeType :: Lens' ItemMetadata (Maybe Text)
imMimeType
= lens _imMimeType (\ s a -> s{_imMimeType = a})
imUpdateTime :: Lens' ItemMetadata (Maybe UTCTime)
imUpdateTime
= lens _imUpdateTime (\ s a -> s{_imUpdateTime = a})
. mapping _DateTime
imKeywords :: Lens' ItemMetadata [Text]
imKeywords
= lens _imKeywords (\ s a -> s{_imKeywords = a}) .
_Default
. _Coerce
imTitle :: Lens' ItemMetadata (Maybe Text)
imTitle = lens _imTitle (\ s a -> s{_imTitle = a})
imContentLanguage :: Lens' ItemMetadata (Maybe Text)
imContentLanguage
= lens _imContentLanguage
(\ s a -> s{_imContentLanguage = a})
imSearchQualityMetadata :: Lens' ItemMetadata (Maybe SearchQualityMetadata)
imSearchQualityMetadata
= lens _imSearchQualityMetadata
(\ s a -> s{_imSearchQualityMetadata = a})
imCreateTime :: Lens' ItemMetadata (Maybe UTCTime)
imCreateTime
= lens _imCreateTime (\ s a -> s{_imCreateTime = a})
. mapping _DateTime
instance FromJSON ItemMetadata where
parseJSON
= withObject "ItemMetadata"
(\ o ->
ItemMetadata' <$>
(o .:? "sourceRepositoryUrl") <*> (o .:? "hash") <*>
(o .:? "objectType")
<*> (o .:? "containerName")
<*> (o .:? "interactions" .!= mempty)
<*> (o .:? "mimeType")
<*> (o .:? "updateTime")
<*> (o .:? "keywords" .!= mempty)
<*> (o .:? "title")
<*> (o .:? "contentLanguage")
<*> (o .:? "searchQualityMetadata")
<*> (o .:? "createTime"))
instance ToJSON ItemMetadata where
toJSON ItemMetadata'{..}
= object
(catMaybes
[("sourceRepositoryUrl" .=) <$>
_imSourceRepositoryURL,
("hash" .=) <$> _imHash,
("objectType" .=) <$> _imObjectType,
("containerName" .=) <$> _imContainerName,
("interactions" .=) <$> _imInteractions,
("mimeType" .=) <$> _imMimeType,
("updateTime" .=) <$> _imUpdateTime,
("keywords" .=) <$> _imKeywords,
("title" .=) <$> _imTitle,
("contentLanguage" .=) <$> _imContentLanguage,
("searchQualityMetadata" .=) <$>
_imSearchQualityMetadata,
("createTime" .=) <$> _imCreateTime])
data FilterOptions =
FilterOptions'
{ _foObjectType :: !(Maybe Text)
, _foFilter :: !(Maybe Filter)
}
deriving (Eq, Show, Data, Typeable, Generic)
filterOptions
:: FilterOptions
filterOptions = FilterOptions' {_foObjectType = Nothing, _foFilter = Nothing}
foObjectType :: Lens' FilterOptions (Maybe Text)
foObjectType
= lens _foObjectType (\ s a -> s{_foObjectType = a})
foFilter :: Lens' FilterOptions (Maybe Filter)
foFilter = lens _foFilter (\ s a -> s{_foFilter = a})
instance FromJSON FilterOptions where
parseJSON
= withObject "FilterOptions"
(\ o ->
FilterOptions' <$>
(o .:? "objectType") <*> (o .:? "filter"))
instance ToJSON FilterOptions where
toJSON FilterOptions'{..}
= object
(catMaybes
[("objectType" .=) <$> _foObjectType,
("filter" .=) <$> _foFilter])
newtype StructuredResult =
StructuredResult'
{ _srPerson :: Maybe Person
}
deriving (Eq, Show, Data, Typeable, Generic)
structuredResult
:: StructuredResult
structuredResult = StructuredResult' {_srPerson = Nothing}
srPerson :: Lens' StructuredResult (Maybe Person)
srPerson = lens _srPerson (\ s a -> s{_srPerson = a})
instance FromJSON StructuredResult where
parseJSON
= withObject "StructuredResult"
(\ o -> StructuredResult' <$> (o .:? "person"))
instance ToJSON StructuredResult where
toJSON StructuredResult'{..}
= object (catMaybes [("person" .=) <$> _srPerson])
data ProcessingError =
ProcessingError'
{ _peFieldViolations :: !(Maybe [FieldViolation])
, _peCode :: !(Maybe ProcessingErrorCode)
, _peErrorMessage :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
processingError
:: ProcessingError
processingError =
ProcessingError'
{_peFieldViolations = Nothing, _peCode = Nothing, _peErrorMessage = Nothing}
peFieldViolations :: Lens' ProcessingError [FieldViolation]
peFieldViolations
= lens _peFieldViolations
(\ s a -> s{_peFieldViolations = a})
. _Default
. _Coerce
peCode :: Lens' ProcessingError (Maybe ProcessingErrorCode)
peCode = lens _peCode (\ s a -> s{_peCode = a})
peErrorMessage :: Lens' ProcessingError (Maybe Text)
peErrorMessage
= lens _peErrorMessage
(\ s a -> s{_peErrorMessage = a})
instance FromJSON ProcessingError where
parseJSON
= withObject "ProcessingError"
(\ o ->
ProcessingError' <$>
(o .:? "fieldViolations" .!= mempty) <*>
(o .:? "code")
<*> (o .:? "errorMessage"))
instance ToJSON ProcessingError where
toJSON ProcessingError'{..}
= object
(catMaybes
[("fieldViolations" .=) <$> _peFieldViolations,
("code" .=) <$> _peCode,
("errorMessage" .=) <$> _peErrorMessage])
data ListItemNamesForUnmAppedIdentityResponse =
ListItemNamesForUnmAppedIdentityResponse'
{ _linfuairNextPageToken :: !(Maybe Text)
, _linfuairItemNames :: !(Maybe [Text])
}
deriving (Eq, Show, Data, Typeable, Generic)
listItemNamesForUnmAppedIdentityResponse
:: ListItemNamesForUnmAppedIdentityResponse
listItemNamesForUnmAppedIdentityResponse =
ListItemNamesForUnmAppedIdentityResponse'
{_linfuairNextPageToken = Nothing, _linfuairItemNames = Nothing}
linfuairNextPageToken :: Lens' ListItemNamesForUnmAppedIdentityResponse (Maybe Text)
linfuairNextPageToken
= lens _linfuairNextPageToken
(\ s a -> s{_linfuairNextPageToken = a})
linfuairItemNames :: Lens' ListItemNamesForUnmAppedIdentityResponse [Text]
linfuairItemNames
= lens _linfuairItemNames
(\ s a -> s{_linfuairItemNames = a})
. _Default
. _Coerce
instance FromJSON
ListItemNamesForUnmAppedIdentityResponse
where
parseJSON
= withObject
"ListItemNamesForUnmAppedIdentityResponse"
(\ o ->
ListItemNamesForUnmAppedIdentityResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "itemNames" .!= mempty))
instance ToJSON
ListItemNamesForUnmAppedIdentityResponse
where
toJSON ListItemNamesForUnmAppedIdentityResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _linfuairNextPageToken,
("itemNames" .=) <$> _linfuairItemNames])
data ItemACL =
ItemACL'
{ _iaOwners :: !(Maybe [Principal])
, _iaReaders :: !(Maybe [Principal])
, _iaACLInheritanceType :: !(Maybe ItemACLACLInheritanceType)
, _iaInheritACLFrom :: !(Maybe Text)
, _iaDeniedReaders :: !(Maybe [Principal])
}
deriving (Eq, Show, Data, Typeable, Generic)
itemACL
:: ItemACL
itemACL =
ItemACL'
{ _iaOwners = Nothing
, _iaReaders = Nothing
, _iaACLInheritanceType = Nothing
, _iaInheritACLFrom = Nothing
, _iaDeniedReaders = Nothing
}
iaOwners :: Lens' ItemACL [Principal]
iaOwners
= lens _iaOwners (\ s a -> s{_iaOwners = a}) .
_Default
. _Coerce
iaReaders :: Lens' ItemACL [Principal]
iaReaders
= lens _iaReaders (\ s a -> s{_iaReaders = a}) .
_Default
. _Coerce
iaACLInheritanceType :: Lens' ItemACL (Maybe ItemACLACLInheritanceType)
iaACLInheritanceType
= lens _iaACLInheritanceType
(\ s a -> s{_iaACLInheritanceType = a})
iaInheritACLFrom :: Lens' ItemACL (Maybe Text)
iaInheritACLFrom
= lens _iaInheritACLFrom
(\ s a -> s{_iaInheritACLFrom = a})
iaDeniedReaders :: Lens' ItemACL [Principal]
iaDeniedReaders
= lens _iaDeniedReaders
(\ s a -> s{_iaDeniedReaders = a})
. _Default
. _Coerce
instance FromJSON ItemACL where
parseJSON
= withObject "ItemACL"
(\ o ->
ItemACL' <$>
(o .:? "owners" .!= mempty) <*>
(o .:? "readers" .!= mempty)
<*> (o .:? "aclInheritanceType")
<*> (o .:? "inheritAclFrom")
<*> (o .:? "deniedReaders" .!= mempty))
instance ToJSON ItemACL where
toJSON ItemACL'{..}
= object
(catMaybes
[("owners" .=) <$> _iaOwners,
("readers" .=) <$> _iaReaders,
("aclInheritanceType" .=) <$> _iaACLInheritanceType,
("inheritAclFrom" .=) <$> _iaInheritACLFrom,
("deniedReaders" .=) <$> _iaDeniedReaders])
data Value =
Value'
{ _vIntegerValue :: !(Maybe (Textual Int64))
, _vTimestampValue :: !(Maybe DateTime')
, _vDoubleValue :: !(Maybe (Textual Double))
, _vStringValue :: !(Maybe Text)
, _vDateValue :: !(Maybe Date)
, _vBooleanValue :: !(Maybe Bool)
}
deriving (Eq, Show, Data, Typeable, Generic)
value
:: Value
value =
Value'
{ _vIntegerValue = Nothing
, _vTimestampValue = Nothing
, _vDoubleValue = Nothing
, _vStringValue = Nothing
, _vDateValue = Nothing
, _vBooleanValue = Nothing
}
vIntegerValue :: Lens' Value (Maybe Int64)
vIntegerValue
= lens _vIntegerValue
(\ s a -> s{_vIntegerValue = a})
. mapping _Coerce
vTimestampValue :: Lens' Value (Maybe UTCTime)
vTimestampValue
= lens _vTimestampValue
(\ s a -> s{_vTimestampValue = a})
. mapping _DateTime
vDoubleValue :: Lens' Value (Maybe Double)
vDoubleValue
= lens _vDoubleValue (\ s a -> s{_vDoubleValue = a})
. mapping _Coerce
vStringValue :: Lens' Value (Maybe Text)
vStringValue
= lens _vStringValue (\ s a -> s{_vStringValue = a})
vDateValue :: Lens' Value (Maybe Date)
vDateValue
= lens _vDateValue (\ s a -> s{_vDateValue = a})
vBooleanValue :: Lens' Value (Maybe Bool)
vBooleanValue
= lens _vBooleanValue
(\ s a -> s{_vBooleanValue = a})
instance FromJSON Value where
parseJSON
= withObject "Value"
(\ o ->
Value' <$>
(o .:? "integerValue") <*> (o .:? "timestampValue")
<*> (o .:? "doubleValue")
<*> (o .:? "stringValue")
<*> (o .:? "dateValue")
<*> (o .:? "booleanValue"))
instance ToJSON Value where
toJSON Value'{..}
= object
(catMaybes
[("integerValue" .=) <$> _vIntegerValue,
("timestampValue" .=) <$> _vTimestampValue,
("doubleValue" .=) <$> _vDoubleValue,
("stringValue" .=) <$> _vStringValue,
("dateValue" .=) <$> _vDateValue,
("booleanValue" .=) <$> _vBooleanValue])
data FieldViolation =
FieldViolation'
{ _fvField :: !(Maybe Text)
, _fvDescription :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
fieldViolation
:: FieldViolation
fieldViolation = FieldViolation' {_fvField = Nothing, _fvDescription = Nothing}
fvField :: Lens' FieldViolation (Maybe Text)
fvField = lens _fvField (\ s a -> s{_fvField = a})
fvDescription :: Lens' FieldViolation (Maybe Text)
fvDescription
= lens _fvDescription
(\ s a -> s{_fvDescription = a})
instance FromJSON FieldViolation where
parseJSON
= withObject "FieldViolation"
(\ o ->
FieldViolation' <$>
(o .:? "field") <*> (o .:? "description"))
instance ToJSON FieldViolation where
toJSON FieldViolation'{..}
= object
(catMaybes
[("field" .=) <$> _fvField,
("description" .=) <$> _fvDescription])
newtype Metaline =
Metaline'
{ _mProperties :: Maybe [DisplayedProperty]
}
deriving (Eq, Show, Data, Typeable, Generic)
metaline
:: Metaline
metaline = Metaline' {_mProperties = Nothing}
mProperties :: Lens' Metaline [DisplayedProperty]
mProperties
= lens _mProperties (\ s a -> s{_mProperties = a}) .
_Default
. _Coerce
instance FromJSON Metaline where
parseJSON
= withObject "Metaline"
(\ o ->
Metaline' <$> (o .:? "properties" .!= mempty))
instance ToJSON Metaline where
toJSON Metaline'{..}
= object
(catMaybes [("properties" .=) <$> _mProperties])
data FacetBucket =
FacetBucket'
{ _fbValue :: !(Maybe Value)
, _fbCount :: !(Maybe (Textual Int32))
, _fbPercentage :: !(Maybe (Textual Int32))
}
deriving (Eq, Show, Data, Typeable, Generic)
facetBucket
:: FacetBucket
facetBucket =
FacetBucket' {_fbValue = Nothing, _fbCount = Nothing, _fbPercentage = Nothing}
fbValue :: Lens' FacetBucket (Maybe Value)
fbValue = lens _fbValue (\ s a -> s{_fbValue = a})
fbCount :: Lens' FacetBucket (Maybe Int32)
fbCount
= lens _fbCount (\ s a -> s{_fbCount = a}) .
mapping _Coerce
fbPercentage :: Lens' FacetBucket (Maybe Int32)
fbPercentage
= lens _fbPercentage (\ s a -> s{_fbPercentage = a})
. mapping _Coerce
instance FromJSON FacetBucket where
parseJSON
= withObject "FacetBucket"
(\ o ->
FacetBucket' <$>
(o .:? "value") <*> (o .:? "count") <*>
(o .:? "percentage"))
instance ToJSON FacetBucket where
toJSON FacetBucket'{..}
= object
(catMaybes
[("value" .=) <$> _fbValue,
("count" .=) <$> _fbCount,
("percentage" .=) <$> _fbPercentage])
newtype StatusDetailsItem =
StatusDetailsItem'
{ _sdiAddtional :: HashMap Text JSONValue
}
deriving (Eq, Show, Data, Typeable, Generic)
statusDetailsItem
:: HashMap Text JSONValue
-> StatusDetailsItem
statusDetailsItem pSdiAddtional_ =
StatusDetailsItem' {_sdiAddtional = _Coerce # pSdiAddtional_}
sdiAddtional :: Lens' StatusDetailsItem (HashMap Text JSONValue)
sdiAddtional
= lens _sdiAddtional (\ s a -> s{_sdiAddtional = a})
. _Coerce
instance FromJSON StatusDetailsItem where
parseJSON
= withObject "StatusDetailsItem"
(\ o -> StatusDetailsItem' <$> (parseJSONObject o))
instance ToJSON StatusDetailsItem where
toJSON = toJSON . _sdiAddtional
data TimestampOperatorOptions =
TimestampOperatorOptions'
{ _tOperatorName :: !(Maybe Text)
, _tLessThanOperatorName :: !(Maybe Text)
, _tGreaterThanOperatorName :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
timestampOperatorOptions
:: TimestampOperatorOptions
timestampOperatorOptions =
TimestampOperatorOptions'
{ _tOperatorName = Nothing
, _tLessThanOperatorName = Nothing
, _tGreaterThanOperatorName = Nothing
}
tOperatorName :: Lens' TimestampOperatorOptions (Maybe Text)
tOperatorName
= lens _tOperatorName
(\ s a -> s{_tOperatorName = a})
tLessThanOperatorName :: Lens' TimestampOperatorOptions (Maybe Text)
tLessThanOperatorName
= lens _tLessThanOperatorName
(\ s a -> s{_tLessThanOperatorName = a})
tGreaterThanOperatorName :: Lens' TimestampOperatorOptions (Maybe Text)
tGreaterThanOperatorName
= lens _tGreaterThanOperatorName
(\ s a -> s{_tGreaterThanOperatorName = a})
instance FromJSON TimestampOperatorOptions where
parseJSON
= withObject "TimestampOperatorOptions"
(\ o ->
TimestampOperatorOptions' <$>
(o .:? "operatorName") <*>
(o .:? "lessThanOperatorName")
<*> (o .:? "greaterThanOperatorName"))
instance ToJSON TimestampOperatorOptions where
toJSON TimestampOperatorOptions'{..}
= object
(catMaybes
[("operatorName" .=) <$> _tOperatorName,
("lessThanOperatorName" .=) <$>
_tLessThanOperatorName,
("greaterThanOperatorName" .=) <$>
_tGreaterThanOperatorName])
data IntegerOperatorOptions =
IntegerOperatorOptions'
{ _iooOperatorName :: !(Maybe Text)
, _iooLessThanOperatorName :: !(Maybe Text)
, _iooGreaterThanOperatorName :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
integerOperatorOptions
:: IntegerOperatorOptions
integerOperatorOptions =
IntegerOperatorOptions'
{ _iooOperatorName = Nothing
, _iooLessThanOperatorName = Nothing
, _iooGreaterThanOperatorName = Nothing
}
iooOperatorName :: Lens' IntegerOperatorOptions (Maybe Text)
iooOperatorName
= lens _iooOperatorName
(\ s a -> s{_iooOperatorName = a})
iooLessThanOperatorName :: Lens' IntegerOperatorOptions (Maybe Text)
iooLessThanOperatorName
= lens _iooLessThanOperatorName
(\ s a -> s{_iooLessThanOperatorName = a})
iooGreaterThanOperatorName :: Lens' IntegerOperatorOptions (Maybe Text)
iooGreaterThanOperatorName
= lens _iooGreaterThanOperatorName
(\ s a -> s{_iooGreaterThanOperatorName = a})
instance FromJSON IntegerOperatorOptions where
parseJSON
= withObject "IntegerOperatorOptions"
(\ o ->
IntegerOperatorOptions' <$>
(o .:? "operatorName") <*>
(o .:? "lessThanOperatorName")
<*> (o .:? "greaterThanOperatorName"))
instance ToJSON IntegerOperatorOptions where
toJSON IntegerOperatorOptions'{..}
= object
(catMaybes
[("operatorName" .=) <$> _iooOperatorName,
("lessThanOperatorName" .=) <$>
_iooLessThanOperatorName,
("greaterThanOperatorName" .=) <$>
_iooGreaterThanOperatorName])
data QuerySuggestion =
QuerySuggestion'
deriving (Eq, Show, Data, Typeable, Generic)
querySuggestion
:: QuerySuggestion
querySuggestion = QuerySuggestion'
instance FromJSON QuerySuggestion where
parseJSON
= withObject "QuerySuggestion"
(\ o -> pure QuerySuggestion')
instance ToJSON QuerySuggestion where
toJSON = const emptyObject
data ListSearchApplicationsResponse =
ListSearchApplicationsResponse'
{ _lsarNextPageToken :: !(Maybe Text)
, _lsarSearchApplications :: !(Maybe [SearchApplication])
}
deriving (Eq, Show, Data, Typeable, Generic)
listSearchApplicationsResponse
:: ListSearchApplicationsResponse
listSearchApplicationsResponse =
ListSearchApplicationsResponse'
{_lsarNextPageToken = Nothing, _lsarSearchApplications = Nothing}
lsarNextPageToken :: Lens' ListSearchApplicationsResponse (Maybe Text)
lsarNextPageToken
= lens _lsarNextPageToken
(\ s a -> s{_lsarNextPageToken = a})
lsarSearchApplications :: Lens' ListSearchApplicationsResponse [SearchApplication]
lsarSearchApplications
= lens _lsarSearchApplications
(\ s a -> s{_lsarSearchApplications = a})
. _Default
. _Coerce
instance FromJSON ListSearchApplicationsResponse
where
parseJSON
= withObject "ListSearchApplicationsResponse"
(\ o ->
ListSearchApplicationsResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "searchApplications" .!= mempty))
instance ToJSON ListSearchApplicationsResponse where
toJSON ListSearchApplicationsResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lsarNextPageToken,
("searchApplications" .=) <$>
_lsarSearchApplications])
newtype ResultDebugInfo =
ResultDebugInfo'
{ _rdiFormattedDebugInfo :: Maybe Text
}
deriving (Eq, Show, Data, Typeable, Generic)
resultDebugInfo
:: ResultDebugInfo
resultDebugInfo = ResultDebugInfo' {_rdiFormattedDebugInfo = Nothing}
rdiFormattedDebugInfo :: Lens' ResultDebugInfo (Maybe Text)
rdiFormattedDebugInfo
= lens _rdiFormattedDebugInfo
(\ s a -> s{_rdiFormattedDebugInfo = a})
instance FromJSON ResultDebugInfo where
parseJSON
= withObject "ResultDebugInfo"
(\ o ->
ResultDebugInfo' <$> (o .:? "formattedDebugInfo"))
instance ToJSON ResultDebugInfo where
toJSON ResultDebugInfo'{..}
= object
(catMaybes
[("formattedDebugInfo" .=) <$>
_rdiFormattedDebugInfo])
data ItemCountByStatus =
ItemCountByStatus'
{ _icbsCount :: !(Maybe (Textual Int64))
, _icbsStatusCode :: !(Maybe ItemCountByStatusStatusCode)
}
deriving (Eq, Show, Data, Typeable, Generic)
itemCountByStatus
:: ItemCountByStatus
itemCountByStatus =
ItemCountByStatus' {_icbsCount = Nothing, _icbsStatusCode = Nothing}
icbsCount :: Lens' ItemCountByStatus (Maybe Int64)
icbsCount
= lens _icbsCount (\ s a -> s{_icbsCount = a}) .
mapping _Coerce
icbsStatusCode :: Lens' ItemCountByStatus (Maybe ItemCountByStatusStatusCode)
icbsStatusCode
= lens _icbsStatusCode
(\ s a -> s{_icbsStatusCode = a})
instance FromJSON ItemCountByStatus where
parseJSON
= withObject "ItemCountByStatus"
(\ o ->
ItemCountByStatus' <$>
(o .:? "count") <*> (o .:? "statusCode"))
instance ToJSON ItemCountByStatus where
toJSON ItemCountByStatus'{..}
= object
(catMaybes
[("count" .=) <$> _icbsCount,
("statusCode" .=) <$> _icbsStatusCode])
newtype TimestampPropertyOptions =
TimestampPropertyOptions'
{ _tpoOperatorOptions :: Maybe TimestampOperatorOptions
}
deriving (Eq, Show, Data, Typeable, Generic)
timestampPropertyOptions
:: TimestampPropertyOptions
timestampPropertyOptions =
TimestampPropertyOptions' {_tpoOperatorOptions = Nothing}
tpoOperatorOptions :: Lens' TimestampPropertyOptions (Maybe TimestampOperatorOptions)
tpoOperatorOptions
= lens _tpoOperatorOptions
(\ s a -> s{_tpoOperatorOptions = a})
instance FromJSON TimestampPropertyOptions where
parseJSON
= withObject "TimestampPropertyOptions"
(\ o ->
TimestampPropertyOptions' <$>
(o .:? "operatorOptions"))
instance ToJSON TimestampPropertyOptions where
toJSON TimestampPropertyOptions'{..}
= object
(catMaybes
[("operatorOptions" .=) <$> _tpoOperatorOptions])
newtype ResultCounts =
ResultCounts'
{ _rcSourceResultCounts :: Maybe [SourceResultCount]
}
deriving (Eq, Show, Data, Typeable, Generic)
resultCounts
:: ResultCounts
resultCounts = ResultCounts' {_rcSourceResultCounts = Nothing}
rcSourceResultCounts :: Lens' ResultCounts [SourceResultCount]
rcSourceResultCounts
= lens _rcSourceResultCounts
(\ s a -> s{_rcSourceResultCounts = a})
. _Default
. _Coerce
instance FromJSON ResultCounts where
parseJSON
= withObject "ResultCounts"
(\ o ->
ResultCounts' <$>
(o .:? "sourceResultCounts" .!= mempty))
instance ToJSON ResultCounts where
toJSON ResultCounts'{..}
= object
(catMaybes
[("sourceResultCounts" .=) <$>
_rcSourceResultCounts])
data FreshnessOptions =
FreshnessOptions'
{ _foFreshnessDuration :: !(Maybe GDuration)
, _foFreshnessProperty :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
freshnessOptions
:: FreshnessOptions
freshnessOptions =
FreshnessOptions'
{_foFreshnessDuration = Nothing, _foFreshnessProperty = Nothing}
foFreshnessDuration :: Lens' FreshnessOptions (Maybe Scientific)
foFreshnessDuration
= lens _foFreshnessDuration
(\ s a -> s{_foFreshnessDuration = a})
. mapping _GDuration
foFreshnessProperty :: Lens' FreshnessOptions (Maybe Text)
foFreshnessProperty
= lens _foFreshnessProperty
(\ s a -> s{_foFreshnessProperty = a})
instance FromJSON FreshnessOptions where
parseJSON
= withObject "FreshnessOptions"
(\ o ->
FreshnessOptions' <$>
(o .:? "freshnessDuration") <*>
(o .:? "freshnessProperty"))
instance ToJSON FreshnessOptions where
toJSON FreshnessOptions'{..}
= object
(catMaybes
[("freshnessDuration" .=) <$> _foFreshnessDuration,
("freshnessProperty" .=) <$> _foFreshnessProperty])
newtype DebugOptions =
DebugOptions'
{ _doEnableDebugging :: Maybe Bool
}
deriving (Eq, Show, Data, Typeable, Generic)
debugOptions
:: DebugOptions
debugOptions = DebugOptions' {_doEnableDebugging = Nothing}
doEnableDebugging :: Lens' DebugOptions (Maybe Bool)
doEnableDebugging
= lens _doEnableDebugging
(\ s a -> s{_doEnableDebugging = a})
instance FromJSON DebugOptions where
parseJSON
= withObject "DebugOptions"
(\ o -> DebugOptions' <$> (o .:? "enableDebugging"))
instance ToJSON DebugOptions where
toJSON DebugOptions'{..}
= object
(catMaybes
[("enableDebugging" .=) <$> _doEnableDebugging])
data IntegerPropertyOptions =
IntegerPropertyOptions'
{ _ipoMaximumValue :: !(Maybe (Textual Int64))
, _ipoOrderedRanking :: !(Maybe IntegerPropertyOptionsOrderedRanking)
, _ipoMinimumValue :: !(Maybe (Textual Int64))
, _ipoOperatorOptions :: !(Maybe IntegerOperatorOptions)
}
deriving (Eq, Show, Data, Typeable, Generic)
integerPropertyOptions
:: IntegerPropertyOptions
integerPropertyOptions =
IntegerPropertyOptions'
{ _ipoMaximumValue = Nothing
, _ipoOrderedRanking = Nothing
, _ipoMinimumValue = Nothing
, _ipoOperatorOptions = Nothing
}
ipoMaximumValue :: Lens' IntegerPropertyOptions (Maybe Int64)
ipoMaximumValue
= lens _ipoMaximumValue
(\ s a -> s{_ipoMaximumValue = a})
. mapping _Coerce
ipoOrderedRanking :: Lens' IntegerPropertyOptions (Maybe IntegerPropertyOptionsOrderedRanking)
ipoOrderedRanking
= lens _ipoOrderedRanking
(\ s a -> s{_ipoOrderedRanking = a})
ipoMinimumValue :: Lens' IntegerPropertyOptions (Maybe Int64)
ipoMinimumValue
= lens _ipoMinimumValue
(\ s a -> s{_ipoMinimumValue = a})
. mapping _Coerce
ipoOperatorOptions :: Lens' IntegerPropertyOptions (Maybe IntegerOperatorOptions)
ipoOperatorOptions
= lens _ipoOperatorOptions
(\ s a -> s{_ipoOperatorOptions = a})
instance FromJSON IntegerPropertyOptions where
parseJSON
= withObject "IntegerPropertyOptions"
(\ o ->
IntegerPropertyOptions' <$>
(o .:? "maximumValue") <*> (o .:? "orderedRanking")
<*> (o .:? "minimumValue")
<*> (o .:? "operatorOptions"))
instance ToJSON IntegerPropertyOptions where
toJSON IntegerPropertyOptions'{..}
= object
(catMaybes
[("maximumValue" .=) <$> _ipoMaximumValue,
("orderedRanking" .=) <$> _ipoOrderedRanking,
("minimumValue" .=) <$> _ipoMinimumValue,
("operatorOptions" .=) <$> _ipoOperatorOptions])
data DataSourceRestriction =
DataSourceRestriction'
{ _dsrFilterOptions :: !(Maybe [FilterOptions])
, _dsrSource :: !(Maybe Source)
}
deriving (Eq, Show, Data, Typeable, Generic)
dataSourceRestriction
:: DataSourceRestriction
dataSourceRestriction =
DataSourceRestriction' {_dsrFilterOptions = Nothing, _dsrSource = Nothing}
dsrFilterOptions :: Lens' DataSourceRestriction [FilterOptions]
dsrFilterOptions
= lens _dsrFilterOptions
(\ s a -> s{_dsrFilterOptions = a})
. _Default
. _Coerce
dsrSource :: Lens' DataSourceRestriction (Maybe Source)
dsrSource
= lens _dsrSource (\ s a -> s{_dsrSource = a})
instance FromJSON DataSourceRestriction where
parseJSON
= withObject "DataSourceRestriction"
(\ o ->
DataSourceRestriction' <$>
(o .:? "filterOptions" .!= mempty) <*>
(o .:? "source"))
instance ToJSON DataSourceRestriction where
toJSON DataSourceRestriction'{..}
= object
(catMaybes
[("filterOptions" .=) <$> _dsrFilterOptions,
("source" .=) <$> _dsrSource])
data Schema =
Schema'
{ _sObjectDefinitions :: !(Maybe [ObjectDefinition])
, _sOperationIds :: !(Maybe [Text])
}
deriving (Eq, Show, Data, Typeable, Generic)
schema
:: Schema
schema = Schema' {_sObjectDefinitions = Nothing, _sOperationIds = Nothing}
sObjectDefinitions :: Lens' Schema [ObjectDefinition]
sObjectDefinitions
= lens _sObjectDefinitions
(\ s a -> s{_sObjectDefinitions = a})
. _Default
. _Coerce
sOperationIds :: Lens' Schema [Text]
sOperationIds
= lens _sOperationIds
(\ s a -> s{_sOperationIds = a})
. _Default
. _Coerce
instance FromJSON Schema where
parseJSON
= withObject "Schema"
(\ o ->
Schema' <$>
(o .:? "objectDefinitions" .!= mempty) <*>
(o .:? "operationIds" .!= mempty))
instance ToJSON Schema where
toJSON Schema'{..}
= object
(catMaybes
[("objectDefinitions" .=) <$> _sObjectDefinitions,
("operationIds" .=) <$> _sOperationIds])
newtype DriveTimeSpanRestrict =
DriveTimeSpanRestrict'
{ _dtsrType :: Maybe DriveTimeSpanRestrictType
}
deriving (Eq, Show, Data, Typeable, Generic)
driveTimeSpanRestrict
:: DriveTimeSpanRestrict
driveTimeSpanRestrict = DriveTimeSpanRestrict' {_dtsrType = Nothing}
dtsrType :: Lens' DriveTimeSpanRestrict (Maybe DriveTimeSpanRestrictType)
dtsrType = lens _dtsrType (\ s a -> s{_dtsrType = a})
instance FromJSON DriveTimeSpanRestrict where
parseJSON
= withObject "DriveTimeSpanRestrict"
(\ o -> DriveTimeSpanRestrict' <$> (o .:? "type"))
instance ToJSON DriveTimeSpanRestrict where
toJSON DriveTimeSpanRestrict'{..}
= object (catMaybes [("type" .=) <$> _dtsrType])
data ResultDisplayField =
ResultDisplayField'
{ _rdfProperty :: !(Maybe NamedProperty)
, _rdfOperatorName :: !(Maybe Text)
, _rdfLabel :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
resultDisplayField
:: ResultDisplayField
resultDisplayField =
ResultDisplayField'
{_rdfProperty = Nothing, _rdfOperatorName = Nothing, _rdfLabel = Nothing}
rdfProperty :: Lens' ResultDisplayField (Maybe NamedProperty)
rdfProperty
= lens _rdfProperty (\ s a -> s{_rdfProperty = a})
rdfOperatorName :: Lens' ResultDisplayField (Maybe Text)
rdfOperatorName
= lens _rdfOperatorName
(\ s a -> s{_rdfOperatorName = a})
rdfLabel :: Lens' ResultDisplayField (Maybe Text)
rdfLabel = lens _rdfLabel (\ s a -> s{_rdfLabel = a})
instance FromJSON ResultDisplayField where
parseJSON
= withObject "ResultDisplayField"
(\ o ->
ResultDisplayField' <$>
(o .:? "property") <*> (o .:? "operatorName") <*>
(o .:? "label"))
instance ToJSON ResultDisplayField where
toJSON ResultDisplayField'{..}
= object
(catMaybes
[("property" .=) <$> _rdfProperty,
("operatorName" .=) <$> _rdfOperatorName,
("label" .=) <$> _rdfLabel])
data UpdateSchemaRequest =
UpdateSchemaRequest'
{ _usrValidateOnly :: !(Maybe Bool)
, _usrSchema :: !(Maybe Schema)
, _usrDebugOptions :: !(Maybe DebugOptions)
}
deriving (Eq, Show, Data, Typeable, Generic)
updateSchemaRequest
:: UpdateSchemaRequest
updateSchemaRequest =
UpdateSchemaRequest'
{ _usrValidateOnly = Nothing
, _usrSchema = Nothing
, _usrDebugOptions = Nothing
}
usrValidateOnly :: Lens' UpdateSchemaRequest (Maybe Bool)
usrValidateOnly
= lens _usrValidateOnly
(\ s a -> s{_usrValidateOnly = a})
usrSchema :: Lens' UpdateSchemaRequest (Maybe Schema)
usrSchema
= lens _usrSchema (\ s a -> s{_usrSchema = a})
usrDebugOptions :: Lens' UpdateSchemaRequest (Maybe DebugOptions)
usrDebugOptions
= lens _usrDebugOptions
(\ s a -> s{_usrDebugOptions = a})
instance FromJSON UpdateSchemaRequest where
parseJSON
= withObject "UpdateSchemaRequest"
(\ o ->
UpdateSchemaRequest' <$>
(o .:? "validateOnly") <*> (o .:? "schema") <*>
(o .:? "debugOptions"))
instance ToJSON UpdateSchemaRequest where
toJSON UpdateSchemaRequest'{..}
= object
(catMaybes
[("validateOnly" .=) <$> _usrValidateOnly,
("schema" .=) <$> _usrSchema,
("debugOptions" .=) <$> _usrDebugOptions])
data Date =
Date'
{ _dDay :: !(Maybe (Textual Int32))
, _dYear :: !(Maybe (Textual Int32))
, _dMonth :: !(Maybe (Textual Int32))
}
deriving (Eq, Show, Data, Typeable, Generic)
date
:: Date
date = Date' {_dDay = Nothing, _dYear = Nothing, _dMonth = Nothing}
dDay :: Lens' Date (Maybe Int32)
dDay
= lens _dDay (\ s a -> s{_dDay = a}) .
mapping _Coerce
dYear :: Lens' Date (Maybe Int32)
dYear
= lens _dYear (\ s a -> s{_dYear = a}) .
mapping _Coerce
dMonth :: Lens' Date (Maybe Int32)
dMonth
= lens _dMonth (\ s a -> s{_dMonth = a}) .
mapping _Coerce
instance FromJSON Date where
parseJSON
= withObject "Date"
(\ o ->
Date' <$>
(o .:? "day") <*> (o .:? "year") <*> (o .:? "month"))
instance ToJSON Date where
toJSON Date'{..}
= object
(catMaybes
[("day" .=) <$> _dDay, ("year" .=) <$> _dYear,
("month" .=) <$> _dMonth])
newtype DisplayedProperty =
DisplayedProperty'
{ _dpPropertyName :: Maybe Text
}
deriving (Eq, Show, Data, Typeable, Generic)
displayedProperty
:: DisplayedProperty
displayedProperty = DisplayedProperty' {_dpPropertyName = Nothing}
dpPropertyName :: Lens' DisplayedProperty (Maybe Text)
dpPropertyName
= lens _dpPropertyName
(\ s a -> s{_dpPropertyName = a})
instance FromJSON DisplayedProperty where
parseJSON
= withObject "DisplayedProperty"
(\ o ->
DisplayedProperty' <$> (o .:? "propertyName"))
instance ToJSON DisplayedProperty where
toJSON DisplayedProperty'{..}
= object
(catMaybes [("propertyName" .=) <$> _dpPropertyName])
data FacetResult =
FacetResult'
{ _frSourceName :: !(Maybe Text)
, _frBuckets :: !(Maybe [FacetBucket])
, _frObjectType :: !(Maybe Text)
, _frOperatorName :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
facetResult
:: FacetResult
facetResult =
FacetResult'
{ _frSourceName = Nothing
, _frBuckets = Nothing
, _frObjectType = Nothing
, _frOperatorName = Nothing
}
frSourceName :: Lens' FacetResult (Maybe Text)
frSourceName
= lens _frSourceName (\ s a -> s{_frSourceName = a})
frBuckets :: Lens' FacetResult [FacetBucket]
frBuckets
= lens _frBuckets (\ s a -> s{_frBuckets = a}) .
_Default
. _Coerce
frObjectType :: Lens' FacetResult (Maybe Text)
frObjectType
= lens _frObjectType (\ s a -> s{_frObjectType = a})
frOperatorName :: Lens' FacetResult (Maybe Text)
frOperatorName
= lens _frOperatorName
(\ s a -> s{_frOperatorName = a})
instance FromJSON FacetResult where
parseJSON
= withObject "FacetResult"
(\ o ->
FacetResult' <$>
(o .:? "sourceName") <*> (o .:? "buckets" .!= mempty)
<*> (o .:? "objectType")
<*> (o .:? "operatorName"))
instance ToJSON FacetResult where
toJSON FacetResult'{..}
= object
(catMaybes
[("sourceName" .=) <$> _frSourceName,
("buckets" .=) <$> _frBuckets,
("objectType" .=) <$> _frObjectType,
("operatorName" .=) <$> _frOperatorName])
newtype DriveMimeTypeRestrict =
DriveMimeTypeRestrict'
{ _dmtrType :: Maybe DriveMimeTypeRestrictType
}
deriving (Eq, Show, Data, Typeable, Generic)
driveMimeTypeRestrict
:: DriveMimeTypeRestrict
driveMimeTypeRestrict = DriveMimeTypeRestrict' {_dmtrType = Nothing}
dmtrType :: Lens' DriveMimeTypeRestrict (Maybe DriveMimeTypeRestrictType)
dmtrType = lens _dmtrType (\ s a -> s{_dmtrType = a})
instance FromJSON DriveMimeTypeRestrict where
parseJSON
= withObject "DriveMimeTypeRestrict"
(\ o -> DriveMimeTypeRestrict' <$> (o .:? "type"))
instance ToJSON DriveMimeTypeRestrict where
toJSON DriveMimeTypeRestrict'{..}
= object (catMaybes [("type" .=) <$> _dmtrType])
newtype StructuredDataObject =
StructuredDataObject'
{ _sdoProperties :: Maybe [NamedProperty]
}
deriving (Eq, Show, Data, Typeable, Generic)
structuredDataObject
:: StructuredDataObject
structuredDataObject = StructuredDataObject' {_sdoProperties = Nothing}
sdoProperties :: Lens' StructuredDataObject [NamedProperty]
sdoProperties
= lens _sdoProperties
(\ s a -> s{_sdoProperties = a})
. _Default
. _Coerce
instance FromJSON StructuredDataObject where
parseJSON
= withObject "StructuredDataObject"
(\ o ->
StructuredDataObject' <$>
(o .:? "properties" .!= mempty))
instance ToJSON StructuredDataObject where
toJSON StructuredDataObject'{..}
= object
(catMaybes [("properties" .=) <$> _sdoProperties])
newtype Media =
Media'
{ _mResourceName :: Maybe Text
}
deriving (Eq, Show, Data, Typeable, Generic)
media
:: Media
media = Media' {_mResourceName = Nothing}
mResourceName :: Lens' Media (Maybe Text)
mResourceName
= lens _mResourceName
(\ s a -> s{_mResourceName = a})
instance FromJSON Media where
parseJSON
= withObject "Media"
(\ o -> Media' <$> (o .:? "resourceName"))
instance ToJSON Media where
toJSON Media'{..}
= object
(catMaybes [("resourceName" .=) <$> _mResourceName])
data ItemStructuredData =
ItemStructuredData'
{ _isdHash :: !(Maybe Text)
, _isdObject :: !(Maybe StructuredDataObject)
}
deriving (Eq, Show, Data, Typeable, Generic)
itemStructuredData
:: ItemStructuredData
itemStructuredData =
ItemStructuredData' {_isdHash = Nothing, _isdObject = Nothing}
isdHash :: Lens' ItemStructuredData (Maybe Text)
isdHash = lens _isdHash (\ s a -> s{_isdHash = a})
isdObject :: Lens' ItemStructuredData (Maybe StructuredDataObject)
isdObject
= lens _isdObject (\ s a -> s{_isdObject = a})
instance FromJSON ItemStructuredData where
parseJSON
= withObject "ItemStructuredData"
(\ o ->
ItemStructuredData' <$>
(o .:? "hash") <*> (o .:? "object"))
instance ToJSON ItemStructuredData where
toJSON ItemStructuredData'{..}
= object
(catMaybes
[("hash" .=) <$> _isdHash,
("object" .=) <$> _isdObject])
newtype DriveFollowUpRestrict =
DriveFollowUpRestrict'
{ _dfurType :: Maybe DriveFollowUpRestrictType
}
deriving (Eq, Show, Data, Typeable, Generic)
driveFollowUpRestrict
:: DriveFollowUpRestrict
driveFollowUpRestrict = DriveFollowUpRestrict' {_dfurType = Nothing}
dfurType :: Lens' DriveFollowUpRestrict (Maybe DriveFollowUpRestrictType)
dfurType = lens _dfurType (\ s a -> s{_dfurType = a})
instance FromJSON DriveFollowUpRestrict where
parseJSON
= withObject "DriveFollowUpRestrict"
(\ o -> DriveFollowUpRestrict' <$> (o .:? "type"))
instance ToJSON DriveFollowUpRestrict where
toJSON DriveFollowUpRestrict'{..}
= object (catMaybes [("type" .=) <$> _dfurType])
newtype DateValues =
DateValues'
{ _dValues :: Maybe [Date]
}
deriving (Eq, Show, Data, Typeable, Generic)
dateValues
:: DateValues
dateValues = DateValues' {_dValues = Nothing}
dValues :: Lens' DateValues [Date]
dValues
= lens _dValues (\ s a -> s{_dValues = a}) . _Default
. _Coerce
instance FromJSON DateValues where
parseJSON
= withObject "DateValues"
(\ o -> DateValues' <$> (o .:? "values" .!= mempty))
instance ToJSON DateValues where
toJSON DateValues'{..}
= object (catMaybes [("values" .=) <$> _dValues])
data NamedProperty =
NamedProperty'
{ _npDoubleValues :: !(Maybe DoubleValues)
, _npTextValues :: !(Maybe TextValues)
, _npDateValues :: !(Maybe DateValues)
, _npName :: !(Maybe Text)
, _npBooleanValue :: !(Maybe Bool)
, _npObjectValues :: !(Maybe ObjectValues)
, _npHTMLValues :: !(Maybe HTMLValues)
, _npEnumValues :: !(Maybe EnumValues)
, _npTimestampValues :: !(Maybe TimestampValues)
, _npIntegerValues :: !(Maybe IntegerValues)
}
deriving (Eq, Show, Data, Typeable, Generic)
namedProperty
:: NamedProperty
namedProperty =
NamedProperty'
{ _npDoubleValues = Nothing
, _npTextValues = Nothing
, _npDateValues = Nothing
, _npName = Nothing
, _npBooleanValue = Nothing
, _npObjectValues = Nothing
, _npHTMLValues = Nothing
, _npEnumValues = Nothing
, _npTimestampValues = Nothing
, _npIntegerValues = Nothing
}
npDoubleValues :: Lens' NamedProperty (Maybe DoubleValues)
npDoubleValues
= lens _npDoubleValues
(\ s a -> s{_npDoubleValues = a})
npTextValues :: Lens' NamedProperty (Maybe TextValues)
npTextValues
= lens _npTextValues (\ s a -> s{_npTextValues = a})
npDateValues :: Lens' NamedProperty (Maybe DateValues)
npDateValues
= lens _npDateValues (\ s a -> s{_npDateValues = a})
npName :: Lens' NamedProperty (Maybe Text)
npName = lens _npName (\ s a -> s{_npName = a})
npBooleanValue :: Lens' NamedProperty (Maybe Bool)
npBooleanValue
= lens _npBooleanValue
(\ s a -> s{_npBooleanValue = a})
npObjectValues :: Lens' NamedProperty (Maybe ObjectValues)
npObjectValues
= lens _npObjectValues
(\ s a -> s{_npObjectValues = a})
npHTMLValues :: Lens' NamedProperty (Maybe HTMLValues)
npHTMLValues
= lens _npHTMLValues (\ s a -> s{_npHTMLValues = a})
npEnumValues :: Lens' NamedProperty (Maybe EnumValues)
npEnumValues
= lens _npEnumValues (\ s a -> s{_npEnumValues = a})
npTimestampValues :: Lens' NamedProperty (Maybe TimestampValues)
npTimestampValues
= lens _npTimestampValues
(\ s a -> s{_npTimestampValues = a})
npIntegerValues :: Lens' NamedProperty (Maybe IntegerValues)
npIntegerValues
= lens _npIntegerValues
(\ s a -> s{_npIntegerValues = a})
instance FromJSON NamedProperty where
parseJSON
= withObject "NamedProperty"
(\ o ->
NamedProperty' <$>
(o .:? "doubleValues") <*> (o .:? "textValues") <*>
(o .:? "dateValues")
<*> (o .:? "name")
<*> (o .:? "booleanValue")
<*> (o .:? "objectValues")
<*> (o .:? "htmlValues")
<*> (o .:? "enumValues")
<*> (o .:? "timestampValues")
<*> (o .:? "integerValues"))
instance ToJSON NamedProperty where
toJSON NamedProperty'{..}
= object
(catMaybes
[("doubleValues" .=) <$> _npDoubleValues,
("textValues" .=) <$> _npTextValues,
("dateValues" .=) <$> _npDateValues,
("name" .=) <$> _npName,
("booleanValue" .=) <$> _npBooleanValue,
("objectValues" .=) <$> _npObjectValues,
("htmlValues" .=) <$> _npHTMLValues,
("enumValues" .=) <$> _npEnumValues,
("timestampValues" .=) <$> _npTimestampValues,
("integerValues" .=) <$> _npIntegerValues])
data MatchRange =
MatchRange'
{ _mrStart :: !(Maybe (Textual Int32))
, _mrEnd :: !(Maybe (Textual Int32))
}
deriving (Eq, Show, Data, Typeable, Generic)
matchRange
:: MatchRange
matchRange = MatchRange' {_mrStart = Nothing, _mrEnd = Nothing}
mrStart :: Lens' MatchRange (Maybe Int32)
mrStart
= lens _mrStart (\ s a -> s{_mrStart = a}) .
mapping _Coerce
mrEnd :: Lens' MatchRange (Maybe Int32)
mrEnd
= lens _mrEnd (\ s a -> s{_mrEnd = a}) .
mapping _Coerce
instance FromJSON MatchRange where
parseJSON
= withObject "MatchRange"
(\ o ->
MatchRange' <$> (o .:? "start") <*> (o .:? "end"))
instance ToJSON MatchRange where
toJSON MatchRange'{..}
= object
(catMaybes
[("start" .=) <$> _mrStart, ("end" .=) <$> _mrEnd])
newtype ResponseDebugInfo =
ResponseDebugInfo'
{ _rFormattedDebugInfo :: Maybe Text
}
deriving (Eq, Show, Data, Typeable, Generic)
responseDebugInfo
:: ResponseDebugInfo
responseDebugInfo = ResponseDebugInfo' {_rFormattedDebugInfo = Nothing}
rFormattedDebugInfo :: Lens' ResponseDebugInfo (Maybe Text)
rFormattedDebugInfo
= lens _rFormattedDebugInfo
(\ s a -> s{_rFormattedDebugInfo = a})
instance FromJSON ResponseDebugInfo where
parseJSON
= withObject "ResponseDebugInfo"
(\ o ->
ResponseDebugInfo' <$> (o .:? "formattedDebugInfo"))
instance ToJSON ResponseDebugInfo where
toJSON ResponseDebugInfo'{..}
= object
(catMaybes
[("formattedDebugInfo" .=) <$> _rFormattedDebugInfo])
data ListDataSourceResponse =
ListDataSourceResponse'
{ _ldsrNextPageToken :: !(Maybe Text)
, _ldsrSources :: !(Maybe [DataSource])
}
deriving (Eq, Show, Data, Typeable, Generic)
listDataSourceResponse
:: ListDataSourceResponse
listDataSourceResponse =
ListDataSourceResponse' {_ldsrNextPageToken = Nothing, _ldsrSources = Nothing}
ldsrNextPageToken :: Lens' ListDataSourceResponse (Maybe Text)
ldsrNextPageToken
= lens _ldsrNextPageToken
(\ s a -> s{_ldsrNextPageToken = a})
ldsrSources :: Lens' ListDataSourceResponse [DataSource]
ldsrSources
= lens _ldsrSources (\ s a -> s{_ldsrSources = a}) .
_Default
. _Coerce
instance FromJSON ListDataSourceResponse where
parseJSON
= withObject "ListDataSourceResponse"
(\ o ->
ListDataSourceResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "sources" .!= mempty))
instance ToJSON ListDataSourceResponse where
toJSON ListDataSourceResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _ldsrNextPageToken,
("sources" .=) <$> _ldsrSources])
data SearchRequest =
SearchRequest'
{ _srSortOptions :: !(Maybe SortOptions)
, _srDataSourceRestrictions :: !(Maybe [DataSourceRestriction])
, _srQueryInterpretationOptions :: !(Maybe QueryInterpretationOptions)
, _srStart :: !(Maybe (Textual Int32))
, _srQuery :: !(Maybe Text)
, _srFacetOptions :: !(Maybe [FacetOptions])
, _srPageSize :: !(Maybe (Textual Int32))
, _srRequestOptions :: !(Maybe RequestOptions)
}
deriving (Eq, Show, Data, Typeable, Generic)
searchRequest
:: SearchRequest
searchRequest =
SearchRequest'
{ _srSortOptions = Nothing
, _srDataSourceRestrictions = Nothing
, _srQueryInterpretationOptions = Nothing
, _srStart = Nothing
, _srQuery = Nothing
, _srFacetOptions = Nothing
, _srPageSize = Nothing
, _srRequestOptions = Nothing
}
srSortOptions :: Lens' SearchRequest (Maybe SortOptions)
srSortOptions
= lens _srSortOptions
(\ s a -> s{_srSortOptions = a})
srDataSourceRestrictions :: Lens' SearchRequest [DataSourceRestriction]
srDataSourceRestrictions
= lens _srDataSourceRestrictions
(\ s a -> s{_srDataSourceRestrictions = a})
. _Default
. _Coerce
srQueryInterpretationOptions :: Lens' SearchRequest (Maybe QueryInterpretationOptions)
srQueryInterpretationOptions
= lens _srQueryInterpretationOptions
(\ s a -> s{_srQueryInterpretationOptions = a})
srStart :: Lens' SearchRequest (Maybe Int32)
srStart
= lens _srStart (\ s a -> s{_srStart = a}) .
mapping _Coerce
srQuery :: Lens' SearchRequest (Maybe Text)
srQuery = lens _srQuery (\ s a -> s{_srQuery = a})
srFacetOptions :: Lens' SearchRequest [FacetOptions]
srFacetOptions
= lens _srFacetOptions
(\ s a -> s{_srFacetOptions = a})
. _Default
. _Coerce
srPageSize :: Lens' SearchRequest (Maybe Int32)
srPageSize
= lens _srPageSize (\ s a -> s{_srPageSize = a}) .
mapping _Coerce
srRequestOptions :: Lens' SearchRequest (Maybe RequestOptions)
srRequestOptions
= lens _srRequestOptions
(\ s a -> s{_srRequestOptions = a})
instance FromJSON SearchRequest where
parseJSON
= withObject "SearchRequest"
(\ o ->
SearchRequest' <$>
(o .:? "sortOptions") <*>
(o .:? "dataSourceRestrictions" .!= mempty)
<*> (o .:? "queryInterpretationOptions")
<*> (o .:? "start")
<*> (o .:? "query")
<*> (o .:? "facetOptions" .!= mempty)
<*> (o .:? "pageSize")
<*> (o .:? "requestOptions"))
instance ToJSON SearchRequest where
toJSON SearchRequest'{..}
= object
(catMaybes
[("sortOptions" .=) <$> _srSortOptions,
("dataSourceRestrictions" .=) <$>
_srDataSourceRestrictions,
("queryInterpretationOptions" .=) <$>
_srQueryInterpretationOptions,
("start" .=) <$> _srStart, ("query" .=) <$> _srQuery,
("facetOptions" .=) <$> _srFacetOptions,
("pageSize" .=) <$> _srPageSize,
("requestOptions" .=) <$> _srRequestOptions])
newtype Name =
Name'
{ _nDisplayName :: Maybe Text
}
deriving (Eq, Show, Data, Typeable, Generic)
name
:: Name
name = Name' {_nDisplayName = Nothing}
nDisplayName :: Lens' Name (Maybe Text)
nDisplayName
= lens _nDisplayName (\ s a -> s{_nDisplayName = a})
instance FromJSON Name where
parseJSON
= withObject "Name"
(\ o -> Name' <$> (o .:? "displayName"))
instance ToJSON Name where
toJSON Name'{..}
= object
(catMaybes [("displayName" .=) <$> _nDisplayName])
data SourceResultCount =
SourceResultCount'
{ _srcHasMoreResults :: !(Maybe Bool)
, _srcResultCountExact :: !(Maybe (Textual Int64))
, _srcResultCountEstimate :: !(Maybe (Textual Int64))
, _srcSource :: !(Maybe Source)
}
deriving (Eq, Show, Data, Typeable, Generic)
sourceResultCount
:: SourceResultCount
sourceResultCount =
SourceResultCount'
{ _srcHasMoreResults = Nothing
, _srcResultCountExact = Nothing
, _srcResultCountEstimate = Nothing
, _srcSource = Nothing
}
srcHasMoreResults :: Lens' SourceResultCount (Maybe Bool)
srcHasMoreResults
= lens _srcHasMoreResults
(\ s a -> s{_srcHasMoreResults = a})
srcResultCountExact :: Lens' SourceResultCount (Maybe Int64)
srcResultCountExact
= lens _srcResultCountExact
(\ s a -> s{_srcResultCountExact = a})
. mapping _Coerce
srcResultCountEstimate :: Lens' SourceResultCount (Maybe Int64)
srcResultCountEstimate
= lens _srcResultCountEstimate
(\ s a -> s{_srcResultCountEstimate = a})
. mapping _Coerce
srcSource :: Lens' SourceResultCount (Maybe Source)
srcSource
= lens _srcSource (\ s a -> s{_srcSource = a})
instance FromJSON SourceResultCount where
parseJSON
= withObject "SourceResultCount"
(\ o ->
SourceResultCount' <$>
(o .:? "hasMoreResults") <*>
(o .:? "resultCountExact")
<*> (o .:? "resultCountEstimate")
<*> (o .:? "source"))
instance ToJSON SourceResultCount where
toJSON SourceResultCount'{..}
= object
(catMaybes
[("hasMoreResults" .=) <$> _srcHasMoreResults,
("resultCountExact" .=) <$> _srcResultCountExact,
("resultCountEstimate" .=) <$>
_srcResultCountEstimate,
("source" .=) <$> _srcSource])
data SourceConfig =
SourceConfig'
{ _scCrowdingConfig :: !(Maybe SourceCrowdingConfig)
, _scScoringConfig :: !(Maybe SourceScoringConfig)
, _scSource :: !(Maybe Source)
}
deriving (Eq, Show, Data, Typeable, Generic)
sourceConfig
:: SourceConfig
sourceConfig =
SourceConfig'
{ _scCrowdingConfig = Nothing
, _scScoringConfig = Nothing
, _scSource = Nothing
}
scCrowdingConfig :: Lens' SourceConfig (Maybe SourceCrowdingConfig)
scCrowdingConfig
= lens _scCrowdingConfig
(\ s a -> s{_scCrowdingConfig = a})
scScoringConfig :: Lens' SourceConfig (Maybe SourceScoringConfig)
scScoringConfig
= lens _scScoringConfig
(\ s a -> s{_scScoringConfig = a})
scSource :: Lens' SourceConfig (Maybe Source)
scSource = lens _scSource (\ s a -> s{_scSource = a})
instance FromJSON SourceConfig where
parseJSON
= withObject "SourceConfig"
(\ o ->
SourceConfig' <$>
(o .:? "crowdingConfig") <*> (o .:? "scoringConfig")
<*> (o .:? "source"))
instance ToJSON SourceConfig where
toJSON SourceConfig'{..}
= object
(catMaybes
[("crowdingConfig" .=) <$> _scCrowdingConfig,
("scoringConfig" .=) <$> _scScoringConfig,
("source" .=) <$> _scSource])
data ListItemsResponse =
ListItemsResponse'
{ _lirNextPageToken :: !(Maybe Text)
, _lirItems :: !(Maybe [Item])
}
deriving (Eq, Show, Data, Typeable, Generic)
listItemsResponse
:: ListItemsResponse
listItemsResponse =
ListItemsResponse' {_lirNextPageToken = Nothing, _lirItems = Nothing}
lirNextPageToken :: Lens' ListItemsResponse (Maybe Text)
lirNextPageToken
= lens _lirNextPageToken
(\ s a -> s{_lirNextPageToken = a})
lirItems :: Lens' ListItemsResponse [Item]
lirItems
= lens _lirItems (\ s a -> s{_lirItems = a}) .
_Default
. _Coerce
instance FromJSON ListItemsResponse where
parseJSON
= withObject "ListItemsResponse"
(\ o ->
ListItemsResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "items" .!= mempty))
instance ToJSON ListItemsResponse where
toJSON ListItemsResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lirNextPageToken,
("items" .=) <$> _lirItems])
data ScoringConfig =
ScoringConfig'
{ _scDisablePersonalization :: !(Maybe Bool)
, _scDisableFreshness :: !(Maybe Bool)
}
deriving (Eq, Show, Data, Typeable, Generic)
scoringConfig
:: ScoringConfig
scoringConfig =
ScoringConfig'
{_scDisablePersonalization = Nothing, _scDisableFreshness = Nothing}
scDisablePersonalization :: Lens' ScoringConfig (Maybe Bool)
scDisablePersonalization
= lens _scDisablePersonalization
(\ s a -> s{_scDisablePersonalization = a})
scDisableFreshness :: Lens' ScoringConfig (Maybe Bool)
scDisableFreshness
= lens _scDisableFreshness
(\ s a -> s{_scDisableFreshness = a})
instance FromJSON ScoringConfig where
parseJSON
= withObject "ScoringConfig"
(\ o ->
ScoringConfig' <$>
(o .:? "disablePersonalization") <*>
(o .:? "disableFreshness"))
instance ToJSON ScoringConfig where
toJSON ScoringConfig'{..}
= object
(catMaybes
[("disablePersonalization" .=) <$>
_scDisablePersonalization,
("disableFreshness" .=) <$> _scDisableFreshness])
data StartUploadItemRequest =
StartUploadItemRequest'
{ _suirDebugOptions :: !(Maybe DebugOptions)
, _suirConnectorName :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
startUploadItemRequest
:: StartUploadItemRequest
startUploadItemRequest =
StartUploadItemRequest'
{_suirDebugOptions = Nothing, _suirConnectorName = Nothing}
suirDebugOptions :: Lens' StartUploadItemRequest (Maybe DebugOptions)
suirDebugOptions
= lens _suirDebugOptions
(\ s a -> s{_suirDebugOptions = a})
suirConnectorName :: Lens' StartUploadItemRequest (Maybe Text)
suirConnectorName
= lens _suirConnectorName
(\ s a -> s{_suirConnectorName = a})
instance FromJSON StartUploadItemRequest where
parseJSON
= withObject "StartUploadItemRequest"
(\ o ->
StartUploadItemRequest' <$>
(o .:? "debugOptions") <*> (o .:? "connectorName"))
instance ToJSON StartUploadItemRequest where
toJSON StartUploadItemRequest'{..}
= object
(catMaybes
[("debugOptions" .=) <$> _suirDebugOptions,
("connectorName" .=) <$> _suirConnectorName])
newtype UploadItemRef =
UploadItemRef'
{ _uirName :: Maybe Text
}
deriving (Eq, Show, Data, Typeable, Generic)
uploadItemRef
:: UploadItemRef
uploadItemRef = UploadItemRef' {_uirName = Nothing}
uirName :: Lens' UploadItemRef (Maybe Text)
uirName = lens _uirName (\ s a -> s{_uirName = a})
instance FromJSON UploadItemRef where
parseJSON
= withObject "UploadItemRef"
(\ o -> UploadItemRef' <$> (o .:? "name"))
instance ToJSON UploadItemRef where
toJSON UploadItemRef'{..}
= object (catMaybes [("name" .=) <$> _uirName])
newtype GmailTimeRestrict =
GmailTimeRestrict'
{ _gtrType :: Maybe GmailTimeRestrictType
}
deriving (Eq, Show, Data, Typeable, Generic)
gmailTimeRestrict
:: GmailTimeRestrict
gmailTimeRestrict = GmailTimeRestrict' {_gtrType = Nothing}
gtrType :: Lens' GmailTimeRestrict (Maybe GmailTimeRestrictType)
gtrType = lens _gtrType (\ s a -> s{_gtrType = a})
instance FromJSON GmailTimeRestrict where
parseJSON
= withObject "GmailTimeRestrict"
(\ o -> GmailTimeRestrict' <$> (o .:? "type"))
instance ToJSON GmailTimeRestrict where
toJSON GmailTimeRestrict'{..}
= object (catMaybes [("type" .=) <$> _gtrType])
data PushItemRequest =
PushItemRequest'
{ _pirDebugOptions :: !(Maybe DebugOptions)
, _pirConnectorName :: !(Maybe Text)
, _pirItem :: !(Maybe PushItem)
}
deriving (Eq, Show, Data, Typeable, Generic)
pushItemRequest
:: PushItemRequest
pushItemRequest =
PushItemRequest'
{ _pirDebugOptions = Nothing
, _pirConnectorName = Nothing
, _pirItem = Nothing
}
pirDebugOptions :: Lens' PushItemRequest (Maybe DebugOptions)
pirDebugOptions
= lens _pirDebugOptions
(\ s a -> s{_pirDebugOptions = a})
pirConnectorName :: Lens' PushItemRequest (Maybe Text)
pirConnectorName
= lens _pirConnectorName
(\ s a -> s{_pirConnectorName = a})
pirItem :: Lens' PushItemRequest (Maybe PushItem)
pirItem = lens _pirItem (\ s a -> s{_pirItem = a})
instance FromJSON PushItemRequest where
parseJSON
= withObject "PushItemRequest"
(\ o ->
PushItemRequest' <$>
(o .:? "debugOptions") <*> (o .:? "connectorName")
<*> (o .:? "item"))
instance ToJSON PushItemRequest where
toJSON PushItemRequest'{..}
= object
(catMaybes
[("debugOptions" .=) <$> _pirDebugOptions,
("connectorName" .=) <$> _pirConnectorName,
("item" .=) <$> _pirItem])
newtype DoublePropertyOptions =
DoublePropertyOptions'
{ _dpoOperatorOptions :: Maybe DoubleOperatorOptions
}
deriving (Eq, Show, Data, Typeable, Generic)
doublePropertyOptions
:: DoublePropertyOptions
doublePropertyOptions = DoublePropertyOptions' {_dpoOperatorOptions = Nothing}
dpoOperatorOptions :: Lens' DoublePropertyOptions (Maybe DoubleOperatorOptions)
dpoOperatorOptions
= lens _dpoOperatorOptions
(\ s a -> s{_dpoOperatorOptions = a})
instance FromJSON DoublePropertyOptions where
parseJSON
= withObject "DoublePropertyOptions"
(\ o ->
DoublePropertyOptions' <$> (o .:? "operatorOptions"))
instance ToJSON DoublePropertyOptions where
toJSON DoublePropertyOptions'{..}
= object
(catMaybes
[("operatorOptions" .=) <$> _dpoOperatorOptions])
data QueryOperator =
QueryOperator'
{ _qoIsSuggestable :: !(Maybe Bool)
, _qoIsReturnable :: !(Maybe Bool)
, _qoIsRepeatable :: !(Maybe Bool)
, _qoOperatorName :: !(Maybe Text)
, _qoIsSortable :: !(Maybe Bool)
, _qoIsFacetable :: !(Maybe Bool)
, _qoDisplayName :: !(Maybe Text)
, _qoLessThanOperatorName :: !(Maybe Text)
, _qoType :: !(Maybe QueryOperatorType)
, _qoEnumValues :: !(Maybe [Text])
, _qoGreaterThanOperatorName :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
queryOperator
:: QueryOperator
queryOperator =
QueryOperator'
{ _qoIsSuggestable = Nothing
, _qoIsReturnable = Nothing
, _qoIsRepeatable = Nothing
, _qoOperatorName = Nothing
, _qoIsSortable = Nothing
, _qoIsFacetable = Nothing
, _qoDisplayName = Nothing
, _qoLessThanOperatorName = Nothing
, _qoType = Nothing
, _qoEnumValues = Nothing
, _qoGreaterThanOperatorName = Nothing
}
qoIsSuggestable :: Lens' QueryOperator (Maybe Bool)
qoIsSuggestable
= lens _qoIsSuggestable
(\ s a -> s{_qoIsSuggestable = a})
qoIsReturnable :: Lens' QueryOperator (Maybe Bool)
qoIsReturnable
= lens _qoIsReturnable
(\ s a -> s{_qoIsReturnable = a})
qoIsRepeatable :: Lens' QueryOperator (Maybe Bool)
qoIsRepeatable
= lens _qoIsRepeatable
(\ s a -> s{_qoIsRepeatable = a})
qoOperatorName :: Lens' QueryOperator (Maybe Text)
qoOperatorName
= lens _qoOperatorName
(\ s a -> s{_qoOperatorName = a})
qoIsSortable :: Lens' QueryOperator (Maybe Bool)
qoIsSortable
= lens _qoIsSortable (\ s a -> s{_qoIsSortable = a})
qoIsFacetable :: Lens' QueryOperator (Maybe Bool)
qoIsFacetable
= lens _qoIsFacetable
(\ s a -> s{_qoIsFacetable = a})
qoDisplayName :: Lens' QueryOperator (Maybe Text)
qoDisplayName
= lens _qoDisplayName
(\ s a -> s{_qoDisplayName = a})
qoLessThanOperatorName :: Lens' QueryOperator (Maybe Text)
qoLessThanOperatorName
= lens _qoLessThanOperatorName
(\ s a -> s{_qoLessThanOperatorName = a})
qoType :: Lens' QueryOperator (Maybe QueryOperatorType)
qoType = lens _qoType (\ s a -> s{_qoType = a})
qoEnumValues :: Lens' QueryOperator [Text]
qoEnumValues
= lens _qoEnumValues (\ s a -> s{_qoEnumValues = a})
. _Default
. _Coerce
qoGreaterThanOperatorName :: Lens' QueryOperator (Maybe Text)
qoGreaterThanOperatorName
= lens _qoGreaterThanOperatorName
(\ s a -> s{_qoGreaterThanOperatorName = a})
instance FromJSON QueryOperator where
parseJSON
= withObject "QueryOperator"
(\ o ->
QueryOperator' <$>
(o .:? "isSuggestable") <*> (o .:? "isReturnable")
<*> (o .:? "isRepeatable")
<*> (o .:? "operatorName")
<*> (o .:? "isSortable")
<*> (o .:? "isFacetable")
<*> (o .:? "displayName")
<*> (o .:? "lessThanOperatorName")
<*> (o .:? "type")
<*> (o .:? "enumValues" .!= mempty)
<*> (o .:? "greaterThanOperatorName"))
instance ToJSON QueryOperator where
toJSON QueryOperator'{..}
= object
(catMaybes
[("isSuggestable" .=) <$> _qoIsSuggestable,
("isReturnable" .=) <$> _qoIsReturnable,
("isRepeatable" .=) <$> _qoIsRepeatable,
("operatorName" .=) <$> _qoOperatorName,
("isSortable" .=) <$> _qoIsSortable,
("isFacetable" .=) <$> _qoIsFacetable,
("displayName" .=) <$> _qoDisplayName,
("lessThanOperatorName" .=) <$>
_qoLessThanOperatorName,
("type" .=) <$> _qoType,
("enumValues" .=) <$> _qoEnumValues,
("greaterThanOperatorName" .=) <$>
_qoGreaterThanOperatorName])
newtype PollItemsResponse =
PollItemsResponse'
{ _pirItems :: Maybe [Item]
}
deriving (Eq, Show, Data, Typeable, Generic)
pollItemsResponse
:: PollItemsResponse
pollItemsResponse = PollItemsResponse' {_pirItems = Nothing}
pirItems :: Lens' PollItemsResponse [Item]
pirItems
= lens _pirItems (\ s a -> s{_pirItems = a}) .
_Default
. _Coerce
instance FromJSON PollItemsResponse where
parseJSON
= withObject "PollItemsResponse"
(\ o ->
PollItemsResponse' <$> (o .:? "items" .!= mempty))
instance ToJSON PollItemsResponse where
toJSON PollItemsResponse'{..}
= object (catMaybes [("items" .=) <$> _pirItems])
newtype SourceScoringConfig =
SourceScoringConfig'
{ _sscSourceImportance :: Maybe SourceScoringConfigSourceImportance
}
deriving (Eq, Show, Data, Typeable, Generic)
sourceScoringConfig
:: SourceScoringConfig
sourceScoringConfig = SourceScoringConfig' {_sscSourceImportance = Nothing}
sscSourceImportance :: Lens' SourceScoringConfig (Maybe SourceScoringConfigSourceImportance)
sscSourceImportance
= lens _sscSourceImportance
(\ s a -> s{_sscSourceImportance = a})
instance FromJSON SourceScoringConfig where
parseJSON
= withObject "SourceScoringConfig"
(\ o ->
SourceScoringConfig' <$> (o .:? "sourceImportance"))
instance ToJSON SourceScoringConfig where
toJSON SourceScoringConfig'{..}
= object
(catMaybes
[("sourceImportance" .=) <$> _sscSourceImportance])
newtype EmailAddress =
EmailAddress'
{ _eaEmailAddress :: Maybe Text
}
deriving (Eq, Show, Data, Typeable, Generic)
emailAddress
:: EmailAddress
emailAddress = EmailAddress' {_eaEmailAddress = Nothing}
eaEmailAddress :: Lens' EmailAddress (Maybe Text)
eaEmailAddress
= lens _eaEmailAddress
(\ s a -> s{_eaEmailAddress = a})
instance FromJSON EmailAddress where
parseJSON
= withObject "EmailAddress"
(\ o -> EmailAddress' <$> (o .:? "emailAddress"))
instance ToJSON EmailAddress where
toJSON EmailAddress'{..}
= object
(catMaybes [("emailAddress" .=) <$> _eaEmailAddress])
newtype RetrievalImportance =
RetrievalImportance'
{ _riImportance :: Maybe RetrievalImportanceImportance
}
deriving (Eq, Show, Data, Typeable, Generic)
retrievalImportance
:: RetrievalImportance
retrievalImportance = RetrievalImportance' {_riImportance = Nothing}
riImportance :: Lens' RetrievalImportance (Maybe RetrievalImportanceImportance)
riImportance
= lens _riImportance (\ s a -> s{_riImportance = a})
instance FromJSON RetrievalImportance where
parseJSON
= withObject "RetrievalImportance"
(\ o ->
RetrievalImportance' <$> (o .:? "importance"))
instance ToJSON RetrievalImportance where
toJSON RetrievalImportance'{..}
= object
(catMaybes [("importance" .=) <$> _riImportance])
data DataSourceIndexStats =
DataSourceIndexStats'
{ _dsisItemCountByStatus :: !(Maybe [ItemCountByStatus])
, _dsisDate :: !(Maybe Date)
}
deriving (Eq, Show, Data, Typeable, Generic)
dataSourceIndexStats
:: DataSourceIndexStats
dataSourceIndexStats =
DataSourceIndexStats' {_dsisItemCountByStatus = Nothing, _dsisDate = Nothing}
dsisItemCountByStatus :: Lens' DataSourceIndexStats [ItemCountByStatus]
dsisItemCountByStatus
= lens _dsisItemCountByStatus
(\ s a -> s{_dsisItemCountByStatus = a})
. _Default
. _Coerce
dsisDate :: Lens' DataSourceIndexStats (Maybe Date)
dsisDate = lens _dsisDate (\ s a -> s{_dsisDate = a})
instance FromJSON DataSourceIndexStats where
parseJSON
= withObject "DataSourceIndexStats"
(\ o ->
DataSourceIndexStats' <$>
(o .:? "itemCountByStatus" .!= mempty) <*>
(o .:? "date"))
instance ToJSON DataSourceIndexStats where
toJSON DataSourceIndexStats'{..}
= object
(catMaybes
[("itemCountByStatus" .=) <$> _dsisItemCountByStatus,
("date" .=) <$> _dsisDate])
data SourceCrowdingConfig =
SourceCrowdingConfig'
{ _sccField :: !(Maybe Text)
, _sccNumSuggestions :: !(Maybe (Textual Int32))
, _sccNumResults :: !(Maybe (Textual Int32))
, _sccSource :: !(Maybe Bool)
}
deriving (Eq, Show, Data, Typeable, Generic)
sourceCrowdingConfig
:: SourceCrowdingConfig
sourceCrowdingConfig =
SourceCrowdingConfig'
{ _sccField = Nothing
, _sccNumSuggestions = Nothing
, _sccNumResults = Nothing
, _sccSource = Nothing
}
sccField :: Lens' SourceCrowdingConfig (Maybe Text)
sccField = lens _sccField (\ s a -> s{_sccField = a})
sccNumSuggestions :: Lens' SourceCrowdingConfig (Maybe Int32)
sccNumSuggestions
= lens _sccNumSuggestions
(\ s a -> s{_sccNumSuggestions = a})
. mapping _Coerce
sccNumResults :: Lens' SourceCrowdingConfig (Maybe Int32)
sccNumResults
= lens _sccNumResults
(\ s a -> s{_sccNumResults = a})
. mapping _Coerce
sccSource :: Lens' SourceCrowdingConfig (Maybe Bool)
sccSource
= lens _sccSource (\ s a -> s{_sccSource = a})
instance FromJSON SourceCrowdingConfig where
parseJSON
= withObject "SourceCrowdingConfig"
(\ o ->
SourceCrowdingConfig' <$>
(o .:? "field") <*> (o .:? "numSuggestions") <*>
(o .:? "numResults")
<*> (o .:? "source"))
instance ToJSON SourceCrowdingConfig where
toJSON SourceCrowdingConfig'{..}
= object
(catMaybes
[("field" .=) <$> _sccField,
("numSuggestions" .=) <$> _sccNumSuggestions,
("numResults" .=) <$> _sccNumResults,
("source" .=) <$> _sccSource])
data Interaction =
Interaction'
{ _iInteractionTime :: !(Maybe DateTime')
, _iPrincipal :: !(Maybe Principal)
, _iType :: !(Maybe InteractionType)
}
deriving (Eq, Show, Data, Typeable, Generic)
interaction
:: Interaction
interaction =
Interaction'
{_iInteractionTime = Nothing, _iPrincipal = Nothing, _iType = Nothing}
iInteractionTime :: Lens' Interaction (Maybe UTCTime)
iInteractionTime
= lens _iInteractionTime
(\ s a -> s{_iInteractionTime = a})
. mapping _DateTime
iPrincipal :: Lens' Interaction (Maybe Principal)
iPrincipal
= lens _iPrincipal (\ s a -> s{_iPrincipal = a})
iType :: Lens' Interaction (Maybe InteractionType)
iType = lens _iType (\ s a -> s{_iType = a})
instance FromJSON Interaction where
parseJSON
= withObject "Interaction"
(\ o ->
Interaction' <$>
(o .:? "interactionTime") <*> (o .:? "principal") <*>
(o .:? "type"))
instance ToJSON Interaction where
toJSON Interaction'{..}
= object
(catMaybes
[("interactionTime" .=) <$> _iInteractionTime,
("principal" .=) <$> _iPrincipal,
("type" .=) <$> _iType])
data Principal =
Principal'
{ _pUserResourceName :: !(Maybe Text)
, _pGroupResourceName :: !(Maybe Text)
, _pGsuitePrincipal :: !(Maybe GSuitePrincipal)
}
deriving (Eq, Show, Data, Typeable, Generic)
principal
:: Principal
principal =
Principal'
{ _pUserResourceName = Nothing
, _pGroupResourceName = Nothing
, _pGsuitePrincipal = Nothing
}
pUserResourceName :: Lens' Principal (Maybe Text)
pUserResourceName
= lens _pUserResourceName
(\ s a -> s{_pUserResourceName = a})
pGroupResourceName :: Lens' Principal (Maybe Text)
pGroupResourceName
= lens _pGroupResourceName
(\ s a -> s{_pGroupResourceName = a})
pGsuitePrincipal :: Lens' Principal (Maybe GSuitePrincipal)
pGsuitePrincipal
= lens _pGsuitePrincipal
(\ s a -> s{_pGsuitePrincipal = a})
instance FromJSON Principal where
parseJSON
= withObject "Principal"
(\ o ->
Principal' <$>
(o .:? "userResourceName") <*>
(o .:? "groupResourceName")
<*> (o .:? "gsuitePrincipal"))
instance ToJSON Principal where
toJSON Principal'{..}
= object
(catMaybes
[("userResourceName" .=) <$> _pUserResourceName,
("groupResourceName" .=) <$> _pGroupResourceName,
("gsuitePrincipal" .=) <$> _pGsuitePrincipal])
data IndexItemRequest =
IndexItemRequest'
{ _iirMode :: !(Maybe IndexItemRequestMode)
, _iirDebugOptions :: !(Maybe DebugOptions)
, _iirConnectorName :: !(Maybe Text)
, _iirItem :: !(Maybe Item)
, _iirIndexItemOptions :: !(Maybe IndexItemOptions)
}
deriving (Eq, Show, Data, Typeable, Generic)
indexItemRequest
:: IndexItemRequest
indexItemRequest =
IndexItemRequest'
{ _iirMode = Nothing
, _iirDebugOptions = Nothing
, _iirConnectorName = Nothing
, _iirItem = Nothing
, _iirIndexItemOptions = Nothing
}
iirMode :: Lens' IndexItemRequest (Maybe IndexItemRequestMode)
iirMode = lens _iirMode (\ s a -> s{_iirMode = a})
iirDebugOptions :: Lens' IndexItemRequest (Maybe DebugOptions)
iirDebugOptions
= lens _iirDebugOptions
(\ s a -> s{_iirDebugOptions = a})
iirConnectorName :: Lens' IndexItemRequest (Maybe Text)
iirConnectorName
= lens _iirConnectorName
(\ s a -> s{_iirConnectorName = a})
iirItem :: Lens' IndexItemRequest (Maybe Item)
iirItem = lens _iirItem (\ s a -> s{_iirItem = a})
iirIndexItemOptions :: Lens' IndexItemRequest (Maybe IndexItemOptions)
iirIndexItemOptions
= lens _iirIndexItemOptions
(\ s a -> s{_iirIndexItemOptions = a})
instance FromJSON IndexItemRequest where
parseJSON
= withObject "IndexItemRequest"
(\ o ->
IndexItemRequest' <$>
(o .:? "mode") <*> (o .:? "debugOptions") <*>
(o .:? "connectorName")
<*> (o .:? "item")
<*> (o .:? "indexItemOptions"))
instance ToJSON IndexItemRequest where
toJSON IndexItemRequest'{..}
= object
(catMaybes
[("mode" .=) <$> _iirMode,
("debugOptions" .=) <$> _iirDebugOptions,
("connectorName" .=) <$> _iirConnectorName,
("item" .=) <$> _iirItem,
("indexItemOptions" .=) <$> _iirIndexItemOptions])
data TextPropertyOptions =
TextPropertyOptions'
{ _tRetrievalImportance :: !(Maybe RetrievalImportance)
, _tOperatorOptions :: !(Maybe TextOperatorOptions)
}
deriving (Eq, Show, Data, Typeable, Generic)
textPropertyOptions
:: TextPropertyOptions
textPropertyOptions =
TextPropertyOptions'
{_tRetrievalImportance = Nothing, _tOperatorOptions = Nothing}
tRetrievalImportance :: Lens' TextPropertyOptions (Maybe RetrievalImportance)
tRetrievalImportance
= lens _tRetrievalImportance
(\ s a -> s{_tRetrievalImportance = a})
tOperatorOptions :: Lens' TextPropertyOptions (Maybe TextOperatorOptions)
tOperatorOptions
= lens _tOperatorOptions
(\ s a -> s{_tOperatorOptions = a})
instance FromJSON TextPropertyOptions where
parseJSON
= withObject "TextPropertyOptions"
(\ o ->
TextPropertyOptions' <$>
(o .:? "retrievalImportance") <*>
(o .:? "operatorOptions"))
instance ToJSON TextPropertyOptions where
toJSON TextPropertyOptions'{..}
= object
(catMaybes
[("retrievalImportance" .=) <$>
_tRetrievalImportance,
("operatorOptions" .=) <$> _tOperatorOptions])
data EnumValuePair =
EnumValuePair'
{ _evpIntegerValue :: !(Maybe (Textual Int32))
, _evpStringValue :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
enumValuePair
:: EnumValuePair
enumValuePair =
EnumValuePair' {_evpIntegerValue = Nothing, _evpStringValue = Nothing}
evpIntegerValue :: Lens' EnumValuePair (Maybe Int32)
evpIntegerValue
= lens _evpIntegerValue
(\ s a -> s{_evpIntegerValue = a})
. mapping _Coerce
evpStringValue :: Lens' EnumValuePair (Maybe Text)
evpStringValue
= lens _evpStringValue
(\ s a -> s{_evpStringValue = a})
instance FromJSON EnumValuePair where
parseJSON
= withObject "EnumValuePair"
(\ o ->
EnumValuePair' <$>
(o .:? "integerValue") <*> (o .:? "stringValue"))
instance ToJSON EnumValuePair where
toJSON EnumValuePair'{..}
= object
(catMaybes
[("integerValue" .=) <$> _evpIntegerValue,
("stringValue" .=) <$> _evpStringValue])
data Metadata =
Metadata'
{ _mObjectType :: !(Maybe Text)
, _mOwner :: !(Maybe Person)
, _mMimeType :: !(Maybe Text)
, _mUpdateTime :: !(Maybe DateTime')
, _mDisplayOptions :: !(Maybe ResultDisplayMetadata)
, _mSource :: !(Maybe Source)
, _mCreateTime :: !(Maybe DateTime')
, _mFields :: !(Maybe [NamedProperty])
}
deriving (Eq, Show, Data, Typeable, Generic)
metadata
:: Metadata
metadata =
Metadata'
{ _mObjectType = Nothing
, _mOwner = Nothing
, _mMimeType = Nothing
, _mUpdateTime = Nothing
, _mDisplayOptions = Nothing
, _mSource = Nothing
, _mCreateTime = Nothing
, _mFields = Nothing
}
mObjectType :: Lens' Metadata (Maybe Text)
mObjectType
= lens _mObjectType (\ s a -> s{_mObjectType = a})
mOwner :: Lens' Metadata (Maybe Person)
mOwner = lens _mOwner (\ s a -> s{_mOwner = a})
mMimeType :: Lens' Metadata (Maybe Text)
mMimeType
= lens _mMimeType (\ s a -> s{_mMimeType = a})
mUpdateTime :: Lens' Metadata (Maybe UTCTime)
mUpdateTime
= lens _mUpdateTime (\ s a -> s{_mUpdateTime = a}) .
mapping _DateTime
mDisplayOptions :: Lens' Metadata (Maybe ResultDisplayMetadata)
mDisplayOptions
= lens _mDisplayOptions
(\ s a -> s{_mDisplayOptions = a})
mSource :: Lens' Metadata (Maybe Source)
mSource = lens _mSource (\ s a -> s{_mSource = a})
mCreateTime :: Lens' Metadata (Maybe UTCTime)
mCreateTime
= lens _mCreateTime (\ s a -> s{_mCreateTime = a}) .
mapping _DateTime
mFields :: Lens' Metadata [NamedProperty]
mFields
= lens _mFields (\ s a -> s{_mFields = a}) . _Default
. _Coerce
instance FromJSON Metadata where
parseJSON
= withObject "Metadata"
(\ o ->
Metadata' <$>
(o .:? "objectType") <*> (o .:? "owner") <*>
(o .:? "mimeType")
<*> (o .:? "updateTime")
<*> (o .:? "displayOptions")
<*> (o .:? "source")
<*> (o .:? "createTime")
<*> (o .:? "fields" .!= mempty))
instance ToJSON Metadata where
toJSON Metadata'{..}
= object
(catMaybes
[("objectType" .=) <$> _mObjectType,
("owner" .=) <$> _mOwner,
("mimeType" .=) <$> _mMimeType,
("updateTime" .=) <$> _mUpdateTime,
("displayOptions" .=) <$> _mDisplayOptions,
("source" .=) <$> _mSource,
("createTime" .=) <$> _mCreateTime,
("fields" .=) <$> _mFields])
data UpdateDataSourceRequest =
UpdateDataSourceRequest'
{ _udsrDebugOptions :: !(Maybe DebugOptions)
, _udsrSource :: !(Maybe DataSource)
}
deriving (Eq, Show, Data, Typeable, Generic)
updateDataSourceRequest
:: UpdateDataSourceRequest
updateDataSourceRequest =
UpdateDataSourceRequest' {_udsrDebugOptions = Nothing, _udsrSource = Nothing}
udsrDebugOptions :: Lens' UpdateDataSourceRequest (Maybe DebugOptions)
udsrDebugOptions
= lens _udsrDebugOptions
(\ s a -> s{_udsrDebugOptions = a})
udsrSource :: Lens' UpdateDataSourceRequest (Maybe DataSource)
udsrSource
= lens _udsrSource (\ s a -> s{_udsrSource = a})
instance FromJSON UpdateDataSourceRequest where
parseJSON
= withObject "UpdateDataSourceRequest"
(\ o ->
UpdateDataSourceRequest' <$>
(o .:? "debugOptions") <*> (o .:? "source"))
instance ToJSON UpdateDataSourceRequest where
toJSON UpdateDataSourceRequest'{..}
= object
(catMaybes
[("debugOptions" .=) <$> _udsrDebugOptions,
("source" .=) <$> _udsrSource])
data DataSource =
DataSource'
{ _dsShortName :: !(Maybe Text)
, _dsItemsVisibility :: !(Maybe [GSuitePrincipal])
, _dsOperationIds :: !(Maybe [Text])
, _dsDisableServing :: !(Maybe Bool)
, _dsIndexingServiceAccounts :: !(Maybe [Text])
, _dsDisableModifications :: !(Maybe Bool)
, _dsName :: !(Maybe Text)
, _dsDisplayName :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
dataSource
:: DataSource
dataSource =
DataSource'
{ _dsShortName = Nothing
, _dsItemsVisibility = Nothing
, _dsOperationIds = Nothing
, _dsDisableServing = Nothing
, _dsIndexingServiceAccounts = Nothing
, _dsDisableModifications = Nothing
, _dsName = Nothing
, _dsDisplayName = Nothing
}
dsShortName :: Lens' DataSource (Maybe Text)
dsShortName
= lens _dsShortName (\ s a -> s{_dsShortName = a})
dsItemsVisibility :: Lens' DataSource [GSuitePrincipal]
dsItemsVisibility
= lens _dsItemsVisibility
(\ s a -> s{_dsItemsVisibility = a})
. _Default
. _Coerce
dsOperationIds :: Lens' DataSource [Text]
dsOperationIds
= lens _dsOperationIds
(\ s a -> s{_dsOperationIds = a})
. _Default
. _Coerce
dsDisableServing :: Lens' DataSource (Maybe Bool)
dsDisableServing
= lens _dsDisableServing
(\ s a -> s{_dsDisableServing = a})
dsIndexingServiceAccounts :: Lens' DataSource [Text]
dsIndexingServiceAccounts
= lens _dsIndexingServiceAccounts
(\ s a -> s{_dsIndexingServiceAccounts = a})
. _Default
. _Coerce
dsDisableModifications :: Lens' DataSource (Maybe Bool)
dsDisableModifications
= lens _dsDisableModifications
(\ s a -> s{_dsDisableModifications = a})
dsName :: Lens' DataSource (Maybe Text)
dsName = lens _dsName (\ s a -> s{_dsName = a})
dsDisplayName :: Lens' DataSource (Maybe Text)
dsDisplayName
= lens _dsDisplayName
(\ s a -> s{_dsDisplayName = a})
instance FromJSON DataSource where
parseJSON
= withObject "DataSource"
(\ o ->
DataSource' <$>
(o .:? "shortName") <*>
(o .:? "itemsVisibility" .!= mempty)
<*> (o .:? "operationIds" .!= mempty)
<*> (o .:? "disableServing")
<*> (o .:? "indexingServiceAccounts" .!= mempty)
<*> (o .:? "disableModifications")
<*> (o .:? "name")
<*> (o .:? "displayName"))
instance ToJSON DataSource where
toJSON DataSource'{..}
= object
(catMaybes
[("shortName" .=) <$> _dsShortName,
("itemsVisibility" .=) <$> _dsItemsVisibility,
("operationIds" .=) <$> _dsOperationIds,
("disableServing" .=) <$> _dsDisableServing,
("indexingServiceAccounts" .=) <$>
_dsIndexingServiceAccounts,
("disableModifications" .=) <$>
_dsDisableModifications,
("name" .=) <$> _dsName,
("displayName" .=) <$> _dsDisplayName])
newtype HTMLValues =
HTMLValues'
{ _hvValues :: Maybe [Text]
}
deriving (Eq, Show, Data, Typeable, Generic)
htmlValues
:: HTMLValues
htmlValues = HTMLValues' {_hvValues = Nothing}
hvValues :: Lens' HTMLValues [Text]
hvValues
= lens _hvValues (\ s a -> s{_hvValues = a}) .
_Default
. _Coerce
instance FromJSON HTMLValues where
parseJSON
= withObject "HTMLValues"
(\ o -> HTMLValues' <$> (o .:? "values" .!= mempty))
instance ToJSON HTMLValues where
toJSON HTMLValues'{..}
= object (catMaybes [("values" .=) <$> _hvValues])
newtype GmailIntelligentRestrict =
GmailIntelligentRestrict'
{ _girType :: Maybe GmailIntelligentRestrictType
}
deriving (Eq, Show, Data, Typeable, Generic)
gmailIntelligentRestrict
:: GmailIntelligentRestrict
gmailIntelligentRestrict = GmailIntelligentRestrict' {_girType = Nothing}
girType :: Lens' GmailIntelligentRestrict (Maybe GmailIntelligentRestrictType)
girType = lens _girType (\ s a -> s{_girType = a})
instance FromJSON GmailIntelligentRestrict where
parseJSON
= withObject "GmailIntelligentRestrict"
(\ o -> GmailIntelligentRestrict' <$> (o .:? "type"))
instance ToJSON GmailIntelligentRestrict where
toJSON GmailIntelligentRestrict'{..}
= object (catMaybes [("type" .=) <$> _girType])
newtype HTMLOperatorOptions =
HTMLOperatorOptions'
{ _hooOperatorName :: Maybe Text
}
deriving (Eq, Show, Data, Typeable, Generic)
htmlOperatorOptions
:: HTMLOperatorOptions
htmlOperatorOptions = HTMLOperatorOptions' {_hooOperatorName = Nothing}
hooOperatorName :: Lens' HTMLOperatorOptions (Maybe Text)
hooOperatorName
= lens _hooOperatorName
(\ s a -> s{_hooOperatorName = a})
instance FromJSON HTMLOperatorOptions where
parseJSON
= withObject "HTMLOperatorOptions"
(\ o ->
HTMLOperatorOptions' <$> (o .:? "operatorName"))
instance ToJSON HTMLOperatorOptions where
toJSON HTMLOperatorOptions'{..}
= object
(catMaybes
[("operatorName" .=) <$> _hooOperatorName])
data Item =
Item'
{ _iStatus :: !(Maybe ItemStatus)
, _iItemType :: !(Maybe ItemItemType)
, _iPayload :: !(Maybe Bytes)
, _iStructuredData :: !(Maybe ItemStructuredData)
, _iQueue :: !(Maybe Text)
, _iContent :: !(Maybe ItemContent)
, _iName :: !(Maybe Text)
, _iVersion :: !(Maybe Bytes)
, _iMetadata :: !(Maybe ItemMetadata)
, _iACL :: !(Maybe ItemACL)
}
deriving (Eq, Show, Data, Typeable, Generic)
item
:: Item
item =
Item'
{ _iStatus = Nothing
, _iItemType = Nothing
, _iPayload = Nothing
, _iStructuredData = Nothing
, _iQueue = Nothing
, _iContent = Nothing
, _iName = Nothing
, _iVersion = Nothing
, _iMetadata = Nothing
, _iACL = Nothing
}
iStatus :: Lens' Item (Maybe ItemStatus)
iStatus = lens _iStatus (\ s a -> s{_iStatus = a})
iItemType :: Lens' Item (Maybe ItemItemType)
iItemType
= lens _iItemType (\ s a -> s{_iItemType = a})
iPayload :: Lens' Item (Maybe ByteString)
iPayload
= lens _iPayload (\ s a -> s{_iPayload = a}) .
mapping _Bytes
iStructuredData :: Lens' Item (Maybe ItemStructuredData)
iStructuredData
= lens _iStructuredData
(\ s a -> s{_iStructuredData = a})
iQueue :: Lens' Item (Maybe Text)
iQueue = lens _iQueue (\ s a -> s{_iQueue = a})
iContent :: Lens' Item (Maybe ItemContent)
iContent = lens _iContent (\ s a -> s{_iContent = a})
iName :: Lens' Item (Maybe Text)
iName = lens _iName (\ s a -> s{_iName = a})
iVersion :: Lens' Item (Maybe ByteString)
iVersion
= lens _iVersion (\ s a -> s{_iVersion = a}) .
mapping _Bytes
iMetadata :: Lens' Item (Maybe ItemMetadata)
iMetadata
= lens _iMetadata (\ s a -> s{_iMetadata = a})
iACL :: Lens' Item (Maybe ItemACL)
iACL = lens _iACL (\ s a -> s{_iACL = a})
instance FromJSON Item where
parseJSON
= withObject "Item"
(\ o ->
Item' <$>
(o .:? "status") <*> (o .:? "itemType") <*>
(o .:? "payload")
<*> (o .:? "structuredData")
<*> (o .:? "queue")
<*> (o .:? "content")
<*> (o .:? "name")
<*> (o .:? "version")
<*> (o .:? "metadata")
<*> (o .:? "acl"))
instance ToJSON Item where
toJSON Item'{..}
= object
(catMaybes
[("status" .=) <$> _iStatus,
("itemType" .=) <$> _iItemType,
("payload" .=) <$> _iPayload,
("structuredData" .=) <$> _iStructuredData,
("queue" .=) <$> _iQueue,
("content" .=) <$> _iContent, ("name" .=) <$> _iName,
("version" .=) <$> _iVersion,
("metadata" .=) <$> _iMetadata,
("acl" .=) <$> _iACL])
data Source =
Source'
{ _sName :: !(Maybe Text)
, _sPredefinedSource :: !(Maybe SourcePredefinedSource)
}
deriving (Eq, Show, Data, Typeable, Generic)
source
:: Source
source = Source' {_sName = Nothing, _sPredefinedSource = Nothing}
sName :: Lens' Source (Maybe Text)
sName = lens _sName (\ s a -> s{_sName = a})
sPredefinedSource :: Lens' Source (Maybe SourcePredefinedSource)
sPredefinedSource
= lens _sPredefinedSource
(\ s a -> s{_sPredefinedSource = a})
instance FromJSON Source where
parseJSON
= withObject "Source"
(\ o ->
Source' <$>
(o .:? "name") <*> (o .:? "predefinedSource"))
instance ToJSON Source where
toJSON Source'{..}
= object
(catMaybes
[("name" .=) <$> _sName,
("predefinedSource" .=) <$> _sPredefinedSource])
newtype PropertyDisplayOptions =
PropertyDisplayOptions'
{ _pdoDisplayLabel :: Maybe Text
}
deriving (Eq, Show, Data, Typeable, Generic)
propertyDisplayOptions
:: PropertyDisplayOptions
propertyDisplayOptions = PropertyDisplayOptions' {_pdoDisplayLabel = Nothing}
pdoDisplayLabel :: Lens' PropertyDisplayOptions (Maybe Text)
pdoDisplayLabel
= lens _pdoDisplayLabel
(\ s a -> s{_pdoDisplayLabel = a})
instance FromJSON PropertyDisplayOptions where
parseJSON
= withObject "PropertyDisplayOptions"
(\ o ->
PropertyDisplayOptions' <$> (o .:? "displayLabel"))
instance ToJSON PropertyDisplayOptions where
toJSON PropertyDisplayOptions'{..}
= object
(catMaybes
[("displayLabel" .=) <$> _pdoDisplayLabel])
newtype ObjectValues =
ObjectValues'
{ _ovValues :: Maybe [StructuredDataObject]
}
deriving (Eq, Show, Data, Typeable, Generic)
objectValues
:: ObjectValues
objectValues = ObjectValues' {_ovValues = Nothing}
ovValues :: Lens' ObjectValues [StructuredDataObject]
ovValues
= lens _ovValues (\ s a -> s{_ovValues = a}) .
_Default
. _Coerce
instance FromJSON ObjectValues where
parseJSON
= withObject "ObjectValues"
(\ o ->
ObjectValues' <$> (o .:? "values" .!= mempty))
instance ToJSON ObjectValues where
toJSON ObjectValues'{..}
= object (catMaybes [("values" .=) <$> _ovValues])
data ObjectOptions =
ObjectOptions'
{ _ooFreshnessOptions :: !(Maybe FreshnessOptions)
, _ooDisplayOptions :: !(Maybe ObjectDisplayOptions)
}
deriving (Eq, Show, Data, Typeable, Generic)
objectOptions
:: ObjectOptions
objectOptions =
ObjectOptions' {_ooFreshnessOptions = Nothing, _ooDisplayOptions = Nothing}
ooFreshnessOptions :: Lens' ObjectOptions (Maybe FreshnessOptions)
ooFreshnessOptions
= lens _ooFreshnessOptions
(\ s a -> s{_ooFreshnessOptions = a})
ooDisplayOptions :: Lens' ObjectOptions (Maybe ObjectDisplayOptions)
ooDisplayOptions
= lens _ooDisplayOptions
(\ s a -> s{_ooDisplayOptions = a})
instance FromJSON ObjectOptions where
parseJSON
= withObject "ObjectOptions"
(\ o ->
ObjectOptions' <$>
(o .:? "freshnessOptions") <*>
(o .:? "displayOptions"))
instance ToJSON ObjectOptions where
toJSON ObjectOptions'{..}
= object
(catMaybes
[("freshnessOptions" .=) <$> _ooFreshnessOptions,
("displayOptions" .=) <$> _ooDisplayOptions])
data FacetOptions =
FacetOptions'
{ _fSourceName :: !(Maybe Text)
, _fObjectType :: !(Maybe Text)
, _fNumFacetBuckets :: !(Maybe (Textual Int32))
, _fOperatorName :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
facetOptions
:: FacetOptions
facetOptions =
FacetOptions'
{ _fSourceName = Nothing
, _fObjectType = Nothing
, _fNumFacetBuckets = Nothing
, _fOperatorName = Nothing
}
fSourceName :: Lens' FacetOptions (Maybe Text)
fSourceName
= lens _fSourceName (\ s a -> s{_fSourceName = a})
fObjectType :: Lens' FacetOptions (Maybe Text)
fObjectType
= lens _fObjectType (\ s a -> s{_fObjectType = a})
fNumFacetBuckets :: Lens' FacetOptions (Maybe Int32)
fNumFacetBuckets
= lens _fNumFacetBuckets
(\ s a -> s{_fNumFacetBuckets = a})
. mapping _Coerce
fOperatorName :: Lens' FacetOptions (Maybe Text)
fOperatorName
= lens _fOperatorName
(\ s a -> s{_fOperatorName = a})
instance FromJSON FacetOptions where
parseJSON
= withObject "FacetOptions"
(\ o ->
FacetOptions' <$>
(o .:? "sourceName") <*> (o .:? "objectType") <*>
(o .:? "numFacetBuckets")
<*> (o .:? "operatorName"))
instance ToJSON FacetOptions where
toJSON FacetOptions'{..}
= object
(catMaybes
[("sourceName" .=) <$> _fSourceName,
("objectType" .=) <$> _fObjectType,
("numFacetBuckets" .=) <$> _fNumFacetBuckets,
("operatorName" .=) <$> _fOperatorName])
data SuggestRequest =
SuggestRequest'
{ _sDataSourceRestrictions :: !(Maybe [DataSourceRestriction])
, _sQuery :: !(Maybe Text)
, _sRequestOptions :: !(Maybe RequestOptions)
}
deriving (Eq, Show, Data, Typeable, Generic)
suggestRequest
:: SuggestRequest
suggestRequest =
SuggestRequest'
{ _sDataSourceRestrictions = Nothing
, _sQuery = Nothing
, _sRequestOptions = Nothing
}
sDataSourceRestrictions :: Lens' SuggestRequest [DataSourceRestriction]
sDataSourceRestrictions
= lens _sDataSourceRestrictions
(\ s a -> s{_sDataSourceRestrictions = a})
. _Default
. _Coerce
sQuery :: Lens' SuggestRequest (Maybe Text)
sQuery = lens _sQuery (\ s a -> s{_sQuery = a})
sRequestOptions :: Lens' SuggestRequest (Maybe RequestOptions)
sRequestOptions
= lens _sRequestOptions
(\ s a -> s{_sRequestOptions = a})
instance FromJSON SuggestRequest where
parseJSON
= withObject "SuggestRequest"
(\ o ->
SuggestRequest' <$>
(o .:? "dataSourceRestrictions" .!= mempty) <*>
(o .:? "query")
<*> (o .:? "requestOptions"))
instance ToJSON SuggestRequest where
toJSON SuggestRequest'{..}
= object
(catMaybes
[("dataSourceRestrictions" .=) <$>
_sDataSourceRestrictions,
("query" .=) <$> _sQuery,
("requestOptions" .=) <$> _sRequestOptions])
data Filter =
Filter'
{ _fCompositeFilter :: !(Maybe CompositeFilter)
, _fValueFilter :: !(Maybe ValueFilter)
}
deriving (Eq, Show, Data, Typeable, Generic)
filter'
:: Filter
filter' = Filter' {_fCompositeFilter = Nothing, _fValueFilter = Nothing}
fCompositeFilter :: Lens' Filter (Maybe CompositeFilter)
fCompositeFilter
= lens _fCompositeFilter
(\ s a -> s{_fCompositeFilter = a})
fValueFilter :: Lens' Filter (Maybe ValueFilter)
fValueFilter
= lens _fValueFilter (\ s a -> s{_fValueFilter = a})
instance FromJSON Filter where
parseJSON
= withObject "Filter"
(\ o ->
Filter' <$>
(o .:? "compositeFilter") <*> (o .:? "valueFilter"))
instance ToJSON Filter where
toJSON Filter'{..}
= object
(catMaybes
[("compositeFilter" .=) <$> _fCompositeFilter,
("valueFilter" .=) <$> _fValueFilter])
data ObjectDefinition =
ObjectDefinition'
{ _odName :: !(Maybe Text)
, _odOptions :: !(Maybe ObjectOptions)
, _odPropertyDefinitions :: !(Maybe [PropertyDefinition])
}
deriving (Eq, Show, Data, Typeable, Generic)
objectDefinition
:: ObjectDefinition
objectDefinition =
ObjectDefinition'
{_odName = Nothing, _odOptions = Nothing, _odPropertyDefinitions = Nothing}
odName :: Lens' ObjectDefinition (Maybe Text)
odName = lens _odName (\ s a -> s{_odName = a})
odOptions :: Lens' ObjectDefinition (Maybe ObjectOptions)
odOptions
= lens _odOptions (\ s a -> s{_odOptions = a})
odPropertyDefinitions :: Lens' ObjectDefinition [PropertyDefinition]
odPropertyDefinitions
= lens _odPropertyDefinitions
(\ s a -> s{_odPropertyDefinitions = a})
. _Default
. _Coerce
instance FromJSON ObjectDefinition where
parseJSON
= withObject "ObjectDefinition"
(\ o ->
ObjectDefinition' <$>
(o .:? "name") <*> (o .:? "options") <*>
(o .:? "propertyDefinitions" .!= mempty))
instance ToJSON ObjectDefinition where
toJSON ObjectDefinition'{..}
= object
(catMaybes
[("name" .=) <$> _odName,
("options" .=) <$> _odOptions,
("propertyDefinitions" .=) <$>
_odPropertyDefinitions])
data PollItemsRequest =
PollItemsRequest'
{ _pQueue :: !(Maybe Text)
, _pDebugOptions :: !(Maybe DebugOptions)
, _pConnectorName :: !(Maybe Text)
, _pStatusCodes :: !(Maybe [Text])
, _pLimit :: !(Maybe (Textual Int32))
}
deriving (Eq, Show, Data, Typeable, Generic)
pollItemsRequest
:: PollItemsRequest
pollItemsRequest =
PollItemsRequest'
{ _pQueue = Nothing
, _pDebugOptions = Nothing
, _pConnectorName = Nothing
, _pStatusCodes = Nothing
, _pLimit = Nothing
}
pQueue :: Lens' PollItemsRequest (Maybe Text)
pQueue = lens _pQueue (\ s a -> s{_pQueue = a})
pDebugOptions :: Lens' PollItemsRequest (Maybe DebugOptions)
pDebugOptions
= lens _pDebugOptions
(\ s a -> s{_pDebugOptions = a})
pConnectorName :: Lens' PollItemsRequest (Maybe Text)
pConnectorName
= lens _pConnectorName
(\ s a -> s{_pConnectorName = a})
pStatusCodes :: Lens' PollItemsRequest [Text]
pStatusCodes
= lens _pStatusCodes (\ s a -> s{_pStatusCodes = a})
. _Default
. _Coerce
pLimit :: Lens' PollItemsRequest (Maybe Int32)
pLimit
= lens _pLimit (\ s a -> s{_pLimit = a}) .
mapping _Coerce
instance FromJSON PollItemsRequest where
parseJSON
= withObject "PollItemsRequest"
(\ o ->
PollItemsRequest' <$>
(o .:? "queue") <*> (o .:? "debugOptions") <*>
(o .:? "connectorName")
<*> (o .:? "statusCodes" .!= mempty)
<*> (o .:? "limit"))
instance ToJSON PollItemsRequest where
toJSON PollItemsRequest'{..}
= object
(catMaybes
[("queue" .=) <$> _pQueue,
("debugOptions" .=) <$> _pDebugOptions,
("connectorName" .=) <$> _pConnectorName,
("statusCodes" .=) <$> _pStatusCodes,
("limit" .=) <$> _pLimit])
data QueryInterpretation =
QueryInterpretation'
{ _qiInterpretedQuery :: !(Maybe Text)
, _qiInterpretationType :: !(Maybe QueryInterpretationInterpretationType)
}
deriving (Eq, Show, Data, Typeable, Generic)
queryInterpretation
:: QueryInterpretation
queryInterpretation =
QueryInterpretation'
{_qiInterpretedQuery = Nothing, _qiInterpretationType = Nothing}
qiInterpretedQuery :: Lens' QueryInterpretation (Maybe Text)
qiInterpretedQuery
= lens _qiInterpretedQuery
(\ s a -> s{_qiInterpretedQuery = a})
qiInterpretationType :: Lens' QueryInterpretation (Maybe QueryInterpretationInterpretationType)
qiInterpretationType
= lens _qiInterpretationType
(\ s a -> s{_qiInterpretationType = a})
instance FromJSON QueryInterpretation where
parseJSON
= withObject "QueryInterpretation"
(\ o ->
QueryInterpretation' <$>
(o .:? "interpretedQuery") <*>
(o .:? "interpretationType"))
instance ToJSON QueryInterpretation where
toJSON QueryInterpretation'{..}
= object
(catMaybes
[("interpretedQuery" .=) <$> _qiInterpretedQuery,
("interpretationType" .=) <$> _qiInterpretationType])
data UnmAppedIdentity =
UnmAppedIdentity'
{ _uaiResolutionStatusCode :: !(Maybe UnmAppedIdentityResolutionStatusCode)
, _uaiExternalIdentity :: !(Maybe Principal)
}
deriving (Eq, Show, Data, Typeable, Generic)
unmAppedIdentity
:: UnmAppedIdentity
unmAppedIdentity =
UnmAppedIdentity'
{_uaiResolutionStatusCode = Nothing, _uaiExternalIdentity = Nothing}
uaiResolutionStatusCode :: Lens' UnmAppedIdentity (Maybe UnmAppedIdentityResolutionStatusCode)
uaiResolutionStatusCode
= lens _uaiResolutionStatusCode
(\ s a -> s{_uaiResolutionStatusCode = a})
uaiExternalIdentity :: Lens' UnmAppedIdentity (Maybe Principal)
uaiExternalIdentity
= lens _uaiExternalIdentity
(\ s a -> s{_uaiExternalIdentity = a})
instance FromJSON UnmAppedIdentity where
parseJSON
= withObject "UnmAppedIdentity"
(\ o ->
UnmAppedIdentity' <$>
(o .:? "resolutionStatusCode") <*>
(o .:? "externalIdentity"))
instance ToJSON UnmAppedIdentity where
toJSON UnmAppedIdentity'{..}
= object
(catMaybes
[("resolutionStatusCode" .=) <$>
_uaiResolutionStatusCode,
("externalIdentity" .=) <$> _uaiExternalIdentity])
newtype OperationMetadata =
OperationMetadata'
{ _omAddtional :: HashMap Text JSONValue
}
deriving (Eq, Show, Data, Typeable, Generic)
operationMetadata
:: HashMap Text JSONValue
-> OperationMetadata
operationMetadata pOmAddtional_ =
OperationMetadata' {_omAddtional = _Coerce # pOmAddtional_}
omAddtional :: Lens' OperationMetadata (HashMap Text JSONValue)
omAddtional
= lens _omAddtional (\ s a -> s{_omAddtional = a}) .
_Coerce
instance FromJSON OperationMetadata where
parseJSON
= withObject "OperationMetadata"
(\ o -> OperationMetadata' <$> (parseJSONObject o))
instance ToJSON OperationMetadata where
toJSON = toJSON . _omAddtional
data CustomerIndexStats =
CustomerIndexStats'
{ _cisItemCountByStatus :: !(Maybe [ItemCountByStatus])
, _cisDate :: !(Maybe Date)
}
deriving (Eq, Show, Data, Typeable, Generic)
customerIndexStats
:: CustomerIndexStats
customerIndexStats =
CustomerIndexStats' {_cisItemCountByStatus = Nothing, _cisDate = Nothing}
cisItemCountByStatus :: Lens' CustomerIndexStats [ItemCountByStatus]
cisItemCountByStatus
= lens _cisItemCountByStatus
(\ s a -> s{_cisItemCountByStatus = a})
. _Default
. _Coerce
cisDate :: Lens' CustomerIndexStats (Maybe Date)
cisDate = lens _cisDate (\ s a -> s{_cisDate = a})
instance FromJSON CustomerIndexStats where
parseJSON
= withObject "CustomerIndexStats"
(\ o ->
CustomerIndexStats' <$>
(o .:? "itemCountByStatus" .!= mempty) <*>
(o .:? "date"))
instance ToJSON CustomerIndexStats where
toJSON CustomerIndexStats'{..}
= object
(catMaybes
[("itemCountByStatus" .=) <$> _cisItemCountByStatus,
("date" .=) <$> _cisDate])
data PushItem =
PushItem'
{ _piRepositoryError :: !(Maybe RepositoryError)
, _piContentHash :: !(Maybe Text)
, _piStructuredDataHash :: !(Maybe Text)
, _piPayload :: !(Maybe Bytes)
, _piQueue :: !(Maybe Text)
, _piMetadataHash :: !(Maybe Text)
, _piType :: !(Maybe PushItemType)
}
deriving (Eq, Show, Data, Typeable, Generic)
pushItem
:: PushItem
pushItem =
PushItem'
{ _piRepositoryError = Nothing
, _piContentHash = Nothing
, _piStructuredDataHash = Nothing
, _piPayload = Nothing
, _piQueue = Nothing
, _piMetadataHash = Nothing
, _piType = Nothing
}
piRepositoryError :: Lens' PushItem (Maybe RepositoryError)
piRepositoryError
= lens _piRepositoryError
(\ s a -> s{_piRepositoryError = a})
piContentHash :: Lens' PushItem (Maybe Text)
piContentHash
= lens _piContentHash
(\ s a -> s{_piContentHash = a})
piStructuredDataHash :: Lens' PushItem (Maybe Text)
piStructuredDataHash
= lens _piStructuredDataHash
(\ s a -> s{_piStructuredDataHash = a})
piPayload :: Lens' PushItem (Maybe ByteString)
piPayload
= lens _piPayload (\ s a -> s{_piPayload = a}) .
mapping _Bytes
piQueue :: Lens' PushItem (Maybe Text)
piQueue = lens _piQueue (\ s a -> s{_piQueue = a})
piMetadataHash :: Lens' PushItem (Maybe Text)
piMetadataHash
= lens _piMetadataHash
(\ s a -> s{_piMetadataHash = a})
piType :: Lens' PushItem (Maybe PushItemType)
piType = lens _piType (\ s a -> s{_piType = a})
instance FromJSON PushItem where
parseJSON
= withObject "PushItem"
(\ o ->
PushItem' <$>
(o .:? "repositoryError") <*> (o .:? "contentHash")
<*> (o .:? "structuredDataHash")
<*> (o .:? "payload")
<*> (o .:? "queue")
<*> (o .:? "metadataHash")
<*> (o .:? "type"))
instance ToJSON PushItem where
toJSON PushItem'{..}
= object
(catMaybes
[("repositoryError" .=) <$> _piRepositoryError,
("contentHash" .=) <$> _piContentHash,
("structuredDataHash" .=) <$> _piStructuredDataHash,
("payload" .=) <$> _piPayload,
("queue" .=) <$> _piQueue,
("metadataHash" .=) <$> _piMetadataHash,
("type" .=) <$> _piType])
data ErrorMessage =
ErrorMessage'
{ _emSource :: !(Maybe Source)
, _emErrorMessage :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
errorMessage
:: ErrorMessage
errorMessage = ErrorMessage' {_emSource = Nothing, _emErrorMessage = Nothing}
emSource :: Lens' ErrorMessage (Maybe Source)
emSource = lens _emSource (\ s a -> s{_emSource = a})
emErrorMessage :: Lens' ErrorMessage (Maybe Text)
emErrorMessage
= lens _emErrorMessage
(\ s a -> s{_emErrorMessage = a})
instance FromJSON ErrorMessage where
parseJSON
= withObject "ErrorMessage"
(\ o ->
ErrorMessage' <$>
(o .:? "source") <*> (o .:? "errorMessage"))
instance ToJSON ErrorMessage where
toJSON ErrorMessage'{..}
= object
(catMaybes
[("source" .=) <$> _emSource,
("errorMessage" .=) <$> _emErrorMessage])
newtype BooleanPropertyOptions =
BooleanPropertyOptions'
{ _bpoOperatorOptions :: Maybe BooleanOperatorOptions
}
deriving (Eq, Show, Data, Typeable, Generic)
booleanPropertyOptions
:: BooleanPropertyOptions
booleanPropertyOptions = BooleanPropertyOptions' {_bpoOperatorOptions = Nothing}
bpoOperatorOptions :: Lens' BooleanPropertyOptions (Maybe BooleanOperatorOptions)
bpoOperatorOptions
= lens _bpoOperatorOptions
(\ s a -> s{_bpoOperatorOptions = a})
instance FromJSON BooleanPropertyOptions where
parseJSON
= withObject "BooleanPropertyOptions"
(\ o ->
BooleanPropertyOptions' <$>
(o .:? "operatorOptions"))
instance ToJSON BooleanPropertyOptions where
toJSON BooleanPropertyOptions'{..}
= object
(catMaybes
[("operatorOptions" .=) <$> _bpoOperatorOptions])
data ValueFilter =
ValueFilter'
{ _vfValue :: !(Maybe Value)
, _vfOperatorName :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
valueFilter
:: ValueFilter
valueFilter = ValueFilter' {_vfValue = Nothing, _vfOperatorName = Nothing}
vfValue :: Lens' ValueFilter (Maybe Value)
vfValue = lens _vfValue (\ s a -> s{_vfValue = a})
vfOperatorName :: Lens' ValueFilter (Maybe Text)
vfOperatorName
= lens _vfOperatorName
(\ s a -> s{_vfOperatorName = a})
instance FromJSON ValueFilter where
parseJSON
= withObject "ValueFilter"
(\ o ->
ValueFilter' <$>
(o .:? "value") <*> (o .:? "operatorName"))
instance ToJSON ValueFilter where
toJSON ValueFilter'{..}
= object
(catMaybes
[("value" .=) <$> _vfValue,
("operatorName" .=) <$> _vfOperatorName])
newtype EnumOperatorOptions =
EnumOperatorOptions'
{ _eooOperatorName :: Maybe Text
}
deriving (Eq, Show, Data, Typeable, Generic)
enumOperatorOptions
:: EnumOperatorOptions
enumOperatorOptions = EnumOperatorOptions' {_eooOperatorName = Nothing}
eooOperatorName :: Lens' EnumOperatorOptions (Maybe Text)
eooOperatorName
= lens _eooOperatorName
(\ s a -> s{_eooOperatorName = a})
instance FromJSON EnumOperatorOptions where
parseJSON
= withObject "EnumOperatorOptions"
(\ o ->
EnumOperatorOptions' <$> (o .:? "operatorName"))
instance ToJSON EnumOperatorOptions where
toJSON EnumOperatorOptions'{..}
= object
(catMaybes
[("operatorName" .=) <$> _eooOperatorName])
newtype GmailAttachmentRestrict =
GmailAttachmentRestrict'
{ _gType :: Maybe GmailAttachmentRestrictType
}
deriving (Eq, Show, Data, Typeable, Generic)
gmailAttachmentRestrict
:: GmailAttachmentRestrict
gmailAttachmentRestrict = GmailAttachmentRestrict' {_gType = Nothing}
gType :: Lens' GmailAttachmentRestrict (Maybe GmailAttachmentRestrictType)
gType = lens _gType (\ s a -> s{_gType = a})
instance FromJSON GmailAttachmentRestrict where
parseJSON
= withObject "GmailAttachmentRestrict"
(\ o -> GmailAttachmentRestrict' <$> (o .:? "type"))
instance ToJSON GmailAttachmentRestrict where
toJSON GmailAttachmentRestrict'{..}
= object (catMaybes [("type" .=) <$> _gType])
newtype DatePropertyOptions =
DatePropertyOptions'
{ _dOperatorOptions :: Maybe DateOperatorOptions
}
deriving (Eq, Show, Data, Typeable, Generic)
datePropertyOptions
:: DatePropertyOptions
datePropertyOptions = DatePropertyOptions' {_dOperatorOptions = Nothing}
dOperatorOptions :: Lens' DatePropertyOptions (Maybe DateOperatorOptions)
dOperatorOptions
= lens _dOperatorOptions
(\ s a -> s{_dOperatorOptions = a})
instance FromJSON DatePropertyOptions where
parseJSON
= withObject "DatePropertyOptions"
(\ o ->
DatePropertyOptions' <$> (o .:? "operatorOptions"))
instance ToJSON DatePropertyOptions where
toJSON DatePropertyOptions'{..}
= object
(catMaybes
[("operatorOptions" .=) <$> _dOperatorOptions])
newtype EnumValues =
EnumValues'
{ _evValues :: Maybe [Text]
}
deriving (Eq, Show, Data, Typeable, Generic)
enumValues
:: EnumValues
enumValues = EnumValues' {_evValues = Nothing}
evValues :: Lens' EnumValues [Text]
evValues
= lens _evValues (\ s a -> s{_evValues = a}) .
_Default
. _Coerce
instance FromJSON EnumValues where
parseJSON
= withObject "EnumValues"
(\ o -> EnumValues' <$> (o .:? "values" .!= mempty))
instance ToJSON EnumValues where
toJSON EnumValues'{..}
= object (catMaybes [("values" .=) <$> _evValues])
data GSuitePrincipal =
GSuitePrincipal'
{ _gspGsuiteGroupEmail :: !(Maybe Text)
, _gspGsuiteUserEmail :: !(Maybe Text)
, _gspGsuiteDomain :: !(Maybe Bool)
}
deriving (Eq, Show, Data, Typeable, Generic)
gSuitePrincipal
:: GSuitePrincipal
gSuitePrincipal =
GSuitePrincipal'
{ _gspGsuiteGroupEmail = Nothing
, _gspGsuiteUserEmail = Nothing
, _gspGsuiteDomain = Nothing
}
gspGsuiteGroupEmail :: Lens' GSuitePrincipal (Maybe Text)
gspGsuiteGroupEmail
= lens _gspGsuiteGroupEmail
(\ s a -> s{_gspGsuiteGroupEmail = a})
gspGsuiteUserEmail :: Lens' GSuitePrincipal (Maybe Text)
gspGsuiteUserEmail
= lens _gspGsuiteUserEmail
(\ s a -> s{_gspGsuiteUserEmail = a})
gspGsuiteDomain :: Lens' GSuitePrincipal (Maybe Bool)
gspGsuiteDomain
= lens _gspGsuiteDomain
(\ s a -> s{_gspGsuiteDomain = a})
instance FromJSON GSuitePrincipal where
parseJSON
= withObject "GSuitePrincipal"
(\ o ->
GSuitePrincipal' <$>
(o .:? "gsuiteGroupEmail") <*>
(o .:? "gsuiteUserEmail")
<*> (o .:? "gsuiteDomain"))
instance ToJSON GSuitePrincipal where
toJSON GSuitePrincipal'{..}
= object
(catMaybes
[("gsuiteGroupEmail" .=) <$> _gspGsuiteGroupEmail,
("gsuiteUserEmail" .=) <$> _gspGsuiteUserEmail,
("gsuiteDomain" .=) <$> _gspGsuiteDomain])
newtype IndexItemOptions =
IndexItemOptions'
{ _iioAllowUnknownGsuitePrincipals :: Maybe Bool
}
deriving (Eq, Show, Data, Typeable, Generic)
indexItemOptions
:: IndexItemOptions
indexItemOptions =
IndexItemOptions' {_iioAllowUnknownGsuitePrincipals = Nothing}
iioAllowUnknownGsuitePrincipals :: Lens' IndexItemOptions (Maybe Bool)
iioAllowUnknownGsuitePrincipals
= lens _iioAllowUnknownGsuitePrincipals
(\ s a -> s{_iioAllowUnknownGsuitePrincipals = a})
instance FromJSON IndexItemOptions where
parseJSON
= withObject "IndexItemOptions"
(\ o ->
IndexItemOptions' <$>
(o .:? "allowUnknownGsuitePrincipals"))
instance ToJSON IndexItemOptions where
toJSON IndexItemOptions'{..}
= object
(catMaybes
[("allowUnknownGsuitePrincipals" .=) <$>
_iioAllowUnknownGsuitePrincipals])
newtype SearchQualityMetadata =
SearchQualityMetadata'
{ _sqmQuality :: Maybe (Textual Double)
}
deriving (Eq, Show, Data, Typeable, Generic)
searchQualityMetadata
:: SearchQualityMetadata
searchQualityMetadata = SearchQualityMetadata' {_sqmQuality = Nothing}
sqmQuality :: Lens' SearchQualityMetadata (Maybe Double)
sqmQuality
= lens _sqmQuality (\ s a -> s{_sqmQuality = a}) .
mapping _Coerce
instance FromJSON SearchQualityMetadata where
parseJSON
= withObject "SearchQualityMetadata"
(\ o -> SearchQualityMetadata' <$> (o .:? "quality"))
instance ToJSON SearchQualityMetadata where
toJSON SearchQualityMetadata'{..}
= object (catMaybes [("quality" .=) <$> _sqmQuality])
newtype TimestampValues =
TimestampValues'
{ _tValues :: Maybe [DateTime']
}
deriving (Eq, Show, Data, Typeable, Generic)
timestampValues
:: TimestampValues
timestampValues = TimestampValues' {_tValues = Nothing}
tValues :: Lens' TimestampValues [UTCTime]
tValues
= lens _tValues (\ s a -> s{_tValues = a}) . _Default
. _Coerce
instance FromJSON TimestampValues where
parseJSON
= withObject "TimestampValues"
(\ o ->
TimestampValues' <$> (o .:? "values" .!= mempty))
instance ToJSON TimestampValues where
toJSON TimestampValues'{..}
= object (catMaybes [("values" .=) <$> _tValues])
newtype ErrorInfo =
ErrorInfo'
{ _eiErrorMessages :: Maybe [ErrorMessage]
}
deriving (Eq, Show, Data, Typeable, Generic)
errorInfo
:: ErrorInfo
errorInfo = ErrorInfo' {_eiErrorMessages = Nothing}
eiErrorMessages :: Lens' ErrorInfo [ErrorMessage]
eiErrorMessages
= lens _eiErrorMessages
(\ s a -> s{_eiErrorMessages = a})
. _Default
. _Coerce
instance FromJSON ErrorInfo where
parseJSON
= withObject "ErrorInfo"
(\ o ->
ErrorInfo' <$> (o .:? "errorMessages" .!= mempty))
instance ToJSON ErrorInfo where
toJSON ErrorInfo'{..}
= object
(catMaybes
[("errorMessages" .=) <$> _eiErrorMessages])
data ResultDisplayMetadata =
ResultDisplayMetadata'
{ _rdmMetalines :: !(Maybe [ResultDisplayLine])
, _rdmObjectTypeLabel :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
resultDisplayMetadata
:: ResultDisplayMetadata
resultDisplayMetadata =
ResultDisplayMetadata'
{_rdmMetalines = Nothing, _rdmObjectTypeLabel = Nothing}
rdmMetalines :: Lens' ResultDisplayMetadata [ResultDisplayLine]
rdmMetalines
= lens _rdmMetalines (\ s a -> s{_rdmMetalines = a})
. _Default
. _Coerce
rdmObjectTypeLabel :: Lens' ResultDisplayMetadata (Maybe Text)
rdmObjectTypeLabel
= lens _rdmObjectTypeLabel
(\ s a -> s{_rdmObjectTypeLabel = a})
instance FromJSON ResultDisplayMetadata where
parseJSON
= withObject "ResultDisplayMetadata"
(\ o ->
ResultDisplayMetadata' <$>
(o .:? "metalines" .!= mempty) <*>
(o .:? "objectTypeLabel"))
instance ToJSON ResultDisplayMetadata where
toJSON ResultDisplayMetadata'{..}
= object
(catMaybes
[("metalines" .=) <$> _rdmMetalines,
("objectTypeLabel" .=) <$> _rdmObjectTypeLabel])
newtype OperationResponse =
OperationResponse'
{ _orAddtional :: HashMap Text JSONValue
}
deriving (Eq, Show, Data, Typeable, Generic)
operationResponse
:: HashMap Text JSONValue
-> OperationResponse
operationResponse pOrAddtional_ =
OperationResponse' {_orAddtional = _Coerce # pOrAddtional_}
orAddtional :: Lens' OperationResponse (HashMap Text JSONValue)
orAddtional
= lens _orAddtional (\ s a -> s{_orAddtional = a}) .
_Coerce
instance FromJSON OperationResponse where
parseJSON
= withObject "OperationResponse"
(\ o -> OperationResponse' <$> (parseJSONObject o))
instance ToJSON OperationResponse where
toJSON = toJSON . _orAddtional
newtype IntegerValues =
IntegerValues'
{ _ivValues :: Maybe [Textual Int64]
}
deriving (Eq, Show, Data, Typeable, Generic)
integerValues
:: IntegerValues
integerValues = IntegerValues' {_ivValues = Nothing}
ivValues :: Lens' IntegerValues [Int64]
ivValues
= lens _ivValues (\ s a -> s{_ivValues = a}) .
_Default
. _Coerce
instance FromJSON IntegerValues where
parseJSON
= withObject "IntegerValues"
(\ o ->
IntegerValues' <$> (o .:? "values" .!= mempty))
instance ToJSON IntegerValues where
toJSON IntegerValues'{..}
= object (catMaybes [("values" .=) <$> _ivValues])
data SearchItemsByViewURLResponse =
SearchItemsByViewURLResponse'
{ _sibvurNextPageToken :: !(Maybe Text)
, _sibvurItems :: !(Maybe [Item])
}
deriving (Eq, Show, Data, Typeable, Generic)
searchItemsByViewURLResponse
:: SearchItemsByViewURLResponse
searchItemsByViewURLResponse =
SearchItemsByViewURLResponse'
{_sibvurNextPageToken = Nothing, _sibvurItems = Nothing}
sibvurNextPageToken :: Lens' SearchItemsByViewURLResponse (Maybe Text)
sibvurNextPageToken
= lens _sibvurNextPageToken
(\ s a -> s{_sibvurNextPageToken = a})
sibvurItems :: Lens' SearchItemsByViewURLResponse [Item]
sibvurItems
= lens _sibvurItems (\ s a -> s{_sibvurItems = a}) .
_Default
. _Coerce
instance FromJSON SearchItemsByViewURLResponse where
parseJSON
= withObject "SearchItemsByViewURLResponse"
(\ o ->
SearchItemsByViewURLResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "items" .!= mempty))
instance ToJSON SearchItemsByViewURLResponse where
toJSON SearchItemsByViewURLResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _sibvurNextPageToken,
("items" .=) <$> _sibvurItems])
newtype GetCustomerIndexStatsResponse =
GetCustomerIndexStatsResponse'
{ _gcisrStats :: Maybe [CustomerIndexStats]
}
deriving (Eq, Show, Data, Typeable, Generic)
getCustomerIndexStatsResponse
:: GetCustomerIndexStatsResponse
getCustomerIndexStatsResponse =
GetCustomerIndexStatsResponse' {_gcisrStats = Nothing}
gcisrStats :: Lens' GetCustomerIndexStatsResponse [CustomerIndexStats]
gcisrStats
= lens _gcisrStats (\ s a -> s{_gcisrStats = a}) .
_Default
. _Coerce
instance FromJSON GetCustomerIndexStatsResponse where
parseJSON
= withObject "GetCustomerIndexStatsResponse"
(\ o ->
GetCustomerIndexStatsResponse' <$>
(o .:? "stats" .!= mempty))
instance ToJSON GetCustomerIndexStatsResponse where
toJSON GetCustomerIndexStatsResponse'{..}
= object (catMaybes [("stats" .=) <$> _gcisrStats])
data RestrictItem =
RestrictItem'
{ _riGmailFolderRestrict :: !(Maybe GmailFolderRestrict)
, _riGmailActionRestrict :: !(Maybe GmailActionRestrict)
, _riDriveLocationRestrict :: !(Maybe DriveLocationRestrict)
, _riDriveTimeSpanRestrict :: !(Maybe DriveTimeSpanRestrict)
, _riDriveMimeTypeRestrict :: !(Maybe DriveMimeTypeRestrict)
, _riDriveFollowUpRestrict :: !(Maybe DriveFollowUpRestrict)
, _riGmailTimeRestrict :: !(Maybe GmailTimeRestrict)
, _riGmailIntelligentRestrict :: !(Maybe GmailIntelligentRestrict)
, _riGmailAttachmentRestrict :: !(Maybe GmailAttachmentRestrict)
, _riSearchOperator :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
restrictItem
:: RestrictItem
restrictItem =
RestrictItem'
{ _riGmailFolderRestrict = Nothing
, _riGmailActionRestrict = Nothing
, _riDriveLocationRestrict = Nothing
, _riDriveTimeSpanRestrict = Nothing
, _riDriveMimeTypeRestrict = Nothing
, _riDriveFollowUpRestrict = Nothing
, _riGmailTimeRestrict = Nothing
, _riGmailIntelligentRestrict = Nothing
, _riGmailAttachmentRestrict = Nothing
, _riSearchOperator = Nothing
}
riGmailFolderRestrict :: Lens' RestrictItem (Maybe GmailFolderRestrict)
riGmailFolderRestrict
= lens _riGmailFolderRestrict
(\ s a -> s{_riGmailFolderRestrict = a})
riGmailActionRestrict :: Lens' RestrictItem (Maybe GmailActionRestrict)
riGmailActionRestrict
= lens _riGmailActionRestrict
(\ s a -> s{_riGmailActionRestrict = a})
riDriveLocationRestrict :: Lens' RestrictItem (Maybe DriveLocationRestrict)
riDriveLocationRestrict
= lens _riDriveLocationRestrict
(\ s a -> s{_riDriveLocationRestrict = a})
riDriveTimeSpanRestrict :: Lens' RestrictItem (Maybe DriveTimeSpanRestrict)
riDriveTimeSpanRestrict
= lens _riDriveTimeSpanRestrict
(\ s a -> s{_riDriveTimeSpanRestrict = a})
riDriveMimeTypeRestrict :: Lens' RestrictItem (Maybe DriveMimeTypeRestrict)
riDriveMimeTypeRestrict
= lens _riDriveMimeTypeRestrict
(\ s a -> s{_riDriveMimeTypeRestrict = a})
riDriveFollowUpRestrict :: Lens' RestrictItem (Maybe DriveFollowUpRestrict)
riDriveFollowUpRestrict
= lens _riDriveFollowUpRestrict
(\ s a -> s{_riDriveFollowUpRestrict = a})
riGmailTimeRestrict :: Lens' RestrictItem (Maybe GmailTimeRestrict)
riGmailTimeRestrict
= lens _riGmailTimeRestrict
(\ s a -> s{_riGmailTimeRestrict = a})
riGmailIntelligentRestrict :: Lens' RestrictItem (Maybe GmailIntelligentRestrict)
riGmailIntelligentRestrict
= lens _riGmailIntelligentRestrict
(\ s a -> s{_riGmailIntelligentRestrict = a})
riGmailAttachmentRestrict :: Lens' RestrictItem (Maybe GmailAttachmentRestrict)
riGmailAttachmentRestrict
= lens _riGmailAttachmentRestrict
(\ s a -> s{_riGmailAttachmentRestrict = a})
riSearchOperator :: Lens' RestrictItem (Maybe Text)
riSearchOperator
= lens _riSearchOperator
(\ s a -> s{_riSearchOperator = a})
instance FromJSON RestrictItem where
parseJSON
= withObject "RestrictItem"
(\ o ->
RestrictItem' <$>
(o .:? "gmailFolderRestrict") <*>
(o .:? "gmailActionRestrict")
<*> (o .:? "driveLocationRestrict")
<*> (o .:? "driveTimeSpanRestrict")
<*> (o .:? "driveMimeTypeRestrict")
<*> (o .:? "driveFollowUpRestrict")
<*> (o .:? "gmailTimeRestrict")
<*> (o .:? "gmailIntelligentRestrict")
<*> (o .:? "gmailAttachmentRestrict")
<*> (o .:? "searchOperator"))
instance ToJSON RestrictItem where
toJSON RestrictItem'{..}
= object
(catMaybes
[("gmailFolderRestrict" .=) <$>
_riGmailFolderRestrict,
("gmailActionRestrict" .=) <$>
_riGmailActionRestrict,
("driveLocationRestrict" .=) <$>
_riDriveLocationRestrict,
("driveTimeSpanRestrict" .=) <$>
_riDriveTimeSpanRestrict,
("driveMimeTypeRestrict" .=) <$>
_riDriveMimeTypeRestrict,
("driveFollowUpRestrict" .=) <$>
_riDriveFollowUpRestrict,
("gmailTimeRestrict" .=) <$> _riGmailTimeRestrict,
("gmailIntelligentRestrict" .=) <$>
_riGmailIntelligentRestrict,
("gmailAttachmentRestrict" .=) <$>
_riGmailAttachmentRestrict,
("searchOperator" .=) <$> _riSearchOperator])
newtype CheckAccessResponse =
CheckAccessResponse'
{ _carHasAccess :: Maybe Bool
}
deriving (Eq, Show, Data, Typeable, Generic)
checkAccessResponse
:: CheckAccessResponse
checkAccessResponse = CheckAccessResponse' {_carHasAccess = Nothing}
carHasAccess :: Lens' CheckAccessResponse (Maybe Bool)
carHasAccess
= lens _carHasAccess (\ s a -> s{_carHasAccess = a})
instance FromJSON CheckAccessResponse where
parseJSON
= withObject "CheckAccessResponse"
(\ o -> CheckAccessResponse' <$> (o .:? "hasAccess"))
instance ToJSON CheckAccessResponse where
toJSON CheckAccessResponse'{..}
= object
(catMaybes [("hasAccess" .=) <$> _carHasAccess])
data RequestOptions =
RequestOptions'
{ _roLanguageCode :: !(Maybe Text)
, _roDebugOptions :: !(Maybe DebugOptions)
, _roTimeZone :: !(Maybe Text)
, _roSearchApplicationId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
requestOptions
:: RequestOptions
requestOptions =
RequestOptions'
{ _roLanguageCode = Nothing
, _roDebugOptions = Nothing
, _roTimeZone = Nothing
, _roSearchApplicationId = Nothing
}
roLanguageCode :: Lens' RequestOptions (Maybe Text)
roLanguageCode
= lens _roLanguageCode
(\ s a -> s{_roLanguageCode = a})
roDebugOptions :: Lens' RequestOptions (Maybe DebugOptions)
roDebugOptions
= lens _roDebugOptions
(\ s a -> s{_roDebugOptions = a})
roTimeZone :: Lens' RequestOptions (Maybe Text)
roTimeZone
= lens _roTimeZone (\ s a -> s{_roTimeZone = a})
roSearchApplicationId :: Lens' RequestOptions (Maybe Text)
roSearchApplicationId
= lens _roSearchApplicationId
(\ s a -> s{_roSearchApplicationId = a})
instance FromJSON RequestOptions where
parseJSON
= withObject "RequestOptions"
(\ o ->
RequestOptions' <$>
(o .:? "languageCode") <*> (o .:? "debugOptions") <*>
(o .:? "timeZone")
<*> (o .:? "searchApplicationId"))
instance ToJSON RequestOptions where
toJSON RequestOptions'{..}
= object
(catMaybes
[("languageCode" .=) <$> _roLanguageCode,
("debugOptions" .=) <$> _roDebugOptions,
("timeZone" .=) <$> _roTimeZone,
("searchApplicationId" .=) <$>
_roSearchApplicationId])
data ItemStatus =
ItemStatus'
{ _isProcessingErrors :: !(Maybe [ProcessingError])
, _isCode :: !(Maybe ItemStatusCode)
, _isRepositoryErrors :: !(Maybe [RepositoryError])
}
deriving (Eq, Show, Data, Typeable, Generic)
itemStatus
:: ItemStatus
itemStatus =
ItemStatus'
{ _isProcessingErrors = Nothing
, _isCode = Nothing
, _isRepositoryErrors = Nothing
}
isProcessingErrors :: Lens' ItemStatus [ProcessingError]
isProcessingErrors
= lens _isProcessingErrors
(\ s a -> s{_isProcessingErrors = a})
. _Default
. _Coerce
isCode :: Lens' ItemStatus (Maybe ItemStatusCode)
isCode = lens _isCode (\ s a -> s{_isCode = a})
isRepositoryErrors :: Lens' ItemStatus [RepositoryError]
isRepositoryErrors
= lens _isRepositoryErrors
(\ s a -> s{_isRepositoryErrors = a})
. _Default
. _Coerce
instance FromJSON ItemStatus where
parseJSON
= withObject "ItemStatus"
(\ o ->
ItemStatus' <$>
(o .:? "processingErrors" .!= mempty) <*>
(o .:? "code")
<*> (o .:? "repositoryErrors" .!= mempty))
instance ToJSON ItemStatus where
toJSON ItemStatus'{..}
= object
(catMaybes
[("processingErrors" .=) <$> _isProcessingErrors,
("code" .=) <$> _isCode,
("repositoryErrors" .=) <$> _isRepositoryErrors])