Street View Publish API . photoSequence

Instance Methods

close()

Close httplib2 connections.

create(body=None, inputType=None, x__xgafv=None)

After the client finishes uploading the PhotoSequence with the returned UploadRef, CreatePhotoSequence extracts a sequence of 360 photos from a video or Extensible Device Metadata (XDM, http://www.xdm.org/) to be published to Street View on Google Maps. `CreatePhotoSequence` returns an Operation, with the PhotoSequence Id set in the `Operation.name` field. This method returns the following error codes: * google.rpc.Code.INVALID_ARGUMENT if the request is malformed. * google.rpc.Code.NOT_FOUND if the upload reference does not exist.

delete(sequenceId, x__xgafv=None)

Deletes a PhotoSequence and its metadata. This method returns the following error codes: * google.rpc.Code.PERMISSION_DENIED if the requesting user did not create the requested photo sequence. * google.rpc.Code.NOT_FOUND if the photo sequence ID does not exist. * google.rpc.Code.FAILED_PRECONDITION if the photo sequence ID is not yet finished processing.

get(sequenceId, filter=None, view=None, x__xgafv=None)

Gets the metadata of the specified PhotoSequence via the Operation interface. This method returns the following three types of responses: * `Operation.done` = false, if the processing of PhotoSequence is not finished yet. * `Operation.done` = true and `Operation.error` is populated, if there was an error in processing. * `Operation.done` = true and `Operation.response` is poulated, which contains a PhotoSequence message. This method returns the following error codes: * google.rpc.Code.PERMISSION_DENIED if the requesting user did not create the requested PhotoSequence. * google.rpc.Code.NOT_FOUND if the requested PhotoSequence does not exist.

startUpload(body=None, x__xgafv=None)

Creates an upload session to start uploading photo sequence data. The upload URL of the returned UploadRef is used to upload the data for the `photoSequence`. After the upload is complete, the UploadRef is used with CreatePhotoSequence to create the PhotoSequence object entry.

Method Details

close()
Close httplib2 connections.
create(body=None, inputType=None, x__xgafv=None)
After the client finishes uploading the PhotoSequence with the returned UploadRef, CreatePhotoSequence extracts a sequence of 360 photos from a video or Extensible Device Metadata (XDM, http://www.xdm.org/) to be published to Street View on Google Maps. `CreatePhotoSequence` returns an Operation, with the PhotoSequence Id set in the `Operation.name` field. This method returns the following error codes: * google.rpc.Code.INVALID_ARGUMENT if the request is malformed. * google.rpc.Code.NOT_FOUND if the upload reference does not exist.

Args:
  body: object, The request body.
    The object takes the form of:

{ # A sequence of 360 photos along with metadata.
  "captureTimeOverride": "A String", # Optional. Absolute time when the photo sequence starts to be captured. If the photo sequence is a video, this is the start time of the video. If this field is populated in input, it overrides the capture time in the video or XDM file.
  "distanceMeters": 3.14, # Output only. The computed distance of the photo sequence in meters.
  "failureDetails": { # Additional details to accompany the ProcessingFailureReason enum. This message is always expected to be used in conjunction with ProcessingFailureReason, and the oneof value set in this message should match the FailureReason. # Output only. If this sequence has `failure_reason` set, this may contain additional details about the failure.
    "gpsDataGapDetails": { # Details related to ProcessingFailureReason#GPS_DATA_GAP. If there are multiple GPS data gaps, only the one with the largest duration is reported here. # See GpsDataGapFailureDetails.
      "gapDuration": "A String", # The duration of the gap in GPS data that was found.
      "gapStartTime": "A String", # Relative time (from the start of the video stream) when the gap started.
    },
    "imuDataGapDetails": { # Details related to ProcessingFailureReason#IMU_DATA_GAP. If there are multiple IMU data gaps, only the one with the largest duration is reported here. # See ImuDataGapFailureDetails.
      "gapDuration": "A String", # The duration of the gap in IMU data that was found.
      "gapStartTime": "A String", # Relative time (from the start of the video stream) when the gap started.
    },
    "insufficientGpsDetails": { # Details related to ProcessingFailureReason#INSUFFICIENT_GPS. # See InsufficientGpsFailureDetails.
      "gpsPointsFound": 42, # The number of GPS points that were found in the video.
    },
    "noOverlapGpsDetails": { # Details related to PhotoSequenceProcessingFailureReason#NO_OVERLAP_GPS. # See NoOverlapGpsFailureDetails.
      "gpsEndTime": "A String", # Time of last recorded GPS point.
      "gpsStartTime": "A String", # Time of first recorded GPS point.
      "videoEndTime": "A String", # End time of video.
      "videoStartTime": "A String", # Start time of video.
    },
    "notOutdoorsDetails": { # Details related to ProcessingFailureReason#NOT_OUTDOORS. If there are multiple indoor frames found, the first frame is recorded here. # See NotOutdoorsFailureDetails.
      "startTime": "A String", # Relative time (from the start of the video stream) when an indoor frame was found.
    },
  },
  "failureReason": "A String", # Output only. If this sequence has processing_state = FAILED, this will contain the reason why it failed. If the processing_state is any other value, this field will be unset.
  "filename": "A String", # Output only. The filename of the upload. Does not include the directory path. Only available if the sequence was uploaded on a platform that provides the filename.
  "gpsSource": "A String", # Input only. If both raw_gps_timeline and the Camera Motion Metadata Track (CAMM) contain GPS measurements, indicate which takes precedence.
  "id": "A String", # Output only. Unique identifier for the photo sequence. This also acts as a long running operation ID if uploading is performed asynchronously.
  "imu": { # IMU data from the device sensors. # Input only. Three axis IMU data for the collection. If this data is too large to put in the request, then it should be put in the CAMM track for the video. This data always takes precedence over the equivalent CAMM data, if it exists.
    "accelMpsps": [ # The accelerometer measurements in meters/sec^2 with increasing timestamps from devices.
      { # A Generic 3d measurement sample.
        "captureTime": "A String", # The timestamp of the IMU measurement.
        "x": 3.14, # The sensor measurement in the x axis.
        "y": 3.14, # The sensor measurement in the y axis.
        "z": 3.14, # The sensor measurement in the z axis.
      },
    ],
    "gyroRps": [ # The gyroscope measurements in radians/sec with increasing timestamps from devices.
      { # A Generic 3d measurement sample.
        "captureTime": "A String", # The timestamp of the IMU measurement.
        "x": 3.14, # The sensor measurement in the x axis.
        "y": 3.14, # The sensor measurement in the y axis.
        "z": 3.14, # The sensor measurement in the z axis.
      },
    ],
    "magUt": [ # The magnetometer measurements of the magnetic field in microtesla (uT) with increasing timestamps from devices.
      { # A Generic 3d measurement sample.
        "captureTime": "A String", # The timestamp of the IMU measurement.
        "x": 3.14, # The sensor measurement in the x axis.
        "y": 3.14, # The sensor measurement in the y axis.
        "z": 3.14, # The sensor measurement in the z axis.
      },
    ],
  },
  "photos": [ # Output only. Photos with increasing timestamps.
    { # Photo is used to store 360 photos along with photo metadata.
      "captureTime": "A String", # Optional. Absolute time when the photo was captured. When the photo has no exif timestamp, this is used to set a timestamp in the photo metadata.
      "connections": [ # Optional. Connections to other photos. A connection represents the link from this photo to another photo.
        { # A connection is the link from a source photo to a destination photo.
          "target": { # Identifier for a Photo. # Required. The destination of the connection from the containing photo to another photo.
            "id": "A String", # A unique identifier for a photo.
          },
        },
      ],
      "downloadUrl": "A String", # Output only. The download URL for the photo bytes. This field is set only when GetPhotoRequest.view is set to PhotoView.INCLUDE_DOWNLOAD_URL.
      "mapsPublishStatus": "A String", # Output only. Status in Google Maps, whether this photo was published or rejected.
      "photoId": { # Identifier for a Photo. # Required. Output only. Required when updating a photo. Output only when creating a photo. Identifier for the photo, which is unique among all photos in Google.
        "id": "A String", # A unique identifier for a photo.
      },
      "places": [ # Optional. Places where this photo belongs.
        { # Place metadata for an entity.
          "languageCode": "A String", # Output only. The language_code that the name is localized with. This should be the language_code specified in the request, but may be a fallback.
          "name": "A String", # Output only. The name of the place, localized to the language_code.
          "placeId": "A String", # Place identifier, as described in https://developers.google.com/places/place-id.
        },
      ],
      "pose": { # Raw pose measurement for an entity. # Optional. Pose of the photo.
        "accuracyMeters": 3.14, # The estimated horizontal accuracy of this pose in meters with 68% confidence (one standard deviation). For example, on Android, this value is available from this method: https://developer.android.com/reference/android/location/Location#getAccuracy(). Other platforms have different methods of obtaining similar accuracy estimations.
        "altitude": 3.14, # Altitude of the pose in meters above WGS84 ellipsoid. NaN indicates an unmeasured quantity.
        "gpsRecordTimestampUnixEpoch": "A String", # Time of the GPS record since UTC epoch.
        "heading": 3.14, # The following pose parameters pertain to the center of the photo. They match https://developers.google.com/streetview/spherical-metadata. Compass heading, measured at the center of the photo in degrees clockwise from North. Value must be >=0 and <360. NaN indicates an unmeasured quantity.
        "latLngPair": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # Latitude and longitude pair of the pose, as explained here: https://cloud.google.com/datastore/docs/reference/rest/Shared.Types/LatLng When creating a Photo, if the latitude and longitude pair are not provided, the geolocation from the exif header is used. A latitude and longitude pair not provided in the photo or exif header causes the photo process to fail.
          "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
          "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
        },
        "level": { # Level information containing level number and its corresponding name. # Level (the floor in a building) used to configure vertical navigation.
          "name": "A String", # Required. A name assigned to this Level, restricted to 3 characters. Consider how the elevator buttons would be labeled for this level if there was an elevator.
          "number": 3.14, # Optional. Floor number, used for ordering. 0 indicates the ground level, 1 indicates the first level above ground level, -1 indicates the first level under ground level. Non-integer values are OK.
        },
        "pitch": 3.14, # Pitch, measured at the center of the photo in degrees. Value must be >=-90 and <= 90. A value of -90 means looking directly down, and a value of 90 means looking directly up. NaN indicates an unmeasured quantity.
        "roll": 3.14, # Roll, measured in degrees. Value must be >= 0 and <360. A value of 0 means level with the horizon. NaN indicates an unmeasured quantity.
      },
      "shareLink": "A String", # Output only. The share link for the photo.
      "thumbnailUrl": "A String", # Output only. The thumbnail URL for showing a preview of the given photo.
      "transferStatus": "A String", # Output only. Status of rights transfer on this photo.
      "uploadReference": { # Upload reference for media files. # Input only. Required when creating a photo. Input only. The resource URL where the photo bytes are uploaded to.
        "uploadUrl": "A String", # An upload reference should be unique for each user. It follows the form: "https://streetviewpublish.googleapis.com/media/user/{account_id}/photo/{upload_reference}"
      },
      "uploadTime": "A String", # Output only. Time when the image was uploaded.
      "viewCount": "A String", # Output only. View count of the photo.
    },
  ],
  "processingState": "A String", # Output only. The processing state of this sequence.
  "rawGpsTimeline": [ # Input only. Raw GPS measurements with increasing timestamps from the device that aren't time synced with each photo. These raw measurements will be used to infer the pose of each frame. Required in input when InputType is VIDEO and raw GPS measurements are not in Camera Motion Metadata Track (CAMM). User can indicate which takes precedence using gps_source if raw GPS measurements are provided in both raw_gps_timeline and Camera Motion Metadata Track (CAMM).
    { # Raw pose measurement for an entity.
      "accuracyMeters": 3.14, # The estimated horizontal accuracy of this pose in meters with 68% confidence (one standard deviation). For example, on Android, this value is available from this method: https://developer.android.com/reference/android/location/Location#getAccuracy(). Other platforms have different methods of obtaining similar accuracy estimations.
      "altitude": 3.14, # Altitude of the pose in meters above WGS84 ellipsoid. NaN indicates an unmeasured quantity.
      "gpsRecordTimestampUnixEpoch": "A String", # Time of the GPS record since UTC epoch.
      "heading": 3.14, # The following pose parameters pertain to the center of the photo. They match https://developers.google.com/streetview/spherical-metadata. Compass heading, measured at the center of the photo in degrees clockwise from North. Value must be >=0 and <360. NaN indicates an unmeasured quantity.
      "latLngPair": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # Latitude and longitude pair of the pose, as explained here: https://cloud.google.com/datastore/docs/reference/rest/Shared.Types/LatLng When creating a Photo, if the latitude and longitude pair are not provided, the geolocation from the exif header is used. A latitude and longitude pair not provided in the photo or exif header causes the photo process to fail.
        "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
        "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
      },
      "level": { # Level information containing level number and its corresponding name. # Level (the floor in a building) used to configure vertical navigation.
        "name": "A String", # Required. A name assigned to this Level, restricted to 3 characters. Consider how the elevator buttons would be labeled for this level if there was an elevator.
        "number": 3.14, # Optional. Floor number, used for ordering. 0 indicates the ground level, 1 indicates the first level above ground level, -1 indicates the first level under ground level. Non-integer values are OK.
      },
      "pitch": 3.14, # Pitch, measured at the center of the photo in degrees. Value must be >=-90 and <= 90. A value of -90 means looking directly down, and a value of 90 means looking directly up. NaN indicates an unmeasured quantity.
      "roll": 3.14, # Roll, measured in degrees. Value must be >= 0 and <360. A value of 0 means level with the horizon. NaN indicates an unmeasured quantity.
    },
  ],
  "sequenceBounds": { # A rectangle in geographical coordinates. # Output only. A rectangular box that encapsulates every image in this photo sequence.
    "northeast": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # The northeast corner of these bounds.
      "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
      "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
    },
    "southwest": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # The southwest corner of these bounds.
      "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
      "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
    },
  },
  "uploadReference": { # Upload reference for media files. # Input only. Required when creating photo sequence. The resource name where the bytes of the photo sequence (in the form of video) are uploaded.
    "uploadUrl": "A String", # An upload reference should be unique for each user. It follows the form: "https://streetviewpublish.googleapis.com/media/user/{account_id}/photo/{upload_reference}"
  },
  "uploadTime": "A String", # Output only. The time this photo sequence was created in uSV Store service.
  "viewCount": "A String", # Output only. The total number of views that all the published images in this PhotoSequence have received.
}

  inputType: string, Required. The input form of PhotoSequence.
    Allowed values
      INPUT_TYPE_UNSPECIFIED - Not specified. Server will return google.rpc.Code.INVALID_ARGUMENT.
      VIDEO - 360 Video.
      XDM - Extensible Device Metadata, http://www.xdm.org
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # This resource represents a long-running operation that is the result of a network API call.
  "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
  "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
    "code": 42, # The status code, which should be an enum value of google.rpc.Code.
    "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
      {
        "a_key": "", # Properties of the object. Contains field @type with type URL.
      },
    ],
    "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  },
  "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
    "a_key": "", # Properties of the object. Contains field @type with type URL.
  },
  "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
  "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
    "a_key": "", # Properties of the object. Contains field @type with type URL.
  },
}
delete(sequenceId, x__xgafv=None)
Deletes a PhotoSequence and its metadata. This method returns the following error codes: * google.rpc.Code.PERMISSION_DENIED if the requesting user did not create the requested photo sequence. * google.rpc.Code.NOT_FOUND if the photo sequence ID does not exist. * google.rpc.Code.FAILED_PRECONDITION if the photo sequence ID is not yet finished processing.

