-
Notifications
You must be signed in to change notification settings - Fork 371
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PiperOrigin-RevId: 437796977 Source-Link: googleapis/googleapis@9346947 Source-Link: googleapis/googleapis-gen@6af642d Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuR2FtaW5nLlYxLy5Pd2xCb3QueWFtbCIsImgiOiI2YWY2NDJkOTgyODJmZjMxMzEwYmQ2ODZkMjFhZGIxZDIwN2YzOGE2In0=
- Loading branch information
1 parent
2057c2e
commit 6c16059
Showing
165 changed files
with
45,476 additions
and
0 deletions.
There are no files selected for viewing
60 changes: 60 additions & 0 deletions
60
...eneratedSnippets/GameServerClustersServiceClient.CreateGameServerClusterAsyncSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
// | ||
// 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 Google.Cloud.Gaming.V1.Snippets | ||
{ | ||
// [START gameservices_v1_generated_GameServerClustersService_CreateGameServerCluster_async_flattened] | ||
using Google.Cloud.Gaming.V1; | ||
using Google.LongRunning; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedGameServerClustersServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for CreateGameServerClusterAsync</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated for illustrative purposes only. | ||
/// It may require modifications to work in your environment. | ||
/// </remarks> | ||
public async Task CreateGameServerClusterAsync() | ||
{ | ||
// Create client | ||
GameServerClustersServiceClient gameServerClustersServiceClient = await GameServerClustersServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
string parent = "projects/[PROJECT]/locations/[LOCATION]/realms/[REALM]"; | ||
GameServerCluster gameServerCluster = new GameServerCluster(); | ||
string gameServerClusterId = ""; | ||
// Make the request | ||
Operation<GameServerCluster, OperationMetadata> response = await gameServerClustersServiceClient.CreateGameServerClusterAsync(parent, gameServerCluster, gameServerClusterId); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<GameServerCluster, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync(); | ||
// Retrieve the operation result | ||
GameServerCluster 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<GameServerCluster, OperationMetadata> retrievedResponse = await gameServerClustersServiceClient.PollOnceCreateGameServerClusterAsync(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
GameServerCluster retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END gameservices_v1_generated_GameServerClustersService_CreateGameServerCluster_async_flattened] | ||
} |
63 changes: 63 additions & 0 deletions
63
...ets/GameServerClustersServiceClient.CreateGameServerClusterRequestObjectAsyncSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
// 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 | ||
// | ||
// 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 Google.Cloud.Gaming.V1.Snippets | ||
{ | ||
// [START gameservices_v1_generated_GameServerClustersService_CreateGameServerCluster_async] | ||
using Google.Cloud.Gaming.V1; | ||
using Google.LongRunning; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedGameServerClustersServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for CreateGameServerClusterAsync</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated for illustrative purposes only. | ||
/// It may require modifications to work in your environment. | ||
/// </remarks> | ||
public async Task CreateGameServerClusterRequestObjectAsync() | ||
{ | ||
// Create client | ||
GameServerClustersServiceClient gameServerClustersServiceClient = await GameServerClustersServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
CreateGameServerClusterRequest request = new CreateGameServerClusterRequest | ||
{ | ||
ParentAsRealmName = RealmName.FromProjectLocationRealm("[PROJECT]", "[LOCATION]", "[REALM]"), | ||
GameServerClusterId = "", | ||
GameServerCluster = new GameServerCluster(), | ||
}; | ||
// Make the request | ||
Operation<GameServerCluster, OperationMetadata> response = await gameServerClustersServiceClient.CreateGameServerClusterAsync(request); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<GameServerCluster, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync(); | ||
// Retrieve the operation result | ||
GameServerCluster 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<GameServerCluster, OperationMetadata> retrievedResponse = await gameServerClustersServiceClient.PollOnceCreateGameServerClusterAsync(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
GameServerCluster retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END gameservices_v1_generated_GameServerClustersService_CreateGameServerCluster_async] | ||
} |
62 changes: 62 additions & 0 deletions
62
...Snippets/GameServerClustersServiceClient.CreateGameServerClusterRequestObjectSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// 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 | ||
// | ||
// 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 Google.Cloud.Gaming.V1.Snippets | ||
{ | ||
// [START gameservices_v1_generated_GameServerClustersService_CreateGameServerCluster_sync] | ||
using Google.Cloud.Gaming.V1; | ||
using Google.LongRunning; | ||
|
||
public sealed partial class GeneratedGameServerClustersServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for CreateGameServerCluster</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated for illustrative purposes only. | ||
/// It may require modifications to work in your environment. | ||
/// </remarks> | ||
public void CreateGameServerClusterRequestObject() | ||
{ | ||
// Create client | ||
GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.Create(); | ||
// Initialize request argument(s) | ||
CreateGameServerClusterRequest request = new CreateGameServerClusterRequest | ||
{ | ||
ParentAsRealmName = RealmName.FromProjectLocationRealm("[PROJECT]", "[LOCATION]", "[REALM]"), | ||
GameServerClusterId = "", | ||
GameServerCluster = new GameServerCluster(), | ||
}; | ||
// Make the request | ||
Operation<GameServerCluster, OperationMetadata> response = gameServerClustersServiceClient.CreateGameServerCluster(request); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<GameServerCluster, OperationMetadata> completedResponse = response.PollUntilCompleted(); | ||
// Retrieve the operation result | ||
GameServerCluster 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<GameServerCluster, OperationMetadata> retrievedResponse = gameServerClustersServiceClient.PollOnceCreateGameServerCluster(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
GameServerCluster retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END gameservices_v1_generated_GameServerClustersService_CreateGameServerCluster_sync] | ||
} |
60 changes: 60 additions & 0 deletions
60
...ets/GameServerClustersServiceClient.CreateGameServerClusterResourceNamesAsyncSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
// | ||
// 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 Google.Cloud.Gaming.V1.Snippets | ||
{ | ||
// [START gameservices_v1_generated_GameServerClustersService_CreateGameServerCluster_async_flattened_resourceNames] | ||
using Google.Cloud.Gaming.V1; | ||
using Google.LongRunning; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedGameServerClustersServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for CreateGameServerClusterAsync</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated for illustrative purposes only. | ||
/// It may require modifications to work in your environment. | ||
/// </remarks> | ||
public async Task CreateGameServerClusterResourceNamesAsync() | ||
{ | ||
// Create client | ||
GameServerClustersServiceClient gameServerClustersServiceClient = await GameServerClustersServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
RealmName parent = RealmName.FromProjectLocationRealm("[PROJECT]", "[LOCATION]", "[REALM]"); | ||
GameServerCluster gameServerCluster = new GameServerCluster(); | ||
string gameServerClusterId = ""; | ||
// Make the request | ||
Operation<GameServerCluster, OperationMetadata> response = await gameServerClustersServiceClient.CreateGameServerClusterAsync(parent, gameServerCluster, gameServerClusterId); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<GameServerCluster, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync(); | ||
// Retrieve the operation result | ||
GameServerCluster 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<GameServerCluster, OperationMetadata> retrievedResponse = await gameServerClustersServiceClient.PollOnceCreateGameServerClusterAsync(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
GameServerCluster retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END gameservices_v1_generated_GameServerClustersService_CreateGameServerCluster_async_flattened_resourceNames] | ||
} |
59 changes: 59 additions & 0 deletions
59
...Snippets/GameServerClustersServiceClient.CreateGameServerClusterResourceNamesSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// 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 | ||
// | ||
// 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 Google.Cloud.Gaming.V1.Snippets | ||
{ | ||
// [START gameservices_v1_generated_GameServerClustersService_CreateGameServerCluster_sync_flattened_resourceNames] | ||
using Google.Cloud.Gaming.V1; | ||
using Google.LongRunning; | ||
|
||
public sealed partial class GeneratedGameServerClustersServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for CreateGameServerCluster</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated for illustrative purposes only. | ||
/// It may require modifications to work in your environment. | ||
/// </remarks> | ||
public void CreateGameServerClusterResourceNames() | ||
{ | ||
// Create client | ||
GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.Create(); | ||
// Initialize request argument(s) | ||
RealmName parent = RealmName.FromProjectLocationRealm("[PROJECT]", "[LOCATION]", "[REALM]"); | ||
GameServerCluster gameServerCluster = new GameServerCluster(); | ||
string gameServerClusterId = ""; | ||
// Make the request | ||
Operation<GameServerCluster, OperationMetadata> response = gameServerClustersServiceClient.CreateGameServerCluster(parent, gameServerCluster, gameServerClusterId); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<GameServerCluster, OperationMetadata> completedResponse = response.PollUntilCompleted(); | ||
// Retrieve the operation result | ||
GameServerCluster 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<GameServerCluster, OperationMetadata> retrievedResponse = gameServerClustersServiceClient.PollOnceCreateGameServerCluster(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
GameServerCluster retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END gameservices_v1_generated_GameServerClustersService_CreateGameServerCluster_sync_flattened_resourceNames] | ||
} |
59 changes: 59 additions & 0 deletions
59
....V1.GeneratedSnippets/GameServerClustersServiceClient.CreateGameServerClusterSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// 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 | ||
// | ||
// 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 Google.Cloud.Gaming.V1.Snippets | ||
{ | ||
// [START gameservices_v1_generated_GameServerClustersService_CreateGameServerCluster_sync_flattened] | ||
using Google.Cloud.Gaming.V1; | ||
using Google.LongRunning; | ||
|
||
public sealed partial class GeneratedGameServerClustersServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for CreateGameServerCluster</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated for illustrative purposes only. | ||
/// It may require modifications to work in your environment. | ||
/// </remarks> | ||
public void CreateGameServerCluster() | ||
{ | ||
// Create client | ||
GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.Create(); | ||
// Initialize request argument(s) | ||
string parent = "projects/[PROJECT]/locations/[LOCATION]/realms/[REALM]"; | ||
GameServerCluster gameServerCluster = new GameServerCluster(); | ||
string gameServerClusterId = ""; | ||
// Make the request | ||
Operation<GameServerCluster, OperationMetadata> response = gameServerClustersServiceClient.CreateGameServerCluster(parent, gameServerCluster, gameServerClusterId); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<GameServerCluster, OperationMetadata> completedResponse = response.PollUntilCompleted(); | ||
// Retrieve the operation result | ||
GameServerCluster 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<GameServerCluster, OperationMetadata> retrievedResponse = gameServerClustersServiceClient.PollOnceCreateGameServerCluster(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
GameServerCluster retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END gameservices_v1_generated_GameServerClustersService_CreateGameServerCluster_sync_flattened] | ||
} |
Oops, something went wrong.