diff --git a/README.md b/README.md
index 8c506d0f..acec99c8 100644
--- a/README.md
+++ b/README.md
@@ -17,7 +17,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file
* try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) {
* AlertPolicyName name = AlertPolicyName.ofProjectAlertPolicyName("[PROJECT]", "[ALERT_POLICY]");
- * alertPolicyServiceClient.deleteAlertPolicy(name);
+ * AlertPolicy response = alertPolicyServiceClient.getAlertPolicy(name);
* }
*
*
@@ -169,100 +169,6 @@ public AlertPolicyServiceStub getStub() {
return stub;
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Deletes an alerting policy.
- *
- *
Sample code: - * - *
- * try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) {
- * AlertPolicyName name = AlertPolicyName.ofProjectAlertPolicyName("[PROJECT]", "[ALERT_POLICY]");
- * alertPolicyServiceClient.deleteAlertPolicy(name);
- * }
- *
- *
- * @param name Required. The alerting policy to delete. The format is:
- * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] - *
For more information, see [AlertPolicy][google.monitoring.v3.AlertPolicy]. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteAlertPolicy(AlertPolicyName name) { - DeleteAlertPolicyRequest request = - DeleteAlertPolicyRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - deleteAlertPolicy(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes an alerting policy. - * - *
Sample code: - * - *
- * try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) {
- * AlertPolicyName name = AlertPolicyName.ofProjectAlertPolicyName("[PROJECT]", "[ALERT_POLICY]");
- * alertPolicyServiceClient.deleteAlertPolicy(name.toString());
- * }
- *
- *
- * @param name Required. The alerting policy to delete. The format is:
- * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] - *
For more information, see [AlertPolicy][google.monitoring.v3.AlertPolicy]. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteAlertPolicy(String name) { - DeleteAlertPolicyRequest request = DeleteAlertPolicyRequest.newBuilder().setName(name).build(); - deleteAlertPolicy(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes an alerting policy. - * - *
Sample code: - * - *
- * try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) {
- * AlertPolicyName name = AlertPolicyName.ofProjectAlertPolicyName("[PROJECT]", "[ALERT_POLICY]");
- * DeleteAlertPolicyRequest request = DeleteAlertPolicyRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * alertPolicyServiceClient.deleteAlertPolicy(request);
- * }
- *
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void deleteAlertPolicy(DeleteAlertPolicyRequest request) {
- deleteAlertPolicyCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Deletes an alerting policy.
- *
- * Sample code: - * - *
- * try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) {
- * AlertPolicyName name = AlertPolicyName.ofProjectAlertPolicyName("[PROJECT]", "[ALERT_POLICY]");
- * DeleteAlertPolicyRequest request = DeleteAlertPolicyRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Void> future = alertPolicyServiceClient.deleteAlertPolicyCallable().futureCall(request);
- * // Do something
- * future.get();
- * }
- *
- */
- public final UnaryCallableSample code: + * + *
+ * try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) {
+ * AlertPolicyName name = AlertPolicyName.ofProjectAlertPolicyName("[PROJECT]", "[ALERT_POLICY]");
+ * alertPolicyServiceClient.deleteAlertPolicy(name);
+ * }
+ *
+ *
+ * @param name Required. The alerting policy to delete. The format is:
+ * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] + *
For more information, see [AlertPolicy][google.monitoring.v3.AlertPolicy]. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteAlertPolicy(AlertPolicyName name) { + DeleteAlertPolicyRequest request = + DeleteAlertPolicyRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteAlertPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes an alerting policy. + * + *
Sample code: + * + *
+ * try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) {
+ * AlertPolicyName name = AlertPolicyName.ofProjectAlertPolicyName("[PROJECT]", "[ALERT_POLICY]");
+ * alertPolicyServiceClient.deleteAlertPolicy(name.toString());
+ * }
+ *
+ *
+ * @param name Required. The alerting policy to delete. The format is:
+ * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] + *
For more information, see [AlertPolicy][google.monitoring.v3.AlertPolicy]. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteAlertPolicy(String name) { + DeleteAlertPolicyRequest request = DeleteAlertPolicyRequest.newBuilder().setName(name).build(); + deleteAlertPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes an alerting policy. + * + *
Sample code: + * + *
+ * try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) {
+ * AlertPolicyName name = AlertPolicyName.ofProjectAlertPolicyName("[PROJECT]", "[ALERT_POLICY]");
+ * DeleteAlertPolicyRequest request = DeleteAlertPolicyRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * alertPolicyServiceClient.deleteAlertPolicy(request);
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteAlertPolicy(DeleteAlertPolicyRequest request) {
+ deleteAlertPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes an alerting policy.
+ *
+ * Sample code: + * + *
+ * try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) {
+ * AlertPolicyName name = AlertPolicyName.ofProjectAlertPolicyName("[PROJECT]", "[ALERT_POLICY]");
+ * DeleteAlertPolicyRequest request = DeleteAlertPolicyRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * ApiFuture<Void> future = alertPolicyServiceClient.deleteAlertPolicyCallable().futureCall(request);
+ * // Do something
+ * future.get();
+ * }
+ *
+ */
+ public final UnaryCallableThe builder of this class is recursive, so contained classes are themselves builders. When * build() is called, the tree of builders is called to create the complete settings object. * - *
For example, to set the total timeout of deleteAlertPolicy to 30 seconds: + *
For example, to set the total timeout of getAlertPolicy to 30 seconds: * *
*
* AlertPolicyServiceSettings.Builder alertPolicyServiceSettingsBuilder =
* AlertPolicyServiceSettings.newBuilder();
* alertPolicyServiceSettingsBuilder
- * .deleteAlertPolicySettings()
+ * .getAlertPolicySettings()
* .setRetrySettings(
- * alertPolicyServiceSettingsBuilder.deleteAlertPolicySettings().getRetrySettings().toBuilder()
+ * alertPolicyServiceSettingsBuilder.getAlertPolicySettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* AlertPolicyServiceSettings alertPolicyServiceSettings = alertPolicyServiceSettingsBuilder.build();
@@ -74,11 +74,6 @@
*/
@Generated("by gapic-generator")
public class AlertPolicyServiceSettings extends ClientSettings {
- /** Returns the object with the settings used for calls to deleteAlertPolicy. */
- public UnaryCallSettings deleteAlertPolicySettings() {
- return ((AlertPolicyServiceStubSettings) getStubSettings()).deleteAlertPolicySettings();
- }
-
/** Returns the object with the settings used for calls to listAlertPolicies. */
public PagedCallSettings<
ListAlertPoliciesRequest, ListAlertPoliciesResponse, ListAlertPoliciesPagedResponse>
@@ -96,6 +91,11 @@ public UnaryCallSettings createAlertPolic
return ((AlertPolicyServiceStubSettings) getStubSettings()).createAlertPolicySettings();
}
+ /** Returns the object with the settings used for calls to deleteAlertPolicy. */
+ public UnaryCallSettings deleteAlertPolicySettings() {
+ return ((AlertPolicyServiceStubSettings) getStubSettings()).deleteAlertPolicySettings();
+ }
+
/** Returns the object with the settings used for calls to updateAlertPolicy. */
public UnaryCallSettings updateAlertPolicySettings() {
return ((AlertPolicyServiceStubSettings) getStubSettings()).updateAlertPolicySettings();
@@ -198,11 +198,6 @@ public Builder applyToAllUnaryMethods(
return this;
}
- /** Returns the builder for the settings used for calls to deleteAlertPolicy. */
- public UnaryCallSettings.Builder deleteAlertPolicySettings() {
- return getStubSettingsBuilder().deleteAlertPolicySettings();
- }
-
/** Returns the builder for the settings used for calls to listAlertPolicies. */
public PagedCallSettings.Builder<
ListAlertPoliciesRequest, ListAlertPoliciesResponse, ListAlertPoliciesPagedResponse>
@@ -221,6 +216,11 @@ public UnaryCallSettings.Builder getAlertPol
return getStubSettingsBuilder().createAlertPolicySettings();
}
+ /** Returns the builder for the settings used for calls to deleteAlertPolicy. */
+ public UnaryCallSettings.Builder deleteAlertPolicySettings() {
+ return getStubSettingsBuilder().deleteAlertPolicySettings();
+ }
+
/** Returns the builder for the settings used for calls to updateAlertPolicy. */
public UnaryCallSettings.Builder
updateAlertPolicySettings() {
diff --git a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/GroupServiceClient.java b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/GroupServiceClient.java
index b80b2098..a3655150 100644
--- a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/GroupServiceClient.java
+++ b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/GroupServiceClient.java
@@ -64,8 +64,8 @@
*
*
* try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) {
- * Group group = Group.newBuilder().build();
- * Group response = groupServiceClient.updateGroup(group);
+ * GroupName name = GroupName.ofProjectGroupName("[PROJECT]", "[GROUP]");
+ * Group response = groupServiceClient.getGroup(name);
* }
*
*
@@ -172,163 +172,6 @@ public GroupServiceStub getStub() {
return stub;
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Updates an existing group. You can change any group attributes except `name`.
- *
- * Sample code:
- *
- *
- * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) {
- * Group group = Group.newBuilder().build();
- * Group response = groupServiceClient.updateGroup(group);
- * }
- *
- *
- * @param group Required. The new definition of the group. All fields of the existing group,
- * excepting `name`, are replaced with the corresponding fields of this group.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Group updateGroup(Group group) {
- UpdateGroupRequest request = UpdateGroupRequest.newBuilder().setGroup(group).build();
- return updateGroup(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Updates an existing group. You can change any group attributes except `name`.
- *
- * Sample code:
- *
- *
- * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) {
- * Group group = Group.newBuilder().build();
- * UpdateGroupRequest request = UpdateGroupRequest.newBuilder()
- * .setGroup(group)
- * .build();
- * Group response = groupServiceClient.updateGroup(request);
- * }
- *
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Group updateGroup(UpdateGroupRequest request) {
- return updateGroupCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Updates an existing group. You can change any group attributes except `name`.
- *
- * Sample code:
- *
- *
- * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) {
- * Group group = Group.newBuilder().build();
- * UpdateGroupRequest request = UpdateGroupRequest.newBuilder()
- * .setGroup(group)
- * .build();
- * ApiFuture<Group> future = groupServiceClient.updateGroupCallable().futureCall(request);
- * // Do something
- * Group response = future.get();
- * }
- *
- */
- public final UnaryCallable updateGroupCallable() {
- return stub.updateGroupCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Deletes an existing group.
- *
- * Sample code:
- *
- *
- * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) {
- * GroupName name = GroupName.ofProjectGroupName("[PROJECT]", "[GROUP]");
- * groupServiceClient.deleteGroup(name);
- * }
- *
- *
- * @param name Required. The group to delete. The format is:
- * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void deleteGroup(GroupName name) {
- DeleteGroupRequest request =
- DeleteGroupRequest.newBuilder().setName(name == null ? null : name.toString()).build();
- deleteGroup(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Deletes an existing group.
- *
- *
Sample code:
- *
- *
- * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) {
- * GroupName name = GroupName.ofProjectGroupName("[PROJECT]", "[GROUP]");
- * groupServiceClient.deleteGroup(name.toString());
- * }
- *
- *
- * @param name Required. The group to delete. The format is:
- * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void deleteGroup(String name) {
- DeleteGroupRequest request = DeleteGroupRequest.newBuilder().setName(name).build();
- deleteGroup(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Deletes an existing group.
- *
- *
Sample code:
- *
- *
- * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) {
- * GroupName name = GroupName.ofProjectGroupName("[PROJECT]", "[GROUP]");
- * DeleteGroupRequest request = DeleteGroupRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * groupServiceClient.deleteGroup(request);
- * }
- *
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void deleteGroup(DeleteGroupRequest request) {
- deleteGroupCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Deletes an existing group.
- *
- * Sample code:
- *
- *
- * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) {
- * GroupName name = GroupName.ofProjectGroupName("[PROJECT]", "[GROUP]");
- * DeleteGroupRequest request = DeleteGroupRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Void> future = groupServiceClient.deleteGroupCallable().futureCall(request);
- * // Do something
- * future.get();
- * }
- *
- */
- public final UnaryCallable deleteGroupCallable() {
- return stub.deleteGroupCallable();
- }
-
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Lists the existing groups.
@@ -652,6 +495,163 @@ public final UnaryCallable createGroupCallable() {
return stub.createGroupCallable();
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Updates an existing group. You can change any group attributes except `name`.
+ *
+ * Sample code:
+ *
+ *
+ * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) {
+ * Group group = Group.newBuilder().build();
+ * Group response = groupServiceClient.updateGroup(group);
+ * }
+ *
+ *
+ * @param group Required. The new definition of the group. All fields of the existing group,
+ * excepting `name`, are replaced with the corresponding fields of this group.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Group updateGroup(Group group) {
+ UpdateGroupRequest request = UpdateGroupRequest.newBuilder().setGroup(group).build();
+ return updateGroup(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Updates an existing group. You can change any group attributes except `name`.
+ *
+ * Sample code:
+ *
+ *
+ * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) {
+ * Group group = Group.newBuilder().build();
+ * UpdateGroupRequest request = UpdateGroupRequest.newBuilder()
+ * .setGroup(group)
+ * .build();
+ * Group response = groupServiceClient.updateGroup(request);
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Group updateGroup(UpdateGroupRequest request) {
+ return updateGroupCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Updates an existing group. You can change any group attributes except `name`.
+ *
+ * Sample code:
+ *
+ *
+ * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) {
+ * Group group = Group.newBuilder().build();
+ * UpdateGroupRequest request = UpdateGroupRequest.newBuilder()
+ * .setGroup(group)
+ * .build();
+ * ApiFuture<Group> future = groupServiceClient.updateGroupCallable().futureCall(request);
+ * // Do something
+ * Group response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallable updateGroupCallable() {
+ return stub.updateGroupCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes an existing group.
+ *
+ * Sample code:
+ *
+ *
+ * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) {
+ * GroupName name = GroupName.ofProjectGroupName("[PROJECT]", "[GROUP]");
+ * groupServiceClient.deleteGroup(name);
+ * }
+ *
+ *
+ * @param name Required. The group to delete. The format is:
+ * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteGroup(GroupName name) {
+ DeleteGroupRequest request =
+ DeleteGroupRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ deleteGroup(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes an existing group.
+ *
+ *
Sample code:
+ *
+ *
+ * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) {
+ * GroupName name = GroupName.ofProjectGroupName("[PROJECT]", "[GROUP]");
+ * groupServiceClient.deleteGroup(name.toString());
+ * }
+ *
+ *
+ * @param name Required. The group to delete. The format is:
+ * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteGroup(String name) {
+ DeleteGroupRequest request = DeleteGroupRequest.newBuilder().setName(name).build();
+ deleteGroup(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes an existing group.
+ *
+ *
Sample code:
+ *
+ *
+ * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) {
+ * GroupName name = GroupName.ofProjectGroupName("[PROJECT]", "[GROUP]");
+ * DeleteGroupRequest request = DeleteGroupRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * groupServiceClient.deleteGroup(request);
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteGroup(DeleteGroupRequest request) {
+ deleteGroupCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes an existing group.
+ *
+ * Sample code:
+ *
+ *
+ * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) {
+ * GroupName name = GroupName.ofProjectGroupName("[PROJECT]", "[GROUP]");
+ * DeleteGroupRequest request = DeleteGroupRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * ApiFuture<Void> future = groupServiceClient.deleteGroupCallable().futureCall(request);
+ * // Do something
+ * future.get();
+ * }
+ *
+ */
+ public final UnaryCallable deleteGroupCallable() {
+ return stub.deleteGroupCallable();
+ }
+
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Lists the monitored resources that are members of a group.
diff --git a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/GroupServiceSettings.java b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/GroupServiceSettings.java
index e121343c..790fb8be 100644
--- a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/GroupServiceSettings.java
+++ b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/GroupServiceSettings.java
@@ -59,16 +59,16 @@
* The builder of this class is recursive, so contained classes are themselves builders. When
* build() is called, the tree of builders is called to create the complete settings object.
*
- *
For example, to set the total timeout of updateGroup to 30 seconds:
+ *
For example, to set the total timeout of getGroup to 30 seconds:
*
*
*
* GroupServiceSettings.Builder groupServiceSettingsBuilder =
* GroupServiceSettings.newBuilder();
* groupServiceSettingsBuilder
- * .updateGroupSettings()
+ * .getGroupSettings()
* .setRetrySettings(
- * groupServiceSettingsBuilder.updateGroupSettings().getRetrySettings().toBuilder()
+ * groupServiceSettingsBuilder.getGroupSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* GroupServiceSettings groupServiceSettings = groupServiceSettingsBuilder.build();
@@ -77,16 +77,6 @@
*/
@Generated("by gapic-generator")
public class GroupServiceSettings extends ClientSettings {
- /** Returns the object with the settings used for calls to updateGroup. */
- public UnaryCallSettings updateGroupSettings() {
- return ((GroupServiceStubSettings) getStubSettings()).updateGroupSettings();
- }
-
- /** Returns the object with the settings used for calls to deleteGroup. */
- public UnaryCallSettings deleteGroupSettings() {
- return ((GroupServiceStubSettings) getStubSettings()).deleteGroupSettings();
- }
-
/** Returns the object with the settings used for calls to listGroups. */
public PagedCallSettings
listGroupsSettings() {
@@ -103,6 +93,16 @@ public UnaryCallSettings createGroupSettings() {
return ((GroupServiceStubSettings) getStubSettings()).createGroupSettings();
}
+ /** Returns the object with the settings used for calls to updateGroup. */
+ public UnaryCallSettings updateGroupSettings() {
+ return ((GroupServiceStubSettings) getStubSettings()).updateGroupSettings();
+ }
+
+ /** Returns the object with the settings used for calls to deleteGroup. */
+ public UnaryCallSettings deleteGroupSettings() {
+ return ((GroupServiceStubSettings) getStubSettings()).deleteGroupSettings();
+ }
+
/** Returns the object with the settings used for calls to listGroupMembers. */
public PagedCallSettings<
ListGroupMembersRequest, ListGroupMembersResponse, ListGroupMembersPagedResponse>
@@ -207,16 +207,6 @@ public Builder applyToAllUnaryMethods(
return this;
}
- /** Returns the builder for the settings used for calls to updateGroup. */
- public UnaryCallSettings.Builder updateGroupSettings() {
- return getStubSettingsBuilder().updateGroupSettings();
- }
-
- /** Returns the builder for the settings used for calls to deleteGroup. */
- public UnaryCallSettings.Builder deleteGroupSettings() {
- return getStubSettingsBuilder().deleteGroupSettings();
- }
-
/** Returns the builder for the settings used for calls to listGroups. */
public PagedCallSettings.Builder
listGroupsSettings() {
@@ -233,6 +223,16 @@ public UnaryCallSettings.Builder createGroupSettings(
return getStubSettingsBuilder().createGroupSettings();
}
+ /** Returns the builder for the settings used for calls to updateGroup. */
+ public UnaryCallSettings.Builder updateGroupSettings() {
+ return getStubSettingsBuilder().updateGroupSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to deleteGroup. */
+ public UnaryCallSettings.Builder deleteGroupSettings() {
+ return getStubSettingsBuilder().deleteGroupSettings();
+ }
+
/** Returns the builder for the settings used for calls to listGroupMembers. */
public PagedCallSettings.Builder<
ListGroupMembersRequest, ListGroupMembersResponse, ListGroupMembersPagedResponse>
diff --git a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/NotificationChannelServiceClient.java b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/NotificationChannelServiceClient.java
index 304c64ac..cfe07d27 100644
--- a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/NotificationChannelServiceClient.java
+++ b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/NotificationChannelServiceClient.java
@@ -64,9 +64,8 @@
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
- * NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
- * boolean force = false;
- * notificationChannelServiceClient.deleteNotificationChannel(name, force);
+ * NotificationChannelDescriptorName name = NotificationChannelDescriptorName.ofProjectChannelDescriptorName("[PROJECT]", "[CHANNEL_DESCRIPTOR]");
+ * NotificationChannelDescriptor response = notificationChannelServiceClient.getNotificationChannelDescriptor(name);
* }
*
*
@@ -179,468 +178,332 @@ public NotificationChannelServiceStub getStub() {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Deletes a notification channel.
+ * Lists the descriptors for supported channel types. The use of descriptors makes it possible for
+ * new channel types to be dynamically added.
*
* Sample code:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
- * NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
- * boolean force = false;
- * notificationChannelServiceClient.deleteNotificationChannel(name, force);
+ * ResourceName name = ProjectName.of("[PROJECT]");
+ * for (NotificationChannelDescriptor element : notificationChannelServiceClient.listNotificationChannelDescriptors(name).iterateAll()) {
+ * // doThingsWith(element);
+ * }
* }
*
*
- * @param name Required. The channel for which to execute the request. The format is:
- * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
- * @param force 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, channels that are
- * still referenced by an existing alerting policy will fail to be deleted in a delete
- * operation.
+ * @param name 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 the parent container in which to look for the descriptors; to
+ * retrieve a single descriptor by name, use the
+ * [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor]
+ * operation, instead.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final void deleteNotificationChannel(NotificationChannelName name, boolean force) {
- DeleteNotificationChannelRequest request =
- DeleteNotificationChannelRequest.newBuilder()
+ public final ListNotificationChannelDescriptorsPagedResponse listNotificationChannelDescriptors(
+ ResourceName name) {
+ ListNotificationChannelDescriptorsRequest request =
+ ListNotificationChannelDescriptorsRequest.newBuilder()
.setName(name == null ? null : name.toString())
- .setForce(force)
.build();
- deleteNotificationChannel(request);
+ return listNotificationChannelDescriptors(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Deletes a notification channel.
+ * Lists the descriptors for supported channel types. The use of descriptors makes it possible for
+ * new channel types to be dynamically added.
*
*
Sample code:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
- * NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
- * boolean force = false;
- * notificationChannelServiceClient.deleteNotificationChannel(name.toString(), force);
+ * ResourceName name = ProjectName.of("[PROJECT]");
+ * for (NotificationChannelDescriptor element : notificationChannelServiceClient.listNotificationChannelDescriptors(name.toString()).iterateAll()) {
+ * // doThingsWith(element);
+ * }
* }
*
*
- * @param name Required. The channel for which to execute the request. The format is:
- * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
- * @param force 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, channels that are
- * still referenced by an existing alerting policy will fail to be deleted in a delete
- * operation.
+ * @param name 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 the parent container in which to look for the descriptors; to
+ * retrieve a single descriptor by name, use the
+ * [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor]
+ * operation, instead.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final void deleteNotificationChannel(String name, boolean force) {
- DeleteNotificationChannelRequest request =
- DeleteNotificationChannelRequest.newBuilder().setName(name).setForce(force).build();
- deleteNotificationChannel(request);
+ public final ListNotificationChannelDescriptorsPagedResponse listNotificationChannelDescriptors(
+ String name) {
+ ListNotificationChannelDescriptorsRequest request =
+ ListNotificationChannelDescriptorsRequest.newBuilder().setName(name).build();
+ return listNotificationChannelDescriptors(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Deletes a notification channel.
+ * Lists the descriptors for supported channel types. The use of descriptors makes it possible for
+ * new channel types to be dynamically added.
*
*
Sample code:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
- * NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
- * DeleteNotificationChannelRequest request = DeleteNotificationChannelRequest.newBuilder()
+ * ResourceName name = ProjectName.of("[PROJECT]");
+ * ListNotificationChannelDescriptorsRequest request = ListNotificationChannelDescriptorsRequest.newBuilder()
* .setName(name.toString())
* .build();
- * notificationChannelServiceClient.deleteNotificationChannel(request);
+ * for (NotificationChannelDescriptor element : notificationChannelServiceClient.listNotificationChannelDescriptors(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
* }
*
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final void deleteNotificationChannel(DeleteNotificationChannelRequest request) {
- deleteNotificationChannelCallable().call(request);
+ public final ListNotificationChannelDescriptorsPagedResponse listNotificationChannelDescriptors(
+ ListNotificationChannelDescriptorsRequest request) {
+ return listNotificationChannelDescriptorsPagedCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Deletes a notification channel.
+ * Lists the descriptors for supported channel types. The use of descriptors makes it possible for
+ * new channel types to be dynamically added.
*
* Sample code:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
- * NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
- * DeleteNotificationChannelRequest request = DeleteNotificationChannelRequest.newBuilder()
+ * ResourceName name = ProjectName.of("[PROJECT]");
+ * ListNotificationChannelDescriptorsRequest request = ListNotificationChannelDescriptorsRequest.newBuilder()
* .setName(name.toString())
* .build();
- * ApiFuture<Void> future = notificationChannelServiceClient.deleteNotificationChannelCallable().futureCall(request);
+ * ApiFuture<ListNotificationChannelDescriptorsPagedResponse> future = notificationChannelServiceClient.listNotificationChannelDescriptorsPagedCallable().futureCall(request);
* // Do something
- * future.get();
- * }
- *
- */
- public final UnaryCallable
- deleteNotificationChannelCallable() {
- return stub.deleteNotificationChannelCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * 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:
- *
- *
- * try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
- * NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
- * GetNotificationChannelVerificationCodeResponse response = notificationChannelServiceClient.getNotificationChannelVerificationCode(name);
- * }
- *
- *
- * @param name 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.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final GetNotificationChannelVerificationCodeResponse
- getNotificationChannelVerificationCode(NotificationChannelName name) {
- GetNotificationChannelVerificationCodeRequest request =
- GetNotificationChannelVerificationCodeRequest.newBuilder()
- .setName(name == null ? null : name.toString())
- .build();
- return getNotificationChannelVerificationCode(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * 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:
- *
- *
- * try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
- * NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
- * GetNotificationChannelVerificationCodeResponse response = notificationChannelServiceClient.getNotificationChannelVerificationCode(name.toString());
- * }
- *
- *
- * @param name 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.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final GetNotificationChannelVerificationCodeResponse
- getNotificationChannelVerificationCode(String name) {
- GetNotificationChannelVerificationCodeRequest request =
- GetNotificationChannelVerificationCodeRequest.newBuilder().setName(name).build();
- return getNotificationChannelVerificationCode(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * 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:
- *
- *
- * try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
- * NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
- * GetNotificationChannelVerificationCodeRequest request = GetNotificationChannelVerificationCodeRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * GetNotificationChannelVerificationCodeResponse response = notificationChannelServiceClient.getNotificationChannelVerificationCode(request);
+ * for (NotificationChannelDescriptor element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
* }
*
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final GetNotificationChannelVerificationCodeResponse
- getNotificationChannelVerificationCode(
- GetNotificationChannelVerificationCodeRequest request) {
- return getNotificationChannelVerificationCodeCallable().call(request);
+ public final UnaryCallable<
+ ListNotificationChannelDescriptorsRequest,
+ ListNotificationChannelDescriptorsPagedResponse>
+ listNotificationChannelDescriptorsPagedCallable() {
+ return stub.listNotificationChannelDescriptorsPagedCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * 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.
+ * Lists the descriptors for supported channel types. The use of descriptors makes it possible for
+ * new channel types to be dynamically added.
*
*
Sample code:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
- * NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
- * GetNotificationChannelVerificationCodeRequest request = GetNotificationChannelVerificationCodeRequest.newBuilder()
+ * ResourceName name = ProjectName.of("[PROJECT]");
+ * ListNotificationChannelDescriptorsRequest request = ListNotificationChannelDescriptorsRequest.newBuilder()
* .setName(name.toString())
* .build();
- * ApiFuture<GetNotificationChannelVerificationCodeResponse> future = notificationChannelServiceClient.getNotificationChannelVerificationCodeCallable().futureCall(request);
- * // Do something
- * GetNotificationChannelVerificationCodeResponse response = future.get();
+ * 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;
+ * }
+ * }
* }
*
*/
public final UnaryCallable<
- GetNotificationChannelVerificationCodeRequest,
- GetNotificationChannelVerificationCodeResponse>
- getNotificationChannelVerificationCodeCallable() {
- return stub.getNotificationChannelVerificationCodeCallable();
+ ListNotificationChannelDescriptorsRequest, ListNotificationChannelDescriptorsResponse>
+ listNotificationChannelDescriptorsCallable() {
+ return stub.listNotificationChannelDescriptorsCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Verifies a `NotificationChannel` by proving receipt of the code delivered to the channel as a
- * result of calling `SendNotificationChannelVerificationCode`.
+ * Gets a single channel descriptor. The descriptor indicates which fields are expected /
+ * permitted for a notification channel of the given type.
*
* Sample code:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
- * NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
- * String code = "";
- * NotificationChannel response = notificationChannelServiceClient.verifyNotificationChannel(name, code);
+ * NotificationChannelDescriptorName name = NotificationChannelDescriptorName.ofProjectChannelDescriptorName("[PROJECT]", "[CHANNEL_DESCRIPTOR]");
+ * NotificationChannelDescriptor response = notificationChannelServiceClient.getNotificationChannelDescriptor(name);
* }
*
*
- * @param name Required. The notification channel to verify.
- * @param code 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).
+ * @param name Required. The channel type for which to execute the request. The format is:
+ * projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE]
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final NotificationChannel verifyNotificationChannel(
- NotificationChannelName name, String code) {
- VerifyNotificationChannelRequest request =
- VerifyNotificationChannelRequest.newBuilder()
+ public final NotificationChannelDescriptor getNotificationChannelDescriptor(
+ NotificationChannelDescriptorName name) {
+ GetNotificationChannelDescriptorRequest request =
+ GetNotificationChannelDescriptorRequest.newBuilder()
.setName(name == null ? null : name.toString())
- .setCode(code)
.build();
- return verifyNotificationChannel(request);
+ return getNotificationChannelDescriptor(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Verifies a `NotificationChannel` by proving receipt of the code delivered to the channel as a
- * result of calling `SendNotificationChannelVerificationCode`.
+ * Gets a single channel descriptor. The descriptor indicates which fields are expected /
+ * permitted for a notification channel of the given type.
*
*
Sample code:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
- * NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
- * String code = "";
- * NotificationChannel response = notificationChannelServiceClient.verifyNotificationChannel(name.toString(), code);
+ * NotificationChannelDescriptorName name = NotificationChannelDescriptorName.ofProjectChannelDescriptorName("[PROJECT]", "[CHANNEL_DESCRIPTOR]");
+ * NotificationChannelDescriptor response = notificationChannelServiceClient.getNotificationChannelDescriptor(name.toString());
* }
*
*
- * @param name Required. The notification channel to verify.
- * @param code 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).
+ * @param name Required. The channel type for which to execute the request. The format is:
+ * projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE]
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final NotificationChannel verifyNotificationChannel(String name, String code) {
- VerifyNotificationChannelRequest request =
- VerifyNotificationChannelRequest.newBuilder().setName(name).setCode(code).build();
- return verifyNotificationChannel(request);
+ public final NotificationChannelDescriptor getNotificationChannelDescriptor(String name) {
+ GetNotificationChannelDescriptorRequest request =
+ GetNotificationChannelDescriptorRequest.newBuilder().setName(name).build();
+ return getNotificationChannelDescriptor(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Verifies a `NotificationChannel` by proving receipt of the code delivered to the channel as a
- * result of calling `SendNotificationChannelVerificationCode`.
+ * Gets a single channel descriptor. The descriptor indicates which fields are expected /
+ * permitted for a notification channel of the given type.
*
*
Sample code:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
- * NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
- * String code = "";
- * VerifyNotificationChannelRequest request = VerifyNotificationChannelRequest.newBuilder()
+ * NotificationChannelDescriptorName name = NotificationChannelDescriptorName.ofProjectChannelDescriptorName("[PROJECT]", "[CHANNEL_DESCRIPTOR]");
+ * GetNotificationChannelDescriptorRequest request = GetNotificationChannelDescriptorRequest.newBuilder()
* .setName(name.toString())
- * .setCode(code)
* .build();
- * NotificationChannel response = notificationChannelServiceClient.verifyNotificationChannel(request);
+ * NotificationChannelDescriptor response = notificationChannelServiceClient.getNotificationChannelDescriptor(request);
* }
*
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final NotificationChannel verifyNotificationChannel(
- VerifyNotificationChannelRequest request) {
- return verifyNotificationChannelCallable().call(request);
+ public final NotificationChannelDescriptor getNotificationChannelDescriptor(
+ GetNotificationChannelDescriptorRequest request) {
+ return getNotificationChannelDescriptorCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Verifies a `NotificationChannel` by proving receipt of the code delivered to the channel as a
- * result of calling `SendNotificationChannelVerificationCode`.
+ * Gets a single channel descriptor. The descriptor indicates which fields are expected /
+ * permitted for a notification channel of the given type.
*
* Sample code:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
- * NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
- * String code = "";
- * VerifyNotificationChannelRequest request = VerifyNotificationChannelRequest.newBuilder()
+ * NotificationChannelDescriptorName name = NotificationChannelDescriptorName.ofProjectChannelDescriptorName("[PROJECT]", "[CHANNEL_DESCRIPTOR]");
+ * GetNotificationChannelDescriptorRequest request = GetNotificationChannelDescriptorRequest.newBuilder()
* .setName(name.toString())
- * .setCode(code)
* .build();
- * ApiFuture<NotificationChannel> future = notificationChannelServiceClient.verifyNotificationChannelCallable().futureCall(request);
+ * ApiFuture<NotificationChannelDescriptor> future = notificationChannelServiceClient.getNotificationChannelDescriptorCallable().futureCall(request);
* // Do something
- * NotificationChannel response = future.get();
+ * NotificationChannelDescriptor response = future.get();
* }
*
*/
- public final UnaryCallable
- verifyNotificationChannelCallable() {
- return stub.verifyNotificationChannelCallable();
+ public final UnaryCallable
+ getNotificationChannelDescriptorCallable() {
+ return stub.getNotificationChannelDescriptorCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists the descriptors for supported channel types. The use of descriptors makes it possible for
- * new channel types to be dynamically added.
+ * Lists the notification channels that have been created for the project.
*
* Sample code:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
* ResourceName name = ProjectName.of("[PROJECT]");
- * for (NotificationChannelDescriptor element : notificationChannelServiceClient.listNotificationChannelDescriptors(name).iterateAll()) {
+ * for (NotificationChannel element : notificationChannelServiceClient.listNotificationChannels(name).iterateAll()) {
* // doThingsWith(element);
* }
* }
*
*
- * @param name Required. The REST resource name of the parent from which to retrieve the
- * notification channel descriptors. The expected syntax is:
+ * @param name Required. The project on which to execute the request. The format is:
* projects/[PROJECT_ID_OR_NUMBER]
- *
Note that this names the parent container in which to look for the descriptors; to
- * retrieve a single descriptor by name, use the
- * [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor]
- * operation, instead.
+ *
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 ListNotificationChannelDescriptorsPagedResponse listNotificationChannelDescriptors(
- ResourceName name) {
- ListNotificationChannelDescriptorsRequest request =
- ListNotificationChannelDescriptorsRequest.newBuilder()
+ public final ListNotificationChannelsPagedResponse listNotificationChannels(ResourceName name) {
+ ListNotificationChannelsRequest request =
+ ListNotificationChannelsRequest.newBuilder()
.setName(name == null ? null : name.toString())
.build();
- return listNotificationChannelDescriptors(request);
+ return listNotificationChannels(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists the descriptors for supported channel types. The use of descriptors makes it possible for
- * new channel types to be dynamically added.
+ * Lists the notification channels that have been created for the project.
*
*
Sample code:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
* ResourceName name = ProjectName.of("[PROJECT]");
- * for (NotificationChannelDescriptor element : notificationChannelServiceClient.listNotificationChannelDescriptors(name.toString()).iterateAll()) {
+ * for (NotificationChannel element : notificationChannelServiceClient.listNotificationChannels(name.toString()).iterateAll()) {
* // doThingsWith(element);
* }
* }
*
*
- * @param name 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 the parent container in which to look for the descriptors; to
- * retrieve a single descriptor by name, use the
- * [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor]
- * operation, instead.
+ * @param name Required. The project 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`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel]
+ * operation.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListNotificationChannelDescriptorsPagedResponse listNotificationChannelDescriptors(
- String name) {
- ListNotificationChannelDescriptorsRequest request =
- ListNotificationChannelDescriptorsRequest.newBuilder().setName(name).build();
- return listNotificationChannelDescriptors(request);
+ public final ListNotificationChannelsPagedResponse listNotificationChannels(String name) {
+ ListNotificationChannelsRequest request =
+ ListNotificationChannelsRequest.newBuilder().setName(name).build();
+ return listNotificationChannels(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists the descriptors for supported channel types. The use of descriptors makes it possible for
- * new channel types to be dynamically added.
+ * Lists the notification channels that have been created for the project.
*
*
Sample code:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
* ResourceName name = ProjectName.of("[PROJECT]");
- * ListNotificationChannelDescriptorsRequest request = ListNotificationChannelDescriptorsRequest.newBuilder()
+ * ListNotificationChannelsRequest request = ListNotificationChannelsRequest.newBuilder()
* .setName(name.toString())
* .build();
- * for (NotificationChannelDescriptor element : notificationChannelServiceClient.listNotificationChannelDescriptors(request).iterateAll()) {
+ * for (NotificationChannel element : notificationChannelServiceClient.listNotificationChannels(request).iterateAll()) {
* // doThingsWith(element);
* }
* }
@@ -649,55 +512,51 @@ public final ListNotificationChannelDescriptorsPagedResponse listNotificationCha
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListNotificationChannelDescriptorsPagedResponse listNotificationChannelDescriptors(
- ListNotificationChannelDescriptorsRequest request) {
- return listNotificationChannelDescriptorsPagedCallable().call(request);
+ public final ListNotificationChannelsPagedResponse listNotificationChannels(
+ ListNotificationChannelsRequest request) {
+ return listNotificationChannelsPagedCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists the descriptors for supported channel types. The use of descriptors makes it possible for
- * new channel types to be dynamically added.
+ * Lists the notification channels that have been created for the project.
*
* Sample code:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
* ResourceName name = ProjectName.of("[PROJECT]");
- * ListNotificationChannelDescriptorsRequest request = ListNotificationChannelDescriptorsRequest.newBuilder()
+ * ListNotificationChannelsRequest request = ListNotificationChannelsRequest.newBuilder()
* .setName(name.toString())
* .build();
- * ApiFuture<ListNotificationChannelDescriptorsPagedResponse> future = notificationChannelServiceClient.listNotificationChannelDescriptorsPagedCallable().futureCall(request);
+ * ApiFuture<ListNotificationChannelsPagedResponse> future = notificationChannelServiceClient.listNotificationChannelsPagedCallable().futureCall(request);
* // Do something
- * for (NotificationChannelDescriptor element : future.get().iterateAll()) {
+ * for (NotificationChannel element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
*
*/
- public final UnaryCallable<
- ListNotificationChannelDescriptorsRequest,
- ListNotificationChannelDescriptorsPagedResponse>
- listNotificationChannelDescriptorsPagedCallable() {
- return stub.listNotificationChannelDescriptorsPagedCallable();
+ public final UnaryCallable
+ listNotificationChannelsPagedCallable() {
+ return stub.listNotificationChannelsPagedCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists the descriptors for supported channel types. The use of descriptors makes it possible for
- * new channel types to be dynamically added.
+ * Lists the notification channels that have been created for the project.
*
* Sample code:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
* ResourceName name = ProjectName.of("[PROJECT]");
- * ListNotificationChannelDescriptorsRequest request = ListNotificationChannelDescriptorsRequest.newBuilder()
+ * ListNotificationChannelsRequest request = ListNotificationChannelsRequest.newBuilder()
* .setName(name.toString())
* .build();
* while (true) {
- * ListNotificationChannelDescriptorsResponse response = notificationChannelServiceClient.listNotificationChannelDescriptorsCallable().call(request);
- * for (NotificationChannelDescriptor element : response.getChannelDescriptorsList()) {
+ * ListNotificationChannelsResponse response = notificationChannelServiceClient.listNotificationChannelsCallable().call(request);
+ * for (NotificationChannel element : response.getNotificationChannelsList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
@@ -710,654 +569,794 @@ public final ListNotificationChannelDescriptorsPagedResponse listNotificationCha
* }
*
*/
- public final UnaryCallable<
- ListNotificationChannelDescriptorsRequest, ListNotificationChannelDescriptorsResponse>
- listNotificationChannelDescriptorsCallable() {
- return stub.listNotificationChannelDescriptorsCallable();
+ public final UnaryCallable
+ listNotificationChannelsCallable() {
+ return stub.listNotificationChannelsCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Gets a single channel descriptor. The descriptor indicates which fields are expected /
- * permitted for a notification channel of the given type.
+ * 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:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
- * NotificationChannelDescriptorName name = NotificationChannelDescriptorName.ofProjectChannelDescriptorName("[PROJECT]", "[CHANNEL_DESCRIPTOR]");
- * NotificationChannelDescriptor response = notificationChannelServiceClient.getNotificationChannelDescriptor(name);
+ * NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
+ * NotificationChannel response = notificationChannelServiceClient.getNotificationChannel(name);
* }
*
*
- * @param name Required. The channel type for which to execute the request. The format is:
- * projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE]
+ * @param name Required. The channel for which to execute the request. The format is:
+ *
projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final NotificationChannelDescriptor getNotificationChannelDescriptor(
- NotificationChannelDescriptorName name) {
- GetNotificationChannelDescriptorRequest request =
- GetNotificationChannelDescriptorRequest.newBuilder()
+ public final NotificationChannel getNotificationChannel(NotificationChannelName name) {
+ GetNotificationChannelRequest request =
+ GetNotificationChannelRequest.newBuilder()
.setName(name == null ? null : name.toString())
.build();
- return getNotificationChannelDescriptor(request);
+ return getNotificationChannel(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Gets a single channel descriptor. The descriptor indicates which fields are expected /
- * permitted for a notification channel of the given type.
+ * 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:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
- * NotificationChannelDescriptorName name = NotificationChannelDescriptorName.ofProjectChannelDescriptorName("[PROJECT]", "[CHANNEL_DESCRIPTOR]");
- * NotificationChannelDescriptor response = notificationChannelServiceClient.getNotificationChannelDescriptor(name.toString());
+ * NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
+ * NotificationChannel response = notificationChannelServiceClient.getNotificationChannel(name.toString());
* }
*
*
- * @param name Required. The channel type for which to execute the request. The format is:
- * projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE]
+ * @param name Required. The channel for which to execute the request. The format is:
+ *
projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final NotificationChannelDescriptor getNotificationChannelDescriptor(String name) {
- GetNotificationChannelDescriptorRequest request =
- GetNotificationChannelDescriptorRequest.newBuilder().setName(name).build();
- return getNotificationChannelDescriptor(request);
+ public final NotificationChannel getNotificationChannel(String name) {
+ GetNotificationChannelRequest request =
+ GetNotificationChannelRequest.newBuilder().setName(name).build();
+ return getNotificationChannel(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Gets a single channel descriptor. The descriptor indicates which fields are expected /
- * permitted for a notification channel of the given type.
+ * 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:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
- * NotificationChannelDescriptorName name = NotificationChannelDescriptorName.ofProjectChannelDescriptorName("[PROJECT]", "[CHANNEL_DESCRIPTOR]");
- * GetNotificationChannelDescriptorRequest request = GetNotificationChannelDescriptorRequest.newBuilder()
+ * NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
+ * GetNotificationChannelRequest request = GetNotificationChannelRequest.newBuilder()
* .setName(name.toString())
* .build();
- * NotificationChannelDescriptor response = notificationChannelServiceClient.getNotificationChannelDescriptor(request);
+ * NotificationChannel response = notificationChannelServiceClient.getNotificationChannel(request);
* }
*
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final NotificationChannelDescriptor getNotificationChannelDescriptor(
- GetNotificationChannelDescriptorRequest request) {
- return getNotificationChannelDescriptorCallable().call(request);
+ public final NotificationChannel getNotificationChannel(GetNotificationChannelRequest request) {
+ return getNotificationChannelCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Gets a single channel descriptor. The descriptor indicates which fields are expected /
- * permitted for a notification channel of the given type.
+ * 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:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
- * NotificationChannelDescriptorName name = NotificationChannelDescriptorName.ofProjectChannelDescriptorName("[PROJECT]", "[CHANNEL_DESCRIPTOR]");
- * GetNotificationChannelDescriptorRequest request = GetNotificationChannelDescriptorRequest.newBuilder()
+ * NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
+ * GetNotificationChannelRequest request = GetNotificationChannelRequest.newBuilder()
* .setName(name.toString())
* .build();
- * ApiFuture<NotificationChannelDescriptor> future = notificationChannelServiceClient.getNotificationChannelDescriptorCallable().futureCall(request);
+ * ApiFuture<NotificationChannel> future = notificationChannelServiceClient.getNotificationChannelCallable().futureCall(request);
* // Do something
- * NotificationChannelDescriptor response = future.get();
+ * NotificationChannel response = future.get();
* }
*
*/
- public final UnaryCallable
- getNotificationChannelDescriptorCallable() {
- return stub.getNotificationChannelDescriptorCallable();
+ public final UnaryCallable
+ getNotificationChannelCallable() {
+ return stub.getNotificationChannelCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists the notification channels that have been created for the project.
+ * Creates a new notification channel, representing a single notification endpoint such as an
+ * email address, SMS number, or PagerDuty service.
*
* Sample code:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
* ResourceName name = ProjectName.of("[PROJECT]");
- * for (NotificationChannel element : notificationChannelServiceClient.listNotificationChannels(name).iterateAll()) {
- * // doThingsWith(element);
- * }
+ * NotificationChannel notificationChannel = NotificationChannel.newBuilder().build();
+ * NotificationChannel response = notificationChannelServiceClient.createNotificationChannel(name, notificationChannel);
* }
*
*
* @param name Required. The project 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`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel]
- * operation.
+ *
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.
+ * @param notificationChannel Required. The definition of the `NotificationChannel` to create.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListNotificationChannelsPagedResponse listNotificationChannels(ResourceName name) {
- ListNotificationChannelsRequest request =
- ListNotificationChannelsRequest.newBuilder()
+ public final NotificationChannel createNotificationChannel(
+ ResourceName name, NotificationChannel notificationChannel) {
+ CreateNotificationChannelRequest request =
+ CreateNotificationChannelRequest.newBuilder()
.setName(name == null ? null : name.toString())
+ .setNotificationChannel(notificationChannel)
.build();
- return listNotificationChannels(request);
+ return createNotificationChannel(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a new notification channel, representing a single notification endpoint such as an
+ * email address, SMS number, or PagerDuty service.
+ *
+ *
Sample code:
+ *
+ *
+ * try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
+ * ResourceName name = ProjectName.of("[PROJECT]");
+ * NotificationChannel notificationChannel = NotificationChannel.newBuilder().build();
+ * NotificationChannel response = notificationChannelServiceClient.createNotificationChannel(name.toString(), notificationChannel);
+ * }
+ *
+ *
+ * @param name Required. The project 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.
+ * @param notificationChannel Required. The definition of the `NotificationChannel` to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final NotificationChannel createNotificationChannel(
+ String name, NotificationChannel notificationChannel) {
+ CreateNotificationChannelRequest request =
+ CreateNotificationChannelRequest.newBuilder()
+ .setName(name)
+ .setNotificationChannel(notificationChannel)
+ .build();
+ return createNotificationChannel(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a new notification channel, representing a single notification endpoint such as an
+ * email address, SMS number, or PagerDuty service.
+ *
+ *
Sample code:
+ *
+ *
+ * try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
+ * ResourceName name = ProjectName.of("[PROJECT]");
+ * NotificationChannel notificationChannel = NotificationChannel.newBuilder().build();
+ * CreateNotificationChannelRequest request = CreateNotificationChannelRequest.newBuilder()
+ * .setName(name.toString())
+ * .setNotificationChannel(notificationChannel)
+ * .build();
+ * NotificationChannel response = notificationChannelServiceClient.createNotificationChannel(request);
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final NotificationChannel createNotificationChannel(
+ CreateNotificationChannelRequest request) {
+ return createNotificationChannelCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a new notification channel, representing a single notification endpoint such as an
+ * email address, SMS number, or PagerDuty service.
+ *
+ * Sample code:
+ *
+ *
+ * try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
+ * ResourceName name = ProjectName.of("[PROJECT]");
+ * NotificationChannel notificationChannel = NotificationChannel.newBuilder().build();
+ * CreateNotificationChannelRequest request = CreateNotificationChannelRequest.newBuilder()
+ * .setName(name.toString())
+ * .setNotificationChannel(notificationChannel)
+ * .build();
+ * ApiFuture<NotificationChannel> future = notificationChannelServiceClient.createNotificationChannelCallable().futureCall(request);
+ * // Do something
+ * NotificationChannel response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallable
+ createNotificationChannelCallable() {
+ return stub.createNotificationChannelCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists the notification channels that have been created for the project.
+ * Updates a notification channel. Fields not specified in the field mask remain unchanged.
*
* Sample code:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
- * ResourceName name = ProjectName.of("[PROJECT]");
- * for (NotificationChannel element : notificationChannelServiceClient.listNotificationChannels(name.toString()).iterateAll()) {
- * // doThingsWith(element);
- * }
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * NotificationChannel notificationChannel = NotificationChannel.newBuilder().build();
+ * NotificationChannel response = notificationChannelServiceClient.updateNotificationChannel(updateMask, notificationChannel);
* }
*
*
- * @param name Required. The project 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`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel]
- * operation.
+ * @param updateMask The fields to update.
+ * @param 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`.
* @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);
+ public final NotificationChannel updateNotificationChannel(
+ FieldMask updateMask, NotificationChannel notificationChannel) {
+ UpdateNotificationChannelRequest request =
+ UpdateNotificationChannelRequest.newBuilder()
+ .setUpdateMask(updateMask)
+ .setNotificationChannel(notificationChannel)
+ .build();
+ return updateNotificationChannel(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists the notification channels that have been created for the project.
+ * Updates a notification channel. Fields not specified in the field mask remain unchanged.
*
*
Sample code:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
- * ResourceName name = ProjectName.of("[PROJECT]");
- * ListNotificationChannelsRequest request = ListNotificationChannelsRequest.newBuilder()
- * .setName(name.toString())
+ * NotificationChannel notificationChannel = NotificationChannel.newBuilder().build();
+ * UpdateNotificationChannelRequest request = UpdateNotificationChannelRequest.newBuilder()
+ * .setNotificationChannel(notificationChannel)
* .build();
- * for (NotificationChannel element : notificationChannelServiceClient.listNotificationChannels(request).iterateAll()) {
- * // doThingsWith(element);
- * }
+ * NotificationChannel response = notificationChannelServiceClient.updateNotificationChannel(request);
* }
*
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListNotificationChannelsPagedResponse listNotificationChannels(
- ListNotificationChannelsRequest request) {
- return listNotificationChannelsPagedCallable().call(request);
+ public final NotificationChannel updateNotificationChannel(
+ UpdateNotificationChannelRequest request) {
+ return updateNotificationChannelCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists the notification channels that have been created for the project.
+ * Updates a notification channel. Fields not specified in the field mask remain unchanged.
*
* Sample code:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
- * ResourceName name = ProjectName.of("[PROJECT]");
- * ListNotificationChannelsRequest request = ListNotificationChannelsRequest.newBuilder()
- * .setName(name.toString())
+ * NotificationChannel notificationChannel = NotificationChannel.newBuilder().build();
+ * UpdateNotificationChannelRequest request = UpdateNotificationChannelRequest.newBuilder()
+ * .setNotificationChannel(notificationChannel)
* .build();
- * ApiFuture<ListNotificationChannelsPagedResponse> future = notificationChannelServiceClient.listNotificationChannelsPagedCallable().futureCall(request);
+ * ApiFuture<NotificationChannel> future = notificationChannelServiceClient.updateNotificationChannelCallable().futureCall(request);
* // Do something
- * for (NotificationChannel element : future.get().iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
- */
- public final UnaryCallable
- listNotificationChannelsPagedCallable() {
- return stub.listNotificationChannelsPagedCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Lists the notification channels that have been created for the project.
- *
- * Sample code:
- *
- *
- * try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
- * ResourceName name = ProjectName.of("[PROJECT]");
- * ListNotificationChannelsRequest request = ListNotificationChannelsRequest.newBuilder()
- * .setName(name.toString())
- * .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;
- * }
- * }
+ * NotificationChannel response = future.get();
* }
*
*/
- public final UnaryCallable
- listNotificationChannelsCallable() {
- return stub.listNotificationChannelsCallable();
+ public final UnaryCallable
+ updateNotificationChannelCallable() {
+ return stub.updateNotificationChannelCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * 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.
+ * Deletes a notification channel.
*
* Sample code:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
* NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
- * NotificationChannel response = notificationChannelServiceClient.getNotificationChannel(name);
+ * boolean force = false;
+ * notificationChannelServiceClient.deleteNotificationChannel(name, force);
* }
*
*
* @param name Required. The channel for which to execute the request. The format is:
* projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
+ * @param force 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, channels that are
+ * still referenced by an existing alerting policy will fail to be deleted in a delete
+ * operation.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final NotificationChannel getNotificationChannel(NotificationChannelName name) {
- GetNotificationChannelRequest request =
- GetNotificationChannelRequest.newBuilder()
+ public final void deleteNotificationChannel(NotificationChannelName name, boolean force) {
+ DeleteNotificationChannelRequest request =
+ DeleteNotificationChannelRequest.newBuilder()
.setName(name == null ? null : name.toString())
+ .setForce(force)
.build();
- return getNotificationChannel(request);
+ deleteNotificationChannel(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * 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.
+ * Deletes a notification channel.
*
*
Sample code:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
* NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
- * NotificationChannel response = notificationChannelServiceClient.getNotificationChannel(name.toString());
+ * boolean force = false;
+ * notificationChannelServiceClient.deleteNotificationChannel(name.toString(), force);
* }
*
*
* @param name Required. The channel for which to execute the request. The format is:
* projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
+ * @param force 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, channels that are
+ * still referenced by an existing alerting policy will fail to be deleted in a delete
+ * operation.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final NotificationChannel getNotificationChannel(String name) {
- GetNotificationChannelRequest request =
- GetNotificationChannelRequest.newBuilder().setName(name).build();
- return getNotificationChannel(request);
+ public final void deleteNotificationChannel(String name, boolean force) {
+ DeleteNotificationChannelRequest request =
+ DeleteNotificationChannelRequest.newBuilder().setName(name).setForce(force).build();
+ deleteNotificationChannel(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * 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.
+ * Deletes a notification channel.
*
*
Sample code:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
* NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
- * GetNotificationChannelRequest request = GetNotificationChannelRequest.newBuilder()
+ * DeleteNotificationChannelRequest request = DeleteNotificationChannelRequest.newBuilder()
* .setName(name.toString())
* .build();
- * NotificationChannel response = notificationChannelServiceClient.getNotificationChannel(request);
+ * notificationChannelServiceClient.deleteNotificationChannel(request);
* }
*
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final NotificationChannel getNotificationChannel(GetNotificationChannelRequest request) {
- return getNotificationChannelCallable().call(request);
+ public final void deleteNotificationChannel(DeleteNotificationChannelRequest request) {
+ deleteNotificationChannelCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * 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.
+ * Deletes a notification channel.
*
* Sample code:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
* NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
- * GetNotificationChannelRequest request = GetNotificationChannelRequest.newBuilder()
+ * DeleteNotificationChannelRequest request = DeleteNotificationChannelRequest.newBuilder()
* .setName(name.toString())
* .build();
- * ApiFuture<NotificationChannel> future = notificationChannelServiceClient.getNotificationChannelCallable().futureCall(request);
+ * ApiFuture<Void> future = notificationChannelServiceClient.deleteNotificationChannelCallable().futureCall(request);
* // Do something
- * NotificationChannel response = future.get();
+ * future.get();
* }
*
*/
- public final UnaryCallable
- getNotificationChannelCallable() {
- return stub.getNotificationChannelCallable();
+ public final UnaryCallable
+ deleteNotificationChannelCallable() {
+ return stub.deleteNotificationChannelCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Creates a new notification channel, representing a single notification endpoint such as an
- * email address, SMS number, or PagerDuty service.
+ * Causes a verification code to be delivered to the channel. The code can then be supplied in
+ * `VerifyNotificationChannel` to verify the channel.
*
* Sample code:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
- * ResourceName name = ProjectName.of("[PROJECT]");
- * NotificationChannel notificationChannel = NotificationChannel.newBuilder().build();
- * NotificationChannel response = notificationChannelServiceClient.createNotificationChannel(name, notificationChannel);
+ * NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
+ * notificationChannelServiceClient.sendNotificationChannelVerificationCode(name);
* }
*
*
- * @param name Required. The project 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.
- * @param notificationChannel Required. The definition of the `NotificationChannel` to create.
+ * @param name Required. The notification channel to which to send a verification code.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final NotificationChannel createNotificationChannel(
- ResourceName name, NotificationChannel notificationChannel) {
- CreateNotificationChannelRequest request =
- CreateNotificationChannelRequest.newBuilder()
+ public final void sendNotificationChannelVerificationCode(NotificationChannelName name) {
+ SendNotificationChannelVerificationCodeRequest request =
+ SendNotificationChannelVerificationCodeRequest.newBuilder()
.setName(name == null ? null : name.toString())
- .setNotificationChannel(notificationChannel)
.build();
- return createNotificationChannel(request);
+ sendNotificationChannelVerificationCode(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Creates a new notification channel, representing a single notification endpoint such as an
- * email address, SMS number, or PagerDuty service.
+ * Causes a verification code to be delivered to the channel. The code can then be supplied in
+ * `VerifyNotificationChannel` to verify the channel.
*
*
Sample code:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
- * ResourceName name = ProjectName.of("[PROJECT]");
- * NotificationChannel notificationChannel = NotificationChannel.newBuilder().build();
- * NotificationChannel response = notificationChannelServiceClient.createNotificationChannel(name.toString(), notificationChannel);
+ * NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
+ * notificationChannelServiceClient.sendNotificationChannelVerificationCode(name.toString());
* }
*
*
- * @param name Required. The project 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.
- * @param notificationChannel Required. The definition of the `NotificationChannel` to create.
+ * @param name Required. The notification channel to which to send a verification code.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final NotificationChannel createNotificationChannel(
- String name, NotificationChannel notificationChannel) {
- CreateNotificationChannelRequest request =
- CreateNotificationChannelRequest.newBuilder()
- .setName(name)
- .setNotificationChannel(notificationChannel)
- .build();
- return createNotificationChannel(request);
+ public final void sendNotificationChannelVerificationCode(String name) {
+ SendNotificationChannelVerificationCodeRequest request =
+ SendNotificationChannelVerificationCodeRequest.newBuilder().setName(name).build();
+ sendNotificationChannelVerificationCode(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Creates a new notification channel, representing a single notification endpoint such as an
- * email address, SMS number, or PagerDuty service.
+ * Causes a verification code to be delivered to the channel. The code can then be supplied in
+ * `VerifyNotificationChannel` to verify the channel.
+ *
+ *
Sample code:
+ *
+ *
+ * try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
+ * NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
+ * SendNotificationChannelVerificationCodeRequest request = SendNotificationChannelVerificationCodeRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * notificationChannelServiceClient.sendNotificationChannelVerificationCode(request);
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void sendNotificationChannelVerificationCode(
+ SendNotificationChannelVerificationCodeRequest request) {
+ sendNotificationChannelVerificationCodeCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Causes a verification code to be delivered to the channel. The code can then be supplied in
+ * `VerifyNotificationChannel` to verify the channel.
*
* Sample code:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
- * ResourceName name = ProjectName.of("[PROJECT]");
- * NotificationChannel notificationChannel = NotificationChannel.newBuilder().build();
- * CreateNotificationChannelRequest request = CreateNotificationChannelRequest.newBuilder()
+ * NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
+ * SendNotificationChannelVerificationCodeRequest request = SendNotificationChannelVerificationCodeRequest.newBuilder()
* .setName(name.toString())
- * .setNotificationChannel(notificationChannel)
* .build();
- * NotificationChannel response = notificationChannelServiceClient.createNotificationChannel(request);
+ * ApiFuture<Void> future = notificationChannelServiceClient.sendNotificationChannelVerificationCodeCallable().futureCall(request);
+ * // Do something
+ * future.get();
* }
*
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final NotificationChannel createNotificationChannel(
- CreateNotificationChannelRequest request) {
- return createNotificationChannelCallable().call(request);
+ public final UnaryCallable
+ sendNotificationChannelVerificationCodeCallable() {
+ return stub.sendNotificationChannelVerificationCodeCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Creates a new notification channel, representing a single notification endpoint such as an
- * email address, SMS number, or PagerDuty service.
+ * 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:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
- * ResourceName name = ProjectName.of("[PROJECT]");
- * NotificationChannel notificationChannel = NotificationChannel.newBuilder().build();
- * CreateNotificationChannelRequest request = CreateNotificationChannelRequest.newBuilder()
- * .setName(name.toString())
- * .setNotificationChannel(notificationChannel)
- * .build();
- * ApiFuture<NotificationChannel> future = notificationChannelServiceClient.createNotificationChannelCallable().futureCall(request);
- * // Do something
- * NotificationChannel response = future.get();
+ * NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
+ * GetNotificationChannelVerificationCodeResponse response = notificationChannelServiceClient.getNotificationChannelVerificationCode(name);
* }
*
+ *
+ * @param name 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.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final UnaryCallable
- createNotificationChannelCallable() {
- return stub.createNotificationChannelCallable();
+ public final GetNotificationChannelVerificationCodeResponse
+ getNotificationChannelVerificationCode(NotificationChannelName name) {
+ GetNotificationChannelVerificationCodeRequest request =
+ GetNotificationChannelVerificationCodeRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getNotificationChannelVerificationCode(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Updates a notification channel. Fields not specified in the field mask remain unchanged.
+ * 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:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * NotificationChannel notificationChannel = NotificationChannel.newBuilder().build();
- * NotificationChannel response = notificationChannelServiceClient.updateNotificationChannel(updateMask, notificationChannel);
+ * NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
+ * GetNotificationChannelVerificationCodeResponse response = notificationChannelServiceClient.getNotificationChannelVerificationCode(name.toString());
* }
*
*
- * @param updateMask The fields to update.
- * @param 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`.
+ * @param name 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.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final NotificationChannel updateNotificationChannel(
- FieldMask updateMask, NotificationChannel notificationChannel) {
- UpdateNotificationChannelRequest request =
- UpdateNotificationChannelRequest.newBuilder()
- .setUpdateMask(updateMask)
- .setNotificationChannel(notificationChannel)
- .build();
- return updateNotificationChannel(request);
+ public final GetNotificationChannelVerificationCodeResponse
+ getNotificationChannelVerificationCode(String name) {
+ GetNotificationChannelVerificationCodeRequest request =
+ GetNotificationChannelVerificationCodeRequest.newBuilder().setName(name).build();
+ return getNotificationChannelVerificationCode(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Updates a notification channel. Fields not specified in the field mask remain unchanged.
+ * 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:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
- * NotificationChannel notificationChannel = NotificationChannel.newBuilder().build();
- * UpdateNotificationChannelRequest request = UpdateNotificationChannelRequest.newBuilder()
- * .setNotificationChannel(notificationChannel)
+ * NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
+ * GetNotificationChannelVerificationCodeRequest request = GetNotificationChannelVerificationCodeRequest.newBuilder()
+ * .setName(name.toString())
* .build();
- * NotificationChannel response = notificationChannelServiceClient.updateNotificationChannel(request);
+ * GetNotificationChannelVerificationCodeResponse response = notificationChannelServiceClient.getNotificationChannelVerificationCode(request);
* }
*
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final NotificationChannel updateNotificationChannel(
- UpdateNotificationChannelRequest request) {
- return updateNotificationChannelCallable().call(request);
+ public final GetNotificationChannelVerificationCodeResponse
+ getNotificationChannelVerificationCode(
+ GetNotificationChannelVerificationCodeRequest request) {
+ return getNotificationChannelVerificationCodeCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Updates a notification channel. Fields not specified in the field mask remain unchanged.
+ * 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:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
- * NotificationChannel notificationChannel = NotificationChannel.newBuilder().build();
- * UpdateNotificationChannelRequest request = UpdateNotificationChannelRequest.newBuilder()
- * .setNotificationChannel(notificationChannel)
+ * NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
+ * GetNotificationChannelVerificationCodeRequest request = GetNotificationChannelVerificationCodeRequest.newBuilder()
+ * .setName(name.toString())
* .build();
- * ApiFuture<NotificationChannel> future = notificationChannelServiceClient.updateNotificationChannelCallable().futureCall(request);
+ * ApiFuture<GetNotificationChannelVerificationCodeResponse> future = notificationChannelServiceClient.getNotificationChannelVerificationCodeCallable().futureCall(request);
* // Do something
- * NotificationChannel response = future.get();
+ * GetNotificationChannelVerificationCodeResponse response = future.get();
* }
*
*/
- public final UnaryCallable
- updateNotificationChannelCallable() {
- return stub.updateNotificationChannelCallable();
+ public final UnaryCallable<
+ GetNotificationChannelVerificationCodeRequest,
+ GetNotificationChannelVerificationCodeResponse>
+ getNotificationChannelVerificationCodeCallable() {
+ return stub.getNotificationChannelVerificationCodeCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Causes a verification code to be delivered to the channel. The code can then be supplied in
- * `VerifyNotificationChannel` to verify the channel.
+ * Verifies a `NotificationChannel` by proving receipt of the code delivered to the channel as a
+ * result of calling `SendNotificationChannelVerificationCode`.
*
* Sample code:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
* NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
- * notificationChannelServiceClient.sendNotificationChannelVerificationCode(name);
+ * String code = "";
+ * NotificationChannel response = notificationChannelServiceClient.verifyNotificationChannel(name, code);
* }
*
*
- * @param name Required. The notification channel to which to send a verification code.
+ * @param name Required. The notification channel to verify.
+ * @param code 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).
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final void sendNotificationChannelVerificationCode(NotificationChannelName name) {
- SendNotificationChannelVerificationCodeRequest request =
- SendNotificationChannelVerificationCodeRequest.newBuilder()
+ public final NotificationChannel verifyNotificationChannel(
+ NotificationChannelName name, String code) {
+ VerifyNotificationChannelRequest request =
+ VerifyNotificationChannelRequest.newBuilder()
.setName(name == null ? null : name.toString())
+ .setCode(code)
.build();
- sendNotificationChannelVerificationCode(request);
+ return verifyNotificationChannel(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Causes a verification code to be delivered to the channel. The code can then be supplied in
- * `VerifyNotificationChannel` to verify the channel.
+ * Verifies a `NotificationChannel` by proving receipt of the code delivered to the channel as a
+ * result of calling `SendNotificationChannelVerificationCode`.
*
* Sample code:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
* NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
- * notificationChannelServiceClient.sendNotificationChannelVerificationCode(name.toString());
+ * String code = "";
+ * NotificationChannel response = notificationChannelServiceClient.verifyNotificationChannel(name.toString(), code);
* }
*
*
- * @param name Required. The notification channel to which to send a verification code.
+ * @param name Required. The notification channel to verify.
+ * @param code 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).
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final void sendNotificationChannelVerificationCode(String name) {
- SendNotificationChannelVerificationCodeRequest request =
- SendNotificationChannelVerificationCodeRequest.newBuilder().setName(name).build();
- sendNotificationChannelVerificationCode(request);
+ public final NotificationChannel verifyNotificationChannel(String name, String code) {
+ VerifyNotificationChannelRequest request =
+ VerifyNotificationChannelRequest.newBuilder().setName(name).setCode(code).build();
+ return verifyNotificationChannel(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Causes a verification code to be delivered to the channel. The code can then be supplied in
- * `VerifyNotificationChannel` to verify the channel.
+ * Verifies a `NotificationChannel` by proving receipt of the code delivered to the channel as a
+ * result of calling `SendNotificationChannelVerificationCode`.
*
* Sample code:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
* NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
- * SendNotificationChannelVerificationCodeRequest request = SendNotificationChannelVerificationCodeRequest.newBuilder()
+ * String code = "";
+ * VerifyNotificationChannelRequest request = VerifyNotificationChannelRequest.newBuilder()
* .setName(name.toString())
+ * .setCode(code)
* .build();
- * notificationChannelServiceClient.sendNotificationChannelVerificationCode(request);
+ * NotificationChannel response = notificationChannelServiceClient.verifyNotificationChannel(request);
* }
*
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final void sendNotificationChannelVerificationCode(
- SendNotificationChannelVerificationCodeRequest request) {
- sendNotificationChannelVerificationCodeCallable().call(request);
+ public final NotificationChannel verifyNotificationChannel(
+ VerifyNotificationChannelRequest request) {
+ return verifyNotificationChannelCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Causes a verification code to be delivered to the channel. The code can then be supplied in
- * `VerifyNotificationChannel` to verify the channel.
+ * Verifies a `NotificationChannel` by proving receipt of the code delivered to the channel as a
+ * result of calling `SendNotificationChannelVerificationCode`.
*
* Sample code:
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
* NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
- * SendNotificationChannelVerificationCodeRequest request = SendNotificationChannelVerificationCodeRequest.newBuilder()
+ * String code = "";
+ * VerifyNotificationChannelRequest request = VerifyNotificationChannelRequest.newBuilder()
* .setName(name.toString())
+ * .setCode(code)
* .build();
- * ApiFuture<Void> future = notificationChannelServiceClient.sendNotificationChannelVerificationCodeCallable().futureCall(request);
+ * ApiFuture<NotificationChannel> future = notificationChannelServiceClient.verifyNotificationChannelCallable().futureCall(request);
* // Do something
- * future.get();
+ * NotificationChannel response = future.get();
* }
*
*/
- public final UnaryCallable
- sendNotificationChannelVerificationCodeCallable() {
- return stub.sendNotificationChannelVerificationCodeCallable();
+ public final UnaryCallable
+ verifyNotificationChannelCallable() {
+ return stub.verifyNotificationChannelCallable();
}
@Override
diff --git a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/NotificationChannelServiceSettings.java b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/NotificationChannelServiceSettings.java
index 5e93ad36..27781e95 100644
--- a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/NotificationChannelServiceSettings.java
+++ b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/NotificationChannelServiceSettings.java
@@ -65,16 +65,16 @@
* The builder of this class is recursive, so contained classes are themselves builders. When
* build() is called, the tree of builders is called to create the complete settings object.
*
- *
For example, to set the total timeout of deleteNotificationChannel to 30 seconds:
+ *
For example, to set the total timeout of getNotificationChannelDescriptor to 30 seconds:
*
*
*
* NotificationChannelServiceSettings.Builder notificationChannelServiceSettingsBuilder =
* NotificationChannelServiceSettings.newBuilder();
* notificationChannelServiceSettingsBuilder
- * .deleteNotificationChannelSettings()
+ * .getNotificationChannelDescriptorSettings()
* .setRetrySettings(
- * notificationChannelServiceSettingsBuilder.deleteNotificationChannelSettings().getRetrySettings().toBuilder()
+ * notificationChannelServiceSettingsBuilder.getNotificationChannelDescriptorSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* NotificationChannelServiceSettings notificationChannelServiceSettings = notificationChannelServiceSettingsBuilder.build();
@@ -84,31 +84,6 @@
@Generated("by gapic-generator")
public class NotificationChannelServiceSettings
extends ClientSettings {
- /** Returns the object with the settings used for calls to deleteNotificationChannel. */
- public UnaryCallSettings
- deleteNotificationChannelSettings() {
- return ((NotificationChannelServiceStubSettings) getStubSettings())
- .deleteNotificationChannelSettings();
- }
-
- /**
- * Returns the object with the settings used for calls to getNotificationChannelVerificationCode.
- */
- public UnaryCallSettings<
- GetNotificationChannelVerificationCodeRequest,
- GetNotificationChannelVerificationCodeResponse>
- getNotificationChannelVerificationCodeSettings() {
- return ((NotificationChannelServiceStubSettings) getStubSettings())
- .getNotificationChannelVerificationCodeSettings();
- }
-
- /** Returns the object with the settings used for calls to verifyNotificationChannel. */
- public UnaryCallSettings
- verifyNotificationChannelSettings() {
- return ((NotificationChannelServiceStubSettings) getStubSettings())
- .verifyNotificationChannelSettings();
- }
-
/** Returns the object with the settings used for calls to listNotificationChannelDescriptors. */
public PagedCallSettings<
ListNotificationChannelDescriptorsRequest,
@@ -157,6 +132,13 @@ public class NotificationChannelServiceSettings
.updateNotificationChannelSettings();
}
+ /** Returns the object with the settings used for calls to deleteNotificationChannel. */
+ public UnaryCallSettings
+ deleteNotificationChannelSettings() {
+ return ((NotificationChannelServiceStubSettings) getStubSettings())
+ .deleteNotificationChannelSettings();
+ }
+
/**
* Returns the object with the settings used for calls to sendNotificationChannelVerificationCode.
*/
@@ -166,6 +148,24 @@ public class NotificationChannelServiceSettings
.sendNotificationChannelVerificationCodeSettings();
}
+ /**
+ * Returns the object with the settings used for calls to getNotificationChannelVerificationCode.
+ */
+ public UnaryCallSettings<
+ GetNotificationChannelVerificationCodeRequest,
+ GetNotificationChannelVerificationCodeResponse>
+ getNotificationChannelVerificationCodeSettings() {
+ return ((NotificationChannelServiceStubSettings) getStubSettings())
+ .getNotificationChannelVerificationCodeSettings();
+ }
+
+ /** Returns the object with the settings used for calls to verifyNotificationChannel. */
+ public UnaryCallSettings
+ verifyNotificationChannelSettings() {
+ return ((NotificationChannelServiceStubSettings) getStubSettings())
+ .verifyNotificationChannelSettings();
+ }
+
public static final NotificationChannelServiceSettings create(
NotificationChannelServiceStubSettings stub) throws IOException {
return new NotificationChannelServiceSettings.Builder(stub.toBuilder()).build();
@@ -264,29 +264,6 @@ public Builder applyToAllUnaryMethods(
return this;
}
- /** Returns the builder for the settings used for calls to deleteNotificationChannel. */
- public UnaryCallSettings.Builder
- deleteNotificationChannelSettings() {
- return getStubSettingsBuilder().deleteNotificationChannelSettings();
- }
-
- /**
- * Returns the builder for the settings used for calls to
- * getNotificationChannelVerificationCode.
- */
- public UnaryCallSettings.Builder<
- GetNotificationChannelVerificationCodeRequest,
- GetNotificationChannelVerificationCodeResponse>
- getNotificationChannelVerificationCodeSettings() {
- return getStubSettingsBuilder().getNotificationChannelVerificationCodeSettings();
- }
-
- /** Returns the builder for the settings used for calls to verifyNotificationChannel. */
- public UnaryCallSettings.Builder
- verifyNotificationChannelSettings() {
- return getStubSettingsBuilder().verifyNotificationChannelSettings();
- }
-
/**
* Returns the builder for the settings used for calls to listNotificationChannelDescriptors.
*/
@@ -332,6 +309,12 @@ public Builder applyToAllUnaryMethods(
return getStubSettingsBuilder().updateNotificationChannelSettings();
}
+ /** Returns the builder for the settings used for calls to deleteNotificationChannel. */
+ public UnaryCallSettings.Builder
+ deleteNotificationChannelSettings() {
+ return getStubSettingsBuilder().deleteNotificationChannelSettings();
+ }
+
/**
* Returns the builder for the settings used for calls to
* sendNotificationChannelVerificationCode.
@@ -341,6 +324,23 @@ public Builder applyToAllUnaryMethods(
return getStubSettingsBuilder().sendNotificationChannelVerificationCodeSettings();
}
+ /**
+ * Returns the builder for the settings used for calls to
+ * getNotificationChannelVerificationCode.
+ */
+ public UnaryCallSettings.Builder<
+ GetNotificationChannelVerificationCodeRequest,
+ GetNotificationChannelVerificationCodeResponse>
+ getNotificationChannelVerificationCodeSettings() {
+ return getStubSettingsBuilder().getNotificationChannelVerificationCodeSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to verifyNotificationChannel. */
+ public UnaryCallSettings.Builder
+ verifyNotificationChannelSettings() {
+ return getStubSettingsBuilder().verifyNotificationChannelSettings();
+ }
+
@Override
public NotificationChannelServiceSettings build() throws IOException {
return new NotificationChannelServiceSettings(this);
diff --git a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/ServiceMonitoringServiceClient.java b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/ServiceMonitoringServiceClient.java
index af70cea0..7819ccf1 100644
--- a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/ServiceMonitoringServiceClient.java
+++ b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/ServiceMonitoringServiceClient.java
@@ -63,8 +63,9 @@
*
*
* try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
- * ServiceName name = ServiceName.ofProjectServiceName("[PROJECT]", "[SERVICE]");
- * serviceMonitoringServiceClient.deleteService(name);
+ * ResourceName parent = ProjectName.of("[PROJECT]");
+ * Service service = Service.newBuilder().build();
+ * Service response = serviceMonitoringServiceClient.createService(parent, service);
* }
*
*
@@ -175,190 +176,6 @@ public ServiceMonitoringServiceStub getStub() {
return stub;
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Soft delete this `Service`.
- *
- * Sample code:
- *
- *
- * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
- * ServiceName name = ServiceName.ofProjectServiceName("[PROJECT]", "[SERVICE]");
- * serviceMonitoringServiceClient.deleteService(name);
- * }
- *
- *
- * @param name Required. Resource name of the `Service` to delete. The format is:
- * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void deleteService(ServiceName name) {
- DeleteServiceRequest request =
- DeleteServiceRequest.newBuilder().setName(name == null ? null : name.toString()).build();
- deleteService(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Soft delete this `Service`.
- *
- *
Sample code:
- *
- *
- * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
- * ServiceName name = ServiceName.ofProjectServiceName("[PROJECT]", "[SERVICE]");
- * serviceMonitoringServiceClient.deleteService(name.toString());
- * }
- *
- *
- * @param name Required. Resource name of the `Service` to delete. The format is:
- * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void deleteService(String name) {
- DeleteServiceRequest request = DeleteServiceRequest.newBuilder().setName(name).build();
- deleteService(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Soft delete this `Service`.
- *
- *
Sample code:
- *
- *
- * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
- * ServiceName name = ServiceName.ofProjectServiceName("[PROJECT]", "[SERVICE]");
- * DeleteServiceRequest request = DeleteServiceRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * serviceMonitoringServiceClient.deleteService(request);
- * }
- *
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void deleteService(DeleteServiceRequest request) {
- deleteServiceCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Soft delete this `Service`.
- *
- * Sample code:
- *
- *
- * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
- * ServiceName name = ServiceName.ofProjectServiceName("[PROJECT]", "[SERVICE]");
- * DeleteServiceRequest request = DeleteServiceRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Void> future = serviceMonitoringServiceClient.deleteServiceCallable().futureCall(request);
- * // Do something
- * future.get();
- * }
- *
- */
- public final UnaryCallable deleteServiceCallable() {
- return stub.deleteServiceCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Delete the given `ServiceLevelObjective`.
- *
- * Sample code:
- *
- *
- * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
- * ServiceLevelObjectiveName name = ServiceLevelObjectiveName.ofProjectServiceServiceLevelObjectiveName("[PROJECT]", "[SERVICE]", "[SERVICE_LEVEL_OBJECTIVE]");
- * serviceMonitoringServiceClient.deleteServiceLevelObjective(name);
- * }
- *
- *
- * @param name Required. Resource name of the `ServiceLevelObjective` to delete. The format is:
- * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void deleteServiceLevelObjective(ServiceLevelObjectiveName name) {
- DeleteServiceLevelObjectiveRequest request =
- DeleteServiceLevelObjectiveRequest.newBuilder()
- .setName(name == null ? null : name.toString())
- .build();
- deleteServiceLevelObjective(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Delete the given `ServiceLevelObjective`.
- *
- *
Sample code:
- *
- *
- * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
- * ServiceLevelObjectiveName name = ServiceLevelObjectiveName.ofProjectServiceServiceLevelObjectiveName("[PROJECT]", "[SERVICE]", "[SERVICE_LEVEL_OBJECTIVE]");
- * serviceMonitoringServiceClient.deleteServiceLevelObjective(name.toString());
- * }
- *
- *
- * @param name Required. Resource name of the `ServiceLevelObjective` to delete. The format is:
- * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void deleteServiceLevelObjective(String name) {
- DeleteServiceLevelObjectiveRequest request =
- DeleteServiceLevelObjectiveRequest.newBuilder().setName(name).build();
- deleteServiceLevelObjective(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Delete the given `ServiceLevelObjective`.
- *
- *
Sample code:
- *
- *
- * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
- * ServiceLevelObjectiveName name = ServiceLevelObjectiveName.ofProjectServiceServiceLevelObjectiveName("[PROJECT]", "[SERVICE]", "[SERVICE_LEVEL_OBJECTIVE]");
- * DeleteServiceLevelObjectiveRequest request = DeleteServiceLevelObjectiveRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * serviceMonitoringServiceClient.deleteServiceLevelObjective(request);
- * }
- *
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void deleteServiceLevelObjective(DeleteServiceLevelObjectiveRequest request) {
- deleteServiceLevelObjectiveCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Delete the given `ServiceLevelObjective`.
- *
- * Sample code:
- *
- *
- * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
- * ServiceLevelObjectiveName name = ServiceLevelObjectiveName.ofProjectServiceServiceLevelObjectiveName("[PROJECT]", "[SERVICE]", "[SERVICE_LEVEL_OBJECTIVE]");
- * DeleteServiceLevelObjectiveRequest request = DeleteServiceLevelObjectiveRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Void> future = serviceMonitoringServiceClient.deleteServiceLevelObjectiveCallable().futureCall(request);
- * // Do something
- * future.get();
- * }
- *
- */
- public final UnaryCallable
- deleteServiceLevelObjectiveCallable() {
- return stub.deleteServiceLevelObjectiveCallable();
- }
-
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Create a `Service`.
@@ -752,6 +569,96 @@ public final UnaryCallable updateServiceCallable(
return stub.updateServiceCallable();
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Soft delete this `Service`.
+ *
+ * Sample code:
+ *
+ *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceName name = ServiceName.ofProjectServiceName("[PROJECT]", "[SERVICE]");
+ * serviceMonitoringServiceClient.deleteService(name);
+ * }
+ *
+ *
+ * @param name Required. Resource name of the `Service` to delete. The format is:
+ * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteService(ServiceName name) {
+ DeleteServiceRequest request =
+ DeleteServiceRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ deleteService(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Soft delete this `Service`.
+ *
+ *
Sample code:
+ *
+ *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceName name = ServiceName.ofProjectServiceName("[PROJECT]", "[SERVICE]");
+ * serviceMonitoringServiceClient.deleteService(name.toString());
+ * }
+ *
+ *
+ * @param name Required. Resource name of the `Service` to delete. The format is:
+ * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteService(String name) {
+ DeleteServiceRequest request = DeleteServiceRequest.newBuilder().setName(name).build();
+ deleteService(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Soft delete this `Service`.
+ *
+ *
Sample code:
+ *
+ *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceName name = ServiceName.ofProjectServiceName("[PROJECT]", "[SERVICE]");
+ * DeleteServiceRequest request = DeleteServiceRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * serviceMonitoringServiceClient.deleteService(request);
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteService(DeleteServiceRequest request) {
+ deleteServiceCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Soft delete this `Service`.
+ *
+ * Sample code:
+ *
+ *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceName name = ServiceName.ofProjectServiceName("[PROJECT]", "[SERVICE]");
+ * DeleteServiceRequest request = DeleteServiceRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * ApiFuture<Void> future = serviceMonitoringServiceClient.deleteServiceCallable().futureCall(request);
+ * // Do something
+ * future.get();
+ * }
+ *
+ */
+ public final UnaryCallable deleteServiceCallable() {
+ return stub.deleteServiceCallable();
+ }
+
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Create a `ServiceLevelObjective` for the given `Service`.
@@ -1172,6 +1079,100 @@ public final ServiceLevelObjective updateServiceLevelObjective(
return stub.updateServiceLevelObjectiveCallable();
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Delete the given `ServiceLevelObjective`.
+ *
+ * Sample code:
+ *
+ *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceLevelObjectiveName name = ServiceLevelObjectiveName.ofProjectServiceServiceLevelObjectiveName("[PROJECT]", "[SERVICE]", "[SERVICE_LEVEL_OBJECTIVE]");
+ * serviceMonitoringServiceClient.deleteServiceLevelObjective(name);
+ * }
+ *
+ *
+ * @param name Required. Resource name of the `ServiceLevelObjective` to delete. The format is:
+ * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteServiceLevelObjective(ServiceLevelObjectiveName name) {
+ DeleteServiceLevelObjectiveRequest request =
+ DeleteServiceLevelObjectiveRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ deleteServiceLevelObjective(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Delete the given `ServiceLevelObjective`.
+ *
+ *
Sample code:
+ *
+ *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceLevelObjectiveName name = ServiceLevelObjectiveName.ofProjectServiceServiceLevelObjectiveName("[PROJECT]", "[SERVICE]", "[SERVICE_LEVEL_OBJECTIVE]");
+ * serviceMonitoringServiceClient.deleteServiceLevelObjective(name.toString());
+ * }
+ *
+ *
+ * @param name Required. Resource name of the `ServiceLevelObjective` to delete. The format is:
+ * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteServiceLevelObjective(String name) {
+ DeleteServiceLevelObjectiveRequest request =
+ DeleteServiceLevelObjectiveRequest.newBuilder().setName(name).build();
+ deleteServiceLevelObjective(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Delete the given `ServiceLevelObjective`.
+ *
+ *
Sample code:
+ *
+ *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceLevelObjectiveName name = ServiceLevelObjectiveName.ofProjectServiceServiceLevelObjectiveName("[PROJECT]", "[SERVICE]", "[SERVICE_LEVEL_OBJECTIVE]");
+ * DeleteServiceLevelObjectiveRequest request = DeleteServiceLevelObjectiveRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * serviceMonitoringServiceClient.deleteServiceLevelObjective(request);
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteServiceLevelObjective(DeleteServiceLevelObjectiveRequest request) {
+ deleteServiceLevelObjectiveCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Delete the given `ServiceLevelObjective`.
+ *
+ * Sample code:
+ *
+ *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceLevelObjectiveName name = ServiceLevelObjectiveName.ofProjectServiceServiceLevelObjectiveName("[PROJECT]", "[SERVICE]", "[SERVICE_LEVEL_OBJECTIVE]");
+ * DeleteServiceLevelObjectiveRequest request = DeleteServiceLevelObjectiveRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * ApiFuture<Void> future = serviceMonitoringServiceClient.deleteServiceLevelObjectiveCallable().futureCall(request);
+ * // Do something
+ * future.get();
+ * }
+ *
+ */
+ public final UnaryCallable
+ deleteServiceLevelObjectiveCallable() {
+ return stub.deleteServiceLevelObjectiveCallable();
+ }
+
@Override
public final void close() {
stub.close();
diff --git a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/ServiceMonitoringServiceSettings.java b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/ServiceMonitoringServiceSettings.java
index 91cdfb87..1d7f696d 100644
--- a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/ServiceMonitoringServiceSettings.java
+++ b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/ServiceMonitoringServiceSettings.java
@@ -64,16 +64,16 @@
* The builder of this class is recursive, so contained classes are themselves builders. When
* build() is called, the tree of builders is called to create the complete settings object.
*
- *
For example, to set the total timeout of deleteService to 30 seconds:
+ *
For example, to set the total timeout of createService to 30 seconds:
*
*
*
* ServiceMonitoringServiceSettings.Builder serviceMonitoringServiceSettingsBuilder =
* ServiceMonitoringServiceSettings.newBuilder();
* serviceMonitoringServiceSettingsBuilder
- * .deleteServiceSettings()
+ * .createServiceSettings()
* .setRetrySettings(
- * serviceMonitoringServiceSettingsBuilder.deleteServiceSettings().getRetrySettings().toBuilder()
+ * serviceMonitoringServiceSettingsBuilder.createServiceSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* ServiceMonitoringServiceSettings serviceMonitoringServiceSettings = serviceMonitoringServiceSettingsBuilder.build();
@@ -83,18 +83,6 @@
@Generated("by gapic-generator")
public class ServiceMonitoringServiceSettings
extends ClientSettings {
- /** Returns the object with the settings used for calls to deleteService. */
- public UnaryCallSettings deleteServiceSettings() {
- return ((ServiceMonitoringServiceStubSettings) getStubSettings()).deleteServiceSettings();
- }
-
- /** Returns the object with the settings used for calls to deleteServiceLevelObjective. */
- public UnaryCallSettings
- deleteServiceLevelObjectiveSettings() {
- return ((ServiceMonitoringServiceStubSettings) getStubSettings())
- .deleteServiceLevelObjectiveSettings();
- }
-
/** Returns the object with the settings used for calls to createService. */
public UnaryCallSettings createServiceSettings() {
return ((ServiceMonitoringServiceStubSettings) getStubSettings()).createServiceSettings();
@@ -116,6 +104,11 @@ public UnaryCallSettings updateServiceSettings()
return ((ServiceMonitoringServiceStubSettings) getStubSettings()).updateServiceSettings();
}
+ /** Returns the object with the settings used for calls to deleteService. */
+ public UnaryCallSettings deleteServiceSettings() {
+ return ((ServiceMonitoringServiceStubSettings) getStubSettings()).deleteServiceSettings();
+ }
+
/** Returns the object with the settings used for calls to createServiceLevelObjective. */
public UnaryCallSettings
createServiceLevelObjectiveSettings() {
@@ -147,6 +140,13 @@ public UnaryCallSettings updateServiceSettings()
.updateServiceLevelObjectiveSettings();
}
+ /** Returns the object with the settings used for calls to deleteServiceLevelObjective. */
+ public UnaryCallSettings
+ deleteServiceLevelObjectiveSettings() {
+ return ((ServiceMonitoringServiceStubSettings) getStubSettings())
+ .deleteServiceLevelObjectiveSettings();
+ }
+
public static final ServiceMonitoringServiceSettings create(
ServiceMonitoringServiceStubSettings stub) throws IOException {
return new ServiceMonitoringServiceSettings.Builder(stub.toBuilder()).build();
@@ -245,17 +245,6 @@ public Builder applyToAllUnaryMethods(
return this;
}
- /** Returns the builder for the settings used for calls to deleteService. */
- public UnaryCallSettings.Builder deleteServiceSettings() {
- return getStubSettingsBuilder().deleteServiceSettings();
- }
-
- /** Returns the builder for the settings used for calls to deleteServiceLevelObjective. */
- public UnaryCallSettings.Builder
- deleteServiceLevelObjectiveSettings() {
- return getStubSettingsBuilder().deleteServiceLevelObjectiveSettings();
- }
-
/** Returns the builder for the settings used for calls to createService. */
public UnaryCallSettings.Builder createServiceSettings() {
return getStubSettingsBuilder().createServiceSettings();
@@ -278,6 +267,11 @@ public UnaryCallSettings.Builder updateServiceSet
return getStubSettingsBuilder().updateServiceSettings();
}
+ /** Returns the builder for the settings used for calls to deleteService. */
+ public UnaryCallSettings.Builder deleteServiceSettings() {
+ return getStubSettingsBuilder().deleteServiceSettings();
+ }
+
/** Returns the builder for the settings used for calls to createServiceLevelObjective. */
public UnaryCallSettings.Builder
createServiceLevelObjectiveSettings() {
@@ -305,6 +299,12 @@ public UnaryCallSettings.Builder updateServiceSet
return getStubSettingsBuilder().updateServiceLevelObjectiveSettings();
}
+ /** Returns the builder for the settings used for calls to deleteServiceLevelObjective. */
+ public UnaryCallSettings.Builder
+ deleteServiceLevelObjectiveSettings() {
+ return getStubSettingsBuilder().deleteServiceLevelObjectiveSettings();
+ }
+
@Override
public ServiceMonitoringServiceSettings build() throws IOException {
return new ServiceMonitoringServiceSettings(this);
diff --git a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/UptimeCheckServiceClient.java b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/UptimeCheckServiceClient.java
index 6a187978..f2a0fd02 100644
--- a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/UptimeCheckServiceClient.java
+++ b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/UptimeCheckServiceClient.java
@@ -62,7 +62,7 @@
*
* try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
* UptimeCheckConfigName name = UptimeCheckConfigName.ofProjectUptimeCheckConfigName("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
- * uptimeCheckServiceClient.deleteUptimeCheckConfig(name);
+ * UptimeCheckConfig response = uptimeCheckServiceClient.getUptimeCheckConfig(name);
* }
*
*
@@ -171,108 +171,6 @@ public UptimeCheckServiceStub getStub() {
return stub;
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Deletes an Uptime check configuration. Note that this method will fail if the Uptime check
- * configuration is referenced by an alert policy or other dependent configs that would be
- * rendered invalid by the deletion.
- *
- * Sample code:
- *
- *
- * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
- * UptimeCheckConfigName name = UptimeCheckConfigName.ofProjectUptimeCheckConfigName("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
- * uptimeCheckServiceClient.deleteUptimeCheckConfig(name);
- * }
- *
- *
- * @param name Required. The Uptime check configuration to delete. The format is:
- * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID]
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void deleteUptimeCheckConfig(UptimeCheckConfigName name) {
- DeleteUptimeCheckConfigRequest request =
- DeleteUptimeCheckConfigRequest.newBuilder()
- .setName(name == null ? null : name.toString())
- .build();
- deleteUptimeCheckConfig(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Deletes an Uptime check configuration. Note that this method will fail if the Uptime check
- * configuration is referenced by an alert policy or other dependent configs that would be
- * rendered invalid by the deletion.
- *
- *
Sample code:
- *
- *
- * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
- * UptimeCheckConfigName name = UptimeCheckConfigName.ofProjectUptimeCheckConfigName("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
- * uptimeCheckServiceClient.deleteUptimeCheckConfig(name.toString());
- * }
- *
- *
- * @param name Required. The Uptime check configuration to delete. The format is:
- * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID]
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void deleteUptimeCheckConfig(String name) {
- DeleteUptimeCheckConfigRequest request =
- DeleteUptimeCheckConfigRequest.newBuilder().setName(name).build();
- deleteUptimeCheckConfig(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Deletes an Uptime check configuration. Note that this method will fail if the Uptime check
- * configuration is referenced by an alert policy or other dependent configs that would be
- * rendered invalid by the deletion.
- *
- *
Sample code:
- *
- *
- * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
- * UptimeCheckConfigName name = UptimeCheckConfigName.ofProjectUptimeCheckConfigName("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
- * DeleteUptimeCheckConfigRequest request = DeleteUptimeCheckConfigRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * uptimeCheckServiceClient.deleteUptimeCheckConfig(request);
- * }
- *
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void deleteUptimeCheckConfig(DeleteUptimeCheckConfigRequest request) {
- deleteUptimeCheckConfigCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Deletes an Uptime check configuration. Note that this method will fail if the Uptime check
- * configuration is referenced by an alert policy or other dependent configs that would be
- * rendered invalid by the deletion.
- *
- * Sample code:
- *
- *
- * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
- * UptimeCheckConfigName name = UptimeCheckConfigName.ofProjectUptimeCheckConfigName("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
- * DeleteUptimeCheckConfigRequest request = DeleteUptimeCheckConfigRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Void> future = uptimeCheckServiceClient.deleteUptimeCheckConfigCallable().futureCall(request);
- * // Do something
- * future.get();
- * }
- *
- */
- public final UnaryCallable
- deleteUptimeCheckConfigCallable() {
- return stub.deleteUptimeCheckConfigCallable();
- }
-
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Lists the existing valid Uptime check configurations for the project (leaving out any invalid
@@ -698,6 +596,108 @@ public final UptimeCheckConfig updateUptimeCheckConfig(UpdateUptimeCheckConfigRe
return stub.updateUptimeCheckConfigCallable();
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes an Uptime check configuration. Note that this method will fail if the Uptime check
+ * configuration is referenced by an alert policy or other dependent configs that would be
+ * rendered invalid by the deletion.
+ *
+ * Sample code:
+ *
+ *
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * UptimeCheckConfigName name = UptimeCheckConfigName.ofProjectUptimeCheckConfigName("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
+ * uptimeCheckServiceClient.deleteUptimeCheckConfig(name);
+ * }
+ *
+ *
+ * @param name Required. The Uptime check configuration to delete. The format is:
+ * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID]
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteUptimeCheckConfig(UptimeCheckConfigName name) {
+ DeleteUptimeCheckConfigRequest request =
+ DeleteUptimeCheckConfigRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ deleteUptimeCheckConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes an Uptime check configuration. Note that this method will fail if the Uptime check
+ * configuration is referenced by an alert policy or other dependent configs that would be
+ * rendered invalid by the deletion.
+ *
+ *
Sample code:
+ *
+ *
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * UptimeCheckConfigName name = UptimeCheckConfigName.ofProjectUptimeCheckConfigName("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
+ * uptimeCheckServiceClient.deleteUptimeCheckConfig(name.toString());
+ * }
+ *
+ *
+ * @param name Required. The Uptime check configuration to delete. The format is:
+ * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID]
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteUptimeCheckConfig(String name) {
+ DeleteUptimeCheckConfigRequest request =
+ DeleteUptimeCheckConfigRequest.newBuilder().setName(name).build();
+ deleteUptimeCheckConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes an Uptime check configuration. Note that this method will fail if the Uptime check
+ * configuration is referenced by an alert policy or other dependent configs that would be
+ * rendered invalid by the deletion.
+ *
+ *
Sample code:
+ *
+ *
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * UptimeCheckConfigName name = UptimeCheckConfigName.ofProjectUptimeCheckConfigName("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
+ * DeleteUptimeCheckConfigRequest request = DeleteUptimeCheckConfigRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * uptimeCheckServiceClient.deleteUptimeCheckConfig(request);
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteUptimeCheckConfig(DeleteUptimeCheckConfigRequest request) {
+ deleteUptimeCheckConfigCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes an Uptime check configuration. Note that this method will fail if the Uptime check
+ * configuration is referenced by an alert policy or other dependent configs that would be
+ * rendered invalid by the deletion.
+ *
+ * Sample code:
+ *
+ *
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * UptimeCheckConfigName name = UptimeCheckConfigName.ofProjectUptimeCheckConfigName("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
+ * DeleteUptimeCheckConfigRequest request = DeleteUptimeCheckConfigRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * ApiFuture<Void> future = uptimeCheckServiceClient.deleteUptimeCheckConfigCallable().futureCall(request);
+ * // Do something
+ * future.get();
+ * }
+ *
+ */
+ public final UnaryCallable
+ deleteUptimeCheckConfigCallable() {
+ return stub.deleteUptimeCheckConfigCallable();
+ }
+
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Returns the list of IP addresses that checkers run from
diff --git a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/UptimeCheckServiceSettings.java b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/UptimeCheckServiceSettings.java
index f250407d..e0adbb59 100644
--- a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/UptimeCheckServiceSettings.java
+++ b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/UptimeCheckServiceSettings.java
@@ -59,16 +59,16 @@
* The builder of this class is recursive, so contained classes are themselves builders. When
* build() is called, the tree of builders is called to create the complete settings object.
*
- *
For example, to set the total timeout of deleteUptimeCheckConfig to 30 seconds:
+ *
For example, to set the total timeout of getUptimeCheckConfig to 30 seconds:
*
*
*
* UptimeCheckServiceSettings.Builder uptimeCheckServiceSettingsBuilder =
* UptimeCheckServiceSettings.newBuilder();
* uptimeCheckServiceSettingsBuilder
- * .deleteUptimeCheckConfigSettings()
+ * .getUptimeCheckConfigSettings()
* .setRetrySettings(
- * uptimeCheckServiceSettingsBuilder.deleteUptimeCheckConfigSettings().getRetrySettings().toBuilder()
+ * uptimeCheckServiceSettingsBuilder.getUptimeCheckConfigSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* UptimeCheckServiceSettings uptimeCheckServiceSettings = uptimeCheckServiceSettingsBuilder.build();
@@ -77,12 +77,6 @@
*/
@Generated("by gapic-generator")
public class UptimeCheckServiceSettings extends ClientSettings {
- /** Returns the object with the settings used for calls to deleteUptimeCheckConfig. */
- public UnaryCallSettings
- deleteUptimeCheckConfigSettings() {
- return ((UptimeCheckServiceStubSettings) getStubSettings()).deleteUptimeCheckConfigSettings();
- }
-
/** Returns the object with the settings used for calls to listUptimeCheckConfigs. */
public PagedCallSettings<
ListUptimeCheckConfigsRequest,
@@ -110,6 +104,12 @@ public class UptimeCheckServiceSettings extends ClientSettings
+ deleteUptimeCheckConfigSettings() {
+ return ((UptimeCheckServiceStubSettings) getStubSettings()).deleteUptimeCheckConfigSettings();
+ }
+
/** Returns the object with the settings used for calls to listUptimeCheckIps. */
public PagedCallSettings<
ListUptimeCheckIpsRequest, ListUptimeCheckIpsResponse, ListUptimeCheckIpsPagedResponse>
@@ -214,12 +214,6 @@ public Builder applyToAllUnaryMethods(
return this;
}
- /** Returns the builder for the settings used for calls to deleteUptimeCheckConfig. */
- public UnaryCallSettings.Builder
- deleteUptimeCheckConfigSettings() {
- return getStubSettingsBuilder().deleteUptimeCheckConfigSettings();
- }
-
/** Returns the builder for the settings used for calls to listUptimeCheckConfigs. */
public PagedCallSettings.Builder<
ListUptimeCheckConfigsRequest,
@@ -247,6 +241,12 @@ public Builder applyToAllUnaryMethods(
return getStubSettingsBuilder().updateUptimeCheckConfigSettings();
}
+ /** Returns the builder for the settings used for calls to deleteUptimeCheckConfig. */
+ public UnaryCallSettings.Builder
+ deleteUptimeCheckConfigSettings() {
+ return getStubSettingsBuilder().deleteUptimeCheckConfigSettings();
+ }
+
/** Returns the builder for the settings used for calls to listUptimeCheckIps. */
public PagedCallSettings.Builder<
ListUptimeCheckIpsRequest, ListUptimeCheckIpsResponse, ListUptimeCheckIpsPagedResponse>
diff --git a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/package-info.java b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/package-info.java
index 60f28e53..a7fffa1b 100644
--- a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/package-info.java
+++ b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/package-info.java
@@ -34,7 +34,7 @@
*
* try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) {
* AlertPolicyName name = AlertPolicyName.ofProjectAlertPolicyName("[PROJECT]", "[ALERT_POLICY]");
- * alertPolicyServiceClient.deleteAlertPolicy(name);
+ * AlertPolicy response = alertPolicyServiceClient.getAlertPolicy(name);
* }
*
*
@@ -56,8 +56,8 @@
*
*
* try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) {
- * Group group = Group.newBuilder().build();
- * Group response = groupServiceClient.updateGroup(group);
+ * GroupName name = GroupName.ofProjectGroupName("[PROJECT]", "[GROUP]");
+ * Group response = groupServiceClient.getGroup(name);
* }
*
*
@@ -89,9 +89,8 @@
*
*
* try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) {
- * NotificationChannelName name = NotificationChannelName.ofProjectNotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
- * boolean force = false;
- * notificationChannelServiceClient.deleteNotificationChannel(name, force);
+ * NotificationChannelDescriptorName name = NotificationChannelDescriptorName.ofProjectChannelDescriptorName("[PROJECT]", "[CHANNEL_DESCRIPTOR]");
+ * NotificationChannelDescriptor response = notificationChannelServiceClient.getNotificationChannelDescriptor(name);
* }
*
*
@@ -107,8 +106,9 @@
*
*
* try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
- * ServiceName name = ServiceName.ofProjectServiceName("[PROJECT]", "[SERVICE]");
- * serviceMonitoringServiceClient.deleteService(name);
+ * ResourceName parent = ProjectName.of("[PROJECT]");
+ * Service service = Service.newBuilder().build();
+ * Service response = serviceMonitoringServiceClient.createService(parent, service);
* }
*
*
@@ -128,7 +128,7 @@
*
* try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
* UptimeCheckConfigName name = UptimeCheckConfigName.ofProjectUptimeCheckConfigName("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
- * uptimeCheckServiceClient.deleteUptimeCheckConfig(name);
+ * UptimeCheckConfig response = uptimeCheckServiceClient.getUptimeCheckConfig(name);
* }
*
*
diff --git a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/AlertPolicyServiceStub.java b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/AlertPolicyServiceStub.java
index 330f4683..9bdd015c 100644
--- a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/AlertPolicyServiceStub.java
+++ b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/AlertPolicyServiceStub.java
@@ -40,10 +40,6 @@
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public abstract class AlertPolicyServiceStub implements BackgroundResource {
- public UnaryCallable deleteAlertPolicyCallable() {
- throw new UnsupportedOperationException("Not implemented: deleteAlertPolicyCallable()");
- }
-
public UnaryCallable
listAlertPoliciesPagedCallable() {
throw new UnsupportedOperationException("Not implemented: listAlertPoliciesPagedCallable()");
@@ -62,6 +58,10 @@ public UnaryCallable createAlertPolicyCal
throw new UnsupportedOperationException("Not implemented: createAlertPolicyCallable()");
}
+ public UnaryCallable deleteAlertPolicyCallable() {
+ throw new UnsupportedOperationException("Not implemented: deleteAlertPolicyCallable()");
+ }
+
public UnaryCallable updateAlertPolicyCallable() {
throw new UnsupportedOperationException("Not implemented: updateAlertPolicyCallable()");
}
diff --git a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/AlertPolicyServiceStubSettings.java b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/AlertPolicyServiceStubSettings.java
index b6591ce1..88b5a2b9 100644
--- a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/AlertPolicyServiceStubSettings.java
+++ b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/AlertPolicyServiceStubSettings.java
@@ -71,16 +71,16 @@
* The builder of this class is recursive, so contained classes are themselves builders. When
* build() is called, the tree of builders is called to create the complete settings object.
*
- *
For example, to set the total timeout of deleteAlertPolicy to 30 seconds:
+ *
For example, to set the total timeout of getAlertPolicy to 30 seconds:
*
*
*
* AlertPolicyServiceStubSettings.Builder alertPolicyServiceSettingsBuilder =
* AlertPolicyServiceStubSettings.newBuilder();
* alertPolicyServiceSettingsBuilder
- * .deleteAlertPolicySettings()
+ * .getAlertPolicySettings()
* .setRetrySettings(
- * alertPolicyServiceSettingsBuilder.deleteAlertPolicySettings().getRetrySettings().toBuilder()
+ * alertPolicyServiceSettingsBuilder.getAlertPolicySettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* AlertPolicyServiceStubSettings alertPolicyServiceSettings = alertPolicyServiceSettingsBuilder.build();
@@ -98,19 +98,14 @@ public class AlertPolicyServiceStubSettings extends StubSettings deleteAlertPolicySettings;
private final PagedCallSettings<
ListAlertPoliciesRequest, ListAlertPoliciesResponse, ListAlertPoliciesPagedResponse>
listAlertPoliciesSettings;
private final UnaryCallSettings getAlertPolicySettings;
private final UnaryCallSettings createAlertPolicySettings;
+ private final UnaryCallSettings deleteAlertPolicySettings;
private final UnaryCallSettings updateAlertPolicySettings;
- /** Returns the object with the settings used for calls to deleteAlertPolicy. */
- public UnaryCallSettings deleteAlertPolicySettings() {
- return deleteAlertPolicySettings;
- }
-
/** Returns the object with the settings used for calls to listAlertPolicies. */
public PagedCallSettings<
ListAlertPoliciesRequest, ListAlertPoliciesResponse, ListAlertPoliciesPagedResponse>
@@ -128,6 +123,11 @@ public UnaryCallSettings createAlertPolic
return createAlertPolicySettings;
}
+ /** Returns the object with the settings used for calls to deleteAlertPolicy. */
+ public UnaryCallSettings deleteAlertPolicySettings() {
+ return deleteAlertPolicySettings;
+ }
+
/** Returns the object with the settings used for calls to updateAlertPolicy. */
public UnaryCallSettings updateAlertPolicySettings() {
return updateAlertPolicySettings;
@@ -202,10 +202,10 @@ public Builder toBuilder() {
protected AlertPolicyServiceStubSettings(Builder settingsBuilder) throws IOException {
super(settingsBuilder);
- deleteAlertPolicySettings = settingsBuilder.deleteAlertPolicySettings().build();
listAlertPoliciesSettings = settingsBuilder.listAlertPoliciesSettings().build();
getAlertPolicySettings = settingsBuilder.getAlertPolicySettings().build();
createAlertPolicySettings = settingsBuilder.createAlertPolicySettings().build();
+ deleteAlertPolicySettings = settingsBuilder.deleteAlertPolicySettings().build();
updateAlertPolicySettings = settingsBuilder.updateAlertPolicySettings().build();
}
@@ -275,8 +275,6 @@ public static class Builder
extends StubSettings.Builder {
private final ImmutableList> unaryMethodSettingsBuilders;
- private final UnaryCallSettings.Builder
- deleteAlertPolicySettings;
private final PagedCallSettings.Builder<
ListAlertPoliciesRequest, ListAlertPoliciesResponse, ListAlertPoliciesPagedResponse>
listAlertPoliciesSettings;
@@ -284,6 +282,8 @@ public static class Builder
getAlertPolicySettings;
private final UnaryCallSettings.Builder
createAlertPolicySettings;
+ private final UnaryCallSettings.Builder
+ deleteAlertPolicySettings;
private final UnaryCallSettings.Builder
updateAlertPolicySettings;
@@ -294,11 +294,48 @@ public static class Builder
ImmutableMap.Builder> definitions =
ImmutableMap.builder();
definitions.put(
- "idempotent",
+ "retry_policy_1_codes",
+ ImmutableSet.copyOf(
+ Lists.newArrayList(
+ StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
+ definitions.put(
+ "no_retry_2_codes", ImmutableSet.copyOf(Lists.newArrayList()));
+ definitions.put(
+ "retry_policy_6_codes",
+ ImmutableSet.copyOf(
+ Lists.newArrayList(
+ StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
+ definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList()));
+ definitions.put(
+ "no_retry_3_codes", ImmutableSet.copyOf(Lists.newArrayList()));
+ definitions.put(
+ "retry_policy_3_codes",
+ ImmutableSet.copyOf(
+ Lists.newArrayList(
+ StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
+ definitions.put(
+ "retry_policy_2_codes",
+ ImmutableSet.copyOf(
+ Lists.newArrayList(
+ StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
+ definitions.put(
+ "retry_policy_4_codes",
+ ImmutableSet.copyOf(
+ Lists.newArrayList(
+ StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
+ definitions.put(
+ "no_retry_4_codes", ImmutableSet.copyOf(Lists.newArrayList()));
+ definitions.put(
+ "no_retry_6_codes", ImmutableSet.copyOf(Lists.newArrayList()));
+ definitions.put(
+ "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList()));
+ definitions.put(
+ "retry_policy_5_codes",
ImmutableSet.copyOf(
Lists.newArrayList(
StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
- definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.newArrayList()));
+ definitions.put(
+ "no_retry_5_codes", ImmutableSet.copyOf(Lists.newArrayList()));
RETRYABLE_CODE_DEFINITIONS = definitions.build();
}
@@ -307,17 +344,122 @@ public static class Builder
static {
ImmutableMap.Builder definitions = ImmutableMap.builder();
RetrySettings settings = null;
+ settings =
+ RetrySettings.newBuilder()
+ .setInitialRpcTimeout(Duration.ofMillis(12000L))
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ofMillis(12000L))
+ .setTotalTimeout(Duration.ofMillis(12000L))
+ .build();
+ definitions.put("no_retry_3_params", settings);
+ settings =
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(100L))
+ .setRetryDelayMultiplier(1.3)
+ .setMaxRetryDelay(Duration.ofMillis(30000L))
+ .setInitialRpcTimeout(Duration.ofMillis(30000L))
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ofMillis(30000L))
+ .setTotalTimeout(Duration.ofMillis(30000L))
+ .build();
+ definitions.put("retry_policy_6_params", settings);
+ settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build();
+ definitions.put("no_retry_params", settings);
+ settings =
+ RetrySettings.newBuilder()
+ .setInitialRpcTimeout(Duration.ofMillis(30000L))
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ofMillis(30000L))
+ .setTotalTimeout(Duration.ofMillis(30000L))
+ .build();
+ definitions.put("no_retry_1_params", settings);
+ settings =
+ RetrySettings.newBuilder()
+ .setInitialRpcTimeout(Duration.ofMillis(30000L))
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ofMillis(30000L))
+ .setTotalTimeout(Duration.ofMillis(30000L))
+ .build();
+ definitions.put("no_retry_5_params", settings);
+ settings =
+ RetrySettings.newBuilder()
+ .setInitialRpcTimeout(Duration.ofMillis(30000L))
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ofMillis(30000L))
+ .setTotalTimeout(Duration.ofMillis(30000L))
+ .build();
+ definitions.put("no_retry_2_params", settings);
+ settings =
+ RetrySettings.newBuilder()
+ .setInitialRpcTimeout(Duration.ofMillis(30000L))
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ofMillis(30000L))
+ .setTotalTimeout(Duration.ofMillis(30000L))
+ .build();
+ definitions.put("no_retry_4_params", settings);
+ settings =
+ RetrySettings.newBuilder()
+ .setInitialRpcTimeout(Duration.ofMillis(30000L))
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ofMillis(30000L))
+ .setTotalTimeout(Duration.ofMillis(30000L))
+ .build();
+ definitions.put("no_retry_6_params", settings);
+ settings =
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(100L))
+ .setRetryDelayMultiplier(1.3)
+ .setMaxRetryDelay(Duration.ofMillis(30000L))
+ .setInitialRpcTimeout(Duration.ofMillis(30000L))
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ofMillis(30000L))
+ .setTotalTimeout(Duration.ofMillis(30000L))
+ .build();
+ definitions.put("retry_policy_1_params", settings);
+ settings =
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(100L))
+ .setRetryDelayMultiplier(1.3)
+ .setMaxRetryDelay(Duration.ofMillis(30000L))
+ .setInitialRpcTimeout(Duration.ofMillis(30000L))
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ofMillis(30000L))
+ .setTotalTimeout(Duration.ofMillis(30000L))
+ .build();
+ definitions.put("retry_policy_2_params", settings);
+ settings =
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(100L))
+ .setRetryDelayMultiplier(1.3)
+ .setMaxRetryDelay(Duration.ofMillis(30000L))
+ .setInitialRpcTimeout(Duration.ofMillis(30000L))
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ofMillis(30000L))
+ .setTotalTimeout(Duration.ofMillis(30000L))
+ .build();
+ definitions.put("retry_policy_3_params", settings);
+ settings =
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(100L))
+ .setRetryDelayMultiplier(1.3)
+ .setMaxRetryDelay(Duration.ofMillis(30000L))
+ .setInitialRpcTimeout(Duration.ofMillis(30000L))
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ofMillis(30000L))
+ .setTotalTimeout(Duration.ofMillis(30000L))
+ .build();
+ definitions.put("retry_policy_5_params", settings);
settings =
RetrySettings.newBuilder()
.setInitialRetryDelay(Duration.ofMillis(100L))
.setRetryDelayMultiplier(1.3)
- .setMaxRetryDelay(Duration.ofMillis(60000L))
- .setInitialRpcTimeout(Duration.ofMillis(20000L))
+ .setMaxRetryDelay(Duration.ofMillis(30000L))
+ .setInitialRpcTimeout(Duration.ofMillis(30000L))
.setRpcTimeoutMultiplier(1.0)
- .setMaxRpcTimeout(Duration.ofMillis(20000L))
- .setTotalTimeout(Duration.ofMillis(600000L))
+ .setMaxRpcTimeout(Duration.ofMillis(30000L))
+ .setTotalTimeout(Duration.ofMillis(30000L))
.build();
- definitions.put("default", settings);
+ definitions.put("retry_policy_4_params", settings);
RETRY_PARAM_DEFINITIONS = definitions.build();
}
@@ -328,22 +470,22 @@ protected Builder() {
protected Builder(ClientContext clientContext) {
super(clientContext);
- deleteAlertPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
-
listAlertPoliciesSettings = PagedCallSettings.newBuilder(LIST_ALERT_POLICIES_PAGE_STR_FACT);
getAlertPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createAlertPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ deleteAlertPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
updateAlertPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
unaryMethodSettingsBuilders =
ImmutableList.>of(
- deleteAlertPolicySettings,
listAlertPoliciesSettings,
getAlertPolicySettings,
createAlertPolicySettings,
+ deleteAlertPolicySettings,
updateAlertPolicySettings);
initDefaults(this);
@@ -360,30 +502,30 @@ private static Builder createDefault() {
private static Builder initDefaults(Builder builder) {
- builder
- .deleteAlertPolicySettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
-
builder
.listAlertPoliciesSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params"));
builder
.getAlertPolicySettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params"));
builder
.createAlertPolicySettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
+
+ builder
+ .deleteAlertPolicySettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params"));
builder
.updateAlertPolicySettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
return builder;
}
@@ -391,18 +533,18 @@ private static Builder initDefaults(Builder builder) {
protected Builder(AlertPolicyServiceStubSettings settings) {
super(settings);
- deleteAlertPolicySettings = settings.deleteAlertPolicySettings.toBuilder();
listAlertPoliciesSettings = settings.listAlertPoliciesSettings.toBuilder();
getAlertPolicySettings = settings.getAlertPolicySettings.toBuilder();
createAlertPolicySettings = settings.createAlertPolicySettings.toBuilder();
+ deleteAlertPolicySettings = settings.deleteAlertPolicySettings.toBuilder();
updateAlertPolicySettings = settings.updateAlertPolicySettings.toBuilder();
unaryMethodSettingsBuilders =
ImmutableList.>of(
- deleteAlertPolicySettings,
listAlertPoliciesSettings,
getAlertPolicySettings,
createAlertPolicySettings,
+ deleteAlertPolicySettings,
updateAlertPolicySettings);
}
@@ -422,11 +564,6 @@ public Builder applyToAllUnaryMethods(
return unaryMethodSettingsBuilders;
}
- /** Returns the builder for the settings used for calls to deleteAlertPolicy. */
- public UnaryCallSettings.Builder deleteAlertPolicySettings() {
- return deleteAlertPolicySettings;
- }
-
/** Returns the builder for the settings used for calls to listAlertPolicies. */
public PagedCallSettings.Builder<
ListAlertPoliciesRequest, ListAlertPoliciesResponse, ListAlertPoliciesPagedResponse>
@@ -445,6 +582,11 @@ public UnaryCallSettings.Builder getAlertPol
return createAlertPolicySettings;
}
+ /** Returns the builder for the settings used for calls to deleteAlertPolicy. */
+ public UnaryCallSettings.Builder deleteAlertPolicySettings() {
+ return deleteAlertPolicySettings;
+ }
+
/** Returns the builder for the settings used for calls to updateAlertPolicy. */
public UnaryCallSettings.Builder
updateAlertPolicySettings() {
diff --git a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GroupServiceStub.java b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GroupServiceStub.java
index e8d73ceb..3f6d0d94 100644
--- a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GroupServiceStub.java
+++ b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GroupServiceStub.java
@@ -43,14 +43,6 @@
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public abstract class GroupServiceStub implements BackgroundResource {
- public UnaryCallable updateGroupCallable() {
- throw new UnsupportedOperationException("Not implemented: updateGroupCallable()");
- }
-
- public UnaryCallable deleteGroupCallable() {
- throw new UnsupportedOperationException("Not implemented: deleteGroupCallable()");
- }
-
public UnaryCallable listGroupsPagedCallable() {
throw new UnsupportedOperationException("Not implemented: listGroupsPagedCallable()");
}
@@ -67,6 +59,14 @@ public UnaryCallable createGroupCallable() {
throw new UnsupportedOperationException("Not implemented: createGroupCallable()");
}
+ public UnaryCallable updateGroupCallable() {
+ throw new UnsupportedOperationException("Not implemented: updateGroupCallable()");
+ }
+
+ public UnaryCallable deleteGroupCallable() {
+ throw new UnsupportedOperationException("Not implemented: deleteGroupCallable()");
+ }
+
public UnaryCallable
listGroupMembersPagedCallable() {
throw new UnsupportedOperationException("Not implemented: listGroupMembersPagedCallable()");
diff --git a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GroupServiceStubSettings.java b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GroupServiceStubSettings.java
index 2e89710e..7495fe75 100644
--- a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GroupServiceStubSettings.java
+++ b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GroupServiceStubSettings.java
@@ -75,16 +75,16 @@
* The builder of this class is recursive, so contained classes are themselves builders. When
* build() is called, the tree of builders is called to create the complete settings object.
*
- *
For example, to set the total timeout of updateGroup to 30 seconds:
+ *
For example, to set the total timeout of getGroup to 30 seconds:
*
*
*
* GroupServiceStubSettings.Builder groupServiceSettingsBuilder =
* GroupServiceStubSettings.newBuilder();
* groupServiceSettingsBuilder
- * .updateGroupSettings()
+ * .getGroupSettings()
* .setRetrySettings(
- * groupServiceSettingsBuilder.updateGroupSettings().getRetrySettings().toBuilder()
+ * groupServiceSettingsBuilder.getGroupSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* GroupServiceStubSettings groupServiceSettings = groupServiceSettingsBuilder.build();
@@ -102,26 +102,16 @@ public class GroupServiceStubSettings extends StubSettings updateGroupSettings;
- private final UnaryCallSettings deleteGroupSettings;
private final PagedCallSettings
listGroupsSettings;
private final UnaryCallSettings getGroupSettings;
private final UnaryCallSettings createGroupSettings;
+ private final UnaryCallSettings updateGroupSettings;
+ private final UnaryCallSettings deleteGroupSettings;
private final PagedCallSettings<
ListGroupMembersRequest, ListGroupMembersResponse, ListGroupMembersPagedResponse>
listGroupMembersSettings;
- /** Returns the object with the settings used for calls to updateGroup. */
- public UnaryCallSettings updateGroupSettings() {
- return updateGroupSettings;
- }
-
- /** Returns the object with the settings used for calls to deleteGroup. */
- public UnaryCallSettings deleteGroupSettings() {
- return deleteGroupSettings;
- }
-
/** Returns the object with the settings used for calls to listGroups. */
public PagedCallSettings
listGroupsSettings() {
@@ -138,6 +128,16 @@ public UnaryCallSettings createGroupSettings() {
return createGroupSettings;
}
+ /** Returns the object with the settings used for calls to updateGroup. */
+ public UnaryCallSettings updateGroupSettings() {
+ return updateGroupSettings;
+ }
+
+ /** Returns the object with the settings used for calls to deleteGroup. */
+ public UnaryCallSettings deleteGroupSettings() {
+ return deleteGroupSettings;
+ }
+
/** Returns the object with the settings used for calls to listGroupMembers. */
public PagedCallSettings<
ListGroupMembersRequest, ListGroupMembersResponse, ListGroupMembersPagedResponse>
@@ -214,11 +214,11 @@ public Builder toBuilder() {
protected GroupServiceStubSettings(Builder settingsBuilder) throws IOException {
super(settingsBuilder);
- updateGroupSettings = settingsBuilder.updateGroupSettings().build();
- deleteGroupSettings = settingsBuilder.deleteGroupSettings().build();
listGroupsSettings = settingsBuilder.listGroupsSettings().build();
getGroupSettings = settingsBuilder.getGroupSettings().build();
createGroupSettings = settingsBuilder.createGroupSettings().build();
+ updateGroupSettings = settingsBuilder.updateGroupSettings().build();
+ deleteGroupSettings = settingsBuilder.deleteGroupSettings().build();
listGroupMembersSettings = settingsBuilder.listGroupMembersSettings().build();
}
@@ -338,13 +338,13 @@ public ApiFuture getFuturePagedResponse(
public static class Builder extends StubSettings.Builder {
private final ImmutableList> unaryMethodSettingsBuilders;
- private final UnaryCallSettings.Builder updateGroupSettings;
- private final UnaryCallSettings.Builder deleteGroupSettings;
private final PagedCallSettings.Builder<
ListGroupsRequest, ListGroupsResponse, ListGroupsPagedResponse>
listGroupsSettings;
private final UnaryCallSettings.Builder getGroupSettings;
private final UnaryCallSettings.Builder createGroupSettings;
+ private final UnaryCallSettings.Builder updateGroupSettings;
+ private final UnaryCallSettings.Builder deleteGroupSettings;
private final PagedCallSettings.Builder<
ListGroupMembersRequest, ListGroupMembersResponse, ListGroupMembersPagedResponse>
listGroupMembersSettings;
@@ -356,11 +356,48 @@ public static class Builder extends StubSettings.Builder> definitions =
ImmutableMap.builder();
definitions.put(
- "idempotent",
+ "retry_policy_1_codes",
+ ImmutableSet.copyOf(
+ Lists.newArrayList(
+ StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
+ definitions.put(
+ "no_retry_2_codes", ImmutableSet.copyOf(Lists.newArrayList()));
+ definitions.put(
+ "retry_policy_6_codes",
ImmutableSet.copyOf(
Lists.newArrayList(
StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
- definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.newArrayList()));
+ definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList()));
+ definitions.put(
+ "no_retry_3_codes", ImmutableSet.copyOf(Lists.newArrayList()));
+ definitions.put(
+ "retry_policy_3_codes",
+ ImmutableSet.copyOf(
+ Lists.newArrayList(
+ StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
+ definitions.put(
+ "retry_policy_2_codes",
+ ImmutableSet.copyOf(
+ Lists.newArrayList(
+ StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
+ definitions.put(
+ "retry_policy_4_codes",
+ ImmutableSet.copyOf(
+ Lists.newArrayList(
+ StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
+ definitions.put(
+ "no_retry_4_codes", ImmutableSet.copyOf(Lists.newArrayList()));
+ definitions.put(
+ "no_retry_6_codes", ImmutableSet.copyOf(Lists.newArrayList()));
+ definitions.put(
+ "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList()));
+ definitions.put(
+ "retry_policy_5_codes",
+ ImmutableSet.copyOf(
+ Lists.newArrayList(
+ StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
+ definitions.put(
+ "no_retry_5_codes", ImmutableSet.copyOf(Lists.newArrayList()));
RETRYABLE_CODE_DEFINITIONS = definitions.build();
}
@@ -369,17 +406,122 @@ public static class Builder extends StubSettings.Builder definitions = ImmutableMap.builder();
RetrySettings settings = null;
+ settings =
+ RetrySettings.newBuilder()
+ .setInitialRpcTimeout(Duration.ofMillis(12000L))
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ofMillis(12000L))
+ .setTotalTimeout(Duration.ofMillis(12000L))
+ .build();
+ definitions.put("no_retry_3_params", settings);
+ settings =
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(100L))
+ .setRetryDelayMultiplier(1.3)
+ .setMaxRetryDelay(Duration.ofMillis(30000L))
+ .setInitialRpcTimeout(Duration.ofMillis(30000L))
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ofMillis(30000L))
+ .setTotalTimeout(Duration.ofMillis(30000L))
+ .build();
+ definitions.put("retry_policy_6_params", settings);
+ settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build();
+ definitions.put("no_retry_params", settings);
+ settings =
+ RetrySettings.newBuilder()
+ .setInitialRpcTimeout(Duration.ofMillis(30000L))
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ofMillis(30000L))
+ .setTotalTimeout(Duration.ofMillis(30000L))
+ .build();
+ definitions.put("no_retry_1_params", settings);
+ settings =
+ RetrySettings.newBuilder()
+ .setInitialRpcTimeout(Duration.ofMillis(30000L))
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ofMillis(30000L))
+ .setTotalTimeout(Duration.ofMillis(30000L))
+ .build();
+ definitions.put("no_retry_5_params", settings);
+ settings =
+ RetrySettings.newBuilder()
+ .setInitialRpcTimeout(Duration.ofMillis(30000L))
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ofMillis(30000L))
+ .setTotalTimeout(Duration.ofMillis(30000L))
+ .build();
+ definitions.put("no_retry_2_params", settings);
+ settings =
+ RetrySettings.newBuilder()
+ .setInitialRpcTimeout(Duration.ofMillis(30000L))
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ofMillis(30000L))
+ .setTotalTimeout(Duration.ofMillis(30000L))
+ .build();
+ definitions.put("no_retry_4_params", settings);
+ settings =
+ RetrySettings.newBuilder()
+ .setInitialRpcTimeout(Duration.ofMillis(30000L))
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ofMillis(30000L))
+ .setTotalTimeout(Duration.ofMillis(30000L))
+ .build();
+ definitions.put("no_retry_6_params", settings);
settings =
RetrySettings.newBuilder()
.setInitialRetryDelay(Duration.ofMillis(100L))
.setRetryDelayMultiplier(1.3)
- .setMaxRetryDelay(Duration.ofMillis(60000L))
- .setInitialRpcTimeout(Duration.ofMillis(20000L))
+ .setMaxRetryDelay(Duration.ofMillis(30000L))
+ .setInitialRpcTimeout(Duration.ofMillis(30000L))
.setRpcTimeoutMultiplier(1.0)
- .setMaxRpcTimeout(Duration.ofMillis(20000L))
- .setTotalTimeout(Duration.ofMillis(600000L))
+ .setMaxRpcTimeout(Duration.ofMillis(30000L))
+ .setTotalTimeout(Duration.ofMillis(30000L))
.build();
- definitions.put("default", settings);
+ definitions.put("retry_policy_1_params", settings);
+ settings =
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(100L))
+ .setRetryDelayMultiplier(1.3)
+ .setMaxRetryDelay(Duration.ofMillis(30000L))
+ .setInitialRpcTimeout(Duration.ofMillis(30000L))
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ofMillis(30000L))
+ .setTotalTimeout(Duration.ofMillis(30000L))
+ .build();
+ definitions.put("retry_policy_2_params", settings);
+ settings =
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(100L))
+ .setRetryDelayMultiplier(1.3)
+ .setMaxRetryDelay(Duration.ofMillis(30000L))
+ .setInitialRpcTimeout(Duration.ofMillis(30000L))
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ofMillis(30000L))
+ .setTotalTimeout(Duration.ofMillis(30000L))
+ .build();
+ definitions.put("retry_policy_3_params", settings);
+ settings =
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(100L))
+ .setRetryDelayMultiplier(1.3)
+ .setMaxRetryDelay(Duration.ofMillis(30000L))
+ .setInitialRpcTimeout(Duration.ofMillis(30000L))
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ofMillis(30000L))
+ .setTotalTimeout(Duration.ofMillis(30000L))
+ .build();
+ definitions.put("retry_policy_5_params", settings);
+ settings =
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(100L))
+ .setRetryDelayMultiplier(1.3)
+ .setMaxRetryDelay(Duration.ofMillis(30000L))
+ .setInitialRpcTimeout(Duration.ofMillis(30000L))
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ofMillis(30000L))
+ .setTotalTimeout(Duration.ofMillis(30000L))
+ .build();
+ definitions.put("retry_policy_4_params", settings);
RETRY_PARAM_DEFINITIONS = definitions.build();
}
@@ -390,25 +532,25 @@ protected Builder() {
protected Builder(ClientContext clientContext) {
super(clientContext);
- updateGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
-
- deleteGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
-
listGroupsSettings = PagedCallSettings.newBuilder(LIST_GROUPS_PAGE_STR_FACT);
getGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ updateGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
+ deleteGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
listGroupMembersSettings = PagedCallSettings.newBuilder(LIST_GROUP_MEMBERS_PAGE_STR_FACT);
unaryMethodSettingsBuilders =
ImmutableList.>of(
- updateGroupSettings,
- deleteGroupSettings,
listGroupsSettings,
getGroupSettings,
createGroupSettings,
+ updateGroupSettings,
+ deleteGroupSettings,
listGroupMembersSettings);
initDefaults(this);
@@ -426,34 +568,34 @@ private static Builder createDefault() {
private static Builder initDefaults(Builder builder) {
builder
- .updateGroupSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+ .listGroupsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
builder
- .deleteGroupSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+ .getGroupSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
builder
- .listGroupsSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+ .createGroupSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params"));
builder
- .getGroupSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+ .updateGroupSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
builder
- .createGroupSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+ .deleteGroupSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
builder
.listGroupMembersSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
return builder;
}
@@ -461,20 +603,20 @@ private static Builder initDefaults(Builder builder) {
protected Builder(GroupServiceStubSettings settings) {
super(settings);
- updateGroupSettings = settings.updateGroupSettings.toBuilder();
- deleteGroupSettings = settings.deleteGroupSettings.toBuilder();
listGroupsSettings = settings.listGroupsSettings.toBuilder();
getGroupSettings = settings.getGroupSettings.toBuilder();
createGroupSettings = settings.createGroupSettings.toBuilder();
+ updateGroupSettings = settings.updateGroupSettings.toBuilder();
+ deleteGroupSettings = settings.deleteGroupSettings.toBuilder();
listGroupMembersSettings = settings.listGroupMembersSettings.toBuilder();
unaryMethodSettingsBuilders =
ImmutableList.>of(
- updateGroupSettings,
- deleteGroupSettings,
listGroupsSettings,
getGroupSettings,
createGroupSettings,
+ updateGroupSettings,
+ deleteGroupSettings,
listGroupMembersSettings);
}
@@ -494,16 +636,6 @@ public Builder applyToAllUnaryMethods(
return unaryMethodSettingsBuilders;
}
- /** Returns the builder for the settings used for calls to updateGroup. */
- public UnaryCallSettings.Builder updateGroupSettings() {
- return updateGroupSettings;
- }
-
- /** Returns the builder for the settings used for calls to deleteGroup. */
- public UnaryCallSettings.Builder deleteGroupSettings() {
- return deleteGroupSettings;
- }
-
/** Returns the builder for the settings used for calls to listGroups. */
public PagedCallSettings.Builder
listGroupsSettings() {
@@ -520,6 +652,16 @@ public UnaryCallSettings.Builder createGroupSettings(
return createGroupSettings;
}
+ /** Returns the builder for the settings used for calls to updateGroup. */
+ public UnaryCallSettings.Builder updateGroupSettings() {
+ return updateGroupSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to deleteGroup. */
+ public UnaryCallSettings.Builder deleteGroupSettings() {
+ return deleteGroupSettings;
+ }
+
/** Returns the builder for the settings used for calls to listGroupMembers. */
public PagedCallSettings.Builder<
ListGroupMembersRequest, ListGroupMembersResponse, ListGroupMembersPagedResponse>
diff --git a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcAlertPolicyServiceStub.java b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcAlertPolicyServiceStub.java
index a58ab291..2ebcffa8 100644
--- a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcAlertPolicyServiceStub.java
+++ b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcAlertPolicyServiceStub.java
@@ -51,15 +51,6 @@
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public class GrpcAlertPolicyServiceStub extends AlertPolicyServiceStub {
- private static final MethodDescriptor
- deleteAlertPolicyMethodDescriptor =
- MethodDescriptor.newBuilder()
- .setType(MethodDescriptor.MethodType.UNARY)
- .setFullMethodName("google.monitoring.v3.AlertPolicyService/DeleteAlertPolicy")
- .setRequestMarshaller(
- ProtoUtils.marshaller(DeleteAlertPolicyRequest.getDefaultInstance()))
- .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
- .build();
private static final MethodDescriptor
listAlertPoliciesMethodDescriptor =
MethodDescriptor.newBuilder()
@@ -88,6 +79,15 @@ public class GrpcAlertPolicyServiceStub extends AlertPolicyServiceStub {
ProtoUtils.marshaller(CreateAlertPolicyRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(AlertPolicy.getDefaultInstance()))
.build();
+ private static final MethodDescriptor
+ deleteAlertPolicyMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.monitoring.v3.AlertPolicyService/DeleteAlertPolicy")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(DeleteAlertPolicyRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
+ .build();
private static final MethodDescriptor
updateAlertPolicyMethodDescriptor =
MethodDescriptor.newBuilder()
@@ -100,13 +100,13 @@ public class GrpcAlertPolicyServiceStub extends AlertPolicyServiceStub {
private final BackgroundResource backgroundResources;
- private final UnaryCallable deleteAlertPolicyCallable;
private final UnaryCallable
listAlertPoliciesCallable;
private final UnaryCallable
listAlertPoliciesPagedCallable;
private final UnaryCallable getAlertPolicyCallable;
private final UnaryCallable createAlertPolicyCallable;
+ private final UnaryCallable deleteAlertPolicyCallable;
private final UnaryCallable updateAlertPolicyCallable;
private final GrpcStubCallableFactory callableFactory;
@@ -150,19 +150,6 @@ protected GrpcAlertPolicyServiceStub(
throws IOException {
this.callableFactory = callableFactory;
- GrpcCallSettings deleteAlertPolicyTransportSettings =
- GrpcCallSettings.newBuilder()
- .setMethodDescriptor(deleteAlertPolicyMethodDescriptor)
- .setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(DeleteAlertPolicyRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("name", String.valueOf(request.getName()));
- return params.build();
- }
- })
- .build();
GrpcCallSettings
listAlertPoliciesTransportSettings =
GrpcCallSettings.newBuilder()
@@ -203,6 +190,19 @@ public Map extract(CreateAlertPolicyRequest request) {
}
})
.build();
+ GrpcCallSettings deleteAlertPolicyTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(deleteAlertPolicyMethodDescriptor)
+ .setParamsExtractor(
+ new RequestParamsExtractor() {
+ @Override
+ public Map extract(DeleteAlertPolicyRequest request) {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
+ }
+ })
+ .build();
GrpcCallSettings updateAlertPolicyTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(updateAlertPolicyMethodDescriptor)
@@ -218,11 +218,6 @@ public Map extract(UpdateAlertPolicyRequest request) {
})
.build();
- this.deleteAlertPolicyCallable =
- callableFactory.createUnaryCallable(
- deleteAlertPolicyTransportSettings,
- settings.deleteAlertPolicySettings(),
- clientContext);
this.listAlertPoliciesCallable =
callableFactory.createUnaryCallable(
listAlertPoliciesTransportSettings,
@@ -241,6 +236,11 @@ public Map extract(UpdateAlertPolicyRequest request) {
createAlertPolicyTransportSettings,
settings.createAlertPolicySettings(),
clientContext);
+ this.deleteAlertPolicyCallable =
+ callableFactory.createUnaryCallable(
+ deleteAlertPolicyTransportSettings,
+ settings.deleteAlertPolicySettings(),
+ clientContext);
this.updateAlertPolicyCallable =
callableFactory.createUnaryCallable(
updateAlertPolicyTransportSettings,
@@ -250,10 +250,6 @@ public Map extract(UpdateAlertPolicyRequest request) {
backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources());
}
- public UnaryCallable deleteAlertPolicyCallable() {
- return deleteAlertPolicyCallable;
- }
-
public UnaryCallable
listAlertPoliciesPagedCallable() {
return listAlertPoliciesPagedCallable;
@@ -272,6 +268,10 @@ public UnaryCallable createAlertPolicyCal
return createAlertPolicyCallable;
}
+ public UnaryCallable deleteAlertPolicyCallable() {
+ return deleteAlertPolicyCallable;
+ }
+
public UnaryCallable updateAlertPolicyCallable() {
return updateAlertPolicyCallable;
}
diff --git a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcGroupServiceStub.java b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcGroupServiceStub.java
index 0455d442..b49fb87f 100644
--- a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcGroupServiceStub.java
+++ b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcGroupServiceStub.java
@@ -54,20 +54,6 @@
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public class GrpcGroupServiceStub extends GroupServiceStub {
- private static final MethodDescriptor updateGroupMethodDescriptor =
- MethodDescriptor.newBuilder()
- .setType(MethodDescriptor.MethodType.UNARY)
- .setFullMethodName("google.monitoring.v3.GroupService/UpdateGroup")
- .setRequestMarshaller(ProtoUtils.marshaller(UpdateGroupRequest.getDefaultInstance()))
- .setResponseMarshaller(ProtoUtils.marshaller(Group.getDefaultInstance()))
- .build();
- private static final MethodDescriptor deleteGroupMethodDescriptor =
- MethodDescriptor.newBuilder()
- .setType(MethodDescriptor.MethodType.UNARY)
- .setFullMethodName("google.monitoring.v3.GroupService/DeleteGroup")
- .setRequestMarshaller(ProtoUtils.marshaller(DeleteGroupRequest.getDefaultInstance()))
- .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
- .build();
private static final MethodDescriptor
listGroupsMethodDescriptor =
MethodDescriptor.newBuilder()
@@ -90,6 +76,20 @@ public class GrpcGroupServiceStub extends GroupServiceStub {
.setRequestMarshaller(ProtoUtils.marshaller(CreateGroupRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Group.getDefaultInstance()))
.build();
+ private static final MethodDescriptor updateGroupMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.monitoring.v3.GroupService/UpdateGroup")
+ .setRequestMarshaller(ProtoUtils.marshaller(UpdateGroupRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Group.getDefaultInstance()))
+ .build();
+ private static final MethodDescriptor deleteGroupMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.monitoring.v3.GroupService/DeleteGroup")
+ .setRequestMarshaller(ProtoUtils.marshaller(DeleteGroupRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
+ .build();
private static final MethodDescriptor
listGroupMembersMethodDescriptor =
MethodDescriptor.newBuilder()
@@ -103,12 +103,12 @@ public class GrpcGroupServiceStub extends GroupServiceStub {
private final BackgroundResource backgroundResources;
- private final UnaryCallable updateGroupCallable;
- private final UnaryCallable deleteGroupCallable;
private final UnaryCallable listGroupsCallable;
private final UnaryCallable listGroupsPagedCallable;
private final UnaryCallable getGroupCallable;
private final UnaryCallable createGroupCallable;
+ private final UnaryCallable updateGroupCallable;
+ private final UnaryCallable deleteGroupCallable;
private final UnaryCallable
listGroupMembersCallable;
private final UnaryCallable
@@ -153,32 +153,6 @@ protected GrpcGroupServiceStub(
throws IOException {
this.callableFactory = callableFactory;
- GrpcCallSettings updateGroupTransportSettings =
- GrpcCallSettings.newBuilder()
- .setMethodDescriptor(updateGroupMethodDescriptor)
- .setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(UpdateGroupRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("group.name", String.valueOf(request.getGroup().getName()));
- return params.build();
- }
- })
- .build();
- GrpcCallSettings deleteGroupTransportSettings =
- GrpcCallSettings.newBuilder()
- .setMethodDescriptor(deleteGroupMethodDescriptor)
- .setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(DeleteGroupRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("name", String.valueOf(request.getName()));
- return params.build();
- }
- })
- .build();
GrpcCallSettings listGroupsTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(listGroupsMethodDescriptor)
@@ -218,6 +192,32 @@ public Map extract(CreateGroupRequest request) {
}
})
.build();
+ GrpcCallSettings updateGroupTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(updateGroupMethodDescriptor)
+ .setParamsExtractor(
+ new RequestParamsExtractor() {
+ @Override
+ public Map extract(UpdateGroupRequest request) {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("group.name", String.valueOf(request.getGroup().getName()));
+ return params.build();
+ }
+ })
+ .build();
+ GrpcCallSettings deleteGroupTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(deleteGroupMethodDescriptor)
+ .setParamsExtractor(
+ new RequestParamsExtractor() {
+ @Override
+ public Map extract(DeleteGroupRequest request) {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
+ }
+ })
+ .build();
GrpcCallSettings
listGroupMembersTransportSettings =
GrpcCallSettings.newBuilder()
@@ -233,12 +233,6 @@ public Map extract(ListGroupMembersRequest request) {
})
.build();
- this.updateGroupCallable =
- callableFactory.createUnaryCallable(
- updateGroupTransportSettings, settings.updateGroupSettings(), clientContext);
- this.deleteGroupCallable =
- callableFactory.createUnaryCallable(
- deleteGroupTransportSettings, settings.deleteGroupSettings(), clientContext);
this.listGroupsCallable =
callableFactory.createUnaryCallable(
listGroupsTransportSettings, settings.listGroupsSettings(), clientContext);
@@ -251,6 +245,12 @@ public Map extract(ListGroupMembersRequest request) {
this.createGroupCallable =
callableFactory.createUnaryCallable(
createGroupTransportSettings, settings.createGroupSettings(), clientContext);
+ this.updateGroupCallable =
+ callableFactory.createUnaryCallable(
+ updateGroupTransportSettings, settings.updateGroupSettings(), clientContext);
+ this.deleteGroupCallable =
+ callableFactory.createUnaryCallable(
+ deleteGroupTransportSettings, settings.deleteGroupSettings(), clientContext);
this.listGroupMembersCallable =
callableFactory.createUnaryCallable(
listGroupMembersTransportSettings, settings.listGroupMembersSettings(), clientContext);
@@ -261,14 +261,6 @@ public Map extract(ListGroupMembersRequest request) {
backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources());
}
- public UnaryCallable updateGroupCallable() {
- return updateGroupCallable;
- }
-
- public UnaryCallable deleteGroupCallable() {
- return deleteGroupCallable;
- }
-
public UnaryCallable listGroupsPagedCallable() {
return listGroupsPagedCallable;
}
@@ -285,6 +277,14 @@ public UnaryCallable createGroupCallable() {
return createGroupCallable;
}
+ public UnaryCallable updateGroupCallable() {
+ return updateGroupCallable;
+ }
+
+ public UnaryCallable deleteGroupCallable() {
+ return deleteGroupCallable;
+ }
+
public UnaryCallable
listGroupMembersPagedCallable() {
return listGroupMembersPagedCallable;
diff --git a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcNotificationChannelServiceStub.java b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcNotificationChannelServiceStub.java
index 1b367432..05634628 100644
--- a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcNotificationChannelServiceStub.java
+++ b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcNotificationChannelServiceStub.java
@@ -60,45 +60,6 @@
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public class GrpcNotificationChannelServiceStub extends NotificationChannelServiceStub {
- private static final MethodDescriptor
- deleteNotificationChannelMethodDescriptor =
- MethodDescriptor.newBuilder()
- .setType(MethodDescriptor.MethodType.UNARY)
- .setFullMethodName(
- "google.monitoring.v3.NotificationChannelService/DeleteNotificationChannel")
- .setRequestMarshaller(
- ProtoUtils.marshaller(DeleteNotificationChannelRequest.getDefaultInstance()))
- .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
- .build();
- private static final MethodDescriptor<
- GetNotificationChannelVerificationCodeRequest,
- GetNotificationChannelVerificationCodeResponse>
- getNotificationChannelVerificationCodeMethodDescriptor =
- MethodDescriptor
- .
- newBuilder()
- .setType(MethodDescriptor.MethodType.UNARY)
- .setFullMethodName(
- "google.monitoring.v3.NotificationChannelService/GetNotificationChannelVerificationCode")
- .setRequestMarshaller(
- ProtoUtils.marshaller(
- GetNotificationChannelVerificationCodeRequest.getDefaultInstance()))
- .setResponseMarshaller(
- ProtoUtils.marshaller(
- GetNotificationChannelVerificationCodeResponse.getDefaultInstance()))
- .build();
- private static final MethodDescriptor
- verifyNotificationChannelMethodDescriptor =
- MethodDescriptor.newBuilder()
- .setType(MethodDescriptor.MethodType.UNARY)
- .setFullMethodName(
- "google.monitoring.v3.NotificationChannelService/VerifyNotificationChannel")
- .setRequestMarshaller(
- ProtoUtils.marshaller(VerifyNotificationChannelRequest.getDefaultInstance()))
- .setResponseMarshaller(
- ProtoUtils.marshaller(NotificationChannel.getDefaultInstance()))
- .build();
private static final MethodDescriptor<
ListNotificationChannelDescriptorsRequest, ListNotificationChannelDescriptorsResponse>
listNotificationChannelDescriptorsMethodDescriptor =
@@ -176,6 +137,16 @@ public class GrpcNotificationChannelServiceStub extends NotificationChannelServi
.setResponseMarshaller(
ProtoUtils.marshaller(NotificationChannel.getDefaultInstance()))
.build();
+ private static final MethodDescriptor
+ deleteNotificationChannelMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.monitoring.v3.NotificationChannelService/DeleteNotificationChannel")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(DeleteNotificationChannelRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
+ .build();
private static final MethodDescriptor