Copyright | (c) 2015-2016 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Updates the metadata of a Photo, such as pose, place association, connections, etc. Changing the pixels of a photo is not supported. Only the fields specified in the updateMask field are used. If `updateMask` is not present, the update applies to all fields. Note: To update Pose.altitude, Pose.latLngPair has to be filled as well. Otherwise, the request will fail. This method returns the following error codes: * google.rpc.Code.PERMISSION_DENIED if the requesting user did not create the requested photo. * google.rpc.Code.INVALID_ARGUMENT if the request is malformed. * google.rpc.Code.NOT_FOUND if the requested photo does not exist. * google.rpc.Code.UNAVAILABLE if the requested Photo is still being indexed.
See: Street View Publish API Reference for streetviewpublish.photo.update
.
Synopsis
- type PhotoUpdateResource = "v1" :> ("photo" :> (Capture "id" Text :> (QueryParam "$.xgafv" Xgafv :> (QueryParam "upload_protocol" Text :> (QueryParam "updateMask" GFieldMask :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Photo :> Put '[JSON] Photo))))))))))
- photoUpdate :: Photo -> Text -> PhotoUpdate
- data PhotoUpdate
- puXgafv :: Lens' PhotoUpdate (Maybe Xgafv)
- puUploadProtocol :: Lens' PhotoUpdate (Maybe Text)
- puUpdateMask :: Lens' PhotoUpdate (Maybe GFieldMask)
- puAccessToken :: Lens' PhotoUpdate (Maybe Text)
- puUploadType :: Lens' PhotoUpdate (Maybe Text)
- puPayload :: Lens' PhotoUpdate Photo
- puId :: Lens' PhotoUpdate Text
- puCallback :: Lens' PhotoUpdate (Maybe Text)
REST Resource
type PhotoUpdateResource = "v1" :> ("photo" :> (Capture "id" Text :> (QueryParam "$.xgafv" Xgafv :> (QueryParam "upload_protocol" Text :> (QueryParam "updateMask" GFieldMask :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Photo :> Put '[JSON] Photo)))))))))) Source #
A resource alias for streetviewpublish.photo.update
method which the
PhotoUpdate
request conforms to.
Creating a Request
:: Photo | |
-> Text | |
-> PhotoUpdate |
Creates a value of PhotoUpdate
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data PhotoUpdate Source #
Updates the metadata of a Photo, such as pose, place association, connections, etc. Changing the pixels of a photo is not supported. Only the fields specified in the updateMask field are used. If `updateMask` is not present, the update applies to all fields. Note: To update Pose.altitude, Pose.latLngPair has to be filled as well. Otherwise, the request will fail. This method returns the following error codes: * google.rpc.Code.PERMISSION_DENIED if the requesting user did not create the requested photo. * google.rpc.Code.INVALID_ARGUMENT if the request is malformed. * google.rpc.Code.NOT_FOUND if the requested photo does not exist. * google.rpc.Code.UNAVAILABLE if the requested Photo is still being indexed.
See: photoUpdate
smart constructor.
Instances
Request Lenses
puUploadProtocol :: Lens' PhotoUpdate (Maybe Text) Source #
Upload protocol for media (e.g. "raw", "multipart").
puUpdateMask :: Lens' PhotoUpdate (Maybe GFieldMask) Source #
Mask that identifies fields on the photo metadata to update. If not present, the old Photo metadata will be entirely replaced with the new Photo metadata in this request. The update fails if invalid fields are specified. Multiple fields can be specified in a comma-delimited list. The following fields are valid: * `pose.heading` * `pose.latLngPair` * `pose.pitch` * `pose.roll` * `pose.level` * `pose.altitude` * `connections` * `places` Note: Repeated fields in updateMask mean the entire set of repeated values will be replaced with the new contents. For example, if updateMask contains `connections` and `UpdatePhotoRequest.photo.connections` is empty, all connections will be removed.
puAccessToken :: Lens' PhotoUpdate (Maybe Text) Source #
OAuth access token.
puUploadType :: Lens' PhotoUpdate (Maybe Text) Source #
Legacy upload protocol for media (e.g. "media", "multipart").
puCallback :: Lens' PhotoUpdate (Maybe Text) Source #
JSONP