diff --git a/apis/Google.Cloud.Monitoring.V3/Google.Cloud.Monitoring.V3.Snippets/NotificationChannelServiceClientSnippets.g.cs b/apis/Google.Cloud.Monitoring.V3/Google.Cloud.Monitoring.V3.Snippets/NotificationChannelServiceClientSnippets.g.cs
index 80dac18a1f66..33e233414ad5 100644
--- a/apis/Google.Cloud.Monitoring.V3/Google.Cloud.Monitoring.V3.Snippets/NotificationChannelServiceClientSnippets.g.cs
+++ b/apis/Google.Cloud.Monitoring.V3/Google.Cloud.Monitoring.V3.Snippets/NotificationChannelServiceClientSnippets.g.cs
@@ -705,5 +705,189 @@ public void DeleteNotificationChannel_RequestObject()
// End snippet
}
+ /// Snippet for SendNotificationChannelVerificationCodeAsync
+ public async Task SendNotificationChannelVerificationCodeAsync()
+ {
+ // Snippet: SendNotificationChannelVerificationCodeAsync(NotificationChannelName,CallSettings)
+ // Additional: SendNotificationChannelVerificationCodeAsync(NotificationChannelName,CancellationToken)
+ // Create client
+ NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
+ // Initialize request argument(s)
+ NotificationChannelName name = new NotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
+ // Make the request
+ await notificationChannelServiceClient.SendNotificationChannelVerificationCodeAsync(name);
+ // End snippet
+ }
+
+ /// Snippet for SendNotificationChannelVerificationCode
+ public void SendNotificationChannelVerificationCode()
+ {
+ // Snippet: SendNotificationChannelVerificationCode(NotificationChannelName,CallSettings)
+ // Create client
+ NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
+ // Initialize request argument(s)
+ NotificationChannelName name = new NotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
+ // Make the request
+ notificationChannelServiceClient.SendNotificationChannelVerificationCode(name);
+ // End snippet
+ }
+
+ /// Snippet for SendNotificationChannelVerificationCodeAsync
+ public async Task SendNotificationChannelVerificationCodeAsync_RequestObject()
+ {
+ // Snippet: SendNotificationChannelVerificationCodeAsync(SendNotificationChannelVerificationCodeRequest,CallSettings)
+ // Additional: SendNotificationChannelVerificationCodeAsync(SendNotificationChannelVerificationCodeRequest,CancellationToken)
+ // Create client
+ NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
+ // Initialize request argument(s)
+ SendNotificationChannelVerificationCodeRequest request = new SendNotificationChannelVerificationCodeRequest
+ {
+ NotificationChannelName = new NotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
+ };
+ // Make the request
+ await notificationChannelServiceClient.SendNotificationChannelVerificationCodeAsync(request);
+ // End snippet
+ }
+
+ /// Snippet for SendNotificationChannelVerificationCode
+ public void SendNotificationChannelVerificationCode_RequestObject()
+ {
+ // Snippet: SendNotificationChannelVerificationCode(SendNotificationChannelVerificationCodeRequest,CallSettings)
+ // Create client
+ NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
+ // Initialize request argument(s)
+ SendNotificationChannelVerificationCodeRequest request = new SendNotificationChannelVerificationCodeRequest
+ {
+ NotificationChannelName = new NotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
+ };
+ // Make the request
+ notificationChannelServiceClient.SendNotificationChannelVerificationCode(request);
+ // End snippet
+ }
+
+ /// Snippet for GetNotificationChannelVerificationCodeAsync
+ public async Task GetNotificationChannelVerificationCodeAsync()
+ {
+ // Snippet: GetNotificationChannelVerificationCodeAsync(NotificationChannelName,CallSettings)
+ // Additional: GetNotificationChannelVerificationCodeAsync(NotificationChannelName,CancellationToken)
+ // Create client
+ NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
+ // Initialize request argument(s)
+ NotificationChannelName name = new NotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
+ // Make the request
+ GetNotificationChannelVerificationCodeResponse response = await notificationChannelServiceClient.GetNotificationChannelVerificationCodeAsync(name);
+ // End snippet
+ }
+
+ /// Snippet for GetNotificationChannelVerificationCode
+ public void GetNotificationChannelVerificationCode()
+ {
+ // Snippet: GetNotificationChannelVerificationCode(NotificationChannelName,CallSettings)
+ // Create client
+ NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
+ // Initialize request argument(s)
+ NotificationChannelName name = new NotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
+ // Make the request
+ GetNotificationChannelVerificationCodeResponse response = notificationChannelServiceClient.GetNotificationChannelVerificationCode(name);
+ // End snippet
+ }
+
+ /// Snippet for GetNotificationChannelVerificationCodeAsync
+ public async Task GetNotificationChannelVerificationCodeAsync_RequestObject()
+ {
+ // Snippet: GetNotificationChannelVerificationCodeAsync(GetNotificationChannelVerificationCodeRequest,CallSettings)
+ // Additional: GetNotificationChannelVerificationCodeAsync(GetNotificationChannelVerificationCodeRequest,CancellationToken)
+ // Create client
+ NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
+ // Initialize request argument(s)
+ GetNotificationChannelVerificationCodeRequest request = new GetNotificationChannelVerificationCodeRequest
+ {
+ NotificationChannelName = new NotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
+ };
+ // Make the request
+ GetNotificationChannelVerificationCodeResponse response = await notificationChannelServiceClient.GetNotificationChannelVerificationCodeAsync(request);
+ // End snippet
+ }
+
+ /// Snippet for GetNotificationChannelVerificationCode
+ public void GetNotificationChannelVerificationCode_RequestObject()
+ {
+ // Snippet: GetNotificationChannelVerificationCode(GetNotificationChannelVerificationCodeRequest,CallSettings)
+ // Create client
+ NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
+ // Initialize request argument(s)
+ GetNotificationChannelVerificationCodeRequest request = new GetNotificationChannelVerificationCodeRequest
+ {
+ NotificationChannelName = new NotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
+ };
+ // Make the request
+ GetNotificationChannelVerificationCodeResponse response = notificationChannelServiceClient.GetNotificationChannelVerificationCode(request);
+ // End snippet
+ }
+
+ /// Snippet for VerifyNotificationChannelAsync
+ public async Task VerifyNotificationChannelAsync()
+ {
+ // Snippet: VerifyNotificationChannelAsync(NotificationChannelName,string,CallSettings)
+ // Additional: VerifyNotificationChannelAsync(NotificationChannelName,string,CancellationToken)
+ // Create client
+ NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
+ // Initialize request argument(s)
+ NotificationChannelName name = new NotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
+ string code = "";
+ // Make the request
+ NotificationChannel response = await notificationChannelServiceClient.VerifyNotificationChannelAsync(name, code);
+ // End snippet
+ }
+
+ /// Snippet for VerifyNotificationChannel
+ public void VerifyNotificationChannel()
+ {
+ // Snippet: VerifyNotificationChannel(NotificationChannelName,string,CallSettings)
+ // Create client
+ NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
+ // Initialize request argument(s)
+ NotificationChannelName name = new NotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
+ string code = "";
+ // Make the request
+ NotificationChannel response = notificationChannelServiceClient.VerifyNotificationChannel(name, code);
+ // End snippet
+ }
+
+ /// Snippet for VerifyNotificationChannelAsync
+ public async Task VerifyNotificationChannelAsync_RequestObject()
+ {
+ // Snippet: VerifyNotificationChannelAsync(VerifyNotificationChannelRequest,CallSettings)
+ // Additional: VerifyNotificationChannelAsync(VerifyNotificationChannelRequest,CancellationToken)
+ // Create client
+ NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
+ // Initialize request argument(s)
+ VerifyNotificationChannelRequest request = new VerifyNotificationChannelRequest
+ {
+ NotificationChannelName = new NotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
+ Code = "",
+ };
+ // Make the request
+ NotificationChannel response = await notificationChannelServiceClient.VerifyNotificationChannelAsync(request);
+ // End snippet
+ }
+
+ /// Snippet for VerifyNotificationChannel
+ public void VerifyNotificationChannel_RequestObject()
+ {
+ // Snippet: VerifyNotificationChannel(VerifyNotificationChannelRequest,CallSettings)
+ // Create client
+ NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
+ // Initialize request argument(s)
+ VerifyNotificationChannelRequest request = new VerifyNotificationChannelRequest
+ {
+ NotificationChannelName = new NotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
+ Code = "",
+ };
+ // Make the request
+ NotificationChannel response = notificationChannelServiceClient.VerifyNotificationChannel(request);
+ // End snippet
+ }
+
}
}
diff --git a/apis/Google.Cloud.Monitoring.V3/Google.Cloud.Monitoring.V3.Tests/NotificationChannelServiceClientTest.g.cs b/apis/Google.Cloud.Monitoring.V3/Google.Cloud.Monitoring.V3.Tests/NotificationChannelServiceClientTest.g.cs
index eafea67356b0..b03627076d0f 100644
--- a/apis/Google.Cloud.Monitoring.V3/Google.Cloud.Monitoring.V3.Tests/NotificationChannelServiceClientTest.g.cs
+++ b/apis/Google.Cloud.Monitoring.V3/Google.Cloud.Monitoring.V3.Tests/NotificationChannelServiceClientTest.g.cs
@@ -489,5 +489,253 @@ public async Task DeleteNotificationChannelAsync2()
mockGrpcClient.VerifyAll();
}
+ [Fact]
+ public void SendNotificationChannelVerificationCode()
+ {
+ Mock mockGrpcClient = new Mock(MockBehavior.Strict);
+ SendNotificationChannelVerificationCodeRequest expectedRequest = new SendNotificationChannelVerificationCodeRequest
+ {
+ NotificationChannelName = new NotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
+ };
+ Empty expectedResponse = new Empty();
+ mockGrpcClient.Setup(x => x.SendNotificationChannelVerificationCode(expectedRequest, It.IsAny()))
+ .Returns(expectedResponse);
+ NotificationChannelServiceClient client = new NotificationChannelServiceClientImpl(mockGrpcClient.Object, null);
+ NotificationChannelName name = new NotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
+ client.SendNotificationChannelVerificationCode(name);
+ mockGrpcClient.VerifyAll();
+ }
+
+ [Fact]
+ public async Task SendNotificationChannelVerificationCodeAsync()
+ {
+ Mock mockGrpcClient = new Mock(MockBehavior.Strict);
+ SendNotificationChannelVerificationCodeRequest expectedRequest = new SendNotificationChannelVerificationCodeRequest
+ {
+ NotificationChannelName = new NotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
+ };
+ Empty expectedResponse = new Empty();
+ mockGrpcClient.Setup(x => x.SendNotificationChannelVerificationCodeAsync(expectedRequest, It.IsAny()))
+ .Returns(new Grpc.Core.AsyncUnaryCall(Task.FromResult(expectedResponse), null, null, null, null));
+ NotificationChannelServiceClient client = new NotificationChannelServiceClientImpl(mockGrpcClient.Object, null);
+ NotificationChannelName name = new NotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
+ await client.SendNotificationChannelVerificationCodeAsync(name);
+ mockGrpcClient.VerifyAll();
+ }
+
+ [Fact]
+ public void SendNotificationChannelVerificationCode2()
+ {
+ Mock mockGrpcClient = new Mock(MockBehavior.Strict);
+ SendNotificationChannelVerificationCodeRequest request = new SendNotificationChannelVerificationCodeRequest
+ {
+ NotificationChannelName = new NotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
+ };
+ Empty expectedResponse = new Empty();
+ mockGrpcClient.Setup(x => x.SendNotificationChannelVerificationCode(request, It.IsAny()))
+ .Returns(expectedResponse);
+ NotificationChannelServiceClient client = new NotificationChannelServiceClientImpl(mockGrpcClient.Object, null);
+ client.SendNotificationChannelVerificationCode(request);
+ mockGrpcClient.VerifyAll();
+ }
+
+ [Fact]
+ public async Task SendNotificationChannelVerificationCodeAsync2()
+ {
+ Mock mockGrpcClient = new Mock(MockBehavior.Strict);
+ SendNotificationChannelVerificationCodeRequest request = new SendNotificationChannelVerificationCodeRequest
+ {
+ NotificationChannelName = new NotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
+ };
+ Empty expectedResponse = new Empty();
+ mockGrpcClient.Setup(x => x.SendNotificationChannelVerificationCodeAsync(request, It.IsAny()))
+ .Returns(new Grpc.Core.AsyncUnaryCall(Task.FromResult(expectedResponse), null, null, null, null));
+ NotificationChannelServiceClient client = new NotificationChannelServiceClientImpl(mockGrpcClient.Object, null);
+ await client.SendNotificationChannelVerificationCodeAsync(request);
+ mockGrpcClient.VerifyAll();
+ }
+
+ [Fact]
+ public void GetNotificationChannelVerificationCode()
+ {
+ Mock mockGrpcClient = new Mock(MockBehavior.Strict);
+ GetNotificationChannelVerificationCodeRequest expectedRequest = new GetNotificationChannelVerificationCodeRequest
+ {
+ NotificationChannelName = new NotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
+ };
+ GetNotificationChannelVerificationCodeResponse expectedResponse = new GetNotificationChannelVerificationCodeResponse
+ {
+ Code = "code3059181",
+ };
+ mockGrpcClient.Setup(x => x.GetNotificationChannelVerificationCode(expectedRequest, It.IsAny()))
+ .Returns(expectedResponse);
+ NotificationChannelServiceClient client = new NotificationChannelServiceClientImpl(mockGrpcClient.Object, null);
+ NotificationChannelName name = new NotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
+ GetNotificationChannelVerificationCodeResponse response = client.GetNotificationChannelVerificationCode(name);
+ Assert.Same(expectedResponse, response);
+ mockGrpcClient.VerifyAll();
+ }
+
+ [Fact]
+ public async Task GetNotificationChannelVerificationCodeAsync()
+ {
+ Mock mockGrpcClient = new Mock(MockBehavior.Strict);
+ GetNotificationChannelVerificationCodeRequest expectedRequest = new GetNotificationChannelVerificationCodeRequest
+ {
+ NotificationChannelName = new NotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
+ };
+ GetNotificationChannelVerificationCodeResponse expectedResponse = new GetNotificationChannelVerificationCodeResponse
+ {
+ Code = "code3059181",
+ };
+ mockGrpcClient.Setup(x => x.GetNotificationChannelVerificationCodeAsync(expectedRequest, It.IsAny()))
+ .Returns(new Grpc.Core.AsyncUnaryCall(Task.FromResult(expectedResponse), null, null, null, null));
+ NotificationChannelServiceClient client = new NotificationChannelServiceClientImpl(mockGrpcClient.Object, null);
+ NotificationChannelName name = new NotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
+ GetNotificationChannelVerificationCodeResponse response = await client.GetNotificationChannelVerificationCodeAsync(name);
+ Assert.Same(expectedResponse, response);
+ mockGrpcClient.VerifyAll();
+ }
+
+ [Fact]
+ public void GetNotificationChannelVerificationCode2()
+ {
+ Mock mockGrpcClient = new Mock(MockBehavior.Strict);
+ GetNotificationChannelVerificationCodeRequest request = new GetNotificationChannelVerificationCodeRequest
+ {
+ NotificationChannelName = new NotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
+ };
+ GetNotificationChannelVerificationCodeResponse expectedResponse = new GetNotificationChannelVerificationCodeResponse
+ {
+ Code = "code3059181",
+ };
+ mockGrpcClient.Setup(x => x.GetNotificationChannelVerificationCode(request, It.IsAny()))
+ .Returns(expectedResponse);
+ NotificationChannelServiceClient client = new NotificationChannelServiceClientImpl(mockGrpcClient.Object, null);
+ GetNotificationChannelVerificationCodeResponse response = client.GetNotificationChannelVerificationCode(request);
+ Assert.Same(expectedResponse, response);
+ mockGrpcClient.VerifyAll();
+ }
+
+ [Fact]
+ public async Task GetNotificationChannelVerificationCodeAsync2()
+ {
+ Mock mockGrpcClient = new Mock(MockBehavior.Strict);
+ GetNotificationChannelVerificationCodeRequest request = new GetNotificationChannelVerificationCodeRequest
+ {
+ NotificationChannelName = new NotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
+ };
+ GetNotificationChannelVerificationCodeResponse expectedResponse = new GetNotificationChannelVerificationCodeResponse
+ {
+ Code = "code3059181",
+ };
+ mockGrpcClient.Setup(x => x.GetNotificationChannelVerificationCodeAsync(request, It.IsAny()))
+ .Returns(new Grpc.Core.AsyncUnaryCall(Task.FromResult(expectedResponse), null, null, null, null));
+ NotificationChannelServiceClient client = new NotificationChannelServiceClientImpl(mockGrpcClient.Object, null);
+ GetNotificationChannelVerificationCodeResponse response = await client.GetNotificationChannelVerificationCodeAsync(request);
+ Assert.Same(expectedResponse, response);
+ mockGrpcClient.VerifyAll();
+ }
+
+ [Fact]
+ public void VerifyNotificationChannel()
+ {
+ Mock mockGrpcClient = new Mock(MockBehavior.Strict);
+ VerifyNotificationChannelRequest expectedRequest = new VerifyNotificationChannelRequest
+ {
+ NotificationChannelName = new NotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
+ Code = "code3059181",
+ };
+ NotificationChannel expectedResponse = new NotificationChannel
+ {
+ Type = "type3575610",
+ Name = "name2-1052831874",
+ DisplayName = "displayName1615086568",
+ Description = "description-1724546052",
+ };
+ mockGrpcClient.Setup(x => x.VerifyNotificationChannel(expectedRequest, It.IsAny()))
+ .Returns(expectedResponse);
+ NotificationChannelServiceClient client = new NotificationChannelServiceClientImpl(mockGrpcClient.Object, null);
+ NotificationChannelName name = new NotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
+ string code = "code3059181";
+ NotificationChannel response = client.VerifyNotificationChannel(name, code);
+ Assert.Same(expectedResponse, response);
+ mockGrpcClient.VerifyAll();
+ }
+
+ [Fact]
+ public async Task VerifyNotificationChannelAsync()
+ {
+ Mock mockGrpcClient = new Mock(MockBehavior.Strict);
+ VerifyNotificationChannelRequest expectedRequest = new VerifyNotificationChannelRequest
+ {
+ NotificationChannelName = new NotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
+ Code = "code3059181",
+ };
+ NotificationChannel expectedResponse = new NotificationChannel
+ {
+ Type = "type3575610",
+ Name = "name2-1052831874",
+ DisplayName = "displayName1615086568",
+ Description = "description-1724546052",
+ };
+ mockGrpcClient.Setup(x => x.VerifyNotificationChannelAsync(expectedRequest, It.IsAny()))
+ .Returns(new Grpc.Core.AsyncUnaryCall(Task.FromResult(expectedResponse), null, null, null, null));
+ NotificationChannelServiceClient client = new NotificationChannelServiceClientImpl(mockGrpcClient.Object, null);
+ NotificationChannelName name = new NotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
+ string code = "code3059181";
+ NotificationChannel response = await client.VerifyNotificationChannelAsync(name, code);
+ Assert.Same(expectedResponse, response);
+ mockGrpcClient.VerifyAll();
+ }
+
+ [Fact]
+ public void VerifyNotificationChannel2()
+ {
+ Mock mockGrpcClient = new Mock(MockBehavior.Strict);
+ VerifyNotificationChannelRequest request = new VerifyNotificationChannelRequest
+ {
+ NotificationChannelName = new NotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
+ Code = "code3059181",
+ };
+ NotificationChannel expectedResponse = new NotificationChannel
+ {
+ Type = "type3575610",
+ Name = "name2-1052831874",
+ DisplayName = "displayName1615086568",
+ Description = "description-1724546052",
+ };
+ mockGrpcClient.Setup(x => x.VerifyNotificationChannel(request, It.IsAny()))
+ .Returns(expectedResponse);
+ NotificationChannelServiceClient client = new NotificationChannelServiceClientImpl(mockGrpcClient.Object, null);
+ NotificationChannel response = client.VerifyNotificationChannel(request);
+ Assert.Same(expectedResponse, response);
+ mockGrpcClient.VerifyAll();
+ }
+
+ [Fact]
+ public async Task VerifyNotificationChannelAsync2()
+ {
+ Mock mockGrpcClient = new Mock(MockBehavior.Strict);
+ VerifyNotificationChannelRequest request = new VerifyNotificationChannelRequest
+ {
+ NotificationChannelName = new NotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
+ Code = "code3059181",
+ };
+ NotificationChannel expectedResponse = new NotificationChannel
+ {
+ Type = "type3575610",
+ Name = "name2-1052831874",
+ DisplayName = "displayName1615086568",
+ Description = "description-1724546052",
+ };
+ mockGrpcClient.Setup(x => x.VerifyNotificationChannelAsync(request, It.IsAny()))
+ .Returns(new Grpc.Core.AsyncUnaryCall(Task.FromResult(expectedResponse), null, null, null, null));
+ NotificationChannelServiceClient client = new NotificationChannelServiceClientImpl(mockGrpcClient.Object, null);
+ NotificationChannel response = await client.VerifyNotificationChannelAsync(request);
+ Assert.Same(expectedResponse, response);
+ mockGrpcClient.VerifyAll();
+ }
+
}
}
diff --git a/apis/Google.Cloud.Monitoring.V3/Google.Cloud.Monitoring.V3/NotificationChannelServiceClient.cs b/apis/Google.Cloud.Monitoring.V3/Google.Cloud.Monitoring.V3/NotificationChannelServiceClient.cs
index c5cdf1fe87d8..038cff5924f8 100644
--- a/apis/Google.Cloud.Monitoring.V3/Google.Cloud.Monitoring.V3/NotificationChannelServiceClient.cs
+++ b/apis/Google.Cloud.Monitoring.V3/Google.Cloud.Monitoring.V3/NotificationChannelServiceClient.cs
@@ -56,6 +56,9 @@ private NotificationChannelServiceSettings(NotificationChannelServiceSettings ex
CreateNotificationChannelSettings = existing.CreateNotificationChannelSettings;
UpdateNotificationChannelSettings = existing.UpdateNotificationChannelSettings;
DeleteNotificationChannelSettings = existing.DeleteNotificationChannelSettings;
+ SendNotificationChannelVerificationCodeSettings = existing.SendNotificationChannelVerificationCodeSettings;
+ GetNotificationChannelVerificationCodeSettings = existing.GetNotificationChannelVerificationCodeSettings;
+ VerifyNotificationChannelSettings = existing.VerifyNotificationChannelSettings;
OnCopy(existing);
}
@@ -333,6 +336,95 @@ private NotificationChannelServiceSettings(NotificationChannelServiceSettings ex
retryFilter: IdempotentRetryFilter
)));
+ ///
+ /// for synchronous and asynchronous calls to
+ /// NotificationChannelServiceClient.SendNotificationChannelVerificationCode and NotificationChannelServiceClient.SendNotificationChannelVerificationCodeAsync.
+ ///
+ ///
+ /// The default NotificationChannelServiceClient.SendNotificationChannelVerificationCode and
+ /// NotificationChannelServiceClient.SendNotificationChannelVerificationCodeAsync are:
+ ///
+ /// - Initial retry delay: 100 milliseconds
+ /// - Retry delay multiplier: 1.3
+ /// - Retry maximum delay: 60000 milliseconds
+ /// - Initial timeout: 20000 milliseconds
+ /// - Timeout multiplier: 1.0
+ /// - Timeout maximum delay: 20000 milliseconds
+ ///
+ /// Retry will be attempted on the following response status codes:
+ ///
+ /// - No status codes
+ ///
+ /// Default RPC expiration is 600000 milliseconds.
+ ///
+ public gaxgrpc::CallSettings SendNotificationChannelVerificationCodeSettings { get; set; } = gaxgrpc::CallSettings.FromCallTiming(
+ gaxgrpc::CallTiming.FromRetry(new gaxgrpc::RetrySettings(
+ retryBackoff: GetDefaultRetryBackoff(),
+ timeoutBackoff: GetDefaultTimeoutBackoff(),
+ totalExpiration: gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(600000)),
+ retryFilter: NonIdempotentRetryFilter
+ )));
+
+ ///
+ /// for synchronous and asynchronous calls to
+ /// NotificationChannelServiceClient.GetNotificationChannelVerificationCode and NotificationChannelServiceClient.GetNotificationChannelVerificationCodeAsync.
+ ///
+ ///
+ /// The default NotificationChannelServiceClient.GetNotificationChannelVerificationCode and
+ /// NotificationChannelServiceClient.GetNotificationChannelVerificationCodeAsync are:
+ ///
+ /// - Initial retry delay: 100 milliseconds
+ /// - Retry delay multiplier: 1.3
+ /// - Retry maximum delay: 60000 milliseconds
+ /// - Initial timeout: 20000 milliseconds
+ /// - Timeout multiplier: 1.0
+ /// - Timeout maximum delay: 20000 milliseconds
+ ///
+ /// Retry will be attempted on the following response status codes:
+ ///
+ ///
+ ///
+ ///
+ /// Default RPC expiration is 600000 milliseconds.
+ ///
+ public gaxgrpc::CallSettings GetNotificationChannelVerificationCodeSettings { get; set; } = gaxgrpc::CallSettings.FromCallTiming(
+ gaxgrpc::CallTiming.FromRetry(new gaxgrpc::RetrySettings(
+ retryBackoff: GetDefaultRetryBackoff(),
+ timeoutBackoff: GetDefaultTimeoutBackoff(),
+ totalExpiration: gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(600000)),
+ retryFilter: IdempotentRetryFilter
+ )));
+
+ ///
+ /// for synchronous and asynchronous calls to
+ /// NotificationChannelServiceClient.VerifyNotificationChannel and NotificationChannelServiceClient.VerifyNotificationChannelAsync.
+ ///
+ ///
+ /// The default NotificationChannelServiceClient.VerifyNotificationChannel and
+ /// NotificationChannelServiceClient.VerifyNotificationChannelAsync are:
+ ///
+ /// - Initial retry delay: 100 milliseconds
+ /// - Retry delay multiplier: 1.3
+ /// - Retry maximum delay: 60000 milliseconds
+ /// - Initial timeout: 20000 milliseconds
+ /// - Timeout multiplier: 1.0
+ /// - Timeout maximum delay: 20000 milliseconds
+ ///
+ /// Retry will be attempted on the following response status codes:
+ ///
+ ///
+ ///
+ ///
+ /// Default RPC expiration is 600000 milliseconds.
+ ///
+ public gaxgrpc::CallSettings VerifyNotificationChannelSettings { get; set; } = gaxgrpc::CallSettings.FromCallTiming(
+ gaxgrpc::CallTiming.FromRetry(new gaxgrpc::RetrySettings(
+ retryBackoff: GetDefaultRetryBackoff(),
+ timeoutBackoff: GetDefaultTimeoutBackoff(),
+ totalExpiration: gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(600000)),
+ retryFilter: IdempotentRetryFilter
+ )));
+
///
/// Creates a deep clone of this object, with all the same property values.
///
@@ -1973,192 +2065,1020 @@ public virtual NotificationChannelService.NotificationChannelServiceClient GrpcC
throw new sys::NotImplementedException();
}
- }
-
- ///
- /// NotificationChannelService client wrapper implementation, for convenient use.
- ///
- public sealed partial class NotificationChannelServiceClientImpl : NotificationChannelServiceClient
- {
- private readonly gaxgrpc::ApiCall _callListNotificationChannelDescriptors;
- private readonly gaxgrpc::ApiCall _callGetNotificationChannelDescriptor;
- private readonly gaxgrpc::ApiCall _callListNotificationChannels;
- private readonly gaxgrpc::ApiCall _callGetNotificationChannel;
- private readonly gaxgrpc::ApiCall _callCreateNotificationChannel;
- private readonly gaxgrpc::ApiCall _callUpdateNotificationChannel;
- private readonly gaxgrpc::ApiCall _callDeleteNotificationChannel;
-
- ///
- /// Constructs a client wrapper for the NotificationChannelService service, with the specified gRPC client and settings.
- ///
- /// The underlying gRPC client.
- /// The base used within this client
- public NotificationChannelServiceClientImpl(NotificationChannelService.NotificationChannelServiceClient grpcClient, NotificationChannelServiceSettings settings)
- {
- GrpcClient = grpcClient;
- NotificationChannelServiceSettings effectiveSettings = settings ?? NotificationChannelServiceSettings.GetDefault();
- gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings);
- _callListNotificationChannelDescriptors = clientHelper.BuildApiCall(
- GrpcClient.ListNotificationChannelDescriptorsAsync, GrpcClient.ListNotificationChannelDescriptors, effectiveSettings.ListNotificationChannelDescriptorsSettings)
- .WithGoogleRequestParam("name", request => request.Name);
- _callGetNotificationChannelDescriptor = clientHelper.BuildApiCall(
- GrpcClient.GetNotificationChannelDescriptorAsync, GrpcClient.GetNotificationChannelDescriptor, effectiveSettings.GetNotificationChannelDescriptorSettings)
- .WithGoogleRequestParam("name", request => request.Name);
- _callListNotificationChannels = clientHelper.BuildApiCall(
- GrpcClient.ListNotificationChannelsAsync, GrpcClient.ListNotificationChannels, effectiveSettings.ListNotificationChannelsSettings)
- .WithGoogleRequestParam("name", request => request.Name);
- _callGetNotificationChannel = clientHelper.BuildApiCall(
- GrpcClient.GetNotificationChannelAsync, GrpcClient.GetNotificationChannel, effectiveSettings.GetNotificationChannelSettings)
- .WithGoogleRequestParam("name", request => request.Name);
- _callCreateNotificationChannel = clientHelper.BuildApiCall(
- GrpcClient.CreateNotificationChannelAsync, GrpcClient.CreateNotificationChannel, effectiveSettings.CreateNotificationChannelSettings)
- .WithGoogleRequestParam("name", request => request.Name);
- _callUpdateNotificationChannel = clientHelper.BuildApiCall(
- GrpcClient.UpdateNotificationChannelAsync, GrpcClient.UpdateNotificationChannel, effectiveSettings.UpdateNotificationChannelSettings)
- .WithGoogleRequestParam("notification_channel.name", request => request.NotificationChannel?.Name);
- _callDeleteNotificationChannel = clientHelper.BuildApiCall(
- GrpcClient.DeleteNotificationChannelAsync, GrpcClient.DeleteNotificationChannel, effectiveSettings.DeleteNotificationChannelSettings)
- .WithGoogleRequestParam("name", request => request.Name);
- Modify_ApiCall(ref _callListNotificationChannelDescriptors);
- Modify_ListNotificationChannelDescriptorsApiCall(ref _callListNotificationChannelDescriptors);
- Modify_ApiCall(ref _callGetNotificationChannelDescriptor);
- Modify_GetNotificationChannelDescriptorApiCall(ref _callGetNotificationChannelDescriptor);
- Modify_ApiCall(ref _callListNotificationChannels);
- Modify_ListNotificationChannelsApiCall(ref _callListNotificationChannels);
- Modify_ApiCall(ref _callGetNotificationChannel);
- Modify_GetNotificationChannelApiCall(ref _callGetNotificationChannel);
- Modify_ApiCall(ref _callCreateNotificationChannel);
- Modify_CreateNotificationChannelApiCall(ref _callCreateNotificationChannel);
- Modify_ApiCall(ref _callUpdateNotificationChannel);
- Modify_UpdateNotificationChannelApiCall(ref _callUpdateNotificationChannel);
- Modify_ApiCall(ref _callDeleteNotificationChannel);
- Modify_DeleteNotificationChannelApiCall(ref _callDeleteNotificationChannel);
- OnConstruction(grpcClient, effectiveSettings, clientHelper);
- }
-
- // Partial methods are named to (mostly) ensure there cannot be conflicts with RPC method names.
-
- // Partial methods called for every ApiCall on construction.
- // Allows modification of all the underlying ApiCall objects.
- partial void Modify_ApiCall(ref gaxgrpc::ApiCall call)
- where TRequest : class, pb::IMessage
- where TResponse : class, pb::IMessage;
-
- // Partial methods called for each ApiCall on construction.
- // Allows per-RPC-method modification of the underlying ApiCall object.
- partial void Modify_ListNotificationChannelDescriptorsApiCall(ref gaxgrpc::ApiCall call);
- partial void Modify_GetNotificationChannelDescriptorApiCall(ref gaxgrpc::ApiCall call);
- partial void Modify_ListNotificationChannelsApiCall(ref gaxgrpc::ApiCall call);
- partial void Modify_GetNotificationChannelApiCall(ref gaxgrpc::ApiCall call);
- partial void Modify_CreateNotificationChannelApiCall(ref gaxgrpc::ApiCall call);
- partial void Modify_UpdateNotificationChannelApiCall(ref gaxgrpc::ApiCall call);
- partial void Modify_DeleteNotificationChannelApiCall(ref gaxgrpc::ApiCall call);
- partial void OnConstruction(NotificationChannelService.NotificationChannelServiceClient grpcClient, NotificationChannelServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);
-
- ///
- /// The underlying gRPC NotificationChannelService client.
- ///
- public override NotificationChannelService.NotificationChannelServiceClient GrpcClient { get; }
-
- // Partial methods called on each request.
- // Allows per-RPC-call modification to the request and CallSettings objects,
- // before the underlying RPC is performed.
- partial void Modify_ListNotificationChannelDescriptorsRequest(ref ListNotificationChannelDescriptorsRequest request, ref gaxgrpc::CallSettings settings);
- partial void Modify_GetNotificationChannelDescriptorRequest(ref GetNotificationChannelDescriptorRequest request, ref gaxgrpc::CallSettings settings);
- partial void Modify_ListNotificationChannelsRequest(ref ListNotificationChannelsRequest request, ref gaxgrpc::CallSettings settings);
- partial void Modify_GetNotificationChannelRequest(ref GetNotificationChannelRequest request, ref gaxgrpc::CallSettings settings);
- partial void Modify_CreateNotificationChannelRequest(ref CreateNotificationChannelRequest request, ref gaxgrpc::CallSettings settings);
- partial void Modify_UpdateNotificationChannelRequest(ref UpdateNotificationChannelRequest request, ref gaxgrpc::CallSettings settings);
- partial void Modify_DeleteNotificationChannelRequest(ref DeleteNotificationChannelRequest request, ref gaxgrpc::CallSettings settings);
-
///
- /// Lists the descriptors for supported channel types. The use of descriptors
- /// makes it possible for new channel types to be dynamically added.
+ /// Causes a verification code to be delivered to the channel. The code
+ /// can then be supplied in `VerifyNotificationChannel` to verify the channel.
///
- ///
- /// The request object containing all of the parameters for the API call.
+ ///
+ /// The notification channel to which to send a verification code.
///
///
/// If not null, applies overrides to this RPC call.
///
///
- /// A pageable asynchronous sequence of resources.
+ /// A Task that completes when the RPC has completed.
///
- public override gax::PagedAsyncEnumerable ListNotificationChannelDescriptorsAsync(
- ListNotificationChannelDescriptorsRequest request,
- gaxgrpc::CallSettings callSettings = null)
- {
- Modify_ListNotificationChannelDescriptorsRequest(ref request, ref callSettings);
- return new gaxgrpc::GrpcPagedAsyncEnumerable(_callListNotificationChannelDescriptors, request, callSettings);
- }
+ public virtual stt::Task SendNotificationChannelVerificationCodeAsync(
+ NotificationChannelName name,
+ gaxgrpc::CallSettings callSettings = null) => SendNotificationChannelVerificationCodeAsync(
+ new SendNotificationChannelVerificationCodeRequest
+ {
+ NotificationChannelName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)),
+ },
+ callSettings);
///
- /// Lists the descriptors for supported channel types. The use of descriptors
- /// makes it possible for new channel types to be dynamically added.
+ /// Causes a verification code to be delivered to the channel. The code
+ /// can then be supplied in `VerifyNotificationChannel` to verify the channel.
///
- ///
- /// The request object containing all of the parameters for the API call.
+ ///
+ /// The notification channel to which to send a verification code.
///
- ///
- /// If not null, applies overrides to this RPC call.
+ ///
+ /// A to use for this RPC.
///
///
- /// A pageable sequence of resources.
+ /// A Task that completes when the RPC has completed.
///
- public override gax::PagedEnumerable ListNotificationChannelDescriptors(
- ListNotificationChannelDescriptorsRequest request,
- gaxgrpc::CallSettings callSettings = null)
- {
- Modify_ListNotificationChannelDescriptorsRequest(ref request, ref callSettings);
- return new gaxgrpc::GrpcPagedEnumerable(_callListNotificationChannelDescriptors, request, callSettings);
- }
+ public virtual stt::Task SendNotificationChannelVerificationCodeAsync(
+ NotificationChannelName name,
+ st::CancellationToken cancellationToken) => SendNotificationChannelVerificationCodeAsync(
+ name,
+ gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
///
- /// Gets a single channel descriptor. The descriptor indicates which fields
- /// are expected / permitted for a notification channel of the given type.
+ /// Causes a verification code to be delivered to the channel. The code
+ /// can then be supplied in `VerifyNotificationChannel` to verify the channel.
///
- ///
- /// The request object containing all of the parameters for the API call.
+ ///
+ /// The notification channel to which to send a verification code.
///
///
/// If not null, applies overrides to this RPC call.
///
- ///
- /// A Task containing the RPC response.
- ///
- public override stt::Task GetNotificationChannelDescriptorAsync(
- GetNotificationChannelDescriptorRequest request,
- gaxgrpc::CallSettings callSettings = null)
- {
- Modify_GetNotificationChannelDescriptorRequest(ref request, ref callSettings);
- return _callGetNotificationChannelDescriptor.Async(request, callSettings);
- }
+ public virtual void SendNotificationChannelVerificationCode(
+ NotificationChannelName name,
+ gaxgrpc::CallSettings callSettings = null) => SendNotificationChannelVerificationCode(
+ new SendNotificationChannelVerificationCodeRequest
+ {
+ NotificationChannelName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)),
+ },
+ callSettings);
///
- /// Gets a single channel descriptor. The descriptor indicates which fields
- /// are expected / permitted for a notification channel of the given type.
+ /// Causes a verification code to be delivered to the channel. The code
+ /// can then be supplied in `VerifyNotificationChannel` to verify the channel.
///
- ///
- /// The request object containing all of the parameters for the API call.
+ ///
+ /// The notification channel to which to send a verification code.
///
///
/// If not null, applies overrides to this RPC call.
///
///
- /// The RPC response.
+ /// A Task that completes when the RPC has completed.
///
- public override NotificationChannelDescriptor GetNotificationChannelDescriptor(
- GetNotificationChannelDescriptorRequest request,
- gaxgrpc::CallSettings callSettings = null)
- {
- Modify_GetNotificationChannelDescriptorRequest(ref request, ref callSettings);
- return _callGetNotificationChannelDescriptor.Sync(request, callSettings);
- }
+ public virtual stt::Task SendNotificationChannelVerificationCodeAsync(
+ string name,
+ gaxgrpc::CallSettings callSettings = null) => SendNotificationChannelVerificationCodeAsync(
+ new SendNotificationChannelVerificationCodeRequest
+ {
+ Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)),
+ },
+ callSettings);
///
- /// Lists the notification channels that have been created for the project.
+ /// Causes a verification code to be delivered to the channel. The code
+ /// can then be supplied in `VerifyNotificationChannel` to verify the channel.
///
- ///
+ ///
+ /// The notification channel to which to send a verification code.
+ ///
+ ///
+ /// A to use for this RPC.
+ ///
+ ///
+ /// A Task that completes when the RPC has completed.
+ ///
+ public virtual stt::Task SendNotificationChannelVerificationCodeAsync(
+ string name,
+ st::CancellationToken cancellationToken) => SendNotificationChannelVerificationCodeAsync(
+ name,
+ gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
+
+ ///
+ /// Causes a verification code to be delivered to the channel. The code
+ /// can then be supplied in `VerifyNotificationChannel` to verify the channel.
+ ///
+ ///
+ /// The notification channel to which to send a verification code.
+ ///
+ ///
+ /// If not null, applies overrides to this RPC call.
+ ///
+ public virtual void SendNotificationChannelVerificationCode(
+ string name,
+ gaxgrpc::CallSettings callSettings = null) => SendNotificationChannelVerificationCode(
+ new SendNotificationChannelVerificationCodeRequest
+ {
+ Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)),
+ },
+ callSettings);
+
+ ///
+ /// Causes a verification code to be delivered to the channel. The code
+ /// can then be supplied in `VerifyNotificationChannel` to verify the channel.
+ ///
+ ///
+ /// The request object containing all of the parameters for the API call.
+ ///
+ ///
+ /// If not null, applies overrides to this RPC call.
+ ///
+ ///
+ /// A Task that completes when the RPC has completed.
+ ///
+ public virtual stt::Task SendNotificationChannelVerificationCodeAsync(
+ SendNotificationChannelVerificationCodeRequest request,
+ gaxgrpc::CallSettings callSettings = null)
+ {
+ throw new sys::NotImplementedException();
+ }
+
+ ///
+ /// Causes a verification code to be delivered to the channel. The code
+ /// can then be supplied in `VerifyNotificationChannel` to verify the channel.
+ ///
+ ///
+ /// The request object containing all of the parameters for the API call.
+ ///
+ ///
+ /// A to use for this RPC.
+ ///
+ ///
+ /// A Task that completes when the RPC has completed.
+ ///
+ public virtual stt::Task SendNotificationChannelVerificationCodeAsync(
+ SendNotificationChannelVerificationCodeRequest request,
+ st::CancellationToken cancellationToken) => SendNotificationChannelVerificationCodeAsync(
+ request,
+ gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
+
+ ///
+ /// Causes a verification code to be delivered to the channel. The code
+ /// can then be supplied in `VerifyNotificationChannel` to verify the channel.
+ ///
+ ///
+ /// The request object containing all of the parameters for the API call.
+ ///
+ ///
+ /// If not null, applies overrides to this RPC call.
+ ///
+ public virtual void SendNotificationChannelVerificationCode(
+ SendNotificationChannelVerificationCodeRequest request,
+ gaxgrpc::CallSettings callSettings = null)
+ {
+ throw new sys::NotImplementedException();
+ }
+
+ ///
+ /// Requests a verification code for an already verified channel that can then
+ /// be used in a call to VerifyNotificationChannel() on a different channel
+ /// with an equivalent identity in the same or in a different project. This
+ /// makes it possible to copy a channel between projects without requiring
+ /// manual reverification of the channel. If the channel is not in the
+ /// verified state, this method will fail (in other words, this may only be
+ /// used if the SendNotificationChannelVerificationCode and
+ /// VerifyNotificationChannel paths have already been used to put the given
+ /// channel into the verified state).
+ ///
+ /// There is no guarantee that the verification codes returned by this method
+ /// will be of a similar structure or form as the ones that are delivered
+ /// to the channel via SendNotificationChannelVerificationCode; while
+ /// VerifyNotificationChannel() will recognize both the codes delivered via
+ /// SendNotificationChannelVerificationCode() and returned from
+ /// GetNotificationChannelVerificationCode(), it is typically the case that
+ /// the verification codes delivered via
+ /// SendNotificationChannelVerificationCode() will be shorter and also
+ /// have a shorter expiration (e.g. codes such as "G-123456") whereas
+ /// GetVerificationCode() will typically return a much longer, websafe base
+ /// 64 encoded string that has a longer expiration time.
+ ///
+ ///
+ /// The notification channel for which a verification code is to be generated
+ /// and retrieved. This must name a channel that is already verified; if
+ /// the specified channel is not verified, the request will fail.
+ ///
+ ///
+ /// If not null, applies overrides to this RPC call.
+ ///
+ ///
+ /// A Task containing the RPC response.
+ ///
+ public virtual stt::Task GetNotificationChannelVerificationCodeAsync(
+ NotificationChannelName name,
+ gaxgrpc::CallSettings callSettings = null) => GetNotificationChannelVerificationCodeAsync(
+ new GetNotificationChannelVerificationCodeRequest
+ {
+ NotificationChannelName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)),
+ },
+ callSettings);
+
+ ///
+ /// Requests a verification code for an already verified channel that can then
+ /// be used in a call to VerifyNotificationChannel() on a different channel
+ /// with an equivalent identity in the same or in a different project. This
+ /// makes it possible to copy a channel between projects without requiring
+ /// manual reverification of the channel. If the channel is not in the
+ /// verified state, this method will fail (in other words, this may only be
+ /// used if the SendNotificationChannelVerificationCode and
+ /// VerifyNotificationChannel paths have already been used to put the given
+ /// channel into the verified state).
+ ///
+ /// There is no guarantee that the verification codes returned by this method
+ /// will be of a similar structure or form as the ones that are delivered
+ /// to the channel via SendNotificationChannelVerificationCode; while
+ /// VerifyNotificationChannel() will recognize both the codes delivered via
+ /// SendNotificationChannelVerificationCode() and returned from
+ /// GetNotificationChannelVerificationCode(), it is typically the case that
+ /// the verification codes delivered via
+ /// SendNotificationChannelVerificationCode() will be shorter and also
+ /// have a shorter expiration (e.g. codes such as "G-123456") whereas
+ /// GetVerificationCode() will typically return a much longer, websafe base
+ /// 64 encoded string that has a longer expiration time.
+ ///
+ ///
+ /// The notification channel for which a verification code is to be generated
+ /// and retrieved. This must name a channel that is already verified; if
+ /// the specified channel is not verified, the request will fail.
+ ///
+ ///
+ /// A to use for this RPC.
+ ///
+ ///
+ /// A Task containing the RPC response.
+ ///
+ public virtual stt::Task GetNotificationChannelVerificationCodeAsync(
+ NotificationChannelName name,
+ st::CancellationToken cancellationToken) => GetNotificationChannelVerificationCodeAsync(
+ name,
+ gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
+
+ ///
+ /// Requests a verification code for an already verified channel that can then
+ /// be used in a call to VerifyNotificationChannel() on a different channel
+ /// with an equivalent identity in the same or in a different project. This
+ /// makes it possible to copy a channel between projects without requiring
+ /// manual reverification of the channel. If the channel is not in the
+ /// verified state, this method will fail (in other words, this may only be
+ /// used if the SendNotificationChannelVerificationCode and
+ /// VerifyNotificationChannel paths have already been used to put the given
+ /// channel into the verified state).
+ ///
+ /// There is no guarantee that the verification codes returned by this method
+ /// will be of a similar structure or form as the ones that are delivered
+ /// to the channel via SendNotificationChannelVerificationCode; while
+ /// VerifyNotificationChannel() will recognize both the codes delivered via
+ /// SendNotificationChannelVerificationCode() and returned from
+ /// GetNotificationChannelVerificationCode(), it is typically the case that
+ /// the verification codes delivered via
+ /// SendNotificationChannelVerificationCode() will be shorter and also
+ /// have a shorter expiration (e.g. codes such as "G-123456") whereas
+ /// GetVerificationCode() will typically return a much longer, websafe base
+ /// 64 encoded string that has a longer expiration time.
+ ///
+ ///
+ /// The notification channel for which a verification code is to be generated
+ /// and retrieved. This must name a channel that is already verified; if
+ /// the specified channel is not verified, the request will fail.
+ ///
+ ///
+ /// If not null, applies overrides to this RPC call.
+ ///
+ ///
+ /// The RPC response.
+ ///
+ public virtual GetNotificationChannelVerificationCodeResponse GetNotificationChannelVerificationCode(
+ NotificationChannelName name,
+ gaxgrpc::CallSettings callSettings = null) => GetNotificationChannelVerificationCode(
+ new GetNotificationChannelVerificationCodeRequest
+ {
+ NotificationChannelName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)),
+ },
+ callSettings);
+
+ ///
+ /// Requests a verification code for an already verified channel that can then
+ /// be used in a call to VerifyNotificationChannel() on a different channel
+ /// with an equivalent identity in the same or in a different project. This
+ /// makes it possible to copy a channel between projects without requiring
+ /// manual reverification of the channel. If the channel is not in the
+ /// verified state, this method will fail (in other words, this may only be
+ /// used if the SendNotificationChannelVerificationCode and
+ /// VerifyNotificationChannel paths have already been used to put the given
+ /// channel into the verified state).
+ ///
+ /// There is no guarantee that the verification codes returned by this method
+ /// will be of a similar structure or form as the ones that are delivered
+ /// to the channel via SendNotificationChannelVerificationCode; while
+ /// VerifyNotificationChannel() will recognize both the codes delivered via
+ /// SendNotificationChannelVerificationCode() and returned from
+ /// GetNotificationChannelVerificationCode(), it is typically the case that
+ /// the verification codes delivered via
+ /// SendNotificationChannelVerificationCode() will be shorter and also
+ /// have a shorter expiration (e.g. codes such as "G-123456") whereas
+ /// GetVerificationCode() will typically return a much longer, websafe base
+ /// 64 encoded string that has a longer expiration time.
+ ///
+ ///
+ /// The notification channel for which a verification code is to be generated
+ /// and retrieved. This must name a channel that is already verified; if
+ /// the specified channel is not verified, the request will fail.
+ ///
+ ///
+ /// If not null, applies overrides to this RPC call.
+ ///
+ ///
+ /// A Task containing the RPC response.
+ ///
+ public virtual stt::Task GetNotificationChannelVerificationCodeAsync(
+ string name,
+ gaxgrpc::CallSettings callSettings = null) => GetNotificationChannelVerificationCodeAsync(
+ new GetNotificationChannelVerificationCodeRequest
+ {
+ Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)),
+ },
+ callSettings);
+
+ ///
+ /// Requests a verification code for an already verified channel that can then
+ /// be used in a call to VerifyNotificationChannel() on a different channel
+ /// with an equivalent identity in the same or in a different project. This
+ /// makes it possible to copy a channel between projects without requiring
+ /// manual reverification of the channel. If the channel is not in the
+ /// verified state, this method will fail (in other words, this may only be
+ /// used if the SendNotificationChannelVerificationCode and
+ /// VerifyNotificationChannel paths have already been used to put the given
+ /// channel into the verified state).
+ ///
+ /// There is no guarantee that the verification codes returned by this method
+ /// will be of a similar structure or form as the ones that are delivered
+ /// to the channel via SendNotificationChannelVerificationCode; while
+ /// VerifyNotificationChannel() will recognize both the codes delivered via
+ /// SendNotificationChannelVerificationCode() and returned from
+ /// GetNotificationChannelVerificationCode(), it is typically the case that
+ /// the verification codes delivered via
+ /// SendNotificationChannelVerificationCode() will be shorter and also
+ /// have a shorter expiration (e.g. codes such as "G-123456") whereas
+ /// GetVerificationCode() will typically return a much longer, websafe base
+ /// 64 encoded string that has a longer expiration time.
+ ///
+ ///
+ /// The notification channel for which a verification code is to be generated
+ /// and retrieved. This must name a channel that is already verified; if
+ /// the specified channel is not verified, the request will fail.
+ ///
+ ///
+ /// A to use for this RPC.
+ ///
+ ///
+ /// A Task containing the RPC response.
+ ///
+ public virtual stt::Task GetNotificationChannelVerificationCodeAsync(
+ string name,
+ st::CancellationToken cancellationToken) => GetNotificationChannelVerificationCodeAsync(
+ name,
+ gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
+
+ ///
+ /// Requests a verification code for an already verified channel that can then
+ /// be used in a call to VerifyNotificationChannel() on a different channel
+ /// with an equivalent identity in the same or in a different project. This
+ /// makes it possible to copy a channel between projects without requiring
+ /// manual reverification of the channel. If the channel is not in the
+ /// verified state, this method will fail (in other words, this may only be
+ /// used if the SendNotificationChannelVerificationCode and
+ /// VerifyNotificationChannel paths have already been used to put the given
+ /// channel into the verified state).
+ ///
+ /// There is no guarantee that the verification codes returned by this method
+ /// will be of a similar structure or form as the ones that are delivered
+ /// to the channel via SendNotificationChannelVerificationCode; while
+ /// VerifyNotificationChannel() will recognize both the codes delivered via
+ /// SendNotificationChannelVerificationCode() and returned from
+ /// GetNotificationChannelVerificationCode(), it is typically the case that
+ /// the verification codes delivered via
+ /// SendNotificationChannelVerificationCode() will be shorter and also
+ /// have a shorter expiration (e.g. codes such as "G-123456") whereas
+ /// GetVerificationCode() will typically return a much longer, websafe base
+ /// 64 encoded string that has a longer expiration time.
+ ///
+ ///
+ /// The notification channel for which a verification code is to be generated
+ /// and retrieved. This must name a channel that is already verified; if
+ /// the specified channel is not verified, the request will fail.
+ ///
+ ///
+ /// If not null, applies overrides to this RPC call.
+ ///
+ ///
+ /// The RPC response.
+ ///
+ public virtual GetNotificationChannelVerificationCodeResponse GetNotificationChannelVerificationCode(
+ string name,
+ gaxgrpc::CallSettings callSettings = null) => GetNotificationChannelVerificationCode(
+ new GetNotificationChannelVerificationCodeRequest
+ {
+ Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)),
+ },
+ callSettings);
+
+ ///
+ /// Requests a verification code for an already verified channel that can then
+ /// be used in a call to VerifyNotificationChannel() on a different channel
+ /// with an equivalent identity in the same or in a different project. This
+ /// makes it possible to copy a channel between projects without requiring
+ /// manual reverification of the channel. If the channel is not in the
+ /// verified state, this method will fail (in other words, this may only be
+ /// used if the SendNotificationChannelVerificationCode and
+ /// VerifyNotificationChannel paths have already been used to put the given
+ /// channel into the verified state).
+ ///
+ /// There is no guarantee that the verification codes returned by this method
+ /// will be of a similar structure or form as the ones that are delivered
+ /// to the channel via SendNotificationChannelVerificationCode; while
+ /// VerifyNotificationChannel() will recognize both the codes delivered via
+ /// SendNotificationChannelVerificationCode() and returned from
+ /// GetNotificationChannelVerificationCode(), it is typically the case that
+ /// the verification codes delivered via
+ /// SendNotificationChannelVerificationCode() will be shorter and also
+ /// have a shorter expiration (e.g. codes such as "G-123456") whereas
+ /// GetVerificationCode() will typically return a much longer, websafe base
+ /// 64 encoded string that has a longer expiration time.
+ ///
+ ///
+ /// The request object containing all of the parameters for the API call.
+ ///
+ ///
+ /// If not null, applies overrides to this RPC call.
+ ///
+ ///
+ /// A Task containing the RPC response.
+ ///
+ public virtual stt::Task GetNotificationChannelVerificationCodeAsync(
+ GetNotificationChannelVerificationCodeRequest request,
+ gaxgrpc::CallSettings callSettings = null)
+ {
+ throw new sys::NotImplementedException();
+ }
+
+ ///
+ /// Requests a verification code for an already verified channel that can then
+ /// be used in a call to VerifyNotificationChannel() on a different channel
+ /// with an equivalent identity in the same or in a different project. This
+ /// makes it possible to copy a channel between projects without requiring
+ /// manual reverification of the channel. If the channel is not in the
+ /// verified state, this method will fail (in other words, this may only be
+ /// used if the SendNotificationChannelVerificationCode and
+ /// VerifyNotificationChannel paths have already been used to put the given
+ /// channel into the verified state).
+ ///
+ /// There is no guarantee that the verification codes returned by this method
+ /// will be of a similar structure or form as the ones that are delivered
+ /// to the channel via SendNotificationChannelVerificationCode; while
+ /// VerifyNotificationChannel() will recognize both the codes delivered via
+ /// SendNotificationChannelVerificationCode() and returned from
+ /// GetNotificationChannelVerificationCode(), it is typically the case that
+ /// the verification codes delivered via
+ /// SendNotificationChannelVerificationCode() will be shorter and also
+ /// have a shorter expiration (e.g. codes such as "G-123456") whereas
+ /// GetVerificationCode() will typically return a much longer, websafe base
+ /// 64 encoded string that has a longer expiration time.
+ ///
+ ///
+ /// The request object containing all of the parameters for the API call.
+ ///
+ ///
+ /// A to use for this RPC.
+ ///
+ ///
+ /// A Task containing the RPC response.
+ ///
+ public virtual stt::Task GetNotificationChannelVerificationCodeAsync(
+ GetNotificationChannelVerificationCodeRequest request,
+ st::CancellationToken cancellationToken) => GetNotificationChannelVerificationCodeAsync(
+ request,
+ gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
+
+ ///
+ /// Requests a verification code for an already verified channel that can then
+ /// be used in a call to VerifyNotificationChannel() on a different channel
+ /// with an equivalent identity in the same or in a different project. This
+ /// makes it possible to copy a channel between projects without requiring
+ /// manual reverification of the channel. If the channel is not in the
+ /// verified state, this method will fail (in other words, this may only be
+ /// used if the SendNotificationChannelVerificationCode and
+ /// VerifyNotificationChannel paths have already been used to put the given
+ /// channel into the verified state).
+ ///
+ /// There is no guarantee that the verification codes returned by this method
+ /// will be of a similar structure or form as the ones that are delivered
+ /// to the channel via SendNotificationChannelVerificationCode; while
+ /// VerifyNotificationChannel() will recognize both the codes delivered via
+ /// SendNotificationChannelVerificationCode() and returned from
+ /// GetNotificationChannelVerificationCode(), it is typically the case that
+ /// the verification codes delivered via
+ /// SendNotificationChannelVerificationCode() will be shorter and also
+ /// have a shorter expiration (e.g. codes such as "G-123456") whereas
+ /// GetVerificationCode() will typically return a much longer, websafe base
+ /// 64 encoded string that has a longer expiration time.
+ ///
+ ///
+ /// The request object containing all of the parameters for the API call.
+ ///
+ ///
+ /// If not null, applies overrides to this RPC call.
+ ///
+ ///
+ /// The RPC response.
+ ///
+ public virtual GetNotificationChannelVerificationCodeResponse GetNotificationChannelVerificationCode(
+ GetNotificationChannelVerificationCodeRequest request,
+ gaxgrpc::CallSettings callSettings = null)
+ {
+ throw new sys::NotImplementedException();
+ }
+
+ ///
+ /// Verifies a `NotificationChannel` by proving receipt of the code
+ /// delivered to the channel as a result of calling
+ /// `SendNotificationChannelVerificationCode`.
+ ///
+ ///
+ /// The notification channel to verify.
+ ///
+ ///
+ /// The verification code that was delivered to the channel as
+ /// a result of invoking the `SendNotificationChannelVerificationCode` API
+ /// method or that was retrieved from a verified channel via
+ /// `GetNotificationChannelVerificationCode`. For example, one might have
+ /// "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only
+ /// guaranteed that the code is valid UTF-8; one should not
+ /// make any assumptions regarding the structure or format of the code).
+ ///
+ ///
+ /// If not null, applies overrides to this RPC call.
+ ///
+ ///
+ /// A Task containing the RPC response.
+ ///
+ public virtual stt::Task VerifyNotificationChannelAsync(
+ NotificationChannelName name,
+ string code,
+ gaxgrpc::CallSettings callSettings = null) => VerifyNotificationChannelAsync(
+ new VerifyNotificationChannelRequest
+ {
+ NotificationChannelName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)),
+ Code = gax::GaxPreconditions.CheckNotNullOrEmpty(code, nameof(code)),
+ },
+ callSettings);
+
+ ///
+ /// Verifies a `NotificationChannel` by proving receipt of the code
+ /// delivered to the channel as a result of calling
+ /// `SendNotificationChannelVerificationCode`.
+ ///
+ ///
+ /// The notification channel to verify.
+ ///
+ ///
+ /// The verification code that was delivered to the channel as
+ /// a result of invoking the `SendNotificationChannelVerificationCode` API
+ /// method or that was retrieved from a verified channel via
+ /// `GetNotificationChannelVerificationCode`. For example, one might have
+ /// "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only
+ /// guaranteed that the code is valid UTF-8; one should not
+ /// make any assumptions regarding the structure or format of the code).
+ ///
+ ///
+ /// A to use for this RPC.
+ ///
+ ///
+ /// A Task containing the RPC response.
+ ///
+ public virtual stt::Task VerifyNotificationChannelAsync(
+ NotificationChannelName name,
+ string code,
+ st::CancellationToken cancellationToken) => VerifyNotificationChannelAsync(
+ name,
+ code,
+ gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
+
+ ///
+ /// Verifies a `NotificationChannel` by proving receipt of the code
+ /// delivered to the channel as a result of calling
+ /// `SendNotificationChannelVerificationCode`.
+ ///
+ ///
+ /// The notification channel to verify.
+ ///
+ ///
+ /// The verification code that was delivered to the channel as
+ /// a result of invoking the `SendNotificationChannelVerificationCode` API
+ /// method or that was retrieved from a verified channel via
+ /// `GetNotificationChannelVerificationCode`. For example, one might have
+ /// "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only
+ /// guaranteed that the code is valid UTF-8; one should not
+ /// make any assumptions regarding the structure or format of the code).
+ ///
+ ///
+ /// If not null, applies overrides to this RPC call.
+ ///
+ ///
+ /// The RPC response.
+ ///
+ public virtual NotificationChannel VerifyNotificationChannel(
+ NotificationChannelName name,
+ string code,
+ gaxgrpc::CallSettings callSettings = null) => VerifyNotificationChannel(
+ new VerifyNotificationChannelRequest
+ {
+ NotificationChannelName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)),
+ Code = gax::GaxPreconditions.CheckNotNullOrEmpty(code, nameof(code)),
+ },
+ callSettings);
+
+ ///
+ /// Verifies a `NotificationChannel` by proving receipt of the code
+ /// delivered to the channel as a result of calling
+ /// `SendNotificationChannelVerificationCode`.
+ ///
+ ///
+ /// The notification channel to verify.
+ ///
+ ///
+ /// The verification code that was delivered to the channel as
+ /// a result of invoking the `SendNotificationChannelVerificationCode` API
+ /// method or that was retrieved from a verified channel via
+ /// `GetNotificationChannelVerificationCode`. For example, one might have
+ /// "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only
+ /// guaranteed that the code is valid UTF-8; one should not
+ /// make any assumptions regarding the structure or format of the code).
+ ///
+ ///
+ /// If not null, applies overrides to this RPC call.
+ ///
+ ///
+ /// A Task containing the RPC response.
+ ///
+ public virtual stt::Task VerifyNotificationChannelAsync(
+ string name,
+ string code,
+ gaxgrpc::CallSettings callSettings = null) => VerifyNotificationChannelAsync(
+ new VerifyNotificationChannelRequest
+ {
+ Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)),
+ Code = gax::GaxPreconditions.CheckNotNullOrEmpty(code, nameof(code)),
+ },
+ callSettings);
+
+ ///
+ /// Verifies a `NotificationChannel` by proving receipt of the code
+ /// delivered to the channel as a result of calling
+ /// `SendNotificationChannelVerificationCode`.
+ ///
+ ///
+ /// The notification channel to verify.
+ ///
+ ///
+ /// The verification code that was delivered to the channel as
+ /// a result of invoking the `SendNotificationChannelVerificationCode` API
+ /// method or that was retrieved from a verified channel via
+ /// `GetNotificationChannelVerificationCode`. For example, one might have
+ /// "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only
+ /// guaranteed that the code is valid UTF-8; one should not
+ /// make any assumptions regarding the structure or format of the code).
+ ///
+ ///
+ /// A to use for this RPC.
+ ///
+ ///
+ /// A Task containing the RPC response.
+ ///
+ public virtual stt::Task VerifyNotificationChannelAsync(
+ string name,
+ string code,
+ st::CancellationToken cancellationToken) => VerifyNotificationChannelAsync(
+ name,
+ code,
+ gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
+
+ ///
+ /// Verifies a `NotificationChannel` by proving receipt of the code
+ /// delivered to the channel as a result of calling
+ /// `SendNotificationChannelVerificationCode`.
+ ///
+ ///
+ /// The notification channel to verify.
+ ///
+ ///
+ /// The verification code that was delivered to the channel as
+ /// a result of invoking the `SendNotificationChannelVerificationCode` API
+ /// method or that was retrieved from a verified channel via
+ /// `GetNotificationChannelVerificationCode`. For example, one might have
+ /// "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only
+ /// guaranteed that the code is valid UTF-8; one should not
+ /// make any assumptions regarding the structure or format of the code).
+ ///
+ ///
+ /// If not null, applies overrides to this RPC call.
+ ///
+ ///
+ /// The RPC response.
+ ///
+ public virtual NotificationChannel VerifyNotificationChannel(
+ string name,
+ string code,
+ gaxgrpc::CallSettings callSettings = null) => VerifyNotificationChannel(
+ new VerifyNotificationChannelRequest
+ {
+ Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)),
+ Code = gax::GaxPreconditions.CheckNotNullOrEmpty(code, nameof(code)),
+ },
+ callSettings);
+
+ ///
+ /// Verifies a `NotificationChannel` by proving receipt of the code
+ /// delivered to the channel as a result of calling
+ /// `SendNotificationChannelVerificationCode`.
+ ///
+ ///
+ /// The request object containing all of the parameters for the API call.
+ ///
+ ///
+ /// If not null, applies overrides to this RPC call.
+ ///
+ ///
+ /// A Task containing the RPC response.
+ ///
+ public virtual stt::Task VerifyNotificationChannelAsync(
+ VerifyNotificationChannelRequest request,
+ gaxgrpc::CallSettings callSettings = null)
+ {
+ throw new sys::NotImplementedException();
+ }
+
+ ///
+ /// Verifies a `NotificationChannel` by proving receipt of the code
+ /// delivered to the channel as a result of calling
+ /// `SendNotificationChannelVerificationCode`.
+ ///
+ ///
+ /// The request object containing all of the parameters for the API call.
+ ///
+ ///
+ /// A to use for this RPC.
+ ///
+ ///
+ /// A Task containing the RPC response.
+ ///
+ public virtual stt::Task VerifyNotificationChannelAsync(
+ VerifyNotificationChannelRequest request,
+ st::CancellationToken cancellationToken) => VerifyNotificationChannelAsync(
+ request,
+ gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
+
+ ///
+ /// Verifies a `NotificationChannel` by proving receipt of the code
+ /// delivered to the channel as a result of calling
+ /// `SendNotificationChannelVerificationCode`.
+ ///
+ ///
+ /// The request object containing all of the parameters for the API call.
+ ///
+ ///
+ /// If not null, applies overrides to this RPC call.
+ ///
+ ///
+ /// The RPC response.
+ ///
+ public virtual NotificationChannel VerifyNotificationChannel(
+ VerifyNotificationChannelRequest request,
+ gaxgrpc::CallSettings callSettings = null)
+ {
+ throw new sys::NotImplementedException();
+ }
+
+ }
+
+ ///
+ /// NotificationChannelService client wrapper implementation, for convenient use.
+ ///
+ public sealed partial class NotificationChannelServiceClientImpl : NotificationChannelServiceClient
+ {
+ private readonly gaxgrpc::ApiCall _callListNotificationChannelDescriptors;
+ private readonly gaxgrpc::ApiCall _callGetNotificationChannelDescriptor;
+ private readonly gaxgrpc::ApiCall _callListNotificationChannels;
+ private readonly gaxgrpc::ApiCall _callGetNotificationChannel;
+ private readonly gaxgrpc::ApiCall _callCreateNotificationChannel;
+ private readonly gaxgrpc::ApiCall _callUpdateNotificationChannel;
+ private readonly gaxgrpc::ApiCall _callDeleteNotificationChannel;
+ private readonly gaxgrpc::ApiCall _callSendNotificationChannelVerificationCode;
+ private readonly gaxgrpc::ApiCall _callGetNotificationChannelVerificationCode;
+ private readonly gaxgrpc::ApiCall _callVerifyNotificationChannel;
+
+ ///
+ /// Constructs a client wrapper for the NotificationChannelService service, with the specified gRPC client and settings.
+ ///
+ /// The underlying gRPC client.
+ /// The base used within this client
+ public NotificationChannelServiceClientImpl(NotificationChannelService.NotificationChannelServiceClient grpcClient, NotificationChannelServiceSettings settings)
+ {
+ GrpcClient = grpcClient;
+ NotificationChannelServiceSettings effectiveSettings = settings ?? NotificationChannelServiceSettings.GetDefault();
+ gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings);
+ _callListNotificationChannelDescriptors = clientHelper.BuildApiCall(
+ GrpcClient.ListNotificationChannelDescriptorsAsync, GrpcClient.ListNotificationChannelDescriptors, effectiveSettings.ListNotificationChannelDescriptorsSettings)
+ .WithGoogleRequestParam("name", request => request.Name);
+ _callGetNotificationChannelDescriptor = clientHelper.BuildApiCall(
+ GrpcClient.GetNotificationChannelDescriptorAsync, GrpcClient.GetNotificationChannelDescriptor, effectiveSettings.GetNotificationChannelDescriptorSettings)
+ .WithGoogleRequestParam("name", request => request.Name);
+ _callListNotificationChannels = clientHelper.BuildApiCall(
+ GrpcClient.ListNotificationChannelsAsync, GrpcClient.ListNotificationChannels, effectiveSettings.ListNotificationChannelsSettings)
+ .WithGoogleRequestParam("name", request => request.Name);
+ _callGetNotificationChannel = clientHelper.BuildApiCall(
+ GrpcClient.GetNotificationChannelAsync, GrpcClient.GetNotificationChannel, effectiveSettings.GetNotificationChannelSettings)
+ .WithGoogleRequestParam("name", request => request.Name);
+ _callCreateNotificationChannel = clientHelper.BuildApiCall(
+ GrpcClient.CreateNotificationChannelAsync, GrpcClient.CreateNotificationChannel, effectiveSettings.CreateNotificationChannelSettings)
+ .WithGoogleRequestParam("name", request => request.Name);
+ _callUpdateNotificationChannel = clientHelper.BuildApiCall(
+ GrpcClient.UpdateNotificationChannelAsync, GrpcClient.UpdateNotificationChannel, effectiveSettings.UpdateNotificationChannelSettings)
+ .WithGoogleRequestParam("notification_channel.name", request => request.NotificationChannel?.Name);
+ _callDeleteNotificationChannel = clientHelper.BuildApiCall(
+ GrpcClient.DeleteNotificationChannelAsync, GrpcClient.DeleteNotificationChannel, effectiveSettings.DeleteNotificationChannelSettings)
+ .WithGoogleRequestParam("name", request => request.Name);
+ _callSendNotificationChannelVerificationCode = clientHelper.BuildApiCall(
+ GrpcClient.SendNotificationChannelVerificationCodeAsync, GrpcClient.SendNotificationChannelVerificationCode, effectiveSettings.SendNotificationChannelVerificationCodeSettings)
+ .WithGoogleRequestParam("name", request => request.Name);
+ _callGetNotificationChannelVerificationCode = clientHelper.BuildApiCall(
+ GrpcClient.GetNotificationChannelVerificationCodeAsync, GrpcClient.GetNotificationChannelVerificationCode, effectiveSettings.GetNotificationChannelVerificationCodeSettings)
+ .WithGoogleRequestParam("name", request => request.Name);
+ _callVerifyNotificationChannel = clientHelper.BuildApiCall(
+ GrpcClient.VerifyNotificationChannelAsync, GrpcClient.VerifyNotificationChannel, effectiveSettings.VerifyNotificationChannelSettings)
+ .WithGoogleRequestParam("name", request => request.Name);
+ Modify_ApiCall(ref _callListNotificationChannelDescriptors);
+ Modify_ListNotificationChannelDescriptorsApiCall(ref _callListNotificationChannelDescriptors);
+ Modify_ApiCall(ref _callGetNotificationChannelDescriptor);
+ Modify_GetNotificationChannelDescriptorApiCall(ref _callGetNotificationChannelDescriptor);
+ Modify_ApiCall(ref _callListNotificationChannels);
+ Modify_ListNotificationChannelsApiCall(ref _callListNotificationChannels);
+ Modify_ApiCall(ref _callGetNotificationChannel);
+ Modify_GetNotificationChannelApiCall(ref _callGetNotificationChannel);
+ Modify_ApiCall(ref _callCreateNotificationChannel);
+ Modify_CreateNotificationChannelApiCall(ref _callCreateNotificationChannel);
+ Modify_ApiCall(ref _callUpdateNotificationChannel);
+ Modify_UpdateNotificationChannelApiCall(ref _callUpdateNotificationChannel);
+ Modify_ApiCall(ref _callDeleteNotificationChannel);
+ Modify_DeleteNotificationChannelApiCall(ref _callDeleteNotificationChannel);
+ Modify_ApiCall(ref _callSendNotificationChannelVerificationCode);
+ Modify_SendNotificationChannelVerificationCodeApiCall(ref _callSendNotificationChannelVerificationCode);
+ Modify_ApiCall(ref _callGetNotificationChannelVerificationCode);
+ Modify_GetNotificationChannelVerificationCodeApiCall(ref _callGetNotificationChannelVerificationCode);
+ Modify_ApiCall(ref _callVerifyNotificationChannel);
+ Modify_VerifyNotificationChannelApiCall(ref _callVerifyNotificationChannel);
+ OnConstruction(grpcClient, effectiveSettings, clientHelper);
+ }
+
+ // Partial methods are named to (mostly) ensure there cannot be conflicts with RPC method names.
+
+ // Partial methods called for every ApiCall on construction.
+ // Allows modification of all the underlying ApiCall objects.
+ partial void Modify_ApiCall(ref gaxgrpc::ApiCall call)
+ where TRequest : class, pb::IMessage
+ where TResponse : class, pb::IMessage;
+
+ // Partial methods called for each ApiCall on construction.
+ // Allows per-RPC-method modification of the underlying ApiCall object.
+ partial void Modify_ListNotificationChannelDescriptorsApiCall(ref gaxgrpc::ApiCall call);
+ partial void Modify_GetNotificationChannelDescriptorApiCall(ref gaxgrpc::ApiCall call);
+ partial void Modify_ListNotificationChannelsApiCall(ref gaxgrpc::ApiCall call);
+ partial void Modify_GetNotificationChannelApiCall(ref gaxgrpc::ApiCall call);
+ partial void Modify_CreateNotificationChannelApiCall(ref gaxgrpc::ApiCall call);
+ partial void Modify_UpdateNotificationChannelApiCall(ref gaxgrpc::ApiCall call);
+ partial void Modify_DeleteNotificationChannelApiCall(ref gaxgrpc::ApiCall call);
+ partial void Modify_SendNotificationChannelVerificationCodeApiCall(ref gaxgrpc::ApiCall call);
+ partial void Modify_GetNotificationChannelVerificationCodeApiCall(ref gaxgrpc::ApiCall call);
+ partial void Modify_VerifyNotificationChannelApiCall(ref gaxgrpc::ApiCall call);
+ partial void OnConstruction(NotificationChannelService.NotificationChannelServiceClient grpcClient, NotificationChannelServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);
+
+ ///
+ /// The underlying gRPC NotificationChannelService client.
+ ///
+ public override NotificationChannelService.NotificationChannelServiceClient GrpcClient { get; }
+
+ // Partial methods called on each request.
+ // Allows per-RPC-call modification to the request and CallSettings objects,
+ // before the underlying RPC is performed.
+ partial void Modify_ListNotificationChannelDescriptorsRequest(ref ListNotificationChannelDescriptorsRequest request, ref gaxgrpc::CallSettings settings);
+ partial void Modify_GetNotificationChannelDescriptorRequest(ref GetNotificationChannelDescriptorRequest request, ref gaxgrpc::CallSettings settings);
+ partial void Modify_ListNotificationChannelsRequest(ref ListNotificationChannelsRequest request, ref gaxgrpc::CallSettings settings);
+ partial void Modify_GetNotificationChannelRequest(ref GetNotificationChannelRequest request, ref gaxgrpc::CallSettings settings);
+ partial void Modify_CreateNotificationChannelRequest(ref CreateNotificationChannelRequest request, ref gaxgrpc::CallSettings settings);
+ partial void Modify_UpdateNotificationChannelRequest(ref UpdateNotificationChannelRequest request, ref gaxgrpc::CallSettings settings);
+ partial void Modify_DeleteNotificationChannelRequest(ref DeleteNotificationChannelRequest request, ref gaxgrpc::CallSettings settings);
+ partial void Modify_SendNotificationChannelVerificationCodeRequest(ref SendNotificationChannelVerificationCodeRequest request, ref gaxgrpc::CallSettings settings);
+ partial void Modify_GetNotificationChannelVerificationCodeRequest(ref GetNotificationChannelVerificationCodeRequest request, ref gaxgrpc::CallSettings settings);
+ partial void Modify_VerifyNotificationChannelRequest(ref VerifyNotificationChannelRequest request, ref gaxgrpc::CallSettings settings);
+
+ ///
+ /// Lists the descriptors for supported channel types. The use of descriptors
+ /// makes it possible for new channel types to be dynamically added.
+ ///
+ ///
+ /// The request object containing all of the parameters for the API call.
+ ///
+ ///
+ /// If not null, applies overrides to this RPC call.
+ ///
+ ///
+ /// A pageable asynchronous sequence of resources.
+ ///
+ public override gax::PagedAsyncEnumerable ListNotificationChannelDescriptorsAsync(
+ ListNotificationChannelDescriptorsRequest request,
+ gaxgrpc::CallSettings callSettings = null)
+ {
+ Modify_ListNotificationChannelDescriptorsRequest(ref request, ref callSettings);
+ return new gaxgrpc::GrpcPagedAsyncEnumerable(_callListNotificationChannelDescriptors, request, callSettings);
+ }
+
+ ///
+ /// Lists the descriptors for supported channel types. The use of descriptors
+ /// makes it possible for new channel types to be dynamically added.
+ ///
+ ///
+ /// The request object containing all of the parameters for the API call.
+ ///
+ ///
+ /// If not null, applies overrides to this RPC call.
+ ///
+ ///
+ /// A pageable sequence of resources.
+ ///
+ public override gax::PagedEnumerable ListNotificationChannelDescriptors(
+ ListNotificationChannelDescriptorsRequest request,
+ gaxgrpc::CallSettings callSettings = null)
+ {
+ Modify_ListNotificationChannelDescriptorsRequest(ref request, ref callSettings);
+ return new gaxgrpc::GrpcPagedEnumerable(_callListNotificationChannelDescriptors, request, callSettings);
+ }
+
+ ///
+ /// Gets a single channel descriptor. The descriptor indicates which fields
+ /// are expected / permitted for a notification channel of the given type.
+ ///
+ ///
+ /// The request object containing all of the parameters for the API call.
+ ///
+ ///
+ /// If not null, applies overrides to this RPC call.
+ ///
+ ///
+ /// A Task containing the RPC response.
+ ///
+ public override stt::Task GetNotificationChannelDescriptorAsync(
+ GetNotificationChannelDescriptorRequest request,
+ gaxgrpc::CallSettings callSettings = null)
+ {
+ Modify_GetNotificationChannelDescriptorRequest(ref request, ref callSettings);
+ return _callGetNotificationChannelDescriptor.Async(request, callSettings);
+ }
+
+ ///
+ /// Gets a single channel descriptor. The descriptor indicates which fields
+ /// are expected / permitted for a notification channel of the given type.
+ ///
+ ///
+ /// The request object containing all of the parameters for the API call.
+ ///
+ ///
+ /// If not null, applies overrides to this RPC call.
+ ///
+ ///
+ /// The RPC response.
+ ///
+ public override NotificationChannelDescriptor GetNotificationChannelDescriptor(
+ GetNotificationChannelDescriptorRequest request,
+ gaxgrpc::CallSettings callSettings = null)
+ {
+ Modify_GetNotificationChannelDescriptorRequest(ref request, ref callSettings);
+ return _callGetNotificationChannelDescriptor.Sync(request, callSettings);
+ }
+
+ ///
+ /// Lists the notification channels that have been created for the project.
+ ///
+ ///
/// The request object containing all of the parameters for the API call.
///
///
@@ -2364,6 +3284,169 @@ public NotificationChannelServiceClientImpl(NotificationChannelService.Notificat
_callDeleteNotificationChannel.Sync(request, callSettings);
}
+ ///
+ /// Causes a verification code to be delivered to the channel. The code
+ /// can then be supplied in `VerifyNotificationChannel` to verify the channel.
+ ///
+ ///
+ /// The request object containing all of the parameters for the API call.
+ ///
+ ///
+ /// If not null, applies overrides to this RPC call.
+ ///
+ ///
+ /// A Task that completes when the RPC has completed.
+ ///
+ public override stt::Task SendNotificationChannelVerificationCodeAsync(
+ SendNotificationChannelVerificationCodeRequest request,
+ gaxgrpc::CallSettings callSettings = null)
+ {
+ Modify_SendNotificationChannelVerificationCodeRequest(ref request, ref callSettings);
+ return _callSendNotificationChannelVerificationCode.Async(request, callSettings);
+ }
+
+ ///
+ /// Causes a verification code to be delivered to the channel. The code
+ /// can then be supplied in `VerifyNotificationChannel` to verify the channel.
+ ///
+ ///
+ /// The request object containing all of the parameters for the API call.
+ ///
+ ///
+ /// If not null, applies overrides to this RPC call.
+ ///
+ public override void SendNotificationChannelVerificationCode(
+ SendNotificationChannelVerificationCodeRequest request,
+ gaxgrpc::CallSettings callSettings = null)
+ {
+ Modify_SendNotificationChannelVerificationCodeRequest(ref request, ref callSettings);
+ _callSendNotificationChannelVerificationCode.Sync(request, callSettings);
+ }
+
+ ///
+ /// Requests a verification code for an already verified channel that can then
+ /// be used in a call to VerifyNotificationChannel() on a different channel
+ /// with an equivalent identity in the same or in a different project. This
+ /// makes it possible to copy a channel between projects without requiring
+ /// manual reverification of the channel. If the channel is not in the
+ /// verified state, this method will fail (in other words, this may only be
+ /// used if the SendNotificationChannelVerificationCode and
+ /// VerifyNotificationChannel paths have already been used to put the given
+ /// channel into the verified state).
+ ///
+ /// There is no guarantee that the verification codes returned by this method
+ /// will be of a similar structure or form as the ones that are delivered
+ /// to the channel via SendNotificationChannelVerificationCode; while
+ /// VerifyNotificationChannel() will recognize both the codes delivered via
+ /// SendNotificationChannelVerificationCode() and returned from
+ /// GetNotificationChannelVerificationCode(), it is typically the case that
+ /// the verification codes delivered via
+ /// SendNotificationChannelVerificationCode() will be shorter and also
+ /// have a shorter expiration (e.g. codes such as "G-123456") whereas
+ /// GetVerificationCode() will typically return a much longer, websafe base
+ /// 64 encoded string that has a longer expiration time.
+ ///
+ ///
+ /// The request object containing all of the parameters for the API call.
+ ///
+ ///
+ /// If not null, applies overrides to this RPC call.
+ ///
+ ///
+ /// A Task containing the RPC response.
+ ///
+ public override stt::Task GetNotificationChannelVerificationCodeAsync(
+ GetNotificationChannelVerificationCodeRequest request,
+ gaxgrpc::CallSettings callSettings = null)
+ {
+ Modify_GetNotificationChannelVerificationCodeRequest(ref request, ref callSettings);
+ return _callGetNotificationChannelVerificationCode.Async(request, callSettings);
+ }
+
+ ///
+ /// Requests a verification code for an already verified channel that can then
+ /// be used in a call to VerifyNotificationChannel() on a different channel
+ /// with an equivalent identity in the same or in a different project. This
+ /// makes it possible to copy a channel between projects without requiring
+ /// manual reverification of the channel. If the channel is not in the
+ /// verified state, this method will fail (in other words, this may only be
+ /// used if the SendNotificationChannelVerificationCode and
+ /// VerifyNotificationChannel paths have already been used to put the given
+ /// channel into the verified state).
+ ///
+ /// There is no guarantee that the verification codes returned by this method
+ /// will be of a similar structure or form as the ones that are delivered
+ /// to the channel via SendNotificationChannelVerificationCode; while
+ /// VerifyNotificationChannel() will recognize both the codes delivered via
+ /// SendNotificationChannelVerificationCode() and returned from
+ /// GetNotificationChannelVerificationCode(), it is typically the case that
+ /// the verification codes delivered via
+ /// SendNotificationChannelVerificationCode() will be shorter and also
+ /// have a shorter expiration (e.g. codes such as "G-123456") whereas
+ /// GetVerificationCode() will typically return a much longer, websafe base
+ /// 64 encoded string that has a longer expiration time.
+ ///
+ ///
+ /// The request object containing all of the parameters for the API call.
+ ///
+ ///
+ /// If not null, applies overrides to this RPC call.
+ ///
+ ///
+ /// The RPC response.
+ ///
+ public override GetNotificationChannelVerificationCodeResponse GetNotificationChannelVerificationCode(
+ GetNotificationChannelVerificationCodeRequest request,
+ gaxgrpc::CallSettings callSettings = null)
+ {
+ Modify_GetNotificationChannelVerificationCodeRequest(ref request, ref callSettings);
+ return _callGetNotificationChannelVerificationCode.Sync(request, callSettings);
+ }
+
+ ///
+ /// Verifies a `NotificationChannel` by proving receipt of the code
+ /// delivered to the channel as a result of calling
+ /// `SendNotificationChannelVerificationCode`.
+ ///
+ ///
+ /// The request object containing all of the parameters for the API call.
+ ///
+ ///
+ /// If not null, applies overrides to this RPC call.
+ ///
+ ///
+ /// A Task containing the RPC response.
+ ///
+ public override stt::Task VerifyNotificationChannelAsync(
+ VerifyNotificationChannelRequest request,
+ gaxgrpc::CallSettings callSettings = null)
+ {
+ Modify_VerifyNotificationChannelRequest(ref request, ref callSettings);
+ return _callVerifyNotificationChannel.Async(request, callSettings);
+ }
+
+ ///
+ /// Verifies a `NotificationChannel` by proving receipt of the code
+ /// delivered to the channel as a result of calling
+ /// `SendNotificationChannelVerificationCode`.
+ ///
+ ///
+ /// The request object containing all of the parameters for the API call.
+ ///
+ ///
+ /// If not null, applies overrides to this RPC call.
+ ///
+ ///
+ /// The RPC response.
+ ///
+ public override NotificationChannel VerifyNotificationChannel(
+ VerifyNotificationChannelRequest request,
+ gaxgrpc::CallSettings callSettings = null)
+ {
+ Modify_VerifyNotificationChannelRequest(ref request, ref callSettings);
+ return _callVerifyNotificationChannel.Sync(request, callSettings);
+ }
+
}
// Partial classes to enable page-streaming