Skip to content

Commit

Permalink
feat: add messages and fields related to Redis Instances
Browse files Browse the repository at this point in the history
feat: add messages and fields related to Redis Clusters

feat: add PSC network attachment URI to the InstanceInfo proto

feat: add subnet URI and region name to the NetworkInfo proto

feat: add firewall policy URI to the FirewallInfo proto

feat: add fields related to advertised routes to the RouteInfo proto

feat: add region name field to the RouteInfo proto

feat: add region name to the ForwardingRuleInfo proto

feat: add load balancer name to the ForwardingRuleInfo proto

feat: add PSC target fields to the ForwardingRuleInfo proto

feat: add more detailed abort and drop causes to corresponding enums

chore: update Google API field annotations format

docs: update outdated comments in the FirewallInfo proto
PiperOrigin-RevId: 686129238

Source-Link: googleapis/googleapis@cab65d5

Source-Link: googleapis/googleapis-gen@cd5b0a2
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuTmV0d29ya01hbmFnZW1lbnQuVjEvLk93bEJvdC55YW1sIiwiaCI6ImNkNWIwYTI0YWNjNGMyODI0ZGNiMGRiNGU5NjljMzU1MWE5NDcwY2YifQ==
  • Loading branch information
gcf-owl-bot[bot] authored and amanda-tarafa committed Oct 15, 2024
1 parent dde1a4f commit 7cef758
Show file tree
Hide file tree
Showing 34 changed files with 4,143 additions and 572 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public async Task CreateConnectivityTestAsync()
// Create client
ReachabilityServiceClient reachabilityServiceClient = await ReachabilityServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "";
string parent = "projects/[PROJECT]";
string testId = "";
ConnectivityTest resource = new ConnectivityTest();
// Make the request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
namespace GoogleCSharpSnippets
{
// [START networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_async]
using Google.Api.Gax.ResourceNames;
using Google.Cloud.NetworkManagement.V1;
using Google.LongRunning;
using System.Threading.Tasks;
Expand All @@ -38,7 +39,7 @@ public async Task CreateConnectivityTestRequestObjectAsync()
// Initialize request argument(s)
CreateConnectivityTestRequest request = new CreateConnectivityTestRequest
{
Parent = "",
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
TestId = "",
Resource = new ConnectivityTest(),
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
namespace GoogleCSharpSnippets
{
// [START networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_sync]
using Google.Api.Gax.ResourceNames;
using Google.Cloud.NetworkManagement.V1;
using Google.LongRunning;

Expand All @@ -37,7 +38,7 @@ public void CreateConnectivityTestRequestObject()
// Initialize request argument(s)
CreateConnectivityTestRequest request = new CreateConnectivityTestRequest
{
Parent = "",
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
TestId = "",
Resource = new ConnectivityTest(),
};
Expand Down
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 networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_async_flattened_resourceNames]
using Google.Api.Gax.ResourceNames;
using Google.Cloud.NetworkManagement.V1;
using Google.LongRunning;
using System.Threading.Tasks;

public sealed partial class GeneratedReachabilityServiceClientSnippets
{
/// <summary>Snippet for CreateConnectivityTestAsync</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 CreateConnectivityTestResourceNamesAsync()
{
// Create client
ReachabilityServiceClient reachabilityServiceClient = await ReachabilityServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
string testId = "";
ConnectivityTest resource = new ConnectivityTest();
// Make the request
Operation<ConnectivityTest, OperationMetadata> response = await reachabilityServiceClient.CreateConnectivityTestAsync(parent, testId, resource);

// Poll until the returned long-running operation is complete
Operation<ConnectivityTest, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ConnectivityTest 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<ConnectivityTest, OperationMetadata> retrievedResponse = await reachabilityServiceClient.PollOnceCreateConnectivityTestAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ConnectivityTest retrievedResult = retrievedResponse.Result;
}
}
}
// [END networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_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 networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_sync_flattened_resourceNames]
using Google.Api.Gax.ResourceNames;
using Google.Cloud.NetworkManagement.V1;
using Google.LongRunning;

public sealed partial class GeneratedReachabilityServiceClientSnippets
{
/// <summary>Snippet for CreateConnectivityTest</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 CreateConnectivityTestResourceNames()
{
// Create client
ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.Create();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
string testId = "";
ConnectivityTest resource = new ConnectivityTest();
// Make the request
Operation<ConnectivityTest, OperationMetadata> response = reachabilityServiceClient.CreateConnectivityTest(parent, testId, resource);

// Poll until the returned long-running operation is complete
Operation<ConnectivityTest, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ConnectivityTest 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<ConnectivityTest, OperationMetadata> retrievedResponse = reachabilityServiceClient.PollOnceCreateConnectivityTest(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ConnectivityTest retrievedResult = retrievedResponse.Result;
}
}
}
// [END networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_sync_flattened_resourceNames]
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public void CreateConnectivityTest()
// Create client
ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.Create();
// Initialize request argument(s)
string parent = "";
string parent = "projects/[PROJECT]";
string testId = "";
ConnectivityTest resource = new ConnectivityTest();
// Make the request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public async Task DeleteConnectivityTestAsync()
// Create client
ReachabilityServiceClient reachabilityServiceClient = await ReachabilityServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "";
string name = "projects/[PROJECT]/locations/global/connectivityTests/[TEST]";
// Make the request
Operation<Empty, OperationMetadata> response = await reachabilityServiceClient.DeleteConnectivityTestAsync(name);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ public async Task DeleteConnectivityTestRequestObjectAsync()
// Create client
ReachabilityServiceClient reachabilityServiceClient = await ReachabilityServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteConnectivityTestRequest request = new DeleteConnectivityTestRequest { Name = "", };
DeleteConnectivityTestRequest request = new DeleteConnectivityTestRequest
{
ConnectivityTestName = ConnectivityTestName.FromProjectTest("[PROJECT]", "[TEST]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = await reachabilityServiceClient.DeleteConnectivityTestAsync(request);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ public void DeleteConnectivityTestRequestObject()
// Create client
ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.Create();
// Initialize request argument(s)
DeleteConnectivityTestRequest request = new DeleteConnectivityTestRequest { Name = "", };
DeleteConnectivityTestRequest request = new DeleteConnectivityTestRequest
{
ConnectivityTestName = ConnectivityTestName.FromProjectTest("[PROJECT]", "[TEST]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = reachabilityServiceClient.DeleteConnectivityTest(request);

Expand Down
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 networkmanagement_v1_generated_ReachabilityService_DeleteConnectivityTest_async_flattened_resourceNames]
using Google.Cloud.NetworkManagement.V1;
using Google.LongRunning;
using Google.Protobuf.WellKnownTypes;
using System.Threading.Tasks;

public sealed partial class GeneratedReachabilityServiceClientSnippets
{
/// <summary>Snippet for DeleteConnectivityTestAsync</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 DeleteConnectivityTestResourceNamesAsync()
{
// Create client
ReachabilityServiceClient reachabilityServiceClient = await ReachabilityServiceClient.CreateAsync();
// Initialize request argument(s)
ConnectivityTestName name = ConnectivityTestName.FromProjectTest("[PROJECT]", "[TEST]");
// Make the request
Operation<Empty, OperationMetadata> response = await reachabilityServiceClient.DeleteConnectivityTestAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty 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<Empty, OperationMetadata> retrievedResponse = await reachabilityServiceClient.PollOnceDeleteConnectivityTestAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
}
}
// [END networkmanagement_v1_generated_ReachabilityService_DeleteConnectivityTest_async_flattened_resourceNames]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// 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 networkmanagement_v1_generated_ReachabilityService_DeleteConnectivityTest_sync_flattened_resourceNames]
using Google.Cloud.NetworkManagement.V1;
using Google.LongRunning;
using Google.Protobuf.WellKnownTypes;

public sealed partial class GeneratedReachabilityServiceClientSnippets
{
/// <summary>Snippet for DeleteConnectivityTest</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 DeleteConnectivityTestResourceNames()
{
// Create client
ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.Create();
// Initialize request argument(s)
ConnectivityTestName name = ConnectivityTestName.FromProjectTest("[PROJECT]", "[TEST]");
// Make the request
Operation<Empty, OperationMetadata> response = reachabilityServiceClient.DeleteConnectivityTest(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty 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<Empty, OperationMetadata> retrievedResponse = reachabilityServiceClient.PollOnceDeleteConnectivityTest(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
}
}
// [END networkmanagement_v1_generated_ReachabilityService_DeleteConnectivityTest_sync_flattened_resourceNames]
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void DeleteConnectivityTest()
// Create client
ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.Create();
// Initialize request argument(s)
string name = "";
string name = "projects/[PROJECT]/locations/global/connectivityTests/[TEST]";
// Make the request
Operation<Empty, OperationMetadata> response = reachabilityServiceClient.DeleteConnectivityTest(name);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public async Task GetConnectivityTestAsync()
// Create client
ReachabilityServiceClient reachabilityServiceClient = await ReachabilityServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "";
string name = "projects/[PROJECT]/locations/global/connectivityTests/[TEST]";
// Make the request
ConnectivityTest response = await reachabilityServiceClient.GetConnectivityTestAsync(name);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ public async Task GetConnectivityTestRequestObjectAsync()
// Create client
ReachabilityServiceClient reachabilityServiceClient = await ReachabilityServiceClient.CreateAsync();
// Initialize request argument(s)
GetConnectivityTestRequest request = new GetConnectivityTestRequest { Name = "", };
GetConnectivityTestRequest request = new GetConnectivityTestRequest
{
ConnectivityTestName = ConnectivityTestName.FromProjectTest("[PROJECT]", "[TEST]"),
};
// Make the request
ConnectivityTest response = await reachabilityServiceClient.GetConnectivityTestAsync(request);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ public void GetConnectivityTestRequestObject()
// Create client
ReachabilityServiceClient reachabilityServiceClient = ReachabilityServiceClient.Create();
// Initialize request argument(s)
GetConnectivityTestRequest request = new GetConnectivityTestRequest { Name = "", };
GetConnectivityTestRequest request = new GetConnectivityTestRequest
{
ConnectivityTestName = ConnectivityTestName.FromProjectTest("[PROJECT]", "[TEST]"),
};
// Make the request
ConnectivityTest response = reachabilityServiceClient.GetConnectivityTest(request);
}
Expand Down
Loading

0 comments on commit 7cef758

Please sign in to comment.