Args:
  sequenceId: string, Required. ID of the PhotoSequence. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
}
get(sequenceId, filter=None, view=None, x__xgafv=None)
Gets the metadata of the specified PhotoSequence via the Operation interface. This method returns the following three types of responses: * `Operation.done` = false, if the processing of PhotoSequence is not finished yet. * `Operation.done` = true and `Operation.error` is populated, if there was an error in processing. * `Operation.done` = true and `Operation.response` is poulated, which contains a PhotoSequence message. This method returns the following error codes: * google.rpc.Code.PERMISSION_DENIED if the requesting user did not create the requested PhotoSequence. * google.rpc.Code.NOT_FOUND if the requested PhotoSequence does not exist.

Args:
  sequenceId: string, Required. ID of the photo sequence. (required)
  filter: string, Optional. The filter expression. For example: `published_status=PUBLISHED`. The filters supported are: `published_status`. See https://google.aip.dev/160 for more information.
  view: string, Specifies if a download URL for the photo sequence should be returned in `download_url` of individual photos in the PhotoSequence response. > Note: Currently not implemented.
    Allowed values
      BASIC - Server responses do not include the download URL for the photo bytes. The default value.
      INCLUDE_DOWNLOAD_URL - Server responses include the download URL for the photo bytes.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # This resource represents a long-running operation that is the result of a network API call.
  "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
  "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
    "code": 42, # The status code, which should be an enum value of google.rpc.Code.
    "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
      {
        "a_key": "", # Properties of the object. Contains field @type with type URL.
      },
    ],
    "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  },
  "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
    "a_key": "", # Properties of the object. Contains field @type with type URL.
  },
  "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
  "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
    "a_key": "", # Properties of the object. Contains field @type with type URL.
  },
}
startUpload(body=None, x__xgafv=None)
Creates an upload session to start uploading photo sequence data. The upload URL of the returned UploadRef is used to upload the data for the `photoSequence`. After the upload is complete, the UploadRef is used with CreatePhotoSequence to create the PhotoSequence object entry.

Args:
  body: object, The request body.
    The object takes the form of:

{ # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Upload reference for media files.
  "uploadUrl": "A String", # An upload reference should be unique for each user. It follows the form: "https://streetviewpublish.googleapis.com/media/user/{account_id}/photo/{upload_reference}"
}