Skip to content

Commit

Permalink
feat: added support for slate events which allow users to create and …
Browse files Browse the repository at this point in the history
…insert a slate into a live stream to replace the main live stream content

feat: added a new asset resource which can be used as the content of slate events
feat: added a new pool resource for protecting input endpoints within a VPC Service Controls perimeter

PiperOrigin-RevId: 549682971

Source-Link: googleapis/googleapis@e43e3d6

Source-Link: googleapis/googleapis-gen@47b8267
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuVmlkZW8uTGl2ZVN0cmVhbS5WMS8uT3dsQm90LnlhbWwiLCJoIjoiNDdiODI2NzFiYTEwODYyYTY4ZGY0YzExYTk3ODEzMWMyYzkyMTI0YyJ9
  • Loading branch information
gcf-owl-bot[bot] authored and amanda-tarafa committed Jul 21, 2023
1 parent 36b0942 commit 9efd50b
Show file tree
Hide file tree
Showing 43 changed files with 13,734 additions and 2,734 deletions.
@@ -0,0 +1,63 @@
// 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.
// You may obtain a copy of the License at
//
// https://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.

// Generated code. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START livestream_v1_generated_LivestreamService_CreateAsset_async_flattened]
using Google.Cloud.Video.LiveStream.V1;
using Google.LongRunning;
using System.Threading.Tasks;

public sealed partial class GeneratedLivestreamServiceClientSnippets
{
/// <summary>Snippet for CreateAssetAsync</summary>
/// <remarks>
/// This snippet has been automatically generated and should be regarded as a code template only.
/// It will require modifications to work:
/// - It may require correct/in-range values for request initialization.
/// - It may require specifying regional endpoints when creating the service client as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public async Task CreateAssetAsync()
{
// Create client
LivestreamServiceClient livestreamServiceClient = await LivestreamServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Asset asset = new Asset();
string assetId = "";
// Make the request
Operation<Asset, OperationMetadata> response = await livestreamServiceClient.CreateAssetAsync(parent, asset, assetId);

// Poll until the returned long-running operation is complete
Operation<Asset, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Asset result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Asset, OperationMetadata> retrievedResponse = await livestreamServiceClient.PollOnceCreateAssetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Asset retrievedResult = retrievedResponse.Result;
}
}
}
// [END livestream_v1_generated_LivestreamService_CreateAsset_async_flattened]
}
@@ -0,0 +1,68 @@
// 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.
// You may obtain a copy of the License at
//
// https://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.

// Generated code. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START livestream_v1_generated_LivestreamService_CreateAsset_async]
using Google.Api.Gax.ResourceNames;
using Google.Cloud.Video.LiveStream.V1;
using Google.LongRunning;
using System.Threading.Tasks;

public sealed partial class GeneratedLivestreamServiceClientSnippets
{
/// <summary>Snippet for CreateAssetAsync</summary>
/// <remarks>
/// This snippet has been automatically generated and should be regarded as a code template only.
/// It will require modifications to work:
/// - It may require correct/in-range values for request initialization.
/// - It may require specifying regional endpoints when creating the service client as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public async Task CreateAssetRequestObjectAsync()
{
// Create client
LivestreamServiceClient livestreamServiceClient = await LivestreamServiceClient.CreateAsync();
// Initialize request argument(s)
CreateAssetRequest request = new CreateAssetRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Asset = new Asset(),
AssetId = "",
RequestId = "",
};
// Make the request
Operation<Asset, OperationMetadata> response = await livestreamServiceClient.CreateAssetAsync(request);

// Poll until the returned long-running operation is complete
Operation<Asset, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Asset result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Asset, OperationMetadata> retrievedResponse = await livestreamServiceClient.PollOnceCreateAssetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Asset retrievedResult = retrievedResponse.Result;
}
}
}
// [END livestream_v1_generated_LivestreamService_CreateAsset_async]
}
@@ -0,0 +1,67 @@
// 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.
// You may obtain a copy of the License at
//
// https://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.

// Generated code. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START livestream_v1_generated_LivestreamService_CreateAsset_sync]
using Google.Api.Gax.ResourceNames;
using Google.Cloud.Video.LiveStream.V1;
using Google.LongRunning;

