@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
@Override public ListNotificationChannelsRequest injectPageSize( ListNotificationChannelsRequest payload, int pageSize) { return ListNotificationChannelsRequest.newBuilder(payload) .setPageSize(pageSize) .build(); }
@Override public ListNotificationChannelsRequest injectToken( ListNotificationChannelsRequest payload, String token) { return ListNotificationChannelsRequest.newBuilder(payload) .setPageToken(token) .build(); }
/** * Lists the notification channels that have been created for the project. * * <p>Sample code: * * <pre><code> * try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) { * ProjectName name = ProjectName.of("[PROJECT]"); * for (NotificationChannel element : notificationChannelServiceClient.listNotificationChannels(name.toString()).iterateAll()) { * // doThingsWith(element); * } * } * </code></pre> * * @param name The project on which to execute the request. The format is `projects/[PROJECT_ID]`. * That is, 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`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] * operation. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListNotificationChannelsPagedResponse listNotificationChannels(String name) { ListNotificationChannelsRequest request = ListNotificationChannelsRequest.newBuilder().setName(name).build(); return listNotificationChannels(request); }
/** * Lists the notification channels that have been created for the project. * * <p>Sample code: * * <pre><code> * try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) { * ProjectName name = ProjectName.of("[PROJECT]"); * for (NotificationChannel element : notificationChannelServiceClient.listNotificationChannels(name).iterateAll()) { * // doThingsWith(element); * } * } * </code></pre> * * @param name The project on which to execute the request. The format is `projects/[PROJECT_ID]`. * That is, 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`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] * operation. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListNotificationChannelsPagedResponse listNotificationChannels(ProjectName name) { ListNotificationChannelsRequest request = ListNotificationChannelsRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); return listNotificationChannels(request); }
@Override public ListNotificationChannelsRequest injectPageSize( ListNotificationChannelsRequest payload, int pageSize) { return ListNotificationChannelsRequest.newBuilder(payload) .setPageSize(pageSize) .build(); }
@Override public ListNotificationChannelsRequest injectToken( ListNotificationChannelsRequest payload, String token) { return ListNotificationChannelsRequest.newBuilder(payload) .setPageToken(token) .build(); }
/** * Lists the notification channels that have been created for the project. * * <p>Sample code: * * <pre><code> * try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) { * ProjectName name = ProjectName.of("[PROJECT]"); * for (NotificationChannel element : notificationChannelServiceClient.listNotificationChannels(name.toString()).iterateAll()) { * // doThingsWith(element); * } * } * </code></pre> * * @param name The project on which to execute the request. The format is `projects/[PROJECT_ID]`. * That is, 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`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] * operation. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListNotificationChannelsPagedResponse listNotificationChannels(String name) { ListNotificationChannelsRequest request = ListNotificationChannelsRequest.newBuilder().setName(name).build(); return listNotificationChannels(request); }
/** * Lists the notification channels that have been created for the project. * * <p>Sample code: * * <pre><code> * try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) { * ProjectName name = ProjectName.of("[PROJECT]"); * for (NotificationChannel element : notificationChannelServiceClient.listNotificationChannels(name).iterateAll()) { * // doThingsWith(element); * } * } * </code></pre> * * @param name The project on which to execute the request. The format is `projects/[PROJECT_ID]`. * That is, 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`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] * operation. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListNotificationChannelsPagedResponse listNotificationChannels(ProjectName name) { ListNotificationChannelsRequest request = ListNotificationChannelsRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); return listNotificationChannels(request); }