Skip to content

Commit

Permalink
docs: A comment for method ListWorkloads in service Environments
Browse files Browse the repository at this point in the history
…is changed

PiperOrigin-RevId: 715463286

Source-Link: googleapis/googleapis@8a75da8

Source-Link: googleapis/googleapis-gen@c20d798
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuT3JjaGVzdHJhdGlvbi5BaXJmbG93LlNlcnZpY2UuVjEvLk93bEJvdC55YW1sIiwiaCI6ImMyMGQ3OTg0YzVmZDc4NDgyNWM3MWIzY2IxNTM5Y2Q0NDcwMDg1NDQifQ==
  • Loading branch information
gcf-owl-bot[bot] committed Jan 14, 2025
1 parent 44bd6c7 commit f28fd8e
Show file tree
Hide file tree
Showing 119 changed files with 45,340 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// Copyright 2025 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 composer_v1_generated_Environments_CheckUpgrade_async]
using Google.Cloud.Orchestration.Airflow.Service.V1;
using Google.LongRunning;
using System.Threading.Tasks;

public sealed partial class GeneratedEnvironmentsClientSnippets
{
/// <summary>Snippet for CheckUpgradeAsync</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 CheckUpgradeRequestObjectAsync()
{
// Create client
EnvironmentsClient environmentsClient = await EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
CheckUpgradeRequest request = new CheckUpgradeRequest
{
Environment = "",
ImageVersion = "",
};
// Make the request
Operation<CheckUpgradeResponse, OperationMetadata> response = await environmentsClient.CheckUpgradeAsync(request);

// Poll until the returned long-running operation is complete
Operation<CheckUpgradeResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
CheckUpgradeResponse 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<CheckUpgradeResponse, OperationMetadata> retrievedResponse = await environmentsClient.PollOnceCheckUpgradeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
CheckUpgradeResponse retrievedResult = retrievedResponse.Result;
}
}
}
// [END composer_v1_generated_Environments_CheckUpgrade_async]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
// Copyright 2025 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 composer_v1_generated_Environments_CheckUpgrade_sync]
using Google.Cloud.Orchestration.Airflow.Service.V1;
using Google.LongRunning;

public sealed partial class GeneratedEnvironmentsClientSnippets
{
/// <summary>Snippet for CheckUpgrade</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 CheckUpgradeRequestObject()
{
// Create client
EnvironmentsClient environmentsClient = EnvironmentsClient.Create();
// Initialize request argument(s)
CheckUpgradeRequest request = new CheckUpgradeRequest
{
Environment = "",
ImageVersion = "",
};
// Make the request
Operation<CheckUpgradeResponse, OperationMetadata> response = environmentsClient.CheckUpgrade(request);

// Poll until the returned long-running operation is complete
Operation<CheckUpgradeResponse, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
CheckUpgradeResponse 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<CheckUpgradeResponse, OperationMetadata> retrievedResponse = environmentsClient.PollOnceCheckUpgrade(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
CheckUpgradeResponse retrievedResult = retrievedResponse.Result;
}
}
}
// [END composer_v1_generated_Environments_CheckUpgrade_sync]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// Copyright 2025 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 composer_v1_generated_Environments_CreateEnvironment_async_flattened]
using Google.Cloud.Orchestration.Airflow.Service.V1;
using Google.LongRunning;
using System.Threading.Tasks;

public sealed partial class GeneratedEnvironmentsClientSnippets
{
/// <summary>Snippet for CreateEnvironmentAsync</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 CreateEnvironmentAsync()
{
// Create client
EnvironmentsClient environmentsClient = await EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
string parent = "";
Environment environment = new Environment();
// Make the request
Operation<Environment, OperationMetadata> response = await environmentsClient.CreateEnvironmentAsync(parent, environment);

// Poll until the returned long-running operation is complete
Operation<Environment, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Environment 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<Environment, OperationMetadata> retrievedResponse = await environmentsClient.PollOnceCreateEnvironmentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Environment retrievedResult = retrievedResponse.Result;
}
}
}
// [END composer_v1_generated_Environments_CreateEnvironment_async_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// Copyright 2025 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 composer_v1_generated_Environments_CreateEnvironment_async]
using Google.Cloud.Orchestration.Airflow.Service.V1;
using Google.LongRunning;
using System.Threading.Tasks;

public sealed partial class GeneratedEnvironmentsClientSnippets
{
/// <summary>Snippet for CreateEnvironmentAsync</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 CreateEnvironmentRequestObjectAsync()
{
// Create client
EnvironmentsClient environmentsClient = await EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
CreateEnvironmentRequest request = new CreateEnvironmentRequest
{
Parent = "",
Environment = new Environment(),
};
// Make the request
Operation<Environment, OperationMetadata> response = await environmentsClient.CreateEnvironmentAsync(request);

// Poll until the returned long-running operation is complete
Operation<Environment, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Environment 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<Environment, OperationMetadata> retrievedResponse = await environmentsClient.PollOnceCreateEnvironmentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Environment retrievedResult = retrievedResponse.Result;
}
}
}
// [END composer_v1_generated_Environments_CreateEnvironment_async]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
// Copyright 2025 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 composer_v1_generated_Environments_CreateEnvironment_sync]
using Google.Cloud.Orchestration.Airflow.Service.V1;
using Google.LongRunning;

public sealed partial class GeneratedEnvironmentsClientSnippets
{
/// <summary>Snippet for CreateEnvironment</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 CreateEnvironmentRequestObject()
{
// Create client
EnvironmentsClient environmentsClient = EnvironmentsClient.Create();
// Initialize request argument(s)
CreateEnvironmentRequest request = new CreateEnvironmentRequest
{
Parent = "",
Environment = new Environment(),
};
// Make the request
Operation<Environment, OperationMetadata> response = environmentsClient.CreateEnvironment(request);

// Poll until the returned long-running operation is complete
Operation<Environment, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Environment 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<Environment, OperationMetadata> retrievedResponse = environmentsClient.PollOnceCreateEnvironment(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Environment retrievedResult = retrievedResponse.Result;
}
}
}
// [END composer_v1_generated_Environments_CreateEnvironment_sync]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// Copyright 2025 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 composer_v1_generated_Environments_CreateEnvironment_sync_flattened]
using Google.Cloud.Orchestration.Airflow.Service.V1;
using Google.LongRunning;

public sealed partial class GeneratedEnvironmentsClientSnippets
{
/// <summary>Snippet for CreateEnvironment</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 CreateEnvironment()
{
// Create client
EnvironmentsClient environmentsClient = EnvironmentsClient.Create();
// Initialize request argument(s)
string parent = "";
Environment environment = new Environment();
// Make the request
Operation<Environment, OperationMetadata> response = environmentsClient.CreateEnvironment(parent, environment);

// Poll until the returned long-running operation is complete
Operation<Environment, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Environment 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<Environment, OperationMetadata> retrievedResponse = environmentsClient.PollOnceCreateEnvironment(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Environment retrievedResult = retrievedResponse.Result;
}
}
}
// [END composer_v1_generated_Environments_CreateEnvironment_sync_flattened]
}
Loading

0 comments on commit f28fd8e

Please sign in to comment.