{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-maps/json-schema/google-maps-batch-update-photos-request-schema.json",
  "title": "BatchUpdatePhotosRequest",
  "description": "Request to update the metadata of photos. Updating the pixels of photos is not supported.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-maps-streetviewpublish-photos-api-openapi.yml#/components/schemas/BatchUpdatePhotosRequest",
  "properties": {
    "updatePhotoRequests": {
      "items": {
        "$ref": "#/$defs/UpdatePhotoRequest"
      },
      "description": "Required. List of UpdatePhotoRequests.",
      "type": "array"
    }
  },
  "type": "object",
  "$defs": {
    "Connection": {
      "properties": {
        "target": {
          "$ref": "#/$defs/PhotoId",
          "description": "Required. The destination of the connection from the containing photo to another photo."
        }
      },
      "type": "object",
      "description": "A connection is the link from a source photo to a destination photo."
    },
    "LatLng": {
      "type": "object",
      "properties": {
        "latitude": {
          "type": "number",
          "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].",
          "format": "double"
        },
        "longitude": {
          "format": "double",
          "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].",
          "type": "number"
        }
      },
      "description": "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."
    },
    "Level": {
      "properties": {
        "number": {
          "description": "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.",
          "format": "double",
          "type": "number"
        },
        "name": {
          "type": "string",
          "description": "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."
        }
      },
      "type": "object",
      "description": "Level information containing level number and its corresponding name."
    },
    "Photo": {
      "properties": {
        "pose": {
          "$ref": "#/$defs/Pose",
          "description": "Optional. Pose of the photo."
        },
        "places": {
          "items": {
            "$ref": "#/$defs/Place"
          },
          "description": "Optional. Places where this photo belongs.",
          "type": "array"
        },
        "captureTime": {
          "description": "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.",
          "type": "string",
          "format": "google-datetime"
        },
        "mapsPublishStatus": {
          "readOnly": true,
          "description": "Output only. Status in Google Maps, whether this photo was published or rejected.",
          "enum": [
            "UNSPECIFIED_MAPS_PUBLISH_STATUS",
            "PUBLISHED",
            "REJECTED_UNKNOWN"
          ],
          "type": "string"
        },
        "transferStatus": {
          "enum": [
            "TRANSFER_STATUS_UNKNOWN",
            "NEVER_TRANSFERRED",
            "PENDING",
            "COMPLETED",
            "REJECTED",
            "EXPIRED",
            "CANCELLED",
            "RECEIVED_VIA_TRANSFER"
          ],
          "type": "string",
          "readOnly": true,
          "description": "Output only. Status of rights transfer on this photo."
        },
        "uploadTime": {
          "description": "Output only. Time when the image was uploaded.",
          "format": "google-datetime",
          "type": "string",
          "readOnly": true
        },
        "downloadUrl": {
          "type": "string",
          "description": "Output only. The download URL for the photo bytes. This field is set only when GetPhotoRequest.view is set to PhotoView.INCLUDE_DOWNLOAD_URL.",
          "readOnly": true
        },
        "viewCount": {
          "description": "Output only. View count of the photo.",
          "type": "string",
          "format": "int64",
          "readOnly": true
        },
        "connections": {
          "description": "Optional. Connections to other photos. A connection represents the link from this photo to another photo.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/Connection"
          }
        },
        "thumbnailUrl": {
          "readOnly": true,
          "type": "string",
          "description": "Output only. The thumbnail URL for showing a preview of the given photo."
        },
        "photoId": {
          "$ref": "#/$defs/PhotoId",
          "description": "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."
        },
        "shareLink": {
          "readOnly": true,
          "type": "string",
          "description": "Output only. The share link for the photo."
        },
        "uploadReference": {
          "$ref": "#/$defs/UploadRef",
          "description": "Input only. Required when creating a photo. Input only. The resource URL where the photo bytes are uploaded to."
        }
      },
      "type": "object",
      "description": "Photo is used to store 360 photos along with photo metadata."
    },
    "PhotoId": {
      "properties": {
        "id": {
          "description": "A unique identifier for a photo.",
          "type": "string"
        }
      },
      "type": "object",
      "description": "Identifier for a Photo."
    },
    "Place": {
      "type": "object",
      "description": "Place metadata for an entity.",
      "properties": {
        "languageCode": {
          "readOnly": true,
          "type": "string",
          "description": "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."
        },
        "placeId": {
          "description": "Place identifier, as described in https://developers.google.com/places/place-id.",
          "type": "string"
        },
        "name": {
          "type": "string",
          "description": "Output only. The name of the place, localized to the language_code.",
          "readOnly": true
        }
      }
    },
    "Pose": {
      "properties": {
        "heading": {
          "type": "number",
          "description": "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.",
          "format": "double"
        },
        "accuracyMeters": {
          "format": "float",
          "type": "number",
          "description": "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."
        },
        "roll": {
          "format": "double",
          "description": "Roll, measured in degrees. Value must be >= 0 and <360. A value of 0 means level with the horizon. NaN indicates an unmeasured quantity.",
          "type": "number"
        },
        "altitude": {
          "type": "number",
          "format": "double",
          "description": "Altitude of the pose in meters above WGS84 ellipsoid. NaN indicates an unmeasured quantity."
        },
        "pitch": {
          "type": "number",
          "description": "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.",
          "format": "double"
        },
        "gpsRecordTimestampUnixEpoch": {
          "type": "string",
          "description": "Time of the GPS record since UTC epoch.",
          "format": "google-datetime"
        },
        "latLngPair": {
          "$ref": "#/$defs/LatLng",
          "description": "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."
        },
        "level": {
          "$ref": "#/$defs/Level",
          "description": "Level (the floor in a building) used to configure vertical navigation."
        }
      },
      "description": "Raw pose measurement for an entity.",
      "type": "object"
    },
    "UpdatePhotoRequest": {
      "properties": {
        "photo": {
          "$ref": "#/$defs/Photo",
          "description": "Required. Photo object containing the new metadata."
        },
        "updateMask": {
          "type": "string",
          "description": "Required. Mask that identifies fields on the photo metadata to update. If not present, the old Photo metadata is 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.lat_lng_pair` * `pose.pitch` * `pose.roll` * `pose.level` * `pose.altitude` * `connections` * `places` > Note: When updateMask contains repeated fields, the entire set of repeated values get replaced with the new contents. For example, if updateMask contains `connections` and `UpdatePhotoRequest.photo.connections` is empty, all connections are removed.",
          "format": "google-fieldmask"
        }
      },
      "type": "object",
      "description": "Request to update the metadata of a Photo. Updating the pixels of a photo is not supported."
    },
    "UploadRef": {
      "type": "object",
      "properties": {
        "uploadUrl": {
          "description": "An upload reference should be unique for each user. It follows the form: \"https://streetviewpublish.googleapis.com/media/user/{account_id}/photo/{upload_reference}\"",
          "type": "string"
        }
      },
      "description": "Upload reference for media files."
    }
  }
}