diff --git a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/AlertPolicyServiceClient.java b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/AlertPolicyServiceClient.java index 4fa41dca..f773ca0e 100644 --- a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/AlertPolicyServiceClient.java +++ b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/AlertPolicyServiceClient.java @@ -59,6 +59,14 @@ *
This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *
{@code + * try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) { + * AlertPolicyName name = + * AlertPolicyName.ofProjectAlertPolicyName("[PROJECT]", "[ALERT_POLICY]"); + * AlertPolicy response = alertPolicyServiceClient.getAlertPolicy(name); + * } + * }+ * *
Note: close() needs to be called on the AlertPolicyServiceClient object to clean up resources * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). @@ -165,6 +173,17 @@ public AlertPolicyServiceStub getStub() { /** * Lists the existing alerting policies for the project. * + *
Sample code: + * + *
{@code + * try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) { + * ResourceName name = ResourceName.of("[FOLDER]"); + * for (AlertPolicy element : alertPolicyServiceClient.listAlertPolicies(name).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param name Required. The project whose alert policies are to be listed. The format is: *
projects/[PROJECT_ID_OR_NUMBER] *
Note that this field names the parent container in which the alerting policies to be @@ -185,6 +204,17 @@ public final ListAlertPoliciesPagedResponse listAlertPolicies(ResourceName name) /** * Lists the existing alerting policies for the project. * + *
Sample code: + * + *
{@code + * try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) { + * OrganizationName name = OrganizationName.of("[ORGANIZATION]"); + * for (AlertPolicy element : alertPolicyServiceClient.listAlertPolicies(name).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param name Required. The project whose alert policies are to be listed. The format is: *
projects/[PROJECT_ID_OR_NUMBER] *
Note that this field names the parent container in which the alerting policies to be @@ -205,6 +235,17 @@ public final ListAlertPoliciesPagedResponse listAlertPolicies(OrganizationName n /** * Lists the existing alerting policies for the project. * + *
Sample code: + * + *
{@code + * try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) { + * ProjectName name = ProjectName.of("[PROJECT]"); + * for (AlertPolicy element : alertPolicyServiceClient.listAlertPolicies(name).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param name Required. The project whose alert policies are to be listed. The format is: *
projects/[PROJECT_ID_OR_NUMBER] *
Note that this field names the parent container in which the alerting policies to be @@ -225,6 +266,18 @@ public final ListAlertPoliciesPagedResponse listAlertPolicies(ProjectName name) /** * Lists the existing alerting policies for the project. * + *
Sample code: + * + *
{@code + * try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) { + * String name = + * AlertPolicyName.ofProjectAlertPolicyName("[PROJECT]", "[ALERT_POLICY]").toString(); + * for (AlertPolicy element : alertPolicyServiceClient.listAlertPolicies(name).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param name Required. The project whose alert policies are to be listed. The format is: *
projects/[PROJECT_ID_OR_NUMBER] *
Note that this field names the parent container in which the alerting policies to be @@ -242,6 +295,26 @@ public final ListAlertPoliciesPagedResponse listAlertPolicies(String name) { /** * Lists the existing alerting policies for the project. * + *
Sample code: + * + *
{@code + * try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) { + * ListAlertPoliciesRequest request = + * ListAlertPoliciesRequest.newBuilder() + * .setName( + * AlertPolicyName.ofProjectAlertPolicyName("[PROJECT]", "[ALERT_POLICY]") + * .toString()) + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (AlertPolicy element : alertPolicyServiceClient.listAlertPolicies(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 */ @@ -254,6 +327,27 @@ public final ListAlertPoliciesPagedResponse listAlertPolicies(ListAlertPoliciesR * Lists the existing alerting policies for the project. * *
Sample code: + * + *
{@code + * try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) { + * ListAlertPoliciesRequest request = + * ListAlertPoliciesRequest.newBuilder() + * .setName( + * AlertPolicyName.ofProjectAlertPolicyName("[PROJECT]", "[ALERT_POLICY]") + * .toString()) + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * alertPolicyServiceClient.listAlertPoliciesPagedCallable().futureCall(request); + * // Do something. + * for (AlertPolicy element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) { + * while (true) { + * ListAlertPoliciesResponse response = + * alertPolicyServiceClient.listAlertPoliciesCallable().call(request); + * for (AlertPolicy element : response.getResponsesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }*/ public final UnaryCallable
Sample code: + * + *
{@code + * try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) { + * AlertPolicyName name = + * AlertPolicyName.ofProjectAlertPolicyName("[PROJECT]", "[ALERT_POLICY]"); + * AlertPolicy response = alertPolicyServiceClient.getAlertPolicy(name); + * } + * }+ * * @param name Required. The alerting policy to retrieve. The format is: *
projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -289,6 +411,16 @@ public final AlertPolicy getAlertPolicy(AlertPolicyName name) { /** * Gets a single alerting policy. * + *
Sample code: + * + *
{@code + * try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) { + * String name = + * AlertPolicyName.ofProjectAlertPolicyName("[PROJECT]", "[ALERT_POLICY]").toString(); + * AlertPolicy response = alertPolicyServiceClient.getAlertPolicy(name); + * } + * }+ * * @param name Required. The alerting policy to retrieve. The format is: *
projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -302,6 +434,20 @@ public final AlertPolicy getAlertPolicy(String name) { /** * Gets a single alerting policy. * + *
Sample code: + * + *
{@code + * try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) { + * GetAlertPolicyRequest request = + * GetAlertPolicyRequest.newBuilder() + * .setName( + * AlertPolicyName.ofProjectAlertPolicyName("[PROJECT]", "[ALERT_POLICY]") + * .toString()) + * .build(); + * AlertPolicy response = alertPolicyServiceClient.getAlertPolicy(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 */ @@ -314,6 +460,21 @@ public final AlertPolicy getAlertPolicy(GetAlertPolicyRequest request) { * Gets a single alerting policy. * *
Sample code: + * + *
{@code + * try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) { + * GetAlertPolicyRequest request = + * GetAlertPolicyRequest.newBuilder() + * .setName( + * AlertPolicyName.ofProjectAlertPolicyName("[PROJECT]", "[ALERT_POLICY]") + * .toString()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * alertPolicyServiceClient.getAlertPolicyCallable().futureCall(request); + * // Do something. + * AlertPolicy response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) { + * ResourceName name = ResourceName.of("[FOLDER]"); + * AlertPolicy alertPolicy = AlertPolicy.newBuilder().build(); + * AlertPolicy response = alertPolicyServiceClient.createAlertPolicy(name, alertPolicy); + * } + * }+ * * @param name Required. The project in which to create the alerting policy. The format is: *
projects/[PROJECT_ID_OR_NUMBER] *
Note that this field names the parent container in which the alerting policy will be @@ -347,6 +518,16 @@ public final AlertPolicy createAlertPolicy(ResourceName name, AlertPolicy alertP /** * Creates a new alerting policy. * + *
Sample code: + * + *
{@code + * try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) { + * OrganizationName name = OrganizationName.of("[ORGANIZATION]"); + * AlertPolicy alertPolicy = AlertPolicy.newBuilder().build(); + * AlertPolicy response = alertPolicyServiceClient.createAlertPolicy(name, alertPolicy); + * } + * }+ * * @param name Required. The project in which to create the alerting policy. The format is: *
projects/[PROJECT_ID_OR_NUMBER] *
Note that this field names the parent container in which the alerting policy will be @@ -371,6 +552,16 @@ public final AlertPolicy createAlertPolicy(OrganizationName name, AlertPolicy al /** * Creates a new alerting policy. * + *
Sample code: + * + *
{@code + * try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) { + * ProjectName name = ProjectName.of("[PROJECT]"); + * AlertPolicy alertPolicy = AlertPolicy.newBuilder().build(); + * AlertPolicy response = alertPolicyServiceClient.createAlertPolicy(name, alertPolicy); + * } + * }+ * * @param name Required. The project in which to create the alerting policy. The format is: *
projects/[PROJECT_ID_OR_NUMBER] *
Note that this field names the parent container in which the alerting policy will be @@ -395,6 +586,17 @@ public final AlertPolicy createAlertPolicy(ProjectName name, AlertPolicy alertPo /** * Creates a new alerting policy. * + *
Sample code: + * + *
{@code + * try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) { + * String name = + * AlertPolicyName.ofProjectAlertPolicyName("[PROJECT]", "[ALERT_POLICY]").toString(); + * AlertPolicy alertPolicy = AlertPolicy.newBuilder().build(); + * AlertPolicy response = alertPolicyServiceClient.createAlertPolicy(name, alertPolicy); + * } + * }+ * * @param name Required. The project in which to create the alerting policy. The format is: *
projects/[PROJECT_ID_OR_NUMBER] *
Note that this field names the parent container in which the alerting policy will be @@ -416,6 +618,21 @@ public final AlertPolicy createAlertPolicy(String name, AlertPolicy alertPolicy) /** * Creates a new alerting policy. * + *
Sample code: + * + *
{@code + * try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) { + * CreateAlertPolicyRequest request = + * CreateAlertPolicyRequest.newBuilder() + * .setName( + * AlertPolicyName.ofProjectAlertPolicyName("[PROJECT]", "[ALERT_POLICY]") + * .toString()) + * .setAlertPolicy(AlertPolicy.newBuilder().build()) + * .build(); + * AlertPolicy response = alertPolicyServiceClient.createAlertPolicy(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 */ @@ -428,6 +645,22 @@ public final AlertPolicy createAlertPolicy(CreateAlertPolicyRequest request) { * Creates a new alerting policy. * *
Sample code: + * + *
{@code + * try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) { + * CreateAlertPolicyRequest request = + * CreateAlertPolicyRequest.newBuilder() + * .setName( + * AlertPolicyName.ofProjectAlertPolicyName("[PROJECT]", "[ALERT_POLICY]") + * .toString()) + * .setAlertPolicy(AlertPolicy.newBuilder().build()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * alertPolicyServiceClient.createAlertPolicyCallable().futureCall(request); + * // Do something. + * AlertPolicy response = future.get(); + * } + * }
Sample code: + * + *
{@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]. @@ -454,6 +697,16 @@ public final void deleteAlertPolicy(AlertPolicyName name) { /** * Deletes an alerting policy. * + *
Sample code: + * + *
{@code + * try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) { + * String name = + * AlertPolicyName.ofProjectAlertPolicyName("[PROJECT]", "[ALERT_POLICY]").toString(); + * 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]. @@ -468,6 +721,20 @@ public final void deleteAlertPolicy(String name) { /** * Deletes an alerting policy. * + *
Sample code: + * + *
{@code + * try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) { + * DeleteAlertPolicyRequest request = + * DeleteAlertPolicyRequest.newBuilder() + * .setName( + * AlertPolicyName.ofProjectAlertPolicyName("[PROJECT]", "[ALERT_POLICY]") + * .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 */ @@ -480,6 +747,21 @@ public final void deleteAlertPolicy(DeleteAlertPolicyRequest request) { * Deletes an alerting policy. * *
Sample code: + * + *
{@code + * try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) { + * DeleteAlertPolicyRequest request = + * DeleteAlertPolicyRequest.newBuilder() + * .setName( + * AlertPolicyName.ofProjectAlertPolicyName("[PROJECT]", "[ALERT_POLICY]") + * .toString()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * alertPolicyServiceClient.deleteAlertPolicyCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) { + * FieldMask updateMask = FieldMask.newBuilder().build(); + * AlertPolicy alertPolicy = AlertPolicy.newBuilder().build(); + * AlertPolicy response = alertPolicyServiceClient.updateAlertPolicy(updateMask, alertPolicy); + * } + * }+ * * @param updateMask Optional. A list of alerting policy field names. If this field is not empty, * each listed field in the existing alerting policy is set to the value of the corresponding * field in the supplied policy (`alert_policy`), or to the field's default value if the field @@ -526,6 +818,19 @@ public final AlertPolicy updateAlertPolicy(FieldMask updateMask, AlertPolicy ale * only certain fields in the current alerting policy by specifying the fields to be updated via * `updateMask`. Returns the updated alerting policy. * + *
Sample code: + * + *
{@code + * try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) { + * UpdateAlertPolicyRequest request = + * UpdateAlertPolicyRequest.newBuilder() + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setAlertPolicy(AlertPolicy.newBuilder().build()) + * .build(); + * AlertPolicy response = alertPolicyServiceClient.updateAlertPolicy(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 */ @@ -540,6 +845,20 @@ public final AlertPolicy updateAlertPolicy(UpdateAlertPolicyRequest request) { * `updateMask`. Returns the updated alerting policy. * *
Sample code: + * + *
{@code + * try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) { + * UpdateAlertPolicyRequest request = + * UpdateAlertPolicyRequest.newBuilder() + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setAlertPolicy(AlertPolicy.newBuilder().build()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * alertPolicyServiceClient.updateAlertPolicyCallable().futureCall(request); + * // Do something. + * AlertPolicy response = future.get(); + * } + * }
This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *
{@code + * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) { + * GroupName name = GroupName.ofProjectGroupName("[PROJECT]", "[GROUP]"); + * Group response = groupServiceClient.getGroup(name); + * } + * }+ * *
Note: close() needs to be called on the GroupServiceClient object to clean up resources such * as threads. In the example above, try-with-resources is used, which automatically calls close(). * @@ -166,6 +173,17 @@ public GroupServiceStub getStub() { /** * Lists the existing groups. * + *
Sample code: + * + *
{@code + * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) { + * ResourceName name = ResourceName.of("[FOLDER]"); + * for (Group element : groupServiceClient.listGroups(name).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param name Required. The project whose groups are to be listed. The format is: *
projects/[PROJECT_ID_OR_NUMBER] * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -180,6 +198,17 @@ public final ListGroupsPagedResponse listGroups(ResourceName name) { /** * Lists the existing groups. * + *
Sample code: + * + *
{@code + * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) { + * OrganizationName name = OrganizationName.of("[ORGANIZATION]"); + * for (Group element : groupServiceClient.listGroups(name).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param name Required. The project whose groups are to be listed. The format is: *
projects/[PROJECT_ID_OR_NUMBER] * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -194,6 +223,17 @@ public final ListGroupsPagedResponse listGroups(OrganizationName name) { /** * Lists the existing groups. * + *
Sample code: + * + *
{@code + * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) { + * ProjectName name = ProjectName.of("[PROJECT]"); + * for (Group element : groupServiceClient.listGroups(name).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param name Required. The project whose groups are to be listed. The format is: *
projects/[PROJECT_ID_OR_NUMBER] * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -208,6 +248,17 @@ public final ListGroupsPagedResponse listGroups(ProjectName name) { /** * Lists the existing groups. * + *
Sample code: + * + *
{@code + * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) { + * String name = GroupName.ofProjectGroupName("[PROJECT]", "[GROUP]").toString(); + * for (Group element : groupServiceClient.listGroups(name).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param name Required. The project whose groups are to be listed. The format is: *
projects/[PROJECT_ID_OR_NUMBER] * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -221,6 +272,22 @@ public final ListGroupsPagedResponse listGroups(String name) { /** * Lists the existing groups. * + *
Sample code: + * + *
{@code + * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) { + * ListGroupsRequest request = + * ListGroupsRequest.newBuilder() + * .setName(GroupName.ofProjectGroupName("[PROJECT]", "[GROUP]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (Group element : groupServiceClient.listGroups(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 */ @@ -233,6 +300,22 @@ public final ListGroupsPagedResponse listGroups(ListGroupsRequest request) { * Lists the existing groups. * *
Sample code: + * + *
{@code + * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) { + * ListGroupsRequest request = + * ListGroupsRequest.newBuilder() + * .setName(GroupName.ofProjectGroupName("[PROJECT]", "[GROUP]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = groupServiceClient.listGroupsPagedCallable().futureCall(request); + * // Do something. + * for (Group element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) { + * while (true) { + * ListGroupsResponse response = groupServiceClient.listGroupsCallable().call(request); + * for (Group element : response.getResponsesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }*/ public final UnaryCallable
Sample code: + * + *
{@code + * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) { + * GroupName name = GroupName.ofProjectGroupName("[PROJECT]", "[GROUP]"); + * Group response = groupServiceClient.getGroup(name); + * } + * }+ * * @param name Required. The group to retrieve. The format is: *
projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -266,6 +375,15 @@ public final Group getGroup(GroupName name) { /** * Gets a single group. * + *
Sample code: + * + *
{@code + * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) { + * String name = GroupName.ofProjectGroupName("[PROJECT]", "[GROUP]").toString(); + * Group response = groupServiceClient.getGroup(name); + * } + * }+ * * @param name Required. The group to retrieve. The format is: *
projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -279,6 +397,18 @@ public final Group getGroup(String name) { /** * Gets a single group. * + *
Sample code: + * + *
{@code + * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) { + * GetGroupRequest request = + * GetGroupRequest.newBuilder() + * .setName(GroupName.ofProjectGroupName("[PROJECT]", "[GROUP]").toString()) + * .build(); + * Group response = groupServiceClient.getGroup(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 */ @@ -291,6 +421,18 @@ public final Group getGroup(GetGroupRequest request) { * Gets a single group. * *
Sample code: + * + *
{@code + * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) { + * GetGroupRequest request = + * GetGroupRequest.newBuilder() + * .setName(GroupName.ofProjectGroupName("[PROJECT]", "[GROUP]").toString()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = groupServiceClient.getGroupCallable().futureCall(request); + * // Do something. + * Group response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) { + * ResourceName name = ResourceName.of("[FOLDER]"); + * Group group = Group.newBuilder().build(); + * Group response = groupServiceClient.createGroup(name, group); + * } + * }+ * * @param name Required. The project in which to create the group. The format is: *
projects/[PROJECT_ID_OR_NUMBER] * @param group Required. A group definition. It is an error to define the `name` field because @@ -319,6 +471,16 @@ public final Group createGroup(ResourceName name, Group group) { /** * Creates a new group. * + *
Sample code: + * + *
{@code + * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) { + * OrganizationName name = OrganizationName.of("[ORGANIZATION]"); + * Group group = Group.newBuilder().build(); + * Group response = groupServiceClient.createGroup(name, group); + * } + * }+ * * @param name Required. The project in which to create the group. The format is: *
projects/[PROJECT_ID_OR_NUMBER] * @param group Required. A group definition. It is an error to define the `name` field because @@ -338,6 +500,16 @@ public final Group createGroup(OrganizationName name, Group group) { /** * Creates a new group. * + *
Sample code: + * + *
{@code + * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) { + * ProjectName name = ProjectName.of("[PROJECT]"); + * Group group = Group.newBuilder().build(); + * Group response = groupServiceClient.createGroup(name, group); + * } + * }+ * * @param name Required. The project in which to create the group. The format is: *
projects/[PROJECT_ID_OR_NUMBER] * @param group Required. A group definition. It is an error to define the `name` field because @@ -357,6 +529,16 @@ public final Group createGroup(ProjectName name, Group group) { /** * Creates a new group. * + *
Sample code: + * + *
{@code + * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) { + * String name = GroupName.ofProjectGroupName("[PROJECT]", "[GROUP]").toString(); + * Group group = Group.newBuilder().build(); + * Group response = groupServiceClient.createGroup(name, group); + * } + * }+ * * @param name Required. The project in which to create the group. The format is: *
projects/[PROJECT_ID_OR_NUMBER] * @param group Required. A group definition. It is an error to define the `name` field because @@ -373,6 +555,20 @@ public final Group createGroup(String name, Group group) { /** * Creates a new group. * + *
Sample code: + * + *
{@code + * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) { + * CreateGroupRequest request = + * CreateGroupRequest.newBuilder() + * .setName(GroupName.ofProjectGroupName("[PROJECT]", "[GROUP]").toString()) + * .setGroup(Group.newBuilder().build()) + * .setValidateOnly(true) + * .build(); + * Group response = groupServiceClient.createGroup(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 */ @@ -385,6 +581,20 @@ public final Group createGroup(CreateGroupRequest request) { * Creates a new group. * *
Sample code: + * + *
{@code + * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) { + * CreateGroupRequest request = + * CreateGroupRequest.newBuilder() + * .setName(GroupName.ofProjectGroupName("[PROJECT]", "[GROUP]").toString()) + * .setGroup(Group.newBuilder().build()) + * .setValidateOnly(true) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = groupServiceClient.createGroupCallable().futureCall(request); + * // Do something. + * Group response = future.get(); + * } + * }
Sample code: + * + *
{@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 @@ -407,6 +626,19 @@ public final Group updateGroup(Group group) { /** * Updates an existing group. You can change any group attributes except `name`. * + *
Sample code: + * + *
{@code + * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) { + * UpdateGroupRequest request = + * UpdateGroupRequest.newBuilder() + * .setGroup(Group.newBuilder().build()) + * .setValidateOnly(true) + * .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 */ @@ -419,6 +651,19 @@ public final Group updateGroup(UpdateGroupRequest request) { * Updates an existing group. You can change any group attributes except `name`. * *
Sample code: + * + *
{@code + * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) { + * UpdateGroupRequest request = + * UpdateGroupRequest.newBuilder() + * .setGroup(Group.newBuilder().build()) + * .setValidateOnly(true) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = groupServiceClient.updateGroupCallable().futureCall(request); + * // Do something. + * Group response = future.get(); + * } + * }
Sample code: + * + *
{@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 @@ -442,6 +696,15 @@ public final void deleteGroup(GroupName name) { /** * Deletes an existing group. * + *
Sample code: + * + *
{@code + * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) { + * String name = GroupName.ofProjectGroupName("[PROJECT]", "[GROUP]").toString(); + * 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 @@ -455,6 +718,19 @@ public final void deleteGroup(String name) { /** * Deletes an existing group. * + *
Sample code: + * + *
{@code + * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) { + * DeleteGroupRequest request = + * DeleteGroupRequest.newBuilder() + * .setName(GroupName.ofProjectGroupName("[PROJECT]", "[GROUP]").toString()) + * .setRecursive(true) + * .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 */ @@ -467,6 +743,19 @@ public final void deleteGroup(DeleteGroupRequest request) { * Deletes an existing group. * *
Sample code: + * + *
{@code + * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) { + * DeleteGroupRequest request = + * DeleteGroupRequest.newBuilder() + * .setName(GroupName.ofProjectGroupName("[PROJECT]", "[GROUP]").toString()) + * .setRecursive(true) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = groupServiceClient.deleteGroupCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) { + * GroupName name = GroupName.ofProjectGroupName("[PROJECT]", "[GROUP]"); + * for (MonitoredResource element : groupServiceClient.listGroupMembers(name).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param name Required. The group whose members are listed. The format is: *
projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -490,6 +790,17 @@ public final ListGroupMembersPagedResponse listGroupMembers(GroupName name) { /** * Lists the monitored resources that are members of a group. * + *
Sample code: + * + *
{@code + * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) { + * String name = GroupName.ofProjectGroupName("[PROJECT]", "[GROUP]").toString(); + * for (MonitoredResource element : groupServiceClient.listGroupMembers(name).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param name Required. The group whose members are listed. The format is: *
projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -503,6 +814,24 @@ public final ListGroupMembersPagedResponse listGroupMembers(String name) { /** * Lists the monitored resources that are members of a group. * + *
Sample code: + * + *
{@code + * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) { + * ListGroupMembersRequest request = + * ListGroupMembersRequest.newBuilder() + * .setName(GroupName.ofProjectGroupName("[PROJECT]", "[GROUP]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setInterval(TimeInterval.newBuilder().build()) + * .build(); + * for (MonitoredResource element : groupServiceClient.listGroupMembers(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 */ @@ -515,6 +844,25 @@ public final ListGroupMembersPagedResponse listGroupMembers(ListGroupMembersRequ * Lists the monitored resources that are members of a group. * *
Sample code: + * + *
{@code + * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) { + * ListGroupMembersRequest request = + * ListGroupMembersRequest.newBuilder() + * .setName(GroupName.ofProjectGroupName("[PROJECT]", "[GROUP]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setInterval(TimeInterval.newBuilder().build()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * groupServiceClient.listGroupMembersPagedCallable().futureCall(request); + * // Do something. + * for (MonitoredResource element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) { + * while (true) { + * ListGroupMembersResponse response = + * groupServiceClient.listGroupMembersCallable().call(request); + * for (MonitoredResource element : response.getResponsesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }*/ public final UnaryCallable
This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * MonitoredResourceDescriptorName name = + * MonitoredResourceDescriptorName.ofProjectMonitoredResourceDescriptorName( + * "[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]"); + * MonitoredResourceDescriptor response = + * metricServiceClient.getMonitoredResourceDescriptor(name); + * } + * }+ * *
Note: close() needs to be called on the MetricServiceClient object to clean up resources such * as threads. In the example above, try-with-resources is used, which automatically calls close(). * @@ -167,6 +177,18 @@ public MetricServiceStub getStub() { * Lists monitored resource descriptors that match a filter. This method does not require a * Workspace. * + *
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * ResourceName name = ResourceName.of("[FOLDER]"); + * for (MonitoredResourceDescriptor element : + * metricServiceClient.listMonitoredResourceDescriptors(name).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param name Required. The project on which to execute the request. The format is: *
projects/[PROJECT_ID_OR_NUMBER] * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -185,6 +207,18 @@ public final ListMonitoredResourceDescriptorsPagedResponse listMonitoredResource * Lists monitored resource descriptors that match a filter. This method does not require a * Workspace. * + *
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * OrganizationName name = OrganizationName.of("[ORGANIZATION]"); + * for (MonitoredResourceDescriptor element : + * metricServiceClient.listMonitoredResourceDescriptors(name).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param name Required. The project on which to execute the request. The format is: *
projects/[PROJECT_ID_OR_NUMBER] * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -203,6 +237,18 @@ public final ListMonitoredResourceDescriptorsPagedResponse listMonitoredResource * Lists monitored resource descriptors that match a filter. This method does not require a * Workspace. * + *
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * ProjectName name = ProjectName.of("[PROJECT]"); + * for (MonitoredResourceDescriptor element : + * metricServiceClient.listMonitoredResourceDescriptors(name).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param name Required. The project on which to execute the request. The format is: *
projects/[PROJECT_ID_OR_NUMBER] * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -221,6 +267,21 @@ public final ListMonitoredResourceDescriptorsPagedResponse listMonitoredResource * Lists monitored resource descriptors that match a filter. This method does not require a * Workspace. * + *
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * String name = + * MonitoredResourceDescriptorName.ofProjectMonitoredResourceDescriptorName( + * "[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]") + * .toString(); + * for (MonitoredResourceDescriptor element : + * metricServiceClient.listMonitoredResourceDescriptors(name).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param name Required. The project on which to execute the request. The format is: *
projects/[PROJECT_ID_OR_NUMBER] * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -237,6 +298,27 @@ public final ListMonitoredResourceDescriptorsPagedResponse listMonitoredResource * Lists monitored resource descriptors that match a filter. This method does not require a * Workspace. * + *
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * ListMonitoredResourceDescriptorsRequest request = + * ListMonitoredResourceDescriptorsRequest.newBuilder() + * .setName( + * MonitoredResourceDescriptorName.ofProjectMonitoredResourceDescriptorName( + * "[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]") + * .toString()) + * .setFilter("filter-1274492040") + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (MonitoredResourceDescriptor element : + * metricServiceClient.listMonitoredResourceDescriptors(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 */ @@ -251,6 +333,27 @@ public final ListMonitoredResourceDescriptorsPagedResponse listMonitoredResource * Workspace. * *
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * ListMonitoredResourceDescriptorsRequest request = + * ListMonitoredResourceDescriptorsRequest.newBuilder() + * .setName( + * MonitoredResourceDescriptorName.ofProjectMonitoredResourceDescriptorName( + * "[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]") + * .toString()) + * .setFilter("filter-1274492040") + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture*/ public final UnaryCallable< ListMonitoredResourceDescriptorsRequest, ListMonitoredResourceDescriptorsPagedResponse> @@ -264,6 +367,24 @@ public final ListMonitoredResourceDescriptorsPagedResponse listMonitoredResource * Workspace. * *future = + * metricServiceClient.listMonitoredResourceDescriptorsPagedCallable().futureCall(request); + * // Do something. + * for (MonitoredResourceDescriptor element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * while (true) { + * ListMonitoredResourceDescriptorsResponse response = + * metricServiceClient.listMonitoredResourceDescriptorsCallable().call(request); + * for (MonitoredResourceDescriptor element : response.getResponsesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }*/ public final UnaryCallable< ListMonitoredResourceDescriptorsRequest, ListMonitoredResourceDescriptorsResponse> @@ -275,6 +396,18 @@ public final ListMonitoredResourceDescriptorsPagedResponse listMonitoredResource /** * Gets a single monitored resource descriptor. This method does not require a Workspace. * + *
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * MonitoredResourceDescriptorName name = + * MonitoredResourceDescriptorName.ofProjectMonitoredResourceDescriptorName( + * "[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]"); + * MonitoredResourceDescriptor response = + * metricServiceClient.getMonitoredResourceDescriptor(name); + * } + * }+ * * @param name Required. The monitored resource descriptor to get. The format is: *
projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE] *
The `[RESOURCE_TYPE]` is a predefined type, such as `cloudsql_database`. @@ -293,6 +426,19 @@ public final MonitoredResourceDescriptor getMonitoredResourceDescriptor( /** * Gets a single monitored resource descriptor. This method does not require a Workspace. * + *
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * String name = + * MonitoredResourceDescriptorName.ofProjectMonitoredResourceDescriptorName( + * "[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]") + * .toString(); + * MonitoredResourceDescriptor response = + * metricServiceClient.getMonitoredResourceDescriptor(name); + * } + * }+ * * @param name Required. The monitored resource descriptor to get. The format is: *
projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE] *
The `[RESOURCE_TYPE]` is a predefined type, such as `cloudsql_database`. @@ -308,6 +454,22 @@ public final MonitoredResourceDescriptor getMonitoredResourceDescriptor(String n /** * Gets a single monitored resource descriptor. This method does not require a Workspace. * + *
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * GetMonitoredResourceDescriptorRequest request = + * GetMonitoredResourceDescriptorRequest.newBuilder() + * .setName( + * MonitoredResourceDescriptorName.ofProjectMonitoredResourceDescriptorName( + * "[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]") + * .toString()) + * .build(); + * MonitoredResourceDescriptor response = + * metricServiceClient.getMonitoredResourceDescriptor(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 */ @@ -321,6 +483,22 @@ public final MonitoredResourceDescriptor getMonitoredResourceDescriptor( * Gets a single monitored resource descriptor. This method does not require a Workspace. * *
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * GetMonitoredResourceDescriptorRequest request = + * GetMonitoredResourceDescriptorRequest.newBuilder() + * .setName( + * MonitoredResourceDescriptorName.ofProjectMonitoredResourceDescriptorName( + * "[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]") + * .toString()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * metricServiceClient.getMonitoredResourceDescriptorCallable().futureCall(request); + * // Do something. + * MonitoredResourceDescriptor response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * ResourceName name = ResourceName.of("[FOLDER]"); + * for (MetricDescriptor element : + * metricServiceClient.listMetricDescriptors(name).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param name Required. The project on which to execute the request. The format is: *
projects/[PROJECT_ID_OR_NUMBER] * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -347,6 +537,18 @@ public final ListMetricDescriptorsPagedResponse listMetricDescriptors(ResourceNa /** * Lists metric descriptors that match a filter. This method does not require a Workspace. * + *
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * OrganizationName name = OrganizationName.of("[ORGANIZATION]"); + * for (MetricDescriptor element : + * metricServiceClient.listMetricDescriptors(name).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param name Required. The project on which to execute the request. The format is: *
projects/[PROJECT_ID_OR_NUMBER] * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -363,6 +565,18 @@ public final ListMetricDescriptorsPagedResponse listMetricDescriptors(Organizati /** * Lists metric descriptors that match a filter. This method does not require a Workspace. * + *
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * ProjectName name = ProjectName.of("[PROJECT]"); + * for (MetricDescriptor element : + * metricServiceClient.listMetricDescriptors(name).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param name Required. The project on which to execute the request. The format is: *
projects/[PROJECT_ID_OR_NUMBER] * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -379,6 +593,20 @@ public final ListMetricDescriptorsPagedResponse listMetricDescriptors(ProjectNam /** * Lists metric descriptors that match a filter. This method does not require a Workspace. * + *
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * String name = + * MetricDescriptorName.ofProjectMetricDescriptorName("[PROJECT]", "[METRIC_DESCRIPTOR]") + * .toString(); + * for (MetricDescriptor element : + * metricServiceClient.listMetricDescriptors(name).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param name Required. The project on which to execute the request. The format is: *
projects/[PROJECT_ID_OR_NUMBER] * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -393,6 +621,27 @@ public final ListMetricDescriptorsPagedResponse listMetricDescriptors(String nam /** * Lists metric descriptors that match a filter. This method does not require a Workspace. * + *
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * ListMetricDescriptorsRequest request = + * ListMetricDescriptorsRequest.newBuilder() + * .setName( + * MetricDescriptorName.ofProjectMetricDescriptorName( + * "[PROJECT]", "[METRIC_DESCRIPTOR]") + * .toString()) + * .setFilter("filter-1274492040") + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (MetricDescriptor element : + * metricServiceClient.listMetricDescriptors(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 */ @@ -406,6 +655,27 @@ public final ListMetricDescriptorsPagedResponse listMetricDescriptors( * Lists metric descriptors that match a filter. This method does not require a Workspace. * *
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * ListMetricDescriptorsRequest request = + * ListMetricDescriptorsRequest.newBuilder() + * .setName( + * MetricDescriptorName.ofProjectMetricDescriptorName( + * "[PROJECT]", "[METRIC_DESCRIPTOR]") + * .toString()) + * .setFilter("filter-1274492040") + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * metricServiceClient.listMetricDescriptorsPagedCallable().futureCall(request); + * // Do something. + * for (MetricDescriptor element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * while (true) { + * ListMetricDescriptorsResponse response = + * metricServiceClient.listMetricDescriptorsCallable().call(request); + * for (MetricDescriptor element : response.getResponsesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }*/ public final UnaryCallable
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * MetricDescriptorName name = + * MetricDescriptorName.ofProjectMetricDescriptorName("[PROJECT]", "[METRIC_DESCRIPTOR]"); + * MetricDescriptor response = metricServiceClient.getMetricDescriptor(name); + * } + * }+ * * @param name Required. The metric descriptor on which to execute the request. The format is: *
projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] *
An example value of `[METRIC_ID]` is @@ -445,6 +743,17 @@ public final MetricDescriptor getMetricDescriptor(MetricDescriptorName name) { /** * Gets a single metric descriptor. This method does not require a Workspace. * + *
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * String name = + * MetricDescriptorName.ofProjectMetricDescriptorName("[PROJECT]", "[METRIC_DESCRIPTOR]") + * .toString(); + * MetricDescriptor response = metricServiceClient.getMetricDescriptor(name); + * } + * }+ * * @param name Required. The metric descriptor on which to execute the request. The format is: *
projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] *
An example value of `[METRIC_ID]` is @@ -461,6 +770,21 @@ public final MetricDescriptor getMetricDescriptor(String name) { /** * Gets a single metric descriptor. This method does not require a Workspace. * + *
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * GetMetricDescriptorRequest request = + * GetMetricDescriptorRequest.newBuilder() + * .setName( + * MetricDescriptorName.ofProjectMetricDescriptorName( + * "[PROJECT]", "[METRIC_DESCRIPTOR]") + * .toString()) + * .build(); + * MetricDescriptor response = metricServiceClient.getMetricDescriptor(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 */ @@ -473,6 +797,22 @@ public final MetricDescriptor getMetricDescriptor(GetMetricDescriptorRequest req * Gets a single metric descriptor. This method does not require a Workspace. * *
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * GetMetricDescriptorRequest request = + * GetMetricDescriptorRequest.newBuilder() + * .setName( + * MetricDescriptorName.ofProjectMetricDescriptorName( + * "[PROJECT]", "[METRIC_DESCRIPTOR]") + * .toString()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * metricServiceClient.getMetricDescriptorCallable().futureCall(request); + * // Do something. + * MetricDescriptor response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * ResourceName name = ResourceName.of("[FOLDER]"); + * MetricDescriptor metricDescriptor = MetricDescriptor.newBuilder().build(); + * MetricDescriptor response = + * metricServiceClient.createMetricDescriptor(name, metricDescriptor); + * } + * }+ * * @param name Required. The project on which to execute the request. The format is: *
projects/[PROJECT_ID_OR_NUMBER] * @param metricDescriptor Required. The new [custom @@ -505,6 +856,17 @@ public final MetricDescriptor createMetricDescriptor( * Creates a new metric descriptor. User-created metric descriptors define [custom * metrics](https://cloud.google.com/monitoring/custom-metrics). * + *
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * OrganizationName name = OrganizationName.of("[ORGANIZATION]"); + * MetricDescriptor metricDescriptor = MetricDescriptor.newBuilder().build(); + * MetricDescriptor response = + * metricServiceClient.createMetricDescriptor(name, metricDescriptor); + * } + * }+ * * @param name Required. The project on which to execute the request. The format is: *
projects/[PROJECT_ID_OR_NUMBER] * @param metricDescriptor Required. The new [custom @@ -526,6 +888,17 @@ public final MetricDescriptor createMetricDescriptor( * Creates a new metric descriptor. User-created metric descriptors define [custom * metrics](https://cloud.google.com/monitoring/custom-metrics). * + *
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * ProjectName name = ProjectName.of("[PROJECT]"); + * MetricDescriptor metricDescriptor = MetricDescriptor.newBuilder().build(); + * MetricDescriptor response = + * metricServiceClient.createMetricDescriptor(name, metricDescriptor); + * } + * }+ * * @param name Required. The project on which to execute the request. The format is: *
projects/[PROJECT_ID_OR_NUMBER] * @param metricDescriptor Required. The new [custom @@ -547,6 +920,19 @@ public final MetricDescriptor createMetricDescriptor( * Creates a new metric descriptor. User-created metric descriptors define [custom * metrics](https://cloud.google.com/monitoring/custom-metrics). * + *
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * String name = + * MetricDescriptorName.ofProjectMetricDescriptorName("[PROJECT]", "[METRIC_DESCRIPTOR]") + * .toString(); + * MetricDescriptor metricDescriptor = MetricDescriptor.newBuilder().build(); + * MetricDescriptor response = + * metricServiceClient.createMetricDescriptor(name, metricDescriptor); + * } + * }+ * * @param name Required. The project on which to execute the request. The format is: *
projects/[PROJECT_ID_OR_NUMBER] * @param metricDescriptor Required. The new [custom @@ -568,6 +954,22 @@ public final MetricDescriptor createMetricDescriptor( * Creates a new metric descriptor. User-created metric descriptors define [custom * metrics](https://cloud.google.com/monitoring/custom-metrics). * + *
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * CreateMetricDescriptorRequest request = + * CreateMetricDescriptorRequest.newBuilder() + * .setName( + * MetricDescriptorName.ofProjectMetricDescriptorName( + * "[PROJECT]", "[METRIC_DESCRIPTOR]") + * .toString()) + * .setMetricDescriptor(MetricDescriptor.newBuilder().build()) + * .build(); + * MetricDescriptor response = metricServiceClient.createMetricDescriptor(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 */ @@ -581,6 +983,23 @@ public final MetricDescriptor createMetricDescriptor(CreateMetricDescriptorReque * metrics](https://cloud.google.com/monitoring/custom-metrics). * *
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * CreateMetricDescriptorRequest request = + * CreateMetricDescriptorRequest.newBuilder() + * .setName( + * MetricDescriptorName.ofProjectMetricDescriptorName( + * "[PROJECT]", "[METRIC_DESCRIPTOR]") + * .toString()) + * .setMetricDescriptor(MetricDescriptor.newBuilder().build()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * metricServiceClient.createMetricDescriptorCallable().futureCall(request); + * // Do something. + * MetricDescriptor response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * MetricDescriptorName name = + * MetricDescriptorName.ofProjectMetricDescriptorName("[PROJECT]", "[METRIC_DESCRIPTOR]"); + * metricServiceClient.deleteMetricDescriptor(name); + * } + * }+ * * @param name Required. The metric descriptor on which to execute the request. The format is: *
projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] *
An example of `[METRIC_ID]` is: `"custom.googleapis.com/my_test_metric"`. @@ -610,6 +1039,17 @@ public final void deleteMetricDescriptor(MetricDescriptorName name) { * Deletes a metric descriptor. Only user-created [custom * metrics](https://cloud.google.com/monitoring/custom-metrics) can be deleted. * + *
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * String name = + * MetricDescriptorName.ofProjectMetricDescriptorName("[PROJECT]", "[METRIC_DESCRIPTOR]") + * .toString(); + * metricServiceClient.deleteMetricDescriptor(name); + * } + * }+ * * @param name Required. The metric descriptor on which to execute the request. The format is: *
projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] *
An example of `[METRIC_ID]` is: `"custom.googleapis.com/my_test_metric"`. @@ -626,6 +1066,21 @@ public final void deleteMetricDescriptor(String name) { * Deletes a metric descriptor. Only user-created [custom * metrics](https://cloud.google.com/monitoring/custom-metrics) can be deleted. * + *
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * DeleteMetricDescriptorRequest request = + * DeleteMetricDescriptorRequest.newBuilder() + * .setName( + * MetricDescriptorName.ofProjectMetricDescriptorName( + * "[PROJECT]", "[METRIC_DESCRIPTOR]") + * .toString()) + * .build(); + * metricServiceClient.deleteMetricDescriptor(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 */ @@ -639,6 +1094,22 @@ public final void deleteMetricDescriptor(DeleteMetricDescriptorRequest request) * metrics](https://cloud.google.com/monitoring/custom-metrics) can be deleted. * *
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * DeleteMetricDescriptorRequest request = + * DeleteMetricDescriptorRequest.newBuilder() + * .setName( + * MetricDescriptorName.ofProjectMetricDescriptorName( + * "[PROJECT]", "[METRIC_DESCRIPTOR]") + * .toString()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * metricServiceClient.deleteMetricDescriptorCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * ProjectName name = ProjectName.of("[PROJECT]"); + * String filter = "filter-1274492040"; + * TimeInterval interval = TimeInterval.newBuilder().build(); + * ListTimeSeriesRequest.TimeSeriesView view = ListTimeSeriesRequest.TimeSeriesView.forNumber(0); + * for (TimeSeries element : + * metricServiceClient.listTimeSeries(name, filter, interval, view).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param name Required. The project on which to execute the request. The format is: *
projects/[PROJECT_ID_OR_NUMBER] * @param filter Required. A [monitoring @@ -681,6 +1167,21 @@ public final ListTimeSeriesPagedResponse listTimeSeries( /** * Lists time series that match a filter. This method does not require a Workspace. * + *
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * String name = ProjectName.of("[PROJECT]").toString(); + * String filter = "filter-1274492040"; + * TimeInterval interval = TimeInterval.newBuilder().build(); + * ListTimeSeriesRequest.TimeSeriesView view = ListTimeSeriesRequest.TimeSeriesView.forNumber(0); + * for (TimeSeries element : + * metricServiceClient.listTimeSeries(name, filter, interval, view).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param name Required. The project on which to execute the request. The format is: *
projects/[PROJECT_ID_OR_NUMBER] * @param filter Required. A [monitoring @@ -713,6 +1214,26 @@ public final ListTimeSeriesPagedResponse listTimeSeries( /** * Lists time series that match a filter. This method does not require a Workspace. * + *
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * ListTimeSeriesRequest request = + * ListTimeSeriesRequest.newBuilder() + * .setName(ProjectName.of("[PROJECT]").toString()) + * .setFilter("filter-1274492040") + * .setInterval(TimeInterval.newBuilder().build()) + * .setAggregation(Aggregation.newBuilder().build()) + * .setOrderBy("orderBy-1207110587") + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (TimeSeries element : metricServiceClient.listTimeSeries(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 */ @@ -725,6 +1246,27 @@ public final ListTimeSeriesPagedResponse listTimeSeries(ListTimeSeriesRequest re * Lists time series that match a filter. This method does not require a Workspace. * *
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * ListTimeSeriesRequest request = + * ListTimeSeriesRequest.newBuilder() + * .setName(ProjectName.of("[PROJECT]").toString()) + * .setFilter("filter-1274492040") + * .setInterval(TimeInterval.newBuilder().build()) + * .setAggregation(Aggregation.newBuilder().build()) + * .setOrderBy("orderBy-1207110587") + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * metricServiceClient.listTimeSeriesPagedCallable().futureCall(request); + * // Do something. + * for (TimeSeries element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * while (true) { + * ListTimeSeriesResponse response = + * metricServiceClient.listTimeSeriesCallable().call(request); + * for (TimeSeries element : response.getResponsesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }*/ public final UnaryCallable
Sample code: + * + *
{@code + * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) { + * ProjectName name = ProjectName.of("[PROJECT]"); + * List+ * * @param name Required. The project on which to execute the request. The format is: *timeSeries = new ArrayList<>(); + * metricServiceClient.createTimeSeries(name, timeSeries); + * } + * }
projects/[PROJECT_ID_OR_NUMBER]
* @param timeSeries Required. The new data to be added to a list of time series. Adds at most one
@@ -772,6 +1342,16 @@ public final void createTimeSeries(ProjectName name, List Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]
* @param timeSeries Required. The new data to be added to a list of time series. Adds at most one
@@ -793,6 +1373,19 @@ public final void createTimeSeries(String name, List Sample code:
+ *
+ * Sample code:
+ *
+ * This class provides the ability to make remote calls to the backing service through method
* calls that map to API methods. Sample code to get started:
*
+ * Note: close() needs to be called on the NotificationChannelServiceClient object to clean up
* resources such as threads. In the example above, try-with-resources is used, which automatically
* calls close().
@@ -173,6 +184,19 @@ public NotificationChannelServiceStub getStub() {
* Lists the descriptors for supported channel types. The use of descriptors makes it possible for
* new channel types to be dynamically added.
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]
@@ -196,6 +220,19 @@ public final ListNotificationChannelDescriptorsPagedResponse listNotificationCha
* Lists the descriptors for supported channel types. The use of descriptors makes it possible for
* new channel types to be dynamically added.
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]
@@ -219,6 +256,19 @@ public final ListNotificationChannelDescriptorsPagedResponse listNotificationCha
* Lists the descriptors for supported channel types. The use of descriptors makes it possible for
* new channel types to be dynamically added.
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]
@@ -242,6 +292,22 @@ public final ListNotificationChannelDescriptorsPagedResponse listNotificationCha
* Lists the descriptors for supported channel types. The use of descriptors makes it possible for
* new channel types to be dynamically added.
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]
@@ -263,6 +329,29 @@ public final ListNotificationChannelDescriptorsPagedResponse listNotificationCha
* Lists the descriptors for supported channel types. The use of descriptors makes it possible for
* new channel types to be dynamically added.
*
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE]
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -321,6 +467,20 @@ public final NotificationChannelDescriptor getNotificationChannelDescriptor(
* Gets a single channel descriptor. The descriptor indicates which fields are expected /
* permitted for a notification channel of the given type.
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE]
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -336,6 +496,23 @@ public final NotificationChannelDescriptor getNotificationChannelDescriptor(Stri
* Gets a single channel descriptor. The descriptor indicates which fields are expected /
* permitted for a notification channel of the given type.
*
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]
* This names the container in which to look for the notification channels; it does not
@@ -380,6 +589,19 @@ public final ListNotificationChannelsPagedResponse listNotificationChannels(Reso
/**
* Lists the notification channels that have been created for the project.
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]
* This names the container in which to look for the notification channels; it does not
@@ -401,6 +623,19 @@ public final ListNotificationChannelsPagedResponse listNotificationChannels(
/**
* Lists the notification channels that have been created for the project.
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]
* This names the container in which to look for the notification channels; it does not
@@ -421,6 +656,22 @@ public final ListNotificationChannelsPagedResponse listNotificationChannels(Proj
/**
* Lists the notification channels that have been created for the project.
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]
* This names the container in which to look for the notification channels; it does not
@@ -439,6 +690,29 @@ public final ListNotificationChannelsPagedResponse listNotificationChannels(Stri
/**
* Lists the notification channels that have been created for the project.
*
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -495,6 +825,19 @@ public final NotificationChannel getNotificationChannel(NotificationChannelName
* 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:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -512,6 +855,23 @@ public final NotificationChannel getNotificationChannel(String name) {
* 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:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]
* This names the container into which the channel will be written, this does not name the
@@ -562,6 +951,18 @@ public final NotificationChannel createNotificationChannel(
* Creates a new notification channel, representing a single notification endpoint such as an
* email address, SMS number, or PagerDuty service.
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]
* This names the container into which the channel will be written, this does not name the
@@ -586,6 +987,18 @@ public final NotificationChannel createNotificationChannel(
* Creates a new notification channel, representing a single notification endpoint such as an
* email address, SMS number, or PagerDuty service.
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]
* This names the container into which the channel will be written, this does not name the
@@ -610,6 +1023,21 @@ public final NotificationChannel createNotificationChannel(
* Creates a new notification channel, representing a single notification endpoint such as an
* email address, SMS number, or PagerDuty service.
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]
* This names the container into which the channel will be written, this does not name the
@@ -634,6 +1062,24 @@ public final NotificationChannel createNotificationChannel(
* Creates a new notification channel, representing a single notification endpoint such as an
* email address, SMS number, or PagerDuty service.
*
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
* @param force If true, the notification channel will be deleted regardless of its use in alert
@@ -722,6 +1242,20 @@ public final void deleteNotificationChannel(NotificationChannelName name, boolea
/**
* Deletes a notification channel.
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
* @param force If true, the notification channel will be deleted regardless of its use in alert
@@ -740,6 +1274,23 @@ public final void deleteNotificationChannel(String name, boolean force) {
/**
* Deletes a notification channel.
*
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * This class provides the ability to make remote calls to the backing service through method
* calls that map to API methods. Sample code to get started:
*
+ * Note: close() needs to be called on the ServiceMonitoringServiceClient object to clean up
* resources such as threads. In the example above, try-with-resources is used, which automatically
* calls close().
@@ -171,6 +180,17 @@ public ServiceMonitoringServiceStub getStub() {
/**
* Create a `Service`.
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]
* @param service Required. The `Service` to create.
@@ -189,6 +209,17 @@ public final Service createService(ResourceName parent, Service service) {
/**
* Create a `Service`.
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]
* @param service Required. The `Service` to create.
@@ -207,6 +238,17 @@ public final Service createService(OrganizationName parent, Service service) {
/**
* Create a `Service`.
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]
* @param service Required. The `Service` to create.
@@ -225,6 +267,17 @@ public final Service createService(ProjectName parent, Service service) {
/**
* Create a `Service`.
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]
* @param service Required. The `Service` to create.
@@ -240,6 +293,21 @@ public final Service createService(String parent, Service service) {
/**
* Create a `Service`.
*
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -275,6 +369,16 @@ public final Service getService(ServiceName name) {
/**
* Get the named `Service`.
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -288,6 +392,19 @@ public final Service getService(String name) {
/**
* Get the named `Service`.
*
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER] workspaces/[HOST_PROJECT_ID_OR_NUMBER]
@@ -326,6 +469,18 @@ public final ListServicesPagedResponse listServices(ResourceName parent) {
/**
* List `Service`s for this workspace.
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER] workspaces/[HOST_PROJECT_ID_OR_NUMBER]
@@ -343,6 +498,18 @@ public final ListServicesPagedResponse listServices(OrganizationName parent) {
/**
* List `Service`s for this workspace.
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER] workspaces/[HOST_PROJECT_ID_OR_NUMBER]
@@ -360,6 +527,18 @@ public final ListServicesPagedResponse listServices(ProjectName parent) {
/**
* List `Service`s for this workspace.
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER] workspaces/[HOST_PROJECT_ID_OR_NUMBER]
@@ -374,6 +553,24 @@ public final ListServicesPagedResponse listServices(String parent) {
/**
* List `Service`s for this workspace.
*
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -454,6 +738,16 @@ public final void deleteService(ServiceName name) {
/**
* Soft delete this `Service`.
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -467,6 +761,19 @@ public final void deleteService(String name) {
/**
* Soft delete this `Service`.
*
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]
* @param serviceLevelObjective Required. The `ServiceLevelObjective` to create. The provided
@@ -508,6 +841,18 @@ public final ServiceLevelObjective createServiceLevelObjective(
/**
* Create a `ServiceLevelObjective` for the given `Service`.
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]
* @param serviceLevelObjective Required. The `ServiceLevelObjective` to create. The provided
@@ -528,6 +873,22 @@ public final ServiceLevelObjective createServiceLevelObjective(
/**
* Create a `ServiceLevelObjective` for the given `Service`.
*
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -567,6 +957,20 @@ public final ServiceLevelObjective getServiceLevelObjective(ServiceLevelObjectiv
/**
* Get a `ServiceLevelObjective` by name.
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -581,6 +985,23 @@ public final ServiceLevelObjective getServiceLevelObjective(String name) {
/**
* Get a `ServiceLevelObjective` by name.
*
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]
@@ -623,6 +1074,19 @@ public final ListServiceLevelObjectivesPagedResponse listServiceLevelObjectives(
/**
* List the `ServiceLevelObjective`s for the given `Service`.
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]
@@ -639,6 +1103,25 @@ public final ListServiceLevelObjectivesPagedResponse listServiceLevelObjectives(
/**
* List the `ServiceLevelObjective`s for the given `Service`.
*
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -730,6 +1306,19 @@ public final void deleteServiceLevelObjective(ServiceLevelObjectiveName name) {
/**
* Delete the given `ServiceLevelObjective`.
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -744,6 +1333,22 @@ public final void deleteServiceLevelObjective(String name) {
/**
* Delete the given `ServiceLevelObjective`.
*
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * This class provides the ability to make remote calls to the backing service through method
* calls that map to API methods. Sample code to get started:
*
+ * Note: close() needs to be called on the UptimeCheckServiceClient object to clean up resources
* such as threads. In the example above, try-with-resources is used, which automatically calls
* close().
@@ -168,6 +177,18 @@ public UptimeCheckServiceStub getStub() {
* Lists the existing valid Uptime check configurations for the project (leaving out any invalid
* configurations).
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]
@@ -186,6 +207,18 @@ public final ListUptimeCheckConfigsPagedResponse listUptimeCheckConfigs(Resource
* Lists the existing valid Uptime check configurations for the project (leaving out any invalid
* configurations).
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]
@@ -204,6 +237,18 @@ public final ListUptimeCheckConfigsPagedResponse listUptimeCheckConfigs(Organiza
* Lists the existing valid Uptime check configurations for the project (leaving out any invalid
* configurations).
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]
@@ -222,6 +267,20 @@ public final ListUptimeCheckConfigsPagedResponse listUptimeCheckConfigs(ProjectN
* Lists the existing valid Uptime check configurations for the project (leaving out any invalid
* configurations).
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]
@@ -238,6 +297,26 @@ public final ListUptimeCheckConfigsPagedResponse listUptimeCheckConfigs(String p
* Lists the existing valid Uptime check configurations for the project (leaving out any invalid
* configurations).
*
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID]
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -290,6 +418,17 @@ public final UptimeCheckConfig getUptimeCheckConfig(UptimeCheckConfigName name)
/**
* Gets a single Uptime check configuration.
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID]
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -304,6 +443,21 @@ public final UptimeCheckConfig getUptimeCheckConfig(String name) {
/**
* Gets a single Uptime check configuration.
*
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]
* @param uptimeCheckConfig Required. The new Uptime check configuration.
@@ -345,6 +526,17 @@ public final UptimeCheckConfig createUptimeCheckConfig(
/**
* Creates a new Uptime check configuration.
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]
* @param uptimeCheckConfig Required. The new Uptime check configuration.
@@ -364,6 +556,17 @@ public final UptimeCheckConfig createUptimeCheckConfig(
/**
* Creates a new Uptime check configuration.
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]
* @param uptimeCheckConfig Required. The new Uptime check configuration.
@@ -383,6 +586,19 @@ public final UptimeCheckConfig createUptimeCheckConfig(
/**
* Creates a new Uptime check configuration.
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]
* @param uptimeCheckConfig Required. The new Uptime check configuration.
@@ -402,6 +618,22 @@ public final UptimeCheckConfig createUptimeCheckConfig(
/**
* Creates a new Uptime check configuration.
*
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID]
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -492,6 +789,17 @@ public final void deleteUptimeCheckConfig(UptimeCheckConfigName name) {
* configuration is referenced by an alert policy or other dependent configs that would be
* rendered invalid by the deletion.
*
+ * Sample code:
+ *
+ * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID]
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -508,6 +816,21 @@ public final void deleteUptimeCheckConfig(String name) {
* configuration is referenced by an alert policy or other dependent configs that would be
* rendered invalid by the deletion.
*
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample for AlertPolicyServiceClient:
*
+ * ======================= GroupServiceClient =======================
*
* Service Description: The Group API lets you inspect and manage your
@@ -42,6 +50,13 @@
*
* Sample for GroupServiceClient:
*
+ * ======================= MetricServiceClient =======================
*
* Service Description: Manages metric descriptors, monitored resource descriptors, and time
@@ -49,6 +64,16 @@
*
* Sample for MetricServiceClient:
*
+ * ======================= NotificationChannelServiceClient =======================
*
* Service Description: The Notification Channel API provides access to configuration that
@@ -56,6 +81,17 @@
*
* Sample for NotificationChannelServiceClient:
*
+ * ======================= ServiceMonitoringServiceClient =======================
*
* Service Description: The Cloud Monitoring Service-Oriented Monitoring API has endpoints for
@@ -64,6 +100,15 @@
*
* Sample for ServiceMonitoringServiceClient:
*
+ * ======================= UptimeCheckServiceClient =======================
*
* Service Description: The UptimeCheckService API is used to manage (list, create, delete, edit)
@@ -74,6 +119,15 @@
* the left-hand side to navigate to Stackdriver, and then clicking on "Uptime".
*
* Sample for UptimeCheckServiceClient:
+ *
+ * {@code
+ * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) {
+ * String name = ProjectName.of("[PROJECT]").toString();
+ * List
+ *
* @param name Required. The project on which to execute the request. The format is:
* {@code
+ * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) {
+ * CreateTimeSeriesRequest request =
+ * CreateTimeSeriesRequest.newBuilder()
+ * .setName(ProjectName.of("[PROJECT]").toString())
+ * .addAllTimeSeries(new ArrayList
+ *
* @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
*/
@@ -807,6 +1400,19 @@ public final void createTimeSeries(CreateTimeSeriesRequest request) {
* message is included in the error response.
*
* {@code
+ * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) {
+ * CreateTimeSeriesRequest request =
+ * CreateTimeSeriesRequest.newBuilder()
+ * .setName(ProjectName.of("[PROJECT]").toString())
+ * .addAllTimeSeries(new ArrayList
*/
public final UnaryCallable{@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * NotificationChannelDescriptorName name =
+ * NotificationChannelDescriptorName.ofProjectChannelDescriptorName(
+ * "[PROJECT]", "[CHANNEL_DESCRIPTOR]");
+ * NotificationChannelDescriptor response =
+ * notificationChannelServiceClient.getNotificationChannelDescriptor(name);
+ * }
+ * }
+ *
* {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * ResourceName name = ResourceName.of("[FOLDER]");
+ * for (NotificationChannelDescriptor element :
+ * notificationChannelServiceClient.listNotificationChannelDescriptors(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:
* {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * OrganizationName name = OrganizationName.of("[ORGANIZATION]");
+ * for (NotificationChannelDescriptor element :
+ * notificationChannelServiceClient.listNotificationChannelDescriptors(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:
* {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * ProjectName name = ProjectName.of("[PROJECT]");
+ * for (NotificationChannelDescriptor element :
+ * notificationChannelServiceClient.listNotificationChannelDescriptors(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:
* {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * String name =
+ * NotificationChannelDescriptorName.ofProjectChannelDescriptorName(
+ * "[PROJECT]", "[CHANNEL_DESCRIPTOR]")
+ * .toString();
+ * for (NotificationChannelDescriptor element :
+ * notificationChannelServiceClient.listNotificationChannelDescriptors(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:
* {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * ListNotificationChannelDescriptorsRequest request =
+ * ListNotificationChannelDescriptorsRequest.newBuilder()
+ * .setName(
+ * NotificationChannelDescriptorName.ofProjectChannelDescriptorName(
+ * "[PROJECT]", "[CHANNEL_DESCRIPTOR]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * 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
*/
@@ -277,6 +366,29 @@ public final ListNotificationChannelDescriptorsPagedResponse listNotificationCha
* new channel types to be dynamically added.
*
* {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * ListNotificationChannelDescriptorsRequest request =
+ * ListNotificationChannelDescriptorsRequest.newBuilder()
+ * .setName(
+ * NotificationChannelDescriptorName.ofProjectChannelDescriptorName(
+ * "[PROJECT]", "[CHANNEL_DESCRIPTOR]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
*/
public final UnaryCallable<
ListNotificationChannelDescriptorsRequest,
@@ -291,6 +403,27 @@ public final ListNotificationChannelDescriptorsPagedResponse listNotificationCha
* new channel types to be dynamically added.
*
* {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * while (true) {
+ * ListNotificationChannelDescriptorsResponse response =
+ * notificationChannelServiceClient
+ * .listNotificationChannelDescriptorsCallable()
+ * .call(request);
+ * for (NotificationChannelDescriptor element : response.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
*/
public final UnaryCallable<
ListNotificationChannelDescriptorsRequest, ListNotificationChannelDescriptorsResponse>
@@ -303,6 +436,19 @@ public final ListNotificationChannelDescriptorsPagedResponse listNotificationCha
* Gets a single channel descriptor. The descriptor indicates which fields are expected /
* permitted for a notification channel of the given type.
*
+ * {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * NotificationChannelDescriptorName name =
+ * NotificationChannelDescriptorName.ofProjectChannelDescriptorName(
+ * "[PROJECT]", "[CHANNEL_DESCRIPTOR]");
+ * NotificationChannelDescriptor response =
+ * notificationChannelServiceClient.getNotificationChannelDescriptor(name);
+ * }
+ * }
+ *
* @param name Required. The channel type for which to execute the request. The format is:
* {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * String name =
+ * NotificationChannelDescriptorName.ofProjectChannelDescriptorName(
+ * "[PROJECT]", "[CHANNEL_DESCRIPTOR]")
+ * .toString();
+ * NotificationChannelDescriptor response =
+ * notificationChannelServiceClient.getNotificationChannelDescriptor(name);
+ * }
+ * }
+ *
* @param name Required. The channel type for which to execute the request. The format is:
* {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * GetNotificationChannelDescriptorRequest request =
+ * GetNotificationChannelDescriptorRequest.newBuilder()
+ * .setName(
+ * NotificationChannelDescriptorName.ofProjectChannelDescriptorName(
+ * "[PROJECT]", "[CHANNEL_DESCRIPTOR]")
+ * .toString())
+ * .build();
+ * 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
*/
@@ -350,6 +527,25 @@ public final NotificationChannelDescriptor getNotificationChannelDescriptor(
* permitted for a notification channel of the given type.
*
* {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * GetNotificationChannelDescriptorRequest request =
+ * GetNotificationChannelDescriptorRequest.newBuilder()
+ * .setName(
+ * NotificationChannelDescriptorName.ofProjectChannelDescriptorName(
+ * "[PROJECT]", "[CHANNEL_DESCRIPTOR]")
+ * .toString())
+ * .build();
+ * ApiFuture
*/
public final UnaryCallable{@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * ResourceName name = ResourceName.of("[FOLDER]");
+ * for (NotificationChannel element :
+ * notificationChannelServiceClient.listNotificationChannels(name).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
* @param name Required. The project on which to execute the request. The format is:
* {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * OrganizationName name = OrganizationName.of("[ORGANIZATION]");
+ * for (NotificationChannel element :
+ * notificationChannelServiceClient.listNotificationChannels(name).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
* @param name Required. The project on which to execute the request. The format is:
* {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * ProjectName name = ProjectName.of("[PROJECT]");
+ * for (NotificationChannel element :
+ * notificationChannelServiceClient.listNotificationChannels(name).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
* @param name Required. The project on which to execute the request. The format is:
* {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * String name =
+ * NotificationChannelName.ofProjectNotificationChannelName(
+ * "[PROJECT]", "[NOTIFICATION_CHANNEL]")
+ * .toString();
+ * for (NotificationChannel element :
+ * notificationChannelServiceClient.listNotificationChannels(name).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
* @param name Required. The project on which to execute the request. The format is:
* {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * ListNotificationChannelsRequest request =
+ * ListNotificationChannelsRequest.newBuilder()
+ * .setName(
+ * NotificationChannelName.ofProjectNotificationChannelName(
+ * "[PROJECT]", "[NOTIFICATION_CHANNEL]")
+ * .toString())
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (NotificationChannel element :
+ * notificationChannelServiceClient.listNotificationChannels(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
*/
@@ -452,6 +726,31 @@ public final ListNotificationChannelsPagedResponse listNotificationChannels(
* Lists the notification channels that have been created for the project.
*
* {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * ListNotificationChannelsRequest request =
+ * ListNotificationChannelsRequest.newBuilder()
+ * .setName(
+ * NotificationChannelName.ofProjectNotificationChannelName(
+ * "[PROJECT]", "[NOTIFICATION_CHANNEL]")
+ * .toString())
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
*/
public final UnaryCallable{@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * while (true) {
+ * ListNotificationChannelsResponse response =
+ * notificationChannelServiceClient.listNotificationChannelsCallable().call(request);
+ * for (NotificationChannel element : response.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
*/
public final UnaryCallable{@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * NotificationChannelName name =
+ * NotificationChannelName.ofProjectNotificationChannelName(
+ * "[PROJECT]", "[NOTIFICATION_CHANNEL]");
+ * NotificationChannel response = notificationChannelServiceClient.getNotificationChannel(name);
+ * }
+ * }
+ *
* @param name Required. The channel for which to execute the request. The format is:
* {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * String name =
+ * NotificationChannelName.ofProjectNotificationChannelName(
+ * "[PROJECT]", "[NOTIFICATION_CHANNEL]")
+ * .toString();
+ * NotificationChannel response = notificationChannelServiceClient.getNotificationChannel(name);
+ * }
+ * }
+ *
* @param name Required. The channel for which to execute the request. The format is:
* {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * GetNotificationChannelRequest request =
+ * GetNotificationChannelRequest.newBuilder()
+ * .setName(
+ * NotificationChannelName.ofProjectNotificationChannelName(
+ * "[PROJECT]", "[NOTIFICATION_CHANNEL]")
+ * .toString())
+ * .build();
+ * 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
*/
@@ -527,6 +887,23 @@ public final NotificationChannel getNotificationChannel(GetNotificationChannelRe
* information that was supplied in the call to the create method.
*
* {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * GetNotificationChannelRequest request =
+ * GetNotificationChannelRequest.newBuilder()
+ * .setName(
+ * NotificationChannelName.ofProjectNotificationChannelName(
+ * "[PROJECT]", "[NOTIFICATION_CHANNEL]")
+ * .toString())
+ * .build();
+ * ApiFuture
*/
public final UnaryCallable{@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * ResourceName name = ResourceName.of("[FOLDER]");
+ * 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:
* {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * OrganizationName name = OrganizationName.of("[ORGANIZATION]");
+ * 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:
* {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * ProjectName name = ProjectName.of("[PROJECT]");
+ * 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:
* {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * String name =
+ * NotificationChannelName.ofProjectNotificationChannelName(
+ * "[PROJECT]", "[NOTIFICATION_CHANNEL]")
+ * .toString();
+ * 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:
* {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * CreateNotificationChannelRequest request =
+ * CreateNotificationChannelRequest.newBuilder()
+ * .setName(
+ * NotificationChannelName.ofProjectNotificationChannelName(
+ * "[PROJECT]", "[NOTIFICATION_CHANNEL]")
+ * .toString())
+ * .setNotificationChannel(NotificationChannel.newBuilder().build())
+ * .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
*/
@@ -648,6 +1094,24 @@ public final NotificationChannel createNotificationChannel(
* email address, SMS number, or PagerDuty service.
*
* {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * CreateNotificationChannelRequest request =
+ * CreateNotificationChannelRequest.newBuilder()
+ * .setName(
+ * NotificationChannelName.ofProjectNotificationChannelName(
+ * "[PROJECT]", "[NOTIFICATION_CHANNEL]")
+ * .toString())
+ * .setNotificationChannel(NotificationChannel.newBuilder().build())
+ * .build();
+ * ApiFuture
*/
public final UnaryCallable{@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * NotificationChannel notificationChannel = NotificationChannel.newBuilder().build();
+ * NotificationChannel response =
+ * notificationChannelServiceClient.updateNotificationChannel(
+ * updateMask, notificationChannel);
+ * }
+ * }
+ *
* @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
@@ -678,6 +1155,21 @@ public final NotificationChannel updateNotificationChannel(
/**
* Updates a notification channel. Fields not specified in the field mask remain unchanged.
*
+ * {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * UpdateNotificationChannelRequest request =
+ * UpdateNotificationChannelRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setNotificationChannel(NotificationChannel.newBuilder().build())
+ * .build();
+ * 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
*/
@@ -691,6 +1183,21 @@ public final NotificationChannel updateNotificationChannel(
* Updates a notification channel. Fields not specified in the field mask remain unchanged.
*
* {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * UpdateNotificationChannelRequest request =
+ * UpdateNotificationChannelRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setNotificationChannel(NotificationChannel.newBuilder().build())
+ * .build();
+ * ApiFuture
*/
public final UnaryCallable{@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * NotificationChannelName name =
+ * NotificationChannelName.ofProjectNotificationChannelName(
+ * "[PROJECT]", "[NOTIFICATION_CHANNEL]");
+ * boolean force = true;
+ * notificationChannelServiceClient.deleteNotificationChannel(name, force);
+ * }
+ * }
+ *
* @param name Required. The channel for which to execute the request. The format is:
* {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * String name =
+ * NotificationChannelName.ofProjectNotificationChannelName(
+ * "[PROJECT]", "[NOTIFICATION_CHANNEL]")
+ * .toString();
+ * boolean force = true;
+ * notificationChannelServiceClient.deleteNotificationChannel(name, force);
+ * }
+ * }
+ *
* @param name Required. The channel for which to execute the request. The format is:
* {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * DeleteNotificationChannelRequest request =
+ * DeleteNotificationChannelRequest.newBuilder()
+ * .setName(
+ * NotificationChannelName.ofProjectNotificationChannelName(
+ * "[PROJECT]", "[NOTIFICATION_CHANNEL]")
+ * .toString())
+ * .setForce(true)
+ * .build();
+ * 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
*/
@@ -752,6 +1303,24 @@ public final void deleteNotificationChannel(DeleteNotificationChannelRequest req
* Deletes a notification channel.
*
* {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * DeleteNotificationChannelRequest request =
+ * DeleteNotificationChannelRequest.newBuilder()
+ * .setName(
+ * NotificationChannelName.ofProjectNotificationChannelName(
+ * "[PROJECT]", "[NOTIFICATION_CHANNEL]")
+ * .toString())
+ * .setForce(true)
+ * .build();
+ * ApiFuture
*/
public final UnaryCallable{@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * NotificationChannelName name =
+ * NotificationChannelName.ofProjectNotificationChannelName(
+ * "[PROJECT]", "[NOTIFICATION_CHANNEL]");
+ * notificationChannelServiceClient.sendNotificationChannelVerificationCode(name);
+ * }
+ * }
+ *
* @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
*/
@@ -779,6 +1360,19 @@ public final void sendNotificationChannelVerificationCode(NotificationChannelNam
* Causes a verification code to be delivered to the channel. The code can then be supplied in
* `VerifyNotificationChannel` to verify the channel.
*
+ * {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * String name =
+ * NotificationChannelName.ofProjectNotificationChannelName(
+ * "[PROJECT]", "[NOTIFICATION_CHANNEL]")
+ * .toString();
+ * notificationChannelServiceClient.sendNotificationChannelVerificationCode(name);
+ * }
+ * }
+ *
* @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
*/
@@ -793,6 +1387,22 @@ public final void sendNotificationChannelVerificationCode(String name) {
* Causes a verification code to be delivered to the channel. The code can then be supplied in
* `VerifyNotificationChannel` to verify the channel.
*
+ * {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * SendNotificationChannelVerificationCodeRequest request =
+ * SendNotificationChannelVerificationCodeRequest.newBuilder()
+ * .setName(
+ * NotificationChannelName.ofProjectNotificationChannelName(
+ * "[PROJECT]", "[NOTIFICATION_CHANNEL]")
+ * .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
*/
@@ -807,6 +1417,25 @@ public final void sendNotificationChannelVerificationCode(
* `VerifyNotificationChannel` to verify the channel.
*
* {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * SendNotificationChannelVerificationCodeRequest request =
+ * SendNotificationChannelVerificationCodeRequest.newBuilder()
+ * .setName(
+ * NotificationChannelName.ofProjectNotificationChannelName(
+ * "[PROJECT]", "[NOTIFICATION_CHANNEL]")
+ * .toString())
+ * .build();
+ * ApiFuture
*/
public final UnaryCallable{@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.
@@ -865,6 +1507,20 @@ public final void sendNotificationChannelVerificationCode(
* 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.
*
+ * {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * String name =
+ * NotificationChannelName.ofProjectNotificationChannelName(
+ * "[PROJECT]", "[NOTIFICATION_CHANNEL]")
+ * .toString();
+ * 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.
@@ -896,6 +1552,24 @@ public final void sendNotificationChannelVerificationCode(
* 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.
*
+ * {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * GetNotificationChannelVerificationCodeRequest request =
+ * GetNotificationChannelVerificationCodeRequest.newBuilder()
+ * .setName(
+ * NotificationChannelName.ofProjectNotificationChannelName(
+ * "[PROJECT]", "[NOTIFICATION_CHANNEL]")
+ * .toString())
+ * .setExpireTime(Timestamp.newBuilder().build())
+ * .build();
+ * GetNotificationChannelVerificationCodeResponse response =
+ * notificationChannelServiceClient.getNotificationChannelVerificationCode(request);
+ * }
+ * }
+ *
* @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
*/
@@ -925,6 +1599,26 @@ public final void sendNotificationChannelVerificationCode(
* a much longer, websafe base 64 encoded string that has a longer expiration time.
*
* {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * GetNotificationChannelVerificationCodeRequest request =
+ * GetNotificationChannelVerificationCodeRequest.newBuilder()
+ * .setName(
+ * NotificationChannelName.ofProjectNotificationChannelName(
+ * "[PROJECT]", "[NOTIFICATION_CHANNEL]")
+ * .toString())
+ * .setExpireTime(Timestamp.newBuilder().build())
+ * .build();
+ * ApiFuture
*/
public final UnaryCallable<
GetNotificationChannelVerificationCodeRequest,
@@ -938,6 +1632,20 @@ public final void sendNotificationChannelVerificationCode(
* Verifies a `NotificationChannel` by proving receipt of the code delivered to the channel as a
* result of calling `SendNotificationChannelVerificationCode`.
*
+ * {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * NotificationChannelName name =
+ * NotificationChannelName.ofProjectNotificationChannelName(
+ * "[PROJECT]", "[NOTIFICATION_CHANNEL]");
+ * String code = "code3059181";
+ * NotificationChannel response =
+ * notificationChannelServiceClient.verifyNotificationChannel(name, 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
@@ -962,6 +1670,21 @@ public final NotificationChannel verifyNotificationChannel(
* Verifies a `NotificationChannel` by proving receipt of the code delivered to the channel as a
* result of calling `SendNotificationChannelVerificationCode`.
*
+ * {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * String name =
+ * NotificationChannelName.ofProjectNotificationChannelName(
+ * "[PROJECT]", "[NOTIFICATION_CHANNEL]")
+ * .toString();
+ * String code = "code3059181";
+ * NotificationChannel response =
+ * notificationChannelServiceClient.verifyNotificationChannel(name, 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
@@ -982,6 +1705,24 @@ public final NotificationChannel verifyNotificationChannel(String name, String c
* Verifies a `NotificationChannel` by proving receipt of the code delivered to the channel as a
* result of calling `SendNotificationChannelVerificationCode`.
*
+ * {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * VerifyNotificationChannelRequest request =
+ * VerifyNotificationChannelRequest.newBuilder()
+ * .setName(
+ * NotificationChannelName.ofProjectNotificationChannelName(
+ * "[PROJECT]", "[NOTIFICATION_CHANNEL]")
+ * .toString())
+ * .setCode("code3059181")
+ * .build();
+ * 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
*/
@@ -996,6 +1737,24 @@ public final NotificationChannel verifyNotificationChannel(
* result of calling `SendNotificationChannelVerificationCode`.
*
* {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * VerifyNotificationChannelRequest request =
+ * VerifyNotificationChannelRequest.newBuilder()
+ * .setName(
+ * NotificationChannelName.ofProjectNotificationChannelName(
+ * "[PROJECT]", "[NOTIFICATION_CHANNEL]")
+ * .toString())
+ * .setCode("code3059181")
+ * .build();
+ * ApiFuture
*/
public final UnaryCallable{@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * ResourceName parent = ResourceName.of("[FOLDER]");
+ * Service service = Service.newBuilder().build();
+ * Service response = serviceMonitoringServiceClient.createService(parent, service);
+ * }
+ * }
+ *
* {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * ResourceName parent = ResourceName.of("[FOLDER]");
+ * Service service = Service.newBuilder().build();
+ * Service response = serviceMonitoringServiceClient.createService(parent, service);
+ * }
+ * }
+ *
* @param parent Required. Resource name of the parent workspace. The format is:
* {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+ * Service service = Service.newBuilder().build();
+ * Service response = serviceMonitoringServiceClient.createService(parent, service);
+ * }
+ * }
+ *
* @param parent Required. Resource name of the parent workspace. The format is:
* {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * Service service = Service.newBuilder().build();
+ * Service response = serviceMonitoringServiceClient.createService(parent, service);
+ * }
+ * }
+ *
* @param parent Required. Resource name of the parent workspace. The format is:
* {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * String parent = ServiceName.ofProjectServiceName("[PROJECT]", "[SERVICE]").toString();
+ * Service service = Service.newBuilder().build();
+ * Service response = serviceMonitoringServiceClient.createService(parent, service);
+ * }
+ * }
+ *
* @param parent Required. Resource name of the parent workspace. The format is:
* {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * CreateServiceRequest request =
+ * CreateServiceRequest.newBuilder()
+ * .setParent(ServiceName.ofProjectServiceName("[PROJECT]", "[SERVICE]").toString())
+ * .setServiceId("serviceId-194185552")
+ * .setService(Service.newBuilder().build())
+ * .build();
+ * Service response = serviceMonitoringServiceClient.createService(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
*/
@@ -252,6 +320,22 @@ public final Service createService(CreateServiceRequest request) {
* Create a `Service`.
*
* {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * CreateServiceRequest request =
+ * CreateServiceRequest.newBuilder()
+ * .setParent(ServiceName.ofProjectServiceName("[PROJECT]", "[SERVICE]").toString())
+ * .setServiceId("serviceId-194185552")
+ * .setService(Service.newBuilder().build())
+ * .build();
+ * ApiFuture
*/
public final UnaryCallable{@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * ServiceName name = ServiceName.ofProjectServiceName("[PROJECT]", "[SERVICE]");
+ * Service response = serviceMonitoringServiceClient.getService(name);
+ * }
+ * }
+ *
* @param name Required. Resource name of the `Service`. The format is:
* {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * String name = ServiceName.ofProjectServiceName("[PROJECT]", "[SERVICE]").toString();
+ * Service response = serviceMonitoringServiceClient.getService(name);
+ * }
+ * }
+ *
* @param name Required. Resource name of the `Service`. The format is:
* {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * GetServiceRequest request =
+ * GetServiceRequest.newBuilder()
+ * .setName(ServiceName.ofProjectServiceName("[PROJECT]", "[SERVICE]").toString())
+ * .build();
+ * Service response = serviceMonitoringServiceClient.getService(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
*/
@@ -300,6 +417,20 @@ public final Service getService(GetServiceRequest request) {
* Get the named `Service`.
*
* {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * GetServiceRequest request =
+ * GetServiceRequest.newBuilder()
+ * .setName(ServiceName.ofProjectServiceName("[PROJECT]", "[SERVICE]").toString())
+ * .build();
+ * ApiFuture
*/
public final UnaryCallable{@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * ResourceName parent = ResourceName.of("[FOLDER]");
+ * for (Service element : serviceMonitoringServiceClient.listServices(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
* @param parent Required. Resource name of the parent containing the listed services, either a
* project or a Monitoring Workspace. The formats are:
* {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+ * for (Service element : serviceMonitoringServiceClient.listServices(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
* @param parent Required. Resource name of the parent containing the listed services, either a
* project or a Monitoring Workspace. The formats are:
* {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * for (Service element : serviceMonitoringServiceClient.listServices(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
* @param parent Required. Resource name of the parent containing the listed services, either a
* project or a Monitoring Workspace. The formats are:
* {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * String parent = ServiceName.ofProjectServiceName("[PROJECT]", "[SERVICE]").toString();
+ * for (Service element : serviceMonitoringServiceClient.listServices(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
* @param parent Required. Resource name of the parent containing the listed services, either a
* project or a Monitoring Workspace. The formats are:
* {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * ListServicesRequest request =
+ * ListServicesRequest.newBuilder()
+ * .setParent(ServiceName.ofProjectServiceName("[PROJECT]", "[SERVICE]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Service element : serviceMonitoringServiceClient.listServices(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
*/
@@ -386,6 +583,25 @@ public final ListServicesPagedResponse listServices(ListServicesRequest request)
* List `Service`s for this workspace.
*
* {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * ListServicesRequest request =
+ * ListServicesRequest.newBuilder()
+ * .setParent(ServiceName.ofProjectServiceName("[PROJECT]", "[SERVICE]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
*/
public final UnaryCallable{@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * while (true) {
+ * ListServicesResponse response =
+ * serviceMonitoringServiceClient.listServicesCallable().call(request);
+ * for (Service element : response.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
*/
public final UnaryCallable{@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * Service service = Service.newBuilder().build();
+ * Service response = serviceMonitoringServiceClient.updateService(service);
+ * }
+ * }
+ *
* @param service Required. The `Service` to draw updates from. The given `name` specifies the
* resource to update.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -419,6 +664,20 @@ public final Service updateService(Service service) {
/**
* Update this `Service`.
*
+ * {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * UpdateServiceRequest request =
+ * UpdateServiceRequest.newBuilder()
+ * .setService(Service.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Service response = serviceMonitoringServiceClient.updateService(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
*/
@@ -431,6 +690,21 @@ public final Service updateService(UpdateServiceRequest request) {
* Update this `Service`.
*
* {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * UpdateServiceRequest request =
+ * UpdateServiceRequest.newBuilder()
+ * .setService(Service.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture
*/
public final UnaryCallable{@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:
* {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * String name = ServiceName.ofProjectServiceName("[PROJECT]", "[SERVICE]").toString();
+ * serviceMonitoringServiceClient.deleteService(name);
+ * }
+ * }
+ *
* @param name Required. Resource name of the `Service` to delete. The format is:
* {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * DeleteServiceRequest request =
+ * DeleteServiceRequest.newBuilder()
+ * .setName(ServiceName.ofProjectServiceName("[PROJECT]", "[SERVICE]").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
*/
@@ -479,6 +786,20 @@ public final void deleteService(DeleteServiceRequest request) {
* Soft delete this `Service`.
*
* {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * DeleteServiceRequest request =
+ * DeleteServiceRequest.newBuilder()
+ * .setName(ServiceName.ofProjectServiceName("[PROJECT]", "[SERVICE]").toString())
+ * .build();
+ * ApiFuture
*/
public final UnaryCallable{@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * ServiceName parent = ServiceName.ofProjectServiceName("[PROJECT]", "[SERVICE]");
+ * ServiceLevelObjective serviceLevelObjective = ServiceLevelObjective.newBuilder().build();
+ * ServiceLevelObjective response =
+ * serviceMonitoringServiceClient.createServiceLevelObjective(parent, serviceLevelObjective);
+ * }
+ * }
+ *
* @param parent Required. Resource name of the parent `Service`. The format is:
* {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * String parent = ServiceName.ofProjectServiceName("[PROJECT]", "[SERVICE]").toString();
+ * ServiceLevelObjective serviceLevelObjective = ServiceLevelObjective.newBuilder().build();
+ * ServiceLevelObjective response =
+ * serviceMonitoringServiceClient.createServiceLevelObjective(parent, serviceLevelObjective);
+ * }
+ * }
+ *
* @param parent Required. Resource name of the parent `Service`. The format is:
* {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * CreateServiceLevelObjectiveRequest request =
+ * CreateServiceLevelObjectiveRequest.newBuilder()
+ * .setParent(ServiceName.ofProjectServiceName("[PROJECT]", "[SERVICE]").toString())
+ * .setServiceLevelObjectiveId("serviceLevelObjectiveId-240792859")
+ * .setServiceLevelObjective(ServiceLevelObjective.newBuilder().build())
+ * .build();
+ * ServiceLevelObjective response =
+ * serviceMonitoringServiceClient.createServiceLevelObjective(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
*/
@@ -541,6 +902,22 @@ public final ServiceLevelObjective createServiceLevelObjective(
* Create a `ServiceLevelObjective` for the given `Service`.
*
* {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * CreateServiceLevelObjectiveRequest request =
+ * CreateServiceLevelObjectiveRequest.newBuilder()
+ * .setParent(ServiceName.ofProjectServiceName("[PROJECT]", "[SERVICE]").toString())
+ * .setServiceLevelObjectiveId("serviceLevelObjectiveId-240792859")
+ * .setServiceLevelObjective(ServiceLevelObjective.newBuilder().build())
+ * .build();
+ * ApiFuture
*/
public final UnaryCallable{@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * ServiceLevelObjectiveName name =
+ * ServiceLevelObjectiveName.ofProjectServiceServiceLevelObjectiveName(
+ * "[PROJECT]", "[SERVICE]", "[SERVICE_LEVEL_OBJECTIVE]");
+ * ServiceLevelObjective response =
+ * serviceMonitoringServiceClient.getServiceLevelObjective(name);
+ * }
+ * }
+ *
* @param name Required. Resource name of the `ServiceLevelObjective` to get. The format is:
* {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * String name =
+ * ServiceLevelObjectiveName.ofProjectServiceServiceLevelObjectiveName(
+ * "[PROJECT]", "[SERVICE]", "[SERVICE_LEVEL_OBJECTIVE]")
+ * .toString();
+ * ServiceLevelObjective response =
+ * serviceMonitoringServiceClient.getServiceLevelObjective(name);
+ * }
+ * }
+ *
* @param name Required. Resource name of the `ServiceLevelObjective` to get. The format is:
* {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * GetServiceLevelObjectiveRequest request =
+ * GetServiceLevelObjectiveRequest.newBuilder()
+ * .setName(
+ * ServiceLevelObjectiveName.ofProjectServiceServiceLevelObjectiveName(
+ * "[PROJECT]", "[SERVICE]", "[SERVICE_LEVEL_OBJECTIVE]")
+ * .toString())
+ * .build();
+ * ServiceLevelObjective response =
+ * serviceMonitoringServiceClient.getServiceLevelObjective(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
*/
@@ -594,6 +1015,23 @@ public final ServiceLevelObjective getServiceLevelObjective(
* Get a `ServiceLevelObjective` by name.
*
* {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * GetServiceLevelObjectiveRequest request =
+ * GetServiceLevelObjectiveRequest.newBuilder()
+ * .setName(
+ * ServiceLevelObjectiveName.ofProjectServiceServiceLevelObjectiveName(
+ * "[PROJECT]", "[SERVICE]", "[SERVICE_LEVEL_OBJECTIVE]")
+ * .toString())
+ * .build();
+ * ApiFuture
*/
public final UnaryCallable{@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * ServiceName parent = ServiceName.ofProjectServiceName("[PROJECT]", "[SERVICE]");
+ * for (ServiceLevelObjective element :
+ * serviceMonitoringServiceClient.listServiceLevelObjectives(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
* @param parent Required. Resource name of the parent containing the listed SLOs, either a
* project or a Monitoring Workspace. The formats are:
* {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * String parent = ServiceName.ofProjectServiceName("[PROJECT]", "[SERVICE]").toString();
+ * for (ServiceLevelObjective element :
+ * serviceMonitoringServiceClient.listServiceLevelObjectives(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
* @param parent Required. Resource name of the parent containing the listed SLOs, either a
* project or a Monitoring Workspace. The formats are:
* {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * ListServiceLevelObjectivesRequest request =
+ * ListServiceLevelObjectivesRequest.newBuilder()
+ * .setParent(ServiceName.ofProjectServiceName("[PROJECT]", "[SERVICE]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (ServiceLevelObjective element :
+ * serviceMonitoringServiceClient.listServiceLevelObjectives(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
*/
@@ -652,6 +1135,27 @@ public final ListServiceLevelObjectivesPagedResponse listServiceLevelObjectives(
* List the `ServiceLevelObjective`s for the given `Service`.
*
* {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * ListServiceLevelObjectivesRequest request =
+ * ListServiceLevelObjectivesRequest.newBuilder()
+ * .setParent(ServiceName.ofProjectServiceName("[PROJECT]", "[SERVICE]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
*/
public final UnaryCallable<
ListServiceLevelObjectivesRequest, ListServiceLevelObjectivesPagedResponse>
@@ -664,6 +1168,25 @@ public final ListServiceLevelObjectivesPagedResponse listServiceLevelObjectives(
* List the `ServiceLevelObjective`s for the given `Service`.
*
* {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * while (true) {
+ * ListServiceLevelObjectivesResponse response =
+ * serviceMonitoringServiceClient.listServiceLevelObjectivesCallable().call(request);
+ * for (ServiceLevelObjective element : response.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
*/
public final UnaryCallable{@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * ServiceLevelObjective serviceLevelObjective = ServiceLevelObjective.newBuilder().build();
+ * ServiceLevelObjective response =
+ * serviceMonitoringServiceClient.updateServiceLevelObjective(serviceLevelObjective);
+ * }
+ * }
+ *
* @param serviceLevelObjective Required. The `ServiceLevelObjective` to draw updates from. The
* given `name` specifies the resource to update.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -691,6 +1225,21 @@ public final ServiceLevelObjective updateServiceLevelObjective(
/**
* Update the given `ServiceLevelObjective`.
*
+ * {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * UpdateServiceLevelObjectiveRequest request =
+ * UpdateServiceLevelObjectiveRequest.newBuilder()
+ * .setServiceLevelObjective(ServiceLevelObjective.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ServiceLevelObjective response =
+ * serviceMonitoringServiceClient.updateServiceLevelObjective(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
*/
@@ -704,6 +1253,21 @@ public final ServiceLevelObjective updateServiceLevelObjective(
* Update the given `ServiceLevelObjective`.
*
* {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * UpdateServiceLevelObjectiveRequest request =
+ * UpdateServiceLevelObjectiveRequest.newBuilder()
+ * .setServiceLevelObjective(ServiceLevelObjective.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture
*/
public final UnaryCallable{@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:
* {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * String name =
+ * ServiceLevelObjectiveName.ofProjectServiceServiceLevelObjectiveName(
+ * "[PROJECT]", "[SERVICE]", "[SERVICE_LEVEL_OBJECTIVE]")
+ * .toString();
+ * serviceMonitoringServiceClient.deleteServiceLevelObjective(name);
+ * }
+ * }
+ *
* @param name Required. Resource name of the `ServiceLevelObjective` to delete. The format is:
* {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * DeleteServiceLevelObjectiveRequest request =
+ * DeleteServiceLevelObjectiveRequest.newBuilder()
+ * .setName(
+ * ServiceLevelObjectiveName.ofProjectServiceServiceLevelObjectiveName(
+ * "[PROJECT]", "[SERVICE]", "[SERVICE_LEVEL_OBJECTIVE]")
+ * .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
*/
@@ -756,6 +1361,23 @@ public final void deleteServiceLevelObjective(DeleteServiceLevelObjectiveRequest
* Delete the given `ServiceLevelObjective`.
*
* {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * DeleteServiceLevelObjectiveRequest request =
+ * DeleteServiceLevelObjectiveRequest.newBuilder()
+ * .setName(
+ * ServiceLevelObjectiveName.ofProjectServiceServiceLevelObjectiveName(
+ * "[PROJECT]", "[SERVICE]", "[SERVICE_LEVEL_OBJECTIVE]")
+ * .toString())
+ * .build();
+ * ApiFuture
*/
public final UnaryCallable{@code
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * UptimeCheckConfigName name =
+ * UptimeCheckConfigName.ofProjectUptimeCheckConfigName(
+ * "[PROJECT]", "[UPTIME_CHECK_CONFIG]");
+ * UptimeCheckConfig response = uptimeCheckServiceClient.getUptimeCheckConfig(name);
+ * }
+ * }
+ *
* {@code
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * ResourceName parent = ResourceName.of("[FOLDER]");
+ * for (UptimeCheckConfig element :
+ * uptimeCheckServiceClient.listUptimeCheckConfigs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
* @param parent Required. The project whose Uptime check configurations are listed. The format
* is:
* {@code
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+ * for (UptimeCheckConfig element :
+ * uptimeCheckServiceClient.listUptimeCheckConfigs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
* @param parent Required. The project whose Uptime check configurations are listed. The format
* is:
* {@code
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * for (UptimeCheckConfig element :
+ * uptimeCheckServiceClient.listUptimeCheckConfigs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
* @param parent Required. The project whose Uptime check configurations are listed. The format
* is:
* {@code
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * String parent =
+ * UptimeCheckConfigName.ofProjectUptimeCheckConfigName("[PROJECT]", "[UPTIME_CHECK_CONFIG]")
+ * .toString();
+ * for (UptimeCheckConfig element :
+ * uptimeCheckServiceClient.listUptimeCheckConfigs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
* @param parent Required. The project whose Uptime check configurations are listed. The format
* is:
* {@code
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * ListUptimeCheckConfigsRequest request =
+ * ListUptimeCheckConfigsRequest.newBuilder()
+ * .setParent(
+ * UptimeCheckConfigName.ofProjectUptimeCheckConfigName(
+ * "[PROJECT]", "[UPTIME_CHECK_CONFIG]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (UptimeCheckConfig element :
+ * uptimeCheckServiceClient.listUptimeCheckConfigs(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
*/
@@ -252,6 +331,26 @@ public final ListUptimeCheckConfigsPagedResponse listUptimeCheckConfigs(
* configurations).
*
* {@code
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * ListUptimeCheckConfigsRequest request =
+ * ListUptimeCheckConfigsRequest.newBuilder()
+ * .setParent(
+ * UptimeCheckConfigName.ofProjectUptimeCheckConfigName(
+ * "[PROJECT]", "[UPTIME_CHECK_CONFIG]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
*/
public final UnaryCallable{@code
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * while (true) {
+ * ListUptimeCheckConfigsResponse response =
+ * uptimeCheckServiceClient.listUptimeCheckConfigsCallable().call(request);
+ * for (UptimeCheckConfig element : response.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
*/
public final UnaryCallable{@code
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * UptimeCheckConfigName name =
+ * UptimeCheckConfigName.ofProjectUptimeCheckConfigName(
+ * "[PROJECT]", "[UPTIME_CHECK_CONFIG]");
+ * UptimeCheckConfig response = uptimeCheckServiceClient.getUptimeCheckConfig(name);
+ * }
+ * }
+ *
* @param name Required. The Uptime check configuration to retrieve. The format is:
* {@code
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * String name =
+ * UptimeCheckConfigName.ofProjectUptimeCheckConfigName("[PROJECT]", "[UPTIME_CHECK_CONFIG]")
+ * .toString();
+ * UptimeCheckConfig response = uptimeCheckServiceClient.getUptimeCheckConfig(name);
+ * }
+ * }
+ *
* @param name Required. The Uptime check configuration to retrieve. The format is:
* {@code
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * GetUptimeCheckConfigRequest request =
+ * GetUptimeCheckConfigRequest.newBuilder()
+ * .setName(
+ * UptimeCheckConfigName.ofProjectUptimeCheckConfigName(
+ * "[PROJECT]", "[UPTIME_CHECK_CONFIG]")
+ * .toString())
+ * .build();
+ * UptimeCheckConfig response = uptimeCheckServiceClient.getUptimeCheckConfig(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
*/
@@ -316,6 +470,22 @@ public final UptimeCheckConfig getUptimeCheckConfig(GetUptimeCheckConfigRequest
* Gets a single Uptime check configuration.
*
* {@code
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * GetUptimeCheckConfigRequest request =
+ * GetUptimeCheckConfigRequest.newBuilder()
+ * .setName(
+ * UptimeCheckConfigName.ofProjectUptimeCheckConfigName(
+ * "[PROJECT]", "[UPTIME_CHECK_CONFIG]")
+ * .toString())
+ * .build();
+ * ApiFuture
*/
public final UnaryCallable{@code
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * ResourceName parent = ResourceName.of("[FOLDER]");
+ * UptimeCheckConfig uptimeCheckConfig = UptimeCheckConfig.newBuilder().build();
+ * UptimeCheckConfig response =
+ * uptimeCheckServiceClient.createUptimeCheckConfig(parent, uptimeCheckConfig);
+ * }
+ * }
+ *
* @param parent Required. The project in which to create the Uptime check. The format is:
* {@code
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+ * UptimeCheckConfig uptimeCheckConfig = UptimeCheckConfig.newBuilder().build();
+ * UptimeCheckConfig response =
+ * uptimeCheckServiceClient.createUptimeCheckConfig(parent, uptimeCheckConfig);
+ * }
+ * }
+ *
* @param parent Required. The project in which to create the Uptime check. The format is:
* {@code
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * UptimeCheckConfig uptimeCheckConfig = UptimeCheckConfig.newBuilder().build();
+ * UptimeCheckConfig response =
+ * uptimeCheckServiceClient.createUptimeCheckConfig(parent, uptimeCheckConfig);
+ * }
+ * }
+ *
* @param parent Required. The project in which to create the Uptime check. The format is:
* {@code
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * String parent =
+ * UptimeCheckConfigName.ofProjectUptimeCheckConfigName("[PROJECT]", "[UPTIME_CHECK_CONFIG]")
+ * .toString();
+ * UptimeCheckConfig uptimeCheckConfig = UptimeCheckConfig.newBuilder().build();
+ * UptimeCheckConfig response =
+ * uptimeCheckServiceClient.createUptimeCheckConfig(parent, uptimeCheckConfig);
+ * }
+ * }
+ *
* @param parent Required. The project in which to create the Uptime check. The format is:
* {@code
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * CreateUptimeCheckConfigRequest request =
+ * CreateUptimeCheckConfigRequest.newBuilder()
+ * .setParent(
+ * UptimeCheckConfigName.ofProjectUptimeCheckConfigName(
+ * "[PROJECT]", "[UPTIME_CHECK_CONFIG]")
+ * .toString())
+ * .setUptimeCheckConfig(UptimeCheckConfig.newBuilder().build())
+ * .build();
+ * UptimeCheckConfig response = uptimeCheckServiceClient.createUptimeCheckConfig(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
*/
@@ -414,6 +646,23 @@ public final UptimeCheckConfig createUptimeCheckConfig(CreateUptimeCheckConfigRe
* Creates a new Uptime check configuration.
*
* {@code
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * CreateUptimeCheckConfigRequest request =
+ * CreateUptimeCheckConfigRequest.newBuilder()
+ * .setParent(
+ * UptimeCheckConfigName.ofProjectUptimeCheckConfigName(
+ * "[PROJECT]", "[UPTIME_CHECK_CONFIG]")
+ * .toString())
+ * .setUptimeCheckConfig(UptimeCheckConfig.newBuilder().build())
+ * .build();
+ * ApiFuture
*/
public final UnaryCallable{@code
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * UptimeCheckConfig uptimeCheckConfig = UptimeCheckConfig.newBuilder().build();
+ * UptimeCheckConfig response =
+ * uptimeCheckServiceClient.updateUptimeCheckConfig(uptimeCheckConfig);
+ * }
+ * }
+ *
* @param uptimeCheckConfig Required. If an `updateMask` has been specified, this field gives the
* values for the set of fields mentioned in the `updateMask`. If an `updateMask` has not been
* given, this Uptime check configuration replaces the current configuration. If a field is
@@ -448,6 +707,19 @@ public final UptimeCheckConfig updateUptimeCheckConfig(UptimeCheckConfig uptimeC
* new one or replace only certain fields in the current configuration by specifying the fields to
* be updated via `updateMask`. Returns the updated configuration.
*
+ * {@code
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * UpdateUptimeCheckConfigRequest request =
+ * UpdateUptimeCheckConfigRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setUptimeCheckConfig(UptimeCheckConfig.newBuilder().build())
+ * .build();
+ * UptimeCheckConfig response = uptimeCheckServiceClient.updateUptimeCheckConfig(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
*/
@@ -462,6 +734,20 @@ public final UptimeCheckConfig updateUptimeCheckConfig(UpdateUptimeCheckConfigRe
* be updated via `updateMask`. Returns the updated configuration.
*
* {@code
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * UpdateUptimeCheckConfigRequest request =
+ * UpdateUptimeCheckConfigRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setUptimeCheckConfig(UptimeCheckConfig.newBuilder().build())
+ * .build();
+ * ApiFuture
*/
public final UnaryCallable{@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:
* {@code
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * String name =
+ * UptimeCheckConfigName.ofProjectUptimeCheckConfigName("[PROJECT]", "[UPTIME_CHECK_CONFIG]")
+ * .toString();
+ * uptimeCheckServiceClient.deleteUptimeCheckConfig(name);
+ * }
+ * }
+ *
* @param name Required. The Uptime check configuration to delete. The format is:
* {@code
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * DeleteUptimeCheckConfigRequest request =
+ * DeleteUptimeCheckConfigRequest.newBuilder()
+ * .setName(
+ * UptimeCheckConfigName.ofProjectUptimeCheckConfigName(
+ * "[PROJECT]", "[UPTIME_CHECK_CONFIG]")
+ * .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
*/
@@ -522,6 +845,22 @@ public final void deleteUptimeCheckConfig(DeleteUptimeCheckConfigRequest request
* rendered invalid by the deletion.
*
* {@code
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * DeleteUptimeCheckConfigRequest request =
+ * DeleteUptimeCheckConfigRequest.newBuilder()
+ * .setName(
+ * UptimeCheckConfigName.ofProjectUptimeCheckConfigName(
+ * "[PROJECT]", "[UPTIME_CHECK_CONFIG]")
+ * .toString())
+ * .build();
+ * ApiFuture
*/
public final UnaryCallable{@code
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * ListUptimeCheckIpsRequest request =
+ * ListUptimeCheckIpsRequest.newBuilder()
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (UptimeCheckIp element :
+ * uptimeCheckServiceClient.listUptimeCheckIps(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
*/
@@ -545,6 +900,22 @@ public final ListUptimeCheckIpsPagedResponse listUptimeCheckIps(
* Returns the list of IP addresses that checkers run from
*
* {@code
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * ListUptimeCheckIpsRequest request =
+ * ListUptimeCheckIpsRequest.newBuilder()
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
*/
public final UnaryCallable{@code
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * while (true) {
+ * ListUptimeCheckIpsResponse response =
+ * uptimeCheckServiceClient.listUptimeCheckIpsCallable().call(request);
+ * for (UptimeCheckIp element : response.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
*/
public final UnaryCallable{@code
+ * try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) {
+ * AlertPolicyName name =
+ * AlertPolicyName.ofProjectAlertPolicyName("[PROJECT]", "[ALERT_POLICY]");
+ * AlertPolicy response = alertPolicyServiceClient.getAlertPolicy(name);
+ * }
+ * }
+ *
* {@code
+ * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) {
+ * GroupName name = GroupName.ofProjectGroupName("[PROJECT]", "[GROUP]");
+ * Group response = groupServiceClient.getGroup(name);
+ * }
+ * }
+ *
* {@code
+ * try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) {
+ * MonitoredResourceDescriptorName name =
+ * MonitoredResourceDescriptorName.ofProjectMonitoredResourceDescriptorName(
+ * "[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]");
+ * MonitoredResourceDescriptor response =
+ * metricServiceClient.getMonitoredResourceDescriptor(name);
+ * }
+ * }
+ *
* {@code
+ * try (NotificationChannelServiceClient notificationChannelServiceClient =
+ * NotificationChannelServiceClient.create()) {
+ * NotificationChannelDescriptorName name =
+ * NotificationChannelDescriptorName.ofProjectChannelDescriptorName(
+ * "[PROJECT]", "[CHANNEL_DESCRIPTOR]");
+ * NotificationChannelDescriptor response =
+ * notificationChannelServiceClient.getNotificationChannelDescriptor(name);
+ * }
+ * }
+ *
* {@code
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create()) {
+ * FolderName parent = FolderName.of("[FOLDER]");
+ * Service service = Service.newBuilder().build();
+ * Service response = serviceMonitoringServiceClient.createService(parent, service);
+ * }
+ * }
+ *
* {@code
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * UptimeCheckConfigName name =
+ * UptimeCheckConfigName.ofProjectUptimeCheckConfigName(
+ * "[PROJECT]", "[UPTIME_CHECK_CONFIG]");
+ * UptimeCheckConfig response = uptimeCheckServiceClient.getUptimeCheckConfig(name);
+ * }
+ * }
*/
@Generated("by gapic-generator-java")
package com.google.cloud.monitoring.v3;
diff --git a/synth.metadata b/synth.metadata
index 9ab49198..877320e5 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -4,15 +4,15 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/java-monitoring.git",
- "sha": "e3cb4e23d62434a80f87ca603e6fb1df0646c9d4"
+ "sha": "7e18498926d3c87d5f67b2db5c41be61f0d55084"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
- "sha": "ceaaf31b3d13badab7cf9d3b570f5639db5593d9",
- "internalRef": "352816749"
+ "sha": "8d8c008e56f1af31d57f75561e0f1848ffb29eeb",
+ "internalRef": "356341083"
}
},
{