Skip to content

Commit

Permalink
feat: expand ProcessingFailureReason options and add details for NoOv…
Browse files Browse the repository at this point in the history
…erlapGpsFailure

docs: Update client libraries for Street View Publish API

PiperOrigin-RevId: 623275453
  • Loading branch information
Google APIs authored and Copybara-Service committed Apr 9, 2024
1 parent bbcce1d commit 92b4564
Show file tree
Hide file tree
Showing 5 changed files with 218 additions and 107 deletions.
36 changes: 27 additions & 9 deletions google/streetview/publish/v1/BUILD.bazel
Expand Up @@ -9,14 +9,17 @@
# * extra_protoc_file_parameters
# The complete list of preserved parameters can be found in the source code.

# buildifier: disable=load-on-top

# This is an API workspace, having public visibility by default makes perfect sense.
package(default_visibility = ["//visibility:public"])

##############################################################################
# Common
##############################################################################
load("@rules_proto//proto:defs.bzl", "proto_library")
# buildifier: disable=same-origin-load
load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
load("@rules_proto//proto:defs.bzl", "proto_library")

proto_library(
name = "publish_proto",
Expand All @@ -29,6 +32,7 @@ proto_library(
"//google/api:annotations_proto",
"//google/api:client_proto",
"//google/api:field_behavior_proto",
"//google/api:resource_proto",
"//google/longrunning:operations_proto",
"//google/rpc:status_proto",
"//google/type:latlng_proto",
Expand All @@ -50,6 +54,7 @@ proto_library_with_info(
##############################################################################
# Java
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"java_gapic_assembly_gradle_pkg",
Expand All @@ -76,7 +81,7 @@ java_gapic_library(
gapic_yaml = "streetview_publish_gapic.yaml",
grpc_service_config = "streetview_publish_grpc_service_config.json",
rest_numeric_enums = True,
service_yaml = "streetviewpublish.yaml",
service_yaml = "streetview_publish.yaml",
test_deps = [
":publish_java_grpc",
],
Expand Down Expand Up @@ -112,6 +117,7 @@ java_gapic_assembly_gradle_pkg(
##############################################################################
# Go
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"go_gapic_assembly_pkg",
Expand All @@ -138,8 +144,9 @@ go_gapic_library(
grpc_service_config = "streetview_publish_grpc_service_config.json",
importpath = "google.golang.org/google/streetview/publish/v1;publish",
metadata = True,
release_level = "beta",
rest_numeric_enums = True,
service_yaml = "streetviewpublish.yaml",
service_yaml = "streetview_publish.yaml",
transport = "grpc+rest",
deps = [
":publish_go_proto",
Expand All @@ -165,18 +172,20 @@ go_gapic_assembly_pkg(
##############################################################################
# Python
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"py_gapic_assembly_pkg",
"py_gapic_library",
"py_test",
)

py_gapic_library(
name = "publish_py_gapic",
srcs = [":publish_proto"],
grpc_service_config = "streetview_publish_grpc_service_config.json",
rest_numeric_enums = True,
service_yaml = "streetviewpublish.yaml",
service_yaml = "streetview_publish.yaml",
transport = "grpc+rest",
deps = [
],
Expand All @@ -203,6 +212,7 @@ py_gapic_assembly_pkg(
##############################################################################
# PHP
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"php_gapic_assembly_pkg",
Expand All @@ -219,10 +229,13 @@ php_gapic_library(
name = "publish_php_gapic",
srcs = [":publish_proto_with_info"],
grpc_service_config = "streetview_publish_grpc_service_config.json",
migration_mode = "PRE_MIGRATION_SURFACE_ONLY",
rest_numeric_enums = True,
service_yaml = "streetviewpublish.yaml",
service_yaml = "streetview_publish.yaml",
transport = "grpc+rest",
deps = [":publish_php_proto"],
deps = [
":publish_php_proto",
],
)

# Open Source Packages
Expand All @@ -237,6 +250,7 @@ php_gapic_assembly_pkg(
##############################################################################
# Node.js
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"nodejs_gapic_assembly_pkg",
Expand All @@ -251,7 +265,7 @@ nodejs_gapic_library(
grpc_service_config = "streetview_publish_grpc_service_config.json",
package = "google.streetview.publish.v1",
rest_numeric_enums = True,
service_yaml = "streetviewpublish.yaml",
service_yaml = "streetview_publish.yaml",
transport = "grpc+rest",
deps = [],
)
Expand All @@ -267,6 +281,7 @@ nodejs_gapic_assembly_pkg(
##############################################################################
# Ruby
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"ruby_cloud_gapic_library",
Expand All @@ -292,7 +307,7 @@ ruby_cloud_gapic_library(
extra_protoc_parameters = ["ruby-cloud-gem-name=google-cloud-publish-v1"],
grpc_service_config = "streetview_publish_grpc_service_config.json",
rest_numeric_enums = True,
service_yaml = "streetviewpublish.yaml",
service_yaml = "streetview_publish.yaml",
transport = "grpc+rest",
deps = [
":publish_ruby_grpc",
Expand All @@ -313,6 +328,7 @@ ruby_gapic_assembly_pkg(
##############################################################################
# C#
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"csharp_gapic_assembly_pkg",
Expand All @@ -323,6 +339,7 @@ load(

csharp_proto_library(
name = "publish_csharp_proto",
extra_opts = [],
deps = [":publish_proto"],
)

Expand All @@ -338,7 +355,7 @@ csharp_gapic_library(
common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
grpc_service_config = "streetview_publish_grpc_service_config.json",
rest_numeric_enums = True,
service_yaml = "streetviewpublish.yaml",
service_yaml = "streetview_publish.yaml",
transport = "grpc+rest",
deps = [
":publish_csharp_grpc",
Expand All @@ -359,6 +376,7 @@ csharp_gapic_assembly_pkg(
##############################################################################
# C++
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"cc_grpc_library",
Expand Down
120 changes: 79 additions & 41 deletions google/streetview/publish/v1/resources.proto
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -17,6 +17,7 @@ syntax = "proto3";
package google.streetview.publish.v1;

import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
import "google/type/latlng.proto";
Expand Down Expand Up @@ -44,9 +45,9 @@ message PhotoId {

// Level information containing level number and its corresponding name.
message Level {
// 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.
// 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.
double number = 1 [(google.api.field_behavior) = OPTIONAL];

// Required. A name assigned to this Level, restricted to 3 characters.
Expand Down Expand Up @@ -196,16 +197,16 @@ message Photo {
REJECTED_UNKNOWN = 2;
}

// 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.
// 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.
PhotoId photo_id = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.field_behavior) = OUTPUT_ONLY
];

// Input only. Required when creating a photo. Input only. The resource URL where the
// photo bytes are uploaded to.
// Input only. Required when creating a photo. Input only. The resource URL
// where the photo bytes are uploaded to.
UploadRef upload_reference = 2 [(google.api.field_behavior) = INPUT_ONLY];

// Output only. The download URL for the photo bytes. This field is set only
Expand All @@ -224,17 +225,19 @@ message Photo {
// Optional. Pose of the photo.
Pose pose = 4 [(google.api.field_behavior) = OPTIONAL];

// Optional. Connections to other photos. A connection represents the link from this
// photo to another photo.
// Optional. Connections to other photos. A connection represents the link
// from this photo to another photo.
repeated Connection connections = 5 [(google.api.field_behavior) = OPTIONAL];

// 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.
google.protobuf.Timestamp capture_time = 6 [(google.api.field_behavior) = OPTIONAL];
google.protobuf.Timestamp capture_time = 6
[(google.api.field_behavior) = OPTIONAL];

// Output only. Time when the image was uploaded.
google.protobuf.Timestamp upload_time = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.Timestamp upload_time = 14
[(google.api.field_behavior) = OUTPUT_ONLY];

// Optional. Places where this photo belongs.
repeated Place places = 7 [(google.api.field_behavior) = OPTIONAL];
Expand All @@ -243,10 +246,13 @@ message Photo {
int64 view_count = 10 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Status of rights transfer on this photo.
TransferStatus transfer_status = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
TransferStatus transfer_status = 12
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Status in Google Maps, whether this photo was published or rejected.
MapsPublishStatus maps_publish_status = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Status in Google Maps, whether this photo was published or
// rejected.
MapsPublishStatus maps_publish_status = 13
[(google.api.field_behavior) = OUTPUT_ONLY];
}

// A sequence of 360 photos along with metadata.
Expand Down Expand Up @@ -276,19 +282,20 @@ message PhotoSequence {
// 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.
google.protobuf.Timestamp capture_time_override = 4 [(google.api.field_behavior) = OPTIONAL];
google.protobuf.Timestamp capture_time_override = 4
[(google.api.field_behavior) = OPTIONAL];

// Output only. The time this photo sequence was created in uSV Store service.
google.protobuf.Timestamp upload_time = 18 [(google.api.field_behavior) = OUTPUT_ONLY];

// 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).
google.protobuf.Timestamp upload_time = 18
[(google.api.field_behavior) = OUTPUT_ONLY];

// 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).
repeated Pose raw_gps_timeline = 7 [(google.api.field_behavior) = INPUT_ONLY];

// Input only. If both raw_gps_timeline and
Expand All @@ -303,30 +310,34 @@ message PhotoSequence {
Imu imu = 11 [(google.api.field_behavior) = INPUT_ONLY];

// Output only. The processing state of this sequence.
ProcessingState processing_state = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
ProcessingState processing_state = 12
[(google.api.field_behavior) = OUTPUT_ONLY];

// 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.
ProcessingFailureReason failure_reason = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
// 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.
ProcessingFailureReason failure_reason = 13
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. If this sequence has `failure_reason` set, this may contain additional
// details about the failure.
ProcessingFailureDetails failure_details = 23 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. If this sequence has `failure_reason` set, this may contain
// additional details about the failure.
ProcessingFailureDetails failure_details = 23
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The computed distance of the photo sequence in meters.
double distance_meters = 16 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. A rectangular box that encapsulates every image in this photo sequence.
// Output only. A rectangular box that encapsulates every image in this photo
// sequence.
LatLngBounds sequence_bounds = 20 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The total number of views that all the published images in this
// PhotoSequence have received.
// Output only. The total number of views that all the published images in
// this PhotoSequence have received.
int64 view_count = 21 [(google.api.field_behavior) = OUTPUT_ONLY];

// 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.
// 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.
string filename = 22 [(google.api.field_behavior) = OUTPUT_ONLY];
}

Expand Down Expand Up @@ -445,6 +456,15 @@ enum ProcessingFailureReason {

// Not enough video frames.
INSUFFICIENT_VIDEO_FRAMES = 19;

// Not enough moving data.
INSUFFICIENT_MOVEMENT = 20;

// Mast is down.
MAST_DOWN = 27;

// Camera is covered.
CAMERA_COVERED = 28;
}

// Additional details to accompany the ProcessingFailureReason enum.
Expand All @@ -466,6 +486,9 @@ message ProcessingFailureDetails {

// See NotOutdoorsFailureDetails.
NotOutdoorsFailureDetails not_outdoors_details = 4;

// See NoOverlapGpsFailureDetails.
NoOverlapGpsFailureDetails no_overlap_gps_details = 5;
}
}

Expand Down Expand Up @@ -504,3 +527,18 @@ message NotOutdoorsFailureDetails {
// found.
optional google.protobuf.Duration start_time = 1;
}

// Details related to PhotoSequenceProcessingFailureReason#NO_OVERLAP_GPS.
message NoOverlapGpsFailureDetails {
// Time of first recorded GPS point.
optional google.protobuf.Timestamp gps_start_time = 1;

// Time of last recorded GPS point.
optional google.protobuf.Timestamp gps_end_time = 2;

// Start time of video.
optional google.protobuf.Timestamp video_start_time = 3;

// End time of video.
optional google.protobuf.Timestamp video_end_time = 4;
}

0 comments on commit 92b4564

Please sign in to comment.