# Class NotificationChannelServiceClient (3.94.0)

3.94.0 (latest) 3.92.0 3.89.0 3.88.0 3.86.0 3.84.0 3.83.0 3.81.0 3.79.0 3.77.0 3.76.0 3.75.0 3.74.0 3.73.0 3.71.0 3.69.0 3.68.0 3.65.0 3.64.0 3.63.0 3.61.0 3.60.0 3.59.0 3.58.0 3.57.0 3.56.0 3.55.0 3.54.0 3.53.0 3.52.0 3.50.0 3.49.0 3.48.0 3.47.0 3.46.0 3.45.0 3.44.0 3.43.0 3.42.0 3.41.0 3.40.0 3.38.0 3.37.0 3.36.0 3.35.0 3.34.0 3.33.0 3.32.0 3.31.0 3.30.0 3.29.0 3.28.0 3.25.0 3.24.0 3.23.0 3.22.0 3.21.0 3.20.0 3.19.0 3.18.0 3.17.0 3.16.0 3.15.0 3.14.0 3.13.0 3.12.0 3.10.0 3.9.0 3.8.0 3.7.0 3.6.0 3.5.0 3.4.6 3.3.6 3.2.10

|---|---|
| [GitHub Repository](https://github.com/googleapis/google-cloud-java/tree/main/java-monitoring/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/NotificationChannelServiceClient.java) | [Product Reference](https://cloud.google.com/monitoring/docs) |

Service Description: The Notification Channel API provides access to configuration that controls
how messages related to incidents are sent.

This class provides the ability to make remote calls to the backing service through method
calls that map to API methods. Sample code to get started:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       NotificationChannelDescriptorName name =
           NotificationChannelDescriptorName.ofProjectChannelDescriptorName(
               "[PROJECT]", "[CHANNEL_DESCRIPTOR]");
       NotificationChannelDescriptor response =
           notificationChannelServiceClient.getNotificationChannelDescriptor(name);
     }
     
Note: close() needs to be called on the NotificationChannelServiceClient object to clean up
resources such as threads. In the example above, try-with-resources is used, which automatically
calls close().

