{-# 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.Jobs.Types.Product where
import Network.Google.Jobs.Types.Sum
import Network.Google.Prelude
data LatLng = LatLng'
{ _llLatitude :: !(Maybe (Textual Double))
, _llLongitude :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
latLng
:: LatLng
latLng =
LatLng'
{ _llLatitude = Nothing
, _llLongitude = Nothing
}
llLatitude :: Lens' LatLng (Maybe Double)
llLatitude
= lens _llLatitude (\ s a -> s{_llLatitude = a}) .
mapping _Coerce
llLongitude :: Lens' LatLng (Maybe Double)
llLongitude
= lens _llLongitude (\ s a -> s{_llLongitude = a}) .
mapping _Coerce
instance FromJSON LatLng where
parseJSON
= withObject "LatLng"
(\ o ->
LatLng' <$>
(o .:? "latitude") <*> (o .:? "longitude"))
instance ToJSON LatLng where
toJSON LatLng'{..}
= object
(catMaybes
[("latitude" .=) <$> _llLatitude,
("longitude" .=) <$> _llLongitude])
data ApplicationInfo = ApplicationInfo'
{ _aiURIs :: !(Maybe [Text])
, _aiEmails :: !(Maybe [Text])
, _aiInstruction :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
applicationInfo
:: ApplicationInfo
applicationInfo =
ApplicationInfo'
{ _aiURIs = Nothing
, _aiEmails = Nothing
, _aiInstruction = Nothing
}
aiURIs :: Lens' ApplicationInfo [Text]
aiURIs
= lens _aiURIs (\ s a -> s{_aiURIs = a}) . _Default .
_Coerce
aiEmails :: Lens' ApplicationInfo [Text]
aiEmails
= lens _aiEmails (\ s a -> s{_aiEmails = a}) .
_Default
. _Coerce
aiInstruction :: Lens' ApplicationInfo (Maybe Text)
aiInstruction
= lens _aiInstruction
(\ s a -> s{_aiInstruction = a})
instance FromJSON ApplicationInfo where
parseJSON
= withObject "ApplicationInfo"
(\ o ->
ApplicationInfo' <$>
(o .:? "uris" .!= mempty) <*>
(o .:? "emails" .!= mempty)
<*> (o .:? "instruction"))
instance ToJSON ApplicationInfo where
toJSON ApplicationInfo'{..}
= object
(catMaybes
[("uris" .=) <$> _aiURIs,
("emails" .=) <$> _aiEmails,
("instruction" .=) <$> _aiInstruction])
data MatchingJob = MatchingJob'
{ _mjJobTitleSnippet :: !(Maybe Text)
, _mjJobSummary :: !(Maybe Text)
, _mjCommuteInfo :: !(Maybe CommuteInfo)
, _mjSearchTextSnippet :: !(Maybe Text)
, _mjJob :: !(Maybe Job)
} deriving (Eq,Show,Data,Typeable,Generic)
matchingJob
:: MatchingJob
matchingJob =
MatchingJob'
{ _mjJobTitleSnippet = Nothing
, _mjJobSummary = Nothing
, _mjCommuteInfo = Nothing
, _mjSearchTextSnippet = Nothing
, _mjJob = Nothing
}
mjJobTitleSnippet :: Lens' MatchingJob (Maybe Text)
mjJobTitleSnippet
= lens _mjJobTitleSnippet
(\ s a -> s{_mjJobTitleSnippet = a})
mjJobSummary :: Lens' MatchingJob (Maybe Text)
mjJobSummary
= lens _mjJobSummary (\ s a -> s{_mjJobSummary = a})
mjCommuteInfo :: Lens' MatchingJob (Maybe CommuteInfo)
mjCommuteInfo
= lens _mjCommuteInfo
(\ s a -> s{_mjCommuteInfo = a})
mjSearchTextSnippet :: Lens' MatchingJob (Maybe Text)
mjSearchTextSnippet
= lens _mjSearchTextSnippet
(\ s a -> s{_mjSearchTextSnippet = a})
mjJob :: Lens' MatchingJob (Maybe Job)
mjJob = lens _mjJob (\ s a -> s{_mjJob = a})
instance FromJSON MatchingJob where
parseJSON
= withObject "MatchingJob"
(\ o ->
MatchingJob' <$>
(o .:? "jobTitleSnippet") <*> (o .:? "jobSummary")
<*> (o .:? "commuteInfo")
<*> (o .:? "searchTextSnippet")
<*> (o .:? "job"))
instance ToJSON MatchingJob where
toJSON MatchingJob'{..}
= object
(catMaybes
[("jobTitleSnippet" .=) <$> _mjJobTitleSnippet,
("jobSummary" .=) <$> _mjJobSummary,
("commuteInfo" .=) <$> _mjCommuteInfo,
("searchTextSnippet" .=) <$> _mjSearchTextSnippet,
("job" .=) <$> _mjJob])
data RequestMetadata = RequestMetadata'
{ _rmDomain :: !(Maybe Text)
, _rmUserId :: !(Maybe Text)
, _rmSessionId :: !(Maybe Text)
, _rmDeviceInfo :: !(Maybe DeviceInfo)
} deriving (Eq,Show,Data,Typeable,Generic)
requestMetadata
:: RequestMetadata
requestMetadata =
RequestMetadata'
{ _rmDomain = Nothing
, _rmUserId = Nothing
, _rmSessionId = Nothing
, _rmDeviceInfo = Nothing
}
rmDomain :: Lens' RequestMetadata (Maybe Text)
rmDomain = lens _rmDomain (\ s a -> s{_rmDomain = a})
rmUserId :: Lens' RequestMetadata (Maybe Text)
rmUserId = lens _rmUserId (\ s a -> s{_rmUserId = a})
rmSessionId :: Lens' RequestMetadata (Maybe Text)
rmSessionId
= lens _rmSessionId (\ s a -> s{_rmSessionId = a})
rmDeviceInfo :: Lens' RequestMetadata (Maybe DeviceInfo)
rmDeviceInfo
= lens _rmDeviceInfo (\ s a -> s{_rmDeviceInfo = a})
instance FromJSON RequestMetadata where
parseJSON
= withObject "RequestMetadata"
(\ o ->
RequestMetadata' <$>
(o .:? "domain") <*> (o .:? "userId") <*>
(o .:? "sessionId")
<*> (o .:? "deviceInfo"))
instance ToJSON RequestMetadata where
toJSON RequestMetadata'{..}
= object
(catMaybes
[("domain" .=) <$> _rmDomain,
("userId" .=) <$> _rmUserId,
("sessionId" .=) <$> _rmSessionId,
("deviceInfo" .=) <$> _rmDeviceInfo])
data UpdateCompanyRequest = UpdateCompanyRequest'
{ _ucrUpdateMask :: !(Maybe GFieldMask)
, _ucrCompany :: !(Maybe Company)
} deriving (Eq,Show,Data,Typeable,Generic)
updateCompanyRequest
:: UpdateCompanyRequest
updateCompanyRequest =
UpdateCompanyRequest'
{ _ucrUpdateMask = Nothing
, _ucrCompany = Nothing
}
ucrUpdateMask :: Lens' UpdateCompanyRequest (Maybe GFieldMask)
ucrUpdateMask
= lens _ucrUpdateMask
(\ s a -> s{_ucrUpdateMask = a})
ucrCompany :: Lens' UpdateCompanyRequest (Maybe Company)
ucrCompany
= lens _ucrCompany (\ s a -> s{_ucrCompany = a})
instance FromJSON UpdateCompanyRequest where
parseJSON
= withObject "UpdateCompanyRequest"
(\ o ->
UpdateCompanyRequest' <$>
(o .:? "updateMask") <*> (o .:? "company"))
instance ToJSON UpdateCompanyRequest where
toJSON UpdateCompanyRequest'{..}
= object
(catMaybes
[("updateMask" .=) <$> _ucrUpdateMask,
("company" .=) <$> _ucrCompany])
data UpdateJobRequest = UpdateJobRequest'
{ _ujrUpdateMask :: !(Maybe GFieldMask)
, _ujrJob :: !(Maybe Job)
} deriving (Eq,Show,Data,Typeable,Generic)
updateJobRequest
:: UpdateJobRequest
updateJobRequest =
UpdateJobRequest'
{ _ujrUpdateMask = Nothing
, _ujrJob = Nothing
}
ujrUpdateMask :: Lens' UpdateJobRequest (Maybe GFieldMask)
ujrUpdateMask
= lens _ujrUpdateMask
(\ s a -> s{_ujrUpdateMask = a})
ujrJob :: Lens' UpdateJobRequest (Maybe Job)
ujrJob = lens _ujrJob (\ s a -> s{_ujrJob = a})
instance FromJSON UpdateJobRequest where
parseJSON
= withObject "UpdateJobRequest"
(\ o ->
UpdateJobRequest' <$>
(o .:? "updateMask") <*> (o .:? "job"))
instance ToJSON UpdateJobRequest where
toJSON UpdateJobRequest'{..}
= object
(catMaybes
[("updateMask" .=) <$> _ujrUpdateMask,
("job" .=) <$> _ujrJob])
data BucketizedCount = BucketizedCount'
{ _bcCount :: !(Maybe (Textual Int32))
, _bcRange :: !(Maybe BucketRange)
} deriving (Eq,Show,Data,Typeable,Generic)
bucketizedCount
:: BucketizedCount
bucketizedCount =
BucketizedCount'
{ _bcCount = Nothing
, _bcRange = Nothing
}
bcCount :: Lens' BucketizedCount (Maybe Int32)
bcCount
= lens _bcCount (\ s a -> s{_bcCount = a}) .
mapping _Coerce
bcRange :: Lens' BucketizedCount (Maybe BucketRange)
bcRange = lens _bcRange (\ s a -> s{_bcRange = a})
instance FromJSON BucketizedCount where
parseJSON
= withObject "BucketizedCount"
(\ o ->
BucketizedCount' <$>
(o .:? "count") <*> (o .:? "range"))
instance ToJSON BucketizedCount where
toJSON BucketizedCount'{..}
= object
(catMaybes
[("count" .=) <$> _bcCount,
("range" .=) <$> _bcRange])
data CompensationInfo = CompensationInfo'
{ _ciAnnualizedTotalCompensationRange :: !(Maybe CompensationRange)
, _ciEntries :: !(Maybe [CompensationEntry])
, _ciAnnualizedBaseCompensationRange :: !(Maybe CompensationRange)
} deriving (Eq,Show,Data,Typeable,Generic)
compensationInfo
:: CompensationInfo
compensationInfo =
CompensationInfo'
{ _ciAnnualizedTotalCompensationRange = Nothing
, _ciEntries = Nothing
, _ciAnnualizedBaseCompensationRange = Nothing
}
ciAnnualizedTotalCompensationRange :: Lens' CompensationInfo (Maybe CompensationRange)
ciAnnualizedTotalCompensationRange
= lens _ciAnnualizedTotalCompensationRange
(\ s a -> s{_ciAnnualizedTotalCompensationRange = a})
ciEntries :: Lens' CompensationInfo [CompensationEntry]
ciEntries
= lens _ciEntries (\ s a -> s{_ciEntries = a}) .
_Default
. _Coerce
ciAnnualizedBaseCompensationRange :: Lens' CompensationInfo (Maybe CompensationRange)
ciAnnualizedBaseCompensationRange
= lens _ciAnnualizedBaseCompensationRange
(\ s a -> s{_ciAnnualizedBaseCompensationRange = a})
instance FromJSON CompensationInfo where
parseJSON
= withObject "CompensationInfo"
(\ o ->
CompensationInfo' <$>
(o .:? "annualizedTotalCompensationRange") <*>
(o .:? "entries" .!= mempty)
<*> (o .:? "annualizedBaseCompensationRange"))
instance ToJSON CompensationInfo where
toJSON CompensationInfo'{..}
= object
(catMaybes
[("annualizedTotalCompensationRange" .=) <$>
_ciAnnualizedTotalCompensationRange,
("entries" .=) <$> _ciEntries,
("annualizedBaseCompensationRange" .=) <$>
_ciAnnualizedBaseCompensationRange])
newtype CreateCompanyRequest = CreateCompanyRequest'
{ _ccrCompany :: Maybe Company
} deriving (Eq,Show,Data,Typeable,Generic)
createCompanyRequest
:: CreateCompanyRequest
createCompanyRequest =
CreateCompanyRequest'
{ _ccrCompany = Nothing
}
ccrCompany :: Lens' CreateCompanyRequest (Maybe Company)
ccrCompany
= lens _ccrCompany (\ s a -> s{_ccrCompany = a})
instance FromJSON CreateCompanyRequest where
parseJSON
= withObject "CreateCompanyRequest"
(\ o -> CreateCompanyRequest' <$> (o .:? "company"))
instance ToJSON CreateCompanyRequest where
toJSON CreateCompanyRequest'{..}
= object (catMaybes [("company" .=) <$> _ccrCompany])
newtype HistogramQuery = HistogramQuery'
{ _hqHistogramQuery :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
histogramQuery
:: HistogramQuery
histogramQuery =
HistogramQuery'
{ _hqHistogramQuery = Nothing
}
hqHistogramQuery :: Lens' HistogramQuery (Maybe Text)
hqHistogramQuery
= lens _hqHistogramQuery
(\ s a -> s{_hqHistogramQuery = a})
instance FromJSON HistogramQuery where
parseJSON
= withObject "HistogramQuery"
(\ o -> HistogramQuery' <$> (o .:? "histogramQuery"))
instance ToJSON HistogramQuery where
toJSON HistogramQuery'{..}
= object
(catMaybes
[("histogramQuery" .=) <$> _hqHistogramQuery])
newtype CreateJobRequest = CreateJobRequest'
{ _cjrJob :: Maybe Job
} deriving (Eq,Show,Data,Typeable,Generic)
createJobRequest
:: CreateJobRequest
createJobRequest =
CreateJobRequest'
{ _cjrJob = Nothing
}
cjrJob :: Lens' CreateJobRequest (Maybe Job)
cjrJob = lens _cjrJob (\ s a -> s{_cjrJob = a})
instance FromJSON CreateJobRequest where
parseJSON
= withObject "CreateJobRequest"
(\ o -> CreateJobRequest' <$> (o .:? "job"))
instance ToJSON CreateJobRequest where
toJSON CreateJobRequest'{..}
= object (catMaybes [("job" .=) <$> _cjrJob])
data CompletionResult = CompletionResult'
{ _crSuggestion :: !(Maybe Text)
, _crImageURI :: !(Maybe Text)
, _crType :: !(Maybe CompletionResultType)
} deriving (Eq,Show,Data,Typeable,Generic)
completionResult
:: CompletionResult
completionResult =
CompletionResult'
{ _crSuggestion = Nothing
, _crImageURI = Nothing
, _crType = Nothing
}
crSuggestion :: Lens' CompletionResult (Maybe Text)
crSuggestion
= lens _crSuggestion (\ s a -> s{_crSuggestion = a})
crImageURI :: Lens' CompletionResult (Maybe Text)
crImageURI
= lens _crImageURI (\ s a -> s{_crImageURI = a})
crType :: Lens' CompletionResult (Maybe CompletionResultType)
crType = lens _crType (\ s a -> s{_crType = a})
instance FromJSON CompletionResult where
parseJSON
= withObject "CompletionResult"
(\ o ->
CompletionResult' <$>
(o .:? "suggestion") <*> (o .:? "imageUri") <*>
(o .:? "type"))
instance ToJSON CompletionResult where
toJSON CompletionResult'{..}
= object
(catMaybes
[("suggestion" .=) <$> _crSuggestion,
("imageUri" .=) <$> _crImageURI,
("type" .=) <$> _crType])
data Location = Location'
{ _lLatLng :: !(Maybe LatLng)
, _lLocationType :: !(Maybe LocationLocationType)
, _lPostalAddress :: !(Maybe PostalAddress)
, _lRadiusInMiles :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
location
:: Location
location =
Location'
{ _lLatLng = Nothing
, _lLocationType = Nothing
, _lPostalAddress = Nothing
, _lRadiusInMiles = Nothing
}
lLatLng :: Lens' Location (Maybe LatLng)
lLatLng = lens _lLatLng (\ s a -> s{_lLatLng = a})
lLocationType :: Lens' Location (Maybe LocationLocationType)
lLocationType
= lens _lLocationType
(\ s a -> s{_lLocationType = a})
lPostalAddress :: Lens' Location (Maybe PostalAddress)
lPostalAddress
= lens _lPostalAddress
(\ s a -> s{_lPostalAddress = a})
lRadiusInMiles :: Lens' Location (Maybe Double)
lRadiusInMiles
= lens _lRadiusInMiles
(\ s a -> s{_lRadiusInMiles = a})
. mapping _Coerce
instance FromJSON Location where
parseJSON
= withObject "Location"
(\ o ->
Location' <$>
(o .:? "latLng") <*> (o .:? "locationType") <*>
(o .:? "postalAddress")
<*> (o .:? "radiusInMiles"))
instance ToJSON Location where
toJSON Location'{..}
= object
(catMaybes
[("latLng" .=) <$> _lLatLng,
("locationType" .=) <$> _lLocationType,
("postalAddress" .=) <$> _lPostalAddress,
("radiusInMiles" .=) <$> _lRadiusInMiles])
data Empty =
Empty'
deriving (Eq,Show,Data,Typeable,Generic)
empty
:: Empty
empty = Empty'
instance FromJSON Empty where
parseJSON = withObject "Empty" (\ o -> pure Empty')
instance ToJSON Empty where
toJSON = const emptyObject
data ClientEvent = ClientEvent'
{ _ceRequestId :: !(Maybe Text)
, _ceExtraInfo :: !(Maybe ClientEventExtraInfo)
, _ceJobEvent :: !(Maybe JobEvent)
, _ceParentEventId :: !(Maybe Text)
, _ceCreateTime :: !(Maybe DateTime')
, _ceEventId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
clientEvent
:: ClientEvent
clientEvent =
ClientEvent'
{ _ceRequestId = Nothing
, _ceExtraInfo = Nothing
, _ceJobEvent = Nothing
, _ceParentEventId = Nothing
, _ceCreateTime = Nothing
, _ceEventId = Nothing
}
ceRequestId :: Lens' ClientEvent (Maybe Text)
ceRequestId
= lens _ceRequestId (\ s a -> s{_ceRequestId = a})
ceExtraInfo :: Lens' ClientEvent (Maybe ClientEventExtraInfo)
ceExtraInfo
= lens _ceExtraInfo (\ s a -> s{_ceExtraInfo = a})
ceJobEvent :: Lens' ClientEvent (Maybe JobEvent)
ceJobEvent
= lens _ceJobEvent (\ s a -> s{_ceJobEvent = a})
ceParentEventId :: Lens' ClientEvent (Maybe Text)
ceParentEventId
= lens _ceParentEventId
(\ s a -> s{_ceParentEventId = a})
ceCreateTime :: Lens' ClientEvent (Maybe UTCTime)
ceCreateTime
= lens _ceCreateTime (\ s a -> s{_ceCreateTime = a})
. mapping _DateTime
ceEventId :: Lens' ClientEvent (Maybe Text)
ceEventId
= lens _ceEventId (\ s a -> s{_ceEventId = a})
instance FromJSON ClientEvent where
parseJSON
= withObject "ClientEvent"
(\ o ->
ClientEvent' <$>
(o .:? "requestId") <*> (o .:? "extraInfo") <*>
(o .:? "jobEvent")
<*> (o .:? "parentEventId")
<*> (o .:? "createTime")
<*> (o .:? "eventId"))
instance ToJSON ClientEvent where
toJSON ClientEvent'{..}
= object
(catMaybes
[("requestId" .=) <$> _ceRequestId,
("extraInfo" .=) <$> _ceExtraInfo,
("jobEvent" .=) <$> _ceJobEvent,
("parentEventId" .=) <$> _ceParentEventId,
("createTime" .=) <$> _ceCreateTime,
("eventId" .=) <$> _ceEventId])
data CompensationHistogramRequest = CompensationHistogramRequest'
{ _chrBucketingOption :: !(Maybe NumericBucketingOption)
, _chrType :: !(Maybe CompensationHistogramRequestType)
} deriving (Eq,Show,Data,Typeable,Generic)
compensationHistogramRequest
:: CompensationHistogramRequest
compensationHistogramRequest =
CompensationHistogramRequest'
{ _chrBucketingOption = Nothing
, _chrType = Nothing
}
chrBucketingOption :: Lens' CompensationHistogramRequest (Maybe NumericBucketingOption)
chrBucketingOption
= lens _chrBucketingOption
(\ s a -> s{_chrBucketingOption = a})
chrType :: Lens' CompensationHistogramRequest (Maybe CompensationHistogramRequestType)
chrType = lens _chrType (\ s a -> s{_chrType = a})
instance FromJSON CompensationHistogramRequest where
parseJSON
= withObject "CompensationHistogramRequest"
(\ o ->
CompensationHistogramRequest' <$>
(o .:? "bucketingOption") <*> (o .:? "type"))
instance ToJSON CompensationHistogramRequest where
toJSON CompensationHistogramRequest'{..}
= object
(catMaybes
[("bucketingOption" .=) <$> _chrBucketingOption,
("type" .=) <$> _chrType])
data Money = Money'
{ _mCurrencyCode :: !(Maybe Text)
, _mNanos :: !(Maybe (Textual Int32))
, _mUnits :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
money
:: Money
money =
Money'
{ _mCurrencyCode = Nothing
, _mNanos = Nothing
, _mUnits = Nothing
}
mCurrencyCode :: Lens' Money (Maybe Text)
mCurrencyCode
= lens _mCurrencyCode
(\ s a -> s{_mCurrencyCode = a})
mNanos :: Lens' Money (Maybe Int32)
mNanos
= lens _mNanos (\ s a -> s{_mNanos = a}) .
mapping _Coerce
mUnits :: Lens' Money (Maybe Int64)
mUnits
= lens _mUnits (\ s a -> s{_mUnits = a}) .
mapping _Coerce
instance FromJSON Money where
parseJSON
= withObject "Money"
(\ o ->
Money' <$>
(o .:? "currencyCode") <*> (o .:? "nanos") <*>
(o .:? "units"))
instance ToJSON Money where
toJSON Money'{..}
= object
(catMaybes
[("currencyCode" .=) <$> _mCurrencyCode,
("nanos" .=) <$> _mNanos, ("units" .=) <$> _mUnits])
data ListCompaniesResponse = ListCompaniesResponse'
{ _lcrNextPageToken :: !(Maybe Text)
, _lcrCompanies :: !(Maybe [Company])
, _lcrMetadata :: !(Maybe ResponseMetadata)
} deriving (Eq,Show,Data,Typeable,Generic)
listCompaniesResponse
:: ListCompaniesResponse
listCompaniesResponse =
ListCompaniesResponse'
{ _lcrNextPageToken = Nothing
, _lcrCompanies = Nothing
, _lcrMetadata = Nothing
}
lcrNextPageToken :: Lens' ListCompaniesResponse (Maybe Text)
lcrNextPageToken
= lens _lcrNextPageToken
(\ s a -> s{_lcrNextPageToken = a})
lcrCompanies :: Lens' ListCompaniesResponse [Company]
lcrCompanies
= lens _lcrCompanies (\ s a -> s{_lcrCompanies = a})
. _Default
. _Coerce
lcrMetadata :: Lens' ListCompaniesResponse (Maybe ResponseMetadata)
lcrMetadata
= lens _lcrMetadata (\ s a -> s{_lcrMetadata = a})
instance FromJSON ListCompaniesResponse where
parseJSON
= withObject "ListCompaniesResponse"
(\ o ->
ListCompaniesResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "companies" .!= mempty)
<*> (o .:? "metadata"))
instance ToJSON ListCompaniesResponse where
toJSON ListCompaniesResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lcrNextPageToken,
("companies" .=) <$> _lcrCompanies,
("metadata" .=) <$> _lcrMetadata])
data CommuteFilter = CommuteFilter'
{ _cfCommuteMethod :: !(Maybe CommuteFilterCommuteMethod)
, _cfAllowImpreciseAddresses :: !(Maybe Bool)
, _cfTravelDuration :: !(Maybe GDuration)
, _cfStartCoordinates :: !(Maybe LatLng)
, _cfRoadTraffic :: !(Maybe CommuteFilterRoadTraffic)
, _cfDePartureTime :: !(Maybe TimeOfDay')
} deriving (Eq,Show,Data,Typeable,Generic)
commuteFilter
:: CommuteFilter
commuteFilter =
CommuteFilter'
{ _cfCommuteMethod = Nothing
, _cfAllowImpreciseAddresses = Nothing
, _cfTravelDuration = Nothing
, _cfStartCoordinates = Nothing
, _cfRoadTraffic = Nothing
, _cfDePartureTime = Nothing
}
cfCommuteMethod :: Lens' CommuteFilter (Maybe CommuteFilterCommuteMethod)
cfCommuteMethod
= lens _cfCommuteMethod
(\ s a -> s{_cfCommuteMethod = a})
cfAllowImpreciseAddresses :: Lens' CommuteFilter (Maybe Bool)
cfAllowImpreciseAddresses
= lens _cfAllowImpreciseAddresses
(\ s a -> s{_cfAllowImpreciseAddresses = a})
cfTravelDuration :: Lens' CommuteFilter (Maybe Scientific)
cfTravelDuration
= lens _cfTravelDuration
(\ s a -> s{_cfTravelDuration = a})
. mapping _GDuration
cfStartCoordinates :: Lens' CommuteFilter (Maybe LatLng)
cfStartCoordinates
= lens _cfStartCoordinates
(\ s a -> s{_cfStartCoordinates = a})
cfRoadTraffic :: Lens' CommuteFilter (Maybe CommuteFilterRoadTraffic)
cfRoadTraffic
= lens _cfRoadTraffic
(\ s a -> s{_cfRoadTraffic = a})
cfDePartureTime :: Lens' CommuteFilter (Maybe TimeOfDay')
cfDePartureTime
= lens _cfDePartureTime
(\ s a -> s{_cfDePartureTime = a})
instance FromJSON CommuteFilter where
parseJSON
= withObject "CommuteFilter"
(\ o ->
CommuteFilter' <$>
(o .:? "commuteMethod") <*>
(o .:? "allowImpreciseAddresses")
<*> (o .:? "travelDuration")
<*> (o .:? "startCoordinates")
<*> (o .:? "roadTraffic")
<*> (o .:? "departureTime"))
instance ToJSON CommuteFilter where
toJSON CommuteFilter'{..}
= object
(catMaybes
[("commuteMethod" .=) <$> _cfCommuteMethod,
("allowImpreciseAddresses" .=) <$>
_cfAllowImpreciseAddresses,
("travelDuration" .=) <$> _cfTravelDuration,
("startCoordinates" .=) <$> _cfStartCoordinates,
("roadTraffic" .=) <$> _cfRoadTraffic,
("departureTime" .=) <$> _cfDePartureTime])
newtype BatchDeleteJobsRequest = BatchDeleteJobsRequest'
{ _bdjrFilter :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
batchDeleteJobsRequest
:: BatchDeleteJobsRequest
batchDeleteJobsRequest =
BatchDeleteJobsRequest'
{ _bdjrFilter = Nothing
}
bdjrFilter :: Lens' BatchDeleteJobsRequest (Maybe Text)
bdjrFilter
= lens _bdjrFilter (\ s a -> s{_bdjrFilter = a})
instance FromJSON BatchDeleteJobsRequest where
parseJSON
= withObject "BatchDeleteJobsRequest"
(\ o -> BatchDeleteJobsRequest' <$> (o .:? "filter"))
instance ToJSON BatchDeleteJobsRequest where
toJSON BatchDeleteJobsRequest'{..}
= object (catMaybes [("filter" .=) <$> _bdjrFilter])
newtype JobCustomAttributes = JobCustomAttributes'
{ _jcaAddtional :: HashMap Text CustomAttribute
} deriving (Eq,Show,Data,Typeable,Generic)
jobCustomAttributes
:: HashMap Text CustomAttribute
-> JobCustomAttributes
jobCustomAttributes pJcaAddtional_ =
JobCustomAttributes'
{ _jcaAddtional = _Coerce # pJcaAddtional_
}
jcaAddtional :: Lens' JobCustomAttributes (HashMap Text CustomAttribute)
jcaAddtional
= lens _jcaAddtional (\ s a -> s{_jcaAddtional = a})
. _Coerce
instance FromJSON JobCustomAttributes where
parseJSON
= withObject "JobCustomAttributes"
(\ o -> JobCustomAttributes' <$> (parseJSONObject o))
instance ToJSON JobCustomAttributes where
toJSON = toJSON . _jcaAddtional
data JobEvent = JobEvent'
{ _jeJobs :: !(Maybe [Text])
, _jeType :: !(Maybe JobEventType)
} deriving (Eq,Show,Data,Typeable,Generic)
jobEvent
:: JobEvent
jobEvent =
JobEvent'
{ _jeJobs = Nothing
, _jeType = Nothing
}
jeJobs :: Lens' JobEvent [Text]
jeJobs
= lens _jeJobs (\ s a -> s{_jeJobs = a}) . _Default .
_Coerce
jeType :: Lens' JobEvent (Maybe JobEventType)
jeType = lens _jeType (\ s a -> s{_jeType = a})
instance FromJSON JobEvent where
parseJSON
= withObject "JobEvent"
(\ o ->
JobEvent' <$>
(o .:? "jobs" .!= mempty) <*> (o .:? "type"))
instance ToJSON JobEvent where
toJSON JobEvent'{..}
= object
(catMaybes
[("jobs" .=) <$> _jeJobs, ("type" .=) <$> _jeType])
data SearchJobsRequest = SearchJobsRequest'
{ _sjrRequestMetadata :: !(Maybe RequestMetadata)
, _sjrJobView :: !(Maybe SearchJobsRequestJobView)
, _sjrOrderBy :: !(Maybe Text)
, _sjrOffSet :: !(Maybe (Textual Int32))
, _sjrSearchMode :: !(Maybe SearchJobsRequestSearchMode)
, _sjrDiversificationLevel :: !(Maybe SearchJobsRequestDiversificationLevel)
, _sjrHistogramQueries :: !(Maybe [HistogramQuery])
, _sjrRequirePreciseResultSize :: !(Maybe Bool)
, _sjrJobQuery :: !(Maybe JobQuery)
, _sjrEnableBroadening :: !(Maybe Bool)
, _sjrPageToken :: !(Maybe Text)
, _sjrCustomRankingInfo :: !(Maybe CustomRankingInfo)
, _sjrDisableKeywordMatch :: !(Maybe Bool)
, _sjrPageSize :: !(Maybe (Textual Int32))
, _sjrHistogramFacets :: !(Maybe HistogramFacets)
} deriving (Eq,Show,Data,Typeable,Generic)
searchJobsRequest
:: SearchJobsRequest
searchJobsRequest =
SearchJobsRequest'
{ _sjrRequestMetadata = Nothing
, _sjrJobView = Nothing
, _sjrOrderBy = Nothing
, _sjrOffSet = Nothing
, _sjrSearchMode = Nothing
, _sjrDiversificationLevel = Nothing
, _sjrHistogramQueries = Nothing
, _sjrRequirePreciseResultSize = Nothing
, _sjrJobQuery = Nothing
, _sjrEnableBroadening = Nothing
, _sjrPageToken = Nothing
, _sjrCustomRankingInfo = Nothing
, _sjrDisableKeywordMatch = Nothing
, _sjrPageSize = Nothing
, _sjrHistogramFacets = Nothing
}
sjrRequestMetadata :: Lens' SearchJobsRequest (Maybe RequestMetadata)
sjrRequestMetadata
= lens _sjrRequestMetadata
(\ s a -> s{_sjrRequestMetadata = a})
sjrJobView :: Lens' SearchJobsRequest (Maybe SearchJobsRequestJobView)
sjrJobView
= lens _sjrJobView (\ s a -> s{_sjrJobView = a})
sjrOrderBy :: Lens' SearchJobsRequest (Maybe Text)
sjrOrderBy
= lens _sjrOrderBy (\ s a -> s{_sjrOrderBy = a})
sjrOffSet :: Lens' SearchJobsRequest (Maybe Int32)
sjrOffSet
= lens _sjrOffSet (\ s a -> s{_sjrOffSet = a}) .
mapping _Coerce
sjrSearchMode :: Lens' SearchJobsRequest (Maybe SearchJobsRequestSearchMode)
sjrSearchMode
= lens _sjrSearchMode
(\ s a -> s{_sjrSearchMode = a})
sjrDiversificationLevel :: Lens' SearchJobsRequest (Maybe SearchJobsRequestDiversificationLevel)
sjrDiversificationLevel
= lens _sjrDiversificationLevel
(\ s a -> s{_sjrDiversificationLevel = a})
sjrHistogramQueries :: Lens' SearchJobsRequest [HistogramQuery]
sjrHistogramQueries
= lens _sjrHistogramQueries
(\ s a -> s{_sjrHistogramQueries = a})
. _Default
. _Coerce
sjrRequirePreciseResultSize :: Lens' SearchJobsRequest (Maybe Bool)
sjrRequirePreciseResultSize
= lens _sjrRequirePreciseResultSize
(\ s a -> s{_sjrRequirePreciseResultSize = a})
sjrJobQuery :: Lens' SearchJobsRequest (Maybe JobQuery)
sjrJobQuery
= lens _sjrJobQuery (\ s a -> s{_sjrJobQuery = a})
sjrEnableBroadening :: Lens' SearchJobsRequest (Maybe Bool)
sjrEnableBroadening
= lens _sjrEnableBroadening
(\ s a -> s{_sjrEnableBroadening = a})
sjrPageToken :: Lens' SearchJobsRequest (Maybe Text)
sjrPageToken
= lens _sjrPageToken (\ s a -> s{_sjrPageToken = a})
sjrCustomRankingInfo :: Lens' SearchJobsRequest (Maybe CustomRankingInfo)
sjrCustomRankingInfo
= lens _sjrCustomRankingInfo
(\ s a -> s{_sjrCustomRankingInfo = a})
sjrDisableKeywordMatch :: Lens' SearchJobsRequest (Maybe Bool)
sjrDisableKeywordMatch
= lens _sjrDisableKeywordMatch
(\ s a -> s{_sjrDisableKeywordMatch = a})
sjrPageSize :: Lens' SearchJobsRequest (Maybe Int32)
sjrPageSize
= lens _sjrPageSize (\ s a -> s{_sjrPageSize = a}) .
mapping _Coerce
sjrHistogramFacets :: Lens' SearchJobsRequest (Maybe HistogramFacets)
sjrHistogramFacets
= lens _sjrHistogramFacets
(\ s a -> s{_sjrHistogramFacets = a})
instance FromJSON SearchJobsRequest where
parseJSON
= withObject "SearchJobsRequest"
(\ o ->
SearchJobsRequest' <$>
(o .:? "requestMetadata") <*> (o .:? "jobView") <*>
(o .:? "orderBy")
<*> (o .:? "offset")
<*> (o .:? "searchMode")
<*> (o .:? "diversificationLevel")
<*> (o .:? "histogramQueries" .!= mempty)
<*> (o .:? "requirePreciseResultSize")
<*> (o .:? "jobQuery")
<*> (o .:? "enableBroadening")
<*> (o .:? "pageToken")
<*> (o .:? "customRankingInfo")
<*> (o .:? "disableKeywordMatch")
<*> (o .:? "pageSize")
<*> (o .:? "histogramFacets"))
instance ToJSON SearchJobsRequest where
toJSON SearchJobsRequest'{..}
= object
(catMaybes
[("requestMetadata" .=) <$> _sjrRequestMetadata,
("jobView" .=) <$> _sjrJobView,
("orderBy" .=) <$> _sjrOrderBy,
("offset" .=) <$> _sjrOffSet,
("searchMode" .=) <$> _sjrSearchMode,
("diversificationLevel" .=) <$>
_sjrDiversificationLevel,
("histogramQueries" .=) <$> _sjrHistogramQueries,
("requirePreciseResultSize" .=) <$>
_sjrRequirePreciseResultSize,
("jobQuery" .=) <$> _sjrJobQuery,
("enableBroadening" .=) <$> _sjrEnableBroadening,
("pageToken" .=) <$> _sjrPageToken,
("customRankingInfo" .=) <$> _sjrCustomRankingInfo,
("disableKeywordMatch" .=) <$>
_sjrDisableKeywordMatch,
("pageSize" .=) <$> _sjrPageSize,
("histogramFacets" .=) <$> _sjrHistogramFacets])
newtype HistogramQueryResultHistogram = HistogramQueryResultHistogram'
{ _hqrhAddtional :: HashMap Text (Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
histogramQueryResultHistogram
:: HashMap Text Int64
-> HistogramQueryResultHistogram
histogramQueryResultHistogram pHqrhAddtional_ =
HistogramQueryResultHistogram'
{ _hqrhAddtional = _Coerce # pHqrhAddtional_
}
hqrhAddtional :: Lens' HistogramQueryResultHistogram (HashMap Text Int64)
hqrhAddtional
= lens _hqrhAddtional
(\ s a -> s{_hqrhAddtional = a})
. _Coerce
instance FromJSON HistogramQueryResultHistogram where
parseJSON
= withObject "HistogramQueryResultHistogram"
(\ o ->
HistogramQueryResultHistogram' <$>
(parseJSONObject o))
instance ToJSON HistogramQueryResultHistogram where
toJSON = toJSON . _hqrhAddtional
data HistogramQueryResult = HistogramQueryResult'
{ _hqrHistogramQuery :: !(Maybe Text)
, _hqrHistogram :: !(Maybe HistogramQueryResultHistogram)
} deriving (Eq,Show,Data,Typeable,Generic)
histogramQueryResult
:: HistogramQueryResult
histogramQueryResult =
HistogramQueryResult'
{ _hqrHistogramQuery = Nothing
, _hqrHistogram = Nothing
}
hqrHistogramQuery :: Lens' HistogramQueryResult (Maybe Text)
hqrHistogramQuery
= lens _hqrHistogramQuery
(\ s a -> s{_hqrHistogramQuery = a})
hqrHistogram :: Lens' HistogramQueryResult (Maybe HistogramQueryResultHistogram)
hqrHistogram
= lens _hqrHistogram (\ s a -> s{_hqrHistogram = a})
instance FromJSON HistogramQueryResult where
parseJSON
= withObject "HistogramQueryResult"
(\ o ->
HistogramQueryResult' <$>
(o .:? "histogramQuery") <*> (o .:? "histogram"))
instance ToJSON HistogramQueryResult where
toJSON HistogramQueryResult'{..}
= object
(catMaybes
[("histogramQuery" .=) <$> _hqrHistogramQuery,
("histogram" .=) <$> _hqrHistogram])
data CustomAttributeHistogramRequest = CustomAttributeHistogramRequest'
{ _cahrLongValueHistogramBucketingOption :: !(Maybe NumericBucketingOption)
, _cahrKey :: !(Maybe Text)
, _cahrStringValueHistogram :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
customAttributeHistogramRequest
:: CustomAttributeHistogramRequest
customAttributeHistogramRequest =
CustomAttributeHistogramRequest'
{ _cahrLongValueHistogramBucketingOption = Nothing
, _cahrKey = Nothing
, _cahrStringValueHistogram = Nothing
}
cahrLongValueHistogramBucketingOption :: Lens' CustomAttributeHistogramRequest (Maybe NumericBucketingOption)
cahrLongValueHistogramBucketingOption
= lens _cahrLongValueHistogramBucketingOption
(\ s a ->
s{_cahrLongValueHistogramBucketingOption = a})
cahrKey :: Lens' CustomAttributeHistogramRequest (Maybe Text)
cahrKey = lens _cahrKey (\ s a -> s{_cahrKey = a})
cahrStringValueHistogram :: Lens' CustomAttributeHistogramRequest (Maybe Bool)
cahrStringValueHistogram
= lens _cahrStringValueHistogram
(\ s a -> s{_cahrStringValueHistogram = a})
instance FromJSON CustomAttributeHistogramRequest
where
parseJSON
= withObject "CustomAttributeHistogramRequest"
(\ o ->
CustomAttributeHistogramRequest' <$>
(o .:? "longValueHistogramBucketingOption") <*>
(o .:? "key")
<*> (o .:? "stringValueHistogram"))
instance ToJSON CustomAttributeHistogramRequest where
toJSON CustomAttributeHistogramRequest'{..}
= object
(catMaybes
[("longValueHistogramBucketingOption" .=) <$>
_cahrLongValueHistogramBucketingOption,
("key" .=) <$> _cahrKey,
("stringValueHistogram" .=) <$>
_cahrStringValueHistogram])
newtype ResponseMetadata = ResponseMetadata'
{ _rmRequestId :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
responseMetadata
:: ResponseMetadata
responseMetadata =
ResponseMetadata'
{ _rmRequestId = Nothing
}
rmRequestId :: Lens' ResponseMetadata (Maybe Text)
rmRequestId
= lens _rmRequestId (\ s a -> s{_rmRequestId = a})
instance FromJSON ResponseMetadata where
parseJSON
= withObject "ResponseMetadata"
(\ o -> ResponseMetadata' <$> (o .:? "requestId"))
instance ToJSON ResponseMetadata where
toJSON ResponseMetadata'{..}
= object
(catMaybes [("requestId" .=) <$> _rmRequestId])
data CommuteInfo = CommuteInfo'
{ _ciTravelDuration :: !(Maybe GDuration)
, _ciJobLocation :: !(Maybe Location)
} deriving (Eq,Show,Data,Typeable,Generic)
commuteInfo
:: CommuteInfo
commuteInfo =
CommuteInfo'
{ _ciTravelDuration = Nothing
, _ciJobLocation = Nothing
}
ciTravelDuration :: Lens' CommuteInfo (Maybe Scientific)
ciTravelDuration
= lens _ciTravelDuration
(\ s a -> s{_ciTravelDuration = a})
. mapping _GDuration
ciJobLocation :: Lens' CommuteInfo (Maybe Location)
ciJobLocation
= lens _ciJobLocation
(\ s a -> s{_ciJobLocation = a})
instance FromJSON CommuteInfo where
parseJSON
= withObject "CommuteInfo"
(\ o ->
CommuteInfo' <$>
(o .:? "travelDuration") <*> (o .:? "jobLocation"))
instance ToJSON CommuteInfo where
toJSON CommuteInfo'{..}
= object
(catMaybes
[("travelDuration" .=) <$> _ciTravelDuration,
("jobLocation" .=) <$> _ciJobLocation])
data CustomAttributeHistogramResult = CustomAttributeHistogramResult'
{ _cStringValueHistogramResult :: !(Maybe CustomAttributeHistogramResultStringValueHistogramResult)
, _cLongValueHistogramResult :: !(Maybe NumericBucketingResult)
, _cKey :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
customAttributeHistogramResult
:: CustomAttributeHistogramResult
customAttributeHistogramResult =
CustomAttributeHistogramResult'
{ _cStringValueHistogramResult = Nothing
, _cLongValueHistogramResult = Nothing
, _cKey = Nothing
}
cStringValueHistogramResult :: Lens' CustomAttributeHistogramResult (Maybe CustomAttributeHistogramResultStringValueHistogramResult)
cStringValueHistogramResult
= lens _cStringValueHistogramResult
(\ s a -> s{_cStringValueHistogramResult = a})
cLongValueHistogramResult :: Lens' CustomAttributeHistogramResult (Maybe NumericBucketingResult)
cLongValueHistogramResult
= lens _cLongValueHistogramResult
(\ s a -> s{_cLongValueHistogramResult = a})
cKey :: Lens' CustomAttributeHistogramResult (Maybe Text)
cKey = lens _cKey (\ s a -> s{_cKey = a})
instance FromJSON CustomAttributeHistogramResult
where
parseJSON
= withObject "CustomAttributeHistogramResult"
(\ o ->
CustomAttributeHistogramResult' <$>
(o .:? "stringValueHistogramResult") <*>
(o .:? "longValueHistogramResult")
<*> (o .:? "key"))
instance ToJSON CustomAttributeHistogramResult where
toJSON CustomAttributeHistogramResult'{..}
= object
(catMaybes
[("stringValueHistogramResult" .=) <$>
_cStringValueHistogramResult,
("longValueHistogramResult" .=) <$>
_cLongValueHistogramResult,
("key" .=) <$> _cKey])
data BucketRange = BucketRange'
{ _brTo :: !(Maybe (Textual Double))
, _brFrom :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
bucketRange
:: BucketRange
bucketRange =
BucketRange'
{ _brTo = Nothing
, _brFrom = Nothing
}
brTo :: Lens' BucketRange (Maybe Double)
brTo
= lens _brTo (\ s a -> s{_brTo = a}) .
mapping _Coerce
brFrom :: Lens' BucketRange (Maybe Double)
brFrom
= lens _brFrom (\ s a -> s{_brFrom = a}) .
mapping _Coerce
instance FromJSON BucketRange where
parseJSON
= withObject "BucketRange"
(\ o ->
BucketRange' <$> (o .:? "to") <*> (o .:? "from"))
instance ToJSON BucketRange where
toJSON BucketRange'{..}
= object
(catMaybes
[("to" .=) <$> _brTo, ("from" .=) <$> _brFrom])
data NumericBucketingResult = NumericBucketingResult'
{ _nbrMaxValue :: !(Maybe (Textual Double))
, _nbrCounts :: !(Maybe [BucketizedCount])
, _nbrMinValue :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
numericBucketingResult
:: NumericBucketingResult
numericBucketingResult =
NumericBucketingResult'
{ _nbrMaxValue = Nothing
, _nbrCounts = Nothing
, _nbrMinValue = Nothing
}
nbrMaxValue :: Lens' NumericBucketingResult (Maybe Double)
nbrMaxValue
= lens _nbrMaxValue (\ s a -> s{_nbrMaxValue = a}) .
mapping _Coerce
nbrCounts :: Lens' NumericBucketingResult [BucketizedCount]
nbrCounts
= lens _nbrCounts (\ s a -> s{_nbrCounts = a}) .
_Default
. _Coerce
nbrMinValue :: Lens' NumericBucketingResult (Maybe Double)
nbrMinValue
= lens _nbrMinValue (\ s a -> s{_nbrMinValue = a}) .
mapping _Coerce
instance FromJSON NumericBucketingResult where
parseJSON
= withObject "NumericBucketingResult"
(\ o ->
NumericBucketingResult' <$>
(o .:? "maxValue") <*> (o .:? "counts" .!= mempty)
<*> (o .:? "minValue"))
instance ToJSON NumericBucketingResult where
toJSON NumericBucketingResult'{..}
= object
(catMaybes
[("maxValue" .=) <$> _nbrMaxValue,
("counts" .=) <$> _nbrCounts,
("minValue" .=) <$> _nbrMinValue])
data JobDerivedInfo = JobDerivedInfo'
{ _jdiJobCategories :: !(Maybe [Text])
, _jdiLocations :: !(Maybe [Location])
} deriving (Eq,Show,Data,Typeable,Generic)
jobDerivedInfo
:: JobDerivedInfo
jobDerivedInfo =
JobDerivedInfo'
{ _jdiJobCategories = Nothing
, _jdiLocations = Nothing
}
jdiJobCategories :: Lens' JobDerivedInfo [Text]
jdiJobCategories
= lens _jdiJobCategories
(\ s a -> s{_jdiJobCategories = a})
. _Default
. _Coerce
jdiLocations :: Lens' JobDerivedInfo [Location]
jdiLocations
= lens _jdiLocations (\ s a -> s{_jdiLocations = a})
. _Default
. _Coerce
instance FromJSON JobDerivedInfo where
parseJSON
= withObject "JobDerivedInfo"
(\ o ->
JobDerivedInfo' <$>
(o .:? "jobCategories" .!= mempty) <*>
(o .:? "locations" .!= mempty))
instance ToJSON JobDerivedInfo where
toJSON JobDerivedInfo'{..}
= object
(catMaybes
[("jobCategories" .=) <$> _jdiJobCategories,
("locations" .=) <$> _jdiLocations])
newtype CompanyDerivedInfo = CompanyDerivedInfo'
{ _cdiHeadquartersLocation :: Maybe Location
} deriving (Eq,Show,Data,Typeable,Generic)
companyDerivedInfo
:: CompanyDerivedInfo
companyDerivedInfo =
CompanyDerivedInfo'
{ _cdiHeadquartersLocation = Nothing
}
cdiHeadquartersLocation :: Lens' CompanyDerivedInfo (Maybe Location)
cdiHeadquartersLocation
= lens _cdiHeadquartersLocation
(\ s a -> s{_cdiHeadquartersLocation = a})
instance FromJSON CompanyDerivedInfo where
parseJSON
= withObject "CompanyDerivedInfo"
(\ o ->
CompanyDerivedInfo' <$>
(o .:? "headquartersLocation"))
instance ToJSON CompanyDerivedInfo where
toJSON CompanyDerivedInfo'{..}
= object
(catMaybes
[("headquartersLocation" .=) <$>
_cdiHeadquartersLocation])
data CompensationFilter = CompensationFilter'
{ _cfIncludeJobsWithUnspecifiedCompensationRange :: !(Maybe Bool)
, _cfRange :: !(Maybe CompensationRange)
, _cfUnits :: !(Maybe [Text])
, _cfType :: !(Maybe CompensationFilterType)
} deriving (Eq,Show,Data,Typeable,Generic)
compensationFilter
:: CompensationFilter
compensationFilter =
CompensationFilter'
{ _cfIncludeJobsWithUnspecifiedCompensationRange = Nothing
, _cfRange = Nothing
, _cfUnits = Nothing
, _cfType = Nothing
}
cfIncludeJobsWithUnspecifiedCompensationRange :: Lens' CompensationFilter (Maybe Bool)
cfIncludeJobsWithUnspecifiedCompensationRange
= lens _cfIncludeJobsWithUnspecifiedCompensationRange
(\ s a ->
s{_cfIncludeJobsWithUnspecifiedCompensationRange =
a})
cfRange :: Lens' CompensationFilter (Maybe CompensationRange)
cfRange = lens _cfRange (\ s a -> s{_cfRange = a})
cfUnits :: Lens' CompensationFilter [Text]
cfUnits
= lens _cfUnits (\ s a -> s{_cfUnits = a}) . _Default
. _Coerce
cfType :: Lens' CompensationFilter (Maybe CompensationFilterType)
cfType = lens _cfType (\ s a -> s{_cfType = a})
instance FromJSON CompensationFilter where
parseJSON
= withObject "CompensationFilter"
(\ o ->
CompensationFilter' <$>
(o .:? "includeJobsWithUnspecifiedCompensationRange")
<*> (o .:? "range")
<*> (o .:? "units" .!= mempty)
<*> (o .:? "type"))
instance ToJSON CompensationFilter where
toJSON CompensationFilter'{..}
= object
(catMaybes
[("includeJobsWithUnspecifiedCompensationRange" .=)
<$> _cfIncludeJobsWithUnspecifiedCompensationRange,
("range" .=) <$> _cfRange, ("units" .=) <$> _cfUnits,
("type" .=) <$> _cfType])
data Company = Company'
{ _cHiringAgency :: !(Maybe Bool)
, _cCareerSiteURI :: !(Maybe Text)
, _cEeoText :: !(Maybe Text)
, _cSize :: !(Maybe CompanySize)
, _cWebsiteURI :: !(Maybe Text)
, _cSuspended :: !(Maybe Bool)
, _cKeywordSearchableJobCustomAttributes :: !(Maybe [Text])
, _cImageURI :: !(Maybe Text)
, _cHeadquartersAddress :: !(Maybe Text)
, _cName :: !(Maybe Text)
, _cDisplayName :: !(Maybe Text)
, _cExternalId :: !(Maybe Text)
, _cDerivedInfo :: !(Maybe CompanyDerivedInfo)
} deriving (Eq,Show,Data,Typeable,Generic)
company
:: Company
company =
Company'
{ _cHiringAgency = Nothing
, _cCareerSiteURI = Nothing
, _cEeoText = Nothing
, _cSize = Nothing
, _cWebsiteURI = Nothing
, _cSuspended = Nothing
, _cKeywordSearchableJobCustomAttributes = Nothing
, _cImageURI = Nothing
, _cHeadquartersAddress = Nothing
, _cName = Nothing
, _cDisplayName = Nothing
, _cExternalId = Nothing
, _cDerivedInfo = Nothing
}
cHiringAgency :: Lens' Company (Maybe Bool)
cHiringAgency
= lens _cHiringAgency
(\ s a -> s{_cHiringAgency = a})
cCareerSiteURI :: Lens' Company (Maybe Text)
cCareerSiteURI
= lens _cCareerSiteURI
(\ s a -> s{_cCareerSiteURI = a})
cEeoText :: Lens' Company (Maybe Text)
cEeoText = lens _cEeoText (\ s a -> s{_cEeoText = a})
cSize :: Lens' Company (Maybe CompanySize)
cSize = lens _cSize (\ s a -> s{_cSize = a})
cWebsiteURI :: Lens' Company (Maybe Text)
cWebsiteURI
= lens _cWebsiteURI (\ s a -> s{_cWebsiteURI = a})
cSuspended :: Lens' Company (Maybe Bool)
cSuspended
= lens _cSuspended (\ s a -> s{_cSuspended = a})
cKeywordSearchableJobCustomAttributes :: Lens' Company [Text]
cKeywordSearchableJobCustomAttributes
= lens _cKeywordSearchableJobCustomAttributes
(\ s a ->
s{_cKeywordSearchableJobCustomAttributes = a})
. _Default
. _Coerce
cImageURI :: Lens' Company (Maybe Text)
cImageURI
= lens _cImageURI (\ s a -> s{_cImageURI = a})
cHeadquartersAddress :: Lens' Company (Maybe Text)
cHeadquartersAddress
= lens _cHeadquartersAddress
(\ s a -> s{_cHeadquartersAddress = a})
cName :: Lens' Company (Maybe Text)
cName = lens _cName (\ s a -> s{_cName = a})
cDisplayName :: Lens' Company (Maybe Text)
cDisplayName
= lens _cDisplayName (\ s a -> s{_cDisplayName = a})
cExternalId :: Lens' Company (Maybe Text)
cExternalId
= lens _cExternalId (\ s a -> s{_cExternalId = a})
cDerivedInfo :: Lens' Company (Maybe CompanyDerivedInfo)
cDerivedInfo
= lens _cDerivedInfo (\ s a -> s{_cDerivedInfo = a})
instance FromJSON Company where
parseJSON
= withObject "Company"
(\ o ->
Company' <$>
(o .:? "hiringAgency") <*> (o .:? "careerSiteUri")
<*> (o .:? "eeoText")
<*> (o .:? "size")
<*> (o .:? "websiteUri")
<*> (o .:? "suspended")
<*>
(o .:? "keywordSearchableJobCustomAttributes" .!=
mempty)
<*> (o .:? "imageUri")
<*> (o .:? "headquartersAddress")
<*> (o .:? "name")
<*> (o .:? "displayName")
<*> (o .:? "externalId")
<*> (o .:? "derivedInfo"))
instance ToJSON Company where
toJSON Company'{..}
= object
(catMaybes
[("hiringAgency" .=) <$> _cHiringAgency,
("careerSiteUri" .=) <$> _cCareerSiteURI,
("eeoText" .=) <$> _cEeoText, ("size" .=) <$> _cSize,
("websiteUri" .=) <$> _cWebsiteURI,
("suspended" .=) <$> _cSuspended,
("keywordSearchableJobCustomAttributes" .=) <$>
_cKeywordSearchableJobCustomAttributes,
("imageUri" .=) <$> _cImageURI,
("headquartersAddress" .=) <$> _cHeadquartersAddress,
("name" .=) <$> _cName,
("displayName" .=) <$> _cDisplayName,
("externalId" .=) <$> _cExternalId,
("derivedInfo" .=) <$> _cDerivedInfo])
data CustomAttribute = CustomAttribute'
{ _caLongValues :: !(Maybe [Textual Int64])
, _caFilterable :: !(Maybe Bool)
, _caStringValues :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
customAttribute
:: CustomAttribute
customAttribute =
CustomAttribute'
{ _caLongValues = Nothing
, _caFilterable = Nothing
, _caStringValues = Nothing
}
caLongValues :: Lens' CustomAttribute [Int64]
caLongValues
= lens _caLongValues (\ s a -> s{_caLongValues = a})
. _Default
. _Coerce
caFilterable :: Lens' CustomAttribute (Maybe Bool)
caFilterable
= lens _caFilterable (\ s a -> s{_caFilterable = a})
caStringValues :: Lens' CustomAttribute [Text]
caStringValues
= lens _caStringValues
(\ s a -> s{_caStringValues = a})
. _Default
. _Coerce
instance FromJSON CustomAttribute where
parseJSON
= withObject "CustomAttribute"
(\ o ->
CustomAttribute' <$>
(o .:? "longValues" .!= mempty) <*>
(o .:? "filterable")
<*> (o .:? "stringValues" .!= mempty))
instance ToJSON CustomAttribute where
toJSON CustomAttribute'{..}
= object
(catMaybes
[("longValues" .=) <$> _caLongValues,
("filterable" .=) <$> _caFilterable,
("stringValues" .=) <$> _caStringValues])
data Job = Job'
{ _jDePartment :: !(Maybe Text)
, _jApplicationInfo :: !(Maybe ApplicationInfo)
, _jLanguageCode :: !(Maybe Text)
, _jCompensationInfo :: !(Maybe CompensationInfo)
, _jResponsibilities :: !(Maybe Text)
, _jJobStartTime :: !(Maybe DateTime')
, _jPromotionValue :: !(Maybe (Textual Int32))
, _jCompanyName :: !(Maybe Text)
, _jAddresses :: !(Maybe [Text])
, _jJobBenefits :: !(Maybe [Text])
, _jVisibility :: !(Maybe JobVisibility)
, _jJobLevel :: !(Maybe JobJobLevel)
, _jPostingUpdateTime :: !(Maybe DateTime')
, _jCustomAttributes :: !(Maybe JobCustomAttributes)
, _jPostingPublishTime :: !(Maybe DateTime')
, _jName :: !(Maybe Text)
, _jDegreeTypes :: !(Maybe [Text])
, _jQualifications :: !(Maybe Text)
, _jCompanyDisplayName :: !(Maybe Text)
, _jIncentives :: !(Maybe Text)
, _jJobEndTime :: !(Maybe DateTime')
, _jPostingRegion :: !(Maybe JobPostingRegion)
, _jTitle :: !(Maybe Text)
, _jEmploymentTypes :: !(Maybe [Text])
, _jDerivedInfo :: !(Maybe JobDerivedInfo)
, _jProcessingOptions :: !(Maybe ProcessingOptions)
, _jPostingExpireTime :: !(Maybe DateTime')
, _jDescription :: !(Maybe Text)
, _jRequisitionId :: !(Maybe Text)
, _jPostingCreateTime :: !(Maybe DateTime')
} deriving (Eq,Show,Data,Typeable,Generic)
job
:: Job
job =
Job'
{ _jDePartment = Nothing
, _jApplicationInfo = Nothing
, _jLanguageCode = Nothing
, _jCompensationInfo = Nothing
, _jResponsibilities = Nothing
, _jJobStartTime = Nothing
, _jPromotionValue = Nothing
, _jCompanyName = Nothing
, _jAddresses = Nothing
, _jJobBenefits = Nothing
, _jVisibility = Nothing
, _jJobLevel = Nothing
, _jPostingUpdateTime = Nothing
, _jCustomAttributes = Nothing
, _jPostingPublishTime = Nothing
, _jName = Nothing
, _jDegreeTypes = Nothing
, _jQualifications = Nothing
, _jCompanyDisplayName = Nothing
, _jIncentives = Nothing
, _jJobEndTime = Nothing
, _jPostingRegion = Nothing
, _jTitle = Nothing
, _jEmploymentTypes = Nothing
, _jDerivedInfo = Nothing
, _jProcessingOptions = Nothing
, _jPostingExpireTime = Nothing
, _jDescription = Nothing
, _jRequisitionId = Nothing
, _jPostingCreateTime = Nothing
}
jDePartment :: Lens' Job (Maybe Text)
jDePartment
= lens _jDePartment (\ s a -> s{_jDePartment = a})
jApplicationInfo :: Lens' Job (Maybe ApplicationInfo)
jApplicationInfo
= lens _jApplicationInfo
(\ s a -> s{_jApplicationInfo = a})
jLanguageCode :: Lens' Job (Maybe Text)
jLanguageCode
= lens _jLanguageCode
(\ s a -> s{_jLanguageCode = a})
jCompensationInfo :: Lens' Job (Maybe CompensationInfo)
jCompensationInfo
= lens _jCompensationInfo
(\ s a -> s{_jCompensationInfo = a})
jResponsibilities :: Lens' Job (Maybe Text)
jResponsibilities
= lens _jResponsibilities
(\ s a -> s{_jResponsibilities = a})
jJobStartTime :: Lens' Job (Maybe UTCTime)
jJobStartTime
= lens _jJobStartTime
(\ s a -> s{_jJobStartTime = a})
. mapping _DateTime
jPromotionValue :: Lens' Job (Maybe Int32)
jPromotionValue
= lens _jPromotionValue
(\ s a -> s{_jPromotionValue = a})
. mapping _Coerce
jCompanyName :: Lens' Job (Maybe Text)
jCompanyName
= lens _jCompanyName (\ s a -> s{_jCompanyName = a})
jAddresses :: Lens' Job [Text]
jAddresses
= lens _jAddresses (\ s a -> s{_jAddresses = a}) .
_Default
. _Coerce
jJobBenefits :: Lens' Job [Text]
jJobBenefits
= lens _jJobBenefits (\ s a -> s{_jJobBenefits = a})
. _Default
. _Coerce
jVisibility :: Lens' Job (Maybe JobVisibility)
jVisibility
= lens _jVisibility (\ s a -> s{_jVisibility = a})
jJobLevel :: Lens' Job (Maybe JobJobLevel)
jJobLevel
= lens _jJobLevel (\ s a -> s{_jJobLevel = a})
jPostingUpdateTime :: Lens' Job (Maybe UTCTime)
jPostingUpdateTime
= lens _jPostingUpdateTime
(\ s a -> s{_jPostingUpdateTime = a})
. mapping _DateTime
jCustomAttributes :: Lens' Job (Maybe JobCustomAttributes)
jCustomAttributes
= lens _jCustomAttributes
(\ s a -> s{_jCustomAttributes = a})
jPostingPublishTime :: Lens' Job (Maybe UTCTime)
jPostingPublishTime
= lens _jPostingPublishTime
(\ s a -> s{_jPostingPublishTime = a})
. mapping _DateTime
jName :: Lens' Job (Maybe Text)
jName = lens _jName (\ s a -> s{_jName = a})
jDegreeTypes :: Lens' Job [Text]
jDegreeTypes
= lens _jDegreeTypes (\ s a -> s{_jDegreeTypes = a})
. _Default
. _Coerce
jQualifications :: Lens' Job (Maybe Text)
jQualifications
= lens _jQualifications
(\ s a -> s{_jQualifications = a})
jCompanyDisplayName :: Lens' Job (Maybe Text)
jCompanyDisplayName
= lens _jCompanyDisplayName
(\ s a -> s{_jCompanyDisplayName = a})
jIncentives :: Lens' Job (Maybe Text)
jIncentives
= lens _jIncentives (\ s a -> s{_jIncentives = a})
jJobEndTime :: Lens' Job (Maybe UTCTime)
jJobEndTime
= lens _jJobEndTime (\ s a -> s{_jJobEndTime = a}) .
mapping _DateTime
jPostingRegion :: Lens' Job (Maybe JobPostingRegion)
jPostingRegion
= lens _jPostingRegion
(\ s a -> s{_jPostingRegion = a})
jTitle :: Lens' Job (Maybe Text)
jTitle = lens _jTitle (\ s a -> s{_jTitle = a})
jEmploymentTypes :: Lens' Job [Text]
jEmploymentTypes
= lens _jEmploymentTypes
(\ s a -> s{_jEmploymentTypes = a})
. _Default
. _Coerce
jDerivedInfo :: Lens' Job (Maybe JobDerivedInfo)
jDerivedInfo
= lens _jDerivedInfo (\ s a -> s{_jDerivedInfo = a})
jProcessingOptions :: Lens' Job (Maybe ProcessingOptions)
jProcessingOptions
= lens _jProcessingOptions
(\ s a -> s{_jProcessingOptions = a})
jPostingExpireTime :: Lens' Job (Maybe UTCTime)
jPostingExpireTime
= lens _jPostingExpireTime
(\ s a -> s{_jPostingExpireTime = a})
. mapping _DateTime
jDescription :: Lens' Job (Maybe Text)
jDescription
= lens _jDescription (\ s a -> s{_jDescription = a})
jRequisitionId :: Lens' Job (Maybe Text)
jRequisitionId
= lens _jRequisitionId
(\ s a -> s{_jRequisitionId = a})
jPostingCreateTime :: Lens' Job (Maybe UTCTime)
jPostingCreateTime
= lens _jPostingCreateTime
(\ s a -> s{_jPostingCreateTime = a})
. mapping _DateTime
instance FromJSON Job where
parseJSON
= withObject "Job"
(\ o ->
Job' <$>
(o .:? "department") <*> (o .:? "applicationInfo")
<*> (o .:? "languageCode")
<*> (o .:? "compensationInfo")
<*> (o .:? "responsibilities")
<*> (o .:? "jobStartTime")
<*> (o .:? "promotionValue")
<*> (o .:? "companyName")
<*> (o .:? "addresses" .!= mempty)
<*> (o .:? "jobBenefits" .!= mempty)
<*> (o .:? "visibility")
<*> (o .:? "jobLevel")
<*> (o .:? "postingUpdateTime")
<*> (o .:? "customAttributes")
<*> (o .:? "postingPublishTime")
<*> (o .:? "name")
<*> (o .:? "degreeTypes" .!= mempty)
<*> (o .:? "qualifications")
<*> (o .:? "companyDisplayName")
<*> (o .:? "incentives")
<*> (o .:? "jobEndTime")
<*> (o .:? "postingRegion")
<*> (o .:? "title")
<*> (o .:? "employmentTypes" .!= mempty)
<*> (o .:? "derivedInfo")
<*> (o .:? "processingOptions")
<*> (o .:? "postingExpireTime")
<*> (o .:? "description")
<*> (o .:? "requisitionId")
<*> (o .:? "postingCreateTime"))
instance ToJSON Job where
toJSON Job'{..}
= object
(catMaybes
[("department" .=) <$> _jDePartment,
("applicationInfo" .=) <$> _jApplicationInfo,
("languageCode" .=) <$> _jLanguageCode,
("compensationInfo" .=) <$> _jCompensationInfo,
("responsibilities" .=) <$> _jResponsibilities,
("jobStartTime" .=) <$> _jJobStartTime,
("promotionValue" .=) <$> _jPromotionValue,
("companyName" .=) <$> _jCompanyName,
("addresses" .=) <$> _jAddresses,
("jobBenefits" .=) <$> _jJobBenefits,
("visibility" .=) <$> _jVisibility,
("jobLevel" .=) <$> _jJobLevel,
("postingUpdateTime" .=) <$> _jPostingUpdateTime,
("customAttributes" .=) <$> _jCustomAttributes,
("postingPublishTime" .=) <$> _jPostingPublishTime,
("name" .=) <$> _jName,
("degreeTypes" .=) <$> _jDegreeTypes,
("qualifications" .=) <$> _jQualifications,
("companyDisplayName" .=) <$> _jCompanyDisplayName,
("incentives" .=) <$> _jIncentives,
("jobEndTime" .=) <$> _jJobEndTime,
("postingRegion" .=) <$> _jPostingRegion,
("title" .=) <$> _jTitle,
("employmentTypes" .=) <$> _jEmploymentTypes,
("derivedInfo" .=) <$> _jDerivedInfo,
("processingOptions" .=) <$> _jProcessingOptions,
("postingExpireTime" .=) <$> _jPostingExpireTime,
("description" .=) <$> _jDescription,
("requisitionId" .=) <$> _jRequisitionId,
("postingCreateTime" .=) <$> _jPostingCreateTime])
data HistogramResults = HistogramResults'
{ _hrSimpleHistogramResults :: !(Maybe [HistogramResult])
, _hrCustomAttributeHistogramResults :: !(Maybe [CustomAttributeHistogramResult])
, _hrCompensationHistogramResults :: !(Maybe [CompensationHistogramResult])
} deriving (Eq,Show,Data,Typeable,Generic)
histogramResults
:: HistogramResults
histogramResults =
HistogramResults'
{ _hrSimpleHistogramResults = Nothing
, _hrCustomAttributeHistogramResults = Nothing
, _hrCompensationHistogramResults = Nothing
}
hrSimpleHistogramResults :: Lens' HistogramResults [HistogramResult]
hrSimpleHistogramResults
= lens _hrSimpleHistogramResults
(\ s a -> s{_hrSimpleHistogramResults = a})
. _Default
. _Coerce
hrCustomAttributeHistogramResults :: Lens' HistogramResults [CustomAttributeHistogramResult]
hrCustomAttributeHistogramResults
= lens _hrCustomAttributeHistogramResults
(\ s a -> s{_hrCustomAttributeHistogramResults = a})
. _Default
. _Coerce
hrCompensationHistogramResults :: Lens' HistogramResults [CompensationHistogramResult]
hrCompensationHistogramResults
= lens _hrCompensationHistogramResults
(\ s a -> s{_hrCompensationHistogramResults = a})
. _Default
. _Coerce
instance FromJSON HistogramResults where
parseJSON
= withObject "HistogramResults"
(\ o ->
HistogramResults' <$>
(o .:? "simpleHistogramResults" .!= mempty) <*>
(o .:? "customAttributeHistogramResults" .!= mempty)
<*>
(o .:? "compensationHistogramResults" .!= mempty))
instance ToJSON HistogramResults where
toJSON HistogramResults'{..}
= object
(catMaybes
[("simpleHistogramResults" .=) <$>
_hrSimpleHistogramResults,
("customAttributeHistogramResults" .=) <$>
_hrCustomAttributeHistogramResults,
("compensationHistogramResults" .=) <$>
_hrCompensationHistogramResults])
data LocationFilter = LocationFilter'
{ _lfLatLng :: !(Maybe LatLng)
, _lfDistanceInMiles :: !(Maybe (Textual Double))
, _lfRegionCode :: !(Maybe Text)
, _lfTelecommutePreference :: !(Maybe LocationFilterTelecommutePreference)
, _lfAddress :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
locationFilter
:: LocationFilter
locationFilter =
LocationFilter'
{ _lfLatLng = Nothing
, _lfDistanceInMiles = Nothing
, _lfRegionCode = Nothing
, _lfTelecommutePreference = Nothing
, _lfAddress = Nothing
}
lfLatLng :: Lens' LocationFilter (Maybe LatLng)
lfLatLng = lens _lfLatLng (\ s a -> s{_lfLatLng = a})
lfDistanceInMiles :: Lens' LocationFilter (Maybe Double)
lfDistanceInMiles
= lens _lfDistanceInMiles
(\ s a -> s{_lfDistanceInMiles = a})
. mapping _Coerce
lfRegionCode :: Lens' LocationFilter (Maybe Text)
lfRegionCode
= lens _lfRegionCode (\ s a -> s{_lfRegionCode = a})
lfTelecommutePreference :: Lens' LocationFilter (Maybe LocationFilterTelecommutePreference)
lfTelecommutePreference
= lens _lfTelecommutePreference
(\ s a -> s{_lfTelecommutePreference = a})
lfAddress :: Lens' LocationFilter (Maybe Text)
lfAddress
= lens _lfAddress (\ s a -> s{_lfAddress = a})
instance FromJSON LocationFilter where
parseJSON
= withObject "LocationFilter"
(\ o ->
LocationFilter' <$>
(o .:? "latLng") <*> (o .:? "distanceInMiles") <*>
(o .:? "regionCode")
<*> (o .:? "telecommutePreference")
<*> (o .:? "address"))
instance ToJSON LocationFilter where
toJSON LocationFilter'{..}
= object
(catMaybes
[("latLng" .=) <$> _lfLatLng,
("distanceInMiles" .=) <$> _lfDistanceInMiles,
("regionCode" .=) <$> _lfRegionCode,
("telecommutePreference" .=) <$>
_lfTelecommutePreference,
("address" .=) <$> _lfAddress])
data ListJobsResponse = ListJobsResponse'
{ _ljrNextPageToken :: !(Maybe Text)
, _ljrJobs :: !(Maybe [Job])
, _ljrMetadata :: !(Maybe ResponseMetadata)
} deriving (Eq,Show,Data,Typeable,Generic)
listJobsResponse
:: ListJobsResponse
listJobsResponse =
ListJobsResponse'
{ _ljrNextPageToken = Nothing
, _ljrJobs = Nothing
, _ljrMetadata = Nothing
}
ljrNextPageToken :: Lens' ListJobsResponse (Maybe Text)
ljrNextPageToken
= lens _ljrNextPageToken
(\ s a -> s{_ljrNextPageToken = a})
ljrJobs :: Lens' ListJobsResponse [Job]
ljrJobs
= lens _ljrJobs (\ s a -> s{_ljrJobs = a}) . _Default
. _Coerce
ljrMetadata :: Lens' ListJobsResponse (Maybe ResponseMetadata)
ljrMetadata
= lens _ljrMetadata (\ s a -> s{_ljrMetadata = a})
instance FromJSON ListJobsResponse where
parseJSON
= withObject "ListJobsResponse"
(\ o ->
ListJobsResponse' <$>
(o .:? "nextPageToken") <*> (o .:? "jobs" .!= mempty)
<*> (o .:? "metadata"))
instance ToJSON ListJobsResponse where
toJSON ListJobsResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _ljrNextPageToken,
("jobs" .=) <$> _ljrJobs,
("metadata" .=) <$> _ljrMetadata])
data CompensationHistogramResult = CompensationHistogramResult'
{ _cResult :: !(Maybe NumericBucketingResult)
, _cType :: !(Maybe CompensationHistogramResultType)
} deriving (Eq,Show,Data,Typeable,Generic)
compensationHistogramResult
:: CompensationHistogramResult
compensationHistogramResult =
CompensationHistogramResult'
{ _cResult = Nothing
, _cType = Nothing
}
cResult :: Lens' CompensationHistogramResult (Maybe NumericBucketingResult)
cResult = lens _cResult (\ s a -> s{_cResult = a})
cType :: Lens' CompensationHistogramResult (Maybe CompensationHistogramResultType)
cType = lens _cType (\ s a -> s{_cType = a})
instance FromJSON CompensationHistogramResult where
parseJSON
= withObject "CompensationHistogramResult"
(\ o ->
CompensationHistogramResult' <$>
(o .:? "result") <*> (o .:? "type"))
instance ToJSON CompensationHistogramResult where
toJSON CompensationHistogramResult'{..}
= object
(catMaybes
[("result" .=) <$> _cResult, ("type" .=) <$> _cType])
data JobQuery = JobQuery'
{ _jqLanguageCodes :: !(Maybe [Text])
, _jqDisableSpellCheck :: !(Maybe Bool)
, _jqCustomAttributeFilter :: !(Maybe Text)
, _jqCommuteFilter :: !(Maybe CommuteFilter)
, _jqPublishTimeRange :: !(Maybe TimestampRange)
, _jqLocationFilters :: !(Maybe [LocationFilter])
, _jqCompanyDisplayNames :: !(Maybe [Text])
, _jqJobCategories :: !(Maybe [Text])
, _jqCompensationFilter :: !(Maybe CompensationFilter)
, _jqQuery :: !(Maybe Text)
, _jqCompanyNames :: !(Maybe [Text])
, _jqEmploymentTypes :: !(Maybe [Text])
, _jqExcludedJobs :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
jobQuery
:: JobQuery
jobQuery =
JobQuery'
{ _jqLanguageCodes = Nothing
, _jqDisableSpellCheck = Nothing
, _jqCustomAttributeFilter = Nothing
, _jqCommuteFilter = Nothing
, _jqPublishTimeRange = Nothing
, _jqLocationFilters = Nothing
, _jqCompanyDisplayNames = Nothing
, _jqJobCategories = Nothing
, _jqCompensationFilter = Nothing
, _jqQuery = Nothing
, _jqCompanyNames = Nothing
, _jqEmploymentTypes = Nothing
, _jqExcludedJobs = Nothing
}
jqLanguageCodes :: Lens' JobQuery [Text]
jqLanguageCodes
= lens _jqLanguageCodes
(\ s a -> s{_jqLanguageCodes = a})
. _Default
. _Coerce
jqDisableSpellCheck :: Lens' JobQuery (Maybe Bool)
jqDisableSpellCheck
= lens _jqDisableSpellCheck
(\ s a -> s{_jqDisableSpellCheck = a})
jqCustomAttributeFilter :: Lens' JobQuery (Maybe Text)
jqCustomAttributeFilter
= lens _jqCustomAttributeFilter
(\ s a -> s{_jqCustomAttributeFilter = a})
jqCommuteFilter :: Lens' JobQuery (Maybe CommuteFilter)
jqCommuteFilter
= lens _jqCommuteFilter
(\ s a -> s{_jqCommuteFilter = a})
jqPublishTimeRange :: Lens' JobQuery (Maybe TimestampRange)
jqPublishTimeRange
= lens _jqPublishTimeRange
(\ s a -> s{_jqPublishTimeRange = a})
jqLocationFilters :: Lens' JobQuery [LocationFilter]
jqLocationFilters
= lens _jqLocationFilters
(\ s a -> s{_jqLocationFilters = a})
. _Default
. _Coerce
jqCompanyDisplayNames :: Lens' JobQuery [Text]
jqCompanyDisplayNames
= lens _jqCompanyDisplayNames
(\ s a -> s{_jqCompanyDisplayNames = a})
. _Default
. _Coerce
jqJobCategories :: Lens' JobQuery [Text]
jqJobCategories
= lens _jqJobCategories
(\ s a -> s{_jqJobCategories = a})
. _Default
. _Coerce
jqCompensationFilter :: Lens' JobQuery (Maybe CompensationFilter)
jqCompensationFilter
= lens _jqCompensationFilter
(\ s a -> s{_jqCompensationFilter = a})
jqQuery :: Lens' JobQuery (Maybe Text)
jqQuery = lens _jqQuery (\ s a -> s{_jqQuery = a})
jqCompanyNames :: Lens' JobQuery [Text]
jqCompanyNames
= lens _jqCompanyNames
(\ s a -> s{_jqCompanyNames = a})
. _Default
. _Coerce
jqEmploymentTypes :: Lens' JobQuery [Text]
jqEmploymentTypes
= lens _jqEmploymentTypes
(\ s a -> s{_jqEmploymentTypes = a})
. _Default
. _Coerce
jqExcludedJobs :: Lens' JobQuery [Text]
jqExcludedJobs
= lens _jqExcludedJobs
(\ s a -> s{_jqExcludedJobs = a})
. _Default
. _Coerce
instance FromJSON JobQuery where
parseJSON
= withObject "JobQuery"
(\ o ->
JobQuery' <$>
(o .:? "languageCodes" .!= mempty) <*>
(o .:? "disableSpellCheck")
<*> (o .:? "customAttributeFilter")
<*> (o .:? "commuteFilter")
<*> (o .:? "publishTimeRange")
<*> (o .:? "locationFilters" .!= mempty)
<*> (o .:? "companyDisplayNames" .!= mempty)
<*> (o .:? "jobCategories" .!= mempty)
<*> (o .:? "compensationFilter")
<*> (o .:? "query")
<*> (o .:? "companyNames" .!= mempty)
<*> (o .:? "employmentTypes" .!= mempty)
<*> (o .:? "excludedJobs" .!= mempty))
instance ToJSON JobQuery where
toJSON JobQuery'{..}
= object
(catMaybes
[("languageCodes" .=) <$> _jqLanguageCodes,
("disableSpellCheck" .=) <$> _jqDisableSpellCheck,
("customAttributeFilter" .=) <$>
_jqCustomAttributeFilter,
("commuteFilter" .=) <$> _jqCommuteFilter,
("publishTimeRange" .=) <$> _jqPublishTimeRange,
("locationFilters" .=) <$> _jqLocationFilters,
("companyDisplayNames" .=) <$>
_jqCompanyDisplayNames,
("jobCategories" .=) <$> _jqJobCategories,
("compensationFilter" .=) <$> _jqCompensationFilter,
("query" .=) <$> _jqQuery,
("companyNames" .=) <$> _jqCompanyNames,
("employmentTypes" .=) <$> _jqEmploymentTypes,
("excludedJobs" .=) <$> _jqExcludedJobs])
newtype CreateClientEventRequest = CreateClientEventRequest'
{ _ccerClientEvent :: Maybe ClientEvent
} deriving (Eq,Show,Data,Typeable,Generic)
createClientEventRequest
:: CreateClientEventRequest
createClientEventRequest =
CreateClientEventRequest'
{ _ccerClientEvent = Nothing
}
ccerClientEvent :: Lens' CreateClientEventRequest (Maybe ClientEvent)
ccerClientEvent
= lens _ccerClientEvent
(\ s a -> s{_ccerClientEvent = a})
instance FromJSON CreateClientEventRequest where
parseJSON
= withObject "CreateClientEventRequest"
(\ o ->
CreateClientEventRequest' <$> (o .:? "clientEvent"))
instance ToJSON CreateClientEventRequest where
toJSON CreateClientEventRequest'{..}
= object
(catMaybes [("clientEvent" .=) <$> _ccerClientEvent])
data SpellingCorrection = SpellingCorrection'
{ _scCorrected :: !(Maybe Bool)
, _scCorrectedText :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
spellingCorrection
:: SpellingCorrection
spellingCorrection =
SpellingCorrection'
{ _scCorrected = Nothing
, _scCorrectedText = Nothing
}
scCorrected :: Lens' SpellingCorrection (Maybe Bool)
scCorrected
= lens _scCorrected (\ s a -> s{_scCorrected = a})
scCorrectedText :: Lens' SpellingCorrection (Maybe Text)
scCorrectedText
= lens _scCorrectedText
(\ s a -> s{_scCorrectedText = a})
instance FromJSON SpellingCorrection where
parseJSON
= withObject "SpellingCorrection"
(\ o ->
SpellingCorrection' <$>
(o .:? "corrected") <*> (o .:? "correctedText"))
instance ToJSON SpellingCorrection where
toJSON SpellingCorrection'{..}
= object
(catMaybes
[("corrected" .=) <$> _scCorrected,
("correctedText" .=) <$> _scCorrectedText])
data CompleteQueryResponse = CompleteQueryResponse'
{ _cqrMetadata :: !(Maybe ResponseMetadata)
, _cqrCompletionResults :: !(Maybe [CompletionResult])
} deriving (Eq,Show,Data,Typeable,Generic)
completeQueryResponse
:: CompleteQueryResponse
completeQueryResponse =
CompleteQueryResponse'
{ _cqrMetadata = Nothing
, _cqrCompletionResults = Nothing
}
cqrMetadata :: Lens' CompleteQueryResponse (Maybe ResponseMetadata)
cqrMetadata
= lens _cqrMetadata (\ s a -> s{_cqrMetadata = a})
cqrCompletionResults :: Lens' CompleteQueryResponse [CompletionResult]
cqrCompletionResults
= lens _cqrCompletionResults
(\ s a -> s{_cqrCompletionResults = a})
. _Default
. _Coerce
instance FromJSON CompleteQueryResponse where
parseJSON
= withObject "CompleteQueryResponse"
(\ o ->
CompleteQueryResponse' <$>
(o .:? "metadata") <*>
(o .:? "completionResults" .!= mempty))
instance ToJSON CompleteQueryResponse where
toJSON CompleteQueryResponse'{..}
= object
(catMaybes
[("metadata" .=) <$> _cqrMetadata,
("completionResults" .=) <$> _cqrCompletionResults])
data TimeOfDay' = TimeOfDay''
{ _todNanos :: !(Maybe (Textual Int32))
, _todHours :: !(Maybe (Textual Int32))
, _todMinutes :: !(Maybe (Textual Int32))
, _todSeconds :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
timeOfDay
:: TimeOfDay'
timeOfDay =
TimeOfDay''
{ _todNanos = Nothing
, _todHours = Nothing
, _todMinutes = Nothing
, _todSeconds = Nothing
}
todNanos :: Lens' TimeOfDay' (Maybe Int32)
todNanos
= lens _todNanos (\ s a -> s{_todNanos = a}) .
mapping _Coerce
todHours :: Lens' TimeOfDay' (Maybe Int32)
todHours
= lens _todHours (\ s a -> s{_todHours = a}) .
mapping _Coerce
todMinutes :: Lens' TimeOfDay' (Maybe Int32)
todMinutes
= lens _todMinutes (\ s a -> s{_todMinutes = a}) .
mapping _Coerce
todSeconds :: Lens' TimeOfDay' (Maybe Int32)
todSeconds
= lens _todSeconds (\ s a -> s{_todSeconds = a}) .
mapping _Coerce
instance FromJSON TimeOfDay' where
parseJSON
= withObject "TimeOfDay"
(\ o ->
TimeOfDay'' <$>
(o .:? "nanos") <*> (o .:? "hours") <*>
(o .:? "minutes")
<*> (o .:? "seconds"))
instance ToJSON TimeOfDay' where
toJSON TimeOfDay''{..}
= object
(catMaybes
[("nanos" .=) <$> _todNanos,
("hours" .=) <$> _todHours,
("minutes" .=) <$> _todMinutes,
("seconds" .=) <$> _todSeconds])
data CompensationEntry = CompensationEntry'
{ _ceAmount :: !(Maybe Money)
, _ceExpectedUnitsPerYear :: !(Maybe (Textual Double))
, _ceRange :: !(Maybe CompensationRange)
, _ceType :: !(Maybe CompensationEntryType)
, _ceDescription :: !(Maybe Text)
, _ceUnit :: !(Maybe CompensationEntryUnit)
} deriving (Eq,Show,Data,Typeable,Generic)
compensationEntry
:: CompensationEntry
compensationEntry =
CompensationEntry'
{ _ceAmount = Nothing
, _ceExpectedUnitsPerYear = Nothing
, _ceRange = Nothing
, _ceType = Nothing
, _ceDescription = Nothing
, _ceUnit = Nothing
}
ceAmount :: Lens' CompensationEntry (Maybe Money)
ceAmount = lens _ceAmount (\ s a -> s{_ceAmount = a})
ceExpectedUnitsPerYear :: Lens' CompensationEntry (Maybe Double)
ceExpectedUnitsPerYear
= lens _ceExpectedUnitsPerYear
(\ s a -> s{_ceExpectedUnitsPerYear = a})
. mapping _Coerce
ceRange :: Lens' CompensationEntry (Maybe CompensationRange)
ceRange = lens _ceRange (\ s a -> s{_ceRange = a})
ceType :: Lens' CompensationEntry (Maybe CompensationEntryType)
ceType = lens _ceType (\ s a -> s{_ceType = a})
ceDescription :: Lens' CompensationEntry (Maybe Text)
ceDescription
= lens _ceDescription
(\ s a -> s{_ceDescription = a})
ceUnit :: Lens' CompensationEntry (Maybe CompensationEntryUnit)
ceUnit = lens _ceUnit (\ s a -> s{_ceUnit = a})
instance FromJSON CompensationEntry where
parseJSON
= withObject "CompensationEntry"
(\ o ->
CompensationEntry' <$>
(o .:? "amount") <*> (o .:? "expectedUnitsPerYear")
<*> (o .:? "range")
<*> (o .:? "type")
<*> (o .:? "description")
<*> (o .:? "unit"))
instance ToJSON CompensationEntry where
toJSON CompensationEntry'{..}
= object
(catMaybes
[("amount" .=) <$> _ceAmount,
("expectedUnitsPerYear" .=) <$>
_ceExpectedUnitsPerYear,
("range" .=) <$> _ceRange, ("type" .=) <$> _ceType,
("description" .=) <$> _ceDescription,
("unit" .=) <$> _ceUnit])
data CompensationRange = CompensationRange'
{ _crMaxCompensation :: !(Maybe Money)
, _crMinCompensation :: !(Maybe Money)
} deriving (Eq,Show,Data,Typeable,Generic)
compensationRange
:: CompensationRange
compensationRange =
CompensationRange'
{ _crMaxCompensation = Nothing
, _crMinCompensation = Nothing
}
crMaxCompensation :: Lens' CompensationRange (Maybe Money)
crMaxCompensation
= lens _crMaxCompensation
(\ s a -> s{_crMaxCompensation = a})
crMinCompensation :: Lens' CompensationRange (Maybe Money)
crMinCompensation
= lens _crMinCompensation
(\ s a -> s{_crMinCompensation = a})
instance FromJSON CompensationRange where
parseJSON
= withObject "CompensationRange"
(\ o ->
CompensationRange' <$>
(o .:? "maxCompensation") <*>
(o .:? "minCompensation"))
instance ToJSON CompensationRange where
toJSON CompensationRange'{..}
= object
(catMaybes
[("maxCompensation" .=) <$> _crMaxCompensation,
("minCompensation" .=) <$> _crMinCompensation])
data CustomRankingInfo = CustomRankingInfo'
{ _criImportanceLevel :: !(Maybe CustomRankingInfoImportanceLevel)
, _criRankingExpression :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
customRankingInfo
:: CustomRankingInfo
customRankingInfo =
CustomRankingInfo'
{ _criImportanceLevel = Nothing
, _criRankingExpression = Nothing
}
criImportanceLevel :: Lens' CustomRankingInfo (Maybe CustomRankingInfoImportanceLevel)
criImportanceLevel
= lens _criImportanceLevel
(\ s a -> s{_criImportanceLevel = a})
criRankingExpression :: Lens' CustomRankingInfo (Maybe Text)
criRankingExpression
= lens _criRankingExpression
(\ s a -> s{_criRankingExpression = a})
instance FromJSON CustomRankingInfo where
parseJSON
= withObject "CustomRankingInfo"
(\ o ->
CustomRankingInfo' <$>
(o .:? "importanceLevel") <*>
(o .:? "rankingExpression"))
instance ToJSON CustomRankingInfo where
toJSON CustomRankingInfo'{..}
= object
(catMaybes
[("importanceLevel" .=) <$> _criImportanceLevel,
("rankingExpression" .=) <$> _criRankingExpression])
data ProcessingOptions = ProcessingOptions'
{ _poHTMLSanitization :: !(Maybe ProcessingOptionsHTMLSanitization)
, _poDisableStreetAddressResolution :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
processingOptions
:: ProcessingOptions
processingOptions =
ProcessingOptions'
{ _poHTMLSanitization = Nothing
, _poDisableStreetAddressResolution = Nothing
}
poHTMLSanitization :: Lens' ProcessingOptions (Maybe ProcessingOptionsHTMLSanitization)
poHTMLSanitization
= lens _poHTMLSanitization
(\ s a -> s{_poHTMLSanitization = a})
poDisableStreetAddressResolution :: Lens' ProcessingOptions (Maybe Bool)
poDisableStreetAddressResolution
= lens _poDisableStreetAddressResolution
(\ s a -> s{_poDisableStreetAddressResolution = a})
instance FromJSON ProcessingOptions where
parseJSON
= withObject "ProcessingOptions"
(\ o ->
ProcessingOptions' <$>
(o .:? "htmlSanitization") <*>
(o .:? "disableStreetAddressResolution"))
instance ToJSON ProcessingOptions where
toJSON ProcessingOptions'{..}
= object
(catMaybes
[("htmlSanitization" .=) <$> _poHTMLSanitization,
("disableStreetAddressResolution" .=) <$>
_poDisableStreetAddressResolution])
data PostalAddress = PostalAddress'
{ _paLanguageCode :: !(Maybe Text)
, _paSortingCode :: !(Maybe Text)
, _paRegionCode :: !(Maybe Text)
, _paSublocality :: !(Maybe Text)
, _paPostalCode :: !(Maybe Text)
, _paLocality :: !(Maybe Text)
, _paRecipients :: !(Maybe [Text])
, _paAdministrativeArea :: !(Maybe Text)
, _paAddressLines :: !(Maybe [Text])
, _paRevision :: !(Maybe (Textual Int32))
, _paOrganization :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
postalAddress
:: PostalAddress
postalAddress =
PostalAddress'
{ _paLanguageCode = Nothing
, _paSortingCode = Nothing
, _paRegionCode = Nothing
, _paSublocality = Nothing
, _paPostalCode = Nothing
, _paLocality = Nothing
, _paRecipients = Nothing
, _paAdministrativeArea = Nothing
, _paAddressLines = Nothing
, _paRevision = Nothing
, _paOrganization = Nothing
}
paLanguageCode :: Lens' PostalAddress (Maybe Text)
paLanguageCode
= lens _paLanguageCode
(\ s a -> s{_paLanguageCode = a})
paSortingCode :: Lens' PostalAddress (Maybe Text)
paSortingCode
= lens _paSortingCode
(\ s a -> s{_paSortingCode = a})
paRegionCode :: Lens' PostalAddress (Maybe Text)
paRegionCode
= lens _paRegionCode (\ s a -> s{_paRegionCode = a})
paSublocality :: Lens' PostalAddress (Maybe Text)
paSublocality
= lens _paSublocality
(\ s a -> s{_paSublocality = a})
paPostalCode :: Lens' PostalAddress (Maybe Text)
paPostalCode
= lens _paPostalCode (\ s a -> s{_paPostalCode = a})
paLocality :: Lens' PostalAddress (Maybe Text)
paLocality
= lens _paLocality (\ s a -> s{_paLocality = a})
paRecipients :: Lens' PostalAddress [Text]
paRecipients
= lens _paRecipients (\ s a -> s{_paRecipients = a})
. _Default
. _Coerce
paAdministrativeArea :: Lens' PostalAddress (Maybe Text)
paAdministrativeArea
= lens _paAdministrativeArea
(\ s a -> s{_paAdministrativeArea = a})
paAddressLines :: Lens' PostalAddress [Text]
paAddressLines
= lens _paAddressLines
(\ s a -> s{_paAddressLines = a})
. _Default
. _Coerce
paRevision :: Lens' PostalAddress (Maybe Int32)
paRevision
= lens _paRevision (\ s a -> s{_paRevision = a}) .
mapping _Coerce
paOrganization :: Lens' PostalAddress (Maybe Text)
paOrganization
= lens _paOrganization
(\ s a -> s{_paOrganization = a})
instance FromJSON PostalAddress where
parseJSON
= withObject "PostalAddress"
(\ o ->
PostalAddress' <$>
(o .:? "languageCode") <*> (o .:? "sortingCode") <*>
(o .:? "regionCode")
<*> (o .:? "sublocality")
<*> (o .:? "postalCode")
<*> (o .:? "locality")
<*> (o .:? "recipients" .!= mempty)
<*> (o .:? "administrativeArea")
<*> (o .:? "addressLines" .!= mempty)
<*> (o .:? "revision")
<*> (o .:? "organization"))
instance ToJSON PostalAddress where
toJSON PostalAddress'{..}
= object
(catMaybes
[("languageCode" .=) <$> _paLanguageCode,
("sortingCode" .=) <$> _paSortingCode,
("regionCode" .=) <$> _paRegionCode,
("sublocality" .=) <$> _paSublocality,
("postalCode" .=) <$> _paPostalCode,
("locality" .=) <$> _paLocality,
("recipients" .=) <$> _paRecipients,
("administrativeArea" .=) <$> _paAdministrativeArea,
("addressLines" .=) <$> _paAddressLines,
("revision" .=) <$> _paRevision,
("organization" .=) <$> _paOrganization])
data DeviceInfo = DeviceInfo'
{ _diId :: !(Maybe Text)
, _diDeviceType :: !(Maybe DeviceInfoDeviceType)
} deriving (Eq,Show,Data,Typeable,Generic)
deviceInfo
:: DeviceInfo
deviceInfo =
DeviceInfo'
{ _diId = Nothing
, _diDeviceType = Nothing
}
diId :: Lens' DeviceInfo (Maybe Text)
diId = lens _diId (\ s a -> s{_diId = a})
diDeviceType :: Lens' DeviceInfo (Maybe DeviceInfoDeviceType)
diDeviceType
= lens _diDeviceType (\ s a -> s{_diDeviceType = a})
instance FromJSON DeviceInfo where
parseJSON
= withObject "DeviceInfo"
(\ o ->
DeviceInfo' <$>
(o .:? "id") <*> (o .:? "deviceType"))
instance ToJSON DeviceInfo where
toJSON DeviceInfo'{..}
= object
(catMaybes
[("id" .=) <$> _diId,
("deviceType" .=) <$> _diDeviceType])
data NumericBucketingOption = NumericBucketingOption'
{ _nboBucketBounds :: !(Maybe [Textual Double])
, _nboRequiresMinMax :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
numericBucketingOption
:: NumericBucketingOption
numericBucketingOption =
NumericBucketingOption'
{ _nboBucketBounds = Nothing
, _nboRequiresMinMax = Nothing
}
nboBucketBounds :: Lens' NumericBucketingOption [Double]
nboBucketBounds
= lens _nboBucketBounds
(\ s a -> s{_nboBucketBounds = a})
. _Default
. _Coerce
nboRequiresMinMax :: Lens' NumericBucketingOption (Maybe Bool)
nboRequiresMinMax
= lens _nboRequiresMinMax
(\ s a -> s{_nboRequiresMinMax = a})
instance FromJSON NumericBucketingOption where
parseJSON
= withObject "NumericBucketingOption"
(\ o ->
NumericBucketingOption' <$>
(o .:? "bucketBounds" .!= mempty) <*>
(o .:? "requiresMinMax"))
instance ToJSON NumericBucketingOption where
toJSON NumericBucketingOption'{..}
= object
(catMaybes
[("bucketBounds" .=) <$> _nboBucketBounds,
("requiresMinMax" .=) <$> _nboRequiresMinMax])
data HistogramFacets = HistogramFacets'
{ _hfCompensationHistogramFacets :: !(Maybe [CompensationHistogramRequest])
, _hfCustomAttributeHistogramFacets :: !(Maybe [CustomAttributeHistogramRequest])
, _hfSimpleHistogramFacets :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
histogramFacets
:: HistogramFacets
histogramFacets =
HistogramFacets'
{ _hfCompensationHistogramFacets = Nothing
, _hfCustomAttributeHistogramFacets = Nothing
, _hfSimpleHistogramFacets = Nothing
}
hfCompensationHistogramFacets :: Lens' HistogramFacets [CompensationHistogramRequest]
hfCompensationHistogramFacets
= lens _hfCompensationHistogramFacets
(\ s a -> s{_hfCompensationHistogramFacets = a})
. _Default
. _Coerce
hfCustomAttributeHistogramFacets :: Lens' HistogramFacets [CustomAttributeHistogramRequest]
hfCustomAttributeHistogramFacets
= lens _hfCustomAttributeHistogramFacets
(\ s a -> s{_hfCustomAttributeHistogramFacets = a})
. _Default
. _Coerce
hfSimpleHistogramFacets :: Lens' HistogramFacets [Text]
hfSimpleHistogramFacets
= lens _hfSimpleHistogramFacets
(\ s a -> s{_hfSimpleHistogramFacets = a})
. _Default
. _Coerce
instance FromJSON HistogramFacets where
parseJSON
= withObject "HistogramFacets"
(\ o ->
HistogramFacets' <$>
(o .:? "compensationHistogramFacets" .!= mempty) <*>
(o .:? "customAttributeHistogramFacets" .!= mempty)
<*> (o .:? "simpleHistogramFacets" .!= mempty))
instance ToJSON HistogramFacets where
toJSON HistogramFacets'{..}
= object
(catMaybes
[("compensationHistogramFacets" .=) <$>
_hfCompensationHistogramFacets,
("customAttributeHistogramFacets" .=) <$>
_hfCustomAttributeHistogramFacets,
("simpleHistogramFacets" .=) <$>
_hfSimpleHistogramFacets])
data HistogramResult = HistogramResult'
{ _hrValues :: !(Maybe HistogramResultValues)
, _hrSearchType :: !(Maybe HistogramResultSearchType)
} deriving (Eq,Show,Data,Typeable,Generic)
histogramResult
:: HistogramResult
histogramResult =
HistogramResult'
{ _hrValues = Nothing
, _hrSearchType = Nothing
}
hrValues :: Lens' HistogramResult (Maybe HistogramResultValues)
hrValues = lens _hrValues (\ s a -> s{_hrValues = a})
hrSearchType :: Lens' HistogramResult (Maybe HistogramResultSearchType)
hrSearchType
= lens _hrSearchType (\ s a -> s{_hrSearchType = a})
instance FromJSON HistogramResult where
parseJSON
= withObject "HistogramResult"
(\ o ->
HistogramResult' <$>
(o .:? "values") <*> (o .:? "searchType"))
instance ToJSON HistogramResult where
toJSON HistogramResult'{..}
= object
(catMaybes
[("values" .=) <$> _hrValues,
("searchType" .=) <$> _hrSearchType])
newtype CustomAttributeHistogramResultStringValueHistogramResult = CustomAttributeHistogramResultStringValueHistogramResult'
{ _cahrsvhrAddtional :: HashMap Text (Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
customAttributeHistogramResultStringValueHistogramResult
:: HashMap Text Int32
-> CustomAttributeHistogramResultStringValueHistogramResult
customAttributeHistogramResultStringValueHistogramResult pCahrsvhrAddtional_ =
CustomAttributeHistogramResultStringValueHistogramResult'
{ _cahrsvhrAddtional = _Coerce # pCahrsvhrAddtional_
}
cahrsvhrAddtional :: Lens' CustomAttributeHistogramResultStringValueHistogramResult (HashMap Text Int32)
cahrsvhrAddtional
= lens _cahrsvhrAddtional
(\ s a -> s{_cahrsvhrAddtional = a})
. _Coerce
instance FromJSON
CustomAttributeHistogramResultStringValueHistogramResult
where
parseJSON
= withObject
"CustomAttributeHistogramResultStringValueHistogramResult"
(\ o ->
CustomAttributeHistogramResultStringValueHistogramResult'
<$> (parseJSONObject o))
instance ToJSON
CustomAttributeHistogramResultStringValueHistogramResult
where
toJSON = toJSON . _cahrsvhrAddtional
newtype ClientEventExtraInfo = ClientEventExtraInfo'
{ _ceeiAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
clientEventExtraInfo
:: HashMap Text Text
-> ClientEventExtraInfo
clientEventExtraInfo pCeeiAddtional_ =
ClientEventExtraInfo'
{ _ceeiAddtional = _Coerce # pCeeiAddtional_
}
ceeiAddtional :: Lens' ClientEventExtraInfo (HashMap Text Text)
ceeiAddtional
= lens _ceeiAddtional
(\ s a -> s{_ceeiAddtional = a})
. _Coerce
instance FromJSON ClientEventExtraInfo where
parseJSON
= withObject "ClientEventExtraInfo"
(\ o ->
ClientEventExtraInfo' <$> (parseJSONObject o))
instance ToJSON ClientEventExtraInfo where
toJSON = toJSON . _ceeiAddtional
data SearchJobsResponse = SearchJobsResponse'
{ _sjrNextPageToken :: !(Maybe Text)
, _sjrEstimatedTotalSize :: !(Maybe (Textual Int32))
, _sjrHistogramQueryResults :: !(Maybe [HistogramQueryResult])
, _sjrLocationFilters :: !(Maybe [Location])
, _sjrMatchingJobs :: !(Maybe [MatchingJob])
, _sjrTotalSize :: !(Maybe (Textual Int32))
, _sjrHistogramResults :: !(Maybe HistogramResults)
, _sjrMetadata :: !(Maybe ResponseMetadata)
, _sjrBroadenedQueryJobsCount :: !(Maybe (Textual Int32))
, _sjrSpellCorrection :: !(Maybe SpellingCorrection)
} deriving (Eq,Show,Data,Typeable,Generic)
searchJobsResponse
:: SearchJobsResponse
searchJobsResponse =
SearchJobsResponse'
{ _sjrNextPageToken = Nothing
, _sjrEstimatedTotalSize = Nothing
, _sjrHistogramQueryResults = Nothing
, _sjrLocationFilters = Nothing
, _sjrMatchingJobs = Nothing
, _sjrTotalSize = Nothing
, _sjrHistogramResults = Nothing
, _sjrMetadata = Nothing
, _sjrBroadenedQueryJobsCount = Nothing
, _sjrSpellCorrection = Nothing
}
sjrNextPageToken :: Lens' SearchJobsResponse (Maybe Text)
sjrNextPageToken
= lens _sjrNextPageToken
(\ s a -> s{_sjrNextPageToken = a})
sjrEstimatedTotalSize :: Lens' SearchJobsResponse (Maybe Int32)
sjrEstimatedTotalSize
= lens _sjrEstimatedTotalSize
(\ s a -> s{_sjrEstimatedTotalSize = a})
. mapping _Coerce
sjrHistogramQueryResults :: Lens' SearchJobsResponse [HistogramQueryResult]
sjrHistogramQueryResults
= lens _sjrHistogramQueryResults
(\ s a -> s{_sjrHistogramQueryResults = a})
. _Default
. _Coerce
sjrLocationFilters :: Lens' SearchJobsResponse [Location]
sjrLocationFilters
= lens _sjrLocationFilters
(\ s a -> s{_sjrLocationFilters = a})
. _Default
. _Coerce
sjrMatchingJobs :: Lens' SearchJobsResponse [MatchingJob]
sjrMatchingJobs
= lens _sjrMatchingJobs
(\ s a -> s{_sjrMatchingJobs = a})
. _Default
. _Coerce
sjrTotalSize :: Lens' SearchJobsResponse (Maybe Int32)
sjrTotalSize
= lens _sjrTotalSize (\ s a -> s{_sjrTotalSize = a})
. mapping _Coerce
sjrHistogramResults :: Lens' SearchJobsResponse (Maybe HistogramResults)
sjrHistogramResults
= lens _sjrHistogramResults
(\ s a -> s{_sjrHistogramResults = a})
sjrMetadata :: Lens' SearchJobsResponse (Maybe ResponseMetadata)
sjrMetadata
= lens _sjrMetadata (\ s a -> s{_sjrMetadata = a})
sjrBroadenedQueryJobsCount :: Lens' SearchJobsResponse (Maybe Int32)
sjrBroadenedQueryJobsCount
= lens _sjrBroadenedQueryJobsCount
(\ s a -> s{_sjrBroadenedQueryJobsCount = a})
. mapping _Coerce
sjrSpellCorrection :: Lens' SearchJobsResponse (Maybe SpellingCorrection)
sjrSpellCorrection
= lens _sjrSpellCorrection
(\ s a -> s{_sjrSpellCorrection = a})
instance FromJSON SearchJobsResponse where
parseJSON
= withObject "SearchJobsResponse"
(\ o ->
SearchJobsResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "estimatedTotalSize")
<*> (o .:? "histogramQueryResults" .!= mempty)
<*> (o .:? "locationFilters" .!= mempty)
<*> (o .:? "matchingJobs" .!= mempty)
<*> (o .:? "totalSize")
<*> (o .:? "histogramResults")
<*> (o .:? "metadata")
<*> (o .:? "broadenedQueryJobsCount")
<*> (o .:? "spellCorrection"))
instance ToJSON SearchJobsResponse where
toJSON SearchJobsResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _sjrNextPageToken,
("estimatedTotalSize" .=) <$> _sjrEstimatedTotalSize,
("histogramQueryResults" .=) <$>
_sjrHistogramQueryResults,
("locationFilters" .=) <$> _sjrLocationFilters,
("matchingJobs" .=) <$> _sjrMatchingJobs,
("totalSize" .=) <$> _sjrTotalSize,
("histogramResults" .=) <$> _sjrHistogramResults,
("metadata" .=) <$> _sjrMetadata,
("broadenedQueryJobsCount" .=) <$>
_sjrBroadenedQueryJobsCount,
("spellCorrection" .=) <$> _sjrSpellCorrection])
newtype HistogramResultValues = HistogramResultValues'
{ _hrvAddtional :: HashMap Text (Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
histogramResultValues
:: HashMap Text Int32
-> HistogramResultValues
histogramResultValues pHrvAddtional_ =
HistogramResultValues'
{ _hrvAddtional = _Coerce # pHrvAddtional_
}
hrvAddtional :: Lens' HistogramResultValues (HashMap Text Int32)
hrvAddtional
= lens _hrvAddtional (\ s a -> s{_hrvAddtional = a})
. _Coerce
instance FromJSON HistogramResultValues where
parseJSON
= withObject "HistogramResultValues"
(\ o ->
HistogramResultValues' <$> (parseJSONObject o))
instance ToJSON HistogramResultValues where
toJSON = toJSON . _hrvAddtional
data TimestampRange = TimestampRange'
{ _trStartTime :: !(Maybe DateTime')
, _trEndTime :: !(Maybe DateTime')
} deriving (Eq,Show,Data,Typeable,Generic)
timestampRange
:: TimestampRange
timestampRange =
TimestampRange'
{ _trStartTime = Nothing
, _trEndTime = Nothing
}
trStartTime :: Lens' TimestampRange (Maybe UTCTime)
trStartTime
= lens _trStartTime (\ s a -> s{_trStartTime = a}) .
mapping _DateTime
trEndTime :: Lens' TimestampRange (Maybe UTCTime)
trEndTime
= lens _trEndTime (\ s a -> s{_trEndTime = a}) .
mapping _DateTime
instance FromJSON TimestampRange where
parseJSON
= withObject "TimestampRange"
(\ o ->
TimestampRange' <$>
(o .:? "startTime") <*> (o .:? "endTime"))
instance ToJSON TimestampRange where
toJSON TimestampRange'{..}
= object
(catMaybes
[("startTime" .=) <$> _trStartTime,
("endTime" .=) <$> _trEndTime])