|
| 1 | +// Copyright 2023 Google LLC |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +syntax = "proto3"; |
| 16 | + |
| 17 | +package google.cloud.video.stitcher.v1; |
| 18 | + |
| 19 | +import "google/api/field_behavior.proto"; |
| 20 | +import "google/api/resource.proto"; |
| 21 | +import "google/protobuf/duration.proto"; |
| 22 | + |
| 23 | +option go_package = "cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpb"; |
| 24 | +option java_multiple_files = true; |
| 25 | +option java_outer_classname = "LiveConfigsProto"; |
| 26 | +option java_package = "com.google.cloud.video.stitcher.v1"; |
| 27 | + |
| 28 | +// Determines the Ad tracking policy. |
| 29 | +enum AdTracking { |
| 30 | + // The ad tracking policy is not specified. |
| 31 | + AD_TRACKING_UNSPECIFIED = 0; |
| 32 | + |
| 33 | + // Client side ad tracking is specified. The client player is expected to |
| 34 | + // trigger playback and activity events itself. |
| 35 | + CLIENT = 1; |
| 36 | + |
| 37 | + // The Video Stitcher API will trigger playback events on behalf of |
| 38 | + // the client player. |
| 39 | + SERVER = 2; |
| 40 | +} |
| 41 | + |
| 42 | +// Metadata for used to register live configs. |
| 43 | +message LiveConfig { |
| 44 | + option (google.api.resource) = { |
| 45 | + type: "videostitcher.googleapis.com/LiveConfig" |
| 46 | + pattern: "projects/{project}/locations/{location}/liveConfigs/{live_config}" |
| 47 | + }; |
| 48 | + |
| 49 | + // State of the live config. |
| 50 | + enum State { |
| 51 | + // State is not specified. |
| 52 | + STATE_UNSPECIFIED = 0; |
| 53 | + |
| 54 | + // Live config is being created. |
| 55 | + CREATING = 1; |
| 56 | + |
| 57 | + // Live config is ready for use. |
| 58 | + READY = 2; |
| 59 | + |
| 60 | + // Live config is queued up for deletion. |
| 61 | + DELETING = 3; |
| 62 | + } |
| 63 | + |
| 64 | + // Defines the ad stitching behavior in case the ad duration does not align |
| 65 | + // exactly with the ad break boundaries. If not specified, the default is |
| 66 | + // CUT_CURRENT. |
| 67 | + enum StitchingPolicy { |
| 68 | + // Stitching policy is not specified. |
| 69 | + STITCHING_POLICY_UNSPECIFIED = 0; |
| 70 | + |
| 71 | + // Cuts an ad short and returns to content in the middle of the ad. |
| 72 | + CUT_CURRENT = 1; |
| 73 | + |
| 74 | + // Finishes stitching the current ad before returning to content. |
| 75 | + COMPLETE_AD = 2; |
| 76 | + } |
| 77 | + |
| 78 | + // Output only. The resource name of the live config, in the form of |
| 79 | + // `projects/{project}/locations/{location}/liveConfigs/{id}`. |
| 80 | + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 81 | + |
| 82 | + // Required. Source URI for the live stream manifest. |
| 83 | + string source_uri = 2 [(google.api.field_behavior) = REQUIRED]; |
| 84 | + |
| 85 | + // The default ad tag associated with this live stream config. |
| 86 | + string ad_tag_uri = 3; |
| 87 | + |
| 88 | + // Additional metadata used to register a live stream with Google Ad Manager |
| 89 | + // (GAM) |
| 90 | + GamLiveConfig gam_live_config = 4; |
| 91 | + |
| 92 | + // Output only. State of the live config. |
| 93 | + State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 94 | + |
| 95 | + // Required. Determines how the ads should be tracked. If |
| 96 | + // [gam_live_config][google.cloud.video.stitcher.v1.LiveConfig.gam_live_config] |
| 97 | + // is set, the value must be `CLIENT` because the IMA SDK handles ad tracking. |
| 98 | + AdTracking ad_tracking = 6 [(google.api.field_behavior) = REQUIRED]; |
| 99 | + |
| 100 | + // This must refer to a slate in the same |
| 101 | + // project. In case Google Ad Manager (GAM) is being used for ads this will be |
| 102 | + // used to set the appropriate value of slateCreativeId in |
| 103 | + // https://developers.google.com/ad-manager/api/reference/v202211/LiveStreamEventService.LiveStreamEvent#slateCreativeId |
| 104 | + string default_slate = 7 [(google.api.resource_reference) = { |
| 105 | + type: "videostitcher.googleapis.com/Slate" |
| 106 | + }]; |
| 107 | + |
| 108 | + // Defines the stitcher behavior in case an ad does not align exactly with |
| 109 | + // the ad break boundaries. If not specified, the default is `CUT_CURRENT`. |
| 110 | + StitchingPolicy stitching_policy = 8; |
| 111 | + |
| 112 | + // The configuration for prefetching ads. |
| 113 | + PrefetchConfig prefetch_config = 10; |
| 114 | + |
| 115 | + // The default ad pod duration in seconds that will be requested when a |
| 116 | + // cue-out does not specify a duration. |
| 117 | + // The default value of this field is 30s. |
| 118 | + google.protobuf.Duration default_ad_break_duration = 11; |
| 119 | +} |
| 120 | + |
| 121 | +// The configuration for prefetch ads. |
| 122 | +message PrefetchConfig { |
| 123 | + // Required. Indicates whether the option to prefetch ad requests is enabled. |
| 124 | + bool enabled = 1 [(google.api.field_behavior) = REQUIRED]; |
| 125 | + |
| 126 | + // The duration in seconds of the part of the break to be prefetched. |
| 127 | + // This field is only relevant if prefetch is enabled. |
| 128 | + // You should set this duration to as long as possible to increase the |
| 129 | + // benefits of prefetching, but not longer than the shortest ad break |
| 130 | + // expected. For example, for a live event with 30s and 60s ad breaks, the |
| 131 | + // initial duration should be set to 30s. |
| 132 | + google.protobuf.Duration initial_ad_request_duration = 2; |
| 133 | +} |
| 134 | + |
| 135 | +// Metadata used to register a live stream with Google Ad Manager (GAM) |
| 136 | +message GamLiveConfig { |
| 137 | + // Required. Ad Manager network code to associate with the live config. |
| 138 | + string network_code = 1 [(google.api.field_behavior) = REQUIRED]; |
| 139 | + |
| 140 | + // Output only. The asset key identifier generated for the live config. |
| 141 | + string asset_key = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 142 | + |
| 143 | + // Output only. The custom asset key identifier generated for the live config. |
| 144 | + string custom_asset_key = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 145 | +} |
0 commit comments