module Network.Google.Partners.Types.Product where
import Network.Google.Partners.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 ListUserStatesResponse = ListUserStatesResponse'
{ _lusrUserStates :: !(Maybe [Text])
, _lusrResponseMetadata :: !(Maybe ResponseMetadata)
} deriving (Eq,Show,Data,Typeable,Generic)
listUserStatesResponse
:: ListUserStatesResponse
listUserStatesResponse =
ListUserStatesResponse'
{ _lusrUserStates = Nothing
, _lusrResponseMetadata = Nothing
}
lusrUserStates :: Lens' ListUserStatesResponse [Text]
lusrUserStates
= lens _lusrUserStates
(\ s a -> s{_lusrUserStates = a})
. _Default
. _Coerce
lusrResponseMetadata :: Lens' ListUserStatesResponse (Maybe ResponseMetadata)
lusrResponseMetadata
= lens _lusrResponseMetadata
(\ s a -> s{_lusrResponseMetadata = a})
instance FromJSON ListUserStatesResponse where
parseJSON
= withObject "ListUserStatesResponse"
(\ o ->
ListUserStatesResponse' <$>
(o .:? "userStates" .!= mempty) <*>
(o .:? "responseMetadata"))
instance ToJSON ListUserStatesResponse where
toJSON ListUserStatesResponse'{..}
= object
(catMaybes
[("userStates" .=) <$> _lusrUserStates,
("responseMetadata" .=) <$> _lusrResponseMetadata])
data EventData = EventData'
{ _edValues :: !(Maybe [Text])
, _edKey :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
eventData
:: EventData
eventData =
EventData'
{ _edValues = Nothing
, _edKey = Nothing
}
edValues :: Lens' EventData [Text]
edValues
= lens _edValues (\ s a -> s{_edValues = a}) .
_Default
. _Coerce
edKey :: Lens' EventData (Maybe Text)
edKey = lens _edKey (\ s a -> s{_edKey = a})
instance FromJSON EventData where
parseJSON
= withObject "EventData"
(\ o ->
EventData' <$>
(o .:? "values" .!= mempty) <*> (o .:? "key"))
instance ToJSON EventData where
toJSON EventData'{..}
= object
(catMaybes
[("values" .=) <$> _edValues, ("key" .=) <$> _edKey])
data RequestMetadata = RequestMetadata'
{ _rmExperimentIds :: !(Maybe [Text])
, _rmTrafficSource :: !(Maybe TrafficSource)
, _rmLocale :: !(Maybe Text)
, _rmUserOverrides :: !(Maybe UserOverrides)
, _rmPartnersSessionId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
requestMetadata
:: RequestMetadata
requestMetadata =
RequestMetadata'
{ _rmExperimentIds = Nothing
, _rmTrafficSource = Nothing
, _rmLocale = Nothing
, _rmUserOverrides = Nothing
, _rmPartnersSessionId = Nothing
}
rmExperimentIds :: Lens' RequestMetadata [Text]
rmExperimentIds
= lens _rmExperimentIds
(\ s a -> s{_rmExperimentIds = a})
. _Default
. _Coerce
rmTrafficSource :: Lens' RequestMetadata (Maybe TrafficSource)
rmTrafficSource
= lens _rmTrafficSource
(\ s a -> s{_rmTrafficSource = a})
rmLocale :: Lens' RequestMetadata (Maybe Text)
rmLocale = lens _rmLocale (\ s a -> s{_rmLocale = a})
rmUserOverrides :: Lens' RequestMetadata (Maybe UserOverrides)
rmUserOverrides
= lens _rmUserOverrides
(\ s a -> s{_rmUserOverrides = a})
rmPartnersSessionId :: Lens' RequestMetadata (Maybe Text)
rmPartnersSessionId
= lens _rmPartnersSessionId
(\ s a -> s{_rmPartnersSessionId = a})
instance FromJSON RequestMetadata where
parseJSON
= withObject "RequestMetadata"
(\ o ->
RequestMetadata' <$>
(o .:? "experimentIds" .!= mempty) <*>
(o .:? "trafficSource")
<*> (o .:? "locale")
<*> (o .:? "userOverrides")
<*> (o .:? "partnersSessionId"))
instance ToJSON RequestMetadata where
toJSON RequestMetadata'{..}
= object
(catMaybes
[("experimentIds" .=) <$> _rmExperimentIds,
("trafficSource" .=) <$> _rmTrafficSource,
("locale" .=) <$> _rmLocale,
("userOverrides" .=) <$> _rmUserOverrides,
("partnersSessionId" .=) <$> _rmPartnersSessionId])
data CertificationStatus = CertificationStatus'
{ _csIsCertified :: !(Maybe Bool)
, _csType :: !(Maybe Text)
, _csExamStatuses :: !(Maybe [CertificationExamStatus])
} deriving (Eq,Show,Data,Typeable,Generic)
certificationStatus
:: CertificationStatus
certificationStatus =
CertificationStatus'
{ _csIsCertified = Nothing
, _csType = Nothing
, _csExamStatuses = Nothing
}
csIsCertified :: Lens' CertificationStatus (Maybe Bool)
csIsCertified
= lens _csIsCertified
(\ s a -> s{_csIsCertified = a})
csType :: Lens' CertificationStatus (Maybe Text)
csType = lens _csType (\ s a -> s{_csType = a})
csExamStatuses :: Lens' CertificationStatus [CertificationExamStatus]
csExamStatuses
= lens _csExamStatuses
(\ s a -> s{_csExamStatuses = a})
. _Default
. _Coerce
instance FromJSON CertificationStatus where
parseJSON
= withObject "CertificationStatus"
(\ o ->
CertificationStatus' <$>
(o .:? "isCertified") <*> (o .:? "type") <*>
(o .:? "examStatuses" .!= mempty))
instance ToJSON CertificationStatus where
toJSON CertificationStatus'{..}
= object
(catMaybes
[("isCertified" .=) <$> _csIsCertified,
("type" .=) <$> _csType,
("examStatuses" .=) <$> _csExamStatuses])
data DebugInfo = DebugInfo'
{ _diServiceURL :: !(Maybe Text)
, _diServerTraceInfo :: !(Maybe Text)
, _diServerInfo :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
debugInfo
:: DebugInfo
debugInfo =
DebugInfo'
{ _diServiceURL = Nothing
, _diServerTraceInfo = Nothing
, _diServerInfo = Nothing
}
diServiceURL :: Lens' DebugInfo (Maybe Text)
diServiceURL
= lens _diServiceURL (\ s a -> s{_diServiceURL = a})
diServerTraceInfo :: Lens' DebugInfo (Maybe Text)
diServerTraceInfo
= lens _diServerTraceInfo
(\ s a -> s{_diServerTraceInfo = a})
diServerInfo :: Lens' DebugInfo (Maybe Text)
diServerInfo
= lens _diServerInfo (\ s a -> s{_diServerInfo = a})
instance FromJSON DebugInfo where
parseJSON
= withObject "DebugInfo"
(\ o ->
DebugInfo' <$>
(o .:? "serviceUrl") <*> (o .:? "serverTraceInfo")
<*> (o .:? "serverInfo"))
instance ToJSON DebugInfo where
toJSON DebugInfo'{..}
= object
(catMaybes
[("serviceUrl" .=) <$> _diServiceURL,
("serverTraceInfo" .=) <$> _diServerTraceInfo,
("serverInfo" .=) <$> _diServerInfo])
data GetCompanyResponse = GetCompanyResponse'
{ _gcrResponseMetadata :: !(Maybe ResponseMetadata)
, _gcrCompany :: !(Maybe Company)
} deriving (Eq,Show,Data,Typeable,Generic)
getCompanyResponse
:: GetCompanyResponse
getCompanyResponse =
GetCompanyResponse'
{ _gcrResponseMetadata = Nothing
, _gcrCompany = Nothing
}
gcrResponseMetadata :: Lens' GetCompanyResponse (Maybe ResponseMetadata)
gcrResponseMetadata
= lens _gcrResponseMetadata
(\ s a -> s{_gcrResponseMetadata = a})
gcrCompany :: Lens' GetCompanyResponse (Maybe Company)
gcrCompany
= lens _gcrCompany (\ s a -> s{_gcrCompany = a})
instance FromJSON GetCompanyResponse where
parseJSON
= withObject "GetCompanyResponse"
(\ o ->
GetCompanyResponse' <$>
(o .:? "responseMetadata") <*> (o .:? "company"))
instance ToJSON GetCompanyResponse where
toJSON GetCompanyResponse'{..}
= object
(catMaybes
[("responseMetadata" .=) <$> _gcrResponseMetadata,
("company" .=) <$> _gcrCompany])
data PublicProFile = PublicProFile'
{ _ppfURL :: !(Maybe Text)
, _ppfDisplayImageURL :: !(Maybe Text)
, _ppfDisplayName :: !(Maybe Text)
, _ppfId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
publicProFile
:: PublicProFile
publicProFile =
PublicProFile'
{ _ppfURL = Nothing
, _ppfDisplayImageURL = Nothing
, _ppfDisplayName = Nothing
, _ppfId = Nothing
}
ppfURL :: Lens' PublicProFile (Maybe Text)
ppfURL = lens _ppfURL (\ s a -> s{_ppfURL = a})
ppfDisplayImageURL :: Lens' PublicProFile (Maybe Text)
ppfDisplayImageURL
= lens _ppfDisplayImageURL
(\ s a -> s{_ppfDisplayImageURL = a})
ppfDisplayName :: Lens' PublicProFile (Maybe Text)
ppfDisplayName
= lens _ppfDisplayName
(\ s a -> s{_ppfDisplayName = a})
ppfId :: Lens' PublicProFile (Maybe Text)
ppfId = lens _ppfId (\ s a -> s{_ppfId = a})
instance FromJSON PublicProFile where
parseJSON
= withObject "PublicProFile"
(\ o ->
PublicProFile' <$>
(o .:? "url") <*> (o .:? "displayImageUrl") <*>
(o .:? "displayName")
<*> (o .:? "id"))
instance ToJSON PublicProFile where
toJSON PublicProFile'{..}
= object
(catMaybes
[("url" .=) <$> _ppfURL,
("displayImageUrl" .=) <$> _ppfDisplayImageURL,
("displayName" .=) <$> _ppfDisplayName,
("id" .=) <$> _ppfId])
data CertificationExamStatus = CertificationExamStatus'
{ _cesNumberUsersPass :: !(Maybe (Textual Int32))
, _cesType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
certificationExamStatus
:: CertificationExamStatus
certificationExamStatus =
CertificationExamStatus'
{ _cesNumberUsersPass = Nothing
, _cesType = Nothing
}
cesNumberUsersPass :: Lens' CertificationExamStatus (Maybe Int32)
cesNumberUsersPass
= lens _cesNumberUsersPass
(\ s a -> s{_cesNumberUsersPass = a})
. mapping _Coerce
cesType :: Lens' CertificationExamStatus (Maybe Text)
cesType = lens _cesType (\ s a -> s{_cesType = a})
instance FromJSON CertificationExamStatus where
parseJSON
= withObject "CertificationExamStatus"
(\ o ->
CertificationExamStatus' <$>
(o .:? "numberUsersPass") <*> (o .:? "type"))
instance ToJSON CertificationExamStatus where
toJSON CertificationExamStatus'{..}
= object
(catMaybes
[("numberUsersPass" .=) <$> _cesNumberUsersPass,
("type" .=) <$> _cesType])
data Location = Location'
{ _lLatLng :: !(Maybe LatLng)
, _lAddress :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
location
:: Location
location =
Location'
{ _lLatLng = Nothing
, _lAddress = Nothing
}
lLatLng :: Lens' Location (Maybe LatLng)
lLatLng = lens _lLatLng (\ s a -> s{_lLatLng = a})
lAddress :: Lens' Location (Maybe Text)
lAddress = lens _lAddress (\ s a -> s{_lAddress = a})
instance FromJSON Location where
parseJSON
= withObject "Location"
(\ o ->
Location' <$> (o .:? "latLng") <*> (o .:? "address"))
instance ToJSON Location where
toJSON Location'{..}
= object
(catMaybes
[("latLng" .=) <$> _lLatLng,
("address" .=) <$> _lAddress])
data TrafficSource = TrafficSource'
{ _tsTrafficSubId :: !(Maybe Text)
, _tsTrafficSourceId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
trafficSource
:: TrafficSource
trafficSource =
TrafficSource'
{ _tsTrafficSubId = Nothing
, _tsTrafficSourceId = Nothing
}
tsTrafficSubId :: Lens' TrafficSource (Maybe Text)
tsTrafficSubId
= lens _tsTrafficSubId
(\ s a -> s{_tsTrafficSubId = a})
tsTrafficSourceId :: Lens' TrafficSource (Maybe Text)
tsTrafficSourceId
= lens _tsTrafficSourceId
(\ s a -> s{_tsTrafficSourceId = a})
instance FromJSON TrafficSource where
parseJSON
= withObject "TrafficSource"
(\ o ->
TrafficSource' <$>
(o .:? "trafficSubId") <*> (o .:? "trafficSourceId"))
instance ToJSON TrafficSource where
toJSON TrafficSource'{..}
= object
(catMaybes
[("trafficSubId" .=) <$> _tsTrafficSubId,
("trafficSourceId" .=) <$> _tsTrafficSourceId])
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)
, _lcrResponseMetadata :: !(Maybe ResponseMetadata)
, _lcrCompanies :: !(Maybe [Company])
} deriving (Eq,Show,Data,Typeable,Generic)
listCompaniesResponse
:: ListCompaniesResponse
listCompaniesResponse =
ListCompaniesResponse'
{ _lcrNextPageToken = Nothing
, _lcrResponseMetadata = Nothing
, _lcrCompanies = Nothing
}
lcrNextPageToken :: Lens' ListCompaniesResponse (Maybe Text)
lcrNextPageToken
= lens _lcrNextPageToken
(\ s a -> s{_lcrNextPageToken = a})
lcrResponseMetadata :: Lens' ListCompaniesResponse (Maybe ResponseMetadata)
lcrResponseMetadata
= lens _lcrResponseMetadata
(\ s a -> s{_lcrResponseMetadata = a})
lcrCompanies :: Lens' ListCompaniesResponse [Company]
lcrCompanies
= lens _lcrCompanies (\ s a -> s{_lcrCompanies = a})
. _Default
. _Coerce
instance FromJSON ListCompaniesResponse where
parseJSON
= withObject "ListCompaniesResponse"
(\ o ->
ListCompaniesResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "responseMetadata")
<*> (o .:? "companies" .!= mempty))
instance ToJSON ListCompaniesResponse where
toJSON ListCompaniesResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lcrNextPageToken,
("responseMetadata" .=) <$> _lcrResponseMetadata,
("companies" .=) <$> _lcrCompanies])
data RecaptchaChallenge = RecaptchaChallenge'
{ _rcResponse :: !(Maybe Text)
, _rcId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
recaptchaChallenge
:: RecaptchaChallenge
recaptchaChallenge =
RecaptchaChallenge'
{ _rcResponse = Nothing
, _rcId = Nothing
}
rcResponse :: Lens' RecaptchaChallenge (Maybe Text)
rcResponse
= lens _rcResponse (\ s a -> s{_rcResponse = a})
rcId :: Lens' RecaptchaChallenge (Maybe Text)
rcId = lens _rcId (\ s a -> s{_rcId = a})
instance FromJSON RecaptchaChallenge where
parseJSON
= withObject "RecaptchaChallenge"
(\ o ->
RecaptchaChallenge' <$>
(o .:? "response") <*> (o .:? "id"))
instance ToJSON RecaptchaChallenge where
toJSON RecaptchaChallenge'{..}
= object
(catMaybes
[("response" .=) <$> _rcResponse,
("id" .=) <$> _rcId])
data CreateLeadResponse = CreateLeadResponse'
{ _clrRecaptchaStatus :: !(Maybe Text)
, _clrResponseMetadata :: !(Maybe ResponseMetadata)
, _clrLead :: !(Maybe Lead)
} deriving (Eq,Show,Data,Typeable,Generic)
createLeadResponse
:: CreateLeadResponse
createLeadResponse =
CreateLeadResponse'
{ _clrRecaptchaStatus = Nothing
, _clrResponseMetadata = Nothing
, _clrLead = Nothing
}
clrRecaptchaStatus :: Lens' CreateLeadResponse (Maybe Text)
clrRecaptchaStatus
= lens _clrRecaptchaStatus
(\ s a -> s{_clrRecaptchaStatus = a})
clrResponseMetadata :: Lens' CreateLeadResponse (Maybe ResponseMetadata)
clrResponseMetadata
= lens _clrResponseMetadata
(\ s a -> s{_clrResponseMetadata = a})
clrLead :: Lens' CreateLeadResponse (Maybe Lead)
clrLead = lens _clrLead (\ s a -> s{_clrLead = a})
instance FromJSON CreateLeadResponse where
parseJSON
= withObject "CreateLeadResponse"
(\ o ->
CreateLeadResponse' <$>
(o .:? "recaptchaStatus") <*>
(o .:? "responseMetadata")
<*> (o .:? "lead"))
instance ToJSON CreateLeadResponse where
toJSON CreateLeadResponse'{..}
= object
(catMaybes
[("recaptchaStatus" .=) <$> _clrRecaptchaStatus,
("responseMetadata" .=) <$> _clrResponseMetadata,
("lead" .=) <$> _clrLead])
data UserOverrides = UserOverrides'
{ _uoIPAddress :: !(Maybe Text)
, _uoUserId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
userOverrides
:: UserOverrides
userOverrides =
UserOverrides'
{ _uoIPAddress = Nothing
, _uoUserId = Nothing
}
uoIPAddress :: Lens' UserOverrides (Maybe Text)
uoIPAddress
= lens _uoIPAddress (\ s a -> s{_uoIPAddress = a})
uoUserId :: Lens' UserOverrides (Maybe Text)
uoUserId = lens _uoUserId (\ s a -> s{_uoUserId = a})
instance FromJSON UserOverrides where
parseJSON
= withObject "UserOverrides"
(\ o ->
UserOverrides' <$>
(o .:? "ipAddress") <*> (o .:? "userId"))
instance ToJSON UserOverrides where
toJSON UserOverrides'{..}
= object
(catMaybes
[("ipAddress" .=) <$> _uoIPAddress,
("userId" .=) <$> _uoUserId])
newtype ResponseMetadata = ResponseMetadata'
{ _rmDebugInfo :: Maybe DebugInfo
} deriving (Eq,Show,Data,Typeable,Generic)
responseMetadata
:: ResponseMetadata
responseMetadata =
ResponseMetadata'
{ _rmDebugInfo = Nothing
}
rmDebugInfo :: Lens' ResponseMetadata (Maybe DebugInfo)
rmDebugInfo
= lens _rmDebugInfo (\ s a -> s{_rmDebugInfo = a})
instance FromJSON ResponseMetadata where
parseJSON
= withObject "ResponseMetadata"
(\ o -> ResponseMetadata' <$> (o .:? "debugInfo"))
instance ToJSON ResponseMetadata where
toJSON ResponseMetadata'{..}
= object
(catMaybes [("debugInfo" .=) <$> _rmDebugInfo])
data LogMessageRequest = LogMessageRequest'
{ _lmrRequestMetadata :: !(Maybe RequestMetadata)
, _lmrClientInfo :: !(Maybe LogMessageRequestClientInfo)
, _lmrDetails :: !(Maybe Text)
, _lmrLevel :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
logMessageRequest
:: LogMessageRequest
logMessageRequest =
LogMessageRequest'
{ _lmrRequestMetadata = Nothing
, _lmrClientInfo = Nothing
, _lmrDetails = Nothing
, _lmrLevel = Nothing
}
lmrRequestMetadata :: Lens' LogMessageRequest (Maybe RequestMetadata)
lmrRequestMetadata
= lens _lmrRequestMetadata
(\ s a -> s{_lmrRequestMetadata = a})
lmrClientInfo :: Lens' LogMessageRequest (Maybe LogMessageRequestClientInfo)
lmrClientInfo
= lens _lmrClientInfo
(\ s a -> s{_lmrClientInfo = a})
lmrDetails :: Lens' LogMessageRequest (Maybe Text)
lmrDetails
= lens _lmrDetails (\ s a -> s{_lmrDetails = a})
lmrLevel :: Lens' LogMessageRequest (Maybe Text)
lmrLevel = lens _lmrLevel (\ s a -> s{_lmrLevel = a})
instance FromJSON LogMessageRequest where
parseJSON
= withObject "LogMessageRequest"
(\ o ->
LogMessageRequest' <$>
(o .:? "requestMetadata") <*> (o .:? "clientInfo")
<*> (o .:? "details")
<*> (o .:? "level"))
instance ToJSON LogMessageRequest where
toJSON LogMessageRequest'{..}
= object
(catMaybes
[("requestMetadata" .=) <$> _lmrRequestMetadata,
("clientInfo" .=) <$> _lmrClientInfo,
("details" .=) <$> _lmrDetails,
("level" .=) <$> _lmrLevel])
data LocalizedCompanyInfo = LocalizedCompanyInfo'
{ _lciLanguageCode :: !(Maybe Text)
, _lciOverview :: !(Maybe Text)
, _lciCountryCodes :: !(Maybe [Text])
, _lciDisplayName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
localizedCompanyInfo
:: LocalizedCompanyInfo
localizedCompanyInfo =
LocalizedCompanyInfo'
{ _lciLanguageCode = Nothing
, _lciOverview = Nothing
, _lciCountryCodes = Nothing
, _lciDisplayName = Nothing
}
lciLanguageCode :: Lens' LocalizedCompanyInfo (Maybe Text)
lciLanguageCode
= lens _lciLanguageCode
(\ s a -> s{_lciLanguageCode = a})
lciOverview :: Lens' LocalizedCompanyInfo (Maybe Text)
lciOverview
= lens _lciOverview (\ s a -> s{_lciOverview = a})
lciCountryCodes :: Lens' LocalizedCompanyInfo [Text]
lciCountryCodes
= lens _lciCountryCodes
(\ s a -> s{_lciCountryCodes = a})
. _Default
. _Coerce
lciDisplayName :: Lens' LocalizedCompanyInfo (Maybe Text)
lciDisplayName
= lens _lciDisplayName
(\ s a -> s{_lciDisplayName = a})
instance FromJSON LocalizedCompanyInfo where
parseJSON
= withObject "LocalizedCompanyInfo"
(\ o ->
LocalizedCompanyInfo' <$>
(o .:? "languageCode") <*> (o .:? "overview") <*>
(o .:? "countryCodes" .!= mempty)
<*> (o .:? "displayName"))
instance ToJSON LocalizedCompanyInfo where
toJSON LocalizedCompanyInfo'{..}
= object
(catMaybes
[("languageCode" .=) <$> _lciLanguageCode,
("overview" .=) <$> _lciOverview,
("countryCodes" .=) <$> _lciCountryCodes,
("displayName" .=) <$> _lciDisplayName])
newtype LogMessageRequestClientInfo = LogMessageRequestClientInfo'
{ _lmrciAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
logMessageRequestClientInfo
:: HashMap Text Text
-> LogMessageRequestClientInfo
logMessageRequestClientInfo pLmrciAddtional_ =
LogMessageRequestClientInfo'
{ _lmrciAddtional = _Coerce # pLmrciAddtional_
}
lmrciAddtional :: Lens' LogMessageRequestClientInfo (HashMap Text Text)
lmrciAddtional
= lens _lmrciAddtional
(\ s a -> s{_lmrciAddtional = a})
. _Coerce
instance FromJSON LogMessageRequestClientInfo where
parseJSON
= withObject "LogMessageRequestClientInfo"
(\ o ->
LogMessageRequestClientInfo' <$> (parseJSONObject o))
instance ToJSON LogMessageRequestClientInfo where
toJSON = toJSON . _lmrciAddtional
data Lead = Lead'
{ _lGivenName :: !(Maybe Text)
, _lEmail :: !(Maybe Text)
, _lFamilyName :: !(Maybe Text)
, _lPhoneNumber :: !(Maybe Text)
, _lMinMonthlyBudget :: !(Maybe Money)
, _lId :: !(Maybe Text)
, _lComments :: !(Maybe Text)
, _lWebsiteURL :: !(Maybe Text)
, _lType :: !(Maybe Text)
, _lGpsMotivations :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
lead
:: Lead
lead =
Lead'
{ _lGivenName = Nothing
, _lEmail = Nothing
, _lFamilyName = Nothing
, _lPhoneNumber = Nothing
, _lMinMonthlyBudget = Nothing
, _lId = Nothing
, _lComments = Nothing
, _lWebsiteURL = Nothing
, _lType = Nothing
, _lGpsMotivations = Nothing
}
lGivenName :: Lens' Lead (Maybe Text)
lGivenName
= lens _lGivenName (\ s a -> s{_lGivenName = a})
lEmail :: Lens' Lead (Maybe Text)
lEmail = lens _lEmail (\ s a -> s{_lEmail = a})
lFamilyName :: Lens' Lead (Maybe Text)
lFamilyName
= lens _lFamilyName (\ s a -> s{_lFamilyName = a})
lPhoneNumber :: Lens' Lead (Maybe Text)
lPhoneNumber
= lens _lPhoneNumber (\ s a -> s{_lPhoneNumber = a})
lMinMonthlyBudget :: Lens' Lead (Maybe Money)
lMinMonthlyBudget
= lens _lMinMonthlyBudget
(\ s a -> s{_lMinMonthlyBudget = a})
lId :: Lens' Lead (Maybe Text)
lId = lens _lId (\ s a -> s{_lId = a})
lComments :: Lens' Lead (Maybe Text)
lComments
= lens _lComments (\ s a -> s{_lComments = a})
lWebsiteURL :: Lens' Lead (Maybe Text)
lWebsiteURL
= lens _lWebsiteURL (\ s a -> s{_lWebsiteURL = a})
lType :: Lens' Lead (Maybe Text)
lType = lens _lType (\ s a -> s{_lType = a})
lGpsMotivations :: Lens' Lead [Text]
lGpsMotivations
= lens _lGpsMotivations
(\ s a -> s{_lGpsMotivations = a})
. _Default
. _Coerce
instance FromJSON Lead where
parseJSON
= withObject "Lead"
(\ o ->
Lead' <$>
(o .:? "givenName") <*> (o .:? "email") <*>
(o .:? "familyName")
<*> (o .:? "phoneNumber")
<*> (o .:? "minMonthlyBudget")
<*> (o .:? "id")
<*> (o .:? "comments")
<*> (o .:? "websiteUrl")
<*> (o .:? "type")
<*> (o .:? "gpsMotivations" .!= mempty))
instance ToJSON Lead where
toJSON Lead'{..}
= object
(catMaybes
[("givenName" .=) <$> _lGivenName,
("email" .=) <$> _lEmail,
("familyName" .=) <$> _lFamilyName,
("phoneNumber" .=) <$> _lPhoneNumber,
("minMonthlyBudget" .=) <$> _lMinMonthlyBudget,
("id" .=) <$> _lId, ("comments" .=) <$> _lComments,
("websiteUrl" .=) <$> _lWebsiteURL,
("type" .=) <$> _lType,
("gpsMotivations" .=) <$> _lGpsMotivations])
newtype LogMessageResponse = LogMessageResponse'
{ _lmrResponseMetadata :: Maybe ResponseMetadata
} deriving (Eq,Show,Data,Typeable,Generic)
logMessageResponse
:: LogMessageResponse
logMessageResponse =
LogMessageResponse'
{ _lmrResponseMetadata = Nothing
}
lmrResponseMetadata :: Lens' LogMessageResponse (Maybe ResponseMetadata)
lmrResponseMetadata
= lens _lmrResponseMetadata
(\ s a -> s{_lmrResponseMetadata = a})
instance FromJSON LogMessageResponse where
parseJSON
= withObject "LogMessageResponse"
(\ o ->
LogMessageResponse' <$> (o .:? "responseMetadata"))
instance ToJSON LogMessageResponse where
toJSON LogMessageResponse'{..}
= object
(catMaybes
[("responseMetadata" .=) <$> _lmrResponseMetadata])
data Company = Company'
{ _cPublicProFile :: !(Maybe PublicProFile)
, _cOriginalMinMonthlyBudget :: !(Maybe Money)
, _cIndustries :: !(Maybe [Text])
, _cConvertedMinMonthlyBudget :: !(Maybe Money)
, _cName :: !(Maybe Text)
, _cLocalizedInfos :: !(Maybe [LocalizedCompanyInfo])
, _cCertificationStatuses :: !(Maybe [CertificationStatus])
, _cRanks :: !(Maybe [Rank])
, _cId :: !(Maybe Text)
, _cWebsiteURL :: !(Maybe Text)
, _cLocations :: !(Maybe [Location])
, _cServices :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
company
:: Company
company =
Company'
{ _cPublicProFile = Nothing
, _cOriginalMinMonthlyBudget = Nothing
, _cIndustries = Nothing
, _cConvertedMinMonthlyBudget = Nothing
, _cName = Nothing
, _cLocalizedInfos = Nothing
, _cCertificationStatuses = Nothing
, _cRanks = Nothing
, _cId = Nothing
, _cWebsiteURL = Nothing
, _cLocations = Nothing
, _cServices = Nothing
}
cPublicProFile :: Lens' Company (Maybe PublicProFile)
cPublicProFile
= lens _cPublicProFile
(\ s a -> s{_cPublicProFile = a})
cOriginalMinMonthlyBudget :: Lens' Company (Maybe Money)
cOriginalMinMonthlyBudget
= lens _cOriginalMinMonthlyBudget
(\ s a -> s{_cOriginalMinMonthlyBudget = a})
cIndustries :: Lens' Company [Text]
cIndustries
= lens _cIndustries (\ s a -> s{_cIndustries = a}) .
_Default
. _Coerce
cConvertedMinMonthlyBudget :: Lens' Company (Maybe Money)
cConvertedMinMonthlyBudget
= lens _cConvertedMinMonthlyBudget
(\ s a -> s{_cConvertedMinMonthlyBudget = a})
cName :: Lens' Company (Maybe Text)
cName = lens _cName (\ s a -> s{_cName = a})
cLocalizedInfos :: Lens' Company [LocalizedCompanyInfo]
cLocalizedInfos
= lens _cLocalizedInfos
(\ s a -> s{_cLocalizedInfos = a})
. _Default
. _Coerce
cCertificationStatuses :: Lens' Company [CertificationStatus]
cCertificationStatuses
= lens _cCertificationStatuses
(\ s a -> s{_cCertificationStatuses = a})
. _Default
. _Coerce
cRanks :: Lens' Company [Rank]
cRanks
= lens _cRanks (\ s a -> s{_cRanks = a}) . _Default .
_Coerce
cId :: Lens' Company (Maybe Text)
cId = lens _cId (\ s a -> s{_cId = a})
cWebsiteURL :: Lens' Company (Maybe Text)
cWebsiteURL
= lens _cWebsiteURL (\ s a -> s{_cWebsiteURL = a})
cLocations :: Lens' Company [Location]
cLocations
= lens _cLocations (\ s a -> s{_cLocations = a}) .
_Default
. _Coerce
cServices :: Lens' Company [Text]
cServices
= lens _cServices (\ s a -> s{_cServices = a}) .
_Default
. _Coerce
instance FromJSON Company where
parseJSON
= withObject "Company"
(\ o ->
Company' <$>
(o .:? "publicProfile") <*>
(o .:? "originalMinMonthlyBudget")
<*> (o .:? "industries" .!= mempty)
<*> (o .:? "convertedMinMonthlyBudget")
<*> (o .:? "name")
<*> (o .:? "localizedInfos" .!= mempty)
<*> (o .:? "certificationStatuses" .!= mempty)
<*> (o .:? "ranks" .!= mempty)
<*> (o .:? "id")
<*> (o .:? "websiteUrl")
<*> (o .:? "locations" .!= mempty)
<*> (o .:? "services" .!= mempty))
instance ToJSON Company where
toJSON Company'{..}
= object
(catMaybes
[("publicProfile" .=) <$> _cPublicProFile,
("originalMinMonthlyBudget" .=) <$>
_cOriginalMinMonthlyBudget,
("industries" .=) <$> _cIndustries,
("convertedMinMonthlyBudget" .=) <$>
_cConvertedMinMonthlyBudget,
("name" .=) <$> _cName,
("localizedInfos" .=) <$> _cLocalizedInfos,
("certificationStatuses" .=) <$>
_cCertificationStatuses,
("ranks" .=) <$> _cRanks, ("id" .=) <$> _cId,
("websiteUrl" .=) <$> _cWebsiteURL,
("locations" .=) <$> _cLocations,
("services" .=) <$> _cServices])
newtype LogUserEventResponse = LogUserEventResponse'
{ _luerResponseMetadata :: Maybe ResponseMetadata
} deriving (Eq,Show,Data,Typeable,Generic)
logUserEventResponse
:: LogUserEventResponse
logUserEventResponse =
LogUserEventResponse'
{ _luerResponseMetadata = Nothing
}
luerResponseMetadata :: Lens' LogUserEventResponse (Maybe ResponseMetadata)
luerResponseMetadata
= lens _luerResponseMetadata
(\ s a -> s{_luerResponseMetadata = a})
instance FromJSON LogUserEventResponse where
parseJSON
= withObject "LogUserEventResponse"
(\ o ->
LogUserEventResponse' <$> (o .:? "responseMetadata"))
instance ToJSON LogUserEventResponse where
toJSON LogUserEventResponse'{..}
= object
(catMaybes
[("responseMetadata" .=) <$> _luerResponseMetadata])
data LogUserEventRequest = LogUserEventRequest'
{ _luerEventCategory :: !(Maybe Text)
, _luerRequestMetadata :: !(Maybe RequestMetadata)
, _luerURL :: !(Maybe Text)
, _luerEventScope :: !(Maybe Text)
, _luerLead :: !(Maybe Lead)
, _luerEventDatas :: !(Maybe [EventData])
, _luerEventAction :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
logUserEventRequest
:: LogUserEventRequest
logUserEventRequest =
LogUserEventRequest'
{ _luerEventCategory = Nothing
, _luerRequestMetadata = Nothing
, _luerURL = Nothing
, _luerEventScope = Nothing
, _luerLead = Nothing
, _luerEventDatas = Nothing
, _luerEventAction = Nothing
}
luerEventCategory :: Lens' LogUserEventRequest (Maybe Text)
luerEventCategory
= lens _luerEventCategory
(\ s a -> s{_luerEventCategory = a})
luerRequestMetadata :: Lens' LogUserEventRequest (Maybe RequestMetadata)
luerRequestMetadata
= lens _luerRequestMetadata
(\ s a -> s{_luerRequestMetadata = a})
luerURL :: Lens' LogUserEventRequest (Maybe Text)
luerURL = lens _luerURL (\ s a -> s{_luerURL = a})
luerEventScope :: Lens' LogUserEventRequest (Maybe Text)
luerEventScope
= lens _luerEventScope
(\ s a -> s{_luerEventScope = a})
luerLead :: Lens' LogUserEventRequest (Maybe Lead)
luerLead = lens _luerLead (\ s a -> s{_luerLead = a})
luerEventDatas :: Lens' LogUserEventRequest [EventData]
luerEventDatas
= lens _luerEventDatas
(\ s a -> s{_luerEventDatas = a})
. _Default
. _Coerce
luerEventAction :: Lens' LogUserEventRequest (Maybe Text)
luerEventAction
= lens _luerEventAction
(\ s a -> s{_luerEventAction = a})
instance FromJSON LogUserEventRequest where
parseJSON
= withObject "LogUserEventRequest"
(\ o ->
LogUserEventRequest' <$>
(o .:? "eventCategory") <*> (o .:? "requestMetadata")
<*> (o .:? "url")
<*> (o .:? "eventScope")
<*> (o .:? "lead")
<*> (o .:? "eventDatas" .!= mempty)
<*> (o .:? "eventAction"))
instance ToJSON LogUserEventRequest where
toJSON LogUserEventRequest'{..}
= object
(catMaybes
[("eventCategory" .=) <$> _luerEventCategory,
("requestMetadata" .=) <$> _luerRequestMetadata,
("url" .=) <$> _luerURL,
("eventScope" .=) <$> _luerEventScope,
("lead" .=) <$> _luerLead,
("eventDatas" .=) <$> _luerEventDatas,
("eventAction" .=) <$> _luerEventAction])
data Rank = Rank'
{ _rValue :: !(Maybe (Textual Double))
, _rType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
rank
:: Rank
rank =
Rank'
{ _rValue = Nothing
, _rType = Nothing
}
rValue :: Lens' Rank (Maybe Double)
rValue
= lens _rValue (\ s a -> s{_rValue = a}) .
mapping _Coerce
rType :: Lens' Rank (Maybe Text)
rType = lens _rType (\ s a -> s{_rType = a})
instance FromJSON Rank where
parseJSON
= withObject "Rank"
(\ o -> Rank' <$> (o .:? "value") <*> (o .:? "type"))
instance ToJSON Rank where
toJSON Rank'{..}
= object
(catMaybes
[("value" .=) <$> _rValue, ("type" .=) <$> _rType])
data CreateLeadRequest = CreateLeadRequest'
{ _cRequestMetadata :: !(Maybe RequestMetadata)
, _cRecaptchaChallenge :: !(Maybe RecaptchaChallenge)
, _cLead :: !(Maybe Lead)
} deriving (Eq,Show,Data,Typeable,Generic)
createLeadRequest
:: CreateLeadRequest
createLeadRequest =
CreateLeadRequest'
{ _cRequestMetadata = Nothing
, _cRecaptchaChallenge = Nothing
, _cLead = Nothing
}
cRequestMetadata :: Lens' CreateLeadRequest (Maybe RequestMetadata)
cRequestMetadata
= lens _cRequestMetadata
(\ s a -> s{_cRequestMetadata = a})
cRecaptchaChallenge :: Lens' CreateLeadRequest (Maybe RecaptchaChallenge)
cRecaptchaChallenge
= lens _cRecaptchaChallenge
(\ s a -> s{_cRecaptchaChallenge = a})
cLead :: Lens' CreateLeadRequest (Maybe Lead)
cLead = lens _cLead (\ s a -> s{_cLead = a})
instance FromJSON CreateLeadRequest where
parseJSON
= withObject "CreateLeadRequest"
(\ o ->
CreateLeadRequest' <$>
(o .:? "requestMetadata") <*>
(o .:? "recaptchaChallenge")
<*> (o .:? "lead"))
instance ToJSON CreateLeadRequest where
toJSON CreateLeadRequest'{..}
= object
(catMaybes
[("requestMetadata" .=) <$> _cRequestMetadata,
("recaptchaChallenge" .=) <$> _cRecaptchaChallenge,
("lead" .=) <$> _cLead])