Skip to content

Commit

Permalink
feat: added annotations
Browse files Browse the repository at this point in the history
docs: Service Account is a required field
fix: Changed field behavior for an existing field `service_account` in message `.google.cloud.config.v1.Deployment`
fix: Changed field behavior for an existing field `service_account` in message `.google.cloud.config.v1.Preview`

PiperOrigin-RevId: 705212738

Source-Link: googleapis/googleapis@c46c4ec

Source-Link: googleapis/googleapis-gen@b3a8572
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuQ29uZmlnLlYxLy5Pd2xCb3QueWFtbCIsImgiOiJiM2E4NTcyM2IxNGFlMTM0NjMyM2U0MzUxNWMzNmE2OTA0ZTE4YzNlIn0=
  • Loading branch information
gcf-owl-bot[bot] committed Dec 11, 2024
1 parent ec1d79d commit f2fdefa
Show file tree
Hide file tree
Showing 136 changed files with 43,310 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
// Copyright 2024 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 config_v1_generated_Config_CreateDeployment_async_flattened]
using Google.Cloud.Config.V1;
using Google.LongRunning;
using System.Threading.Tasks;

public sealed partial class GeneratedConfigClientSnippets
{
/// <summary>Snippet for CreateDeploymentAsync</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 CreateDeploymentAsync()
{
// Create client
ConfigClient configClient = await ConfigClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Deployment deployment = new Deployment();
string deploymentId = "";
// Make the request
Operation<Deployment, OperationMetadata> response = await configClient.CreateDeploymentAsync(parent, deployment, deploymentId);

// Poll until the returned long-running operation is complete
Operation<Deployment, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Deployment 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<Deployment, OperationMetadata> retrievedResponse = await configClient.PollOnceCreateDeploymentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Deployment retrievedResult = retrievedResponse.Result;
}
}
}
// [END config_v1_generated_Config_CreateDeployment_async_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
// Copyright 2024 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 config_v1_generated_Config_CreateDeployment_async]
using Google.Api.Gax.ResourceNames;
using Google.Cloud.Config.V1;
using Google.LongRunning;
using System.Threading.Tasks;

public sealed partial class GeneratedConfigClientSnippets
{
/// <summary>Snippet for CreateDeploymentAsync</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 CreateDeploymentRequestObjectAsync()
{
// Create client
ConfigClient configClient = await ConfigClient.CreateAsync();
// Initialize request argument(s)
CreateDeploymentRequest request = new CreateDeploymentRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
DeploymentId = "",
Deployment = new Deployment(),
RequestId = "",
};
// Make the request
Operation<Deployment, OperationMetadata> response = await configClient.CreateDeploymentAsync(request);

// Poll until the returned long-running operation is complete
Operation<Deployment, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Deployment 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<Deployment, OperationMetadata> retrievedResponse = await configClient.PollOnceCreateDeploymentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Deployment retrievedResult = retrievedResponse.Result;
}
}
}
// [END config_v1_generated_Config_CreateDeployment_async]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// Copyright 2024 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 config_v1_generated_Config_CreateDeployment_sync]
using Google.Api.Gax.ResourceNames;
using Google.Cloud.Config.V1;
using Google.LongRunning;

public sealed partial class GeneratedConfigClientSnippets
{
/// <summary>Snippet for CreateDeployment</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 CreateDeploymentRequestObject()
{
// Create client
ConfigClient configClient = ConfigClient.Create();
// Initialize request argument(s)
CreateDeploymentRequest request = new CreateDeploymentRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
DeploymentId = "",
Deployment = new Deployment(),
RequestId = "",
};
// Make the request
Operation<Deployment, OperationMetadata> response = configClient.CreateDeployment(request);

// Poll until the returned long-running operation is complete
Operation<Deployment, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Deployment 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<Deployment, OperationMetadata> retrievedResponse = configClient.PollOnceCreateDeployment(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Deployment retrievedResult = retrievedResponse.Result;
}
}
}
// [END config_v1_generated_Config_CreateDeployment_sync]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
// Copyright 2024 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 config_v1_generated_Config_CreateDeployment_async_flattened_resourceNames]
using Google.Api.Gax.ResourceNames;
using Google.Cloud.Config.V1;
using Google.LongRunning;
using System.Threading.Tasks;

public sealed partial class GeneratedConfigClientSnippets
{
/// <summary>Snippet for CreateDeploymentAsync</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 CreateDeploymentResourceNamesAsync()
{
// Create client
ConfigClient configClient = await ConfigClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Deployment deployment = new Deployment();
string deploymentId = "";
// Make the request
Operation<Deployment, OperationMetadata> response = await configClient.CreateDeploymentAsync(parent, deployment, deploymentId);

// Poll until the returned long-running operation is complete
Operation<Deployment, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Deployment 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<Deployment, OperationMetadata> retrievedResponse = await configClient.PollOnceCreateDeploymentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Deployment retrievedResult = retrievedResponse.Result;
}
}
}
// [END config_v1_generated_Config_CreateDeployment_async_flattened_resourceNames]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
// Copyright 2024 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 config_v1_generated_Config_CreateDeployment_sync_flattened_resourceNames]
using Google.Api.Gax.ResourceNames;
using Google.Cloud.Config.V1;
using Google.LongRunning;

public sealed partial class GeneratedConfigClientSnippets
{
/// <summary>Snippet for CreateDeployment</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 CreateDeploymentResourceNames()
{
// Create client
ConfigClient configClient = ConfigClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Deployment deployment = new Deployment();
string deploymentId = "";
// Make the request
Operation<Deployment, OperationMetadata> response = configClient.CreateDeployment(parent, deployment, deploymentId);

// Poll until the returned long-running operation is complete
Operation<Deployment, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Deployment 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<Deployment, OperationMetadata> retrievedResponse = configClient.PollOnceCreateDeployment(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Deployment retrievedResult = retrievedResponse.Result;
}
}
}
// [END config_v1_generated_Config_CreateDeployment_sync_flattened_resourceNames]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// Copyright 2024 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 config_v1_generated_Config_CreateDeployment_sync_flattened]
using Google.Cloud.Config.V1;
using Google.LongRunning;

public sealed partial class GeneratedConfigClientSnippets
{
/// <summary>Snippet for CreateDeployment</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 CreateDeployment()
{
// Create client
ConfigClient configClient = ConfigClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Deployment deployment = new Deployment();
string deploymentId = "";
// Make the request
Operation<Deployment, OperationMetadata> response = configClient.CreateDeployment(parent, deployment, deploymentId);

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

0 comments on commit f2fdefa

Please sign in to comment.