| Method | Description | Method Variants |
|---|---|---|
| ListNotificationChannelDescriptors | Lists the descriptors for supported channel types. The use of descriptors makes it possible for new channel types to be dynamically added. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listNotificationChannelDescriptors(ListNotificationChannelDescriptorsRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - listNotificationChannelDescriptors(ResourceName name) - listNotificationChannelDescriptors(OrganizationName name) - listNotificationChannelDescriptors(ProjectName name) - listNotificationChannelDescriptors(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - listNotificationChannelDescriptorsPagedCallable() - listNotificationChannelDescriptorsCallable() |
| GetNotificationChannelDescriptor | Gets a single channel descriptor. The descriptor indicates which fields are expected / permitted for a notification channel of the given type. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getNotificationChannelDescriptor(GetNotificationChannelDescriptorRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - getNotificationChannelDescriptor(NotificationChannelDescriptorName name) - getNotificationChannelDescriptor(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - getNotificationChannelDescriptorCallable() |
| ListNotificationChannels | Lists the notification channels that have been created for the project. To list the types of notification channels that are supported, use the `ListNotificationChannelDescriptors` method. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listNotificationChannels(ListNotificationChannelsRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - listNotificationChannels(ResourceName name) - listNotificationChannels(OrganizationName name) - listNotificationChannels(ProjectName name) - listNotificationChannels(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - listNotificationChannelsPagedCallable() - listNotificationChannelsCallable() |
| GetNotificationChannel | Gets a single notification channel. The channel includes the relevant configuration details with which the channel was created. However, the response may truncate or omit passwords, API keys, or other private key matter and thus the response may not be 100% identical to the information that was supplied in the call to the create method. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getNotificationChannel(GetNotificationChannelRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - getNotificationChannel(NotificationChannelName name) - getNotificationChannel(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - getNotificationChannelCallable() |
| CreateNotificationChannel | Creates a new notification channel, representing a single notification endpoint such as an email address, SMS number, or PagerDuty service. Design your application to single-thread API calls that modify the state of notification channels in a single project. This includes calls to CreateNotificationChannel, DeleteNotificationChannel and UpdateNotificationChannel. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - createNotificationChannel(CreateNotificationChannelRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - createNotificationChannel(ResourceName name, NotificationChannel notificationChannel) - createNotificationChannel(OrganizationName name, NotificationChannel notificationChannel) - createNotificationChannel(ProjectName name, NotificationChannel notificationChannel) - createNotificationChannel(String name, NotificationChannel notificationChannel) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - createNotificationChannelCallable() |
| UpdateNotificationChannel | Updates a notification channel. Fields not specified in the field mask remain unchanged. Design your application to single-thread API calls that modify the state of notification channels in a single project. This includes calls to CreateNotificationChannel, DeleteNotificationChannel and UpdateNotificationChannel. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - updateNotificationChannel(UpdateNotificationChannelRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - updateNotificationChannel(FieldMask updateMask, NotificationChannel notificationChannel) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - updateNotificationChannelCallable() |
| DeleteNotificationChannel | Deletes a notification channel. Design your application to single-thread API calls that modify the state of notification channels in a single project. This includes calls to CreateNotificationChannel, DeleteNotificationChannel and UpdateNotificationChannel. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - deleteNotificationChannel(DeleteNotificationChannelRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - deleteNotificationChannel(NotificationChannelName name, boolean force) - deleteNotificationChannel(String name, boolean force) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - deleteNotificationChannelCallable() |
| SendNotificationChannelVerificationCode | Causes a verification code to be delivered to the channel. The code can then be supplied in `VerifyNotificationChannel` to verify the channel. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - sendNotificationChannelVerificationCode(SendNotificationChannelVerificationCodeRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - sendNotificationChannelVerificationCode(NotificationChannelName name) - sendNotificationChannelVerificationCode(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - sendNotificationChannelVerificationCodeCallable() |
| GetNotificationChannelVerificationCode | 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. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getNotificationChannelVerificationCode(GetNotificationChannelVerificationCodeRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - getNotificationChannelVerificationCode(NotificationChannelName name) - getNotificationChannelVerificationCode(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - getNotificationChannelVerificationCodeCallable() |
| VerifyNotificationChannel | Verifies a `NotificationChannel` by proving receipt of the code delivered to the channel as a result of calling `SendNotificationChannelVerificationCode`. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - verifyNotificationChannel(VerifyNotificationChannelRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - verifyNotificationChannel(NotificationChannelName name, String code) - verifyNotificationChannel(String name, String code) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - verifyNotificationChannelCallable() |
[Methods]

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with
these names, this class includes a format method for each type of name, and additionally a parse
method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of
NotificationChannelServiceSettings to create(). For example:

To customize credentials:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     NotificationChannelServiceSettings notificationChannelServiceSettings =
         NotificationChannelServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
             .build();
     NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create(notificationChannelServiceSettings);
     
To customize the endpoint:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     NotificationChannelServiceSettings notificationChannelServiceSettings =
         NotificationChannelServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create(notificationChannelServiceSettings);
     
Please refer to the GitHub repository's samples for more quickstart code snippets.

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> NotificationChannelServiceClient

## Static Methods

### create()

    public static final NotificationChannelServiceClient create()

Constructs an instance of NotificationChannelServiceClient with default settings.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.cloud.monitoring.v3.NotificationChannelServiceClient` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### create(NotificationChannelServiceSettings settings)

    public static final NotificationChannelServiceClient create(NotificationChannelServiceSettings settings)

Constructs an instance of NotificationChannelServiceClient, using the given settings. The
channels are created based on the settings passed in, or defaults for any settings that are not
set.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `settings` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.cloud.monitoring.v3.NotificationChannelServiceSettings` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.cloud.monitoring.v3.NotificationChannelServiceClient` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### create(NotificationChannelServiceStub stub)

    public static final NotificationChannelServiceClient create(NotificationChannelServiceStub stub)

Constructs an instance of NotificationChannelServiceClient, using the given stub for making
calls. This is for advanced usage - prefer using create(NotificationChannelServiceSettings).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `stub` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.cloud.monitoring.v3.stub.NotificationChannelServiceStub` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.cloud.monitoring.v3.NotificationChannelServiceClient` |   |

## Constructors

### NotificationChannelServiceClient(NotificationChannelServiceSettings settings)

    protected NotificationChannelServiceClient(NotificationChannelServiceSettings settings)

Constructs an instance of NotificationChannelServiceClient, using the given settings. This is
protected so that it is easy to make a subclass, but otherwise, the static factory methods
should be preferred.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `settings` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.cloud.monitoring.v3.NotificationChannelServiceSettings` |

### NotificationChannelServiceClient(NotificationChannelServiceStub stub)

    protected NotificationChannelServiceClient(NotificationChannelServiceStub stub)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `stub` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.cloud.monitoring.v3.stub.NotificationChannelServiceStub` |

## Methods

### awaitTermination(long duration, TimeUnit unit)

    public boolean awaitTermination(long duration, TimeUnit unit)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `duration` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |
| `unit` | `https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html` |   |

### close()

    public final void close()

### createNotificationChannel(ResourceName name, NotificationChannel notificationChannel)

    public final NotificationChannel createNotificationChannel(ResourceName name, NotificationChannel notificationChannel)

Creates a new notification channel, representing a single notification endpoint such as an
email address, SMS number, or PagerDuty service.

Design your application to single-thread API calls that modify the state of notification
channels in a single project. This includes calls to CreateNotificationChannel,
DeleteNotificationChannel and UpdateNotificationChannel.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       ResourceName name = ResourceName.of("[FOLDER]");
       NotificationChannel notificationChannel = NotificationChannel.newBuilder().build();
       NotificationChannel response =
           notificationChannelServiceClient.createNotificationChannel(name, notificationChannel);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `com.google.api.resourcenames.ResourceName` Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on which to execute the request. The format is: projects/\[PROJECT_ID_OR_NUMBER\] This names the container into which the channel will be written, this does not name the newly created channel. The resulting channel's name will have a normalized version of this field as a prefix, but will add `/notificationChannels/[CHANNEL_ID]` to identify the channel. |
| `notificationChannel` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.NotificationChannel` Required. The definition of the `NotificationChannel` to create. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.NotificationChannel` |   |

### createNotificationChannel(CreateNotificationChannelRequest request)

    public final NotificationChannel createNotificationChannel(CreateNotificationChannelRequest request)

Creates a new notification channel, representing a single notification endpoint such as an
email address, SMS number, or PagerDuty service.

Design your application to single-thread API calls that modify the state of notification
channels in a single project. This includes calls to CreateNotificationChannel,
DeleteNotificationChannel and UpdateNotificationChannel.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       CreateNotificationChannelRequest request =
           CreateNotificationChannelRequest.newBuilder()
               .setName(ProjectName.of("[PROJECT]").toString())
               .setNotificationChannel(NotificationChannel.newBuilder().build())
               .build();
       NotificationChannel response =
           notificationChannelServiceClient.createNotificationChannel(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.CreateNotificationChannelRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.NotificationChannel` |   |

### createNotificationChannel(OrganizationName name, NotificationChannel notificationChannel)

    public final NotificationChannel createNotificationChannel(OrganizationName name, NotificationChannel notificationChannel)

Creates a new notification channel, representing a single notification endpoint such as an
email address, SMS number, or PagerDuty service.

Design your application to single-thread API calls that modify the state of notification
channels in a single project. This includes calls to CreateNotificationChannel,
DeleteNotificationChannel and UpdateNotificationChannel.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       OrganizationName name = OrganizationName.of("[ORGANIZATION]");
       NotificationChannel notificationChannel = NotificationChannel.newBuilder().build();
       NotificationChannel response =
           notificationChannelServiceClient.createNotificationChannel(name, notificationChannel);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.OrganizationName` Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on which to execute the request. The format is: projects/\[PROJECT_ID_OR_NUMBER\] This names the container into which the channel will be written, this does not name the newly created channel. The resulting channel's name will have a normalized version of this field as a prefix, but will add `/notificationChannels/[CHANNEL_ID]` to identify the channel. |
| `notificationChannel` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.NotificationChannel` Required. The definition of the `NotificationChannel` to create. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.NotificationChannel` |   |

### createNotificationChannel(ProjectName name, NotificationChannel notificationChannel)

    public final NotificationChannel createNotificationChannel(ProjectName name, NotificationChannel notificationChannel)

Creates a new notification channel, representing a single notification endpoint such as an
email address, SMS number, or PagerDuty service.

Design your application to single-thread API calls that modify the state of notification
channels in a single project. This includes calls to CreateNotificationChannel,
DeleteNotificationChannel and UpdateNotificationChannel.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       ProjectName name = ProjectName.of("[PROJECT]");
       NotificationChannel notificationChannel = NotificationChannel.newBuilder().build();
       NotificationChannel response =
           notificationChannelServiceClient.createNotificationChannel(name, notificationChannel);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.ProjectName` Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on which to execute the request. The format is: projects/\[PROJECT_ID_OR_NUMBER\] This names the container into which the channel will be written, this does not name the newly created channel. The resulting channel's name will have a normalized version of this field as a prefix, but will add `/notificationChannels/[CHANNEL_ID]` to identify the channel. |
| `notificationChannel` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.NotificationChannel` Required. The definition of the `NotificationChannel` to create. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.NotificationChannel` |   |

### createNotificationChannel(String name, NotificationChannel notificationChannel)

    public final NotificationChannel createNotificationChannel(String name, NotificationChannel notificationChannel)

Creates a new notification channel, representing a single notification endpoint such as an
email address, SMS number, or PagerDuty service.

Design your application to single-thread API calls that modify the state of notification
channels in a single project. This includes calls to CreateNotificationChannel,
DeleteNotificationChannel and UpdateNotificationChannel.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       String name = ProjectName.of("[PROJECT]").toString();
       NotificationChannel notificationChannel = NotificationChannel.newBuilder().build();
       NotificationChannel response =
           notificationChannelServiceClient.createNotificationChannel(name, notificationChannel);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on which to execute the request. The format is: projects/\[PROJECT_ID_OR_NUMBER\] This names the container into which the channel will be written, this does not name the newly created channel. The resulting channel's name will have a normalized version of this field as a prefix, but will add `/notificationChannels/[CHANNEL_ID]` to identify the channel. |
| `notificationChannel` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.NotificationChannel` Required. The definition of the `NotificationChannel` to create. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.NotificationChannel` |   |

### createNotificationChannelCallable()

    public final UnaryCallable<CreateNotificationChannelRequest,NotificationChannel> createNotificationChannelCallable()

Creates a new notification channel, representing a single notification endpoint such as an
email address, SMS number, or PagerDuty service.

Design your application to single-thread API calls that modify the state of notification
channels in a single project. This includes calls to CreateNotificationChannel,
DeleteNotificationChannel and UpdateNotificationChannel.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       CreateNotificationChannelRequest request =
           CreateNotificationChannelRequest.newBuilder()
               .setName(ProjectName.of("[PROJECT]").toString())
               .setNotificationChannel(NotificationChannel.newBuilder().build())
               .build();
       ApiFuture<NotificationChannel> future =
           notificationChannelServiceClient.createNotificationChannelCallable().futureCall(request);
       // Do something.
       NotificationChannel response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.CreateNotificationChannelRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.NotificationChannel>` |   |

### deleteNotificationChannel(DeleteNotificationChannelRequest request)

    public final void deleteNotificationChannel(DeleteNotificationChannelRequest request)

Deletes a notification channel.

Design your application to single-thread API calls that modify the state of notification
channels in a single project. This includes calls to CreateNotificationChannel,
DeleteNotificationChannel and UpdateNotificationChannel.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       DeleteNotificationChannelRequest request =
           DeleteNotificationChannelRequest.newBuilder()
               .setName(
                   NotificationChannelName.ofProjectNotificationChannelName(
                           "[PROJECT]", "[NOTIFICATION_CHANNEL]")
                       .toString())
               .setForce(true)
               .build();
       notificationChannelServiceClient.deleteNotificationChannel(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.DeleteNotificationChannelRequest` The request object containing all of the parameters for the API call. |

### deleteNotificationChannel(NotificationChannelName name, boolean force)

    public final void deleteNotificationChannel(NotificationChannelName name, boolean force)

Deletes a notification channel.

Design your application to single-thread API calls that modify the state of notification
channels in a single project. This includes calls to CreateNotificationChannel,
DeleteNotificationChannel and UpdateNotificationChannel.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       NotificationChannelName name =
           NotificationChannelName.ofProjectNotificationChannelName(
               "[PROJECT]", "[NOTIFICATION_CHANNEL]");
       boolean force = true;
       notificationChannelServiceClient.deleteNotificationChannel(name, force);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.NotificationChannelName` Required. The channel for which to execute the request. The format is: projects/\[PROJECT_ID_OR_NUMBER\]/notificationChannels/\[CHANNEL_ID\] |
| `force` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` If true, the notification channel will be deleted regardless of its use in alert policies (the policies will be updated to remove the channel). If false, this operation will fail if the notification channel is referenced by existing alerting policies. |

### deleteNotificationChannel(String name, boolean force)

    public final void deleteNotificationChannel(String name, boolean force)

Deletes a notification channel.

Design your application to single-thread API calls that modify the state of notification
channels in a single project. This includes calls to CreateNotificationChannel,
DeleteNotificationChannel and UpdateNotificationChannel.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       String name =
           NotificationChannelName.ofProjectNotificationChannelName(
                   "[PROJECT]", "[NOTIFICATION_CHANNEL]")
               .toString();
       boolean force = true;
       notificationChannelServiceClient.deleteNotificationChannel(name, force);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The channel for which to execute the request. The format is: projects/\[PROJECT_ID_OR_NUMBER\]/notificationChannels/\[CHANNEL_ID\] |
| `force` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` If true, the notification channel will be deleted regardless of its use in alert policies (the policies will be updated to remove the channel). If false, this operation will fail if the notification channel is referenced by existing alerting policies. |

### deleteNotificationChannelCallable()

    public final UnaryCallable<DeleteNotificationChannelRequest,Empty> deleteNotificationChannelCallable()

Deletes a notification channel.

Design your application to single-thread API calls that modify the state of notification
channels in a single project. This includes calls to CreateNotificationChannel,
DeleteNotificationChannel and UpdateNotificationChannel.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       DeleteNotificationChannelRequest request =
           DeleteNotificationChannelRequest.newBuilder()
               .setName(
                   NotificationChannelName.ofProjectNotificationChannelName(
                           "[PROJECT]", "[NOTIFICATION_CHANNEL]")
                       .toString())
               .setForce(true)
               .build();
       ApiFuture<Empty> future =
           notificationChannelServiceClient.deleteNotificationChannelCallable().futureCall(request);
       // Do something.
       future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.DeleteNotificationChannelRequest,https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html>` |   |

### getNotificationChannel(GetNotificationChannelRequest request)

    public final NotificationChannel getNotificationChannel(GetNotificationChannelRequest request)

Gets a single notification channel. The channel includes the relevant configuration details
with which the channel was created. However, the response may truncate or omit passwords, API
keys, or other private key matter and thus the response may not be 100% identical to the
information that was supplied in the call to the create method.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       GetNotificationChannelRequest request =
           GetNotificationChannelRequest.newBuilder()
               .setName(
                   NotificationChannelName.ofProjectNotificationChannelName(
                           "[PROJECT]", "[NOTIFICATION_CHANNEL]")
                       .toString())
               .build();
       NotificationChannel response =
           notificationChannelServiceClient.getNotificationChannel(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.GetNotificationChannelRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.NotificationChannel` |   |

### getNotificationChannel(NotificationChannelName name)

    public final NotificationChannel getNotificationChannel(NotificationChannelName name)

Gets a single notification channel. The channel includes the relevant configuration details
with which the channel was created. However, the response may truncate or omit passwords, API
keys, or other private key matter and thus the response may not be 100% identical to the
information that was supplied in the call to the create method.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       NotificationChannelName name =
           NotificationChannelName.ofProjectNotificationChannelName(
               "[PROJECT]", "[NOTIFICATION_CHANNEL]");
       NotificationChannel response = notificationChannelServiceClient.getNotificationChannel(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.NotificationChannelName` Required. The channel for which to execute the request. The format is: projects/\[PROJECT_ID_OR_NUMBER\]/notificationChannels/\[CHANNEL_ID\] |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.NotificationChannel` |   |

### getNotificationChannel(String name)

    public final NotificationChannel getNotificationChannel(String name)

Gets a single notification channel. The channel includes the relevant configuration details
with which the channel was created. However, the response may truncate or omit passwords, API
keys, or other private key matter and thus the response may not be 100% identical to the
information that was supplied in the call to the create method.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       String name =
           NotificationChannelName.ofProjectNotificationChannelName(
                   "[PROJECT]", "[NOTIFICATION_CHANNEL]")
               .toString();
       NotificationChannel response = notificationChannelServiceClient.getNotificationChannel(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The channel for which to execute the request. The format is: projects/\[PROJECT_ID_OR_NUMBER\]/notificationChannels/\[CHANNEL_ID\] |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.NotificationChannel` |   |

### getNotificationChannelCallable()

    public final UnaryCallable<GetNotificationChannelRequest,NotificationChannel> getNotificationChannelCallable()

Gets a single notification channel. The channel includes the relevant configuration details
with which the channel was created. However, the response may truncate or omit passwords, API
keys, or other private key matter and thus the response may not be 100% identical to the
information that was supplied in the call to the create method.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       GetNotificationChannelRequest request =
           GetNotificationChannelRequest.newBuilder()
               .setName(
                   NotificationChannelName.ofProjectNotificationChannelName(
                           "[PROJECT]", "[NOTIFICATION_CHANNEL]")
                       .toString())
               .build();
       ApiFuture<NotificationChannel> future =
           notificationChannelServiceClient.getNotificationChannelCallable().futureCall(request);
       // Do something.
       NotificationChannel response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.GetNotificationChannelRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.NotificationChannel>` |   |

### getNotificationChannelDescriptor(GetNotificationChannelDescriptorRequest request)

    public final NotificationChannelDescriptor getNotificationChannelDescriptor(GetNotificationChannelDescriptorRequest request)

Gets a single channel descriptor. The descriptor indicates which fields are expected /
permitted for a notification channel of the given type.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       GetNotificationChannelDescriptorRequest request =
           GetNotificationChannelDescriptorRequest.newBuilder()
               .setName(
                   NotificationChannelDescriptorName.ofProjectChannelDescriptorName(
                           "[PROJECT]", "[CHANNEL_DESCRIPTOR]")
                       .toString())
               .build();
       NotificationChannelDescriptor response =
           notificationChannelServiceClient.getNotificationChannelDescriptor(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.GetNotificationChannelDescriptorRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.NotificationChannelDescriptor` |   |

### getNotificationChannelDescriptor(NotificationChannelDescriptorName name)

    public final NotificationChannelDescriptor getNotificationChannelDescriptor(NotificationChannelDescriptorName name)

Gets a single channel descriptor. The descriptor indicates which fields are expected /
permitted for a notification channel of the given type.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       NotificationChannelDescriptorName name =
           NotificationChannelDescriptorName.ofProjectChannelDescriptorName(
               "[PROJECT]", "[CHANNEL_DESCRIPTOR]");
       NotificationChannelDescriptor response =
           notificationChannelServiceClient.getNotificationChannelDescriptor(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.NotificationChannelDescriptorName` Required. The channel type for which to execute the request. The format is: projects/\[PROJECT_ID_OR_NUMBER\]/notificationChannelDescriptors/\[CHANNEL_TYPE\] |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.NotificationChannelDescriptor` |   |

### getNotificationChannelDescriptor(String name)

    public final NotificationChannelDescriptor getNotificationChannelDescriptor(String name)

Gets a single channel descriptor. The descriptor indicates which fields are expected /
permitted for a notification channel of the given type.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       String name =
           NotificationChannelDescriptorName.ofProjectChannelDescriptorName(
                   "[PROJECT]", "[CHANNEL_DESCRIPTOR]")
               .toString();
       NotificationChannelDescriptor response =
           notificationChannelServiceClient.getNotificationChannelDescriptor(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The channel type for which to execute the request. The format is: projects/\[PROJECT_ID_OR_NUMBER\]/notificationChannelDescriptors/\[CHANNEL_TYPE\] |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.NotificationChannelDescriptor` |   |

### getNotificationChannelDescriptorCallable()

    public final UnaryCallable<GetNotificationChannelDescriptorRequest,NotificationChannelDescriptor> getNotificationChannelDescriptorCallable()

Gets a single channel descriptor. The descriptor indicates which fields are expected /
permitted for a notification channel of the given type.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       GetNotificationChannelDescriptorRequest request =
           GetNotificationChannelDescriptorRequest.newBuilder()
               .setName(
                   NotificationChannelDescriptorName.ofProjectChannelDescriptorName(
                           "[PROJECT]", "[CHANNEL_DESCRIPTOR]")
                       .toString())
               .build();
       ApiFuture<NotificationChannelDescriptor> future =
           notificationChannelServiceClient
               .getNotificationChannelDescriptorCallable()
               .futureCall(request);
       // Do something.
       NotificationChannelDescriptor response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.GetNotificationChannelDescriptorRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.NotificationChannelDescriptor>` |   |

### getNotificationChannelVerificationCode(GetNotificationChannelVerificationCodeRequest request)

    public final GetNotificationChannelVerificationCodeResponse getNotificationChannelVerificationCode(GetNotificationChannelVerificationCodeRequest request)

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.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       GetNotificationChannelVerificationCodeRequest request =
           GetNotificationChannelVerificationCodeRequest.newBuilder()
               .setName(
                   NotificationChannelName.ofProjectNotificationChannelName(
                           "[PROJECT]", "[NOTIFICATION_CHANNEL]")
                       .toString())
               .setExpireTime(Timestamp.newBuilder().build())
               .build();
       GetNotificationChannelVerificationCodeResponse response =
           notificationChannelServiceClient.getNotificationChannelVerificationCode(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.GetNotificationChannelVerificationCodeRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.GetNotificationChannelVerificationCodeResponse` |   |

### getNotificationChannelVerificationCode(NotificationChannelName name)

    public final GetNotificationChannelVerificationCodeResponse getNotificationChannelVerificationCode(NotificationChannelName name)

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.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       NotificationChannelName name =
           NotificationChannelName.ofProjectNotificationChannelName(
               "[PROJECT]", "[NOTIFICATION_CHANNEL]");
       GetNotificationChannelVerificationCodeResponse response =
           notificationChannelServiceClient.getNotificationChannelVerificationCode(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.NotificationChannelName` Required. 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. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.GetNotificationChannelVerificationCodeResponse` |   |

### getNotificationChannelVerificationCode(String name)

    public final GetNotificationChannelVerificationCodeResponse getNotificationChannelVerificationCode(String name)

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.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       String name =
           NotificationChannelName.ofProjectNotificationChannelName(
                   "[PROJECT]", "[NOTIFICATION_CHANNEL]")
               .toString();
       GetNotificationChannelVerificationCodeResponse response =
           notificationChannelServiceClient.getNotificationChannelVerificationCode(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. 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. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.GetNotificationChannelVerificationCodeResponse` |   |

### getNotificationChannelVerificationCodeCallable()

    public final UnaryCallable<GetNotificationChannelVerificationCodeRequest,GetNotificationChannelVerificationCodeResponse> getNotificationChannelVerificationCodeCallable()

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.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       GetNotificationChannelVerificationCodeRequest request =
           GetNotificationChannelVerificationCodeRequest.newBuilder()
               .setName(
                   NotificationChannelName.ofProjectNotificationChannelName(
                           "[PROJECT]", "[NOTIFICATION_CHANNEL]")
                       .toString())
               .setExpireTime(Timestamp.newBuilder().build())
               .build();
       ApiFuture<GetNotificationChannelVerificationCodeResponse> future =
           notificationChannelServiceClient
               .getNotificationChannelVerificationCodeCallable()
               .futureCall(request);
       // Do something.
       GetNotificationChannelVerificationCodeResponse response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.GetNotificationChannelVerificationCodeRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.GetNotificationChannelVerificationCodeResponse>` |   |

### getSettings()

    public final NotificationChannelServiceSettings getSettings()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.cloud.monitoring.v3.NotificationChannelServiceSettings` |   |

### getStub()

    public NotificationChannelServiceStub getStub()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.cloud.monitoring.v3.stub.NotificationChannelServiceStub` |   |

### isShutdown()

    public boolean isShutdown()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### isTerminated()

    public boolean isTerminated()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### listNotificationChannelDescriptors(ResourceName name)

    public final NotificationChannelServiceClient.ListNotificationChannelDescriptorsPagedResponse listNotificationChannelDescriptors(ResourceName name)

Lists the descriptors for supported channel types. The use of descriptors makes it possible for
new channel types to be dynamically added.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       ResourceName name = ResourceName.of("[FOLDER]");
       for (NotificationChannelDescriptor element :
           notificationChannelServiceClient.listNotificationChannelDescriptors(name).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `com.google.api.resourcenames.ResourceName` Required. The REST resource name of the parent from which to retrieve the notification channel descriptors. The expected syntax is: projects/\[PROJECT_ID_OR_NUMBER\] Note that this [names](https://cloud.google.com/monitoring/api/v3#project_name) the parent container in which to look for the descriptors; to retrieve a single descriptor by name, use the GetNotificationChannelDescriptor operation, instead. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.cloud.monitoring.v3.NotificationChannelServiceClient.ListNotificationChannelDescriptorsPagedResponse` |   |

### listNotificationChannelDescriptors(ListNotificationChannelDescriptorsRequest request)

    public final NotificationChannelServiceClient.ListNotificationChannelDescriptorsPagedResponse listNotificationChannelDescriptors(ListNotificationChannelDescriptorsRequest request)

Lists the descriptors for supported channel types. The use of descriptors makes it possible for
new channel types to be dynamically added.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       ListNotificationChannelDescriptorsRequest request =
           ListNotificationChannelDescriptorsRequest.newBuilder()
               .setName(ProjectName.of("[PROJECT]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       for (NotificationChannelDescriptor element :
           notificationChannelServiceClient
               .listNotificationChannelDescriptors(request)
               .iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.ListNotificationChannelDescriptorsRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.cloud.monitoring.v3.NotificationChannelServiceClient.ListNotificationChannelDescriptorsPagedResponse` |   |

### listNotificationChannelDescriptors(OrganizationName name)

    public final NotificationChannelServiceClient.ListNotificationChannelDescriptorsPagedResponse listNotificationChannelDescriptors(OrganizationName name)

Lists the descriptors for supported channel types. The use of descriptors makes it possible for
new channel types to be dynamically added.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       OrganizationName name = OrganizationName.of("[ORGANIZATION]");
       for (NotificationChannelDescriptor element :
           notificationChannelServiceClient.listNotificationChannelDescriptors(name).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.OrganizationName` Required. The REST resource name of the parent from which to retrieve the notification channel descriptors. The expected syntax is: projects/\[PROJECT_ID_OR_NUMBER\] Note that this [names](https://cloud.google.com/monitoring/api/v3#project_name) the parent container in which to look for the descriptors; to retrieve a single descriptor by name, use the GetNotificationChannelDescriptor operation, instead. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.cloud.monitoring.v3.NotificationChannelServiceClient.ListNotificationChannelDescriptorsPagedResponse` |   |

### listNotificationChannelDescriptors(ProjectName name)

    public final NotificationChannelServiceClient.ListNotificationChannelDescriptorsPagedResponse listNotificationChannelDescriptors(ProjectName name)

Lists the descriptors for supported channel types. The use of descriptors makes it possible for
new channel types to be dynamically added.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       ProjectName name = ProjectName.of("[PROJECT]");
       for (NotificationChannelDescriptor element :
           notificationChannelServiceClient.listNotificationChannelDescriptors(name).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.ProjectName` Required. The REST resource name of the parent from which to retrieve the notification channel descriptors. The expected syntax is: projects/\[PROJECT_ID_OR_NUMBER\] Note that this [names](https://cloud.google.com/monitoring/api/v3#project_name) the parent container in which to look for the descriptors; to retrieve a single descriptor by name, use the GetNotificationChannelDescriptor operation, instead. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.cloud.monitoring.v3.NotificationChannelServiceClient.ListNotificationChannelDescriptorsPagedResponse` |   |

### listNotificationChannelDescriptors(String name)

    public final NotificationChannelServiceClient.ListNotificationChannelDescriptorsPagedResponse listNotificationChannelDescriptors(String name)

Lists the descriptors for supported channel types. The use of descriptors makes it possible for
new channel types to be dynamically added.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       String name = ProjectName.of("[PROJECT]").toString();
       for (NotificationChannelDescriptor element :
           notificationChannelServiceClient.listNotificationChannelDescriptors(name).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The REST resource name of the parent from which to retrieve the notification channel descriptors. The expected syntax is: projects/\[PROJECT_ID_OR_NUMBER\] Note that this [names](https://cloud.google.com/monitoring/api/v3#project_name) the parent container in which to look for the descriptors; to retrieve a single descriptor by name, use the GetNotificationChannelDescriptor operation, instead. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.cloud.monitoring.v3.NotificationChannelServiceClient.ListNotificationChannelDescriptorsPagedResponse` |   |

### listNotificationChannelDescriptorsCallable()

    public final UnaryCallable<ListNotificationChannelDescriptorsRequest,ListNotificationChannelDescriptorsResponse> listNotificationChannelDescriptorsCallable()

Lists the descriptors for supported channel types. The use of descriptors makes it possible for
new channel types to be dynamically added.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       ListNotificationChannelDescriptorsRequest request =
           ListNotificationChannelDescriptorsRequest.newBuilder()
               .setName(ProjectName.of("[PROJECT]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       while (true) {
         ListNotificationChannelDescriptorsResponse response =
             notificationChannelServiceClient
                 .listNotificationChannelDescriptorsCallable()
                 .call(request);
         for (NotificationChannelDescriptor element : response.getChannelDescriptorsList()) {
           // doThingsWith(element);
         }
         String nextPageToken = response.getNextPageToken();
         if (!Strings.isNullOrEmpty(nextPageToken)) {
           request = request.toBuilder().setPageToken(nextPageToken).build();
         } else {
           break;
         }
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.ListNotificationChannelDescriptorsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.ListNotificationChannelDescriptorsResponse>` |   |

### listNotificationChannelDescriptorsPagedCallable()

    public final UnaryCallable<ListNotificationChannelDescriptorsRequest,NotificationChannelServiceClient.ListNotificationChannelDescriptorsPagedResponse> listNotificationChannelDescriptorsPagedCallable()

Lists the descriptors for supported channel types. The use of descriptors makes it possible for
new channel types to be dynamically added.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       ListNotificationChannelDescriptorsRequest request =
           ListNotificationChannelDescriptorsRequest.newBuilder()
               .setName(ProjectName.of("[PROJECT]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       ApiFuture<NotificationChannelDescriptor> future =
           notificationChannelServiceClient
               .listNotificationChannelDescriptorsPagedCallable()
               .futureCall(request);
       // Do something.
       for (NotificationChannelDescriptor element : future.get().iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.ListNotificationChannelDescriptorsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.cloud.monitoring.v3.NotificationChannelServiceClient.ListNotificationChannelDescriptorsPagedResponse>` |   |

### listNotificationChannels(ResourceName name)

    public final NotificationChannelServiceClient.ListNotificationChannelsPagedResponse listNotificationChannels(ResourceName name)

Lists the notification channels that have been created for the project. To list the types of
notification channels that are supported, use the `ListNotificationChannelDescriptors` method.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       ResourceName name = ResourceName.of("[FOLDER]");
       for (NotificationChannel element :
           notificationChannelServiceClient.listNotificationChannels(name).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `com.google.api.resourcenames.ResourceName` Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on which to execute the request. The format is: projects/\[PROJECT_ID_OR_NUMBER\] This names the container in which to look for the notification channels; it does not name a specific channel. To query a specific channel by REST resource name, use the `GetNotificationChannel` operation. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.cloud.monitoring.v3.NotificationChannelServiceClient.ListNotificationChannelsPagedResponse` |   |

### listNotificationChannels(ListNotificationChannelsRequest request)

    public final NotificationChannelServiceClient.ListNotificationChannelsPagedResponse listNotificationChannels(ListNotificationChannelsRequest request)

Lists the notification channels that have been created for the project. To list the types of
notification channels that are supported, use the `ListNotificationChannelDescriptors` method.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       ListNotificationChannelsRequest request =
           ListNotificationChannelsRequest.newBuilder()
               .setName(ProjectName.of("[PROJECT]").toString())
               .setFilter("filter-1274492040")
               .setOrderBy("orderBy-1207110587")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       for (NotificationChannel element :
           notificationChannelServiceClient.listNotificationChannels(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.ListNotificationChannelsRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.cloud.monitoring.v3.NotificationChannelServiceClient.ListNotificationChannelsPagedResponse` |   |

### listNotificationChannels(OrganizationName name)

    public final NotificationChannelServiceClient.ListNotificationChannelsPagedResponse listNotificationChannels(OrganizationName name)

Lists the notification channels that have been created for the project. To list the types of
notification channels that are supported, use the `ListNotificationChannelDescriptors` method.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       OrganizationName name = OrganizationName.of("[ORGANIZATION]");
       for (NotificationChannel element :
           notificationChannelServiceClient.listNotificationChannels(name).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.OrganizationName` Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on which to execute the request. The format is: projects/\[PROJECT_ID_OR_NUMBER\] This names the container in which to look for the notification channels; it does not name a specific channel. To query a specific channel by REST resource name, use the `GetNotificationChannel` operation. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.cloud.monitoring.v3.NotificationChannelServiceClient.ListNotificationChannelsPagedResponse` |   |

### listNotificationChannels(ProjectName name)

    public final NotificationChannelServiceClient.ListNotificationChannelsPagedResponse listNotificationChannels(ProjectName name)

Lists the notification channels that have been created for the project. To list the types of
notification channels that are supported, use the `ListNotificationChannelDescriptors` method.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       ProjectName name = ProjectName.of("[PROJECT]");
       for (NotificationChannel element :
           notificationChannelServiceClient.listNotificationChannels(name).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.ProjectName` Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on which to execute the request. The format is: projects/\[PROJECT_ID_OR_NUMBER\] This names the container in which to look for the notification channels; it does not name a specific channel. To query a specific channel by REST resource name, use the `GetNotificationChannel` operation. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.cloud.monitoring.v3.NotificationChannelServiceClient.ListNotificationChannelsPagedResponse` |   |

### listNotificationChannels(String name)

    public final NotificationChannelServiceClient.ListNotificationChannelsPagedResponse listNotificationChannels(String name)

Lists the notification channels that have been created for the project. To list the types of
notification channels that are supported, use the `ListNotificationChannelDescriptors` method.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       String name = ProjectName.of("[PROJECT]").toString();
       for (NotificationChannel element :
           notificationChannelServiceClient.listNotificationChannels(name).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on which to execute the request. The format is: projects/\[PROJECT_ID_OR_NUMBER\] This names the container in which to look for the notification channels; it does not name a specific channel. To query a specific channel by REST resource name, use the `GetNotificationChannel` operation. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.cloud.monitoring.v3.NotificationChannelServiceClient.ListNotificationChannelsPagedResponse` |   |

### listNotificationChannelsCallable()

    public final UnaryCallable<ListNotificationChannelsRequest,ListNotificationChannelsResponse> listNotificationChannelsCallable()

Lists the notification channels that have been created for the project. To list the types of
notification channels that are supported, use the `ListNotificationChannelDescriptors` method.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       ListNotificationChannelsRequest request =
           ListNotificationChannelsRequest.newBuilder()
               .setName(ProjectName.of("[PROJECT]").toString())
               .setFilter("filter-1274492040")
               .setOrderBy("orderBy-1207110587")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       while (true) {
         ListNotificationChannelsResponse response =
             notificationChannelServiceClient.listNotificationChannelsCallable().call(request);
         for (NotificationChannel element : response.getNotificationChannelsList()) {
           // doThingsWith(element);
         }
         String nextPageToken = response.getNextPageToken();
         if (!Strings.isNullOrEmpty(nextPageToken)) {
           request = request.toBuilder().setPageToken(nextPageToken).build();
         } else {
           break;
         }
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.ListNotificationChannelsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.ListNotificationChannelsResponse>` |   |

### listNotificationChannelsPagedCallable()

    public final UnaryCallable<ListNotificationChannelsRequest,NotificationChannelServiceClient.ListNotificationChannelsPagedResponse> listNotificationChannelsPagedCallable()

Lists the notification channels that have been created for the project. To list the types of
notification channels that are supported, use the `ListNotificationChannelDescriptors` method.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       ListNotificationChannelsRequest request =
           ListNotificationChannelsRequest.newBuilder()
               .setName(ProjectName.of("[PROJECT]").toString())
               .setFilter("filter-1274492040")
               .setOrderBy("orderBy-1207110587")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       ApiFuture<NotificationChannel> future =
           notificationChannelServiceClient
               .listNotificationChannelsPagedCallable()
               .futureCall(request);
       // Do something.
       for (NotificationChannel element : future.get().iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.ListNotificationChannelsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.cloud.monitoring.v3.NotificationChannelServiceClient.ListNotificationChannelsPagedResponse>` |   |

### sendNotificationChannelVerificationCode(NotificationChannelName name)

    public final void sendNotificationChannelVerificationCode(NotificationChannelName name)

Causes a verification code to be delivered to the channel. The code can then be supplied in
`VerifyNotificationChannel` to verify the channel.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       NotificationChannelName name =
           NotificationChannelName.ofProjectNotificationChannelName(
               "[PROJECT]", "[NOTIFICATION_CHANNEL]");
       notificationChannelServiceClient.sendNotificationChannelVerificationCode(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.NotificationChannelName` Required. The notification channel to which to send a verification code. |

### sendNotificationChannelVerificationCode(SendNotificationChannelVerificationCodeRequest request)

    public final void sendNotificationChannelVerificationCode(SendNotificationChannelVerificationCodeRequest request)

Causes a verification code to be delivered to the channel. The code can then be supplied in
`VerifyNotificationChannel` to verify the channel.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       SendNotificationChannelVerificationCodeRequest request =
           SendNotificationChannelVerificationCodeRequest.newBuilder()
               .setName(
                   NotificationChannelName.ofProjectNotificationChannelName(
                           "[PROJECT]", "[NOTIFICATION_CHANNEL]")
                       .toString())
               .build();
       notificationChannelServiceClient.sendNotificationChannelVerificationCode(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.SendNotificationChannelVerificationCodeRequest` The request object containing all of the parameters for the API call. |

### sendNotificationChannelVerificationCode(String name)

    public final void sendNotificationChannelVerificationCode(String name)

Causes a verification code to be delivered to the channel. The code can then be supplied in
`VerifyNotificationChannel` to verify the channel.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       String name =
           NotificationChannelName.ofProjectNotificationChannelName(
                   "[PROJECT]", "[NOTIFICATION_CHANNEL]")
               .toString();
       notificationChannelServiceClient.sendNotificationChannelVerificationCode(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The notification channel to which to send a verification code. |

### sendNotificationChannelVerificationCodeCallable()

    public final UnaryCallable<SendNotificationChannelVerificationCodeRequest,Empty> sendNotificationChannelVerificationCodeCallable()

Causes a verification code to be delivered to the channel. The code can then be supplied in
`VerifyNotificationChannel` to verify the channel.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       SendNotificationChannelVerificationCodeRequest request =
           SendNotificationChannelVerificationCodeRequest.newBuilder()
               .setName(
                   NotificationChannelName.ofProjectNotificationChannelName(
                           "[PROJECT]", "[NOTIFICATION_CHANNEL]")
                       .toString())
               .build();
       ApiFuture<Empty> future =
           notificationChannelServiceClient
               .sendNotificationChannelVerificationCodeCallable()
               .futureCall(request);
       // Do something.
       future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.SendNotificationChannelVerificationCodeRequest,https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html>` |   |

### shutdown()

    public void shutdown()

### shutdownNow()

    public void shutdownNow()

### updateNotificationChannel(UpdateNotificationChannelRequest request)

    public final NotificationChannel updateNotificationChannel(UpdateNotificationChannelRequest request)

Updates a notification channel. Fields not specified in the field mask remain unchanged.

Design your application to single-thread API calls that modify the state of notification
channels in a single project. This includes calls to CreateNotificationChannel,
DeleteNotificationChannel and UpdateNotificationChannel.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       UpdateNotificationChannelRequest request =
           UpdateNotificationChannelRequest.newBuilder()
               .setUpdateMask(FieldMask.newBuilder().build())
               .setNotificationChannel(NotificationChannel.newBuilder().build())
               .build();
       NotificationChannel response =
           notificationChannelServiceClient.updateNotificationChannel(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.UpdateNotificationChannelRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.NotificationChannel` |   |

### updateNotificationChannel(FieldMask updateMask, NotificationChannel notificationChannel)

    public final NotificationChannel updateNotificationChannel(FieldMask updateMask, NotificationChannel notificationChannel)

Updates a notification channel. Fields not specified in the field mask remain unchanged.

Design your application to single-thread API calls that modify the state of notification
channels in a single project. This includes calls to CreateNotificationChannel,
DeleteNotificationChannel and UpdateNotificationChannel.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       FieldMask updateMask = FieldMask.newBuilder().build();
       NotificationChannel notificationChannel = NotificationChannel.newBuilder().build();
       NotificationChannel response =
           notificationChannelServiceClient.updateNotificationChannel(
               updateMask, notificationChannel);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `updateMask` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.FieldMask.html` Optional. The fields to update. |
| `notificationChannel` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.NotificationChannel` Required. A description of the changes to be applied to the specified notification channel. The description must provide a definition for fields to be updated; the names of these fields should also be included in the `update_mask`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.NotificationChannel` |   |

### updateNotificationChannelCallable()

    public final UnaryCallable<UpdateNotificationChannelRequest,NotificationChannel> updateNotificationChannelCallable()

Updates a notification channel. Fields not specified in the field mask remain unchanged.

Design your application to single-thread API calls that modify the state of notification
channels in a single project. This includes calls to CreateNotificationChannel,
DeleteNotificationChannel and UpdateNotificationChannel.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       UpdateNotificationChannelRequest request =
           UpdateNotificationChannelRequest.newBuilder()
               .setUpdateMask(FieldMask.newBuilder().build())
               .setNotificationChannel(NotificationChannel.newBuilder().build())
               .build();
       ApiFuture<NotificationChannel> future =
           notificationChannelServiceClient.updateNotificationChannelCallable().futureCall(request);
       // Do something.
       NotificationChannel response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.UpdateNotificationChannelRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.NotificationChannel>` |   |

### verifyNotificationChannel(NotificationChannelName name, String code)

    public final NotificationChannel verifyNotificationChannel(NotificationChannelName name, String code)

Verifies a `NotificationChannel` by proving receipt of the code delivered to the channel as a
result of calling `SendNotificationChannelVerificationCode`.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       NotificationChannelName name =
           NotificationChannelName.ofProjectNotificationChannelName(
               "[PROJECT]", "[NOTIFICATION_CHANNEL]");
       String code = "code3059181";
       NotificationChannel response =
           notificationChannelServiceClient.verifyNotificationChannel(name, code);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.NotificationChannelName` Required. The notification channel to verify. |
| `code` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. 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). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.NotificationChannel` |   |

### verifyNotificationChannel(VerifyNotificationChannelRequest request)

    public final NotificationChannel verifyNotificationChannel(VerifyNotificationChannelRequest request)

Verifies a `NotificationChannel` by proving receipt of the code delivered to the channel as a
result of calling `SendNotificationChannelVerificationCode`.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       VerifyNotificationChannelRequest request =
           VerifyNotificationChannelRequest.newBuilder()
               .setName(
                   NotificationChannelName.ofProjectNotificationChannelName(
                           "[PROJECT]", "[NOTIFICATION_CHANNEL]")
                       .toString())
               .setCode("code3059181")
               .build();
       NotificationChannel response =
           notificationChannelServiceClient.verifyNotificationChannel(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.VerifyNotificationChannelRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.NotificationChannel` |   |

### verifyNotificationChannel(String name, String code)

    public final NotificationChannel verifyNotificationChannel(String name, String code)

Verifies a `NotificationChannel` by proving receipt of the code delivered to the channel as a
result of calling `SendNotificationChannelVerificationCode`.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       String name =
           NotificationChannelName.ofProjectNotificationChannelName(
                   "[PROJECT]", "[NOTIFICATION_CHANNEL]")
               .toString();
       String code = "code3059181";
       NotificationChannel response =
           notificationChannelServiceClient.verifyNotificationChannel(name, code);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The notification channel to verify. |
| `code` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. 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). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.NotificationChannel` |   |

### verifyNotificationChannelCallable()

    public final UnaryCallable<VerifyNotificationChannelRequest,NotificationChannel> verifyNotificationChannelCallable()

Verifies a `NotificationChannel` by proving receipt of the code delivered to the channel as a
result of calling `SendNotificationChannelVerificationCode`.

Sample code:


     // 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/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotificationChannelServiceClient notificationChannelServiceClient =
         NotificationChannelServiceClient.create()) {
       VerifyNotificationChannelRequest request =
           VerifyNotificationChannelRequest.newBuilder()
               .setName(
                   NotificationChannelName.ofProjectNotificationChannelName(
                           "[PROJECT]", "[NOTIFICATION_CHANNEL]")
                       .toString())
               .setCode("code3059181")
               .build();
       ApiFuture<NotificationChannel> future =
           notificationChannelServiceClient.verifyNotificationChannelCallable().futureCall(request);
       // Do something.
       NotificationChannel response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.VerifyNotificationChannelRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-monitoring/latest/com.google.monitoring.v3.NotificationChannel>` |   |