public sealed partial class GeneratedLivestreamServiceClientSnippets
{
/// <summary>Snippet for CreateAsset</summary>
/// <remarks>
/// This snippet has been automatically generated and should be regarded as a code template only.
/// It will require modifications to work:
/// - It may require correct/in-range values for request initialization.
/// - It may require specifying regional endpoints when creating the service client as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public void CreateAssetRequestObject()
{
// Create client
LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.Create();
// Initialize request argument(s)
CreateAssetRequest request = new CreateAssetRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Asset = new Asset(),
AssetId = "",
RequestId = "",
};
// Make the request
Operation<Asset, OperationMetadata> response = livestreamServiceClient.CreateAsset(request);

// Poll until the returned long-running operation is complete
Operation<Asset, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Asset result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Asset, OperationMetadata> retrievedResponse = livestreamServiceClient.PollOnceCreateAsset(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Asset retrievedResult = retrievedResponse.Result;
}
}
}
// [END livestream_v1_generated_LivestreamService_CreateAsset_sync]
}
@@ -0,0 +1,64 @@
// 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.
// You may obtain a copy of the License at
//
// https://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.

// Generated code. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START livestream_v1_generated_LivestreamService_CreateAsset_async_flattened_resourceNames]
using Google.Api.Gax.ResourceNames;
using Google.Cloud.Video.LiveStream.V1;
using Google.LongRunning;
using System.Threading.Tasks;

public sealed partial class GeneratedLivestreamServiceClientSnippets
{
/// <summary>Snippet for CreateAssetAsync</summary>
/// <remarks>
/// This snippet has been automatically generated and should be regarded as a code template only.
/// It will require modifications to work:
/// - It may require correct/in-range values for request initialization.
/// - It may require specifying regional endpoints when creating the service client as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public async Task CreateAssetResourceNamesAsync()
{
// Create client
LivestreamServiceClient livestreamServiceClient = await LivestreamServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Asset asset = new Asset();
string assetId = "";
// Make the request
Operation<Asset, OperationMetadata> response = await livestreamServiceClient.CreateAssetAsync(parent, asset, assetId);

// Poll until the returned long-running operation is complete
Operation<Asset, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Asset result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Asset, OperationMetadata> retrievedResponse = await livestreamServiceClient.PollOnceCreateAssetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Asset retrievedResult = retrievedResponse.Result;
}
}
}
// [END livestream_v1_generated_LivestreamService_CreateAsset_async_flattened_resourceNames]
}
@@ -0,0 +1,63 @@
// 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.
// You may obtain a copy of the License at
//
// https://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.

// Generated code. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START livestream_v1_generated_LivestreamService_CreateAsset_sync_flattened_resourceNames]
using Google.Api.Gax.ResourceNames;
using Google.Cloud.Video.LiveStream.V1;
using Google.LongRunning;

public sealed partial class GeneratedLivestreamServiceClientSnippets
{
/// <summary>Snippet for CreateAsset</summary>
/// <remarks>
/// This snippet has been automatically generated and should be regarded as a code template only.
/// It will require modifications to work:
/// - It may require correct/in-range values for request initialization.
/// - It may require specifying regional endpoints when creating the service client as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public void CreateAssetResourceNames()
{
// Create client
LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Asset asset = new Asset();
string assetId = "";
// Make the request
Operation<Asset, OperationMetadata> response = livestreamServiceClient.CreateAsset(parent, asset, assetId);

// Poll until the returned long-running operation is complete
Operation<Asset, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Asset result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Asset, OperationMetadata> retrievedResponse = livestreamServiceClient.PollOnceCreateAsset(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Asset retrievedResult = retrievedResponse.Result;
}
}
}
// [END livestream_v1_generated_LivestreamService_CreateAsset_sync_flattened_resourceNames]
}
@@ -0,0 +1,62 @@
// 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.
// You may obtain a copy of the License at
//
// https://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.

// Generated code. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START livestream_v1_generated_LivestreamService_CreateAsset_sync_flattened]
using Google.Cloud.Video.LiveStream.V1;
using Google.LongRunning;

public sealed partial class GeneratedLivestreamServiceClientSnippets
{
/// <summary>Snippet for CreateAsset</summary>
/// <remarks>
/// This snippet has been automatically generated and should be regarded as a code template only.
/// It will require modifications to work:
/// - It may require correct/in-range values for request initialization.
/// - It may require specifying regional endpoints when creating the service client as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public void CreateAsset()
{
// Create client
LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Asset asset = new Asset();
string assetId = "";
// Make the request
Operation<Asset, OperationMetadata> response = livestreamServiceClient.CreateAsset(parent, asset, assetId);

// Poll until the returned long-running operation is complete
Operation<Asset, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Asset result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Asset, OperationMetadata> retrievedResponse = livestreamServiceClient.PollOnceCreateAsset(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Asset retrievedResult = retrievedResponse.Result;
}
}
}
// [END livestream_v1_generated_LivestreamService_CreateAsset_sync_flattened]
}

0 comments on commit 9efd50b

Please sign in to comment.