From b409abd52aea292c7d29e8726ac1deede5154264 Mon Sep 17 00:00:00 2001 From: Google APIs Date: Wed, 9 Feb 2022 10:30:23 -0800 Subject: [PATCH] feat: Initial release of Video Stitcher API v1 Public Preview PiperOrigin-RevId: 427509057 --- google/cloud/video/stitcher/v1/BUILD.bazel | 364 +++++++++++ .../video/stitcher/v1/ad_tag_details.proto | 95 +++ google/cloud/video/stitcher/v1/cdn_keys.proto | 67 ++ .../cloud/video/stitcher/v1/companions.proto | 113 ++++ google/cloud/video/stitcher/v1/events.proto | 131 ++++ google/cloud/video/stitcher/v1/sessions.proto | 243 ++++++++ google/cloud/video/stitcher/v1/slates.proto | 41 ++ .../video/stitcher/v1/stitch_details.proto | 60 ++ .../stitcher/v1/video_stitcher_service.proto | 581 ++++++++++++++++++ .../v1/videostitcher_grpc_service_config.json | 38 ++ .../video/stitcher/v1/videostitcher_v1.yaml | 50 ++ 11 files changed, 1783 insertions(+) create mode 100644 google/cloud/video/stitcher/v1/BUILD.bazel create mode 100644 google/cloud/video/stitcher/v1/ad_tag_details.proto create mode 100644 google/cloud/video/stitcher/v1/cdn_keys.proto create mode 100644 google/cloud/video/stitcher/v1/companions.proto create mode 100644 google/cloud/video/stitcher/v1/events.proto create mode 100644 google/cloud/video/stitcher/v1/sessions.proto create mode 100644 google/cloud/video/stitcher/v1/slates.proto create mode 100644 google/cloud/video/stitcher/v1/stitch_details.proto create mode 100644 google/cloud/video/stitcher/v1/video_stitcher_service.proto create mode 100644 google/cloud/video/stitcher/v1/videostitcher_grpc_service_config.json create mode 100644 google/cloud/video/stitcher/v1/videostitcher_v1.yaml diff --git a/google/cloud/video/stitcher/v1/BUILD.bazel b/google/cloud/video/stitcher/v1/BUILD.bazel new file mode 100644 index 0000000000000..cb1d543994675 --- /dev/null +++ b/google/cloud/video/stitcher/v1/BUILD.bazel @@ -0,0 +1,364 @@ +# This file was automatically generated by BuildFileGenerator +# https://github.com/googleapis/rules_gapic/tree/master/bazel + +# Most of the manual changes to this file will be overwritten. +# It's **only** allowed to change the following rule attribute values: +# - names of *_gapic_assembly_* rules +# - certain parameters of *_gapic_library rules, including but not limited to: +# * extra_protoc_parameters +# * extra_protoc_file_parameters +# The complete list of preserved parameters can be found in the source code. + +# 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") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "stitcher_proto", + srcs = [ + "ad_tag_details.proto", + "cdn_keys.proto", + "companions.proto", + "events.proto", + "sessions.proto", + "slates.proto", + "stitch_details.proto", + "video_stitcher_service.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "stitcher_proto_with_info", + deps = [ + ":stitcher_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "stitcher_java_proto", + deps = [":stitcher_proto"], +) + +java_grpc_library( + name = "stitcher_java_grpc", + srcs = [":stitcher_proto"], + deps = [":stitcher_java_proto"], +) + +java_gapic_library( + name = "stitcher_java_gapic", + srcs = [":stitcher_proto_with_info"], + gapic_yaml = None, + grpc_service_config = "videostitcher_grpc_service_config.json", + service_yaml = "videostitcher_v1.yaml", + test_deps = [ + ":stitcher_java_grpc", + ], + deps = [ + ":stitcher_java_proto", + "//google/api:api_java_proto", + ], +) + +java_gapic_test( + name = "stitcher_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.video.stitcher.v1.VideoStitcherServiceClientTest", + ], + runtime_deps = [":stitcher_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-video-stitcher-v1-java", + deps = [ + ":stitcher_java_gapic", + ":stitcher_java_grpc", + ":stitcher_java_proto", + ":stitcher_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "stitcher_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/video/stitcher/v1", + protos = [":stitcher_proto"], + deps = [ + "//google/api:annotations_go_proto", + ], +) + +go_gapic_library( + name = "stitcher_go_gapic", + srcs = [":stitcher_proto_with_info"], + grpc_service_config = "videostitcher_grpc_service_config.json", + importpath = "cloud.google.com/go/video/stitcher/apiv1;stitcher", + service_yaml = "videostitcher_v1.yaml", + metadata = True, + deps = [ + ":stitcher_go_proto", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", + ], +) + +go_test( + name = "stitcher_go_gapic_test", + srcs = [":stitcher_go_gapic_srcjar_test"], + embed = [":stitcher_go_gapic"], + importpath = "cloud.google.com/go/video/stitcher/apiv1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-video-stitcher-v1-go", + deps = [ + ":stitcher_go_gapic", + ":stitcher_go_gapic_srcjar-test.srcjar", + ":stitcher_go_gapic_srcjar-metadata.srcjar", + ":stitcher_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "py_gapic_assembly_pkg", + "py_gapic_library", +) + +py_gapic_library( + name = "stitcher_py_gapic", + srcs = [":stitcher_proto"], + grpc_service_config = "videostitcher_grpc_service_config.json", +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "video-stitcher-v1-py", + deps = [ + ":stitcher_py_gapic", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "stitcher_php_proto", + deps = [":stitcher_proto"], +) + +php_grpc_library( + name = "stitcher_php_grpc", + srcs = [":stitcher_proto"], + deps = [":stitcher_php_proto"], +) + +php_gapic_library( + name = "stitcher_php_gapic", + srcs = [":stitcher_proto_with_info"], + grpc_service_config = "videostitcher_grpc_service_config.json", + service_yaml = "videostitcher_v1.yaml", + deps = [ + ":stitcher_php_grpc", + ":stitcher_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-video-stitcher-v1-php", + deps = [ + ":stitcher_php_gapic", + ":stitcher_php_grpc", + ":stitcher_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "stitcher_nodejs_gapic", + package_name = "@google-cloud/stitcher", + src = ":stitcher_proto_with_info", + extra_protoc_parameters = ["metadata"], + grpc_service_config = "videostitcher_grpc_service_config.json", + package = "google.cloud.video.stitcher.v1", + service_yaml = "videostitcher_v1.yaml", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "video-stitcher-v1-nodejs", + deps = [ + ":stitcher_nodejs_gapic", + ":stitcher_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_gapic_assembly_pkg", + "ruby_cloud_gapic_library", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "stitcher_ruby_proto", + deps = [":stitcher_proto"], +) + +ruby_grpc_library( + name = "stitcher_ruby_grpc", + srcs = [":stitcher_proto"], + deps = [":stitcher_ruby_proto"], +) + +ruby_cloud_gapic_library( + name = "stitcher_ruby_gapic", + srcs = [":stitcher_proto_with_info"], + extra_protoc_parameters = [ + "ruby-cloud-gem-name=google-cloud-video-stitcher-v1", + ], + grpc_service_config = "videostitcher_grpc_service_config.json", + deps = [ + ":stitcher_ruby_grpc", + ":stitcher_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-video-stitcher-v1-ruby", + deps = [ + ":stitcher_ruby_gapic", + ":stitcher_ruby_grpc", + ":stitcher_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "stitcher_csharp_proto", + deps = [":stitcher_proto"], +) + +csharp_grpc_library( + name = "stitcher_csharp_grpc", + srcs = [":stitcher_proto"], + deps = [":stitcher_csharp_proto"], +) + +csharp_gapic_library( + name = "stitcher_csharp_gapic", + srcs = [":stitcher_proto_with_info"], + common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json", + grpc_service_config = "videostitcher_grpc_service_config.json", + deps = [ + ":stitcher_csharp_grpc", + ":stitcher_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-video-stitcher-v1-csharp", + deps = [ + ":stitcher_csharp_gapic", + ":stitcher_csharp_grpc", + ":stitcher_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_grpc_library", + "cc_proto_library", +) + +cc_proto_library( + name = "stitcher_cc_proto", + deps = [":stitcher_proto"], +) + +cc_grpc_library( + name = "stitcher_cc_grpc", + srcs = [":stitcher_proto"], + grpc_only = True, + deps = [":stitcher_cc_proto"], +) diff --git a/google/cloud/video/stitcher/v1/ad_tag_details.proto b/google/cloud/video/stitcher/v1/ad_tag_details.proto new file mode 100644 index 0000000000000..3c1c018b20e4a --- /dev/null +++ b/google/cloud/video/stitcher/v1/ad_tag_details.proto @@ -0,0 +1,95 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.video.stitcher.v1; + +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/struct.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/video/stitcher/v1;stitcher"; +option java_multiple_files = true; +option java_outer_classname = "AdTagDetailsProto"; +option java_package = "com.google.cloud.video.stitcher.v1"; + +// Container for a live session's ad tag detail. +message LiveAdTagDetail { + option (google.api.resource) = { + type: "videostitcher.googleapis.com/LiveAdTagDetail" + pattern: "projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}" + }; + + // The resource name in the form of + // `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{id}`. + string name = 1; + + // A list of ad requests. + repeated AdRequest ad_requests = 2; +} + +// Information related to the details for one ad tag. +message VodAdTagDetail { + option (google.api.resource) = { + type: "videostitcher.googleapis.com/VodAdTagDetail" + pattern: "projects/{project}/locations/{location}/vodSessions/{vod_session}/vodAdTagDetails/{vod_ad_tag_detail}" + }; + + // The name of the ad tag detail for the specified VOD session, in the form of + // `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{id}`. + string name = 1; + + // A list of ad requests for one ad tag. + repeated AdRequest ad_requests = 2; +} + +// Details of an ad request to an ad server. +message AdRequest { + // The ad tag URI processed with integrated macros. + string uri = 1; + + // The request metadata used to make the ad request. + RequestMetadata request_metadata = 2; + + // The response metadata received from the ad request. + ResponseMetadata response_metadata = 3; +} + +// Metadata for an ad request. +message RequestMetadata { + // The HTTP headers of the ad request. + google.protobuf.Struct headers = 1; +} + +// Metadata for the response of an ad request. +message ResponseMetadata { + // Error message received when making the ad request. + string error = 1; + + // Headers from the response. + google.protobuf.Struct headers = 2; + + // Status code for the response. + string status_code = 3; + + // Size in bytes of the response. + int32 size_bytes = 4; + + // Total time elapsed for the response. + google.protobuf.Duration duration = 5; + + // The body of the response. + string body = 6; +} diff --git a/google/cloud/video/stitcher/v1/cdn_keys.proto b/google/cloud/video/stitcher/v1/cdn_keys.proto new file mode 100644 index 0000000000000..254f415f8176b --- /dev/null +++ b/google/cloud/video/stitcher/v1/cdn_keys.proto @@ -0,0 +1,67 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.video.stitcher.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/video/stitcher/v1;stitcher"; +option java_multiple_files = true; +option java_outer_classname = "CdnKeysProto"; +option java_package = "com.google.cloud.video.stitcher.v1"; + +// Configuration for a CDN key. Used by the Video Stitcher +// to sign URIs for fetching video manifests and signing +// media segments for playback. +message CdnKey { + option (google.api.resource) = { + type: "videostitcher.googleapis.com/CdnKey" + pattern: "projects/{project}/locations/{location}/cdnKeys/{cdn_key}" + }; + + // Configuration associated with the CDN key. + oneof cdn_key_config { + // The configuration for a Google Cloud CDN key. + GoogleCdnKey google_cdn_key = 5; + + // The configuration for an Akamai CDN key. + AkamaiCdnKey akamai_cdn_key = 6; + } + + // The resource name of the CDN key, in the form of + // `projects/{project}/locations/{location}/cdnKeys/{id}`. + // The name is ignored when creating a CDN key. + string name = 1; + + // The hostname this key applies to. + string hostname = 4; +} + +// Configuration for a Google Cloud CDN key. +message GoogleCdnKey { + // Input only. Secret for this Google Cloud CDN key. + bytes private_key = 1 [(google.api.field_behavior) = INPUT_ONLY]; + + // The public name of the Google Cloud CDN key. + string key_name = 2; +} + +// Configuration for an Akamai CDN key. +message AkamaiCdnKey { + // Input only. Token key for the Akamai CDN edge configuration. + bytes token_key = 1 [(google.api.field_behavior) = INPUT_ONLY]; +} diff --git a/google/cloud/video/stitcher/v1/companions.proto b/google/cloud/video/stitcher/v1/companions.proto new file mode 100644 index 0000000000000..af57e92ddbbd2 --- /dev/null +++ b/google/cloud/video/stitcher/v1/companions.proto @@ -0,0 +1,113 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.video.stitcher.v1; + +import "google/cloud/video/stitcher/v1/events.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/video/stitcher/v1;stitcher"; +option java_multiple_files = true; +option java_outer_classname = "CompanionsProto"; +option java_package = "com.google.cloud.video.stitcher.v1"; + +// Metadata for companion ads. +message CompanionAds { + // Indicates how many of the companions should be displayed with the ad. + enum DisplayRequirement { + // Required companions are not specified. The default is ALL. + DISPLAY_REQUIREMENT_UNSPECIFIED = 0; + + // All companions are required to be displayed. + ALL = 1; + + // At least one of companions needs to be displayed. + ANY = 2; + + // All companions are optional for display. + NONE = 3; + } + + // Indicates how many of the companions should be displayed with the ad. + DisplayRequirement display_requirement = 1; + + // List of companion ads. + repeated Companion companions = 2; +} + +// Metadata for a companion. +message Companion { + // Ad resource associated with the companion ad. + oneof ad_resource { + // The IFrame ad resource associated with the companion ad. + IframeAdResource iframe_ad_resource = 10; + + // The static ad resource associated with the companion ad. + StaticAdResource static_ad_resource = 11; + + // The HTML ad resource associated with the companion ad. + HtmlAdResource html_ad_resource = 12; + } + + // The API necessary to communicate with the creative if available. + string api_framework = 1; + + // The pixel height of the placement slot for the intended creative. + int32 height_px = 2; + + // The pixel width of the placement slot for the intended creative. + int32 width_px = 3; + + // The pixel height of the creative. + int32 asset_height_px = 4; + + // The maximum pixel height of the creative in its expanded state. + int32 expanded_height_px = 5; + + // The pixel width of the creative. + int32 asset_width_px = 6; + + // The maximum pixel width of the creative in its expanded state. + int32 expanded_width_px = 7; + + // The ID used to identify the desired placement on a publisher's page. + // Values to be used should be discussed between publishers and + // advertisers. + string ad_slot_id = 8; + + // The list of tracking events for the companion. + repeated Event events = 9; +} + +// Metadata for an HTML ad resource. +message HtmlAdResource { + // The HTML to display for the ad resource. + string html_source = 1; +} + +// Metadata for an IFrame ad resource. +message IframeAdResource { + // URI source for an IFrame to display for the ad resource. + string uri = 1; +} + +// Metadata for a static ad resource. +message StaticAdResource { + // URI to the static file for the ad resource. + string uri = 1; + + // Describes the MIME type of the ad resource. + string creative_type = 2; +} diff --git a/google/cloud/video/stitcher/v1/events.proto b/google/cloud/video/stitcher/v1/events.proto new file mode 100644 index 0000000000000..3a5e967f52811 --- /dev/null +++ b/google/cloud/video/stitcher/v1/events.proto @@ -0,0 +1,131 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.video.stitcher.v1; + +import "google/protobuf/duration.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/video/stitcher/v1;stitcher"; +option java_multiple_files = true; +option java_outer_classname = "EventsProto"; +option java_package = "com.google.cloud.video.stitcher.v1"; + +// Describes an event and a trigger URI. +message Event { + // Describes the event that occurred. + enum EventType { + // The event type is unspecified. + EVENT_TYPE_UNSPECIFIED = 0; + + // First frame of creative ad viewed. + CREATIVE_VIEW = 1; + + // Creative ad started. + START = 2; + + // Start of an ad break. + BREAK_START = 3; + + // End of an ad break. + BREAK_END = 4; + + // Impression. + IMPRESSION = 5; + + // First quartile progress. + FIRST_QUARTILE = 6; + + // Midpoint progress. + MIDPOINT = 7; + + // Third quartile progress. + THIRD_QUARTILE = 8; + + // Ad progress completed. + COMPLETE = 9; + + // Specific progress event with an offset. + PROGRESS = 10; + + // Player muted. + MUTE = 11; + + // Player unmuted. + UNMUTE = 12; + + // Player paused. + PAUSE = 13; + + // Click event. + CLICK = 14; + + // Click-through event. + CLICK_THROUGH = 15; + + // Player rewinding. + REWIND = 16; + + // Player resumed. + RESUME = 17; + + // Error event. + ERROR = 18; + + // Ad expanded to a larger size. + EXPAND = 21; + + // Ad collapsed to a smaller size. + COLLAPSE = 22; + + // Non-linear ad closed. + CLOSE = 24; + + // Linear ad closed. + CLOSE_LINEAR = 25; + + // Ad skipped. + SKIP = 26; + + // Accept invitation event. + ACCEPT_INVITATION = 27; + } + + // Describes the event that occurred. + EventType type = 1; + + // The URI to trigger for this event. + string uri = 2; + + // The ID of the event. + string id = 3; + + // The offset in seconds if the event type is `PROGRESS`. + google.protobuf.Duration offset = 4; +} + +// Indicates a time in which a list of events should be triggered +// during media playback. +message ProgressEvent { + // The time when the following tracking events occurs. The time is in + // seconds relative to the start of the VOD asset. + google.protobuf.Duration time_offset = 1; + + // The list of progress tracking events for the ad break. These can be of + // the following IAB types: `BREAK_START`, `BREAK_END`, `IMPRESSION`, + // `CREATIVE_VIEW`, `START`, `FIRST_QUARTILE`, `MIDPOINT`, `THIRD_QUARTILE`, + // `COMPLETE`, `PROGRESS`. + repeated Event events = 2; +} diff --git a/google/cloud/video/stitcher/v1/sessions.proto b/google/cloud/video/stitcher/v1/sessions.proto new file mode 100644 index 0000000000000..e7731f8dbd757 --- /dev/null +++ b/google/cloud/video/stitcher/v1/sessions.proto @@ -0,0 +1,243 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.video.stitcher.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/video/stitcher/v1/companions.proto"; +import "google/cloud/video/stitcher/v1/events.proto"; +import "google/protobuf/duration.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/video/stitcher/v1;stitcher"; +option java_multiple_files = true; +option java_outer_classname = "SessionsProto"; +option java_package = "com.google.cloud.video.stitcher.v1"; + +// Metadata for a VOD session. +message VodSession { + option (google.api.resource) = { + type: "videostitcher.googleapis.com/VodSession" + pattern: "projects/{project}/locations/{location}/vodSessions/{vod_session}" + }; + + // Output only. The name of the VOD session, in the form of + // `projects/{project_number}/locations/{location}/vodSessions/{id}`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Metadata of what was stitched into the content. + Interstitials interstitials = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The playback URI of the stitched content. + string play_uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. URI of the media to stitch. + string source_uri = 5 [(google.api.field_behavior) = REQUIRED]; + + // Required. Ad tag URI. + string ad_tag_uri = 6 [(google.api.field_behavior) = REQUIRED]; + + // Key value pairs for ad tag macro replacement. If the + // specified ad tag URI has macros, this field provides the mapping + // to the value that will replace the macro in the ad tag URI. + // Macros are designated by square brackets. + // For example: + // + // Ad tag URI: `"https://doubleclick.google.com/ad/1?geo_id=[geoId]"` + // + // Ad tag macro map: `{"geoId": "123"}` + // + // Fully qualified ad tag: + // `"`https://doubleclick.google.com/ad/1?geo_id=123"` + map ad_tag_macro_map = 7; + + // Indicates whether client side ad tracking is enabled. If client + // side ad tracking is enabled, then the client player is expected + // to trigger playback and activity events itself. + // If this is set to false, server side ad tracking is enabled, + // causing the Video Stitcher service will trigger playback events + // on behalf of the client player. + bool client_ad_tracking = 8; + + // Additional options that affect the output of the manifest. + ManifestOptions manifest_options = 9; +} + +// Describes what was stitched into a VOD session's manifest. +message Interstitials { + // List of ad breaks ordered by time. + repeated VodSessionAdBreak ad_breaks = 1; + + // Information related to the content of the VOD session. + VodSessionContent session_content = 2; +} + +// Metadata for an inserted ad in a VOD session. +message VodSessionAd { + // Duration in seconds of the ad. + google.protobuf.Duration duration = 1; + + // Metadata of companion ads associated with the ad. + CompanionAds companion_ads = 2; + + // The list of progress tracking events for the ad break. These can be of + // the following IAB types: `MUTE`, `UNMUTE`, `PAUSE`, `CLICK`, + // `CLICK_THROUGH`, `REWIND`, `RESUME`, `ERROR`, `FULLSCREEN`, + // `EXIT_FULLSCREEN`, `EXPAND`, `COLLAPSE`, `ACCEPT_INVITATION_LINEAR`, + // `CLOSE_LINEAR`, `SKIP`. + repeated Event activity_events = 3; +} + +// Metadata for the entire stitched content in a VOD session. +message VodSessionContent { + // The total duration in seconds of the content including the ads stitched + // in. + google.protobuf.Duration duration = 1; +} + +// Metadata for an inserted ad break. +message VodSessionAdBreak { + // List of events that are expected to be triggered, ordered by time. + repeated ProgressEvent progress_events = 1; + + // Ordered list of ads stitched into the ad break. + repeated VodSessionAd ads = 2; + + // Ad break end time in seconds relative to the start of the VOD asset. + google.protobuf.Duration end_time_offset = 3; + + // Ad break start time in seconds relative to the start of the VOD asset. + google.protobuf.Duration start_time_offset = 4; +} + +// Metadata for a live session. +message LiveSession { + option (google.api.resource) = { + type: "videostitcher.googleapis.com/LiveSession" + pattern: "projects/{project}/locations/{location}/liveSessions/{live_session}" + }; + + // Defines the stitcher behavior in case an ad does not align exactly with + // the ad break boundaries. If not specified, the default is COMPLETE_AD. + enum StitchingPolicy { + // Stitching policy is not specified. + STITCHING_POLICY_UNSPECIFIED = 0; + + // Finishes stitching the current ad before returning to content. + COMPLETE_AD = 1; + + // Finishes stitching the current pod before returning to content. + COMPLETE_POD = 2; + + // Cuts an ad short and returns to content in the middle of the ad. + CUT_CURRENT = 3; + } + + // Output only. The name of the live session, in the form of + // `projects/{project}/locations/{location}/liveSessions/{id}`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The URI to play the live session's ad-stitched stream. + string play_uri = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The URI of the live session's source stream. + string source_uri = 3; + + // The default ad tag to use when no ad tag ids are specified in an ad break's + // SCTE-35 message. + // + // default_ad_tag_id is necessary when `adTagMap` has more than one key. Its + // value must be present in the `adTagMap`. + string default_ad_tag_id = 4; + + // Key value pairs for ad tags. Ads parsed from ad tags must be MP4 videos + // each with at least one audio track. + map ad_tag_map = 5; + + // Key value pairs for ad tag macro replacement. If the + // specified ad tag URI has macros, this field provides the mapping + // to the value that will replace the macro in the ad tag URI. + // Macros are designated by square brackets. + // + // For example: + // + // Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]" + // + // Ad tag macros: `{"geoId": "123"}` + // + // Fully qualified ad tag: + // `"https://doubleclick.google.com/ad/1?geo_id=123"` + map ad_tag_macros = 6; + + // Whether client side ad tracking is enabled. If enabled, the client player + // is expected to trigger playback and activity events itself. Otherwise, + // server side ad tracking is enabled and the Video Stitcher API will trigger + // playback events on behalf of the client player. + bool client_ad_tracking = 7; + + // The default slate to use when no slates are specified in an ad break's + // SCTE-35 message. When specified, this value must match the ID for a slate + // that has already been created via the + // [CreateSlate](projects.locations.slates/create) method. + string default_slate_id = 8; + + // Defines the stitcher behavior in case an ad does not align exactly with + // the ad break boundaries. If not specified, the default is `COMPLETE_AD`. + StitchingPolicy stitching_policy = 9; + + // Additional options that affect the output of the manifest. + ManifestOptions manifest_options = 10; +} + +// Metadata of an ad tag. +message AdTag { + // Ad tag URI template. + string uri = 1; +} + +// Options for manifest generation. +message ManifestOptions { + // Defines the ordering policy during manifest generation. + enum OrderPolicy { + // Ordering policy is not specified. + ORDER_POLICY_UNSPECIFIED = 0; + + // Order by ascending. + ASCENDING = 1; + + // Order by descending. + DESCENDING = 2; + } + + // If specified, the output manifest will only return renditions matching the + // specified filters. + repeated RenditionFilter include_renditions = 1; + + // If specified, the output manifest will orders the video and muxed + // renditions by bitrate according to the ordering policy. + OrderPolicy bitrate_order = 2; +} + +// Filters for a video or muxed redition. +message RenditionFilter { + // Bitrate in bits per second for the rendition. If set, only renditions with + // the exact bitrate will match. + int32 bitrate_bps = 1; + + // Codecs for the rendition. If set, only renditions with the exact value + // will match. + string codecs = 2; +} diff --git a/google/cloud/video/stitcher/v1/slates.proto b/google/cloud/video/stitcher/v1/slates.proto new file mode 100644 index 0000000000000..a52de64998d86 --- /dev/null +++ b/google/cloud/video/stitcher/v1/slates.proto @@ -0,0 +1,41 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.video.stitcher.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/video/stitcher/v1;stitcher"; +option java_multiple_files = true; +option java_outer_classname = "SlatesProto"; +option java_package = "com.google.cloud.video.stitcher.v1"; + +// Slate object +message Slate { + option (google.api.resource) = { + type: "videostitcher.googleapis.com/Slate" + pattern: "projects/{project}/locations/{location}/slates/{slate}" + }; + + // Output only. The name of the slate, in the form of + // `projects/{project_number}/locations/{location}/slates/{id}`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The URI to fetch the source content for the slate. This URI must return an + // MP4 video with at least one audio track. + string uri = 2; +} diff --git a/google/cloud/video/stitcher/v1/stitch_details.proto b/google/cloud/video/stitcher/v1/stitch_details.proto new file mode 100644 index 0000000000000..e23224e3536a5 --- /dev/null +++ b/google/cloud/video/stitcher/v1/stitch_details.proto @@ -0,0 +1,60 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.video.stitcher.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/struct.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/video/stitcher/v1;stitcher"; +option java_multiple_files = true; +option java_outer_classname = "StitchDetailsProto"; +option java_package = "com.google.cloud.video.stitcher.v1"; + +// Detailed information related to the interstitial of a VOD session. +message VodStitchDetail { + option (google.api.resource) = { + type: "videostitcher.googleapis.com/VodStitchDetail" + pattern: "projects/{project}/locations/{location}/vodSessions/{vod_session}/vodStitchDetails/{vod_stitch_detail}" + }; + + // The name of the stitch detail in the specified VOD session, in the form of + // `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. + string name = 1; + + // A list of ad processing details for the fetched ad playlist. + repeated AdStitchDetail ad_stitch_details = 3; +} + +// Metadata for a stitched ad. +message AdStitchDetail { + // Required. The ad break ID of the processed ad. + string ad_break_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ad ID of the processed ad. + string ad_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The time offset of the processed ad. + google.protobuf.Duration ad_time_offset = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Indicates the reason why the ad has been skipped. + string skip_reason = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The metadata of the chosen media file for the ad. + map media = 5 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/google/cloud/video/stitcher/v1/video_stitcher_service.proto b/google/cloud/video/stitcher/v1/video_stitcher_service.proto new file mode 100644 index 0000000000000..fda9233d17d58 --- /dev/null +++ b/google/cloud/video/stitcher/v1/video_stitcher_service.proto @@ -0,0 +1,581 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.video.stitcher.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/video/stitcher/v1/ad_tag_details.proto"; +import "google/cloud/video/stitcher/v1/cdn_keys.proto"; +import "google/cloud/video/stitcher/v1/sessions.proto"; +import "google/cloud/video/stitcher/v1/slates.proto"; +import "google/cloud/video/stitcher/v1/stitch_details.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/video/stitcher/v1;stitcher"; +option java_multiple_files = true; +option java_outer_classname = "VideoStitcherServiceProto"; +option java_package = "com.google.cloud.video.stitcher.v1"; + +// Video-On-Demand content stitching API allows you to insert ads +// into (VoD) video on demand files. You will be able to render custom +// scrubber bars with highlighted ads, enforce ad policies, allow +// seamless playback and tracking on native players and monetize +// content with any standard VMAP compliant ad server. +service VideoStitcherService { + option (google.api.default_host) = "videostitcher.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a new CDN key. + rpc CreateCdnKey(CreateCdnKeyRequest) returns (CdnKey) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/cdnKeys" + body: "cdn_key" + }; + option (google.api.method_signature) = "parent,cdn_key,cdn_key_id"; + } + + // Lists all CDN keys in the specified project and location. + rpc ListCdnKeys(ListCdnKeysRequest) returns (ListCdnKeysResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/cdnKeys" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns the specified CDN key. + rpc GetCdnKey(GetCdnKeyRequest) returns (CdnKey) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/cdnKeys/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes the specified CDN key. + rpc DeleteCdnKey(DeleteCdnKeyRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/cdnKeys/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the specified CDN key. Only update fields specified + // in the call method body. + rpc UpdateCdnKey(UpdateCdnKeyRequest) returns (CdnKey) { + option (google.api.http) = { + patch: "/v1/{cdn_key.name=projects/*/locations/*/cdnKeys/*}" + body: "cdn_key" + }; + option (google.api.method_signature) = "cdn_key,update_mask"; + } + + // Creates a client side playback VOD session and returns the full + // tracking and playback metadata of the session. + rpc CreateVodSession(CreateVodSessionRequest) returns (VodSession) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/vodSessions" + body: "vod_session" + }; + option (google.api.method_signature) = "parent,vod_session"; + } + + // Returns the full tracking, playback metadata, and relevant ad-ops + // logs for the specified VOD session. + rpc GetVodSession(GetVodSessionRequest) returns (VodSession) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/vodSessions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns a list of detailed stitching information of the specified VOD + // session. + rpc ListVodStitchDetails(ListVodStitchDetailsRequest) returns (ListVodStitchDetailsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/vodSessions/*}/vodStitchDetails" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns the specified stitching information for the specified VOD session. + rpc GetVodStitchDetail(GetVodStitchDetailRequest) returns (VodStitchDetail) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/vodSessions/*/vodStitchDetails/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Return the list of ad tag details for the specified VOD session. + rpc ListVodAdTagDetails(ListVodAdTagDetailsRequest) returns (ListVodAdTagDetailsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/vodSessions/*}/vodAdTagDetails" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns the specified ad tag detail for the specified VOD session. + rpc GetVodAdTagDetail(GetVodAdTagDetailRequest) returns (VodAdTagDetail) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/vodSessions/*/vodAdTagDetails/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Return the list of ad tag details for the specified live session. + rpc ListLiveAdTagDetails(ListLiveAdTagDetailsRequest) returns (ListLiveAdTagDetailsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/liveSessions/*}/liveAdTagDetails" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns the specified ad tag detail for the specified live session. + rpc GetLiveAdTagDetail(GetLiveAdTagDetailRequest) returns (LiveAdTagDetail) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/liveSessions/*/liveAdTagDetails/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a slate. + rpc CreateSlate(CreateSlateRequest) returns (Slate) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/slates" + body: "slate" + }; + option (google.api.method_signature) = "parent,slate,slate_id"; + } + + // Lists all slates in the specified project and location. + rpc ListSlates(ListSlatesRequest) returns (ListSlatesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/slates" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns the specified slate. + rpc GetSlate(GetSlateRequest) returns (Slate) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/slates/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the specified slate. + rpc UpdateSlate(UpdateSlateRequest) returns (Slate) { + option (google.api.http) = { + patch: "/v1/{slate.name=projects/*/locations/*/slates/*}" + body: "slate" + }; + option (google.api.method_signature) = "slate,update_mask"; + } + + // Deletes the specified slate. + rpc DeleteSlate(DeleteSlateRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/slates/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new live session. + rpc CreateLiveSession(CreateLiveSessionRequest) returns (LiveSession) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/liveSessions" + body: "live_session" + }; + option (google.api.method_signature) = "parent,live_session"; + } + + // Returns the details for the specified live session. + rpc GetLiveSession(GetLiveSessionRequest) returns (LiveSession) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/liveSessions/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// Request message for VideoStitcherService.createCdnKey. +message CreateCdnKeyRequest { + // Required. The project in which the CDN key should be created, in the form of + // `projects/{project_number}/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "videostitcher.googleapis.com/CdnKey" + } + ]; + + // Required. The CDN key resource to create. + CdnKey cdn_key = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the CDN key, which will become the final component of + // the CDN key's resource name. + // + // This value should conform to RFC-1034, which restricts to + // lower-case letters, numbers, and hyphen, with the first character a + // letter, the last a letter or a number, and a 63 character maximum. + string cdn_key_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for VideoStitcherService.listCdnKeys. +message ListCdnKeysRequest { + // Required. The project that contains the list of CDN keys, in the form of + // `projects/{project_number}/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "videostitcher.googleapis.com/CdnKey" + } + ]; + + // Requested page size. Server may return fewer items than requested. + // If unspecified, server will pick an appropriate default. + int32 page_size = 2; + + // A token identifying a page of results the server should return. + string page_token = 3; + + // Filtering results + string filter = 4; + + // Hint for how to order the results + string order_by = 5; +} + +// Response message for VideoStitcher.ListCdnKeys. +message ListCdnKeysResponse { + // List of CDN keys. + repeated CdnKey cdn_keys = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for VideoStitcherService.getCdnKey. +message GetCdnKeyRequest { + // Required. The name of the CDN key to be retrieved, in the form of + // `projects/{project}/locations/{location}/cdnKeys/{id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "videostitcher.googleapis.com/CdnKey" + } + ]; +} + +// Request message for VideoStitcherService.deleteCdnKey. +message DeleteCdnKeyRequest { + // Required. The name of the CDN key to be deleted, in the form of + // `projects/{project_number}/locations/{location}/cdnKeys/{id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "videostitcher.googleapis.com/CdnKey" + } + ]; +} + +// Request message for VideoStitcherService.updateCdnKey. +message UpdateCdnKeyRequest { + // Required. The CDN key resource which replaces the resource on the server. + CdnKey cdn_key = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The update mask applies to the resource. + // For the `FieldMask` definition, see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for VideoStitcherService.createVodSession +message CreateVodSessionRequest { + // Required. The project and location in which the VOD session should be created, in the + // form of `projects/{project_number}/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "videostitcher.googleapis.com/VodSession" + } + ]; + + // Required. Parameters for creating a session. + VodSession vod_session = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for VideoStitcherService.getVodSession +message GetVodSessionRequest { + // Required. The name of the VOD session to be retrieved, in the form of + // `projects/{project_number}/locations/{location}/vodSessions/{id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "videostitcher.googleapis.com/VodSession" + } + ]; +} + +// Request message for VideoStitcherService.listVodStitchDetails. +message ListVodStitchDetailsRequest { + // Required. The VOD session where the stitch details belong to, in the form of + // `projects/{project}/locations/{location}/vodSessions/{id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "videostitcher.googleapis.com/VodStitchDetail" + } + ]; + + // The maximum number of items to return. + int32 page_size = 2; + + // The next_page_token value returned from a previous List request, if any. + string page_token = 3; +} + +// Response message for VideoStitcherService.listVodStitchDetails. +message ListVodStitchDetailsResponse { + // A List of stitch Details. + repeated VodStitchDetail vod_stitch_details = 1; + + // The pagination token. + string next_page_token = 2; +} + +// Request message for VideoStitcherService.getVodStitchDetail. +message GetVodStitchDetailRequest { + // Required. The name of the stitch detail in the specified VOD session, in the form of + // `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "videostitcher.googleapis.com/VodStitchDetail" + } + ]; +} + +// Request message for VideoStitcherService.listVodAdTagDetails. +message ListVodAdTagDetailsRequest { + // Required. The VOD session which the ad tag details belong to, in the form of + // `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "videostitcher.googleapis.com/VodAdTagDetail" + } + ]; + + // The maximum number of items to return. + int32 page_size = 2; + + // The next_page_token value returned from a previous List request, if any. + string page_token = 3; +} + +// Response message for VideoStitcherService.listVodAdTagDetails. +message ListVodAdTagDetailsResponse { + // A List of ad tag details. + repeated VodAdTagDetail vod_ad_tag_details = 1; + + // The pagination token. + string next_page_token = 2; +} + +// Request message for VideoStitcherService.getVodAdTagDetail +message GetVodAdTagDetailRequest { + // Required. The name of the ad tag detail for the specified VOD session, in the form of + // `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "videostitcher.googleapis.com/VodAdTagDetail" + } + ]; +} + +// Request message for VideoStitcherService.listLiveAdTagDetails. +message ListLiveAdTagDetailsRequest { + // Required. The resource parent in the form of + // `projects/{project}/locations/{location}/liveSessions/{live_session}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "videostitcher.googleapis.com/LiveAdTagDetail" + } + ]; + + // The maximum number of items to return. + int32 page_size = 2; + + // The pagination token returned from a previous List request. + string page_token = 3; +} + +// Response message for VideoStitcherService.listLiveAdTagDetails. +message ListLiveAdTagDetailsResponse { + // A list of live session ad tag details. + repeated LiveAdTagDetail live_ad_tag_details = 1; + + // The pagination token. + string next_page_token = 2; +} + +// Request message for VideoStitcherService.getLiveAdTagDetail +message GetLiveAdTagDetailRequest { + // Required. The resource name in the form of + // `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "videostitcher.googleapis.com/LiveAdTagDetail" + } + ]; +} + +// Request message for VideoStitcherService.createSlate. +message CreateSlateRequest { + // Required. The project in which the slate should be created, in the form of + // `projects/{project_number}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "videostitcher.googleapis.com/Slate" + } + ]; + + // Required. The unique identifier for the slate. + // This value should conform to RFC-1034, which restricts to + // lower-case letters, numbers, and hyphen, with the first character a + // letter, the last a letter or a number, and a 63 character maximum. + string slate_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The slate to create. + Slate slate = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for VideoStitcherService.getSlate. +message GetSlateRequest { + // Required. The name of the slate to be retrieved, of the slate, in the form of + // `projects/{project_number}/locations/{location}/slates/{id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "videostitcher.googleapis.com/Slate" + } + ]; +} + +// Request message for VideoStitcherService.listSlates. +message ListSlatesRequest { + // Required. The project to list slates, in the form of `projects/{project_number}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "videostitcher.googleapis.com/Slate" + } + ]; + + // Requested page size. Server may return fewer items than requested. + // If unspecified, server will pick an appropriate default. + int32 page_size = 2; + + // A token identifying a page of results the server should return. + string page_token = 3; + + // Filtering results + string filter = 4; + + // Hint for how to order the results + string order_by = 5; +} + +// Response message for VideoStitcherService.listSlates. +message ListSlatesResponse { + // The list of slates + repeated Slate slates = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for VideoStitcherService.updateSlate. +message UpdateSlateRequest { + // Required. The resource with updated fields. + Slate slate = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The update mask which specifies fields which should be updated. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for VideoStitcherService.deleteSlate. +message DeleteSlateRequest { + // Required. The name of the slate to be deleted, in the form of + // `projects/{project_number}/locations/{location}/slates/{id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "videostitcher.googleapis.com/Slate" + } + ]; +} + +// Request message for VideoStitcherService.createLiveSession. +message CreateLiveSessionRequest { + // Required. The project and location in which the live session should be created, + // in the form of `projects/{project_number}/locations/{location}`. + // + // Valid locations: + // + // * `-` (Video Stitcher API will pick a location that is closest to the + // caller.) + // * `us-east1` + // * `us-west1` + // * `us-central1` + // * `europe-west1` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "videostitcher.googleapis.com/LiveSession" + } + ]; + + // Required. Parameters for creating a live session. + LiveSession live_session = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for VideoStitcherService.getSession. +message GetLiveSessionRequest { + // Required. The name of the live session, in the form of + // `projects/{project_number}/locations/{location}/liveSessions/{id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "videostitcher.googleapis.com/LiveSession" + } + ]; +} diff --git a/google/cloud/video/stitcher/v1/videostitcher_grpc_service_config.json b/google/cloud/video/stitcher/v1/videostitcher_grpc_service_config.json new file mode 100644 index 0000000000000..ae048887dd92e --- /dev/null +++ b/google/cloud/video/stitcher/v1/videostitcher_grpc_service_config.json @@ -0,0 +1,38 @@ +{ + "methodConfig": [{ + "name": [{ "service": "google.cloud.video.stitcher.v1.VideoStitcherService" }], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "1s", + "maxBackoff": "10s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": ["UNAVAILABLE"] + } + }, + { + "name": [ + { "service": "google.cloud.video.stitcher.v1.VideoStitcherService", "method": "CreateCdnKey" }, + { "service": "google.cloud.video.stitcher.v1.VideoStitcherService", "method": "ListCdnKeys" }, + { "service": "google.cloud.video.stitcher.v1.VideoStitcherService", "method": "GetCdnKey" }, + { "service": "google.cloud.video.stitcher.v1.VideoStitcherService", "method": "DeleteCdnKey" }, + { "service": "google.cloud.video.stitcher.v1.VideoStitcherService", "method": "UpdateCdnKey" }, + { "service": "google.cloud.video.stitcher.v1.VideoStitcherService", "method": "CreateSlate" }, + { "service": "google.cloud.video.stitcher.v1.VideoStitcherService", "method": "ListSlates" }, + { "service": "google.cloud.video.stitcher.v1.VideoStitcherService", "method": "GetSlate" }, + { "service": "google.cloud.video.stitcher.v1.VideoStitcherService", "method": "DeleteSlate" }, + { "service": "google.cloud.video.stitcher.v1.VideoStitcherService", "method": "UpdateSlate" }, + { "service": "google.cloud.video.stitcher.v1.VideoStitcherService", "method": "CreateLiveSession" }, + { "service": "google.cloud.video.stitcher.v1.VideoStitcherService", "method": "GetLiveSession" }, + { "service": "google.cloud.video.stitcher.v1.VideoStitcherService", "method": "ListLiveAdTagDetails" }, + { "service": "google.cloud.video.stitcher.v1.VideoStitcherService", "method": "GetLiveAdTagDetail" }, + { "service": "google.cloud.video.stitcher.v1.VideoStitcherService", "method": "CreateVodSession" }, + { "service": "google.cloud.video.stitcher.v1.VideoStitcherService", "method": "GetVodSession" }, + { "service": "google.cloud.video.stitcher.v1.VideoStitcherService", "method": "ListVodAdTagDetails" }, + { "service": "google.cloud.video.stitcher.v1.VideoStitcherService", "method": "GetVodAdTagDetail" }, + { "service": "google.cloud.video.stitcher.v1.VideoStitcherService", "method": "ListVodStitchDetails" }, + { "service": "google.cloud.video.stitcher.v1.VideoStitcherService", "method": "GetVodStitchDetail" } + ], + "timeout": "60s" + }] +} diff --git a/google/cloud/video/stitcher/v1/videostitcher_v1.yaml b/google/cloud/video/stitcher/v1/videostitcher_v1.yaml new file mode 100644 index 0000000000000..3da687c984b95 --- /dev/null +++ b/google/cloud/video/stitcher/v1/videostitcher_v1.yaml @@ -0,0 +1,50 @@ +type: google.api.Service +config_version: 3 +name: videostitcher.googleapis.com +title: Video Stitcher API + +apis: +- name: google.cloud.video.stitcher.v1.VideoStitcherService + +documentation: + rules: + - selector: google.iam.v1.IAMPolicy.GetIamPolicy + description: |- + Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + + - selector: google.iam.v1.IAMPolicy.SetIamPolicy + description: |- + Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + + - selector: google.iam.v1.IAMPolicy.TestIamPermissions + description: |- + Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + +backend: + rules: + - selector: 'google.cloud.video.stitcher.v1.VideoStitcherService.*' + deadline: 30.0 + - selector: 'google.iam.v1.IAMPolicy.*' + deadline: 30.0 + +authentication: + rules: + - selector: 'google.cloud.video.stitcher.v1.VideoStitcherService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.iam.v1.IAMPolicy.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform