{-# 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.Vision.Types.Product where
import Network.Google.Prelude
import Network.Google.Vision.Types.Sum
data GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation = GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation'
{ _gcvvloaLanguageCode :: !(Maybe Text)
, _gcvvloaScore :: !(Maybe (Textual Double))
, _gcvvloaBoundingPoly :: !(Maybe GoogleCloudVisionV1p1beta1BoundingPoly)
, _gcvvloaName :: !(Maybe Text)
, _gcvvloaMid :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1LocalizedObjectAnnotation
:: GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation
googleCloudVisionV1p1beta1LocalizedObjectAnnotation =
GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation'
{ _gcvvloaLanguageCode = Nothing
, _gcvvloaScore = Nothing
, _gcvvloaBoundingPoly = Nothing
, _gcvvloaName = Nothing
, _gcvvloaMid = Nothing
}
gcvvloaLanguageCode :: Lens' GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation (Maybe Text)
gcvvloaLanguageCode
= lens _gcvvloaLanguageCode
(\ s a -> s{_gcvvloaLanguageCode = a})
gcvvloaScore :: Lens' GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation (Maybe Double)
gcvvloaScore
= lens _gcvvloaScore (\ s a -> s{_gcvvloaScore = a})
. mapping _Coerce
gcvvloaBoundingPoly :: Lens' GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation (Maybe GoogleCloudVisionV1p1beta1BoundingPoly)
gcvvloaBoundingPoly
= lens _gcvvloaBoundingPoly
(\ s a -> s{_gcvvloaBoundingPoly = a})
gcvvloaName :: Lens' GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation (Maybe Text)
gcvvloaName
= lens _gcvvloaName (\ s a -> s{_gcvvloaName = a})
gcvvloaMid :: Lens' GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation (Maybe Text)
gcvvloaMid
= lens _gcvvloaMid (\ s a -> s{_gcvvloaMid = a})
instance FromJSON
GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation
where
parseJSON
= withObject
"GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation"
(\ o ->
GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation'
<$>
(o .:? "languageCode") <*> (o .:? "score") <*>
(o .:? "boundingPoly")
<*> (o .:? "name")
<*> (o .:? "mid"))
instance ToJSON
GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation
where
toJSON
GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation'{..}
= object
(catMaybes
[("languageCode" .=) <$> _gcvvloaLanguageCode,
("score" .=) <$> _gcvvloaScore,
("boundingPoly" .=) <$> _gcvvloaBoundingPoly,
("name" .=) <$> _gcvvloaName,
("mid" .=) <$> _gcvvloaMid])
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 GoogleCloudVisionV1p1beta1OutputConfig = GoogleCloudVisionV1p1beta1OutputConfig'
{ _gcvvocGcsDestination :: !(Maybe GoogleCloudVisionV1p1beta1GcsDestination)
, _gcvvocBatchSize :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1OutputConfig
:: GoogleCloudVisionV1p1beta1OutputConfig
googleCloudVisionV1p1beta1OutputConfig =
GoogleCloudVisionV1p1beta1OutputConfig'
{ _gcvvocGcsDestination = Nothing
, _gcvvocBatchSize = Nothing
}
gcvvocGcsDestination :: Lens' GoogleCloudVisionV1p1beta1OutputConfig (Maybe GoogleCloudVisionV1p1beta1GcsDestination)
gcvvocGcsDestination
= lens _gcvvocGcsDestination
(\ s a -> s{_gcvvocGcsDestination = a})
gcvvocBatchSize :: Lens' GoogleCloudVisionV1p1beta1OutputConfig (Maybe Int32)
gcvvocBatchSize
= lens _gcvvocBatchSize
(\ s a -> s{_gcvvocBatchSize = a})
. mapping _Coerce
instance FromJSON
GoogleCloudVisionV1p1beta1OutputConfig where
parseJSON
= withObject "GoogleCloudVisionV1p1beta1OutputConfig"
(\ o ->
GoogleCloudVisionV1p1beta1OutputConfig' <$>
(o .:? "gcsDestination") <*> (o .:? "batchSize"))
instance ToJSON
GoogleCloudVisionV1p1beta1OutputConfig where
toJSON GoogleCloudVisionV1p1beta1OutputConfig'{..}
= object
(catMaybes
[("gcsDestination" .=) <$> _gcvvocGcsDestination,
("batchSize" .=) <$> _gcvvocBatchSize])
data GoogleCloudVisionV1p3beta1ProductKeyValue = GoogleCloudVisionV1p3beta1ProductKeyValue'
{ _gcvvpkvValue :: !(Maybe Text)
, _gcvvpkvKey :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1ProductKeyValue
:: GoogleCloudVisionV1p3beta1ProductKeyValue
googleCloudVisionV1p3beta1ProductKeyValue =
GoogleCloudVisionV1p3beta1ProductKeyValue'
{ _gcvvpkvValue = Nothing
, _gcvvpkvKey = Nothing
}
gcvvpkvValue :: Lens' GoogleCloudVisionV1p3beta1ProductKeyValue (Maybe Text)
gcvvpkvValue
= lens _gcvvpkvValue (\ s a -> s{_gcvvpkvValue = a})
gcvvpkvKey :: Lens' GoogleCloudVisionV1p3beta1ProductKeyValue (Maybe Text)
gcvvpkvKey
= lens _gcvvpkvKey (\ s a -> s{_gcvvpkvKey = a})
instance FromJSON
GoogleCloudVisionV1p3beta1ProductKeyValue where
parseJSON
= withObject
"GoogleCloudVisionV1p3beta1ProductKeyValue"
(\ o ->
GoogleCloudVisionV1p3beta1ProductKeyValue' <$>
(o .:? "value") <*> (o .:? "key"))
instance ToJSON
GoogleCloudVisionV1p3beta1ProductKeyValue where
toJSON GoogleCloudVisionV1p3beta1ProductKeyValue'{..}
= object
(catMaybes
[("value" .=) <$> _gcvvpkvValue,
("key" .=) <$> _gcvvpkvKey])
newtype GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse = GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse'
{ _gcvvabafrResponses :: Maybe [GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse]
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse
:: GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse
googleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse =
GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse'
{ _gcvvabafrResponses = Nothing
}
gcvvabafrResponses :: Lens' GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse [GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse]
gcvvabafrResponses
= lens _gcvvabafrResponses
(\ s a -> s{_gcvvabafrResponses = a})
. _Default
. _Coerce
instance FromJSON
GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse
where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse"
(\ o ->
GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse'
<$> (o .:? "responses" .!= mempty))
instance ToJSON
GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse
where
toJSON
GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse'{..}
= object
(catMaybes
[("responses" .=) <$> _gcvvabafrResponses])
data GoogleCloudVisionV1p3beta1ImageAnnotationContext = GoogleCloudVisionV1p3beta1ImageAnnotationContext'
{ _gcvviacURI :: !(Maybe Text)
, _gcvviacPageNumber :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1ImageAnnotationContext
:: GoogleCloudVisionV1p3beta1ImageAnnotationContext
googleCloudVisionV1p3beta1ImageAnnotationContext =
GoogleCloudVisionV1p3beta1ImageAnnotationContext'
{ _gcvviacURI = Nothing
, _gcvviacPageNumber = Nothing
}
gcvviacURI :: Lens' GoogleCloudVisionV1p3beta1ImageAnnotationContext (Maybe Text)
gcvviacURI
= lens _gcvviacURI (\ s a -> s{_gcvviacURI = a})
gcvviacPageNumber :: Lens' GoogleCloudVisionV1p3beta1ImageAnnotationContext (Maybe Int32)
gcvviacPageNumber
= lens _gcvviacPageNumber
(\ s a -> s{_gcvviacPageNumber = a})
. mapping _Coerce
instance FromJSON
GoogleCloudVisionV1p3beta1ImageAnnotationContext
where
parseJSON
= withObject
"GoogleCloudVisionV1p3beta1ImageAnnotationContext"
(\ o ->
GoogleCloudVisionV1p3beta1ImageAnnotationContext' <$>
(o .:? "uri") <*> (o .:? "pageNumber"))
instance ToJSON
GoogleCloudVisionV1p3beta1ImageAnnotationContext
where
toJSON
GoogleCloudVisionV1p3beta1ImageAnnotationContext'{..}
= object
(catMaybes
[("uri" .=) <$> _gcvviacURI,
("pageNumber" .=) <$> _gcvviacPageNumber])
data GoogleCloudVisionV1p3beta1Property = GoogleCloudVisionV1p3beta1Property'
{ _gcvvpUint64Value :: !(Maybe (Textual Word64))
, _gcvvpValue :: !(Maybe Text)
, _gcvvpName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1Property
:: GoogleCloudVisionV1p3beta1Property
googleCloudVisionV1p3beta1Property =
GoogleCloudVisionV1p3beta1Property'
{ _gcvvpUint64Value = Nothing
, _gcvvpValue = Nothing
, _gcvvpName = Nothing
}
gcvvpUint64Value :: Lens' GoogleCloudVisionV1p3beta1Property (Maybe Word64)
gcvvpUint64Value
= lens _gcvvpUint64Value
(\ s a -> s{_gcvvpUint64Value = a})
. mapping _Coerce
gcvvpValue :: Lens' GoogleCloudVisionV1p3beta1Property (Maybe Text)
gcvvpValue
= lens _gcvvpValue (\ s a -> s{_gcvvpValue = a})
gcvvpName :: Lens' GoogleCloudVisionV1p3beta1Property (Maybe Text)
gcvvpName
= lens _gcvvpName (\ s a -> s{_gcvvpName = a})
instance FromJSON GoogleCloudVisionV1p3beta1Property
where
parseJSON
= withObject "GoogleCloudVisionV1p3beta1Property"
(\ o ->
GoogleCloudVisionV1p3beta1Property' <$>
(o .:? "uint64Value") <*> (o .:? "value") <*>
(o .:? "name"))
instance ToJSON GoogleCloudVisionV1p3beta1Property
where
toJSON GoogleCloudVisionV1p3beta1Property'{..}
= object
(catMaybes
[("uint64Value" .=) <$> _gcvvpUint64Value,
("value" .=) <$> _gcvvpValue,
("name" .=) <$> _gcvvpName])
data GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage = GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage'
{ _gcvvtadlLanguageCode :: !(Maybe Text)
, _gcvvtadlConfidence :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1TextAnnotationDetectedLanguage
:: GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage
googleCloudVisionV1p2beta1TextAnnotationDetectedLanguage =
GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage'
{ _gcvvtadlLanguageCode = Nothing
, _gcvvtadlConfidence = Nothing
}
gcvvtadlLanguageCode :: Lens' GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage (Maybe Text)
gcvvtadlLanguageCode
= lens _gcvvtadlLanguageCode
(\ s a -> s{_gcvvtadlLanguageCode = a})
gcvvtadlConfidence :: Lens' GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage (Maybe Double)
gcvvtadlConfidence
= lens _gcvvtadlConfidence
(\ s a -> s{_gcvvtadlConfidence = a})
. mapping _Coerce
instance FromJSON
GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage
where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage"
(\ o ->
GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage'
<$> (o .:? "languageCode") <*> (o .:? "confidence"))
instance ToJSON
GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage
where
toJSON
GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage'{..}
= object
(catMaybes
[("languageCode" .=) <$> _gcvvtadlLanguageCode,
("confidence" .=) <$> _gcvvtadlConfidence])
data KeyValue = KeyValue'
{ _kvValue :: !(Maybe Text)
, _kvKey :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
keyValue
:: KeyValue
keyValue =
KeyValue'
{ _kvValue = Nothing
, _kvKey = Nothing
}
kvValue :: Lens' KeyValue (Maybe Text)
kvValue = lens _kvValue (\ s a -> s{_kvValue = a})
kvKey :: Lens' KeyValue (Maybe Text)
kvKey = lens _kvKey (\ s a -> s{_kvKey = a})
instance FromJSON KeyValue where
parseJSON
= withObject "KeyValue"
(\ o ->
KeyValue' <$> (o .:? "value") <*> (o .:? "key"))
instance ToJSON KeyValue where
toJSON KeyValue'{..}
= object
(catMaybes
[("value" .=) <$> _kvValue, ("key" .=) <$> _kvKey])
data GoogleCloudVisionV1p2beta1AnnotateImageResponse = GoogleCloudVisionV1p2beta1AnnotateImageResponse'
{ _gcvvairLogoAnnotations :: !(Maybe [GoogleCloudVisionV1p2beta1EntityAnnotation])
, _gcvvairProductSearchResults :: !(Maybe GoogleCloudVisionV1p2beta1ProductSearchResults)
, _gcvvairContext :: !(Maybe GoogleCloudVisionV1p2beta1ImageAnnotationContext)
, _gcvvairLabelAnnotations :: !(Maybe [GoogleCloudVisionV1p2beta1EntityAnnotation])
, _gcvvairFaceAnnotations :: !(Maybe [GoogleCloudVisionV1p2beta1FaceAnnotation])
, _gcvvairError :: !(Maybe Status)
, _gcvvairWebDetection :: !(Maybe GoogleCloudVisionV1p2beta1WebDetection)
, _gcvvairSafeSearchAnnotation :: !(Maybe GoogleCloudVisionV1p2beta1SafeSearchAnnotation)
, _gcvvairLandmarkAnnotations :: !(Maybe [GoogleCloudVisionV1p2beta1EntityAnnotation])
, _gcvvairLocalizedObjectAnnotations :: !(Maybe [GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation])
, _gcvvairTextAnnotations :: !(Maybe [GoogleCloudVisionV1p2beta1EntityAnnotation])
, _gcvvairCropHintsAnnotation :: !(Maybe GoogleCloudVisionV1p2beta1CropHintsAnnotation)
, _gcvvairFullTextAnnotation :: !(Maybe GoogleCloudVisionV1p2beta1TextAnnotation)
, _gcvvairImagePropertiesAnnotation :: !(Maybe GoogleCloudVisionV1p2beta1ImageProperties)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1AnnotateImageResponse
:: GoogleCloudVisionV1p2beta1AnnotateImageResponse
googleCloudVisionV1p2beta1AnnotateImageResponse =
GoogleCloudVisionV1p2beta1AnnotateImageResponse'
{ _gcvvairLogoAnnotations = Nothing
, _gcvvairProductSearchResults = Nothing
, _gcvvairContext = Nothing
, _gcvvairLabelAnnotations = Nothing
, _gcvvairFaceAnnotations = Nothing
, _gcvvairError = Nothing
, _gcvvairWebDetection = Nothing
, _gcvvairSafeSearchAnnotation = Nothing
, _gcvvairLandmarkAnnotations = Nothing
, _gcvvairLocalizedObjectAnnotations = Nothing
, _gcvvairTextAnnotations = Nothing
, _gcvvairCropHintsAnnotation = Nothing
, _gcvvairFullTextAnnotation = Nothing
, _gcvvairImagePropertiesAnnotation = Nothing
}
gcvvairLogoAnnotations :: Lens' GoogleCloudVisionV1p2beta1AnnotateImageResponse [GoogleCloudVisionV1p2beta1EntityAnnotation]
gcvvairLogoAnnotations
= lens _gcvvairLogoAnnotations
(\ s a -> s{_gcvvairLogoAnnotations = a})
. _Default
. _Coerce
gcvvairProductSearchResults :: Lens' GoogleCloudVisionV1p2beta1AnnotateImageResponse (Maybe GoogleCloudVisionV1p2beta1ProductSearchResults)
gcvvairProductSearchResults
= lens _gcvvairProductSearchResults
(\ s a -> s{_gcvvairProductSearchResults = a})
gcvvairContext :: Lens' GoogleCloudVisionV1p2beta1AnnotateImageResponse (Maybe GoogleCloudVisionV1p2beta1ImageAnnotationContext)
gcvvairContext
= lens _gcvvairContext
(\ s a -> s{_gcvvairContext = a})
gcvvairLabelAnnotations :: Lens' GoogleCloudVisionV1p2beta1AnnotateImageResponse [GoogleCloudVisionV1p2beta1EntityAnnotation]
gcvvairLabelAnnotations
= lens _gcvvairLabelAnnotations
(\ s a -> s{_gcvvairLabelAnnotations = a})
. _Default
. _Coerce
gcvvairFaceAnnotations :: Lens' GoogleCloudVisionV1p2beta1AnnotateImageResponse [GoogleCloudVisionV1p2beta1FaceAnnotation]
gcvvairFaceAnnotations
= lens _gcvvairFaceAnnotations
(\ s a -> s{_gcvvairFaceAnnotations = a})
. _Default
. _Coerce
gcvvairError :: Lens' GoogleCloudVisionV1p2beta1AnnotateImageResponse (Maybe Status)
gcvvairError
= lens _gcvvairError (\ s a -> s{_gcvvairError = a})
gcvvairWebDetection :: Lens' GoogleCloudVisionV1p2beta1AnnotateImageResponse (Maybe GoogleCloudVisionV1p2beta1WebDetection)
gcvvairWebDetection
= lens _gcvvairWebDetection
(\ s a -> s{_gcvvairWebDetection = a})
gcvvairSafeSearchAnnotation :: Lens' GoogleCloudVisionV1p2beta1AnnotateImageResponse (Maybe GoogleCloudVisionV1p2beta1SafeSearchAnnotation)
gcvvairSafeSearchAnnotation
= lens _gcvvairSafeSearchAnnotation
(\ s a -> s{_gcvvairSafeSearchAnnotation = a})
gcvvairLandmarkAnnotations :: Lens' GoogleCloudVisionV1p2beta1AnnotateImageResponse [GoogleCloudVisionV1p2beta1EntityAnnotation]
gcvvairLandmarkAnnotations
= lens _gcvvairLandmarkAnnotations
(\ s a -> s{_gcvvairLandmarkAnnotations = a})
. _Default
. _Coerce
gcvvairLocalizedObjectAnnotations :: Lens' GoogleCloudVisionV1p2beta1AnnotateImageResponse [GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation]
gcvvairLocalizedObjectAnnotations
= lens _gcvvairLocalizedObjectAnnotations
(\ s a -> s{_gcvvairLocalizedObjectAnnotations = a})
. _Default
. _Coerce
gcvvairTextAnnotations :: Lens' GoogleCloudVisionV1p2beta1AnnotateImageResponse [GoogleCloudVisionV1p2beta1EntityAnnotation]
gcvvairTextAnnotations
= lens _gcvvairTextAnnotations
(\ s a -> s{_gcvvairTextAnnotations = a})
. _Default
. _Coerce
gcvvairCropHintsAnnotation :: Lens' GoogleCloudVisionV1p2beta1AnnotateImageResponse (Maybe GoogleCloudVisionV1p2beta1CropHintsAnnotation)
gcvvairCropHintsAnnotation
= lens _gcvvairCropHintsAnnotation
(\ s a -> s{_gcvvairCropHintsAnnotation = a})
gcvvairFullTextAnnotation :: Lens' GoogleCloudVisionV1p2beta1AnnotateImageResponse (Maybe GoogleCloudVisionV1p2beta1TextAnnotation)
gcvvairFullTextAnnotation
= lens _gcvvairFullTextAnnotation
(\ s a -> s{_gcvvairFullTextAnnotation = a})
gcvvairImagePropertiesAnnotation :: Lens' GoogleCloudVisionV1p2beta1AnnotateImageResponse (Maybe GoogleCloudVisionV1p2beta1ImageProperties)
gcvvairImagePropertiesAnnotation
= lens _gcvvairImagePropertiesAnnotation
(\ s a -> s{_gcvvairImagePropertiesAnnotation = a})
instance FromJSON
GoogleCloudVisionV1p2beta1AnnotateImageResponse where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1AnnotateImageResponse"
(\ o ->
GoogleCloudVisionV1p2beta1AnnotateImageResponse' <$>
(o .:? "logoAnnotations" .!= mempty) <*>
(o .:? "productSearchResults")
<*> (o .:? "context")
<*> (o .:? "labelAnnotations" .!= mempty)
<*> (o .:? "faceAnnotations" .!= mempty)
<*> (o .:? "error")
<*> (o .:? "webDetection")
<*> (o .:? "safeSearchAnnotation")
<*> (o .:? "landmarkAnnotations" .!= mempty)
<*> (o .:? "localizedObjectAnnotations" .!= mempty)
<*> (o .:? "textAnnotations" .!= mempty)
<*> (o .:? "cropHintsAnnotation")
<*> (o .:? "fullTextAnnotation")
<*> (o .:? "imagePropertiesAnnotation"))
instance ToJSON
GoogleCloudVisionV1p2beta1AnnotateImageResponse where
toJSON
GoogleCloudVisionV1p2beta1AnnotateImageResponse'{..}
= object
(catMaybes
[("logoAnnotations" .=) <$> _gcvvairLogoAnnotations,
("productSearchResults" .=) <$>
_gcvvairProductSearchResults,
("context" .=) <$> _gcvvairContext,
("labelAnnotations" .=) <$> _gcvvairLabelAnnotations,
("faceAnnotations" .=) <$> _gcvvairFaceAnnotations,
("error" .=) <$> _gcvvairError,
("webDetection" .=) <$> _gcvvairWebDetection,
("safeSearchAnnotation" .=) <$>
_gcvvairSafeSearchAnnotation,
("landmarkAnnotations" .=) <$>
_gcvvairLandmarkAnnotations,
("localizedObjectAnnotations" .=) <$>
_gcvvairLocalizedObjectAnnotations,
("textAnnotations" .=) <$> _gcvvairTextAnnotations,
("cropHintsAnnotation" .=) <$>
_gcvvairCropHintsAnnotation,
("fullTextAnnotation" .=) <$>
_gcvvairFullTextAnnotation,
("imagePropertiesAnnotation" .=) <$>
_gcvvairImagePropertiesAnnotation])
data ImportProductSetsResponse = ImportProductSetsResponse'
{ _ipsrReferenceImages :: !(Maybe [ReferenceImage])
, _ipsrStatuses :: !(Maybe [Status])
} deriving (Eq,Show,Data,Typeable,Generic)
importProductSetsResponse
:: ImportProductSetsResponse
importProductSetsResponse =
ImportProductSetsResponse'
{ _ipsrReferenceImages = Nothing
, _ipsrStatuses = Nothing
}
ipsrReferenceImages :: Lens' ImportProductSetsResponse [ReferenceImage]
ipsrReferenceImages
= lens _ipsrReferenceImages
(\ s a -> s{_ipsrReferenceImages = a})
. _Default
. _Coerce
ipsrStatuses :: Lens' ImportProductSetsResponse [Status]
ipsrStatuses
= lens _ipsrStatuses (\ s a -> s{_ipsrStatuses = a})
. _Default
. _Coerce
instance FromJSON ImportProductSetsResponse where
parseJSON
= withObject "ImportProductSetsResponse"
(\ o ->
ImportProductSetsResponse' <$>
(o .:? "referenceImages" .!= mempty) <*>
(o .:? "statuses" .!= mempty))
instance ToJSON ImportProductSetsResponse where
toJSON ImportProductSetsResponse'{..}
= object
(catMaybes
[("referenceImages" .=) <$> _ipsrReferenceImages,
("statuses" .=) <$> _ipsrStatuses])
data GoogleCloudVisionV1p2beta1Symbol = GoogleCloudVisionV1p2beta1Symbol'
{ _gcvvsProperty :: !(Maybe GoogleCloudVisionV1p2beta1TextAnnotationTextProperty)
, _gcvvsBoundingBox :: !(Maybe GoogleCloudVisionV1p2beta1BoundingPoly)
, _gcvvsText :: !(Maybe Text)
, _gcvvsConfidence :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1Symbol
:: GoogleCloudVisionV1p2beta1Symbol
googleCloudVisionV1p2beta1Symbol =
GoogleCloudVisionV1p2beta1Symbol'
{ _gcvvsProperty = Nothing
, _gcvvsBoundingBox = Nothing
, _gcvvsText = Nothing
, _gcvvsConfidence = Nothing
}
gcvvsProperty :: Lens' GoogleCloudVisionV1p2beta1Symbol (Maybe GoogleCloudVisionV1p2beta1TextAnnotationTextProperty)
gcvvsProperty
= lens _gcvvsProperty
(\ s a -> s{_gcvvsProperty = a})
gcvvsBoundingBox :: Lens' GoogleCloudVisionV1p2beta1Symbol (Maybe GoogleCloudVisionV1p2beta1BoundingPoly)
gcvvsBoundingBox
= lens _gcvvsBoundingBox
(\ s a -> s{_gcvvsBoundingBox = a})
gcvvsText :: Lens' GoogleCloudVisionV1p2beta1Symbol (Maybe Text)
gcvvsText
= lens _gcvvsText (\ s a -> s{_gcvvsText = a})
gcvvsConfidence :: Lens' GoogleCloudVisionV1p2beta1Symbol (Maybe Double)
gcvvsConfidence
= lens _gcvvsConfidence
(\ s a -> s{_gcvvsConfidence = a})
. mapping _Coerce
instance FromJSON GoogleCloudVisionV1p2beta1Symbol
where
parseJSON
= withObject "GoogleCloudVisionV1p2beta1Symbol"
(\ o ->
GoogleCloudVisionV1p2beta1Symbol' <$>
(o .:? "property") <*> (o .:? "boundingBox") <*>
(o .:? "text")
<*> (o .:? "confidence"))
instance ToJSON GoogleCloudVisionV1p2beta1Symbol
where
toJSON GoogleCloudVisionV1p2beta1Symbol'{..}
= object
(catMaybes
[("property" .=) <$> _gcvvsProperty,
("boundingBox" .=) <$> _gcvvsBoundingBox,
("text" .=) <$> _gcvvsText,
("confidence" .=) <$> _gcvvsConfidence])
data GoogleCloudVisionV1p2beta1Paragraph = GoogleCloudVisionV1p2beta1Paragraph'
{ _gcvvpProperty :: !(Maybe GoogleCloudVisionV1p2beta1TextAnnotationTextProperty)
, _gcvvpBoundingBox :: !(Maybe GoogleCloudVisionV1p2beta1BoundingPoly)
, _gcvvpConfidence :: !(Maybe (Textual Double))
, _gcvvpWords :: !(Maybe [GoogleCloudVisionV1p2beta1Word])
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1Paragraph
:: GoogleCloudVisionV1p2beta1Paragraph
googleCloudVisionV1p2beta1Paragraph =
GoogleCloudVisionV1p2beta1Paragraph'
{ _gcvvpProperty = Nothing
, _gcvvpBoundingBox = Nothing
, _gcvvpConfidence = Nothing
, _gcvvpWords = Nothing
}
gcvvpProperty :: Lens' GoogleCloudVisionV1p2beta1Paragraph (Maybe GoogleCloudVisionV1p2beta1TextAnnotationTextProperty)
gcvvpProperty
= lens _gcvvpProperty
(\ s a -> s{_gcvvpProperty = a})
gcvvpBoundingBox :: Lens' GoogleCloudVisionV1p2beta1Paragraph (Maybe GoogleCloudVisionV1p2beta1BoundingPoly)
gcvvpBoundingBox
= lens _gcvvpBoundingBox
(\ s a -> s{_gcvvpBoundingBox = a})
gcvvpConfidence :: Lens' GoogleCloudVisionV1p2beta1Paragraph (Maybe Double)
gcvvpConfidence
= lens _gcvvpConfidence
(\ s a -> s{_gcvvpConfidence = a})
. mapping _Coerce
gcvvpWords :: Lens' GoogleCloudVisionV1p2beta1Paragraph [GoogleCloudVisionV1p2beta1Word]
gcvvpWords
= lens _gcvvpWords (\ s a -> s{_gcvvpWords = a}) .
_Default
. _Coerce
instance FromJSON GoogleCloudVisionV1p2beta1Paragraph
where
parseJSON
= withObject "GoogleCloudVisionV1p2beta1Paragraph"
(\ o ->
GoogleCloudVisionV1p2beta1Paragraph' <$>
(o .:? "property") <*> (o .:? "boundingBox") <*>
(o .:? "confidence")
<*> (o .:? "words" .!= mempty))
instance ToJSON GoogleCloudVisionV1p2beta1Paragraph
where
toJSON GoogleCloudVisionV1p2beta1Paragraph'{..}
= object
(catMaybes
[("property" .=) <$> _gcvvpProperty,
("boundingBox" .=) <$> _gcvvpBoundingBox,
("confidence" .=) <$> _gcvvpConfidence,
("words" .=) <$> _gcvvpWords])
data Status = Status'
{ _sDetails :: !(Maybe [StatusDetailsItem])
, _sCode :: !(Maybe (Textual Int32))
, _sMessage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
status
:: Status
status =
Status'
{ _sDetails = Nothing
, _sCode = Nothing
, _sMessage = Nothing
}
sDetails :: Lens' Status [StatusDetailsItem]
sDetails
= lens _sDetails (\ s a -> s{_sDetails = a}) .
_Default
. _Coerce
sCode :: Lens' Status (Maybe Int32)
sCode
= lens _sCode (\ s a -> s{_sCode = a}) .
mapping _Coerce
sMessage :: Lens' Status (Maybe Text)
sMessage = lens _sMessage (\ s a -> s{_sMessage = a})
instance FromJSON Status where
parseJSON
= withObject "Status"
(\ o ->
Status' <$>
(o .:? "details" .!= mempty) <*> (o .:? "code") <*>
(o .:? "message"))
instance ToJSON Status where
toJSON Status'{..}
= object
(catMaybes
[("details" .=) <$> _sDetails,
("code" .=) <$> _sCode,
("message" .=) <$> _sMessage])
data GoogleCloudVisionV1p2beta1FaceAnnotation = GoogleCloudVisionV1p2beta1FaceAnnotation'
{ _gcvvfaTiltAngle :: !(Maybe (Textual Double))
, _gcvvfaBlurredLikelihood :: !(Maybe GoogleCloudVisionV1p2beta1FaceAnnotationBlurredLikelihood)
, _gcvvfaBoundingPoly :: !(Maybe GoogleCloudVisionV1p2beta1BoundingPoly)
, _gcvvfaSurpriseLikelihood :: !(Maybe GoogleCloudVisionV1p2beta1FaceAnnotationSurpriseLikelihood)
, _gcvvfaLandmarkingConfidence :: !(Maybe (Textual Double))
, _gcvvfaPanAngle :: !(Maybe (Textual Double))
, _gcvvfaRollAngle :: !(Maybe (Textual Double))
, _gcvvfaUnderExposedLikelihood :: !(Maybe GoogleCloudVisionV1p2beta1FaceAnnotationUnderExposedLikelihood)
, _gcvvfaFdBoundingPoly :: !(Maybe GoogleCloudVisionV1p2beta1BoundingPoly)
, _gcvvfaAngerLikelihood :: !(Maybe GoogleCloudVisionV1p2beta1FaceAnnotationAngerLikelihood)
, _gcvvfaDetectionConfidence :: !(Maybe (Textual Double))
, _gcvvfaHeadwearLikelihood :: !(Maybe GoogleCloudVisionV1p2beta1FaceAnnotationHeadwearLikelihood)
, _gcvvfaSorrowLikelihood :: !(Maybe GoogleCloudVisionV1p2beta1FaceAnnotationSorrowLikelihood)
, _gcvvfaJoyLikelihood :: !(Maybe GoogleCloudVisionV1p2beta1FaceAnnotationJoyLikelihood)
, _gcvvfaLandmarks :: !(Maybe [GoogleCloudVisionV1p2beta1FaceAnnotationLandmark])
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1FaceAnnotation
:: GoogleCloudVisionV1p2beta1FaceAnnotation
googleCloudVisionV1p2beta1FaceAnnotation =
GoogleCloudVisionV1p2beta1FaceAnnotation'
{ _gcvvfaTiltAngle = Nothing
, _gcvvfaBlurredLikelihood = Nothing
, _gcvvfaBoundingPoly = Nothing
, _gcvvfaSurpriseLikelihood = Nothing
, _gcvvfaLandmarkingConfidence = Nothing
, _gcvvfaPanAngle = Nothing
, _gcvvfaRollAngle = Nothing
, _gcvvfaUnderExposedLikelihood = Nothing
, _gcvvfaFdBoundingPoly = Nothing
, _gcvvfaAngerLikelihood = Nothing
, _gcvvfaDetectionConfidence = Nothing
, _gcvvfaHeadwearLikelihood = Nothing
, _gcvvfaSorrowLikelihood = Nothing
, _gcvvfaJoyLikelihood = Nothing
, _gcvvfaLandmarks = Nothing
}
gcvvfaTiltAngle :: Lens' GoogleCloudVisionV1p2beta1FaceAnnotation (Maybe Double)
gcvvfaTiltAngle
= lens _gcvvfaTiltAngle
(\ s a -> s{_gcvvfaTiltAngle = a})
. mapping _Coerce
gcvvfaBlurredLikelihood :: Lens' GoogleCloudVisionV1p2beta1FaceAnnotation (Maybe GoogleCloudVisionV1p2beta1FaceAnnotationBlurredLikelihood)
gcvvfaBlurredLikelihood
= lens _gcvvfaBlurredLikelihood
(\ s a -> s{_gcvvfaBlurredLikelihood = a})
gcvvfaBoundingPoly :: Lens' GoogleCloudVisionV1p2beta1FaceAnnotation (Maybe GoogleCloudVisionV1p2beta1BoundingPoly)
gcvvfaBoundingPoly
= lens _gcvvfaBoundingPoly
(\ s a -> s{_gcvvfaBoundingPoly = a})
gcvvfaSurpriseLikelihood :: Lens' GoogleCloudVisionV1p2beta1FaceAnnotation (Maybe GoogleCloudVisionV1p2beta1FaceAnnotationSurpriseLikelihood)
gcvvfaSurpriseLikelihood
= lens _gcvvfaSurpriseLikelihood
(\ s a -> s{_gcvvfaSurpriseLikelihood = a})
gcvvfaLandmarkingConfidence :: Lens' GoogleCloudVisionV1p2beta1FaceAnnotation (Maybe Double)
gcvvfaLandmarkingConfidence
= lens _gcvvfaLandmarkingConfidence
(\ s a -> s{_gcvvfaLandmarkingConfidence = a})
. mapping _Coerce
gcvvfaPanAngle :: Lens' GoogleCloudVisionV1p2beta1FaceAnnotation (Maybe Double)
gcvvfaPanAngle
= lens _gcvvfaPanAngle
(\ s a -> s{_gcvvfaPanAngle = a})
. mapping _Coerce
gcvvfaRollAngle :: Lens' GoogleCloudVisionV1p2beta1FaceAnnotation (Maybe Double)
gcvvfaRollAngle
= lens _gcvvfaRollAngle
(\ s a -> s{_gcvvfaRollAngle = a})
. mapping _Coerce
gcvvfaUnderExposedLikelihood :: Lens' GoogleCloudVisionV1p2beta1FaceAnnotation (Maybe GoogleCloudVisionV1p2beta1FaceAnnotationUnderExposedLikelihood)
gcvvfaUnderExposedLikelihood
= lens _gcvvfaUnderExposedLikelihood
(\ s a -> s{_gcvvfaUnderExposedLikelihood = a})
gcvvfaFdBoundingPoly :: Lens' GoogleCloudVisionV1p2beta1FaceAnnotation (Maybe GoogleCloudVisionV1p2beta1BoundingPoly)
gcvvfaFdBoundingPoly
= lens _gcvvfaFdBoundingPoly
(\ s a -> s{_gcvvfaFdBoundingPoly = a})
gcvvfaAngerLikelihood :: Lens' GoogleCloudVisionV1p2beta1FaceAnnotation (Maybe GoogleCloudVisionV1p2beta1FaceAnnotationAngerLikelihood)
gcvvfaAngerLikelihood
= lens _gcvvfaAngerLikelihood
(\ s a -> s{_gcvvfaAngerLikelihood = a})
gcvvfaDetectionConfidence :: Lens' GoogleCloudVisionV1p2beta1FaceAnnotation (Maybe Double)
gcvvfaDetectionConfidence
= lens _gcvvfaDetectionConfidence
(\ s a -> s{_gcvvfaDetectionConfidence = a})
. mapping _Coerce
gcvvfaHeadwearLikelihood :: Lens' GoogleCloudVisionV1p2beta1FaceAnnotation (Maybe GoogleCloudVisionV1p2beta1FaceAnnotationHeadwearLikelihood)
gcvvfaHeadwearLikelihood
= lens _gcvvfaHeadwearLikelihood
(\ s a -> s{_gcvvfaHeadwearLikelihood = a})
gcvvfaSorrowLikelihood :: Lens' GoogleCloudVisionV1p2beta1FaceAnnotation (Maybe GoogleCloudVisionV1p2beta1FaceAnnotationSorrowLikelihood)
gcvvfaSorrowLikelihood
= lens _gcvvfaSorrowLikelihood
(\ s a -> s{_gcvvfaSorrowLikelihood = a})
gcvvfaJoyLikelihood :: Lens' GoogleCloudVisionV1p2beta1FaceAnnotation (Maybe GoogleCloudVisionV1p2beta1FaceAnnotationJoyLikelihood)
gcvvfaJoyLikelihood
= lens _gcvvfaJoyLikelihood
(\ s a -> s{_gcvvfaJoyLikelihood = a})
gcvvfaLandmarks :: Lens' GoogleCloudVisionV1p2beta1FaceAnnotation [GoogleCloudVisionV1p2beta1FaceAnnotationLandmark]
gcvvfaLandmarks
= lens _gcvvfaLandmarks
(\ s a -> s{_gcvvfaLandmarks = a})
. _Default
. _Coerce
instance FromJSON
GoogleCloudVisionV1p2beta1FaceAnnotation where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1FaceAnnotation"
(\ o ->
GoogleCloudVisionV1p2beta1FaceAnnotation' <$>
(o .:? "tiltAngle") <*> (o .:? "blurredLikelihood")
<*> (o .:? "boundingPoly")
<*> (o .:? "surpriseLikelihood")
<*> (o .:? "landmarkingConfidence")
<*> (o .:? "panAngle")
<*> (o .:? "rollAngle")
<*> (o .:? "underExposedLikelihood")
<*> (o .:? "fdBoundingPoly")
<*> (o .:? "angerLikelihood")
<*> (o .:? "detectionConfidence")
<*> (o .:? "headwearLikelihood")
<*> (o .:? "sorrowLikelihood")
<*> (o .:? "joyLikelihood")
<*> (o .:? "landmarks" .!= mempty))
instance ToJSON
GoogleCloudVisionV1p2beta1FaceAnnotation where
toJSON GoogleCloudVisionV1p2beta1FaceAnnotation'{..}
= object
(catMaybes
[("tiltAngle" .=) <$> _gcvvfaTiltAngle,
("blurredLikelihood" .=) <$>
_gcvvfaBlurredLikelihood,
("boundingPoly" .=) <$> _gcvvfaBoundingPoly,
("surpriseLikelihood" .=) <$>
_gcvvfaSurpriseLikelihood,
("landmarkingConfidence" .=) <$>
_gcvvfaLandmarkingConfidence,
("panAngle" .=) <$> _gcvvfaPanAngle,
("rollAngle" .=) <$> _gcvvfaRollAngle,
("underExposedLikelihood" .=) <$>
_gcvvfaUnderExposedLikelihood,
("fdBoundingPoly" .=) <$> _gcvvfaFdBoundingPoly,
("angerLikelihood" .=) <$> _gcvvfaAngerLikelihood,
("detectionConfidence" .=) <$>
_gcvvfaDetectionConfidence,
("headwearLikelihood" .=) <$>
_gcvvfaHeadwearLikelihood,
("sorrowLikelihood" .=) <$> _gcvvfaSorrowLikelihood,
("joyLikelihood" .=) <$> _gcvvfaJoyLikelihood,
("landmarks" .=) <$> _gcvvfaLandmarks])
newtype OperationSchema = OperationSchema'
{ _osAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
operationSchema
:: HashMap Text JSONValue
-> OperationSchema
operationSchema pOsAddtional_ =
OperationSchema'
{ _osAddtional = _Coerce # pOsAddtional_
}
osAddtional :: Lens' OperationSchema (HashMap Text JSONValue)
osAddtional
= lens _osAddtional (\ s a -> s{_osAddtional = a}) .
_Coerce
instance FromJSON OperationSchema where
parseJSON
= withObject "OperationSchema"
(\ o -> OperationSchema' <$> (parseJSONObject o))
instance ToJSON OperationSchema where
toJSON = toJSON . _osAddtional
data GoogleCloudVisionV1p1beta1CropHint = GoogleCloudVisionV1p1beta1CropHint'
{ _gcvvchBoundingPoly :: !(Maybe GoogleCloudVisionV1p1beta1BoundingPoly)
, _gcvvchConfidence :: !(Maybe (Textual Double))
, _gcvvchImportanceFraction :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1CropHint
:: GoogleCloudVisionV1p1beta1CropHint
googleCloudVisionV1p1beta1CropHint =
GoogleCloudVisionV1p1beta1CropHint'
{ _gcvvchBoundingPoly = Nothing
, _gcvvchConfidence = Nothing
, _gcvvchImportanceFraction = Nothing
}
gcvvchBoundingPoly :: Lens' GoogleCloudVisionV1p1beta1CropHint (Maybe GoogleCloudVisionV1p1beta1BoundingPoly)
gcvvchBoundingPoly
= lens _gcvvchBoundingPoly
(\ s a -> s{_gcvvchBoundingPoly = a})
gcvvchConfidence :: Lens' GoogleCloudVisionV1p1beta1CropHint (Maybe Double)
gcvvchConfidence
= lens _gcvvchConfidence
(\ s a -> s{_gcvvchConfidence = a})
. mapping _Coerce
gcvvchImportanceFraction :: Lens' GoogleCloudVisionV1p1beta1CropHint (Maybe Double)
gcvvchImportanceFraction
= lens _gcvvchImportanceFraction
(\ s a -> s{_gcvvchImportanceFraction = a})
. mapping _Coerce
instance FromJSON GoogleCloudVisionV1p1beta1CropHint
where
parseJSON
= withObject "GoogleCloudVisionV1p1beta1CropHint"
(\ o ->
GoogleCloudVisionV1p1beta1CropHint' <$>
(o .:? "boundingPoly") <*> (o .:? "confidence") <*>
(o .:? "importanceFraction"))
instance ToJSON GoogleCloudVisionV1p1beta1CropHint
where
toJSON GoogleCloudVisionV1p1beta1CropHint'{..}
= object
(catMaybes
[("boundingPoly" .=) <$> _gcvvchBoundingPoly,
("confidence" .=) <$> _gcvvchConfidence,
("importanceFraction" .=) <$>
_gcvvchImportanceFraction])
newtype GoogleCloudVisionV1p2beta1ImageProperties = GoogleCloudVisionV1p2beta1ImageProperties'
{ _gcvvipDominantColors :: Maybe GoogleCloudVisionV1p2beta1DominantColorsAnnotation
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1ImageProperties
:: GoogleCloudVisionV1p2beta1ImageProperties
googleCloudVisionV1p2beta1ImageProperties =
GoogleCloudVisionV1p2beta1ImageProperties'
{ _gcvvipDominantColors = Nothing
}
gcvvipDominantColors :: Lens' GoogleCloudVisionV1p2beta1ImageProperties (Maybe GoogleCloudVisionV1p2beta1DominantColorsAnnotation)
gcvvipDominantColors
= lens _gcvvipDominantColors
(\ s a -> s{_gcvvipDominantColors = a})
instance FromJSON
GoogleCloudVisionV1p2beta1ImageProperties where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1ImageProperties"
(\ o ->
GoogleCloudVisionV1p2beta1ImageProperties' <$>
(o .:? "dominantColors"))
instance ToJSON
GoogleCloudVisionV1p2beta1ImageProperties where
toJSON GoogleCloudVisionV1p2beta1ImageProperties'{..}
= object
(catMaybes
[("dominantColors" .=) <$> _gcvvipDominantColors])
data GoogleCloudVisionV1p3beta1ProductSearchResults = GoogleCloudVisionV1p3beta1ProductSearchResults'
{ _gcvvpsrProductGroupedResults :: !(Maybe [GoogleCloudVisionV1p3beta1ProductSearchResultsGroupedResult])
, _gcvvpsrResults :: !(Maybe [GoogleCloudVisionV1p3beta1ProductSearchResultsResult])
, _gcvvpsrIndexTime :: !(Maybe DateTime')
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1ProductSearchResults
:: GoogleCloudVisionV1p3beta1ProductSearchResults
googleCloudVisionV1p3beta1ProductSearchResults =
GoogleCloudVisionV1p3beta1ProductSearchResults'
{ _gcvvpsrProductGroupedResults = Nothing
, _gcvvpsrResults = Nothing
, _gcvvpsrIndexTime = Nothing
}
gcvvpsrProductGroupedResults :: Lens' GoogleCloudVisionV1p3beta1ProductSearchResults [GoogleCloudVisionV1p3beta1ProductSearchResultsGroupedResult]
gcvvpsrProductGroupedResults
= lens _gcvvpsrProductGroupedResults
(\ s a -> s{_gcvvpsrProductGroupedResults = a})
. _Default
. _Coerce
gcvvpsrResults :: Lens' GoogleCloudVisionV1p3beta1ProductSearchResults [GoogleCloudVisionV1p3beta1ProductSearchResultsResult]
gcvvpsrResults
= lens _gcvvpsrResults
(\ s a -> s{_gcvvpsrResults = a})
. _Default
. _Coerce
gcvvpsrIndexTime :: Lens' GoogleCloudVisionV1p3beta1ProductSearchResults (Maybe UTCTime)
gcvvpsrIndexTime
= lens _gcvvpsrIndexTime
(\ s a -> s{_gcvvpsrIndexTime = a})
. mapping _DateTime
instance FromJSON
GoogleCloudVisionV1p3beta1ProductSearchResults where
parseJSON
= withObject
"GoogleCloudVisionV1p3beta1ProductSearchResults"
(\ o ->
GoogleCloudVisionV1p3beta1ProductSearchResults' <$>
(o .:? "productGroupedResults" .!= mempty) <*>
(o .:? "results" .!= mempty)
<*> (o .:? "indexTime"))
instance ToJSON
GoogleCloudVisionV1p3beta1ProductSearchResults where
toJSON
GoogleCloudVisionV1p3beta1ProductSearchResults'{..}
= object
(catMaybes
[("productGroupedResults" .=) <$>
_gcvvpsrProductGroupedResults,
("results" .=) <$> _gcvvpsrResults,
("indexTime" .=) <$> _gcvvpsrIndexTime])
data GoogleCloudVisionV1p2beta1OutputConfig = GoogleCloudVisionV1p2beta1OutputConfig'
{ _gGcsDestination :: !(Maybe GoogleCloudVisionV1p2beta1GcsDestination)
, _gBatchSize :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1OutputConfig
:: GoogleCloudVisionV1p2beta1OutputConfig
googleCloudVisionV1p2beta1OutputConfig =
GoogleCloudVisionV1p2beta1OutputConfig'
{ _gGcsDestination = Nothing
, _gBatchSize = Nothing
}
gGcsDestination :: Lens' GoogleCloudVisionV1p2beta1OutputConfig (Maybe GoogleCloudVisionV1p2beta1GcsDestination)
gGcsDestination
= lens _gGcsDestination
(\ s a -> s{_gGcsDestination = a})
gBatchSize :: Lens' GoogleCloudVisionV1p2beta1OutputConfig (Maybe Int32)
gBatchSize
= lens _gBatchSize (\ s a -> s{_gBatchSize = a}) .
mapping _Coerce
instance FromJSON
GoogleCloudVisionV1p2beta1OutputConfig where
parseJSON
= withObject "GoogleCloudVisionV1p2beta1OutputConfig"
(\ o ->
GoogleCloudVisionV1p2beta1OutputConfig' <$>
(o .:? "gcsDestination") <*> (o .:? "batchSize"))
instance ToJSON
GoogleCloudVisionV1p2beta1OutputConfig where
toJSON GoogleCloudVisionV1p2beta1OutputConfig'{..}
= object
(catMaybes
[("gcsDestination" .=) <$> _gGcsDestination,
("batchSize" .=) <$> _gBatchSize])
data GoogleCloudVisionV1p1beta1TextAnnotationDetectedLanguage = GoogleCloudVisionV1p1beta1TextAnnotationDetectedLanguage'
{ _gLanguageCode :: !(Maybe Text)
, _gConfidence :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1TextAnnotationDetectedLanguage
:: GoogleCloudVisionV1p1beta1TextAnnotationDetectedLanguage
googleCloudVisionV1p1beta1TextAnnotationDetectedLanguage =
GoogleCloudVisionV1p1beta1TextAnnotationDetectedLanguage'
{ _gLanguageCode = Nothing
, _gConfidence = Nothing
}
gLanguageCode :: Lens' GoogleCloudVisionV1p1beta1TextAnnotationDetectedLanguage (Maybe Text)
gLanguageCode
= lens _gLanguageCode
(\ s a -> s{_gLanguageCode = a})
gConfidence :: Lens' GoogleCloudVisionV1p1beta1TextAnnotationDetectedLanguage (Maybe Double)
gConfidence
= lens _gConfidence (\ s a -> s{_gConfidence = a}) .
mapping _Coerce
instance FromJSON
GoogleCloudVisionV1p1beta1TextAnnotationDetectedLanguage
where
parseJSON
= withObject
"GoogleCloudVisionV1p1beta1TextAnnotationDetectedLanguage"
(\ o ->
GoogleCloudVisionV1p1beta1TextAnnotationDetectedLanguage'
<$> (o .:? "languageCode") <*> (o .:? "confidence"))
instance ToJSON
GoogleCloudVisionV1p1beta1TextAnnotationDetectedLanguage
where
toJSON
GoogleCloudVisionV1p1beta1TextAnnotationDetectedLanguage'{..}
= object
(catMaybes
[("languageCode" .=) <$> _gLanguageCode,
("confidence" .=) <$> _gConfidence])
data GoogleCloudVisionV1p1beta1Symbol = GoogleCloudVisionV1p1beta1Symbol'
{ _gooProperty :: !(Maybe GoogleCloudVisionV1p1beta1TextAnnotationTextProperty)
, _gooBoundingBox :: !(Maybe GoogleCloudVisionV1p1beta1BoundingPoly)
, _gooText :: !(Maybe Text)
, _gooConfidence :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1Symbol
:: GoogleCloudVisionV1p1beta1Symbol
googleCloudVisionV1p1beta1Symbol =
GoogleCloudVisionV1p1beta1Symbol'
{ _gooProperty = Nothing
, _gooBoundingBox = Nothing
, _gooText = Nothing
, _gooConfidence = Nothing
}
gooProperty :: Lens' GoogleCloudVisionV1p1beta1Symbol (Maybe GoogleCloudVisionV1p1beta1TextAnnotationTextProperty)
gooProperty
= lens _gooProperty (\ s a -> s{_gooProperty = a})
gooBoundingBox :: Lens' GoogleCloudVisionV1p1beta1Symbol (Maybe GoogleCloudVisionV1p1beta1BoundingPoly)
gooBoundingBox
= lens _gooBoundingBox
(\ s a -> s{_gooBoundingBox = a})
gooText :: Lens' GoogleCloudVisionV1p1beta1Symbol (Maybe Text)
gooText = lens _gooText (\ s a -> s{_gooText = a})
gooConfidence :: Lens' GoogleCloudVisionV1p1beta1Symbol (Maybe Double)
gooConfidence
= lens _gooConfidence
(\ s a -> s{_gooConfidence = a})
. mapping _Coerce
instance FromJSON GoogleCloudVisionV1p1beta1Symbol
where
parseJSON
= withObject "GoogleCloudVisionV1p1beta1Symbol"
(\ o ->
GoogleCloudVisionV1p1beta1Symbol' <$>
(o .:? "property") <*> (o .:? "boundingBox") <*>
(o .:? "text")
<*> (o .:? "confidence"))
instance ToJSON GoogleCloudVisionV1p1beta1Symbol
where
toJSON GoogleCloudVisionV1p1beta1Symbol'{..}
= object
(catMaybes
[("property" .=) <$> _gooProperty,
("boundingBox" .=) <$> _gooBoundingBox,
("text" .=) <$> _gooText,
("confidence" .=) <$> _gooConfidence])
data ImageAnnotationContext = ImageAnnotationContext'
{ _iacURI :: !(Maybe Text)
, _iacPageNumber :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
imageAnnotationContext
:: ImageAnnotationContext
imageAnnotationContext =
ImageAnnotationContext'
{ _iacURI = Nothing
, _iacPageNumber = Nothing
}
iacURI :: Lens' ImageAnnotationContext (Maybe Text)
iacURI = lens _iacURI (\ s a -> s{_iacURI = a})
iacPageNumber :: Lens' ImageAnnotationContext (Maybe Int32)
iacPageNumber
= lens _iacPageNumber
(\ s a -> s{_iacPageNumber = a})
. mapping _Coerce
instance FromJSON ImageAnnotationContext where
parseJSON
= withObject "ImageAnnotationContext"
(\ o ->
ImageAnnotationContext' <$>
(o .:? "uri") <*> (o .:? "pageNumber"))
instance ToJSON ImageAnnotationContext where
toJSON ImageAnnotationContext'{..}
= object
(catMaybes
[("uri" .=) <$> _iacURI,
("pageNumber" .=) <$> _iacPageNumber])
data GoogleCloudVisionV1p2beta1CropHint = GoogleCloudVisionV1p2beta1CropHint'
{ _gcvvchcBoundingPoly :: !(Maybe GoogleCloudVisionV1p2beta1BoundingPoly)
, _gcvvchcConfidence :: !(Maybe (Textual Double))
, _gcvvchcImportanceFraction :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1CropHint
:: GoogleCloudVisionV1p2beta1CropHint
googleCloudVisionV1p2beta1CropHint =
GoogleCloudVisionV1p2beta1CropHint'
{ _gcvvchcBoundingPoly = Nothing
, _gcvvchcConfidence = Nothing
, _gcvvchcImportanceFraction = Nothing
}
gcvvchcBoundingPoly :: Lens' GoogleCloudVisionV1p2beta1CropHint (Maybe GoogleCloudVisionV1p2beta1BoundingPoly)
gcvvchcBoundingPoly
= lens _gcvvchcBoundingPoly
(\ s a -> s{_gcvvchcBoundingPoly = a})
gcvvchcConfidence :: Lens' GoogleCloudVisionV1p2beta1CropHint (Maybe Double)
gcvvchcConfidence
= lens _gcvvchcConfidence
(\ s a -> s{_gcvvchcConfidence = a})
. mapping _Coerce
gcvvchcImportanceFraction :: Lens' GoogleCloudVisionV1p2beta1CropHint (Maybe Double)
gcvvchcImportanceFraction
= lens _gcvvchcImportanceFraction
(\ s a -> s{_gcvvchcImportanceFraction = a})
. mapping _Coerce
instance FromJSON GoogleCloudVisionV1p2beta1CropHint
where
parseJSON
= withObject "GoogleCloudVisionV1p2beta1CropHint"
(\ o ->
GoogleCloudVisionV1p2beta1CropHint' <$>
(o .:? "boundingPoly") <*> (o .:? "confidence") <*>
(o .:? "importanceFraction"))
instance ToJSON GoogleCloudVisionV1p2beta1CropHint
where
toJSON GoogleCloudVisionV1p2beta1CropHint'{..}
= object
(catMaybes
[("boundingPoly" .=) <$> _gcvvchcBoundingPoly,
("confidence" .=) <$> _gcvvchcConfidence,
("importanceFraction" .=) <$>
_gcvvchcImportanceFraction])
data Property = Property'
{ _pUint64Value :: !(Maybe (Textual Word64))
, _pValue :: !(Maybe Text)
, _pName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
property
:: Property
property =
Property'
{ _pUint64Value = Nothing
, _pValue = Nothing
, _pName = Nothing
}
pUint64Value :: Lens' Property (Maybe Word64)
pUint64Value
= lens _pUint64Value (\ s a -> s{_pUint64Value = a})
. mapping _Coerce
pValue :: Lens' Property (Maybe Text)
pValue = lens _pValue (\ s a -> s{_pValue = a})
pName :: Lens' Property (Maybe Text)
pName = lens _pName (\ s a -> s{_pName = a})
instance FromJSON Property where
parseJSON
= withObject "Property"
(\ o ->
Property' <$>
(o .:? "uint64Value") <*> (o .:? "value") <*>
(o .:? "name"))
instance ToJSON Property where
toJSON Property'{..}
= object
(catMaybes
[("uint64Value" .=) <$> _pUint64Value,
("value" .=) <$> _pValue, ("name" .=) <$> _pName])
data GoogleCloudVisionV1p1beta1FaceAnnotation = GoogleCloudVisionV1p1beta1FaceAnnotation'
{ _gTiltAngle :: !(Maybe (Textual Double))
, _gBlurredLikelihood :: !(Maybe GoogleCloudVisionV1p1beta1FaceAnnotationBlurredLikelihood)
, _gBoundingPoly :: !(Maybe GoogleCloudVisionV1p1beta1BoundingPoly)
, _gSurpriseLikelihood :: !(Maybe GoogleCloudVisionV1p1beta1FaceAnnotationSurpriseLikelihood)
, _gLandmarkingConfidence :: !(Maybe (Textual Double))
, _gPanAngle :: !(Maybe (Textual Double))
, _gRollAngle :: !(Maybe (Textual Double))
, _gUnderExposedLikelihood :: !(Maybe GoogleCloudVisionV1p1beta1FaceAnnotationUnderExposedLikelihood)
, _gFdBoundingPoly :: !(Maybe GoogleCloudVisionV1p1beta1BoundingPoly)
, _gAngerLikelihood :: !(Maybe GoogleCloudVisionV1p1beta1FaceAnnotationAngerLikelihood)
, _gDetectionConfidence :: !(Maybe (Textual Double))
, _gHeadwearLikelihood :: !(Maybe GoogleCloudVisionV1p1beta1FaceAnnotationHeadwearLikelihood)
, _gSorrowLikelihood :: !(Maybe GoogleCloudVisionV1p1beta1FaceAnnotationSorrowLikelihood)
, _gJoyLikelihood :: !(Maybe GoogleCloudVisionV1p1beta1FaceAnnotationJoyLikelihood)
, _gLandmarks :: !(Maybe [GoogleCloudVisionV1p1beta1FaceAnnotationLandmark])
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1FaceAnnotation
:: GoogleCloudVisionV1p1beta1FaceAnnotation
googleCloudVisionV1p1beta1FaceAnnotation =
GoogleCloudVisionV1p1beta1FaceAnnotation'
{ _gTiltAngle = Nothing
, _gBlurredLikelihood = Nothing
, _gBoundingPoly = Nothing
, _gSurpriseLikelihood = Nothing
, _gLandmarkingConfidence = Nothing
, _gPanAngle = Nothing
, _gRollAngle = Nothing
, _gUnderExposedLikelihood = Nothing
, _gFdBoundingPoly = Nothing
, _gAngerLikelihood = Nothing
, _gDetectionConfidence = Nothing
, _gHeadwearLikelihood = Nothing
, _gSorrowLikelihood = Nothing
, _gJoyLikelihood = Nothing
, _gLandmarks = Nothing
}
gTiltAngle :: Lens' GoogleCloudVisionV1p1beta1FaceAnnotation (Maybe Double)
gTiltAngle
= lens _gTiltAngle (\ s a -> s{_gTiltAngle = a}) .
mapping _Coerce
gBlurredLikelihood :: Lens' GoogleCloudVisionV1p1beta1FaceAnnotation (Maybe GoogleCloudVisionV1p1beta1FaceAnnotationBlurredLikelihood)
gBlurredLikelihood
= lens _gBlurredLikelihood
(\ s a -> s{_gBlurredLikelihood = a})
gBoundingPoly :: Lens' GoogleCloudVisionV1p1beta1FaceAnnotation (Maybe GoogleCloudVisionV1p1beta1BoundingPoly)
gBoundingPoly
= lens _gBoundingPoly
(\ s a -> s{_gBoundingPoly = a})
gSurpriseLikelihood :: Lens' GoogleCloudVisionV1p1beta1FaceAnnotation (Maybe GoogleCloudVisionV1p1beta1FaceAnnotationSurpriseLikelihood)
gSurpriseLikelihood
= lens _gSurpriseLikelihood
(\ s a -> s{_gSurpriseLikelihood = a})
gLandmarkingConfidence :: Lens' GoogleCloudVisionV1p1beta1FaceAnnotation (Maybe Double)
gLandmarkingConfidence
= lens _gLandmarkingConfidence
(\ s a -> s{_gLandmarkingConfidence = a})
. mapping _Coerce
gPanAngle :: Lens' GoogleCloudVisionV1p1beta1FaceAnnotation (Maybe Double)
gPanAngle
= lens _gPanAngle (\ s a -> s{_gPanAngle = a}) .
mapping _Coerce
gRollAngle :: Lens' GoogleCloudVisionV1p1beta1FaceAnnotation (Maybe Double)
gRollAngle
= lens _gRollAngle (\ s a -> s{_gRollAngle = a}) .
mapping _Coerce
gUnderExposedLikelihood :: Lens' GoogleCloudVisionV1p1beta1FaceAnnotation (Maybe GoogleCloudVisionV1p1beta1FaceAnnotationUnderExposedLikelihood)
gUnderExposedLikelihood
= lens _gUnderExposedLikelihood
(\ s a -> s{_gUnderExposedLikelihood = a})
gFdBoundingPoly :: Lens' GoogleCloudVisionV1p1beta1FaceAnnotation (Maybe GoogleCloudVisionV1p1beta1BoundingPoly)
gFdBoundingPoly
= lens _gFdBoundingPoly
(\ s a -> s{_gFdBoundingPoly = a})
gAngerLikelihood :: Lens' GoogleCloudVisionV1p1beta1FaceAnnotation (Maybe GoogleCloudVisionV1p1beta1FaceAnnotationAngerLikelihood)
gAngerLikelihood
= lens _gAngerLikelihood
(\ s a -> s{_gAngerLikelihood = a})
gDetectionConfidence :: Lens' GoogleCloudVisionV1p1beta1FaceAnnotation (Maybe Double)
gDetectionConfidence
= lens _gDetectionConfidence
(\ s a -> s{_gDetectionConfidence = a})
. mapping _Coerce
gHeadwearLikelihood :: Lens' GoogleCloudVisionV1p1beta1FaceAnnotation (Maybe GoogleCloudVisionV1p1beta1FaceAnnotationHeadwearLikelihood)
gHeadwearLikelihood
= lens _gHeadwearLikelihood
(\ s a -> s{_gHeadwearLikelihood = a})
gSorrowLikelihood :: Lens' GoogleCloudVisionV1p1beta1FaceAnnotation (Maybe GoogleCloudVisionV1p1beta1FaceAnnotationSorrowLikelihood)
gSorrowLikelihood
= lens _gSorrowLikelihood
(\ s a -> s{_gSorrowLikelihood = a})
gJoyLikelihood :: Lens' GoogleCloudVisionV1p1beta1FaceAnnotation (Maybe GoogleCloudVisionV1p1beta1FaceAnnotationJoyLikelihood)
gJoyLikelihood
= lens _gJoyLikelihood
(\ s a -> s{_gJoyLikelihood = a})
gLandmarks :: Lens' GoogleCloudVisionV1p1beta1FaceAnnotation [GoogleCloudVisionV1p1beta1FaceAnnotationLandmark]
gLandmarks
= lens _gLandmarks (\ s a -> s{_gLandmarks = a}) .
_Default
. _Coerce
instance FromJSON
GoogleCloudVisionV1p1beta1FaceAnnotation where
parseJSON
= withObject
"GoogleCloudVisionV1p1beta1FaceAnnotation"
(\ o ->
GoogleCloudVisionV1p1beta1FaceAnnotation' <$>
(o .:? "tiltAngle") <*> (o .:? "blurredLikelihood")
<*> (o .:? "boundingPoly")
<*> (o .:? "surpriseLikelihood")
<*> (o .:? "landmarkingConfidence")
<*> (o .:? "panAngle")
<*> (o .:? "rollAngle")
<*> (o .:? "underExposedLikelihood")
<*> (o .:? "fdBoundingPoly")
<*> (o .:? "angerLikelihood")
<*> (o .:? "detectionConfidence")
<*> (o .:? "headwearLikelihood")
<*> (o .:? "sorrowLikelihood")
<*> (o .:? "joyLikelihood")
<*> (o .:? "landmarks" .!= mempty))
instance ToJSON
GoogleCloudVisionV1p1beta1FaceAnnotation where
toJSON GoogleCloudVisionV1p1beta1FaceAnnotation'{..}
= object
(catMaybes
[("tiltAngle" .=) <$> _gTiltAngle,
("blurredLikelihood" .=) <$> _gBlurredLikelihood,
("boundingPoly" .=) <$> _gBoundingPoly,
("surpriseLikelihood" .=) <$> _gSurpriseLikelihood,
("landmarkingConfidence" .=) <$>
_gLandmarkingConfidence,
("panAngle" .=) <$> _gPanAngle,
("rollAngle" .=) <$> _gRollAngle,
("underExposedLikelihood" .=) <$>
_gUnderExposedLikelihood,
("fdBoundingPoly" .=) <$> _gFdBoundingPoly,
("angerLikelihood" .=) <$> _gAngerLikelihood,
("detectionConfidence" .=) <$> _gDetectionConfidence,
("headwearLikelihood" .=) <$> _gHeadwearLikelihood,
("sorrowLikelihood" .=) <$> _gSorrowLikelihood,
("joyLikelihood" .=) <$> _gJoyLikelihood,
("landmarks" .=) <$> _gLandmarks])
data GoogleCloudVisionV1p3beta1InputConfig = GoogleCloudVisionV1p3beta1InputConfig'
{ _gcvvicGcsSource :: !(Maybe GoogleCloudVisionV1p3beta1GcsSource)
, _gcvvicMimeType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1InputConfig
:: GoogleCloudVisionV1p3beta1InputConfig
googleCloudVisionV1p3beta1InputConfig =
GoogleCloudVisionV1p3beta1InputConfig'
{ _gcvvicGcsSource = Nothing
, _gcvvicMimeType = Nothing
}
gcvvicGcsSource :: Lens' GoogleCloudVisionV1p3beta1InputConfig (Maybe GoogleCloudVisionV1p3beta1GcsSource)
gcvvicGcsSource
= lens _gcvvicGcsSource
(\ s a -> s{_gcvvicGcsSource = a})
gcvvicMimeType :: Lens' GoogleCloudVisionV1p3beta1InputConfig (Maybe Text)
gcvvicMimeType
= lens _gcvvicMimeType
(\ s a -> s{_gcvvicMimeType = a})
instance FromJSON
GoogleCloudVisionV1p3beta1InputConfig where
parseJSON
= withObject "GoogleCloudVisionV1p3beta1InputConfig"
(\ o ->
GoogleCloudVisionV1p3beta1InputConfig' <$>
(o .:? "gcsSource") <*> (o .:? "mimeType"))
instance ToJSON GoogleCloudVisionV1p3beta1InputConfig
where
toJSON GoogleCloudVisionV1p3beta1InputConfig'{..}
= object
(catMaybes
[("gcsSource" .=) <$> _gcvvicGcsSource,
("mimeType" .=) <$> _gcvvicMimeType])
data GoogleCloudVisionV1p3beta1WebDetectionWebPage = GoogleCloudVisionV1p3beta1WebDetectionWebPage'
{ _gcvvwdwpScore :: !(Maybe (Textual Double))
, _gcvvwdwpURL :: !(Maybe Text)
, _gcvvwdwpPageTitle :: !(Maybe Text)
, _gcvvwdwpPartialMatchingImages :: !(Maybe [GoogleCloudVisionV1p3beta1WebDetectionWebImage])
, _gcvvwdwpFullMatchingImages :: !(Maybe [GoogleCloudVisionV1p3beta1WebDetectionWebImage])
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1WebDetectionWebPage
:: GoogleCloudVisionV1p3beta1WebDetectionWebPage
googleCloudVisionV1p3beta1WebDetectionWebPage =
GoogleCloudVisionV1p3beta1WebDetectionWebPage'
{ _gcvvwdwpScore = Nothing
, _gcvvwdwpURL = Nothing
, _gcvvwdwpPageTitle = Nothing
, _gcvvwdwpPartialMatchingImages = Nothing
, _gcvvwdwpFullMatchingImages = Nothing
}
gcvvwdwpScore :: Lens' GoogleCloudVisionV1p3beta1WebDetectionWebPage (Maybe Double)
gcvvwdwpScore
= lens _gcvvwdwpScore
(\ s a -> s{_gcvvwdwpScore = a})
. mapping _Coerce
gcvvwdwpURL :: Lens' GoogleCloudVisionV1p3beta1WebDetectionWebPage (Maybe Text)
gcvvwdwpURL
= lens _gcvvwdwpURL (\ s a -> s{_gcvvwdwpURL = a})
gcvvwdwpPageTitle :: Lens' GoogleCloudVisionV1p3beta1WebDetectionWebPage (Maybe Text)
gcvvwdwpPageTitle
= lens _gcvvwdwpPageTitle
(\ s a -> s{_gcvvwdwpPageTitle = a})
gcvvwdwpPartialMatchingImages :: Lens' GoogleCloudVisionV1p3beta1WebDetectionWebPage [GoogleCloudVisionV1p3beta1WebDetectionWebImage]
gcvvwdwpPartialMatchingImages
= lens _gcvvwdwpPartialMatchingImages
(\ s a -> s{_gcvvwdwpPartialMatchingImages = a})
. _Default
. _Coerce
gcvvwdwpFullMatchingImages :: Lens' GoogleCloudVisionV1p3beta1WebDetectionWebPage [GoogleCloudVisionV1p3beta1WebDetectionWebImage]
gcvvwdwpFullMatchingImages
= lens _gcvvwdwpFullMatchingImages
(\ s a -> s{_gcvvwdwpFullMatchingImages = a})
. _Default
. _Coerce
instance FromJSON
GoogleCloudVisionV1p3beta1WebDetectionWebPage where
parseJSON
= withObject
"GoogleCloudVisionV1p3beta1WebDetectionWebPage"
(\ o ->
GoogleCloudVisionV1p3beta1WebDetectionWebPage' <$>
(o .:? "score") <*> (o .:? "url") <*>
(o .:? "pageTitle")
<*> (o .:? "partialMatchingImages" .!= mempty)
<*> (o .:? "fullMatchingImages" .!= mempty))
instance ToJSON
GoogleCloudVisionV1p3beta1WebDetectionWebPage where
toJSON
GoogleCloudVisionV1p3beta1WebDetectionWebPage'{..}
= object
(catMaybes
[("score" .=) <$> _gcvvwdwpScore,
("url" .=) <$> _gcvvwdwpURL,
("pageTitle" .=) <$> _gcvvwdwpPageTitle,
("partialMatchingImages" .=) <$>
_gcvvwdwpPartialMatchingImages,
("fullMatchingImages" .=) <$>
_gcvvwdwpFullMatchingImages])
data ProductSearchResults = ProductSearchResults'
{ _psrProductGroupedResults :: !(Maybe [GroupedResult])
, _psrResults :: !(Maybe [Result])
, _psrIndexTime :: !(Maybe DateTime')
} deriving (Eq,Show,Data,Typeable,Generic)
productSearchResults
:: ProductSearchResults
productSearchResults =
ProductSearchResults'
{ _psrProductGroupedResults = Nothing
, _psrResults = Nothing
, _psrIndexTime = Nothing
}
psrProductGroupedResults :: Lens' ProductSearchResults [GroupedResult]
psrProductGroupedResults
= lens _psrProductGroupedResults
(\ s a -> s{_psrProductGroupedResults = a})
. _Default
. _Coerce
psrResults :: Lens' ProductSearchResults [Result]
psrResults
= lens _psrResults (\ s a -> s{_psrResults = a}) .
_Default
. _Coerce
psrIndexTime :: Lens' ProductSearchResults (Maybe UTCTime)
psrIndexTime
= lens _psrIndexTime (\ s a -> s{_psrIndexTime = a})
. mapping _DateTime
instance FromJSON ProductSearchResults where
parseJSON
= withObject "ProductSearchResults"
(\ o ->
ProductSearchResults' <$>
(o .:? "productGroupedResults" .!= mempty) <*>
(o .:? "results" .!= mempty)
<*> (o .:? "indexTime"))
instance ToJSON ProductSearchResults where
toJSON ProductSearchResults'{..}
= object
(catMaybes
[("productGroupedResults" .=) <$>
_psrProductGroupedResults,
("results" .=) <$> _psrResults,
("indexTime" .=) <$> _psrIndexTime])
data Landmark = Landmark'
{ _lType :: !(Maybe LandmarkType)
, _lPosition :: !(Maybe Position)
} deriving (Eq,Show,Data,Typeable,Generic)
landmark
:: Landmark
landmark =
Landmark'
{ _lType = Nothing
, _lPosition = Nothing
}
lType :: Lens' Landmark (Maybe LandmarkType)
lType = lens _lType (\ s a -> s{_lType = a})
lPosition :: Lens' Landmark (Maybe Position)
lPosition
= lens _lPosition (\ s a -> s{_lPosition = a})
instance FromJSON Landmark where
parseJSON
= withObject "Landmark"
(\ o ->
Landmark' <$> (o .:? "type") <*> (o .:? "position"))
instance ToJSON Landmark where
toJSON Landmark'{..}
= object
(catMaybes
[("type" .=) <$> _lType,
("position" .=) <$> _lPosition])
data GoogleCloudVisionV1p2beta1SafeSearchAnnotation = GoogleCloudVisionV1p2beta1SafeSearchAnnotation'
{ _gcvvssaSpoof :: !(Maybe GoogleCloudVisionV1p2beta1SafeSearchAnnotationSpoof)
, _gcvvssaRacy :: !(Maybe GoogleCloudVisionV1p2beta1SafeSearchAnnotationRacy)
, _gcvvssaAdult :: !(Maybe GoogleCloudVisionV1p2beta1SafeSearchAnnotationAdult)
, _gcvvssaMedical :: !(Maybe GoogleCloudVisionV1p2beta1SafeSearchAnnotationMedical)
, _gcvvssaViolence :: !(Maybe GoogleCloudVisionV1p2beta1SafeSearchAnnotationViolence)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1SafeSearchAnnotation
:: GoogleCloudVisionV1p2beta1SafeSearchAnnotation
googleCloudVisionV1p2beta1SafeSearchAnnotation =
GoogleCloudVisionV1p2beta1SafeSearchAnnotation'
{ _gcvvssaSpoof = Nothing
, _gcvvssaRacy = Nothing
, _gcvvssaAdult = Nothing
, _gcvvssaMedical = Nothing
, _gcvvssaViolence = Nothing
}
gcvvssaSpoof :: Lens' GoogleCloudVisionV1p2beta1SafeSearchAnnotation (Maybe GoogleCloudVisionV1p2beta1SafeSearchAnnotationSpoof)
gcvvssaSpoof
= lens _gcvvssaSpoof (\ s a -> s{_gcvvssaSpoof = a})
gcvvssaRacy :: Lens' GoogleCloudVisionV1p2beta1SafeSearchAnnotation (Maybe GoogleCloudVisionV1p2beta1SafeSearchAnnotationRacy)
gcvvssaRacy
= lens _gcvvssaRacy (\ s a -> s{_gcvvssaRacy = a})
gcvvssaAdult :: Lens' GoogleCloudVisionV1p2beta1SafeSearchAnnotation (Maybe GoogleCloudVisionV1p2beta1SafeSearchAnnotationAdult)
gcvvssaAdult
= lens _gcvvssaAdult (\ s a -> s{_gcvvssaAdult = a})
gcvvssaMedical :: Lens' GoogleCloudVisionV1p2beta1SafeSearchAnnotation (Maybe GoogleCloudVisionV1p2beta1SafeSearchAnnotationMedical)
gcvvssaMedical
= lens _gcvvssaMedical
(\ s a -> s{_gcvvssaMedical = a})
gcvvssaViolence :: Lens' GoogleCloudVisionV1p2beta1SafeSearchAnnotation (Maybe GoogleCloudVisionV1p2beta1SafeSearchAnnotationViolence)
gcvvssaViolence
= lens _gcvvssaViolence
(\ s a -> s{_gcvvssaViolence = a})
instance FromJSON
GoogleCloudVisionV1p2beta1SafeSearchAnnotation where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1SafeSearchAnnotation"
(\ o ->
GoogleCloudVisionV1p2beta1SafeSearchAnnotation' <$>
(o .:? "spoof") <*> (o .:? "racy") <*>
(o .:? "adult")
<*> (o .:? "medical")
<*> (o .:? "violence"))
instance ToJSON
GoogleCloudVisionV1p2beta1SafeSearchAnnotation where
toJSON
GoogleCloudVisionV1p2beta1SafeSearchAnnotation'{..}
= object
(catMaybes
[("spoof" .=) <$> _gcvvssaSpoof,
("racy" .=) <$> _gcvvssaRacy,
("adult" .=) <$> _gcvvssaAdult,
("medical" .=) <$> _gcvvssaMedical,
("violence" .=) <$> _gcvvssaViolence])
data GoogleCloudVisionV1p2beta1OperationMetadata = GoogleCloudVisionV1p2beta1OperationMetadata'
{ _gcvvomState :: !(Maybe GoogleCloudVisionV1p2beta1OperationMetadataState)
, _gcvvomUpdateTime :: !(Maybe DateTime')
, _gcvvomCreateTime :: !(Maybe DateTime')
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1OperationMetadata
:: GoogleCloudVisionV1p2beta1OperationMetadata
googleCloudVisionV1p2beta1OperationMetadata =
GoogleCloudVisionV1p2beta1OperationMetadata'
{ _gcvvomState = Nothing
, _gcvvomUpdateTime = Nothing
, _gcvvomCreateTime = Nothing
}
gcvvomState :: Lens' GoogleCloudVisionV1p2beta1OperationMetadata (Maybe GoogleCloudVisionV1p2beta1OperationMetadataState)
gcvvomState
= lens _gcvvomState (\ s a -> s{_gcvvomState = a})
gcvvomUpdateTime :: Lens' GoogleCloudVisionV1p2beta1OperationMetadata (Maybe UTCTime)
gcvvomUpdateTime
= lens _gcvvomUpdateTime
(\ s a -> s{_gcvvomUpdateTime = a})
. mapping _DateTime
gcvvomCreateTime :: Lens' GoogleCloudVisionV1p2beta1OperationMetadata (Maybe UTCTime)
gcvvomCreateTime
= lens _gcvvomCreateTime
(\ s a -> s{_gcvvomCreateTime = a})
. mapping _DateTime
instance FromJSON
GoogleCloudVisionV1p2beta1OperationMetadata where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1OperationMetadata"
(\ o ->
GoogleCloudVisionV1p2beta1OperationMetadata' <$>
(o .:? "state") <*> (o .:? "updateTime") <*>
(o .:? "createTime"))
instance ToJSON
GoogleCloudVisionV1p2beta1OperationMetadata where
toJSON
GoogleCloudVisionV1p2beta1OperationMetadata'{..}
= object
(catMaybes
[("state" .=) <$> _gcvvomState,
("updateTime" .=) <$> _gcvvomUpdateTime,
("createTime" .=) <$> _gcvvomCreateTime])
newtype GoogleCloudVisionV1p3beta1CropHintsAnnotation = GoogleCloudVisionV1p3beta1CropHintsAnnotation'
{ _gcvvchaCropHints :: Maybe [GoogleCloudVisionV1p3beta1CropHint]
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1CropHintsAnnotation
:: GoogleCloudVisionV1p3beta1CropHintsAnnotation
googleCloudVisionV1p3beta1CropHintsAnnotation =
GoogleCloudVisionV1p3beta1CropHintsAnnotation'
{ _gcvvchaCropHints = Nothing
}
gcvvchaCropHints :: Lens' GoogleCloudVisionV1p3beta1CropHintsAnnotation [GoogleCloudVisionV1p3beta1CropHint]
gcvvchaCropHints
= lens _gcvvchaCropHints
(\ s a -> s{_gcvvchaCropHints = a})
. _Default
. _Coerce
instance FromJSON
GoogleCloudVisionV1p3beta1CropHintsAnnotation where
parseJSON
= withObject
"GoogleCloudVisionV1p3beta1CropHintsAnnotation"
(\ o ->
GoogleCloudVisionV1p3beta1CropHintsAnnotation' <$>
(o .:? "cropHints" .!= mempty))
instance ToJSON
GoogleCloudVisionV1p3beta1CropHintsAnnotation where
toJSON
GoogleCloudVisionV1p3beta1CropHintsAnnotation'{..}
= object
(catMaybes [("cropHints" .=) <$> _gcvvchaCropHints])
data GoogleCloudVisionV1p1beta1ColorInfo = GoogleCloudVisionV1p1beta1ColorInfo'
{ _gcvvciColor :: !(Maybe Color)
, _gcvvciScore :: !(Maybe (Textual Double))
, _gcvvciPixelFraction :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1ColorInfo
:: GoogleCloudVisionV1p1beta1ColorInfo
googleCloudVisionV1p1beta1ColorInfo =
GoogleCloudVisionV1p1beta1ColorInfo'
{ _gcvvciColor = Nothing
, _gcvvciScore = Nothing
, _gcvvciPixelFraction = Nothing
}
gcvvciColor :: Lens' GoogleCloudVisionV1p1beta1ColorInfo (Maybe Color)
gcvvciColor
= lens _gcvvciColor (\ s a -> s{_gcvvciColor = a})
gcvvciScore :: Lens' GoogleCloudVisionV1p1beta1ColorInfo (Maybe Double)
gcvvciScore
= lens _gcvvciScore (\ s a -> s{_gcvvciScore = a}) .
mapping _Coerce
gcvvciPixelFraction :: Lens' GoogleCloudVisionV1p1beta1ColorInfo (Maybe Double)
gcvvciPixelFraction
= lens _gcvvciPixelFraction
(\ s a -> s{_gcvvciPixelFraction = a})
. mapping _Coerce
instance FromJSON GoogleCloudVisionV1p1beta1ColorInfo
where
parseJSON
= withObject "GoogleCloudVisionV1p1beta1ColorInfo"
(\ o ->
GoogleCloudVisionV1p1beta1ColorInfo' <$>
(o .:? "color") <*> (o .:? "score") <*>
(o .:? "pixelFraction"))
instance ToJSON GoogleCloudVisionV1p1beta1ColorInfo
where
toJSON GoogleCloudVisionV1p1beta1ColorInfo'{..}
= object
(catMaybes
[("color" .=) <$> _gcvvciColor,
("score" .=) <$> _gcvvciScore,
("pixelFraction" .=) <$> _gcvvciPixelFraction])
newtype GcsSource = GcsSource'
{ _gsURI :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
gcsSource
:: GcsSource
gcsSource =
GcsSource'
{ _gsURI = Nothing
}
gsURI :: Lens' GcsSource (Maybe Text)
gsURI = lens _gsURI (\ s a -> s{_gsURI = a})
instance FromJSON GcsSource where
parseJSON
= withObject "GcsSource"
(\ o -> GcsSource' <$> (o .:? "uri"))
instance ToJSON GcsSource where
toJSON GcsSource'{..}
= object (catMaybes [("uri" .=) <$> _gsURI])
data GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreak = GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreak'
{ _gcvvtadbIsPrefix :: !(Maybe Bool)
, _gcvvtadbType :: !(Maybe GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreakType)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1TextAnnotationDetectedBreak
:: GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreak
googleCloudVisionV1p1beta1TextAnnotationDetectedBreak =
GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreak'
{ _gcvvtadbIsPrefix = Nothing
, _gcvvtadbType = Nothing
}
gcvvtadbIsPrefix :: Lens' GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreak (Maybe Bool)
gcvvtadbIsPrefix
= lens _gcvvtadbIsPrefix
(\ s a -> s{_gcvvtadbIsPrefix = a})
gcvvtadbType :: Lens' GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreak (Maybe GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreakType)
gcvvtadbType
= lens _gcvvtadbType (\ s a -> s{_gcvvtadbType = a})
instance FromJSON
GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreak
where
parseJSON
= withObject
"GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreak"
(\ o ->
GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreak'
<$> (o .:? "isPrefix") <*> (o .:? "type"))
instance ToJSON
GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreak
where
toJSON
GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreak'{..}
= object
(catMaybes
[("isPrefix" .=) <$> _gcvvtadbIsPrefix,
("type" .=) <$> _gcvvtadbType])
newtype GoogleCloudVisionV1p1beta1DominantColorsAnnotation = GoogleCloudVisionV1p1beta1DominantColorsAnnotation'
{ _gcvvdcaColors :: Maybe [GoogleCloudVisionV1p1beta1ColorInfo]
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1DominantColorsAnnotation
:: GoogleCloudVisionV1p1beta1DominantColorsAnnotation
googleCloudVisionV1p1beta1DominantColorsAnnotation =
GoogleCloudVisionV1p1beta1DominantColorsAnnotation'
{ _gcvvdcaColors = Nothing
}
gcvvdcaColors :: Lens' GoogleCloudVisionV1p1beta1DominantColorsAnnotation [GoogleCloudVisionV1p1beta1ColorInfo]
gcvvdcaColors
= lens _gcvvdcaColors
(\ s a -> s{_gcvvdcaColors = a})
. _Default
. _Coerce
instance FromJSON
GoogleCloudVisionV1p1beta1DominantColorsAnnotation
where
parseJSON
= withObject
"GoogleCloudVisionV1p1beta1DominantColorsAnnotation"
(\ o ->
GoogleCloudVisionV1p1beta1DominantColorsAnnotation'
<$> (o .:? "colors" .!= mempty))
instance ToJSON
GoogleCloudVisionV1p1beta1DominantColorsAnnotation
where
toJSON
GoogleCloudVisionV1p1beta1DominantColorsAnnotation'{..}
= object
(catMaybes [("colors" .=) <$> _gcvvdcaColors])
data GoogleCloudVisionV1p3beta1WebDetectionWebLabel = GoogleCloudVisionV1p3beta1WebDetectionWebLabel'
{ _gcvvwdwlLanguageCode :: !(Maybe Text)
, _gcvvwdwlLabel :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1WebDetectionWebLabel
:: GoogleCloudVisionV1p3beta1WebDetectionWebLabel
googleCloudVisionV1p3beta1WebDetectionWebLabel =
GoogleCloudVisionV1p3beta1WebDetectionWebLabel'
{ _gcvvwdwlLanguageCode = Nothing
, _gcvvwdwlLabel = Nothing
}
gcvvwdwlLanguageCode :: Lens' GoogleCloudVisionV1p3beta1WebDetectionWebLabel (Maybe Text)
gcvvwdwlLanguageCode
= lens _gcvvwdwlLanguageCode
(\ s a -> s{_gcvvwdwlLanguageCode = a})
gcvvwdwlLabel :: Lens' GoogleCloudVisionV1p3beta1WebDetectionWebLabel (Maybe Text)
gcvvwdwlLabel
= lens _gcvvwdwlLabel
(\ s a -> s{_gcvvwdwlLabel = a})
instance FromJSON
GoogleCloudVisionV1p3beta1WebDetectionWebLabel where
parseJSON
= withObject
"GoogleCloudVisionV1p3beta1WebDetectionWebLabel"
(\ o ->
GoogleCloudVisionV1p3beta1WebDetectionWebLabel' <$>
(o .:? "languageCode") <*> (o .:? "label"))
instance ToJSON
GoogleCloudVisionV1p3beta1WebDetectionWebLabel where
toJSON
GoogleCloudVisionV1p3beta1WebDetectionWebLabel'{..}
= object
(catMaybes
[("languageCode" .=) <$> _gcvvwdwlLanguageCode,
("label" .=) <$> _gcvvwdwlLabel])
data GoogleCloudVisionV1p2beta1ImageContext = GoogleCloudVisionV1p2beta1ImageContext'
{ _gcvvicCropHintsParams :: !(Maybe GoogleCloudVisionV1p2beta1CropHintsParams)
, _gcvvicWebDetectionParams :: !(Maybe GoogleCloudVisionV1p2beta1WebDetectionParams)
, _gcvvicProductSearchParams :: !(Maybe GoogleCloudVisionV1p2beta1ProductSearchParams)
, _gcvvicLanguageHints :: !(Maybe [Text])
, _gcvvicLatLongRect :: !(Maybe GoogleCloudVisionV1p2beta1LatLongRect)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1ImageContext
:: GoogleCloudVisionV1p2beta1ImageContext
googleCloudVisionV1p2beta1ImageContext =
GoogleCloudVisionV1p2beta1ImageContext'
{ _gcvvicCropHintsParams = Nothing
, _gcvvicWebDetectionParams = Nothing
, _gcvvicProductSearchParams = Nothing
, _gcvvicLanguageHints = Nothing
, _gcvvicLatLongRect = Nothing
}
gcvvicCropHintsParams :: Lens' GoogleCloudVisionV1p2beta1ImageContext (Maybe GoogleCloudVisionV1p2beta1CropHintsParams)
gcvvicCropHintsParams
= lens _gcvvicCropHintsParams
(\ s a -> s{_gcvvicCropHintsParams = a})
gcvvicWebDetectionParams :: Lens' GoogleCloudVisionV1p2beta1ImageContext (Maybe GoogleCloudVisionV1p2beta1WebDetectionParams)
gcvvicWebDetectionParams
= lens _gcvvicWebDetectionParams
(\ s a -> s{_gcvvicWebDetectionParams = a})
gcvvicProductSearchParams :: Lens' GoogleCloudVisionV1p2beta1ImageContext (Maybe GoogleCloudVisionV1p2beta1ProductSearchParams)
gcvvicProductSearchParams
= lens _gcvvicProductSearchParams
(\ s a -> s{_gcvvicProductSearchParams = a})
gcvvicLanguageHints :: Lens' GoogleCloudVisionV1p2beta1ImageContext [Text]
gcvvicLanguageHints
= lens _gcvvicLanguageHints
(\ s a -> s{_gcvvicLanguageHints = a})
. _Default
. _Coerce
gcvvicLatLongRect :: Lens' GoogleCloudVisionV1p2beta1ImageContext (Maybe GoogleCloudVisionV1p2beta1LatLongRect)
gcvvicLatLongRect
= lens _gcvvicLatLongRect
(\ s a -> s{_gcvvicLatLongRect = a})
instance FromJSON
GoogleCloudVisionV1p2beta1ImageContext where
parseJSON
= withObject "GoogleCloudVisionV1p2beta1ImageContext"
(\ o ->
GoogleCloudVisionV1p2beta1ImageContext' <$>
(o .:? "cropHintsParams") <*>
(o .:? "webDetectionParams")
<*> (o .:? "productSearchParams")
<*> (o .:? "languageHints" .!= mempty)
<*> (o .:? "latLongRect"))
instance ToJSON
GoogleCloudVisionV1p2beta1ImageContext where
toJSON GoogleCloudVisionV1p2beta1ImageContext'{..}
= object
(catMaybes
[("cropHintsParams" .=) <$> _gcvvicCropHintsParams,
("webDetectionParams" .=) <$>
_gcvvicWebDetectionParams,
("productSearchParams" .=) <$>
_gcvvicProductSearchParams,
("languageHints" .=) <$> _gcvvicLanguageHints,
("latLongRect" .=) <$> _gcvvicLatLongRect])
data TextProperty = TextProperty'
{ _tpDetectedLanguages :: !(Maybe [DetectedLanguage])
, _tpDetectedBreak :: !(Maybe DetectedBreak)
} deriving (Eq,Show,Data,Typeable,Generic)
textProperty
:: TextProperty
textProperty =
TextProperty'
{ _tpDetectedLanguages = Nothing
, _tpDetectedBreak = Nothing
}
tpDetectedLanguages :: Lens' TextProperty [DetectedLanguage]
tpDetectedLanguages
= lens _tpDetectedLanguages
(\ s a -> s{_tpDetectedLanguages = a})
. _Default
. _Coerce
tpDetectedBreak :: Lens' TextProperty (Maybe DetectedBreak)
tpDetectedBreak
= lens _tpDetectedBreak
(\ s a -> s{_tpDetectedBreak = a})
instance FromJSON TextProperty where
parseJSON
= withObject "TextProperty"
(\ o ->
TextProperty' <$>
(o .:? "detectedLanguages" .!= mempty) <*>
(o .:? "detectedBreak"))
instance ToJSON TextProperty where
toJSON TextProperty'{..}
= object
(catMaybes
[("detectedLanguages" .=) <$> _tpDetectedLanguages,
("detectedBreak" .=) <$> _tpDetectedBreak])
data TextAnnotation = TextAnnotation'
{ _taText :: !(Maybe Text)
, _taPages :: !(Maybe [Page])
} deriving (Eq,Show,Data,Typeable,Generic)
textAnnotation
:: TextAnnotation
textAnnotation =
TextAnnotation'
{ _taText = Nothing
, _taPages = Nothing
}
taText :: Lens' TextAnnotation (Maybe Text)
taText = lens _taText (\ s a -> s{_taText = a})
taPages :: Lens' TextAnnotation [Page]
taPages
= lens _taPages (\ s a -> s{_taPages = a}) . _Default
. _Coerce
instance FromJSON TextAnnotation where
parseJSON
= withObject "TextAnnotation"
(\ o ->
TextAnnotation' <$>
(o .:? "text") <*> (o .:? "pages" .!= mempty))
instance ToJSON TextAnnotation where
toJSON TextAnnotation'{..}
= object
(catMaybes
[("text" .=) <$> _taText, ("pages" .=) <$> _taPages])
data GoogleCloudVisionV1p3beta1ProductSearchResultsResult = GoogleCloudVisionV1p3beta1ProductSearchResultsResult'
{ _gcvvpsrrImage :: !(Maybe Text)
, _gcvvpsrrScore :: !(Maybe (Textual Double))
, _gcvvpsrrProduct :: !(Maybe GoogleCloudVisionV1p3beta1Product)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1ProductSearchResultsResult
:: GoogleCloudVisionV1p3beta1ProductSearchResultsResult
googleCloudVisionV1p3beta1ProductSearchResultsResult =
GoogleCloudVisionV1p3beta1ProductSearchResultsResult'
{ _gcvvpsrrImage = Nothing
, _gcvvpsrrScore = Nothing
, _gcvvpsrrProduct = Nothing
}
gcvvpsrrImage :: Lens' GoogleCloudVisionV1p3beta1ProductSearchResultsResult (Maybe Text)
gcvvpsrrImage
= lens _gcvvpsrrImage
(\ s a -> s{_gcvvpsrrImage = a})
gcvvpsrrScore :: Lens' GoogleCloudVisionV1p3beta1ProductSearchResultsResult (Maybe Double)
gcvvpsrrScore
= lens _gcvvpsrrScore
(\ s a -> s{_gcvvpsrrScore = a})
. mapping _Coerce
gcvvpsrrProduct :: Lens' GoogleCloudVisionV1p3beta1ProductSearchResultsResult (Maybe GoogleCloudVisionV1p3beta1Product)
gcvvpsrrProduct
= lens _gcvvpsrrProduct
(\ s a -> s{_gcvvpsrrProduct = a})
instance FromJSON
GoogleCloudVisionV1p3beta1ProductSearchResultsResult
where
parseJSON
= withObject
"GoogleCloudVisionV1p3beta1ProductSearchResultsResult"
(\ o ->
GoogleCloudVisionV1p3beta1ProductSearchResultsResult'
<$>
(o .:? "image") <*> (o .:? "score") <*>
(o .:? "product"))
instance ToJSON
GoogleCloudVisionV1p3beta1ProductSearchResultsResult
where
toJSON
GoogleCloudVisionV1p3beta1ProductSearchResultsResult'{..}
= object
(catMaybes
[("image" .=) <$> _gcvvpsrrImage,
("score" .=) <$> _gcvvpsrrScore,
("product" .=) <$> _gcvvpsrrProduct])
data GoogleCloudVisionV1p3beta1Paragraph = GoogleCloudVisionV1p3beta1Paragraph'
{ _gcvvpcProperty :: !(Maybe GoogleCloudVisionV1p3beta1TextAnnotationTextProperty)
, _gcvvpcBoundingBox :: !(Maybe GoogleCloudVisionV1p3beta1BoundingPoly)
, _gcvvpcConfidence :: !(Maybe (Textual Double))
, _gcvvpcWords :: !(Maybe [GoogleCloudVisionV1p3beta1Word])
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1Paragraph
:: GoogleCloudVisionV1p3beta1Paragraph
googleCloudVisionV1p3beta1Paragraph =
GoogleCloudVisionV1p3beta1Paragraph'
{ _gcvvpcProperty = Nothing
, _gcvvpcBoundingBox = Nothing
, _gcvvpcConfidence = Nothing
, _gcvvpcWords = Nothing
}
gcvvpcProperty :: Lens' GoogleCloudVisionV1p3beta1Paragraph (Maybe GoogleCloudVisionV1p3beta1TextAnnotationTextProperty)
gcvvpcProperty
= lens _gcvvpcProperty
(\ s a -> s{_gcvvpcProperty = a})
gcvvpcBoundingBox :: Lens' GoogleCloudVisionV1p3beta1Paragraph (Maybe GoogleCloudVisionV1p3beta1BoundingPoly)
gcvvpcBoundingBox
= lens _gcvvpcBoundingBox
(\ s a -> s{_gcvvpcBoundingBox = a})
gcvvpcConfidence :: Lens' GoogleCloudVisionV1p3beta1Paragraph (Maybe Double)
gcvvpcConfidence
= lens _gcvvpcConfidence
(\ s a -> s{_gcvvpcConfidence = a})
. mapping _Coerce
gcvvpcWords :: Lens' GoogleCloudVisionV1p3beta1Paragraph [GoogleCloudVisionV1p3beta1Word]
gcvvpcWords
= lens _gcvvpcWords (\ s a -> s{_gcvvpcWords = a}) .
_Default
. _Coerce
instance FromJSON GoogleCloudVisionV1p3beta1Paragraph
where
parseJSON
= withObject "GoogleCloudVisionV1p3beta1Paragraph"
(\ o ->
GoogleCloudVisionV1p3beta1Paragraph' <$>
(o .:? "property") <*> (o .:? "boundingBox") <*>
(o .:? "confidence")
<*> (o .:? "words" .!= mempty))
instance ToJSON GoogleCloudVisionV1p3beta1Paragraph
where
toJSON GoogleCloudVisionV1p3beta1Paragraph'{..}
= object
(catMaybes
[("property" .=) <$> _gcvvpcProperty,
("boundingBox" .=) <$> _gcvvpcBoundingBox,
("confidence" .=) <$> _gcvvpcConfidence,
("words" .=) <$> _gcvvpcWords])
data GoogleCloudVisionV1p1beta1WebDetectionWebEntity = GoogleCloudVisionV1p1beta1WebDetectionWebEntity'
{ _gcvvwdweScore :: !(Maybe (Textual Double))
, _gcvvwdweEntityId :: !(Maybe Text)
, _gcvvwdweDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1WebDetectionWebEntity
:: GoogleCloudVisionV1p1beta1WebDetectionWebEntity
googleCloudVisionV1p1beta1WebDetectionWebEntity =
GoogleCloudVisionV1p1beta1WebDetectionWebEntity'
{ _gcvvwdweScore = Nothing
, _gcvvwdweEntityId = Nothing
, _gcvvwdweDescription = Nothing
}
gcvvwdweScore :: Lens' GoogleCloudVisionV1p1beta1WebDetectionWebEntity (Maybe Double)
gcvvwdweScore
= lens _gcvvwdweScore
(\ s a -> s{_gcvvwdweScore = a})
. mapping _Coerce
gcvvwdweEntityId :: Lens' GoogleCloudVisionV1p1beta1WebDetectionWebEntity (Maybe Text)
gcvvwdweEntityId
= lens _gcvvwdweEntityId
(\ s a -> s{_gcvvwdweEntityId = a})
gcvvwdweDescription :: Lens' GoogleCloudVisionV1p1beta1WebDetectionWebEntity (Maybe Text)
gcvvwdweDescription
= lens _gcvvwdweDescription
(\ s a -> s{_gcvvwdweDescription = a})
instance FromJSON
GoogleCloudVisionV1p1beta1WebDetectionWebEntity where
parseJSON
= withObject
"GoogleCloudVisionV1p1beta1WebDetectionWebEntity"
(\ o ->
GoogleCloudVisionV1p1beta1WebDetectionWebEntity' <$>
(o .:? "score") <*> (o .:? "entityId") <*>
(o .:? "description"))
instance ToJSON
GoogleCloudVisionV1p1beta1WebDetectionWebEntity where
toJSON
GoogleCloudVisionV1p1beta1WebDetectionWebEntity'{..}
= object
(catMaybes
[("score" .=) <$> _gcvvwdweScore,
("entityId" .=) <$> _gcvvwdweEntityId,
("description" .=) <$> _gcvvwdweDescription])
data GoogleCloudVisionV1p2beta1AnnotateFileResponse = GoogleCloudVisionV1p2beta1AnnotateFileResponse'
{ _gcvvafrResponses :: !(Maybe [GoogleCloudVisionV1p2beta1AnnotateImageResponse])
, _gcvvafrInputConfig :: !(Maybe GoogleCloudVisionV1p2beta1InputConfig)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1AnnotateFileResponse
:: GoogleCloudVisionV1p2beta1AnnotateFileResponse
googleCloudVisionV1p2beta1AnnotateFileResponse =
GoogleCloudVisionV1p2beta1AnnotateFileResponse'
{ _gcvvafrResponses = Nothing
, _gcvvafrInputConfig = Nothing
}
gcvvafrResponses :: Lens' GoogleCloudVisionV1p2beta1AnnotateFileResponse [GoogleCloudVisionV1p2beta1AnnotateImageResponse]
gcvvafrResponses
= lens _gcvvafrResponses
(\ s a -> s{_gcvvafrResponses = a})
. _Default
. _Coerce
gcvvafrInputConfig :: Lens' GoogleCloudVisionV1p2beta1AnnotateFileResponse (Maybe GoogleCloudVisionV1p2beta1InputConfig)
gcvvafrInputConfig
= lens _gcvvafrInputConfig
(\ s a -> s{_gcvvafrInputConfig = a})
instance FromJSON
GoogleCloudVisionV1p2beta1AnnotateFileResponse where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1AnnotateFileResponse"
(\ o ->
GoogleCloudVisionV1p2beta1AnnotateFileResponse' <$>
(o .:? "responses" .!= mempty) <*>
(o .:? "inputConfig"))
instance ToJSON
GoogleCloudVisionV1p2beta1AnnotateFileResponse where
toJSON
GoogleCloudVisionV1p2beta1AnnotateFileResponse'{..}
= object
(catMaybes
[("responses" .=) <$> _gcvvafrResponses,
("inputConfig" .=) <$> _gcvvafrInputConfig])
data GoogleCloudVisionV1p3beta1Word = GoogleCloudVisionV1p3beta1Word'
{ _gcvvwProperty :: !(Maybe GoogleCloudVisionV1p3beta1TextAnnotationTextProperty)
, _gcvvwBoundingBox :: !(Maybe GoogleCloudVisionV1p3beta1BoundingPoly)
, _gcvvwSymbols :: !(Maybe [GoogleCloudVisionV1p3beta1Symbol])
, _gcvvwConfidence :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1Word
:: GoogleCloudVisionV1p3beta1Word
googleCloudVisionV1p3beta1Word =
GoogleCloudVisionV1p3beta1Word'
{ _gcvvwProperty = Nothing
, _gcvvwBoundingBox = Nothing
, _gcvvwSymbols = Nothing
, _gcvvwConfidence = Nothing
}
gcvvwProperty :: Lens' GoogleCloudVisionV1p3beta1Word (Maybe GoogleCloudVisionV1p3beta1TextAnnotationTextProperty)
gcvvwProperty
= lens _gcvvwProperty
(\ s a -> s{_gcvvwProperty = a})
gcvvwBoundingBox :: Lens' GoogleCloudVisionV1p3beta1Word (Maybe GoogleCloudVisionV1p3beta1BoundingPoly)
gcvvwBoundingBox
= lens _gcvvwBoundingBox
(\ s a -> s{_gcvvwBoundingBox = a})
gcvvwSymbols :: Lens' GoogleCloudVisionV1p3beta1Word [GoogleCloudVisionV1p3beta1Symbol]
gcvvwSymbols
= lens _gcvvwSymbols (\ s a -> s{_gcvvwSymbols = a})
. _Default
. _Coerce
gcvvwConfidence :: Lens' GoogleCloudVisionV1p3beta1Word (Maybe Double)
gcvvwConfidence
= lens _gcvvwConfidence
(\ s a -> s{_gcvvwConfidence = a})
. mapping _Coerce
instance FromJSON GoogleCloudVisionV1p3beta1Word
where
parseJSON
= withObject "GoogleCloudVisionV1p3beta1Word"
(\ o ->
GoogleCloudVisionV1p3beta1Word' <$>
(o .:? "property") <*> (o .:? "boundingBox") <*>
(o .:? "symbols" .!= mempty)
<*> (o .:? "confidence"))
instance ToJSON GoogleCloudVisionV1p3beta1Word where
toJSON GoogleCloudVisionV1p3beta1Word'{..}
= object
(catMaybes
[("property" .=) <$> _gcvvwProperty,
("boundingBox" .=) <$> _gcvvwBoundingBox,
("symbols" .=) <$> _gcvvwSymbols,
("confidence" .=) <$> _gcvvwConfidence])
data LocalizedObjectAnnotation = LocalizedObjectAnnotation'
{ _loaLanguageCode :: !(Maybe Text)
, _loaScore :: !(Maybe (Textual Double))
, _loaBoundingPoly :: !(Maybe BoundingPoly)
, _loaName :: !(Maybe Text)
, _loaMid :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
localizedObjectAnnotation
:: LocalizedObjectAnnotation
localizedObjectAnnotation =
LocalizedObjectAnnotation'
{ _loaLanguageCode = Nothing
, _loaScore = Nothing
, _loaBoundingPoly = Nothing
, _loaName = Nothing
, _loaMid = Nothing
}
loaLanguageCode :: Lens' LocalizedObjectAnnotation (Maybe Text)
loaLanguageCode
= lens _loaLanguageCode
(\ s a -> s{_loaLanguageCode = a})
loaScore :: Lens' LocalizedObjectAnnotation (Maybe Double)
loaScore
= lens _loaScore (\ s a -> s{_loaScore = a}) .
mapping _Coerce
loaBoundingPoly :: Lens' LocalizedObjectAnnotation (Maybe BoundingPoly)
loaBoundingPoly
= lens _loaBoundingPoly
(\ s a -> s{_loaBoundingPoly = a})
loaName :: Lens' LocalizedObjectAnnotation (Maybe Text)
loaName = lens _loaName (\ s a -> s{_loaName = a})
loaMid :: Lens' LocalizedObjectAnnotation (Maybe Text)
loaMid = lens _loaMid (\ s a -> s{_loaMid = a})
instance FromJSON LocalizedObjectAnnotation where
parseJSON
= withObject "LocalizedObjectAnnotation"
(\ o ->
LocalizedObjectAnnotation' <$>
(o .:? "languageCode") <*> (o .:? "score") <*>
(o .:? "boundingPoly")
<*> (o .:? "name")
<*> (o .:? "mid"))
instance ToJSON LocalizedObjectAnnotation where
toJSON LocalizedObjectAnnotation'{..}
= object
(catMaybes
[("languageCode" .=) <$> _loaLanguageCode,
("score" .=) <$> _loaScore,
("boundingPoly" .=) <$> _loaBoundingPoly,
("name" .=) <$> _loaName, ("mid" .=) <$> _loaMid])
data GoogleCloudVisionV1p2beta1WebDetection = GoogleCloudVisionV1p2beta1WebDetection'
{ _gcvvwdVisuallySimilarImages :: !(Maybe [GoogleCloudVisionV1p2beta1WebDetectionWebImage])
, _gcvvwdBestGuessLabels :: !(Maybe [GoogleCloudVisionV1p2beta1WebDetectionWebLabel])
, _gcvvwdPagesWithMatchingImages :: !(Maybe [GoogleCloudVisionV1p2beta1WebDetectionWebPage])
, _gcvvwdPartialMatchingImages :: !(Maybe [GoogleCloudVisionV1p2beta1WebDetectionWebImage])
, _gcvvwdFullMatchingImages :: !(Maybe [GoogleCloudVisionV1p2beta1WebDetectionWebImage])
, _gcvvwdWebEntities :: !(Maybe [GoogleCloudVisionV1p2beta1WebDetectionWebEntity])
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1WebDetection
:: GoogleCloudVisionV1p2beta1WebDetection
googleCloudVisionV1p2beta1WebDetection =
GoogleCloudVisionV1p2beta1WebDetection'
{ _gcvvwdVisuallySimilarImages = Nothing
, _gcvvwdBestGuessLabels = Nothing
, _gcvvwdPagesWithMatchingImages = Nothing
, _gcvvwdPartialMatchingImages = Nothing
, _gcvvwdFullMatchingImages = Nothing
, _gcvvwdWebEntities = Nothing
}
gcvvwdVisuallySimilarImages :: Lens' GoogleCloudVisionV1p2beta1WebDetection [GoogleCloudVisionV1p2beta1WebDetectionWebImage]
gcvvwdVisuallySimilarImages
= lens _gcvvwdVisuallySimilarImages
(\ s a -> s{_gcvvwdVisuallySimilarImages = a})
. _Default
. _Coerce
gcvvwdBestGuessLabels :: Lens' GoogleCloudVisionV1p2beta1WebDetection [GoogleCloudVisionV1p2beta1WebDetectionWebLabel]
gcvvwdBestGuessLabels
= lens _gcvvwdBestGuessLabels
(\ s a -> s{_gcvvwdBestGuessLabels = a})
. _Default
. _Coerce
gcvvwdPagesWithMatchingImages :: Lens' GoogleCloudVisionV1p2beta1WebDetection [GoogleCloudVisionV1p2beta1WebDetectionWebPage]
gcvvwdPagesWithMatchingImages
= lens _gcvvwdPagesWithMatchingImages
(\ s a -> s{_gcvvwdPagesWithMatchingImages = a})
. _Default
. _Coerce
gcvvwdPartialMatchingImages :: Lens' GoogleCloudVisionV1p2beta1WebDetection [GoogleCloudVisionV1p2beta1WebDetectionWebImage]
gcvvwdPartialMatchingImages
= lens _gcvvwdPartialMatchingImages
(\ s a -> s{_gcvvwdPartialMatchingImages = a})
. _Default
. _Coerce
gcvvwdFullMatchingImages :: Lens' GoogleCloudVisionV1p2beta1WebDetection [GoogleCloudVisionV1p2beta1WebDetectionWebImage]
gcvvwdFullMatchingImages
= lens _gcvvwdFullMatchingImages
(\ s a -> s{_gcvvwdFullMatchingImages = a})
. _Default
. _Coerce
gcvvwdWebEntities :: Lens' GoogleCloudVisionV1p2beta1WebDetection [GoogleCloudVisionV1p2beta1WebDetectionWebEntity]
gcvvwdWebEntities
= lens _gcvvwdWebEntities
(\ s a -> s{_gcvvwdWebEntities = a})
. _Default
. _Coerce
instance FromJSON
GoogleCloudVisionV1p2beta1WebDetection where
parseJSON
= withObject "GoogleCloudVisionV1p2beta1WebDetection"
(\ o ->
GoogleCloudVisionV1p2beta1WebDetection' <$>
(o .:? "visuallySimilarImages" .!= mempty) <*>
(o .:? "bestGuessLabels" .!= mempty)
<*> (o .:? "pagesWithMatchingImages" .!= mempty)
<*> (o .:? "partialMatchingImages" .!= mempty)
<*> (o .:? "fullMatchingImages" .!= mempty)
<*> (o .:? "webEntities" .!= mempty))
instance ToJSON
GoogleCloudVisionV1p2beta1WebDetection where
toJSON GoogleCloudVisionV1p2beta1WebDetection'{..}
= object
(catMaybes
[("visuallySimilarImages" .=) <$>
_gcvvwdVisuallySimilarImages,
("bestGuessLabels" .=) <$> _gcvvwdBestGuessLabels,
("pagesWithMatchingImages" .=) <$>
_gcvvwdPagesWithMatchingImages,
("partialMatchingImages" .=) <$>
_gcvvwdPartialMatchingImages,
("fullMatchingImages" .=) <$>
_gcvvwdFullMatchingImages,
("webEntities" .=) <$> _gcvvwdWebEntities])
data Operation = Operation'
{ _oDone :: !(Maybe Bool)
, _oError :: !(Maybe Status)
, _oResponse :: !(Maybe OperationResponse)
, _oName :: !(Maybe Text)
, _oMetadata :: !(Maybe OperationSchema)
} deriving (Eq,Show,Data,Typeable,Generic)
operation
:: Operation
operation =
Operation'
{ _oDone = Nothing
, _oError = Nothing
, _oResponse = Nothing
, _oName = Nothing
, _oMetadata = Nothing
}
oDone :: Lens' Operation (Maybe Bool)
oDone = lens _oDone (\ s a -> s{_oDone = a})
oError :: Lens' Operation (Maybe Status)
oError = lens _oError (\ s a -> s{_oError = a})
oResponse :: Lens' Operation (Maybe OperationResponse)
oResponse
= lens _oResponse (\ s a -> s{_oResponse = a})
oName :: Lens' Operation (Maybe Text)
oName = lens _oName (\ s a -> s{_oName = a})
oMetadata :: Lens' Operation (Maybe OperationSchema)
oMetadata
= lens _oMetadata (\ s a -> s{_oMetadata = a})
instance FromJSON Operation where
parseJSON
= withObject "Operation"
(\ o ->
Operation' <$>
(o .:? "done") <*> (o .:? "error") <*>
(o .:? "response")
<*> (o .:? "name")
<*> (o .:? "metadata"))
instance ToJSON Operation where
toJSON Operation'{..}
= object
(catMaybes
[("done" .=) <$> _oDone, ("error" .=) <$> _oError,
("response" .=) <$> _oResponse,
("name" .=) <$> _oName,
("metadata" .=) <$> _oMetadata])
data Color = Color'
{ _cRed :: !(Maybe (Textual Double))
, _cAlpha :: !(Maybe (Textual Double))
, _cGreen :: !(Maybe (Textual Double))
, _cBlue :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
color
:: Color
color =
Color'
{ _cRed = Nothing
, _cAlpha = Nothing
, _cGreen = Nothing
, _cBlue = Nothing
}
cRed :: Lens' Color (Maybe Double)
cRed
= lens _cRed (\ s a -> s{_cRed = a}) .
mapping _Coerce
cAlpha :: Lens' Color (Maybe Double)
cAlpha
= lens _cAlpha (\ s a -> s{_cAlpha = a}) .
mapping _Coerce
cGreen :: Lens' Color (Maybe Double)
cGreen
= lens _cGreen (\ s a -> s{_cGreen = a}) .
mapping _Coerce
cBlue :: Lens' Color (Maybe Double)
cBlue
= lens _cBlue (\ s a -> s{_cBlue = a}) .
mapping _Coerce
instance FromJSON Color where
parseJSON
= withObject "Color"
(\ o ->
Color' <$>
(o .:? "red") <*> (o .:? "alpha") <*> (o .:? "green")
<*> (o .:? "blue"))
instance ToJSON Color where
toJSON Color'{..}
= object
(catMaybes
[("red" .=) <$> _cRed, ("alpha" .=) <$> _cAlpha,
("green" .=) <$> _cGreen, ("blue" .=) <$> _cBlue])
data GoogleCloudVisionV1p2beta1ProductKeyValue = GoogleCloudVisionV1p2beta1ProductKeyValue'
{ _gValue :: !(Maybe Text)
, _gKey :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1ProductKeyValue
:: GoogleCloudVisionV1p2beta1ProductKeyValue
googleCloudVisionV1p2beta1ProductKeyValue =
GoogleCloudVisionV1p2beta1ProductKeyValue'
{ _gValue = Nothing
, _gKey = Nothing
}
gValue :: Lens' GoogleCloudVisionV1p2beta1ProductKeyValue (Maybe Text)
gValue = lens _gValue (\ s a -> s{_gValue = a})
gKey :: Lens' GoogleCloudVisionV1p2beta1ProductKeyValue (Maybe Text)
gKey = lens _gKey (\ s a -> s{_gKey = a})
instance FromJSON
GoogleCloudVisionV1p2beta1ProductKeyValue where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1ProductKeyValue"
(\ o ->
GoogleCloudVisionV1p2beta1ProductKeyValue' <$>
(o .:? "value") <*> (o .:? "key"))
instance ToJSON
GoogleCloudVisionV1p2beta1ProductKeyValue where
toJSON GoogleCloudVisionV1p2beta1ProductKeyValue'{..}
= object
(catMaybes
[("value" .=) <$> _gValue, ("key" .=) <$> _gKey])
data GoogleCloudVisionV1p1beta1FaceAnnotationLandmark = GoogleCloudVisionV1p1beta1FaceAnnotationLandmark'
{ _gcvvfalType :: !(Maybe GoogleCloudVisionV1p1beta1FaceAnnotationLandmarkType)
, _gcvvfalPosition :: !(Maybe GoogleCloudVisionV1p1beta1Position)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1FaceAnnotationLandmark
:: GoogleCloudVisionV1p1beta1FaceAnnotationLandmark
googleCloudVisionV1p1beta1FaceAnnotationLandmark =
GoogleCloudVisionV1p1beta1FaceAnnotationLandmark'
{ _gcvvfalType = Nothing
, _gcvvfalPosition = Nothing
}
gcvvfalType :: Lens' GoogleCloudVisionV1p1beta1FaceAnnotationLandmark (Maybe GoogleCloudVisionV1p1beta1FaceAnnotationLandmarkType)
gcvvfalType
= lens _gcvvfalType (\ s a -> s{_gcvvfalType = a})
gcvvfalPosition :: Lens' GoogleCloudVisionV1p1beta1FaceAnnotationLandmark (Maybe GoogleCloudVisionV1p1beta1Position)
gcvvfalPosition
= lens _gcvvfalPosition
(\ s a -> s{_gcvvfalPosition = a})
instance FromJSON
GoogleCloudVisionV1p1beta1FaceAnnotationLandmark
where
parseJSON
= withObject
"GoogleCloudVisionV1p1beta1FaceAnnotationLandmark"
(\ o ->
GoogleCloudVisionV1p1beta1FaceAnnotationLandmark' <$>
(o .:? "type") <*> (o .:? "position"))
instance ToJSON
GoogleCloudVisionV1p1beta1FaceAnnotationLandmark
where
toJSON
GoogleCloudVisionV1p1beta1FaceAnnotationLandmark'{..}
= object
(catMaybes
[("type" .=) <$> _gcvvfalType,
("position" .=) <$> _gcvvfalPosition])
newtype GoogleCloudVisionV1p3beta1AsyncBatchAnnotateFilesResponse = GoogleCloudVisionV1p3beta1AsyncBatchAnnotateFilesResponse'
{ _gResponses :: Maybe [GoogleCloudVisionV1p3beta1AsyncAnnotateFileResponse]
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1AsyncBatchAnnotateFilesResponse
:: GoogleCloudVisionV1p3beta1AsyncBatchAnnotateFilesResponse
googleCloudVisionV1p3beta1AsyncBatchAnnotateFilesResponse =
GoogleCloudVisionV1p3beta1AsyncBatchAnnotateFilesResponse'
{ _gResponses = Nothing
}
gResponses :: Lens' GoogleCloudVisionV1p3beta1AsyncBatchAnnotateFilesResponse [GoogleCloudVisionV1p3beta1AsyncAnnotateFileResponse]
gResponses
= lens _gResponses (\ s a -> s{_gResponses = a}) .
_Default
. _Coerce
instance FromJSON
GoogleCloudVisionV1p3beta1AsyncBatchAnnotateFilesResponse
where
parseJSON
= withObject
"GoogleCloudVisionV1p3beta1AsyncBatchAnnotateFilesResponse"
(\ o ->
GoogleCloudVisionV1p3beta1AsyncBatchAnnotateFilesResponse'
<$> (o .:? "responses" .!= mempty))
instance ToJSON
GoogleCloudVisionV1p3beta1AsyncBatchAnnotateFilesResponse
where
toJSON
GoogleCloudVisionV1p3beta1AsyncBatchAnnotateFilesResponse'{..}
= object
(catMaybes [("responses" .=) <$> _gResponses])
data GoogleCloudVisionV1p1beta1EntityAnnotation = GoogleCloudVisionV1p1beta1EntityAnnotation'
{ _gcvveaScore :: !(Maybe (Textual Double))
, _gcvveaTopicality :: !(Maybe (Textual Double))
, _gcvveaLocale :: !(Maybe Text)
, _gcvveaBoundingPoly :: !(Maybe GoogleCloudVisionV1p1beta1BoundingPoly)
, _gcvveaConfidence :: !(Maybe (Textual Double))
, _gcvveaMid :: !(Maybe Text)
, _gcvveaLocations :: !(Maybe [GoogleCloudVisionV1p1beta1LocationInfo])
, _gcvveaDescription :: !(Maybe Text)
, _gcvveaProperties :: !(Maybe [GoogleCloudVisionV1p1beta1Property])
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1EntityAnnotation
:: GoogleCloudVisionV1p1beta1EntityAnnotation
googleCloudVisionV1p1beta1EntityAnnotation =
GoogleCloudVisionV1p1beta1EntityAnnotation'
{ _gcvveaScore = Nothing
, _gcvveaTopicality = Nothing
, _gcvveaLocale = Nothing
, _gcvveaBoundingPoly = Nothing
, _gcvveaConfidence = Nothing
, _gcvveaMid = Nothing
, _gcvveaLocations = Nothing
, _gcvveaDescription = Nothing
, _gcvveaProperties = Nothing
}
gcvveaScore :: Lens' GoogleCloudVisionV1p1beta1EntityAnnotation (Maybe Double)
gcvveaScore
= lens _gcvveaScore (\ s a -> s{_gcvveaScore = a}) .
mapping _Coerce
gcvveaTopicality :: Lens' GoogleCloudVisionV1p1beta1EntityAnnotation (Maybe Double)
gcvveaTopicality
= lens _gcvveaTopicality
(\ s a -> s{_gcvveaTopicality = a})
. mapping _Coerce
gcvveaLocale :: Lens' GoogleCloudVisionV1p1beta1EntityAnnotation (Maybe Text)
gcvveaLocale
= lens _gcvveaLocale (\ s a -> s{_gcvveaLocale = a})
gcvveaBoundingPoly :: Lens' GoogleCloudVisionV1p1beta1EntityAnnotation (Maybe GoogleCloudVisionV1p1beta1BoundingPoly)
gcvveaBoundingPoly
= lens _gcvveaBoundingPoly
(\ s a -> s{_gcvveaBoundingPoly = a})
gcvveaConfidence :: Lens' GoogleCloudVisionV1p1beta1EntityAnnotation (Maybe Double)
gcvveaConfidence
= lens _gcvveaConfidence
(\ s a -> s{_gcvveaConfidence = a})
. mapping _Coerce
gcvveaMid :: Lens' GoogleCloudVisionV1p1beta1EntityAnnotation (Maybe Text)
gcvveaMid
= lens _gcvveaMid (\ s a -> s{_gcvveaMid = a})
gcvveaLocations :: Lens' GoogleCloudVisionV1p1beta1EntityAnnotation [GoogleCloudVisionV1p1beta1LocationInfo]
gcvveaLocations
= lens _gcvveaLocations
(\ s a -> s{_gcvveaLocations = a})
. _Default
. _Coerce
gcvveaDescription :: Lens' GoogleCloudVisionV1p1beta1EntityAnnotation (Maybe Text)
gcvveaDescription
= lens _gcvveaDescription
(\ s a -> s{_gcvveaDescription = a})
gcvveaProperties :: Lens' GoogleCloudVisionV1p1beta1EntityAnnotation [GoogleCloudVisionV1p1beta1Property]
gcvveaProperties
= lens _gcvveaProperties
(\ s a -> s{_gcvveaProperties = a})
. _Default
. _Coerce
instance FromJSON
GoogleCloudVisionV1p1beta1EntityAnnotation where
parseJSON
= withObject
"GoogleCloudVisionV1p1beta1EntityAnnotation"
(\ o ->
GoogleCloudVisionV1p1beta1EntityAnnotation' <$>
(o .:? "score") <*> (o .:? "topicality") <*>
(o .:? "locale")
<*> (o .:? "boundingPoly")
<*> (o .:? "confidence")
<*> (o .:? "mid")
<*> (o .:? "locations" .!= mempty)
<*> (o .:? "description")
<*> (o .:? "properties" .!= mempty))
instance ToJSON
GoogleCloudVisionV1p1beta1EntityAnnotation where
toJSON
GoogleCloudVisionV1p1beta1EntityAnnotation'{..}
= object
(catMaybes
[("score" .=) <$> _gcvveaScore,
("topicality" .=) <$> _gcvveaTopicality,
("locale" .=) <$> _gcvveaLocale,
("boundingPoly" .=) <$> _gcvveaBoundingPoly,
("confidence" .=) <$> _gcvveaConfidence,
("mid" .=) <$> _gcvveaMid,
("locations" .=) <$> _gcvveaLocations,
("description" .=) <$> _gcvveaDescription,
("properties" .=) <$> _gcvveaProperties])
data GoogleCloudVisionV1p3beta1AnnotateImageResponse = GoogleCloudVisionV1p3beta1AnnotateImageResponse'
{ _gLogoAnnotations :: !(Maybe [GoogleCloudVisionV1p3beta1EntityAnnotation])
, _gProductSearchResults :: !(Maybe GoogleCloudVisionV1p3beta1ProductSearchResults)
, _gContext :: !(Maybe GoogleCloudVisionV1p3beta1ImageAnnotationContext)
, _gLabelAnnotations :: !(Maybe [GoogleCloudVisionV1p3beta1EntityAnnotation])
, _gFaceAnnotations :: !(Maybe [GoogleCloudVisionV1p3beta1FaceAnnotation])
, _gError :: !(Maybe Status)
, _gWebDetection :: !(Maybe GoogleCloudVisionV1p3beta1WebDetection)
, _gSafeSearchAnnotation :: !(Maybe GoogleCloudVisionV1p3beta1SafeSearchAnnotation)
, _gLandmarkAnnotations :: !(Maybe [GoogleCloudVisionV1p3beta1EntityAnnotation])
, _gLocalizedObjectAnnotations :: !(Maybe [GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation])
, _gTextAnnotations :: !(Maybe [GoogleCloudVisionV1p3beta1EntityAnnotation])
, _gCropHintsAnnotation :: !(Maybe GoogleCloudVisionV1p3beta1CropHintsAnnotation)
, _gFullTextAnnotation :: !(Maybe GoogleCloudVisionV1p3beta1TextAnnotation)
, _gImagePropertiesAnnotation :: !(Maybe GoogleCloudVisionV1p3beta1ImageProperties)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1AnnotateImageResponse
:: GoogleCloudVisionV1p3beta1AnnotateImageResponse
googleCloudVisionV1p3beta1AnnotateImageResponse =
GoogleCloudVisionV1p3beta1AnnotateImageResponse'
{ _gLogoAnnotations = Nothing
, _gProductSearchResults = Nothing
, _gContext = Nothing
, _gLabelAnnotations = Nothing
, _gFaceAnnotations = Nothing
, _gError = Nothing
, _gWebDetection = Nothing
, _gSafeSearchAnnotation = Nothing
, _gLandmarkAnnotations = Nothing
, _gLocalizedObjectAnnotations = Nothing
, _gTextAnnotations = Nothing
, _gCropHintsAnnotation = Nothing
, _gFullTextAnnotation = Nothing
, _gImagePropertiesAnnotation = Nothing
}
gLogoAnnotations :: Lens' GoogleCloudVisionV1p3beta1AnnotateImageResponse [GoogleCloudVisionV1p3beta1EntityAnnotation]
gLogoAnnotations
= lens _gLogoAnnotations
(\ s a -> s{_gLogoAnnotations = a})
. _Default
. _Coerce
gProductSearchResults :: Lens' GoogleCloudVisionV1p3beta1AnnotateImageResponse (Maybe GoogleCloudVisionV1p3beta1ProductSearchResults)
gProductSearchResults
= lens _gProductSearchResults
(\ s a -> s{_gProductSearchResults = a})
gContext :: Lens' GoogleCloudVisionV1p3beta1AnnotateImageResponse (Maybe GoogleCloudVisionV1p3beta1ImageAnnotationContext)
gContext = lens _gContext (\ s a -> s{_gContext = a})
gLabelAnnotations :: Lens' GoogleCloudVisionV1p3beta1AnnotateImageResponse [GoogleCloudVisionV1p3beta1EntityAnnotation]
gLabelAnnotations
= lens _gLabelAnnotations
(\ s a -> s{_gLabelAnnotations = a})
. _Default
. _Coerce
gFaceAnnotations :: Lens' GoogleCloudVisionV1p3beta1AnnotateImageResponse [GoogleCloudVisionV1p3beta1FaceAnnotation]
gFaceAnnotations
= lens _gFaceAnnotations
(\ s a -> s{_gFaceAnnotations = a})
. _Default
. _Coerce
gError :: Lens' GoogleCloudVisionV1p3beta1AnnotateImageResponse (Maybe Status)
gError = lens _gError (\ s a -> s{_gError = a})
gWebDetection :: Lens' GoogleCloudVisionV1p3beta1AnnotateImageResponse (Maybe GoogleCloudVisionV1p3beta1WebDetection)
gWebDetection
= lens _gWebDetection
(\ s a -> s{_gWebDetection = a})
gSafeSearchAnnotation :: Lens' GoogleCloudVisionV1p3beta1AnnotateImageResponse (Maybe GoogleCloudVisionV1p3beta1SafeSearchAnnotation)
gSafeSearchAnnotation
= lens _gSafeSearchAnnotation
(\ s a -> s{_gSafeSearchAnnotation = a})
gLandmarkAnnotations :: Lens' GoogleCloudVisionV1p3beta1AnnotateImageResponse [GoogleCloudVisionV1p3beta1EntityAnnotation]
gLandmarkAnnotations
= lens _gLandmarkAnnotations
(\ s a -> s{_gLandmarkAnnotations = a})
. _Default
. _Coerce
gLocalizedObjectAnnotations :: Lens' GoogleCloudVisionV1p3beta1AnnotateImageResponse [GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation]
gLocalizedObjectAnnotations
= lens _gLocalizedObjectAnnotations
(\ s a -> s{_gLocalizedObjectAnnotations = a})
. _Default
. _Coerce
gTextAnnotations :: Lens' GoogleCloudVisionV1p3beta1AnnotateImageResponse [GoogleCloudVisionV1p3beta1EntityAnnotation]
gTextAnnotations
= lens _gTextAnnotations
(\ s a -> s{_gTextAnnotations = a})
. _Default
. _Coerce
gCropHintsAnnotation :: Lens' GoogleCloudVisionV1p3beta1AnnotateImageResponse (Maybe GoogleCloudVisionV1p3beta1CropHintsAnnotation)
gCropHintsAnnotation
= lens _gCropHintsAnnotation
(\ s a -> s{_gCropHintsAnnotation = a})
gFullTextAnnotation :: Lens' GoogleCloudVisionV1p3beta1AnnotateImageResponse (Maybe GoogleCloudVisionV1p3beta1TextAnnotation)
gFullTextAnnotation
= lens _gFullTextAnnotation
(\ s a -> s{_gFullTextAnnotation = a})
gImagePropertiesAnnotation :: Lens' GoogleCloudVisionV1p3beta1AnnotateImageResponse (Maybe GoogleCloudVisionV1p3beta1ImageProperties)
gImagePropertiesAnnotation
= lens _gImagePropertiesAnnotation
(\ s a -> s{_gImagePropertiesAnnotation = a})
instance FromJSON
GoogleCloudVisionV1p3beta1AnnotateImageResponse where
parseJSON
= withObject
"GoogleCloudVisionV1p3beta1AnnotateImageResponse"
(\ o ->
GoogleCloudVisionV1p3beta1AnnotateImageResponse' <$>
(o .:? "logoAnnotations" .!= mempty) <*>
(o .:? "productSearchResults")
<*> (o .:? "context")
<*> (o .:? "labelAnnotations" .!= mempty)
<*> (o .:? "faceAnnotations" .!= mempty)
<*> (o .:? "error")
<*> (o .:? "webDetection")
<*> (o .:? "safeSearchAnnotation")
<*> (o .:? "landmarkAnnotations" .!= mempty)
<*> (o .:? "localizedObjectAnnotations" .!= mempty)
<*> (o .:? "textAnnotations" .!= mempty)
<*> (o .:? "cropHintsAnnotation")
<*> (o .:? "fullTextAnnotation")
<*> (o .:? "imagePropertiesAnnotation"))
instance ToJSON
GoogleCloudVisionV1p3beta1AnnotateImageResponse where
toJSON
GoogleCloudVisionV1p3beta1AnnotateImageResponse'{..}
= object
(catMaybes
[("logoAnnotations" .=) <$> _gLogoAnnotations,
("productSearchResults" .=) <$>
_gProductSearchResults,
("context" .=) <$> _gContext,
("labelAnnotations" .=) <$> _gLabelAnnotations,
("faceAnnotations" .=) <$> _gFaceAnnotations,
("error" .=) <$> _gError,
("webDetection" .=) <$> _gWebDetection,
("safeSearchAnnotation" .=) <$>
_gSafeSearchAnnotation,
("landmarkAnnotations" .=) <$> _gLandmarkAnnotations,
("localizedObjectAnnotations" .=) <$>
_gLocalizedObjectAnnotations,
("textAnnotations" .=) <$> _gTextAnnotations,
("cropHintsAnnotation" .=) <$> _gCropHintsAnnotation,
("fullTextAnnotation" .=) <$> _gFullTextAnnotation,
("imagePropertiesAnnotation" .=) <$>
_gImagePropertiesAnnotation])
newtype GoogleCloudVisionV1p3beta1ImageProperties = GoogleCloudVisionV1p3beta1ImageProperties'
{ _gDominantColors :: Maybe GoogleCloudVisionV1p3beta1DominantColorsAnnotation
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1ImageProperties
:: GoogleCloudVisionV1p3beta1ImageProperties
googleCloudVisionV1p3beta1ImageProperties =
GoogleCloudVisionV1p3beta1ImageProperties'
{ _gDominantColors = Nothing
}
gDominantColors :: Lens' GoogleCloudVisionV1p3beta1ImageProperties (Maybe GoogleCloudVisionV1p3beta1DominantColorsAnnotation)
gDominantColors
= lens _gDominantColors
(\ s a -> s{_gDominantColors = a})
instance FromJSON
GoogleCloudVisionV1p3beta1ImageProperties where
parseJSON
= withObject
"GoogleCloudVisionV1p3beta1ImageProperties"
(\ o ->
GoogleCloudVisionV1p3beta1ImageProperties' <$>
(o .:? "dominantColors"))
instance ToJSON
GoogleCloudVisionV1p3beta1ImageProperties where
toJSON GoogleCloudVisionV1p3beta1ImageProperties'{..}
= object
(catMaybes
[("dominantColors" .=) <$> _gDominantColors])
data GoogleCloudVisionV1p2beta1ImageSource = GoogleCloudVisionV1p2beta1ImageSource'
{ _gcvvisGcsImageURI :: !(Maybe Text)
, _gcvvisImageURI :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1ImageSource
:: GoogleCloudVisionV1p2beta1ImageSource
googleCloudVisionV1p2beta1ImageSource =
GoogleCloudVisionV1p2beta1ImageSource'
{ _gcvvisGcsImageURI = Nothing
, _gcvvisImageURI = Nothing
}
gcvvisGcsImageURI :: Lens' GoogleCloudVisionV1p2beta1ImageSource (Maybe Text)
gcvvisGcsImageURI
= lens _gcvvisGcsImageURI
(\ s a -> s{_gcvvisGcsImageURI = a})
gcvvisImageURI :: Lens' GoogleCloudVisionV1p2beta1ImageSource (Maybe Text)
gcvvisImageURI
= lens _gcvvisImageURI
(\ s a -> s{_gcvvisImageURI = a})
instance FromJSON
GoogleCloudVisionV1p2beta1ImageSource where
parseJSON
= withObject "GoogleCloudVisionV1p2beta1ImageSource"
(\ o ->
GoogleCloudVisionV1p2beta1ImageSource' <$>
(o .:? "gcsImageUri") <*> (o .:? "imageUri"))
instance ToJSON GoogleCloudVisionV1p2beta1ImageSource
where
toJSON GoogleCloudVisionV1p2beta1ImageSource'{..}
= object
(catMaybes
[("gcsImageUri" .=) <$> _gcvvisGcsImageURI,
("imageUri" .=) <$> _gcvvisImageURI])
data GoogleCloudVisionV1p3beta1Page = GoogleCloudVisionV1p3beta1Page'
{ _ggProperty :: !(Maybe GoogleCloudVisionV1p3beta1TextAnnotationTextProperty)
, _ggHeight :: !(Maybe (Textual Int32))
, _ggBlocks :: !(Maybe [GoogleCloudVisionV1p3beta1Block])
, _ggWidth :: !(Maybe (Textual Int32))
, _ggConfidence :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1Page
:: GoogleCloudVisionV1p3beta1Page
googleCloudVisionV1p3beta1Page =
GoogleCloudVisionV1p3beta1Page'
{ _ggProperty = Nothing
, _ggHeight = Nothing
, _ggBlocks = Nothing
, _ggWidth = Nothing
, _ggConfidence = Nothing
}
ggProperty :: Lens' GoogleCloudVisionV1p3beta1Page (Maybe GoogleCloudVisionV1p3beta1TextAnnotationTextProperty)
ggProperty
= lens _ggProperty (\ s a -> s{_ggProperty = a})
ggHeight :: Lens' GoogleCloudVisionV1p3beta1Page (Maybe Int32)
ggHeight
= lens _ggHeight (\ s a -> s{_ggHeight = a}) .
mapping _Coerce
ggBlocks :: Lens' GoogleCloudVisionV1p3beta1Page [GoogleCloudVisionV1p3beta1Block]
ggBlocks
= lens _ggBlocks (\ s a -> s{_ggBlocks = a}) .
_Default
. _Coerce
ggWidth :: Lens' GoogleCloudVisionV1p3beta1Page (Maybe Int32)
ggWidth
= lens _ggWidth (\ s a -> s{_ggWidth = a}) .
mapping _Coerce
ggConfidence :: Lens' GoogleCloudVisionV1p3beta1Page (Maybe Double)
ggConfidence
= lens _ggConfidence (\ s a -> s{_ggConfidence = a})
. mapping _Coerce
instance FromJSON GoogleCloudVisionV1p3beta1Page
where
parseJSON
= withObject "GoogleCloudVisionV1p3beta1Page"
(\ o ->
GoogleCloudVisionV1p3beta1Page' <$>
(o .:? "property") <*> (o .:? "height") <*>
(o .:? "blocks" .!= mempty)
<*> (o .:? "width")
<*> (o .:? "confidence"))
instance ToJSON GoogleCloudVisionV1p3beta1Page where
toJSON GoogleCloudVisionV1p3beta1Page'{..}
= object
(catMaybes
[("property" .=) <$> _ggProperty,
("height" .=) <$> _ggHeight,
("blocks" .=) <$> _ggBlocks,
("width" .=) <$> _ggWidth,
("confidence" .=) <$> _ggConfidence])
data GoogleCloudVisionV1p1beta1Block = GoogleCloudVisionV1p1beta1Block'
{ _gcvvbProperty :: !(Maybe GoogleCloudVisionV1p1beta1TextAnnotationTextProperty)
, _gcvvbBoundingBox :: !(Maybe GoogleCloudVisionV1p1beta1BoundingPoly)
, _gcvvbParagraphs :: !(Maybe [GoogleCloudVisionV1p1beta1Paragraph])
, _gcvvbConfidence :: !(Maybe (Textual Double))
, _gcvvbBlockType :: !(Maybe GoogleCloudVisionV1p1beta1BlockBlockType)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1Block
:: GoogleCloudVisionV1p1beta1Block
googleCloudVisionV1p1beta1Block =
GoogleCloudVisionV1p1beta1Block'
{ _gcvvbProperty = Nothing
, _gcvvbBoundingBox = Nothing
, _gcvvbParagraphs = Nothing
, _gcvvbConfidence = Nothing
, _gcvvbBlockType = Nothing
}
gcvvbProperty :: Lens' GoogleCloudVisionV1p1beta1Block (Maybe GoogleCloudVisionV1p1beta1TextAnnotationTextProperty)
gcvvbProperty
= lens _gcvvbProperty
(\ s a -> s{_gcvvbProperty = a})
gcvvbBoundingBox :: Lens' GoogleCloudVisionV1p1beta1Block (Maybe GoogleCloudVisionV1p1beta1BoundingPoly)
gcvvbBoundingBox
= lens _gcvvbBoundingBox
(\ s a -> s{_gcvvbBoundingBox = a})
gcvvbParagraphs :: Lens' GoogleCloudVisionV1p1beta1Block [GoogleCloudVisionV1p1beta1Paragraph]
gcvvbParagraphs
= lens _gcvvbParagraphs
(\ s a -> s{_gcvvbParagraphs = a})
. _Default
. _Coerce
gcvvbConfidence :: Lens' GoogleCloudVisionV1p1beta1Block (Maybe Double)
gcvvbConfidence
= lens _gcvvbConfidence
(\ s a -> s{_gcvvbConfidence = a})
. mapping _Coerce
gcvvbBlockType :: Lens' GoogleCloudVisionV1p1beta1Block (Maybe GoogleCloudVisionV1p1beta1BlockBlockType)
gcvvbBlockType
= lens _gcvvbBlockType
(\ s a -> s{_gcvvbBlockType = a})
instance FromJSON GoogleCloudVisionV1p1beta1Block
where
parseJSON
= withObject "GoogleCloudVisionV1p1beta1Block"
(\ o ->
GoogleCloudVisionV1p1beta1Block' <$>
(o .:? "property") <*> (o .:? "boundingBox") <*>
(o .:? "paragraphs" .!= mempty)
<*> (o .:? "confidence")
<*> (o .:? "blockType"))
instance ToJSON GoogleCloudVisionV1p1beta1Block where
toJSON GoogleCloudVisionV1p1beta1Block'{..}
= object
(catMaybes
[("property" .=) <$> _gcvvbProperty,
("boundingBox" .=) <$> _gcvvbBoundingBox,
("paragraphs" .=) <$> _gcvvbParagraphs,
("confidence" .=) <$> _gcvvbConfidence,
("blockType" .=) <$> _gcvvbBlockType])
newtype GoogleCloudVisionV1p3beta1GcsDestination = GoogleCloudVisionV1p3beta1GcsDestination'
{ _gcvvgdURI :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1GcsDestination
:: GoogleCloudVisionV1p3beta1GcsDestination
googleCloudVisionV1p3beta1GcsDestination =
GoogleCloudVisionV1p3beta1GcsDestination'
{ _gcvvgdURI = Nothing
}
gcvvgdURI :: Lens' GoogleCloudVisionV1p3beta1GcsDestination (Maybe Text)
gcvvgdURI
= lens _gcvvgdURI (\ s a -> s{_gcvvgdURI = a})
instance FromJSON
GoogleCloudVisionV1p3beta1GcsDestination where
parseJSON
= withObject
"GoogleCloudVisionV1p3beta1GcsDestination"
(\ o ->
GoogleCloudVisionV1p3beta1GcsDestination' <$>
(o .:? "uri"))
instance ToJSON
GoogleCloudVisionV1p3beta1GcsDestination where
toJSON GoogleCloudVisionV1p3beta1GcsDestination'{..}
= object (catMaybes [("uri" .=) <$> _gcvvgdURI])
data GoogleCloudVisionV1p3beta1Product = GoogleCloudVisionV1p3beta1Product'
{ _gName :: !(Maybe Text)
, _gDisplayName :: !(Maybe Text)
, _gProductCategory :: !(Maybe Text)
, _gProductLabels :: !(Maybe [GoogleCloudVisionV1p3beta1ProductKeyValue])
, _gDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1Product
:: GoogleCloudVisionV1p3beta1Product
googleCloudVisionV1p3beta1Product =
GoogleCloudVisionV1p3beta1Product'
{ _gName = Nothing
, _gDisplayName = Nothing
, _gProductCategory = Nothing
, _gProductLabels = Nothing
, _gDescription = Nothing
}
gName :: Lens' GoogleCloudVisionV1p3beta1Product (Maybe Text)
gName = lens _gName (\ s a -> s{_gName = a})
gDisplayName :: Lens' GoogleCloudVisionV1p3beta1Product (Maybe Text)
gDisplayName
= lens _gDisplayName (\ s a -> s{_gDisplayName = a})
gProductCategory :: Lens' GoogleCloudVisionV1p3beta1Product (Maybe Text)
gProductCategory
= lens _gProductCategory
(\ s a -> s{_gProductCategory = a})
gProductLabels :: Lens' GoogleCloudVisionV1p3beta1Product [GoogleCloudVisionV1p3beta1ProductKeyValue]
gProductLabels
= lens _gProductLabels
(\ s a -> s{_gProductLabels = a})
. _Default
. _Coerce
gDescription :: Lens' GoogleCloudVisionV1p3beta1Product (Maybe Text)
gDescription
= lens _gDescription (\ s a -> s{_gDescription = a})
instance FromJSON GoogleCloudVisionV1p3beta1Product
where
parseJSON
= withObject "GoogleCloudVisionV1p3beta1Product"
(\ o ->
GoogleCloudVisionV1p3beta1Product' <$>
(o .:? "name") <*> (o .:? "displayName") <*>
(o .:? "productCategory")
<*> (o .:? "productLabels" .!= mempty)
<*> (o .:? "description"))
instance ToJSON GoogleCloudVisionV1p3beta1Product
where
toJSON GoogleCloudVisionV1p3beta1Product'{..}
= object
(catMaybes
[("name" .=) <$> _gName,
("displayName" .=) <$> _gDisplayName,
("productCategory" .=) <$> _gProductCategory,
("productLabels" .=) <$> _gProductLabels,
("description" .=) <$> _gDescription])
data BoundingPoly = BoundingPoly'
{ _bpNormalizedVertices :: !(Maybe [NormalizedVertex])
, _bpVertices :: !(Maybe [Vertex])
} deriving (Eq,Show,Data,Typeable,Generic)
boundingPoly
:: BoundingPoly
boundingPoly =
BoundingPoly'
{ _bpNormalizedVertices = Nothing
, _bpVertices = Nothing
}
bpNormalizedVertices :: Lens' BoundingPoly [NormalizedVertex]
bpNormalizedVertices
= lens _bpNormalizedVertices
(\ s a -> s{_bpNormalizedVertices = a})
. _Default
. _Coerce
bpVertices :: Lens' BoundingPoly [Vertex]
bpVertices
= lens _bpVertices (\ s a -> s{_bpVertices = a}) .
_Default
. _Coerce
instance FromJSON BoundingPoly where
parseJSON
= withObject "BoundingPoly"
(\ o ->
BoundingPoly' <$>
(o .:? "normalizedVertices" .!= mempty) <*>
(o .:? "vertices" .!= mempty))
instance ToJSON BoundingPoly where
toJSON BoundingPoly'{..}
= object
(catMaybes
[("normalizedVertices" .=) <$> _bpNormalizedVertices,
("vertices" .=) <$> _bpVertices])
data GoogleCloudVisionV1p1beta1NormalizedVertex = GoogleCloudVisionV1p1beta1NormalizedVertex'
{ _gcvvnvX :: !(Maybe (Textual Double))
, _gcvvnvY :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1NormalizedVertex
:: GoogleCloudVisionV1p1beta1NormalizedVertex
googleCloudVisionV1p1beta1NormalizedVertex =
GoogleCloudVisionV1p1beta1NormalizedVertex'
{ _gcvvnvX = Nothing
, _gcvvnvY = Nothing
}
gcvvnvX :: Lens' GoogleCloudVisionV1p1beta1NormalizedVertex (Maybe Double)
gcvvnvX
= lens _gcvvnvX (\ s a -> s{_gcvvnvX = a}) .
mapping _Coerce
gcvvnvY :: Lens' GoogleCloudVisionV1p1beta1NormalizedVertex (Maybe Double)
gcvvnvY
= lens _gcvvnvY (\ s a -> s{_gcvvnvY = a}) .
mapping _Coerce
instance FromJSON
GoogleCloudVisionV1p1beta1NormalizedVertex where
parseJSON
= withObject
"GoogleCloudVisionV1p1beta1NormalizedVertex"
(\ o ->
GoogleCloudVisionV1p1beta1NormalizedVertex' <$>
(o .:? "x") <*> (o .:? "y"))
instance ToJSON
GoogleCloudVisionV1p1beta1NormalizedVertex where
toJSON
GoogleCloudVisionV1p1beta1NormalizedVertex'{..}
= object
(catMaybes
[("x" .=) <$> _gcvvnvX, ("y" .=) <$> _gcvvnvY])
newtype GoogleCloudVisionV1p3beta1LocationInfo = GoogleCloudVisionV1p3beta1LocationInfo'
{ _gcvvliLatLng :: Maybe LatLng
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1LocationInfo
:: GoogleCloudVisionV1p3beta1LocationInfo
googleCloudVisionV1p3beta1LocationInfo =
GoogleCloudVisionV1p3beta1LocationInfo'
{ _gcvvliLatLng = Nothing
}
gcvvliLatLng :: Lens' GoogleCloudVisionV1p3beta1LocationInfo (Maybe LatLng)
gcvvliLatLng
= lens _gcvvliLatLng (\ s a -> s{_gcvvliLatLng = a})
instance FromJSON
GoogleCloudVisionV1p3beta1LocationInfo where
parseJSON
= withObject "GoogleCloudVisionV1p3beta1LocationInfo"
(\ o ->
GoogleCloudVisionV1p3beta1LocationInfo' <$>
(o .:? "latLng"))
instance ToJSON
GoogleCloudVisionV1p3beta1LocationInfo where
toJSON GoogleCloudVisionV1p3beta1LocationInfo'{..}
= object
(catMaybes [("latLng" .=) <$> _gcvvliLatLng])
data Vertex = Vertex'
{ _vX :: !(Maybe (Textual Int32))
, _vY :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
vertex
:: Vertex
vertex =
Vertex'
{ _vX = Nothing
, _vY = Nothing
}
vX :: Lens' Vertex (Maybe Int32)
vX = lens _vX (\ s a -> s{_vX = a}) . mapping _Coerce
vY :: Lens' Vertex (Maybe Int32)
vY = lens _vY (\ s a -> s{_vY = a}) . mapping _Coerce
instance FromJSON Vertex where
parseJSON
= withObject "Vertex"
(\ o -> Vertex' <$> (o .:? "x") <*> (o .:? "y"))
instance ToJSON Vertex where
toJSON Vertex'{..}
= object
(catMaybes [("x" .=) <$> _vX, ("y" .=) <$> _vY])
data GoogleCloudVisionV1p1beta1Position = GoogleCloudVisionV1p1beta1Position'
{ _gcvvpZ :: !(Maybe (Textual Double))
, _gcvvpX :: !(Maybe (Textual Double))
, _gcvvpY :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1Position
:: GoogleCloudVisionV1p1beta1Position
googleCloudVisionV1p1beta1Position =
GoogleCloudVisionV1p1beta1Position'
{ _gcvvpZ = Nothing
, _gcvvpX = Nothing
, _gcvvpY = Nothing
}
gcvvpZ :: Lens' GoogleCloudVisionV1p1beta1Position (Maybe Double)
gcvvpZ
= lens _gcvvpZ (\ s a -> s{_gcvvpZ = a}) .
mapping _Coerce
gcvvpX :: Lens' GoogleCloudVisionV1p1beta1Position (Maybe Double)
gcvvpX
= lens _gcvvpX (\ s a -> s{_gcvvpX = a}) .
mapping _Coerce
gcvvpY :: Lens' GoogleCloudVisionV1p1beta1Position (Maybe Double)
gcvvpY
= lens _gcvvpY (\ s a -> s{_gcvvpY = a}) .
mapping _Coerce
instance FromJSON GoogleCloudVisionV1p1beta1Position
where
parseJSON
= withObject "GoogleCloudVisionV1p1beta1Position"
(\ o ->
GoogleCloudVisionV1p1beta1Position' <$>
(o .:? "z") <*> (o .:? "x") <*> (o .:? "y"))
instance ToJSON GoogleCloudVisionV1p1beta1Position
where
toJSON GoogleCloudVisionV1p1beta1Position'{..}
= object
(catMaybes
[("z" .=) <$> _gcvvpZ, ("x" .=) <$> _gcvvpX,
("y" .=) <$> _gcvvpY])
newtype GoogleCloudVisionV1p1beta1AsyncAnnotateFileResponse = GoogleCloudVisionV1p1beta1AsyncAnnotateFileResponse'
{ _gcvvaafrOutputConfig :: Maybe GoogleCloudVisionV1p1beta1OutputConfig
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1AsyncAnnotateFileResponse
:: GoogleCloudVisionV1p1beta1AsyncAnnotateFileResponse
googleCloudVisionV1p1beta1AsyncAnnotateFileResponse =
GoogleCloudVisionV1p1beta1AsyncAnnotateFileResponse'
{ _gcvvaafrOutputConfig = Nothing
}
gcvvaafrOutputConfig :: Lens' GoogleCloudVisionV1p1beta1AsyncAnnotateFileResponse (Maybe GoogleCloudVisionV1p1beta1OutputConfig)
gcvvaafrOutputConfig
= lens _gcvvaafrOutputConfig
(\ s a -> s{_gcvvaafrOutputConfig = a})
instance FromJSON
GoogleCloudVisionV1p1beta1AsyncAnnotateFileResponse
where
parseJSON
= withObject
"GoogleCloudVisionV1p1beta1AsyncAnnotateFileResponse"
(\ o ->
GoogleCloudVisionV1p1beta1AsyncAnnotateFileResponse'
<$> (o .:? "outputConfig"))
instance ToJSON
GoogleCloudVisionV1p1beta1AsyncAnnotateFileResponse
where
toJSON
GoogleCloudVisionV1p1beta1AsyncAnnotateFileResponse'{..}
= object
(catMaybes
[("outputConfig" .=) <$> _gcvvaafrOutputConfig])
data GoogleCloudVisionV1p3beta1WebDetectionWebImage = GoogleCloudVisionV1p3beta1WebDetectionWebImage'
{ _gcvvwdwiScore :: !(Maybe (Textual Double))
, _gcvvwdwiURL :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1WebDetectionWebImage
:: GoogleCloudVisionV1p3beta1WebDetectionWebImage
googleCloudVisionV1p3beta1WebDetectionWebImage =
GoogleCloudVisionV1p3beta1WebDetectionWebImage'
{ _gcvvwdwiScore = Nothing
, _gcvvwdwiURL = Nothing
}
gcvvwdwiScore :: Lens' GoogleCloudVisionV1p3beta1WebDetectionWebImage (Maybe Double)
gcvvwdwiScore
= lens _gcvvwdwiScore
(\ s a -> s{_gcvvwdwiScore = a})
. mapping _Coerce
gcvvwdwiURL :: Lens' GoogleCloudVisionV1p3beta1WebDetectionWebImage (Maybe Text)
gcvvwdwiURL
= lens _gcvvwdwiURL (\ s a -> s{_gcvvwdwiURL = a})
instance FromJSON
GoogleCloudVisionV1p3beta1WebDetectionWebImage where
parseJSON
= withObject
"GoogleCloudVisionV1p3beta1WebDetectionWebImage"
(\ o ->
GoogleCloudVisionV1p3beta1WebDetectionWebImage' <$>
(o .:? "score") <*> (o .:? "url"))
instance ToJSON
GoogleCloudVisionV1p3beta1WebDetectionWebImage where
toJSON
GoogleCloudVisionV1p3beta1WebDetectionWebImage'{..}
= object
(catMaybes
[("score" .=) <$> _gcvvwdwiScore,
("url" .=) <$> _gcvvwdwiURL])
data GoogleCloudVisionV1p3beta1Vertex = GoogleCloudVisionV1p3beta1Vertex'
{ _gcvvvX :: !(Maybe (Textual Int32))
, _gcvvvY :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1Vertex
:: GoogleCloudVisionV1p3beta1Vertex
googleCloudVisionV1p3beta1Vertex =
GoogleCloudVisionV1p3beta1Vertex'
{ _gcvvvX = Nothing
, _gcvvvY = Nothing
}
gcvvvX :: Lens' GoogleCloudVisionV1p3beta1Vertex (Maybe Int32)
gcvvvX
= lens _gcvvvX (\ s a -> s{_gcvvvX = a}) .
mapping _Coerce
gcvvvY :: Lens' GoogleCloudVisionV1p3beta1Vertex (Maybe Int32)
gcvvvY
= lens _gcvvvY (\ s a -> s{_gcvvvY = a}) .
mapping _Coerce
instance FromJSON GoogleCloudVisionV1p3beta1Vertex
where
parseJSON
= withObject "GoogleCloudVisionV1p3beta1Vertex"
(\ o ->
GoogleCloudVisionV1p3beta1Vertex' <$>
(o .:? "x") <*> (o .:? "y"))
instance ToJSON GoogleCloudVisionV1p3beta1Vertex
where
toJSON GoogleCloudVisionV1p3beta1Vertex'{..}
= object
(catMaybes
[("x" .=) <$> _gcvvvX, ("y" .=) <$> _gcvvvY])
data WebEntity = WebEntity'
{ _weScore :: !(Maybe (Textual Double))
, _weEntityId :: !(Maybe Text)
, _weDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
webEntity
:: WebEntity
webEntity =
WebEntity'
{ _weScore = Nothing
, _weEntityId = Nothing
, _weDescription = Nothing
}
weScore :: Lens' WebEntity (Maybe Double)
weScore
= lens _weScore (\ s a -> s{_weScore = a}) .
mapping _Coerce
weEntityId :: Lens' WebEntity (Maybe Text)
weEntityId
= lens _weEntityId (\ s a -> s{_weEntityId = a})
weDescription :: Lens' WebEntity (Maybe Text)
weDescription
= lens _weDescription
(\ s a -> s{_weDescription = a})
instance FromJSON WebEntity where
parseJSON
= withObject "WebEntity"
(\ o ->
WebEntity' <$>
(o .:? "score") <*> (o .:? "entityId") <*>
(o .:? "description"))
instance ToJSON WebEntity where
toJSON WebEntity'{..}
= object
(catMaybes
[("score" .=) <$> _weScore,
("entityId" .=) <$> _weEntityId,
("description" .=) <$> _weDescription])
newtype GoogleCloudVisionV1p2beta1BatchAnnotateImagesResponse = GoogleCloudVisionV1p2beta1BatchAnnotateImagesResponse'
{ _gcvvbairResponses :: Maybe [GoogleCloudVisionV1p2beta1AnnotateImageResponse]
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1BatchAnnotateImagesResponse
:: GoogleCloudVisionV1p2beta1BatchAnnotateImagesResponse
googleCloudVisionV1p2beta1BatchAnnotateImagesResponse =
GoogleCloudVisionV1p2beta1BatchAnnotateImagesResponse'
{ _gcvvbairResponses = Nothing
}
gcvvbairResponses :: Lens' GoogleCloudVisionV1p2beta1BatchAnnotateImagesResponse [GoogleCloudVisionV1p2beta1AnnotateImageResponse]
gcvvbairResponses
= lens _gcvvbairResponses
(\ s a -> s{_gcvvbairResponses = a})
. _Default
. _Coerce
instance FromJSON
GoogleCloudVisionV1p2beta1BatchAnnotateImagesResponse
where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1BatchAnnotateImagesResponse"
(\ o ->
GoogleCloudVisionV1p2beta1BatchAnnotateImagesResponse'
<$> (o .:? "responses" .!= mempty))
instance ToJSON
GoogleCloudVisionV1p2beta1BatchAnnotateImagesResponse
where
toJSON
GoogleCloudVisionV1p2beta1BatchAnnotateImagesResponse'{..}
= object
(catMaybes [("responses" .=) <$> _gcvvbairResponses])
newtype GoogleCloudVisionV1p1beta1GcsSource = GoogleCloudVisionV1p1beta1GcsSource'
{ _gcvvgsURI :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1GcsSource
:: GoogleCloudVisionV1p1beta1GcsSource
googleCloudVisionV1p1beta1GcsSource =
GoogleCloudVisionV1p1beta1GcsSource'
{ _gcvvgsURI = Nothing
}
gcvvgsURI :: Lens' GoogleCloudVisionV1p1beta1GcsSource (Maybe Text)
gcvvgsURI
= lens _gcvvgsURI (\ s a -> s{_gcvvgsURI = a})
instance FromJSON GoogleCloudVisionV1p1beta1GcsSource
where
parseJSON
= withObject "GoogleCloudVisionV1p1beta1GcsSource"
(\ o ->
GoogleCloudVisionV1p1beta1GcsSource' <$>
(o .:? "uri"))
instance ToJSON GoogleCloudVisionV1p1beta1GcsSource
where
toJSON GoogleCloudVisionV1p1beta1GcsSource'{..}
= object (catMaybes [("uri" .=) <$> _gcvvgsURI])
newtype GoogleCloudVisionV1p2beta1CropHintsAnnotation = GoogleCloudVisionV1p2beta1CropHintsAnnotation'
{ _gCropHints :: Maybe [GoogleCloudVisionV1p2beta1CropHint]
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1CropHintsAnnotation
:: GoogleCloudVisionV1p2beta1CropHintsAnnotation
googleCloudVisionV1p2beta1CropHintsAnnotation =
GoogleCloudVisionV1p2beta1CropHintsAnnotation'
{ _gCropHints = Nothing
}
gCropHints :: Lens' GoogleCloudVisionV1p2beta1CropHintsAnnotation [GoogleCloudVisionV1p2beta1CropHint]
gCropHints
= lens _gCropHints (\ s a -> s{_gCropHints = a}) .
_Default
. _Coerce
instance FromJSON
GoogleCloudVisionV1p2beta1CropHintsAnnotation where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1CropHintsAnnotation"
(\ o ->
GoogleCloudVisionV1p2beta1CropHintsAnnotation' <$>
(o .:? "cropHints" .!= mempty))
instance ToJSON
GoogleCloudVisionV1p2beta1CropHintsAnnotation where
toJSON
GoogleCloudVisionV1p2beta1CropHintsAnnotation'{..}
= object
(catMaybes [("cropHints" .=) <$> _gCropHints])
newtype GcsDestination = GcsDestination'
{ _gdURI :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
gcsDestination
:: GcsDestination
gcsDestination =
GcsDestination'
{ _gdURI = Nothing
}
gdURI :: Lens' GcsDestination (Maybe Text)
gdURI = lens _gdURI (\ s a -> s{_gdURI = a})
instance FromJSON GcsDestination where
parseJSON
= withObject "GcsDestination"
(\ o -> GcsDestination' <$> (o .:? "uri"))
instance ToJSON GcsDestination where
toJSON GcsDestination'{..}
= object (catMaybes [("uri" .=) <$> _gdURI])
data GoogleCloudVisionV1p3beta1BoundingPoly = GoogleCloudVisionV1p3beta1BoundingPoly'
{ _gcvvbpNormalizedVertices :: !(Maybe [GoogleCloudVisionV1p3beta1NormalizedVertex])
, _gcvvbpVertices :: !(Maybe [GoogleCloudVisionV1p3beta1Vertex])
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1BoundingPoly
:: GoogleCloudVisionV1p3beta1BoundingPoly
googleCloudVisionV1p3beta1BoundingPoly =
GoogleCloudVisionV1p3beta1BoundingPoly'
{ _gcvvbpNormalizedVertices = Nothing
, _gcvvbpVertices = Nothing
}
gcvvbpNormalizedVertices :: Lens' GoogleCloudVisionV1p3beta1BoundingPoly [GoogleCloudVisionV1p3beta1NormalizedVertex]
gcvvbpNormalizedVertices
= lens _gcvvbpNormalizedVertices
(\ s a -> s{_gcvvbpNormalizedVertices = a})
. _Default
. _Coerce
gcvvbpVertices :: Lens' GoogleCloudVisionV1p3beta1BoundingPoly [GoogleCloudVisionV1p3beta1Vertex]
gcvvbpVertices
= lens _gcvvbpVertices
(\ s a -> s{_gcvvbpVertices = a})
. _Default
. _Coerce
instance FromJSON
GoogleCloudVisionV1p3beta1BoundingPoly where
parseJSON
= withObject "GoogleCloudVisionV1p3beta1BoundingPoly"
(\ o ->
GoogleCloudVisionV1p3beta1BoundingPoly' <$>
(o .:? "normalizedVertices" .!= mempty) <*>
(o .:? "vertices" .!= mempty))
instance ToJSON
GoogleCloudVisionV1p3beta1BoundingPoly where
toJSON GoogleCloudVisionV1p3beta1BoundingPoly'{..}
= object
(catMaybes
[("normalizedVertices" .=) <$>
_gcvvbpNormalizedVertices,
("vertices" .=) <$> _gcvvbpVertices])
data GoogleCloudVisionV1p2beta1NormalizedVertex = GoogleCloudVisionV1p2beta1NormalizedVertex'
{ _gX :: !(Maybe (Textual Double))
, _gY :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1NormalizedVertex
:: GoogleCloudVisionV1p2beta1NormalizedVertex
googleCloudVisionV1p2beta1NormalizedVertex =
GoogleCloudVisionV1p2beta1NormalizedVertex'
{ _gX = Nothing
, _gY = Nothing
}
gX :: Lens' GoogleCloudVisionV1p2beta1NormalizedVertex (Maybe Double)
gX = lens _gX (\ s a -> s{_gX = a}) . mapping _Coerce
gY :: Lens' GoogleCloudVisionV1p2beta1NormalizedVertex (Maybe Double)
gY = lens _gY (\ s a -> s{_gY = a}) . mapping _Coerce
instance FromJSON
GoogleCloudVisionV1p2beta1NormalizedVertex where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1NormalizedVertex"
(\ o ->
GoogleCloudVisionV1p2beta1NormalizedVertex' <$>
(o .:? "x") <*> (o .:? "y"))
instance ToJSON
GoogleCloudVisionV1p2beta1NormalizedVertex where
toJSON
GoogleCloudVisionV1p2beta1NormalizedVertex'{..}
= object
(catMaybes [("x" .=) <$> _gX, ("y" .=) <$> _gY])
data GoogleCloudVisionV1p2beta1Position = GoogleCloudVisionV1p2beta1Position'
{ _gooZ :: !(Maybe (Textual Double))
, _gooX :: !(Maybe (Textual Double))
, _gooY :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1Position
:: GoogleCloudVisionV1p2beta1Position
googleCloudVisionV1p2beta1Position =
GoogleCloudVisionV1p2beta1Position'
{ _gooZ = Nothing
, _gooX = Nothing
, _gooY = Nothing
}
gooZ :: Lens' GoogleCloudVisionV1p2beta1Position (Maybe Double)
gooZ
= lens _gooZ (\ s a -> s{_gooZ = a}) .
mapping _Coerce
gooX :: Lens' GoogleCloudVisionV1p2beta1Position (Maybe Double)
gooX
= lens _gooX (\ s a -> s{_gooX = a}) .
mapping _Coerce
gooY :: Lens' GoogleCloudVisionV1p2beta1Position (Maybe Double)
gooY
= lens _gooY (\ s a -> s{_gooY = a}) .
mapping _Coerce
instance FromJSON GoogleCloudVisionV1p2beta1Position
where
parseJSON
= withObject "GoogleCloudVisionV1p2beta1Position"
(\ o ->
GoogleCloudVisionV1p2beta1Position' <$>
(o .:? "z") <*> (o .:? "x") <*> (o .:? "y"))
instance ToJSON GoogleCloudVisionV1p2beta1Position
where
toJSON GoogleCloudVisionV1p2beta1Position'{..}
= object
(catMaybes
[("z" .=) <$> _gooZ, ("x" .=) <$> _gooX,
("y" .=) <$> _gooY])
data GoogleCloudVisionV1p3beta1TextAnnotationTextProperty = GoogleCloudVisionV1p3beta1TextAnnotationTextProperty'
{ _gcvvtatpDetectedLanguages :: !(Maybe [GoogleCloudVisionV1p3beta1TextAnnotationDetectedLanguage])
, _gcvvtatpDetectedBreak :: !(Maybe GoogleCloudVisionV1p3beta1TextAnnotationDetectedBreak)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1TextAnnotationTextProperty
:: GoogleCloudVisionV1p3beta1TextAnnotationTextProperty
googleCloudVisionV1p3beta1TextAnnotationTextProperty =
GoogleCloudVisionV1p3beta1TextAnnotationTextProperty'
{ _gcvvtatpDetectedLanguages = Nothing
, _gcvvtatpDetectedBreak = Nothing
}
gcvvtatpDetectedLanguages :: Lens' GoogleCloudVisionV1p3beta1TextAnnotationTextProperty [GoogleCloudVisionV1p3beta1TextAnnotationDetectedLanguage]
gcvvtatpDetectedLanguages
= lens _gcvvtatpDetectedLanguages
(\ s a -> s{_gcvvtatpDetectedLanguages = a})
. _Default
. _Coerce
gcvvtatpDetectedBreak :: Lens' GoogleCloudVisionV1p3beta1TextAnnotationTextProperty (Maybe GoogleCloudVisionV1p3beta1TextAnnotationDetectedBreak)
gcvvtatpDetectedBreak
= lens _gcvvtatpDetectedBreak
(\ s a -> s{_gcvvtatpDetectedBreak = a})
instance FromJSON
GoogleCloudVisionV1p3beta1TextAnnotationTextProperty
where
parseJSON
= withObject
"GoogleCloudVisionV1p3beta1TextAnnotationTextProperty"
(\ o ->
GoogleCloudVisionV1p3beta1TextAnnotationTextProperty'
<$>
(o .:? "detectedLanguages" .!= mempty) <*>
(o .:? "detectedBreak"))
instance ToJSON
GoogleCloudVisionV1p3beta1TextAnnotationTextProperty
where
toJSON
GoogleCloudVisionV1p3beta1TextAnnotationTextProperty'{..}
= object
(catMaybes
[("detectedLanguages" .=) <$>
_gcvvtatpDetectedLanguages,
("detectedBreak" .=) <$> _gcvvtatpDetectedBreak])
newtype LocationInfo = LocationInfo'
{ _liLatLng :: Maybe LatLng
} deriving (Eq,Show,Data,Typeable,Generic)
locationInfo
:: LocationInfo
locationInfo =
LocationInfo'
{ _liLatLng = Nothing
}
liLatLng :: Lens' LocationInfo (Maybe LatLng)
liLatLng = lens _liLatLng (\ s a -> s{_liLatLng = a})
instance FromJSON LocationInfo where
parseJSON
= withObject "LocationInfo"
(\ o -> LocationInfo' <$> (o .:? "latLng"))
instance ToJSON LocationInfo where
toJSON LocationInfo'{..}
= object (catMaybes [("latLng" .=) <$> _liLatLng])
newtype StatusDetailsItem = StatusDetailsItem'
{ _sdiAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
statusDetailsItem
:: HashMap Text JSONValue
-> StatusDetailsItem
statusDetailsItem pSdiAddtional_ =
StatusDetailsItem'
{ _sdiAddtional = _Coerce # pSdiAddtional_
}
sdiAddtional :: Lens' StatusDetailsItem (HashMap Text JSONValue)
sdiAddtional
= lens _sdiAddtional (\ s a -> s{_sdiAddtional = a})
. _Coerce
instance FromJSON StatusDetailsItem where
parseJSON
= withObject "StatusDetailsItem"
(\ o -> StatusDetailsItem' <$> (parseJSONObject o))
instance ToJSON StatusDetailsItem where
toJSON = toJSON . _sdiAddtional
data Page = Page'
{ _pProperty :: !(Maybe TextProperty)
, _pHeight :: !(Maybe (Textual Int32))
, _pBlocks :: !(Maybe [Block])
, _pWidth :: !(Maybe (Textual Int32))
, _pConfidence :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
page
:: Page
page =
Page'
{ _pProperty = Nothing
, _pHeight = Nothing
, _pBlocks = Nothing
, _pWidth = Nothing
, _pConfidence = Nothing
}
pProperty :: Lens' Page (Maybe TextProperty)
pProperty
= lens _pProperty (\ s a -> s{_pProperty = a})
pHeight :: Lens' Page (Maybe Int32)
pHeight
= lens _pHeight (\ s a -> s{_pHeight = a}) .
mapping _Coerce
pBlocks :: Lens' Page [Block]
pBlocks
= lens _pBlocks (\ s a -> s{_pBlocks = a}) . _Default
. _Coerce
pWidth :: Lens' Page (Maybe Int32)
pWidth
= lens _pWidth (\ s a -> s{_pWidth = a}) .
mapping _Coerce
pConfidence :: Lens' Page (Maybe Double)
pConfidence
= lens _pConfidence (\ s a -> s{_pConfidence = a}) .
mapping _Coerce
instance FromJSON Page where
parseJSON
= withObject "Page"
(\ o ->
Page' <$>
(o .:? "property") <*> (o .:? "height") <*>
(o .:? "blocks" .!= mempty)
<*> (o .:? "width")
<*> (o .:? "confidence"))
instance ToJSON Page where
toJSON Page'{..}
= object
(catMaybes
[("property" .=) <$> _pProperty,
("height" .=) <$> _pHeight,
("blocks" .=) <$> _pBlocks, ("width" .=) <$> _pWidth,
("confidence" .=) <$> _pConfidence])
data ColorInfo = ColorInfo'
{ _ciColor :: !(Maybe Color)
, _ciScore :: !(Maybe (Textual Double))
, _ciPixelFraction :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
colorInfo
:: ColorInfo
colorInfo =
ColorInfo'
{ _ciColor = Nothing
, _ciScore = Nothing
, _ciPixelFraction = Nothing
}
ciColor :: Lens' ColorInfo (Maybe Color)
ciColor = lens _ciColor (\ s a -> s{_ciColor = a})
ciScore :: Lens' ColorInfo (Maybe Double)
ciScore
= lens _ciScore (\ s a -> s{_ciScore = a}) .
mapping _Coerce
ciPixelFraction :: Lens' ColorInfo (Maybe Double)
ciPixelFraction
= lens _ciPixelFraction
(\ s a -> s{_ciPixelFraction = a})
. mapping _Coerce
instance FromJSON ColorInfo where
parseJSON
= withObject "ColorInfo"
(\ o ->
ColorInfo' <$>
(o .:? "color") <*> (o .:? "score") <*>
(o .:? "pixelFraction"))
instance ToJSON ColorInfo where
toJSON ColorInfo'{..}
= object
(catMaybes
[("color" .=) <$> _ciColor,
("score" .=) <$> _ciScore,
("pixelFraction" .=) <$> _ciPixelFraction])
data GoogleCloudVisionV1p3beta1OperationMetadata = GoogleCloudVisionV1p3beta1OperationMetadata'
{ _gState :: !(Maybe GoogleCloudVisionV1p3beta1OperationMetadataState)
, _gUpdateTime :: !(Maybe DateTime')
, _gCreateTime :: !(Maybe DateTime')
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1OperationMetadata
:: GoogleCloudVisionV1p3beta1OperationMetadata
googleCloudVisionV1p3beta1OperationMetadata =
GoogleCloudVisionV1p3beta1OperationMetadata'
{ _gState = Nothing
, _gUpdateTime = Nothing
, _gCreateTime = Nothing
}
gState :: Lens' GoogleCloudVisionV1p3beta1OperationMetadata (Maybe GoogleCloudVisionV1p3beta1OperationMetadataState)
gState = lens _gState (\ s a -> s{_gState = a})
gUpdateTime :: Lens' GoogleCloudVisionV1p3beta1OperationMetadata (Maybe UTCTime)
gUpdateTime
= lens _gUpdateTime (\ s a -> s{_gUpdateTime = a}) .
mapping _DateTime
gCreateTime :: Lens' GoogleCloudVisionV1p3beta1OperationMetadata (Maybe UTCTime)
gCreateTime
= lens _gCreateTime (\ s a -> s{_gCreateTime = a}) .
mapping _DateTime
instance FromJSON
GoogleCloudVisionV1p3beta1OperationMetadata where
parseJSON
= withObject
"GoogleCloudVisionV1p3beta1OperationMetadata"
(\ o ->
GoogleCloudVisionV1p3beta1OperationMetadata' <$>
(o .:? "state") <*> (o .:? "updateTime") <*>
(o .:? "createTime"))
instance ToJSON
GoogleCloudVisionV1p3beta1OperationMetadata where
toJSON
GoogleCloudVisionV1p3beta1OperationMetadata'{..}
= object
(catMaybes
[("state" .=) <$> _gState,
("updateTime" .=) <$> _gUpdateTime,
("createTime" .=) <$> _gCreateTime])
data GoogleCloudVisionV1p2beta1Feature = GoogleCloudVisionV1p2beta1Feature'
{ _gcvvfModel :: !(Maybe Text)
, _gcvvfType :: !(Maybe GoogleCloudVisionV1p2beta1FeatureType)
, _gcvvfMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1Feature
:: GoogleCloudVisionV1p2beta1Feature
googleCloudVisionV1p2beta1Feature =
GoogleCloudVisionV1p2beta1Feature'
{ _gcvvfModel = Nothing
, _gcvvfType = Nothing
, _gcvvfMaxResults = Nothing
}
gcvvfModel :: Lens' GoogleCloudVisionV1p2beta1Feature (Maybe Text)
gcvvfModel
= lens _gcvvfModel (\ s a -> s{_gcvvfModel = a})
gcvvfType :: Lens' GoogleCloudVisionV1p2beta1Feature (Maybe GoogleCloudVisionV1p2beta1FeatureType)
gcvvfType
= lens _gcvvfType (\ s a -> s{_gcvvfType = a})
gcvvfMaxResults :: Lens' GoogleCloudVisionV1p2beta1Feature (Maybe Int32)
gcvvfMaxResults
= lens _gcvvfMaxResults
(\ s a -> s{_gcvvfMaxResults = a})
. mapping _Coerce
instance FromJSON GoogleCloudVisionV1p2beta1Feature
where
parseJSON
= withObject "GoogleCloudVisionV1p2beta1Feature"
(\ o ->
GoogleCloudVisionV1p2beta1Feature' <$>
(o .:? "model") <*> (o .:? "type") <*>
(o .:? "maxResults"))
instance ToJSON GoogleCloudVisionV1p2beta1Feature
where
toJSON GoogleCloudVisionV1p2beta1Feature'{..}
= object
(catMaybes
[("model" .=) <$> _gcvvfModel,
("type" .=) <$> _gcvvfType,
("maxResults" .=) <$> _gcvvfMaxResults])
data WebLabel = WebLabel'
{ _wlLanguageCode :: !(Maybe Text)
, _wlLabel :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
webLabel
:: WebLabel
webLabel =
WebLabel'
{ _wlLanguageCode = Nothing
, _wlLabel = Nothing
}
wlLanguageCode :: Lens' WebLabel (Maybe Text)
wlLanguageCode
= lens _wlLanguageCode
(\ s a -> s{_wlLanguageCode = a})
wlLabel :: Lens' WebLabel (Maybe Text)
wlLabel = lens _wlLabel (\ s a -> s{_wlLabel = a})
instance FromJSON WebLabel where
parseJSON
= withObject "WebLabel"
(\ o ->
WebLabel' <$>
(o .:? "languageCode") <*> (o .:? "label"))
instance ToJSON WebLabel where
toJSON WebLabel'{..}
= object
(catMaybes
[("languageCode" .=) <$> _wlLanguageCode,
("label" .=) <$> _wlLabel])
data GoogleCloudVisionV1p1beta1ProductKeyValue = GoogleCloudVisionV1p1beta1ProductKeyValue'
{ _gooValue :: !(Maybe Text)
, _gooKey :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1ProductKeyValue
:: GoogleCloudVisionV1p1beta1ProductKeyValue
googleCloudVisionV1p1beta1ProductKeyValue =
GoogleCloudVisionV1p1beta1ProductKeyValue'
{ _gooValue = Nothing
, _gooKey = Nothing
}
gooValue :: Lens' GoogleCloudVisionV1p1beta1ProductKeyValue (Maybe Text)
gooValue = lens _gooValue (\ s a -> s{_gooValue = a})
gooKey :: Lens' GoogleCloudVisionV1p1beta1ProductKeyValue (Maybe Text)
gooKey = lens _gooKey (\ s a -> s{_gooKey = a})
instance FromJSON
GoogleCloudVisionV1p1beta1ProductKeyValue where
parseJSON
= withObject
"GoogleCloudVisionV1p1beta1ProductKeyValue"
(\ o ->
GoogleCloudVisionV1p1beta1ProductKeyValue' <$>
(o .:? "value") <*> (o .:? "key"))
instance ToJSON
GoogleCloudVisionV1p1beta1ProductKeyValue where
toJSON GoogleCloudVisionV1p1beta1ProductKeyValue'{..}
= object
(catMaybes
[("value" .=) <$> _gooValue, ("key" .=) <$> _gooKey])
data GoogleCloudVisionV1p1beta1ImageAnnotationContext = GoogleCloudVisionV1p1beta1ImageAnnotationContext'
{ _gURI :: !(Maybe Text)
, _gPageNumber :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1ImageAnnotationContext
:: GoogleCloudVisionV1p1beta1ImageAnnotationContext
googleCloudVisionV1p1beta1ImageAnnotationContext =
GoogleCloudVisionV1p1beta1ImageAnnotationContext'
{ _gURI = Nothing
, _gPageNumber = Nothing
}
gURI :: Lens' GoogleCloudVisionV1p1beta1ImageAnnotationContext (Maybe Text)
gURI = lens _gURI (\ s a -> s{_gURI = a})
gPageNumber :: Lens' GoogleCloudVisionV1p1beta1ImageAnnotationContext (Maybe Int32)
gPageNumber
= lens _gPageNumber (\ s a -> s{_gPageNumber = a}) .
mapping _Coerce
instance FromJSON
GoogleCloudVisionV1p1beta1ImageAnnotationContext
where
parseJSON
= withObject
"GoogleCloudVisionV1p1beta1ImageAnnotationContext"
(\ o ->
GoogleCloudVisionV1p1beta1ImageAnnotationContext' <$>
(o .:? "uri") <*> (o .:? "pageNumber"))
instance ToJSON
GoogleCloudVisionV1p1beta1ImageAnnotationContext
where
toJSON
GoogleCloudVisionV1p1beta1ImageAnnotationContext'{..}
= object
(catMaybes
[("uri" .=) <$> _gURI,
("pageNumber" .=) <$> _gPageNumber])
data Paragraph = Paragraph'
{ _parProperty :: !(Maybe TextProperty)
, _parBoundingBox :: !(Maybe BoundingPoly)
, _parConfidence :: !(Maybe (Textual Double))
, _parWords :: !(Maybe [Word])
} deriving (Eq,Show,Data,Typeable,Generic)
paragraph
:: Paragraph
paragraph =
Paragraph'
{ _parProperty = Nothing
, _parBoundingBox = Nothing
, _parConfidence = Nothing
, _parWords = Nothing
}
parProperty :: Lens' Paragraph (Maybe TextProperty)
parProperty
= lens _parProperty (\ s a -> s{_parProperty = a})
parBoundingBox :: Lens' Paragraph (Maybe BoundingPoly)
parBoundingBox
= lens _parBoundingBox
(\ s a -> s{_parBoundingBox = a})
parConfidence :: Lens' Paragraph (Maybe Double)
parConfidence
= lens _parConfidence
(\ s a -> s{_parConfidence = a})
. mapping _Coerce
parWords :: Lens' Paragraph [Word]
parWords
= lens _parWords (\ s a -> s{_parWords = a}) .
_Default
. _Coerce
instance FromJSON Paragraph where
parseJSON
= withObject "Paragraph"
(\ o ->
Paragraph' <$>
(o .:? "property") <*> (o .:? "boundingBox") <*>
(o .:? "confidence")
<*> (o .:? "words" .!= mempty))
instance ToJSON Paragraph where
toJSON Paragraph'{..}
= object
(catMaybes
[("property" .=) <$> _parProperty,
("boundingBox" .=) <$> _parBoundingBox,
("confidence" .=) <$> _parConfidence,
("words" .=) <$> _parWords])
data Symbol = Symbol'
{ _sProperty :: !(Maybe TextProperty)
, _sBoundingBox :: !(Maybe BoundingPoly)
, _sText :: !(Maybe Text)
, _sConfidence :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
symbol
:: Symbol
symbol =
Symbol'
{ _sProperty = Nothing
, _sBoundingBox = Nothing
, _sText = Nothing
, _sConfidence = Nothing
}
sProperty :: Lens' Symbol (Maybe TextProperty)
sProperty
= lens _sProperty (\ s a -> s{_sProperty = a})
sBoundingBox :: Lens' Symbol (Maybe BoundingPoly)
sBoundingBox
= lens _sBoundingBox (\ s a -> s{_sBoundingBox = a})
sText :: Lens' Symbol (Maybe Text)
sText = lens _sText (\ s a -> s{_sText = a})
sConfidence :: Lens' Symbol (Maybe Double)
sConfidence
= lens _sConfidence (\ s a -> s{_sConfidence = a}) .
mapping _Coerce
instance FromJSON Symbol where
parseJSON
= withObject "Symbol"
(\ o ->
Symbol' <$>
(o .:? "property") <*> (o .:? "boundingBox") <*>
(o .:? "text")
<*> (o .:? "confidence"))
instance ToJSON Symbol where
toJSON Symbol'{..}
= object
(catMaybes
[("property" .=) <$> _sProperty,
("boundingBox" .=) <$> _sBoundingBox,
("text" .=) <$> _sText,
("confidence" .=) <$> _sConfidence])
data AnnotateImageResponse = AnnotateImageResponse'
{ _airLogoAnnotations :: !(Maybe [EntityAnnotation])
, _airProductSearchResults :: !(Maybe ProductSearchResults)
, _airContext :: !(Maybe ImageAnnotationContext)
, _airLabelAnnotations :: !(Maybe [EntityAnnotation])
, _airFaceAnnotations :: !(Maybe [FaceAnnotation])
, _airError :: !(Maybe Status)
, _airWebDetection :: !(Maybe WebDetection)
, _airSafeSearchAnnotation :: !(Maybe SafeSearchAnnotation)
, _airLandmarkAnnotations :: !(Maybe [EntityAnnotation])
, _airLocalizedObjectAnnotations :: !(Maybe [LocalizedObjectAnnotation])
, _airTextAnnotations :: !(Maybe [EntityAnnotation])
, _airCropHintsAnnotation :: !(Maybe CropHintsAnnotation)
, _airFullTextAnnotation :: !(Maybe TextAnnotation)
, _airImagePropertiesAnnotation :: !(Maybe ImageProperties)
} deriving (Eq,Show,Data,Typeable,Generic)
annotateImageResponse
:: AnnotateImageResponse
annotateImageResponse =
AnnotateImageResponse'
{ _airLogoAnnotations = Nothing
, _airProductSearchResults = Nothing
, _airContext = Nothing
, _airLabelAnnotations = Nothing
, _airFaceAnnotations = Nothing
, _airError = Nothing
, _airWebDetection = Nothing
, _airSafeSearchAnnotation = Nothing
, _airLandmarkAnnotations = Nothing
, _airLocalizedObjectAnnotations = Nothing
, _airTextAnnotations = Nothing
, _airCropHintsAnnotation = Nothing
, _airFullTextAnnotation = Nothing
, _airImagePropertiesAnnotation = Nothing
}
airLogoAnnotations :: Lens' AnnotateImageResponse [EntityAnnotation]
airLogoAnnotations
= lens _airLogoAnnotations
(\ s a -> s{_airLogoAnnotations = a})
. _Default
. _Coerce
airProductSearchResults :: Lens' AnnotateImageResponse (Maybe ProductSearchResults)
airProductSearchResults
= lens _airProductSearchResults
(\ s a -> s{_airProductSearchResults = a})
airContext :: Lens' AnnotateImageResponse (Maybe ImageAnnotationContext)
airContext
= lens _airContext (\ s a -> s{_airContext = a})
airLabelAnnotations :: Lens' AnnotateImageResponse [EntityAnnotation]
airLabelAnnotations
= lens _airLabelAnnotations
(\ s a -> s{_airLabelAnnotations = a})
. _Default
. _Coerce
airFaceAnnotations :: Lens' AnnotateImageResponse [FaceAnnotation]
airFaceAnnotations
= lens _airFaceAnnotations
(\ s a -> s{_airFaceAnnotations = a})
. _Default
. _Coerce
airError :: Lens' AnnotateImageResponse (Maybe Status)
airError = lens _airError (\ s a -> s{_airError = a})
airWebDetection :: Lens' AnnotateImageResponse (Maybe WebDetection)
airWebDetection
= lens _airWebDetection
(\ s a -> s{_airWebDetection = a})
airSafeSearchAnnotation :: Lens' AnnotateImageResponse (Maybe SafeSearchAnnotation)
airSafeSearchAnnotation
= lens _airSafeSearchAnnotation
(\ s a -> s{_airSafeSearchAnnotation = a})
airLandmarkAnnotations :: Lens' AnnotateImageResponse [EntityAnnotation]
airLandmarkAnnotations
= lens _airLandmarkAnnotations
(\ s a -> s{_airLandmarkAnnotations = a})
. _Default
. _Coerce
airLocalizedObjectAnnotations :: Lens' AnnotateImageResponse [LocalizedObjectAnnotation]
airLocalizedObjectAnnotations
= lens _airLocalizedObjectAnnotations
(\ s a -> s{_airLocalizedObjectAnnotations = a})
. _Default
. _Coerce
airTextAnnotations :: Lens' AnnotateImageResponse [EntityAnnotation]
airTextAnnotations
= lens _airTextAnnotations
(\ s a -> s{_airTextAnnotations = a})
. _Default
. _Coerce
airCropHintsAnnotation :: Lens' AnnotateImageResponse (Maybe CropHintsAnnotation)
airCropHintsAnnotation
= lens _airCropHintsAnnotation
(\ s a -> s{_airCropHintsAnnotation = a})
airFullTextAnnotation :: Lens' AnnotateImageResponse (Maybe TextAnnotation)
airFullTextAnnotation
= lens _airFullTextAnnotation
(\ s a -> s{_airFullTextAnnotation = a})
airImagePropertiesAnnotation :: Lens' AnnotateImageResponse (Maybe ImageProperties)
airImagePropertiesAnnotation
= lens _airImagePropertiesAnnotation
(\ s a -> s{_airImagePropertiesAnnotation = a})
instance FromJSON AnnotateImageResponse where
parseJSON
= withObject "AnnotateImageResponse"
(\ o ->
AnnotateImageResponse' <$>
(o .:? "logoAnnotations" .!= mempty) <*>
(o .:? "productSearchResults")
<*> (o .:? "context")
<*> (o .:? "labelAnnotations" .!= mempty)
<*> (o .:? "faceAnnotations" .!= mempty)
<*> (o .:? "error")
<*> (o .:? "webDetection")
<*> (o .:? "safeSearchAnnotation")
<*> (o .:? "landmarkAnnotations" .!= mempty)
<*> (o .:? "localizedObjectAnnotations" .!= mempty)
<*> (o .:? "textAnnotations" .!= mempty)
<*> (o .:? "cropHintsAnnotation")
<*> (o .:? "fullTextAnnotation")
<*> (o .:? "imagePropertiesAnnotation"))
instance ToJSON AnnotateImageResponse where
toJSON AnnotateImageResponse'{..}
= object
(catMaybes
[("logoAnnotations" .=) <$> _airLogoAnnotations,
("productSearchResults" .=) <$>
_airProductSearchResults,
("context" .=) <$> _airContext,
("labelAnnotations" .=) <$> _airLabelAnnotations,
("faceAnnotations" .=) <$> _airFaceAnnotations,
("error" .=) <$> _airError,
("webDetection" .=) <$> _airWebDetection,
("safeSearchAnnotation" .=) <$>
_airSafeSearchAnnotation,
("landmarkAnnotations" .=) <$>
_airLandmarkAnnotations,
("localizedObjectAnnotations" .=) <$>
_airLocalizedObjectAnnotations,
("textAnnotations" .=) <$> _airTextAnnotations,
("cropHintsAnnotation" .=) <$>
_airCropHintsAnnotation,
("fullTextAnnotation" .=) <$> _airFullTextAnnotation,
("imagePropertiesAnnotation" .=) <$>
_airImagePropertiesAnnotation])
data GoogleCloudVisionV1p3beta1OutputConfig = GoogleCloudVisionV1p3beta1OutputConfig'
{ _gooGcsDestination :: !(Maybe GoogleCloudVisionV1p3beta1GcsDestination)
, _gooBatchSize :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1OutputConfig
:: GoogleCloudVisionV1p3beta1OutputConfig
googleCloudVisionV1p3beta1OutputConfig =
GoogleCloudVisionV1p3beta1OutputConfig'
{ _gooGcsDestination = Nothing
, _gooBatchSize = Nothing
}
gooGcsDestination :: Lens' GoogleCloudVisionV1p3beta1OutputConfig (Maybe GoogleCloudVisionV1p3beta1GcsDestination)
gooGcsDestination
= lens _gooGcsDestination
(\ s a -> s{_gooGcsDestination = a})
gooBatchSize :: Lens' GoogleCloudVisionV1p3beta1OutputConfig (Maybe Int32)
gooBatchSize
= lens _gooBatchSize (\ s a -> s{_gooBatchSize = a})
. mapping _Coerce
instance FromJSON
GoogleCloudVisionV1p3beta1OutputConfig where
parseJSON
= withObject "GoogleCloudVisionV1p3beta1OutputConfig"
(\ o ->
GoogleCloudVisionV1p3beta1OutputConfig' <$>
(o .:? "gcsDestination") <*> (o .:? "batchSize"))
instance ToJSON
GoogleCloudVisionV1p3beta1OutputConfig where
toJSON GoogleCloudVisionV1p3beta1OutputConfig'{..}
= object
(catMaybes
[("gcsDestination" .=) <$> _gooGcsDestination,
("batchSize" .=) <$> _gooBatchSize])
newtype ImageProperties = ImageProperties'
{ _ipDominantColors :: Maybe DominantColorsAnnotation
} deriving (Eq,Show,Data,Typeable,Generic)
imageProperties
:: ImageProperties
imageProperties =
ImageProperties'
{ _ipDominantColors = Nothing
}
ipDominantColors :: Lens' ImageProperties (Maybe DominantColorsAnnotation)
ipDominantColors
= lens _ipDominantColors
(\ s a -> s{_ipDominantColors = a})
instance FromJSON ImageProperties where
parseJSON
= withObject "ImageProperties"
(\ o ->
ImageProperties' <$> (o .:? "dominantColors"))
instance ToJSON ImageProperties where
toJSON ImageProperties'{..}
= object
(catMaybes
[("dominantColors" .=) <$> _ipDominantColors])
data GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation = GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation'
{ _gooLanguageCode :: !(Maybe Text)
, _gooScore :: !(Maybe (Textual Double))
, _gooBoundingPoly :: !(Maybe GoogleCloudVisionV1p3beta1BoundingPoly)
, _gooName :: !(Maybe Text)
, _gooMid :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1LocalizedObjectAnnotation
:: GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation
googleCloudVisionV1p3beta1LocalizedObjectAnnotation =
GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation'
{ _gooLanguageCode = Nothing
, _gooScore = Nothing
, _gooBoundingPoly = Nothing
, _gooName = Nothing
, _gooMid = Nothing
}
gooLanguageCode :: Lens' GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation (Maybe Text)
gooLanguageCode
= lens _gooLanguageCode
(\ s a -> s{_gooLanguageCode = a})
gooScore :: Lens' GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation (Maybe Double)
gooScore
= lens _gooScore (\ s a -> s{_gooScore = a}) .
mapping _Coerce
gooBoundingPoly :: Lens' GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation (Maybe GoogleCloudVisionV1p3beta1BoundingPoly)
gooBoundingPoly
= lens _gooBoundingPoly
(\ s a -> s{_gooBoundingPoly = a})
gooName :: Lens' GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation (Maybe Text)
gooName = lens _gooName (\ s a -> s{_gooName = a})
gooMid :: Lens' GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation (Maybe Text)
gooMid = lens _gooMid (\ s a -> s{_gooMid = a})
instance FromJSON
GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation
where
parseJSON
= withObject
"GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation"
(\ o ->
GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation'
<$>
(o .:? "languageCode") <*> (o .:? "score") <*>
(o .:? "boundingPoly")
<*> (o .:? "name")
<*> (o .:? "mid"))
instance ToJSON
GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation
where
toJSON
GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation'{..}
= object
(catMaybes
[("languageCode" .=) <$> _gooLanguageCode,
("score" .=) <$> _gooScore,
("boundingPoly" .=) <$> _gooBoundingPoly,
("name" .=) <$> _gooName, ("mid" .=) <$> _gooMid])
data GoogleCloudVisionV1p2beta1WebDetectionWebEntity = GoogleCloudVisionV1p2beta1WebDetectionWebEntity'
{ _gcvvwdwecScore :: !(Maybe (Textual Double))
, _gcvvwdwecEntityId :: !(Maybe Text)
, _gcvvwdwecDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1WebDetectionWebEntity
:: GoogleCloudVisionV1p2beta1WebDetectionWebEntity
googleCloudVisionV1p2beta1WebDetectionWebEntity =
GoogleCloudVisionV1p2beta1WebDetectionWebEntity'
{ _gcvvwdwecScore = Nothing
, _gcvvwdwecEntityId = Nothing
, _gcvvwdwecDescription = Nothing
}
gcvvwdwecScore :: Lens' GoogleCloudVisionV1p2beta1WebDetectionWebEntity (Maybe Double)
gcvvwdwecScore
= lens _gcvvwdwecScore
(\ s a -> s{_gcvvwdwecScore = a})
. mapping _Coerce
gcvvwdwecEntityId :: Lens' GoogleCloudVisionV1p2beta1WebDetectionWebEntity (Maybe Text)
gcvvwdwecEntityId
= lens _gcvvwdwecEntityId
(\ s a -> s{_gcvvwdwecEntityId = a})
gcvvwdwecDescription :: Lens' GoogleCloudVisionV1p2beta1WebDetectionWebEntity (Maybe Text)
gcvvwdwecDescription
= lens _gcvvwdwecDescription
(\ s a -> s{_gcvvwdwecDescription = a})
instance FromJSON
GoogleCloudVisionV1p2beta1WebDetectionWebEntity where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1WebDetectionWebEntity"
(\ o ->
GoogleCloudVisionV1p2beta1WebDetectionWebEntity' <$>
(o .:? "score") <*> (o .:? "entityId") <*>
(o .:? "description"))
instance ToJSON
GoogleCloudVisionV1p2beta1WebDetectionWebEntity where
toJSON
GoogleCloudVisionV1p2beta1WebDetectionWebEntity'{..}
= object
(catMaybes
[("score" .=) <$> _gcvvwdwecScore,
("entityId" .=) <$> _gcvvwdwecEntityId,
("description" .=) <$> _gcvvwdwecDescription])
newtype AsyncBatchAnnotateFilesResponse = AsyncBatchAnnotateFilesResponse'
{ _abafrResponses :: Maybe [AsyncAnnotateFileResponse]
} deriving (Eq,Show,Data,Typeable,Generic)
asyncBatchAnnotateFilesResponse
:: AsyncBatchAnnotateFilesResponse
asyncBatchAnnotateFilesResponse =
AsyncBatchAnnotateFilesResponse'
{ _abafrResponses = Nothing
}
abafrResponses :: Lens' AsyncBatchAnnotateFilesResponse [AsyncAnnotateFileResponse]
abafrResponses
= lens _abafrResponses
(\ s a -> s{_abafrResponses = a})
. _Default
. _Coerce
instance FromJSON AsyncBatchAnnotateFilesResponse
where
parseJSON
= withObject "AsyncBatchAnnotateFilesResponse"
(\ o ->
AsyncBatchAnnotateFilesResponse' <$>
(o .:? "responses" .!= mempty))
instance ToJSON AsyncBatchAnnotateFilesResponse where
toJSON AsyncBatchAnnotateFilesResponse'{..}
= object
(catMaybes [("responses" .=) <$> _abafrResponses])
data GoogleCloudVisionV1p3beta1CropHint = GoogleCloudVisionV1p3beta1CropHint'
{ _goooBoundingPoly :: !(Maybe GoogleCloudVisionV1p3beta1BoundingPoly)
, _goooConfidence :: !(Maybe (Textual Double))
, _goooImportanceFraction :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1CropHint
:: GoogleCloudVisionV1p3beta1CropHint
googleCloudVisionV1p3beta1CropHint =
GoogleCloudVisionV1p3beta1CropHint'
{ _goooBoundingPoly = Nothing
, _goooConfidence = Nothing
, _goooImportanceFraction = Nothing
}
goooBoundingPoly :: Lens' GoogleCloudVisionV1p3beta1CropHint (Maybe GoogleCloudVisionV1p3beta1BoundingPoly)
goooBoundingPoly
= lens _goooBoundingPoly
(\ s a -> s{_goooBoundingPoly = a})
goooConfidence :: Lens' GoogleCloudVisionV1p3beta1CropHint (Maybe Double)
goooConfidence
= lens _goooConfidence
(\ s a -> s{_goooConfidence = a})
. mapping _Coerce
goooImportanceFraction :: Lens' GoogleCloudVisionV1p3beta1CropHint (Maybe Double)
goooImportanceFraction
= lens _goooImportanceFraction
(\ s a -> s{_goooImportanceFraction = a})
. mapping _Coerce
instance FromJSON GoogleCloudVisionV1p3beta1CropHint
where
parseJSON
= withObject "GoogleCloudVisionV1p3beta1CropHint"
(\ o ->
GoogleCloudVisionV1p3beta1CropHint' <$>
(o .:? "boundingPoly") <*> (o .:? "confidence") <*>
(o .:? "importanceFraction"))
instance ToJSON GoogleCloudVisionV1p3beta1CropHint
where
toJSON GoogleCloudVisionV1p3beta1CropHint'{..}
= object
(catMaybes
[("boundingPoly" .=) <$> _goooBoundingPoly,
("confidence" .=) <$> _goooConfidence,
("importanceFraction" .=) <$>
_goooImportanceFraction])
data FaceAnnotation = FaceAnnotation'
{ _faTiltAngle :: !(Maybe (Textual Double))
, _faBlurredLikelihood :: !(Maybe FaceAnnotationBlurredLikelihood)
, _faBoundingPoly :: !(Maybe BoundingPoly)
, _faSurpriseLikelihood :: !(Maybe FaceAnnotationSurpriseLikelihood)
, _faLandmarkingConfidence :: !(Maybe (Textual Double))
, _faPanAngle :: !(Maybe (Textual Double))
, _faRollAngle :: !(Maybe (Textual Double))
, _faUnderExposedLikelihood :: !(Maybe FaceAnnotationUnderExposedLikelihood)
, _faFdBoundingPoly :: !(Maybe BoundingPoly)
, _faAngerLikelihood :: !(Maybe FaceAnnotationAngerLikelihood)
, _faDetectionConfidence :: !(Maybe (Textual Double))
, _faHeadwearLikelihood :: !(Maybe FaceAnnotationHeadwearLikelihood)
, _faSorrowLikelihood :: !(Maybe FaceAnnotationSorrowLikelihood)
, _faJoyLikelihood :: !(Maybe FaceAnnotationJoyLikelihood)
, _faLandmarks :: !(Maybe [Landmark])
} deriving (Eq,Show,Data,Typeable,Generic)
faceAnnotation
:: FaceAnnotation
faceAnnotation =
FaceAnnotation'
{ _faTiltAngle = Nothing
, _faBlurredLikelihood = Nothing
, _faBoundingPoly = Nothing
, _faSurpriseLikelihood = Nothing
, _faLandmarkingConfidence = Nothing
, _faPanAngle = Nothing
, _faRollAngle = Nothing
, _faUnderExposedLikelihood = Nothing
, _faFdBoundingPoly = Nothing
, _faAngerLikelihood = Nothing
, _faDetectionConfidence = Nothing
, _faHeadwearLikelihood = Nothing
, _faSorrowLikelihood = Nothing
, _faJoyLikelihood = Nothing
, _faLandmarks = Nothing
}
faTiltAngle :: Lens' FaceAnnotation (Maybe Double)
faTiltAngle
= lens _faTiltAngle (\ s a -> s{_faTiltAngle = a}) .
mapping _Coerce
faBlurredLikelihood :: Lens' FaceAnnotation (Maybe FaceAnnotationBlurredLikelihood)
faBlurredLikelihood
= lens _faBlurredLikelihood
(\ s a -> s{_faBlurredLikelihood = a})
faBoundingPoly :: Lens' FaceAnnotation (Maybe BoundingPoly)
faBoundingPoly
= lens _faBoundingPoly
(\ s a -> s{_faBoundingPoly = a})
faSurpriseLikelihood :: Lens' FaceAnnotation (Maybe FaceAnnotationSurpriseLikelihood)
faSurpriseLikelihood
= lens _faSurpriseLikelihood
(\ s a -> s{_faSurpriseLikelihood = a})
faLandmarkingConfidence :: Lens' FaceAnnotation (Maybe Double)
faLandmarkingConfidence
= lens _faLandmarkingConfidence
(\ s a -> s{_faLandmarkingConfidence = a})
. mapping _Coerce
faPanAngle :: Lens' FaceAnnotation (Maybe Double)
faPanAngle
= lens _faPanAngle (\ s a -> s{_faPanAngle = a}) .
mapping _Coerce
faRollAngle :: Lens' FaceAnnotation (Maybe Double)
faRollAngle
= lens _faRollAngle (\ s a -> s{_faRollAngle = a}) .
mapping _Coerce
faUnderExposedLikelihood :: Lens' FaceAnnotation (Maybe FaceAnnotationUnderExposedLikelihood)
faUnderExposedLikelihood
= lens _faUnderExposedLikelihood
(\ s a -> s{_faUnderExposedLikelihood = a})
faFdBoundingPoly :: Lens' FaceAnnotation (Maybe BoundingPoly)
faFdBoundingPoly
= lens _faFdBoundingPoly
(\ s a -> s{_faFdBoundingPoly = a})
faAngerLikelihood :: Lens' FaceAnnotation (Maybe FaceAnnotationAngerLikelihood)
faAngerLikelihood
= lens _faAngerLikelihood
(\ s a -> s{_faAngerLikelihood = a})
faDetectionConfidence :: Lens' FaceAnnotation (Maybe Double)
faDetectionConfidence
= lens _faDetectionConfidence
(\ s a -> s{_faDetectionConfidence = a})
. mapping _Coerce
faHeadwearLikelihood :: Lens' FaceAnnotation (Maybe FaceAnnotationHeadwearLikelihood)
faHeadwearLikelihood
= lens _faHeadwearLikelihood
(\ s a -> s{_faHeadwearLikelihood = a})
faSorrowLikelihood :: Lens' FaceAnnotation (Maybe FaceAnnotationSorrowLikelihood)
faSorrowLikelihood
= lens _faSorrowLikelihood
(\ s a -> s{_faSorrowLikelihood = a})
faJoyLikelihood :: Lens' FaceAnnotation (Maybe FaceAnnotationJoyLikelihood)
faJoyLikelihood
= lens _faJoyLikelihood
(\ s a -> s{_faJoyLikelihood = a})
faLandmarks :: Lens' FaceAnnotation [Landmark]
faLandmarks
= lens _faLandmarks (\ s a -> s{_faLandmarks = a}) .
_Default
. _Coerce
instance FromJSON FaceAnnotation where
parseJSON
= withObject "FaceAnnotation"
(\ o ->
FaceAnnotation' <$>
(o .:? "tiltAngle") <*> (o .:? "blurredLikelihood")
<*> (o .:? "boundingPoly")
<*> (o .:? "surpriseLikelihood")
<*> (o .:? "landmarkingConfidence")
<*> (o .:? "panAngle")
<*> (o .:? "rollAngle")
<*> (o .:? "underExposedLikelihood")
<*> (o .:? "fdBoundingPoly")
<*> (o .:? "angerLikelihood")
<*> (o .:? "detectionConfidence")
<*> (o .:? "headwearLikelihood")
<*> (o .:? "sorrowLikelihood")
<*> (o .:? "joyLikelihood")
<*> (o .:? "landmarks" .!= mempty))
instance ToJSON FaceAnnotation where
toJSON FaceAnnotation'{..}
= object
(catMaybes
[("tiltAngle" .=) <$> _faTiltAngle,
("blurredLikelihood" .=) <$> _faBlurredLikelihood,
("boundingPoly" .=) <$> _faBoundingPoly,
("surpriseLikelihood" .=) <$> _faSurpriseLikelihood,
("landmarkingConfidence" .=) <$>
_faLandmarkingConfidence,
("panAngle" .=) <$> _faPanAngle,
("rollAngle" .=) <$> _faRollAngle,
("underExposedLikelihood" .=) <$>
_faUnderExposedLikelihood,
("fdBoundingPoly" .=) <$> _faFdBoundingPoly,
("angerLikelihood" .=) <$> _faAngerLikelihood,
("detectionConfidence" .=) <$>
_faDetectionConfidence,
("headwearLikelihood" .=) <$> _faHeadwearLikelihood,
("sorrowLikelihood" .=) <$> _faSorrowLikelihood,
("joyLikelihood" .=) <$> _faJoyLikelihood,
("landmarks" .=) <$> _faLandmarks])
data GoogleCloudVisionV1p1beta1Property = GoogleCloudVisionV1p1beta1Property'
{ _gcvvpcUint64Value :: !(Maybe (Textual Word64))
, _gcvvpcValue :: !(Maybe Text)
, _gcvvpcName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1Property
:: GoogleCloudVisionV1p1beta1Property
googleCloudVisionV1p1beta1Property =
GoogleCloudVisionV1p1beta1Property'
{ _gcvvpcUint64Value = Nothing
, _gcvvpcValue = Nothing
, _gcvvpcName = Nothing
}
gcvvpcUint64Value :: Lens' GoogleCloudVisionV1p1beta1Property (Maybe Word64)
gcvvpcUint64Value
= lens _gcvvpcUint64Value
(\ s a -> s{_gcvvpcUint64Value = a})
. mapping _Coerce
gcvvpcValue :: Lens' GoogleCloudVisionV1p1beta1Property (Maybe Text)
gcvvpcValue
= lens _gcvvpcValue (\ s a -> s{_gcvvpcValue = a})
gcvvpcName :: Lens' GoogleCloudVisionV1p1beta1Property (Maybe Text)
gcvvpcName
= lens _gcvvpcName (\ s a -> s{_gcvvpcName = a})
instance FromJSON GoogleCloudVisionV1p1beta1Property
where
parseJSON
= withObject "GoogleCloudVisionV1p1beta1Property"
(\ o ->
GoogleCloudVisionV1p1beta1Property' <$>
(o .:? "uint64Value") <*> (o .:? "value") <*>
(o .:? "name"))
instance ToJSON GoogleCloudVisionV1p1beta1Property
where
toJSON GoogleCloudVisionV1p1beta1Property'{..}
= object
(catMaybes
[("uint64Value" .=) <$> _gcvvpcUint64Value,
("value" .=) <$> _gcvvpcValue,
("name" .=) <$> _gcvvpcName])
data GoogleCloudVisionV1p1beta1ProductSearchResults = GoogleCloudVisionV1p1beta1ProductSearchResults'
{ _gProductGroupedResults :: !(Maybe [GoogleCloudVisionV1p1beta1ProductSearchResultsGroupedResult])
, _gResults :: !(Maybe [GoogleCloudVisionV1p1beta1ProductSearchResultsResult])
, _gIndexTime :: !(Maybe DateTime')
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1ProductSearchResults
:: GoogleCloudVisionV1p1beta1ProductSearchResults
googleCloudVisionV1p1beta1ProductSearchResults =
GoogleCloudVisionV1p1beta1ProductSearchResults'
{ _gProductGroupedResults = Nothing
, _gResults = Nothing
, _gIndexTime = Nothing
}
gProductGroupedResults :: Lens' GoogleCloudVisionV1p1beta1ProductSearchResults [GoogleCloudVisionV1p1beta1ProductSearchResultsGroupedResult]
gProductGroupedResults
= lens _gProductGroupedResults
(\ s a -> s{_gProductGroupedResults = a})
. _Default
. _Coerce
gResults :: Lens' GoogleCloudVisionV1p1beta1ProductSearchResults [GoogleCloudVisionV1p1beta1ProductSearchResultsResult]
gResults
= lens _gResults (\ s a -> s{_gResults = a}) .
_Default
. _Coerce
gIndexTime :: Lens' GoogleCloudVisionV1p1beta1ProductSearchResults (Maybe UTCTime)
gIndexTime
= lens _gIndexTime (\ s a -> s{_gIndexTime = a}) .
mapping _DateTime
instance FromJSON
GoogleCloudVisionV1p1beta1ProductSearchResults where
parseJSON
= withObject
"GoogleCloudVisionV1p1beta1ProductSearchResults"
(\ o ->
GoogleCloudVisionV1p1beta1ProductSearchResults' <$>
(o .:? "productGroupedResults" .!= mempty) <*>
(o .:? "results" .!= mempty)
<*> (o .:? "indexTime"))
instance ToJSON
GoogleCloudVisionV1p1beta1ProductSearchResults where
toJSON
GoogleCloudVisionV1p1beta1ProductSearchResults'{..}
= object
(catMaybes
[("productGroupedResults" .=) <$>
_gProductGroupedResults,
("results" .=) <$> _gResults,
("indexTime" .=) <$> _gIndexTime])
data GoogleCloudVisionV1p2beta1LatLongRect = GoogleCloudVisionV1p2beta1LatLongRect'
{ _gcvvllrMaxLatLng :: !(Maybe LatLng)
, _gcvvllrMinLatLng :: !(Maybe LatLng)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1LatLongRect
:: GoogleCloudVisionV1p2beta1LatLongRect
googleCloudVisionV1p2beta1LatLongRect =
GoogleCloudVisionV1p2beta1LatLongRect'
{ _gcvvllrMaxLatLng = Nothing
, _gcvvllrMinLatLng = Nothing
}
gcvvllrMaxLatLng :: Lens' GoogleCloudVisionV1p2beta1LatLongRect (Maybe LatLng)
gcvvllrMaxLatLng
= lens _gcvvllrMaxLatLng
(\ s a -> s{_gcvvllrMaxLatLng = a})
gcvvllrMinLatLng :: Lens' GoogleCloudVisionV1p2beta1LatLongRect (Maybe LatLng)
gcvvllrMinLatLng
= lens _gcvvllrMinLatLng
(\ s a -> s{_gcvvllrMinLatLng = a})
instance FromJSON
GoogleCloudVisionV1p2beta1LatLongRect where
parseJSON
= withObject "GoogleCloudVisionV1p2beta1LatLongRect"
(\ o ->
GoogleCloudVisionV1p2beta1LatLongRect' <$>
(o .:? "maxLatLng") <*> (o .:? "minLatLng"))
instance ToJSON GoogleCloudVisionV1p2beta1LatLongRect
where
toJSON GoogleCloudVisionV1p2beta1LatLongRect'{..}
= object
(catMaybes
[("maxLatLng" .=) <$> _gcvvllrMaxLatLng,
("minLatLng" .=) <$> _gcvvllrMinLatLng])
data DetectedBreak = DetectedBreak'
{ _dbIsPrefix :: !(Maybe Bool)
, _dbType :: !(Maybe DetectedBreakType)
} deriving (Eq,Show,Data,Typeable,Generic)
detectedBreak
:: DetectedBreak
detectedBreak =
DetectedBreak'
{ _dbIsPrefix = Nothing
, _dbType = Nothing
}
dbIsPrefix :: Lens' DetectedBreak (Maybe Bool)
dbIsPrefix
= lens _dbIsPrefix (\ s a -> s{_dbIsPrefix = a})
dbType :: Lens' DetectedBreak (Maybe DetectedBreakType)
dbType = lens _dbType (\ s a -> s{_dbType = a})
instance FromJSON DetectedBreak where
parseJSON
= withObject "DetectedBreak"
(\ o ->
DetectedBreak' <$>
(o .:? "isPrefix") <*> (o .:? "type"))
instance ToJSON DetectedBreak where
toJSON DetectedBreak'{..}
= object
(catMaybes
[("isPrefix" .=) <$> _dbIsPrefix,
("type" .=) <$> _dbType])
data Result = Result'
{ _rImage :: !(Maybe Text)
, _rScore :: !(Maybe (Textual Double))
, _rProduct :: !(Maybe Product)
} deriving (Eq,Show,Data,Typeable,Generic)
result
:: Result
result =
Result'
{ _rImage = Nothing
, _rScore = Nothing
, _rProduct = Nothing
}
rImage :: Lens' Result (Maybe Text)
rImage = lens _rImage (\ s a -> s{_rImage = a})
rScore :: Lens' Result (Maybe Double)
rScore
= lens _rScore (\ s a -> s{_rScore = a}) .
mapping _Coerce
rProduct :: Lens' Result (Maybe Product)
rProduct = lens _rProduct (\ s a -> s{_rProduct = a})
instance FromJSON Result where
parseJSON
= withObject "Result"
(\ o ->
Result' <$>
(o .:? "image") <*> (o .:? "score") <*>
(o .:? "product"))
instance ToJSON Result where
toJSON Result'{..}
= object
(catMaybes
[("image" .=) <$> _rImage, ("score" .=) <$> _rScore,
("product" .=) <$> _rProduct])
data GoogleCloudVisionV1p1beta1ProductSearchResultsGroupedResult = GoogleCloudVisionV1p1beta1ProductSearchResultsGroupedResult'
{ _gcvvpsrgrResults :: !(Maybe [GoogleCloudVisionV1p1beta1ProductSearchResultsResult])
, _gcvvpsrgrBoundingPoly :: !(Maybe GoogleCloudVisionV1p1beta1BoundingPoly)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1ProductSearchResultsGroupedResult
:: GoogleCloudVisionV1p1beta1ProductSearchResultsGroupedResult
googleCloudVisionV1p1beta1ProductSearchResultsGroupedResult =
GoogleCloudVisionV1p1beta1ProductSearchResultsGroupedResult'
{ _gcvvpsrgrResults = Nothing
, _gcvvpsrgrBoundingPoly = Nothing
}
gcvvpsrgrResults :: Lens' GoogleCloudVisionV1p1beta1ProductSearchResultsGroupedResult [GoogleCloudVisionV1p1beta1ProductSearchResultsResult]
gcvvpsrgrResults
= lens _gcvvpsrgrResults
(\ s a -> s{_gcvvpsrgrResults = a})
. _Default
. _Coerce
gcvvpsrgrBoundingPoly :: Lens' GoogleCloudVisionV1p1beta1ProductSearchResultsGroupedResult (Maybe GoogleCloudVisionV1p1beta1BoundingPoly)
gcvvpsrgrBoundingPoly
= lens _gcvvpsrgrBoundingPoly
(\ s a -> s{_gcvvpsrgrBoundingPoly = a})
instance FromJSON
GoogleCloudVisionV1p1beta1ProductSearchResultsGroupedResult
where
parseJSON
= withObject
"GoogleCloudVisionV1p1beta1ProductSearchResultsGroupedResult"
(\ o ->
GoogleCloudVisionV1p1beta1ProductSearchResultsGroupedResult'
<$>
(o .:? "results" .!= mempty) <*>
(o .:? "boundingPoly"))
instance ToJSON
GoogleCloudVisionV1p1beta1ProductSearchResultsGroupedResult
where
toJSON
GoogleCloudVisionV1p1beta1ProductSearchResultsGroupedResult'{..}
= object
(catMaybes
[("results" .=) <$> _gcvvpsrgrResults,
("boundingPoly" .=) <$> _gcvvpsrgrBoundingPoly])
data GoogleCloudVisionV1p1beta1SafeSearchAnnotation = GoogleCloudVisionV1p1beta1SafeSearchAnnotation'
{ _gSpoof :: !(Maybe GoogleCloudVisionV1p1beta1SafeSearchAnnotationSpoof)
, _gRacy :: !(Maybe GoogleCloudVisionV1p1beta1SafeSearchAnnotationRacy)
, _gAdult :: !(Maybe GoogleCloudVisionV1p1beta1SafeSearchAnnotationAdult)
, _gMedical :: !(Maybe GoogleCloudVisionV1p1beta1SafeSearchAnnotationMedical)
, _gViolence :: !(Maybe GoogleCloudVisionV1p1beta1SafeSearchAnnotationViolence)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1SafeSearchAnnotation
:: GoogleCloudVisionV1p1beta1SafeSearchAnnotation
googleCloudVisionV1p1beta1SafeSearchAnnotation =
GoogleCloudVisionV1p1beta1SafeSearchAnnotation'
{ _gSpoof = Nothing
, _gRacy = Nothing
, _gAdult = Nothing
, _gMedical = Nothing
, _gViolence = Nothing
}
gSpoof :: Lens' GoogleCloudVisionV1p1beta1SafeSearchAnnotation (Maybe GoogleCloudVisionV1p1beta1SafeSearchAnnotationSpoof)
gSpoof = lens _gSpoof (\ s a -> s{_gSpoof = a})
gRacy :: Lens' GoogleCloudVisionV1p1beta1SafeSearchAnnotation (Maybe GoogleCloudVisionV1p1beta1SafeSearchAnnotationRacy)
gRacy = lens _gRacy (\ s a -> s{_gRacy = a})
gAdult :: Lens' GoogleCloudVisionV1p1beta1SafeSearchAnnotation (Maybe GoogleCloudVisionV1p1beta1SafeSearchAnnotationAdult)
gAdult = lens _gAdult (\ s a -> s{_gAdult = a})
gMedical :: Lens' GoogleCloudVisionV1p1beta1SafeSearchAnnotation (Maybe GoogleCloudVisionV1p1beta1SafeSearchAnnotationMedical)
gMedical = lens _gMedical (\ s a -> s{_gMedical = a})
gViolence :: Lens' GoogleCloudVisionV1p1beta1SafeSearchAnnotation (Maybe GoogleCloudVisionV1p1beta1SafeSearchAnnotationViolence)
gViolence
= lens _gViolence (\ s a -> s{_gViolence = a})
instance FromJSON
GoogleCloudVisionV1p1beta1SafeSearchAnnotation where
parseJSON
= withObject
"GoogleCloudVisionV1p1beta1SafeSearchAnnotation"
(\ o ->
GoogleCloudVisionV1p1beta1SafeSearchAnnotation' <$>
(o .:? "spoof") <*> (o .:? "racy") <*>
(o .:? "adult")
<*> (o .:? "medical")
<*> (o .:? "violence"))
instance ToJSON
GoogleCloudVisionV1p1beta1SafeSearchAnnotation where
toJSON
GoogleCloudVisionV1p1beta1SafeSearchAnnotation'{..}
= object
(catMaybes
[("spoof" .=) <$> _gSpoof, ("racy" .=) <$> _gRacy,
("adult" .=) <$> _gAdult,
("medical" .=) <$> _gMedical,
("violence" .=) <$> _gViolence])
data GoogleCloudVisionV1p2beta1Product = GoogleCloudVisionV1p2beta1Product'
{ _ggName :: !(Maybe Text)
, _ggDisplayName :: !(Maybe Text)
, _ggProductCategory :: !(Maybe Text)
, _ggProductLabels :: !(Maybe [GoogleCloudVisionV1p2beta1ProductKeyValue])
, _ggDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1Product
:: GoogleCloudVisionV1p2beta1Product
googleCloudVisionV1p2beta1Product =
GoogleCloudVisionV1p2beta1Product'
{ _ggName = Nothing
, _ggDisplayName = Nothing
, _ggProductCategory = Nothing
, _ggProductLabels = Nothing
, _ggDescription = Nothing
}
ggName :: Lens' GoogleCloudVisionV1p2beta1Product (Maybe Text)
ggName = lens _ggName (\ s a -> s{_ggName = a})
ggDisplayName :: Lens' GoogleCloudVisionV1p2beta1Product (Maybe Text)
ggDisplayName
= lens _ggDisplayName
(\ s a -> s{_ggDisplayName = a})
ggProductCategory :: Lens' GoogleCloudVisionV1p2beta1Product (Maybe Text)
ggProductCategory
= lens _ggProductCategory
(\ s a -> s{_ggProductCategory = a})
ggProductLabels :: Lens' GoogleCloudVisionV1p2beta1Product [GoogleCloudVisionV1p2beta1ProductKeyValue]
ggProductLabels
= lens _ggProductLabels
(\ s a -> s{_ggProductLabels = a})
. _Default
. _Coerce
ggDescription :: Lens' GoogleCloudVisionV1p2beta1Product (Maybe Text)
ggDescription
= lens _ggDescription
(\ s a -> s{_ggDescription = a})
instance FromJSON GoogleCloudVisionV1p2beta1Product
where
parseJSON
= withObject "GoogleCloudVisionV1p2beta1Product"
(\ o ->
GoogleCloudVisionV1p2beta1Product' <$>
(o .:? "name") <*> (o .:? "displayName") <*>
(o .:? "productCategory")
<*> (o .:? "productLabels" .!= mempty)
<*> (o .:? "description"))
instance ToJSON GoogleCloudVisionV1p2beta1Product
where
toJSON GoogleCloudVisionV1p2beta1Product'{..}
= object
(catMaybes
[("name" .=) <$> _ggName,
("displayName" .=) <$> _ggDisplayName,
("productCategory" .=) <$> _ggProductCategory,
("productLabels" .=) <$> _ggProductLabels,
("description" .=) <$> _ggDescription])
data Block = Block'
{ _bProperty :: !(Maybe TextProperty)
, _bBoundingBox :: !(Maybe BoundingPoly)
, _bParagraphs :: !(Maybe [Paragraph])
, _bConfidence :: !(Maybe (Textual Double))
, _bBlockType :: !(Maybe BlockBlockType)
} deriving (Eq,Show,Data,Typeable,Generic)
block
:: Block
block =
Block'
{ _bProperty = Nothing
, _bBoundingBox = Nothing
, _bParagraphs = Nothing
, _bConfidence = Nothing
, _bBlockType = Nothing
}
bProperty :: Lens' Block (Maybe TextProperty)
bProperty
= lens _bProperty (\ s a -> s{_bProperty = a})
bBoundingBox :: Lens' Block (Maybe BoundingPoly)
bBoundingBox
= lens _bBoundingBox (\ s a -> s{_bBoundingBox = a})
bParagraphs :: Lens' Block [Paragraph]
bParagraphs
= lens _bParagraphs (\ s a -> s{_bParagraphs = a}) .
_Default
. _Coerce
bConfidence :: Lens' Block (Maybe Double)
bConfidence
= lens _bConfidence (\ s a -> s{_bConfidence = a}) .
mapping _Coerce
bBlockType :: Lens' Block (Maybe BlockBlockType)
bBlockType
= lens _bBlockType (\ s a -> s{_bBlockType = a})
instance FromJSON Block where
parseJSON
= withObject "Block"
(\ o ->
Block' <$>
(o .:? "property") <*> (o .:? "boundingBox") <*>
(o .:? "paragraphs" .!= mempty)
<*> (o .:? "confidence")
<*> (o .:? "blockType"))
instance ToJSON Block where
toJSON Block'{..}
= object
(catMaybes
[("property" .=) <$> _bProperty,
("boundingBox" .=) <$> _bBoundingBox,
("paragraphs" .=) <$> _bParagraphs,
("confidence" .=) <$> _bConfidence,
("blockType" .=) <$> _bBlockType])
data GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest = GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest'
{ _gInputConfig :: !(Maybe GoogleCloudVisionV1p2beta1InputConfig)
, _gFeatures :: !(Maybe [GoogleCloudVisionV1p2beta1Feature])
, _gOutputConfig :: !(Maybe GoogleCloudVisionV1p2beta1OutputConfig)
, _gImageContext :: !(Maybe GoogleCloudVisionV1p2beta1ImageContext)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1AsyncAnnotateFileRequest
:: GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest
googleCloudVisionV1p2beta1AsyncAnnotateFileRequest =
GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest'
{ _gInputConfig = Nothing
, _gFeatures = Nothing
, _gOutputConfig = Nothing
, _gImageContext = Nothing
}
gInputConfig :: Lens' GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest (Maybe GoogleCloudVisionV1p2beta1InputConfig)
gInputConfig
= lens _gInputConfig (\ s a -> s{_gInputConfig = a})
gFeatures :: Lens' GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest [GoogleCloudVisionV1p2beta1Feature]
gFeatures
= lens _gFeatures (\ s a -> s{_gFeatures = a}) .
_Default
. _Coerce
gOutputConfig :: Lens' GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest (Maybe GoogleCloudVisionV1p2beta1OutputConfig)
gOutputConfig
= lens _gOutputConfig
(\ s a -> s{_gOutputConfig = a})
gImageContext :: Lens' GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest (Maybe GoogleCloudVisionV1p2beta1ImageContext)
gImageContext
= lens _gImageContext
(\ s a -> s{_gImageContext = a})
instance FromJSON
GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest
where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest"
(\ o ->
GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest'
<$>
(o .:? "inputConfig") <*>
(o .:? "features" .!= mempty)
<*> (o .:? "outputConfig")
<*> (o .:? "imageContext"))
instance ToJSON
GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest
where
toJSON
GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest'{..}
= object
(catMaybes
[("inputConfig" .=) <$> _gInputConfig,
("features" .=) <$> _gFeatures,
("outputConfig" .=) <$> _gOutputConfig,
("imageContext" .=) <$> _gImageContext])
newtype GoogleCloudVisionV1p2beta1DominantColorsAnnotation = GoogleCloudVisionV1p2beta1DominantColorsAnnotation'
{ _gColors :: Maybe [GoogleCloudVisionV1p2beta1ColorInfo]
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1DominantColorsAnnotation
:: GoogleCloudVisionV1p2beta1DominantColorsAnnotation
googleCloudVisionV1p2beta1DominantColorsAnnotation =
GoogleCloudVisionV1p2beta1DominantColorsAnnotation'
{ _gColors = Nothing
}
gColors :: Lens' GoogleCloudVisionV1p2beta1DominantColorsAnnotation [GoogleCloudVisionV1p2beta1ColorInfo]
gColors
= lens _gColors (\ s a -> s{_gColors = a}) . _Default
. _Coerce
instance FromJSON
GoogleCloudVisionV1p2beta1DominantColorsAnnotation
where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1DominantColorsAnnotation"
(\ o ->
GoogleCloudVisionV1p2beta1DominantColorsAnnotation'
<$> (o .:? "colors" .!= mempty))
instance ToJSON
GoogleCloudVisionV1p2beta1DominantColorsAnnotation
where
toJSON
GoogleCloudVisionV1p2beta1DominantColorsAnnotation'{..}
= object (catMaybes [("colors" .=) <$> _gColors])
data GoogleCloudVisionV1p3beta1TextAnnotation = GoogleCloudVisionV1p3beta1TextAnnotation'
{ _gcvvtaText :: !(Maybe Text)
, _gcvvtaPages :: !(Maybe [GoogleCloudVisionV1p3beta1Page])
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1TextAnnotation
:: GoogleCloudVisionV1p3beta1TextAnnotation
googleCloudVisionV1p3beta1TextAnnotation =
GoogleCloudVisionV1p3beta1TextAnnotation'
{ _gcvvtaText = Nothing
, _gcvvtaPages = Nothing
}
gcvvtaText :: Lens' GoogleCloudVisionV1p3beta1TextAnnotation (Maybe Text)
gcvvtaText
= lens _gcvvtaText (\ s a -> s{_gcvvtaText = a})
gcvvtaPages :: Lens' GoogleCloudVisionV1p3beta1TextAnnotation [GoogleCloudVisionV1p3beta1Page]
gcvvtaPages
= lens _gcvvtaPages (\ s a -> s{_gcvvtaPages = a}) .
_Default
. _Coerce
instance FromJSON
GoogleCloudVisionV1p3beta1TextAnnotation where
parseJSON
= withObject
"GoogleCloudVisionV1p3beta1TextAnnotation"
(\ o ->
GoogleCloudVisionV1p3beta1TextAnnotation' <$>
(o .:? "text") <*> (o .:? "pages" .!= mempty))
instance ToJSON
GoogleCloudVisionV1p3beta1TextAnnotation where
toJSON GoogleCloudVisionV1p3beta1TextAnnotation'{..}
= object
(catMaybes
[("text" .=) <$> _gcvvtaText,
("pages" .=) <$> _gcvvtaPages])
newtype AsyncAnnotateFileResponse = AsyncAnnotateFileResponse'
{ _aafrOutputConfig :: Maybe OutputConfig
} deriving (Eq,Show,Data,Typeable,Generic)
asyncAnnotateFileResponse
:: AsyncAnnotateFileResponse
asyncAnnotateFileResponse =
AsyncAnnotateFileResponse'
{ _aafrOutputConfig = Nothing
}
aafrOutputConfig :: Lens' AsyncAnnotateFileResponse (Maybe OutputConfig)
aafrOutputConfig
= lens _aafrOutputConfig
(\ s a -> s{_aafrOutputConfig = a})
instance FromJSON AsyncAnnotateFileResponse where
parseJSON
= withObject "AsyncAnnotateFileResponse"
(\ o ->
AsyncAnnotateFileResponse' <$>
(o .:? "outputConfig"))
instance ToJSON AsyncAnnotateFileResponse where
toJSON AsyncAnnotateFileResponse'{..}
= object
(catMaybes
[("outputConfig" .=) <$> _aafrOutputConfig])
data InputConfig = InputConfig'
{ _icGcsSource :: !(Maybe GcsSource)
, _icMimeType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
inputConfig
:: InputConfig
inputConfig =
InputConfig'
{ _icGcsSource = Nothing
, _icMimeType = Nothing
}
icGcsSource :: Lens' InputConfig (Maybe GcsSource)
icGcsSource
= lens _icGcsSource (\ s a -> s{_icGcsSource = a})
icMimeType :: Lens' InputConfig (Maybe Text)
icMimeType
= lens _icMimeType (\ s a -> s{_icMimeType = a})
instance FromJSON InputConfig where
parseJSON
= withObject "InputConfig"
(\ o ->
InputConfig' <$>
(o .:? "gcsSource") <*> (o .:? "mimeType"))
instance ToJSON InputConfig where
toJSON InputConfig'{..}
= object
(catMaybes
[("gcsSource" .=) <$> _icGcsSource,
("mimeType" .=) <$> _icMimeType])
data EntityAnnotation = EntityAnnotation'
{ _eaScore :: !(Maybe (Textual Double))
, _eaTopicality :: !(Maybe (Textual Double))
, _eaLocale :: !(Maybe Text)
, _eaBoundingPoly :: !(Maybe BoundingPoly)
, _eaConfidence :: !(Maybe (Textual Double))
, _eaMid :: !(Maybe Text)
, _eaLocations :: !(Maybe [LocationInfo])
, _eaDescription :: !(Maybe Text)
, _eaProperties :: !(Maybe [Property])
} deriving (Eq,Show,Data,Typeable,Generic)
entityAnnotation
:: EntityAnnotation
entityAnnotation =
EntityAnnotation'
{ _eaScore = Nothing
, _eaTopicality = Nothing
, _eaLocale = Nothing
, _eaBoundingPoly = Nothing
, _eaConfidence = Nothing
, _eaMid = Nothing
, _eaLocations = Nothing
, _eaDescription = Nothing
, _eaProperties = Nothing
}
eaScore :: Lens' EntityAnnotation (Maybe Double)
eaScore
= lens _eaScore (\ s a -> s{_eaScore = a}) .
mapping _Coerce
eaTopicality :: Lens' EntityAnnotation (Maybe Double)
eaTopicality
= lens _eaTopicality (\ s a -> s{_eaTopicality = a})
. mapping _Coerce
eaLocale :: Lens' EntityAnnotation (Maybe Text)
eaLocale = lens _eaLocale (\ s a -> s{_eaLocale = a})
eaBoundingPoly :: Lens' EntityAnnotation (Maybe BoundingPoly)
eaBoundingPoly
= lens _eaBoundingPoly
(\ s a -> s{_eaBoundingPoly = a})
eaConfidence :: Lens' EntityAnnotation (Maybe Double)
eaConfidence
= lens _eaConfidence (\ s a -> s{_eaConfidence = a})
. mapping _Coerce
eaMid :: Lens' EntityAnnotation (Maybe Text)
eaMid = lens _eaMid (\ s a -> s{_eaMid = a})
eaLocations :: Lens' EntityAnnotation [LocationInfo]
eaLocations
= lens _eaLocations (\ s a -> s{_eaLocations = a}) .
_Default
. _Coerce
eaDescription :: Lens' EntityAnnotation (Maybe Text)
eaDescription
= lens _eaDescription
(\ s a -> s{_eaDescription = a})
eaProperties :: Lens' EntityAnnotation [Property]
eaProperties
= lens _eaProperties (\ s a -> s{_eaProperties = a})
. _Default
. _Coerce
instance FromJSON EntityAnnotation where
parseJSON
= withObject "EntityAnnotation"
(\ o ->
EntityAnnotation' <$>
(o .:? "score") <*> (o .:? "topicality") <*>
(o .:? "locale")
<*> (o .:? "boundingPoly")
<*> (o .:? "confidence")
<*> (o .:? "mid")
<*> (o .:? "locations" .!= mempty)
<*> (o .:? "description")
<*> (o .:? "properties" .!= mempty))
instance ToJSON EntityAnnotation where
toJSON EntityAnnotation'{..}
= object
(catMaybes
[("score" .=) <$> _eaScore,
("topicality" .=) <$> _eaTopicality,
("locale" .=) <$> _eaLocale,
("boundingPoly" .=) <$> _eaBoundingPoly,
("confidence" .=) <$> _eaConfidence,
("mid" .=) <$> _eaMid,
("locations" .=) <$> _eaLocations,
("description" .=) <$> _eaDescription,
("properties" .=) <$> _eaProperties])
data ReferenceImage = ReferenceImage'
{ _riURI :: !(Maybe Text)
, _riName :: !(Maybe Text)
, _riBoundingPolys :: !(Maybe [BoundingPoly])
} deriving (Eq,Show,Data,Typeable,Generic)
referenceImage
:: ReferenceImage
referenceImage =
ReferenceImage'
{ _riURI = Nothing
, _riName = Nothing
, _riBoundingPolys = Nothing
}
riURI :: Lens' ReferenceImage (Maybe Text)
riURI = lens _riURI (\ s a -> s{_riURI = a})
riName :: Lens' ReferenceImage (Maybe Text)
riName = lens _riName (\ s a -> s{_riName = a})
riBoundingPolys :: Lens' ReferenceImage [BoundingPoly]
riBoundingPolys
= lens _riBoundingPolys
(\ s a -> s{_riBoundingPolys = a})
. _Default
. _Coerce
instance FromJSON ReferenceImage where
parseJSON
= withObject "ReferenceImage"
(\ o ->
ReferenceImage' <$>
(o .:? "uri") <*> (o .:? "name") <*>
(o .:? "boundingPolys" .!= mempty))
instance ToJSON ReferenceImage where
toJSON ReferenceImage'{..}
= object
(catMaybes
[("uri" .=) <$> _riURI, ("name" .=) <$> _riName,
("boundingPolys" .=) <$> _riBoundingPolys])
data BatchOperationMetadata = BatchOperationMetadata'
{ _bomState :: !(Maybe BatchOperationMetadataState)
, _bomEndTime :: !(Maybe DateTime')
, _bomSubmitTime :: !(Maybe DateTime')
} deriving (Eq,Show,Data,Typeable,Generic)
batchOperationMetadata
:: BatchOperationMetadata
batchOperationMetadata =
BatchOperationMetadata'
{ _bomState = Nothing
, _bomEndTime = Nothing
, _bomSubmitTime = Nothing
}
bomState :: Lens' BatchOperationMetadata (Maybe BatchOperationMetadataState)
bomState = lens _bomState (\ s a -> s{_bomState = a})
bomEndTime :: Lens' BatchOperationMetadata (Maybe UTCTime)
bomEndTime
= lens _bomEndTime (\ s a -> s{_bomEndTime = a}) .
mapping _DateTime
bomSubmitTime :: Lens' BatchOperationMetadata (Maybe UTCTime)
bomSubmitTime
= lens _bomSubmitTime
(\ s a -> s{_bomSubmitTime = a})
. mapping _DateTime
instance FromJSON BatchOperationMetadata where
parseJSON
= withObject "BatchOperationMetadata"
(\ o ->
BatchOperationMetadata' <$>
(o .:? "state") <*> (o .:? "endTime") <*>
(o .:? "submitTime"))
instance ToJSON BatchOperationMetadata where
toJSON BatchOperationMetadata'{..}
= object
(catMaybes
[("state" .=) <$> _bomState,
("endTime" .=) <$> _bomEndTime,
("submitTime" .=) <$> _bomSubmitTime])
data GoogleCloudVisionV1p3beta1WebDetection = GoogleCloudVisionV1p3beta1WebDetection'
{ _gVisuallySimilarImages :: !(Maybe [GoogleCloudVisionV1p3beta1WebDetectionWebImage])
, _gBestGuessLabels :: !(Maybe [GoogleCloudVisionV1p3beta1WebDetectionWebLabel])
, _gPagesWithMatchingImages :: !(Maybe [GoogleCloudVisionV1p3beta1WebDetectionWebPage])
, _gPartialMatchingImages :: !(Maybe [GoogleCloudVisionV1p3beta1WebDetectionWebImage])
, _gFullMatchingImages :: !(Maybe [GoogleCloudVisionV1p3beta1WebDetectionWebImage])
, _gWebEntities :: !(Maybe [GoogleCloudVisionV1p3beta1WebDetectionWebEntity])
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1WebDetection
:: GoogleCloudVisionV1p3beta1WebDetection
googleCloudVisionV1p3beta1WebDetection =
GoogleCloudVisionV1p3beta1WebDetection'
{ _gVisuallySimilarImages = Nothing
, _gBestGuessLabels = Nothing
, _gPagesWithMatchingImages = Nothing
, _gPartialMatchingImages = Nothing
, _gFullMatchingImages = Nothing
, _gWebEntities = Nothing
}
gVisuallySimilarImages :: Lens' GoogleCloudVisionV1p3beta1WebDetection [GoogleCloudVisionV1p3beta1WebDetectionWebImage]
gVisuallySimilarImages
= lens _gVisuallySimilarImages
(\ s a -> s{_gVisuallySimilarImages = a})
. _Default
. _Coerce
gBestGuessLabels :: Lens' GoogleCloudVisionV1p3beta1WebDetection [GoogleCloudVisionV1p3beta1WebDetectionWebLabel]
gBestGuessLabels
= lens _gBestGuessLabels
(\ s a -> s{_gBestGuessLabels = a})
. _Default
. _Coerce
gPagesWithMatchingImages :: Lens' GoogleCloudVisionV1p3beta1WebDetection [GoogleCloudVisionV1p3beta1WebDetectionWebPage]
gPagesWithMatchingImages
= lens _gPagesWithMatchingImages
(\ s a -> s{_gPagesWithMatchingImages = a})
. _Default
. _Coerce
gPartialMatchingImages :: Lens' GoogleCloudVisionV1p3beta1WebDetection [GoogleCloudVisionV1p3beta1WebDetectionWebImage]
gPartialMatchingImages
= lens _gPartialMatchingImages
(\ s a -> s{_gPartialMatchingImages = a})
. _Default
. _Coerce
gFullMatchingImages :: Lens' GoogleCloudVisionV1p3beta1WebDetection [GoogleCloudVisionV1p3beta1WebDetectionWebImage]
gFullMatchingImages
= lens _gFullMatchingImages
(\ s a -> s{_gFullMatchingImages = a})
. _Default
. _Coerce
gWebEntities :: Lens' GoogleCloudVisionV1p3beta1WebDetection [GoogleCloudVisionV1p3beta1WebDetectionWebEntity]
gWebEntities
= lens _gWebEntities (\ s a -> s{_gWebEntities = a})
. _Default
. _Coerce
instance FromJSON
GoogleCloudVisionV1p3beta1WebDetection where
parseJSON
= withObject "GoogleCloudVisionV1p3beta1WebDetection"
(\ o ->
GoogleCloudVisionV1p3beta1WebDetection' <$>
(o .:? "visuallySimilarImages" .!= mempty) <*>
(o .:? "bestGuessLabels" .!= mempty)
<*> (o .:? "pagesWithMatchingImages" .!= mempty)
<*> (o .:? "partialMatchingImages" .!= mempty)
<*> (o .:? "fullMatchingImages" .!= mempty)
<*> (o .:? "webEntities" .!= mempty))
instance ToJSON
GoogleCloudVisionV1p3beta1WebDetection where
toJSON GoogleCloudVisionV1p3beta1WebDetection'{..}
= object
(catMaybes
[("visuallySimilarImages" .=) <$>
_gVisuallySimilarImages,
("bestGuessLabels" .=) <$> _gBestGuessLabels,
("pagesWithMatchingImages" .=) <$>
_gPagesWithMatchingImages,
("partialMatchingImages" .=) <$>
_gPartialMatchingImages,
("fullMatchingImages" .=) <$> _gFullMatchingImages,
("webEntities" .=) <$> _gWebEntities])
data DetectedLanguage = DetectedLanguage'
{ _dlLanguageCode :: !(Maybe Text)
, _dlConfidence :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
detectedLanguage
:: DetectedLanguage
detectedLanguage =
DetectedLanguage'
{ _dlLanguageCode = Nothing
, _dlConfidence = Nothing
}
dlLanguageCode :: Lens' DetectedLanguage (Maybe Text)
dlLanguageCode
= lens _dlLanguageCode
(\ s a -> s{_dlLanguageCode = a})
dlConfidence :: Lens' DetectedLanguage (Maybe Double)
dlConfidence
= lens _dlConfidence (\ s a -> s{_dlConfidence = a})
. mapping _Coerce
instance FromJSON DetectedLanguage where
parseJSON
= withObject "DetectedLanguage"
(\ o ->
DetectedLanguage' <$>
(o .:? "languageCode") <*> (o .:? "confidence"))
instance ToJSON DetectedLanguage where
toJSON DetectedLanguage'{..}
= object
(catMaybes
[("languageCode" .=) <$> _dlLanguageCode,
("confidence" .=) <$> _dlConfidence])
data GoogleCloudVisionV1p3beta1AnnotateFileResponse = GoogleCloudVisionV1p3beta1AnnotateFileResponse'
{ _gooResponses :: !(Maybe [GoogleCloudVisionV1p3beta1AnnotateImageResponse])
, _gooInputConfig :: !(Maybe GoogleCloudVisionV1p3beta1InputConfig)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1AnnotateFileResponse
:: GoogleCloudVisionV1p3beta1AnnotateFileResponse
googleCloudVisionV1p3beta1AnnotateFileResponse =
GoogleCloudVisionV1p3beta1AnnotateFileResponse'
{ _gooResponses = Nothing
, _gooInputConfig = Nothing
}
gooResponses :: Lens' GoogleCloudVisionV1p3beta1AnnotateFileResponse [GoogleCloudVisionV1p3beta1AnnotateImageResponse]
gooResponses
= lens _gooResponses (\ s a -> s{_gooResponses = a})
. _Default
. _Coerce
gooInputConfig :: Lens' GoogleCloudVisionV1p3beta1AnnotateFileResponse (Maybe GoogleCloudVisionV1p3beta1InputConfig)
gooInputConfig
= lens _gooInputConfig
(\ s a -> s{_gooInputConfig = a})
instance FromJSON
GoogleCloudVisionV1p3beta1AnnotateFileResponse where
parseJSON
= withObject
"GoogleCloudVisionV1p3beta1AnnotateFileResponse"
(\ o ->
GoogleCloudVisionV1p3beta1AnnotateFileResponse' <$>
(o .:? "responses" .!= mempty) <*>
(o .:? "inputConfig"))
instance ToJSON
GoogleCloudVisionV1p3beta1AnnotateFileResponse where
toJSON
GoogleCloudVisionV1p3beta1AnnotateFileResponse'{..}
= object
(catMaybes
[("responses" .=) <$> _gooResponses,
("inputConfig" .=) <$> _gooInputConfig])
data GoogleCloudVisionV1p2beta1ProductSearchResultsResult = GoogleCloudVisionV1p2beta1ProductSearchResultsResult'
{ _gImage :: !(Maybe Text)
, _gScore :: !(Maybe (Textual Double))
, _gProduct :: !(Maybe GoogleCloudVisionV1p2beta1Product)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1ProductSearchResultsResult
:: GoogleCloudVisionV1p2beta1ProductSearchResultsResult
googleCloudVisionV1p2beta1ProductSearchResultsResult =
GoogleCloudVisionV1p2beta1ProductSearchResultsResult'
{ _gImage = Nothing
, _gScore = Nothing
, _gProduct = Nothing
}
gImage :: Lens' GoogleCloudVisionV1p2beta1ProductSearchResultsResult (Maybe Text)
gImage = lens _gImage (\ s a -> s{_gImage = a})
gScore :: Lens' GoogleCloudVisionV1p2beta1ProductSearchResultsResult (Maybe Double)
gScore
= lens _gScore (\ s a -> s{_gScore = a}) .
mapping _Coerce
gProduct :: Lens' GoogleCloudVisionV1p2beta1ProductSearchResultsResult (Maybe GoogleCloudVisionV1p2beta1Product)
gProduct = lens _gProduct (\ s a -> s{_gProduct = a})
instance FromJSON
GoogleCloudVisionV1p2beta1ProductSearchResultsResult
where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1ProductSearchResultsResult"
(\ o ->
GoogleCloudVisionV1p2beta1ProductSearchResultsResult'
<$>
(o .:? "image") <*> (o .:? "score") <*>
(o .:? "product"))
instance ToJSON
GoogleCloudVisionV1p2beta1ProductSearchResultsResult
where
toJSON
GoogleCloudVisionV1p2beta1ProductSearchResultsResult'{..}
= object
(catMaybes
[("image" .=) <$> _gImage, ("score" .=) <$> _gScore,
("product" .=) <$> _gProduct])
data GoogleCloudVisionV1p2beta1Word = GoogleCloudVisionV1p2beta1Word'
{ _gcvvwcProperty :: !(Maybe GoogleCloudVisionV1p2beta1TextAnnotationTextProperty)
, _gcvvwcBoundingBox :: !(Maybe GoogleCloudVisionV1p2beta1BoundingPoly)
, _gcvvwcSymbols :: !(Maybe [GoogleCloudVisionV1p2beta1Symbol])
, _gcvvwcConfidence :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1Word
:: GoogleCloudVisionV1p2beta1Word
googleCloudVisionV1p2beta1Word =
GoogleCloudVisionV1p2beta1Word'
{ _gcvvwcProperty = Nothing
, _gcvvwcBoundingBox = Nothing
, _gcvvwcSymbols = Nothing
, _gcvvwcConfidence = Nothing
}
gcvvwcProperty :: Lens' GoogleCloudVisionV1p2beta1Word (Maybe GoogleCloudVisionV1p2beta1TextAnnotationTextProperty)
gcvvwcProperty
= lens _gcvvwcProperty
(\ s a -> s{_gcvvwcProperty = a})
gcvvwcBoundingBox :: Lens' GoogleCloudVisionV1p2beta1Word (Maybe GoogleCloudVisionV1p2beta1BoundingPoly)
gcvvwcBoundingBox
= lens _gcvvwcBoundingBox
(\ s a -> s{_gcvvwcBoundingBox = a})
gcvvwcSymbols :: Lens' GoogleCloudVisionV1p2beta1Word [GoogleCloudVisionV1p2beta1Symbol]
gcvvwcSymbols
= lens _gcvvwcSymbols
(\ s a -> s{_gcvvwcSymbols = a})
. _Default
. _Coerce
gcvvwcConfidence :: Lens' GoogleCloudVisionV1p2beta1Word (Maybe Double)
gcvvwcConfidence
= lens _gcvvwcConfidence
(\ s a -> s{_gcvvwcConfidence = a})
. mapping _Coerce
instance FromJSON GoogleCloudVisionV1p2beta1Word
where
parseJSON
= withObject "GoogleCloudVisionV1p2beta1Word"
(\ o ->
GoogleCloudVisionV1p2beta1Word' <$>
(o .:? "property") <*> (o .:? "boundingBox") <*>
(o .:? "symbols" .!= mempty)
<*> (o .:? "confidence"))
instance ToJSON GoogleCloudVisionV1p2beta1Word where
toJSON GoogleCloudVisionV1p2beta1Word'{..}
= object
(catMaybes
[("property" .=) <$> _gcvvwcProperty,
("boundingBox" .=) <$> _gcvvwcBoundingBox,
("symbols" .=) <$> _gcvvwcSymbols,
("confidence" .=) <$> _gcvvwcConfidence])
data GoogleCloudVisionV1p1beta1Word = GoogleCloudVisionV1p1beta1Word'
{ _gcvvw1Property :: !(Maybe GoogleCloudVisionV1p1beta1TextAnnotationTextProperty)
, _gcvvw1BoundingBox :: !(Maybe GoogleCloudVisionV1p1beta1BoundingPoly)
, _gcvvw1Symbols :: !(Maybe [GoogleCloudVisionV1p1beta1Symbol])
, _gcvvw1Confidence :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1Word
:: GoogleCloudVisionV1p1beta1Word
googleCloudVisionV1p1beta1Word =
GoogleCloudVisionV1p1beta1Word'
{ _gcvvw1Property = Nothing
, _gcvvw1BoundingBox = Nothing
, _gcvvw1Symbols = Nothing
, _gcvvw1Confidence = Nothing
}
gcvvw1Property :: Lens' GoogleCloudVisionV1p1beta1Word (Maybe GoogleCloudVisionV1p1beta1TextAnnotationTextProperty)
gcvvw1Property
= lens _gcvvw1Property
(\ s a -> s{_gcvvw1Property = a})
gcvvw1BoundingBox :: Lens' GoogleCloudVisionV1p1beta1Word (Maybe GoogleCloudVisionV1p1beta1BoundingPoly)
gcvvw1BoundingBox
= lens _gcvvw1BoundingBox
(\ s a -> s{_gcvvw1BoundingBox = a})
gcvvw1Symbols :: Lens' GoogleCloudVisionV1p1beta1Word [GoogleCloudVisionV1p1beta1Symbol]
gcvvw1Symbols
= lens _gcvvw1Symbols
(\ s a -> s{_gcvvw1Symbols = a})
. _Default
. _Coerce
gcvvw1Confidence :: Lens' GoogleCloudVisionV1p1beta1Word (Maybe Double)
gcvvw1Confidence
= lens _gcvvw1Confidence
(\ s a -> s{_gcvvw1Confidence = a})
. mapping _Coerce
instance FromJSON GoogleCloudVisionV1p1beta1Word
where
parseJSON
= withObject "GoogleCloudVisionV1p1beta1Word"
(\ o ->
GoogleCloudVisionV1p1beta1Word' <$>
(o .:? "property") <*> (o .:? "boundingBox") <*>
(o .:? "symbols" .!= mempty)
<*> (o .:? "confidence"))
instance ToJSON GoogleCloudVisionV1p1beta1Word where
toJSON GoogleCloudVisionV1p1beta1Word'{..}
= object
(catMaybes
[("property" .=) <$> _gcvvw1Property,
("boundingBox" .=) <$> _gcvvw1BoundingBox,
("symbols" .=) <$> _gcvvw1Symbols,
("confidence" .=) <$> _gcvvw1Confidence])
data GoogleCloudVisionV1p1beta1ProductSearchResultsResult = GoogleCloudVisionV1p1beta1ProductSearchResultsResult'
{ _gcvvpsrrcImage :: !(Maybe Text)
, _gcvvpsrrcScore :: !(Maybe (Textual Double))
, _gcvvpsrrcProduct :: !(Maybe GoogleCloudVisionV1p1beta1Product)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1ProductSearchResultsResult
:: GoogleCloudVisionV1p1beta1ProductSearchResultsResult
googleCloudVisionV1p1beta1ProductSearchResultsResult =
GoogleCloudVisionV1p1beta1ProductSearchResultsResult'
{ _gcvvpsrrcImage = Nothing
, _gcvvpsrrcScore = Nothing
, _gcvvpsrrcProduct = Nothing
}
gcvvpsrrcImage :: Lens' GoogleCloudVisionV1p1beta1ProductSearchResultsResult (Maybe Text)
gcvvpsrrcImage
= lens _gcvvpsrrcImage
(\ s a -> s{_gcvvpsrrcImage = a})
gcvvpsrrcScore :: Lens' GoogleCloudVisionV1p1beta1ProductSearchResultsResult (Maybe Double)
gcvvpsrrcScore
= lens _gcvvpsrrcScore
(\ s a -> s{_gcvvpsrrcScore = a})
. mapping _Coerce
gcvvpsrrcProduct :: Lens' GoogleCloudVisionV1p1beta1ProductSearchResultsResult (Maybe GoogleCloudVisionV1p1beta1Product)
gcvvpsrrcProduct
= lens _gcvvpsrrcProduct
(\ s a -> s{_gcvvpsrrcProduct = a})
instance FromJSON
GoogleCloudVisionV1p1beta1ProductSearchResultsResult
where
parseJSON
= withObject
"GoogleCloudVisionV1p1beta1ProductSearchResultsResult"
(\ o ->
GoogleCloudVisionV1p1beta1ProductSearchResultsResult'
<$>
(o .:? "image") <*> (o .:? "score") <*>
(o .:? "product"))
instance ToJSON
GoogleCloudVisionV1p1beta1ProductSearchResultsResult
where
toJSON
GoogleCloudVisionV1p1beta1ProductSearchResultsResult'{..}
= object
(catMaybes
[("image" .=) <$> _gcvvpsrrcImage,
("score" .=) <$> _gcvvpsrrcScore,
("product" .=) <$> _gcvvpsrrcProduct])
data GoogleCloudVisionV1p3beta1ImportProductSetsResponse = GoogleCloudVisionV1p3beta1ImportProductSetsResponse'
{ _gcvvipsrReferenceImages :: !(Maybe [GoogleCloudVisionV1p3beta1ReferenceImage])
, _gcvvipsrStatuses :: !(Maybe [Status])
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1ImportProductSetsResponse
:: GoogleCloudVisionV1p3beta1ImportProductSetsResponse
googleCloudVisionV1p3beta1ImportProductSetsResponse =
GoogleCloudVisionV1p3beta1ImportProductSetsResponse'
{ _gcvvipsrReferenceImages = Nothing
, _gcvvipsrStatuses = Nothing
}
gcvvipsrReferenceImages :: Lens' GoogleCloudVisionV1p3beta1ImportProductSetsResponse [GoogleCloudVisionV1p3beta1ReferenceImage]
gcvvipsrReferenceImages
= lens _gcvvipsrReferenceImages
(\ s a -> s{_gcvvipsrReferenceImages = a})
. _Default
. _Coerce
gcvvipsrStatuses :: Lens' GoogleCloudVisionV1p3beta1ImportProductSetsResponse [Status]
gcvvipsrStatuses
= lens _gcvvipsrStatuses
(\ s a -> s{_gcvvipsrStatuses = a})
. _Default
. _Coerce
instance FromJSON
GoogleCloudVisionV1p3beta1ImportProductSetsResponse
where
parseJSON
= withObject
"GoogleCloudVisionV1p3beta1ImportProductSetsResponse"
(\ o ->
GoogleCloudVisionV1p3beta1ImportProductSetsResponse'
<$>
(o .:? "referenceImages" .!= mempty) <*>
(o .:? "statuses" .!= mempty))
instance ToJSON
GoogleCloudVisionV1p3beta1ImportProductSetsResponse
where
toJSON
GoogleCloudVisionV1p3beta1ImportProductSetsResponse'{..}
= object
(catMaybes
[("referenceImages" .=) <$> _gcvvipsrReferenceImages,
("statuses" .=) <$> _gcvvipsrStatuses])
newtype GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesResponse = GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesResponse'
{ _gcvvabafrcResponses :: Maybe [GoogleCloudVisionV1p1beta1AsyncAnnotateFileResponse]
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1AsyncBatchAnnotateFilesResponse
:: GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesResponse
googleCloudVisionV1p1beta1AsyncBatchAnnotateFilesResponse =
GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesResponse'
{ _gcvvabafrcResponses = Nothing
}
gcvvabafrcResponses :: Lens' GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesResponse [GoogleCloudVisionV1p1beta1AsyncAnnotateFileResponse]
gcvvabafrcResponses
= lens _gcvvabafrcResponses
(\ s a -> s{_gcvvabafrcResponses = a})
. _Default
. _Coerce
instance FromJSON
GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesResponse
where
parseJSON
= withObject
"GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesResponse"
(\ o ->
GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesResponse'
<$> (o .:? "responses" .!= mempty))
instance ToJSON
GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesResponse
where
toJSON
GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesResponse'{..}
= object
(catMaybes
[("responses" .=) <$> _gcvvabafrcResponses])
newtype GoogleCloudVisionV1p1beta1ImageProperties = GoogleCloudVisionV1p1beta1ImageProperties'
{ _gcvvipsDominantColors :: Maybe GoogleCloudVisionV1p1beta1DominantColorsAnnotation
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1ImageProperties
:: GoogleCloudVisionV1p1beta1ImageProperties
googleCloudVisionV1p1beta1ImageProperties =
GoogleCloudVisionV1p1beta1ImageProperties'
{ _gcvvipsDominantColors = Nothing
}
gcvvipsDominantColors :: Lens' GoogleCloudVisionV1p1beta1ImageProperties (Maybe GoogleCloudVisionV1p1beta1DominantColorsAnnotation)
gcvvipsDominantColors
= lens _gcvvipsDominantColors
(\ s a -> s{_gcvvipsDominantColors = a})
instance FromJSON
GoogleCloudVisionV1p1beta1ImageProperties where
parseJSON
= withObject
"GoogleCloudVisionV1p1beta1ImageProperties"
(\ o ->
GoogleCloudVisionV1p1beta1ImageProperties' <$>
(o .:? "dominantColors"))
instance ToJSON
GoogleCloudVisionV1p1beta1ImageProperties where
toJSON GoogleCloudVisionV1p1beta1ImageProperties'{..}
= object
(catMaybes
[("dominantColors" .=) <$> _gcvvipsDominantColors])
data GoogleCloudVisionV1p3beta1WebDetectionWebEntity = GoogleCloudVisionV1p3beta1WebDetectionWebEntity'
{ _goooScore :: !(Maybe (Textual Double))
, _goooEntityId :: !(Maybe Text)
, _goooDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1WebDetectionWebEntity
:: GoogleCloudVisionV1p3beta1WebDetectionWebEntity
googleCloudVisionV1p3beta1WebDetectionWebEntity =
GoogleCloudVisionV1p3beta1WebDetectionWebEntity'
{ _goooScore = Nothing
, _goooEntityId = Nothing
, _goooDescription = Nothing
}
goooScore :: Lens' GoogleCloudVisionV1p3beta1WebDetectionWebEntity (Maybe Double)
goooScore
= lens _goooScore (\ s a -> s{_goooScore = a}) .
mapping _Coerce
goooEntityId :: Lens' GoogleCloudVisionV1p3beta1WebDetectionWebEntity (Maybe Text)
goooEntityId
= lens _goooEntityId (\ s a -> s{_goooEntityId = a})
goooDescription :: Lens' GoogleCloudVisionV1p3beta1WebDetectionWebEntity (Maybe Text)
goooDescription
= lens _goooDescription
(\ s a -> s{_goooDescription = a})
instance FromJSON
GoogleCloudVisionV1p3beta1WebDetectionWebEntity where
parseJSON
= withObject
"GoogleCloudVisionV1p3beta1WebDetectionWebEntity"
(\ o ->
GoogleCloudVisionV1p3beta1WebDetectionWebEntity' <$>
(o .:? "score") <*> (o .:? "entityId") <*>
(o .:? "description"))
instance ToJSON
GoogleCloudVisionV1p3beta1WebDetectionWebEntity where
toJSON
GoogleCloudVisionV1p3beta1WebDetectionWebEntity'{..}
= object
(catMaybes
[("score" .=) <$> _goooScore,
("entityId" .=) <$> _goooEntityId,
("description" .=) <$> _goooDescription])
data GoogleCloudVisionV1p1beta1AnnotateImageResponse = GoogleCloudVisionV1p1beta1AnnotateImageResponse'
{ _gooLogoAnnotations :: !(Maybe [GoogleCloudVisionV1p1beta1EntityAnnotation])
, _gooProductSearchResults :: !(Maybe GoogleCloudVisionV1p1beta1ProductSearchResults)
, _gooContext :: !(Maybe GoogleCloudVisionV1p1beta1ImageAnnotationContext)
, _gooLabelAnnotations :: !(Maybe [GoogleCloudVisionV1p1beta1EntityAnnotation])
, _gooFaceAnnotations :: !(Maybe [GoogleCloudVisionV1p1beta1FaceAnnotation])
, _gooError :: !(Maybe Status)
, _gooWebDetection :: !(Maybe GoogleCloudVisionV1p1beta1WebDetection)
, _gooSafeSearchAnnotation :: !(Maybe GoogleCloudVisionV1p1beta1SafeSearchAnnotation)
, _gooLandmarkAnnotations :: !(Maybe [GoogleCloudVisionV1p1beta1EntityAnnotation])
, _gooLocalizedObjectAnnotations :: !(Maybe [GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation])
, _gooTextAnnotations :: !(Maybe [GoogleCloudVisionV1p1beta1EntityAnnotation])
, _gooCropHintsAnnotation :: !(Maybe GoogleCloudVisionV1p1beta1CropHintsAnnotation)
, _gooFullTextAnnotation :: !(Maybe GoogleCloudVisionV1p1beta1TextAnnotation)
, _gooImagePropertiesAnnotation :: !(Maybe GoogleCloudVisionV1p1beta1ImageProperties)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1AnnotateImageResponse
:: GoogleCloudVisionV1p1beta1AnnotateImageResponse
googleCloudVisionV1p1beta1AnnotateImageResponse =
GoogleCloudVisionV1p1beta1AnnotateImageResponse'
{ _gooLogoAnnotations = Nothing
, _gooProductSearchResults = Nothing
, _gooContext = Nothing
, _gooLabelAnnotations = Nothing
, _gooFaceAnnotations = Nothing
, _gooError = Nothing
, _gooWebDetection = Nothing
, _gooSafeSearchAnnotation = Nothing
, _gooLandmarkAnnotations = Nothing
, _gooLocalizedObjectAnnotations = Nothing
, _gooTextAnnotations = Nothing
, _gooCropHintsAnnotation = Nothing
, _gooFullTextAnnotation = Nothing
, _gooImagePropertiesAnnotation = Nothing
}
gooLogoAnnotations :: Lens' GoogleCloudVisionV1p1beta1AnnotateImageResponse [GoogleCloudVisionV1p1beta1EntityAnnotation]
gooLogoAnnotations
= lens _gooLogoAnnotations
(\ s a -> s{_gooLogoAnnotations = a})
. _Default
. _Coerce
gooProductSearchResults :: Lens' GoogleCloudVisionV1p1beta1AnnotateImageResponse (Maybe GoogleCloudVisionV1p1beta1ProductSearchResults)
gooProductSearchResults
= lens _gooProductSearchResults
(\ s a -> s{_gooProductSearchResults = a})
gooContext :: Lens' GoogleCloudVisionV1p1beta1AnnotateImageResponse (Maybe GoogleCloudVisionV1p1beta1ImageAnnotationContext)
gooContext
= lens _gooContext (\ s a -> s{_gooContext = a})
gooLabelAnnotations :: Lens' GoogleCloudVisionV1p1beta1AnnotateImageResponse [GoogleCloudVisionV1p1beta1EntityAnnotation]
gooLabelAnnotations
= lens _gooLabelAnnotations
(\ s a -> s{_gooLabelAnnotations = a})
. _Default
. _Coerce
gooFaceAnnotations :: Lens' GoogleCloudVisionV1p1beta1AnnotateImageResponse [GoogleCloudVisionV1p1beta1FaceAnnotation]
gooFaceAnnotations
= lens _gooFaceAnnotations
(\ s a -> s{_gooFaceAnnotations = a})
. _Default
. _Coerce
gooError :: Lens' GoogleCloudVisionV1p1beta1AnnotateImageResponse (Maybe Status)
gooError = lens _gooError (\ s a -> s{_gooError = a})
gooWebDetection :: Lens' GoogleCloudVisionV1p1beta1AnnotateImageResponse (Maybe GoogleCloudVisionV1p1beta1WebDetection)
gooWebDetection
= lens _gooWebDetection
(\ s a -> s{_gooWebDetection = a})
gooSafeSearchAnnotation :: Lens' GoogleCloudVisionV1p1beta1AnnotateImageResponse (Maybe GoogleCloudVisionV1p1beta1SafeSearchAnnotation)
gooSafeSearchAnnotation
= lens _gooSafeSearchAnnotation
(\ s a -> s{_gooSafeSearchAnnotation = a})
gooLandmarkAnnotations :: Lens' GoogleCloudVisionV1p1beta1AnnotateImageResponse [GoogleCloudVisionV1p1beta1EntityAnnotation]
gooLandmarkAnnotations
= lens _gooLandmarkAnnotations
(\ s a -> s{_gooLandmarkAnnotations = a})
. _Default
. _Coerce
gooLocalizedObjectAnnotations :: Lens' GoogleCloudVisionV1p1beta1AnnotateImageResponse [GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation]
gooLocalizedObjectAnnotations
= lens _gooLocalizedObjectAnnotations
(\ s a -> s{_gooLocalizedObjectAnnotations = a})
. _Default
. _Coerce
gooTextAnnotations :: Lens' GoogleCloudVisionV1p1beta1AnnotateImageResponse [GoogleCloudVisionV1p1beta1EntityAnnotation]
gooTextAnnotations
= lens _gooTextAnnotations
(\ s a -> s{_gooTextAnnotations = a})
. _Default
. _Coerce
gooCropHintsAnnotation :: Lens' GoogleCloudVisionV1p1beta1AnnotateImageResponse (Maybe GoogleCloudVisionV1p1beta1CropHintsAnnotation)
gooCropHintsAnnotation
= lens _gooCropHintsAnnotation
(\ s a -> s{_gooCropHintsAnnotation = a})
gooFullTextAnnotation :: Lens' GoogleCloudVisionV1p1beta1AnnotateImageResponse (Maybe GoogleCloudVisionV1p1beta1TextAnnotation)
gooFullTextAnnotation
= lens _gooFullTextAnnotation
(\ s a -> s{_gooFullTextAnnotation = a})
gooImagePropertiesAnnotation :: Lens' GoogleCloudVisionV1p1beta1AnnotateImageResponse (Maybe GoogleCloudVisionV1p1beta1ImageProperties)
gooImagePropertiesAnnotation
= lens _gooImagePropertiesAnnotation
(\ s a -> s{_gooImagePropertiesAnnotation = a})
instance FromJSON
GoogleCloudVisionV1p1beta1AnnotateImageResponse where
parseJSON
= withObject
"GoogleCloudVisionV1p1beta1AnnotateImageResponse"
(\ o ->
GoogleCloudVisionV1p1beta1AnnotateImageResponse' <$>
(o .:? "logoAnnotations" .!= mempty) <*>
(o .:? "productSearchResults")
<*> (o .:? "context")
<*> (o .:? "labelAnnotations" .!= mempty)
<*> (o .:? "faceAnnotations" .!= mempty)
<*> (o .:? "error")
<*> (o .:? "webDetection")
<*> (o .:? "safeSearchAnnotation")
<*> (o .:? "landmarkAnnotations" .!= mempty)
<*> (o .:? "localizedObjectAnnotations" .!= mempty)
<*> (o .:? "textAnnotations" .!= mempty)
<*> (o .:? "cropHintsAnnotation")
<*> (o .:? "fullTextAnnotation")
<*> (o .:? "imagePropertiesAnnotation"))
instance ToJSON
GoogleCloudVisionV1p1beta1AnnotateImageResponse where
toJSON
GoogleCloudVisionV1p1beta1AnnotateImageResponse'{..}
= object
(catMaybes
[("logoAnnotations" .=) <$> _gooLogoAnnotations,
("productSearchResults" .=) <$>
_gooProductSearchResults,
("context" .=) <$> _gooContext,
("labelAnnotations" .=) <$> _gooLabelAnnotations,
("faceAnnotations" .=) <$> _gooFaceAnnotations,
("error" .=) <$> _gooError,
("webDetection" .=) <$> _gooWebDetection,
("safeSearchAnnotation" .=) <$>
_gooSafeSearchAnnotation,
("landmarkAnnotations" .=) <$>
_gooLandmarkAnnotations,
("localizedObjectAnnotations" .=) <$>
_gooLocalizedObjectAnnotations,
("textAnnotations" .=) <$> _gooTextAnnotations,
("cropHintsAnnotation" .=) <$>
_gooCropHintsAnnotation,
("fullTextAnnotation" .=) <$> _gooFullTextAnnotation,
("imagePropertiesAnnotation" .=) <$>
_gooImagePropertiesAnnotation])
data GoogleCloudVisionV1p3beta1FaceAnnotationLandmark = GoogleCloudVisionV1p3beta1FaceAnnotationLandmark'
{ _gType :: !(Maybe GoogleCloudVisionV1p3beta1FaceAnnotationLandmarkType)
, _gPosition :: !(Maybe GoogleCloudVisionV1p3beta1Position)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1FaceAnnotationLandmark
:: GoogleCloudVisionV1p3beta1FaceAnnotationLandmark
googleCloudVisionV1p3beta1FaceAnnotationLandmark =
GoogleCloudVisionV1p3beta1FaceAnnotationLandmark'
{ _gType = Nothing
, _gPosition = Nothing
}
gType :: Lens' GoogleCloudVisionV1p3beta1FaceAnnotationLandmark (Maybe GoogleCloudVisionV1p3beta1FaceAnnotationLandmarkType)
gType = lens _gType (\ s a -> s{_gType = a})
gPosition :: Lens' GoogleCloudVisionV1p3beta1FaceAnnotationLandmark (Maybe GoogleCloudVisionV1p3beta1Position)
gPosition
= lens _gPosition (\ s a -> s{_gPosition = a})
instance FromJSON
GoogleCloudVisionV1p3beta1FaceAnnotationLandmark
where
parseJSON
= withObject
"GoogleCloudVisionV1p3beta1FaceAnnotationLandmark"
(\ o ->
GoogleCloudVisionV1p3beta1FaceAnnotationLandmark' <$>
(o .:? "type") <*> (o .:? "position"))
instance ToJSON
GoogleCloudVisionV1p3beta1FaceAnnotationLandmark
where
toJSON
GoogleCloudVisionV1p3beta1FaceAnnotationLandmark'{..}
= object
(catMaybes
[("type" .=) <$> _gType,
("position" .=) <$> _gPosition])
data GoogleCloudVisionV1p3beta1BatchOperationMetadata = GoogleCloudVisionV1p3beta1BatchOperationMetadata'
{ _gcvvbomState :: !(Maybe GoogleCloudVisionV1p3beta1BatchOperationMetadataState)
, _gcvvbomEndTime :: !(Maybe DateTime')
, _gcvvbomSubmitTime :: !(Maybe DateTime')
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1BatchOperationMetadata
:: GoogleCloudVisionV1p3beta1BatchOperationMetadata
googleCloudVisionV1p3beta1BatchOperationMetadata =
GoogleCloudVisionV1p3beta1BatchOperationMetadata'
{ _gcvvbomState = Nothing
, _gcvvbomEndTime = Nothing
, _gcvvbomSubmitTime = Nothing
}
gcvvbomState :: Lens' GoogleCloudVisionV1p3beta1BatchOperationMetadata (Maybe GoogleCloudVisionV1p3beta1BatchOperationMetadataState)
gcvvbomState
= lens _gcvvbomState (\ s a -> s{_gcvvbomState = a})
gcvvbomEndTime :: Lens' GoogleCloudVisionV1p3beta1BatchOperationMetadata (Maybe UTCTime)
gcvvbomEndTime
= lens _gcvvbomEndTime
(\ s a -> s{_gcvvbomEndTime = a})
. mapping _DateTime
gcvvbomSubmitTime :: Lens' GoogleCloudVisionV1p3beta1BatchOperationMetadata (Maybe UTCTime)
gcvvbomSubmitTime
= lens _gcvvbomSubmitTime
(\ s a -> s{_gcvvbomSubmitTime = a})
. mapping _DateTime
instance FromJSON
GoogleCloudVisionV1p3beta1BatchOperationMetadata
where
parseJSON
= withObject
"GoogleCloudVisionV1p3beta1BatchOperationMetadata"
(\ o ->
GoogleCloudVisionV1p3beta1BatchOperationMetadata' <$>
(o .:? "state") <*> (o .:? "endTime") <*>
(o .:? "submitTime"))
instance ToJSON
GoogleCloudVisionV1p3beta1BatchOperationMetadata
where
toJSON
GoogleCloudVisionV1p3beta1BatchOperationMetadata'{..}
= object
(catMaybes
[("state" .=) <$> _gcvvbomState,
("endTime" .=) <$> _gcvvbomEndTime,
("submitTime" .=) <$> _gcvvbomSubmitTime])
data WebImage = WebImage'
{ _wiScore :: !(Maybe (Textual Double))
, _wiURL :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
webImage
:: WebImage
webImage =
WebImage'
{ _wiScore = Nothing
, _wiURL = Nothing
}
wiScore :: Lens' WebImage (Maybe Double)
wiScore
= lens _wiScore (\ s a -> s{_wiScore = a}) .
mapping _Coerce
wiURL :: Lens' WebImage (Maybe Text)
wiURL = lens _wiURL (\ s a -> s{_wiURL = a})
instance FromJSON WebImage where
parseJSON
= withObject "WebImage"
(\ o ->
WebImage' <$> (o .:? "score") <*> (o .:? "url"))
instance ToJSON WebImage where
toJSON WebImage'{..}
= object
(catMaybes
[("score" .=) <$> _wiScore, ("url" .=) <$> _wiURL])
data GoogleCloudVisionV1p1beta1Paragraph = GoogleCloudVisionV1p1beta1Paragraph'
{ _gcvvp1Property :: !(Maybe GoogleCloudVisionV1p1beta1TextAnnotationTextProperty)
, _gcvvp1BoundingBox :: !(Maybe GoogleCloudVisionV1p1beta1BoundingPoly)
, _gcvvp1Confidence :: !(Maybe (Textual Double))
, _gcvvp1Words :: !(Maybe [GoogleCloudVisionV1p1beta1Word])
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1Paragraph
:: GoogleCloudVisionV1p1beta1Paragraph
googleCloudVisionV1p1beta1Paragraph =
GoogleCloudVisionV1p1beta1Paragraph'
{ _gcvvp1Property = Nothing
, _gcvvp1BoundingBox = Nothing
, _gcvvp1Confidence = Nothing
, _gcvvp1Words = Nothing
}
gcvvp1Property :: Lens' GoogleCloudVisionV1p1beta1Paragraph (Maybe GoogleCloudVisionV1p1beta1TextAnnotationTextProperty)
gcvvp1Property
= lens _gcvvp1Property
(\ s a -> s{_gcvvp1Property = a})
gcvvp1BoundingBox :: Lens' GoogleCloudVisionV1p1beta1Paragraph (Maybe GoogleCloudVisionV1p1beta1BoundingPoly)
gcvvp1BoundingBox
= lens _gcvvp1BoundingBox
(\ s a -> s{_gcvvp1BoundingBox = a})
gcvvp1Confidence :: Lens' GoogleCloudVisionV1p1beta1Paragraph (Maybe Double)
gcvvp1Confidence
= lens _gcvvp1Confidence
(\ s a -> s{_gcvvp1Confidence = a})
. mapping _Coerce
gcvvp1Words :: Lens' GoogleCloudVisionV1p1beta1Paragraph [GoogleCloudVisionV1p1beta1Word]
gcvvp1Words
= lens _gcvvp1Words (\ s a -> s{_gcvvp1Words = a}) .
_Default
. _Coerce
instance FromJSON GoogleCloudVisionV1p1beta1Paragraph
where
parseJSON
= withObject "GoogleCloudVisionV1p1beta1Paragraph"
(\ o ->
GoogleCloudVisionV1p1beta1Paragraph' <$>
(o .:? "property") <*> (o .:? "boundingBox") <*>
(o .:? "confidence")
<*> (o .:? "words" .!= mempty))
instance ToJSON GoogleCloudVisionV1p1beta1Paragraph
where
toJSON GoogleCloudVisionV1p1beta1Paragraph'{..}
= object
(catMaybes
[("property" .=) <$> _gcvvp1Property,
("boundingBox" .=) <$> _gcvvp1BoundingBox,
("confidence" .=) <$> _gcvvp1Confidence,
("words" .=) <$> _gcvvp1Words])
data WebDetection = WebDetection'
{ _wdVisuallySimilarImages :: !(Maybe [WebImage])
, _wdBestGuessLabels :: !(Maybe [WebLabel])
, _wdPagesWithMatchingImages :: !(Maybe [WebPage])
, _wdPartialMatchingImages :: !(Maybe [WebImage])
, _wdFullMatchingImages :: !(Maybe [WebImage])
, _wdWebEntities :: !(Maybe [WebEntity])
} deriving (Eq,Show,Data,Typeable,Generic)
webDetection
:: WebDetection
webDetection =
WebDetection'
{ _wdVisuallySimilarImages = Nothing
, _wdBestGuessLabels = Nothing
, _wdPagesWithMatchingImages = Nothing
, _wdPartialMatchingImages = Nothing
, _wdFullMatchingImages = Nothing
, _wdWebEntities = Nothing
}
wdVisuallySimilarImages :: Lens' WebDetection [WebImage]
wdVisuallySimilarImages
= lens _wdVisuallySimilarImages
(\ s a -> s{_wdVisuallySimilarImages = a})
. _Default
. _Coerce
wdBestGuessLabels :: Lens' WebDetection [WebLabel]
wdBestGuessLabels
= lens _wdBestGuessLabels
(\ s a -> s{_wdBestGuessLabels = a})
. _Default
. _Coerce
wdPagesWithMatchingImages :: Lens' WebDetection [WebPage]
wdPagesWithMatchingImages
= lens _wdPagesWithMatchingImages
(\ s a -> s{_wdPagesWithMatchingImages = a})
. _Default
. _Coerce
wdPartialMatchingImages :: Lens' WebDetection [WebImage]
wdPartialMatchingImages
= lens _wdPartialMatchingImages
(\ s a -> s{_wdPartialMatchingImages = a})
. _Default
. _Coerce
wdFullMatchingImages :: Lens' WebDetection [WebImage]
wdFullMatchingImages
= lens _wdFullMatchingImages
(\ s a -> s{_wdFullMatchingImages = a})
. _Default
. _Coerce
wdWebEntities :: Lens' WebDetection [WebEntity]
wdWebEntities
= lens _wdWebEntities
(\ s a -> s{_wdWebEntities = a})
. _Default
. _Coerce
instance FromJSON WebDetection where
parseJSON
= withObject "WebDetection"
(\ o ->
WebDetection' <$>
(o .:? "visuallySimilarImages" .!= mempty) <*>
(o .:? "bestGuessLabels" .!= mempty)
<*> (o .:? "pagesWithMatchingImages" .!= mempty)
<*> (o .:? "partialMatchingImages" .!= mempty)
<*> (o .:? "fullMatchingImages" .!= mempty)
<*> (o .:? "webEntities" .!= mempty))
instance ToJSON WebDetection where
toJSON WebDetection'{..}
= object
(catMaybes
[("visuallySimilarImages" .=) <$>
_wdVisuallySimilarImages,
("bestGuessLabels" .=) <$> _wdBestGuessLabels,
("pagesWithMatchingImages" .=) <$>
_wdPagesWithMatchingImages,
("partialMatchingImages" .=) <$>
_wdPartialMatchingImages,
("fullMatchingImages" .=) <$> _wdFullMatchingImages,
("webEntities" .=) <$> _wdWebEntities])
data AnnotateFileResponse = AnnotateFileResponse'
{ _afrResponses :: !(Maybe [AnnotateImageResponse])
, _afrInputConfig :: !(Maybe InputConfig)
} deriving (Eq,Show,Data,Typeable,Generic)
annotateFileResponse
:: AnnotateFileResponse
annotateFileResponse =
AnnotateFileResponse'
{ _afrResponses = Nothing
, _afrInputConfig = Nothing
}
afrResponses :: Lens' AnnotateFileResponse [AnnotateImageResponse]
afrResponses
= lens _afrResponses (\ s a -> s{_afrResponses = a})
. _Default
. _Coerce
afrInputConfig :: Lens' AnnotateFileResponse (Maybe InputConfig)
afrInputConfig
= lens _afrInputConfig
(\ s a -> s{_afrInputConfig = a})
instance FromJSON AnnotateFileResponse where
parseJSON
= withObject "AnnotateFileResponse"
(\ o ->
AnnotateFileResponse' <$>
(o .:? "responses" .!= mempty) <*>
(o .:? "inputConfig"))
instance ToJSON AnnotateFileResponse where
toJSON AnnotateFileResponse'{..}
= object
(catMaybes
[("responses" .=) <$> _afrResponses,
("inputConfig" .=) <$> _afrInputConfig])
data GoogleCloudVisionV1p3beta1EntityAnnotation = GoogleCloudVisionV1p3beta1EntityAnnotation'
{ _gcvveacScore :: !(Maybe (Textual Double))
, _gcvveacTopicality :: !(Maybe (Textual Double))
, _gcvveacLocale :: !(Maybe Text)
, _gcvveacBoundingPoly :: !(Maybe GoogleCloudVisionV1p3beta1BoundingPoly)
, _gcvveacConfidence :: !(Maybe (Textual Double))
, _gcvveacMid :: !(Maybe Text)
, _gcvveacLocations :: !(Maybe [GoogleCloudVisionV1p3beta1LocationInfo])
, _gcvveacDescription :: !(Maybe Text)
, _gcvveacProperties :: !(Maybe [GoogleCloudVisionV1p3beta1Property])
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1EntityAnnotation
:: GoogleCloudVisionV1p3beta1EntityAnnotation
googleCloudVisionV1p3beta1EntityAnnotation =
GoogleCloudVisionV1p3beta1EntityAnnotation'
{ _gcvveacScore = Nothing
, _gcvveacTopicality = Nothing
, _gcvveacLocale = Nothing
, _gcvveacBoundingPoly = Nothing
, _gcvveacConfidence = Nothing
, _gcvveacMid = Nothing
, _gcvveacLocations = Nothing
, _gcvveacDescription = Nothing
, _gcvveacProperties = Nothing
}
gcvveacScore :: Lens' GoogleCloudVisionV1p3beta1EntityAnnotation (Maybe Double)
gcvveacScore
= lens _gcvveacScore (\ s a -> s{_gcvveacScore = a})
. mapping _Coerce
gcvveacTopicality :: Lens' GoogleCloudVisionV1p3beta1EntityAnnotation (Maybe Double)
gcvveacTopicality
= lens _gcvveacTopicality
(\ s a -> s{_gcvveacTopicality = a})
. mapping _Coerce
gcvveacLocale :: Lens' GoogleCloudVisionV1p3beta1EntityAnnotation (Maybe Text)
gcvveacLocale
= lens _gcvveacLocale
(\ s a -> s{_gcvveacLocale = a})
gcvveacBoundingPoly :: Lens' GoogleCloudVisionV1p3beta1EntityAnnotation (Maybe GoogleCloudVisionV1p3beta1BoundingPoly)
gcvveacBoundingPoly
= lens _gcvveacBoundingPoly
(\ s a -> s{_gcvveacBoundingPoly = a})
gcvveacConfidence :: Lens' GoogleCloudVisionV1p3beta1EntityAnnotation (Maybe Double)
gcvveacConfidence
= lens _gcvveacConfidence
(\ s a -> s{_gcvveacConfidence = a})
. mapping _Coerce
gcvveacMid :: Lens' GoogleCloudVisionV1p3beta1EntityAnnotation (Maybe Text)
gcvveacMid
= lens _gcvveacMid (\ s a -> s{_gcvveacMid = a})
gcvveacLocations :: Lens' GoogleCloudVisionV1p3beta1EntityAnnotation [GoogleCloudVisionV1p3beta1LocationInfo]
gcvveacLocations
= lens _gcvveacLocations
(\ s a -> s{_gcvveacLocations = a})
. _Default
. _Coerce
gcvveacDescription :: Lens' GoogleCloudVisionV1p3beta1EntityAnnotation (Maybe Text)
gcvveacDescription
= lens _gcvveacDescription
(\ s a -> s{_gcvveacDescription = a})
gcvveacProperties :: Lens' GoogleCloudVisionV1p3beta1EntityAnnotation [GoogleCloudVisionV1p3beta1Property]
gcvveacProperties
= lens _gcvveacProperties
(\ s a -> s{_gcvveacProperties = a})
. _Default
. _Coerce
instance FromJSON
GoogleCloudVisionV1p3beta1EntityAnnotation where
parseJSON
= withObject
"GoogleCloudVisionV1p3beta1EntityAnnotation"
(\ o ->
GoogleCloudVisionV1p3beta1EntityAnnotation' <$>
(o .:? "score") <*> (o .:? "topicality") <*>
(o .:? "locale")
<*> (o .:? "boundingPoly")
<*> (o .:? "confidence")
<*> (o .:? "mid")
<*> (o .:? "locations" .!= mempty)
<*> (o .:? "description")
<*> (o .:? "properties" .!= mempty))
instance ToJSON
GoogleCloudVisionV1p3beta1EntityAnnotation where
toJSON
GoogleCloudVisionV1p3beta1EntityAnnotation'{..}
= object
(catMaybes
[("score" .=) <$> _gcvveacScore,
("topicality" .=) <$> _gcvveacTopicality,
("locale" .=) <$> _gcvveacLocale,
("boundingPoly" .=) <$> _gcvveacBoundingPoly,
("confidence" .=) <$> _gcvveacConfidence,
("mid" .=) <$> _gcvveacMid,
("locations" .=) <$> _gcvveacLocations,
("description" .=) <$> _gcvveacDescription,
("properties" .=) <$> _gcvveacProperties])
data GroupedResult = GroupedResult'
{ _grResults :: !(Maybe [Result])
, _grBoundingPoly :: !(Maybe BoundingPoly)
} deriving (Eq,Show,Data,Typeable,Generic)
groupedResult
:: GroupedResult
groupedResult =
GroupedResult'
{ _grResults = Nothing
, _grBoundingPoly = Nothing
}
grResults :: Lens' GroupedResult [Result]
grResults
= lens _grResults (\ s a -> s{_grResults = a}) .
_Default
. _Coerce
grBoundingPoly :: Lens' GroupedResult (Maybe BoundingPoly)
grBoundingPoly
= lens _grBoundingPoly
(\ s a -> s{_grBoundingPoly = a})
instance FromJSON GroupedResult where
parseJSON
= withObject "GroupedResult"
(\ o ->
GroupedResult' <$>
(o .:? "results" .!= mempty) <*>
(o .:? "boundingPoly"))
instance ToJSON GroupedResult where
toJSON GroupedResult'{..}
= object
(catMaybes
[("results" .=) <$> _grResults,
("boundingPoly" .=) <$> _grBoundingPoly])
data GoogleCloudVisionV1p3beta1ReferenceImage = GoogleCloudVisionV1p3beta1ReferenceImage'
{ _gcvvriURI :: !(Maybe Text)
, _gcvvriName :: !(Maybe Text)
, _gcvvriBoundingPolys :: !(Maybe [GoogleCloudVisionV1p3beta1BoundingPoly])
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1ReferenceImage
:: GoogleCloudVisionV1p3beta1ReferenceImage
googleCloudVisionV1p3beta1ReferenceImage =
GoogleCloudVisionV1p3beta1ReferenceImage'
{ _gcvvriURI = Nothing
, _gcvvriName = Nothing
, _gcvvriBoundingPolys = Nothing
}
gcvvriURI :: Lens' GoogleCloudVisionV1p3beta1ReferenceImage (Maybe Text)
gcvvriURI
= lens _gcvvriURI (\ s a -> s{_gcvvriURI = a})
gcvvriName :: Lens' GoogleCloudVisionV1p3beta1ReferenceImage (Maybe Text)
gcvvriName
= lens _gcvvriName (\ s a -> s{_gcvvriName = a})
gcvvriBoundingPolys :: Lens' GoogleCloudVisionV1p3beta1ReferenceImage [GoogleCloudVisionV1p3beta1BoundingPoly]
gcvvriBoundingPolys
= lens _gcvvriBoundingPolys
(\ s a -> s{_gcvvriBoundingPolys = a})
. _Default
. _Coerce
instance FromJSON
GoogleCloudVisionV1p3beta1ReferenceImage where
parseJSON
= withObject
"GoogleCloudVisionV1p3beta1ReferenceImage"
(\ o ->
GoogleCloudVisionV1p3beta1ReferenceImage' <$>
(o .:? "uri") <*> (o .:? "name") <*>
(o .:? "boundingPolys" .!= mempty))
instance ToJSON
GoogleCloudVisionV1p3beta1ReferenceImage where
toJSON GoogleCloudVisionV1p3beta1ReferenceImage'{..}
= object
(catMaybes
[("uri" .=) <$> _gcvvriURI,
("name" .=) <$> _gcvvriName,
("boundingPolys" .=) <$> _gcvvriBoundingPolys])
data GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation = GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation'
{ _gcvvloacLanguageCode :: !(Maybe Text)
, _gcvvloacScore :: !(Maybe (Textual Double))
, _gcvvloacBoundingPoly :: !(Maybe GoogleCloudVisionV1p2beta1BoundingPoly)
, _gcvvloacName :: !(Maybe Text)
, _gcvvloacMid :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1LocalizedObjectAnnotation
:: GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation
googleCloudVisionV1p2beta1LocalizedObjectAnnotation =
GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation'
{ _gcvvloacLanguageCode = Nothing
, _gcvvloacScore = Nothing
, _gcvvloacBoundingPoly = Nothing
, _gcvvloacName = Nothing
, _gcvvloacMid = Nothing
}
gcvvloacLanguageCode :: Lens' GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation (Maybe Text)
gcvvloacLanguageCode
= lens _gcvvloacLanguageCode
(\ s a -> s{_gcvvloacLanguageCode = a})
gcvvloacScore :: Lens' GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation (Maybe Double)
gcvvloacScore
= lens _gcvvloacScore
(\ s a -> s{_gcvvloacScore = a})
. mapping _Coerce
gcvvloacBoundingPoly :: Lens' GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation (Maybe GoogleCloudVisionV1p2beta1BoundingPoly)
gcvvloacBoundingPoly
= lens _gcvvloacBoundingPoly
(\ s a -> s{_gcvvloacBoundingPoly = a})
gcvvloacName :: Lens' GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation (Maybe Text)
gcvvloacName
= lens _gcvvloacName (\ s a -> s{_gcvvloacName = a})
gcvvloacMid :: Lens' GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation (Maybe Text)
gcvvloacMid
= lens _gcvvloacMid (\ s a -> s{_gcvvloacMid = a})
instance FromJSON
GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation
where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation"
(\ o ->
GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation'
<$>
(o .:? "languageCode") <*> (o .:? "score") <*>
(o .:? "boundingPoly")
<*> (o .:? "name")
<*> (o .:? "mid"))
instance ToJSON
GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation
where
toJSON
GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation'{..}
= object
(catMaybes
[("languageCode" .=) <$> _gcvvloacLanguageCode,
("score" .=) <$> _gcvvloacScore,
("boundingPoly" .=) <$> _gcvvloacBoundingPoly,
("name" .=) <$> _gcvvloacName,
("mid" .=) <$> _gcvvloacMid])
data GoogleCloudVisionV1p3beta1Block = GoogleCloudVisionV1p3beta1Block'
{ _gcvvbcProperty :: !(Maybe GoogleCloudVisionV1p3beta1TextAnnotationTextProperty)
, _gcvvbcBoundingBox :: !(Maybe GoogleCloudVisionV1p3beta1BoundingPoly)
, _gcvvbcParagraphs :: !(Maybe [GoogleCloudVisionV1p3beta1Paragraph])
, _gcvvbcConfidence :: !(Maybe (Textual Double))
, _gcvvbcBlockType :: !(Maybe GoogleCloudVisionV1p3beta1BlockBlockType)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1Block
:: GoogleCloudVisionV1p3beta1Block
googleCloudVisionV1p3beta1Block =
GoogleCloudVisionV1p3beta1Block'
{ _gcvvbcProperty = Nothing
, _gcvvbcBoundingBox = Nothing
, _gcvvbcParagraphs = Nothing
, _gcvvbcConfidence = Nothing
, _gcvvbcBlockType = Nothing
}
gcvvbcProperty :: Lens' GoogleCloudVisionV1p3beta1Block (Maybe GoogleCloudVisionV1p3beta1TextAnnotationTextProperty)
gcvvbcProperty
= lens _gcvvbcProperty
(\ s a -> s{_gcvvbcProperty = a})
gcvvbcBoundingBox :: Lens' GoogleCloudVisionV1p3beta1Block (Maybe GoogleCloudVisionV1p3beta1BoundingPoly)
gcvvbcBoundingBox
= lens _gcvvbcBoundingBox
(\ s a -> s{_gcvvbcBoundingBox = a})
gcvvbcParagraphs :: Lens' GoogleCloudVisionV1p3beta1Block [GoogleCloudVisionV1p3beta1Paragraph]
gcvvbcParagraphs
= lens _gcvvbcParagraphs
(\ s a -> s{_gcvvbcParagraphs = a})
. _Default
. _Coerce
gcvvbcConfidence :: Lens' GoogleCloudVisionV1p3beta1Block (Maybe Double)
gcvvbcConfidence
= lens _gcvvbcConfidence
(\ s a -> s{_gcvvbcConfidence = a})
. mapping _Coerce
gcvvbcBlockType :: Lens' GoogleCloudVisionV1p3beta1Block (Maybe GoogleCloudVisionV1p3beta1BlockBlockType)
gcvvbcBlockType
= lens _gcvvbcBlockType
(\ s a -> s{_gcvvbcBlockType = a})
instance FromJSON GoogleCloudVisionV1p3beta1Block
where
parseJSON
= withObject "GoogleCloudVisionV1p3beta1Block"
(\ o ->
GoogleCloudVisionV1p3beta1Block' <$>
(o .:? "property") <*> (o .:? "boundingBox") <*>
(o .:? "paragraphs" .!= mempty)
<*> (o .:? "confidence")
<*> (o .:? "blockType"))
instance ToJSON GoogleCloudVisionV1p3beta1Block where
toJSON GoogleCloudVisionV1p3beta1Block'{..}
= object
(catMaybes
[("property" .=) <$> _gcvvbcProperty,
("boundingBox" .=) <$> _gcvvbcBoundingBox,
("paragraphs" .=) <$> _gcvvbcParagraphs,
("confidence" .=) <$> _gcvvbcConfidence,
("blockType" .=) <$> _gcvvbcBlockType])
data GoogleCloudVisionV1p2beta1Vertex = GoogleCloudVisionV1p2beta1Vertex'
{ _gcvvvcX :: !(Maybe (Textual Int32))
, _gcvvvcY :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1Vertex
:: GoogleCloudVisionV1p2beta1Vertex
googleCloudVisionV1p2beta1Vertex =
GoogleCloudVisionV1p2beta1Vertex'
{ _gcvvvcX = Nothing
, _gcvvvcY = Nothing
}
gcvvvcX :: Lens' GoogleCloudVisionV1p2beta1Vertex (Maybe Int32)
gcvvvcX
= lens _gcvvvcX (\ s a -> s{_gcvvvcX = a}) .
mapping _Coerce
gcvvvcY :: Lens' GoogleCloudVisionV1p2beta1Vertex (Maybe Int32)
gcvvvcY
= lens _gcvvvcY (\ s a -> s{_gcvvvcY = a}) .
mapping _Coerce
instance FromJSON GoogleCloudVisionV1p2beta1Vertex
where
parseJSON
= withObject "GoogleCloudVisionV1p2beta1Vertex"
(\ o ->
GoogleCloudVisionV1p2beta1Vertex' <$>
(o .:? "x") <*> (o .:? "y"))
instance ToJSON GoogleCloudVisionV1p2beta1Vertex
where
toJSON GoogleCloudVisionV1p2beta1Vertex'{..}
= object
(catMaybes
[("x" .=) <$> _gcvvvcX, ("y" .=) <$> _gcvvvcY])
newtype GoogleCloudVisionV1p3beta1AsyncAnnotateFileResponse = GoogleCloudVisionV1p3beta1AsyncAnnotateFileResponse'
{ _gooOutputConfig :: Maybe GoogleCloudVisionV1p3beta1OutputConfig
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1AsyncAnnotateFileResponse
:: GoogleCloudVisionV1p3beta1AsyncAnnotateFileResponse
googleCloudVisionV1p3beta1AsyncAnnotateFileResponse =
GoogleCloudVisionV1p3beta1AsyncAnnotateFileResponse'
{ _gooOutputConfig = Nothing
}
gooOutputConfig :: Lens' GoogleCloudVisionV1p3beta1AsyncAnnotateFileResponse (Maybe GoogleCloudVisionV1p3beta1OutputConfig)
gooOutputConfig
= lens _gooOutputConfig
(\ s a -> s{_gooOutputConfig = a})
instance FromJSON
GoogleCloudVisionV1p3beta1AsyncAnnotateFileResponse
where
parseJSON
= withObject
"GoogleCloudVisionV1p3beta1AsyncAnnotateFileResponse"
(\ o ->
GoogleCloudVisionV1p3beta1AsyncAnnotateFileResponse'
<$> (o .:? "outputConfig"))
instance ToJSON
GoogleCloudVisionV1p3beta1AsyncAnnotateFileResponse
where
toJSON
GoogleCloudVisionV1p3beta1AsyncAnnotateFileResponse'{..}
= object
(catMaybes
[("outputConfig" .=) <$> _gooOutputConfig])
data GoogleCloudVisionV1p2beta1TextAnnotationTextProperty = GoogleCloudVisionV1p2beta1TextAnnotationTextProperty'
{ _gDetectedLanguages :: !(Maybe [GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage])
, _gDetectedBreak :: !(Maybe GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1TextAnnotationTextProperty
:: GoogleCloudVisionV1p2beta1TextAnnotationTextProperty
googleCloudVisionV1p2beta1TextAnnotationTextProperty =
GoogleCloudVisionV1p2beta1TextAnnotationTextProperty'
{ _gDetectedLanguages = Nothing
, _gDetectedBreak = Nothing
}
gDetectedLanguages :: Lens' GoogleCloudVisionV1p2beta1TextAnnotationTextProperty [GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage]
gDetectedLanguages
= lens _gDetectedLanguages
(\ s a -> s{_gDetectedLanguages = a})
. _Default
. _Coerce
gDetectedBreak :: Lens' GoogleCloudVisionV1p2beta1TextAnnotationTextProperty (Maybe GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak)
gDetectedBreak
= lens _gDetectedBreak
(\ s a -> s{_gDetectedBreak = a})
instance FromJSON
GoogleCloudVisionV1p2beta1TextAnnotationTextProperty
where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1TextAnnotationTextProperty"
(\ o ->
GoogleCloudVisionV1p2beta1TextAnnotationTextProperty'
<$>
(o .:? "detectedLanguages" .!= mempty) <*>
(o .:? "detectedBreak"))
instance ToJSON
GoogleCloudVisionV1p2beta1TextAnnotationTextProperty
where
toJSON
GoogleCloudVisionV1p2beta1TextAnnotationTextProperty'{..}
= object
(catMaybes
[("detectedLanguages" .=) <$> _gDetectedLanguages,
("detectedBreak" .=) <$> _gDetectedBreak])
data GoogleCloudVisionV1p2beta1BoundingPoly = GoogleCloudVisionV1p2beta1BoundingPoly'
{ _gNormalizedVertices :: !(Maybe [GoogleCloudVisionV1p2beta1NormalizedVertex])
, _gVertices :: !(Maybe [GoogleCloudVisionV1p2beta1Vertex])
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1BoundingPoly
:: GoogleCloudVisionV1p2beta1BoundingPoly
googleCloudVisionV1p2beta1BoundingPoly =
GoogleCloudVisionV1p2beta1BoundingPoly'
{ _gNormalizedVertices = Nothing
, _gVertices = Nothing
}
gNormalizedVertices :: Lens' GoogleCloudVisionV1p2beta1BoundingPoly [GoogleCloudVisionV1p2beta1NormalizedVertex]
gNormalizedVertices
= lens _gNormalizedVertices
(\ s a -> s{_gNormalizedVertices = a})
. _Default
. _Coerce
gVertices :: Lens' GoogleCloudVisionV1p2beta1BoundingPoly [GoogleCloudVisionV1p2beta1Vertex]
gVertices
= lens _gVertices (\ s a -> s{_gVertices = a}) .
_Default
. _Coerce
instance FromJSON
GoogleCloudVisionV1p2beta1BoundingPoly where
parseJSON
= withObject "GoogleCloudVisionV1p2beta1BoundingPoly"
(\ o ->
GoogleCloudVisionV1p2beta1BoundingPoly' <$>
(o .:? "normalizedVertices" .!= mempty) <*>
(o .:? "vertices" .!= mempty))
instance ToJSON
GoogleCloudVisionV1p2beta1BoundingPoly where
toJSON GoogleCloudVisionV1p2beta1BoundingPoly'{..}
= object
(catMaybes
[("normalizedVertices" .=) <$> _gNormalizedVertices,
("vertices" .=) <$> _gVertices])
data GoogleCloudVisionV1p3beta1Position = GoogleCloudVisionV1p3beta1Position'
{ _gcvvpcZ :: !(Maybe (Textual Double))
, _gcvvpcX :: !(Maybe (Textual Double))
, _gcvvpcY :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1Position
:: GoogleCloudVisionV1p3beta1Position
googleCloudVisionV1p3beta1Position =
GoogleCloudVisionV1p3beta1Position'
{ _gcvvpcZ = Nothing
, _gcvvpcX = Nothing
, _gcvvpcY = Nothing
}
gcvvpcZ :: Lens' GoogleCloudVisionV1p3beta1Position (Maybe Double)
gcvvpcZ
= lens _gcvvpcZ (\ s a -> s{_gcvvpcZ = a}) .
mapping _Coerce
gcvvpcX :: Lens' GoogleCloudVisionV1p3beta1Position (Maybe Double)
gcvvpcX
= lens _gcvvpcX (\ s a -> s{_gcvvpcX = a}) .
mapping _Coerce
gcvvpcY :: Lens' GoogleCloudVisionV1p3beta1Position (Maybe Double)
gcvvpcY
= lens _gcvvpcY (\ s a -> s{_gcvvpcY = a}) .
mapping _Coerce
instance FromJSON GoogleCloudVisionV1p3beta1Position
where
parseJSON
= withObject "GoogleCloudVisionV1p3beta1Position"
(\ o ->
GoogleCloudVisionV1p3beta1Position' <$>
(o .:? "z") <*> (o .:? "x") <*> (o .:? "y"))
instance ToJSON GoogleCloudVisionV1p3beta1Position
where
toJSON GoogleCloudVisionV1p3beta1Position'{..}
= object
(catMaybes
[("z" .=) <$> _gcvvpcZ, ("x" .=) <$> _gcvvpcX,
("y" .=) <$> _gcvvpcY])
newtype GoogleCloudVisionV1p1beta1GcsDestination = GoogleCloudVisionV1p1beta1GcsDestination'
{ _gooURI :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1GcsDestination
:: GoogleCloudVisionV1p1beta1GcsDestination
googleCloudVisionV1p1beta1GcsDestination =
GoogleCloudVisionV1p1beta1GcsDestination'
{ _gooURI = Nothing
}
gooURI :: Lens' GoogleCloudVisionV1p1beta1GcsDestination (Maybe Text)
gooURI = lens _gooURI (\ s a -> s{_gooURI = a})
instance FromJSON
GoogleCloudVisionV1p1beta1GcsDestination where
parseJSON
= withObject
"GoogleCloudVisionV1p1beta1GcsDestination"
(\ o ->
GoogleCloudVisionV1p1beta1GcsDestination' <$>
(o .:? "uri"))
instance ToJSON
GoogleCloudVisionV1p1beta1GcsDestination where
toJSON GoogleCloudVisionV1p1beta1GcsDestination'{..}
= object (catMaybes [("uri" .=) <$> _gooURI])
newtype GoogleCloudVisionV1p1beta1LocationInfo = GoogleCloudVisionV1p1beta1LocationInfo'
{ _gLatLng :: Maybe LatLng
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1LocationInfo
:: GoogleCloudVisionV1p1beta1LocationInfo
googleCloudVisionV1p1beta1LocationInfo =
GoogleCloudVisionV1p1beta1LocationInfo'
{ _gLatLng = Nothing
}
gLatLng :: Lens' GoogleCloudVisionV1p1beta1LocationInfo (Maybe LatLng)
gLatLng = lens _gLatLng (\ s a -> s{_gLatLng = a})
instance FromJSON
GoogleCloudVisionV1p1beta1LocationInfo where
parseJSON
= withObject "GoogleCloudVisionV1p1beta1LocationInfo"
(\ o ->
GoogleCloudVisionV1p1beta1LocationInfo' <$>
(o .:? "latLng"))
instance ToJSON
GoogleCloudVisionV1p1beta1LocationInfo where
toJSON GoogleCloudVisionV1p1beta1LocationInfo'{..}
= object (catMaybes [("latLng" .=) <$> _gLatLng])
data GoogleCloudVisionV1p1beta1Product = GoogleCloudVisionV1p1beta1Product'
{ _gcvvp1Name :: !(Maybe Text)
, _gcvvp1DisplayName :: !(Maybe Text)
, _gcvvp1ProductCategory :: !(Maybe Text)
, _gcvvp1ProductLabels :: !(Maybe [GoogleCloudVisionV1p1beta1ProductKeyValue])
, _gcvvp1Description :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1Product
:: GoogleCloudVisionV1p1beta1Product
googleCloudVisionV1p1beta1Product =
GoogleCloudVisionV1p1beta1Product'
{ _gcvvp1Name = Nothing
, _gcvvp1DisplayName = Nothing
, _gcvvp1ProductCategory = Nothing
, _gcvvp1ProductLabels = Nothing
, _gcvvp1Description = Nothing
}
gcvvp1Name :: Lens' GoogleCloudVisionV1p1beta1Product (Maybe Text)
gcvvp1Name
= lens _gcvvp1Name (\ s a -> s{_gcvvp1Name = a})
gcvvp1DisplayName :: Lens' GoogleCloudVisionV1p1beta1Product (Maybe Text)
gcvvp1DisplayName
= lens _gcvvp1DisplayName
(\ s a -> s{_gcvvp1DisplayName = a})
gcvvp1ProductCategory :: Lens' GoogleCloudVisionV1p1beta1Product (Maybe Text)
gcvvp1ProductCategory
= lens _gcvvp1ProductCategory
(\ s a -> s{_gcvvp1ProductCategory = a})
gcvvp1ProductLabels :: Lens' GoogleCloudVisionV1p1beta1Product [GoogleCloudVisionV1p1beta1ProductKeyValue]
gcvvp1ProductLabels
= lens _gcvvp1ProductLabels
(\ s a -> s{_gcvvp1ProductLabels = a})
. _Default
. _Coerce
gcvvp1Description :: Lens' GoogleCloudVisionV1p1beta1Product (Maybe Text)
gcvvp1Description
= lens _gcvvp1Description
(\ s a -> s{_gcvvp1Description = a})
instance FromJSON GoogleCloudVisionV1p1beta1Product
where
parseJSON
= withObject "GoogleCloudVisionV1p1beta1Product"
(\ o ->
GoogleCloudVisionV1p1beta1Product' <$>
(o .:? "name") <*> (o .:? "displayName") <*>
(o .:? "productCategory")
<*> (o .:? "productLabels" .!= mempty)
<*> (o .:? "description"))
instance ToJSON GoogleCloudVisionV1p1beta1Product
where
toJSON GoogleCloudVisionV1p1beta1Product'{..}
= object
(catMaybes
[("name" .=) <$> _gcvvp1Name,
("displayName" .=) <$> _gcvvp1DisplayName,
("productCategory" .=) <$> _gcvvp1ProductCategory,
("productLabels" .=) <$> _gcvvp1ProductLabels,
("description" .=) <$> _gcvvp1Description])
data GoogleCloudVisionV1p3beta1NormalizedVertex = GoogleCloudVisionV1p3beta1NormalizedVertex'
{ _gcvvnvcX :: !(Maybe (Textual Double))
, _gcvvnvcY :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1NormalizedVertex
:: GoogleCloudVisionV1p3beta1NormalizedVertex
googleCloudVisionV1p3beta1NormalizedVertex =
GoogleCloudVisionV1p3beta1NormalizedVertex'
{ _gcvvnvcX = Nothing
, _gcvvnvcY = Nothing
}
gcvvnvcX :: Lens' GoogleCloudVisionV1p3beta1NormalizedVertex (Maybe Double)
gcvvnvcX
= lens _gcvvnvcX (\ s a -> s{_gcvvnvcX = a}) .
mapping _Coerce
gcvvnvcY :: Lens' GoogleCloudVisionV1p3beta1NormalizedVertex (Maybe Double)
gcvvnvcY
= lens _gcvvnvcY (\ s a -> s{_gcvvnvcY = a}) .
mapping _Coerce
instance FromJSON
GoogleCloudVisionV1p3beta1NormalizedVertex where
parseJSON
= withObject
"GoogleCloudVisionV1p3beta1NormalizedVertex"
(\ o ->
GoogleCloudVisionV1p3beta1NormalizedVertex' <$>
(o .:? "x") <*> (o .:? "y"))
instance ToJSON
GoogleCloudVisionV1p3beta1NormalizedVertex where
toJSON
GoogleCloudVisionV1p3beta1NormalizedVertex'{..}
= object
(catMaybes
[("x" .=) <$> _gcvvnvcX, ("y" .=) <$> _gcvvnvcY])
data GoogleCloudVisionV1p2beta1WebDetectionWebImage = GoogleCloudVisionV1p2beta1WebDetectionWebImage'
{ _gcvvwdwicScore :: !(Maybe (Textual Double))
, _gcvvwdwicURL :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1WebDetectionWebImage
:: GoogleCloudVisionV1p2beta1WebDetectionWebImage
googleCloudVisionV1p2beta1WebDetectionWebImage =
GoogleCloudVisionV1p2beta1WebDetectionWebImage'
{ _gcvvwdwicScore = Nothing
, _gcvvwdwicURL = Nothing
}
gcvvwdwicScore :: Lens' GoogleCloudVisionV1p2beta1WebDetectionWebImage (Maybe Double)
gcvvwdwicScore
= lens _gcvvwdwicScore
(\ s a -> s{_gcvvwdwicScore = a})
. mapping _Coerce
gcvvwdwicURL :: Lens' GoogleCloudVisionV1p2beta1WebDetectionWebImage (Maybe Text)
gcvvwdwicURL
= lens _gcvvwdwicURL (\ s a -> s{_gcvvwdwicURL = a})
instance FromJSON
GoogleCloudVisionV1p2beta1WebDetectionWebImage where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1WebDetectionWebImage"
(\ o ->
GoogleCloudVisionV1p2beta1WebDetectionWebImage' <$>
(o .:? "score") <*> (o .:? "url"))
instance ToJSON
GoogleCloudVisionV1p2beta1WebDetectionWebImage where
toJSON
GoogleCloudVisionV1p2beta1WebDetectionWebImage'{..}
= object
(catMaybes
[("score" .=) <$> _gcvvwdwicScore,
("url" .=) <$> _gcvvwdwicURL])
data GoogleCloudVisionV1p1beta1Page = GoogleCloudVisionV1p1beta1Page'
{ _g2Property :: !(Maybe GoogleCloudVisionV1p1beta1TextAnnotationTextProperty)
, _g2Height :: !(Maybe (Textual Int32))
, _g2Blocks :: !(Maybe [GoogleCloudVisionV1p1beta1Block])
, _g2Width :: !(Maybe (Textual Int32))
, _g2Confidence :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1Page
:: GoogleCloudVisionV1p1beta1Page
googleCloudVisionV1p1beta1Page =
GoogleCloudVisionV1p1beta1Page'
{ _g2Property = Nothing
, _g2Height = Nothing
, _g2Blocks = Nothing
, _g2Width = Nothing
, _g2Confidence = Nothing
}
g2Property :: Lens' GoogleCloudVisionV1p1beta1Page (Maybe GoogleCloudVisionV1p1beta1TextAnnotationTextProperty)
g2Property
= lens _g2Property (\ s a -> s{_g2Property = a})
g2Height :: Lens' GoogleCloudVisionV1p1beta1Page (Maybe Int32)
g2Height
= lens _g2Height (\ s a -> s{_g2Height = a}) .
mapping _Coerce
g2Blocks :: Lens' GoogleCloudVisionV1p1beta1Page [GoogleCloudVisionV1p1beta1Block]
g2Blocks
= lens _g2Blocks (\ s a -> s{_g2Blocks = a}) .
_Default
. _Coerce
g2Width :: Lens' GoogleCloudVisionV1p1beta1Page (Maybe Int32)
g2Width
= lens _g2Width (\ s a -> s{_g2Width = a}) .
mapping _Coerce
g2Confidence :: Lens' GoogleCloudVisionV1p1beta1Page (Maybe Double)
g2Confidence
= lens _g2Confidence (\ s a -> s{_g2Confidence = a})
. mapping _Coerce
instance FromJSON GoogleCloudVisionV1p1beta1Page
where
parseJSON
= withObject "GoogleCloudVisionV1p1beta1Page"
(\ o ->
GoogleCloudVisionV1p1beta1Page' <$>
(o .:? "property") <*> (o .:? "height") <*>
(o .:? "blocks" .!= mempty)
<*> (o .:? "width")
<*> (o .:? "confidence"))
instance ToJSON GoogleCloudVisionV1p1beta1Page where
toJSON GoogleCloudVisionV1p1beta1Page'{..}
= object
(catMaybes
[("property" .=) <$> _g2Property,
("height" .=) <$> _g2Height,
("blocks" .=) <$> _g2Blocks,
("width" .=) <$> _g2Width,
("confidence" .=) <$> _g2Confidence])
data GoogleCloudVisionV1p2beta1ProductSearchResultsGroupedResult = GoogleCloudVisionV1p2beta1ProductSearchResultsGroupedResult'
{ _gcvvpsrgrcResults :: !(Maybe [GoogleCloudVisionV1p2beta1ProductSearchResultsResult])
, _gcvvpsrgrcBoundingPoly :: !(Maybe GoogleCloudVisionV1p2beta1BoundingPoly)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1ProductSearchResultsGroupedResult
:: GoogleCloudVisionV1p2beta1ProductSearchResultsGroupedResult
googleCloudVisionV1p2beta1ProductSearchResultsGroupedResult =
GoogleCloudVisionV1p2beta1ProductSearchResultsGroupedResult'
{ _gcvvpsrgrcResults = Nothing
, _gcvvpsrgrcBoundingPoly = Nothing
}
gcvvpsrgrcResults :: Lens' GoogleCloudVisionV1p2beta1ProductSearchResultsGroupedResult [GoogleCloudVisionV1p2beta1ProductSearchResultsResult]
gcvvpsrgrcResults
= lens _gcvvpsrgrcResults
(\ s a -> s{_gcvvpsrgrcResults = a})
. _Default
. _Coerce
gcvvpsrgrcBoundingPoly :: Lens' GoogleCloudVisionV1p2beta1ProductSearchResultsGroupedResult (Maybe GoogleCloudVisionV1p2beta1BoundingPoly)
gcvvpsrgrcBoundingPoly
= lens _gcvvpsrgrcBoundingPoly
(\ s a -> s{_gcvvpsrgrcBoundingPoly = a})
instance FromJSON
GoogleCloudVisionV1p2beta1ProductSearchResultsGroupedResult
where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1ProductSearchResultsGroupedResult"
(\ o ->
GoogleCloudVisionV1p2beta1ProductSearchResultsGroupedResult'
<$>
(o .:? "results" .!= mempty) <*>
(o .:? "boundingPoly"))
instance ToJSON
GoogleCloudVisionV1p2beta1ProductSearchResultsGroupedResult
where
toJSON
GoogleCloudVisionV1p2beta1ProductSearchResultsGroupedResult'{..}
= object
(catMaybes
[("results" .=) <$> _gcvvpsrgrcResults,
("boundingPoly" .=) <$> _gcvvpsrgrcBoundingPoly])
data GoogleCloudVisionV1p3beta1Symbol = GoogleCloudVisionV1p3beta1Symbol'
{ _gcvvscProperty :: !(Maybe GoogleCloudVisionV1p3beta1TextAnnotationTextProperty)
, _gcvvscBoundingBox :: !(Maybe GoogleCloudVisionV1p3beta1BoundingPoly)
, _gcvvscText :: !(Maybe Text)
, _gcvvscConfidence :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1Symbol
:: GoogleCloudVisionV1p3beta1Symbol
googleCloudVisionV1p3beta1Symbol =
GoogleCloudVisionV1p3beta1Symbol'
{ _gcvvscProperty = Nothing
, _gcvvscBoundingBox = Nothing
, _gcvvscText = Nothing
, _gcvvscConfidence = Nothing
}
gcvvscProperty :: Lens' GoogleCloudVisionV1p3beta1Symbol (Maybe GoogleCloudVisionV1p3beta1TextAnnotationTextProperty)
gcvvscProperty
= lens _gcvvscProperty
(\ s a -> s{_gcvvscProperty = a})
gcvvscBoundingBox :: Lens' GoogleCloudVisionV1p3beta1Symbol (Maybe GoogleCloudVisionV1p3beta1BoundingPoly)
gcvvscBoundingBox
= lens _gcvvscBoundingBox
(\ s a -> s{_gcvvscBoundingBox = a})
gcvvscText :: Lens' GoogleCloudVisionV1p3beta1Symbol (Maybe Text)
gcvvscText
= lens _gcvvscText (\ s a -> s{_gcvvscText = a})
gcvvscConfidence :: Lens' GoogleCloudVisionV1p3beta1Symbol (Maybe Double)
gcvvscConfidence
= lens _gcvvscConfidence
(\ s a -> s{_gcvvscConfidence = a})
. mapping _Coerce
instance FromJSON GoogleCloudVisionV1p3beta1Symbol
where
parseJSON
= withObject "GoogleCloudVisionV1p3beta1Symbol"
(\ o ->
GoogleCloudVisionV1p3beta1Symbol' <$>
(o .:? "property") <*> (o .:? "boundingBox") <*>
(o .:? "text")
<*> (o .:? "confidence"))
instance ToJSON GoogleCloudVisionV1p3beta1Symbol
where
toJSON GoogleCloudVisionV1p3beta1Symbol'{..}
= object
(catMaybes
[("property" .=) <$> _gcvvscProperty,
("boundingBox" .=) <$> _gcvvscBoundingBox,
("text" .=) <$> _gcvvscText,
("confidence" .=) <$> _gcvvscConfidence])
data CropHint = CropHint'
{ _chBoundingPoly :: !(Maybe BoundingPoly)
, _chConfidence :: !(Maybe (Textual Double))
, _chImportanceFraction :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
cropHint
:: CropHint
cropHint =
CropHint'
{ _chBoundingPoly = Nothing
, _chConfidence = Nothing
, _chImportanceFraction = Nothing
}
chBoundingPoly :: Lens' CropHint (Maybe BoundingPoly)
chBoundingPoly
= lens _chBoundingPoly
(\ s a -> s{_chBoundingPoly = a})
chConfidence :: Lens' CropHint (Maybe Double)
chConfidence
= lens _chConfidence (\ s a -> s{_chConfidence = a})
. mapping _Coerce
chImportanceFraction :: Lens' CropHint (Maybe Double)
chImportanceFraction
= lens _chImportanceFraction
(\ s a -> s{_chImportanceFraction = a})
. mapping _Coerce
instance FromJSON CropHint where
parseJSON
= withObject "CropHint"
(\ o ->
CropHint' <$>
(o .:? "boundingPoly") <*> (o .:? "confidence") <*>
(o .:? "importanceFraction"))
instance ToJSON CropHint where
toJSON CropHint'{..}
= object
(catMaybes
[("boundingPoly" .=) <$> _chBoundingPoly,
("confidence" .=) <$> _chConfidence,
("importanceFraction" .=) <$> _chImportanceFraction])
data GoogleCloudVisionV1p2beta1Image = GoogleCloudVisionV1p2beta1Image'
{ _gcvviContent :: !(Maybe Bytes)
, _gcvviSource :: !(Maybe GoogleCloudVisionV1p2beta1ImageSource)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1Image
:: GoogleCloudVisionV1p2beta1Image
googleCloudVisionV1p2beta1Image =
GoogleCloudVisionV1p2beta1Image'
{ _gcvviContent = Nothing
, _gcvviSource = Nothing
}
gcvviContent :: Lens' GoogleCloudVisionV1p2beta1Image (Maybe ByteString)
gcvviContent
= lens _gcvviContent (\ s a -> s{_gcvviContent = a})
. mapping _Bytes
gcvviSource :: Lens' GoogleCloudVisionV1p2beta1Image (Maybe GoogleCloudVisionV1p2beta1ImageSource)
gcvviSource
= lens _gcvviSource (\ s a -> s{_gcvviSource = a})
instance FromJSON GoogleCloudVisionV1p2beta1Image
where
parseJSON
= withObject "GoogleCloudVisionV1p2beta1Image"
(\ o ->
GoogleCloudVisionV1p2beta1Image' <$>
(o .:? "content") <*> (o .:? "source"))
instance ToJSON GoogleCloudVisionV1p2beta1Image where
toJSON GoogleCloudVisionV1p2beta1Image'{..}
= object
(catMaybes
[("content" .=) <$> _gcvviContent,
("source" .=) <$> _gcvviSource])
data GoogleCloudVisionV1p1beta1InputConfig = GoogleCloudVisionV1p1beta1InputConfig'
{ _gGcsSource :: !(Maybe GoogleCloudVisionV1p1beta1GcsSource)
, _gMimeType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1InputConfig
:: GoogleCloudVisionV1p1beta1InputConfig
googleCloudVisionV1p1beta1InputConfig =
GoogleCloudVisionV1p1beta1InputConfig'
{ _gGcsSource = Nothing
, _gMimeType = Nothing
}
gGcsSource :: Lens' GoogleCloudVisionV1p1beta1InputConfig (Maybe GoogleCloudVisionV1p1beta1GcsSource)
gGcsSource
= lens _gGcsSource (\ s a -> s{_gGcsSource = a})
gMimeType :: Lens' GoogleCloudVisionV1p1beta1InputConfig (Maybe Text)
gMimeType
= lens _gMimeType (\ s a -> s{_gMimeType = a})
instance FromJSON
GoogleCloudVisionV1p1beta1InputConfig where
parseJSON
= withObject "GoogleCloudVisionV1p1beta1InputConfig"
(\ o ->
GoogleCloudVisionV1p1beta1InputConfig' <$>
(o .:? "gcsSource") <*> (o .:? "mimeType"))
instance ToJSON GoogleCloudVisionV1p1beta1InputConfig
where
toJSON GoogleCloudVisionV1p1beta1InputConfig'{..}
= object
(catMaybes
[("gcsSource" .=) <$> _gGcsSource,
("mimeType" .=) <$> _gMimeType])
data GoogleCloudVisionV1p2beta1ImageAnnotationContext = GoogleCloudVisionV1p2beta1ImageAnnotationContext'
{ _gcvviaccURI :: !(Maybe Text)
, _gcvviaccPageNumber :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1ImageAnnotationContext
:: GoogleCloudVisionV1p2beta1ImageAnnotationContext
googleCloudVisionV1p2beta1ImageAnnotationContext =
GoogleCloudVisionV1p2beta1ImageAnnotationContext'
{ _gcvviaccURI = Nothing
, _gcvviaccPageNumber = Nothing
}
gcvviaccURI :: Lens' GoogleCloudVisionV1p2beta1ImageAnnotationContext (Maybe Text)
gcvviaccURI
= lens _gcvviaccURI (\ s a -> s{_gcvviaccURI = a})
gcvviaccPageNumber :: Lens' GoogleCloudVisionV1p2beta1ImageAnnotationContext (Maybe Int32)
gcvviaccPageNumber
= lens _gcvviaccPageNumber
(\ s a -> s{_gcvviaccPageNumber = a})
. mapping _Coerce
instance FromJSON
GoogleCloudVisionV1p2beta1ImageAnnotationContext
where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1ImageAnnotationContext"
(\ o ->
GoogleCloudVisionV1p2beta1ImageAnnotationContext' <$>
(o .:? "uri") <*> (o .:? "pageNumber"))
instance ToJSON
GoogleCloudVisionV1p2beta1ImageAnnotationContext
where
toJSON
GoogleCloudVisionV1p2beta1ImageAnnotationContext'{..}
= object
(catMaybes
[("uri" .=) <$> _gcvviaccURI,
("pageNumber" .=) <$> _gcvviaccPageNumber])
data GoogleCloudVisionV1p2beta1ProductSearchResults = GoogleCloudVisionV1p2beta1ProductSearchResults'
{ _gcvvpsrsProductGroupedResults :: !(Maybe [GoogleCloudVisionV1p2beta1ProductSearchResultsGroupedResult])
, _gcvvpsrsResults :: !(Maybe [GoogleCloudVisionV1p2beta1ProductSearchResultsResult])
, _gcvvpsrsIndexTime :: !(Maybe DateTime')
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1ProductSearchResults
:: GoogleCloudVisionV1p2beta1ProductSearchResults
googleCloudVisionV1p2beta1ProductSearchResults =
GoogleCloudVisionV1p2beta1ProductSearchResults'
{ _gcvvpsrsProductGroupedResults = Nothing
, _gcvvpsrsResults = Nothing
, _gcvvpsrsIndexTime = Nothing
}
gcvvpsrsProductGroupedResults :: Lens' GoogleCloudVisionV1p2beta1ProductSearchResults [GoogleCloudVisionV1p2beta1ProductSearchResultsGroupedResult]
gcvvpsrsProductGroupedResults
= lens _gcvvpsrsProductGroupedResults
(\ s a -> s{_gcvvpsrsProductGroupedResults = a})
. _Default
. _Coerce
gcvvpsrsResults :: Lens' GoogleCloudVisionV1p2beta1ProductSearchResults [GoogleCloudVisionV1p2beta1ProductSearchResultsResult]
gcvvpsrsResults
= lens _gcvvpsrsResults
(\ s a -> s{_gcvvpsrsResults = a})
. _Default
. _Coerce
gcvvpsrsIndexTime :: Lens' GoogleCloudVisionV1p2beta1ProductSearchResults (Maybe UTCTime)
gcvvpsrsIndexTime
= lens _gcvvpsrsIndexTime
(\ s a -> s{_gcvvpsrsIndexTime = a})
. mapping _DateTime
instance FromJSON
GoogleCloudVisionV1p2beta1ProductSearchResults where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1ProductSearchResults"
(\ o ->
GoogleCloudVisionV1p2beta1ProductSearchResults' <$>
(o .:? "productGroupedResults" .!= mempty) <*>
(o .:? "results" .!= mempty)
<*> (o .:? "indexTime"))
instance ToJSON
GoogleCloudVisionV1p2beta1ProductSearchResults where
toJSON
GoogleCloudVisionV1p2beta1ProductSearchResults'{..}
= object
(catMaybes
[("productGroupedResults" .=) <$>
_gcvvpsrsProductGroupedResults,
("results" .=) <$> _gcvvpsrsResults,
("indexTime" .=) <$> _gcvvpsrsIndexTime])
data GoogleCloudVisionV1p2beta1Property = GoogleCloudVisionV1p2beta1Property'
{ _goooUint64Value :: !(Maybe (Textual Word64))
, _goooValue :: !(Maybe Text)
, _goooName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1Property
:: GoogleCloudVisionV1p2beta1Property
googleCloudVisionV1p2beta1Property =
GoogleCloudVisionV1p2beta1Property'
{ _goooUint64Value = Nothing
, _goooValue = Nothing
, _goooName = Nothing
}
goooUint64Value :: Lens' GoogleCloudVisionV1p2beta1Property (Maybe Word64)
goooUint64Value
= lens _goooUint64Value
(\ s a -> s{_goooUint64Value = a})
. mapping _Coerce
goooValue :: Lens' GoogleCloudVisionV1p2beta1Property (Maybe Text)
goooValue
= lens _goooValue (\ s a -> s{_goooValue = a})
goooName :: Lens' GoogleCloudVisionV1p2beta1Property (Maybe Text)
goooName = lens _goooName (\ s a -> s{_goooName = a})
instance FromJSON GoogleCloudVisionV1p2beta1Property
where
parseJSON
= withObject "GoogleCloudVisionV1p2beta1Property"
(\ o ->
GoogleCloudVisionV1p2beta1Property' <$>
(o .:? "uint64Value") <*> (o .:? "value") <*>
(o .:? "name"))
instance ToJSON GoogleCloudVisionV1p2beta1Property
where
toJSON GoogleCloudVisionV1p2beta1Property'{..}
= object
(catMaybes
[("uint64Value" .=) <$> _goooUint64Value,
("value" .=) <$> _goooValue,
("name" .=) <$> _goooName])
data GoogleCloudVisionV1p3beta1FaceAnnotation = GoogleCloudVisionV1p3beta1FaceAnnotation'
{ _gcvvfacTiltAngle :: !(Maybe (Textual Double))
, _gcvvfacBlurredLikelihood :: !(Maybe GoogleCloudVisionV1p3beta1FaceAnnotationBlurredLikelihood)
, _gcvvfacBoundingPoly :: !(Maybe GoogleCloudVisionV1p3beta1BoundingPoly)
, _gcvvfacSurpriseLikelihood :: !(Maybe GoogleCloudVisionV1p3beta1FaceAnnotationSurpriseLikelihood)
, _gcvvfacLandmarkingConfidence :: !(Maybe (Textual Double))
, _gcvvfacPanAngle :: !(Maybe (Textual Double))
, _gcvvfacRollAngle :: !(Maybe (Textual Double))
, _gcvvfacUnderExposedLikelihood :: !(Maybe GoogleCloudVisionV1p3beta1FaceAnnotationUnderExposedLikelihood)
, _gcvvfacFdBoundingPoly :: !(Maybe GoogleCloudVisionV1p3beta1BoundingPoly)
, _gcvvfacAngerLikelihood :: !(Maybe GoogleCloudVisionV1p3beta1FaceAnnotationAngerLikelihood)
, _gcvvfacDetectionConfidence :: !(Maybe (Textual Double))
, _gcvvfacHeadwearLikelihood :: !(Maybe GoogleCloudVisionV1p3beta1FaceAnnotationHeadwearLikelihood)
, _gcvvfacSorrowLikelihood :: !(Maybe GoogleCloudVisionV1p3beta1FaceAnnotationSorrowLikelihood)
, _gcvvfacJoyLikelihood :: !(Maybe GoogleCloudVisionV1p3beta1FaceAnnotationJoyLikelihood)
, _gcvvfacLandmarks :: !(Maybe [GoogleCloudVisionV1p3beta1FaceAnnotationLandmark])
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1FaceAnnotation
:: GoogleCloudVisionV1p3beta1FaceAnnotation
googleCloudVisionV1p3beta1FaceAnnotation =
GoogleCloudVisionV1p3beta1FaceAnnotation'
{ _gcvvfacTiltAngle = Nothing
, _gcvvfacBlurredLikelihood = Nothing
, _gcvvfacBoundingPoly = Nothing
, _gcvvfacSurpriseLikelihood = Nothing
, _gcvvfacLandmarkingConfidence = Nothing
, _gcvvfacPanAngle = Nothing
, _gcvvfacRollAngle = Nothing
, _gcvvfacUnderExposedLikelihood = Nothing
, _gcvvfacFdBoundingPoly = Nothing
, _gcvvfacAngerLikelihood = Nothing
, _gcvvfacDetectionConfidence = Nothing
, _gcvvfacHeadwearLikelihood = Nothing
, _gcvvfacSorrowLikelihood = Nothing
, _gcvvfacJoyLikelihood = Nothing
, _gcvvfacLandmarks = Nothing
}
gcvvfacTiltAngle :: Lens' GoogleCloudVisionV1p3beta1FaceAnnotation (Maybe Double)
gcvvfacTiltAngle
= lens _gcvvfacTiltAngle
(\ s a -> s{_gcvvfacTiltAngle = a})
. mapping _Coerce
gcvvfacBlurredLikelihood :: Lens' GoogleCloudVisionV1p3beta1FaceAnnotation (Maybe GoogleCloudVisionV1p3beta1FaceAnnotationBlurredLikelihood)
gcvvfacBlurredLikelihood
= lens _gcvvfacBlurredLikelihood
(\ s a -> s{_gcvvfacBlurredLikelihood = a})
gcvvfacBoundingPoly :: Lens' GoogleCloudVisionV1p3beta1FaceAnnotation (Maybe GoogleCloudVisionV1p3beta1BoundingPoly)
gcvvfacBoundingPoly
= lens _gcvvfacBoundingPoly
(\ s a -> s{_gcvvfacBoundingPoly = a})
gcvvfacSurpriseLikelihood :: Lens' GoogleCloudVisionV1p3beta1FaceAnnotation (Maybe GoogleCloudVisionV1p3beta1FaceAnnotationSurpriseLikelihood)
gcvvfacSurpriseLikelihood
= lens _gcvvfacSurpriseLikelihood
(\ s a -> s{_gcvvfacSurpriseLikelihood = a})
gcvvfacLandmarkingConfidence :: Lens' GoogleCloudVisionV1p3beta1FaceAnnotation (Maybe Double)
gcvvfacLandmarkingConfidence
= lens _gcvvfacLandmarkingConfidence
(\ s a -> s{_gcvvfacLandmarkingConfidence = a})
. mapping _Coerce
gcvvfacPanAngle :: Lens' GoogleCloudVisionV1p3beta1FaceAnnotation (Maybe Double)
gcvvfacPanAngle
= lens _gcvvfacPanAngle
(\ s a -> s{_gcvvfacPanAngle = a})
. mapping _Coerce
gcvvfacRollAngle :: Lens' GoogleCloudVisionV1p3beta1FaceAnnotation (Maybe Double)
gcvvfacRollAngle
= lens _gcvvfacRollAngle
(\ s a -> s{_gcvvfacRollAngle = a})
. mapping _Coerce
gcvvfacUnderExposedLikelihood :: Lens' GoogleCloudVisionV1p3beta1FaceAnnotation (Maybe GoogleCloudVisionV1p3beta1FaceAnnotationUnderExposedLikelihood)
gcvvfacUnderExposedLikelihood
= lens _gcvvfacUnderExposedLikelihood
(\ s a -> s{_gcvvfacUnderExposedLikelihood = a})
gcvvfacFdBoundingPoly :: Lens' GoogleCloudVisionV1p3beta1FaceAnnotation (Maybe GoogleCloudVisionV1p3beta1BoundingPoly)
gcvvfacFdBoundingPoly
= lens _gcvvfacFdBoundingPoly
(\ s a -> s{_gcvvfacFdBoundingPoly = a})
gcvvfacAngerLikelihood :: Lens' GoogleCloudVisionV1p3beta1FaceAnnotation (Maybe GoogleCloudVisionV1p3beta1FaceAnnotationAngerLikelihood)
gcvvfacAngerLikelihood
= lens _gcvvfacAngerLikelihood
(\ s a -> s{_gcvvfacAngerLikelihood = a})
gcvvfacDetectionConfidence :: Lens' GoogleCloudVisionV1p3beta1FaceAnnotation (Maybe Double)
gcvvfacDetectionConfidence
= lens _gcvvfacDetectionConfidence
(\ s a -> s{_gcvvfacDetectionConfidence = a})
. mapping _Coerce
gcvvfacHeadwearLikelihood :: Lens' GoogleCloudVisionV1p3beta1FaceAnnotation (Maybe GoogleCloudVisionV1p3beta1FaceAnnotationHeadwearLikelihood)
gcvvfacHeadwearLikelihood
= lens _gcvvfacHeadwearLikelihood
(\ s a -> s{_gcvvfacHeadwearLikelihood = a})
gcvvfacSorrowLikelihood :: Lens' GoogleCloudVisionV1p3beta1FaceAnnotation (Maybe GoogleCloudVisionV1p3beta1FaceAnnotationSorrowLikelihood)
gcvvfacSorrowLikelihood
= lens _gcvvfacSorrowLikelihood
(\ s a -> s{_gcvvfacSorrowLikelihood = a})
gcvvfacJoyLikelihood :: Lens' GoogleCloudVisionV1p3beta1FaceAnnotation (Maybe GoogleCloudVisionV1p3beta1FaceAnnotationJoyLikelihood)
gcvvfacJoyLikelihood
= lens _gcvvfacJoyLikelihood
(\ s a -> s{_gcvvfacJoyLikelihood = a})
gcvvfacLandmarks :: Lens' GoogleCloudVisionV1p3beta1FaceAnnotation [GoogleCloudVisionV1p3beta1FaceAnnotationLandmark]
gcvvfacLandmarks
= lens _gcvvfacLandmarks
(\ s a -> s{_gcvvfacLandmarks = a})
. _Default
. _Coerce
instance FromJSON
GoogleCloudVisionV1p3beta1FaceAnnotation where
parseJSON
= withObject
"GoogleCloudVisionV1p3beta1FaceAnnotation"
(\ o ->
GoogleCloudVisionV1p3beta1FaceAnnotation' <$>
(o .:? "tiltAngle") <*> (o .:? "blurredLikelihood")
<*> (o .:? "boundingPoly")
<*> (o .:? "surpriseLikelihood")
<*> (o .:? "landmarkingConfidence")
<*> (o .:? "panAngle")
<*> (o .:? "rollAngle")
<*> (o .:? "underExposedLikelihood")
<*> (o .:? "fdBoundingPoly")
<*> (o .:? "angerLikelihood")
<*> (o .:? "detectionConfidence")
<*> (o .:? "headwearLikelihood")
<*> (o .:? "sorrowLikelihood")
<*> (o .:? "joyLikelihood")
<*> (o .:? "landmarks" .!= mempty))
instance ToJSON
GoogleCloudVisionV1p3beta1FaceAnnotation where
toJSON GoogleCloudVisionV1p3beta1FaceAnnotation'{..}
= object
(catMaybes
[("tiltAngle" .=) <$> _gcvvfacTiltAngle,
("blurredLikelihood" .=) <$>
_gcvvfacBlurredLikelihood,
("boundingPoly" .=) <$> _gcvvfacBoundingPoly,
("surpriseLikelihood" .=) <$>
_gcvvfacSurpriseLikelihood,
("landmarkingConfidence" .=) <$>
_gcvvfacLandmarkingConfidence,
("panAngle" .=) <$> _gcvvfacPanAngle,
("rollAngle" .=) <$> _gcvvfacRollAngle,
("underExposedLikelihood" .=) <$>
_gcvvfacUnderExposedLikelihood,
("fdBoundingPoly" .=) <$> _gcvvfacFdBoundingPoly,
("angerLikelihood" .=) <$> _gcvvfacAngerLikelihood,
("detectionConfidence" .=) <$>
_gcvvfacDetectionConfidence,
("headwearLikelihood" .=) <$>
_gcvvfacHeadwearLikelihood,
("sorrowLikelihood" .=) <$> _gcvvfacSorrowLikelihood,
("joyLikelihood" .=) <$> _gcvvfacJoyLikelihood,
("landmarks" .=) <$> _gcvvfacLandmarks])
data GoogleCloudVisionV1p3beta1TextAnnotationDetectedLanguage = GoogleCloudVisionV1p3beta1TextAnnotationDetectedLanguage'
{ _gcvvtadlcLanguageCode :: !(Maybe Text)
, _gcvvtadlcConfidence :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1TextAnnotationDetectedLanguage
:: GoogleCloudVisionV1p3beta1TextAnnotationDetectedLanguage
googleCloudVisionV1p3beta1TextAnnotationDetectedLanguage =
GoogleCloudVisionV1p3beta1TextAnnotationDetectedLanguage'
{ _gcvvtadlcLanguageCode = Nothing
, _gcvvtadlcConfidence = Nothing
}
gcvvtadlcLanguageCode :: Lens' GoogleCloudVisionV1p3beta1TextAnnotationDetectedLanguage (Maybe Text)
gcvvtadlcLanguageCode
= lens _gcvvtadlcLanguageCode
(\ s a -> s{_gcvvtadlcLanguageCode = a})
gcvvtadlcConfidence :: Lens' GoogleCloudVisionV1p3beta1TextAnnotationDetectedLanguage (Maybe Double)
gcvvtadlcConfidence
= lens _gcvvtadlcConfidence
(\ s a -> s{_gcvvtadlcConfidence = a})
. mapping _Coerce
instance FromJSON
GoogleCloudVisionV1p3beta1TextAnnotationDetectedLanguage
where
parseJSON
= withObject
"GoogleCloudVisionV1p3beta1TextAnnotationDetectedLanguage"
(\ o ->
GoogleCloudVisionV1p3beta1TextAnnotationDetectedLanguage'
<$> (o .:? "languageCode") <*> (o .:? "confidence"))
instance ToJSON
GoogleCloudVisionV1p3beta1TextAnnotationDetectedLanguage
where
toJSON
GoogleCloudVisionV1p3beta1TextAnnotationDetectedLanguage'{..}
= object
(catMaybes
[("languageCode" .=) <$> _gcvvtadlcLanguageCode,
("confidence" .=) <$> _gcvvtadlcConfidence])
data GoogleCloudVisionV1p1beta1WebDetectionWebPage = GoogleCloudVisionV1p1beta1WebDetectionWebPage'
{ _gcvvwdwpcScore :: !(Maybe (Textual Double))
, _gcvvwdwpcURL :: !(Maybe Text)
, _gcvvwdwpcPageTitle :: !(Maybe Text)
, _gcvvwdwpcPartialMatchingImages :: !(Maybe [GoogleCloudVisionV1p1beta1WebDetectionWebImage])
, _gcvvwdwpcFullMatchingImages :: !(Maybe [GoogleCloudVisionV1p1beta1WebDetectionWebImage])
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1WebDetectionWebPage
:: GoogleCloudVisionV1p1beta1WebDetectionWebPage
googleCloudVisionV1p1beta1WebDetectionWebPage =
GoogleCloudVisionV1p1beta1WebDetectionWebPage'
{ _gcvvwdwpcScore = Nothing
, _gcvvwdwpcURL = Nothing
, _gcvvwdwpcPageTitle = Nothing
, _gcvvwdwpcPartialMatchingImages = Nothing
, _gcvvwdwpcFullMatchingImages = Nothing
}
gcvvwdwpcScore :: Lens' GoogleCloudVisionV1p1beta1WebDetectionWebPage (Maybe Double)
gcvvwdwpcScore
= lens _gcvvwdwpcScore
(\ s a -> s{_gcvvwdwpcScore = a})
. mapping _Coerce
gcvvwdwpcURL :: Lens' GoogleCloudVisionV1p1beta1WebDetectionWebPage (Maybe Text)
gcvvwdwpcURL
= lens _gcvvwdwpcURL (\ s a -> s{_gcvvwdwpcURL = a})
gcvvwdwpcPageTitle :: Lens' GoogleCloudVisionV1p1beta1WebDetectionWebPage (Maybe Text)
gcvvwdwpcPageTitle
= lens _gcvvwdwpcPageTitle
(\ s a -> s{_gcvvwdwpcPageTitle = a})
gcvvwdwpcPartialMatchingImages :: Lens' GoogleCloudVisionV1p1beta1WebDetectionWebPage [GoogleCloudVisionV1p1beta1WebDetectionWebImage]
gcvvwdwpcPartialMatchingImages
= lens _gcvvwdwpcPartialMatchingImages
(\ s a -> s{_gcvvwdwpcPartialMatchingImages = a})
. _Default
. _Coerce
gcvvwdwpcFullMatchingImages :: Lens' GoogleCloudVisionV1p1beta1WebDetectionWebPage [GoogleCloudVisionV1p1beta1WebDetectionWebImage]
gcvvwdwpcFullMatchingImages
= lens _gcvvwdwpcFullMatchingImages
(\ s a -> s{_gcvvwdwpcFullMatchingImages = a})
. _Default
. _Coerce
instance FromJSON
GoogleCloudVisionV1p1beta1WebDetectionWebPage where
parseJSON
= withObject
"GoogleCloudVisionV1p1beta1WebDetectionWebPage"
(\ o ->
GoogleCloudVisionV1p1beta1WebDetectionWebPage' <$>
(o .:? "score") <*> (o .:? "url") <*>
(o .:? "pageTitle")
<*> (o .:? "partialMatchingImages" .!= mempty)
<*> (o .:? "fullMatchingImages" .!= mempty))
instance ToJSON
GoogleCloudVisionV1p1beta1WebDetectionWebPage where
toJSON
GoogleCloudVisionV1p1beta1WebDetectionWebPage'{..}
= object
(catMaybes
[("score" .=) <$> _gcvvwdwpcScore,
("url" .=) <$> _gcvvwdwpcURL,
("pageTitle" .=) <$> _gcvvwdwpcPageTitle,
("partialMatchingImages" .=) <$>
_gcvvwdwpcPartialMatchingImages,
("fullMatchingImages" .=) <$>
_gcvvwdwpcFullMatchingImages])
data OutputConfig = OutputConfig'
{ _ocGcsDestination :: !(Maybe GcsDestination)
, _ocBatchSize :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
outputConfig
:: OutputConfig
outputConfig =
OutputConfig'
{ _ocGcsDestination = Nothing
, _ocBatchSize = Nothing
}
ocGcsDestination :: Lens' OutputConfig (Maybe GcsDestination)
ocGcsDestination
= lens _ocGcsDestination
(\ s a -> s{_ocGcsDestination = a})
ocBatchSize :: Lens' OutputConfig (Maybe Int32)
ocBatchSize
= lens _ocBatchSize (\ s a -> s{_ocBatchSize = a}) .
mapping _Coerce
instance FromJSON OutputConfig where
parseJSON
= withObject "OutputConfig"
(\ o ->
OutputConfig' <$>
(o .:? "gcsDestination") <*> (o .:? "batchSize"))
instance ToJSON OutputConfig where
toJSON OutputConfig'{..}
= object
(catMaybes
[("gcsDestination" .=) <$> _ocGcsDestination,
("batchSize" .=) <$> _ocBatchSize])
data GoogleCloudVisionV1p3beta1TextAnnotationDetectedBreak = GoogleCloudVisionV1p3beta1TextAnnotationDetectedBreak'
{ _gooIsPrefix :: !(Maybe Bool)
, _gooType :: !(Maybe GoogleCloudVisionV1p3beta1TextAnnotationDetectedBreakType)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1TextAnnotationDetectedBreak
:: GoogleCloudVisionV1p3beta1TextAnnotationDetectedBreak
googleCloudVisionV1p3beta1TextAnnotationDetectedBreak =
GoogleCloudVisionV1p3beta1TextAnnotationDetectedBreak'
{ _gooIsPrefix = Nothing
, _gooType = Nothing
}
gooIsPrefix :: Lens' GoogleCloudVisionV1p3beta1TextAnnotationDetectedBreak (Maybe Bool)
gooIsPrefix
= lens _gooIsPrefix (\ s a -> s{_gooIsPrefix = a})
gooType :: Lens' GoogleCloudVisionV1p3beta1TextAnnotationDetectedBreak (Maybe GoogleCloudVisionV1p3beta1TextAnnotationDetectedBreakType)
gooType = lens _gooType (\ s a -> s{_gooType = a})
instance FromJSON
GoogleCloudVisionV1p3beta1TextAnnotationDetectedBreak
where
parseJSON
= withObject
"GoogleCloudVisionV1p3beta1TextAnnotationDetectedBreak"
(\ o ->
GoogleCloudVisionV1p3beta1TextAnnotationDetectedBreak'
<$> (o .:? "isPrefix") <*> (o .:? "type"))
instance ToJSON
GoogleCloudVisionV1p3beta1TextAnnotationDetectedBreak
where
toJSON
GoogleCloudVisionV1p3beta1TextAnnotationDetectedBreak'{..}
= object
(catMaybes
[("isPrefix" .=) <$> _gooIsPrefix,
("type" .=) <$> _gooType])
data GoogleCloudVisionV1p2beta1TextAnnotation = GoogleCloudVisionV1p2beta1TextAnnotation'
{ _gText :: !(Maybe Text)
, _gPages :: !(Maybe [GoogleCloudVisionV1p2beta1Page])
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1TextAnnotation
:: GoogleCloudVisionV1p2beta1TextAnnotation
googleCloudVisionV1p2beta1TextAnnotation =
GoogleCloudVisionV1p2beta1TextAnnotation'
{ _gText = Nothing
, _gPages = Nothing
}
gText :: Lens' GoogleCloudVisionV1p2beta1TextAnnotation (Maybe Text)
gText = lens _gText (\ s a -> s{_gText = a})
gPages :: Lens' GoogleCloudVisionV1p2beta1TextAnnotation [GoogleCloudVisionV1p2beta1Page]
gPages
= lens _gPages (\ s a -> s{_gPages = a}) . _Default .
_Coerce
instance FromJSON
GoogleCloudVisionV1p2beta1TextAnnotation where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1TextAnnotation"
(\ o ->
GoogleCloudVisionV1p2beta1TextAnnotation' <$>
(o .:? "text") <*> (o .:? "pages" .!= mempty))
instance ToJSON
GoogleCloudVisionV1p2beta1TextAnnotation where
toJSON GoogleCloudVisionV1p2beta1TextAnnotation'{..}
= object
(catMaybes
[("text" .=) <$> _gText, ("pages" .=) <$> _gPages])
data SafeSearchAnnotation = SafeSearchAnnotation'
{ _ssaSpoof :: !(Maybe SafeSearchAnnotationSpoof)
, _ssaRacy :: !(Maybe SafeSearchAnnotationRacy)
, _ssaAdult :: !(Maybe SafeSearchAnnotationAdult)
, _ssaMedical :: !(Maybe SafeSearchAnnotationMedical)
, _ssaViolence :: !(Maybe SafeSearchAnnotationViolence)
} deriving (Eq,Show,Data,Typeable,Generic)
safeSearchAnnotation
:: SafeSearchAnnotation
safeSearchAnnotation =
SafeSearchAnnotation'
{ _ssaSpoof = Nothing
, _ssaRacy = Nothing
, _ssaAdult = Nothing
, _ssaMedical = Nothing
, _ssaViolence = Nothing
}
ssaSpoof :: Lens' SafeSearchAnnotation (Maybe SafeSearchAnnotationSpoof)
ssaSpoof = lens _ssaSpoof (\ s a -> s{_ssaSpoof = a})
ssaRacy :: Lens' SafeSearchAnnotation (Maybe SafeSearchAnnotationRacy)
ssaRacy = lens _ssaRacy (\ s a -> s{_ssaRacy = a})
ssaAdult :: Lens' SafeSearchAnnotation (Maybe SafeSearchAnnotationAdult)
ssaAdult = lens _ssaAdult (\ s a -> s{_ssaAdult = a})
ssaMedical :: Lens' SafeSearchAnnotation (Maybe SafeSearchAnnotationMedical)
ssaMedical
= lens _ssaMedical (\ s a -> s{_ssaMedical = a})
ssaViolence :: Lens' SafeSearchAnnotation (Maybe SafeSearchAnnotationViolence)
ssaViolence
= lens _ssaViolence (\ s a -> s{_ssaViolence = a})
instance FromJSON SafeSearchAnnotation where
parseJSON
= withObject "SafeSearchAnnotation"
(\ o ->
SafeSearchAnnotation' <$>
(o .:? "spoof") <*> (o .:? "racy") <*>
(o .:? "adult")
<*> (o .:? "medical")
<*> (o .:? "violence"))
instance ToJSON SafeSearchAnnotation where
toJSON SafeSearchAnnotation'{..}
= object
(catMaybes
[("spoof" .=) <$> _ssaSpoof,
("racy" .=) <$> _ssaRacy, ("adult" .=) <$> _ssaAdult,
("medical" .=) <$> _ssaMedical,
("violence" .=) <$> _ssaViolence])
data GoogleCloudVisionV1p1beta1WebDetectionWebLabel = GoogleCloudVisionV1p1beta1WebDetectionWebLabel'
{ _gcvvwdwlcLanguageCode :: !(Maybe Text)
, _gcvvwdwlcLabel :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1WebDetectionWebLabel
:: GoogleCloudVisionV1p1beta1WebDetectionWebLabel
googleCloudVisionV1p1beta1WebDetectionWebLabel =
GoogleCloudVisionV1p1beta1WebDetectionWebLabel'
{ _gcvvwdwlcLanguageCode = Nothing
, _gcvvwdwlcLabel = Nothing
}
gcvvwdwlcLanguageCode :: Lens' GoogleCloudVisionV1p1beta1WebDetectionWebLabel (Maybe Text)
gcvvwdwlcLanguageCode
= lens _gcvvwdwlcLanguageCode
(\ s a -> s{_gcvvwdwlcLanguageCode = a})
gcvvwdwlcLabel :: Lens' GoogleCloudVisionV1p1beta1WebDetectionWebLabel (Maybe Text)
gcvvwdwlcLabel
= lens _gcvvwdwlcLabel
(\ s a -> s{_gcvvwdwlcLabel = a})
instance FromJSON
GoogleCloudVisionV1p1beta1WebDetectionWebLabel where
parseJSON
= withObject
"GoogleCloudVisionV1p1beta1WebDetectionWebLabel"
(\ o ->
GoogleCloudVisionV1p1beta1WebDetectionWebLabel' <$>
(o .:? "languageCode") <*> (o .:? "label"))
instance ToJSON
GoogleCloudVisionV1p1beta1WebDetectionWebLabel where
toJSON
GoogleCloudVisionV1p1beta1WebDetectionWebLabel'{..}
= object
(catMaybes
[("languageCode" .=) <$> _gcvvwdwlcLanguageCode,
("label" .=) <$> _gcvvwdwlcLabel])
newtype GoogleCloudVisionV1p3beta1DominantColorsAnnotation = GoogleCloudVisionV1p3beta1DominantColorsAnnotation'
{ _gooColors :: Maybe [GoogleCloudVisionV1p3beta1ColorInfo]
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1DominantColorsAnnotation
:: GoogleCloudVisionV1p3beta1DominantColorsAnnotation
googleCloudVisionV1p3beta1DominantColorsAnnotation =
GoogleCloudVisionV1p3beta1DominantColorsAnnotation'
{ _gooColors = Nothing
}
gooColors :: Lens' GoogleCloudVisionV1p3beta1DominantColorsAnnotation [GoogleCloudVisionV1p3beta1ColorInfo]
gooColors
= lens _gooColors (\ s a -> s{_gooColors = a}) .
_Default
. _Coerce
instance FromJSON
GoogleCloudVisionV1p3beta1DominantColorsAnnotation
where
parseJSON
= withObject
"GoogleCloudVisionV1p3beta1DominantColorsAnnotation"
(\ o ->
GoogleCloudVisionV1p3beta1DominantColorsAnnotation'
<$> (o .:? "colors" .!= mempty))
instance ToJSON
GoogleCloudVisionV1p3beta1DominantColorsAnnotation
where
toJSON
GoogleCloudVisionV1p3beta1DominantColorsAnnotation'{..}
= object (catMaybes [("colors" .=) <$> _gooColors])
data GoogleCloudVisionV1p3beta1ColorInfo = GoogleCloudVisionV1p3beta1ColorInfo'
{ _gcvvcicColor :: !(Maybe Color)
, _gcvvcicScore :: !(Maybe (Textual Double))
, _gcvvcicPixelFraction :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1ColorInfo
:: GoogleCloudVisionV1p3beta1ColorInfo
googleCloudVisionV1p3beta1ColorInfo =
GoogleCloudVisionV1p3beta1ColorInfo'
{ _gcvvcicColor = Nothing
, _gcvvcicScore = Nothing
, _gcvvcicPixelFraction = Nothing
}
gcvvcicColor :: Lens' GoogleCloudVisionV1p3beta1ColorInfo (Maybe Color)
gcvvcicColor
= lens _gcvvcicColor (\ s a -> s{_gcvvcicColor = a})
gcvvcicScore :: Lens' GoogleCloudVisionV1p3beta1ColorInfo (Maybe Double)
gcvvcicScore
= lens _gcvvcicScore (\ s a -> s{_gcvvcicScore = a})
. mapping _Coerce
gcvvcicPixelFraction :: Lens' GoogleCloudVisionV1p3beta1ColorInfo (Maybe Double)
gcvvcicPixelFraction
= lens _gcvvcicPixelFraction
(\ s a -> s{_gcvvcicPixelFraction = a})
. mapping _Coerce
instance FromJSON GoogleCloudVisionV1p3beta1ColorInfo
where
parseJSON
= withObject "GoogleCloudVisionV1p3beta1ColorInfo"
(\ o ->
GoogleCloudVisionV1p3beta1ColorInfo' <$>
(o .:? "color") <*> (o .:? "score") <*>
(o .:? "pixelFraction"))
instance ToJSON GoogleCloudVisionV1p3beta1ColorInfo
where
toJSON GoogleCloudVisionV1p3beta1ColorInfo'{..}
= object
(catMaybes
[("color" .=) <$> _gcvvcicColor,
("score" .=) <$> _gcvvcicScore,
("pixelFraction" .=) <$> _gcvvcicPixelFraction])
newtype GoogleCloudVisionV1p2beta1CropHintsParams = GoogleCloudVisionV1p2beta1CropHintsParams'
{ _gcvvchpAspectRatios :: Maybe [Textual Double]
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1CropHintsParams
:: GoogleCloudVisionV1p2beta1CropHintsParams
googleCloudVisionV1p2beta1CropHintsParams =
GoogleCloudVisionV1p2beta1CropHintsParams'
{ _gcvvchpAspectRatios = Nothing
}
gcvvchpAspectRatios :: Lens' GoogleCloudVisionV1p2beta1CropHintsParams [Double]
gcvvchpAspectRatios
= lens _gcvvchpAspectRatios
(\ s a -> s{_gcvvchpAspectRatios = a})
. _Default
. _Coerce
instance FromJSON
GoogleCloudVisionV1p2beta1CropHintsParams where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1CropHintsParams"
(\ o ->
GoogleCloudVisionV1p2beta1CropHintsParams' <$>
(o .:? "aspectRatios" .!= mempty))
instance ToJSON
GoogleCloudVisionV1p2beta1CropHintsParams where
toJSON GoogleCloudVisionV1p2beta1CropHintsParams'{..}
= object
(catMaybes
[("aspectRatios" .=) <$> _gcvvchpAspectRatios])
newtype GoogleCloudVisionV1p1beta1CropHintsAnnotation = GoogleCloudVisionV1p1beta1CropHintsAnnotation'
{ _gooCropHints :: Maybe [GoogleCloudVisionV1p1beta1CropHint]
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1CropHintsAnnotation
:: GoogleCloudVisionV1p1beta1CropHintsAnnotation
googleCloudVisionV1p1beta1CropHintsAnnotation =
GoogleCloudVisionV1p1beta1CropHintsAnnotation'
{ _gooCropHints = Nothing
}
gooCropHints :: Lens' GoogleCloudVisionV1p1beta1CropHintsAnnotation [GoogleCloudVisionV1p1beta1CropHint]
gooCropHints
= lens _gooCropHints (\ s a -> s{_gooCropHints = a})
. _Default
. _Coerce
instance FromJSON
GoogleCloudVisionV1p1beta1CropHintsAnnotation where
parseJSON
= withObject
"GoogleCloudVisionV1p1beta1CropHintsAnnotation"
(\ o ->
GoogleCloudVisionV1p1beta1CropHintsAnnotation' <$>
(o .:? "cropHints" .!= mempty))
instance ToJSON
GoogleCloudVisionV1p1beta1CropHintsAnnotation where
toJSON
GoogleCloudVisionV1p1beta1CropHintsAnnotation'{..}
= object
(catMaybes [("cropHints" .=) <$> _gooCropHints])
newtype GoogleCloudVisionV1p2beta1GcsSource = GoogleCloudVisionV1p2beta1GcsSource'
{ _gcvvgscURI :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1GcsSource
:: GoogleCloudVisionV1p2beta1GcsSource
googleCloudVisionV1p2beta1GcsSource =
GoogleCloudVisionV1p2beta1GcsSource'
{ _gcvvgscURI = Nothing
}
gcvvgscURI :: Lens' GoogleCloudVisionV1p2beta1GcsSource (Maybe Text)
gcvvgscURI
= lens _gcvvgscURI (\ s a -> s{_gcvvgscURI = a})
instance FromJSON GoogleCloudVisionV1p2beta1GcsSource
where
parseJSON
= withObject "GoogleCloudVisionV1p2beta1GcsSource"
(\ o ->
GoogleCloudVisionV1p2beta1GcsSource' <$>
(o .:? "uri"))
instance ToJSON GoogleCloudVisionV1p2beta1GcsSource
where
toJSON GoogleCloudVisionV1p2beta1GcsSource'{..}
= object (catMaybes [("uri" .=) <$> _gcvvgscURI])
data OperationMetadata = OperationMetadata'
{ _omState :: !(Maybe OperationMetadataState)
, _omUpdateTime :: !(Maybe DateTime')
, _omCreateTime :: !(Maybe DateTime')
} deriving (Eq,Show,Data,Typeable,Generic)
operationMetadata
:: OperationMetadata
operationMetadata =
OperationMetadata'
{ _omState = Nothing
, _omUpdateTime = Nothing
, _omCreateTime = Nothing
}
omState :: Lens' OperationMetadata (Maybe OperationMetadataState)
omState = lens _omState (\ s a -> s{_omState = a})
omUpdateTime :: Lens' OperationMetadata (Maybe UTCTime)
omUpdateTime
= lens _omUpdateTime (\ s a -> s{_omUpdateTime = a})
. mapping _DateTime
omCreateTime :: Lens' OperationMetadata (Maybe UTCTime)
omCreateTime
= lens _omCreateTime (\ s a -> s{_omCreateTime = a})
. mapping _DateTime
instance FromJSON OperationMetadata where
parseJSON
= withObject "OperationMetadata"
(\ o ->
OperationMetadata' <$>
(o .:? "state") <*> (o .:? "updateTime") <*>
(o .:? "createTime"))
instance ToJSON OperationMetadata where
toJSON OperationMetadata'{..}
= object
(catMaybes
[("state" .=) <$> _omState,
("updateTime" .=) <$> _omUpdateTime,
("createTime" .=) <$> _omCreateTime])
data Product = Product'
{ _proName :: !(Maybe Text)
, _proDisplayName :: !(Maybe Text)
, _proProductCategory :: !(Maybe Text)
, _proProductLabels :: !(Maybe [KeyValue])
, _proDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
product
:: Product
product =
Product'
{ _proName = Nothing
, _proDisplayName = Nothing
, _proProductCategory = Nothing
, _proProductLabels = Nothing
, _proDescription = Nothing
}
proName :: Lens' Product (Maybe Text)
proName = lens _proName (\ s a -> s{_proName = a})
proDisplayName :: Lens' Product (Maybe Text)
proDisplayName
= lens _proDisplayName
(\ s a -> s{_proDisplayName = a})
proProductCategory :: Lens' Product (Maybe Text)
proProductCategory
= lens _proProductCategory
(\ s a -> s{_proProductCategory = a})
proProductLabels :: Lens' Product [KeyValue]
proProductLabels
= lens _proProductLabels
(\ s a -> s{_proProductLabels = a})
. _Default
. _Coerce
proDescription :: Lens' Product (Maybe Text)
proDescription
= lens _proDescription
(\ s a -> s{_proDescription = a})
instance FromJSON Product where
parseJSON
= withObject "Product"
(\ o ->
Product' <$>
(o .:? "name") <*> (o .:? "displayName") <*>
(o .:? "productCategory")
<*> (o .:? "productLabels" .!= mempty)
<*> (o .:? "description"))
instance ToJSON Product where
toJSON Product'{..}
= object
(catMaybes
[("name" .=) <$> _proName,
("displayName" .=) <$> _proDisplayName,
("productCategory" .=) <$> _proProductCategory,
("productLabels" .=) <$> _proProductLabels,
("description" .=) <$> _proDescription])
data GoogleCloudVisionV1p2beta1Block = GoogleCloudVisionV1p2beta1Block'
{ _gcvvb1Property :: !(Maybe GoogleCloudVisionV1p2beta1TextAnnotationTextProperty)
, _gcvvb1BoundingBox :: !(Maybe GoogleCloudVisionV1p2beta1BoundingPoly)
, _gcvvb1Paragraphs :: !(Maybe [GoogleCloudVisionV1p2beta1Paragraph])
, _gcvvb1Confidence :: !(Maybe (Textual Double))
, _gcvvb1BlockType :: !(Maybe GoogleCloudVisionV1p2beta1BlockBlockType)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1Block
:: GoogleCloudVisionV1p2beta1Block
googleCloudVisionV1p2beta1Block =
GoogleCloudVisionV1p2beta1Block'
{ _gcvvb1Property = Nothing
, _gcvvb1BoundingBox = Nothing
, _gcvvb1Paragraphs = Nothing
, _gcvvb1Confidence = Nothing
, _gcvvb1BlockType = Nothing
}
gcvvb1Property :: Lens' GoogleCloudVisionV1p2beta1Block (Maybe GoogleCloudVisionV1p2beta1TextAnnotationTextProperty)
gcvvb1Property
= lens _gcvvb1Property
(\ s a -> s{_gcvvb1Property = a})
gcvvb1BoundingBox :: Lens' GoogleCloudVisionV1p2beta1Block (Maybe GoogleCloudVisionV1p2beta1BoundingPoly)
gcvvb1BoundingBox
= lens _gcvvb1BoundingBox
(\ s a -> s{_gcvvb1BoundingBox = a})
gcvvb1Paragraphs :: Lens' GoogleCloudVisionV1p2beta1Block [GoogleCloudVisionV1p2beta1Paragraph]
gcvvb1Paragraphs
= lens _gcvvb1Paragraphs
(\ s a -> s{_gcvvb1Paragraphs = a})
. _Default
. _Coerce
gcvvb1Confidence :: Lens' GoogleCloudVisionV1p2beta1Block (Maybe Double)
gcvvb1Confidence
= lens _gcvvb1Confidence
(\ s a -> s{_gcvvb1Confidence = a})
. mapping _Coerce
gcvvb1BlockType :: Lens' GoogleCloudVisionV1p2beta1Block (Maybe GoogleCloudVisionV1p2beta1BlockBlockType)
gcvvb1BlockType
= lens _gcvvb1BlockType
(\ s a -> s{_gcvvb1BlockType = a})
instance FromJSON GoogleCloudVisionV1p2beta1Block
where
parseJSON
= withObject "GoogleCloudVisionV1p2beta1Block"
(\ o ->
GoogleCloudVisionV1p2beta1Block' <$>
(o .:? "property") <*> (o .:? "boundingBox") <*>
(o .:? "paragraphs" .!= mempty)
<*> (o .:? "confidence")
<*> (o .:? "blockType"))
instance ToJSON GoogleCloudVisionV1p2beta1Block where
toJSON GoogleCloudVisionV1p2beta1Block'{..}
= object
(catMaybes
[("property" .=) <$> _gcvvb1Property,
("boundingBox" .=) <$> _gcvvb1BoundingBox,
("paragraphs" .=) <$> _gcvvb1Paragraphs,
("confidence" .=) <$> _gcvvb1Confidence,
("blockType" .=) <$> _gcvvb1BlockType])
data GoogleCloudVisionV1p3beta1SafeSearchAnnotation = GoogleCloudVisionV1p3beta1SafeSearchAnnotation'
{ _gooSpoof :: !(Maybe GoogleCloudVisionV1p3beta1SafeSearchAnnotationSpoof)
, _gooRacy :: !(Maybe GoogleCloudVisionV1p3beta1SafeSearchAnnotationRacy)
, _gooAdult :: !(Maybe GoogleCloudVisionV1p3beta1SafeSearchAnnotationAdult)
, _gooMedical :: !(Maybe GoogleCloudVisionV1p3beta1SafeSearchAnnotationMedical)
, _gooViolence :: !(Maybe GoogleCloudVisionV1p3beta1SafeSearchAnnotationViolence)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1SafeSearchAnnotation
:: GoogleCloudVisionV1p3beta1SafeSearchAnnotation
googleCloudVisionV1p3beta1SafeSearchAnnotation =
GoogleCloudVisionV1p3beta1SafeSearchAnnotation'
{ _gooSpoof = Nothing
, _gooRacy = Nothing
, _gooAdult = Nothing
, _gooMedical = Nothing
, _gooViolence = Nothing
}
gooSpoof :: Lens' GoogleCloudVisionV1p3beta1SafeSearchAnnotation (Maybe GoogleCloudVisionV1p3beta1SafeSearchAnnotationSpoof)
gooSpoof = lens _gooSpoof (\ s a -> s{_gooSpoof = a})
gooRacy :: Lens' GoogleCloudVisionV1p3beta1SafeSearchAnnotation (Maybe GoogleCloudVisionV1p3beta1SafeSearchAnnotationRacy)
gooRacy = lens _gooRacy (\ s a -> s{_gooRacy = a})
gooAdult :: Lens' GoogleCloudVisionV1p3beta1SafeSearchAnnotation (Maybe GoogleCloudVisionV1p3beta1SafeSearchAnnotationAdult)
gooAdult = lens _gooAdult (\ s a -> s{_gooAdult = a})
gooMedical :: Lens' GoogleCloudVisionV1p3beta1SafeSearchAnnotation (Maybe GoogleCloudVisionV1p3beta1SafeSearchAnnotationMedical)
gooMedical
= lens _gooMedical (\ s a -> s{_gooMedical = a})
gooViolence :: Lens' GoogleCloudVisionV1p3beta1SafeSearchAnnotation (Maybe GoogleCloudVisionV1p3beta1SafeSearchAnnotationViolence)
gooViolence
= lens _gooViolence (\ s a -> s{_gooViolence = a})
instance FromJSON
GoogleCloudVisionV1p3beta1SafeSearchAnnotation where
parseJSON
= withObject
"GoogleCloudVisionV1p3beta1SafeSearchAnnotation"
(\ o ->
GoogleCloudVisionV1p3beta1SafeSearchAnnotation' <$>
(o .:? "spoof") <*> (o .:? "racy") <*>
(o .:? "adult")
<*> (o .:? "medical")
<*> (o .:? "violence"))
instance ToJSON
GoogleCloudVisionV1p3beta1SafeSearchAnnotation where
toJSON
GoogleCloudVisionV1p3beta1SafeSearchAnnotation'{..}
= object
(catMaybes
[("spoof" .=) <$> _gooSpoof,
("racy" .=) <$> _gooRacy, ("adult" .=) <$> _gooAdult,
("medical" .=) <$> _gooMedical,
("violence" .=) <$> _gooViolence])
data GoogleCloudVisionV1p1beta1TextAnnotation = GoogleCloudVisionV1p1beta1TextAnnotation'
{ _gcvvtacText :: !(Maybe Text)
, _gcvvtacPages :: !(Maybe [GoogleCloudVisionV1p1beta1Page])
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1TextAnnotation
:: GoogleCloudVisionV1p1beta1TextAnnotation
googleCloudVisionV1p1beta1TextAnnotation =
GoogleCloudVisionV1p1beta1TextAnnotation'
{ _gcvvtacText = Nothing
, _gcvvtacPages = Nothing
}
gcvvtacText :: Lens' GoogleCloudVisionV1p1beta1TextAnnotation (Maybe Text)
gcvvtacText
= lens _gcvvtacText (\ s a -> s{_gcvvtacText = a})
gcvvtacPages :: Lens' GoogleCloudVisionV1p1beta1TextAnnotation [GoogleCloudVisionV1p1beta1Page]
gcvvtacPages
= lens _gcvvtacPages (\ s a -> s{_gcvvtacPages = a})
. _Default
. _Coerce
instance FromJSON
GoogleCloudVisionV1p1beta1TextAnnotation where
parseJSON
= withObject
"GoogleCloudVisionV1p1beta1TextAnnotation"
(\ o ->
GoogleCloudVisionV1p1beta1TextAnnotation' <$>
(o .:? "text") <*> (o .:? "pages" .!= mempty))
instance ToJSON
GoogleCloudVisionV1p1beta1TextAnnotation where
toJSON GoogleCloudVisionV1p1beta1TextAnnotation'{..}
= object
(catMaybes
[("text" .=) <$> _gcvvtacText,
("pages" .=) <$> _gcvvtacPages])
data GoogleCloudVisionV1p2beta1ProductSearchParams = GoogleCloudVisionV1p2beta1ProductSearchParams'
{ _gcvvpspProductCategories :: !(Maybe [Text])
, _gcvvpspBoundingPoly :: !(Maybe GoogleCloudVisionV1p2beta1BoundingPoly)
, _gcvvpspProductSet :: !(Maybe Text)
, _gcvvpspFilter :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1ProductSearchParams
:: GoogleCloudVisionV1p2beta1ProductSearchParams
googleCloudVisionV1p2beta1ProductSearchParams =
GoogleCloudVisionV1p2beta1ProductSearchParams'
{ _gcvvpspProductCategories = Nothing
, _gcvvpspBoundingPoly = Nothing
, _gcvvpspProductSet = Nothing
, _gcvvpspFilter = Nothing
}
gcvvpspProductCategories :: Lens' GoogleCloudVisionV1p2beta1ProductSearchParams [Text]
gcvvpspProductCategories
= lens _gcvvpspProductCategories
(\ s a -> s{_gcvvpspProductCategories = a})
. _Default
. _Coerce
gcvvpspBoundingPoly :: Lens' GoogleCloudVisionV1p2beta1ProductSearchParams (Maybe GoogleCloudVisionV1p2beta1BoundingPoly)
gcvvpspBoundingPoly
= lens _gcvvpspBoundingPoly
(\ s a -> s{_gcvvpspBoundingPoly = a})
gcvvpspProductSet :: Lens' GoogleCloudVisionV1p2beta1ProductSearchParams (Maybe Text)
gcvvpspProductSet
= lens _gcvvpspProductSet
(\ s a -> s{_gcvvpspProductSet = a})
gcvvpspFilter :: Lens' GoogleCloudVisionV1p2beta1ProductSearchParams (Maybe Text)
gcvvpspFilter
= lens _gcvvpspFilter
(\ s a -> s{_gcvvpspFilter = a})
instance FromJSON
GoogleCloudVisionV1p2beta1ProductSearchParams where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1ProductSearchParams"
(\ o ->
GoogleCloudVisionV1p2beta1ProductSearchParams' <$>
(o .:? "productCategories" .!= mempty) <*>
(o .:? "boundingPoly")
<*> (o .:? "productSet")
<*> (o .:? "filter"))
instance ToJSON
GoogleCloudVisionV1p2beta1ProductSearchParams where
toJSON
GoogleCloudVisionV1p2beta1ProductSearchParams'{..}
= object
(catMaybes
[("productCategories" .=) <$>
_gcvvpspProductCategories,
("boundingPoly" .=) <$> _gcvvpspBoundingPoly,
("productSet" .=) <$> _gcvvpspProductSet,
("filter" .=) <$> _gcvvpspFilter])
data WebPage = WebPage'
{ _wpScore :: !(Maybe (Textual Double))
, _wpURL :: !(Maybe Text)
, _wpPageTitle :: !(Maybe Text)
, _wpPartialMatchingImages :: !(Maybe [WebImage])
, _wpFullMatchingImages :: !(Maybe [WebImage])
} deriving (Eq,Show,Data,Typeable,Generic)
webPage
:: WebPage
webPage =
WebPage'
{ _wpScore = Nothing
, _wpURL = Nothing
, _wpPageTitle = Nothing
, _wpPartialMatchingImages = Nothing
, _wpFullMatchingImages = Nothing
}
wpScore :: Lens' WebPage (Maybe Double)
wpScore
= lens _wpScore (\ s a -> s{_wpScore = a}) .
mapping _Coerce
wpURL :: Lens' WebPage (Maybe Text)
wpURL = lens _wpURL (\ s a -> s{_wpURL = a})
wpPageTitle :: Lens' WebPage (Maybe Text)
wpPageTitle
= lens _wpPageTitle (\ s a -> s{_wpPageTitle = a})
wpPartialMatchingImages :: Lens' WebPage [WebImage]
wpPartialMatchingImages
= lens _wpPartialMatchingImages
(\ s a -> s{_wpPartialMatchingImages = a})
. _Default
. _Coerce
wpFullMatchingImages :: Lens' WebPage [WebImage]
wpFullMatchingImages
= lens _wpFullMatchingImages
(\ s a -> s{_wpFullMatchingImages = a})
. _Default
. _Coerce
instance FromJSON WebPage where
parseJSON
= withObject "WebPage"
(\ o ->
WebPage' <$>
(o .:? "score") <*> (o .:? "url") <*>
(o .:? "pageTitle")
<*> (o .:? "partialMatchingImages" .!= mempty)
<*> (o .:? "fullMatchingImages" .!= mempty))
instance ToJSON WebPage where
toJSON WebPage'{..}
= object
(catMaybes
[("score" .=) <$> _wpScore, ("url" .=) <$> _wpURL,
("pageTitle" .=) <$> _wpPageTitle,
("partialMatchingImages" .=) <$>
_wpPartialMatchingImages,
("fullMatchingImages" .=) <$> _wpFullMatchingImages])
newtype DominantColorsAnnotation = DominantColorsAnnotation'
{ _dcaColors :: Maybe [ColorInfo]
} deriving (Eq,Show,Data,Typeable,Generic)
dominantColorsAnnotation
:: DominantColorsAnnotation
dominantColorsAnnotation =
DominantColorsAnnotation'
{ _dcaColors = Nothing
}
dcaColors :: Lens' DominantColorsAnnotation [ColorInfo]
dcaColors
= lens _dcaColors (\ s a -> s{_dcaColors = a}) .
_Default
. _Coerce
instance FromJSON DominantColorsAnnotation where
parseJSON
= withObject "DominantColorsAnnotation"
(\ o ->
DominantColorsAnnotation' <$>
(o .:? "colors" .!= mempty))
instance ToJSON DominantColorsAnnotation where
toJSON DominantColorsAnnotation'{..}
= object (catMaybes [("colors" .=) <$> _dcaColors])
data GoogleCloudVisionV1p2beta1WebDetectionWebLabel = GoogleCloudVisionV1p2beta1WebDetectionWebLabel'
{ _ggLanguageCode :: !(Maybe Text)
, _ggLabel :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1WebDetectionWebLabel
:: GoogleCloudVisionV1p2beta1WebDetectionWebLabel
googleCloudVisionV1p2beta1WebDetectionWebLabel =
GoogleCloudVisionV1p2beta1WebDetectionWebLabel'
{ _ggLanguageCode = Nothing
, _ggLabel = Nothing
}
ggLanguageCode :: Lens' GoogleCloudVisionV1p2beta1WebDetectionWebLabel (Maybe Text)
ggLanguageCode
= lens _ggLanguageCode
(\ s a -> s{_ggLanguageCode = a})
ggLabel :: Lens' GoogleCloudVisionV1p2beta1WebDetectionWebLabel (Maybe Text)
ggLabel = lens _ggLabel (\ s a -> s{_ggLabel = a})
instance FromJSON
GoogleCloudVisionV1p2beta1WebDetectionWebLabel where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1WebDetectionWebLabel"
(\ o ->
GoogleCloudVisionV1p2beta1WebDetectionWebLabel' <$>
(o .:? "languageCode") <*> (o .:? "label"))
instance ToJSON
GoogleCloudVisionV1p2beta1WebDetectionWebLabel where
toJSON
GoogleCloudVisionV1p2beta1WebDetectionWebLabel'{..}
= object
(catMaybes
[("languageCode" .=) <$> _ggLanguageCode,
("label" .=) <$> _ggLabel])
data GoogleCloudVisionV1p3beta1ProductSearchResultsGroupedResult = GoogleCloudVisionV1p3beta1ProductSearchResultsGroupedResult'
{ _ggResults :: !(Maybe [GoogleCloudVisionV1p3beta1ProductSearchResultsResult])
, _ggBoundingPoly :: !(Maybe GoogleCloudVisionV1p3beta1BoundingPoly)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1ProductSearchResultsGroupedResult
:: GoogleCloudVisionV1p3beta1ProductSearchResultsGroupedResult
googleCloudVisionV1p3beta1ProductSearchResultsGroupedResult =
GoogleCloudVisionV1p3beta1ProductSearchResultsGroupedResult'
{ _ggResults = Nothing
, _ggBoundingPoly = Nothing
}
ggResults :: Lens' GoogleCloudVisionV1p3beta1ProductSearchResultsGroupedResult [GoogleCloudVisionV1p3beta1ProductSearchResultsResult]
ggResults
= lens _ggResults (\ s a -> s{_ggResults = a}) .
_Default
. _Coerce
ggBoundingPoly :: Lens' GoogleCloudVisionV1p3beta1ProductSearchResultsGroupedResult (Maybe GoogleCloudVisionV1p3beta1BoundingPoly)
ggBoundingPoly
= lens _ggBoundingPoly
(\ s a -> s{_ggBoundingPoly = a})
instance FromJSON
GoogleCloudVisionV1p3beta1ProductSearchResultsGroupedResult
where
parseJSON
= withObject
"GoogleCloudVisionV1p3beta1ProductSearchResultsGroupedResult"
(\ o ->
GoogleCloudVisionV1p3beta1ProductSearchResultsGroupedResult'
<$>
(o .:? "results" .!= mempty) <*>
(o .:? "boundingPoly"))
instance ToJSON
GoogleCloudVisionV1p3beta1ProductSearchResultsGroupedResult
where
toJSON
GoogleCloudVisionV1p3beta1ProductSearchResultsGroupedResult'{..}
= object
(catMaybes
[("results" .=) <$> _ggResults,
("boundingPoly" .=) <$> _ggBoundingPoly])
newtype GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse = GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse'
{ _gcvvaafrcOutputConfig :: Maybe GoogleCloudVisionV1p2beta1OutputConfig
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1AsyncAnnotateFileResponse
:: GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse
googleCloudVisionV1p2beta1AsyncAnnotateFileResponse =
GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse'
{ _gcvvaafrcOutputConfig = Nothing
}
gcvvaafrcOutputConfig :: Lens' GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse (Maybe GoogleCloudVisionV1p2beta1OutputConfig)
gcvvaafrcOutputConfig
= lens _gcvvaafrcOutputConfig
(\ s a -> s{_gcvvaafrcOutputConfig = a})
instance FromJSON
GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse
where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse"
(\ o ->
GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse'
<$> (o .:? "outputConfig"))
instance ToJSON
GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse
where
toJSON
GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse'{..}
= object
(catMaybes
[("outputConfig" .=) <$> _gcvvaafrcOutputConfig])
data GoogleCloudVisionV1p2beta1EntityAnnotation = GoogleCloudVisionV1p2beta1EntityAnnotation'
{ _gcvvea1Score :: !(Maybe (Textual Double))
, _gcvvea1Topicality :: !(Maybe (Textual Double))
, _gcvvea1Locale :: !(Maybe Text)
, _gcvvea1BoundingPoly :: !(Maybe GoogleCloudVisionV1p2beta1BoundingPoly)
, _gcvvea1Confidence :: !(Maybe (Textual Double))
, _gcvvea1Mid :: !(Maybe Text)
, _gcvvea1Locations :: !(Maybe [GoogleCloudVisionV1p2beta1LocationInfo])
, _gcvvea1Description :: !(Maybe Text)
, _gcvvea1Properties :: !(Maybe [GoogleCloudVisionV1p2beta1Property])
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1EntityAnnotation
:: GoogleCloudVisionV1p2beta1EntityAnnotation
googleCloudVisionV1p2beta1EntityAnnotation =
GoogleCloudVisionV1p2beta1EntityAnnotation'
{ _gcvvea1Score = Nothing
, _gcvvea1Topicality = Nothing
, _gcvvea1Locale = Nothing
, _gcvvea1BoundingPoly = Nothing
, _gcvvea1Confidence = Nothing
, _gcvvea1Mid = Nothing
, _gcvvea1Locations = Nothing
, _gcvvea1Description = Nothing
, _gcvvea1Properties = Nothing
}
gcvvea1Score :: Lens' GoogleCloudVisionV1p2beta1EntityAnnotation (Maybe Double)
gcvvea1Score
= lens _gcvvea1Score (\ s a -> s{_gcvvea1Score = a})
. mapping _Coerce
gcvvea1Topicality :: Lens' GoogleCloudVisionV1p2beta1EntityAnnotation (Maybe Double)
gcvvea1Topicality
= lens _gcvvea1Topicality
(\ s a -> s{_gcvvea1Topicality = a})
. mapping _Coerce
gcvvea1Locale :: Lens' GoogleCloudVisionV1p2beta1EntityAnnotation (Maybe Text)
gcvvea1Locale
= lens _gcvvea1Locale
(\ s a -> s{_gcvvea1Locale = a})
gcvvea1BoundingPoly :: Lens' GoogleCloudVisionV1p2beta1EntityAnnotation (Maybe GoogleCloudVisionV1p2beta1BoundingPoly)
gcvvea1BoundingPoly
= lens _gcvvea1BoundingPoly
(\ s a -> s{_gcvvea1BoundingPoly = a})
gcvvea1Confidence :: Lens' GoogleCloudVisionV1p2beta1EntityAnnotation (Maybe Double)
gcvvea1Confidence
= lens _gcvvea1Confidence
(\ s a -> s{_gcvvea1Confidence = a})
. mapping _Coerce
gcvvea1Mid :: Lens' GoogleCloudVisionV1p2beta1EntityAnnotation (Maybe Text)
gcvvea1Mid
= lens _gcvvea1Mid (\ s a -> s{_gcvvea1Mid = a})
gcvvea1Locations :: Lens' GoogleCloudVisionV1p2beta1EntityAnnotation [GoogleCloudVisionV1p2beta1LocationInfo]
gcvvea1Locations
= lens _gcvvea1Locations
(\ s a -> s{_gcvvea1Locations = a})
. _Default
. _Coerce
gcvvea1Description :: Lens' GoogleCloudVisionV1p2beta1EntityAnnotation (Maybe Text)
gcvvea1Description
= lens _gcvvea1Description
(\ s a -> s{_gcvvea1Description = a})
gcvvea1Properties :: Lens' GoogleCloudVisionV1p2beta1EntityAnnotation [GoogleCloudVisionV1p2beta1Property]
gcvvea1Properties
= lens _gcvvea1Properties
(\ s a -> s{_gcvvea1Properties = a})
. _Default
. _Coerce
instance FromJSON
GoogleCloudVisionV1p2beta1EntityAnnotation where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1EntityAnnotation"
(\ o ->
GoogleCloudVisionV1p2beta1EntityAnnotation' <$>
(o .:? "score") <*> (o .:? "topicality") <*>
(o .:? "locale")
<*> (o .:? "boundingPoly")
<*> (o .:? "confidence")
<*> (o .:? "mid")
<*> (o .:? "locations" .!= mempty)
<*> (o .:? "description")
<*> (o .:? "properties" .!= mempty))
instance ToJSON
GoogleCloudVisionV1p2beta1EntityAnnotation where
toJSON
GoogleCloudVisionV1p2beta1EntityAnnotation'{..}
= object
(catMaybes
[("score" .=) <$> _gcvvea1Score,
("topicality" .=) <$> _gcvvea1Topicality,
("locale" .=) <$> _gcvvea1Locale,
("boundingPoly" .=) <$> _gcvvea1BoundingPoly,
("confidence" .=) <$> _gcvvea1Confidence,
("mid" .=) <$> _gcvvea1Mid,
("locations" .=) <$> _gcvvea1Locations,
("description" .=) <$> _gcvvea1Description,
("properties" .=) <$> _gcvvea1Properties])
newtype GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest = GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest'
{ _gcvvabafrRequests :: Maybe [GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest]
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest
:: GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest
googleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest =
GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest'
{ _gcvvabafrRequests = Nothing
}
gcvvabafrRequests :: Lens' GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest [GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest]
gcvvabafrRequests
= lens _gcvvabafrRequests
(\ s a -> s{_gcvvabafrRequests = a})
. _Default
. _Coerce
instance FromJSON
GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest
where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest"
(\ o ->
GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest'
<$> (o .:? "requests" .!= mempty))
instance ToJSON
GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest
where
toJSON
GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest'{..}
= object
(catMaybes [("requests" .=) <$> _gcvvabafrRequests])
data GoogleCloudVisionV1p2beta1WebDetectionWebPage = GoogleCloudVisionV1p2beta1WebDetectionWebPage'
{ _ggScore :: !(Maybe (Textual Double))
, _ggURL :: !(Maybe Text)
, _ggPageTitle :: !(Maybe Text)
, _ggPartialMatchingImages :: !(Maybe [GoogleCloudVisionV1p2beta1WebDetectionWebImage])
, _ggFullMatchingImages :: !(Maybe [GoogleCloudVisionV1p2beta1WebDetectionWebImage])
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1WebDetectionWebPage
:: GoogleCloudVisionV1p2beta1WebDetectionWebPage
googleCloudVisionV1p2beta1WebDetectionWebPage =
GoogleCloudVisionV1p2beta1WebDetectionWebPage'
{ _ggScore = Nothing
, _ggURL = Nothing
, _ggPageTitle = Nothing
, _ggPartialMatchingImages = Nothing
, _ggFullMatchingImages = Nothing
}
ggScore :: Lens' GoogleCloudVisionV1p2beta1WebDetectionWebPage (Maybe Double)
ggScore
= lens _ggScore (\ s a -> s{_ggScore = a}) .
mapping _Coerce
ggURL :: Lens' GoogleCloudVisionV1p2beta1WebDetectionWebPage (Maybe Text)
ggURL = lens _ggURL (\ s a -> s{_ggURL = a})
ggPageTitle :: Lens' GoogleCloudVisionV1p2beta1WebDetectionWebPage (Maybe Text)
ggPageTitle
= lens _ggPageTitle (\ s a -> s{_ggPageTitle = a})
ggPartialMatchingImages :: Lens' GoogleCloudVisionV1p2beta1WebDetectionWebPage [GoogleCloudVisionV1p2beta1WebDetectionWebImage]
ggPartialMatchingImages
= lens _ggPartialMatchingImages
(\ s a -> s{_ggPartialMatchingImages = a})
. _Default
. _Coerce
ggFullMatchingImages :: Lens' GoogleCloudVisionV1p2beta1WebDetectionWebPage [GoogleCloudVisionV1p2beta1WebDetectionWebImage]
ggFullMatchingImages
= lens _ggFullMatchingImages
(\ s a -> s{_ggFullMatchingImages = a})
. _Default
. _Coerce
instance FromJSON
GoogleCloudVisionV1p2beta1WebDetectionWebPage where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1WebDetectionWebPage"
(\ o ->
GoogleCloudVisionV1p2beta1WebDetectionWebPage' <$>
(o .:? "score") <*> (o .:? "url") <*>
(o .:? "pageTitle")
<*> (o .:? "partialMatchingImages" .!= mempty)
<*> (o .:? "fullMatchingImages" .!= mempty))
instance ToJSON
GoogleCloudVisionV1p2beta1WebDetectionWebPage where
toJSON
GoogleCloudVisionV1p2beta1WebDetectionWebPage'{..}
= object
(catMaybes
[("score" .=) <$> _ggScore, ("url" .=) <$> _ggURL,
("pageTitle" .=) <$> _ggPageTitle,
("partialMatchingImages" .=) <$>
_ggPartialMatchingImages,
("fullMatchingImages" .=) <$> _ggFullMatchingImages])
newtype OperationResponse = OperationResponse'
{ _orAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
operationResponse
:: HashMap Text JSONValue
-> OperationResponse
operationResponse pOrAddtional_ =
OperationResponse'
{ _orAddtional = _Coerce # pOrAddtional_
}
orAddtional :: Lens' OperationResponse (HashMap Text JSONValue)
orAddtional
= lens _orAddtional (\ s a -> s{_orAddtional = a}) .
_Coerce
instance FromJSON OperationResponse where
parseJSON
= withObject "OperationResponse"
(\ o -> OperationResponse' <$> (parseJSONObject o))
instance ToJSON OperationResponse where
toJSON = toJSON . _orAddtional
data Word = Word'
{ _wProperty :: !(Maybe TextProperty)
, _wBoundingBox :: !(Maybe BoundingPoly)
, _wSymbols :: !(Maybe [Symbol])
, _wConfidence :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
word
:: Word
word =
Word'
{ _wProperty = Nothing
, _wBoundingBox = Nothing
, _wSymbols = Nothing
, _wConfidence = Nothing
}
wProperty :: Lens' Word (Maybe TextProperty)
wProperty
= lens _wProperty (\ s a -> s{_wProperty = a})
wBoundingBox :: Lens' Word (Maybe BoundingPoly)
wBoundingBox
= lens _wBoundingBox (\ s a -> s{_wBoundingBox = a})
wSymbols :: Lens' Word [Symbol]
wSymbols
= lens _wSymbols (\ s a -> s{_wSymbols = a}) .
_Default
. _Coerce
wConfidence :: Lens' Word (Maybe Double)
wConfidence
= lens _wConfidence (\ s a -> s{_wConfidence = a}) .
mapping _Coerce
instance FromJSON Word where
parseJSON
= withObject "Word"
(\ o ->
Word' <$>
(o .:? "property") <*> (o .:? "boundingBox") <*>
(o .:? "symbols" .!= mempty)
<*> (o .:? "confidence"))
instance ToJSON Word where
toJSON Word'{..}
= object
(catMaybes
[("property" .=) <$> _wProperty,
("boundingBox" .=) <$> _wBoundingBox,
("symbols" .=) <$> _wSymbols,
("confidence" .=) <$> _wConfidence])
data GoogleCloudVisionV1p2beta1InputConfig = GoogleCloudVisionV1p2beta1InputConfig'
{ _gooGcsSource :: !(Maybe GoogleCloudVisionV1p2beta1GcsSource)
, _gooMimeType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1InputConfig
:: GoogleCloudVisionV1p2beta1InputConfig
googleCloudVisionV1p2beta1InputConfig =
GoogleCloudVisionV1p2beta1InputConfig'
{ _gooGcsSource = Nothing
, _gooMimeType = Nothing
}
gooGcsSource :: Lens' GoogleCloudVisionV1p2beta1InputConfig (Maybe GoogleCloudVisionV1p2beta1GcsSource)
gooGcsSource
= lens _gooGcsSource (\ s a -> s{_gooGcsSource = a})
gooMimeType :: Lens' GoogleCloudVisionV1p2beta1InputConfig (Maybe Text)
gooMimeType
= lens _gooMimeType (\ s a -> s{_gooMimeType = a})
instance FromJSON
GoogleCloudVisionV1p2beta1InputConfig where
parseJSON
= withObject "GoogleCloudVisionV1p2beta1InputConfig"
(\ o ->
GoogleCloudVisionV1p2beta1InputConfig' <$>
(o .:? "gcsSource") <*> (o .:? "mimeType"))
instance ToJSON GoogleCloudVisionV1p2beta1InputConfig
where
toJSON GoogleCloudVisionV1p2beta1InputConfig'{..}
= object
(catMaybes
[("gcsSource" .=) <$> _gooGcsSource,
("mimeType" .=) <$> _gooMimeType])
data GoogleCloudVisionV1p1beta1WebDetection = GoogleCloudVisionV1p1beta1WebDetection'
{ _gooVisuallySimilarImages :: !(Maybe [GoogleCloudVisionV1p1beta1WebDetectionWebImage])
, _gooBestGuessLabels :: !(Maybe [GoogleCloudVisionV1p1beta1WebDetectionWebLabel])
, _gooPagesWithMatchingImages :: !(Maybe [GoogleCloudVisionV1p1beta1WebDetectionWebPage])
, _gooPartialMatchingImages :: !(Maybe [GoogleCloudVisionV1p1beta1WebDetectionWebImage])
, _gooFullMatchingImages :: !(Maybe [GoogleCloudVisionV1p1beta1WebDetectionWebImage])
, _gooWebEntities :: !(Maybe [GoogleCloudVisionV1p1beta1WebDetectionWebEntity])
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1WebDetection
:: GoogleCloudVisionV1p1beta1WebDetection
googleCloudVisionV1p1beta1WebDetection =
GoogleCloudVisionV1p1beta1WebDetection'
{ _gooVisuallySimilarImages = Nothing
, _gooBestGuessLabels = Nothing
, _gooPagesWithMatchingImages = Nothing
, _gooPartialMatchingImages = Nothing
, _gooFullMatchingImages = Nothing
, _gooWebEntities = Nothing
}
gooVisuallySimilarImages :: Lens' GoogleCloudVisionV1p1beta1WebDetection [GoogleCloudVisionV1p1beta1WebDetectionWebImage]
gooVisuallySimilarImages
= lens _gooVisuallySimilarImages
(\ s a -> s{_gooVisuallySimilarImages = a})
. _Default
. _Coerce
gooBestGuessLabels :: Lens' GoogleCloudVisionV1p1beta1WebDetection [GoogleCloudVisionV1p1beta1WebDetectionWebLabel]
gooBestGuessLabels
= lens _gooBestGuessLabels
(\ s a -> s{_gooBestGuessLabels = a})
. _Default
. _Coerce
gooPagesWithMatchingImages :: Lens' GoogleCloudVisionV1p1beta1WebDetection [GoogleCloudVisionV1p1beta1WebDetectionWebPage]
gooPagesWithMatchingImages
= lens _gooPagesWithMatchingImages
(\ s a -> s{_gooPagesWithMatchingImages = a})
. _Default
. _Coerce
gooPartialMatchingImages :: Lens' GoogleCloudVisionV1p1beta1WebDetection [GoogleCloudVisionV1p1beta1WebDetectionWebImage]
gooPartialMatchingImages
= lens _gooPartialMatchingImages
(\ s a -> s{_gooPartialMatchingImages = a})
. _Default
. _Coerce
gooFullMatchingImages :: Lens' GoogleCloudVisionV1p1beta1WebDetection [GoogleCloudVisionV1p1beta1WebDetectionWebImage]
gooFullMatchingImages
= lens _gooFullMatchingImages
(\ s a -> s{_gooFullMatchingImages = a})
. _Default
. _Coerce
gooWebEntities :: Lens' GoogleCloudVisionV1p1beta1WebDetection [GoogleCloudVisionV1p1beta1WebDetectionWebEntity]
gooWebEntities
= lens _gooWebEntities
(\ s a -> s{_gooWebEntities = a})
. _Default
. _Coerce
instance FromJSON
GoogleCloudVisionV1p1beta1WebDetection where
parseJSON
= withObject "GoogleCloudVisionV1p1beta1WebDetection"
(\ o ->
GoogleCloudVisionV1p1beta1WebDetection' <$>
(o .:? "visuallySimilarImages" .!= mempty) <*>
(o .:? "bestGuessLabels" .!= mempty)
<*> (o .:? "pagesWithMatchingImages" .!= mempty)
<*> (o .:? "partialMatchingImages" .!= mempty)
<*> (o .:? "fullMatchingImages" .!= mempty)
<*> (o .:? "webEntities" .!= mempty))
instance ToJSON
GoogleCloudVisionV1p1beta1WebDetection where
toJSON GoogleCloudVisionV1p1beta1WebDetection'{..}
= object
(catMaybes
[("visuallySimilarImages" .=) <$>
_gooVisuallySimilarImages,
("bestGuessLabels" .=) <$> _gooBestGuessLabels,
("pagesWithMatchingImages" .=) <$>
_gooPagesWithMatchingImages,
("partialMatchingImages" .=) <$>
_gooPartialMatchingImages,
("fullMatchingImages" .=) <$> _gooFullMatchingImages,
("webEntities" .=) <$> _gooWebEntities])
data GoogleCloudVisionV1p2beta1FaceAnnotationLandmark = GoogleCloudVisionV1p2beta1FaceAnnotationLandmark'
{ _gcvvfalcType :: !(Maybe GoogleCloudVisionV1p2beta1FaceAnnotationLandmarkType)
, _gcvvfalcPosition :: !(Maybe GoogleCloudVisionV1p2beta1Position)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1FaceAnnotationLandmark
:: GoogleCloudVisionV1p2beta1FaceAnnotationLandmark
googleCloudVisionV1p2beta1FaceAnnotationLandmark =
GoogleCloudVisionV1p2beta1FaceAnnotationLandmark'
{ _gcvvfalcType = Nothing
, _gcvvfalcPosition = Nothing
}
gcvvfalcType :: Lens' GoogleCloudVisionV1p2beta1FaceAnnotationLandmark (Maybe GoogleCloudVisionV1p2beta1FaceAnnotationLandmarkType)
gcvvfalcType
= lens _gcvvfalcType (\ s a -> s{_gcvvfalcType = a})
gcvvfalcPosition :: Lens' GoogleCloudVisionV1p2beta1FaceAnnotationLandmark (Maybe GoogleCloudVisionV1p2beta1Position)
gcvvfalcPosition
= lens _gcvvfalcPosition
(\ s a -> s{_gcvvfalcPosition = a})
instance FromJSON
GoogleCloudVisionV1p2beta1FaceAnnotationLandmark
where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1FaceAnnotationLandmark"
(\ o ->
GoogleCloudVisionV1p2beta1FaceAnnotationLandmark' <$>
(o .:? "type") <*> (o .:? "position"))
instance ToJSON
GoogleCloudVisionV1p2beta1FaceAnnotationLandmark
where
toJSON
GoogleCloudVisionV1p2beta1FaceAnnotationLandmark'{..}
= object
(catMaybes
[("type" .=) <$> _gcvvfalcType,
("position" .=) <$> _gcvvfalcPosition])
data GoogleCloudVisionV1p2beta1AnnotateImageRequest = GoogleCloudVisionV1p2beta1AnnotateImageRequest'
{ _gcvvairImage :: !(Maybe GoogleCloudVisionV1p2beta1Image)
, _gcvvairFeatures :: !(Maybe [GoogleCloudVisionV1p2beta1Feature])
, _gcvvairImageContext :: !(Maybe GoogleCloudVisionV1p2beta1ImageContext)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1AnnotateImageRequest
:: GoogleCloudVisionV1p2beta1AnnotateImageRequest
googleCloudVisionV1p2beta1AnnotateImageRequest =
GoogleCloudVisionV1p2beta1AnnotateImageRequest'
{ _gcvvairImage = Nothing
, _gcvvairFeatures = Nothing
, _gcvvairImageContext = Nothing
}
gcvvairImage :: Lens' GoogleCloudVisionV1p2beta1AnnotateImageRequest (Maybe GoogleCloudVisionV1p2beta1Image)
gcvvairImage
= lens _gcvvairImage (\ s a -> s{_gcvvairImage = a})
gcvvairFeatures :: Lens' GoogleCloudVisionV1p2beta1AnnotateImageRequest [GoogleCloudVisionV1p2beta1Feature]
gcvvairFeatures
= lens _gcvvairFeatures
(\ s a -> s{_gcvvairFeatures = a})
. _Default
. _Coerce
gcvvairImageContext :: Lens' GoogleCloudVisionV1p2beta1AnnotateImageRequest (Maybe GoogleCloudVisionV1p2beta1ImageContext)
gcvvairImageContext
= lens _gcvvairImageContext
(\ s a -> s{_gcvvairImageContext = a})
instance FromJSON
GoogleCloudVisionV1p2beta1AnnotateImageRequest where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1AnnotateImageRequest"
(\ o ->
GoogleCloudVisionV1p2beta1AnnotateImageRequest' <$>
(o .:? "image") <*> (o .:? "features" .!= mempty) <*>
(o .:? "imageContext"))
instance ToJSON
GoogleCloudVisionV1p2beta1AnnotateImageRequest where
toJSON
GoogleCloudVisionV1p2beta1AnnotateImageRequest'{..}
= object
(catMaybes
[("image" .=) <$> _gcvvairImage,
("features" .=) <$> _gcvvairFeatures,
("imageContext" .=) <$> _gcvvairImageContext])
data GoogleCloudVisionV1p1beta1AnnotateFileResponse = GoogleCloudVisionV1p1beta1AnnotateFileResponse'
{ _gcvvafrcResponses :: !(Maybe [GoogleCloudVisionV1p1beta1AnnotateImageResponse])
, _gcvvafrcInputConfig :: !(Maybe GoogleCloudVisionV1p1beta1InputConfig)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1AnnotateFileResponse
:: GoogleCloudVisionV1p1beta1AnnotateFileResponse
googleCloudVisionV1p1beta1AnnotateFileResponse =
GoogleCloudVisionV1p1beta1AnnotateFileResponse'
{ _gcvvafrcResponses = Nothing
, _gcvvafrcInputConfig = Nothing
}
gcvvafrcResponses :: Lens' GoogleCloudVisionV1p1beta1AnnotateFileResponse [GoogleCloudVisionV1p1beta1AnnotateImageResponse]
gcvvafrcResponses
= lens _gcvvafrcResponses
(\ s a -> s{_gcvvafrcResponses = a})
. _Default
. _Coerce
gcvvafrcInputConfig :: Lens' GoogleCloudVisionV1p1beta1AnnotateFileResponse (Maybe GoogleCloudVisionV1p1beta1InputConfig)
gcvvafrcInputConfig
= lens _gcvvafrcInputConfig
(\ s a -> s{_gcvvafrcInputConfig = a})
instance FromJSON
GoogleCloudVisionV1p1beta1AnnotateFileResponse where
parseJSON
= withObject
"GoogleCloudVisionV1p1beta1AnnotateFileResponse"
(\ o ->
GoogleCloudVisionV1p1beta1AnnotateFileResponse' <$>
(o .:? "responses" .!= mempty) <*>
(o .:? "inputConfig"))
instance ToJSON
GoogleCloudVisionV1p1beta1AnnotateFileResponse where
toJSON
GoogleCloudVisionV1p1beta1AnnotateFileResponse'{..}
= object
(catMaybes
[("responses" .=) <$> _gcvvafrcResponses,
("inputConfig" .=) <$> _gcvvafrcInputConfig])
data GoogleCloudVisionV1p2beta1Page = GoogleCloudVisionV1p2beta1Page'
{ _goo3Property :: !(Maybe GoogleCloudVisionV1p2beta1TextAnnotationTextProperty)
, _goo3Height :: !(Maybe (Textual Int32))
, _goo3Blocks :: !(Maybe [GoogleCloudVisionV1p2beta1Block])
, _goo3Width :: !(Maybe (Textual Int32))
, _goo3Confidence :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1Page
:: GoogleCloudVisionV1p2beta1Page
googleCloudVisionV1p2beta1Page =
GoogleCloudVisionV1p2beta1Page'
{ _goo3Property = Nothing
, _goo3Height = Nothing
, _goo3Blocks = Nothing
, _goo3Width = Nothing
, _goo3Confidence = Nothing
}
goo3Property :: Lens' GoogleCloudVisionV1p2beta1Page (Maybe GoogleCloudVisionV1p2beta1TextAnnotationTextProperty)
goo3Property
= lens _goo3Property (\ s a -> s{_goo3Property = a})
goo3Height :: Lens' GoogleCloudVisionV1p2beta1Page (Maybe Int32)
goo3Height
= lens _goo3Height (\ s a -> s{_goo3Height = a}) .
mapping _Coerce
goo3Blocks :: Lens' GoogleCloudVisionV1p2beta1Page [GoogleCloudVisionV1p2beta1Block]
goo3Blocks
= lens _goo3Blocks (\ s a -> s{_goo3Blocks = a}) .
_Default
. _Coerce
goo3Width :: Lens' GoogleCloudVisionV1p2beta1Page (Maybe Int32)
goo3Width
= lens _goo3Width (\ s a -> s{_goo3Width = a}) .
mapping _Coerce
goo3Confidence :: Lens' GoogleCloudVisionV1p2beta1Page (Maybe Double)
goo3Confidence
= lens _goo3Confidence
(\ s a -> s{_goo3Confidence = a})
. mapping _Coerce
instance FromJSON GoogleCloudVisionV1p2beta1Page
where
parseJSON
= withObject "GoogleCloudVisionV1p2beta1Page"
(\ o ->
GoogleCloudVisionV1p2beta1Page' <$>
(o .:? "property") <*> (o .:? "height") <*>
(o .:? "blocks" .!= mempty)
<*> (o .:? "width")
<*> (o .:? "confidence"))
instance ToJSON GoogleCloudVisionV1p2beta1Page where
toJSON GoogleCloudVisionV1p2beta1Page'{..}
= object
(catMaybes
[("property" .=) <$> _goo3Property,
("height" .=) <$> _goo3Height,
("blocks" .=) <$> _goo3Blocks,
("width" .=) <$> _goo3Width,
("confidence" .=) <$> _goo3Confidence])
data GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak = GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak'
{ _gcvvtadbcIsPrefix :: !(Maybe Bool)
, _gcvvtadbcType :: !(Maybe GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreakType)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1TextAnnotationDetectedBreak
:: GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak
googleCloudVisionV1p2beta1TextAnnotationDetectedBreak =
GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak'
{ _gcvvtadbcIsPrefix = Nothing
, _gcvvtadbcType = Nothing
}
gcvvtadbcIsPrefix :: Lens' GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak (Maybe Bool)
gcvvtadbcIsPrefix
= lens _gcvvtadbcIsPrefix
(\ s a -> s{_gcvvtadbcIsPrefix = a})
gcvvtadbcType :: Lens' GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak (Maybe GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreakType)
gcvvtadbcType
= lens _gcvvtadbcType
(\ s a -> s{_gcvvtadbcType = a})
instance FromJSON
GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak
where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak"
(\ o ->
GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak'
<$> (o .:? "isPrefix") <*> (o .:? "type"))
instance ToJSON
GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak
where
toJSON
GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak'{..}
= object
(catMaybes
[("isPrefix" .=) <$> _gcvvtadbcIsPrefix,
("type" .=) <$> _gcvvtadbcType])
newtype GoogleCloudVisionV1p2beta1WebDetectionParams = GoogleCloudVisionV1p2beta1WebDetectionParams'
{ _gcvvwdpIncludeGeoResults :: Maybe Bool
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1WebDetectionParams
:: GoogleCloudVisionV1p2beta1WebDetectionParams
googleCloudVisionV1p2beta1WebDetectionParams =
GoogleCloudVisionV1p2beta1WebDetectionParams'
{ _gcvvwdpIncludeGeoResults = Nothing
}
gcvvwdpIncludeGeoResults :: Lens' GoogleCloudVisionV1p2beta1WebDetectionParams (Maybe Bool)
gcvvwdpIncludeGeoResults
= lens _gcvvwdpIncludeGeoResults
(\ s a -> s{_gcvvwdpIncludeGeoResults = a})
instance FromJSON
GoogleCloudVisionV1p2beta1WebDetectionParams where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1WebDetectionParams"
(\ o ->
GoogleCloudVisionV1p2beta1WebDetectionParams' <$>
(o .:? "includeGeoResults"))
instance ToJSON
GoogleCloudVisionV1p2beta1WebDetectionParams where
toJSON
GoogleCloudVisionV1p2beta1WebDetectionParams'{..}
= object
(catMaybes
[("includeGeoResults" .=) <$>
_gcvvwdpIncludeGeoResults])
data GoogleCloudVisionV1p1beta1TextAnnotationTextProperty = GoogleCloudVisionV1p1beta1TextAnnotationTextProperty'
{ _gooDetectedLanguages :: !(Maybe [GoogleCloudVisionV1p1beta1TextAnnotationDetectedLanguage])
, _gooDetectedBreak :: !(Maybe GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreak)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1TextAnnotationTextProperty
:: GoogleCloudVisionV1p1beta1TextAnnotationTextProperty
googleCloudVisionV1p1beta1TextAnnotationTextProperty =
GoogleCloudVisionV1p1beta1TextAnnotationTextProperty'
{ _gooDetectedLanguages = Nothing
, _gooDetectedBreak = Nothing
}
gooDetectedLanguages :: Lens' GoogleCloudVisionV1p1beta1TextAnnotationTextProperty [GoogleCloudVisionV1p1beta1TextAnnotationDetectedLanguage]
gooDetectedLanguages
= lens _gooDetectedLanguages
(\ s a -> s{_gooDetectedLanguages = a})
. _Default
. _Coerce
gooDetectedBreak :: Lens' GoogleCloudVisionV1p1beta1TextAnnotationTextProperty (Maybe GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreak)
gooDetectedBreak
= lens _gooDetectedBreak
(\ s a -> s{_gooDetectedBreak = a})
instance FromJSON
GoogleCloudVisionV1p1beta1TextAnnotationTextProperty
where
parseJSON
= withObject
"GoogleCloudVisionV1p1beta1TextAnnotationTextProperty"
(\ o ->
GoogleCloudVisionV1p1beta1TextAnnotationTextProperty'
<$>
(o .:? "detectedLanguages" .!= mempty) <*>
(o .:? "detectedBreak"))
instance ToJSON
GoogleCloudVisionV1p1beta1TextAnnotationTextProperty
where
toJSON
GoogleCloudVisionV1p1beta1TextAnnotationTextProperty'{..}
= object
(catMaybes
[("detectedLanguages" .=) <$> _gooDetectedLanguages,
("detectedBreak" .=) <$> _gooDetectedBreak])
data GoogleCloudVisionV1p1beta1Vertex = GoogleCloudVisionV1p1beta1Vertex'
{ _ggX :: !(Maybe (Textual Int32))
, _ggY :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1Vertex
:: GoogleCloudVisionV1p1beta1Vertex
googleCloudVisionV1p1beta1Vertex =
GoogleCloudVisionV1p1beta1Vertex'
{ _ggX = Nothing
, _ggY = Nothing
}
ggX :: Lens' GoogleCloudVisionV1p1beta1Vertex (Maybe Int32)
ggX
= lens _ggX (\ s a -> s{_ggX = a}) . mapping _Coerce
ggY :: Lens' GoogleCloudVisionV1p1beta1Vertex (Maybe Int32)
ggY
= lens _ggY (\ s a -> s{_ggY = a}) . mapping _Coerce
instance FromJSON GoogleCloudVisionV1p1beta1Vertex
where
parseJSON
= withObject "GoogleCloudVisionV1p1beta1Vertex"
(\ o ->
GoogleCloudVisionV1p1beta1Vertex' <$>
(o .:? "x") <*> (o .:? "y"))
instance ToJSON GoogleCloudVisionV1p1beta1Vertex
where
toJSON GoogleCloudVisionV1p1beta1Vertex'{..}
= object
(catMaybes [("x" .=) <$> _ggX, ("y" .=) <$> _ggY])
newtype CropHintsAnnotation = CropHintsAnnotation'
{ _chaCropHints :: Maybe [CropHint]
} deriving (Eq,Show,Data,Typeable,Generic)
cropHintsAnnotation
:: CropHintsAnnotation
cropHintsAnnotation =
CropHintsAnnotation'
{ _chaCropHints = Nothing
}
chaCropHints :: Lens' CropHintsAnnotation [CropHint]
chaCropHints
= lens _chaCropHints (\ s a -> s{_chaCropHints = a})
. _Default
. _Coerce
instance FromJSON CropHintsAnnotation where
parseJSON
= withObject "CropHintsAnnotation"
(\ o ->
CropHintsAnnotation' <$>
(o .:? "cropHints" .!= mempty))
instance ToJSON CropHintsAnnotation where
toJSON CropHintsAnnotation'{..}
= object
(catMaybes [("cropHints" .=) <$> _chaCropHints])
newtype GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest = GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest'
{ _gcvvbairRequests :: Maybe [GoogleCloudVisionV1p2beta1AnnotateImageRequest]
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1BatchAnnotateImagesRequest
:: GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest
googleCloudVisionV1p2beta1BatchAnnotateImagesRequest =
GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest'
{ _gcvvbairRequests = Nothing
}
gcvvbairRequests :: Lens' GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest [GoogleCloudVisionV1p2beta1AnnotateImageRequest]
gcvvbairRequests
= lens _gcvvbairRequests
(\ s a -> s{_gcvvbairRequests = a})
. _Default
. _Coerce
instance FromJSON
GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest
where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest"
(\ o ->
GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest'
<$> (o .:? "requests" .!= mempty))
instance ToJSON
GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest
where
toJSON
GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest'{..}
= object
(catMaybes [("requests" .=) <$> _gcvvbairRequests])
data GoogleCloudVisionV1p2beta1ColorInfo = GoogleCloudVisionV1p2beta1ColorInfo'
{ _gcvvci1Color :: !(Maybe Color)
, _gcvvci1Score :: !(Maybe (Textual Double))
, _gcvvci1PixelFraction :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1ColorInfo
:: GoogleCloudVisionV1p2beta1ColorInfo
googleCloudVisionV1p2beta1ColorInfo =
GoogleCloudVisionV1p2beta1ColorInfo'
{ _gcvvci1Color = Nothing
, _gcvvci1Score = Nothing
, _gcvvci1PixelFraction = Nothing
}
gcvvci1Color :: Lens' GoogleCloudVisionV1p2beta1ColorInfo (Maybe Color)
gcvvci1Color
= lens _gcvvci1Color (\ s a -> s{_gcvvci1Color = a})
gcvvci1Score :: Lens' GoogleCloudVisionV1p2beta1ColorInfo (Maybe Double)
gcvvci1Score
= lens _gcvvci1Score (\ s a -> s{_gcvvci1Score = a})
. mapping _Coerce
gcvvci1PixelFraction :: Lens' GoogleCloudVisionV1p2beta1ColorInfo (Maybe Double)
gcvvci1PixelFraction
= lens _gcvvci1PixelFraction
(\ s a -> s{_gcvvci1PixelFraction = a})
. mapping _Coerce
instance FromJSON GoogleCloudVisionV1p2beta1ColorInfo
where
parseJSON
= withObject "GoogleCloudVisionV1p2beta1ColorInfo"
(\ o ->
GoogleCloudVisionV1p2beta1ColorInfo' <$>
(o .:? "color") <*> (o .:? "score") <*>
(o .:? "pixelFraction"))
instance ToJSON GoogleCloudVisionV1p2beta1ColorInfo
where
toJSON GoogleCloudVisionV1p2beta1ColorInfo'{..}
= object
(catMaybes
[("color" .=) <$> _gcvvci1Color,
("score" .=) <$> _gcvvci1Score,
("pixelFraction" .=) <$> _gcvvci1PixelFraction])
data GoogleCloudVisionV1p1beta1BoundingPoly = GoogleCloudVisionV1p1beta1BoundingPoly'
{ _gooNormalizedVertices :: !(Maybe [GoogleCloudVisionV1p1beta1NormalizedVertex])
, _gooVertices :: !(Maybe [GoogleCloudVisionV1p1beta1Vertex])
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1BoundingPoly
:: GoogleCloudVisionV1p1beta1BoundingPoly
googleCloudVisionV1p1beta1BoundingPoly =
GoogleCloudVisionV1p1beta1BoundingPoly'
{ _gooNormalizedVertices = Nothing
, _gooVertices = Nothing
}
gooNormalizedVertices :: Lens' GoogleCloudVisionV1p1beta1BoundingPoly [GoogleCloudVisionV1p1beta1NormalizedVertex]
gooNormalizedVertices
= lens _gooNormalizedVertices
(\ s a -> s{_gooNormalizedVertices = a})
. _Default
. _Coerce
gooVertices :: Lens' GoogleCloudVisionV1p1beta1BoundingPoly [GoogleCloudVisionV1p1beta1Vertex]
gooVertices
= lens _gooVertices (\ s a -> s{_gooVertices = a}) .
_Default
. _Coerce
instance FromJSON
GoogleCloudVisionV1p1beta1BoundingPoly where
parseJSON
= withObject "GoogleCloudVisionV1p1beta1BoundingPoly"
(\ o ->
GoogleCloudVisionV1p1beta1BoundingPoly' <$>
(o .:? "normalizedVertices" .!= mempty) <*>
(o .:? "vertices" .!= mempty))
instance ToJSON
GoogleCloudVisionV1p1beta1BoundingPoly where
toJSON GoogleCloudVisionV1p1beta1BoundingPoly'{..}
= object
(catMaybes
[("normalizedVertices" .=) <$>
_gooNormalizedVertices,
("vertices" .=) <$> _gooVertices])
data GoogleCloudVisionV1p1beta1WebDetectionWebImage = GoogleCloudVisionV1p1beta1WebDetectionWebImage'
{ _gcvvwdwi1Score :: !(Maybe (Textual Double))
, _gcvvwdwi1URL :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1WebDetectionWebImage
:: GoogleCloudVisionV1p1beta1WebDetectionWebImage
googleCloudVisionV1p1beta1WebDetectionWebImage =
GoogleCloudVisionV1p1beta1WebDetectionWebImage'
{ _gcvvwdwi1Score = Nothing
, _gcvvwdwi1URL = Nothing
}
gcvvwdwi1Score :: Lens' GoogleCloudVisionV1p1beta1WebDetectionWebImage (Maybe Double)
gcvvwdwi1Score
= lens _gcvvwdwi1Score
(\ s a -> s{_gcvvwdwi1Score = a})
. mapping _Coerce
gcvvwdwi1URL :: Lens' GoogleCloudVisionV1p1beta1WebDetectionWebImage (Maybe Text)
gcvvwdwi1URL
= lens _gcvvwdwi1URL (\ s a -> s{_gcvvwdwi1URL = a})
instance FromJSON
GoogleCloudVisionV1p1beta1WebDetectionWebImage where
parseJSON
= withObject
"GoogleCloudVisionV1p1beta1WebDetectionWebImage"
(\ o ->
GoogleCloudVisionV1p1beta1WebDetectionWebImage' <$>
(o .:? "score") <*> (o .:? "url"))
instance ToJSON
GoogleCloudVisionV1p1beta1WebDetectionWebImage where
toJSON
GoogleCloudVisionV1p1beta1WebDetectionWebImage'{..}
= object
(catMaybes
[("score" .=) <$> _gcvvwdwi1Score,
("url" .=) <$> _gcvvwdwi1URL])
data Position = Position'
{ _pZ :: !(Maybe (Textual Double))
, _pX :: !(Maybe (Textual Double))
, _pY :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
position
:: Position
position =
Position'
{ _pZ = Nothing
, _pX = Nothing
, _pY = Nothing
}
pZ :: Lens' Position (Maybe Double)
pZ = lens _pZ (\ s a -> s{_pZ = a}) . mapping _Coerce
pX :: Lens' Position (Maybe Double)
pX = lens _pX (\ s a -> s{_pX = a}) . mapping _Coerce
pY :: Lens' Position (Maybe Double)
pY = lens _pY (\ s a -> s{_pY = a}) . mapping _Coerce
instance FromJSON Position where
parseJSON
= withObject "Position"
(\ o ->
Position' <$>
(o .:? "z") <*> (o .:? "x") <*> (o .:? "y"))
instance ToJSON Position where
toJSON Position'{..}
= object
(catMaybes
[("z" .=) <$> _pZ, ("x" .=) <$> _pX,
("y" .=) <$> _pY])
newtype GoogleCloudVisionV1p3beta1GcsSource = GoogleCloudVisionV1p3beta1GcsSource'
{ _ggURI :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p3beta1GcsSource
:: GoogleCloudVisionV1p3beta1GcsSource
googleCloudVisionV1p3beta1GcsSource =
GoogleCloudVisionV1p3beta1GcsSource'
{ _ggURI = Nothing
}
ggURI :: Lens' GoogleCloudVisionV1p3beta1GcsSource (Maybe Text)
ggURI = lens _ggURI (\ s a -> s{_ggURI = a})
instance FromJSON GoogleCloudVisionV1p3beta1GcsSource
where
parseJSON
= withObject "GoogleCloudVisionV1p3beta1GcsSource"
(\ o ->
GoogleCloudVisionV1p3beta1GcsSource' <$>
(o .:? "uri"))
instance ToJSON GoogleCloudVisionV1p3beta1GcsSource
where
toJSON GoogleCloudVisionV1p3beta1GcsSource'{..}
= object (catMaybes [("uri" .=) <$> _ggURI])
newtype GoogleCloudVisionV1p2beta1LocationInfo = GoogleCloudVisionV1p2beta1LocationInfo'
{ _gooLatLng :: Maybe LatLng
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1LocationInfo
:: GoogleCloudVisionV1p2beta1LocationInfo
googleCloudVisionV1p2beta1LocationInfo =
GoogleCloudVisionV1p2beta1LocationInfo'
{ _gooLatLng = Nothing
}
gooLatLng :: Lens' GoogleCloudVisionV1p2beta1LocationInfo (Maybe LatLng)
gooLatLng
= lens _gooLatLng (\ s a -> s{_gooLatLng = a})
instance FromJSON
GoogleCloudVisionV1p2beta1LocationInfo where
parseJSON
= withObject "GoogleCloudVisionV1p2beta1LocationInfo"
(\ o ->
GoogleCloudVisionV1p2beta1LocationInfo' <$>
(o .:? "latLng"))
instance ToJSON
GoogleCloudVisionV1p2beta1LocationInfo where
toJSON GoogleCloudVisionV1p2beta1LocationInfo'{..}
= object (catMaybes [("latLng" .=) <$> _gooLatLng])
data NormalizedVertex = NormalizedVertex'
{ _nvX :: !(Maybe (Textual Double))
, _nvY :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
normalizedVertex
:: NormalizedVertex
normalizedVertex =
NormalizedVertex'
{ _nvX = Nothing
, _nvY = Nothing
}
nvX :: Lens' NormalizedVertex (Maybe Double)
nvX
= lens _nvX (\ s a -> s{_nvX = a}) . mapping _Coerce
nvY :: Lens' NormalizedVertex (Maybe Double)
nvY
= lens _nvY (\ s a -> s{_nvY = a}) . mapping _Coerce
instance FromJSON NormalizedVertex where
parseJSON
= withObject "NormalizedVertex"
(\ o ->
NormalizedVertex' <$> (o .:? "x") <*> (o .:? "y"))
instance ToJSON NormalizedVertex where
toJSON NormalizedVertex'{..}
= object
(catMaybes [("x" .=) <$> _nvX, ("y" .=) <$> _nvY])
data GoogleCloudVisionV1p1beta1OperationMetadata = GoogleCloudVisionV1p1beta1OperationMetadata'
{ _gooState :: !(Maybe GoogleCloudVisionV1p1beta1OperationMetadataState)
, _gooUpdateTime :: !(Maybe DateTime')
, _gooCreateTime :: !(Maybe DateTime')
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p1beta1OperationMetadata
:: GoogleCloudVisionV1p1beta1OperationMetadata
googleCloudVisionV1p1beta1OperationMetadata =
GoogleCloudVisionV1p1beta1OperationMetadata'
{ _gooState = Nothing
, _gooUpdateTime = Nothing
, _gooCreateTime = Nothing
}
gooState :: Lens' GoogleCloudVisionV1p1beta1OperationMetadata (Maybe GoogleCloudVisionV1p1beta1OperationMetadataState)
gooState = lens _gooState (\ s a -> s{_gooState = a})
gooUpdateTime :: Lens' GoogleCloudVisionV1p1beta1OperationMetadata (Maybe UTCTime)
gooUpdateTime
= lens _gooUpdateTime
(\ s a -> s{_gooUpdateTime = a})
. mapping _DateTime
gooCreateTime :: Lens' GoogleCloudVisionV1p1beta1OperationMetadata (Maybe UTCTime)
gooCreateTime
= lens _gooCreateTime
(\ s a -> s{_gooCreateTime = a})
. mapping _DateTime
instance FromJSON
GoogleCloudVisionV1p1beta1OperationMetadata where
parseJSON
= withObject
"GoogleCloudVisionV1p1beta1OperationMetadata"
(\ o ->
GoogleCloudVisionV1p1beta1OperationMetadata' <$>
(o .:? "state") <*> (o .:? "updateTime") <*>
(o .:? "createTime"))
instance ToJSON
GoogleCloudVisionV1p1beta1OperationMetadata where
toJSON
GoogleCloudVisionV1p1beta1OperationMetadata'{..}
= object
(catMaybes
[("state" .=) <$> _gooState,
("updateTime" .=) <$> _gooUpdateTime,
("createTime" .=) <$> _gooCreateTime])
newtype GoogleCloudVisionV1p2beta1GcsDestination = GoogleCloudVisionV1p2beta1GcsDestination'
{ _gcvvgdcURI :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudVisionV1p2beta1GcsDestination
:: GoogleCloudVisionV1p2beta1GcsDestination
googleCloudVisionV1p2beta1GcsDestination =
GoogleCloudVisionV1p2beta1GcsDestination'
{ _gcvvgdcURI = Nothing
}
gcvvgdcURI :: Lens' GoogleCloudVisionV1p2beta1GcsDestination (Maybe Text)
gcvvgdcURI
= lens _gcvvgdcURI (\ s a -> s{_gcvvgdcURI = a})
instance FromJSON
GoogleCloudVisionV1p2beta1GcsDestination where
parseJSON
= withObject
"GoogleCloudVisionV1p2beta1GcsDestination"
(\ o ->
GoogleCloudVisionV1p2beta1GcsDestination' <$>
(o .:? "uri"))
instance ToJSON
GoogleCloudVisionV1p2beta1GcsDestination where
toJSON GoogleCloudVisionV1p2beta1GcsDestination'{..}
= object (catMaybes [("uri" .=) <$> _gcvvgdcURI])