diff --git a/.gitignore b/.gitignore index dc2d514c..3ca4b1fa 100644 --- a/.gitignore +++ b/.gitignore @@ -17,8 +17,6 @@ nosetests.xml # Mr Developer .mr.developer.cfg - -.metadata .project .pydevproject *.iml @@ -30,16 +28,5 @@ nosetests.xml # Built documentation docs/ - -# Wheel directory used in Travis builds. -gcloud-java-wheels/ -src/test/resources/gcd-head.zip -src/test/resources/gcd-v1beta2-rev1-2.1.1.zip - -# API key file containing value of GOOGLE_API_KEY for integration tests -api_key - # Python utilities *.pyc -artman-genfiles -venv \ No newline at end of file diff --git a/.kokoro/release/drop.cfg b/.kokoro/release/drop.cfg index cb8564d9..8492ddeb 100644 --- a/.kokoro/release/drop.cfg +++ b/.kokoro/release/drop.cfg @@ -4,6 +4,3 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/java-monitoring/.kokoro/release/drop.sh" } - -# Download staging properties file. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/java/releases/java-monitoring" \ No newline at end of file diff --git a/.kokoro/release/promote.cfg b/.kokoro/release/promote.cfg index b5932f2d..64fc0469 100644 --- a/.kokoro/release/promote.cfg +++ b/.kokoro/release/promote.cfg @@ -4,7 +4,3 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/java-monitoring/.kokoro/release/promote.sh" } - -# Download staging properties file. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/java/releases/java-monitoring" - diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh index 1c14fcc7..db1f5a05 100755 --- a/.kokoro/release/publish_javadoc.sh +++ b/.kokoro/release/publish_javadoc.sh @@ -33,7 +33,7 @@ python3 -m pip install gcp-docuploader # compile all packages mvn clean install -B -DskipTests=true -NAME=monitoring +NAME=google-cloud-monitoring VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) # build the docs diff --git a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/ServiceMonitoringServiceClient.java b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/ServiceMonitoringServiceClient.java new file mode 100644 index 00000000..b7a8a4a5 --- /dev/null +++ b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/ServiceMonitoringServiceClient.java @@ -0,0 +1,1392 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.monitoring.v3; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.monitoring.v3.stub.ServiceMonitoringServiceStub; +import com.google.cloud.monitoring.v3.stub.ServiceMonitoringServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.monitoring.v3.CreateServiceLevelObjectiveRequest; +import com.google.monitoring.v3.CreateServiceRequest; +import com.google.monitoring.v3.DeleteServiceLevelObjectiveRequest; +import com.google.monitoring.v3.DeleteServiceRequest; +import com.google.monitoring.v3.GetServiceLevelObjectiveRequest; +import com.google.monitoring.v3.GetServiceRequest; +import com.google.monitoring.v3.ListServiceLevelObjectivesRequest; +import com.google.monitoring.v3.ListServiceLevelObjectivesResponse; +import com.google.monitoring.v3.ListServicesRequest; +import com.google.monitoring.v3.ListServicesResponse; +import com.google.monitoring.v3.ProjectName; +import com.google.monitoring.v3.Service; +import com.google.monitoring.v3.ServiceLevelObjective; +import com.google.monitoring.v3.ServiceLevelObjectiveName; +import com.google.monitoring.v3.ServiceName; +import com.google.monitoring.v3.UpdateServiceLevelObjectiveRequest; +import com.google.monitoring.v3.UpdateServiceRequest; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND SERVICE +/** + * Service Description: The Stackdriver Monitoring Service-Oriented Monitoring API has endpoints for + * managing and querying aspects of a workspace's services. These include the `Service`'s monitored + * resources, its Service-Level Objectives, and a taxonomy of categorized Health Metrics. + * + *
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: + * + *
+ *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * Service service = Service.newBuilder().build();
+ * Service response = serviceMonitoringServiceClient.createService(parent, service);
+ * }
+ *
+ *
+ *
+ * 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(). + * + *
The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *
See the individual methods for example code. + * + *
Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *
This class can be customized by passing in a custom instance of + * ServiceMonitoringServiceSettings to create(). For example: + * + *
To customize credentials: + * + *
+ *
+ * ServiceMonitoringServiceSettings serviceMonitoringServiceSettings =
+ * ServiceMonitoringServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create(serviceMonitoringServiceSettings);
+ *
+ *
+ *
+ * To customize the endpoint:
+ *
+ *
+ *
+ * ServiceMonitoringServiceSettings serviceMonitoringServiceSettings =
+ * ServiceMonitoringServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ServiceMonitoringServiceClient serviceMonitoringServiceClient =
+ * ServiceMonitoringServiceClient.create(serviceMonitoringServiceSettings);
+ *
+ *
+ */
+@Generated("by gapic-generator")
+public class ServiceMonitoringServiceClient implements BackgroundResource {
+ private final ServiceMonitoringServiceSettings settings;
+ private final ServiceMonitoringServiceStub stub;
+
+ /** Constructs an instance of ServiceMonitoringServiceClient with default settings. */
+ public static final ServiceMonitoringServiceClient create() throws IOException {
+ return create(ServiceMonitoringServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of ServiceMonitoringServiceClient, using the given settings. The
+ * channels are created based on the settings passed in, or defaults for any settings that are not
+ * set.
+ */
+ public static final ServiceMonitoringServiceClient create(
+ ServiceMonitoringServiceSettings settings) throws IOException {
+ return new ServiceMonitoringServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of ServiceMonitoringServiceClient, using the given stub for making
+ * calls. This is for advanced usage - prefer to use ServiceMonitoringServiceSettings}.
+ */
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public static final ServiceMonitoringServiceClient create(ServiceMonitoringServiceStub stub) {
+ return new ServiceMonitoringServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of ServiceMonitoringServiceClient, using the given settings. This is
+ * protected so that it is easy to make a subclass, but otherwise, the static factory methods
+ * should be preferred.
+ */
+ protected ServiceMonitoringServiceClient(ServiceMonitoringServiceSettings settings)
+ throws IOException {
+ this.settings = settings;
+ this.stub = ((ServiceMonitoringServiceStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ protected ServiceMonitoringServiceClient(ServiceMonitoringServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final ServiceMonitoringServiceSettings getSettings() {
+ return settings;
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public ServiceMonitoringServiceStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Create a `Service`.
+ *
+ * Sample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * Service service = Service.newBuilder().build();
+ * Service response = serviceMonitoringServiceClient.createService(parent, service);
+ * }
+ *
+ *
+ * @param parent Resource name of the parent workspace. Of the form `projects/{project_id}`.
+ * @param service The `Service` to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Service createService(ProjectName parent, Service service) {
+
+ CreateServiceRequest request =
+ CreateServiceRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setService(service)
+ .build();
+ return createService(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Create a `Service`.
+ *
+ * Sample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * Service service = Service.newBuilder().build();
+ * Service response = serviceMonitoringServiceClient.createService(parent.toString(), service);
+ * }
+ *
+ *
+ * @param parent Resource name of the parent workspace. Of the form `projects/{project_id}`.
+ * @param service The `Service` to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Service createService(String parent, Service service) {
+
+ CreateServiceRequest request =
+ CreateServiceRequest.newBuilder().setParent(parent).setService(service).build();
+ return createService(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Create a `Service`.
+ *
+ * Sample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * Service service = Service.newBuilder().build();
+ * CreateServiceRequest request = CreateServiceRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .setService(service)
+ * .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
+ */
+ public final Service createService(CreateServiceRequest request) {
+ return createServiceCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Create a `Service`.
+ *
+ * Sample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * Service service = Service.newBuilder().build();
+ * CreateServiceRequest request = CreateServiceRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .setService(service)
+ * .build();
+ * ApiFuture<Service> future = serviceMonitoringServiceClient.createServiceCallable().futureCall(request);
+ * // Do something
+ * Service response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallableSample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceName name = ServiceName.of("[PROJECT]", "[SERVICE]");
+ * Service response = serviceMonitoringServiceClient.getService(name);
+ * }
+ *
+ *
+ * @param name Resource name of the `Service`. Of the form
+ * `projects/{project_id}/services/{service_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Service getService(ServiceName name) {
+
+ GetServiceRequest request =
+ GetServiceRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getService(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Get the named `Service`.
+ *
+ * Sample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceName name = ServiceName.of("[PROJECT]", "[SERVICE]");
+ * Service response = serviceMonitoringServiceClient.getService(name.toString());
+ * }
+ *
+ *
+ * @param name Resource name of the `Service`. Of the form
+ * `projects/{project_id}/services/{service_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Service getService(String name) {
+
+ GetServiceRequest request = GetServiceRequest.newBuilder().setName(name).build();
+ return getService(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Get the named `Service`.
+ *
+ * Sample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceName name = ServiceName.of("[PROJECT]", "[SERVICE]");
+ * GetServiceRequest request = GetServiceRequest.newBuilder()
+ * .setName(name.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
+ */
+ public final Service getService(GetServiceRequest request) {
+ return getServiceCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Get the named `Service`.
+ *
+ * Sample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceName name = ServiceName.of("[PROJECT]", "[SERVICE]");
+ * GetServiceRequest request = GetServiceRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * ApiFuture<Service> future = serviceMonitoringServiceClient.getServiceCallable().futureCall(request);
+ * // Do something
+ * Service response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallableSample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * for (Service element : serviceMonitoringServiceClient.listServices(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @param parent Resource name of the parent `Workspace`. Of the form `projects/{project_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListServicesPagedResponse listServices(ProjectName parent) {
+ ListServicesRequest request =
+ ListServicesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listServices(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * List `Service`s for this workspace.
+ *
+ * Sample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * for (Service element : serviceMonitoringServiceClient.listServices(parent.toString()).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @param parent Resource name of the parent `Workspace`. Of the form `projects/{project_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListServicesPagedResponse listServices(String parent) {
+ ListServicesRequest request = ListServicesRequest.newBuilder().setParent(parent).build();
+ return listServices(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * List `Service`s for this workspace.
+ *
+ * Sample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * ListServicesRequest request = ListServicesRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .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
+ */
+ public final ListServicesPagedResponse listServices(ListServicesRequest request) {
+ return listServicesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * List `Service`s for this workspace.
+ *
+ * Sample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * ListServicesRequest request = ListServicesRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .build();
+ * ApiFuture<ListServicesPagedResponse> future = serviceMonitoringServiceClient.listServicesPagedCallable().futureCall(request);
+ * // Do something
+ * for (Service element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ */
+ public final UnaryCallableSample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * ListServicesRequest request = ListServicesRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .build();
+ * while (true) {
+ * ListServicesResponse response = serviceMonitoringServiceClient.listServicesCallable().call(request);
+ * for (Service element : response.getServicesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ *
+ */
+ public final UnaryCallableSample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * Service service = Service.newBuilder().build();
+ * Service response = serviceMonitoringServiceClient.updateService(service);
+ * }
+ *
+ *
+ * @param service 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
+ */
+ public final Service updateService(Service service) {
+
+ UpdateServiceRequest request = UpdateServiceRequest.newBuilder().setService(service).build();
+ return updateService(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Update this `Service`.
+ *
+ * Sample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * Service service = Service.newBuilder().build();
+ * UpdateServiceRequest request = UpdateServiceRequest.newBuilder()
+ * .setService(service)
+ * .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
+ */
+ public final Service updateService(UpdateServiceRequest request) {
+ return updateServiceCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Update this `Service`.
+ *
+ * Sample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * Service service = Service.newBuilder().build();
+ * UpdateServiceRequest request = UpdateServiceRequest.newBuilder()
+ * .setService(service)
+ * .build();
+ * ApiFuture<Service> future = serviceMonitoringServiceClient.updateServiceCallable().futureCall(request);
+ * // Do something
+ * Service response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallableSample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceName name = ServiceName.of("[PROJECT]", "[SERVICE]");
+ * serviceMonitoringServiceClient.deleteService(name);
+ * }
+ *
+ *
+ * @param name Resource name of the `Service` to delete. Of the form
+ * `projects/{project_id}/service/{service_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteService(ServiceName name) {
+
+ DeleteServiceRequest request =
+ DeleteServiceRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ deleteService(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Soft delete this `Service`.
+ *
+ * Sample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceName name = ServiceName.of("[PROJECT]", "[SERVICE]");
+ * serviceMonitoringServiceClient.deleteService(name.toString());
+ * }
+ *
+ *
+ * @param name Resource name of the `Service` to delete. Of the form
+ * `projects/{project_id}/service/{service_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteService(String name) {
+
+ DeleteServiceRequest request = DeleteServiceRequest.newBuilder().setName(name).build();
+ deleteService(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Soft delete this `Service`.
+ *
+ * Sample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceName name = ServiceName.of("[PROJECT]", "[SERVICE]");
+ * DeleteServiceRequest request = DeleteServiceRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * serviceMonitoringServiceClient.deleteService(request);
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteService(DeleteServiceRequest request) {
+ deleteServiceCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Soft delete this `Service`.
+ *
+ * Sample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceName name = ServiceName.of("[PROJECT]", "[SERVICE]");
+ * DeleteServiceRequest request = DeleteServiceRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * ApiFuture<Void> future = serviceMonitoringServiceClient.deleteServiceCallable().futureCall(request);
+ * // Do something
+ * future.get();
+ * }
+ *
+ */
+ public final UnaryCallableSample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceName parent = ServiceName.of("[PROJECT]", "[SERVICE]");
+ * ServiceLevelObjective serviceLevelObjective = ServiceLevelObjective.newBuilder().build();
+ * ServiceLevelObjective response = serviceMonitoringServiceClient.createServiceLevelObjective(parent, serviceLevelObjective);
+ * }
+ *
+ *
+ * @param parent Resource name of the parent `Service`. Of the form
+ * `projects/{project_id}/services/{service_id}`.
+ * @param serviceLevelObjective The `ServiceLevelObjective` to create. The provided `name` will be
+ * respected if no `ServiceLevelObjective` exists with this name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ServiceLevelObjective createServiceLevelObjective(
+ ServiceName parent, ServiceLevelObjective serviceLevelObjective) {
+
+ CreateServiceLevelObjectiveRequest request =
+ CreateServiceLevelObjectiveRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setServiceLevelObjective(serviceLevelObjective)
+ .build();
+ return createServiceLevelObjective(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Create a `ServiceLevelObjective` for the given `Service`.
+ *
+ * Sample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceName parent = ServiceName.of("[PROJECT]", "[SERVICE]");
+ * ServiceLevelObjective serviceLevelObjective = ServiceLevelObjective.newBuilder().build();
+ * ServiceLevelObjective response = serviceMonitoringServiceClient.createServiceLevelObjective(parent.toString(), serviceLevelObjective);
+ * }
+ *
+ *
+ * @param parent Resource name of the parent `Service`. Of the form
+ * `projects/{project_id}/services/{service_id}`.
+ * @param serviceLevelObjective The `ServiceLevelObjective` to create. The provided `name` will be
+ * respected if no `ServiceLevelObjective` exists with this name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ServiceLevelObjective createServiceLevelObjective(
+ String parent, ServiceLevelObjective serviceLevelObjective) {
+
+ CreateServiceLevelObjectiveRequest request =
+ CreateServiceLevelObjectiveRequest.newBuilder()
+ .setParent(parent)
+ .setServiceLevelObjective(serviceLevelObjective)
+ .build();
+ return createServiceLevelObjective(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Create a `ServiceLevelObjective` for the given `Service`.
+ *
+ * Sample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceName parent = ServiceName.of("[PROJECT]", "[SERVICE]");
+ * ServiceLevelObjective serviceLevelObjective = ServiceLevelObjective.newBuilder().build();
+ * CreateServiceLevelObjectiveRequest request = CreateServiceLevelObjectiveRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .setServiceLevelObjective(serviceLevelObjective)
+ * .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
+ */
+ public final ServiceLevelObjective createServiceLevelObjective(
+ CreateServiceLevelObjectiveRequest request) {
+ return createServiceLevelObjectiveCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Create a `ServiceLevelObjective` for the given `Service`.
+ *
+ * Sample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceName parent = ServiceName.of("[PROJECT]", "[SERVICE]");
+ * ServiceLevelObjective serviceLevelObjective = ServiceLevelObjective.newBuilder().build();
+ * CreateServiceLevelObjectiveRequest request = CreateServiceLevelObjectiveRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .setServiceLevelObjective(serviceLevelObjective)
+ * .build();
+ * ApiFuture<ServiceLevelObjective> future = serviceMonitoringServiceClient.createServiceLevelObjectiveCallable().futureCall(request);
+ * // Do something
+ * ServiceLevelObjective response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallableSample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceLevelObjectiveName name = ServiceLevelObjectiveName.of("[PROJECT]", "[SERVICE]", "[SERVICE_LEVEL_OBJECTIVE]");
+ * ServiceLevelObjective response = serviceMonitoringServiceClient.getServiceLevelObjective(name);
+ * }
+ *
+ *
+ * @param name Resource name of the `ServiceLevelObjective` to get. Of the form
+ * `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ServiceLevelObjective getServiceLevelObjective(ServiceLevelObjectiveName name) {
+
+ GetServiceLevelObjectiveRequest request =
+ GetServiceLevelObjectiveRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getServiceLevelObjective(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Get a `ServiceLevelObjective` by name.
+ *
+ * Sample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceLevelObjectiveName name = ServiceLevelObjectiveName.of("[PROJECT]", "[SERVICE]", "[SERVICE_LEVEL_OBJECTIVE]");
+ * ServiceLevelObjective response = serviceMonitoringServiceClient.getServiceLevelObjective(name.toString());
+ * }
+ *
+ *
+ * @param name Resource name of the `ServiceLevelObjective` to get. Of the form
+ * `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ServiceLevelObjective getServiceLevelObjective(String name) {
+
+ GetServiceLevelObjectiveRequest request =
+ GetServiceLevelObjectiveRequest.newBuilder().setName(name).build();
+ return getServiceLevelObjective(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Get a `ServiceLevelObjective` by name.
+ *
+ * Sample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceLevelObjectiveName name = ServiceLevelObjectiveName.of("[PROJECT]", "[SERVICE]", "[SERVICE_LEVEL_OBJECTIVE]");
+ * GetServiceLevelObjectiveRequest request = GetServiceLevelObjectiveRequest.newBuilder()
+ * .setName(name.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
+ */
+ public final ServiceLevelObjective getServiceLevelObjective(
+ GetServiceLevelObjectiveRequest request) {
+ return getServiceLevelObjectiveCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Get a `ServiceLevelObjective` by name.
+ *
+ * Sample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceLevelObjectiveName name = ServiceLevelObjectiveName.of("[PROJECT]", "[SERVICE]", "[SERVICE_LEVEL_OBJECTIVE]");
+ * GetServiceLevelObjectiveRequest request = GetServiceLevelObjectiveRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * ApiFuture<ServiceLevelObjective> future = serviceMonitoringServiceClient.getServiceLevelObjectiveCallable().futureCall(request);
+ * // Do something
+ * ServiceLevelObjective response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallableSample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceName parent = ServiceName.of("[PROJECT]", "[SERVICE]");
+ * for (ServiceLevelObjective element : serviceMonitoringServiceClient.listServiceLevelObjectives(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @param parent Resource name of the parent `Service`. Of the form
+ * `projects/{project_id}/services/{service_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListServiceLevelObjectivesPagedResponse listServiceLevelObjectives(
+ ServiceName parent) {
+ ListServiceLevelObjectivesRequest request =
+ ListServiceLevelObjectivesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listServiceLevelObjectives(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * List the `ServiceLevelObjective`s for the given `Service`.
+ *
+ * Sample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceName parent = ServiceName.of("[PROJECT]", "[SERVICE]");
+ * for (ServiceLevelObjective element : serviceMonitoringServiceClient.listServiceLevelObjectives(parent.toString()).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @param parent Resource name of the parent `Service`. Of the form
+ * `projects/{project_id}/services/{service_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListServiceLevelObjectivesPagedResponse listServiceLevelObjectives(String parent) {
+ ListServiceLevelObjectivesRequest request =
+ ListServiceLevelObjectivesRequest.newBuilder().setParent(parent).build();
+ return listServiceLevelObjectives(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * List the `ServiceLevelObjective`s for the given `Service`.
+ *
+ * Sample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceName parent = ServiceName.of("[PROJECT]", "[SERVICE]");
+ * ListServiceLevelObjectivesRequest request = ListServiceLevelObjectivesRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .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
+ */
+ public final ListServiceLevelObjectivesPagedResponse listServiceLevelObjectives(
+ ListServiceLevelObjectivesRequest request) {
+ return listServiceLevelObjectivesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * List the `ServiceLevelObjective`s for the given `Service`.
+ *
+ * Sample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceName parent = ServiceName.of("[PROJECT]", "[SERVICE]");
+ * ListServiceLevelObjectivesRequest request = ListServiceLevelObjectivesRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .build();
+ * ApiFuture<ListServiceLevelObjectivesPagedResponse> future = serviceMonitoringServiceClient.listServiceLevelObjectivesPagedCallable().futureCall(request);
+ * // Do something
+ * for (ServiceLevelObjective element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ */
+ public final UnaryCallable<
+ ListServiceLevelObjectivesRequest, ListServiceLevelObjectivesPagedResponse>
+ listServiceLevelObjectivesPagedCallable() {
+ return stub.listServiceLevelObjectivesPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * List the `ServiceLevelObjective`s for the given `Service`.
+ *
+ * Sample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceName parent = ServiceName.of("[PROJECT]", "[SERVICE]");
+ * ListServiceLevelObjectivesRequest request = ListServiceLevelObjectivesRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .build();
+ * while (true) {
+ * ListServiceLevelObjectivesResponse response = serviceMonitoringServiceClient.listServiceLevelObjectivesCallable().call(request);
+ * for (ServiceLevelObjective element : response.getServiceLevelObjectivesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ *
+ */
+ public final UnaryCallableSample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceLevelObjective serviceLevelObjective = ServiceLevelObjective.newBuilder().build();
+ * ServiceLevelObjective response = serviceMonitoringServiceClient.updateServiceLevelObjective(serviceLevelObjective);
+ * }
+ *
+ *
+ * @param serviceLevelObjective 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
+ */
+ public final ServiceLevelObjective updateServiceLevelObjective(
+ ServiceLevelObjective serviceLevelObjective) {
+
+ UpdateServiceLevelObjectiveRequest request =
+ UpdateServiceLevelObjectiveRequest.newBuilder()
+ .setServiceLevelObjective(serviceLevelObjective)
+ .build();
+ return updateServiceLevelObjective(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Update the given `ServiceLevelObjective`.
+ *
+ * Sample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceLevelObjective serviceLevelObjective = ServiceLevelObjective.newBuilder().build();
+ * UpdateServiceLevelObjectiveRequest request = UpdateServiceLevelObjectiveRequest.newBuilder()
+ * .setServiceLevelObjective(serviceLevelObjective)
+ * .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
+ */
+ public final ServiceLevelObjective updateServiceLevelObjective(
+ UpdateServiceLevelObjectiveRequest request) {
+ return updateServiceLevelObjectiveCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Update the given `ServiceLevelObjective`.
+ *
+ * Sample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceLevelObjective serviceLevelObjective = ServiceLevelObjective.newBuilder().build();
+ * UpdateServiceLevelObjectiveRequest request = UpdateServiceLevelObjectiveRequest.newBuilder()
+ * .setServiceLevelObjective(serviceLevelObjective)
+ * .build();
+ * ApiFuture<ServiceLevelObjective> future = serviceMonitoringServiceClient.updateServiceLevelObjectiveCallable().futureCall(request);
+ * // Do something
+ * ServiceLevelObjective response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallableSample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceLevelObjectiveName name = ServiceLevelObjectiveName.of("[PROJECT]", "[SERVICE]", "[SERVICE_LEVEL_OBJECTIVE]");
+ * serviceMonitoringServiceClient.deleteServiceLevelObjective(name);
+ * }
+ *
+ *
+ * @param name Resource name of the `ServiceLevelObjective` to delete. Of the form
+ * `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteServiceLevelObjective(ServiceLevelObjectiveName name) {
+
+ DeleteServiceLevelObjectiveRequest request =
+ DeleteServiceLevelObjectiveRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ deleteServiceLevelObjective(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Delete the given `ServiceLevelObjective`.
+ *
+ * Sample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceLevelObjectiveName name = ServiceLevelObjectiveName.of("[PROJECT]", "[SERVICE]", "[SERVICE_LEVEL_OBJECTIVE]");
+ * serviceMonitoringServiceClient.deleteServiceLevelObjective(name.toString());
+ * }
+ *
+ *
+ * @param name Resource name of the `ServiceLevelObjective` to delete. Of the form
+ * `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteServiceLevelObjective(String name) {
+
+ DeleteServiceLevelObjectiveRequest request =
+ DeleteServiceLevelObjectiveRequest.newBuilder().setName(name).build();
+ deleteServiceLevelObjective(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Delete the given `ServiceLevelObjective`.
+ *
+ * Sample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceLevelObjectiveName name = ServiceLevelObjectiveName.of("[PROJECT]", "[SERVICE]", "[SERVICE_LEVEL_OBJECTIVE]");
+ * DeleteServiceLevelObjectiveRequest request = DeleteServiceLevelObjectiveRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * serviceMonitoringServiceClient.deleteServiceLevelObjective(request);
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteServiceLevelObjective(DeleteServiceLevelObjectiveRequest request) {
+ deleteServiceLevelObjectiveCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Delete the given `ServiceLevelObjective`.
+ *
+ * Sample code: + * + *
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ServiceLevelObjectiveName name = ServiceLevelObjectiveName.of("[PROJECT]", "[SERVICE]", "[SERVICE_LEVEL_OBJECTIVE]");
+ * DeleteServiceLevelObjectiveRequest request = DeleteServiceLevelObjectiveRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * ApiFuture<Void> future = serviceMonitoringServiceClient.deleteServiceLevelObjectiveCallable().futureCall(request);
+ * // Do something
+ * future.get();
+ * }
+ *
+ */
+ public final UnaryCallableThe default instance has everything set to sensible defaults: + * + *
The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *
For example, to set the total timeout of createService to 30 seconds: + * + *
+ *
+ * ServiceMonitoringServiceSettings.Builder serviceMonitoringServiceSettingsBuilder =
+ * ServiceMonitoringServiceSettings.newBuilder();
+ * serviceMonitoringServiceSettingsBuilder.createServiceSettings().getRetrySettings().toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30));
+ * ServiceMonitoringServiceSettings serviceMonitoringServiceSettings = serviceMonitoringServiceSettingsBuilder.build();
+ *
+ *
+ */
+@Generated("by gapic-generator")
+public class ServiceMonitoringServiceSettings
+ extends ClientSettingsNote: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction Service Description: The Stackdriver Monitoring Service-Oriented Monitoring API has endpoints
+ * for managing and querying aspects of a workspace's services. These include the `Service`'s
+ * monitored resources, its Service-Level Objectives, and a taxonomy of categorized Health Metrics.
+ *
+ * Sample for ServiceMonitoringServiceClient:
+ *
+ * Service Description: The UptimeCheckService API is used to manage (list, create, delete, edit)
diff --git a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcServiceMonitoringServiceCallableFactory.java b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcServiceMonitoringServiceCallableFactory.java
new file mode 100644
index 00000000..93982924
--- /dev/null
+++ b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcServiceMonitoringServiceCallableFactory.java
@@ -0,0 +1,115 @@
+/*
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.cloud.monitoring.v3.stub;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.grpc.GrpcCallSettings;
+import com.google.api.gax.grpc.GrpcCallableFactory;
+import com.google.api.gax.grpc.GrpcStubCallableFactory;
+import com.google.api.gax.rpc.BatchingCallSettings;
+import com.google.api.gax.rpc.BidiStreamingCallable;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.ClientStreamingCallable;
+import com.google.api.gax.rpc.OperationCallSettings;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.PagedCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallable;
+import com.google.api.gax.rpc.StreamingCallSettings;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.longrunning.stub.OperationsStub;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS
+/**
+ * gRPC callable factory implementation for Stackdriver Monitoring API.
+ *
+ * This class is for advanced usage.
+ */
+@Generated("by gapic-generator")
+@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+public class GrpcServiceMonitoringServiceCallableFactory implements GrpcStubCallableFactory {
+ @Override
+ public This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator")
+@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+public class GrpcServiceMonitoringServiceStub extends ServiceMonitoringServiceStub {
+
+ private static final MethodDescriptor This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator")
+@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+public abstract class ServiceMonitoringServiceStub implements BackgroundResource {
+
+ public UnaryCallable The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of createService to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction
+ *
+ *
* ======================== UptimeCheckServiceClient ========================
*
*
+ * try (ServiceMonitoringServiceClient serviceMonitoringServiceClient = ServiceMonitoringServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * Service service = Service.newBuilder().build();
+ * Service response = serviceMonitoringServiceClient.createService(parent, service);
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ */
+@Generated("by gapic-generator")
+public class ServiceMonitoringServiceStubSettings
+ extends StubSettings
+ * ServiceMonitoringServiceStubSettings.Builder serviceMonitoringServiceSettingsBuilder =
+ * ServiceMonitoringServiceStubSettings.newBuilder();
+ * serviceMonitoringServiceSettingsBuilder.createServiceSettings().getRetrySettings().toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30));
+ * ServiceMonitoringServiceStubSettings serviceMonitoringServiceSettings = serviceMonitoringServiceSettingsBuilder.build();
+ *
+ *