From 3c125a66ac84556314a3908f47b6ccb9948f330e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 13 Jun 2022 11:05:17 -0700 Subject: [PATCH] feat: [VideoStitcher] add asset_id and stream_id fields to VodSession and LiveSession responses (#5331) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add asset_id and stream_id fields to VodSession and LiveSession responses fix!: remove COMPLETE_POD stitching option PiperOrigin-RevId: 454023909 Source-Link: https://github.com/googleapis/googleapis/commit/f296ef560e18240baf983bcfb8a08e5b81714647 Source-Link: https://github.com/googleapis/googleapis-gen/commit/bb5e9fcb21404eb0f6e649443c41c5acfdc301e1 Copy-Tag: eyJwIjoiVmlkZW9TdGl0Y2hlci8uT3dsQm90LnlhbWwiLCJoIjoiYmI1ZTlmY2IyMTQwNGViMGY2ZTY0OTQ0M2M0MWM1YWNmZGMzMDFlMSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- VideoStitcher/metadata/V1/Sessions.php | Bin 3652 -> 3681 bytes .../metadata/V1/VideoStitcherService.php | 6 ++-- .../src/V1/CreateLiveSessionRequest.php | 28 --------------- .../Gapic/VideoStitcherServiceGapicClient.php | 9 ----- VideoStitcher/src/V1/LiveSession.php | 34 ++++++++++++++++++ .../src/V1/LiveSession/StitchingPolicy.php | 7 ---- VideoStitcher/src/V1/VodSession.php | 34 ++++++++++++++++++ .../V1/VideoStitcherServiceClientTest.php | 8 +++++ 8 files changed, 78 insertions(+), 48 deletions(-) diff --git a/VideoStitcher/metadata/V1/Sessions.php b/VideoStitcher/metadata/V1/Sessions.php index 853ae50e310c02c0fe847e57f42fc24dc9d0c64a..dc3b6649eaec9f6e2a893bbba6182690e695e802 100644 GIT binary patch delta 96 zcmX>i^H64kIy2*^$r{YB7&mSfW+`D57ZT;-NGvW+Es4)ek>FBb)Zlbte&EQwxt%qX snepQ0yBv=hC4|JdIEzb)QWJAQin!s5CLiGHWelC{$L+d#DffIP0FoUY00000 delta 75 zcmV-R0JQ(%9K;;3Cj$Z1lPCk~2bu&53RZ7qllur8vor)#0kfV3RRaObv-Ak#0h8|v hjR9wqeG5eq5DE-KPfbuvMN~y!P)|e<0<*yjpaSC>82bPK diff --git a/VideoStitcher/metadata/V1/VideoStitcherService.php b/VideoStitcher/metadata/V1/VideoStitcherService.php index b7e7cf68bc8..334a8ea7751 100644 --- a/VideoStitcher/metadata/V1/VideoStitcherService.php +++ b/VideoStitcher/metadata/V1/VideoStitcherService.php @@ -23,14 +23,12 @@ public static function initOnce() { \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Slates::initOnce(); \GPBMetadata\Google\Cloud\Video\Stitcher\V1\StitchDetails::initOnce(); - \GPBMetadata\Google\Protobuf\Duration::initOnce(); \GPBMetadata\Google\Protobuf\GPBEmpty::initOnce(); \GPBMetadata\Google\Protobuf\FieldMask::initOnce(); - \GPBMetadata\Google\Protobuf\Timestamp::initOnce(); $pool->internalAddGeneratedFile( ' -‘= -;google/cloud/video/stitcher/v1/video_stitcher_service.protogoogle.cloud.video.stitcher.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto3google/cloud/video/stitcher/v1/ad_tag_details.proto-google/cloud/video/stitcher/v1/cdn_keys.proto-google/cloud/video/stitcher/v1/sessions.proto+google/cloud/video/stitcher/v1/slates.proto3google/cloud/video/stitcher/v1/stitch_details.protogoogle/protobuf/duration.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"© +Ð< +;google/cloud/video/stitcher/v1/video_stitcher_service.protogoogle.cloud.video.stitcher.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto3google/cloud/video/stitcher/v1/ad_tag_details.proto-google/cloud/video/stitcher/v1/cdn_keys.proto-google/cloud/video/stitcher/v1/sessions.proto+google/cloud/video/stitcher/v1/slates.proto3google/cloud/video/stitcher/v1/stitch_details.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"© CreateCdnKeyRequest; parent ( B+àAúA%#videostitcher.googleapis.com/CdnKey< cdn_key ( 2&.google.cloud.video.stitcher.v1.CdnKeyBàA diff --git a/VideoStitcher/src/V1/CreateLiveSessionRequest.php b/VideoStitcher/src/V1/CreateLiveSessionRequest.php index 597ff23b03c..eb0714ce5eb 100644 --- a/VideoStitcher/src/V1/CreateLiveSessionRequest.php +++ b/VideoStitcher/src/V1/CreateLiveSessionRequest.php @@ -18,13 +18,6 @@ class CreateLiveSessionRequest extends \Google\Protobuf\Internal\Message /** * 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` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -45,13 +38,6 @@ class CreateLiveSessionRequest extends \Google\Protobuf\Internal\Message * @type string $parent * 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` * @type \Google\Cloud\Video\Stitcher\V1\LiveSession $live_session * Required. Parameters for creating a live session. * } @@ -64,13 +50,6 @@ public function __construct($data = NULL) { /** * 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` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -83,13 +62,6 @@ public function getParent() /** * 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` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/VideoStitcher/src/V1/Gapic/VideoStitcherServiceGapicClient.php b/VideoStitcher/src/V1/Gapic/VideoStitcherServiceGapicClient.php index c59e50854ef..aa5a6e2e8a9 100644 --- a/VideoStitcher/src/V1/Gapic/VideoStitcherServiceGapicClient.php +++ b/VideoStitcher/src/V1/Gapic/VideoStitcherServiceGapicClient.php @@ -644,15 +644,6 @@ public function createCdnKey( * * @param string $parent 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` * @param LiveSession $liveSession Required. Parameters for creating a live session. * @param array $optionalArgs { * Optional. diff --git a/VideoStitcher/src/V1/LiveSession.php b/VideoStitcher/src/V1/LiveSession.php index 47d75e8476a..1685e1841b3 100644 --- a/VideoStitcher/src/V1/LiveSession.php +++ b/VideoStitcher/src/V1/LiveSession.php @@ -95,6 +95,12 @@ class LiveSession extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10; */ private $manifest_options = null; + /** + * Output only. The generated ID of the LiveSession's source stream. + * + * Generated from protobuf field string stream_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $stream_id = ''; /** * Constructor. @@ -142,6 +148,8 @@ class LiveSession extends \Google\Protobuf\Internal\Message * the ad break boundaries. If not specified, the default is `COMPLETE_AD`. * @type \Google\Cloud\Video\Stitcher\V1\ManifestOptions $manifest_options * Additional options that affect the output of the manifest. + * @type string $stream_id + * Output only. The generated ID of the LiveSession's source stream. * } */ public function __construct($data = NULL) { @@ -459,5 +467,31 @@ public function setManifestOptions($var) return $this; } + /** + * Output only. The generated ID of the LiveSession's source stream. + * + * Generated from protobuf field string stream_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStreamId() + { + return $this->stream_id; + } + + /** + * Output only. The generated ID of the LiveSession's source stream. + * + * Generated from protobuf field string stream_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStreamId($var) + { + GPBUtil::checkString($var, True); + $this->stream_id = $var; + + return $this; + } + } diff --git a/VideoStitcher/src/V1/LiveSession/StitchingPolicy.php b/VideoStitcher/src/V1/LiveSession/StitchingPolicy.php index 760d1ca1371..64a8eabfea9 100644 --- a/VideoStitcher/src/V1/LiveSession/StitchingPolicy.php +++ b/VideoStitcher/src/V1/LiveSession/StitchingPolicy.php @@ -26,12 +26,6 @@ class StitchingPolicy * Generated from protobuf enum COMPLETE_AD = 1; */ const COMPLETE_AD = 1; - /** - * Finishes stitching the current pod before returning to content. - * - * Generated from protobuf enum COMPLETE_POD = 2; - */ - const COMPLETE_POD = 2; /** * Cuts an ad short and returns to content in the middle of the ad. * @@ -42,7 +36,6 @@ class StitchingPolicy private static $valueToName = [ self::STITCHING_POLICY_UNSPECIFIED => 'STITCHING_POLICY_UNSPECIFIED', self::COMPLETE_AD => 'COMPLETE_AD', - self::COMPLETE_POD => 'COMPLETE_POD', self::CUT_CURRENT => 'CUT_CURRENT', ]; diff --git a/VideoStitcher/src/V1/VodSession.php b/VideoStitcher/src/V1/VodSession.php index 7fe2fa4a1ef..e78cdb61e77 100644 --- a/VideoStitcher/src/V1/VodSession.php +++ b/VideoStitcher/src/V1/VodSession.php @@ -77,6 +77,12 @@ class VodSession extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 9; */ private $manifest_options = null; + /** + * Output only. The generated ID of the VodSession's source media. + * + * Generated from protobuf field string asset_id = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $asset_id = ''; /** * Constructor. @@ -114,6 +120,8 @@ class VodSession extends \Google\Protobuf\Internal\Message * on behalf of the client player. * @type \Google\Cloud\Video\Stitcher\V1\ManifestOptions $manifest_options * Additional options that affect the output of the manifest. + * @type string $asset_id + * Output only. The generated ID of the VodSession's source media. * } */ public function __construct($data = NULL) { @@ -377,5 +385,31 @@ public function setManifestOptions($var) return $this; } + /** + * Output only. The generated ID of the VodSession's source media. + * + * Generated from protobuf field string asset_id = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getAssetId() + { + return $this->asset_id; + } + + /** + * Output only. The generated ID of the VodSession's source media. + * + * Generated from protobuf field string asset_id = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setAssetId($var) + { + GPBUtil::checkString($var, True); + $this->asset_id = $var; + + return $this; + } + } diff --git a/VideoStitcher/tests/Unit/V1/VideoStitcherServiceClientTest.php b/VideoStitcher/tests/Unit/V1/VideoStitcherServiceClientTest.php index 3d614192e27..ee70c8c8096 100644 --- a/VideoStitcher/tests/Unit/V1/VideoStitcherServiceClientTest.php +++ b/VideoStitcher/tests/Unit/V1/VideoStitcherServiceClientTest.php @@ -171,6 +171,7 @@ public function createLiveSessionTest() $defaultAdTagId = 'defaultAdTagId1910479614'; $clientAdTracking = false; $defaultSlateId = 'defaultSlateId-1589112385'; + $streamId = 'streamId-315624902'; $expectedResponse = new LiveSession(); $expectedResponse->setName($name); $expectedResponse->setPlayUri($playUri); @@ -178,6 +179,7 @@ public function createLiveSessionTest() $expectedResponse->setDefaultAdTagId($defaultAdTagId); $expectedResponse->setClientAdTracking($clientAdTracking); $expectedResponse->setDefaultSlateId($defaultSlateId); + $expectedResponse->setStreamId($streamId); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $client->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); @@ -322,12 +324,14 @@ public function createVodSessionTest() $sourceUri = 'sourceUri-1111107768'; $adTagUri = 'adTagUri-1429194965'; $clientAdTracking = false; + $assetId = 'assetId-373202742'; $expectedResponse = new VodSession(); $expectedResponse->setName($name); $expectedResponse->setPlayUri($playUri); $expectedResponse->setSourceUri($sourceUri); $expectedResponse->setAdTagUri($adTagUri); $expectedResponse->setClientAdTracking($clientAdTracking); + $expectedResponse->setAssetId($assetId); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $client->locationName('[PROJECT]', '[LOCATION]'); @@ -659,6 +663,7 @@ public function getLiveSessionTest() $defaultAdTagId = 'defaultAdTagId1910479614'; $clientAdTracking = false; $defaultSlateId = 'defaultSlateId-1589112385'; + $streamId = 'streamId-315624902'; $expectedResponse = new LiveSession(); $expectedResponse->setName($name2); $expectedResponse->setPlayUri($playUri); @@ -666,6 +671,7 @@ public function getLiveSessionTest() $expectedResponse->setDefaultAdTagId($defaultAdTagId); $expectedResponse->setClientAdTracking($clientAdTracking); $expectedResponse->setDefaultSlateId($defaultSlateId); + $expectedResponse->setStreamId($streamId); $transport->addResponse($expectedResponse); // Mock request $formattedName = $client->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); @@ -862,12 +868,14 @@ public function getVodSessionTest() $sourceUri = 'sourceUri-1111107768'; $adTagUri = 'adTagUri-1429194965'; $clientAdTracking = false; + $assetId = 'assetId-373202742'; $expectedResponse = new VodSession(); $expectedResponse->setName($name2); $expectedResponse->setPlayUri($playUri); $expectedResponse->setSourceUri($sourceUri); $expectedResponse->setAdTagUri($adTagUri); $expectedResponse->setClientAdTracking($clientAdTracking); + $expectedResponse->setAssetId($assetId); $transport->addResponse($expectedResponse); // Mock request $formattedName = $client->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]');